Crunch – a Scheme compiler with a minimal runtime
more-magic.net
Crunch – a Scheme compiler with a minimal runtime
1–10 of 73 posts
Re: Crunch – a Scheme compiler with a minimal runtime
#2Also 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...
Re: Crunch – a Scheme compiler with a minimal runtime
#3so 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...
Re: Crunch – a Scheme compiler with a minimal runtime
#4Re: Crunch – a Scheme compiler with a minimal runtime
#5so 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...
Not in the way I would like: you cannot have a REPL running. Seems only a transpiler for R7 Small.
Re: Crunch – a Scheme compiler with a minimal runtime
#6so 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...
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
Re: Crunch – a Scheme compiler with a minimal runtime
#7so 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...
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.
Re: Crunch – a Scheme compiler with a minimal runtime
#8Opinion: this is great. The aversion of Lispers to static types is historical rather than intrinsic and reflects the relative difference in expressiveness between program semantics and type semantics (and runtime vs tooling) for much of computing. Now that types and tools are advancing, static Lisps are feasible, and I love that.
Re: Crunch – a Scheme compiler with a minimal runtime
#9so 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...
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.
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...)