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

regehr, to random
@regehr@mastodon.social avatar

new blog post: "Dataflow Analyses and Compiler Optimizations that Use Them, for Free"

https://blog.regehr.org/archives/2578

pervognsen,
@pervognsen@mastodon.social avatar

@regehr @tonofcrates As evidence, Florian Hahn only recently added the Constraint Elimination pass to LLVM and if you look at the code (both the algorithm and its implementation) it's not exactly cutting edge stuff when it comes to solving systems of linear inequalities. Lots of these things haven't really filtered into mainstream production compilers.

pervognsen, to random
@pervognsen@mastodon.social avatar

This is a nice overview of Maranget's algorithm for compiling pattern matching: https://compiler.club/compiling-pattern-matching/

pervognsen, to random
@pervognsen@mastodon.social avatar

burntsushi on the redesign and rewrite of the regex crate (which he also uses in ripgrep): https://blog.burntsushi.net/regex-internals/

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

How much RAM do you have in your dev workstation/laptop?

pervognsen, to random
@pervognsen@mastodon.social avatar

Finally got so fed up with Windows that I installed Arch on my laptop (without the help of archinstall so it was a good learning experience). Gotta say, KDE Plasma 6 has blown me away. A few annoying defaults I had to change (e.g. floating panels as a default) but such a great experience coming from Windows 11: https://kde.org/announcements/megarelease/6/

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

An exposition of (theoretical) derandomization of randomized algorithms. Wigderson received the Turing Award last month for work in this area. https://www.youtube.com/watch?v=mZck0N_T9Cs

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

This GH issue is pretty funny, but seems to have finally gotten the ball rolling on the Wayland side after the threat/worry that SDL 3.0 might not support Wayland natively (more specifically, it would not select SDL's Wayland backend by default) due to some issues that made it untenable for games. https://github.com/libsdl-org/SDL/pull/9345

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

Fire Emblem Fates had some of the most juiced combat animations in any video game in history. Just look at it: https://www.youtube.com/watch?v=XH-WRse7fDw. Aside from classic animation principles like anticipation, follow-through, bounciness, etc, it's also a check list of game design juicing tricks. Fates arguably had too much of this juicing but it still beats the extremely dry combat animations in FE: Three Houses.

pervognsen, to random
@pervognsen@mastodon.social avatar

Digging through old stuff, here's a fairly extreme example of branch predictor training effects in a benchmark of Robin Hood linear probing vs conventional linear probing. Look at the branch misses for 1 vs 1000 outer loop iterations for RH (and the impact on wall clock time): https://gist.github.com/pervognsen/e818251d52f725db7c67e562577a12f6

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

Yes, the RH bench run for 16k lookups (after 1000 outer-loop iterations) is literally branch mispredicting only 45 times (!!!). It has almost perfectly learned the probe length distribution of the 16k keys in order and also which are hits and misses. Once you've seen enough of this stuff in your own microbenchmarks, you stop trusting anyone else's if they have even the slightest signs of potential problems based on their code structure, e.g. outer loop over the same too small/too regular data.

dotstdy, to random
@dotstdy@mastodon.social avatar

the phrase "blazingly fast" really upsets me

pervognsen,
@pervognsen@mastodon.social avatar

@dotstdy It took some deep-breathing meditation to write this reply: https://www.reddit.com/r/rust/comments/1ct42bi/comment/l4afyb0/

pervognsen, to random
@pervognsen@mastodon.social avatar

This classic blog post resurfaced on the Rust subreddit today after someone posted that they wished ownership had been explained to them with a metaphor about pirate treasure chests.

https://byorgey.wordpress.com/2009/01/12/abstraction-intuition-and-the-monad-tutorial-fallacy/

'But now Joe goes and writes a monad tutorial called “Monads are Burritos,” under the well-intentioned but mistaken assumption that if other people read his magical insight, learning about monads will be a snap for them. “Monads are easy,” Joe writes. “Think of them as burritos.”'

pervognsen,
@pervognsen@mastodon.social avatar

@steve @pkhuong @zwarich Multiple-Length Division Revisited: A Tour of the Minefield (1992), Per Brinch-Hansen, https://surface.syr.edu/cgi/viewcontent.cgi?article=1162&context=eecs_techreports

"Only a handful of textbooks discuss the theory and practice of long division, and none of them do it satisfactorily. This tutorial attempts to fill this surprising gap in the literature on computer algorithms."

dotstdy, to random
@dotstdy@mastodon.social avatar

Do airport book stores have a higher percentage of self help books, or am I imagining things

pervognsen,
@pervognsen@mastodon.social avatar

@dotstdy That's absolutely a thing. Aside from bestsellers, it's almost entirely self-help and awful Gladwell-style non-fiction.

dotstdy, to random
@dotstdy@mastodon.social avatar

I feel like the most difficult part of subgroups and GPU programming in general, is getting all the terminology straight in your head. Sometimes it seems like it would be easier just writing rdna asm directly. :')

pervognsen,
@pervognsen@mastodon.social avatar

@dotstdy You know what has never helped? Every IHV and API having their own incompatible terminology!

pervognsen, to random
@pervognsen@mastodon.social avatar

This came up in another thread today but I figure I'd throw a brief comment to the timeline. The concept of "grace periods" where you separate the logical and physical deletion of resources is something you see in RCU, EBR, QSBR, etc, but it's just as useful in single-threaded code where you only have pseudo-concurrency through subroutine calls. Like the age-old pattern of deferring deletion until the end of the game loop, or autorelease pools in Objective C which get drained by the run loop.

dotstdy, to random
@dotstdy@mastodon.social avatar

I've been here a while now, but it still blows my mind how quickly Sweden turns green / colorful in spring time. All the trees explode. Not the same in Australia :')

