Advanced Search
Welcome to Omgili,
Omgili (Oh My God I Love It ;) is a search engine for discussions. With Omgili you can find answers and solutions, debates, discussions, personal experiences, opinions and more... To learn more about Omgili click here.

This is a complete preview of the discussion as it was indexed by Omgili crawlers. Use this preview if the original discussion is unavailable.
Click here to view the original discussion.

Concatenative Programming: An Overlooked Paradigm in Functional Programming [PDF] : programming

A place for all things programming. Before making a self-post in /r/programming, please check the programming.reddit FAQ to see if it's there first We're toying with the idea of blocking this reddit from advertisers and replacing the 300x250 ad unit with our redditjobs widget so you'll see new jobs instead of advertisements. Check out our jobs board .

What's the difference to stack languages?

There is no difference - stack languages are concatenative.

They actually use a strict definition of "concatenative" that disqualifies some stack languages like Forth and PostScript while qualifying Joy, Cat and Factor.

From what I can tell, it's due to their lack of an appropriate form of quotation.

The authors don't really do anything to motivate this requirement compared to the weaker folklore definition.

Quotations are clearly very nice to have in many cases, but that is insufficient justification to stake out a stricter definition than what is generally accepted.

They should at least make it clear to what extent this requirement affects their suggested applications.

I use { ... } in PostScript as quotation, so I don't get why they rule out PostScript. Anyway: nice paper, they even cite one of my professors.

From what I can tell, it's due to their lack of an appropriate form of quotation I'll re-read the (somewhat obtuse) formalism they use to check if I've missed anything, but what I gleaned is that they define as concatenative a language having a syntactical monoidal structure and the corresponding monoidal functional semantics related via an homomorphism (space as composition, empty quotation as identity).

They are orthogonal things, I think.

From wikipedia Most existing concatenative languages are stack-based;

This is not a requirement and other models have been proposed.

Nice words for Factor in that paper, very cool.

It is an interesting observation that Concat can be used in a way that is close to how nature works in creating complex living systems.

This might inspire a lot of interesting and interdisciplinary research questions.

Also cognitive processes rely very much on pattern recognition. First, their pattern-directed semantics are rigidly sequential, so this analogy strikes me as tenuous, a claim more appropriate for general term rewriting systems or constraint logic programming or process calculi.

Second, the analogical links between (generally concurrent) pattern-directed computation and chemical and biological agents have a long history in the literature.

A good place to start is the 1989 paper on the chemical abstract machine and the later one on the chemical semantics of join calculus.

An even simpler example that gets across the basic idea is the Martelli-Montari algorithm for first-order unification, which has a suggestive chemical interpretation if you think of the rewriting rules as chemical reaction types and the equations as molecules floating around in a solution.

Stirring the solution to increase the reaction rate is like searching for a matching pattern.

Though this kind of chemical metaphor may be suggestive, I find it silly to expect that it would lead to fruitful applications in the domain that inspired it (chemistry in this case).

Quite. "The question of whether Machines Can Think...

Is about as relevant as the question of whether Submarines Can Swim."