Sign up

Simon Willison's Weblog

Not verified No WebSub updates Supports Webmention Not yet validated

Author
Simon Willison
Public lists
Featured
Fetched

Simon Willison's Weblog Supports Webmention

TIL: Rate limiting by IP using Cloudflare's rate limiting rules

TIL: Rate limiting by IP using Cloudflare's rate limiting rules

My blog started timing out on some requests a few days ago, and it turned out there were misbehaving crawlers that were spidering my /search/ page even though it's restricted by robots.txt.

I run this site behind Cloudflare and it turns out Cloudflare's WAF (Web Application Firewall) has a rate limiting tool that I could use to restrict requests to /search/* by a specific IP to a maximum of 5 every 10 seconds.

Tags: rate-limiting, security, cloudflare, til

Simon Willison's Weblog Supports Webmention

Frequently Asked Questions (And Answers) About AI Evals

Frequently Asked Questions (And Answers) About AI Evals Hamel Husain and Shreya Shankar have been running a paid, cohort-based course on AI Evals For Engineers & PMs over the past few months. Here Hamel collects answers to the most common questions asked during the cours...

Simon Willison's Weblog Supports Webmention

Trial Court Decides Case Based On AI-Hallucinated Caselaw

Trial Court Decides Case Based On AI-Hallucinated Caselaw

Joe Patrice writing for Above the Law:

[...] it was always only a matter of time before a poor litigant representing themselves fails to know enough to sniff out and flag Beavis v. Butthead and a busy or apathetic judge rubberstamps one side’s proposed order without probing the cites for verification. [...]

It finally happened with a trial judge issuing an order based off fake cases (flagged by Rob Freund). While the appellate court put a stop to the matter, the fact that it got this far should terrify everyone.

It's already listed in the AI Hallucination Cases database (now listing 168 cases, it was 116 when I first wrote about it on 25th May) which lists a $2,500 monetary penalty.

Tags: law, ai, generative-ai, llms, ai-ethics, hallucinations

Simon Willison's Weblog Supports Webmention

I built something that changed my friend group's social fabric

I built something that changed my friend group's social fabric

I absolutely love this as an illustration of the thing where the tiniest design decisions in software can have an outsized effect on the world.

Dan Petrolito noticed that his friend group weren't chatting to each other using voice chat on their Discord server because they usually weren't online at the same time. He wired up a ~20 lines of Python Discord bot to turn people joining the voice channel into a message that could be received as a notification and had a huge uptick in conversations between the group, lasting several years.

Via Hacker News

Tags: social-software, discord

Simon Willison's Weblog Supports Webmention

Sandboxed tools in a loop

Something I've realized about LLM tool use is that it means that if you can reduce a problem to something that can be solved by an LLM in a sandbox using tools in a loop, you can brute force that problem.

The challenge then becomes identifying those problems and figuring out how to configure a sandbox for them, what tools to provide and how to define the success criteria for the model.

That still takes significant skill and experience, but it's at a higher level than chewing through that problem using trial and error by hand.

My x86 assembly experiment with Claude Code was the thing that made this click for me.

Tags: llm-tool-use, ai-assisted-programming, claude-code, sandboxing, generative-ai, ai, llms

Simon Willison's Weblog Supports Webmention

Table saws

Quitting programming as a career right now because of LLMs would be like quitting carpentry as a career thanks to the invention of the table saw.

Tags: careers, ai-assisted-programming, generative-ai, ai, llms

Simon Willison's Weblog Supports Webmention

Quoting Charles Babbage

On two occasions I have been asked, — "Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?" In one case a member of the Upper, and in the other a member of the Lower, House put this question. I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.

Charles Babbage, Passages from the Life of a Philosopher, 1864

Tags: charles-babbage

Simon Willison's Weblog Supports Webmention

Mandelbrot in x86 assembly by Claude

Mandelbrot in x86 assembly by Claude Inspired by a tweet asking if Claude knew x86 assembly, I decided to run a bit of an experiment. I prompted Claude Sonnet 4: Write me an ascii art mandelbrot fractal generator in x86 assembly And got back code that looked... like assemb...

Simon Willison's Weblog Supports Webmention

TIL: Using Playwright MCP with Claude Code

