@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.

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, 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

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.

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, to random
@pervognsen@mastodon.social avatar
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, to random
@pervognsen@mastodon.social avatar

It appears that C has a symmetric requirement on the minimum magnitude (32767) of INT_MIN and INT_MAX. I wonder if there are still any 16-bit ones' complement machines humming along in some dark corner of the world.

pervognsen, to random
@pervognsen@mastodon.social avatar

In this episode of "hummus goes with everything", I had some leftover hummus and nothing but Danish rye bread and can report it works well as a spread in the same vein as leverpostej.

pervognsen, to random
@pervognsen@mastodon.social avatar

I stopped paying attention to process nodes around 12 nm but I just noticed Arm Cortex X925 is advertised as designed for a 3 nm process. I'm assuming this has even less to do with lambda than it once did?

pervognsen, to random
@pervognsen@mastodon.social avatar

There's a bunch of C-like successor languages that say they want to eliminate undefined behavior. I've never been able to figure out how they intend to deal with reads and writes to memory since a lot of these languages take what I would call the "naive" machine-centric view of memory which is hard to reconcile with source-level semantics for variables, etc. You can't really rename all of this stuff as "implementation-defined" and get out of jail for free.

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

When a beverage proclaims "naturally & artificially flavored" on its label in bold letters you know they're not hiding anything. Or maybe they're trying to draw attention away from the supernatural flavoring.

pervognsen, to random
@pervognsen@mastodon.social avatar

If you follow the general recipe for F-algebras, the signature for foldr in a strict/non-lazy language like ML would not be ('a * 'b -> 'b) -> 'b -> 'a list -> 'b but ('a * 'b -> 'b) -> (unit -> 'b) -> 'a list -> 'b. It's probably a moot point in this case since the recursion "never does any useful work" until you hit the end of the list and the unit -> 'b thunk is called.

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

Just ran the yyjson benchmark on my laptop (AMD Ryzen 9 5900HX). I've looked a little bit at its code and on the surface it really has no business being this fast considering it uses very few tricks. Time for some careful study...

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

Idle thought: if you cache the min/max key bounds (in a pair of arrays) along the descending path when you do an ordered search tree descent, you can binary search a correlated query key against the nested bounds in O(log(log(n))) time to use as a local root/LCA. In practice binary search isn't necessary for any realistic n, fast linear search is better if you can use SIMD. There are no chained data dependencies for the search, unlike restarting the tree descent from the top.

pervognsen, to random
@pervognsen@mastodon.social avatar

Every once in a while there's a bug on YouTube where I get the comments for the wrong video and it's never not hilarious. Anyone else see this occasionally?

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

For people who've been around much longer, has there been any retrospectives on Rust's decision to allow panics to unwind rather than abort? I've mostly come to terms with it in a practical sense but it's something that really "infects" the language and library ecosystem at a deep level, e.g. fn(&mut T) isn't "the same" as fn(T) -> T and it's especially troublesome if you're writing unsafe library code and dynamically calling code through closures or traits that could potentially panic.

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

Do Apple-exclusive (or Apple-mostly) developers like their tech docs, etc? I always feel like I have a hard time finding anything I want. So much info is buried in WWDC presentations, their own docs are hard to navigate and often don't have what I want, and to top it off they also seem to have poor SEO juice so it's hard to use third-party search engines to find stuff (most of the time I find random blog posts instead).

pervognsen, to random
@pervognsen@mastodon.social avatar

Hundreds of rooks have moved into some trees outside my mom's apartment since I arrived. They start cawing around 4 AM. It's now barely 5 AM and I am wide awake.

pervognsen, to random
@pervognsen@mastodon.social avatar

Downside of Denmark: I'd forgotten all ISPs block scihub, libgen.is, etc. Stuff like this is just a subsidy for all the scammy VPN providers.

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

This looks cool. Basically a polyglot version of go fmt's rewrite rules. https://ast-grep.github.io

pervognsen, to random
@pervognsen@mastodon.social avatar

Somehow I doubt it. Headline: "Microsoft is finally getting its native Windows UI platform act together with WinUI 3 and WPF."

pervognsen, to random
@pervognsen@mastodon.social avatar

I've never fully worked out how best to articulate my dissatisfaction with the usual way people talk about pluggable allocators in systems programming. Sure, I'd like to have some standard for fallible, pluggable allocation at the lower level of a language's standard library. But the entire mindset of plugging together allocators and data structures is something I find dubious and at best it feels like a poor compromise.

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

I assume this isn't a problem for EEs but for CS types who are taught logic gates, etc, in their curriculum I wonder if timing should be included in a first course. I'm still trying to help the person I mentioned earlier in a private chat and it sounds like that's the source of almost all their confusion. They think logic gates are instant and one of the "counterexamples" they came up for why delays seem logically inconsistent is y = xor(x, not(x)). Which is a standard edge detector.

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