A reckless introduction to Hindley-Milner type inference (2019)
(I've been editing this post on and off for almost a year. I'm not really happy with it, but I suspect I never will be.)
Topics /
The most popular blog posts about programming languages on Hacker News. 246 posts.
(I've been editing this post on and off for almost a year. I'm not really happy with it, but I suspect I never will be.)
What Ruby’s top-level methods actually are, who they belong to and how they are namespaced
Gleam is a statically-typed functional programming language, which recently had its v1 released, designed for building scalable and maintainable software. It
This set of slides sketches out the implementation of Hell , in technical detail. I do tend to switch between the slides, old code, and the present code, so bear with me. It's more about the ideas. If you want to see a complete implementation, the complete implementation of Hell is one file , which you can look…
What is Damas-Hindley-Milner?
It has been said that the most popular programming language in the world is the spreadsheet (and in particular these days, Excel). There...
Clojure macros have two modes: avoid them at all costs/do very basic stuff, or go absolutely crazy.
CPS, or continuation-passing style, is an intermediate representation for programs, particularly functional programs. It’s used in compilers for languages such as SML and Scheme. Much of its utility comes from its support for tail calls and nonlocal control flow such as call/cc, but it can also be used as an…
A few years ago, on a whim, I wrote YAIOUOM. YAOIOUM was a static analyzer for Rust that checked that the code was using units of measures correctly, e.g. a distance in meters is not a distance in centimeters, dividing meters by seconds gave you a value in m / s (aka m * s^-1). YAIOUOM was an example of a refinement…
I had a really enlightening talk with Daniel Slutsky this week (who is an exceptional data scientist, software engineer, and community organizer I highly…
This post announces SaberVM, an abstract machine for functional programs that guarantees safety, reliability, and portability.
TypedDict was introduced in PEP-589 which landed in Python 3.8. The primary use case was to create type annotations for dictionaries. For example,...
NOTE: This is based on, but completely rewritten, from a Twitter post:https://x.com/TheGingerBill/status/1802645945642799423TL;DR: It makes Go feel too "functional" rather than being an unabashed imperative language.I recently saw a post on Twitter showing the upcoming Go iterator design for Go 1.23 (August 2024)…
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…
I wrote the analysis of “useless sugar” features of Ruby for two months, and I regret nothing.
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…
History of Perl releases since version 5.6, each with a summary of added or changed features.
Rust is my favorite programming language. I've been writing Rust for about 6 years, from college to professionally, and I'm vocal about how helpful the compi...
While I was looking the other way, Python got advanced static types! Here’s matrix multiplication, describing the input shapes and its output shape:
A blog about functional programming
This question is always asked. My thoughts are a little bit different than what I've read online.
One product of mine takes reports that come in as a table that’s been exported to PDF, which means text extraction. For dollar figures I find a prefixed dollar symbol and convert the number following it into a float . If there’s a hyphen in addition to the dollar symbol, it’s negative.
One of the things I like to do is compare how different languages solve the same problem — especially when they end up having very different approaches. It’s always educational. In this case, a bunch of us have been working hard on trying to get reflection — a really transformative language feature — into C++26…
A long time ago, I wrote a memoization library for Ruby. It was not easy, but I learned a great deal in the process. In this article, I am share these learnings and showing you how deep the memoization rabbit hole goes.
Not sure if your compilers have matching ABIs? Then put them through the ultimate compatibility crucible and pair them up on a shift at The ABI Café! Find out if your one true pairing fastcalls for each other or are just another slowburn disaster. (Maid outfits optional but recommended.)