TXR 196 2018-05-18 Features - Both the TXR Pattern Language and TXR Lisp now allow Unicode in identifiers. - Un-braced variables like @abc in the pattern language and string quasiliterals are excluded from this change. - Braced variables and Lisp symbols, including packag prefixes, may use Unicode characters. - Unicode spaces cannot be used in identifiers, and neither can various invalid characters. - The Interactive Listener now supports Unicode input. TXR 195 2018-05-04 Bugs - Overhaul of handling of parameters that are special variables. - was not implemented at all in interpreted destructuring. - compiled destructuring implemented it by using let. - had subtly wrong scoping semantics, not affecting most code. - was broken completely due to a regression in TXR 190 - MacOS and Solaris ports: - fixed broken method for getting TXR's executable path, which caused TXR not to work unless invoked via full path. TXR 194 2018-04-30 Bugs - FFI: - issue causing inability to to encode the most negative signed 32 bit integer on 32 bit platforms, and the 64 bit one on 64 bit platforms. - compiler: - fixed situations when compiler generates immediate move instructions for integer operands that are too wide to be used as immdiate literals. - assembler: - fixed a situation in which a bignum integer was encoded as a literal using its bitwise pointer representation. TXR 193 2018-04-26 Features - compiler: - load-time special form, similar to load-time-value in ANSI CL. - evaluates an expression on file load whose value is treated as a literal object. - program doesn't have to define a top-level variable; load-time occurs anywhere in code. - code improvement in translation of - string quasiliterals - destructuring (tree bind, macro arguments, ...). - compiler now removes (block ...) constructs that look as if they are not needed. - vm: - big improvement in stack usage of running VM. - addressed some spurious retention issues. Bugs - autoload - fixed programs experiencing errors due to some library modules not loading. - caused by situations when the dependency from a library module A to B modules was keyed only to the macros provided by B, not B's run-time functions generated by the macros. - of course, compiled code doesn't refer to macros any more. - compiler: - fixed (return x) being mis-compiled as if it were (sys:abscond-from nil x). - awk: fixed multiple expansion of path/command argument in I/O redirection macros ->, ->>, <-, !> and <. TXR 192 2018-04-19 Features - compiler: - compiled files now marked with byte order indication - TXR compiled on big-endian will load compiled files made by TXR on a little-endian machine and vice-versa. - caseq/caseql/casequal optimized to table dispatch for characters and integers in dense range. - inline lambdas (lambdas that are immediately invoked) are now open-coded into let-based binding blocks. - parser: - Unterminated form errors now show the starting line number of the top-level form being read. - VM: - architectural change: display max depth reduced from 256 to 64 frames, but frames with maximum widened from 256 words to 1024 words. - object file major version bumped from 0 to 1: - compiled files from TXR 191 won't load. - lib/VM: - wasteful consing eliminated from apply function. - continuations: - documented differences in compiled vs intepreted behavior with respect to mutated lexicals. - new macros hlet and hlet* provided for binding lexical variables that are based in off-stack storage that isn't captured in continuations. Bugs - compiler: - fixed miscompilation of unwind-protect. - missing ((lambda ()) ...) call forms now handled - also optimized by open-coding. TXR 191 2018-04-10 Features - TXR Lisp now has a compiler and virtual machine. - individual forms and functions can be compiled - TXR Lisp .tl files can be compiled into .tlo object files - the Lisp parts of the library are now compiled. - TXR starts up some 3.5X faster when most of the library auto-loading is triggered. - Library: - new bignum-len function; get the "size" of a bignum efficiently. - ldiff function redesigned with more nuanced semantics. - Symbols/Packages: - package-prefix-interning now allowed in packages that have a fallback list. - application code is now read in a package called pub, not in the usr package. - usr package is devoid of spurious symbols; the Lisp library is read in the sys package. - Macros: - defmacro forms are no longer hackily evaluated at macro-expansion time: - evaluated normally, in apparent lexical env. - code which does things like: (progn (defmacro foo ...) (foo ...)). now requires (macro-time ...) around the defmacro. - optional parameters in macro-style parameter lists no longer support the colon hack for explicitly specifying a missing parameter. - only function calls have this feature now. - Printer: - improved line breaking of aggregate objects. - new function force-break exposed, related to this. Bugs - buffers: buf-get-* functions were not allowing the last byte of a buffer to be extracted. - structs: post-inits and finalization registrations are now correctly performed by reset-struct. - trace: several bugfixes in method redefinition check. - bignums: fixed broken single-digit bignum multiplication. - functions: fixed regression in function argument processing causing the failure to diagnose too many args. - expander: fixed neglect to add sequentially-bound variables to the expansion-time environment when they lack an init-form. - expander: fixed some neglected expansions in the sys:for-op special operator that implements the iteration forms like each and for. - expander: bugs/regressions in handling nil in parameter list expansion. - expander: optional parameters of functions were not being expanded in an environment in which the previous params are visible. - listener: fixed poor treatment of regex syntax in the code which prevent lines from being submitted when they are ill-formed. - gc bugs: fixed some incorrect mutations that break generational gc. - some in struct code - some in datagram socket code. - tagbody: fixed; was broken due to a regression. - packages: read/print consistency issue related to packgage prefixes fixed. - regex: read/print consistency problem related to double quote. - regex: double-free corruption bug related to use of canned character classes like \w. - hash: fixed broken with-hash-iter. TXR 190 2018-02-18 Features - Annoying limitation removed: lisp load now handles .txr files. - Listener: - new *listener-pprint-p* variable turns on use of pprint for evaluation results. - new *listener-greedy-eval-p* variable turns on a cascaded evaluation: values are subject to additional rounds of evaluation, whose results are also printed. Bugs - fixed bug "unbound function sys:l1-val" when using lop operator. - fixed expander bug causing (do set [@1 x] y) to be wrongly expanded. - autoload bugfix: symbols used for struct slots in standard library modules are now interned even if those modules are not loaded, so that they are treated properly under the package system. TXR 189 2018-02-06 Features - read an iread no longer record source code location info unconditionally - now controlled by new *rec-source-loc* special variable. - OOP: - better abstract sequence support: - new: special methods rplaca and rplacd. - sub and replace function now redirect to lambda and lambda set methods. - car and cdr fall back on lambda method now if object has no car or cdr method. - refset defined for objects that have car method. Bugs - Fixed regression in read-print consistency of hash tables. - Fixed bug in sequence classification logic that caused objects to be reported as non-sequences. - Fixed nthcdr continuing to iterate up to n even after end of list reached. - Fixed neglected autoload registration for socket functions. - Fixed bug in source location recording, causing errors in code to be rported against incorrect file names and line numbers. TXR 188 2017-12-19 Features - New funtion grade - like grade up/down operators in APL. - returns indices into sequence in sorted order. - New macro feature: lexical macros can decline expansion. - lexical macro can decline to expand by returning original form. - lexical scope is searched outwards to find and try another macro. - Big hash change: - hash function now defauilts to :equal-based. - :eql-based keyword specifies hashing based on eql. - functions which take hash arguments follow suit: group-by, etc. - Streams new feature: structure delegate streams - OOP interface for creating objects that substitute into stream I/O operations. - stream-wrap base implementation for easily wrapping and adapting streams. - New functions rlist and rlist*: express discontinuous ranges easily. Bugs - append* and mappend*: - fixed unintentional, undocumented destructive behavior - fixed non-termination on infinite lists. - tail function now handles improper lists. - macro expansion bug fixed: - neglect to expand the output of a declined macro - must be treated as a function call or possibly a special operator - either way, may have constituent expressions that need expansion - prof: deal with overflowing performance counters. - we use a 64 bit type if we have it, and convert to bignum if and when required. - trace: fixed spurious "previously traced" warning on methods. TXR 187 2017-11-18 Features - Functional library: - lop: - "left op": new variant of op macro. - inserts free arguments on left rather than right. - Control flow library: - caseq, caseql and caseql expand to better code. - Sequences library: - find, find-if, find-max, pos, pos-if, pos-max, posq, posql, posqual, rfind, rfind-if, rpos, rpos-if, rposq, rposql and rposqual: - rewritten with optimization for vectors and strings and proper support for vector-like struct objects. - Awk macro: - five new range operators - some optimizations - FFI/buffers/carray: - carray indexing handles negative indices now according to usual vector convention. - New convenience functions for I/O between files/streams and buffers. - Build: - improved handling of test targets in Makefile - in condensed mode ("CC file.o" output) if the build step fails, the failed command is printed in detail. - Windows port: - Cygnal DLL updated to Cygwin 2.9.0 baseline from 2.5.2. - Vim: - % is correctly considered a symbol constituent. Bugs - partition, partition*, split and split* handle infinite lazy lists of indices; issues in their < TXR-171 compatibility have been addressed. - tprint function and -t command line option deal with lazy lists in constant memory now. - completely broken copy-hash fixed. - Awk macro: fixed hygiene problem in expansion. - carray: stability: missing type checks added in several functions. - open-command now accepts "b" mode flag even on POSIX platforms whose popen function rejects it with a failure. TXR 186 2017-09-16 Features - math: - new cum-inv-norm function for calculating inverse of the normal distribution. - new poly and rpoly functions for evaluation of single-variable polynomials, given coefficients and domain value. - macros: - new macroexpand-lisp1 and macroexpand-1-lisp1 functions for expanding forms in an assumed Lisp-1 style evaluation context. - regex: - new regex-prefix-match function - determines whether string is a prefix of a possible match, even if it is not itself a match. - optimizations implemented to reduce NFA graph size. - printed representation of regexes based on original source code, not AST-optimized version. - command line: - txr -i <file> now goes to REPL even if loading <file> throws exception. - listener: - Visual feedback is now given when Enter is pressed at the end of a line that is not accepted due to unbalanced syntax. Bugs - listener: - Enter pressed in Ctrl-X context now correctly leaves Ctrl-X context (in situations when line is incomplete and not submitted). - Lisp syntax: - precedence of range .. now lower than referencing dot, so a.b .. c.d parses in intuitive way. - regex: - fixed incorrect printing of | relative to catenation - e.g. #/abc(def|ghi)/ was printing as #/abcdef|ghi/ - recent regression - syntactic places: - if form [m ...] is used as a place, m is now correctly macro-expanded in a Lisp-1 context. TXR 185 2017-08-30 Features - The op/do macro implementation has been rewritten in Lisp: - Substitution of the @1 notation to anonymous lambda argument terms now leverages local macros, so that it follows a correct code walk. - Will not get stuck in an infinite loop if quoted literals occur that contain circular structure. - Meta expressions like @foo and @(bar) can now be used in the dot position of a function call - Example: (macrolet ((sys:expr (x) ^(quote ,x))) (list . @(a b c))) -> (a b c) - related to the op rewrite, which relies on it to preserve the behavior of forms like (op fun . @1) previously implemented in op itself. Bugs - Fixed a five-and-half year old bug in replace-str, introduced between TXR 54 and 55. This affects other operations such as (append "str1" "str2"). TXR 184 2017-08-23 Features - TXR ported to 64 bit ARM8 ("aarch64"). - out-of-memory handling revised: - throws exception rather than aborting. - code for this was very old and long neglected. - lib: - set-diff is called diff now; old name deprecated - isec and uni functions provide intersection and union. - names harmonize with hash-diff, hash-isec and hash-uni - len synonym for length - spl and tok functions: variants on tok-str and split-str, with argument order more suitable for currying. - math: - new functions digpow and digits - (digpow 1234) -> (1000 200 30 4) - (digits 1234) -> (1 2 3 4) - other bases than ten via optional second arg. - new functions sum and prod for adding or multiplying sequence of numbers without having to apply or reduce through + or *. - new divides function for divisibility testing. - bit functions logand, logior and loxor allow character operands. - function bit can test bit of character - control flow: - new macros doloop and doloop* - trivial case of tagbody optimized away. - extraction language: - bi-directional string tree match semantics for non-variables in @(bind) and other contexts. - FFI: - new buf-carray-function - new functions for reading and writing FFI types from and to streams. - I/O streams: - New stream type for doing I/O from and to a buffer. - Functions for Base64 encoding and decoding from one stream to another. - length argument in truncate-stream function now optional - defaults to current read/write position - parser: - more efficient treatment of string literals. - improvements in Vim syntax coloring. Bugs: - listener: - recognizes incomplete buf literals properly as open syntax. - tagbody: - tagbody was setting up anonymous block, which it must not. - pad function - spurious instances of nil were occurring in its output. - n-ary math-functions: - were not checking the one-arg case, e.g. (+ "foo") -> "foo" which should be an error. - tok-str: - wrongly permitted a call with just one argument. - streams: - seek-stream was not working when :from-end specified. - buffers: - buf-put-uchar was broken. - parser: - fixed "yacc stack overflow" when compiled with Byacc. - fixed broken #; syntax handling when compiled with Byacc. - fixed broken handling of empty buffer literals. - buffers: - fixed infinite loop in buf_grow function. TXR 183 2017-07-19 Features - Extraction Language: - New :lists parameter in @(collect)/@(coll) - Specifies variables which are are ensured as bindings to lists, even if they match nothing, without the full blown discipline of :vars. - FFI: - carray-buf, ffi-get, ffi-put-into, and ffi-in get an offset parameter for added flexibility. - Environment: - The accessors symbol-function, symbol-value and symbol-macro can now create bindings that don't exist, when assigned, rather than throwing errors. - Storing to a (symbol-function (meth ...)) place can define a method now. - I/O: - The format function can now pad floating-point numbers with zeros, if a leading zero flag is specified on the precison. - remove-path: exception semantics adjusted. - New path-cat function for easy catenation of paths. - getopts: - New argument type :text for an option whose argument is a string that is treated as raw text, and not TXR Lisp literal syntax as with the :str type. - List/Sequence processing: - New function, relate: turns corresponding elements from a pair of sequences into a translation function. - New accessor nth, like ANSI Lisp nth. - find and pos functions optimized and improved in support of objects that implement sequences. - Filters: - New *filters* special variable exposed. This holds the named filters used in the extraction language, as a hash table. Bugs - Fixed spurious warnings occurring in some situations when functions are invoked using square bracket syntax. - Fixed runaway recursion when trace macro used to trace the * or format functions. - regex: regex printing no longer renders superfluous parentheses around character classes. - getopts: fixed broken custom option type. TXR 182 2017-07-09 Features - Lisp: - Lambda expressions are function names now, improving compatibility of TXR Lisp with other dialects. - FFI: - Support for preparing zero-filled objects for foreign functions: - New functions zstruct and zero-fill, and new macro znew. - Relaxation in cptr type allowing a nil-tagged cptr null pointer to convert to foreign pointer through a cptr FFI type bearing any tag. - OOP: - New functions provided for accessing and storing a struct type's initfun and postinitfun. - The keywords :init and :postinit can be used in the place of method names, allowing a struct type's initfun and postinitfun to be redefined using defmeth syntax, and also referenced using the (meth type slot) syntax. - Doc improvements: - FFI restructured into major section with better divisions. - Better HTML TOC: [+] [-] open/collapse UI rearranged. Bugs: - OOP: - bugfixes in static-slot-ensure also affecting defmethod. - Listener: - newlines occurring in material pasted with Ctrl-X P (result of previous evaluation) are properly treated now as line breaks. - build: configure script triest to detect deviant libffi installations, like that of Arch Linux. - call-super-method function deprecated. TXR 181 2017-07-01 Features - FFI: - new cptr functions cptr-cast and int-cptr. - new macro deffi-sym - enums can be based on types other than int. - make-union can specify an initial value, and optionally specify the member for that value (defaulting to the first member). - Lib: - New Cartesian product mapping functions: maprod and maprend. Bugs - FFI: - fixed broken "in" semantics of zarray types. - fixed failure to null terminate zarrays. - fixed broken struct/union returns on big endian. - fixed bool types reporting as integers in the printed #<ffi-type ...> notation. - fixed more bugs in bitfield layout leading to incorrect placement and retrieval of bitfield values. - fixed union types reporting as struct types in the #<ffi-type ...> notation. TXR 180 2017-06-25 Features - FFI: - new types: bool, longlong, ulonglong. - support for C unions. - improved support for type-tagged cptr. - some performance optimizations. Bugs - Fixed regression in horizontal @(trailer) introduced in 170. - Fixed broken append redirection operator ->> in awk macro. - FFI: - fixed broken float put operation. - fixed broken handling of cptr when parametrized by tag symbol. TXR 179 2017-06-18 Features - FFI: - carray-sub function becomes accessor. - New functions num-carray and unum-carray to treat carray as a binary blob holding an integer, which is extracted. - New functions carray-unum and carray-num, which convert the binary image of an integer into a carray. - New copy-carray function, hooked into copy function. - Listener: - Multi-line mode is now default. - New Ctrl-X ? displays "cheat sheet" of interactive commands. - Open syntax is now detected: - when Enter is pressed in incomplete expression, a line break is inserted. - Sequences: - Functions length and empty now check whether a structure has a method called length and use it. - New concept being introduced: sequence that are not vectors, strings or lists can be "vector-like" or "list-like". - A struct is a vector-like sequence if it has lambda and length methods. - reverse and nreverse handle generalized sequences: - can be applied to carray - ref and refset now work on structs, via lambda and lambda-set. - could be considered a bugfix. Bugs - Numerics: - Fixed sign-extend function, broken for bignums. - Hardened the MPI library: - Clamped the maximum digit size to prevent numeric overflows in bignum sizes and bit counts. - Introduced new MP_TOOBIG error into MPI library, which is is handled in TXR Lisp runtime. - bit count argument of ash function range checked, since it must fit into the C type int. - Fixed neglect to autload place macros. - FFI: - fixed bugs in bitfield layout. TXR 178 2017-06-12 Features - FFI: - carray objects greatly extended: - element selection with select - assignable indexing and range selection - integration with the [...] syntax, ref, refset, sub and replace. - carray-get and carray-put functions make carrays more convenient for handling C arrays across FFI. - length function supports carray. - carray-pun function lets carray be reinterpreted as an array of a different element type. - carrayp function for testing whether object is carray. - if libffi is missing at build configure time, much more functionality from the FFI module is now retained. - Buffers: - ref and refset indexing supported, along with [...] syntax. - bufp function. - Awk macro: - new fconv conversions c and cz for C notation 0x... hex, 0... octal. Bugs - Added missing overflow checks in memory allocation code in various places in library: FFI, streams, system interface. - Fixed bug in vector function, allowing the negative sizes -2 and -1 to get through. - Awk macro: - fixed broken rng (basic both-endpoint-inclusive form) - FFI: - fixed failure to trigger string conversion for arrays whose element is a character typedef rather than direct character type. - fixed broken get semantics of incomplete (zarray char), and likewise for (zarray bchar) and (zarray wchar). - was getting a vector rather than string. TXR 177 2017-06-07 Features - FFI: - bitfields: - struct members may be bitfields, using 1, 2 or 4 byte storage cells. - enums: - enum types convert between sets of symbols denoting numeric values, and FFI type int. - align operator in type language: - the alignment of types can be customized to achieve effects like packed structures, or conformance with unusual alignment requirements. - endian types: - big and little endian versions of int16, uint16, ... int64, uint64, float and double. - FFI transparently handles conversion. - new macros: alignof, offsetof, arraysize, elemsize, elemtype - numeric values in type language such as array sizes are now evaluated expressions. - new val type for transparently passing raw Lisp values. - Streams: - New put-buf and fill-buf functions for I/O based on buf type. - FFI-type-driven conversions to/from buffers combine with buf I/O, allowing TXR to deal with binary data in files and over networks. - Command Line: - new *args-eff* variable provides access to transformed command line arguments. - "Hash bang" support rewritten, and now features a "hash bang null hack": - Additional arguments to TXR may be encoded in a hash bang line after a null byte. - lib: - mkstring's <char> argument now optional, defaulting to space. Bugs - FFI: - lingering broken assumption that alignment of pointers is the same as their size. - GC integrity issue in carray and cptr objects. - Another GC integrity issue affecting basic FFI types. - fixed incorrectly coded exception throws affecting code which misuses one of the four functions that connect FFI and buffers. - slots named nil in a FFI struct are now culled when making the corresponding Lisp struct type. - fixed broken handling of return values on big-endian platorms, related to a historic quirk in libffi. - fixed some broken conversions and range checks affecting some integer types. - fixed broken get semantics for arrays of bchar. - failure to null-terminate decoded string. - fixed clockid-t type not being defined on platforms that do have the corresponding clockid_t C type. - Build system: - "make tests" doesn't cache output of failed tests, so they are repeated when re-invoked. TXR 176 2017-05-21 Features FFI: - New tagged variant of cptr type, for improved safety. - New carray type for handling arrays of unknown size, where FFI's automatic memory handling isn't of help. - deffi-type is just called typedef - New ffi macro providing a shorthand for ffi-type-compile. - Variable length arrays that are null-terminated (zarray <type>) now have useful semantics: the type can extract an arbitrarily long null-terminated array from foreign memory. - Previously undocumented ffi-call function is now documented, and has undergone an API change. - deffi macro now generates Lisp functions with fixed number of arguments, so a mismatch in number of arguments is caught at the wrapper level, rather than down inside ffi-call. - New deffi-var macro for defining a Lisp variable connected to a foreign variable. Awk macro: - New (again) operator for repeating all the rules against the same record. Filesystem: - New functions dir-name, base-name and variable path-sep-chars. - New function realpath, wrapper for the POSIX one. Bugs - fixed corrupt line numbers being reported in some situations, like unbound variables inside quasi-word-list literals. - FFI: - fixed broken in semantics of buf type. - fixed broken alignment of basic types leading to wrong struct layouts. - nil value now handled by FFI buf type, mapped to null pointer. - A ffi call now releases up temporary local memory when an exception occurs in the argument preparation phase. - A ffi callback similarly releases any temporary memory allocated during the preparation of the return value, if the preparation terminates due to an exception. - Defense in the type system against incomplete (i.e. zero sized) types being passed or returned by value, or used as array elements or struct slots. - Fixed wrong documentation about variable-length arrays corresponding to pointers. - FFI calls are now checked for proper number of arguments. TXR 175 2017-05-15 Features - New: Foreign Function Interface (FFI) - Declare bindings to C-compatible functions in other software components (dynamic libraries). - Use Lisp functions as C-compatible from foreign software components. - New :prompt command in listener, nicknamed :p, which turns on prompts, useful in the plain mode listener. - stat structure has a path slot now, for convenience; - answers question: if the stat was obtained from a path, what was that path? - Built in functions and macros can now be redefined: only a warning occurs, rather than error. - New buffer data type. - Functions related to cptr type exposed. - Funtions dlopen, dlsym and related functions exposed. - OOP: - new and lnew macros now check nonexistence of base type at expansion time and generate immediate warning. Bugs - Printing issue with embdedded symbols in quasiliterals. - Fixed broken printing of quasi-word-list literals. - @{expr [index]} substitution syntax now indexes into any kind of sequence, not only lists. - Tightening in parser to reject certain unassigned syntax like #[], and better error checking over hash literals. - Bugfixes in area of processing TXR pattern language in context of user-defined package. - OOP print methods can now disable *print-circle* over recursive print calls. - Unintering built-in symbols is now possible without catastrophic results. - Fixed error in macro-expander's traversal of the special forms return-from, sys:abscond-from and block*. - Fixed bug in expander for suspend macro. - Fixed bug in the ash function when right shifting fixnum integers. - Fixed tostringp not behaving for float numbers in documented manner. - mkstring and vec-set-length defend against negative argument. - lognot and logtrunc defend against negative number of bits. - Fixed bug in --free-all logic when --vg-debug in effect. - Fixed incorrectly ordered logic in make-catenated-stream, exposing a Lisp object to premature reclamation. - Reproduced as actual issue on Darwin, under the --gc-debug GC torture test. TXR 174 2017-04-04 Features - TXR Pattern Language: - The special phrase forms like @(collect) and @(end) are now integrated with the package system. - opip macro: - forms like .a.b or .(meth x y) occurring in opip now evaluate to functional pipeline terms as expected. - Lexical syntax: - Dubious run-on lexical forms like 0.1.2 and .1.1 now diagnosed. - Time: - New functions time-parse-local and time-parse-utc. - Listener: - The -n option now has the additional effect of forcing the listener into plain input mode (no editing, history, or completion) even if the input device is a TTY. Bugs - Fixed broken support for building in separate directory. - Floating-point constant regression: .123 being misinterpreted as a slot access if preceded by whitespace. - Fixed rejection of 0.1..0.2 range syntax with floating-point operands. - Fixed a...b syntax error. This is a .. .b. - Fixed apply and iapply broken behavior: not splitting non-list sequences into individual arguments, like documentation says. - Linenoise issue fixed: when reading from a non-tty mode without editing, the continuous instantiation of a new buffere stream was causing input data to be discarded. - Scanner issue fixed: `@@1abc` was being interpreted as `@{@1}abc` rather than `@{@1abc}`. TXR 173 2017-03-25 Features - Listener: - Completion is now sensitive to slot or method context: .(abc[TAB] and .abc[TAB] searches appropriate spaces. - TXR Pattern Language - Unbound variable followed by directive is now bound to partial match result while searching for match for directive. - GC: - Finalizers may now invoke call-finalizers; behavior no longer unspecified. - Lisp code processing: - Warnings issued when expanding code that accesses nonexistent struct slots. - Not a form of type checking at all, but catches many typos. - Windows: - Improved 16x16 icon. Bugs - Lisp code processing: - Fixed missing warnings when main module is a .txr file. - Fixed missing unbound variable/function warnings for unbound symbols that are the direct operands of [...] syntax. - Fixed wrong name being printed in trace messages, when trace is used to simultaneously enable tracing for two or more functions. - Windows: - Start menu shortcut now starts in user profile dir, rather than incorrectly in TXR standard library installation dir. TXR 172 2017-03-19 Features - Argument of umask function is optional - if omitted, function returns current umask. - OOP: - new static-slot-home function - reports the base class which actually defines a slot. - Sandboxing support: - New *package-alist* variable gives application control over what packages exist over a dynamic scope. - Makes possible safe evaluation of TXR Lisp code obtained as input from untrusted source. - Special behavior worked into exception handling to close a potential sandbox hole. - Tracing: - trace now canonicalizes a method name to the base class which defines a method and produces a warning if this is different from what was requested. - E.g. (trace (meth dog speak)) is issued, but dog just inherits (meth animal speak) which is what is actually traced. - warnings issued when traced functions are redefined. - Windows: - New icons, redesigned from scratch. - SVG logo now in source tree. Bugs - Parser fix in relation to new unbound reference dot syntax: now it may be a top-level expression, so entering .a.b.c into the REPL isn't a syntax error. - Missing documentation for opt function added. - Windows: - Fixes from Cygnal: - dir and shell fields in password structure returned by getpwent are Windows paths that make sense. - HOME environment variable has same value as USERPROFILE. - Fixes issue when Windows Vim is invoked out of txr, of Vim being confused by nonsensical HOME value. - Linenoise fix: Ctrl-X Ctr-E (edit in external editor) - Now temp file closed before spawning external editor. - Fixes issue of editor reporting that the file is in use by another application and not being able to save. - Fixes issue that Vim reports the file as readonly. TXR 171 2017-03-14 Features - New unbound referencing dot syntax: .a.b.c.d corresponding to (uref a b c d) macro operator - Produces a function which curries slot references, binding them to an object passed to it as argument. - Command line: - The argument - (dash) is no longer required to specify that standard input is to be scanned; it is default behavior. - TXR access from Lisp: - last two arguments are now optional in match-fun. - OOP: - new functions struct-from-args and struct-from-plist provide slightly simplified interfaces to make-struct. - A structure's print method can now return : (the colon symbol) to indicate that it declines printing, so the built-in structure printing takes place. - suppresed by -C 170 (or lower) compat option. - Sequences library: - new rmismatch function: compares tails of sequences and reports mismatching position as a negative value. - new functions starts-with and ends-with. - split, split*, partition, partition*: now allow negative indices. - previous behavior of ignoring negative indices can be selected using -C 170 (or lower). - TXR Pattern Language: - New directive @(mdo): "macro-time do": evaluates Lisp code immediately after being parsed and disappears from syntax tree. - New @(in-package) directive, allows pattern language files to succinctly express being in an alternative package. Bugs - Fixed spurious warnings about :vars set up in @(repeat) being unbound as well as the :counter variable in @(collect). - Fixed lack of macro-expansion on the init expression in @(collect :counter (var init)). - The TXR matcher now refuses to open input sources that are streams, or standard input default, for non-matching directives, in the same manner that file name sources are treated. Thus @(next s) (where s is a stream) not cause any input to be pulles from s until a matching directive is encountered. - match-fun: @(next) in the invoked pattern function now correctly switches to the first file in the list of files passed to match-fun. - Fixed numerous instances of improperly terminated formatted printing in the TXR internals (missing "nao" argument). TXR 170 2017-02-28 Features - Horizontal-mode @(throw) directive. - Horizontal @(block)...@(end) syntax. - Second argument of trunc function is now optional: (trunc -1.5) yields -1.0. - floor and ceil functions take optional second argument, which acts as a divisor: (floor 10 3) -> 3; (ceil 10 3) -> 4. - New round function: (round 0.7) -> 1; (round 3 4) -> 1; (round 1 3) -> 0. - New functions floor-rem, ceil-rem and round-rem. Bugs - Requirements for special interaction between @(accept) and @(next), function calls, and @(finally) have been identified and implemented. - Fixed segfault (C null pointer dereference) when nil symbol used to look up a struct slot. TXR 169 2017-02-11 Features - Improvements in area of warnings and deferrable warnings. - Representation of deferrable warnings changes; the defr-warning exception type derived from warning is used. - Awk macro: - Now provides a warning when a rng expression appears to refer to a local variable or function that is unreachable due to the code relocation. - New functions rassoc and rassql. Bugs - compile-warning function: added missing catch in compile-warning functionfor continuing after warning is handled. TXR 168 2017-02-05 Features - Mutation of lexical functions is forbidden and diagnosed. - e.g. (set (fun f) ...) when f is lexical. - Improved diagnostics during place expansion and when exceptions occur at macro-expansion time. - New function rlcp-tree. - New macro whena, complements ifa and conda. - Functions remq, remql, remqual, remove-if, keepq, keepql, keepqual and keep-if were rewritten and work more efficiently for vectors and strings. Bugs - Fixed an issue in the the expansion of Lisp-1 forms as places. - Fixed ocurrence of "expansion at nil" diagnostic in some error traces. - Fixed printing of unnecessary package prefix on symbols which are visible in the current package, but not interned in it. - Fixed rehome-sym not removing symbol from hidden list of destination package, as documetned. - Fixed broken keepql function. - Fixed bug in poll function: rejecting stdio-stream type objects as non-streams due to strict type check rather than subtype. TXR 167 2017-02-02 Features - New functions defer-warning and dump-deferred-warnings. - Awk macro: - small convenience: an input source given in :inputs can now be a list of strings, which the macro converts to a stream. - Tightening in syntax: - When floating-point tokens are followed by a period and a non-period character, this is now a "trailing junk" syntax error: SYNTAX OLD BEHAVIOR NEW BEHAVIOR 1.$ "trailing junk" error "trailing junk" error 1.0.$ (qref 1.0 $) "trailing junk" error 1.0.a (qref 1.0 a) "trailing junk" error 1.0.0 1.0 0.0 "trailing junk" error 1.1.<EOF> generic syntax error "trailing junk" error - Spliced symbols are diagnosed as "bad token" syntax errors SYNTAX OLD BEHAVIOR NEW BEHAVIOR :a:a :a :a "bad token" @a@a @a @a "bad token" usr:foo:bar usr:foo :bar "bad token" - These changes are not subject to -C option: code must be fixed if it contains these incorrect lexical forms. Bugs - The sort function now actually implements a stable sort over lists, as has been documented for a long time. - Missing autoload registrations for catch* and handle* added. - Parameter list macros now recognized in the parameter list of a catch clause. - Fixed incorrect printing of a symbol that is not visible in the current package due to being hidden by a like-named symbol: such as symbol must be printed with its package qualifier. - Fixed issue: Lisp files loaded from the command line were showing spurious undefined warnings that wouldn't appear if the same files were loaded with (load ...). TXR 166 2017-01-26 Features - Deferred warnings - System of deferred warnings implemented allowing forward references to functions, variables and anything else (extensible). - New error reporting convenience functions for macro writing: compile-error, compile-warning, compile-defr-warning. - A parameter list macro called :key is provided, allowing functions and macros to easily take keyword parameters. - New memp function for searching a property list. - New functions plist-to-alist and improper-plist-to-alist. - New macros catch* and handle* which provide catches and handlers access to the exception symbol. - Local macrolets established by the build macro such as add, pend, pend* and others are now functions. - Awk macro: - *stdin* now bound to current input stream. - new fname variable analogous to FILENAME. Bugs - Unbound functions diagnosed consistently between dotted (fun ... . x) forms and ordinary. - *stderr* bound on entry into the repl, so errors sent to *stderr* go to the repl's output stream. - Better error reporting for nonexistent base in defmeth. - Fixed broken supertype check in make-struct-type also affecting defstruct, a nonexistent base to be treated as if it were nil. - Fixed compound forms not being expanded in quasiliterals. This is a TXR 160 regression breaking `@(macro ...)` usage. - Muffle expansion-time warnings in op macro expander. - Fixed missing macro expansion of TXR Lisp forms in collect, coll, gather, output, and numerous other TXR directives. - doc: missing documentation for :var argument of @(next) written. - Fixed small ambguity issue in expansion of keyword args in @(repeat)/@(rep). - Fixed an expansion issue affecting output vars. - *package* subject to rebinding in @(load) just like in the Lisp load function. - Cleaned up sloppy expansion in braced variables. The argument of the :filter keyword isn't expanded. - Fixed poor expansion order of parameter list macros, and a related bug. - Fixed :whole and :form arguments in macro parameters lists not allowing destructuring (due to an exception being thrown at expansion time if their arguments are not bindable symbols). - Fixed init-forms of optional arguments being expanded in an incorrect macro environment, in which earlier arguments are not visible as they should be. - Fixed broken termination tests in take-while and take-until. - Fixed wrong form being taken as the to-be-destructured form in mac-param-bind. TXR 165 2017-01-10 Features - New Lisp concept: parameter list expander macros. - customize function behavior with attribute-like keywords which invoke custom expanders to transform bodies and parameter lists. - Throughout the TXR pattern language parser, checks against empty clauses have been eliminated. Empty clauses in numerous situations are not considered syntax errors. - The last variable in whilet can be omitted in the same way like in iflet and whenlet. Bugs - Fixed missing space between attribute keywords in the printed representation of a hash. - Windows native version picks up fix for Cygnal issue 15. TXR 164 2017-01-01 Features - Awk macro: new variable fw for delimiting records according to fixed field widths. - The last variable may now be omitted in the bindings list of iflet, whenlet and condlet, leaving just the controlling expression, not bound to a variable. - Various syntax checks over function and macro parameter lists, and variable bindings, have been moved out of run time and into expansion time. Bugs - Build: "make clean" now removes txr-win.exe - Fixed a lingering bug in the handling of special variables in parallel binding, not fixed in the work done in this area for the previous release. - Fixed a bug in the handling of optional-argument presence indicating arguments: not binding them dynamically when they are special variables. - Fixed inconsistency in the regex-source function: the source of the (compound "str") regex was reported as "str", which isn't the same thing when fed to the compiler. - Fixed completely broken quasi-quoting over #R range literal syntax. - Fixed a read/print consistency problem in quasiliterals. - Fixed a problem with catch operator form not being fixed-point stable under repeated passes through the expander. To fix the problem, catch has turned into a macro which expands to an internal sys:catch operator. TXR 163 2016-12-20 Features - New equot macro: quote after macro expansion. - CL compatibility: - New function endp. - New function mismatch. - New prog and prog* macros. - Signal handling: - If an async signal is caught and handled by Lisp code during gc, gc is canceled. - Allows recovery from segfault due to stack overflow during gc. - Exception handling: - New function find frames. - Awk macro: - New awk local macros -rng, rng- and -rng-, providing endpoint-exclusive variants of rng. - Redesigned binding of special variables. - Fixes subtle bugs - Reduces number of variable binding special forms. - Removes special var handling responsibility from binding special forms. Bugs - Method lookup doesn't throw on nonexistent slots. - Fixed find-max not handling interpreter literal strings. - Expansion bugfix in tagbody. TXR 162 2016-12-07 Features - Awk: - Awk prn macro is now a function: can be used as a functional argument - Regex: - New functions fr^$, fr^, fr$ and frr. Bugs - Awk: - fixed assignment to field list f not yielding the new value as a result, returning another object instead. - input processing loop containing no cond-action clauses was being elided, even if it contained :begin, :end, :beginfile or :endfile clauses which must be executed. - awk macro implicitly obtaining its input sources from the command line wasn't consuming the command line, causing problems when macro is used from the command line. - Syntax, input: - Fixed robustness issue in handling of out-of-range hex/octal character escapes. - This fixes a crash that could be triggered in the regex module by a regex containing out-of-range character escapes in a character class. - Stray debug printf removed from lexical analyzer. - Occurred only when diagnosing certain invalid floating-point syntax. - Fixed syntax error being reported when last item in a Lisp source file or :read paste in the REPL is an object erased with #; notation. - Syntax, output: - Fixed ^(a . ,b) being printed as ^(a sys:unquote b). - Fixed ^(,* a) and ^(, *a) both printing as ^(,*a). - Exceptions: - fixed handle macro's deviation from documented syntax. - subject to compat option. TXR 161 2016-11-28 Bugs - Regression: awk macro spews warnings. TXR 160 2016-11-27 Features - New hash table function clearhash. - TXR Lisp macro-expanding code walker now generates warnings about unbound variables and functions. - ignwarn macro provided for ignoring warnings. - macro-time macro now interleaves expansion and evaluation, so that the evaluation effects of forms occurring earlier in the macro-time form are visible to the macro-expansion-time of later forms. - New exception-subtype-map function for retrieving type symbol hiearchy. Bugs - Fixed numerous bugs in macro expander: - not including symbols in macro-time environment: - macrolet arguments - dohash key and value variables - function name in defun - the auxiliary Boolean parameters that can exist on optional parameters which indicate whether the optional argument is present. - not expanding: - mac-param-bind special forms at all. - wrongly traversing and expanding: - @var and @(expr) syntax - incorrectly expanding: - arguments of op using Lisp-2 expansion style rather than Lisp-1. - Fixed a number of library functions broken due to using nonexistent variables: test-inc macro, str-inaddr-net, str-inaddr6-net, - Fixed broken read-print consistency of quasiliterals. - example: `@@@a` would print as `@@a` which is a different object. - Fixed op and related macros not handling @rest in the dot position. - Fixed interaction between circular notation and hash literals. - literals denoting eql-based hash tables which contain themselves as keys now work. - literals denoting equal-based hash tables doing the same thing are not supported for now; they produce junk hash tables. - Build system: - Changes in 159 caused builds to fail on some systems unless lex was manually specified. - On some systems the $(LEX) make variable points to something which isn't GNU Flex compatible. - On some systems $(LEX) points to a nonexistent lex even if Flex is installed. TXR 159 2016-11-21 Features - Tweaks in generational GC. - Rounding out of package system with "fallback" concept. - TXR Lisp now has a tagbody macro. - Macro bindings now hold first-class functions. - Global macros have (macro <sym>) function names - symbol-function works with (macro <sym>). - Possible to (trace (macro <sym>)) to trace a macro. - Posible to (defun (macro <sym>) args body ...) to write a raw macro expander as a plain function. - func-get-name applied to global macro expander function calculates its (macro <sym>) name. - Trace macro now throws error if an undefined function occurs in the argument list. - The previously deprecated -b option has been revived and repurposed: - use "-b sym=obj" syntax to pre-define a Lisp variable. - Build system: - TXR now honors standard Make variables like CC and CFLAGS. Bugs - Fixed macro-expansion bug in which forms are expanded at macro time, to determine whether or not they are constant, wrongly using the global macro environment rather than the lexical one. TXR 158 2016-11-15 Features - OOP: - New feature: dirty flag bit on struct instances. Code can tell if any instance slots were modified since last time dirty flag was cleared. - Packages: - New in-package macro. Bugs - Interactive txr switches *package* to user package before entering the listener, in case the specified script file alters it. - Fixed broken bignum addition. - Fixed breakage in fixnum to bignum conversion affecting 64 bit targets. - Fixed invalid mutation of applied argument list, affecting some functions. Test case: [apply lcm (list 1)] mutates (1) to (nil). TXR 157 2016-11-14 Features - New #; syntax for commenting out Lisp object. - #: syntax for uninterned symbols now works as an input notation. - Packages: - Overhauled implementation with increased scope. - New *package* special variable holds current package. - New concepts in package system: foreign symbols, hidden symbols. - New functions: package-local-symbols, package-foreign-symbols, use-sym, unuse-sym, use-package, unuse-package, unintern. - New defpackage macro. - Improvements in Vim syntax coloring; don't forget to install new txr.vim and tl.vim files. - New convenience functions for file or process I/O in one call: file-get, file-put, file-append, file-get-string, file-put-string, file-append-string, file-get-lines, file-put-lines, file-append-lines, command-get, command-put, command-get-string, command-put-string, command-get-lines, and command-put-lines. Bugs - Fixed an infinite loop in the processing of syntactic places: regression introduced in 156. - Fixed bug in processing of nested syntactic places like [place arg] where the inner place is a macro. - Fixed regression in awk macro introduced in 156, related to the above bug: not being able to assign to a field as in (set [f 3] "foo"). The bug was there before, but the change suddenly removed the accidental circumstances which protected the awk macro from reproducing the problem. - Fixed some additional problems in circle printing, in the printing of package objects and and interpreted functions. - A few GC-unsafe mutations were found in the TXR kernel, by inspection, and fixed. No actual instability was reproduced. - Fixed a bug in the caseq, caseql and casequal macros: single-atom key values were being exposed to evaluation rather than taken as themselves. This behavior can still be obtained with the compatibility switch; but it is recommended to first see whether switching to one of the new case constructs caseq*, caseql* or casequal* is feasible. TXR 156 2016-11-05 Features - time-parse function defaults to epoch time. - new accessors nthlast and butlastn. - sub function is now an accessor. - last and butlast functions are accessors, and get optional index argument. - Awk macro: - now supports pipe/file redirection. - Function tracing support: trace, untrace macros, *trace-output* stream. - symbol-function accessor can refer to methods via (meth ...) syntax. - restrictions in dwim places relaxed: in (set [x y] z), x doesn't necessarily have to be a place. - OOP: - new lambda-set method can treat [obj ...] expressions as places when obj is a struct. - new slots function for getting complete list of slots of a struct type. - New neq, neql and nequal functions for negated equality tests: for all those times you hate writing (not (equal a b)). - New command-line argument processing library. - Improved printing of error location, and tracing locations across place expansions. Bugs - quasiquote now works properly over struct literals. - wrong return value of nthcdr place fixed. - fixed circular printer blocking unwinding. - tok-str semantics adjusted once again to eliminate spurious empty tokens in some situations. - fixed broken tok-where (regression). - fixed potential incorrect evaluation order in dwim places. - fixed bugs in circular printing that traverses hash tables and objects with print methods - *stdout* now flushed when processing unhandled exceptions, so that diagnostics sent to *stderr* appear properly ordered w.r.t. prior *stdout* output. TXR 155 2016-10-21 Features - Common-Lisp-style circle notation supported now both on input and output. - *print-circle* special variable now exists. - supported across print methods. - OOP: - print methods now take three arguments rather than two, and are called for readable and pretty printing, not only pretty printing. - env-fbind and env-vbind functions allow nil env argument to denote toplevel bindings; thus they can be used to bind global variables. Bugs - fixed regression: inability to work with places denoted by compounded referencing dot; e.g. (set a.b.c val) - fixed showstopper regression: inheritance of static slots causes assertion and crash at garbage collection time (while simply checking for a condition that is harmless in and of itself). - reduce-left: initial value pulled from the input list itself was not passed through key function. - fixed some places where a volatile qualifier on a local variable was missing, found by inspection: actual impact not determined. - Listener was sending error traces to *stderr* stream instead of the listener's configured output stream; that was causing confusing output sometimes. TXR 154 2016-10-15 Features - OOP: - Functions method and umethodk, and the macros meth and umeth, now take additional arguments which are curried into the method call. - Regex: - In the regex abstract syntax, the and and or operators are now n-ary, rather than being strictly binary. - New regex-from-trie function. - Listener: - New Ctrl-X Ctrl-P feature to paste the result of the previous evaluation into the current command line. - Time: - time struct supports gmtoff and zone fields, on systems where these are available in the C struct tm. - Hash tables: - the hash user data is now included in the printed notation for hash tables; thus, hash literals can specify user data. - new hash construction keyword :userdata supported alongside :equal-based and others, so hashes can be constructed with user data in various situations. - New function hash-userdata is an accessor (serves as a place); get-hash-userdata is deprecated. - Sockets: - address structures (sockaddr, sockaddr-in, sockaddr-in6, sockaddr-unix) now all have a family slot, so programs don't have to switch on the object type to map to a numeric address family. Bugs - Bugfix in argument handling affecting struct method calls. - Listener: - Fixed bug in Ctrl-X Enter (submit historic line and stay in history). - If the line being submitted is a duplicate, it would not submit the line, and the position in history wouldn't advance to the next. - OOP: - Fixed various situations in which abstract sequence objects (object supporting car, cdr and nullify methods) didn't work as expected. - for instance: length, sub and where functions. TXR 153 2016-10-07 Bugs - GC-related regression in static-slot-ensure fixed, affecting code which uses defmeth also, causing instability. - Fixed long-time GC-related issues in replace-struct and clear-struct which threaten stability. - Check for self-assignment in replace-struct. TXR 152 2016-10-04 Features - Licensing: - All license headers in source files reverted to BSD 2-Clause, not just the LICENSE file. - OOP: - Inheritance model for static slots has been revised. This is also a bugfix. - Range objects support a degree of arithmetic, and can be queried with zerop, length and empty. - Regexes: - Improvements in search-regex function and functions based on it: support for negative indices and more. - New rr function: regex search which returns a range, like range-regex, but better interface for currying. - New rra function: return all regex matches as range objects. - Awk macro: - New convenience clauses :set and :set-file, to reduce the verbosity of (:begin (set fs ":" ofs ":")). to just (:set fs ":" ofs ":"). Bugs - Interactive listener: - VT100 arrow key can be issued after Ctrl-X extended mode prefix: cancels the Ctrl-X and is carried out. - OOP: - New static slot inheritance model fixes issues like method redefinition with (defmeth ...) inappropriately clobbering overridden derived methods differing from the original method being redefined. TXR 151 2016-09-27 Features - Licensing: - TXR returns to unmodified BSD 2-Clause - Better code generation for simple cases of place mutation. - Regex facelift: - regex objects are callable like functions. - Support for negative start or end positions in regex matching operations. - regsub function takes functional argument for more flexibility. - Numerous new convenience regex functions: m^, m$, m^$, r^, r$, r^$, f^, f$ and f^$. - these simulate full matching and anchoring in various situations. - New regex-source function, for obtaining a regex's original AST. - Awk macro: - conditions in cond-action clauses and in (rng start-cond end-cond) expressions can be functions or regular expressions, which are invoked on the record. - New fconv conversions: iz, rz and others which yield a zero value for empty, nonexistent or junk fields. - orec variable provides access to original record, useful when rec has been modified. - rs variable can be dynamically changed now, taking effect for the next record. - paragraph mode implemented based on POSIX description and observations of GNU Awk behavior. - Library: - New functions tointz and tofloatz. - New build macro for procedural list building. - New *load-path* special variable replaces the self-load-path symbol macro (which still exists but simply expands to *load-path*). - load is now a function rather than macro. - @(load)/@(include) directives now pull parent path from *load-path* variable, rather than own source location. - loading uses stricter criteria for deciding what relative paths are automatically resolved relative to *load-path*. - Streams: - New strlist input streams: treat a list of strings as multi-line text stream. Bugs - Awk macro: - fixed broken updating assignments to awk variables, such as (push item f). - awk now exits if there are no cond-action clauses. - Regex: - match-regex function now returns match length as documented. - Broken return value of match-regst fixed. - Type of a regex object is now regex, rather than sys:regex. - Exception in pretty-printing a correct expression, due to bug in handling the & operator. - Lists: - out-of-range negative indices over lists now yield nil rather than the first item. - Command line: - -Dvar=val binding are now visible to Lisp files. TXR 150 2016-09-18 Features - Awk macro: - New ft variable to optionally specify field tokenization as alternative to field separation via fs. - New kfs variable to arrange for field separators to be retained and represented as fields. - New krs variable to keep record separator matched by rs as part of record. - New fconv operator for succinct and flexible conversion of awk fields. - Don't rebind *output* if :output clause not specified. - New place-mutating macro: upd. - New keepq, keepql and keepqual functions. - Functions remq, remql and remqual take key argument. - split-str take boolean arg to keep separators, like tok-str. Bugs - Fixed incorrect behavior of functionsremq, remql, remqual, remove_if, and keep_if on strings. - Fixed broken regex complement operator. - Fixed broken while* and until* macro expanders. - Fixed bugs in split-str and tok-str. - Windows: - TXR's standard input, output and error will now be text streams, CR-LF externally. - This comes from a fix in the Cygnal library being picked up into the installer package. - Interactive mode uses USERPROFILE env variable for location of home directory for edit-in-editor feature. TXR 149 2016-09-12 Features - Implementation of Awk paradigm in Lisp syntax, in the form of awk macro. - TXR programs can now integrate the strategies used in Awk as part of their logic. - Awk one-liners from the command line possible. - New place-mutating operators: - pinc and pdec provide post-increment and post-decrement. - test-set, test-clear and compare-swap provide a conditional update of a place with useful return value. - test-inc and test-dec provide increment combined with a test of the value. - New slet and alet macros - companions to rlet, providing more aggressive ways than rlet for eliminating unnecessary temporary variables in macro expansions. - Change in trim-str function: what it considers whitespace. - Doc improvements: - Formatting problems. - Table of contents display issue under Chrome web browser. - meta-keywords now italicized in nroff man page output, allowing them to be colorized via customizing the less pager. Bugs - Fixed regression: @(rep) wrongly complains about an empty clause when it's not in fact empty. - Workaround: use @(coll) or add parameters inside @(rep). - Fixed bug in nthcdr defplace: not obtaining macro environment in valid way, breaking the test whether the list argument is a place. - Fixed symbol macros not being expanded in the X position of (set [X i] Y) and related situations. - Fixed semantic issue in the expansion of place macros. - Place macro calls are put only through at most one round of regular macro-expansion before being tested again for place macro expansion. - This allows macros to produce place macro calls. - Changed order of calls to :postinit handlers in struct instantiation: base first, then derived. TXR 148 2016-09-01 Features - time-parse function - time-string and time-parse methods on time struct - optimization added to quasiquote expander to generate better code. Bugs - Broken defvarl and defparml marking variables special, thus behaving like defvar and defparm, respectively. - Put limit on numeric range of @<num> arguments in op/do syntax, because this generates huge formal parameter lists. Found by AFL(fast) fuzzing tool. - Fixed generation of huge lists by trivial cases of nested quasiquote like ^^^^^^^^^^x. Found by AFL(fast) fuzzing tool. - Fixed runaway recursion that can occur in lazy struct initialization when cycles are present. - Fixed broken Lisp macro expansion in @(if) and output-side @(repeat) directives. - Rewrote poor, incorrect documentation of @(merge) directive. TXR 147 2016-08-12 Features - 64 bit Windows/Cygwin port. Bugs - Fixed native Windows TXR trying to use HOME environment variable when run from Cygwin. TXR 146 2016-07-20 Features - Time and space optimizations in execution of NFA regexes. - POSIX uname function exposed. - Print syntax which looks like their read syntax implemented for quasistrings and quasi-word-list literals. - Windows version ships with Cygnal 2.5.1.99 for better windows native support. Bugs - Text streams are not open with stdio "t" mode on Cygwin. This was a mistaken change present in 144 and 145. TXR 145 2016-07-03 Features - The Windows installer version of TXR is now packaged with the Cygnal DLL, which is the result of a new project: http://www.kyheku.com/cygnal. Bugs - Fixed crash in getaddrinfo when host is not found. - Issues in Windows version fixed by Cygnal project: - Fixed unwanted console window suddenly popping up when the console-less txr-win spawns a process. - Command spawning (sh function, open-command) doesn't require sh.exe shim executable any longer to switch to cmd.exe. - Fixed issue of messed up REPL display in multi-line mode, when lines reach the right edge of the display. TXR 144 2016-06-29 Features - TXR bids adieu to MinGW: the MinGW-based port to Windows is dropped. - Now that Cygwin is under the LGPL, the installer-based TXR for Windows is based on the Cygwin version of TXR, and includes all the required DLL's. - The benefits are great: the Cygwin port of TXR is much less crippled, thanks to the excellent POSIX support in Cygwin. - The interactive listener now works! - Improvements in the support for treating structs as sequences. - New --free-all command line option to get TXR to free all malloced memory before exiting. - Improved semantics of makunbound function: more similar to Common Lisp. - @(collect)/@(coll) take a :counter parameter now, with an optional starting value, for more streamlined enumeration of collected values. - Most TXR-style expression evaluation in the pattern language replaced by Lisp evaluation, reducing the need for @ noise. - Improved Valgrind support in garbage collector: Valgrind backtraces can be printed for interesting objects. Bugs: - Regression fix: @(catch) and @(finally) clauses can be empty once again. - Various memory leaks fixed: in handling of bignums, in syslog streams, dgram sockets and in the Lisp parser object. - Fixed out of bounds memory access in bit function. - Fixed broken (del (symbol-value 'sym)). - defsymacro removes existing special marking from symbol. - Fixed potential crash caused by bogus stray code in the GC marking function for syslog streams. - Fixed possible object leak in GC by managing free list in more disciplined way. TXR 143 2016-06-04 Features - Structs: - Structures can now support custom pretty-printing via a print method. - car, cdr, nullify, and from-list methods on structures allow them to behave as if they were sequences. - TXR Pattern language: - The "!command" and "$dir" convention for opening command pipe and directory steams has been removed: this will not be recognized on the command line or the @(next) or @(output) directives. - The "-" convention for denoting standard input is now only available from the command line, not from the @(next) or @(output) directives. - @(output) now evaluates the destination as a Lisp expression; no need to use the @ escape. - @(repeat) sees variables in more places: - In the output variable syntax @{a b [c..d]}, if b, c and d are variables, they are recognized by the directive and treated accordingly. - Previously @(repeat) would know about a, but have to be informed about the others via :vars (b c d). TXR 142 2016-05-29 Features - The remove-path funtion takes additional Boolean argument to suppress exception. - Better reporting of expansion locations across expansions of the op, do and related macros. - Support for deploying stand-alone executables. - Optimizations in hashing. - Support for byte-oriented stream operation instead of UTF-8 decoding. Bugs - Bugfix in clumped option processing: test case -B-c. - Uses of POSIX sleep function were removed. These occurred in tail streams implementation. This function can interact with the SIGALRM signal. - Fixed broken argument defaulting in take-until function. - Fixed regression from TXR 42 (!) in pattern function argument passing. This bug has evaded detection for 100 public releases, over 4.5 years. - Added support for adherence to ISO C rules regarding switching between input and output operations on update streams, hiding this issue from TXR programs. This seems to be needed on all tested platforms other than the GNU C library. TXR 141 2016-05-20 Features - Support for Unix terminal handling (termios). - New functions at-exit-call and at-exit-do-not-call, for registering actions to take when process exits. - New self-load-path symbol macro, allowing code to interpolate its load location. - Interactive listener now supports two behavioral styles of visual selection, controlled by new *listener-sel-inclusive-p* variable. Bugs - Incorrect argument defaulting in record-adapter function. - Incorrect argument handling in - and / functions, triggering error in [[flipargs -] 2 1] - Fixed gc-related bug in structs. - Fixed gc-related bug in recent cons recycling optimization. TXR 140 2016-05-08 Features - New fixnum-min and fixnum-max variables. - Improvements in pseudo-random number generator. - TXR extraction language: - New @(call fun ...) directive provides indirection on pattern functions, via symbols. - Unix security: - added setgroups, getresuid, getresgid, setresuid and setresgid where available. - added the setgroups function, where available. - added support for setgid operation. - New --rexec option to help with setuid on some platforms. - Process execution: - The standard input, output and error descriptors of subprocesses are now derived from the current *stdin*, *stdout* and *stderr* streams, making useful redirection tricks possible. - TXR now correctly calculates its sysroot even if the executable is renamed (within the same directory). - New filesystem access testing functions: path-readable-to-me-p, path-read-writable-to-me-p, path-strictly-private-to-me-p. Bugs - Serious bug fixed in bignum integers: incorrect treatment of negative values at the boundary between fixnum and bignum. - Fixed issue of TXR binary requiring an executable stack on GNU/Linux platforms. - Fixed broken setuid privilege dropping. - Bugfix in path-writable-to-me function. - Fixes in Vim syntax highlighting definition. - self-path, *args* and *args-full* now have bindings in the listener. TXR 139 2016-04-23 Features - Change of rules regarding Lisp variable visibility in TXR Pattern language. - unget-char now allows more than one character of pushback. - The POSIX fnmatch function is now available. - Rules used by object printer for deciding which character objects and string constituent characters to print using hex escapes have been harmonized together, with some changes to both. - path-private-to-me function avoids making unnecessary call to getgrgid, which is somewhat heavy-weight. - A list can now be passed as the path argument to the ftw function; it will recurse over it. Bugs - Issue of certain macros not expanding in @(output) blocks. - Macro not expanding as argument of @(if) directive. - Newline not being allowed in string fed to regex-parse. - Broken unget-char operation over string input streams. - Rewrite of horribly broken read-until-match function, which also fixes broken record streams feature (record-adapter function). - Fixed optional argument in get-string not defaulting properly. - Out of range character escapes are diagnosed better. - regex-parse was silently returning nil upon syntax errors; now throws exception. - regex-parse was not handling non-UTF-8 bytes in the string: are now mapped to U+DCXX block now and incorporated as literal characters. - Numerous memory leaks fixed which could occur in various functions if a type mismatch exception occurs after some local resource has already been allocated. TXR 138 2016-04-16 Features - New accessor sock-set-peer, and sock-peer becomes an accessor so (set (sock-peer sock) addr) is possible. - Allows "soft connected" datagram sockets: - send to different destinations with same socket by altering sock-peer address. - Dot position in function calls is now defined in terms of transformation to apply: - dot position expr can now be a symbol macro. - value of dot position is no longer applied as a list of arguments if it is a non-list sequence. - Better tracking of form expansion origins, leading to improvement in error diagnostics. - New fmt function for terse formatting to a string, shorthand for (format nil ...). - New open-socket-pair function, providing access to socketpair. - proper-listp function now known as proper-list-p. - old name still there, but deprecated. - New obtain* and obtain*-block macros. - New ftw function for fire tree walking, providing access to POSIX nftw. Bugs - Fixed issue in the UTF-8 encoding of Unicode strings, which TXR uses when calling API's that require char * strings: - U+DC00 pseudo-null produces the NUL character, which appears to terminate the char * string even if more characters follow, which is a problem. - Now, if U+DC00 occurs in a string that is being converted to UTF-8, an exception is thrown. - "Abstract" UNIX socket addresses properly supported on Linux. - defstruct: - now diagnoses use of nonexistent struct as supertype. - also fixed some minor diagnostic issues in defstruct. - symbol macros: - replacement forms were wrongly being expanded at bind time, and then possibly again at sustitution time. - now replacement forms are only macro-expanded during substitution. - glob function: - error callback hardened against continuation capture, absconding exits and re-entry of glob. - non-local exits allowed from error callback. - possible memory leak fixed. - Access to lib-version variable wasn't triggering its auto-load. - Fixed broken argument handling in umethod, also affecting umeth macro. - Invalid open mode strings in socket functions now diagnosed. - Fixed broken error handling in datagram case of sock-accept. - Source files processed by the load function, @(load) directive or by invocation of txr are now closed immediately after parsing. - TXR language: - fixed bug in data source opening logic leading to a mishandling of a case like @(bind x "a")text at top of script. TXR 137 2016-03-30 Features - Heads up: @(if) directive changes semantics. - no longer a syntactic sugar for @(cases)/@(require). - Rightmost-match variants added for various search functions: rfind, rpos, rmember and numerous others. - New macro lset for assigning consecutive elements of a sequence to multiple places. Bugs - Fix in lazy string implementation: - printing lazy string was not observing the string's limit - see limit-count param in lazy-str function. - Fix in error location reporting across macro expansions. TXR 136 2016-03-20 Features - I/O stream mode handling improvements: - "i" interactive mode specifies line buffering - New "l" and "u" mode letters for specifying line buffered and unbuffered mode on streams. - Decimal digit character in mode string specifies stream buffer size as a binary exponent with implicit 1024 multiplier. - Mode strings have a more permissive syntax; everything is optional with defaulting based on stream type. - Sockets: - sock-connect returns socket instead of useless t value. - New functions sock-recv-timeout and sock-send-timeout for setting the timeout options on socket. - I/O timeouts throw exception of type timeout-error - sock-connect and sock-accept have new parameter for timing out. - socket open mode is r+b by default, not r+. - TXR Extraction Language: - @(output) destination can be a stream object now - @(repeat) and @(rep) can now bind new variables, via extension to :vars syntax and semantics. Bugs - unget-byte sets errno to zero to avoid false errno association with failure. - Bugfix in @(repeat)/@(rep) internals: destructive manipulation of lists. - Tail streams honor all aspects of mode for re-opened stdio streams. TXR 135 2016-03-10 Features - The umask function is now provided. - Special new stream type for datagram sockets, allowing datagram programming to be very similar to and in some cases identical to stream socket programming. - A nil value in setenv now does unsetenv. - Improvements in sockets: - printed representation of sockets. - error messages. - error handling. Bugs - The get-string function closing a stream when told not to via a nil value of the close-after-p optional argument. - The setenv function had a similar bug, ignoring the overwrite-p optional argument being passed as nil. - Fixed cases of an incorrect error string from file streams returned by get-error-string. - Fixed gc-related instability caused by mishandling a field in an internal parser structure with regard to the ephemeral gc rules. TXR 134 2016-03-01 Features - Unhandled exceptions now unwind; so programs which terminate due to an unhandled exception have their cleanup performed. - Setuid support: - A setuid TXR executable supports setuid TXR scripts, even if the underlying OS doesn't allow setuid scripts. - When not running a setuid script, the setuid TXR executable drops privileges early in its execution, reducing the risk that it can be exploited. - New --eargs option, allows script name to be embedded among options in a hash bang line. - Networking support: TXR now supports IPv4, IPv6 and Unix socket communication. - Useful @(next nil) variant of @(next) directive to suppress unwanted treatment of a command line argument as a data source. - New functions expand-left and nexpand-left. Bugs - Expressions in @(require) were not being evaluated in the correct context. - Fixed destructive append behavior in append-each. TXR 133 2016-01-21 Features - New function, split*; like split* but keep empty pieces. - New function random-state-get-vec to get vector representation of random state. - vec-list now takes sequences as inputs, not just lists. - New functions base64-encode and base64-decode. Bugs - Bug in env-hash with values containing equal sign. - Bugfixes in partition* function. - More robust handling of invalid modulus values in rand and random. - Internal fixes in rand and random. - Serious regression in get-char on string input streams. - Missing syntax highlighting for some TXR symbols. - Bug in signal handling (synchronizing cached signal mask with OS signal mask) causing signals to be ignored after jumping out of a signal handling lambda with a dynamic control transfer. TXR 132 2016-01-16 Features - Unix crypt function exposed. - The identity function gets an alias named "use", for a readability improvement in certain functional coding scenarios. - The / function becomes n-ary, allowing forms like (/ 12 3 4). - New :mandatory keyword in until/last clauses, makes them a required match. Bugs - Fixed lack of location info for unbound variable error in dohash. - *print-flo-format* variable was affecting output of integers. - @(gather :vars ()) was behaving the same as @(gather); that is, as if :vars wasn't specified at all. TXR 131 2016-01-13 Bugs - Configuration with --valgrind now builds again. - Invalid lazy string optimization introduced in TXR 118 has been re-worked. This affects the conformance of the @(freeform) directive to documentation. - When a macro declines to perform an expansion by returning the :form, the form was recorded as its own macro ancestor; now, nothing is recorded. - Fixed issues in how regex objects are printed: - Control characters and certain other characters were being dumped literally. - Now certain characters like newline print using the escape codes like