TIL: Using Playwright MCP with Claude Code Inspired by Armin ("I personally use only one MCP - I only use Playwright") I decided to figure out how to use the official Playwright MCP server with Claude Code. It turns out it's easy: claude mcp add playwright npx '@playwright/m...

Simon Willison's Weblog Supports Webmention

Quoting Kevin Webb

One of the best examples of LLM developer tooling I've heard is from a team that supports software from the 80s-90s. Their only source of documentation is video interviews with retired employees. So they feed them into transcription software and get summarized searchable notes out the other end.

Kevin Webb, a couple million lines of Smalltalk

Tags: small, ai-assisted-programming, ai, llms

Simon Willison's Weblog Supports Webmention

PlanetScale's classy retirement

Sometimes a service with a free plan will decide to stop supporting it. I understand why this happens, but I'm often disappointed at the treatment of existing user's data. It's easy to imagine users forgetting about their old accounts, missing the relevant emails and then discovering too late that their data is gone.

Inspired by today's news about PlanetScale PostgreSQL I signed into PlanetScale and found I had a long-forgotten trial account there with a three-year-old database on their free tier. That free tier was retired in March 2024.

Here's the screen that greeted me in their control panel:

Database is sleeping PlanetScale has retired the free plan. Please upgrade your plan or you may wake this database for 24 hours to retrieve your data. Two buttons: Wake for 24 hours and Delete database

What a great way to handle retiring a free plan! My data is still there, and I have the option to spin up a database for 24 hours to help get it back out again.

Tags: saas, databases

Simon Willison's Weblog Supports Webmention

A custom template system from the mid-2000s era

Using LLMs for code archaeology is pretty fun. I stumbled across this blog entry from 2003 today, in which I had gotten briefly excited about ColdFusion and implemented an experimental PHP template engine that used XML tags to achieve a similar effect: <h1>%title%</...

Simon Willison's Weblog Supports Webmention

Announcing PlanetScale for Postgres

Announcing PlanetScale for Postgres PlanetScale formed in 2018 to build a commercial offering on top of the Vitess MySQL sharding open source project, which originated at YouTube. The founders were the co-creators and maintainers of Vitess. Today they're announcing a private...

Simon Willison's Weblog Supports Webmention

Quoting mrmincent

To misuse a woodworking metaphor, I think we’re experiencing a shift from hand tools to power tools.

You still need someone who understands the basics to get the good results out of the tools, but they’re not chiseling fine furniture by hand anymore, they’re throwing heaps of wood through the tablesaw instead. More productive, but more likely to lose a finger if you’re not careful.

mrmincent, Hacker News comment on Claude Code

Tags: ai-assisted-programming, claude-code, hacker-news, generative-ai, ai, llms

Simon Willison's Weblog Supports Webmention

Using Claude Code to build a GitHub Actions workflow

Using Claude Code to build a GitHub Actions workflow

I wanted to add a small feature to one of my GitHub repos - an automatically updated README index listing other files in the repo - so I decided to use Descript to record my process using Claude Code. Here's a 7 minute video showing what I did.

I've been wanting to start producing more video content for a while - this felt like a good low-stakes opportunity to put in some reps.

Tags: screencast, youtube, ai, github-actions, llms, ai-assisted-programming, anthropic, claude, coding-agents, claude-code

Simon Willison's Weblog Supports Webmention

June newsletter for sponsors has been sent

I just sent out the second edition of my sponsors only monthly newsletter. Anyone who sponsors me for $10/month or more on GitHub gets this carefully hand-curated summary of the last month in AI/LLMs/my projects designed to be readable in ten minutes or less.

My regular newsletter remains free - the monthly one is the only paywalled content I produce, the idea being that you can pay me to send you less.

Here's the first edition for May 2025 as a preview of what you can expect. You'll get access to the June digest and the full archive automatically if you decide to start sponsoring.

Tags: newsletter

Simon Willison's Weblog Supports Webmention

microsoft/vscode-copilot-chat

microsoft/vscode-copilot-chat As promised at Build 2025 in May, Microsoft have released the GitHub Copilot Chat client for VS Code under an open source (MIT) license. So far this is just the extension that provides the chat component of Copilot, but the launch announcement p...

Simon Willison's Weblog Supports Webmention

llvm: InstCombine: improve optimizations for ceiling division with no overflow - a PR by Alex Gaynor and Claude Code

