hn.today

April: APL as a DSL in Common Lisp

github.com11 points3 comments
Screenshot of April: APL as a DSL in Common Lisp

April is a project that compiles a useful subset of the APL array language into Common Lisp, arguing that embedding APL in Lisp removes the historical barriers that kept APL confined to monolithic runtimes. By leveraging Lisp macros and its numeric facilities, April lets developers express dense numeric transformations in APL’s terse notation while interoperating with databases, binary streams and other host-system resources. The implementation emphasizes extensibility and integration - bringing APL’s vector programming power into the broader Lisp ecosystem rather than forcing data into specialized APL runtimes.

Concrete features include a Quicklisp install (ql:quickload 'april), evaluation macros (april and april-f) that run APL strings inside a Lisp REPL, and state parameters such as :count-from to switch 0/1 indexing. The project supports many Common Lisp implementations (SBCL, CCL, ECL, ABCL, Clasp, Allegro, LispWorks) with compatibility notes, ships an APL lexicon and demos, and documents which APL primitives are implemented or omitted. Examples in the interface show core APL operations - index generation (⍳), reshape (⍴), reductions (+/ and +⌿), and rotations (⌽). Development is active, open-source under Apache‑2.0, accompanied by academic presentations (including PLDI 2023) and community channels for discussion and funding.

Read on github.com3 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Programming

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.