Hasty Briefsbeta

Bilingual

TXR: An Original, New Programming Language for Convenient Data Munging

19 hours ago
  • TXR is a dual-purpose language for pattern matching and data processing, suitable for one-liners and complex tasks.
  • Launched in 2009, TXR has grown into a large language with a comprehensive reference manual (778-951 pages).
  • It integrates two languages: the TXR Pattern Language (similar to Awk but more general) and TXR Lisp (a full-featured Lisp dialect).
  • TXR Lisp supports compilation to a register-based VM, with features like jump threading, dead code elimination, and constant folding.
  • Applications can be deployed using save-exe, creating a self-contained executable.
  • TXR is resource-light: the executable is ~1.7 MB, with minimal dependencies (only libffi), and a small memory footprint (~18 MB peak during compilation).
  • It draws from many language influences, including Common Lisp, Scheme, Awk, Ruby, and Clojure.
  • The project emphasizes brevity and clarity in programs, inviting user feedback for improvements.
  • TXR is free software under the BSD 2-clause license, allowing all uses.
  • A warning: avoid Homebrew-packaged TXR due to reported stability issues; build from source instead (requires GNU Make, GCC/Clang, and shell utilities).