Most cited
Posts that commenters keep linking to, ranked by how many different people have cited them in Hacker News comments. 2,232 posts.
Learn Wayland by writing a GUI from scratch
Wayland is all the rage those days. Distributions left and right switch to it, many readers of my previous article on writing a X11 GUI from scratch in x86_64 assembly asked for a follow-up article about Wayland, and I now run Wayland on my desktop. So here we go, let's write a (very simple) GUI program with Wayland…
ESP32-S3 has a few SIMD instructions
Intro Espressif Systems released their ESP32-S3 SoC a few years ago, but only recently have they released more documentation and support of ...
Timestamps and Time Zones in PostgreSQL (2016)
The nuance between timestamp with and without time zone
Yammer moving from Scala to Java
Following up on my recent Scala posts , some commented that because I haven't used Scala seriously, my opinion is of little value. I respo...
A Defer Mechanism for C
An overview of a paper that presents a reference implementation of a defer mechanism (co-authored with Robert C. Seacord) has been accepted for publication at SAC’21. The full version is avai…
My tutorial and take on C++20 coroutines
Over the last 25 years, I’ve written a lot of event-driven code in C++. A typical example of event-driven code is registering a callback that gets invoked every time a socket has data to be read. Once you have read an entire message, possibly after many invocations, you parse the message and invoke another callback…
Using Rust for 'Scripting'
Why I might use Rust instead of Python, with walkthroughs for building a simple
What causes Ruby memory bloat?
Ruby apps can use a lot of memory. But why? Various people in the community attribute it to memory fragmentation, and provide two “hacky” solutions. Dissatisfied by the current explanations and provided solutions, I set out on a journey to discover the deeper truth and to find better solutions.
An Experimental New Type Inference Scheme for Rust
While on vacation, I’ve been working on an alternate type inference scheme for rustc. (Actually, I got it 99% working on the plane, and have been slowly poking at it ever since.) This scheme simplifies the code of the type inferencer dramatically and (I think) helps to meet our intutions (as I will explain). It is…
SwiftUI Defaults Considered Harmful
A few notes on SwiftUI and why UI frameworks should not try to be “smart”
POSIX close(2) is broken
There's just one small problem: The way POSIX has defined close(2) is completely and utterly broken.
Haskell Lenses In Pictures
Aditya Bhargava's personal blog.
Shipping a compiler every six weeks
This blog post is a slightly edited version of the live transcript of the talk I gave at RustFest 2019 in Barcelona on November 10th, 2019. As it's a transcript some parts of it are a bit repetitive or badly worded, but I hope the message behind the talk will be conveyed by this post anyway.
Towards fearless SIMD
SIMD is a powerful performance technique, and is especially valuable in signal and image processing applications. I will be using it very extensively in my synthesizer, and also it’s increasingly used in xi-editor to optimize string comparisons and similar primitives.
A Magnetized Needle and a Steady Hand
Now they’ve gone an done it. An unidentified agency has spread a potent computer virus across all the world’s computers and deleted the binaries for every copy of every software development tool. Even the offline copies — it’s that potent.
Monte-Carlo Simulations
Monte Carlo simulations (or methods ) is the technique of applying randomness and the Law of large numbers to the solution of various scientific and engineering problems. One of its first documented uses was by Stanislaw Ulam and John von Neumann for nuclear weapon simulations after WWII [1] .
Python datetime pitfalls, and what libraries are (not) doing about it
It’s no secret that the Python datetime library has its quirks. Not only are there probably more than you think; third-party libraries don’t address most of them! I created a new library to explore what a better datetime library could look like.
Bash Shortcuts For Maximum Productivity
The bash (Readline) shortcuts worth knowing for editing, recalling and controlling commands, plus the ! and ^ history tricks.
Stop Validating Email Addresses with Regex (2012)
Just stop, y’all. It’s a waste of your time and your effort. Put down your Google search for an email regular expression, take a step back, and breathe.
Overhead of Returning Optional Values in Java and Rust (2021)
Some programming languages like Java or Scala offer more than one way to express a concept of “lack of value”. Traditionally, a special null value is used to...
A surprising JavaScript memory leak found at Meteor
This week, my teammates at Meteor tracked down a surprising JavaScript memory leak . I searched the web for variations on javascript closure memory leak and came up with nothing relevant, so maybe this is a relatively unknown issue. (Most of what you find for that query talks about the bad garbage collection algorithm…