I recently came across the Judy library which seems like an impressive set of data structures to implement mappings (think variable length arrays or hash indexed by simple key). I also looked through the codec2 sources recently, and I saw some of the same API issues, so I thought I’d crystalize some of them here: …
Category Archives: Technical
Being Sampled for The Genographic Project
IBM are involved with the Genographic Project, which is an attempt to “chart new knowledge about the migratory history of the human species”, by cheekswabbing hundreds of thousands of people around the world. You get swabbed, you get an id to access your history, and they get the consolidated data from the results. My initial …
Continue reading “Being Sampled for The Genographic Project”
ccan/opt
I reviewed the code in popt a while back, and got a mail from Jeff Johnson on whether I thought the library worth revisiting (ie. popt2). I replied that it was, then didn’t hear anything since. There are so many option-parsing libraries around, but I really wanted something simple and yet powerful enough for the …
Back To Cacheline Tree Hash Tables
After my previous conclusion that doubling linear hash tables were good enough, it turns out that they don’t work for TDB: enlarging or moving the hash table in the presence of tdb_chainlock is not possible. So, I ended up implementing expanding hash tables, and ran into a familiar set of problems. The design is simple; …
fcntl lock starvation and TDB
The Trivial DataBase (ccan variant here) uses fcntl locks for consistency: records are chained off a fixed-size hash table (or the free list), and a 1-byte fcntl lock at the offset of the chain head protects all records in that chain. There’s also a tdb_lockall() function which grabs a lock across all the hash chains …
Bob Jenkins and lookup8.c
I pulled Bob Jenkins’ superlative lookup3.c into ccan some time ago, and with the work on TDB2 (aka 64-bit TDB) I wondered if there was a 64-bit variant available. I didn’t look hard enough: I should have checked his top-level page and seen lookup8.c before wasting his time with an email :( I did note …
On Barriers To Entry
My philosophy for Free/Open Source Software comes down to this: that others can take what I do and do something awesome with it. Since I don’t know what you’ll need, I hand you every capability I have to get you started. Others granted me that very power to get where I am, so I seek …
Superfreakonomics; Superplug for Intellectual Ventures.
I enjoyed Levitt & Dubner’s “Freakonomics”, and picked up the followup “Superfreakonomis” recently at an airport. The last chapter, however, was astonishing. The entire chapter was devoted to a glowing advertisement for Intellectual Ventures, pointing out that they own 20,000 patents “more than all but a few dozen companies in the world”, but of course …
Continue reading “Superfreakonomics; Superplug for Intellectual Ventures.”
LWN Quotes Of The Week
I have been petitioning Jon Corbet to introduce a “Supporter” level subscription to LWN; I think given his failure to keep up with inflation and my need to experience conferences vicariously I feel deeply indebted to them. That lead to me looking through LWN Quote of The Week; there’s no neat index of these things. …
Typesafe callbacks in C (and gcc)
A classic pattern in C is to hand a generic callback function around which takes a “void *priv” pointer so the function can take arbitrary state (side note: a classic anti-pattern is not to do this, resulting in qsort being reimplemented in Samba so one can be provided!). The problem with this pattern is that …