Damus

Recent Notes

Tom Forsyth · 2w
nostr:nprofile1qy2hwumn8ghj7un9d3shjtnyd968gmewwp6kyqpqpu3ryltaaqjym9gj5fpcv623edtfh2vuvrtcd8pz75p6nlyt0nrqwf22w0 Didn't want to take the highway there?
Wolf480pl · 2w
nostr:nprofile1qy2hwumn8ghj7un9d3shjtnyd968gmewwp6kyqpqpu3ryltaaqjym9gj5fpcv623edtfh2vuvrtcd8pz75p6nlyt0nrqwf22w0 your server is already there (possibly, if you're using hetzner)
Fabian Giesen profile picture
Every time. I swear CDG is Airport Concentrate. It's "yo dawg I heard you like airports so we put multiple airports inside an airport so you can get lost while you get lost."
Fabian Giesen profile picture
Travel PROTIP: I took to (hand-)writing a checklist before I leave for trips in the early 2010s. On this checklist I write all kinds of things I have never once forgotten to do, but most importantly, I write "throw used coffee filter in the trash", which I had previously forgotten more than once and which is the exact kind of thing whose consequences you don't want to deal with when you arrive tired and jetlagged back home after a 10h+ flight
Fabian Giesen profile picture
Saw a comment of someone mentioning building multiplication on a Z80 using log/exp tables.

Don't! You can do better. Make a 510-entry table of squares (actually, squares divided by 4).

t[x] = (x * x) >> 2

then for 8-bit unsigned a, b, a >= b,

a * b = t[a + b] - t[a - b]

16-bit entries (or, usually, two tables, one for low, one for high bytes) if you want a full 16-bit result, but you can skip the high byte table if you only want low 8b.
Fabian Giesen profile picture
boring regular way:
// Count <= 4
uint MyIndex = WavePrefixSum(Count);

uint MyOutputIndex = OutputPos + MyIndex;
// Write items to [MyOutputIndex, MyOutputIndex + Count) in a list

OutputPos += WaveActiveSum(Count);

sicko mode:
uint MyIndex =
WavePrefixCountBits(Count >= 4) * 4 +
WavePrefixCountBits((Count & 2) != 0) * 2 +
WavePrefixCountBits((Count & 1) != 0);

OutputPos +=
WaveActiveCountBits(Count >= 4) * 4 +
... +
WaveActiveCountBits((Count & 1) != 0);