HN user

sparist

51 karma
Posts1
Comments7
View on HN

Original author here. Didn’t expect my little hobby project to land on the front page of Hacker News. In the midst of a complete rewrite of the language which I unfortunately only get to nibble at here and there; will hopefully publish it soon.

Very important article! Preach it.

I remember discovering the Joy language (and combinatory logic) and being blown away by the elegance of being able to express programs just by composing functions. It was a pretty big epiphany to learn that when functions pop arguments from and push results onto a stack, the "application of a function to a data value" could be treated equivalently to "composition of a function with a 'constant' function that pushes a data value onto a stack". That led to the subsequent discovery that the data stack is extra "scaffolding" that can be removed: using prefix notation instead of postfix allows the program to be represented in memory as an actual composition of partially applied functions, each of which takes the remainder of the program as an argument and returns an output program. This led to the creation of Om [1], which I believe is the "most concatenative" language for this reason.

[1] http://om-language.org

Great article!

My forever project is: the syntactically simplest high-level programming language.  This had been kicking around in my brain for a long time, re-emerging every time I learned or read about a new programming language whose syntax seemed unnecessarily complex or conventional.  As overwhelming as new language development is, I decided to set a goal for the end of 2012: a sufficiently complete proof-of-concept implementation, with documentation, to demonstrate the basic concepts.  The result: http://om-language.org 

Although the language itself isn't useful for anything yet, the side benefits of developing it have been many:

- Developing my C++, Doxygen, and Unicode knowledge/skills to a high-advanced level, which I have applied in my professional software career.

- Filling in lots of gaps in my knowledge of concatenative (and other) language theory.

- Discovering that using prefix notation in a concatenative language works better than postfix: no stack underflows, no data stack needed, and a program effectively becomes a partially-applied function awaiting more data (i.e. the rest of the program), elegantly allowing for data pipelining and events.  As far as I know, using prefix notation in a concatenative language is a first.

- Discovering "panmorphic types": that when every piece of data can be expressed completely and equivalently in a uniform way (in this case, as a quoted program), data types become an implementation detail.

- Rethinking how to best define "number" with respect to a computation, which has led me to arbitrary-precision arithmetic implementations, Riemann spheres, APL, and down all kinds of other interesting rabbit holes -- resulting in some new number theory ideas which I am fleshing out for incorporation into the language.

- Learning all the glue technologies to actually release it (CMake, GitHub, etc.).

- Writing documentation that describes it to others. This has clarified my thinking on it more than anything.

Most importantly: I've invented a real language!  It feels good.

Although I'll be adding to this project forever, none of these benefits would have happened if I didn't set some goals for getting it out of my brain and starting to flesh it out. I encourage anyone with a forever project to do the same.