This programming language may be used to instruct a computer to perform a task.
If you know TXR, please write code for some of the tasks not implemented in TXR.
TXR is a new language implemented in C, running on POSIX platforms such as Linux, Mac OS X and Solaris as well as on Microsoft Windows. It is a dynamic, high level language originally intended for "data munging" tasks in Unix-like environments, particularly tasks requiring accurate, robust text scraping from loosely structured documents.
The Rosetta Code TXR solutions can be viewed in color, and all on one page with a convenient navigation pane here.
TXR started as a language for "reversing here-documents": evaluating a template of text containing variables, plus useful pattern matching directives, against some body of text and binding pieces of the text which matches variables. The variable bindings were output in POSIX shell variable assignment syntax, allowing for shell code like
eval $(txr <txr-program> <args> ...)
TXR was internally based, from the beginning, on a data model based on Lisp and eventually exposed a Lisp dialect that came to be known as TXR Lisp. TXR Lisp at first complemented the pattern extraction language, extending its power, but eventually became distinct. Programs can be written in TXR Lisp with no traces of the TXR pattern language, or vice versa.
TXR Lisp is an original dialect that contains many innovative features, which orchestrate together to express neat, compact solutions to everyday data processing problems. Programmers familiar with Common Lisp will be comfortable with TXR Lisp, and there is much to like for those who use Scheme, Racket or Clojure. TXR Lisp incorporates ideas from contemporary scripting languages also; a key motivation in many of its developments is the promotion of succinctness, which is something that often isn't associated with languages in the Lisp family.
This category has the following 3 subcategories, out of 3 total.
Pages in category "TXR"
The following 138 pages are in this category, out of 138 total.
- Caesar cipher
- Call a foreign-language function
- Call a function in a shared library
- Closures/Value capture
- Combinations with repetitions
- Comma quibbling
- Command-line arguments
- Compound data type
- Conditional structures
- Count occurrences of a substring
- CSV data manipulation
- CSV to HTML translation
- Scope modifiers
- Send email
- Set consolidation
- Shell one-liner
- Short-circuit evaluation
- Sort stability
- Special characters
- String matching
- Strip a set of characters from a string
- Strip control codes and extended characters from a string
- Strip whitespace from a string/Top and tail
- Sum of a series
- Summarize and say sequence
- Synchronous concurrency