LaurieWired's Avatar

LaurieWired

@lauriewired.bsky.social

researcher @google; serial complexity unpacker ex @ msft & aerospace

5,435 Followers  |  1 Following  |  975 Posts  |  Joined: 20.11.2024
Posts Following

Posts by LaurieWired (@lauriewired.bsky.social)

This C code should be ILLEGAL.  It's also fantastic.
YouTube video by LaurieWired This C code should be ILLEGAL. It's also fantastic.

here's my full breakdown / reverse engineering of some of the last contest's winners (go to ioccc . org to submit an entry yourself!)

www.youtube.com/watch?v=by53...

03.03.2026 05:05 โ€” ๐Ÿ‘ 19    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Video thumbnail

Thereโ€™s just about ~10 days left to make a submission to one of my favorite programming contests:โ€จโ€จ

The International Obfuscated C Code Contest!

โ€จHighly encourage you to take a peek and enter, it really brings out some of the best programmers (and compiler wizards).

03.03.2026 05:05 โ€” ๐Ÿ‘ 73    ๐Ÿ” 7    ๐Ÿ’ฌ 4    ๐Ÿ“Œ 0

hmm, interesting, but it does seem like a bit of funny marketing ha.

L0 seems to be a renamed, more efficient L1

02.03.2026 18:55 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Post image

The logic was essentially, hey system fonts are pretty good nowโ€ฆwhy not just default to whatโ€™s native?โ€จโ€จ

Apple getโ€™s apple fonts. Windows getโ€™s windows fonts.โ€จโ€จ

Thereโ€™s a great blogpost from Mark Otto, GitHubโ€™s director of design about the switch:โ€จ
markdotto.com/blog/github-...

02.03.2026 18:45 โ€” ๐Ÿ‘ 38    ๐Ÿ” 1    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Post image

Hence, the early web was veryโ€ฆTimes New Roman-y.โ€จโ€จ

Github was arguably one of the first major players to go *against* the custom font / FOUT hell of the mid 2010s.

โ€จโ€จIn mid 2017, they essentially re-adopted the 90s method of using direct system fonts!

02.03.2026 18:45 โ€” ๐Ÿ‘ 31    ๐Ÿ” 0    ๐Ÿ’ฌ 2    ๐Ÿ“Œ 0
Post image Post image

FOUTs were essentially unheard of in the 90s. โ€จโ€จThe entire world basically defaulted to web-safe fonts.โ€จ

In the rare instance someone got fancy with something non-standard, the browser would just fallback to a default.โ€จ

This didnโ€™t really change until 2010!

02.03.2026 18:45 โ€” ๐Ÿ‘ 22    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Post image

First, ignore JavaScript for a second.โ€จ

Even with plain HTML+CSS, itโ€™s quite common to get FOUTs these days.

โ€จFOUT = Flash of Unstyled Text.

AKA temporarily load a system-native font, then when the custom font finally rolls in, "snap" to the new font.

02.03.2026 18:45 โ€” ๐Ÿ‘ 22    ๐Ÿ” 0    ๐Ÿ’ฌ 2    ๐Ÿ“Œ 0
Video thumbnail

Websites today load wildly differently than in the 90s.

Arguably, worse.

The HTML spec was designed to be read sequentially, so text used to stream in, then display instantaneously. Basically, read -> paint.

A lot of todayโ€™s modern weirdness comes fromโ€ฆfonts.

02.03.2026 18:45 โ€” ๐Ÿ‘ 84    ๐Ÿ” 3    ๐Ÿ’ฌ 3    ๐Ÿ“Œ 0

From AMD, more on the performance side:โ€จ
โ€œImproving the Utilization of Micro-operation Caches in x86 Processorsโ€โ€จโ€จ

The other is more security angle + some interesting timing attacks:โ€จ
โ€œUC-Check: Characterizing Micro-operation Caches in x86 Processors and Implications in Security and Performanceโ€

27.02.2026 19:42 โ€” ๐Ÿ‘ 25    ๐Ÿ” 1    ๐Ÿ’ฌ 2    ๐Ÿ“Œ 0
Post image

The smaller pieces are thus able to fit entirely in the uOP cache, avoiding thrashing the decoder constantly.

There are quite a few papers on the subject, but these two give a really nice overview:

27.02.2026 19:42 โ€” ๐Ÿ‘ 21    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Post image

99% of programmers shouldnโ€™t care; but those who squeeze the absolute maximum last bit of performance out of x86 pay attention.โ€จ

Loop Fission is an interesting technique, where you spit up a complex loop into multiple smaller sequential ones.

27.02.2026 19:42 โ€” ๐Ÿ‘ 20    ๐Ÿ” 0    ๐Ÿ’ฌ 2    ๐Ÿ“Œ 0
Post image

x86 โ€œlooksโ€ CISC, but all of the engine is RISC underneath.

You donโ€™t *want* to wake up the decoder if you donโ€™t have to. It wastes about ~6 cycles + extra power.

Usually, the compiler aligns everything for you...as long as your loop is small enough.

27.02.2026 19:42 โ€” ๐Ÿ‘ 20    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Post image

There is one problem though.โ€จโ€จ

You canโ€™t see it.โ€จโ€จ

Well, not directly at least. Youโ€™ll never find uOPs in the binary.โ€จโ€จ

But! You can see the โ€œshapeโ€ of it with performance toolsโ€ฆand there are subtle tells in the binary as well (hint, some nops).

27.02.2026 19:42 โ€” ๐Ÿ‘ 22    ๐Ÿ” 0    ๐Ÿ’ฌ 3    ๐Ÿ“Œ 0
Post image Post image

Most programmers are taught that L1 is the โ€œtop levelโ€ cache on x86.โ€จ

Itโ€™s not quite true anymore!

โ€จIntel calls it the Decoded Stream Buffer (DSB), AMD the OpCache.

Only enough room for ~4,000 micro-ops, but there are interesting ways to take advantage of it.

27.02.2026 19:42 โ€” ๐Ÿ‘ 150    ๐Ÿ” 18    ๐Ÿ’ฌ 4    ๐Ÿ“Œ 1

hahaha

25.02.2026 22:13 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Preview
Random number generators: good ones are hard to find | Communications of the ACM Practical and theoretical issues are presented concerning the design, implementation, and use of a good, minimal standard random number generator that will port to virtually all systems.

(side note: most rand() implementations moved on to other LCGs, or mersenne twisters and suchโ€ฆbut itโ€™s arguable that 16807 is still quite ubiquitous!)

Original Paper if youโ€™d like to read:โ€จdl.acm.org/doi/10.1145/...

25.02.2026 22:13 โ€” ๐Ÿ‘ 31    ๐Ÿ” 0    ๐Ÿ’ฌ 2    ๐Ÿ“Œ 0
Post image

Itโ€™s kind of funny that so few listened. FreeBSD was still using 16807 in rand() all the way until 2021!

โ€จโ€จSo if you ever see that constant in disassembled codeโ€ฆnow you know :)

25.02.2026 22:13 โ€” ๐Ÿ‘ 41    ๐Ÿ” 0    ๐Ÿ’ฌ 2    ๐Ÿ“Œ 0
Video thumbnail

That fits nicely in 32-bit hardware. Only a few instructions.โ€จโ€จ

Apple put it in CarbonLib, FreeBSD also used it; for a few decades it was kind of everywhere.โ€จโ€จ

A few years later they discovered that 48271 was a little better.

Specifically, a bit more even on spectral tests up to 6 dimensions.

25.02.2026 22:13 โ€” ๐Ÿ‘ 24    ๐Ÿ” 0    ๐Ÿ’ฌ 2    ๐Ÿ“Œ 0
Post image

They werenโ€™t really trying to make a perfect algorithm; it was more about being โ€œreasonably good and efficientโ€.
โ€จ
Called the minimal standard, itโ€™s a quick little multiplication routine, just one line:

x = seed ร— 16807 mod 2^31 - 1

25.02.2026 22:13 โ€” ๐Ÿ‘ 25    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Post image Post image

Today it feels trivial, but for decades random number generation was REALLY bad. Mostly IBM's fault.

โ€จTwo researchers, Park + Miller got so sick of bad RNGs, they released a paper to the ACM in 1988 titled:โ€จ

"Random Number Generators: Good Ones Are Hard to Find."

25.02.2026 22:13 โ€” ๐Ÿ‘ 29    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Post image Post image

16807 is a very special number in Computer Science.โ€จโ€จ

You can find it in the Playstation 5 (freebsd 11), almost every Mac Classic game, and even the C++11 standard!โ€จ

Give it the right prime number, you can produce an evenly distributed sequence for over 2 BILLION values.

25.02.2026 22:13 โ€” ๐Ÿ‘ 104    ๐Ÿ” 14    ๐Ÿ’ฌ 2    ๐Ÿ“Œ 0
Post image Post image

The original title of the paper if you want to search:โ€จ

โ€œImplications of the Turing completeness of reaction-diffusion models, informed by GPGPU simulations on an XBox 360: Cardiac arrhythmias, re-entry and the
Halting problemโ€

23.02.2026 19:27 โ€” ๐Ÿ‘ 28    ๐Ÿ” 2    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Post image

Boom. Thousands of simulated cardiac cells running at high speed on a single box.โ€จโ€จ

A fun benefit, you get visualizations for โ€œfreeโ€ by tacking on a little render code to the end of the sim.โ€จโ€จ

Itโ€™s certainly an entertaining read, even if the utility is questionable.

23.02.2026 19:27 โ€” ๐Ÿ‘ 17    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Post image

So why the Xbox 360?โ€จโ€จ

Mostly, computational bang for the buckโ€ฆI also speculate they were trying to be funny. Consoles were somewhat lopsided in that era, you genuinely got a ton of compute if you knew how to use it.

The author writes some C++ for the simulation, ports some of it to HLSL shaders.

23.02.2026 19:27 โ€” ๐Ÿ‘ 15    ๐Ÿ” 0    ๐Ÿ’ฌ 2    ๐Ÿ“Œ 0
Post image

Now that youโ€™ve proven cardiac tissue is Turing complete, uh oh, itโ€™s vulnerable to the Halting problem.

Thus, there is no general algorithm that can look at the state of cardiac tissue and decide if it will ever stop.

Arrhythmias are fundamentally uncomputable!

23.02.2026 19:27 โ€” ๐Ÿ‘ 16    ๐Ÿ” 3    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 1
Post image Post image

The author figured out you can build a NOR gate from heart cells.โ€จ

NOR is a universal gate, so you can build all the other gates out of NORs.โ€จ

Thus, arbitrary logic circuits, plus timeโ€ฆboom you have a computer.

But wait! Computers have interesting properties:

23.02.2026 19:27 โ€” ๐Ÿ‘ 12    ๐Ÿ” 0    ๐Ÿ’ฌ 2    ๐Ÿ“Œ 0
Post image Post image

The human heart is a Turing Machine.

Researchers figured it out with an Xbox 360.โ€จ

I realize how fake that sounds...but itโ€™s real research published in Elsevier's Computational Biology and Chemistry journal in 2009.

Hearts are electrically excitable media.

23.02.2026 19:27 โ€” ๐Ÿ‘ 77    ๐Ÿ” 8    ๐Ÿ’ฌ 5    ๐Ÿ“Œ 2
Post image

god i wish there was an easier way

21.02.2026 08:21 โ€” ๐Ÿ‘ 133    ๐Ÿ” 3    ๐Ÿ’ฌ 13    ๐Ÿ“Œ 0

what do you mean by detector? like the actual image sensor?

I'm unfamiliar with the astrophotography world so I'm not sure how big they really get.

The physically largest image sensors I've seen are medium format...but I'm sure they go larger for other applications

19.02.2026 20:11 โ€” ๐Ÿ‘ 2    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

Probably the most comprehensive paper Iโ€™ve seen on the overall subject of sensor noise is from MDPI, โ€œThe Geometry of Noise in Color and Spectral Image Sensorsโ€โ€จโ€จ

Check it out here:โ€จ
www.mdpi.com/1424-8220/20...

19.02.2026 19:27 โ€” ๐Ÿ‘ 19    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0