. - Other control characters, as well as U+7F (ASCII DEL) and characters in the U+DCXX surrogate range are printed as hex codes. - [ and ] in a character class are properly escaped. - Fixed issue in string literals: semicolon character effectively disappearing after control character that is converted to hex escape. TXR 130 2016-01-05 Features - Interactive listener: - New Ctrl-X Enter command: submit line, but stay in history and advance forward by one line. - I/O: - New record-adapter function creates a "stream adapter" virtual stream object based on an existing stream. - The adapter changes the semantics of get-line to support delimiting of records via a regular expression (which is stored in the adapter), rather than the newline character. - With this, TXR can now process streams delimited in alternative was as if they were line-oriented. - New read-until-match function: extract characters from a stream, accumulated into a string, until a match for a regex occurs in that stream, and discard the match. - OOP: - In defstruct, function slots now initialized before other static slots regardless of order of specifiers. - Library: - New chr-digit and chr-xdigit functions: like chr-isdigit and chr-isxdigit, but returning the digit value instead of the t symbol. Bugs - Interactive listener: - Fixed recent regression in Tab completion: missing completion on special operators and macros. - Fixed Ctrl-X commands not recognized in a history search. - OOP: - Access to static slots of a lazy struct was triggering instantiation; this is fixed. - Library: - Recent change in chr-isdigit and chr-isxdigit return value semantics has been reverted, due to potentially breaking code which relies on (eql (chr-isdigit #\0) (chr-isdigit #\1)). TXR 129 2015-12-30 Features - TXR pattern language: - @(line) directive now works in horizontal mode - New @(data) and @(name) directives for capturing/matching raw data, and name of data source. - :counter in @(repeat)/@(rep) can now be given a starting value. - Quasiliterals in the pattern language are now evaluated as Lisp quasiliterals. - the compatibility mechanism provides the previous evaluation mode. - The same applies to @(output): variables now follow Lisp rules, similarly to variables in quasiliterals. - @(repeat) and @(rep) now "see" Lisp globals; no need to list these using :vars. - Lisp library: - chr-isdigit and chr-isxdigit now return the integer digit value when the test is true, rather than just t. - Object printing: - Lazy strings are now printed in a reasonable way, not shortened to the #<lazy-string ...> notation. - New special variales for global control over how floating-point objects are rendered: *print-flo-format* and *print-fo-format*. - OOP: - with-slots macro added. - Yet improved location and macro ancestry tracing in unhandled exception diagnostics. Bugs - Vim syntax highlighting files: fixed regression in genvim.txr causing missing identifiers. - Four-year-old bug in @(collect)/@(coll) fixed, causing the @(last)/@(until) clauses to be evaluated with an empty list of variable bindings whenever the main clause fails. - Fixed exception in @(freeform) directive when scanning from an interactive input stream. - Bugfixes in pattern language debug tracing (-v). TXR 128 2015-12-19 Features - Further refinement of function and macro coexistence: - symbol-function, fboundp and fmakunbound operate only on function binding. - new symbol-macro function. - The :whole and :form parameters now accept a destructuring parameter list as their argument, no longer insisting on nothing but a symbol. - OOP: - defstruct now supports a :postinit slot specifier, which allows additional actions to be taken after an object is constructed, and the slots are fully initialized. - make-struct-type has a new argument related to the above change: a <postinitfun> function. - Place manipulation macros now propagate ancestry information from the place forms on which they operate to the generate place-accessing operations, as if those operations were macro-expansions of the places. (Which they are not, at least not exactly). The benefit is that errors in those place access operations can consequently be traced to the original place forms, for more meaningful diagnosis. - dot notation like a.b.c now prints back as a.b.c rather than (qref a b c). - Doc: - HTML section numbers are now hyperlinks which jump back to the right place in the table of contents. - On jump-back, the table of contents expands sufficiently to reveal the target entry, if that is not already showing. Bugs - Fixed incorrect behavior of (replace seq val nil), also affecting replace-list, replace-vec and replace-str. The nil was wrongly treated as as a zero <from> argument (acting in complement to a missing <to> denoting the end of seq), instead of an empty <idx-list>. - Fixed broken assignment to [h x] when h is a hash and x is a vector or list. - Fixed dot syntax like a.b not recording source location info into the (qref ...) form when its constituents are atoms, such as symbols. - Fixed neglect to propagate macro ancestry information across non-macro code transformations. - Fixed situations in which the debugger fails to report the source file and line number. - Fixed annoying debugger behavior of stepping through the macro expansion time evaluations of a query by making that behavior subject to a new option (--debug-expansions). Debugger will now stop on the first line of the TXR language query like it used to. TXR 127 2015-12-10 Features - OOP: - defun can define methods now, using a compound naming syntax, as alternative to defmeth. - func-get-name function works on methods and produces compound name. - defmeth returns compound name, and so does defun when defining a method. - improved semantics in static-slot-ensure - Large file support: TXR now uses 64 bit file offsets in functions like seek-stream and truncate on Linux platforms where this is a compile-time switch. - regex-range now returns a range object. - Macros: - Improvements in macro expansion tracing for unhandled exceptions, or those caught in the REPL. - New macro-ancestor function for programmatically retrieving the form from which a given form was derived by macro expansion. - New mboundp and mmakunbound functions for inquiring about and removing a global operator macro binding. - Global operator macros can now coexist with functions of the same name. - Doc: - HTML man page now has a collapsible table of contents, thanks to Javascript embedded in the document. - Sections have been reorganized. - Smattering of corrections. Bugs - Fixed new struct types failing to inherit static slots that were added to ancestor types using implicit or explicit use of ensure-static-slot (such as methods defined outside of defstruct). - Fixes to the anaphoric ifa macro: the condition can be a dwim form, and with special handling. - Fixed incorrectly implemented less comparison for range objects. - Fixed crash in get-line when invoked on a closed file stream. - Fixed ftruncate not being detected and used on Solaris. TXR 126 2015-11-29 Features - New functions window-map and window-mappend for filtering sequences with a sliding window context surrounding the current element. - New macro define-accessor for easily extending functions to be accessors (supporting assignment). - Diagnostics for unhandled exceptions, and those caught in the REPL, now include a detail trace of the macro-expansion which created the form in which they originate. - Increased stack size on Windows (MinGW and Cygwin). Bugs - Regression in super function: when called with a struct instance, was returning its type rather than supertype. - Incorrect behavior (failure) in split and partition functions when index argument is a function, and returns nil. - Fixed regression in transpose function, causing it to be destructive. - Fixed sethash: it was returning a boolean rather than the stored value, as documented. - Improved clarity of error messages which identify destructuring mismatches in macro calls and macro-like binding constructs. - Fixed poorly informative diagnostic when defmeth is used on a nonexistent struct type. TXR 125 2015-11-20 Features - OOP improvements: - New uslot function and usl macro for functional indirection on struct slots. - New functors feature: define a lambda method for struct types which lets structs be invokd as function. - Lazy structs feature: - New lnew macro (and make-lazy-struct function) for lazily instantiating a new structure. - Self-referential, and mutually referential structures can be instantiated in one step using the existing mlet and lnew. - New Equality Substitution feature: - An equal method defined on a struct type allows objects to to be compared with equal or less, and to be hashed with hash-equal (and thus :equal-based hash tables). - The method simply returns an object which is used in place of the struct for the purpose of the comparison or hash. - TXR Extraction Language: - @(rep) now available as shorthand for @(coll :vars nil) - In @(next source), source can be a Lisp expression without leading @. - :to_html and :from_html filters now called :tohml and :fromhtml; old names will continue to work. - :tohtml filter now also translates ' (ASCII 39 apostrophe) to '. - New :tohtml* filter, leaves quotes alone. - New butlast function. - New html-encode* function. - The last function is generic now, applying to strings and vectors. - New TXR_COMPAT environment variable, alternative to -C option. Bugs - Fixed missing autoload registration for meth, umeth and defmeth symbols. - Fixed spurious retention issues in various library functions like mapdo, preventing them from processing lazy lists in constant memory. - Fixed type hole in the equal function, which treated two COBJ objects of different types using a comparison function which assumes they are both of the same type. - Fixed buggy less function, which was comparing and ranking objects that should not be comparable according to the documentation. TXR 124 2015-11-14 Features - New iread function for reading an object from a stream in an interactive-friendly way. - Median-of-three pivot selection added to quicksort to avoid degenerate cases. - Scoping rule for implicit nil block in the for operator has changed: the block now surrounds the variable initialization forms. - New block* operator and functions return* and sys:abscond*, which allow blocks to be defined and referenced using symbols computed at run-time. - New function group-reduce for flexible decimation of a sequence to a hash table. - The (rcons x y) syntax is printed as x..y now. - nreverse handles strings and vectors now, and reverses them in place. - reverse handles vectors and strings in more efficient way, and can reverse lazy strings. - Functions revappend and nreconc added. - New *print-flo-precision* special variable for controlling precision applied when printing floating point objects. - New *print-base* special variable for controlling base in which integer objects are printed. (Only binary, octal, decimal and hex are supported.) Bugs - Fixed object printer throwing exceptions when meeting unexpected syntax in forms that have special printed notation like quote and whatnot. The correct behavior is to avoid the notation and print the raw syntax. - Fixed ~o format specifier, broken with respect to bignum operands in TXR 120, when ~b was introduced. TXR 123 2015-11-06 Bugs - Fixed regression introduced in TXR 115, in the search_regex function and functionality built on it. TXR 122 2015-11-05 Features - New type: range. - range is similar to a cons cell, but is an atom. - has two fields called from and to. - the dotdot syntax a..b now produces a range, not a cons. - printed notation looks like #R(0 10) - related functions: rcons, rangep, from, to. - sys:capture-cont API altered to call/cc style: passes continuation to specified function when capturing, returns value when resuming. - New interface to delimited continuations: suspend macro. - TXR pattern variables now appear dynamic to embedded Lisp expressions, rather than lexical. The scoping rule is documented. - The yield and yield-from operators can omit the argument form, in which case they retrieve the value passed in from the resume function without yielding an item. - Architecture support: Power PC 64. TXR 121 2015-10-30 Features - TXR Lisp now has delimited continuations. - easy to use via obtain/yield macro operators. - New function truncate-stream for truncating files. - Reduced stack usage on glibc systems by shrinking unwind frames, achieved by replacing the 128 byte wide sigset_t type with a much smaller type. - The way place macros are expanded has improved, making them more useful. - Macro parameter lists have a :form keyword now for capturing the whole form. Bugs - Implemented missing second argument of zap macro. - Assignment to *listener-hist-len* in ~/.txr_profile was not correctly taking effect prior to loading history, causing truncation to 100 lines. - Fixed typo causing with-hash-iter macro not to autoload. - Fixed crash in hash-next. TXR 120 2015-10-18 Features - Structs: - Finalizers (specified by :fini) are now registered early in the object initialization (at a given inheritance level). This allows finalizers to clean up abandoned initializations. - If initialization of a struct is abandoned, the finalizers are invoked immediately, as part of unwinding. - New defmeth macro for defining methods outside of a defstruct. - New static-slot-ensure function for adding a new static slot to a struct (and its inheritance descendants). - static-slot and static-slot-set can take struct type name in place of struct type. - New functions hash-begin and hash-next, for iterating hash table, and with-hash-iter macro. - Listener: - TXR now launches listener if no arguments are given. - Exceptions: - New way of handling exceptions without unwinding: handler-bind and handle operators. - Introspection over exception frames: get-frames and find-frame functions can inquire about frames, and invoke-catch can transfer control to a chosen catch frame. - New ~b conversion specifier in format function for printing integers in binary. - The typecase macro has been added, similar to Common Lisp's. - Some functions have been renamed for consistency, but remain available under old names: list-vector -> list-vec, vector-list -> vec->list, chr-num -> chr-int, num-chr -> int-chr. - The sh function isn't implemented using the C library function system any more. Bugs - Fixed use of nonexistent functions in error handling cases of defstruct macro. - Fixed bug in the overflow check in the chk_grow_vec function, used by string-extend, the get-line function of many stream types, and string output streams. - Fixed unterminated format argument list issue affecting interactive listener. (Reproduced on Mac OS/X). TXR 119 2015-10-10 Features - Interactive listener: - New Ctrl-X Ctrl-R to insert entire previous line. - Word/Atom from previous line works relative to recalled history line. - New Ctrl-X Tab for substring-searching completion. - Empty loops can be interrupted by signals: (for () () ()) is now interruptible at the interactive prompt. - New umethod and umeth function for indirecting on a method in a way that is detached from an object instance. - Boa construction of structures can have optional arguments now. - copy and copy-str now copy lazy strings as lazy strings, rather than forcing to regular string. - New functions for sequence manipulation: take, take-while, take-until, drop, drop-while, drop-until. - New function ginterate for lazy generation which includes the terminating item. - New function expand-right for lazily generating a sequence in a roughly opposite way to a reduce-right reduction. - New function call-finalizers for explicitly invoking and clearing the registered GC finalizers for an object. - New functions clear-struct and reset-struct for clearing all slots of a structure to nil, or reinitializing a struct to default values, respective. - New function replace-struct for changing and slot contents and type of a struct to match an example object. - Missing promisep function added to test whether an object is a promise created by the delay macro. - New defex macro, to define exception subtype relationships out of TXR Lisp. (Previously available only in the TXR pattern language). - Also useful surrounding functions: exception-subtype-p, register-exception-subtype. - New macros for working with streams in lexical scopes: with-out-string-stream, with-out-strlist-stream with-in-string-stream, with-in-string-byte-stream, with-stream. - New with-objects macro for scoped finalization of objects, somewhat like destruction in C++. - Vim syntax highlighting file sets "lispwords" option for more accurate indentation of TXR Lisp. Bugs - Fixed symbol-function throwing error on builtin macros. - macro-time is now special-operator-p. - Named block around bodies of methods and functions declared in defstruct. - slot-p renamed to slotp (old name supported in compatibility mode). - Bug in structure initialization: boa arguments were applied first, before other initialiations, rather than last. - The conses function works on vectors and strings. TXR 118 2015-10-01 Features - Interactive listener: - Parentheses matching jump (Ctrl-]) now finds the closest parenthesis, bracket or brace if the cursor isn't on one already. - Tab completion recognizes .( and (( context in front of symbol being completed, and doesn't restrict to function names. - Parenthesis-matching "jump" is now performed on backspace also, if cursor lands on or next to a parenthesis. - Ctrl-A and Ctrl-E (or Home and End) keys have now have a useful behavior in multi-line mode, allowing a jump to the start/end of the current line as well as start/end of the edit buffer. - Optimizations in regular expressions: - In particular, prefix matches involving the complement operator now indicate termination rather than wastefully consuming the remainder of the string. - Algebraic reductions performed on regexes. In some cases, these reduce an expression which contains exotic operators such that it can be compiled to NFA. - Structures: - Structures can now have static slots: slots shared among all instances of the same type (but not other types, not even derived types). - Static slots are now the preferred the basis for implementing functions and methods. - The defstruct syntax has a richer syntax which lets static slots be expressed, as well as methods. - Construction and finalization code can be specified in defstruct. - Many new functions related to structures. - Optimization in lazy strings: forcing lazy strings is more efficient. - String input streams do not force lazy strings now. - The "matches nothing" regular expression represented in the abstract syntax by the object t now handled by regex printer, and rendered as []. Bugs - Fixed a silly delete-previous-word behavior in multi-line mode: not treating the line-break as a whitespace character that separates words. - Fixed various problems in screen update and cursor positioning behavior in interactive listener, affecting multi-line mode. - Fixed two bugs in the ifa/conda macros. - The return and return-from operators do not abort TXR when a label is not found, but properly throw an exception. - Garbage collection: if GC is triggered in response to a malloc delta, a full GC is now performed. This prevents runaway memory allocation behavior in code which manipulates large arrays, strings or integers. - Fixed strangely compounded error message issued in the situation that unbound variables occur in the TXR pattern language. - Various "internal error" situations in the regex module now throw exceptions. Consequently, TXR will not die if a bad abstract syntax tree is passed to the regex compiler. - Regex printer was throwing an exception when printing a character class containing \w, \s or \d. TXR 117 2015-09-23 Features - Interactive listener improvements: - Visual selection of text, with copy and paste: Ctrl-S, Ctrl-Q, Ctrl-X Ctrl-Q, Ctr-^. - Undo feature with separate undo per history line. - Security checks on ~/.txr_profile permissions. - Location reporting when exceptions caught. - Syntax errors pinpointed to line in multi-line entry. - Ctrl-X Ctrl-V "super verbatim" mode. - Temp file used by Ctrl-X Ctrl-E has .tl suffix now for correct syntax highlighting. - Ctrl-X <n> Ctrl-W: insert word from previous line. - Ctrl-X <n> Ctrl-A: insert atom from previous line - Delete to beginning of line or to end of line now limited to current physical line in multi-line mode. - Ctrl-X Ctrl-K to delete current physical line. - Visual Parenthesis matching works forward now as well as reverse. - Ctrl-] jump to matching parenthesis. - Unix group database functions added: getgrgid, getgrnam, getgrent. - New path-private-to-me-p function to detect whether a file is writable to users other than the owner. - New flatcar and flatcar* functions. Variants of flatten which handle improper lists and preserve nil atoms. Bugs - Correct tab alignment in multi-line. - Fixed screen untidiness on Ctrl-Z and Ctrl-C in multi-line mode. - sub function and [] indexing were not handling lazy string objects. - sub-str wasn't handling defaulted optional arguments correctly for lazy strings. TXR 116 2015-09-17 Features * Interactive listener improvements: * Ctrl-R reverse search has been implemented. * Tab completion now works anywhere in a line, not only at the very end. * Parenthesis matching: cursor jumps briefly to matching bracket, brace or parenthesis. * Multi-line mode, with proper history support for lines containing embedded line breaks. * Ctrl-C cleanly cancels completion, and navigation keys smoothly transition from completion to edit mode. * Ctrl-X Ctrl-E edits line in external editor. * Ctrl-Z suspend and Ctrl-L clear work in completion mode. * New :read command for parsing pasted material from terminal. * Dynamic resizing of the terminal is now obeyed (SIGWINCH signal). * A ~/.txr_profile file is now read on interactive start-up, and Lisp forms are evaluated from it. * multi-line mode and history length are configurable via special variables. * Removed arbitrary limit on regular expression size (number of states). * Sma