@pervognsen@mastodon.social avatar

pervognsen

@pervognsen@mastodon.social

Performance, compilers, hardware, mathematics, computer science.

I've worked in or adjacent to the video game industry for most of my career.

This profile is from a federated server and may be incomplete. Browse more on the original instance.

wingo, to random

they have been playing us for fools &c &c &c

pervognsen, (edited )
@pervognsen@mastodon.social avatar

@wingo Oh dear. (This looks like something I would be very interested in, though!)

pervognsen, (edited )
@pervognsen@mastodon.social avatar

@wingo Uh, some kind of interval/range analysis? The locks and daggers are a nice touch. Needs more skulls and bombs, though.

joew, to random
@joew@hachyderm.io avatar

Turns out intermittently restarting a server with stochastic service times operating on a queue can improve service times and fairness. I love a good, simple and counter intuitive solution.

“To implement resetting, imagine this server being stopped intermittently and then restarted – thus, jobs whose service has been reset are now assigned fresh service times.”

https://arxiv.org/abs/2404.08961

pervognsen,
@pervognsen@mastodon.social avatar

@joew "Have you tried turning it off and on again... randomly"

tobinbaker, to random

Just noticed that Github code search doesn't work anymore if you're not logged in. Enshittification proceeds apace.

pervognsen,
@pervognsen@mastodon.social avatar

@tobinbaker IIRC, they started that restriction a long time ago.

pervognsen, to random
@pervognsen@mastodon.social avatar
pervognsen,
@pervognsen@mastodon.social avatar

@dougall @rygorous @chipsandcheese Fabian explained that to me a while back and he pointed to a chapter in one of the Intel manuals which had a surprising amount of detail IIRC.

pervognsen,
@pervognsen@mastodon.social avatar

@rygorous It's a little light on details but I trust your judgement and/or foreknowledge.

pervognsen, (edited )
@pervognsen@mastodon.social avatar

I wonder how long it will be before we hear concrete rumors about APX and AVX10 based chips from Intel. The closest thing I heard to a concrete rumor was that the first APX-based product was in the 2028 roadmap.

chandlerc, to random
@chandlerc@hachyderm.io avatar

Playing with "overflow byte" approach to metadata+simd augmented hashtable design.

I've read that this is part of the F14 design, but I found the explanations for Boost's new unordered_flag_map to be what got the point across.

