4 ms·
No APL? That language always wins on code golf. You wouldn't want to maintain it though. However it absolutely shines if you're on a 110 baud teletype and h
by narrator 14y ago
No APL? That language always wins on code golf. You wouldn't want to maintain it though. However it absolutely shines if you're on a 110 baud teletype and have to wait for each character to print. /s
- Locke1689 14y agoThis is truly an apt criticism. There are a lot of J solutions for problems which Mathematica also has a solution, but for some reason it wasn't included.
- JonMcLoone 14y agoI quickly ran the code on J and got ratios of lines:0.5, characters: 0.74, tokens:0.5, over 432 comparisons IE J is about half the length of Mathematica code. APL, has ratios of between 1 and 2 (IE a little longer than Mathematica, but over only 32 comparisons which is too few to be reliable). Julia was also asked about, but there are only 9 comparisons which is certainly too few to be meaningful.