4 ms·
You can do super dense mathematical code in the ancient APL programming language[1]. I wonder how even more tiny this program could get at the hands of an APL e
by cantrevealname 11y ago
You can do super dense mathematical code in the ancient APL programming language[1]. I wonder how even more tiny this program could get at the hands of an APL expert if any still exist.
Here are some complete APL programs[2] to give a flavor of just how dense it can get:
Sum integers from 1 to 100:
+/ι100
Find all primes from 2 to a given number R:
(∼R∈R◦.×R)/R←1↓ιR
Play Conway's Game of Life:
life←{↑1 ⍵∨.∧3 4=+/,¯1 0 1∘.⊖¯1 0 1∘.⌽⊂⍵}
[1] https://en.wikipedia.org/wiki/APL_%28programming_language%29 https://en.wikipedia.org/wiki/APL_%28programming_language%29
[2] http://www.vaxman.de/publications/apl_slides.pdf http://www.vaxman.de/publications/apl_slides.pdf
- robotmlg 11y agoI've always enjoyed this video of a guy showing how to write Conway's Game of Life in APL, step by step: https://www.youtube.com/watch?v=a9xAKttWgP4 https://www.youtube.com/watch?v=a9xAKttWgP4