4 ms·
I've been playing with a language called Joy, created by Manfred von Thun, which seems to me to combine the best parts of Forth and Lisp while being simpler and
by carapace 4y ago
I've been playing with a language called Joy, created by Manfred von Thun, which seems to me to combine the best parts of Forth and Lisp while being simpler and more elegant than both. I suspect it might be the simplest useful language.
"A Conversation with Manfred von Thun" in Vector, journal of the British APL Association http://archive.vector.org.uk/art10000350 http://archive.vector.org.uk/art10000350
https://hypercubed.github.io/joy/joy.html https://hypercubed.github.io/joy/joy.html
Kevin Albrecht’s mirror of Manfred von Thun’s original website for the Joy Programming Language http://www.kevinalbrecht.com/code/joy-mirror/index.html http://www.kevinalbrecht.com/code/joy-mirror/index.html
https://joypy.osdn.io/ https://joypy.osdn.io/ (My own project) Here's a flowchart (SVG) for the interpreter loop: https://github.com/calroc/Thun/blob/simpler/joy_interpreter_flowchart.svg https://github.com/calroc/Thun/blob/simpler/joy_interpreter_...
It boils down to quotation as the primary operation, denoted by enclosing expressions in square brackets. Various combinators accept quotes on the stack and prepend (or not) one or more of them to the pending expression under evaluation (like Continuation-Passing Style), and that's it. That's the whole evaluation model.
E.g. "branch" combinator accepts a Boolean value and two quoted expressions and put one of them onto the pending expression based on the Boolean value:
true [ELSE] [THEN] branch
-------------------------------
THEN
false [ELSE] [THEN] branch
--------------------------------
ELSE
Anyway, I've been messing around with it for a few years now off-and-on and I really think it's "something", eh? (Like I'm almost willing to argue that it's status should be something like the other major models of computation: Turing Machine, Lambda Calculus, SKI Combinators, (Others? Wang Tiles?) ... I suspect Joy belongs on that list.)
- lioeters 4y agoThis is a nice page comparing Forth and Joy. Synopsis of the language Joy - https://hypercubed.github.io/joy/html/forth-joy.html https://hypercubed.github.io/joy/html/forth-joy.html Indeed, it has a beautiful simplicity like Lisp, expressing any computation with a small number of core concepts.