pervognsen,
@pervognsen@mastodon.social avatar

@dotstdy In Australia the trees still explode but from desiccation?

rovarma, to random
@rovarma@mastodon.gamedev.place avatar

A sure-fire tell that the author of an article doesn't really understand the material they're talking about is when they handwave away the complicated topics with sentences like "This article is already too long" or "To keep it simple".

In the article I'm currently reading:

"For the sake of simplicity, the following example will not use any synchronization technique."

For "simplicity," or because you weren't quite sure how to achieve thread-safety for this particular problem yourself? ;-)

pervognsen,
@pervognsen@mastodon.social avatar

@rovarma Apropos, one of the discussions from earlier today reminded me to revisit an old video from Channel 9 (RIP) on the big-ass lock that was in the Windows scheduler until Windows 7: https://www.youtube.com/watch?v=OAAiOEQhsK0

pervognsen, to random
@pervognsen@mastodon.social avatar

"The algorithm uses exactly the same terminology and is presented in bottom-up form. (If you prefer top-down design, please read the rest of this section backwards.)"

pervognsen,
@pervognsen@mastodon.social avatar

@TomF Well, in this case you'd just need a break or an early return. When you look at a lot of the old articles on GOTO vs structured programming, including Knuth's famous article, they're working in a world where neither break or early return is a thing in structured languages, or at least not considered admissible. Almost all Knuth's examples (as far as I remember) in favor of GOTO are solvable with single-level continue, break or early return. Labeled break/continue probably handles the rest.

asmodai, to random
@asmodai@mastodon.social avatar

Holy shit, Mighty Koi is working on a Thorgal game?

https://www.youtube.com/watch?v=P6aYAhN2I1M

"Thorgal is an adventure action game with RPG elements, set in the world of popular comics created by Grzegorz Rosiński and Jean Van Hamme. Based on a classic, well-known tale cherished by fans, the fantasy storyline aims to provide a modern and engaging adaptation."

pervognsen,
@pervognsen@mastodon.social avatar

@asmodai Aside: I've always fantasized about a series of Tintin point-and-click adventure games with the same kind of quality as the Lucas Arts greats.

dubroy, to random
@dubroy@hachyderm.io avatar

New blog post: Bytecode VMs in surprising places
https://dubroy.com/blog/bytecode-vms-in-surprising-places/

Most people probably associate bytecode VMs with general-purpose programming languages. But sometimes they appear in surprising places!

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

@dubroy Some other examples that feel even less like traditional VMs:

  1. Python's VM for deserialization: https://github.com/python/cpython/blob/main/Lib/pickletools.py#L38
  2. Thompson or Pike's VM for regex matching: https://swtch.com/~rsc/regexp/regexp2.html
  3. Lua's lpeg VM for parsing/pattern matching: https://www.inf.puc-rio.br/~roberto/docs/peg.pdf
fatlimey, to random
@fatlimey@mastodon.gamedev.place avatar

A new number coding contender enters the ring. https://arxiv.org/pdf/2404.18603

image/png

pervognsen,
@pervognsen@mastodon.social avatar

@mbr @fatlimey Here's what an actual "remarkable proximity" looks like in mathematics: https://en.wikipedia.org/wiki/Heegner_number#Almost_integers_and_Ramanujan's_constant

pervognsen, to random
@pervognsen@mastodon.social avatar

I recommend checking out @nakst's https://github.com/nakst/gf gdb frontend, it's minimalistic but already very usable.

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

@slembcke @nakst What I liked instantly is that the UI is in line with what I want in a debugger (the reason I was dusting off my old dbg.el experiment yesterday was that I was trying to muster the energy to do my own frontend) more so than having every conceivable feature, so if that's what you expect, you might be disappointed. But it looks very easy to hack features into if you need them (minimalistic C codebase, custom UI) and the gdb prompt is always there.

fanf, to random
@fanf@mendeddrum.org avatar

2021 retro-link! https://github.com/arnoldrobbins/cstr100 - Why Pascal is Not My Favorite Programming Language. (troff source)

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

@fanf That article (more specifically, the people sharing it as a conclusive take-down of Pascal) used to annoy the hell out of me. I grew up with Turbo Pascal and its spiritual successors before switching to C and most of the complaints did not apply at all.

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

@fanf I'd love to see someone write Colliding Insecure Hashes. There was a great Wordpress blog from years ago (I wish I could find it again) where a cryptographer showed how to trivially break a lot of proposed amateur hash functions and it was very instructive and very, very rarely required anything fancy.

Edit: Found him! It was this guy. https://littlemaninmyhead.wordpress.com/2015/09/28/so-you-want-to-learn-to-break-ciphers/.

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