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: 3, Interesting) by turgid on Wednesday December 01 2021, @10:33PM (11 children)
About a million years ago I had several ideas for stuff and then over the years whenever I've had time I've tried to do bits and pieces of them. Some years ago I set about writing my own graphics primitives (in C) to be rendered using SDL (well, it's simple and cheap). I wrote pixels, lines, circles, ellipses, boxes, colour gradients and all sorts. I even implemented display lists so that I could have objects to render and move the mouse about and it would know which object it was over, click to drag and so on. On my travels I wrote some code to do the Mandelbrot set. I thought it would be a fun thing for Turgid jr. to see being written. He was about 8 at the time. I planned to make it zoomable with the mouse but never got around to it. And did I tell you about my home-made 3D graphics? Oh boy... with multi-threading?
I refuse to engage in a battle of wits with an unarmed opponent [wikipedia.org].
(Score: 2) by DannyB on Thursday December 02 2021, @03:22PM (2 children)
I've mentioned this on SN before.
Back in ancient times long past, there were these things called "flip phones" or "candy bar phones". (Paleontologists label this as the "pre smart phone era")
https://soylentnews.org/comments.pl?cid=1134316&sid=42871 [soylentnews.org]
Be sure to see some replies after that posting.
See also:
https://soylentnews.org/comments.pl?noupdate=1&sid=40718&page=1&cid=1080994#commentwrap [soylentnews.org]
about drawing vector graphics on a scope, which in subsequent replies brings up the J2ME asteroids game again. It also shows a way to write a Factorial function without iteration. And how to do Trig functions when you have only integers but no floating point.
Young people won't believe you if you say you used to get Netflix by US Postal Mail.
(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.
(Score: 2) by DannyB on Thursday December 02 2021, @08:14PM (7 children)
<no-sarcasm>
There is some programming you do for fun. There is other programming that pays the bills.
</no-sarcasm>
Another fun project (annually, which I just had lots of fun doing) is writing code to do electronic filing as per specification IRS Pub. 1220 (Rev. 10-2021) to communicate with mainframes in an archaic fixed record format designed in the days when dinosaurs roamed the earth.
Young people won't believe you if you say you used to get Netflix by US Postal Mail.
(Score: 3, Funny) by DannyB on Thursday December 02 2021, @10:33PM (4 children)
Well here is a first, for me anyway.
IRS Pub 1220 (Rev. 10-2021). Available here:
https://www.irs.gov/pub/irs-pdf/p1220.pdf [irs.gov]
There is an error!
ERROR on IRS Pub 1220 (Rev. 10-2021)
Page 113 of PDF
Record B, Form 1099-NEC
Positions 548-722 Blank 173 length
WRONG: the length is 175 not 173!
It pays to be a geek and pay attention to detail.
Young people won't believe you if you say you used to get Netflix by US Postal Mail.
(Score: 0) by Anonymous Coward on Friday December 03 2021, @05:18AM (3 children)
They make errors in the length calculation all the time. The specification says, or at least used to say, that the "length" column is "advisory" and that you should only rely on the position. However looking at this year's with my experience in the past, I vaguely remember there being a different layout in that same area with more length 1 records. Perhaps they changed them all to blanks this year or in the past and just copy-pasted the 173 instead of adding the two 1s as well. Perhaps you could check the IRS's test files to see what they do.
(Score: 3, Insightful) by DannyB on Monday December 06 2021, @03:40PM (2 children)
If you go with 173 instead of 175 then your total record length is 748 instead of 750, and all your other field positions are wrong. If you assume that it is length which is wrong, then all other field positions line up, record length if 750 and everything else fits correctly. So the preponderance of the evidence is that there is a single small mistake, instead of all other field positions and the record length being wrong for the "B" record.
Young people won't believe you if you say you used to get Netflix by US Postal Mail.
(Score: 0) by Anonymous Coward on Monday December 06 2021, @10:22PM (1 child)
Maybe I am misreading you, but where did I suggest the alternative?
(Score: 0) by Anonymous Coward on Monday December 06 2021, @11:36PM
I think I got it. That last sentence is missing its introductory phrase of "if you really cared" that I could have sworn I added.
(Score: 1, Funny) by Anonymous Coward on Sunday December 05 2021, @10:39AM (1 child)
You know, you're on to something. That format is just screaming out in the hope that you implement it in COBOL. Two birds with one stone, that is. You can add COBOL experience (I hear it is in high demand /s) and IRS/financial software experience to your resume. What better way to make yourself seem too old and too expensive to hire at the same time?
(Score: 1, Funny) by Anonymous Coward on Saturday December 18 2021, @05:13PM
Cobol is a form of Ransomware?