llvm: InstCombine: improve optimizations for ceiling division with no overflow - a PR by Alex Gaynor and Claude Code Alex Gaynor maintains rust-asn1, and recently spotted a missing LLVM compiler optimization while hacking on it, with the assistance of Claude (Alex works for ...

Simon Willison's Weblog Supports Webmention

Agentic Coding: The Future of Software Development with Agents

Agentic Coding: The Future of Software Development with Agents Armin Ronacher delivers a 37 minute YouTube talk describing his adventures so far with Claude Code and agentic coding methods. A friend called Claude Code catnip for programmers and it really feels like this. I ...

Simon Willison's Weblog Supports Webmention

How to Fix Your Context

How to Fix Your Context Drew Breunig has been publishing some very detailed notes on context engineering recently. In How Long Contexts Fail he described four common patterns for context rot, which he summarizes like so: Context Poisoning: When a hallucination or other er...

Simon Willison's Weblog Supports Webmention

Tip: Use keyword-only arguments in Python dataclasses

Tip: Use keyword-only arguments in Python dataclasses

Useful tip from Christian Hammond: if you create a Python dataclass using @dataclass(kw_only=True) its constructor will require keyword arguments, making it easier to add additional properties in the future, including in subclasses, without risking breaking existing code.

Via @chipx86.bsky.social

Tags: python

Simon Willison's Weblog Supports Webmention

Continuous AI

Continuous AI GitHub Next have coined the term "Continuous AI" to describe "all uses of automated AI to support software collaboration on any platform". It's intended as an echo of Continuous Integration and Continuous Deployment: We've chosen the term "Continuous AI” to al...

Simon Willison's Weblog Supports Webmention

Context engineering

The term context engineering has recently started to gain traction as a better alternative to prompt engineering. I like it. I think this one may have sticking power. Here's an example tweet from Shopify CEO Tobi Lutke: I really like the term “context engineering” over prom...

Simon Willison's Weblog Supports Webmention

Project Vend: Can Claude run a small shop? (And why does that matter?)

Project Vend: Can Claude run a small shop? (And why does that matter?) In "what could possibly go wrong?" news, Anthropic and Andon Labs wired Claude 3.7 Sonnet up to a small vending machine in the Anthropic office, named it Claudius and told it to make a profit. The system ...

Simon Willison's Weblog Supports Webmention

Introducing Gemma 3n: The developer guide

Introducing Gemma 3n: The developer guide Extremely consequential new open weights model release from Google today: Multimodal by design: Gemma 3n natively supports image, audio, video, and text inputs and text outputs. Optimized for on-device: Engineered with a focus o...

Simon Willison's Weblog Supports Webmention

Geminiception

Yesterday Anthropic got a bunch of buzz out of their new window.claude.complete() API which allows Claude Artifacts to run their own API calls. It turns out Gemini had beaten them to that feature by over a month, but the announcement was tucked away in a bullet point of thei...

Simon Willison's Weblog Supports Webmention

New sandboxes from Cloudflare and Vercel

Two interesting new products for running code in a sandbox today. Cloudflare launched their Containers product in open beta, and added a new Sandbox library for Cloudflare Workers that can run commands in a "secure, container-based environment": import { getSandbox } from "@...

Simon Willison's Weblog Supports Webmention

Build and share AI-powered apps with Claude

Build and share AI-powered apps with Claude Anthropic have added one of the most important missing features to Claude Artifacts: apps built as artifacts now have the ability to run their own prompts against Claude via a new API. Claude Artifacts are web apps that run in a st...

Simon Willison's Weblog Supports Webmention

Quoting Christoph Niemann

Creating art is a nonlinear process. I start with a rough goal. But then I head into dead ends and get lost or stuck.

The secret to my process is to be on high alert in this deep jungle for unexpected twists and turns, because this is where a new idea is born.

I can't make art when I'm excluded from the most crucial moments.

Christoph Niemann, An Illustrator Confronts His Fears About A.I. Art

Tags: art, ai, generative-ai

Simon Willison's Weblog Supports Webmention

Gemini CLI

Gemini CLI First there was Claude Code in February, then OpenAI Codex (CLI) in April, and now Gemini CLI in June. All three of the largest AI labs now have their own version of what I am calling a "terminal agent" - a CLI tool that can read and write files and execute comman...