Petalisp, array programming in Common Lisp
Bradley Lucier 02 Jun 2024 21:04 UTC
The European Lisp Symposium's 2024 Programme introduced me to Marco
Heisig's project Petalisp, an array programming system in Common Lisp:
https://zenodo.org/records/11062314
https://dl.acm.org/doi/pdf/10.1145/3219753.3219755
https://github.com/marcoheisig/Petalisp
Similarly to SRFI 231, array-map is lazy in Petalisp. What Petalisp
calls Lazy Arrays would be a subset of what SRFI 231 calls generalized
arrays. Petalisp separates the specification of arrays from their use,
as does SRFI 231.
I had begun to think of storing a representation of the Abstract Syntax
Tree of the expressions that were combined to set up the result of
array-map, and maybe building a small library of Scheme loops for what
might be considered common operations on arrays (especially in
specialized application domains).
Marco Heisig has gone much further, in that any call to instantiate or
otherwise use the elements of a lazy array fires up a Just-In-Time
compiler to generate special loop code to execute the the call, taking
into account the strides of arrays and types of array elements, known
operators, etc.
A very cool project, very much in the spirit of SRFI 231, but
technically much further advanced in development.
Brad Lucier