New
The latest blog posts to take off on Hacker News. 327 posts.
Turnstyle – An esoteric, graphical functional language
An esoteric, graphical functional language
Techniques for safe garbage collection in Rust
This will be the first in a series of posts describing different design decisions made writing two Rust crates:
How the OCaml type checker works (2022)
A short guide on OCaml type checker, describing the surprisingly elegant algorithm for generalization, which generalizes to first-class polymorphism, MLF and local types. Polymorphism and regions have much in common.
An unordered list of things I miss in Go
I like Go. I think it is a reasonable good language , and has some good qualities that makes up for its flaws. However, this doesn't mean I think the language couldn't be better, far from it.
The weird of function-local types in Rust
Next-gen compile-time-checked builder generator, named function's arguments, and more!
Zngur: A C++/Rust interop tool
Zngur (/zængɑr/) is a C++/Rust interop tool. It tries to expose arbitrary Rust types, methods, and functions while preserving their semantics and ergonomics as much as possible. Using Zngur, you can use arbitrary Rust crates in your C++ code as easily as using them in normal Rust code, and you can write idiomatic…
Basic MetaProgramming in Zig
Getting started with Zig's meta programming capabilities by leveraging a few useful functions
What you learn by making a new programming language
Every software engineer uses a programming language, usually multiple. Few of us make programming languages. This makes sense, because the work we need to get done can typically be done just fine in the languages that exist. Those already have people making them better. Let's focus on the task at hand.
Quote-unquote "macros"
You’ve probably seen this Python 101 thing before: @memoized def fib(n): if n <= 1: return n return fib(n - 1) + fib(n - 2) Leaving aside the absurdity of computing Fibonacci numbers recursively, it’s a common first introduction to Python decorators and higher-order functions. fib is just a function, and memoized…
Approximating sum types in Python with Pydantic
TL;DR: You can use Pydantic’s support for tagged unions to approximate sum types in Python; go right to Sum types in Python (and onwards) to see how it’s done.
Introduction to Golang Preemption Mechanisms
A short explanation of what is preemption and how it works
I Created 175 Fonts Using Rust
How I used my own Rust tool to ship 175 quality pixel fonts.
Sonic Pi: Ruby as a Composition Tool
Like the blip of an intro on the front page says, my degree was originally in music. My running joke as a web dev is that neither has meaningfully required me to count past 32. And while my main concentration was vocals, I've since realized I should probably stop strictly calling this a nontechnical field, because my…
Recent Performance Improvements in Function Calls in CPython
How costly it is to call functions and builtins in your python code? Does inlining help? How have the recent CPython releases improved performance in these areas?
Enum class improvements for C++17, C++20 and C++23
The evolution of the C++ language continues to bring powerful features that enhance code safety, readability, and maintainability. Among these improvements, we got changes and additions to enum class functionalities across C++17, C++20, and C++23. In this blog post, we’ll explore these advancements, focusing on…
Rustgo: Calling Rust from Go with near-zero overhead (2017)
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.
Swift Homomorphic Encryption
We’re excited to announce a new open source Swift package for homomorphic encryption in Swift: swift-homomorphic-encryption.
Crafting Interpreters with Rust: On Garbage Collection
I became interested in implementing programming languages a few years ago and discovered [Crafting Interpreters](https://craftinginterpreters.com/) by Bob Nystrom. At the time, I had experience with Rust and decided to use it to follow the book. Albeit, being a noob, I managed to implement a fully functional bytecode…
C Macro Reflection in Zig
Zig’s reflection combined with Zig’s ability to import C header files means Zig can be used for C macro reflection.
Higher-kinded bounded polymorphism in OCaml (2021)
How bounded higher-kinded polymorphism arises in practice, and how to express it in OCaml, in several different ways. Some ways are rather concise -- but less widely known.
My mental model of setf was wrong
Lisp lets programs define new setf forms for assignment. The most common example is from CLOS , where a class like this:
Bril: An Intermediate Language for Teaching Compilers
I created a new intermediate language, called Bril, for teaching my funky open-source, hands-on compilers course. Because it’s for education, Bril prioritizes simplicity and regularity over more typical compiler priorities like performance and concision. This is an overview of Bril’s design, its quirks, and the…
Where does the name "algebraic data type" come from?
A blog about functional programming
Defense of Lisp macros: The automotive field as a case in point
An overview of all the tools, standards and special languages used in the automotive industry where the official language is actually C.
Clojure macros continue to surprise me
Clojure macros have two modes: avoid them at all costs/do very basic stuff, or go absolutely crazy.
Pin
The Pin type (and the concept of pinning in general) is a foundational building block on which the rest of the the Rust async ecosystem stands. Unfortunately, it has also been one of the least accessible and most misunderstood elements of async Rust. This post is meant to explain what Pin achieves, how it came to be…
A brief interview with Tcl creator John Ousterhout (2023)
Dr. John Ousterhout is a computer science luminary who has made significant contributions to the fie