Languages Features Creators CSV Resources Challenges Add Language
GitHub icon


txr - Programming language

< >

txr is a programming language created in 2009 by Kaz Kylheku.

#1242on PLDB 14Years Old 0Books

Programming Language for Convenient Data Munging

Example from the web:
@(bind special-words ("arch." "var." "ver." "anci." "fam.")) @(bind ahash @(hash :equal-based)) @(repeat) @id @@ @alpha @@ @animal @@ @words @ (rebind words @(split-str words " ")) @ (bind record (id alpha animal words)) @ (do (push record [ahash alpha])) @(end) @(bind sorted-rec-groups nil) @(do (defun popularity-sort (recs) (let ((histogram [group-reduce (hash) third (do inc @1) recs 0])) [sort recs > [chain third histogram]])) (dohash (key records ahash) (let (contains does-not combined) (each* ((r records) (w [mapcar fourth r])) (if (isec w special-words) (push r contains) (push r does-not))) (push (append (popularity-sort does-not) (popularity-sort contains)) sorted-rec-groups))) (set sorted-rec-groups [sort sorted-rec-groups : [chain first second]])) @(output) @ (repeat) @ (repeat) @(rep)@{sorted-rec-groups} @@ @(last)@{sorted-rec-groups " "}@(end) @ (end) @ (end) @(end)

Language features

Feature Supported Token Example
Semantic Indentation X
status-quo-function.html · txr.html · zimpl.html

View source

- Build the next great programming language · Search · Day 213 · About · Blog · Acknowledgements · Traffic · Traffic Today · GitHub ·