Releases: c-blake/adix
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.
Very minor update to `lfreq` & cligen version dep bump
Use n < -1
condition in lfreq
to reverse the sort order emitted to avoid need for tac
(/ whatever Windows calls it) postprocessing.
Version bump just to update nimble dep on cligen-1.7.0
To be sure the fmtUncertain*
bug fix propagates.
'nuff said.
0.5.10
Overhaul adix/oats.nim
to support MemFile/MFile-backed arrays (though none of the current examples actually do that yet). Rename getPut
to the more common term upSert
. Re-factor helper templates and quite a few other changes. See 70a2a3d .
Update all the client code in util/lfreq.nim
(which should really move to bu
soon and possibly be renamed uniqc
), tests/wu.nim
, tests/wfr.nim
and add tests/ucl.nim
(maybe almost the simplest possible example w/o sucky perf).
A bunch of little changes:
- add note about how to use pre-2.0 Nim to
.nimble
- update tests/kmCmp.sh to show
amoft
perf. - update cligen dep
Fix New Style Concept installation issue
Address failure to util/lfreq
| adix/oats
build failure mentioned in #9 by more agressive Nim version requirement. (Update cligen to latest as part of this.)
Generalize lfreq slightly
That's about it. Now, it can work well with, e.g., \0-terminated records.
Add adix/oats new-style Concept prototype & examples
Actual source files have more details, as always, but basically add adix/oats.nim
: A new-style Concept backend prototype for open-addressed tables. It is nowhere near as thorough as adix/lptabz at this stage.
So util/lfreq.nim
and now no longer needs a user to magically know how big the string data area will need to be, making it actually a pretty general purpose utility (which is good since the README refers to it in comparison with the bu/oft
wrapper around the adix/amoft.AMOft
sketch).
Also add some less generally useful test/comparison files related to adix/oats
for the curious:
- tests/lfreq.awk: Like above written as a pure AWK 1-liner
- tests/wu.nim: Unique w/no counts allows smallest CPU cache footprint
- tests/wfr.nim: Fully bundled Knuth-McIlroy vocab analyzer (almost surely "overbundled" but big among CFRO guys).
- tests/kmCmp.sh: Knuth-McIlroy Problem comparisons of above
Make building nsort more portable
Work on making compiling SIMD-optimized cumsum
& nsort
more robust on x86_64 platforms.
This robustness is only compile-time CPU feature detection-oriented (run-time would seem to require either a non-intrinsics approach to assembly or separate C compilation units.). So, it matters if your nim.cfg/build flags have march=native
(or whatnot) in them which is kind of a choice outside the package as it relates to binary compatibility/deployment.