The Lisp Spectrum
This project aims to explore the extensive spectrum of the Lisp family of languages. Lisp is renowned for its high flexibility and great control, offering programmers a powerful toolset. However, the abundance of available options can be overwhelming, leading to choice fatigue. Therefore, this project seeks to compile essential information about the major Lisp dialects, detailing their unique features, tools, and learning resources. The project tries to provide beginner friendly guide for Lisp in general and for each dialect as well. It should be understandable and useful to the reader whether they are new to programming, with or without experience in a lisp dialect.
The Lisps we will be exploring:
- Common Lisp
- Scheme
- Chez Scheme
- Racket
- Chibi Scheme
- Chicken Scheme
- Gambit Scheme
- Gerbil Scheme
- Guile Scheme
- Chez Scheme
- Clojure
- ClojureScript
- Fennel
- Janet
- Jank
Why Lisps
Syntax
Lisp has a simple syntax that can be learned in a day. All code is written as expressions, known as S-Expressions, which are lists with prefix notation. The first element is the operator, and the rest are arguments.
(+ 1 2 3 4) (list 1 2 (list 3 4)) (defun foo (a b c d) (+ a b c d))
REPL
The REPL is a major selling point for Lisp, allowing for interactive, incremental program development. This feature has influenced many modern languages to offer similar interactive experiences.
Code as data
Lisp code has the same structure as lists, enabling the creation of macros with list-processing functions. This facilitates the development of Domain-Specific Languages (DSLs).
Lisp Resources
Editor Configuration
Emacs
Emacs is the de facto standard for working with Lisps. This is due to the fact that it partly written and configurable with Emacs Lisp, another lisp dialect similar to Common Lisp. For every lisp you'll find an init.el
file that you can use as an example for a quick setup to work with each lisp in Emacs out of the box. However there are some common packages that are worth mentioning here that will make your life much easier when working with lisps in Emacs:
UI Enhancements
Rainbow Delimiters
A UI Enhancement to auto color pairs of parenthesis
Comparison Criteria
Installation and Setup
We explore the different ways of installing every lisp such as:
- The availability of official packages in different package managers.
- Install from a script.
- Installing from source code.
We will also look into the first time setup for every lisp.
Resources
The availability of learning resources is crucial for any programming language. We will try to gather the most helpful resources for every lisp including:
- Documentation
- Books
- Videos
- Tutorials
- Community channels
REPL
Ease and speed of interacting with the REPL, including the possibility of connecting to a remote REPL.
Editor Integration
While Emacs is the de facto standard for working with Lisps, some have their own IDEs (e.g., Dr. Racket for Racket) or support through plugins in other editors. We will explore available editor options for each Lisp.
Package and Project management
- Tools for managing packages and projects.
- Ease of installing/uninstalling packages.
- Possibility of installing a specific version for a package.
- Package installation scopes (global, project-level, or both).
Standard Library and Ecosystem
We will discuss the built-in libraries for each Lisp and their usability. Additionally, we will explore the ecosystem for each Lisp, including where to find and download packages.
Performance
This is very subjective as every lisp compiles to a different target(s). So, it's hard to decide whether the comparison of performance is between the lisp implementations or the target platforms.
Interoperability with target platform(s)
Most lisps offer a way of interoperability with their target platform(s) or with other platforms as well. This can differ from one lisp to another, so this won't be a comparison but rather exploring the different options.
Contributing
If you would like to contribute to this project please check the Contribution guidelines for more information.