Hacker News new | ask | show | jobs
by jodrellblank 935 days ago
Someone in the HN comments called out that J is the proof that Iverson's "Notation as a Tool of Thought" is a failed idea. Even Iverson himself, the inventor of "Iverson Notation" (proto-APL) as a better math notation, the inventor of APL, who used it to design the IBM 360's processor and then turned it into a programming language, abandoned it for ugly ASCII scribble (J) because that was more convenient.

I guess the ideas, not the notation, turned out to be the important part after all.

"I have only made this letter longer because I have not had the time to make it shorter." - It's Advent of Code[1] (AoC) season again; take a moment to look at the answers people put in the big Reddit answers threads e.g.[2]. The comments are all a beautiful/awful zoo of languages - wildly varying in programmer experience level, familiarity with the language, choice of approach and algorithm, runtime, focus on a tidy solution or a quick answer. I wish we could see how much time people put into their solutions - I suspect this famous quote applies and it takes longer whether you polish a plain language or write directly in a terse language. I think the hurried or inexperienced answers tend to be long and garbled, the experienced and polished answers tend to be clean and clear. The racing leaderboard entries that I've seen - people seeing the problem and getting an answer ASAP - tend to be Python, and tend to be short and clear. They're almost never (APL, J, K, Q, R, uiua, Haskell). Does that say anything of value about the ability to quickly and clearly express ideas in a language?

I feel like there's enough of these answers now after years of AoC for someone to analyse and compare the languages. My gut feeling is that non-golfed Python still comes out the most easily writable and easily readable, the nicest balance between density and verbosity.

[1] https://adventofcode.com/ - daily puzzles through December, solved with code using whatever language you like, however you like, the site only checks your answer not your working.

[2] https://old.reddit.com/r/adventofcode/comments/1883ibu/2023_...

2 comments

https://blog.vero.site/post/noulith seems to be familiar with both APL and J, and draw some inspiration from them…
Lots of people do Python so it makes sense that a lot of leaderboard solutions are in python! Hardly rigorous (n=1) but I got on the leaderboard for day 2 using K. Other people have before in array languages too.
> "Lots of people do Python so it makes sense that a lot of leaderboard solutions are in python!"

Does it? If you saw a bike racer riding an old steel commuter bike with mudguards and pannier rack, because lots of people ride those, wouldn't that be weird? Bike racers ride lightweight carbon fibre bikes and they do so because other bike racers ride them and they could not be competitive with something much heavier and less aerodynamic. They use every advantage they can get.

If there was a programming language which was unusually good for rapid data crunching, over several years of AoC wouldn't you expect it to become the dominant language on the leaderboard?

AOC is pretty low stakes, so it doesn't really make sense to put too much effort into it. For the average person they can get a lot faster by automating all the input downloading/submitting/etc and writing a huge number of utilities in their language of choice than by learning an array language.

Each year probably only a single digit number of people using an array language actively try for leaderboard spots, so if anything it's impressive any of them manage compared to the 100x or 1000x number of python/etc programmers also competing.