Blog
A Useful Shell Pattern
If you work at the unix command line you probably execute pipelines of programs to test ideas. It’s part of the unix way. Sometimes you need a little more than a simple pipeline. A small shell script here or there is an easy lightweight way to provide a slighly larger pipeline co…
Split for Embedding
Different embedding models have different limits on input tokens. When you want to create embeddings for a large corpus, one major annoyance is splitting the content so that it fits within this limit. My recent work has centered around Simon Willison’s excellent llm tool. He also…
Checking Make Vars
If your make target recipes use make variables you may want to test that they are set before using them. This would look something like this: test -n '$(varname)' || { echo 'variable not set: varname'; exit 1; } Rather than sprinkling that sort of code all over yo…
Sqitch Templates
Sqitch has a template mechanism that follows the same design pattern as its migration files. This makes it easy to manage templates with Sqitch itself. My project directory now contains a templates/ subdirectory. This is just another Sqitch project top_dir, but for templates. The…
Variables in Sqitch
Sqitch supports variables in the config file like this: [target "foo"] engine = pg uri = your-connection-string-here registry = sqitch_db_foo [target.foo.variables] database = foo This makes a variable called database available in the deployment script.…