I implemented the core of this in my own way on top of my hashtable -- rather than stealing a byte from the metadata the way Boost does, I just tack on an array of 1-byte-per-group "probe markers" (a term that makes more sense to me than "overflow byte".

pervognsen,
@pervognsen@mastodon.social avatar

@chandlerc It sounds like a Bloom filter from your description. Specifically, those bits are a Bloom filter for the keys that aren't in the group itself (since the group was already filled) but whose probe sequence goes through that group?

pervognsen, to random
@pervognsen@mastodon.social avatar

@dneto Am I reading this correctly as WebGPU not defining a fill rule? Hopefully just an oversight. "Fragments are associated with pixel centers. That is, all the points with coordinates C, where fract(C) = vector2(0.5, 0.5) in the framebuffer space, enclosed into the polygon, are included. If a pixel center is on the edge of the polygon, whether or not it’s included is not defined. NOTE: this becomes a subject of precision for the rasterizer."

pkhuong, to random

After ~4 years, I actually handled poisoned locks for the first time! I have a sequence number + 2 copies thing for lock-free snapshots, but writers must serialise. The write mutex doesn't really protect any invariant, except that we mustn't interleave write sequences. Interruption is fine, as long as the interrupted writer never resumes.

pervognsen, (edited )
@pervognsen@mastodon.social avatar

@tobinbaker @pkhuong I've been trying to remember a paper and for a second (until I flipped through it) I thought it might have been this one. Maybe y'all can help me. It was some sort of paper on a general approach to implementing wait-free helping which involved deterministic replays of a load/store-level log (either to help a non-dead thread or to take over for a dead thread).

pervognsen,
@pervognsen@mastodon.social avatar

@tobinbaker @pkhuong Thanks, that was the keyword I needed! It looks it's this one I remembered: https://arxiv.org/abs/2201.00813

pervognsen, (edited ) to random
@pervognsen@mastodon.social avatar

The top-left fill rule in rasterization is lexicographic:

is_left = dy > 0
is_top = dy == 0 && dx > 0
is_top_left = is_left || is_top

This is equivalent to (dy, dx) > (0, 0) with lexicographic ordering.

pervognsen, (edited ) to random
@pervognsen@mastodon.social avatar

While I'm commenting on rasterization, you can do perspective-correct interpolation with non-normalized barycentric coordinates (a, b, c) by interpolating (a/w, b/w, c/w) and then normalizing the barycentric coordinates per pixel by dividing by their sum. The conventional approach is to interpolate (a/w, b/w, 1/w) and then you can solve for c in terms of a and b if needed. The conventional approach is slightly more efficient. You get a reference scale: either a + b + c or 1.

pervognsen, to random
@pervognsen@mastodon.social avatar

Precompiling shaders...

pervognsen, (edited ) to random
@pervognsen@mastodon.social avatar

This is anecdotal but I don't think I've run a high-end Windows game yet on Linux/Proton that didn't run better than it did on Windows. It's kind of silly.

pervognsen, (edited ) to random
@pervognsen@mastodon.social avatar

Left-to-right top-down parsers prefer separators over terminators. Consider:

// (',' item)*
while token is comma {
parse_comma()
parse_item()
}

// (item ';')*
while token in first(item) {
parse_item()
parse_semicolon()
}

The terminator does not play an active role in predictive parsing. It only exists to prevent first/follow conflicts for item. (It's also useful for Wirth-style error recovery.)

pervognsen, to random
@pervognsen@mastodon.social avatar

Pointers to pointers are good for you. Here's how to build a DFS tree:

void push(void) {
*path++ = node;
*link = node = end++;
link = &node->down;
}

void pop(void) {
*link = 0;
link = &node->next;
node = *--path;
}

pervognsen,
@pervognsen@mastodon.social avatar
pervognsen, (edited ) to random
@pervognsen@mastodon.social avatar

I was randomly reminded of this by a stray mention of Sebastian Thrun. Back when Udacity started one of the first courses was Peter Norvig's Design of Computer Programs. It was great. Basically a whole course of short, well-produced video walkthroughs of problems and solutions in the vein of his classic https://norvig.com/spell-correct.html combined with programming exercises. Highly recommended: https://www.udacity.com/course/design-of-computer-programs--cs212

svat, to random
@svat@mathstodon.xyz avatar

Wrote up a quick post mentioning Don Knuth's latest toy program he put up on his website: https://shreevatsa.net/post/dek-partition-square/ (Mostly just some context and explaining what the problem is; for anyone who'd like to just read the actual program directly, I have a typeset version at: https://shreevatsa.github.io/knuth-literate-programs/programs/perfect-partition-square.pdf )

pervognsen,
@pervognsen@mastodon.social avatar

@amonakov @svat Yeah, I remember someone (it might even have been you) pointed that out to me, maybe when that original Knuth thread on twitter happened. That was definitely news to me at the time.

pervognsen, to random
@pervognsen@mastodon.social avatar

No need to fear, the optimizing compiler is here:

mov r8d, 1
test r8, r8
jne .LBB1_2

pervognsen,
@pervognsen@mastodon.social avatar

@rygorous "What about now? Okay, what about now?"

pervognsen,
@pervognsen@mastodon.social avatar

If I had to guess, it's a pass ordering issue related to the jump threading pass. If anyone who knows LLVM better wants to take a look, be my guest: https://rust.godbolt.org/z/Yh5f3195T

pervognsen, to random
@pervognsen@mastodon.social avatar

I switched from Windows to Linux not directly because of the most recent shit show with Recall (though it's part of the general trend). But it sure does make me feel even better about making that choice when I'm struggling with some minor annoyance on Linux.

pervognsen, (edited )
@pervognsen@mastodon.social avatar

@wolfpld @SonnyBonds I'm very tempted to try btrfs next time around just for snapshots. Have you used it?

pervognsen, (edited ) to random
@pervognsen@mastodon.social avatar

The fact that plugging a PS4 controller into my computer changes the default sound output device to the tiny speaker in the controller is very confusing for a few seconds whenever it happens.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • InstantRegret
  • mdbf
  • ethstaker
  • magazineikmin
  • cubers
  • rosin
  • thenastyranch
  • Youngstown
  • osvaldo12
  • slotface
  • khanakhh
  • kavyap
  • DreamBathrooms
  • provamag3
  • Durango
  • everett
  • tacticalgear
  • modclub
  • anitta
  • cisconetworking
  • tester
  • ngwrru68w68
  • GTA5RPClips
  • normalnudes
  • megavids
  • Leos
  • lostlight
  • All magazines