# Survey: Your impressions and thoughts about concatenative languages

## Christopher Diggins — 2007-11-22 19:10:20

    I would like to find out more about what interests people about

    concatenative languages. If you would like to particpate please

    complete the following sentences, and email me your response. You can

    use more than one sentence if neccessary, but please keep your

    responses succinct. I will summarize the results of the survey on

    Monday. So if you want to participate try to get your response to me

    by Sunday.

    - I feel the advantages of concatenative languages are ...

    - I feel that the most powerful advantage of concatenative languages is ...

    - My positive experiences with concatenative languages have been ...

    - My negative experiences with concatenative language have been ...

    - I feel that for concatenative languages to gain more mainstream

    success will require ...

    - I consider a language to be concatenative when it has the following

    properties ...

    I look forward to your responses!

    Christopher Diggins

    cdiggins@...

## chris glur — 2007-11-23 13:45:23

    - I feel that for concatenative languages to gain more mainstream

     success will require: that it is clearly demonstrated what they

    are good for.

    == Chris Glur.

## Christopher Diggins — 2007-11-23 15:02:15

    On Nov 23, 2007 8:45 AM, chris glur <crglur@...> wrote:

     > - I feel that for concatenative languages to gain more mainstream

    > success will require: that it is clearly demonstrated what they

    > are good for.

    >

    > == Chris Glur.

     Thanks for sharing this point of view Chris.

    The issue of perception is a very important one and does need to be addressed.

    Perhaps if enough people participate in this survey, we can as a

    community craft a good response.

    By the way, I'd also appreciate blog posts about people sharing their

    experience with concatenative language, like this recent post by Phil

    Dawes:

    http://www.phildawes.net/blog/2007/11/23/the-factor-attraction/

    I can basically use it to fill out the survey on their behalf.

    - Christopher

