researcher @google; serial complexity unpacker;
https://t.co/Vl1seeNgYK
ex @ msft & aerospace
11 subscribers
Sep 3 • 5 tweets • 3 min read
It’s time to get rid of frame rates.
In weird corners of the internet, researchers and standards committees discuss frameless video containers.
Sensor data as a continuous function, down-sampled to any frame rate you want.
Here's what it'll look like in 10 years:
There’s two schools of thought, depending on the crowd you hang around.
NeurIPS folks tend to like continuous-time fields (software).
Hardcore EE types discuss event-based sensing (hardware, timestamps).
Bear with me, it's easier than it sounds:
Sep 2 • 5 tweets • 3 min read
Much like humans, CPUs heal in their sleep.
CPUs are *technically* replaceable / wear items. They don’t last forever.
Yet, the moment stress is removed, transistor degradation (partially) reverses.
It's called Bias Temperature Instability (BTI) recovery:
Transistors are little switches.
When you hold a switch on, especially when it’s hot, a bit of charge gets stuck where it shouldn’t.
Every time that happens, it gets a little bit harder to switch.
In other words, the transistor gets a little “lazier”.
Aug 29 • 4 tweets • 3 min read
I’ve been on a filesystem kick, and it’s interesting to see the DNA of older ideas pop up in modern designs.
BeFS was crazy in the 90s; the whole architecture was basically a searchable database.
Skimming through their book…it sounds a lot like current Apple FS design.
Turns out there’s a good reason for that.
“Practical File System Design”, was written by Dominic Giampaolo in 1999, for BeOS.
Giampaolo joined Apple in 2002, where he became lead architect for…APFS.
Released in 2016, it's funny to see the same ideas 17 years later.
Aug 21 • 4 tweets • 2 min read
Why do most uninterruptible power supplies still use old, lead-acid battery tech?
Nearly every battery in your house (phone, watch, even electric car) is lithium based...except UPSs.
It all has to do with battery chemistry. Lead-Acid has some unique advantages:
Contrary to what you might think; lithium batteries are not a “straight upgrade”.
Lead-Acid handles being “floated” at near ~100% capacity for years.
Considering UPS’s spend 99.9% of their life sitting at full charge…waiting for an outage, it's an ideal use-case.
Aug 19 • 4 tweets • 2 min read
The West has a blindspot when it comes to alternative CPU designs.
We’re so entrenched in the usual x86, ARM, RISC-V world, that most people have no idea what’s happening over in China.
LoongArch is a fully independent ISA that’s sorta MIPS…sorta RISC-V…and sorta x87!
Of course, Loongson (the company) realizes that most software is compiled for x86 and ARM.
Thus, they decided to add some hefty translation layers (LBT) built into the hardware.
LBT gives you for extra scratch registers, x86+ARM eflags, and an x87(!) stack pointer.
Aug 15 • 5 tweets • 3 min read
lp0 is a Linux error code that means “printer on fire.”
It’s not a joke. In the 50s, computerized printing was an experimental field.
At LLNL (yes, the nuclear testing site), cathode ray tubes created a xerographic printer.
...it would occasionally catch fire.
State-of-the art at the time, the printer was modified with external fusing ovens hit a whopping…
1 page per second!
In the event of a stall, fresh paper would continuously shoot into the oven, causing aggressive combustion.
Aug 14 • 4 tweets • 3 min read
PCI link bus designs are incredibly complex.
Standard FR-4 PCB material is basically at its limit. Every year it's harder to keep up with the new standards.
At what point do we flip the architecture on its head...
GPU as the motherboard, CPU as the peripheral?
It’s not a new idea.
In the pentium era, Intel created Single Edge Contact Cartridges (SECC).
Instead of being socketed, the CPU was basically slapped on a glorified RAM stick.
Later abandoned due to cost and cooling issues, in the modern era it's starting to make sense.
Aug 13 • 4 tweets • 2 min read
Is your compiler a boy or a MAN?
Created by Donald Knuth, it’s a test to check if recursion is implemented properly.
Originally written in ALGOL 60, a precursor to C, but can adapt to nearly any language.
It really stresses the stack and heap, pushing insane call depths:
It’s a fun little program that creates an explosion of self-referential calls in just a few lines of code.
At a recursion depth of 20, the call stack already hits the millions!
Keep in mind, this test was designed in the 1960s; yet even modern systems struggle.
Aug 6 • 4 tweets • 3 min read
Ring 0 is a highly-privileged state on CPUs.
Negative Ring Levels have even *higher* privilege. You just haven’t heard of them.
For X86, Ring -1 is Hardware Virtualization, Ring -2 is System Management Mode, Ring -3 is Intel ME / AMD PSP.
Arm get's even weirder:
Negative rings are mostly due to X86 being really old; as the ISA got more complex, we got "above 0" states.
Armv8 moves in a positive direction; higher numbers have more privilege. From EL0 (user space) to EL3 (State-Switching).
Apple does something extra funky:
Aug 2 • 4 tweets • 2 min read
An early rule you learn in computer science is:
“Never store currency as floats”
Nearly every popular language has special, built-in types for money. But why?
The *majority* of money-like numbers have no float representation, accumulating to massive errors over time:
Go ahead and try this. Let’s add three dimes. Open up a python terminal, and type in:
0.10 + 0.10 + 0.10
Uh oh. See that little remainder?
It may seem trivial, but this mistake happens more often than you’d expect!
Jul 30 • 4 tweets • 2 min read
Programming Languages used to be designed as powerful as possible.
Maximum possible utility given hardware constraints.
The pro move is to choose the *least* powerful, non-Turing-complete solution.
The entire web exists because of the Principle of Least Power:
Don’t take my word for it. Tim Berners-Lee (inventor of HTML, HTTP, etc) had this to say:
“the less powerful the language, the more you can do with the data...”
HTML is purposefully *not* a real programming language.
The constraint pushed innovation to data processing.
Jul 29 • 4 tweets • 2 min read
When you make a Bank ACH transaction, it’s literally just an SFTP upload.
Sent as a NACHA file, it's 940 bytes of ASCII text.
Bank-to-Bank transactions cost ~0.2 cents. As long as it travels via encrypted tunnel; it’s compliant!
Here’s how the quirky system works:
Chase offers a sample NACHA file to look at.
Notice the rows padded with 9s. It’s an artifact of a 1970s rule about magnetic tape, "always fill the block".
To this day, total line count *must* be a multiple of ten; otherwise the bank will drop the transaction.
Jul 28 • 4 tweets • 2 min read
Intel’s not doing so hot lately. Meanwhile vendors are killing it at the RISC-V Summit in China.
One CPU got a specint2006/GHz rating of 10.4/GHz!
To put it in perspective, a i7-4790k (Haswell) scores 8.1/GHz.
RISC-V is hitting high-end desktop territory FAST:
No one realizes how quickly a CPU supply chain; completely independent of western IP is progressing:
Not long ago RISC-V performance was a joke.
Now it’s trading blows with x86 and high end ARM!
In another generation or two it’s going to be a *serious* contender.
Jul 22 • 5 tweets • 3 min read
Fading out audio is one of the most CPU-intensive tasks you can possibly do!
Values that get close (but not quite) zero, hit an underflow gap known as "Subnormal" range.
It’s a mathematical conundrum so tricky, both x86 and ARM made special CPU instructions just to handle it!
In computer science, mathematical real numbers are approximated by floating-point representations.
For a single 32-bit float, the smallest “normal” positive we can hold is 1.17 × 10^-38
Tiny differences could get rounded off, leading to later Divide by Zero errors!
Jul 21 • 4 tweets • 2 min read
Windows is one massive (private) Git repo.
When I was at MS, the Windows Source had around ~3k PRs a day!
Regular Git didn’t scale to those levels at the time.
Internally there was a progression from Git -> GVFS -> Scalar -> merge back to Git. Here's how it worked:
Cloning Defender’s antivirus repositories alone would take a full day!
You may be wondering how we dealt with merge conflicts.
Teams were heavily siloed, with most of the effort put up front on the build process.
Syntax and such was checked with local builds before pushing.
Jul 14 • 5 tweets • 3 min read
Microsoft took ~30 years to be compliant with the C++ standard!
Seriously. From 1993 to 2020, MSVC’s preprocessor wasn’t feature-complete.
Code that compiles perfectly on Linux often broke.
Hold your judgement; there's some interesting historical nuance:
A tech race in the 80s led to unfixable debt.
Official standards wouldn’t exist until 1998.
MS engineers made “best guesses”, but they were competing with others (Borland, Watcom) for the C++ compiler market.
"We'll clean it up after capturing market share".
Jul 10 • 4 tweets • 2 min read
There’s a cursed C++ competition where programmers try to create the largest possible error message.
Finalists created ~1.5GB of error messages from just 256 bytes of source.
Preprocessor exploits were so easy, they had to create a separate division! Here's my favorites:
One contestant experimented with C-Reduce; a way to search for C++ programs that create unusual compiler behavior.
Maximizing the fitness function for error as a reward, no templates, no pre-processor hacks.
Just nested parenthesis causing exponential error output!
Jul 9 • 5 tweets • 3 min read
What happens when you freeze a process *perfectly*? RAM, VRAM, network, everything.
Imagine:
- Live-migrations of LLM training jobs
- time-travel debugging
- Surgical repairs of a crash moments before segfault
It’s called CRIU, and it’s already here:
It starts with a mad Russian.
At least, that’s what a lead linux kernel dev called it:
“a project by various mad Russians to perform c/r mainly from userspace, with various oddball helper code...I'm less confident than the developers that it will all eventually work”
Jul 7 • 4 tweets • 3 min read
Humans live at 10 bits per second.
The brain takes in ~11 million bits per second of sensory data, yet the inner conscious workspace is massively compressed.
Most people speak at ~40 b/s. How can we speak faster than we can think?
It's all about error correction:
Speech may exceed the cognitive speed limit, but most of the bits are redundant.
Language is designed to withstand noise and mis-hearing. The 40bit “raw rate” is predictable from context.
A Caltech study shows the effective payload collapses to <13 b/s when stripped.
Jul 5 • 4 tweets • 2 min read
Whole-home lithium power used to be a rich man’s game.
Now it’s “high-end graphics card” territory.
This is a $2500, lithium polymer battery that would power an entire US residential house for >24hr.
China is *crushing* it on kilowatt hours per dollar.
Let’s put it into perspective. That battery is 2x the kWh of a tesla powerwall 3.
Each powerwall will set you back $15k a piece.
Residential battery setups usually cost $1000 per kWh.
This is $80 per kWh.
Jul 4 • 4 tweets • 2 min read
Ubuntu’s next version won’t work on 90% of current RISC-V computers.
Got a raspberry-pi style RISC-V board? Yeah, not gonna work.
This isn't a bad thing.
It’s actually a genius move that will force the industry in the right direction; helping consumers in the process.
Here’s the problem with a debian-style “we support everything” mentality:
Many board makers slap cheap, borderline out-of-spec Chinese RISC-V CPUs onto a PCB and call it a day.
The bare minimum for a functional OS.
Many are riddled with hardware-level vulnerabilities (c908)!