v2.4.0: CHAMP bags; and book coming! #110
slburson
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
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
fset2package.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 operations (
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?.This discussion was created from the release v2.4.0: CHAMP bags; and book coming!.
All reactions