Releases: slburson/fset
Release list
v2.4.6: Workaround for SBCL bug on ARM64
I ran into a bug in SBCL 2.6.5 that causes an FSet function to miscompile on ARM64 (Apple M), causing it to go into an infinite loop. (It's an internal function invoked by doing with on a dynamic tuple; if you use tuples and run on Mac, you will likely be affected.) This release contains a workaround. The SBCL fix is already in the pipeline, and will presumably be included in 2.6.7.
v2.4.5: Miscellany
This release rolls up a collection of minor fixes:
- Added tuple operations
less,contains?,at-index(GitHub #116). - Added
identity-equality-struct(GitHub #115). - While ASDF requires us to use slashes to separate parts of compound system names, common practice for package names is apparently to use dots. I have renamed packages
fset/iterate,fset/iterate/test,fset/jzon, andfset/jzon/testtofset.iterateetc. The old names are still present as nicknames, so nothing should break. - I had renamed
testing.lisptotesting-0.lispwithout fixing up every reference in the .asd file, causing breakage in Ultralisp and Quicklisp. - Bug fix:
restrict-noton a ch-map and ch-set returned the wrong result if the set was empty (GitHub #120).
v2.4.4: Bug fix: for 'fset2:bag'
fset2:bag wasn't defined as a type, so you couldn't define methods on it. Fixed.
I've also added seq constructor function filled-seq (aka filled-wb-seq), which returns a seq of a specified size filled with a specified initial element.
v2.4.3: Bounded-sets use bitmaps
Addresses GitHub issue #47.
Also fixes a bug in the 2-relation and ch-2-relation constructor macros, that would cause a no-such-method error in some cases.
v2.4.2: Minor fixes
This release just has a few odds and ends:
firstandlaston replay maps was previously callingat-index, which returns only two values (a key and its value) and signals an error on an empty replay map. Now, they return three values, which are allnilif the replay map was empty; otherwise, the third value is true. This is consistent with the behavior of these operations on seqs and replay sets.updatehas been deprecated in favor ofupdated. (I'm trying to avoid using verbs that suggest mutation for functional update operations.)searchandmismatchnow use the FSet method if either sequence argument is a seq, usingconvertto convert the other one.- a couple of internal bug fixes.
v2.4.1: Functional iterator bug fix; WB-tree balance improvements
This release fixes a serious bug in functional iterators on CHAMP collections: when created on an empty collection, the iterator would not report itself as empty and would return garbage.
It also contains some improvements to WB-tree balancing that make lookups slightly faster.
v2.4.0: CHAMP bags; and book coming!
The first big news for v2.4.0 is that bags now have a CHAMP implementation, which is the default if you're using the fset2 package.
The other big news is that my online book, Modern Common Lisp with FSet, is almost complete! Have a look at the current draft. It has detailed API docs for all the FSet types, including the new CHAMP bags.
In the course of writing the book, I found many small things to fix or improve in the code; there's really nothing like documenting something to bring its flaws to one's attention, is there? Here they are, in roughly decreasing order of significance:
-
Bug fix:
do-seqdid not correctly handle bothfrom-end?andindex?being true. -
Bug fix: a char seq with a non-
nildefault did not print with a default suffix. -
Bug fixes on GMap result types:
bag-sumnow returns the empty bag on zero bags, rather thannil;bag-productnow returns the full set in this case (it is the identity element forbag-product);map-unionandmap-intersectionnow do defaulting correctly. -
Bug fix: the rereading seq reader did not yet understand the new print syntax for runs of characters within a seq.
-
Bug fixes: tuples and binary relations did not have their read memory barriers (for multithreading) in exactly the right places.
-
Bug fix: calling
inverseon an empty binary relation did not cause the inverse to be incrementally maintained thereafter. -
Minor incompatible change:
arbon an empty bag now returns a second value of 0. -
Potentially incompatible change: FSet/Iterate now builds CHAMP sets, bags, and maps by default.
-
FSet/Jzon parsing, in tuple mode, converts
nullback tonil; it also converts the empty seq back tonilif the key is of list type. -
New operation (
fset2:only):map-difference. -
New methods:
domain-contains?andrange-contains?on a2-relation;fun-iteratoronreplay-setandreplay-map;make-load-formonwb-replay-set,ch-replay-set,wb-replay-map,ch-replay-map. -
New
setfexpander:default(functional, of course). -
New modify macros:
clear-default,map-imagef. -
contains?on a bag now accepts an optional multiplicity, defaulting to 1; asks whether the bag contains at least that many occurrences of the value. -
reduceon a bag now has an additional keyword parameterpairs?; if true, the function is called only once per unique element, with the multiplicity passed as the second argument. -
New method
at-indexon a seq, synonymous withlookup. -
(convert ((eql seq) replay-map))now has akeys-only?keyword parameter; if true, it returns the key sequence in O(1) time. -
Taking
sizeof acomplement-setis now an error. (It used to return the negative of the size of the complemented set, which almost made a cute kind of sense -- it harked back to Zeta-C's treatment of unsigned arbitrary-precision integers, which treated all negative numbers as greater than all positive ones. Unfortunately, it had an off-by-one error: even in this rather creative interpretation, the size of the full set should have been represented as -1, not 0.) -
I added methods on
bag-productforbagandcomplement-set, since the full set is actually the identity element forbag-product, as it contains every value with multiplicity 1; and GMap result typebag-productnow returns the full set on zero bags. -
Added some missing exports (to both packages):
fun-iterator,complement-set,complement-set?.
v2.3.3: Fix 'typep' of 'fset2:' types on LispWorks
Fixes GitHub #107: typep didn't work on some types in the fset2 package, on LispWorks.
v2.3.2: Allow compiler safety to be forced
I've been doing hash arithmetic in a way that works only at safety 0, and SBCL has sb-ext:restrict-compiler-policy, which some people use (understandably) to force higher safety during testing. I've changed the way hash arithmetic is done, so it works at any safety level.
v2.3.1: Bug fixes
Fixes GitHub #103, and a bug in FSet/Jzon.