News for hackers. Stuff that matters.
Re:How to Force Your Kids to Do Math? by somenameforme on Sunday April 20, 2025 @02:25AM (#43741906)
This becomes even more true in higher level maths where programming language style functions would make everything vastly more clear, and easily typeable, than the traditional Greek symbols. sum(x+3, 1, 4) is just so much more clear (and consistent when generalized across other operations) and practically as concise as the mathematical way of expressing that which I cannot even type. Multiple variables would be a bit dirtier, but still much cleaner than the formal expression.

Interestingly mathematical symbols in the past also regularly evolved. Then at some point we just stopped doing that and get stuck in a time which is arguably no longer especially appropriate. So we're left with rather inconsistent symbols, oft reused in different contexts, and optimized for written communication.

Re:How to Force Your Kids to Do Math? by QuadmasterXLII on Sunday April 20, 2025 @02:32AM (#43741929)
The formal language of math is intensely optimized for rapidly communicating with yourself 90 seconds in the future, when doing a proof or calculation, turning paper into working memory. It does seem silly to use the same language for communicating with others across unkniwn but deep chasms of context. Its remarkable that it works at all
Re:How to Force Your Kids to Do Math? by lazystar on Sunday April 20, 2025 @03:16AM (#43742113)
its silly. itd be like introducing first year programming students to advanced maps/filters/anonymous function syntax, instead of the easier to understand for loops and if/else statements. math's "no true scottsman" approach to teaching only hurts itself in the long run.
Re:How to Force Your Kids to Do Math? by jpc0 on Sunday April 20, 2025 @03:30AM (#43742163)
I'm not sure if it would be easier to explain a map / filter to a first year student vs implementing the patten manually using a for loop and if statement...

Seems like a pretty easy example to make practically, for map have a collection of things, say balls or black. Pick up each one and do a thing to them, paint them blue for example.

For filter do the same except have two different colour balls, if they are yellow they get thrown away, of they are blue they get put in a bucket.

A for loop doing exactly the same you would need to explain the topic at hand, as well as explain iterating an index etc...

Re:How to Force Your Kids to Do Math? by renerick on Sunday April 20, 2025 @04:22AM (#43742367)
Explaining loops is independent of the concepts of collections though. It's also more general, since map/filter/reduce use some kind of loops under the hood anyway, the fact that probably shouldn't be ignored in education process. Unless of course you go with pure functional recursive iterator, but good luck explaining that one.

Maps and filters also require understanding of higher order functions and the very idea of passing function around as a value. I would argue that implementing map/filter with a loop and then demonstrating how this pattern is generalized as .map()/.filter() functions is better and more accessible

Re:How to Force Your Kids to Do Math? by imtringued on Sunday April 20, 2025 @06:49AM (#43742961)
The strangest part about mathematics culture is that there is a culture of vibing the notation.

Nobody in school ever tells you that there are glossaries on Wikipedia that tell you the meaning of the symbols. You're supposed to figure it out yourself using vibes.

The way mathematic notation is taught is inherently unstructured. You're expected to just get it.

Re:How to Force Your Kids to Do Math? by Viliam1234 on Sunday April 20, 2025 @07:38AM (#43743155)
For the purposes of education, it is important to keep in mind that "optimized for performance of a highly trained person" and "optimized for understanding of a complete beginner" are two different things.

I often see people make the mistake of trying to teach inappropriately abstract things to small children, because that's what the pros do, and we want the little kids become pros as soon as possible. Problem is, trying to skip the fundamentals is only harmful in long term.

First kids need to learn what all that stuff means, and then we can proceed to teach them the shortcuts.

Re:How to Force Your Kids to Do Math? by renerick on Sunday April 20, 2025 @03:52AM (#43742251)
It's hard to debate that mathematical notation has a lot of room for improvement. High level algebra is very cryptic and often looks like an arcane incantation rather than something comprehensible for an unknowing person.

That said, as a person who moderately enjoyed math in high school and university, this functional notation would make me hate math infinitely more. It's would look like Lisp, which, at high level, looks just as cryptic as algebra. The sheer amount of braces and mistakes that would be made when reading and writing them is nauseating.

Infix notation, for all its flaws, provides important visual aid for understanding the structure of the expression (the sum of two fractions looks very different from fraction of two sums for example). Whereas with functional notation it's like working on linear textual representation of abstract syntax tree. Trust me, nobody wants to read, write or transform one by hand

Re:How to Force Your Kids to Do Math? by milesrout on Sunday April 20, 2025 @04:50AM (#43742494)
The notation as it is works very well. It looks unfamiliar to you because you aren't familiar with it.
Re:How to Force Your Kids to Do Math? by cardanome on Sunday April 20, 2025 @05:53AM (#43742746)
Might I introduce you to our lord and saviour APL? Infix notation and was originally created to be exactly that, a better math notation.

https://aplwiki.com/wiki/Comparison_with_traditional_mathema...

Re:How to Force Your Kids to Do Math? by hilbert42 on Sunday April 20, 2025 @06:29AM (#43742883)
APL »» Linear A (Well almost!)

;-)

Re:How to Force Your Kids to Do Math? by pipes on Sunday April 20, 2025 @03:18AM (#43742122)
Thanks for this comment. My secret shame as a programmer is that I haven't really learnt much maths, stopped at 16 in school. Writing out the sum function like you did makes perfect sense to me immediately.

What I should really do is create myself a cheat sheet of symbols to code...

Re:How to Force Your Kids to Do Math? by imtringued on Sunday April 20, 2025 @06:51AM (#43742965)
Re:How to Force Your Kids to Do Math? by pipes on Sunday April 20, 2025 @07:20AM (#43743078)
Thanks for this :)
Re:How to Force Your Kids to Do Math? by serbuvlad on Sunday April 20, 2025 @07:45AM (#43743189)
My first thought when I read sum(x+3, 1, 4) was x+3+1+4.

Also it should be sum(x+3, x, 1, 4) since you need to encode what the iterator variable is as well.

Re:How to Force Your Kids to Do Math? by Izkata on Monday April 21, 2025 @01:12AM (#43748672)
I thought that was it too, but you're saying it's not..? I've been thinking about it for a few minutes now and I still can't figure out what other meaning it could have.

Edit: Oh wait, someone else mentions map/filter, did they mean this as a combination of range->map->sum and the latter two numbers are the range portion, like sum(map(x+3, 1..4)) ?

Edit2: And now I'm remembering sigma. I think it would have been more obvious to me if the order was flipped and your issue handled the way it is in that notation: sum(x=1, 4, x+3), though I'd still prefer the range notation: sum(x=1..4, x+3)

Re:How to Force Your Kids to Do Math? by serbuvlad on Monday April 21, 2025 @02:29AM (#43748964)
Yep. I agree and now we've basically reinvented sigma. Take the x=1 and put it below, take the 4 and put it above take the x+3 and put it to the right.

Granted I always found sigma a bit quirky for separating the range ends like that. Either x below and 1..4 above, or x=1..4 below/above would have been more intuitive.

But it's just a notation you learn once and then you know it.