News for hackers. Stuff that matters.
Re:Mathematical Notation, Past and Future (2000) by syngrog66 on Tuesday December 28, 2021 @01:16AM (#29711029)
I love math but prefer programming type syntax to express math ideas, rather than much of traditional math notation. Much of it feels too alien and non-intuitive. Too irregular and random, and not predictable. Various styles duct taped together over centuries. The names of the various symbols are hard to remember, and dont get me started on the pain from not being on the standard PC/ASCII/Western computer keyboards.

In short, a similar critique to that of Perl and PHP, except math is even worse.

Show me a Python-like notation for a math construct and I'm good to go. Even a Lisp!

Re:Mathematical Notation, Past and Future (2000) by kmill on Tuesday December 28, 2021 @11:28AM (#29715164)
You might like Structure and Interpretation of Classical Mechanics by Sussman and Wisdom. It does classical mechanics using an MIT-Scheme library.

Lean/mathlib is a mix of functional programming and classical math notation. The community likes unicode quite a lot, with support by the editor (using quasi-Latex input methods in both VS Code and emacs). Here's an example from graph theory (I removed some conceptually irrelevant parts):

  theorem simple_graph.sum_degrees_eq_twice_card_edges (G : simple_graph V) [fintype V] :
    ∑ (v : V), G.degree v = 2 * G.edge_finset.card
Re:Mathematical Notation, Past and Future (2000) by kmill on Tuesday December 28, 2021 @01:34PM (#29716443)
Speaking of which, there's a comment today about SICM in Clojure: https://news.ycombinator.com/item?id=29714267
Re:Mathematical Notation, Past and Future (2000) by sidpatil on Tuesday December 28, 2021 @10:06AM (#29714430)
Do you have a sample comparison between an expression/statement in math syntax versus in pseudocode syntax?
Re:Mathematical Notation, Past and Future (2000) by DarylZero on Tuesday December 28, 2021 @09:05AM (#29713860)
I think having 15 different ways to express multiplication is charming.
Re:Mathematical Notation, Past and Future (2000) by syngrog66 on Tuesday December 28, 2021 @12:27PM (#29715810)
agreed. heh. thankfully though at least 3 of them can be expressed with a normal keyboard:

ab

a * b

a X b