Make invalid states unrepresentable (2023)
"Type-driven development"
The latest blog posts to take off on Hacker News. 5,635 posts.
"Type-driven development"
How to brand TypeScript types for norminal typing, providing an automated and easy-to-use way of making a type nominal.
Zeke: "Wait, so with generational references, we now have four ways to do memory safety?"
Piet is a programming language in which programs look like abstract paintings. The language is named after Piet Mondrian , who pioneered the field of geometric abstract art. I would have liked to call the language Mondrian, but someone beat me to it with a rather mundane-looking scripting language. Oh well, we can't…
No general procedure for bug checks will do. Now, I won’t just assert that, I’ll prove it to you. I will prove that although you might work till you drop, you cannot tell if computation will stop. For imagine we have a procedure called P that for specified input permits you to see whether specified source code, with…
An extra dimension that you can play with
SBCL is a Common Lisp implementation, with a performant compiler and support for a wide range of platforms. It has excellent documentation , and even a guide to internals (... this is written towards people who already know a lot about how it works though). This paper about SBCL's fairly unique build process is also…
Since starting Wasmer five years ago we've been obsessed with empowering more languages to target the web and beyond through Webassembly. One of the mo...
For the past few months I’ve been mulling over some things that Russell Johnston made me realize about the relationship between effect systems and coroutines. You can read more of his thoughts on this subject here , but he made me realize that effect systems (like that found in Koka) and coroutines (like Rust’s async…
Zig is a general-purpose programming language and toolchain for maintaining robust , optimal , and reusable software.
Enhance the switch construct so that exceptions thrown by the selector (the e in switch (e) ... ) can be handled in the switch block. Alongside a previous enhancement to handle null selectors, this makes switch even more useful for pattern matching. This is a preview language feature .
I will often say that the so-called “C ABI” is a very bad one, and a relatively unimaginative one when it comes to passing complicated types effectively. A lot of people ask me “ok, what would you use instead”, and I just point them to the Go register ABI , but it seems most people have trouble filling in the gaps of…
While I was looking the other way, Python got advanced static types! Here’s matrix multiplication, describing the input shapes and its output shape:
Swift for C++ Practitioners, Part 1: Intro & Value Types
This essay says that inheritance is harmful and if possible you should "ban inheritance completely". You see these arguments a lot, as well as things like...
A blog about modern PHP, the web, and programming in general. Follow my newsletter and YouTube channel as well.
I had a really enlightening talk with Daniel Slutsky this week (who is an exceptional data scientist, software engineer, and community organizer I highly…
Learn about static analysis improvements coming in GCC 14 with -fanalyzer, which helps identify issues in C code at compile-time, rather than at runtime.
A somewhat compact implementation of the awk programming language
At Modular, open source is ingrained in our DNA. We firmly believe for Mojo to reach its full potential, it must be open source. We have been progressively open-sourcing more of Mojo and parts of the MAX platform, and today we’re thrilled to announce the release of the core modules from the Mojo standard library under…
Projects and articles by Chris Gioran
Swift is well-suited for creating user interfaces thanks to the clean syntax, static typing, and special features making code easier to write. Result builders, combined with Swift’s closure expression syntax, can significantly enhance code readability.
Sometimes you have a pointer to a class, and you want to invoke a method. You can use the -> operator for that.
I’ve been learning at least one new programming language a month through Exercism which has been really fun and interesting. I frequently say that “every language you learn teaches you something about all the others you know” and with nearly a dozen under my belt so far I’m starting to worry about the combinatorics of…
All the “C++ killers”, even these which I wholeheartedly love and respect like Rust, Julia, and D, help you write more features with fewer bugs, but they don't much help when you need to squeeze the very last FLOPS from the hardware you rent. As such, they don’t have a competitive advantage over C++. Or, for that…
Andrey Mokhov, Neil Mitchell, Simon Peyton Jones Published in Journal of Functional Programming, Vol 30(E11) View PDF Download BibTex
In the 1990s, computers were magic and we were wizards. Want proof? I offer below, Larry Wall’s foreword to Learning Perl from 1993. It greatly inspired a very young me who wandered into a book shop, picked up an odd book with llama on the cover and a seemingly misspelled title. The first few pages had me hooked and…
New features and improvements to execution traces from the last year.