re: common lisp shines at low-level tasks like microcontroller programming
While I couldn't find an explicit declaration of this in the linked article, the tunnel system likely has something on the level of an SBC (think raspberry pi) rather than a microcontroller. Common Lisp makes it possible to do fun low-level assembly stuff but AFAIK none of the implementations can run on a microcontroller.
There's uLisp, which builds on Arduino's libraries but it isn't a Common Lisp implementation.
In terms of bare-metal CL implementations there is Movitz (stopped development) and Mezzano, but I don't think those can run on any microcontrollers.
There are also some libraries to convert CL to C, thinlisp and CLiCC, but these aren't actively maintained currently.
The possibility of porting Clozure CL to the RP2040 was discussed in the ccl mailing list last year, but I don't think anyone's working on it.
praptak · 37m ago
It probably doesn't make sense to cram a whole Lisp into a constrained environment like a microcontroller. What some people do instead is define a smaller Lisp which acts as a DSL and is compiled to run on the constrained platform.
"GOAL does not run in an interpreter, but instead is compiled directly into PlayStation 2 machine code to execute. It offers limited facilities for garbage collection, relying extensively on runtime support. It offers dynamic memory allocation primitives designed to make it well-suited to running in constant memory on a video game console. GOAL has extensive support for inlined assembly language code using a special rlet form, allowing programs to freely mix assembly and higher-level constructs within one function."
jimbokun · 7h ago
Man that seems like an awful lot of ceremony for a trivial web app. Surely the language known for macros and building your own DSLs has a more concise way to get a web app up and running?
silcoon · 6h ago
Author here: You're right! I did that in the article. First I showed how to use the modern libraries, then wrote a quick custom library that compressed my original app in 29 LOC[0].
[0]: It came out shorter than the guestbook demo in Python-Flask.
nomilk · 7h ago
This is a pretty great tutorial using common lisp libraries:
Is it? This translates fairly exactly to things like nodejs/express implementing the same thing?
anonzzzies · 6h ago
I use CLOG these days; it's all so easy to get things done.
nesarkvechnep · 5h ago
It’s good but has nothing on Phoenix LiveView. I love Common Lisp but for web, I can’t choose it over Elixir.
anonzzzies · 1h ago
I agree, but this was about Lisp :) I hope it will get there though; I like CL more... The author of CLOG seems to be interested on how to improve it so.
While I couldn't find an explicit declaration of this in the linked article, the tunnel system likely has something on the level of an SBC (think raspberry pi) rather than a microcontroller. Common Lisp makes it possible to do fun low-level assembly stuff but AFAIK none of the implementations can run on a microcontroller.
There's uLisp, which builds on Arduino's libraries but it isn't a Common Lisp implementation.
In terms of bare-metal CL implementations there is Movitz (stopped development) and Mezzano, but I don't think those can run on any microcontrollers.
There are also some libraries to convert CL to C, thinlisp and CLiCC, but these aren't actively maintained currently.
The possibility of porting Clozure CL to the RP2040 was discussed in the ccl mailing list last year, but I don't think anyone's working on it.
https://en.wikipedia.org/wiki/Game_Oriented_Assembly_Lisp is an example of this approach.
"GOAL does not run in an interpreter, but instead is compiled directly into PlayStation 2 machine code to execute. It offers limited facilities for garbage collection, relying extensively on runtime support. It offers dynamic memory allocation primitives designed to make it well-suited to running in constant memory on a video game console. GOAL has extensive support for inlined assembly language code using a special rlet form, allowing programs to freely mix assembly and higher-level constructs within one function."
[0]: It came out shorter than the guestbook demo in Python-Flask.
https://www.youtube.com/watch?v=A4PzSsOD-CQ
(also, the top comment is gold)