Go to file
Benjamin Vedder 63e050c452 Squashed 'lispBM/lispBM/' changes from 82dd1b77..1be203ec
1be203ec added is_symbol_true
fbdbbc54 added is_byte_array and renamed lbm_is_list to lbm_is_cons, then created a new lbm_is_list which is also true for nil

git-subtree-dir: lispBM/lispBM
git-subtree-split: 1be203ecb48333c872f9056142d74a6f3c99b9c6
2022-10-03 11:48:35 +02:00
benchmarks Squashed 'lispBM/lispBM/' changes from ebfa4c83..42aa0d95 2022-10-02 09:28:56 +02:00
chibios-examples Squashed 'lispBM/lispBM/' changes from c0fb4af8..4cc6358a 2022-09-16 10:45:44 +02:00
doc Squashed 'lispBM/lispBM/' changes from 337ecc93..ebfa4c83 2022-10-02 08:36:11 +02:00
docker Squashed 'lispBM/lispBM/' content from commit 748477b9 2022-01-29 17:26:45 +01:00
esp-examples/repl Squashed 'lispBM/lispBM/' changes from c2e0433a..aba5cf5a 2022-09-20 11:32:37 +02:00
examples Squashed 'lispBM/lispBM/' changes from 445930ec..d23c7fe2 2022-09-23 14:04:35 +02:00
include Squashed 'lispBM/lispBM/' changes from 82dd1b77..1be203ec 2022-10-03 11:48:35 +02:00
mascot Squashed 'lispBM/lispBM/' content from commit 748477b9 2022-01-29 17:26:45 +01:00
notes Squashed 'lispBM/lispBM/' content from commit 748477b9 2022-01-29 17:26:45 +01:00
old Squashed 'lispBM/lispBM/' changes from 6199703d..43ebce71 2022-03-25 15:47:05 +01:00
platform Squashed 'lispBM/lispBM/' changes from 60d7c83f..c0fb4af8 2022-09-16 09:25:46 +02:00
repl Squashed 'lispBM/lispBM/' changes from c2e0433a..aba5cf5a 2022-09-20 11:32:37 +02:00
sdlrepl Squashed 'lispBM/lispBM/' changes from c2e0433a..aba5cf5a 2022-09-20 11:32:37 +02:00
src Squashed 'lispBM/lispBM/' changes from 82dd1b77..1be203ec 2022-10-03 11:48:35 +02:00
tests Squashed 'lispBM/lispBM/' changes from ebfa4c83..42aa0d95 2022-10-02 09:28:56 +02:00
utils Squashed 'lispBM/lispBM/' changes from 6f442405..28c56c43 2022-09-04 16:08:58 +02:00
videos Squashed 'lispBM/lispBM/' content from commit 748477b9 2022-01-29 17:26:45 +01:00
zephyr-examples Squashed 'lispBM/lispBM/' changes from 445930ec..d23c7fe2 2022-09-23 14:04:35 +02:00
.clang_complete Squashed 'lispBM/lispBM/' changes from aba5cf5a..445930ec 2022-09-21 14:46:29 +02:00
.gitignore Squashed 'lispBM/lispBM/' content from commit 748477b9 2022-01-29 17:26:45 +01:00
.travis.yml Squashed 'lispBM/lispBM/' content from commit 748477b9 2022-01-29 17:26:45 +01:00
LICENSE Squashed 'lispBM/lispBM/' content from commit 748477b9 2022-01-29 17:26:45 +01:00
Makefile Squashed 'lispBM/lispBM/' changes from 6f442405..28c56c43 2022-09-04 16:08:58 +02:00
README.md Squashed 'lispBM/lispBM/' changes from 445930ec..d23c7fe2 2022-09-23 14:04:35 +02:00
flash_nrf52_with_stlink.sh Squashed 'lispBM/lispBM/' content from commit 748477b9 2022-01-29 17:26:45 +01:00
lispbm.mk Squashed 'lispBM/lispBM/' changes from 60d7c83f..c0fb4af8 2022-09-16 09:25:46 +02:00
mktags.sh Squashed 'lispBM/lispBM/' changes from 3836952f..cdfd116c 2022-07-06 10:18:45 +02:00
runinfer.sh Squashed 'lispBM/lispBM/' changes from 6199703d..43ebce71 2022-03-25 15:47:05 +01:00
runsa.sh Squashed 'lispBM/lispBM/' changes from 6f442405..28c56c43 2022-09-04 16:08:58 +02:00
setup_fw_build.sh Squashed 'lispBM/lispBM/' content from commit 748477b9 2022-01-29 17:26:45 +01:00
zephyr-source-me.sh Squashed 'lispBM/lispBM/' content from commit 748477b9 2022-01-29 17:26:45 +01:00

