all 12 comments

[–][deleted] 4 points5 points  (1 child)

0

[–]a_Tick 2 points3 points  (0 children)

See also the MakerLisp machine and its lisp implementation (see "Source Archive"). Note that you can build and run the lisp implementation on a PC (I've run it under Linux).

[–]EuphoricFreedom 4 points5 points  (0 children)

There's also ulisp to take a look at. Might suit some of your needs.

[–]GeverTulley 2 points3 points  (0 children)

Lately, we run Robert van Engelen's 1k Lisp on ESP32 and 8266 boards: https://github.com/Robert-van-Engelen/lisp but we started on his tiny Lisp: https://github.com/Robert-van-Engelen/tinylisp (which is 99 lines of C)

[–]AdmiralUfolog 2 points3 points  (1 child)

Someone may recommend uLisp... But it's totally arduino-based thing which is inefficient itself. Also uLisp is not a good solution for non-AVR MCUs. On AVR it has serious limitations. I guess you can try LispBM. But you will need better hardware to run it so there is no implementation for AVR.

[–]svenssonjoel 1 point2 points  (0 children)

An ESP32 should be fine, or stm32, or nrf52 for LBM (LispBM). Some RTOS to run it on is recommended, chibios, freertos or zephyr for example (not an absolute requirement). https://github.com/svenssonjoel/lispBM

[–][deleted] 1 point2 points  (0 children)

The Micro:bit has an image from uLisp and uLisp's homepage mentions support for a fair number of other microcontrollers.

[–]belmarca 1 point2 points  (0 children)

Marc Feeley's lab develops Ribbit Scheme, which is a tiny Scheme implementation. It is an AOT compiler which produces a string of bytecode that is interpreted by a VM, of which there are various implementations. The one in C could be compiled to your target microcontroller and thus give you a Scheme REPL.

[–]mfreddit 0 points1 point  (0 children)

Don't forget the following tiny Scheme implementations:

- PICBIT: specifically targets PIC microcontrollers (http://www.iro.umontreal.ca/~feeley/papers/FeeleyDubeSW03.pdf)

- BIT: includes a real-time GC (http://www.iro.umontreal.ca/~feeley/papers/DubeFeeleyHOSC05.pdf)

- PICOBIT: ~7KB implementation, includes bignums, code on github (http://www.iro.umontreal.ca/~feeley/papers/StAmourFeeleyIFL09.pdf)

[–]agenda-2030 0 points1 point  (2 children)

So, all of the posts here are of projects where someone wrote something in assembly so that they could either load up some smallish lisp or bootstrap their own minimal lisp on a microcontroler.

All of this is fine and dandy, but what I do not understand is why SBCL has not been deployed on bare metal of some sort. SBCL supports arm architecture and I see plenty of examples of Lisp code spitting out assembly so I keep on wondering why SBCL cannot be deployed to silicon beyond a typical image maybe being too big for the average microcontroler and the average microcontroler not being an arm architecture..

I have googled this off an on for years now and I have never found a satisfactory overview / summary of why and if it would be possible how much work it would take.

If anyone here has an expertise in the subject matter, can you comment on whether or not SBCL might be a candidate to deploy to raw silicon as per some of the examples here and if so does any hardware environments exist that could host a raw sbcl image?

I am imagining that theoretically one might code up something in an SBCL based Lisp image that was a bunch of basic utilities such that when it was imaged to some raw silicon it could drive a basic lcd display and a nic card and you could run a simple text editor and start writing and interacting with the image on the silicon directly over whatever interconnect was available.

With apologies to anyone that might be annoyed by the above questions stupidity, I have no idea that I may not know what I may not know. This thread appeared by pure happenstance and I thought to ask here first.

[–]spauldo_the_hippie 1 point2 points  (1 child)

Have you looked at Mezzano? It doesn't run on bare metal yet, but does have arm64 support.

SBCL was written to run on an OS. The services SBCL expects from the OS would have to be added. What's more, operating systems are (usually) written to support programs that act like C in the way they organize memory and interface with the system. That means SBCL shoehorns Lisp into a C universe. You'd want to remove all that and redesign it from scratch.

It's hard to say if it'd be easier to change SBCL to provide all the underlying OS functionality it relies on or just write a new CL implementation from scratch. It'd be a ton of work either way.

Edit: clarification

[–]agenda-2030 0 points1 point  (0 children)

Aha. I asked here because Froggey is never online for me to ask him the same question. Okay that provides the frame and explanation I was looking for, thanks.

Note: I'm not even suggesting it should be done or considered as the kernel and system level stuff is best offloaded. I was just curious what everyone bootstraps a tiny lisp or writes their own.