<div dir="ltr"><div class="gmail_default" style="font-family:times new roman,serif;font-size:large">This is the design I like: a u32 vector such that each even element is the starting code point of an interval and each odd element is the ending code point + 1 of an interval, where the intervals are in order. A binary search determines whether an element is in or out of the set. Intersection is merge, and complement is "prepend #x00000 to the set and remove the last element, unless the set already begins with #x00000, in which case remove it and append #x200000".</div><div class="gmail_default" style="font-family:times new roman,serif;font-size:large"><br></div><div class="gmail_default" style="font-family:times new roman,serif;font-size:large">See <a href="https://github.com/scheme-requests-for-implementation/srfi-14/blob/master/contrib/unicode-2019/CharsetDefs.html">https://github.com/scheme-requests-for-implementation/srfi-14/blob/master/contrib/unicode-2019/CharsetDefs.html</a> for how to make standard character set definitions that conform to Unicode rather than Java 1.0.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 17, 2023 at 1:34 PM Bradley Lucier <<a href="mailto:lucier@math.purdue.edu">lucier@math.purdue.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Marc:<br>
<br>
I'd like to have an implementation of SRFI 14 (character sets) that <br>
works with the entire unicode character set rather than just the <br>
256-character Latin1 subset<br>
<br>
I think one needs a data structure that allows compact encoding of <br>
relatively large (about $2^{21}$ elements) sets of positive integers <br>
that have lots of contiguous subsets.<br>
<br>
At any rate, I thought you may have solved this problem in <br>
gambit/lib/gambit/char/char#.scm, but for the life of me I can't figure <br>
out what you're doing there.<br>
<br>
Can your data sets for encoding Unicode properties be used for an <br>
efficient SRFI 14 implementation?<br>
<br>
Brad<br>
<br>
_______________________________________________<br>
Gambit-list mailing list<br>
<a href="mailto:Gambit-list@iro.umontreal.ca" target="_blank">Gambit-list@iro.umontreal.ca</a><br>
<a href="https://mailman.iro.umontreal.ca/cgi-bin/mailman/listinfo/gambit-list" rel="noreferrer" target="_blank">https://mailman.iro.umontreal.ca/cgi-bin/mailman/listinfo/gambit-list</a><br>
<br>
</blockquote></div>