Join the discussion
Write your take first — we'll ask for email only when you're ready to publish.
- Hacker News
- Forth exposes compilation the way Lisp exposes syntax. That’s the real similarity—not stacks or parentheses.by leonmeng
- I built a self replicating forth bot that speaks S-Expressions over the wire. https://github.com/DavidCanHelp/unitby DavidCanHelp
- I like the idea of s-expressions over the wire. Have you thought about replacing the JSON with s-expressions for snapshots?by MisterTea
- I learned some Forth and played around right before the LLM trend began.
It was a mind bending experience, although I quit after a while as the programs were kind of glass sheet quality brittle as they grew.
Sometimes I feel I need to start again to keep my brain from losing thinking skills over time.
by kamaal - Similar here, though I didn't quite get as far. I started wondering about performance of all the things, when one has only 2 stacks to work with, and then discovered some library that implemented arrays somehow. I tried using GForth in Advent of Code and needed to read in lines from a file. Lines of different lengths and so on and that's where I failed. I think I would have had to learn a lot about how to use and manage the "pad" or some other surprising technique, that I didn't see anywhere. Since I couldn't manage to read in the lines and discard the old contents of a line, if the next line was shorter, remnants of the previous line persisted and I got wrong line readings. That's where I stopped.
I am sure someone more knowledgeable would have been able to breathe right past that issue somehow.
But I remember one moment that actually humbled me a little: There was a puzzle, where the input were some kind of "instructions" of how to move or for some device. Of course I built some logic that interprets those instructions and only then does something.... but then I saw on reddit, that people simply defined the words that literally are the instructions and took the input as Forth code, duh!!! So simple! Made me feel a little silly.
by zelphirkalt - I'm not fluent enough in Common Lisp for that book, but the patterns in Let over Lambda translate cleanly to Julia. You can have "Let over Lambda", "Let over Lambda over Let over Lambda", "Anaphoric Macros" (though you have to break hygiene with esc(), and in practice should just use the native julia do block), "Reader Macros" (via String Macros), "Pandoric Macros", and so on.by Archit3ch
- > the patterns in Let over Lambda translate cleanly to Julia
I would be curious to see such a translation.
by nemoniac - I finished Let Over Lambda recently. I'm not an experienced lisp programmer but it's strangely readable if you allow yourself to not understand every little detail of the Common Lisp code. For example I hadn't read On Lisp. I had read The Little Schemer.
It's a wonderful tour of advanced macro concepts. With several of the macros presented I found myself saying "well that's just x language feature in y" but that's missing the point. The point is that Common Lisp allows you to implement your own language features, with macros of course!
This chapter is a wonderful climax to the whole book. Lisp moving Forth moving Lisp reminded me of the intertwined nature of DNA, RNA and proteins in Biology.
There's great humour throughout the book, I especially enjoyed the little sideways jabs at Scheme programmers!
by Vohlenzer - What are some genuinely useful things macros can do?by peheje
- > reminded me of the intertwined nature of DNA, RNA and proteins in Biology
My analogy is how a changing electric field generates a changing magnetic field which generates a changing electric field which ... is light.
Forth is the electric field and Lisp is magnetic (or vice versa). They are two sides of the same coin.
Lisp really is the Maxwell's equations of software.
- As I like to say, Forth is the dual of Lisp. They reach the same goal (a programmable programming language) through completely different and complementary methods.by bitwize