Integrated Lisp interpreter and coding environment https://bobbicodes.codeberg.page/bobbi-lisp/
Find a file
2024-06-08 18:45:59 +00:00
.github/workflows add static deployment workflow 2023-08-27 15:22:37 -07:00
design-notes design notes page 19 2023-09-23 18:20:59 +00:00
dist show arglists in doc bar, support macro docstrings 2023-09-26 19:29:16 -07:00
public Initial commit 2023-08-10 17:10:26 -07:00
src fix get 2024-06-08 18:45:59 +00:00
test support negation of ratios 2023-09-20 13:23:03 -07:00
.gitignore do it 2023-09-20 01:42:08 -07:00
closebrackets.ts exclude single quote from closebrackets config 2023-09-24 15:39:15 -07:00
deps.edn fix println, prn 2023-08-18 14:33:48 -07:00
index.html change page title 2023-10-16 11:39:36 -07:00
main.js show arglists in doc bar, support macro docstrings 2023-09-26 19:29:16 -07:00
package-lock.json install and import Fraction 2023-08-19 16:15:01 -07:00
package.json install and import Fraction 2023-08-19 16:15:01 -07:00
README.md update differences from Clojure section 2023-09-23 19:50:06 -07:00
scratch.json make set operations respect equality semantics 2023-09-08 05:05:20 -07:00
style.css exclude & from implicit loop bindings 2023-09-27 00:47:55 -07:00
vite.config.js fix vite base url 2023-09-12 13:31:27 -07:00

bobbi-lisp

A browser-based interactive Lisp environment for learning Clojure

Bobbi-lisp is based on MAL (Make-a-Lisp), which is a pedagogical Lisp interpreter inspired by Clojure. In a nutshell, this means that it has a set of built-in data structures besides lists, and is designed for functional programming using immutability by default with an atom type for controlled mutation. A goal is to support as much of Clojure as possible so it can be used for teaching Clojure.

I'd estimate that the goal is around 50% complete by quantity, though the unimplemented half is likely much more involved than the first.

Live demo

The coding environment is live on Codeberg Pages: https://bobbicodes.codeberg.page/bobbi-lisp/

Differences from Clojure

  1. No multimethods/protocols. Chris Houser (Chouser) has created a sketch of protocols which is included but nothing uses them yet.

  2. No deftype, defrecord

  3. Namespaces. At this point they are not a high priority because this tool is meant for doing simple exercises and not writing production software. However, there are many functions which have slashes in their name to support patterns such as str/join, Character/digit, etc.

Zippers have been implemented, and are available as a library that can be loaded:

(require "zip")

I plan to update this section regularly with detailed descriptions of various features as I make progress.

Running

In the project root, run:

npm install
npm run dev

Testing

The application has a built-in testing framework based on 185 coding exercises taken from 4clojure and Exercism. To run it, uncomment the last line of main.js:

testExercises()

Test the reader:

run_test(reader_tests)

The reader now supports everything Clojure does with the exception of namespaced keywords. That means hex/octal integers and Unicode chars.

bobbi-lisp-core - Just the interpreter, available as an NPM library for use in other projects

bobbi-lisp-audio - Sample-based music sequencer using the Web Audio API

bobbi-lisp-svg - Render SVG paths