Discussion:
April: A compiler from APL to Common Lisp (video)
Add Reply
Andrew Sengul
2020-09-11 18:28:15 UTC
Reply
Permalink
I gave an online talk on April, my compiler from APL to Common Lisp. You
can see the video here:



Repo: https://github.com/phantomics/april

HN thread here: https://news.ycombinator.com/item?id=24434717

The video is long, so here's a summary I posted on HN:

April compiles APL to Common Lisp. It has almost all of the lexical
functions and operators featured in Dyalog APL, the leading commercial
APL interpreter and the most featureful APL implementation. It has many
more features than the FOSS GNU APL, which is based on the old IBM APL2.

Dyalog APL's source code is about 500KLOC according to Dyalog's staff.
GNU APL is over 100KLOC per its homepage. April's .lisp files currently
stand at 6350LOC.

APL interpreters have traditionally been hard to connect to external
data sources. Because APL is typically implemented as an interpreter,
any connection to a database or other external system needs to be build
into that interpreter as a plugin. April is called from within a Lisp
program and you can pass it any array-formatted data. You can use CL
libraries to read from any database or other source, format the data as
an array and pass it to April for processing.

April takes some features from the k language, including
($[oneorzero;1;0]) if-statements and (g←{[a;b;c]a+b×c} ⋄ g[1;2;3])
n-argument functions.

April is extensible - you can easily create an extension to the language
with more functions and operators, and you can also re-implement the
utility functions that are used to parse and compile the language. The
language is designed from the ground up to support extension. There is
also a framework to extend the compiler to optimize common idioms, for
instance ⊃⌽,200 200 200⍴⍳9 is optimized to just fetch the last
row-major-ordered element of the big array instead of actually taking
the time and memory to ravel and reverse it.

The second half of the video features a preview of a hardware startup
called Bloxl that's powered by Common Lisp and April. Bloxl is a big
transparent block wall with LEDs inside the light up to create pixel
graphics. April was used to build the animations that run on Bloxl.
luserdroog
2020-09-13 05:02:11 UTC
Reply
Permalink
Post by Andrew Sengul
I gave an online talk on April, my compiler from APL to Common Lisp. You
http://youtu.be/AUEIgfj9koc
Repo: https://github.com/phantomics/april
HN thread here: https://news.ycombinator.com/item?id=24434717
April compiles APL to Common Lisp. It has almost all of the lexical
functions and operators featured in Dyalog APL, the leading commercial
APL interpreter and the most featureful APL implementation. It has many
more features than the FOSS GNU APL, which is based on the old IBM APL2.
Dyalog APL's source code is about 500KLOC according to Dyalog's staff.
GNU APL is over 100KLOC per its homepage. April's .lisp files currently
stand at 6350LOC.
APL interpreters have traditionally been hard to connect to external
data sources. Because APL is typically implemented as an interpreter,
any connection to a database or other external system needs to be build
into that interpreter as a plugin. April is called from within a Lisp
program and you can pass it any array-formatted data. You can use CL
libraries to read from any database or other source, format the data as
an array and pass it to April for processing.
April takes some features from the k language, including
($[oneorzero;1;0]) if-statements and (g←{[a;b;c]a+b×c} ⋄ g[1;2;3])
n-argument functions.
April is extensible - you can easily create an extension to the language
with more functions and operators, and you can also re-implement the
utility functions that are used to parse and compile the language. The
language is designed from the ground up to support extension. There is
also a framework to extend the compiler to optimize common idioms, for
instance ⊃⌽,200 200 200⍴⍳9 is optimized to just fetch the last
row-major-ordered element of the big array instead of actually taking
the time and memory to ravel and reverse it.
The second half of the video features a preview of a hardware startup
called Bloxl that's powered by Common Lisp and April. Bloxl is a big
transparent block wall with LEDs inside the light up to create pixel
graphics. April was used to build the animations that run on Bloxl.
Holy Cow! I love this! Non friggan das blinkenlights!
His Kennyness
2020-09-13 16:38:40 UTC
Reply
Permalink
Post by Andrew Sengul
I gave an online talk on April, my compiler from APL to Common Lisp. You
http://youtu.be/AUEIgfj9koc
Repo: https://github.com/phantomics/april
HN thread here: https://news.ycombinator.com/item?id=24434717
April compiles APL to Common Lisp. It has almost all of the lexical
functions and operators featured in Dyalog APL, the leading commercial
APL interpreter and the most featureful APL implementation. It has many
more features than the FOSS GNU APL, which is based on the old IBM APL2.
Dyalog APL's source code is about 500KLOC according to Dyalog's staff.
GNU APL is over 100KLOC per its homepage. April's .lisp files currently
stand at 6350LOC.
APL interpreters have traditionally been hard to connect to external
data sources. Because APL is typically implemented as an interpreter,
any connection to a database or other external system needs to be build
into that interpreter as a plugin. April is called from within a Lisp
program and you can pass it any array-formatted data. You can use CL
libraries to read from any database or other source, format the data as
an array and pass it to April for processing.
April takes some features from the k language, including
($[oneorzero;1;0]) if-statements and (g←{[a;b;c]a+b×c} ⋄ g[1;2;3])
n-argument functions.
April is extensible - you can easily create an extension to the language
with more functions and operators, and you can also re-implement the
utility functions that are used to parse and compile the language. The
language is designed from the ground up to support extension. There is
also a framework to extend the compiler to optimize common idioms, for
instance ⊃⌽,200 200 200⍴⍳9 is optimized to just fetch the last
row-major-ordered element of the big array instead of actually taking
the time and memory to ravel and reverse it.
The second half of the video features a preview of a hardware startup
called Bloxl that's powered by Common Lisp and April. Bloxl is a big
transparent block wall with LEDs inside the light up to create pixel
graphics. April was used to build the animations that run on Bloxl.
Bravo!
Zyni Moë
2020-09-13 18:06:15 UTC
Reply
Permalink
Post by Andrew Sengul
I gave an online talk on April, my compiler from APL to Common Lisp.
This is wonderful thing. Even all these years later CL is the best. Have
been using Racket recently and although language core is nicer than CL
perhaps, so much is just misdesign and not thought through (also
incmprehensible often). CL is like home.
--
the small snake
Loading...