Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

so if I understand this right, it could be a way to run scheme on esp32 and similar microcontrollers, isn't it?

Also its small size would make it a perfect target to compile to typescript/deno/wasm without rejecting the s-exp power and runtime possibilities in its full chicken code at the backend...



There are specialized Scheme implementations that aim to be small.

A recent paper (see also the presentation on YouTube):

Leonard Oest O'Leary, Mathis Laroche, and Marc Feeley A R4RS Compliant REPL in 7 KB

For systems with a C compiler:

Vincent St-Amour and Marc Feeley. PICOBIT: A Compact Scheme System for Microcontrollers. (This one got a best paper award).

Finally, there is also PICBIT available for PIC microcontrollers:

PICBIT: A Scheme System for the PIC Microcontroller


Not a scheme, but for running a lisp on microcontrollers uLisp is pretty amazing. http://www.ulisp.com/

You even get a REPL and everything WHILE running on the hardware. Super easy to set up and get going. Though as it is interpreted so you will of course not have native performance. Still very useful for prototyping and hobbyist projects.


As a rule, interpreted code has a smaller memory footprint than natively compiled programs.

Even interpreted on a several hundred MHz classic RISC microcontroller, Lisp will chew through a million cons cells a second or more - an order of magnitude or so faster than the old Lisp machines in the 80s were and they used to run giant CAD systems on those to design aircraft and stuff. (Albeit slowly...)


OTOH if you want something that gives you a REPL and everything directly on the hardware but is also not as slow as your typical interpreter, look at Forth.


Not in the way I would like: you cannot have a REPL running. Seems only a transpiler for R7 Small.


It's compiling a subset of Scheme that can be statically typed. It's not for full-blown live-hackable Scheme programs. You'd use Crunch or PreScheme to implement things that you can't implement in Scheme, like a garbage collector. I don't know if Crunch has this feature, but with PreScheme you can run your PreScheme programs at the Scheme REPL so you can have your comfy REPL-driven dev environment and then create a static executable when you're ready.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: