We'd be Better Off with 9-bit Bytes| pavpanchekha.com
In my last post, I pointed out that FastTwoSum plus a sort is actually faster than normal TwoSum on modern hardware, and suggested that TwoSum is therefore obsolete. This post expands the analysis and tests futher optimizations on the Apple M1 chip. General approach The general FastTwoSum algorithm is the following: s = a + b bb = s - a e = b - bb This assumes that |a| > |b|, or perhaps a slightly weaker condition. To satisfy this precondition, we need to sort a and b by absolute value, kind ...| Pavel Panchekha’s Blog
FastTwoSum is Faster Than TwoSum| pavpanchekha.com
In the Herbie project we have some old bits of code that work, but are| pavpanchekha.com
Bristol band Sans Froid release their debut album Hello, Boil Brain - a densely packed and anxious-feeling experimental alt rock album capturing the overwhelm of post-pandemic life.| popoptica
This semester, I am teaching Compilers, and I'm quite happy with how I covered parsing this year. Specifically, I taught students to build a top-down LR parser and it seemed to go relatively well. Update: Laurence asks me to note that he's not as much of a parser theorist as this post makes him out to be. Update: There's an ongoing discussion on Hacker News about this post. I learned a lot from it! Update: Gábor Lehel pointed me to Russell Johnston's post on recursive ascent parsing. It's no...| Pavel Panchekha’s Blog
I just finished teaching Utah's Software Verification course, and I've been thinking how to improve the final project to be more straightforward and informative. This draft is something I might assign in the future; it is intended to be completed over multiple weeks, with regular check-ins to make sure students are on track. Overview This assignment involves writing a verifier for a simple programming language. The verifier converts code to verification conditions, uses Z3 to test those verif...| Pavel Panchekha’s Blog
None of the web technologies are great, but CSS is probably the least-complained-about.1 [1 CSS does not feature in the wat talk.] But that doesn't mean people don't complain! CSS is confusing, from how floats work to problems with interfering selectors. I've spent years doing academic CSS research, so I have some thoughts on what's wrong with CSS. But first—let's survey what others think. If you're not interested in a dissection of the standard and just want to know why CSS is so weird, I ...| Pavel Panchekha’s Blog
It seems every programming language now has its own package manager. These package managers solve both technical and social problems. But they solve the social problems poorly; version customs are a focal example. Technical and social problems All package managers download packages, install their recursive dependencies, unpack packages in the right directories, and record their location so they can be found by the language runtime. Some also go further, building C modules or documentation. Au...| Pavel Panchekha’s Blog
Resistance is a game, much like the math-camp-beloved Mafia, where one group of players tries to coordinate against traitors in their midst. Unlike Mafia, people aren't actively removed from the game, which makes it more fun at parties. I am not fun at parties, so I decided to ruin everyone else's fun by solving the game. Simplifying the game To solve a game is to learn how to play it best. Resistance has two teams (the good guys and the traitors), so each team's best strategy must be the bes...| Pavel Panchekha’s Blog
On May 5–6th, I took part in Microsoft's Puzzlehunt. I love these events (as you can imagine, from pastpuzzles I've written), but this year's had a puzzle I also managed to apply some of my Z3 skills to. You see, in a puzzle hunt, you're allowed to use any tools you wish,1 [1 Except for people not on your team…] including programming and Z3. But it's rare that I find the opportunity… How the Puzzle Worked This year, one of the puzzles was a cryptic mastermind game. In the usual mastermi...| Pavel Panchekha’s Blog
Update: M. Arntzenius gave a great talk a few years ago about voice programming using the Talon voice typing system. I don't know how it is that I didn't think of voice typing systems but they're the well-developed answer here. Interestingly Arntzenius confirms a lot of points that I guessed at here (nominalism, integration with language) but also a lot of new ones (like the challenges of resolving ambiguity and handling errors). Two years ago at PNW PLSE, I had a wonderful conversation with ...| Pavel Panchekha’s Blog
I do most of my research in Racket (Herbie, Cassius). I work in programming languages, so most of my code manipulates programs as data. Racket is a wonderful language for this thanks to its extensive support for S-expression program representations: pattern matching, quasi-quoting, and a bevy of list manipulation functions all help manipulate programs. However, writing down type signatures or contracts for S-expression based data structures is a pain. This post is about a helpful macro, defin...| Pavel Panchekha’s Blog