Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Thinking in an Array Language. Parent comment
a cool example is April (Array Programming Re-Imagined in Lisp), which runs on top of Common Lisp...
https://github.com/phantomics/april
One can see that the Lisp macro APRIL-F compiles APL-like code to Lisp.
APRIL> (macroexpand '(april-f "3r4J9r5×⍳4")) (LET ((OUTPUT-STREAM *STANDARD-OUTPUT*)) (DECLARE (IGNORABLE OUTPUT-STREAM)) (SYMBOL-MACROLET ((INDEX-ORIGIN APRIL-WORKSPACE-COMMON::*INDEX-ORIGIN*) (PRINT-PRECISION APRIL-WORKSPACE-COMMON::*PRINT-PRECISION*) (COMPARISON-TOLERANCE APRIL-WORKSPACE-COMMON::*COMPARISON-TOLERANCE*) (DIVISION-METHOD APRIL-WORKSPACE-COMMON::*DIVISION-METHOD*) (RNGS APRIL-WORKSPACE-COMMON::*RNGS*)) (A-OUT (A-CALL (APL-FN-S ×) (A-CALL (APL-FN ⍳ INDEX-ORIGIN) 4) #C(3/4 9/5)) :PRINT-PRECISION PRINT-PRECISION :PRINT-TO OUTPUT-STREAM))) T
APRIL> (april-f "3r4J9r5×⍳4") 3r4J9r5 3r2J18r5 9r4J27r5 3J36r5 #(#C(3/4 9/5) #C(3/2 18/5) #C(9/4 27/5) #C(3 36/5))
APRIL> (describe *) #(#C(3/4 9/5) #C(3/2 18/5) #C(9/4 27/5) #C(3 36/5)) [simple-vector] Element-type: T Length: 4 ; No value
There are no comments on this comment yet.
a cool example is April (Array Programming Re-Imagined in Lisp), which runs on top of Common Lisp...
https://github.com/phantomics/april
One can see that the Lisp macro APRIL-F compiles APL-like code to Lisp.
we can run that: It has created a Lisp vector of complex numbers.