The United States and Iran are at war. The United States and Israel killed Iran's leader Ali Khamenei and many members of Iran's senior leadership. 6 US service members are dead. In retaliation for cooperating with the United States, Iran has attacked Qatar, Bahrain, Jordan, UAE, Kuwait, Oman, Israel, Cyprus, and Saudi Arabia. Major oil and gas production facilities in Saudi Arabia and Qatar have…
Until recently, I've mostly avoided writing Python for both personal and professional work, because the dependency story has been so bad. There are 83 different build tools. They're all bad. Builds aren't repeatable. Dependencies fail to resolve constantly. You somehow never have the correct version of Python installed. If you've done any Python at all, this probably sounds familiar. Like I said,…
A man sprayed US Representative Ilhan Omar with a then-unknown substance (since identified as vinegar) as she gave remarks at a Minneapolis town hall meeting on January 27. Security tackled and arrested the man. Omar finished her prepared remarks.
Yesterday, Border Patrol agents shot and killed Alex Pretti in South Minneapolis, a few miles from where I live. Pretti was an ICU nurse at the Minneapolis VA hospital. DHS Secretary Kristi Noem and homeland security advisor Stephen Miller immediately labeled Pretti a "domestic terrorist".
6 prosecturors in the U.S Attorney's Office for Minnesota resigned in response to pressure to investigate the widow of Renee Good. President Trump threatened to use the Insurrection Act to quell demonstrations in the Twin Cities. The Department of Justice is investigating Minnesota Governor Tim Walz and Minneapolis Mayor Jacob Frey for allegedly obstructing federal law enforcement.
A U.S Immigration and Customs agent shot and killed an unarmed woman in her car on Portland Avenue in Minneapolis, a couple of miles from where I live. The United States military entered Venezuela, captured its president, Nicolás Maduro, and brought him to New York to face charges of drug trafficking. Donald Trump and others in his administration continue to insist that the United States will take…
This is my prediction: non-developer end-users are not going to use AI to generate source code to build their own software products. Not enough to matter economically. Most people don't do their own plumbing, electrical, work on their own cars, design their own houses, etc. Some do, of course, but not enough to displace plumbers, electricians, mechanics, or architects. The creation of software…
Sometimes the conversation in around static vs. dynamic types veers off into theoretical la-la-land. I've seen static types maximalists insist that software built without static types is inherently (dictionary: "existing in something as a permanent, essential, or characteristic attribute") less reliable than software built with static types. I don't buy it. I've also seen dynamic types maximalists…
Recently, I've been working on a BitTorrent client called etorrent . For the uncorrupted, BitTorrent is a protocol for doing peer-to-peer file sharing that was hugely popular in the early 2000s. This is not a deep-dive into the BitTorrent protocol, but at a very high level BitTorrent works by breaking files up into many small pieces and then allowing clients ("peers" in BitTorrent parlance) to…
Languages are too low-level. Even high-level languages. Most high-level languages ("HLLs") today operate at roughly the same level of abstraction when it comes to data. They have associative structures (maps), ordered structures (lists, arrays), various kinds of atoms (strings, keywords, numbers, etc.). Languages provide various operations for manipulating these structures, and they're all…
On my Mac, Observer does not work out of the box with Erlang/OTP 28, but I got it working. Background If you're not familiar, Erlang/OTP is a parallel, functional language and runtime for building concurrent systems. I use it with the Elixir programming language. It includes a variety of observability and debugging tools, among them Observer , which is a graphical system viewer that exposes the…
Uncertain - Mattt "When you compare two Uncertain values, you don't get a definitive true or false. You get an Uncertain<Bool> that represents the probability of the comparison being true." Rugby Is a Better Game - 1952 - Allen Jackson "The general mood which most distinguishes the Rugby scene from American football is that of temperance; and this temperate mood is made possible to a considerable…
I'm tired of hearing people use "tech debt" as a catch-all term for bad code. Not that "tech debt" is a useless term. It is applicable in certain narrow circumstances. It's useful to describe the intentional construction of partial solutions to achieve a higher-level goal faster. This can be valuable to clarify future costs to stakeholders. But hardly anyone uses it that way. What you hear instead…
The Devil comes to you and offers you a deal. You will receive a magic machine that can at your direction, write stories, draw pictures, make music, plan a project, research, program a computer, solve a math problem, translate a foreign language. All he wants is your ability to learn and master these things on your own. "If you have this machine," he says, "what need do you have for these…
Fleeing One Step Ahead of Fascism "Leo Szilard: How quickly things move you can see from this: I took a train from Berlin to Vienna on a certain date, close to the first of April, 1933. The train was empty. The same train on the next day was over-crowded, was stopped at the frontier, the people had to get out, and everybody was interrogated by the Nazis. This just goes to show that if you want to…
The other day I was building an Elixir app that needed to store local data, so I thought I'd use the XDG spec . I couldn't find an Elixir library on Hex.pm that looked suitable, but I stumbled onto the fact that this is built into Erlang's stdlib already, which is even better: Enum.each([:user_cache, :user_config, :user_data, :user_log], fn pathtype -> IO.puts(:filename.basedir(pathtype, "myapp"))…
Conferences, Clarity, and Smokescreens "We have witnessed high-cost, low-quality JS-stack rewrites of otherwise functional HTML-first sites ambush businesses with reduced revenue and higher costs for a decade. It is no less of a scandal for how pervasive it has become." "Everyone in the room was implicitly expected to use their employer's money to adopt all of these technologies, rather than…
Recently, I wrote a small Elixir library called Cas that provides a way to update shared mutable state concurrently. It is directly based on Clojure's atoms . It looks like this: alias Cas.Cell # Create a cell cell = Cell.new(1) # Get the value of an cell Cell.get(cell) #=> 1 Cell.swap!(cell, fn i -> i + 1 end) #=> 2 Cell.swap!(cell, fn i -> i + 1 end) #=> 3 # reset the value of the cell…
The role of the University is to resist AI "'I speak about radical monopoly when one industrial production process exercises an exclusive control over the satisfaction of a pressing need, and excludes nonindustrial activities from competition. The establishment of radical monopoly happens when people give up their native ability to do what they can for themselves and for each other, in exchange…
Authorities captured Vance Boelter , who killed Minnesota House Democratic Leader Melissa Hortman and her husband, and wounded Democratic State Senator John Hoffman and his wife. The United States attacked Iranian nuclear facilities with B2 bombers and submarine-launched cruise missles. Reports of damage are inconclusive, with President Trump claiming complete destruction. Iran retaliated by…
Minnesota House Democratic Leader Melissa Hortman was assassinated. Democratic State Senator John Hoffman was also shot but expected to survive. The assassin, who is at large, left behind a manifesto which contained Hortman and Hoffman's names, among others, which are still unreleased.
Israel attacked Iran with fighter jets, killing senior military leadership, nuclear scientists, and destroying nuclear sites. Iran struck back with missles, causing unclear damage. Protests are scheduled for tomorrow in all 50 states, to coincide with Trump's military parade marking the 250th birthday of the United States Army
This is a bit of a catch up post, since my last one was in 2021 . Donald Trump is again the president, defeating Kamala Harris in the 2024 election by more than 2 million votes. Over the weekend, in response to protests against ICE immigration raids in Los Angeles, Trump has federalized the California National Guard and deployed Marines. So far it seems like injuries have been minimal. Protests…
In the past few weeks I've used a multitool to: unclog a bottle of face soap (awl/reamer) cut packing tape off a clothes drying rack that was leftover from our move (knife) file down a sharp toenail (file) repair a hose by installing a new nozzle (Phillips-head screwdriver) adjust the power setting on some hair clippers (Phillips-head screwdriver) remove a broken keyring from a keychain…
I've been working on a little project lately called HTTPipe (or, httpipe , as I will refer to it), which is an implementation of (as far as I can tell) Anders Pitman's original patchbay . httpipe is a little HTTP server that allows you to share data between HTTP clients. One client (the producer) makes a POST request with some data, and another client (the consumer) makes a GET request and…
I read Software development topics I've changed my mind on after 10 years in the industry recently and thought I would do my own. I've been programming for money since 2014 (whoa) so some of my opinions have changed over that period and some haven't. I don't claim this makes me good, but it does mean I've seen some shit. Things I didn't used to believe, but now do the beginning, middle, and end of…
SQLite has some surprising behavior regarding transactions that bites almost everyone who attempts to use SQLite with multiple concurrent connections. the problem If a connection is in an active write transaction, any other connection attempting to upgrade a read transaction to a write transaction will fail immediately with a surprising database is locked error. This happens regardless of what…
For a large portion of the software out there in the world, dynamic types are actually too powerful. Take Ruby as an example. Ruby has a very powerful dynamic type system. You can define methods at runtime. You can define objects based on database tables at runtime. You can open up core classes and redefine their methods at runtime. You can ask objects what methods they have at runtime and branch…
This post is another entry in the long and storied history of people misunderstanding and torturing Richard Gabriel's famous software design essay, The Rise of "Worse is Better" . This particular instance will apply to pocket knives. Yep, pocket knives! See, I collect pocket knives. It's one of those irrational things I carry from my childhood. My grandpa always had a pocket knife, and I thought…
When a language is "unsafe" what we really mean is that the language is imprecise in a specific way. When you write code in an imprecise language, the danger is that in the course of saying what you are trying to say, you inadvertently say things you did not mean to say, or you are unable to say exactly what you want to say. For example, the C language lacks a way to talk about object lifetimes in…
gron is a popular tool for viewing the structure of large JSON documents. It works by traversing the JSON document and outputting a combination of a given JSON value and the path in the document that points to that value. From gron's readme: ▶ gron testdata/two.json json = {}; json.contact = {}; json.contact.email = "mail@tomnomnom.com"; json.contact.twitter = "@TomNomNom"; json.github =…
As the years go on and more people use Rust, we're seeing more and more of these "Rust was a bad choice and here's what I don't like about it" posts, like this one . ( Discussion here ) My goal with this post is not to discuss the above linked gamedev post directly. Rust should have a better gamedev story. My goal with this post is to try to understand a tiny bit about why so many people are…
Here are a few benchmarks comparing Elixir's Jason with the new :json module, which will ship in the standard library with Erlang 27.0. The usual caveats apply: I chose these example documents, this is my own hardware, etc. Always run these kind of benchmarks on your own hardware with your own workload. inputs $ ls -lah fixtures Permissions Size User Date Modified Name .rw-r--r-- 923k clark 21 Apr…
In Elixir and Erlang, a GenServer is a way of defining a process that has a specific behavior, namely, it behaves as a server with typical "server and client" semantics. That is, you send some message to the server, and it responds. When I first encountered Erlang I remember being confused about GenServer startup. There is actually a fair amount of subtlety to how a GenServer starts, so let's look…
The cost society pays because of bad software is titanic. No matter how you measure it, in lost time, lost dollars, stolen identities, frustration, or whatever else, I don't think this point is controversial. What may be controversial, though, is the realization that it is the users who pay most of these costs, not companies, and not developers of open source software. I think this is because open…
Untold stories of football's Air Raid revolution "How come they get to pretend they are soldiers?" Leach said. "The thing is, they aren't actually in the military. I ought to have Mike's Pirate School. The freshmen, all they get is the bandanna. When you're a senior, you get the sword and skull and crossbones. For homework, we'll work pirate maneuvers and stuff like that." "Mike used to like to…
Not everyone who disagrees with you is a closet right-winger "However, I have also become more estranged from what you might call the progressive political class over the past several years. One reason is that this class has rapidly become more left and less liberal — compare the Democratic presidential platforms of 2020, which began with a land acknowledgment, with Obama’s in 2012, which began by…
The Stations of the Meritocrat Cross "More, though, I just worry for these kids and for our future with them. We're winding our young people up so fucking tight... Sometimes I think the great American rite of passage is when you go from a youth full of Ritalin to an adulthood full of Xanax." MPL-50 "It is sharpened on its working edge and often on one side, for use as an axe." I rode with an ice…
When invoking elixir on the command line, you can pass the -e / --eval flag multiple times. This means you can define a shell alias where you use Elixir's new Mix.install functionality to preload dependencies, and then run quick one-liners in shell pipelines that have access to those dependencies. First, in your shell profile define an alias like this: alias ee='elixir -e "Mix.install([:csv,…
When I was first learning programming - not counting TI BASIC when I was 13 - the more experienced developers I was learning from stressed the importance of good names for things like variables, methods, classes, and modules. I think they were right to an extent, but as I've built and maintained more systems, I've grown less and less enamored with the value of "good names" in software systems…
(Note that in this post I use "Elixir" to refer to Elixir, Erlang, and OTP altogether. This is a deliberate choice to simplify things for those who are unfamiliar.) A few days ago Erlang/OTP 26.0 was released, which lead to a lot of discussion on HN about Erlang and Elixir. This post in particular asked, more or less, "what's the big deal?" I actually think this is great that someone had the…
A few years ago I wrote a library that provides a circular buffer (also known as a ring buffer) in Elixir. I wanted one for something (I can't remember what!), didn't see one in Elixir, and wrote one. It works well enough, has decent test coverage, and is about as performant as you could expect from a pure Elixir implementation. I made a big mistake in writing the library, though. I asked too much…
I just read this post and its HN thread . The post explores some of the things the Zig language does different than Rust, and how the appeal of Zig differs from that of Rust. My issue isn't with the post itself, which explores the real differences and appeals of Rust and Zig well enough, but rather the HN comments, which are honestly pretty awful and indicative of what I find to be a corrosive…
Say you want to diff two CSV files, like these: $ cat 1.csv id,name,fav_color 1,bill,blue 2,sue,red 3,abe,green $ cat 2.csv id,name,fav_color 1,bill,blue 2,sue,red 4,ali,orange How do you do it? The most straightforward way would be to use diff , like this: $ diff 1.csv 2.csv 4c4 < 3,abe,green --- > 4,ali,orange diff works great, especially in the simplest case. You can also use SQLite, like this:…
(Note: see the bottom of this post for the code and example data) I wrote a small SQL script using SQLite that is capable of comparing a collection of JSON objects and rendering their differences as a SQL result set. It is capable of detecting and reporting additions ( {"a": 1} -> {"a": 1, "b": 2} ), deletions ( {"a": 1, "b": 2} -> {"a": 1} ), and mutations ( {"a": 1} -> {"a": 99} ). There are…
I didn't learn AWK (or, awk) until recently. This past Decemeber, I decided to try the Advent of Code challenges in both Rust and awk. Rust I already know well enough to where solving word problems is not a task I would expect to learn much from, but awk I really didn't know at all. I came away with the impression that awk is really an amazing, overlooked language. Maybe the key thing about awk is…
Ruby is a landmark in my programming languages journey because it is the first language I knew worth a damn. I had used other languages before, like TI-BASIC, HTML, Javascript, and a bit of Python, but only really to tinker with. It was the first language that I made money with and the first language I used to ship anything to real users, so in that way it really was among the first languages I…