Cognition: A new antisyntax language redefining metaprogramming

Initial Reactions & Overall Tone

  • Many readers initially thought the project was satire (especially given the Lisp/Brainfuck framing and “line noise” examples), but several, including the author, stress it is a serious research project.
  • Reactions split: some find it beautiful, enlightening, or “elementary particles” of computation; others see it as impractical, unreadable, or “joke-like art”.

Language Goals & Core Idea

  • Cognition is seen as pushing metaprogramming down to the tokenization layer: user programs can redefine how text is turned into tokens and then executed, at runtime, without restarting.
  • The minimal “antisyntax” bootstrap is intentional: start from almost no assumptions and build everything, including whitespace rules, from within the language.

Comparisons to Existing Systems

  • Strong parallels are drawn to Forth and Factor: concatenative style, implicit stacks, bootstrapping higher-level words from tiny primitives. Some argue Cognition may just be “a new flavor of Forth”.
  • Others compare it to Lisp macros, Common Lisp readtables, Racket’s reader and #lang, Rhombus, TeX \catcode, and Unseemly.
  • Several Lisp-focused commenters argue that claims about Lisp’s “rigid syntax” or lack of metaprogramming generality are factually off, pointing to reader macros and powerful macro systems.

Bootstrapping, Syntax, and Readability

  • The bootstrapping example is widely criticized as unreadable and off-putting, especially its dependence on whitespace and one-byte characters.
  • Multiple suggestions:
    • Start with a human-readable syntax and show bootstrapping later as an optional “appendix”.
    • Use clearer stand‑in delimiters in explanations, better terminology for delimiters/ignore-lists, diagrams, gifs, or interactive views of the state machine and stack.

Metaprogramming Claims & Disputes

  • Supporters highlight Cognition’s ability to redefine tokenization mid-stream without backtracking as possibly novel.
  • Critics contend that many of the same capabilities can be achieved in Lisp, Racket, TeX, or through “STOPPARSE”-style mechanisms, and question whether Cognition is more “general” than existing minimal formalisms.
  • There is back-and-forth on whether “metaprogramming = programming” and what counts as an AST or “data vs code” in Lisp.

Usefulness, Applications, and Limits

  • Some see it mainly as a theoretical or artistic exploration (“because it’s there”), not something they’d want as a mainstream language.
  • A few speculate about applications in AI or formal methods, but others note the examples are too opaque and not self-explanatory for practical adoption yet.