Releases: c-blake/adix
A few doc gen links, better on newer Nim's, working non-BMI2 nsort
The subject line mostly covers the details.
One notable feature of "newer Nim's" is the parameter name change of default
to def
in std/tables getOrDefault
which the tables here (lptabz
, ditab
, oats
) track to retain drop-in compatibility / compile-time duck-typing.
Rely on `std/sysrand` (around since 2021) & clean-ups
Make fall-back to true-randomized hash salting much more system-portable.
Also some minor clean-ups with 4 adix/oats test/demo programs & std/ qualified imports.
Fix `nsort`; Make compile-able with stricter style
Just a few fixes:
nsort
needed analloca
decl for newer glibc/gcc on Linuxpassc
&dSize
were mis-spelled (undetected before sincestyleCheck=usages
only works withhint[Name]=on
)- make
topk.nim
work back to nim-1.6
Add `adix/topk` and employ in various `topByVal`
..as well as in tests & the lfreq
utility program.
Very minor changes
Make data ranges for tests/ucl.nim
more applicable
Uncomment more of the needed static duck typing in adix/oats.nim
cligen verison depencency update & hashData->hash(openArray[byte])
hashData
was only in tests/wf.nim
, though.
Minor bug fix release for lptabs.setCap
Table size anticipation must be pretty rare for this bug to last this long. Oh well.
Add fast flexible formatting to `lfreq`
In spite of the easy tests/lfreq.awk
awk 1..2-liner, for which lfreq
is mostly just an optimization / demo of adix/oats, maybe given how many people seem surprised at uniq -c
and sort-based histogramming, Unix was always missing this slightly more specific utility. So, make this particular realization a little nicer with fairly general user formats of output.
This could be used, for example, to do git log --author=WHOEVER --date=raw | awk '{print int($2/86400/91)}' | lfreq -n0 -f@k,@c
{ maybe also piped to a chart/plot program after lfreq
} to assess quarterly git activity of some author.
Workaround Nim generics bug in non-nimPreviewSlimSystem mode
That shows up in an external consumer like bu/niom.nim
.
Minor fix for adix/bist.nim
Add promotion from SomeInteger
to int
, a need discovered while testing/timing BISTs as a top-k alternative. (Spoiler alert - need 2 or more quantiles to improve enough upon topk batch-quick-select, but then again (median,interquartile range) is "a thing" and is also 3 quantiles.)
Also added bist.clear
to zero out counters with the same re-used memory.