Live data from Hacker News

Translating math into code with examples in Java, Racket, Haskell, Python (2011)

matt.might.net

1–10 of 95 posts

Re: Translating math into code with examples in Java, Racket, Haskell, Python (2011)

#3
Nice article, I was wondering why Julia wasn't featured considering its support for math syntax. I wondered whether this could have been an old article, but there is no date in the article.

I checked the RSS feed and couldn't find the article in it. I cross-checked the oldest article in the feed with the index of articles on the site, this article seems to be written before Dec 2014. This makes sense for why Julia isn't included.

Re: Translating math into code with examples in Java, Racket, Haskell, Python (2011)

#4
I dream of material that would explain some advanced (for a regular person understanding of the word) math concepts using Python. Maybe it's because I've programmed more in my life than did math, but the "language" we use to write it is absolutely crazy: one letter variables everywhere, no structure, thousands of custom notations etc. I'm not criticising it, I realise it exists this way for a reason and if I wasn't so lazy I would have learnt it in school. But with my 31-year old brain oriented for looking at a sequential flow of code, it's quite difficult to learn math now.

Re: Translating math into code with examples in Java, Racket, Haskell, Python (2011)

#5

Nice article, I was wondering why Julia wasn't featured considering its support for math syntax. I wondered whether this could have been an old article, but there is no date in the article. I checked the RSS feed and couldn't find the article in it. I cross-checked the oldest article in the feed with the index of articles on the site, this article seems to be written before Dec 2014. This makes sense for why Julia is…

Thanks for doing the sleuthing on that, I (and surely others) had been wondering about the same :).

Re: Translating math into code with examples in Java, Racket, Haskell, Python (2011)

#6

Nice article, I was wondering why Julia wasn't featured considering its support for math syntax. I wondered whether this could have been an old article, but there is no date in the article. I checked the RSS feed and couldn't find the article in it. I cross-checked the oldest article in the feed with the index of articles on the site, this article seems to be written before Dec 2014. This makes sense for why Julia is…

Thanks for doing the sleuthing on that, I (and surely others) had been wondering about the same :).

I see that there are other comment questioning the same, I saw that only after posting this else I would have added this as comment to it.

Re: Translating math into code with examples in Java, Racket, Haskell, Python (2011)

#7

Nice article, I was wondering why Julia wasn't featured considering its support for math syntax. I wondered whether this could have been an old article, but there is no date in the article. I checked the RSS feed and couldn't find the article in it. I cross-checked the oldest article in the feed with the index of articles on the site, this article seems to be written before Dec 2014. This makes sense for why Julia is…

That's also supported by the fact that examples are given using Python 2, not Python 3. Not a hard and fast rule, but it's a helpful heuristic.

Re: Translating math into code with examples in Java, Racket, Haskell, Python (2011)

#8
post #4

I dream of material that would explain some advanced (for a regular person understanding of the word) math concepts using Python. Maybe it's because I've programmed more in my life than did math, but the "language" we use to write it is absolutely crazy: one letter variables everywhere, no structure, thousands of custom notations etc. I'm not criticising it, I realise it exists this way for a reason and if I wasn't s…

Agreed. I think the internet needs a 'math as code' wiki site.

Math is so easy! and its a joy to work with when programming, but the way its written, the notation, is often baffling to me.

Re: Translating math into code with examples in Java, Racket, Haskell, Python (2011)

#9
I would think Clojure vs. Java would be used given immutability. I like both Haskell and Racket for math, especially this article on geometric algebra with Haskell:

https://crypto.stanford.edu/~blynn/haskell/ga.html

I am personally learning Shen[1] because Lisp, optional typing (great type system), and the formal work done within it, and for it in proving, verification and other related endeavors. It seems to tick the Haskell, Lisp, Prolog and logic boxes for me. Its portability is great[2], however, it is still young and building libraries. I am thinking on trying to mimic the DL work done by Dragan Djuric[3] for Clojure in Shen. We'll see how that goes...

[1] http://www.shenlanguage.org/ [2] https://shen-language.github.io/ [3] https://dragan.rocks/

Re: Translating math into code with examples in Java, Racket, Haskell, Python (2011)

#10
post #4

I dream of material that would explain some advanced (for a regular person understanding of the word) math concepts using Python. Maybe it's because I've programmed more in my life than did math, but the "language" we use to write it is absolutely crazy: one letter variables everywhere, no structure, thousands of custom notations etc. I'm not criticising it, I realise it exists this way for a reason and if I wasn't s…

Maybe you can start from a different angle. It might sound odd, but try taking a simple concept that you know, say calculating a restaurant tip or something and write it out in English + LaTeX. Build on this until you can do some more complicated problems, and soon I would bet you’ll read math as something a bit closer to code in your head. I had to do this a lot for classes in college, and forcing yourself into exposition is the math equivalent of rubber ducky programming. LaTeX will give you a feel somewhere between math and code that might feel a bit more natural.
Post reply on HN