Skip to content

Releases: slburson/fset

v2.4.6: Workaround for SBCL bug on ARM64

Choose a tag to compare

@slburson slburson released this 30 Jun 01:09

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

Choose a tag to compare

@slburson slburson released this 20 Jun 02:43

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, and fset/jzon/test to fset.iterate etc. The old names are still present as nicknames, so nothing should break.
  • I had renamed testing.lisp to testing-0.lisp without fixing up every reference in the .asd file, causing breakage in Ultralisp and Quicklisp.
  • Bug fix: restrict-not on 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'

Choose a tag to compare

@slburson slburson released this 25 Apr 20:40

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

Choose a tag to compare

@slburson slburson released this 14 Apr 06:00

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

Choose a tag to compare

@slburson slburson released this 13 Apr 02:38

This release just has a few odds and ends:

  • first and last on replay maps was previously calling at-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 all nil if 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.
  • update has been deprecated in favor of updated. (I'm trying to avoid using verbs that suggest mutation for functional update operations.)
  • search and mismatch now use the FSet method if either sequence argument is a seq, using convert to convert the other one.
  • a couple of internal bug fixes.

v2.4.1: Functional iterator bug fix; WB-tree balance improvements

Choose a tag to compare

@slburson slburson released this 04 Apr 22:27

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!

Choose a tag to compare

@slburson slburson released this 30 Mar 00:24

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-seq did not correctly handle both from-end? and index? being true.

  • Bug fix: a char seq with a non-nil default did not print with a default suffix.

  • Bug fixes on GMap result types: bag-sum now returns the empty bag on zero bags, rather than nil; bag-product now returns the full set in this case (it is the identity element for bag-product); map-union and map-intersection now 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 inverse on an empty binary relation did not cause the inverse to be incrementally maintained thereafter.

  • Minor incompatible change: arb on 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 null back to nil; it also converts the empty seq back to nil if the key is of list type.

  • New operation (fset2: only): map-difference.

  • New methods: domain-contains? and range-contains? on a 2-relation; fun-iterator on replay-set and replay-map; make-load-form on wb-replay-set, ch-replay-set, wb-replay-map, ch-replay-map.

  • New setf expander: 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.

  • reduce on a bag now has an additional keyword parameter pairs?; if true, the function is called only once per unique element, with the multiplicity passed as the second argument.

  • New method at-index on a seq, synonymous with lookup.

  • (convert ((eql seq) replay-map)) now has a keys-only? keyword parameter; if true, it returns the key sequence in O(1) time.

  • Taking size of a complement-set is 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-product for bag and complement-set, since the full set is actually the identity element for bag-product, as it contains every value with multiplicity 1; and GMap result type bag-product now 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

Choose a tag to compare

@slburson slburson released this 16 Feb 00:54

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

Choose a tag to compare

@slburson slburson released this 06 Feb 09:20

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

Choose a tag to compare

@slburson slburson released this 20 Jan 02:36

Fixes GitHub #103, and a bug in FSet/Jzon.