

Catenary: concatenative programming for JavaScript - sgentle
https://github.com/sgentle/catenary

======
eatonphil
If you are unfamiliar with concatenative, stack-based languages, I wrote an
introductory blog post that might be a little easier to read[0]. I say that
only because the chaining style here can feel a little dense.

[0] [http://blog.eatonphil.com/2015/04/06/introduction-to-
stack-b...](http://blog.eatonphil.com/2015/04/06/introduction-to-stack-based-
languages-with-and-elementary-debugging-in-forth/)

~~~
kriro
My first thought was...wait that looks like Forth. And sure enough your post
uses Forth. I hadn't heard the term "concatenative programming" before so I
guess I learned something new :)

Forth is certainly one of the languages that has wooed me (or more precisely
it has wooed me what cool ideas were built with it). Pretty much every CCC
used to have some nifty hardware+Forth project on display (I remember crazy
pendulums)

~~~
eatonphil
You might enjoy this thread from the discussion on r/programming[0]. I was
lucky enough to ensnare a PL professor.

[0]
[http://www.reddit.com/r/programming/comments/31qitu/introduc...](http://www.reddit.com/r/programming/comments/31qitu/introduction_to_stackbased_languages_with_forth/cq4otmv)

------
jkleiser
If you really want to do some serious concatenative programming, this is
probably a useful site: [http://www.factorcode.org](http://www.factorcode.org)

~~~
agumonkey
With the mandatory (and wonderful) talk:
[http://www.youtube.com/watch?v=f_0QlhYlS8g](http://www.youtube.com/watch?v=f_0QlhYlS8g)

------
hvm
This looks interesting, I feel it has a lot of potential.

It will be useful with a standard library or a way to link easily to 'outside'
functions without having to create (insert?) them in each cat that uses them.

~~~
Menge
Define modifies the prototype, so `cat define 'x' x` should apply to every cat
(the docs have an example for making it a local property instead.) I think the
larger barrier is that most libraries have functions with optional arguments
so you would need to consider how to wrap each one.

But I really don't get the "for JavaScript" mentions. Without at least a pre-
transpiled script to download and use as you would any JS, it is "for
JavaScript" much like it is "for x86-64 assembly."

------
naturalethic
LiveScript: take-this |> do-this |> then-do-that

