I got caught up in design again
Over a week ago, I had a thought: "I'm gonna make my website cool."
I really love visual exploration. But there's a problem: given no constraints, it's so easy to get wrapped up into a one idea and go too far down that path.
Here's what happened: I found a cool trick to "warp" real DOM elements. I took this approach to the extreme and tried to build my whole site around it. Here was one early version:
I still really like this. It feels like my personal messy desk that that world can see.
Warp any DOM element with this bookmarklet
I've been working on a design and found a cool effect that would make a great bookmarklet. A bookmarklet is a JS snippet that you can drag to your bookmarks bar and run on any page.
If you've ever wanted to warp DOM elements on a page, you're dream has now come true. Just drag this to your bookmarks bar and click it on any page:
Building an AI REPL with QuickJS
Yesterday I did a livestream where I built a usable REPL with AI integration. Mostly from scratch, all in 3 hours. It uses a custom WASM build of QuickJS for evaluation. If the evaluation fails, it sends the text to Anthropic to speak to Sonnet 4.5.
The idea was to meld a live evaluation environment together with AI. By using QuickJS as an evaluator, we get more than just a sandbox: we are able to inspect bytecode of functions, we could pause execution as needed, etc.
I thought we might discover use cases that would be difficult to do by sending JS to eval off to a remote sandbox (or a separate node instance). It's also a UX experiment: you can either write code or talk to AI.
Wrangling my email with Claude Code
I'm terrible at managing emails/DMs/etc. A lot of times it feels like trying to keep up is a full-time job in and of itself.
Now that I don't have a job I finally have time to figure out a better workflow to manage life. I have a good workflow for writing notes and managing tasks in Bear, but my biggest weakness is staying on top of communication. What happens frequently is I'll have a backlog so big that I end up ignoring it, which is really bad as I miss out on opportunities or important emails.
We now have AI as an incredible tool. I was always too busy to sit down and learn how to leverage AI to transform my life; it's so early and this space is super chaotic. However, I finally have time to figure out new workflows that use AI.
My first attempt was to run my own instance of n8n on fly and setup some workflows for processing email. I got it working (and accidentally spammed my wife with multiple emails every hour, which she is still annoyed by), but I realized right now I don't need automations. I just need new tools to help manage my life.
Next, I turned to Claude Code. I use it all the time while writing code, and I knew there was a way to extend it. So I thought of a specific use case: after announcing I left my job, I received a lot of emails from interested companies. Since I'm still dealing with some burnout, it's been difficult to stay on top of. How can AI help us here?
Subverting control with weak references
Weak references are neat. The best language features unlock different kinds of abstractions, and weak references do exactly that. Let me show you why.
In JavaScript we have two APIs to work with weak references: WeakMap and WeakRef. (Before I wrote this article I thought WeakRef was only a proposal, but it turns out most browsers have already implemented it)
One of the more common use cases uses WeakMap. This data structure keeps a weak reference to the keys in the map, and a strong reference between the keys and values. I guess I should explain what a "weak reference" is: usually if you have a reference to an object in a variable, it stops the garbage collector from deleting it (which makes sense). It'd be weird if suddenly your variable pointed to nothing right?
A "weak reference" doesn't stop the object from being garbage collected. Usually languages' semantics don't allow a variable to change in the middle of execution however:
// this doesn't exist, but what if we could create a weak reference like this?
let weak trans = new Transaction();
// do a bunch of things...
// error! trans is... nothing? it got garbage collected
trans.transfer();Quick synthesizer with harmonics
I've been studying synths and recently this guy's tutorial really make things click for me. The way he shows the sound in the frequency spectrum really shows what makes the sound, and explaining harmonics was really interesting.
Tonight I thought I'd give Cursor a chance to create a quick synth from scratch to play with harmonics. I also wanted to visualize the frequencies. Here's the Cursor came up with really quickly while the kids brush their teeth:
Intro to the new site
I just pushed a new backend for this site. I love having a quick direct connection to my site: being able to write content and publish it with a quick press of a key. Previously, I was using logseq for this but while writing my latest post I got frustrated with how slow it is.
I use this site not just for writing content, but also quick sketches of interactive code. I can easily make a code block interactive by tagging it to run inline in the page, making it easy to develop quick ideas. For this to work, publishing needs to be instant and the editing experience is vital. In logseq, it took 3-4 seconds to publish content (some of this is due to how I wired up the process) but worse is the editing experience in large posts with lots of code was very slow and frustrating.
My new setup uses obsidian to write content which I've found extremely polished and fast. A big difference is logseq is an "outliner" and obsidian treats content as a simple file of text. I'll miss certain features of outliners but overall the UX improvement is very much worth it.
New site allows code with syntax highlighting (just as before):
function calc(x) {
return x + 6 * 10000;
}Why does the chromaticity diagram look like that?
I've always wanted to understand color theory, so I started reading about the XYZ color space which looked like it was the mother of all color spaces. I had no idea what that meant, but it was created in 1931 so studying 93-year old research seemed like a good place to start.
When reading about the XYZ color space, this cursed image keeps popping up:
