If you subscribe to many programming blogs, chances are you've come across a post describing someone's move off GitHub. They started as far back as the Microsoft acquisition in 2018, but they've increased in frequency recently. Both the Zig programming language and Leiningen build tool wrote about their move to other platforms late last year. I've drawn inspiration from these…
Let's say I'm ordering burritos for my two friends while they quarantine in Jersey City, and want to calculate the total price of my order: It's a little confusing to follow the flow of data in a spreadsheet when it's written like that, so I hope you don't mind this equivalent diagram that represents it as a graph: We're rounding the cost of an El Farolito super vegi…
Some of you may know I quit my job to work on a little text editor for fun. Unfortunately, in the process of doing that, I got distracted by the challenging problem of self-adjusting computation . And unfortunately, to solve that problem in a performant way, you need really fast graphs, a notorious problem in Rust. And to get really fast graphs, I've found this cursed technique that takes…
In 2006, Robert Andersen sent the first tweet that @mentioned another user , and an internet convention was born. In a world without smartphones, Twitter's primary interface was SMS. There were no threads, no @username autocomplete. If a user said something and you wanted to reply, your only option was to compose a new text to 40404, manually typing the @mention into your phone's SMS…
Alexis Beingessner's Text Rendering Hates You , published exactly a month ago today, hits very close to my heart. Back in 2017, I was building a rich text editor in the browser. Unsatisfied with existing libraries that used ContentEditable, I thought to myself "hey, I'll just reimplement text selection myself! How difficult could it possibly be?" I was young. Naive. I estimated it would…
"Come back to Recurse Center!" they told me. "You'll get to write all sorts of cool code!" they said. Well I just spent two weeks writing exactly zero lines of code. It's a great feeling, seeing everyone around you create beautiful 3D graphical masterpieces or fully complete web applications while you spend twelve hours a day struggling to read technical papers that you don't even…
Recurse Center has this fantastic HP7440A plotter from the eighties. Using only a few simple commands — select pen, pen up, pen down, and move to position — we can draw very precise shapes with a pen. Yesterday, I wrote a utility in Rust that converts a font file and some text into plotter instructions. Once I had that code linted, reviewed, and nicely formatted, I immediately inlined all…
Sous-vide cooking is a lot of fun. Food is vacuum sealed and cooked for many hours in a water bath at a specific temperature, usually something like 140°F, far below boiling. Meat becomes really juicy, eggs become creamy, and you can do all sorts of fun precision cooking. However, cookers on Amazon cost $100–200, which if you ask me, is a scam. I've also seen instructions online for…
Most quadcopters are powered by brushless motors . These have major advantages over brushed motors : less friction, less noise, and no brushes that need replacement. However, these advantages come at a cost — while brushed motors can be powered by a simple direct current, brushless motors require some sort of complicated, changing AC current. No idea how that works. Fortunately for us, we can just…
This November is the one year anniversary of Slate , the small open source project I’ve been maintaining. It started off as a sort of toy project from my internship at TripIt, but now that real companies use it, I feel an obligation to keep it mostly bug-free. I hadn’t done much open source before, so this year has been a great learning experience for me! That said, there are a couple things I…
Now that Hacker School is over, I finally have some spare time to blog about the projects I built. This is one I built about 2/3rds of the way into the batch. I've been writing various small projects in Rust in order to learn the language. My most recent project is a shell! Since obviously it'd be a ton of work to make an actually decent shell, I instead opted to build an different…
In my previous post , I explained how we used SHA-256 to cryptographically sign HTTP requests between an Arduino called DoorDuino and a Ruby app known as Doorbot. However, that system was vulnerable to a hash length extension attack. To understand how extension attacks work, let's first discuss how SHA-256 hashes strings. SHA-256 starts by creating an array of 8 numbers, which start out as…
When J.J. and I designed the Hacker School door system , one of our problems was keeping the system secure. There are two parts of the door system, DoorDuino, which is an Arduino that unlocks the door, and Doorbot, which is a Sinatra server that registers users and receives text messages. These two pieces talk to each other over HTTP. When it receives a text, Doorbot sends an HTTP request to…
Today, I implemented the SHA-256 hashing algorithm from scratch in Rust , with Matthew Avant . "Why in the lord's name would you do this?" is a question you probably would ask. Hahaha, you're so funny! Let's talk about how SHA-256 works. The Big Picture SHA-256 starts by creating an array of 8 numbers, which start out as predefined constants. Let's call this array h . SHA-256…
One of the many perks of Hacker School is alumni Thursdays, where alumni can come in to hack on open source projects and pair program with others. However, there is a problem — Hacker School doesn't have enough key fobs to give to every alumnus. Instead, they ring the doorbell, and someone sits by the phone to press the "unlock" button whenever it rings. The phone in question. The lowest of…
One of my current projects at Hacker School is to (attempt) to solve the knapsack problem using 64-bit assembly. I've never done anything in assembly before — before I started this project, I didn't even know what a register was. It's been an educational, if frustrating project. Today's frustrations have revolved around macho64 and debugging. As detailed in my first assembly…
I've been learning a little assembly with some other Hacker Schoolers. It's fun, but I spent nearly an hour yesterday trying to find a modern online guide for running x86-64 assembly on OS X, and couldn't really find anything that didn't involve complicated uses of gcc . Frankly, without the ever-wise advice of davidad , I probably wouldn't have figured it out, so…