Damus
slembcke profile picture
slembcke
@slembcke

Open source Minnesotan, making Veridian Expanse (@vexpanse). I made the Chipmunk2D physics engine, and some other fun libraries. By day, I do a lot of game adjacent work like therapeutic VR, real time drone mapping, and math for heavy machinery.

Relays (1)
  • wss://relay.ditto.pub – read & write

Recent Notes

Tom Forsyth · 3w
nostr:nprofile1qy2hwumn8ghj7un9d3shjtnyd968gmewwp6kyqpq63s862uct8qexxv2f84q6caf6fatzfvpucs2pa48cu3wnupddp7q9wvzdm nostr:nprofile1qy2hwumn8ghj7un9d3shjtnyd968gmewwp6kyqpqh7afgpfv2wvx9eaw0rdmm6sr4lytvc4...
slembcke profile picture
@nprofile1q... @nprofile1q... @nprofile1q... 100% agree. I actually thought the index thing was some idealistic nonsense the first time I ran into it, but the serialization benefit is totally worth it.

Serialization code is the *worst*, and a lot of it just evaporates. What's left is lightning fast.
1
Tom Forsyth · 3w
nostr:nprofile1qy2hwumn8ghj7un9d3shjtnyd968gmewwp6kyqpqz9myc59yadhemq6s3mpsugrdzzfqr55c582tedltugukfwhgtn5se7valu nostr:nprofile1qy2hwumn8ghj7un9d3shjtnyd968gmewwp6kyqpq63s862uct8qexxv2f84q6caf6fatzfvpucs2pa48cu3wnupddp7q9wvzdm nostr:nprofile1qy2hwumn8ghj7un9d3shjtnyd968gmewwp6kyqpqh7afgpfv2wvx9eaw0...
Josh Simmons · 3w
nostr:nprofile1qy2hwumn8ghj7un9d3shjtnyd968gmewwp6kyqpqz9myc59yadhemq6s3mpsugrdzzfqr55c582tedltugukfwhgtn5se7valu plus when you realize you actually need 10k things you can far more easily fix a simpl...
slembcke profile picture
@nprofile1q... Or the off topic analog to that. "[simple programming task] can only be done by programmers because it's in the code. Surely we will hire someone soon who will do this instead let's make a half baked GUI tool + data format + runtime code."

Years later: The programmers are still using that awkward half baked tool instead of writing one liners or editing basic text formats. -_-
Josh Simmons · 3w
nostr:nprofile1qy2hwumn8ghj7un9d3shjtnyd968gmewwp6kyqpqz9myc59yadhemq6s3mpsugrdzzfqr55c582tedltugukfwhgtn5se7valu plus when you realize you actually need 10k things you can far more easily fix a simpl...
slembcke profile picture
@nprofile1q... Oh my gosh yes. That's happened so many times where someone has said, "Nah this 20 lines of code won't be good enough later. Let me _guess_ the requirements we'll have later and design a 1000 line extensible solution now."

Spoilers: The guessed requirements are almost always wrong, and produce abstractions that are a disaster to use with real world problems. -_-
note1w2ffg...
slembcke profile picture
@nprofile1q... @nprofile1q... XML!? Ah noes! :p

Seriously though, to each their own in finding something simple they like. My site is just lightly templated static HTML generated by like ~100 lines of Lua code and the worlds most basic Make file. (I hear angry pitchforks coming for me too!!) I expect it to be trivial to run in 10 or 20 years too.

Jekyll dependencies killed my last site, so this time I went with something really small without hidden dependencies. I can see how XML+XSLT fit that perfectly too.
slembcke profile picture
Yesterday I had my N+1th conversation about how sometimes brute forcing a solution is not only fine, but optimal if you can guarantee N is small. Especially in games where you can just limit N to be like 4 or something.

"AHA! But what if my player puts 1.2 million gems into their sword sockets, and then I need to do an N factorial algorithm on the magic interactions?!" Ok... well, don't let them do that. :p

It's perfectly ok to avoid difficult problems by limiting them to be easy problems!
1
Josh Simmons · 3w
nostr:nprofile1qy2hwumn8ghj7un9d3shjtnyd968gmewwp6kyqpqz9myc59yadhemq6s3mpsugrdzzfqr55c582tedltugukfwhgtn5se7valu plus when you realize you actually need 10k things you can far more easily fix a simple system. as opposed to actually putting 10k things in your fancy complex solution and only then fin...
note1uhlv9...
slembcke profile picture
@nprofile1q... @nprofile1q... @nprofile1q... Yeah, I mean today I find I can mostly get away with dumb fixed sized arrays, and the occasional dynamic array. It’s just not the only data structure I’m willing to use.

Free lists that bump one at a time, lists that are built to be iterated once, or a collection of thousands of small (or mostly zero length lists) where a single one might occasionally be iterated during user input? Meh, intrusive linked lists are just easier.
Tom Forsyth · 4w
It's funny that algo folks still like to talk about linked lists. But these days we avoid them like the plague because they thrash caches and prefetchers. In the 16-bit era, we didn't have either of ...
slembcke profile picture
@nprofile1q... Well, yes but also no. I use them all the time for “cold” lists that get iterated once or rarely, or advance one item and then wait.

You can also mitigate a lot of that sticking the nodes in a fairly compact array and linking them with indexes. I think it was @nprofile1q... that recently pointed out you can even just iterate those in array order in many cases when you don’t care about ordering. (Ex: need to increment every item in an otherwise ordered list)