← Back to context

Comment by agoetz

12 years ago

FORTH comes to mind.

Cool. No idea FORTH had a REPL. Do you use FORTH or have cool project examples?

  • OpenFirmware, such as the various implementations on http://www.openbios.org/ always comes with a Forth prompt.

    I was part of the team that wrote the original Open Source implementation (under GPL terms) named OpenBIOS. The project now also hosts all kinds of other implementations that were later published under BSD terms by their owners (and had 10+ years of market experience under their belt at that time).

    When FORTH started out, one of its differentiators was its live environment: you could test one step (part of an algorithm or similar) at the prompt, then define a "word" (= function) that implements it using the statements you tried, repeat until you finished your program using the words you defined earlier.

    • The only time you're happy to reboot a machine is when it has OpenFirmware Forth so you can play a bit with it.

  • Forth not only has a REPL, but an incremental compiler, too. Have a look at http://www.forth.com/starting-forth/index.html, you'll be amazed what Forth has to offer! Interactive microcontroller debugging is every bit as fun as it sounds :)

    • Do you have any favorite compact Forth implementations for AVRs? Each time I find myself writing a configuration-and-introspection parser for a microcontroller project I think to myself, "I should just expose a REPL here", and FORTH is the obvious choice, but I've never had the time to dig through the many AVR FORTH implementations out there for the right one.

      1 reply →