Exploring alisp 1.6: A New Milestone for a Common Lisp Implementation
The landscape of Lisp implementations is often dominated by long-standing giants, but the arrival of alisp 1.6 demonstrates that the drive to implement the Common Lisp standard is still very much alive. Developed by Andrea Monaco and hosted on Savannah, alisp aims to provide a robust implementation of Common Lisp capable of loading real-world systems, including the essential ASDF (Another System Definition Facility).
Version 1.6 represents a significant step forward in the project's maturity, focusing on refining core data structures, expanding the standard library, and fixing critical bugs in the object system. This update highlights the iterative nature of language implementation, where architectural redesigns often trade off immediate features for long-term stability.
Key Technical Updates in Version 1.6
Redesigning Specialized Arrays
One of the most impactful changes in this release is the complete redesign of specialized arrays. In alisp 1.6, strings and bit vectors are now treated as instances of byte arrays. This architectural shift is intended to pave the way for arrays specialized to integers of various sizes in the future.
However, this redesign has introduced a temporary regression: because strings are now byte-based, Unicode support is currently unavailable. The developer has noted that Unicode support will return in a future release, implemented through a different mechanism.
Enhancing the Object System (CLOS)
The Common Lisp Object System (CLOS) is one of the most complex parts of the standard. Version 1.6 addresses several critical areas:
- Structure Slots: Initialization forms are now supported for structure slots, allowing for more flexible object creation.
- DEFCLASS Bug Fixes: A bug in the Lisp-based implementation of
DEFCLASSwas resolved. Previously, accessor methods were defined without type specializers, which led to subtle bugs when different classes shared accessor names for different fields. This was particularly problematic for ASDF, which relies heavily on these patterns. - Generic Functions: The implementation now includes the
SLOT-MISSINGandSLOT-UNBOUNDgeneric functions, improving error handling and introspection within the object system.
Standard Library and Language Extensions
Several missing pieces of the Common Lisp standard have been filled in this release:
- Package Management:
DEFPACKAGEnow supports the:SHADOWING-IMPORT-FROMoption, bringing the package system closer to full specification compliance. - MAKE-SEQUENCE: This essential function for creating lists and vectors has been added.
- Integer Operations:
INTEGER-LENGTHandLOGCOUNTare now available for bitwise and numeric analysis. - Core Logic Migration: Both
LAMBDAandIN-PACKAGEhave been moved from the core engine into Lisp code, likely simplifying the maintainer's ability to iterate on these features. - Property List Fixes: The previously broken
(SETF GETF)has been fixed, and(SETF GET)has been added.
Community Perspectives and Open Questions
While the release is a technical achievement, the community continues to probe the project's long-term goals and architecture. One user on Hacker News raised questions regarding the project's structure and its competitive positioning:
"I wonder how you manage to keep track of everything with this huge all-in-one main.c. Do you plan to achieve 100%? Is there a list of what is actually missing and which relevant projects depend on the missing parts? What are the core benefits compared to e.g. ECL or CLISP?"
These questions touch upon the central challenge of any new Lisp implementation: the balance between a monolithic codebase for simplicity and a modular architecture for scalability, as well as the value proposition compared to established implementations like ECL (Embeddable Common Lisp) or CLISP.
Conclusion
alisp 1.6 is more than just a version bump; it is a refinement of the language's internal representation and a push toward broader compatibility with the Common Lisp ecosystem. By successfully loading ASDF and addressing the nuances of DEFCLASS, alisp is positioning itself as a viable, lightweight alternative for those interested in the internals of Lisp implementations or those seeking a fresh take on the standard.