New
The latest blog posts to take off on Hacker News. 14,544 posts.
Why I'm not a React Native developer
Many people are currently assessing React Native as a platform to develop their next mobile app on. This is no trivial matter. Switching your software development platform involves a high setup cost and will profoundly impact your daily programming workflow. It is also one of the costliest decisions to reverse after…
Towards a JavaScript Binary AST
In this blog post, I would like to introduce the JavaScript Binary AST, an ongoing project that we hope will help make webpages load faster, along with a number of other benefits. A little background Over the years, JavaScript has grown from one of the slowest scripting languages available to a high-performance…
Why Elixir (2014)
It’s been about a year since I’ve started using Elixir. Originally, I intended to use the language only for blogging purposes, thinking it could help me better illustrate benefits of Erlang Virtual Machine (EVM). However, I was immediately fascinated with what the language brings to the table, and very quickly…
Elixir in Depth – Reading and personal notes
Elixir is a hot and trendy topic nowadays. Of the newer languages that show up periodically on Hacker News, I found t...
A programming language from scratch: 3 steps to an interpreter
A little while ago I wrote about 16bitjs, a 16 bit virtual machine written in javascript. It implemented a custom CPU architecture and assembly language, assembler, and debugger. I had the thought …
Casually removing root files
You’re walking at $HOME, minding your own business. $ whoami > user $ pwd > /home/user But something is bothering your feet. It’s like if a little rock has fallen into your shoe. You take it off, to see what’s going on. $ ls -lah ./left-shoe ---------- 1 root root 4 May 30 13:20 little-rock That’s odd. It’s there, but…
How Postgres Makes Transactions Atomic
A dive into the mechanics that allow Postgres to provide strong atomic guarantees despite the chaotic entropy of production.
Understanding the math behind 0x5f3759df and the fast inverse square root (2012)
This post is about the magic constant 0x5f3759df and an extremely neat hack, fast inverse square root, which is where the constant comes from.
On Melissa O’Neill’s PCG random number generator
Computers often need random numbers. Most times, random numbers are not actually random... in the sense that they are the output of a mathematical function that is purely deterministic. And it is not even entirely clear what "really random" would mean. It is not clear that we live in a randomized universe... it seems…
Teaching an AI to play a simple game using Q-learning
In this post I will walk you through how to teach a computer to master a simple video game using the q-learning reinforcement learning algorithm. We will implement the algorithm from scratch in Ruby without the use of external gems. To enable us to illustrate the inner workings of the algorithm we will be teaching […]
Rustgo: Calling Rust from Go with near-zero overhead
Go has good support for calling into assembly, and a lot of the fast cryptographic code in the stdlib is carefully optimized assembly, bringing speedups of over 20 times.
Writing parsers like it is 2017
Writing parsers like it is 2017 Chifflier & Couprie, SPW’17 With thanks to Glyn Normington for pointing this paper out to me. Earlier this year we looked at ‘System programming in R…
Plans for partitioning in PostgreSQL v11
The reaction to the new table partitioning feature in PostgreSQL 10 has been overwhelmingly positive, but a number of people have already as...
Text Is Keeping Kids from Coding
We ran into a big blocker when designing SpriteBox Coding, a learn-to-code game for kids ages 5+. For some kids, code was simply…
Papers I like (part 2)
Continued from part 1. Once I was about a thousand words into describing background for GEMM, it became pretty clear that it made more sense to group the numerical math papers into one post, so her…
An Intro to Compilers
A compiler is just a program that translates other programs. Traditional compilers translate source code into executable machine code that your computer understands. (Some compilers translate source code into another programming language. These compilers are called source-to-source translators or transpilers.) LLVM is…
Coding Machines
After a minute Patrick came back with a small dusty cardboard box. Dave and I stared as Patrick opened it and pulled out a network switch, the old kind from the days when they were made with metal cases. He plugged in the power supply and carefully straightened out a CAT -5 cable to hook the switch up to our network…
Papers I like
This started out on Twitter and I expected having to write up maybe 50 or so, but then it made the rounds. I don’t think I have 1200+ papers that I’d recommend reading, and even if I di…
Typed nils in Go 2
This is an experience report about a gotcha in Go that catches every Go programmer at least once. The following program is extracted from a larger version that caused my co-workers to lose several hours today.
Implementing Font-Size in Servo: An Unexpectedly Complex CSS Property
font-size is the worst. It’s a CSS property probably everyone who writes CSS has used at some point. It’s pretty ubiquitous. And it’s super …
How I Used Deep Learning to Train a Chatbot to Talk Like Me
Can you see the resemblance?
Why does Sattolo's algorithm produce a permutation with exactly one cycle?
I recently had a problem where part of the solution was to do a series of pointer accesses that would walk around a chunk of memory in pseudo-random order. Sattolo's algorithm provides a solution to this because it produces a permutation of a list with exactly one cycle, which guarantees that we will reach every…