TXR Changelog

New in version 100

December 19th, 2014
  • Features:
  • New functions: chr-isblank and chr-isunisp
  • New generic less and greater functions, which are also used as default functions in sort, find-max, max-pos, and others.
  • New directives @(line) and @(chr) for binding or asserting the current line number or character position.
  • Lisp expressions allowed on left side of @(bind) and @(rebind) now.
  • New function lcm (lowest common multiple).
  • The gcd function now takes zero or more arguments instead of exactly two.
  • New @(include) for parse-time loading of code, useful for loading macros which are needed later in the same file.
  • Beginning of library external to TXR executable: macros txr-if, txr-when and txr-bind for more convenient access back into the pattern language from TXR Lisp.
  • New combinator function notf for negating a function.
  • Bugs:
  • Fixed December 2011 regression affecting @(freeform) directive.
  • Fixed GC-safety bug in abs-path-p function.
  • Fixed breakage in scanner and parser introduced in August. Caught by C++ compiler.
  • Fixed inappropriate printed rendering of list objects produced by interpolated TXR Lisp expressions in @(output) blocks, and in the quasiliterals of the pattern language. (TXR Lisp quasiliterals not affected.) Users who depend on the old behavior not wanting to fix their programs can use --compat 99.
  • Bugfix in the gcd and lognot functions: neglecting to normalize some bignum result to the fixnum type.
  • Bugfix in @(eof) directive: not matching the end of interactive streams.
  • Fixed abort due to assertion going off when GC is disabled and the array of new generation objects runs out of space. This could happen during large parses.
  • Fixed parser stack overflow and inefficiencies when handling large TXR programs.
  • Bugfix in match_fun causing memory accesses to automatic storage that has been released, as well as an invalid longjmp.
  • Hash table reorganization is prevented during hash table traversal, so existing items are not skipped or visited twice.

New in version 99 (October 7th, 2014)

  • Features:
  • Variables in the pattern language can be bound to regexes, in which case they perform regex matches when matched against input.
  • Representation for compiled regexes is streamlined.
  • Regex objects now print in regex notation.
  • Bugs:
  • Fixed August 11 regression affecting 96 through 98: broken matching of unbound variables followed by bound variables.
  • Fixed one more problem with andf function: (andf) not returning t.

New in version 97 (September 11th, 2014)

  • A few GC-related fixes after code review.
  • Fixed @(load), broken in TXR 94.
  • Fixed broken @{var mod} syntax Lisp quasiliterals, broken in TXR 96.

New in version 80 (February 18th, 2014)

  • Features:
  • TXR now nicely handles null characters in text stream inputs. They are internally encoded to the Unicode value U+DC00, which will map back to a single null byte on output (that being existing behavior).
  • TXR now has Lisp macros: the defmacro operator is implemented, with destructuring lambda lists and all.
  • New operators tree-bind and tree-case for pattern binding similar to Common Lisp's destructuring. This piggybacks off the defmacro infrastructure which we now have.
  • Big improvement in debuggability: the unhandled exception error message now gives source code location information.
  • New functions pos, pos-if, posq, posql and posqual for finding item positions in sequences.
  • Predicate function is now optional in the some, all and none functions.
  • hash-uni and hash-isec functions take a join-func argument which lets you specify how elements from two tables are merged.
  • new hash table functions inhash and hash-update-1.
  • two hashes can now be tested for deep equality using equal.
  • Bugs:
  • Removed bogus optimization from hash table implementation.
  • Syntactic fix: input like 1.0a no longer parses as a floating-point number followed by a symbol, but is diagnosed as an error. Syntax like 123a continues to work as before: it denotes one symbol, not 123 followed by a.
  • Bugfix in type check for "cobj" class objects that would crash if given non-heaped values like fixnum integers.
  • Corrected problems in the code walking and expansion of lambda and defun forms.
  • Fixed failure to propagate line number info through the abstract syntax of string quasiliterals.
  • Doc bugs: missing descriptions of gethash and gensym.

