Posts

mailsearch: Fast Apple Mail Search with Rust, SQLite FTS5 and MCP

Image
The search box in the macOS Mail app often finds nothing. I type a word that I know is in a message, and I get an empty list. Mail has no setting to repair its index, and I got tired of scrolling. So I wrote my own search: mailsearch , one Rust binary that indexes the Mail store into SQLite and gives me a command-line tool, a search-as-you-type terminal screen, and an MCP server, so an AI agent such as Claude Code can search my mail too. All screenshots in this post use a small, fictional demo mail store. The measurements come from my real store of about 67,000 messages. Read the files, not the app Mail keeps each message in one .emlx file under ~/Library/Mail . I call this folder the Mail store . An .emlx file is simple: a first line with a byte count, then that many bytes of standard RFC 822 email, then an XML property list that I ignore. mailsearch reads these files directly. It does not use Spotlight, it does not touch the database...

ProCowork 0.2.2: Which Rows, and Which Pro Window

Image
This morning I posted the 0.2 update of ProCowork , my experimental ArcGIS Pro add-in that puts the Claude Code engine in a dockable chat panel. You type a request, Claude writes ArcPy, and the add-in runs it on the live, open project. Then I ran an audit on the code, and two hours later I had 0.2.2. Two of the fixes answer a question that matters a lot once an agent edits real data: which data does a call actually touch? Which rows: path or layer In ArcPy you can open the same data in two ways. A data-source path , such as C:\data\city.gdb\Parcels , is the whole dataset. A live layer is the user's view of that dataset. Cursors and geoprocessing tools that get the layer honor its selection and definition query. So "set ZONE to 'R' for the parcels I have selected" must go through the layer. If the call goes through the path, it changes every parcel. The add-in makes this choice explicit. list_layers reports eac...

ProCowork 0.2: ArcGIS Pro 3.8, a Real Stop Button, and Safer Edits

Image
A couple of months ago I wrote about ProCowork , my experimental ArcGIS Pro add-in that puts the Claude Code engine in a dockable chat panel. You type a request, Claude writes ArcPy, and the add-in runs it on the live, open project. Since then, ArcGIS Pro 3.8 came out, and I spent some bench time on the parts that matter once you let an agent touch real data. This is a short update on version 0.2. One build for Pro 3.7 and 3.8 Pro 3.8 runs on .NET 10, the same as 3.7. So I did not need two builds. The add-in compiles against the 3.7 SDK, the oldest release I support, and declares 3.7 as its minimum Pro version. The same .esriAddinX loads in both. On Pro 3.8.1 the build is clean and the ArcPy write path passes headless. I have not yet exercised the chat panel inside the 3.8 UI, so treat 3.8 as "should work, tell me if it does not." Pro 3.6 and earlier are no longer supported. A Stop button that actually stops I did not m...

Neural Canvas: Retraining Seven Browser Models on What You Actually Draw

Image
I came across Neural Canvas by Muhammad Essa: a web page where you draw a digit and watch seven small neural networks work on it, layer by layer, live in the browser. No server, no framework, just p5.js for drawing and Math.js for Z = W·A + b . I love that kind of project. So I drew a clean 7, and model 1 said 3. That started a few weeks of work. This post shows what was wrong, what I changed, and what the numbers say now. Everything still runs in the browser. The training moved to a GPU machine, and only the weights come back as JSON files. My fork is on GitHub: mraad/neural_canvas . The live demo is at mraad.github.io/neural_canvas . Model 1 with a drawn 7. The board is on the left, the hidden layers are in the middle, and the prediction is on the right. Two problems, not one The page has seven models: four digit classifiers (MNIST, Eastern Arabic-Indic, Persian), one Siamese network that compares two drawings, one convolutional network (CNN) and one sketch classi...

Can a Drone Keep a Map True? Weeks 2-5: Fly Only Where It Matters

Image
Updated 29 November 2026 with week 5, the registered test against no flight. In week 1 I taught a simulated drone to see cars on Paris streets. That was the easy part. The question of the project is harder: can a drone keep a map true by flying only where a look can change a decision? Weeks 2 to 5 answer it, with the rules written down before the scores. The answer is yes, but the margin is smaller than the headline number says, and that is the interesting part. The source is on GitHub: mraad/map-keeper . The simulator is mraad/drone-sim . A street network small enough to be exact The decision is a car route from Place Saint-Michel (A) on the left bank to the Hôtel de Ville (B) on the right bank. Every route must cross Île de la Cité. I wanted exact inference over every combination of open and blocked streets, with no sampling and no approximation. My own inquisitive-map code does that, with a hard limit: 24 nodes, 40 segments, 256 routes and 12 uncertain segments, so 2 12 =...

Can a Drone Keep a Map True? Week 1: Teaching It to See Cars

Image
After the "Decisions you can check" workshop in London this month, I kept coming back to one weak spot in all my spatial decision demos. They decide once, on one snapshot of the map. Real maps get old. A street that the catalog says is open has a delivery truck parked across it, and nobody knows until somebody looks. So I started a new project with one question: can a drone keep a map true? The interesting part is not "fly over everything and look". That is easy and expensive. The interesting part is to fly only where a look can change a decision. The source is on GitHub: mraad/map-keeper , and the simulator is mraad/drone-sim . This post covers week 1 of five: before the drone can be clever about where to look, it must see. The problem A map catalog keeps one record for each street segment. A segment is one street between two intersections. The record says that the segment is open or blocked, and it has an age. In this project, the decision that the catalog s...

Picking an H3 Cell Size with MAUP, and Crossfiltering AIS Pings with DuckDB-WASM

Image
I have a week of AIS vessel pings from NOAA MarineCadastre: 48,734,843 rows from 20,234 vessels in US waters, 2020-01-01 to 2020-01-07. I wanted two things from it. First, a map of pings per H3 cell where the cell size is chosen by a number, not by my eye. Second, a page where I put the pointer on a day and an hour, and the map shows the pings of that hour, instantly, in the browser. This post covers both. All the aggregation runs in DuckDB, on my laptop for the build and in the browser (as WebAssembly) for the interactive views. The source is on GitHub: mraad/heatmap . The ArcGIS crossfilter app. The pointer is on the heatmap cell Monday 12:00 UTC. The pings of that hour glow on the map; all other pings are dimmed. The data An AIS ping is one row in the NOAA CSV: one vessel position ( LAT , LON ) at one time ( BaseDateTime , UTC), with the vessel id ( MMSI ). NOAA publishes one zip per day at https://coast.noaa.gov/htdata/CMSP/AISDataHandler/<year>/AIS_YYYY_MM_DD.z...