Which LISP should I learn? Years ago I read about Scheme and wrote some hello world level code. I learned about lambda functions and currying. I also looked at racket. A few years ago, much of my day job involved the JVM and I was getting sick of Java so I got a book on Clojure, which is a very nice language, but I never wrote any.
A few days ago I downloaded and built the latest version of DrRacket.
Should I go straight to Haskell? Or what about other functional languages? Is Erlang worth a look?
I need something stimulating to distract my brain from the mundane nature of everyday life, and mediocre programming languages.
(Score: 2) by turgid on Thursday December 02 2021, @05:11PM (1 child)
I wrote fixed-point trig functions once and used them to calculate pi.
I refuse to engage in a battle of wits with an unarmed opponent [wikipedia.org].
(Score: 3, Interesting) by DannyB on Thursday December 02 2021, @05:45PM
I wrote a Java function to calculate PI to arbitrary precision, using only BigInteger, no trig, only add, subtract, multiply and divide. It was an efficient algorithm based on some efficient formula. I think I saw it years ago on Hacker News.
I tried to post that function here, but alas SN just won't allow it.
Then I built a very similar function that used Java's BigDecimal.
Someone, not myself, wrote a set of Trig and other functions for the BigDecimal class. BigDecimal is excellent for business numeric values such as money, but not quite like floating point. With BigDecimal you must specify precision limits, rounding modes, etc. There are no defaults. You must specify them.
Young people won't believe you if you say you used to get Netflix by US Postal Mail.