News for hackers. Stuff that matters.
Re:Loon: A functional lang with invisible types, safe owners... by kazinator on Sunday February 22, 2026 @12:59AM (#47108628)
Earlier last year, I "quietly" introduced an infix support macro into TXR Lisp.

I devised a well-crafted macro expansion hooking mechanism (public, documented) in support of it.

It works by creating a lexical contour in which infix expressions are recognized without being delimited in any way (no curly brace read syntax translating to a special representation or anything), and transformed to ordinary Lisp.

A translation of the FFT routine from Numerical Recipes in C appears among the infix test cases:

https://www.kylheku.com/cgit/txr/tree/tests/012/infix.tl?id=...

The entire body is wrapped in the (ifx ...) macro and then inside it you can do things like (while (x < 2) ...).

In completing this work, I have introduced an innovation to operator precedence parsing, the "Precedence Demotion Rule" which allows certain kinds of expressions to be written intuitively without parentheses.

Everything is documented in detail:

https://www.nongnu.org/txr/txr-manpage.html#N-BEB6083E

There are no comments on this comment yet.