New in version 79 (February 13th, 2014)

  • Features:
  • New functions comb, perm, rcomp and rperm for calculating repeating and non-repeating combinations and permuations of sequences (lists, vectors and strings). Hashes are supported by comb function.
  • Bugs:
  • Hardening of code for handling excessively large vectors.
  • Bugfix in quasistring handling in TXR Lisp.
  • Bugfix in if function (not the if operator).

New in version 78 (February 6th, 2014)

  • Improvements in the apply function, reduce-left, and reduce-right, and improved design and implementation of optional arguments.
  • Lists, vectors, and strings are now generally function-callable, not only under the dwim operator. Some new functions were added.
  • Bugs in the do operator were fixed along with some other problems.

New in version 77 (January 30th, 2014)

  • Features:
  • More streamlined parser containing fewer hacks, and fewer obscure cases that don't work.
  • @'expr syntax now works as expected in directives for evaluating quoted TXR Lisp expressions.
  • In nested uses of the do and op operators in TXR Lisp there is now a way to refer to the outer parameters from the inner nestings, using compounded meta syntax like (op (op @1 @@1)), where @1 is argument 1 of the function denoted by the inner op, and @@1 is argument 1 of the outer function. Each additional @ "escapes" out one level of nesting of the op syntax.
  • New update and hash-update functions.
  • The interfaces of reduce-left and reduce-right functions has been improved, making them easier to use, while mostly retaining backward compatibility.
  • New functions remove-path and rename-path for removing and renaming filesystem objects.
  • Catenated streams, previously an internal feature, are exposed now via the make-catenated-stream function.
  • Scope rule change for expressions that provide default intialization for optional arguments. These eexpressions now have the parameters in scope, and so now uses like (lambda (x : (y (length x))) ...) are possible where y is initialized with (length x) if the argument is not supplied. Previously, parameter x would not have been considered to be in scope of the expression (length x).
  • Bugs:
  • Fixed neglected handling of result form in dohash syntax.
  • In the object printer, the handling of syntax like @(sys:var x ...) was ignoring any additional ... forms, and rendering as @x.
  • Fixed possible race condition in tail streams, whereby when a file rotates, the stream prematurely follows the new file, neglecting to read the last piece of material just added to the previous file.

New in version 76 (January 24th, 2014)

  • Features:
  • New time functions: time-fields-local and time-fields-utc for obtaining broken-down time from Epoch seconds.
  • New group-by function for constructing a hash from a list when the list elements can be partitioned into equivalence classes tied to keys, rather than treated individually.
  • Sweeping changes in TXR List to allow vectors and strings to be manipulated in many situations as if they were lists. Functions like car, cdr and mapcar work on strings and vectors.
  • New command line options -e and -p for evaluating TXR Lisp expressions more conveniently from the command line.
  • The and, or and if special operators are now also provided as functions, so they can be indirected upon functionally.
  • New functions conses and conses*, useful for iterating over a list similarly to Common Lisp's maplist function.
  • New do operator (unrelated to @(do) directive) similar to op, but geared toward doing imperative things involving special operators.
  • Bugs:
  • @(require ...) directive was not expanding its forms prior to evaluation.

New in version 75 (January 17th, 2014)

  • Features:
  • Two new stream functions: unget-char and unget-byte. Some streams now support ungetting a byte or character, which was a glaring omission in the API, without which some common scanning tasks are awkward.
  • TXR Lisp functions with optional parameters can now specify expressions to give those arguments values when the arguments are missing.
  • New operators in TXR Lisp: append-each and append-each*.
  • Change in the Lisp structure printer. The special structure generated by the read syntax @sym and @(...) now prints back in the same syntax, rather than as (sys:var sym) and (sys:expr ...).
  • Bugs:
  • Fix in put-byte function: before invoking the underlying operation, it was testing whether the put-char operation exists for the stream, rather than the put-byte operation. This would result in a crash if the stream supports put-char but not put-byte.
  • Mistake in calculating bitmasks for regex character class ranges, resulting in incorrect behavior for ranges whose upper range is a character code corresponding to the last bit of a word in the bitmask array, e.g. [A-\x7f], resulting in failures to match 32 or more characters in the upper end of the range.
  • Missing documentation filled in for the functions throw, throwf and error.