## William Tanksley, Jr — 2007-11-23 17:59:04

    Note that I'm going to talk about concatenative languages in general,

    not any specific one.

    - I feel the advantages of concatenative languages include syntactic

    simplicity, semantic closeness to a machine model, dataflow notation,

    and syntactic flexibility.

    - I feel that the most powerful advantage of concatenative languages

    is syntactic simplicity; it allows a language designer to use syntax

    for other purposes.

    - My positive experiences with concatenative languages have been

    programming in Forth, and learning about the others on this list.

    (Sorry, I'm not sure how to answer this question.)

    - My negative experiences with concatenative languages have been

    learning to distinguish compile-time from run-time and definition-time

    execution in Forth. But that's just poor documentation, and perhaps a

    poor implementation (the three concepts aren't used in most

    concatenative languages).

    - I feel that for concatenative languages to gain more mainstream

    success will require a solid high-level language with multiple

    successful implementations or platforms. (Factor is very close to

    this.)

    - I consider a language to be concatenative when it has the following

    properties: (shrug) meets the semi-formal definition using

    concatenation of source text.

    -Wm

## Christopher Diggins — 2007-11-23 18:12:24

    Thanks for your responses William.

    *snip*

     > - My positive experiences with concatenative languages have been

    > programming in Forth, and learning about the others on this list.

    > (Sorry, I'm not sure how to answer this question.)

     For this my hopes were for people to express specific examples of how

    concatenative languages have been helpful for them developing

    software, or understanding concepts.

    Sorry for not being more specific.

     >- I consider a language to be concatenative when it has the following

    > properties: (shrug) meets the semi-formal definition using

    > concatenation of source text.

     Are you referring to the definition we worked on a few months ago on

    the list? IIRC we had a few definitions floating around, and some

    contention. Would you mind sharing your favourite one with me? I don't

    neccessarily want the best one, just the one that best captures the

    spirit of concatenative languages for you. Or perhaps just elaborate a

    bit on what about concatenation of source text makes a language

    concatenative? Feel free to send me private emails if you prefer.

    - Christopher

## Daniel Ehrenberg — 2007-11-24 05:52:17

    I hope people don't begrudge me for failing to answer the survey, but

    here's the definition of concatenative languages I thought was fairly

    universal: a concatenative programming language was one where

    concatenation meant function composition, and programs are written in

    terms of function composition rather than direct application to

    arguments. That's not a definition for beginners, but users of

    concatenative languages can fill in most of the blanks. I think I

    missed the definition discussion; what were other definitions?

    Daniel Ehrenberg

     On Nov 23, 2007 1:12 PM, Christopher Diggins <cdiggins@...> wrote:

    >  Are you referring to the definition we worked on a few months ago on

    >  the list? IIRC we had a few definitions floating around, and some

    >  contention. Would you mind sharing your favourite one with me? I don't

    >  neccessarily want the best one, just the one that best captures the

    >  spirit of concatenative languages for you. Or perhaps just elaborate a

    >  bit on what about concatenation of source text makes a language

    >  concatenative? Feel free to send me private emails if you prefer.

## Rodney D Price — 2007-11-25 00:38:28

    On Nov 22, 2007, at 12:10 PM, Christopher Diggins wrote:

     > I would like to find out more about what interests people about

    > concatenative languages. If you would like to particpate please

    > complete the following sentences, and email me your response. You can

    > use more than one sentence if neccessary, but please keep your

    > responses succinct. I will summarize the results of the survey on

    > Monday. So if you want to participate try to get your response to me

    > by Sunday.

    >

    > - I feel the advantages of concatenative languages are ...

    >

     Very short read-eval-print loop, very close to the hardware, natural

    modularization

     >

    > - I feel that the most powerful advantage of concatenative

    > languages is ...

    >

     Close to the hardware for embedded programming (develop on the

    hardware itself, immediate feedback).

     > - My positive experiences with concatenative languages have been ...

    >

     Scientific and embedded programming in Forth

     >

    > - My negative experiences with concatenative language have been ...

    >

     The same, caused by the complete lack of a type system in Forth.

     >

    > - I feel that for concatenative languages to gain more mainstream

    > success will require ...

    >

     Choose a niche.  Embedded programming comes to mind. ;-)  You'll

    never overcome the inertia in other areas (web, ...) and the state of

    embedded programming is ripe for change.  Existing mainstream

    embedded tools are atrocious...

     >

    > - I consider a language to be concatenative when it has the following

    > properties ...

    >

     Has one or two stacks, queues, whatever.  Definition isn't too

    important to me.

    -Rod Price

     >

    >

    > I look forward to your responses!

    > Christopher Diggins

    > cdiggins@...

    >

    >

    >

## Christopher Diggins — 2007-11-25 01:03:46

    On Nov 24, 2007 12:52 AM, Daniel Ehrenberg <microdan@...> wrote:

     > I hope people don't begrudge me for failing to answer the survey,

     Certainly not.

     > but

    > here's the definition of concatenative languages I thought was fairly

    > universal: a concatenative programming language was one where

    > concatenation meant function composition, and programs are written in

    > terms of function composition rather than direct application to

    > arguments. That's not a definition for beginners, but users of

    > concatenative languages can fill in most of the blanks. I think I

    > missed the definition discussion; what were other definitions?

     There were some discussions that I was privy to here:

    http://tech.groups.yahoo.com/group/concatenative/message/3314

    I am sure there are older ones as well.

    FWIW I like your definition.

    - Christopher

## William Tanksley, Jr — 2007-11-26 16:04:34

    Christopher Diggins <cdiggins@...> wrote:

     > For this my hopes were for people to express specific examples of how

    > concatenative languages have been helpful for them developing

    > software, or understanding concepts.

    > Sorry for not being more specific.

     I have to give the same apology. I can't name a specific time... I

    don't feel particularly bad about that, first because I don't expect

    one for any language :-), and second because I've been using Forth for

    a long time now... One would expect "conversion stories" to come early

    in the experience, not late.

     > >- I consider a language to be concatenative when it has the following

    > > properties: (shrug) meets the semi-formal definition using

    > > concatenation of source text.

    > Are you referring to the definition we worked on a few months ago on

    > the list? IIRC we had a few definitions floating around, and some

    > contention. Would you mind sharing your favourite one with me?

     That was a good discussion, but I don't know if it came to a

    conclusion. The problem wasn't that we didn't have a definition; the

    problem was and is that we didn't know what our definition implied. I

    think it's still reasonable to be suspicious that our definitions are

    too vague, that they include things which all of us would agree are

    not "concatenative languages".

     > I don't

    > neccessarily want the best one, just the one that best captures the

    > spirit of concatenative languages for you.

     I'm stuck with "I know it when I see it," and I hate having to say that.

     > Or perhaps just elaborate a

    > bit on what about concatenation of source text makes a language

    > concatenative?

     Well, it's not right to limit this group to only stack-based

    languages; that would rule out Enchilada, which is definitely

    concatenative but doesn't use a stack (or that's the impression I

    got...).

     > - Christopher

     -Wm

