
Concatenative language (2017) - espeed
http://concatenative.org/wiki/view/Concatenative%20language
======
xelxebar
I just stumbled across this Google Tech Talk on [factor][0] last night! It
absolutely blew my mind. The engineering looks to be top notch, and the video
is _9 years old_ to boot!

[https://www.youtube.com/watch?v=f_0QlhYlS8g](https://www.youtube.com/watch?v=f_0QlhYlS8g)

Anyway, really want to give Factor a try for some personal projects. Would
love to hear anecdotes from people who futz with this stuff.

[0]:[https://factorcode.org](https://factorcode.org)

~~~
arethuza
I worked on a project in the early 90's that was written mostly in PostScript
(NeWS) and Common Lisp - two languages that have rather more in common than
you might think!

Edit: Wasn't so much just PostScript environment but the NeWS/HyperNeWS
environment that made that graphical programming rather good fun...

~~~
macintux
People have described Forth as Lisp without the parentheses.

Definitely some interesting parallels.

~~~
arethuza
I toy with the idea occasionally of writing a Lispish language (probably a
whitespace lisp) that transforms itself down to a Forth/PostScript style
engine for execution - one of many things on my ToDo list ;-)

~~~
kazinator
Stack-based byte code machines for Lisps are not uncommon. Emacs Lisp has one,
CLISP too, I think. It keeps the instructions small, since operand references
are implicit.

~~~
arethuza
I was more thinking about a runtime conversion from a Lisp style AST to RPN
primitives rather than a more traditional compiling stuff down to a separate
VM - but clearly not something I've thought through in that much detail!

------
murbard2
The author might want to add K and Q to the list, both widely used in finance
and concatenative. [https://kx.com/](https://kx.com/)

There's also the open source j, in the same fine
[http://www.jsoftware.com/](http://www.jsoftware.com/)

Last but not lest, Michelson, Tezos' smart contract language
[https://tezos.gitlab.io/master/whitedoc/michelson.html](https://tezos.gitlab.io/master/whitedoc/michelson.html)
(shameless plug) is also a concatenative language.

~~~
klibertp
Are you sure about that? I don't know K/Q, but I learned some J and I don't
think it can be called concatenative. It's tacit/point-free style it but one
of the styles you can use in J. I think if J is concatenative, then so is
Haskell - and I never heard anyone claiming that.

~~~
murbard2
I know less about J, but idiomatic K/Q is definitely concatenative. I suppose
the emphasis should be on idiomatic.

~~~
klibertp
Oh, ok.

I think the point-free J (ie. without any explicitly named variables) can be
called concatenative in spirit, too. If you stick to expressions composed of
monadic verbs and nouns and squint hard enough, you could say it's
concatenative (but with prefix notation).

On the other hand, it has these totally crazy rules of composition - called
hooks and forks, different for monadic and dyadic verbs - plus adverbs which
modify verbs and gerunds, and other things which together make you feel that
parsing PERL is sane and straightforward in comparison to reading J. Lots of
fun, though, it really feels like you're learning a language some ancient
alien civilization left inside pyramids on Mars :)

------
tragomaskhalos
Also the Bitcoin script language (as limited as it is)

------
cryptonector
jq is kinda concatenative too. It follows the pipeline style, and it does
operate on an [implicit] stack.

