mirror of https://github.com/rusefi/bldc.git
e07148ffb0
27abc6a9 added backwards lookup function for assoc structures e82dc20f update benchmarking git-subtree-dir: lispBM/lispBM git-subtree-split: 27abc6a960d2e8deb98b1c6ed5b383d587d5ca7b |
||
---|---|---|
benchmarks | ||
chibios-examples | ||
doc | ||
docker | ||
esp-examples/repl | ||
examples | ||
include | ||
mascot | ||
notes | ||
old | ||
platform | ||
repl | ||
sdlrepl | ||
src | ||
tests | ||
utils | ||
videos | ||
zephyr-examples | ||
.clang_complete | ||
.gitignore | ||
.travis.yml | ||
LICENSE | ||
Makefile | ||
README.md | ||
flash_nrf52_with_stlink.sh | ||
lispbm.mk | ||
mktags.sh | ||
runinfer.sh | ||
runsa.sh | ||
setup_fw_build.sh | ||
zephyr-source-me.sh |
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.
All programming languages need a mascot, so here is the LispBM llama by PixiLady.
Documentation
- Work in progress LispBM language reference.
- Work in progress LispBM programming manual
- C code documentation can be found here.
- LispBM's internals are documented as a series of blog posts.
- There are demonstrations on YouTube.
Purpose
- Have fun.
- Learn about lisp.
- Learn about microcontrollers.
- An interactive REPL for devboards.
- ...
Features
- heap consisting of cons-cells with mark and sweep garbage collection.
- Built-in functions: cons, car, cdr, eval, list, +, -, >, <, = and more.
- Some special forms: Lambdas, closures, lets (letrecs), define and quote.
- 28-Bit signed/unsigned integers and boxed 32-Bit Float, 32-Bit signed/unsigned values.
- Arrays (in progress), string is an array.
- Compiles for, and runs on linux-x86.
- Compiles for, and runs on Zynq 7000.
- Compiles for, and runs on STM32f4.
- Compiles for, and runs on NRF52840.
- Compiles for, and runs on ESP32 (ARM - WROOM).
- Compiles for, and runs on ESP32C3 (RISC-V).
- Compiles for, and runs on Raspberry PI (Tested on 32bit Raspbian OS)
- Quasiquotation.
- Concurrency.
- Message-passing.
- Pattern-matching.
Want to get involved and help out?
- Are you interested in microcontrollers and programming languages?
- You find it fun to mess around in C code with close to zero comments?
- Then join in the fun. Lots to do, so little time!
- Poke me by mail bo(dot)joel(dot)svensson(whirly-a)gmail(dot)com
Vague or continuosly ongoing todos
- Doxygen?
- Tutorials?
- Be much more stringent on checking of error conditions etc.
- More built in arithmetic.
- More built in comparisons.
- 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)
-
Build the repl:
cd repl-cps
and thenmake
-
Run the repl:
./repl
Compile a 64bit binary for linux
-
Build the repl:
cd repl-cps
and thenmake all64
-
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:
- libsdl2-dev -
sudo apt-get install libsdl2-dev
- libsdl2-image-dev -
sudo apt-get install libsdl2-image-dev
Then compile the repl using the command make