Fiddling with value block compression in the marginalia index. Very cursed stuff.
A bit simplified, but I'm basically zigzag delta encoding[1] the data and then reshuffling it in byte planes, and then compressing them with LZ4.
So if I have for the sake of simplicity 64 longs that have been zigzag delta encoded, the data is rearranged into
(all the 1st bytes of the coded longs),
(all the 2nd bytes of the coded longs),
(all the 3rd bytes of the coded longs),
(all the 4th bytes of the coded longs),
(all the 5th bytes of the coded longs),
(all the 6th bytes of the coded longs),
(all the 7th bytes of the coded longs),
(all the 8th bytes of the coded longs)
The result of the zigzag delta treatment is that a lot of the most significant byte planes end up being very predictable, often long runs of zeroes. It's like the worst imaginable L1 cache access pattern since you need to read 8 different cache lines to assemble one value, but it nearly doubles the compression rate[2], which makes for fewer disk reads, and L1 cache misses are a drop in the ocean compared to an I/O roundtrip.
Real benefit is that it significantly slashes the disk requirements of the index, which is very chonky right now, and in the ballpark of half of the index is this data. Will probably save about 4 TB of disk space altogether when this goes live.
[1] Encode the difference between values, and then make every other value represent negative values, to avoid the bit flipping in two's complement, ensuring that smaller deltas (regardless of sign) stay toward the least significant bits.
[2] I'm getting about 70% compression which is very good for standard-mode LZ4.
It's about 1.1 TB per index partition with 8 regular partitions, and two smaller ones. Total available storage is ballpark of 90 TB, but it's also got to keep the crawl data and a bunch of other stuff, and have enough storage to allow constructing the index.
At least part of the motivation for the change is to reduce the amount of additional space needed for index construction. I've already compressed the largest aspect of the intermediary representation, but that's a simpler problem since it isn't as performance critical.
Work: Slowly chewing through three blocked projects. After weeks of frustration, it's nice to finally see things move. It's like when WD40 finally dissolves rust enough for you to make those first tiny movements in a seized mechanism.
Non-work: Reading a manual and grinding practice exams for a HAM radio exam. I'm aiming for CEPT Novice, which allows 100W airing on most amateur channels. There's only about 3000-3500 people in the whole country who are licensed, so it'd be funny to be part of that "private club".
So far I'm finding most of the material fairly easy to understand, though I do dread the technical block drawings and everything about oscillators.
I am not supposed to talk about this, for Elmers will come from the hilltops screaming, but by a logistical accident I managed to pass the General license exam before I had ever taken the Technician license exam. This was all at a HAM radio conference, and upon learning that I didn't have a Technician license exam prior to the General, I was forced to stay after and take an impromptu Technician license exam and pass. Fortunately the exam was pretty easy, and I was able to pass. I'm not sure what those Elmers would've done had I failed the Technician exam...
Revving up after being ill for five days. There is a bit of a backlog at work, but it's not too bad, and a lot of it is fairly mundane and perfect for ramping up.
At home, I have completed shutting down all I had on Digital Ocean and migrating the stuff to less objectionable places. I made a boring word game and am considering ways to spice it up.
Ah, nice! Migrating away from DO is also on my list, this week I'm moving my family mail server to Hetzner — then I'll have my personal mail server and personal website, but those are less risky.
I was also sick with covid, and I'm finally feeling better.
Work: in the throes of AI knowledge management/context management. Interesting stuff - we started having discussions Descarte-style of "how do I know what I know".
I've really enjoyed getting more in-depth into poker theory and practice so have been slowly building a poker solver. Along the way I'm writing all the “standard library” bits that I think are missing in C++, or could be simpler and better.
I'm currently on a yak shave of writing a small build system from scratch for my projects too. My goal is to require writing as little build configuration as possible e.g. by auto-detecting dependencies. Doing this fast in general in C++ is hard, but with some sane restrictions I think there is potential.
I retired from professional coding earlier this year, and it's lovely to just code whatever I feel like without deadlines or arguments with people. I basically left the industry right as
agentic coding was really taking off which was unintentional but interesting. So far I've held off on generating any code or really using LLMs for much of anything related to coding. I kind of enjoy the simple but meditative tasks like writing lots of unit tests by hand. But talking to my friends I'm beginning to feel a bit like a dinosaur...
Tech: at work, we're recovering from a massive outage on Friday after an unexpected certificate expiration (created before I had joined, with a 10 year expiration...), and I'm making plans to avoid this in future. At home, we finally have an internet connection in our new place; I'm looking into finding an electrician to run some ethernet cables to the top floor (I'd do it myself, but it's a rental and I don't trust myself enough to leave it in pristine condition).
Non-tech: got a rugbrød (Danish rye bread) starter going, so we'll be baking with that later in the week (all going well). I hope to pick up some fish to bread and fry to have with it. We're also planning on some home-made baguettes for bánh mi.
On my way to finish the Stuxnet book this week. Completely blown away by so many things and I have so many questions. First of all, how did these (Symantec, Kaspersky) private companies get the sinkholes/honeypots?? I've been reading the original threads on the orange site from when this unfolding and its really fascinating. I would love to put together a blog post about Stuxnet and Agents and nation-states hording and harvesting zero-days instead of securing them. I most likely will not.
I was supposed to release an update to Thetix but it needed more time to cook. Planning on releasing today or tomorrow.
For Fun
Figure out how to include Jev like models into Abject. I was also going to release a new coding agent called slangmaker last week but it needs some more time to cook. I plan on releasing it this week. It's based on the Raku programming language and uses Raku's awesome Grammars feature to do some experimental stuff.
learning how to fine-tune a LLM model to my own liking. I'm currently experimenting with qwen-0.6B on my 14" M5 pro. It does seem a bit easy and I'm about to find out how hard it's going to be.
Work:
Back to it after a week in Iceland for an off-site blitz. Body is mostly recovered from jet lag now, and kinda unpacking that week and getting back into the swing of managing the rest of my team
Home:
My mother shared a link to a random webapp that lets her play Skip-Bo, one of her favorite games, online with others (standard lobby-code sharing style). I took one look at it and said "This is horrible, slow, and ugly. I'll go make us a better one". So I am playing games of that with her while I hammer away at a Phoenix/LV app I can host on my personal site to play with her.
I'm visiting my mom for her birthday, so I'm planning to finally migrate my family mail server to an OpenBSD VPS running OpenSMTPD (I was using Mail-in-a-Box before). Then I can personally update her mail client and make sure everything works for her, without having to troubleshoot from 5k miles away.
At work: Nv series VMs are being decommed at the end of September and my users have been dragging their asses on moving to other SKUs, so I'm going to up the pressure on them.
I need to write some documentation. I realized recently that the docs I maintain are for use of the software and none are for the maintenance of that software. I am going to remedy that by writing out how I develop these things, what design choices I've made, what things have failed, and what my long term goals are.
I have a couple interviews for internal positions this week, too.
At home: continuing to prepare for the new puppy, reading books on dog training and dog ownership, practicing K (doing some apl.quest challenges), writing some Go for a personal project.
Motivated by a few customer requests, I've been playing around with an idea to provide a good, privacy-focused and quick "autocomplete" and "did you mean X?" set of features in Uruky.
I'm currently inclined to build a corpus of popular Wikipedia titles and some other open sources (only up to ~5M phrases) with weights and match against that. That way there's no privacy invasion, no logging necessary, etc., and it could be fast without hitting search providers a lot more frequently (thus making it prohibitively expensive).
I'd definitely make that corpus of data available free with MIT (and/or equivalent for the non-code pieces).
Also working on making our iOS/macOS extension work on Intel Macs.
I'm currently inclined to build a corpus of popular Wikipedia titles and some other open sources (only up to ~5M phrases) with weights and match against that. That way there's no privacy invasion, no logging necessary, etc., and it could be fast without hitting search providers a lot more frequently (thus making it prohibitively expensive).
Yeah this is what I'm doing as well. It's better than nothing but arguably a bit lackluster at least what I've managed to accomplish. Been meaning to see if I can get a tiny transformer model to do a better job than a PATRICIA trie at an acceptable computational cost.
Hey Viktor, that's cool! I've also thought about building a corpus from our own index, but since it's indie/small-web focused, I'm concerned it'll be less valuable for autocomplete.
What's lackluster for you, though? The relevance of these titles/this data, or the autocomplete UX with it?
I think it's mostly the relevance. They suggestions become very hit and miss, I think because of Wikipedia's ideosyncrasies which mostly overlap with reasonable search queries, but it's not quite a perfect overlap.
Google's ngrams dataset seems like a potentially better source for weighted data than just going to by wikipedia titles, or is there some issue that prevents you from using that?
I'm pre-training a small language model to become more competent in my field. Once I'm done with that, I'll be moving on to post training. If all goes well, I'll have a post-trained model ready by the end of the month.
I might be making things harder for myself by choosing a non-standard ML framework (I'm using burn in Rust). I did so to force myself closer to the fundamentals (and it's working!).
Work: managing my team through a few critical deployments; Doing some consulting for a sister business and planning a trip to Southern California (maybe) to look at their facilities. I'm also getting the pieces together for our big projects in 2027.
Personal: working on a talk for the local developer meet up in October; Going to talk about what I learned about managing technical teams and leading projects as I have for the last four and a half years. Hard to believe I've been a suit [sic] for so long now.
marginalia | 8 hours ago
Fiddling with value block compression in the marginalia index. Very cursed stuff.
A bit simplified, but I'm basically zigzag delta encoding[1] the data and then reshuffling it in byte planes, and then compressing them with LZ4.
So if I have for the sake of simplicity 64 longs that have been zigzag delta encoded, the data is rearranged into
The result of the zigzag delta treatment is that a lot of the most significant byte planes end up being very predictable, often long runs of zeroes. It's like the worst imaginable L1 cache access pattern since you need to read 8 different cache lines to assemble one value, but it nearly doubles the compression rate[2], which makes for fewer disk reads, and L1 cache misses are a drop in the ocean compared to an I/O roundtrip.
Real benefit is that it significantly slashes the disk requirements of the index, which is very chonky right now, and in the ballpark of half of the index is this data. Will probably save about 4 TB of disk space altogether when this goes live.
[1] Encode the difference between values, and then make every other value represent negative values, to avoid the bit flipping in two's complement, ensuring that smaller deltas (regardless of sign) stay toward the least significant bits.
[2] I'm getting about 70% compression which is very good for standard-mode LZ4.
Levitating | 3 hours ago
How much storage does your index have/use now?
marginalia | an hour ago
It's about 1.1 TB per index partition with 8 regular partitions, and two smaller ones. Total available storage is ballpark of 90 TB, but it's also got to keep the crawl data and a bunch of other stuff, and have enough storage to allow constructing the index.
At least part of the motivation for the change is to reduce the amount of additional space needed for index construction. I've already compressed the largest aspect of the intermediary representation, but that's a simpler problem since it isn't as performance critical.
nemin | 9 hours ago
Work: Slowly chewing through three blocked projects. After weeks of frustration, it's nice to finally see things move. It's like when WD40 finally dissolves rust enough for you to make those first tiny movements in a seized mechanism.
Non-work: Reading a manual and grinding practice exams for a HAM radio exam. I'm aiming for CEPT Novice, which allows 100W airing on most amateur channels. There's only about 3000-3500 people in the whole country who are licensed, so it'd be funny to be part of that "private club".
So far I'm finding most of the material fairly easy to understand, though I do dread the technical block drawings and everything about oscillators.
zg | 3 hours ago
Good luck on your HAM radio exam!
I am not supposed to talk about this, for Elmers will come from the hilltops screaming, but by a logistical accident I managed to pass the General license exam before I had ever taken the Technician license exam. This was all at a HAM radio conference, and upon learning that I didn't have a Technician license exam prior to the General, I was forced to stay after and take an impromptu Technician license exam and pass. Fortunately the exam was pretty easy, and I was able to pass. I'm not sure what those Elmers would've done had I failed the Technician exam...
kryptiskt | 7 hours ago
Revving up after being ill for five days. There is a bit of a backlog at work, but it's not too bad, and a lot of it is fairly mundane and perfect for ramping up.
At home, I have completed shutting down all I had on Digital Ocean and migrating the stuff to less objectionable places. I made a boring word game and am considering ways to spice it up.
beto | 40 minutes ago
Ah, nice! Migrating away from DO is also on my list, this week I'm moving my family mail server to Hetzner — then I'll have my personal mail server and personal website, but those are less risky.
I was also sick with covid, and I'm finally feeling better.
ramones | 4 hours ago
my best
andrewsledge | 8 hours ago
Work: in the throes of AI knowledge management/context management. Interesting stuff - we started having discussions Descarte-style of "how do I know what I know".
Home: building a toy app for workout recovery.
sdt | 4 hours ago
I've really enjoyed getting more in-depth into poker theory and practice so have been slowly building a poker solver. Along the way I'm writing all the “standard library” bits that I think are missing in C++, or could be simpler and better.
I'm currently on a yak shave of writing a small build system from scratch for my projects too. My goal is to require writing as little build configuration as possible e.g. by auto-detecting dependencies. Doing this fast in general in C++ is hard, but with some sane restrictions I think there is potential.
I retired from professional coding earlier this year, and it's lovely to just code whatever I feel like without deadlines or arguments with people. I basically left the industry right as agentic coding was really taking off which was unintentional but interesting. So far I've held off on generating any code or really using LLMs for much of anything related to coding. I kind of enjoy the simple but meditative tasks like writing lots of unit tests by hand. But talking to my friends I'm beginning to feel a bit like a dinosaur...
invlpg | 9 hours ago
Tech: at work, we're recovering from a massive outage on Friday after an unexpected certificate expiration (created before I had joined, with a 10 year expiration...), and I'm making plans to avoid this in future. At home, we finally have an internet connection in our new place; I'm looking into finding an electrician to run some ethernet cables to the top floor (I'd do it myself, but it's a rental and I don't trust myself enough to leave it in pristine condition).
Non-tech: got a rugbrød (Danish rye bread) starter going, so we'll be baking with that later in the week (all going well). I hope to pick up some fish to bread and fry to have with it. We're also planning on some home-made baguettes for bánh mi.
[OP] caius | 3 hours ago
hugops
liberty | 9 hours ago
Working on my talk on accessibility in programming for SeaGL.
brad | 6 hours ago
On my way to finish the Stuxnet book this week. Completely blown away by so many things and I have so many questions. First of all, how did these (Symantec, Kaspersky) private companies get the sinkholes/honeypots?? I've been reading the original threads on the orange site from when this unfolding and its really fascinating. I would love to put together a blog post about Stuxnet and Agents and nation-states hording and harvesting zero-days instead of securing them. I most likely will not.
toastal | 6 hours ago
I have found a number of small features I want in Nixtamal… 1.11.0 has probably the most improvements in a single release in months.
mempko | 5 hours ago
For Work
I was supposed to release an update to Thetix but it needed more time to cook. Planning on releasing today or tomorrow.
For Fun
Figure out how to include Jev like models into Abject. I was also going to release a new coding agent called slangmaker last week but it needs some more time to cook. I plan on releasing it this week. It's based on the Raku programming language and uses Raku's awesome Grammars feature to do some experimental stuff.
gowthamgts | 5 hours ago
learning how to fine-tune a LLM model to my own liking. I'm currently experimenting with qwen-0.6B on my 14" M5 pro. It does seem a bit easy and I'm about to find out how hard it's going to be.
3digitdev | 2 hours ago
Work: Back to it after a week in Iceland for an off-site blitz. Body is mostly recovered from jet lag now, and kinda unpacking that week and getting back into the swing of managing the rest of my team
Home: My mother shared a link to a random webapp that lets her play Skip-Bo, one of her favorite games, online with others (standard lobby-code sharing style). I took one look at it and said "This is horrible, slow, and ugly. I'll go make us a better one". So I am playing games of that with her while I hammer away at a Phoenix/LV app I can host on my personal site to play with her.
beto | 47 minutes ago
I'm visiting my mom for her birthday, so I'm planning to finally migrate my family mail server to an OpenBSD VPS running OpenSMTPD (I was using Mail-in-a-Box before). Then I can personally update her mail client and make sure everything works for her, without having to troubleshoot from 5k miles away.
regulator | 9 hours ago
At work: Nv series VMs are being decommed at the end of September and my users have been dragging their asses on moving to other SKUs, so I'm going to up the pressure on them.
I need to write some documentation. I realized recently that the docs I maintain are for use of the software and none are for the maintenance of that software. I am going to remedy that by writing out how I develop these things, what design choices I've made, what things have failed, and what my long term goals are.
I have a couple interviews for internal positions this week, too.
At home: continuing to prepare for the new puppy, reading books on dog training and dog ownership, practicing K (doing some apl.quest challenges), writing some Go for a personal project.
brn | 8 hours ago
Motivated by a few customer requests, I've been playing around with an idea to provide a good, privacy-focused and quick "autocomplete" and "did you mean X?" set of features in Uruky.
I'm currently inclined to build a corpus of popular Wikipedia titles and some other open sources (only up to ~5M phrases) with weights and match against that. That way there's no privacy invasion, no logging necessary, etc., and it could be fast without hitting search providers a lot more frequently (thus making it prohibitively expensive).
I'd definitely make that corpus of data available free with MIT (and/or equivalent for the non-code pieces).
Also working on making our iOS/macOS extension work on Intel Macs.
marginalia | 8 hours ago
Yeah this is what I'm doing as well. It's better than nothing but arguably a bit lackluster at least what I've managed to accomplish. Been meaning to see if I can get a tiny transformer model to do a better job than a PATRICIA trie at an acceptable computational cost.
brn | 8 hours ago
Hey Viktor, that's cool! I've also thought about building a corpus from our own index, but since it's indie/small-web focused, I'm concerned it'll be less valuable for autocomplete.
What's lackluster for you, though? The relevance of these titles/this data, or the autocomplete UX with it?
marginalia | 7 hours ago
I think it's mostly the relevance. They suggestions become very hit and miss, I think because of Wikipedia's ideosyncrasies which mostly overlap with reasonable search queries, but it's not quite a perfect overlap.
brn | 6 hours ago
Gotcha, makes sense.
alexk | 7 hours ago
Google's ngrams dataset seems like a potentially better source for weighted data than just going to by wikipedia titles, or is there some issue that prevents you from using that?
brn | 6 hours ago
Ooh, that's interesting. I'll need to double check on their licensing, but if that's not a problem, it should be a better source!
retr0id | 8 hours ago
Reverse engineering my Sony A7IV camera, and trying to coordinate with someone with the A7V model to extract its firmware encryption keys, too.
elijahpotter | 7 hours ago
I'm pre-training a small language model to become more competent in my field. Once I'm done with that, I'll be moving on to post training. If all goes well, I'll have a post-trained model ready by the end of the month.
I might be making things harder for myself by choosing a non-standard ML framework (I'm using
burnin Rust). I did so to force myself closer to the fundamentals (and it's working!).byronsharman | 7 hours ago
Sounds fun!
elijahpotter | 6 hours ago
Byron! What you are YOU doing here?!
I jest. It's just weird to talk to people I know on forums like this.
dsh | 6 hours ago
Work: managing my team through a few critical deployments; Doing some consulting for a sister business and planning a trip to Southern California (maybe) to look at their facilities. I'm also getting the pieces together for our big projects in 2027.
Personal: working on a talk for the local developer meet up in October; Going to talk about what I learned about managing technical teams and leading projects as I have for the last four and a half years. Hard to believe I've been a suit [sic] for so long now.