3 ms·
I've found Joy to be a really interesting and useful notation. https://en.wikipedia.org/wiki/Joy_(programming_language) https://en.wikipedia.org/wiki/Joy_(progr
by carapace 7y ago
I've found Joy to be a really interesting and useful notation.
https://en.wikipedia.org/wiki/Joy_(programming_language) https://en.wikipedia.org/wiki/Joy_(programming_language)
http://joypy.osdn.io/notebooks/index.html http://joypy.osdn.io/notebooks/index.html
The syntax is enormously simple (the only keywords and '[' and ']' for
quotes), the semantics are elegant, and implementation is trivial[0] It
seems to me to combine the best aspects of Forth and Lisp.
In working with Joy, I've come to suspect that elaborate syntax, and the
parsing thereof, is a kind of MacGuffin: https://en.wikipedia.org/wiki/MacGuffin https://en.wikipedia.org/wiki/MacGuffin
> ... a MacGuffin (sometimes McGuffin) is an object, device, or
event that is necessary to the plot and the motivation of the characters,
but insignificant, unimportant, or irrelevant in itself.
[0] https://osdn.net/projects/joypy/scm/hg/Joypy/blobs/tip/thun/thun.pl https://osdn.net/projects/joypy/scm/hg/Joypy/blobs/tip/thun/...
Work-in-progress. That code does evaluation, type-checking, and
type-inference; and there is a start on a compiler to machine code as
well as some meta-programming tools. All in 52 kilobytes, more than half of
which are comments.
Compare and contrast with
https://git.sr.ht/~sforman/Prolog-Junkyard/tree/master/typetype/FormalKnowledge.pl https://git.sr.ht/~sforman/Prolog-Junkyard/tree/master/typet...
> A simple language with semantics based on the language and code from
"Formal Methods: A First Introduction using Prolog to specify Programming
Language Semantics" by Lutz Hamel. Lexer, parser, evaluation function.
- kick 7y agoHa! I was waiting for someone to mention Joy! You can find a bunch of stuff on Joy hanging around if you know where to look: http://nsl.com/ http://nsl.com/ http://archive.vector.org.uk/art10000360 http://archive.vector.org.uk/art10000360 https://vector.org.uk/conquering-recursion/ https://vector.org.uk/conquering-recursion/ It's a neat concatenative language, and everyone reading this thread should at least give it a cursory glance! NB. Joy is a bit more APLJK-inspired than Lisp-inspired.
- carapace 7y agoYeah, sometimes I feel like a broken record here on HN: certain subjects pop up and if I see them I'm almost guaranteed to mention certain other subjects. But then again, there are always people who haven't heard about <FOO> yet, eh?