TypeScript: Branded Types
How to brand TypeScript types for norminal typing, providing an automated and easy-to-use way of making a type nominal.
Every blog post that took off on Hacker News, ranked by the votes of its best submission. 327 posts.
How to brand TypeScript types for norminal typing, providing an automated and easy-to-use way of making a type nominal.
Hi, I'm Peter Bex, a Scheme and free software enthusiast from the Netherlands. See my user page on the CHICKEN wiki or my git server for some of my projects.
A curated list of misconceptions about mainstream compilers.
Learn about jank's upcoming LLVM IR codegen, Rust interop plans, and more.
Zeke: "Wait, so with generational references, we now have four ways to do memory safety?"
Ever since I finished publishing the “defer” paper and successfully defended it on its first go-around (it now has tentative approval to go to a Technical Specification, I just need to obtain the necessary written boilerplate to do so), an old criticism
👋🏼 This is part of series on concurrency, parallelism and asynchronous programming in Ruby. It’s a deep dive, so it’s divided into 12 main parts: Your Ruby programs are always multi-threaded: Part 1 Your Ruby programs are always multi-threaded: Part 2 Consistent, request-local state Ruby methods are colorless The…
You're probably reading this page because you've attempted to access some part of my blog (Wandering Thoughts) or CSpace , the wiki thing it's part of. Unfortunately you're using a browser version that my anti-crawler precautions consider suspicious, most often because it's too old (most often this applies to versions…
Hey everyone! This article is brought to you by a shameless nerd snipe, courtesy of Pascal. In case you’ve blocked Twitter for your own good, this reads: There should be a post explaining and compa...
Pattern matching is a pervasive and powerful tool in Elixir. This isn't too surprising if you know a little about the history of Elixir's parent language, Erlang. Erlang was originally inspired by and written in Prolog, a logic programming language where pattern matching has first-class support. In
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.
Explore how Common Lisp and Clojure shape modern programming, and discover why understanding these foundations is crucial for tech choices today
An exhaustive set of benchmarks on different ways to approach error handling in Golang. We demonstrate that common sentinel error idioms are slow your code down by 5x.
Sit beside me and hear this crazy old man's tale of when I asked Rust for too much
Over the weekend, I was working on a personal Rust project when I ran into an excessive memory usage problem. After an evening of trial and error, I found a workaround to fix the memory usage, but I still didn’t understand how the issue was even possible, so I then spent another evening digging through the source code…
Let's talk compilers with part one of a whistle stop tour of their history
I started learning Rust about 3 or 4 years ago. I am now knee-deep in several very complex Rust projects that keep slamming into the limitations of the Rust compiler. One of the most common and obnoxious problems is hitting a situation the borrow-checker can’t deal with and realizing that I need to completely…
Review about V programming language in 2023
Why call-by-push-value is the best evaluation strategy, and why it's going to take over
As we approach the final release date for Python 3.13, I’ve seen an uptick in discussion regarding 3.13’s introduction of an optional GIL. While removing the GIL has been a long time coming for the average user (I’ve dreamt of this for nearly 20 years), there have actually been two concurrent efforts to improve…
Lisp lets programs define new setf forms for assignment. The most common example is from CLOS , where a class like this:
Handling errors in Go is simple and flexible – yet no structure! It’s supposed to be simple, right? Just return an error , wrapped with a message, and move on. Well, that simplicity quickly turns into chaotic as our codebase grows with more packages, more developers, and more “quick fixes” that stay there forever…
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…
Early C had no separate operators for & and && or | and || . (Got that?) Instead it used the notion (inherited from B and BCPL ) of "truth-value context": where a Boolean value was expected, after "if" and "while" and so forth, the & and | operators were interpreted as && and || are now; in ordinary expressions, the…
Sometimes you have a pointer to a class, and you want to invoke a method. You can use the -> operator for that.
Guile is a rather niche language that I love dearly. Guile is a Scheme dialect that features an advanced optimizing bytecode compiler, a JIT compiler, and a modest set of developer tools for inspecting and debugging. Through my time spent developing Chickadee , a game programming library, I have gotten quite familiar…
The ride is coming to an end. The experiment is done. We tried, but we admit defeat. Four years ago we started adding support for an alternative HTTP backend in curl. It would use a library written in rust, called hyper. The idea was to introduce an alternative implementation of HTTP internals that you could ……