3 ms·
> it has one downside in the inability afaik to do static analysis of forth programs I believe it is possible with annotations, at least for basic checks, and
by astrobe_ 6y ago
> it has one downside in the inability afaik to do static analysis of forth programs
I believe it is possible with annotations, at least for basic checks, and assuming you don't go too crazy (e.g. returning a variable number of results depending on the inputs).
> I think for the most part, Python/MicroPython now occupies the same place Forth once did in the embedded world
Lua is a bit closer: REPL, quite efficient, and is not a kitchen sink. Python is more like BASIC (Beginner's All-purpose Symbolic Instruction Code).
- carapace 6y agoI made a start on type inference for stack-based languages in the context of Joy, but I kind of wobbled off at the end: https://joypy.osdn.io/notebooks/Types.html#conclusion https://joypy.osdn.io/notebooks/Types.html#conclusion It turns out to be easier to work in Prolog.
- sitkack 6y agoThis is really cool! I am so glad you have kept Joy alive. I remember when website reorgs would kick Manfred von Thun's website offline for months to then re-appear and disappear again.
- carapace 6y agoCheers! I'm not sure what made me pick it up, but it's grown on me. FWIW the Prolog version is here: https://git.sr.ht/~sforman/Thun/tree/master/source/thun.pl https://git.sr.ht/~sforman/Thun/tree/master/source/thun.pl There's a bunch of junk in there, like a start on compilers. (I'm just messing around. Recursion is like an end boss that I know the strategy to defeat but I've been too lazy or busy to put in the work to implement it.) Fun fact: in Prolog the interpreter and the type inferencer are the same code! Also, I recently wrote an interpreter in Nim, more-or-less for kicks: https://git.sr.ht/~sforman/Bliss https://git.sr.ht/~sforman/Bliss I have a hunch that concatinative languages are important somehow. Have you seen "Compiling to categories"? http://conal.net/papers/compiling-to-categories/ http://conal.net/papers/compiling-to-categories/ He's converting Haskell into a point-free form (that's very similar to Joy) and then compiling that over various Categories to get several kinds of programs from one expression.