Per Vognsen
pervognsen@mastodon.social
<p>I like programming and understanding how stuff works. My background is in systems programming and game development.</p>
Posts
-
View post
Almost every time I see saturating add/multiply used to avoid overflows, it&#39;s silently wrong or if it&#39;s only accidentally right (just because a big wrong number from saturation is a safer bound than a small wrong number from wrapping).
-
View post
What is going on in C++ land... &quot;When possible, avoid the u8 prefix. It has significantly different semantics starting in C++20 than in C++17, producing arrays of char8_t rather than char, and will change again in C++23.&quot;
-
View post
What is going on in C++ land... &quot;When possible, avoid the u8 prefix. It has significantly different semantics starting in C++20 than in C++17, producing arrays of char8_t rather than char, and will change again in C++23.&quot;
-
View post
Name something more iconic than the TP7-era color scheme of Turbo Vision: https://free.oberon.org/docs/en/Strings.html
-
View post
The scourge of x86 emulation: https://fex-emu.com/Scourge-of-emulation/. An article on TSO emulation by the FEX devs. When I saw the (excellent!) presentation at CCC on FEX this year my biggest question was about how they were dealing with TSO.
-
View post
An interesting example of parallel discovery: the zero memory widget (ZMW) library released in 2003 (discovered in 2001-2002) vs Casey&#39;s first presentation of immediate-mode UI in 2005 (discovered in 2002). I assume approximately no-one has heard of ZMW. https://perso.univ-lyon1.fr/thierry.excoffier/ZMW/zmw-0.2.4/zmw.html
-
View post
I guess this deserves to be posted on a regular cadence for the benefit of anyone who hasn&#39;t seen it before: https://www.dkriesel.com/en/blog/2013/0802_xerox-workcentres_are_switching_written_numbers_when_scanning
-
View post
As airlines are starting to mass cancel &quot;unprofitable flights&quot; I wonder if I&#39;ll be a victim of that and my early booking back in March for my June trip will turn out to be useless. I understand the moral and legal justification for force majeure in general, but the concept of specifically cancelling _unprofitable_ flights feels predatory.
-
View post
I realized this some months ago but don&#39;t think I mentioned it here: Let variables with exactly-once assignment analysis can support simple type inference just like expression-oriented initialization. You don&#39;t need HM-style constraint solving. It works in a single-pass compiler assuming your subtyping rules are simple enough in their interaction with multiple branches, but that same caveat applies to expression-oriented initialization.
-
View post
With the DRAM shortage, maybe it&#39;s time for RAM Doubler and other assorted scamware to make a comeback. On that note, https://devblogs.microsoft.com/oldnewthing/20211111-00/?p=105897
-
View post
The NBA Jam repo on historicalsource has a bunch of doc files that are a time capsule from 1992. Here&#39;s a fun excerpt, relative to what actually happened: &quot;The NBA has been cautious about entering the European market, it&#39;s understandable. The NBA, it is believed, will grant franchises and expand into Europe within the next few years.&quot; https://github.com/search?q=repo%3Ahistoricalsource%2Fnbajam-complete%20doc&amp;type=code
-
View post
TIL about LLVM&#39;s ExpandInlineAsm via https://discourse.llvm.org/t/rfc-constant-time-coding-support/87781/37 (@lenary) and I&#39;m more than a little horrified. Is nothing sacred?
-
View post
How to recalculate a spreadsheet, https://lord.io/spreadsheets/. Not just about spreadsheets, but any structurally similar system. A great, accessible overview if you don&#39;t feel like diving through the literature.
-
View post
How to recalculate a spreadsheet, https://lord.io/spreadsheets/. Not just about spreadsheets, but any structurally similar system. A great, accessible overview if you don&#39;t feel like diving through the literature.
-
View post
Once again reminding you of The Trick to reduce the critical decoding path of any off-the-shelf variable-length data format. Split each variable-length item into a small fixed-length part that uniquely determines the length of the remaining variable-length part. Then split the fixed-length and variable-length parts into two streams and use prefix sums: https://gist.github.com/pervognsen/547113f6b368317d86110a6bb01ce314