Skip to content
Tech News
← Back to articles

Slisp: Simple Lisp compiler (Linux/amd64)

read original more articles
Why This Matters

Slisp introduces a standalone Lisp compiler for Linux/AMD64, enabling developers to compile Lisp programs into efficient assembly code. This advancement bridges the gap between the flexibility of Lisp and the performance benefits of compiled languages, offering new possibilities for Lisp developers and enthusiasts. Its support for core Lisp features like closures, lambdas, and runtime type detection makes it a valuable tool for both educational purposes and practical applications in the tech industry.

Key Takeaways

slisp

This repository contains slisp a compiler which will read lisp programs as input, and generate standalone assembly representations for Linux/AMD64.

The project is either named for "Simple Lisp" or "Steve's lisp", take your pick.

Lisp is traditionally interactive, and provides a REPL, but having a compiled version is still useful, and still allows most common lisp-programs to execute.

Quick links:

INTRODUCTION.md Brief high-level overview of the facilities.

PRIMITIVES.md Detailed list of all available functions and special-forms.

Example

; ; factorial. woo. ( defun fact (n) ( if ( <= n 1 ) 1 ( * n (fact ( - n 1 ))))) ; ; entry-point ( defun main () (println " Showing some factorials: " ) (println (fact 4 )) (println (fact 5 )) (println (fact 9 )) (println (fact 10 )) ; ; exit code - use "(exit 3)" if you prefer 0 )

... continue reading