README.md

lispBM (LBM)

A concurrent lisp-like language with message-passing and pattern-matching implemented in C for 32 bit and 64 bit platforms.

LispBM mascot

The LispBM mascot, Lispy the llama, was created by PixiLadyArt. Thank you, Pixi!

Information

From version 0.6.0 LispBM implements round-robin scheduling and is no-longer cooperatively concurrent.

This is not a semantics preserving update. Using the cooperative scheduler one could assume totally exclusive access to the runtime system until a process yields. Between yields one could assume that all reads and writes to globals were not interspersed by reads and writes of other tasks, this is now false. An atomic operation has been added in case one wants to be sure that evaluation of an expression is done in one go, with no interruption.

For example:

(atomic
  (progn
     a
     b
     c))

Documentation

Purpose

  1. Have fun.
  2. Learn about lisp.
  3. Learn about microcontrollers.
  4. An interactive REPL for devboards.
  5. ...

Features

  1. heap consisting of cons-cells with mark and sweep garbage collection.
  2. Built-in functions: cons, car, cdr, eval, list, +, -, >, <, = and more.
  3. Some special forms: Lambdas, closures, lets (letrecs), define and quote.
  4. 28-Bit signed/unsigned integers and boxed 32-Bit Float, 32-Bit signed/unsigned values.
  5. Arrays (in progress), string is an array.
  6. Compiles for, and runs on linux-x86.
  7. Compiles for, and runs on Zynq 7000.
  8. Compiles for, and runs on STM32f4.
  9. Compiles for, and runs on NRF52840.
  10. Compiles for, and runs on ESP32 (ARM - WROOM).
  11. Compiles for, and runs on ESP32C3 (RISC-V).
  12. Compiles for, and runs on Raspberry PI (Tested on 32bit Raspbian OS)
  13. Quasiquotation.
  14. Concurrency.
  15. Message-passing.
  16. Pattern-matching.

Want to get involved and help out?

  1. Are you interested in microcontrollers and programming languages?
  2. You find it fun to mess around in C code with close to zero comments?
  3. Then join in the fun. Lots to do, so little time!
  4. Poke me by mail bo(dot)joel(dot)svensson(whirly-a)gmail(dot)com

Vague or continuosly ongoing todos

  1. Doxygen?
  2. Tutorials?
  3. Be much more stringent on checking of error conditions etc.
  4. More built in arithmetic.
  5. More built in comparisons.
  6. Make uniform how to return success or failure. It is sometimes bool and sometimes int right now.

Compile a 32bit binary for linux (Requires 32bit libraries. May need something like "multilib" on a 64bit linux)

  1. Build the repl: cd repl-cps and then make

  2. Run the repl: ./repl

Compile a 64bit binary for linux

  1. Build the repl: cd repl-cps and then make all64

  2. Run the repl: ./repl

Compile on Raspberry Pi

To build the library exeute the following command in the lispbm folder:

PLATFORM=pi make

To build the repl-cps example repl do:

cd repl-cps
make pirepl

Then start it up using ./repl Building the library is not a prerequisite for building the repl anymore.

SDL and LispBM

In the sdlrepl directory there is a start of a set of SDL bindings for LispBM.

To build this repl you need the following dependencies:

  1. libsdl2-dev - sudo apt-get install libsdl2-dev
  2. libsdl2-image-dev - sudo apt-get install libsdl2-image-dev

Then compile the repl using the command make