Ask HN: Taxonomy of Lisp [a-z]-expression forms?

7 points by sargstuff 3 years ago

Does a central resource about the various underlying lisp expression forms exist? Aaside from typing each alphabet letter appended to "-expression' in wikipedia/search engine. aka s-expression; m-expression, q-expression, t-expression

Wikipedia alphabet approach would miss exotic expressions such as music-n [1] / nyquest [2] ; ANIMAL [3] ; iterative/generative/decorative forms such as haskel / arc

[1] https://en.wikipedia.org/wiki/MUSIC-N

[2] https://en.wikipedia.org/wiki/Nyquist_(programming_language)

[3] https://en.wikipedia.org/wiki/ANIMAL_(image_processing)

kazinator 3 years ago

In mainstream Lisp, there have only been S- and M- expressions (mnemonic: sado-maso). Other such prefixes have been used in specific projects.

The "Q-expression" terminology, as far as I can tell, exists only in the "Build your own Lisp" project. They are an object type deeply in integrated into the run-time with its own tag. An expression object type tagged as a Q-expression rather than an ordinary expression is treated as a self-evaluating object by the evaluator.

It's a different approach to quoting, in a dialect that doesn't use Lisp-like lists for representing the program and uses if/else ladders in C that call strcmp to identify and dispatch operators instead of implementing symbols, an iconic feature of Lisp.

In the 1970's, the MDL language (pronounced "muddle") featured two kinds of cons objects with different type tags, both capable of representing list structure. One had a printed notation with angle brackets to distinguish it and give it print/read consistency. The angle bracket forms were given different semantics. See HN discussion here [2019]:

https://news.ycombinator.com/item?id=19700045

MDL made parenthesized expressions self-evaluating like (1 2 3) -> (1 2 3), while the angle bracket ones have Lisp-like evaluation semantics.

So, in the terminology of "Build your own Lisp", (1 2 3) is effectively a Q-expression in MDL; MDL is one example of prior art for this.

  • sargstuff 3 years ago

    So sado-maso kiss discussion on lvalue scope being at same or different scope as rvalues is still a thing.

tony-allan 3 years ago
  • sargstuff 3 years ago

    Was looking for lists of underlying lisp hardware DS / (ebnf) terminal node (aka lisp 'cons' form ) for a given lisp implimentation.

    ** x = 1

    aka s-expression cons on symbolics machine would map to a linear array / stack.

    ** x < log(1)

    Are there modern non-stack based follow-ups? aka revised symbolics approach, not necessarily in direction symbolics went, perhaps ranslations to asci / neural net / 'dna' organizational hardware?

    *** x > log(1)

    Guess lisp using math to not get in the way of language designer/programer to allow language to conform to subject at hand doesn't make for similar categorical discussion as algol family of languages.

    Lisp lanuage & reasoning for dialect closest 'broad category/taxonomy of dialects' without getting into specific subject domain / 'what lisp get's compiled to'.

    aka: ** Lisp generational groupings per ebnf terminal node:

    1st generation, use of "point" forms : encoding schemes / Lisp macro -- data 'point'

    2nd generation, use of functional forms : scheme -- line segment / group set

    3rd generation, use of topological forms : Haskel / ARC -- function

    • sargstuff 3 years ago

      The concept was to reference with other languages where higher-dimensional representation breaks down because of initial implicit hardware issues / assumptions at language design time.

      examples:

      lisp -- mapping to popular stack/register hardware.

      C -- pointers & malloc implications

      snobol's successor icon -- pre-database '70's design descision on how to handle 'table' type (where today table can be key:pair, graph, document, heirarchy and not just a vector set)