News for hackers. Stuff that matters.
Re:The Joy programming language by carapace on Saturday August 04, 2018 @10:57PM (#17689444)
I've been working on a dialect of Joy recently.[1] It's implemented in Python, in the Continuation-Passing Style. I've implemented type inference[2] and I'm almost done with a compiler (to Python for now.)

Joy combines the best features of Forth and Lisp.

It also makes "Categorical Programming" easy.[3] You can get a variety of valid computations by instantiating the same code over different categories. For example, the Joy type inferencer is an interpreter that operates on stack effect representations rather than e.g. numbers and strings. The same Joy expression that, when run on the normal interpreter gives the calculation, gives the stack effect of the expression when run on the inferencer. A subset of functions has to be overridden to make this work, but then you're good-to-go.

The mental models that you have to adopt to develop in Joy are better than those for other languages. There's a purity and elegance in the Joy notation that continues to be very exciting and interesting. For example, check out "Recursion Combinators"[4] which is loosely based on the first part of the "Bananas, Lenses, & Barbed Wire" paper[5].

My interest is binary: 1.) Joy is a notation and semantics that normal everyday people can easily understand and use; I've developed a user interface based on Joy as the unifying, uh, interface (both GUI and text interaction result in a stream of Joy commands) and I'm going to be setting up "encounter groups" and live user testing starting this month. I'm going to put normal people in front of a raspberry pi that's configured as a kind of Joy kiosk and see what happens.

2.) Joy is an excellent vehicle for developing proven-correct code. Most Joy development is more akin to deriving mathematical proofs than "regular" programming. Joy delivers on the promise of Functional Programming: making software by doing math. In Joy it's easy. I can write parsers that translate existing code into Joy-as-AST and then do refactoring and simplification. Recently, (the last couple of days) I've been playing with Prolog to represent Joy code. This has worked really well. It should be easy to make powerful code transformation tools.

Anyhow, to sum up: Joy is really cool. It's enormously simple and oh so elegant. Y'all should check it out.

[1] Thun http://joypy.osdn.io/

[2] http://joypy.osdn.io/notebooks/Types.html

[3] http://conal.net/papers/compiling-to-categories/

[4] http://joypy.osdn.io/notebooks/Recursion_Combinators.html

[5] http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.41.1...

There are no comments on this comment yet.