news
Programming Leftovers
-
Buttondown LLC ☛ Finding hard 24 puzzles with planner programming
Planner programming is a programming technique where you solve problems by providing a goal and actions, and letting the planner find actions that reach the goal. In a previous edition of Logic for Programmers, I demonstrated how this worked by solving the 24 puzzle with planning. For reasons discussed here I replaced that example with something more practical (orchestrating deployments), but left the code online for posterity.
-
Zig ☛ FreeBSD and NetBSD Cross-Compilation Support
Pull requests #23835 and #23913 have now been merged. This means that, using zig cc or zig build, you can now build binaries targeting FreeBSD 14.0.0+ and NetBSD 10.1+ from any machine, just as you’ve been able to for Linux, macOS, and Windows for a long time now.
-
Marc Brooker ☛ Good Performance for Bad Days
That doesn’t make sense. The most famous downside of this disconnect is coordinated omission, where we massively underestimate the performance impact of tail latency. But that’s far from the whole picture. Closed benchmarks are too kind to realistically reflect how performance changes with load, for the simple reason that they slow their load down when latency goes up.
-
Chris ☛ Single-File Stateful Haskell Web App
The entire project, minus build scripts and project metadata, sits in one Haskell file of 650 lines. Stripping out embedded html and stylesheets, the actual Haskell code is about 400 lines, including blanks and comments. This is very manageable! Although some Haskell libraries suffer from deprecating their content when they are upgraded, they can also be kept at older versions until one wants to spend the effort upgrading.
-
Max Bernstein ☛ A simple search engine from scratch*
The search engine we made is built on word embeddings. This refers to some function that takes a word and maps it onto N-dimensional space (in this case, N=300) where each dimension vaguely corresponds to some axis of meaning. Word2vec from Scratch is a nice blog post that shows how to train your own mini word2vec and explains the internals.
The idea behind the search engine is to embed each of my posts into this domain by adding up the embeddings for the words in the post. For a given search, we’ll embed the search the same way. Then we can rank all posts by their cosine similarities to the query.
-
Rlang ☛ Cost-Effectiveness Analysis
In a previous post, we presented an rjags version of a Bayesian model from Chapter 2 of the textbook: Evidence Synthesis for Decision Making in Healthcare by Welton et al. (2012).
-
Rlang ☛ Planning for a 3-arm cluster randomized trial with a nested intervention and a time-to-event outcome
A researcher recently approached me for advice on a cluster-randomized trial he is developing. He is interested in testing the effectiveness of two interventions and wondered whether a 2×2 factorial design might be the best approach.
-
Twirling your first fork: A beginner’s guide to Open Source contribution
New to Open Source? Think of it like a giant plate of spaghetti and dive in!
-
Shell/Bash/Zsh/Ksh
-
Raspberry Pi ☛ Conquer the command line, 3rd edition — out now!
Hi folks, Rob from Raspberry Pi Official Magazine here! I’m very excited to announce that one of our classic Essentials books, Conquer the command line, has been updated for the first time in six years; the third edition of our Raspberry Pi terminal guide is out right now!
-
Bozhidar Batsov ☛ Switching from Zsh to Fish
Recently I’ve switched from Z Shell (aka Zsh) to Fish, after being a Zsh user since 2008. The experience has been pretty good overall and here I’ll share a few tips for everyone looking to make the change.
I’ll cover both the general setup and some of the tools I’m using on a day to day basis (e.g. rbenv, nvm, etc).
-