News for hackers. Stuff that matters.
Re:For mathematicians, = does not mean equality by kps on Friday April 13, 2018 @06:03PM (#16834272)
(I assume this was inspired by https://news.ycombinator.com/item?id=16803874)

The use of ‘=’ for assignment in programming languages comes, not directly from mathematics, but indirectly from the use of mathematics in science and engineering. As an example, consider the formula for kinetic energy, commonly written

        𝑚𝑣²
    𝐾 = ───
         2
Why isn't it written 2K=mv², which expresses the same mathematical equality in a smaller, simpler form? Or any of the other equivalent rearrangements? It's because formulas have a convention, where the LHS is a single term naming the value you want, and the RHS contains the terms for values you have. That is, a formula doesn't just state an equality, it states a method for calculating something. That usage predates programming, and was explicitly copied by early programming languages like For[mula]tran[slator] that were designed for scientific & engineering calculations.
Re:For mathematicians, = does not mean equality by hyperpallium on Friday April 13, 2018 @08:29PM (#16835098)
Because I started programming before taking maths at school, I didn't properly appreciate equality for a while.

Sure, algebra was fine, a(x+y)=ax+ay can go either way; but not ratios and other relationships.

What helped me was was geometry, where you can see it's just a relationship. All the components move together; one part isn't priviledged as the result.

e.g. you enlarge a circle. It doesn't make sense to ask whether the radius made the circumference bigger, or the circumference made the radius bigger.

Re:For mathematicians, = does not mean equality by golergka on Saturday April 14, 2018 @06:39AM (#16836763)
I remember starting with QBasic when I was around 7 or 8 years old, and I quickly got an idea – just put in the equations from math homework to find out the answer! Fighting through the error messages without English and trying to wrap my mind around the basic concepts of procedural programming was a world of pain.
Re:For mathematicians, = does not mean equality by nitrogen on Saturday April 14, 2018 @01:05PM (#16838213)
Nice. I had fun in some junior high math competitions in part by writing TI BASIC programs on my calculator to brute force hard problems while I did the easy ones. Eventually they stopped allowing calculators altogether and focused on cheap memorized tricks instead of generalized problem solving.
Re:For mathematicians, = does not mean equality by nitrogen on Saturday April 14, 2018 @03:19PM (#16838930)
I'm curious what prompted two people to disagree with this comment so quickly, with no comment.
Re:For mathematicians, = does not mean equality by gaurav_v on Saturday April 14, 2018 @05:04PM (#16839496)
I didn't downvote, but the reason is likely because your comment is off-topic. The parents are talking about experiences un-learning one-sided equality that they picked up programming before learning algebra; your comment is about programming a T-83 to help with schoolwork.
Re:For mathematicians, = does not mean equality by jonnybgood on Friday April 13, 2018 @06:19PM (#16834379)
I believe it comes directly from conventional math exposition. In a general form it’s about emphasis.

“The change of subject from “The dog bit the boy” to “the boy was bitten by the dog” is similar to the change of subject in a formula, as for example … In each case, the two sentences state the same relationship, but with different emphasis.” [1]

[1] https://medium.com/q-e-d/that-loser-woman-mathematician-who-...

Re:For mathematicians, = does not mean equality by no_identd on Friday April 13, 2018 @10:26PM (#16835537)
Speaking of subject, I find it helpful to have awareness of changes in agent/patient, and not just object/subject:

https://en.wikipedia.org/wiki/Thematic_relation

https://en.wikipedia.org/wiki/Agent_(grammar)

https://en.wikipedia.org/wiki/Patient_(grammar)

Re:For mathematicians, = does not mean equality by ancarda on Saturday April 14, 2018 @06:12AM (#16836712)
Off-topic: how did you format that equation (K = mv^2/2) so nicely? e.g. mv is in italics. It looks really nice.

Does Hacker News have built in LaTeX, or is that just very clever use of Unicode?

Re:For mathematicians, = does not mean equality by Recursing on Saturday April 14, 2018 @07:00AM (#16836812)
Seems to be just unicode in a code block. mv is 𝑚𝑣
Re:For mathematicians, = does not mean equality by acqq on Saturday April 14, 2018 @10:46AM (#16837508)
And the verbatim lines are explained here:

https://news.ycombinator.com/formatdoc

Re:For mathematicians, = does not mean equality by abrowne on Saturday April 14, 2018 @12:21PM (#16837987)
And two black squares on Firefox beta on my Android 5.1 phone.
Re:For mathematicians, = does not mean equality by barrkel on Saturday April 14, 2018 @01:01PM (#16838190)
Works fine in Firefox Beta (and normal Firefox) on my Android 8 phone.
Re:For mathematicians, = does not mean equality by abrowne on Sunday April 15, 2018 @12:06PM (#16843236)
OK, so fixed in up-to-date Android or with a better vendor (mine is TCL [Alcatel branded]).
Re:For mathematicians, = does not mean equality by kqr on Saturday April 14, 2018 @03:47AM (#16836366)
While this reasoning may be common, I don't think it's to anyone's benefit. Talking about "the" formula for kinetic energy seems nonsensical, when there are so many ways to state that relationship. Another option is p^2=mK.

But there is a good reason to write it as K=mv^2/2 which has nothing to do with specifying a computation. It is the result of symbolic integration of p=mv with respect to v.

Re:For mathematicians, = does not mean equality by a1369209993 on Saturday April 14, 2018 @05:06AM (#16836585)
And, perhaps more intuitively, its the second integral of m with respect to v. This pattern also shows up in eg A = ∫∫τ∂r² for the area of a circle.
Re:For mathematicians, = does not mean equality by filmor on Saturday April 14, 2018 @08:32AM (#16837035)
If the expression is supposed to be the definition and not just a derived equality, at least Mathematicians (and some Physicists) would use := instead, just as Niklaus Wirth tried to establish with Pascal.
Re:For mathematicians, = does not mean equality by dhimes on Saturday April 14, 2018 @09:04AM (#16837143)
or ≡
Re:For mathematicians, = does not mean equality by Nullabillity on Saturday April 14, 2018 @09:29AM (#16837244)
I've only seen that used for congruence (x ≡ y <=> f(x) = f(y), for some context-dependent f).
Re:For mathematicians, = does not mean equality by dhimes on Saturday April 14, 2018 @12:01PM (#16837872)
It used to mean "define" in ancient times.
Re:For mathematicians, = does not mean equality by bhnmmhmd on Saturday April 14, 2018 @08:44AM (#16837067)
I'm always asking "why haven't scientists come up with more symbols yet?"

I also ask "why haven't more symbols been introduced to our keyboards? Just !@#$%&*..."

It's strange, esp. when you realize coming up with a new symbol that everyone uses is easier these days than it was 4 centuries ago!

Re:For mathematicians, = does not mean equality by swiley on Saturday April 14, 2018 @09:00AM (#16837128)
There are many strange symbols in math already that can be difficult to type without something like LaTeX. I feel like something pronounceable is usually better unless you have a sufficiently general idea.
Re:For mathematicians, = does not mean equality by paulddraper on Saturday April 14, 2018 @10:50PM (#16840843)
> "why haven't scientists come up with more symbols yet?"

Take an advanced math test and try to type it out. Being in no sense historically limited by typewriters/keyboards, you might be surprised at the complexity of the symbols.

Re:For mathematicians, = does not mean equality by fjsolwmv on Saturday April 14, 2018 @07:05PM (#16840087)
You'd love APL
Re:For mathematicians, = does not mean equality by taylorexpander on Saturday April 14, 2018 @01:23AM (#16836033)
> It's because formulas have a convention, where the LHS is a single term naming the value you want, and the RHS contains the terms for values you have.

This is simply not true.

Re:For mathematicians, = does not mean equality by corndoge on Saturday April 14, 2018 @01:25AM (#16836041)
I agree this is not entirely true, I have often heard physicists express similar formulas in the way the parent described (I.e. 2K = mv^2)
Re:For mathematicians, = does not mean equality by MereInterest on Saturday April 14, 2018 @08:01AM (#16836957)
I've seen that, too, but there is usually a reason for writing it in that form. The most common would be that you have a different equation with 2K in it, and so you want to make variable substitution simpler. Alternatively, if you are reading older papers, typesetting inline equations that don't fit in a single line was painful. For that reason, a formula might be rearranged to avoid needing any fractions.
Re:For mathematicians, = does not mean equality by dnautics on Saturday April 14, 2018 @03:06AM (#16836274)
PV=nRT
Re:For mathematicians, = does not mean equality by baddox on Saturday April 14, 2018 @03:35AM (#16836342)
While I don’t think the terminology is explicitly standardized, I think most people in the relevant fields would call that statement of the ideal gas law an equation but not a formula, the latter being a special case of the former.
Re:For mathematicians, = does not mean equality by grigjd3 on Saturday April 14, 2018 @09:23AM (#16837227)
As a trained theoretical physicist, I am entirely unaware of the distinction you are trying to draw here.
Re:For mathematicians, = does not mean equality by baddox on Saturday April 14, 2018 @03:13PM (#16838901)
Can you find any reference to the idea gas law as a “formula?” As far as I can tell, equations without a single variable on the left side are referred to as simply equations, while solutions of such equations in terms of one variable are referred to as formulas. This seems to be the case for every well-known identity I can think of, like the quadratic equation/formula. Can you think of any counterexamples?
Re:For mathematicians, = does not mean equality by fjsolwmv on Saturday April 14, 2018 @07:09PM (#16840101)
https://www.google.com/search?q=formula

Definition 1 ("equation") vs definition 2b ("recipe")

As a theoretical physicist you might find definition 2b uninteresting.

Re:For mathematicians, = does not mean equality by coldtea on Saturday April 14, 2018 @11:49AM (#16837813)
>Why isn't it written 2K=mv², which expresses the same mathematical equality in a smaller, simpler form?

Because you want to find the value of K, which means that if it was expressed thusly, you'll still need to divide by 2 to get to the desired result.