package ucharset
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
Character classes for Unicode-aware lexers and regex engines
Install
dune-project
Dependency
Authors
Maintainers
Sources
ucharset-0.2.0.tbz
sha256=876c0c73aa90c5c4f3a12bea3edbafef5dc5ff99026748b9496a240721007781
sha512=94e6dc376008cf7556126b6f12e8106359921b94df410e4b89cb2423e4f7e20ab58fb011b44054d31ad867972701bddcd13f11f3496075ac37c6c7b6a536e189
doc/CHANGES.html
v0.2.0 (2026-09-03)
Breaking
- 64-bit only.
Builder.buildpacks two 21-bit endpoints into oneintwhile sorting, so the module now fails at load time on a narrowerintrather than returning corrupted sets, and the package is unavailable on 32-bit architectures. Lookup.mem_charis gone. It read a byte from0x80up as Latin-1, whereascii_tablereads the same byte as UTF-8, so the two disagreed on half the table. UseLookup.mem_ucharon the decoded scalar, orascii_tableon the raw byte.Partition.block_ofis nowPartition.block_of_opt, answeringNonewhere it returned-1.Partition.of_blocksnumbers blocks by least element rather than by position in the list, soPartition.of_set sleads with whichever ofsandcomp sholds codepoint0.hashmixes the endpoint count, so sets hash differently from v0.1.0.emptyandsingleton 0no longer both hash to0.to_string,to_hex_stringandto_class_stringreturn one line whatever the set's width. Theppfamily still breaks at the formatter's margin.Invalid_argumentmessages nameUcharset, not theCharsetmodule that never existed.to_listis nowto_intervals. It returns runs, not codepoints, so it never paired withof_list;of_intervalsis its inverse.pp_classandto_class_stringescape the non-ASCII whitespace as well (U+00A0,U+1680,U+2000toU+200A,U+2028,U+2029,U+202F,U+205F,U+3000), which used to print as themselves and read as the separator between members.
Added
Partition.block_of_opt: which block holds a codepoint, without building a block.Lookup.mem_uchar.
Performance
meet_allrefines pairwise by halving instead of sweeping every input at once. Faster as the number of partitions grows, at 8x to 13x the allocation.Partition.meetsizes its scratch tables by block count, not segment count.subsetgallops likedisjointrather than walkingof_linearly.mem,subset,equal,compareandPartition.block_of_optallocate nothing per call.minis monomorphic again in the sort and gallop paths.xoris one merge over the endpoints rather thanunion (diff a b) (diff b a), so one array where there were three.union_listof exactly two sets callsuniondirectly, asinter_listalready did.mapsizes its accumulator fromcardinal, the exact number of pairs it will emit.inter_listfinds the overlap and the exhausted inputs in one pass rather than two.
Documentation
- The module preamble carries the validation contract again: functions building or updating a set from a raw
intraise on a surrogate or an out-of-range value, queries answer for anyint. of_packed_stringdocuments acceptance as exactly whatto_packed_stringemits, adjacent intervals included. The encoding itself is unchanged since v0.1.0.- The
Lookupfootprint and "branch-free" claims are corrected: only the leaf pool scales with the set, and the index scales with the largest member. - Doc comments for the values that had none.
xorno longer claims to be the only operation allocating more than one array, which was false forrefine,of_blocks,to_lookupandmeet_all.meet_allstates its cost again: O(S log k) against foldingmeetat O(S k).filterdocuments that it cannot size its accumulator in advance, andPartition.blockthat building every block one at a time is whatblocksis for.
v0.1.0
- Initial release.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page