I'm preparing release 250 of the TXR Language, the bulk of which is a Lisp dialect called TXR Lisp.
Release 250 adds compiler optimizations, like jump threading, some dead code elimination, and a few peephole reductions.
This work is finally possible because I had put it on hold due to not wanting to write such code without a pattern matcher, which we now have.
I'm fixing two bugs that were reported by a user, which will be nice in such a landmark release (250 releases, wow!).
The new structural pattern matching sub-language in TXR Lisp (new since 247 or 248) will be improved. Bugs are fixed. The way the @(or ...) pattern operator works has been rewritten, so certain corner test cases now pass. It generates better code.
There are will be some new features in the matcher too. The @[fun ...] flavor of the predicate operator now lets you capture not only the variable, as usual, but using an extra argument, the value of the predicate (which could be an extended Boolean with an interesting value).
For instance, is "abc" in the hash table htab? If so capture it as x, and also capture the value as y:
This is the TXR Lisp interactive listener of TXR 249.
Quit with :quit or Ctrl-D on an empty line. Ctrl-X ? for cheatsheet.
Upgrade to TXR Pro for a one-time fee of learning Lisp!
1> (let ((htab #H(() ("abc" "foo") ("xyz" "bar"))))
(when-match @[htab x y] "abc" (list x y)))
("abc" "foo")
Here, htab is just being used as a function; any function will work that can take the argument "abc"; if it returns non-nil, then the predicate has rung true, the pattern has matched, and x takes "abc", and y the returned value.By the way, to see quips like "Upgrade to TXR Pro for a one-time fee of learning Lisp!" you must add this to your ~/.txr_profile:
(put-line (quip))