## Joe Bowbeer — 2007-11-26 19:13:38

    I show my cards below.

     On Nov 22, 2007 11:10 AM, Christopher Diggins wrote:

    > I would like to find out more about what interests people about

    > concatenative languages. If you would like to particpate please

    > complete the following sentences, and email me your response. You can

    > use more than one sentence if neccessary, but please keep your

    > responses succinct. I will summarize the results of the survey on

    > Monday. So if you want to participate try to get your response to me

    > by Sunday.

    >

    > - I feel the advantages of concatenative languages are ...

    Theoretical and implementational simplicity, and intellectual stimulation.

    > - I feel that the most powerful advantage of concatenative languages is ...

    Remains to be seen.

    > - My positive experiences with concatenative languages have been ...

    Reading about Joy.

    > - My negative experiences with concatenative language have been ...

    Trying to program in Joy.

    > - I feel that for concatenative languages to gain more mainstream

    > success will require ...

    A major breakthrough in ease of programming, or the identification of

    a lively niche where they provide great leverage.

    > - I consider a language to be concatenative when it has the following

    > properties ...

    >

    Concatenation is just about everything.

    Bowbeer Joe --

## William Tanksley, Jr — 2007-11-26 21:02:51

    I share many of your experiences, Joe. Good answers.

    Joe Bowbeer <joe.bowbeer@...> wrote:

     > > - My negative experiences with concatenative language have been ...

    > Trying to program in Joy.

     You might want to try out some of the other concatenative languages; I

    understand that Factor is gaining steam as a practical language in

    spite of its recent origin (and concatenative syntax).

     > > - I feel that for concatenative languages to gain more mainstream

    > > success will require ...

    > A major breakthrough in ease of programming, or the identification of

    > a lively niche where they provide great leverage.

     Either or both would be wonderful. What's your biggest annoyance in

    terms of "ease of programming"?

    Embedded systems are a place where Forth has seen some success;

    strongForth's typechecking was actually built for that. Ripple

    (http://ripple.fortytwo.net/about/) is an interesting application of

    concatenativity to the semantic web. The author of Enchilada

    (http://my.opera.com/rapido/blog/?startidx=20) claims -- with some

    support -- that concatenative languages are uniquely and especially

    suited to parallel processing. And, of course, it would be unwise to

    ignore the always pioneering work of Chuck Moore, now in hardware at

    www.intellasys.net (or a discussion at

    http://www.falvotech.com/blog/index.php?/archives/200-Forth-Day-Report.html,

    search for "After lunch").

     > > - I consider a language to be concatenative when it has the following

    > > properties ...

    > Concatenation is just about everything.

     Sounds like a good koan.

    "And all at once, William was enlightened."

     > Bowbeer Joe --

     -Wm

## Manfred Von Thun — 2007-12-03 08:24:34

    On 27/11/07 3:04 AM, "William Tanksley, Jr" <wtanksleyjr@...> wrote:

     >

    >

     This was from William Tanksley (sorry I dropped the date):

     >

    > I'm stuck with "I know it when I see it," and I hate having to say that.

    >

    >> > Or perhaps just elaborate a

    >> > bit on what about concatenation of source text makes a language

    >> > concatenative?

    >

    > Well, it's not right to limit this group to only stack-based

    > languages; that would rule out Enchilada, which is definitely

    > concatenative but doesn't use a stack (or that's the impression I

    > got...).

     Indeed. There is temptation (yes, I have been guilty, too) to slip from

    ³concatenative² to ³stack². And another temptation (me too), to slip

    from ³stack² to ³stack shuffling² (no names for parts of the stack).

    Let me explain:

    1: Language L is concatenative if and only if the concatenation of

    programs P and Q in L computes the composition of the functions

    which P and Q compute. Note: the functions must be unary,

    otherwise composition makes no sense. No mention of what sort of

    arguments and values these functions take.

    2: One useful type for the arguments and values is the stack type,

    especially for implementing the usual binary operations and relations

    for numbers and other useful data types. But hey, there might be

    other useful aggregate types. To fire up your imagination, think

    of text editors: they have a buffer together with a pointer. This

    pointer can be moved by some operations, and most other operations

    (insertions, deletions,...) are relative to this pointer. Concatenative?

    Well, sort of, with minor adjustments. Or imagine something like

    an assembly language but without unconditional and conditional jumps.

    A zero address assembly language is presumably a stack language,

    but you can also have one-address, two-address and three-address

    assembly languages. For these the instructions have 1,2 or 3 addresses

    as their parts, but a complete instruction is not a concatenation of

    parts that compute functions. Or imagine other aggregate types ...

    3: Stacks are nice in that most programs only affect the top few

    elements. There is no need to name them, and if they are not quite

    in the right order they can be shuffled by dup, pop, and swap. And

    to delve deeper into the stack you can use the dip combinator in Joy

    and some others. If there are lists, then stack shuffling and list shuffling

    should be treated in the same way. But do we need shufflers at all?

    I used to think they are an advance because they avoid name space

    pollution. Now I am not so sure. Maybe this sort of pollution is

    a price worth paying for increased readability. In my experiments

    with a Joy written in Prolog I used definitions in this form:

    PROGRAM P  turns STACK S1 into STACK S2  :- ...

    The turnstyle :- should be read as IF. Stacks are written as Prolog lists,

    top few first, then the unspecified rest R. Here is an example:

    hypothenuse turns [M N | R] into [H | R] :- H is sqrt(M * M + N * N).

    Compare that with Joy:

    hypothenuse == [dup *] dip dup * +  sqrt

    Maybe the example does not convince. Use the annoying quadratic

    formula instead.

    So: ³concatenative² does not imply ³stack², and ³stack² does not

    imply ³anonymity (of parts)². Keep an open mind about possibilities.

      - Manfred

    [Non-text portions of this message have been removed]

## William Tanksley, Jr — 2007-12-03 15:17:09

    Christopher Diggins <cdiggins@...> wrote:

     > FWIW I like your definition.

     In your blog you mention, reasonably, that because we're uncertain

    about the precise results of the term 'concatenative', we should use

    another term; you suggest 'compositional'.

    I disagree. Our uncertainty about the precise meaning of the term

    mirrors the fact that these languages are very little studied; the

    fact that we're a bit murky on the precise boundaries of our field

    therefore only makes sense.

    At the same time, your suggested term, 'compositional', is good; the

    obvious problem is that it's already been used. A compositional

    computer language is a language used only to bring together code

    written in other languages; the language Piccola

    http://www.iam.unibe.ch/~scg/Research/Piccola/ is a 'pure' example,

    and I suppose the various shell scripts are impure examples. But

    that's not broad use, and I don't see a severe problem with using it

    anyhow.

    I also don't agree with your claim that Haskell qualifies as a

    concatenative language. Am I wrong? Do any two valid Haskell programs

    concatenated together form a valid Haskell program? My knowledge here

    is limited, but I don't _think_ currying is that powerful -- _some_

    Haskell programs are 'concatenative' in that sense, but it's not a

    general feature of the language, to the best of my knowledge.

    Furthermore, if Haskell were concatenative, would that be bad? I admit

    that I did invent 'concatenative' with some vague idea of being

    'opposite' to applicative languages, but I don't think the category is

    useless even if it's orthogonal rather than opposite.

     > - Christopher

     -Wm

## John Nowak — 2007-12-03 21:00:00

    On Dec 3, 2007, at 3:24 AM, Manfred Von Thun wrote:

     > 1: Language L is concatenative if and only if the concatenation of

    > programs P and Q in L computes the composition of the functions

    > which P and Q compute. Note: the functions must be unary,

    > otherwise composition makes no sense.

     Must they really be unary? I think it is possible to have a language

    where functions my return multiple values and may consume multiple

    values. Essentially, functions would have varying numbers of input and

    outout "ports". Two functions could be composed only if the output

    ports of the first lined up with the input ports of the second. I'm

    not sure such a language is especially useful (unless we allow other

    operations more complex then composition -- see languages like Max,

    etc), but it at least seems possible.

    - John

## Joe Bowbeer — 2007-12-06 19:11:19

    Belated response below.

     On Nov 26, 2007 1:02 PM, William Tanksley, Jr  wrote:

    > I share many of your experiences, Joe. Good answers.

    >

    > Joe Bowbeer wrote:

    > > > - My negative experiences with concatenative language have been ...

    > > Trying to program in Joy.

    >

    > You might want to try out some of the other concatenative languages; I

    > understand that Factor is gaining steam as a practical language in

    > spite of its recent origin (and concatenative syntax).

    >

    > > > - I feel that for concatenative languages to gain more mainstream

    > > > success will require ...

    >

    > > A major breakthrough in ease of programming, or the identification of

    > > a lively niche where they provide great leverage.

    >

    > Either or both would be wonderful. What's your biggest annoyance in

    > terms of "ease of programming"?

    >

    Despite the very simple conceptual basis of concatenative languages,

    it takes a great deal of mental effort for me to transfer the familiar

    task of programming (which I've done in a dozen or so languages) to

    one of these languages.  I need to rewire some well-worn mental

    connections as well as create a lot of new code scaffolding to make up

    for important pieces that are missing.

    I liken the current state of concatenative languages to roman

    numerals.  Yes, we can do a lot with just I, V, and X, but...  I'd

    rather use a language that has about 7 +/- 2 important keywords

    instead of a language with only 2 keywords -- or a zillion.  It's

    easier on my head.

    --

    Joe Bowbeer

## William Tanksley, Jr — 2007-12-09 03:23:06

    Joe Bowbeer <joe.bowbeer@...> wrote:

     > > Either or both would be wonderful. What's your biggest annoyance in

    > > terms of "ease of programming"?

    > Despite the very simple conceptual basis of concatenative languages,

    > it takes a great deal of mental effort for me to transfer the familiar

    > task of programming (which I've done in a dozen or so languages) to

    > one of these languages.  I need to rewire some well-worn mental

    > connections as well as create a lot of new code scaffolding to make up

    > for important pieces that are missing.

     That's a great point; I agree that there's a lot of new habits to

    learn, and new code to build.

     > I liken the current state of concatenative languages to roman

    > numerals.  Yes, we can do a lot with just I, V, and X, but...  I'd

    > rather use a language that has about 7 +/- 2 important keywords

    > instead of a language with only 2 keywords -- or a zillion.  It's

    > easier on my head.

     Heh. Please don't use my 01.py language (it has only 2 functions ;-).

    Seriously, Factor might be what you're looking for. Forth is tried and

    true, but unless you're into embedded systems it'll probably be too

    foreign for you.

     > Joe Bowbeer

     -Wm