Nat Knight

Reflections, diversions, and opinions from a progressive ex-physicist programmer dad with a sore back.

#links #languagemodels #art #writing

Jamie Brew of Botnik gave a talk at Strange Loop 2023 called Comedy Writing with Small Generative Models.

The talk itself was very entertaining, with musical interludes mashing up “the Beatles” and “Craigslist ads for vehicles”, and while the algorithms were (by Jamie's own admission) pretty straightforward, there was a lot of room for expression in finding good corpuses, mashing them up, and finding fun ways to apply them.

It was an excellent reminder to me that there's an entire world of stuff you can do with computers that isn't commercial, isn't “hard tech” or “cutting edge” but is nevertheless utterly delightful.

#til #s3 #dockercompose

I had to update a Django service to use S3 instead of local file storage recently. Here's how I set up Minio (a self-hostable S3-compatible data store) for local development.

Read more...

#til #llms #claude #modelcontextprotocol

I was checking out the Model Context Protocol, a spec from Anthropic that lets you expose external programs to an LLM, and discovered that you can extend the Claude desktop app in this way. There are a bunch of enterprisey tools (and you can write your own, more interesting stuff), but out-of-the box you can enable URL-fetching, which lets you grab and process arbitrary information with Claude.

Read more...

#python #llm #embeddings #release #simonwillison

I just released version 0.1 of a plugin for Simon Willison's llm called llm-questioncache. It lets you send questions to your default LLM with a system prompt that elicits short, to-the-point answers. It also maintains a cache of answers locally so that you only have to hit the LLM once for each bit of esoteric knowledge.

Read more...

#til #django #djangorestramework #python

On a recent project I found myself needing one classic form-and-template style page in an otherwise API-driven project. I could, of course, [just do it] with a regular view function, but I had a bunch of authentication and suchlike set up for DRF APIViews.

Turns out it's actually pretty easy to make an APIView kick it oldschool!

Read more...

#helix #python

This article describes how to get the [Helix] text editor set up to be a half-decent Python IDE. You'll need to know a little bit about the command line, but if you're using Helix you'll probably be fine.

Read more...

#jargon #semantics

One way that folks talk about “transparency” is as “organizations should share details of their operations with the people they affect” (employees, customers, the public, etc.). This kind of transparency is good! Being able to see things lets people make informed decisions; not being able to hide things prevents bad behaviour.

However, in computer systems transparency tends to mean something like “replacing a component with a different one that has the same interface but a different implementation”. It's a seductive notion: systems that are designed this way can sometimes have one component change without breaking others, or add capabilities by inserting new components that mesh with what's already there.

Read more...

#rust #functionalprogramming #numericalprogramming

[Functional Pearl: Enumerating the Rationals] is a paper that's been on my “to-read” list for a long time. I finally got around to reading it a while back, and ended up implementing the algorithm it describes and publishing it as a [crate]. This article briefly describes that algorithm and some of the Rust-specific details of implementing it.

Read more...

#selfhosting #mastodon #fediverse #hachyderm

As the trajectory of the bird site got clearer and nastier late last year I decided to migrate to the fediverse. I didn't want to end up on another platform controlled by a petulant tinpot dictator, so I decided to see if I could host my own ActivityPub server. Mastodon looked pretty intimidating, but GotoSocial is a smaller, lighter, program that (approximately) inter-operates with Mastodon (yay, federation!).

Read more...

#selfhosting #fediverse #mastodon #gotosocial #sqlite

This article describes how to migrate your subscriptions from GotoSocial to Mastodon. I recently made this migration; I talk about my motivations here.

This procedure doesn't handle getting folks over to your new account. It will get you a list of your subscriptions that you can import with Mastodon's data import feature so you don't have to re-follow everyone by hand.

I'm not aware of an account migration or user-facing data export feature in GotoSocial, so you'll need access to your instance's database (or help from someone who has it, anyways). With those caveats out of the way, here's the procedure.

Read more...