New
The latest blog posts to take off on Hacker News. 3,708 posts.
Compiling Typed Python
With a little effort, you can make your mypy-typed Python go zoom.
Gopher Wrangling: Effective error handling in Go
When programming in Go, the amount of error handling is something that slaps you in the face. Most API’s you deal with will expose errors. It can become overwhelming, but with a few tips and a guiding principle we can make handling errors easy, keep our code clean and give you the confidence that nothing is breaking…
Hurl, a terrible (but cute) idea for a language
Sometimes we have ideas that are bad but demand to enter reality. A few months ago, while chatting with a friend, we toyed around with the idea of a language where the only control flow you get is error handling. This idea embedded itself in my brain and wouldn't let me go, so I kept just talking about it until two…
My First Impressions of Nix
Nix is a tool for configuring software environments according to source files. I’ve been hearing more and more about Nix on Hacker News and Twitter. The idea of it appeals to me, so I’ve been tinkering with it over the past few weeks. My history with infrastructure as code Ten years ago, I discovered Salt, a tool that…
Iterating on Testing in Rust
With the release of rust 1.70, there was some surprise and frustration that unstable test features now require nightly , like all other unstable features in Rust. One of the features most affected is --format json which has been in limbo for 5 years . This drew attention to a feeling I've had: the testing story in…
Memory safety without borrow checking, reference counting, or garbage collection
Single ownership is one of those concepts that's both easier and more powerful than we realize.
Effective Rust (2021)
A collection of specific ways to improve your use of Rust
Melange 1.0: Compile OCaml / ReasonML to JavaScript
Hey folks, this is a special one. Melange 1.0 The Melange team and I are thrilled to announce the release of Melange 1.0 today, marking a major milestone in...
Why Perl?
I sometimes get asked why I use Perl so much. Am I not a fan of strongly typed functional programming? Yeah, I am. Ask me to write something that is known, for sure , to become a big system and I’ll pick strongly typed functional programming without hesitation. 1 1 And, of course, put me in a team that uses Blub, and…
Mojo is a much better “Objective-C without the C” than Swift ever was
One of the primary things that people don't understand about Objective-C is that it is a solution of the two language problem , or more prec...
This is valid Python syntax
Sometimes it's even useful too
From Stacks to Trees: A new aliasing model for Rust
Since last fall, Neven has been doing an internship to develop a new aliasing model for Rust: Tree Borrows. Hang on a second, I hear you say – doesn’t Rust already have an aliasing model? I...
Understanding GPT tokenizers
Large language models such as GPT-3/4, LLaMA and PaLM work in terms of tokens. They take text, convert it into tokens (integers), then predict which tokens should come next. Playing …
Cuneicode, and the Future of Text in C
Following up from the last post, there is a lot more we need to cover. This was intended to be the post where we talk exclusively about benchmarks and numbers. But, I have unfortunately been perfectly taunted and status-locked,
Why Lisp Syntax Works
On uniform vs. specific syntax.
Never trust a programmer who says they know C++
I’ve been in an interviewing mindset for awhile and I’ve come to realize something important about C++ in particular. C++ is a “two peak” language. That is to say C++ is the only language I know of where two very different sets of programmers consider themselves well versed in the language. Let me show you in fake…
A not-so-quick introduction to the C++ allocator model
My paper P1144R8 “std::is_trivially_relocatable” has, in the past few months, been joined by three(!) papers out of Bloomberg:
What Vale taught me about linear types, borrowing, and memory safety
I've had some pretty surreal experiences while making Vale. 0 The weirdest was when I realized the hidden fundamental truth beneath a lot of the programming languages we use today.
What are the enduring innovations of Lisp? (2022)
Historically, Lisp was a behemoth in the world of language design innovation. The list of Lisp’s innovations is so long that I’d have to list most of the features associated with modern languages. (Do you like if statements? You can thank Lisp!)
Zig is hard but worth it
"I learned Zig in a weekend! …Six hours! …6µs!" say the blissful lizards. Followed by something to the effect of, "It’s easy to pick up because the syntax is so simple."
Why F# evangelism isn't working (2015)
If you skim this blog entry too quickly or just read the title, you might think I am someone who does not like F#. Nothing could be further from the truth. Over the last several months, I have become a big F# fan. It has become my preferred language for personal projects.
Language Pragmatics Engineering
On best practices and gradient descent.
Lua: The Little Language That Could
An ode to Lua
Why Learn Compilers (2021)
A sufficient understanding of computers is impossible without learning how compilers and their parts work. It is like stepping into the computer's mind and seeing how it feels from the inside. Compil...
Integrating Zig and SwiftUI
Building a native GUI for a cross-platform application is a decades old problem. Nowadays, most people just don't and fallback to using a non-native experience such as Electron instead.
SectorC: A C Compiler in 512 bytes
SectorC ( github ) is a C compiler written in x86-16 assembly that fits within the 512 byte boot sector of an x86 machine. It supports a subset of C that is large enough to write real and interesting programs. It is quite likely the smallest C compiler ever written.
A guide to closures in Rust
Understand how closures really work in Rust