Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
uLisp on the Raspberry Pi Pico (ulisp.com)
116 points by tosh on Jan 17, 2022 | hide | past | favorite | 14 comments


I looked at uLisp for writing a flight computer for a small rocket at uni dealing with input sensor data - it was fun but ended up being too large for the chip we were using and I had to go down to C. I'm taking an embedded engineering course with the san diego extension school at the moment for fun so I might try do some of the coursework in uLisp now I have the "freedom" of 1GB of RAM.


Ulisp is cute but (when I looked at it a while back) way too limited and inefficient. My favourite Lisp of this type is Hedgehog, which should run very nicely on a Pi Pico. Its main drawback is it has no REPL, but instead uses a separate byte-compiler that for some reason is written in C.

https://github.com/sbp/hedgehog


How does it compare to Ferret? <https://ferret-lang.org/>


Never heard of Ferret before. Hedgehog is bytecode interpreted and garbage collected while Ferret looks to be trans-compiled and tries to run without a GC. So I'd say they aren't trying to do the same thing. Hedgehog by now may be a little bit obsolete, since we have things like Micro Python. It is still pretty cool though.


I really enjoy uLisp. It would be nice if it had fexp, or nlambda's if not full blown macros for building further language forms. My dream would be an emac's like environment built in uLisp loaded on a mechanical keyboard for doing password management and writing without distractions.


A bit off topic but if you're interested in lispy development for embedded, definitely check out Elixir Nerves. Elixir is amazingly lispy and I was amazed at how quickly I was able to hack some embedded stuff out with it.


Just as a note, the Nerves team solely focuses on single-board computers like the Raspberry Pi or BeagleBone.

https://elixirforum.com/t/using-a-raspi-pico-with-nerves/376...

https://hexdocs.pm/nerves/targets.html


It can be very Lispy indeed: https://lfe.io/


uLisp always seemed interesting to me, but I've never managed to have a good place to use it.

Lately I've been wanting to try running Spry [1] on an mcu. Or perhaps write a lisp-like language using msgpack as its datatype.

1: https://github.com/gokr/spry


Off topic, but: The use of ASCII letters as typographic approximations of Greek letters and mathematical symbols really grinds my gears. That instantly puts me off from using something.


you mean like 'u' for micro, and 'lambda'? I think this is pretty common.

Regardless, you're probably doing yourself a disservice if you're allowing things like that to take choices out of your toolbelt. Perhaps the worst offender is TLA+, where you have to write actual ascii art and latex inside your code (yes, I know model/spec). I despise it, to be clear, but it's still a pretty good tool and often the right thing to reach for


Or Agda where you basically have to use emacs with the agda extension to get all the characters.

Less than or equal ends up looking like:

data _≤_ : ℕ → ℕ → Set where

   z≤n : {n : ℕ} → zero ≤ n

   s≤s : {n m : ℕ} → n ≤ m → suc n ≤ suc m


And to really rub salt on it, they have a syntax that looks very much like stock latex for math symbols, and SOME of them are the same, but not all of them! (all / forall is the one that comes to mind, it's been a little while)


It always ALWAYS trips me up that TLA+ uses \A and \E while LaTeX uses \forall and \exists




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

Search: