Erik Bernhardsson Profile picture
Nov 12, 2025 7 tweets 1 min read
There's a lot of buzz about code sandboxes. Which makes sense – coding agents are very useful! However I suspect building a business around it is quite hard. Some thoughts in 🧵 First of all, the code execution itself is definitely hard, but not crazy hard – products like Firecracker and gVisor solve the underlying hard technical problem of isolation.
Jul 8, 2022 10 tweets 2 min read
An exciting technical project we've been working on at modal.com allows us to build a fresh container image, and boot up a lot of containers running that image, on many different nodes, all in a couple of seconds. Some notes on how we do it: 1. You can't use a traditional container registry. Pushing and pulling takes eternities (like 10s or more). Need to do something faster.
May 26, 2022 7 tweets 2 min read
I’m deep in the rabbit hole of optimizing Python imports today. Some notes: 1. Python precompiles and caches bytecode in .pyc files. It validates these by default by checking the modified time of the .py file and uses the cached .pyc if a magic checksum inside it matches the modified time
Nov 19, 2020 4 tweets 1 min read
Some will misinterpret this article as "masks are not effective" so it's worth pointing out that if you're a Bayesian then this should still move your posterior in favor of "masks work". The study would have had to see a -40% reduction to be stat sig. nytimes.com/2020/11/18/hea… And to add to that, the way the study was designed, it will always underestimate the effect in the first place, since they only capture the effect on the people wearing the masks getting infected, not other people around them who also benefit.