TXR 269 2021-08-28 Twelfth Anniversary Edition Features - networking: - getaddrinfo now implements ai-canonname flag. - system interface: - mmap function now supported, integrated with carray. - mprotect, msync, madvise are there. - structural pattern matching: - new match and match-ecase macros for irrefutable matching. - basic Lisp: - new ecase family of macros. - sequences/iterables: - string ranges like "AAA".."ZZZ" are now iterable. - iterators (objects from iter-begin) are iterable. - sub function allows iterables. - FFI: - carray-pun function allows displacement - improved support for big/little endian types: - more efficient when matches local endian - aligned reads and writes transfer word at a time. - PRNG: - new random-buf function for obtaining a block of pseudo-random bytes. - doc improvements. - build/port: - builds on FreeBSD; test cases pass. - new --no-full-repl option builds trimmed-down listener that supports only plain mode editing, not requiring termios. Bugs - int-str: bug stripping 0x unconditionally regardess of radix argument. - format: leading sign state leaking into subsequent conversions. - ffi: deffi: broken support for variadic functions. - random: bug with modulus that is multiple of 32 bits, found on PPC64. - open-file: "+" mode must be equivalent to "r+" not "r". TXR 268 2021-08-07 Features - subtypep: arguments can now be struct type objects returned by find-struct-type, not only type symbols. - JSON: - new *read-bad-json* dynamic variable, enabling tolerance for trailing commas in JSON arrays and objects. - OOP: - syntactic infelicity in new* and lnew* operators addressed. - streams: - close-stream now replays return value if called redudnantly. - get-lines/lazy-stream-cons now have optional parameter controlling whether the implicit close-stream can throw. - listener: plain mode - handles multi-line expressions - prints prompts if stdin is tty - prompts can be turned on with :prompt-on - banner is suppressed when stdin isn't tty; more usable in pipes. - TXR Pattern Language: - @(eof) now takes an optional argument which can bind the exit status of the input source. Useful for process pipes. Bugs - gc: aborts caused by incorrectness in several object-copying functions. - correct diagnostic name in remql function. - listener: plain mode (txr -n, or input is not a terminal) now handles multi-line expressions. - build: musl fix for socket.c: need . - streams: incorrect argument defaulting of second arg of close-stream TXR 267 2021-07-26 Features - system interface: - new getrlimit, setrlimit functions - random numbers: - buffer objects can be used as random seeds now - build: - txr.c now recompiled if build_id changes. - PDF build is now reproducible even if ghostscript and groff don't have patches for this. - tags.tl: - now supports --emacs argument for Emacs-style tags, thanks to Paul A. Patience. - other improvements - hashes: - Hashes now support both and-semantics and or-semantics for tables that have both weak keys and values. - and-semantics means both key and value must be unreachable for the hash entry to disappear. - or-semantics means the entry disappears if just the key or the value is unreachable. Bugs - compat: - glaring bug fixed going back more than 150 versions. - certain effects of the -C compatibility option not having their documented effect. - caused by referencing the opt_compat variable in global initialization functions, at which time opt_compat is always zero due to -C not having been processed yet. - Test case fixes for missing /bin/sh situation exemplified by Guix build environment. - op: - weirdness in handling nested do (do do do ...) fixed - hashes: - fixed TXR 235 regression in weak processing, causing entries to spuriously disappear from weak hash tables that are only referenced by other weak hash tables. - fixed incorrect recalculation of hash table counts of weak hash tables during garbage collection. - carray: - missing type checking in a couple of functions, creating opportunity for trivial crash. TXR 266 2021-07-12 Features - built-in macros and special operators are now subject to more rigorous syntax checking during the macro-expansion walk. - improvements in error reporting - built-in macros use compiler-like error reporting now. - Lisp files executed from command line rather than loaded, ditto. - running make tests out of an editor now takes you to the error line. - improvements in doc function, and OpenBSD support. - type system overhauled to disallow structs that clash with built-in types. - new function called separate contributed by Paul A. Patience. - combines keep-if and remove-if semantics - new path-manipulation-related functions trim-short-suffix, trim-long-suffix and add-suffix. - new build-id feature: optional string that can be inserted into TXR at build time, displayed by txr --build-id. Bugs - non-functional chmod.tl test case fixed, thanks to Paul A. Patience. - regex: argument defaulting problem in regex-compile. - *stderr* stream is now sanely reset during unhandled exception processing. - new steps taken to prevent runaway recursion in exception processing. - streams: - close-stream function refuses to close stderr. (previously refused only stdin and stdout.) - put-char, put-line: lack of type checking on stream argument. - bug in with-resources problem fixed, reported by Paul A. Patience. - doc ignores BROWSER variable if it is empty. TXR 265 2021-07-04 Features - requirements change in new long-suffix and short-suffix functions: - dot is now part of suffix. - leading dot is not a suffix delimiter: e.g. .bashrc is not a suffix. - trailing path separators ignored, like in base-name. - regex: optimization function exposed. - constantp function now recognizes more kinds of expressions: - (+ 1 (* 3 4)) is constantp, as is (symacrolet ((a (+ 2 2))) (* b 3)). - doc function - now handles situations in which xdg-open blocks until browser exits. - now reacts to BROWSER variable, and if xdg-open is not found, falls back on the first of a long list of possible browsers. - filesystem interface: - path-cat function is now variadic: (path-cat "a" "b" "c" ...). - new path-search function, searches for an executable by name in path, defaulting to the system's PATH. - sequences: - new find-true function; like find-if, but returns the true value that the predicate produces, rather than the item from the sequence. - I/O streams: - argument defaulting tightened; functions no longer treat a nil value for the stream argument as a missing argument. - stack limit: - minimum limit now imposed when the system's stack limit is too low, rather than disabling the mechanism. - stack limit is now always on, even if we don't obtain a value from the system or that value indicates that there is no limit. - documentation infrastructure: - improvements from Paul A. Patience integrated. - doc workflow catches more kinds of problems. - listener: empty EDITOR variable now treated as missing. Bugs - build: regression in separate-directory build. - parser: regression: not working with byacc. - compiler: a number of bugs in inline lambda implementation. - op: subtle bug in do operator; code refactored. - base-name function: problem with empty suffix. - listener: end-of-line/buffer visual glitch in selection. - trie: bugs in regex-from-trie function, now covered by tests. - regex: print/read consistency problem printing n-ary operators. - doc: *doc-url* variable not special, as documented. - getopts: throwing sys:opt-error instead of usr:opt-error. - command line: lack of robustness in -b option fixed. - documentation: numerous fixes. - packages: find-symbol was behaving identically to find-symbol-fb. - signals: itimer-prof variable misspelled as itimer-prov. - search trees: documented tnodep function now actually exists. - stack limit: fix crash when system stack limit is RLIM_INFINITY. TXR 264 2021-06-25 Features - system interface: - TXR no longer relies on popen for open-command. - glob function accepts multiple pattern arguments and uses multiple calls to the C function with GLOB_APPEND. - parser: - parsing Lisp or JSON from a string now produces error if there is any trailing material in the string. - paths: - new functions short-suffix and long-suffix for robustly extracting the suffixes/extensions of path names. - lib: - new functions cxr and cyr for traversing cons-cell structures using a car/cdr path binary-coded in an integer. - mismatch/rmismatch better optimized for strings - starts-with and ends-with use these. - structural pattern matching: - new looping macros while-match, while-match-case, while-true-match-case. - parser: - no longer wastefully allocates dynamic string when scanning a floating-point token. - tests: - target-installable test cases are now relocatable (can be installed at any path) due to a small improvement in the run.sh script. - program-wide: - share/txr/stdlib moved to stdlib. - type mismatches when a string is expected now give function name in error diagnostic. - stack overflow protection is introduced: - in key places, TXR detects whether the stack pointer is over a predetermined limit and throws a stack-overflow exception. - controlled by set-stack-limit function. Bugs - fixed wrong result from (rmismatch #() ()) and (rmismatch "" ()). TXR 263 2021-06-17 Features - New macro named flow, providing the syntactic sugar for using an opip function on a value. - I/O: - the *stdnull* stream lazily attaches to /dev/null if fileno is invoked on it - formatted printing: - format: new precision modifier - for zero instead of plus sign. - pic macro: takes advantage of format work to generate better code. - subprocesses: - some file descriptor saving-restoring manipulations moved into child process (in open-process, open-subprocess, run) - diagnostic for situation when *stdout*, *stdin* or *stderr* are redirected to something that cannot produce a file descriptor. - match-fun/txr-if - documented that input can be a stream - documented that input can be a single string - txr-case: - if input is a stream, it is now converted to a lazy list of lines, so that the txr-case construct effectively backtracks over the data as it tries successive cases. - command-line - new --noprofile option to invoke listener without processing ~/.txr_profile file. Bugs - format: numeric handling maintenance - poor behaviors identified and revised. - requirements clarified. - cemented in test cases. - exceptions: - unwind dynamic environment when tracing unhandled exception - solves problem when exception goes off while *stderr* is redirected. - subprocesses: - diagnostic for situation when *stdout*, *stdin* or *stderr* are redirected to something that cannot produce a file descriptor. - macros: - fixed TXR 191 regression in defsymacro: expanding the replacement form before associating it with the symbol, rather than taking as-is. - quasiliterals: - fixed issue arising when a macro invoked as a @(...) expression in a quasiliteral expands to a non-string atom. - math: - forbid dubious inequality comparisons like (< 1 "abc") which became unintentionally allowed due to numbers being iterable. TXR 262 2021-06-11 Features - structural pattern matching: - new feature: quasiquote matching. - JSON: - improved escaping of JSON output for safe embedding in