Femtolisp: A Lightweight, Scheme-like Lisp Implementation in Under 1000 Lines of C
By
tosh
Warm and crisp on the edges. A bagel with a bit of bite.
Summary
Femtolisp is a lightweight, Scheme-like Lisp implementation created by Jeff Bezanson as a personal project to build the fastest Lisp interpreter possible in under 1000 lines of C code. The project evolved to include powerful features while maintaining minimal code size, resulting in a compact (~150kb), self-contained system. It includes a custom standard library called 'ios' that replaces parts of C's stdio with more flexible features. The article describes the project's origins, design philosophy, and technical characteristics as a minimal yet capable Lisp implementation.
Key quotes
· 4 pulledThis project began with an attempt to write the fastest lisp interpreter I could in under 1000 lines of C.
It snowballed from there as I kept trying to see if I could add powerful features with minimal code.
At the same time I assembled a library of some of my favorite C code (by myself and others) to use as a base for a standard library.
femtolisp is about 150kb, is very self-contained, and has the following features...
You might also wanna read
Dynamic Borrow-Checking in a Toy Programming Language: Implementing Rust-like Memory Safety Without Static Types
This article presents a demonstration of a toy programming language that implements borrow-checking without static type-checking. The langua
C++26 Standard Draft Finalized with Reflection, Memory Safety, Contracts, and New Concurrency Framework
The C++26 standard draft has been completed, introducing major new features including reflection capabilities that allow C++ to describe its
Understanding Fil-C: A Simplified Model of Memory-Safe C/C++ Implementation
The article presents a simplified model of Fil-C, a memory-safe implementation of C/C++. It explains that while the real Fil-C uses a compil
Sky: An Experimental Elm-Inspired Programming Language That Compiles to Go
Sky is an experimental programming language that combines Go's pragmatism with Elm's elegance to create a fullstack functional programming l
Analyzing Rust's Coherence and Orphan Rules: Ecosystem Development Challenges and Proposed Solutions
This article critiques Rust programming language's coherence rules and orphan rules, which prevent implementing traits for types defined in
SBCL Fibers: Implementation Design for Lightweight Cooperative Threads
This is a draft design document describing the implementation of lightweight userland cooperative threads (called 'fibers') for SBCL (Steel
