News for hackers. Stuff that matters.
Re:Ask HN: How to self-study physics? by andrepd on Thursday March 26, 2020 @12:04PM (#22694950)
>The observer effect in physics can be trivially expressed and evaluated as a mutating getter in any programming language.

>It cannot be expressed in any Mathematical grammar.

What on earth are you trying to say...? There is a whole mathematical treatment of quantum mechanics, measurement effect included (several treatments). More to the point, any algorithm can be formalised in e.g. a Turing machine, or any other equivalent universal model of computation. So there's literally nothing in "computer science" that you cannot express in mathematics.

This reeks of Dunning-Kruger: you don't even know enough about what you're talking about to realise how badly little sense you're making. I strongly suggest you familiarise yourself with a topic before opining about it. I'll be hard-pressed to believe you ever opened a physics textbook in your life after high school. Why then do you feel the need to talk blindly about it? I never opened a book about aeronautics in my life, therefore I would never presume to lecture anybody about plane-building... That would just be arrogance.

Re:Ask HN: How to self-study physics? by gaze on Thursday March 26, 2020 @03:25PM (#22696969)
it's like... kinda true that the observer effect can be expressed as a mutating getter... but that isn't useful. The idea that it can't be expressed is really ignorant.
Re:Ask HN: How to self-study physics? by jshevek on Thursday March 26, 2020 @01:12PM (#22695688)
>This reeks of Dunning-Kruger: you don't even know enough about what you're talking about to realise how badly little sense you're making. I strongly suggest you familiarise yourself with a topic before opining about it. I'll be hard-pressed to believe you ever opened a physics textbook in your life after high school. Why then do you feel the need to talk blindly about it?

You can just address their ideas, this extra stuff isn't helpful.

Re:Ask HN: How to self-study physics? by ukj on Thursday March 26, 2020 @12:38PM (#22695324)
>Any algorithm can be formalised in e.g. a Turing machine, or any other equivalent universal model of computation

Quoting http://math.andrej.com/2006/03/27/sometimes-all-functions-ar...

>>The lesson is for those “experts” who “know” that all reasonable models of computation are equivalent to Turing machines. This is true if one looks just at functions from N toN. However, at higher types, such as the type of our function m, questions of representation become important, and it does matter which model of computation is used.

Mathematics only proves things up to isomorphism. Two things that are theoretically equivalent are not necessarily empirically equivalent.

Or, just the good ol' adage: in theory there is no difference between theory and practice, but in practice there is.

>So there's literally nothing in "computer science" that you cannot express in mathematics.

In addition to the examples in the blog post linked above, you cannot express a mutating getter in Mathematics.

Go ahead. I'll wait.

Re:Ask HN: How to self-study physics? by andrepd on Friday March 27, 2020 @05:02PM (#22706858)
The link you has its fallacy in the premise. It's defining "function" as "computable function", then complaining that many results that follow do not agree with the former definition! Either I'm really missing something or this is some poor attempt at trolling / bait-and-switch. Of course you have problems with that "computable function" definition when dealing with functions from Real -> Real, since many (in fact, almost all) real numbers are not computable!

Re mutating getter:

Monads for example are a standard way of formalising state in a pure-function universe. You seem to have some fundamental misconception about what "mathematics" is, since you keep repeating something about purity. Mathematics is merely the rigorous study of formal systems, of which your mystical "mutating getter" is one such system.

Re:Ask HN: How to self-study physics? by ukj on Friday March 27, 2020 @06:52PM (#22707618)
You have some deeply flawed (or entirely absent) philosophical upbringing. There are no "foundations" to anything - all definitions are arbitrary.

To assert that a premise is fallacious mandates that you have some prior notion of "fallaciousness".

You don't have an objective criterion for asserting whether one definition is better than another because you don't have a notion of "betterness" - it's all conventional.

It's precisely because I am an over-zealous formalist is why I see Mathematics for what it is - grammar, syntax and semantics.

It's just language.

Re:Ask HN: How to self-study physics? by diegoperini on Thursday March 26, 2020 @02:31PM (#22696430)
Mutating getter? Sounds like a generator function that yields. Or a pseudo random number generator implemented with a monad (WorldState, Value). Or any tail-recursive non-void function that carry state without loss?

I'm definitely not an expert but aren't irrational numbers are the best examples to show that these types of constructs already exist in math? You can't calculate them in finite amount of time. You use an analytical formula or series expansions to get the nth term instead.

Re:Ask HN: How to self-study physics? by ukj on Thursday March 26, 2020 @03:25PM (#22696967)
Assume that it is a black box to you, even though it is a white box to me.

Every time you call read() on it - you get a different result. It has side-effects.

This violates the “purity” of Mathematics.

Re:Ask HN: How to self-study physics? by diegoperini on Thursday March 26, 2020 @03:51PM (#22697231)
I just explained three different models to represent side-effects without leaving the purity. I'm not sure if you are trolling, throwing random big words or simply have a really misguided impression about how computer science connects with math.
Re:Ask HN: How to self-study physics? by ukj on Friday March 27, 2020 @01:55AM (#22700689)
Your monad(WorldState, Value) example assumes shared global state. So not a networked system then?

That's not a train-smash for your argument if you can show me a Mathematical model for a global mutex.

When the discussion turns to control-flow you are inevitably in the land of well-ordered imperatives, not Mathematical, lazy-evaluated declaratives.

Re:Ask HN: How to self-study physics? by ubercow13 on Thursday March 26, 2020 @03:23PM (#22696944)
What is special about a mutating getter? It operates on the state of the object S and outputs a new state S' and some value x. Some programming languages allow you to write 'functions' without explicitly passing all input state into the function, but does that imply anything fundamental or interesting about mathematics or computation? Is that anything more than a type of syntactic sugar?
Re:Ask HN: How to self-study physics? by ukj on Saturday March 28, 2020 @08:36AM (#22710760)
What is "special" is that the system has a peculiar property: f(x) != f(x).

If we claim to be subscribed to denotational (Mathematical) semantics then the above contradicts the identity axiom.

And it's not any deep and world-changing insight either - it's obvious to anybody who sees that the LHS and RHS are only evaluated at runtime - they don't have any inherent (denotational) meaning, which is why I keep harping on: programmers use different semantics to mathematicians. We care about things like interaction and control flow structures as first class citizens - those are precisely the things that have no mathematical equivalents. Timeouts, exceptions, retry loops.

It's not "syntactic sugar" - it's necessity for reifying control flow. In the words of the (late) Ed Nelson: The dwelling place of meaning is syntax; semantics is the home of illusion.

https://web.math.princeton.edu/~nelson/papers/rome.pdf

Re:Ask HN: How to self-study physics? by andrepd on Friday March 27, 2020 @05:03PM (#22706873)
Of course it isn't. OP seems to have some kind of misconception about what "mathematics" means, since they keep fixating on a vague concept of purity of notation.
Re:Ask HN: How to self-study physics? by Jenz on Thursday March 26, 2020 @02:15PM (#22696275)
> In addition to the examples in the blog post linked above, you cannot express a mutating getter in Mathematics.

Neither can you express foobarish bamboozles...

Re:Ask HN: How to self-study physics? by ukj on Thursday March 26, 2020 @02:54PM (#22696645)
I can express a mutating getter in any modern programming language much like you just expressed “foobarish bambozles” in English.

Q.E.D

Re:Ask HN: How to self-study physics? by jshevek on Thursday March 26, 2020 @01:08PM (#22695645)
Please don't use that style of quotation for non-code. It is awful on mobile.