Specified in 1958, Lisp is one of the oldest programming languages, and it does not appear to be widely used anymore. But if you want to play around with the 61 years old language, you may want to do so in a neat way via the Visible Lisp Computer, a Lisp interpreter that displays the contents of the Lisp workspace on an OLED display.
It is a modified version of Technoblogy’s uLisp interpreter for Arm boards designed to run on Adafruit ItsyBitsy M0, or other boards based on Microchip ATSAMD21E MCU on a prototyping board, connected to a 64×48 OLED display over I2C.
uLisp gives you a workspace of 3072 free Lisp objects (each of 8 bytes) on this hardware, which exactly matches the 3072 pixels (64×48) from the display. Having said that the program would also work on larger SSD1306-based OLED displays.
The display shows free Lisp objects in black, and when an object is in use the corresponding pixel turns white, and from time to time, you’ll see garbage collection in action, reclaiming used objects that can no longer be accessed.
The hardware wiring diagram is pretty basic, and you just need to extra 4.7 kOhm resistance for the I2C signals (SDA, SCL). Then you can connect the board to your computer over USB, and access the serial terminal.
When the board first run the display is fully black. If you enter a Fibonacci function such as:
1 2 3 |
(defun fib (n) (if (< n 3) 1 (+ (fib (- n 1)) (fib (- n 2))))) |
A row of white pixels starting in the top left corner is displayed to represent a series of Lisp objects.
Then you can run the function with (fib 10) or (fib 16), or whatever number that’s small enough to fit into memory, and you’ll see the display fills itself, until it’s full, and you can start seeing garbage collections triggered as shown in the first photo above. This behavior and the program is explained in more details on Technoblogy’s post about the project.
If you’d like to try it our yourself, you’ll need to purchase Adafruit ItsyBitsy M0 board on Adafruit or Pimoroni for about $12, as well as the OLED display which can be found on Aliexpress for around $2.
Thanks to Ennio for the tip.
Jean-Luc started CNX Software in 2010 as a part-time endeavor, before quitting his job as a software engineering manager, and starting to write daily news, and reviews full time later in 2011.
Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress
> Specified in 1958, Lisp is one of the oldest programming languages, and it does not appear to be widely used anymore.
emacs, Guix ( GuixSD ) and Lilypond all use lisp.
GuixSD especially is the only worthwhile non-systemd distribution and is only hampered by not having a Canonical-like commercial entity that would rebrand it and add non-free packages for firmwares and drivers. Don’t get me wrong, NixOS works fine and I use it myself on a few machines. But internally, it’s layers of C++ that take a small teams of experts to maintain. Whereas, Guix gets everything done with simple scripts that any dev and admin could modify and adapt to their needs. So, in practice, Guix is healthier to the FOSS community.
dont get me wrong but writing “Guix gets everything done with simple scripts that any dev and admin could modify and adapt to their needs” is an alternative to say “nobody will never ever do that silly thing in Lisp”.
Lisp is dead since long time, and even in the golden age of computer science (1980-1990), that language was hated by too many (and dont ((((((ask)))) why))) 🙂
> Lisp is dead since long time
Number 34 at 0.362% on TIOBE: https://www.tiobe.com/tiobe-index/
Add Scheme’s 0.278% (#40) and you get 0.64% which would put her at around #25 . For reference, Rust is #28 with 0.450%, Dart is #24 with 0.715%, JavaScript is #7 with 2.258% and Java is #1 with 16.028%.
Though I agree it’s rather hideous looking, I doubt we’ll ever see it die. Most of the performance issues were resolved in the last couple of decades and a lot of modern language like Java are so obscenely verbose that it makes those parenthesis look mild by comparison.
You say it’s dead. I say it will outlive us both.
That real-time mem occupancy monitor is darn cool!
Still, the exponential-complexity version of the inherently linear-complexity fibonacci gives me the creeps to this day : )
https://imgs.xkcd.com/comics/lisp_cycles.png
https://xkcd.com/297/ also gives you the hovertext