Hi,
I’d like you to know there is a tiny IDE (or rather a screen editor with additional useful features) available for uLisp on the PicoCalc: GitHub - ErsatzMoco/ulisp-picoedit
Features:
- Real screen editor, unrestricted length of lines
- Copy/Paste/Delete for lines or marked range
- Directly run your code from within the editor - single lines, marked range or whole buffer
- Help system makes built-in documentation available
- Search function
- Second edit buffer for looking into other code or copying it from SD card or the running system
- Full SD card support including file deletion
- Restricted set of special characters/umlauts accessible (currently German set)
Why Lisp? Have a look at the excellent uLisp by David Johnson-Davies. It can really do an awful lot, see plenty of impressive examples on the site. PicoEdit itself is written almost entirely (99%) in uLisp. UF2 currently available for the Pico 2 (W), which makes sense because of the larger RAM. But the editor should run on the old Pico as well.
Note that there also is a version of this editor for use with a standalone uLisp machine based on the Teensy 4.1: GitHub - ErsatzMoco/ulisp-lispbox: Self-contained uLisp computer using Teensy 4.1 and TFT with RA8875 controller
3 Likes
This looks great! I can’t wait to check it out! Any recommended resources for learning uLisp for the PicoCalc?
Actually I think the best resource for beginners is the uLisp Website - David, the author of uLisp, explains each and every step very well, there are tons of tutorials and examples. His approach is to show that no one needs to be afraid of this ancient programming language, that it’s in fact worth dealing with. Following his explanations you will immediately experience success and motivation. In fact, CommonLisp (which uLisp is a subset of) loses its “strangeness” really quickly, other languages like Python conceptually build upon it a lot. Just don’t let scare yourself by some strange reserved words, their names have historical reasons. Others are self-explanatory. Although it’s against the Lisp convention I also recommend to place the infamous parentheses just like the brackets around program blocks in, say, C/C++. Personally, I can read my programs much more easily that way.
Once you’re ready to dive into Lisp a bit more, do it like almost almost everyone and read the standard book “On Lisp” by Paul Graham. It’s really old, from 1993, so be prepared for it not being too fancy in terms of layout and stuff. But the book explains the concepts behind Lisp very well and is officially available for free nowadays, just search for it.
Last thing: IMHO Lisp, esp. uLisp, is not retro at all - it’s definitely future-proof, just have a look at the impressive list of microcontrollers that are supported out of the box.
(Sorry for posting under a second name - I got flagged since I tried to post the URL of the uLisp website as a third link, OMG. I guess no-one will ever remove the block in this forum, so I’m going to use this new name.)
1 Like
Putting the closing parens at the end of a given line is easy if you’re using an editor that supports highlighting matching parens.
One thing to watch out, though, with uLisp is that ; stops at the next (, not at the end of the line, because uLisp was originally meant to be used with the Arduino IDE, and its serial monitor program strips out newlines.
Luckily, PicoEdit does support parenthese matching! (Forgot to mention it since a Lisp editor absolutely must support this.)
I figured it did, but I wanted to point it out for people who are like “but all those parens are hard on the brain”.