Here I go quoting song lyrics to myself again I have to confess I almost forgot to write a year-end post until today, New Year’s Eve. What did I do in 2025? As before, I worked on a lot of things on Anthropic’s interpretability team, including our massive circuit tracing and biology papers from March. Also as before, I helped run Galactic Puzzle Hunt 2025 with the rest of ✈✈✈ Galactic Trendsetters…
(Background/disclaimer: I work at Anthropic, far from any efforts related to math reasoning or evaluations; opinions are my own. I was an IMO gold medalist in 2012.) I way missed the news window on this one, but I thought it was interesting and a bit underappreciated that the fraction of gold medalists at the 2025 IMO (72/630 = 11.4%) is the highest it’s been since 1981. Crudely, IMO gold medals…
In Vim, in Insert mode, if you type Ctrl-K followed by two characters, you can insert a special Unicode character corresponding to those two characters. The two-character combo is often easier to remember than other codes. These are called digraphs. For example, Ctrl-K 1 2 will insert ½ . Everything below this is unnecessary detail. What are all the digraphs? I used to think the big table :help…
I’m still doing interpretability at Anthropic. This year, among many other research updates, we scaled sparse autoencoders to Claude 3 Sonnet . There’s not a whole lot I have to add. I like to think I improved at various clichéd abstract work skills that I don’t have anything insightful to say about, the most front-of-mind being communication and prioritization. It’s good to, uh, communicate what…
If you’ve dabbled in data visualization, there’s a good chance you’ve encountered the colormap viridis , which was created for matplotlib in ~2015 . This particular gradient is brought to you by d3 You may also know about some of the considerations went into the colormap’s design, chiefly perceptual uniformity: equally distant colors on the colormap should “look equally different” to humans. I…
In theory, the idea here is similar to when I was learning React/Redux and diving into SQL selects . In practice, I think most of D3’s complexity isn’t exactly in a direction that is elucidated by writing down types for everything, so the title is a mere personal snowclone. I’m just writing things out to an arbitrary amount of detail until I understand them and can refer to what I wrote here…
…it’s still you. Looking at yourself in the window. The second afternoon after you finally get COVID for the first time. As previously reported, I left Zoom late last year and spent a bit of time unemployed, traveling for some of it but mostly staying home. In the process, I got COVID, though not with a particularly interesting story. Would not recommend. Then I started work at Anthropic doing…
I want to add a second word in the title, something like “Koans” or “Vignettes”, but I don’t know a word with the right connotations. I realized recently that I have been walking around for a long time with some confusion and unknown unknowns about how concurrency works in various settings, and decided to write about it until I stopped being confused. This post doesn’t therefore have much of a…
Passwords. It’s 2023 and we still have to deal with them. Many people know that, per the canonical xkcd , sequences of randomly chosen words such as soak-science-wander-pew-goldfish-xray-speed-consult regenerate or get the list as .txt or a standalone generator (if my JavaScript were working the above would be a random password and you wouldn’t be seeing this message) make relatively memorable but…
“shouldn’t this have been published a few months ago?” yeah, probably. I even considered submitting it to the AoC contest . time is a real beast. The title is clickbait. I did not design and implement a programming language for the sole or even primary purpose of leaderboarding on Advent of Code. It just turned out that the programming language I was working on fit the task remarkably well. I…
My seventh year doing Mystery Hunt with ✈✈✈ Galactic Trendsetters ✈✈✈, and after a hiatus it was in person again! This also makes it my first in-person Mystery Hunt as an alumnus, where I flew in and stayed at a hotel. How time marches on… I appreciated getting to see everybody on Galactic, as well as quite a few internet puzzlers at the location where all the cool people always go, Flour Bakery…
One day I’m going to run out of the energy to find barely adequate allusions for the titles and thematic music videos for the openings of these end-of-year posts, and they’ll just be called “2095 in Review” or whatever. Or maybe I’ll just stop making them. But not today. Good song. Good animation. Incredibly out of place on its YouTube channel, in the most inspiring chaotic good way. I closed out…
Code golf is the recreational activity 1 of trying to write programs that are as short as possible. 2 Golfed programs still have to be correct, but brevity is prioritized above every other concern — e.g., robustness, performance, or legibility — which usually leads to really interesting code. I think code golf is a lot of fun (although I think a lot of things are fun, so it’s one of those hobbies…
This post is brought to you by “I am procrastinating other stuff by doing some long overdue maintenance on my blog”. Mainly, I finally replaced the old float -based layout from the random Hugo theme I forked, which I had been keeping just because it wasn’t broken, with flexbox, so that I could more easily tweak some other things. If things look broken, you may need to force-refresh or clear your…
Don’t you hate it when CTFs happen faster than you can write them up? This is probably the only PlaidCTF challenge I get to, unfortunately. 1 Web is out, retro is in. Play your favorite word game from the comfort of your terminal! It’s a terminal Wordle client! I only solved the first half of this challenge. The two halves seem to be unrelated though. (Nobody solved the second half during the…
Don’t forget to wear your mask… nc challs.actf.co 31501 If I had a nickel for every CTF challenge I’ve done that involves understanding the internal structure of a QR code, I would have two nickels. Which isn’t a lot, etc etc. That previous challenge probably helped me get first blood on this. The source code is wonderfully short: import io, qrcode, string flag_contents = [REDACTED] assert all (i…
Now that kmh is gone, clam’s been going through pickle withdrawal. To help him cope, he wrote his own pickle pyjail. It’s nothing like kmh’s, but maybe it’s enough. Language jails are rapidly becoming one of my CTF areas of expertise. Not sure how I feel about that. #!/usr/local/bin/python3 import pickle import io import sys module = type (__builtins__) empty = module( "empty" ) empty.empty =…
It’s clam’s newest javascript Calculator-as-a-Service: the CaaSio Please Stop Edition! no but actually please stop I hate jsjails js isn’t a good language stop putting one in every ctf I don’t want to look at another jsjail because if I do I might vomit from how much I hate js and js quirks aren’t even cool or funny or quirky they’re just painful because why would you design a language like this…
I participated in the AGI Safety Fundamentals program recently. The program concludes with a flexible final project, with the default suggestion of “a piece of writing, roughly the length and scope of a typical blog post”, so naturally, I deleted all but the last two words and here we are. When I previously considered machine learning as a field of study, I came away with an impression that most…
Last weekend Galhacktic Trendsetters sort of spontaneously decided to do DiceCTF 2022 , months or years after most of us had done another CTF. It was a lot of fun and we placed 6th! Back in the day the silver edition was the top of the line Texas Instruments calculator, but now the security is looking a little obsolete. Can you break it? It’s yet another Python jail. We input a string and, after…
Last weekend Galhacktic Trendsetters sort of spontaneously decided to do DiceCTF 2022 , months or years after most of us had done another CTF. It was a lot of fun and we placed 6th! I made a blazing fast MoCkInG CaSe converter! blazingfast.mc.ax We’re presented with a website that converts text to AlTeRnAtInG CaSe. The core converter is written in WASM, and also checks that its input doesn’t have…
Sixth year hunting with ✈✈✈ Galactic Trendsetters ✈✈✈! As last year’s writing team (previously: 2020 , 2019 , 2018 , 2017 , 2016 , writing with Random in 2015 ) we had one final responsibility: running the traditional How to Hunt workshop shortly before this year’s hunt. I didn’t play a huge role in that, but I lurked and reminded myself some things about how new puzzlehunters think about puzzles,…
It’s another year, huh. 2021 is the first year during which I held a full-time job continuously. My disposable income and discretionary spending have both increased the most sharply since, well, ever. It’s weird. We are still in a pandemic. Greek letters continue to be associated with uncool things. I got vaccinated and started taking measured (but still small) risks. Funny story: my first…
A famous Trail of Bits post says to stop using RSA : it’s simple enough to make people think they can implement it correctly, but full of invisible traps. In contrast, although elliptic curve cryptography (ECC) implementations could also fall into subtle traps, they usually don’t. The post conjectures that this is because ECC intimidates people into using cryptographically sound libraries instead…
Imagine you had a button you could press whenever you saw or heard something you wanted to remember. By holding that button down for about a minute, you’ll be able to remember that thing forever . There are no undesirable side effects. Sounds like a pretty good deal, right? There’s only one catch: you have to regularly find new things to press the button on. If you stop for more than a few days,…
I subscribed to Discord Nitro a month ago, but only recently did I start thinking about the full range of powers the subscription granted me. I could create my own reactions, dump them in my personal server, and use them to react anywhere. However, when I finally started trying to create some reactions, I hit an interesting snag: Discord can be used in dark and light mode, 1 and a reaction will…
This post is motivated by reasons very similar to the ones that motivated my React and Redux “tutorial” . Again, it should be more accurately but less informatively titled “How I wish SQL SELECTs were explained to me”. Again, it does not imply that this method of explanation is suitable for anybody else. One difference is that this time, I mostly only wanted to learn about SQL SELECTs to the…
Did you know that it’s harder to become an MIT admissions blogger as an MIT student than it is to get into MIT as an applicant? It was true my year, in which 18,306 students applied and 1,467 were admitted (8.0%), 1 whereas 69 students applied for 5 blogging spots (7.2%). 2 Anecdotally it might also be true for future years. I was among the 92.8% who got rejected in the latter process. Although I…
Note: if you are viewing this shortly after it’s published and somehow don’t want to be spoiled on Mystery Hunt, make sure this spoiler formatting shows up: this text should be spoilered ; if it doesn’t, try shift-refreshing. (There are Correct Ways to fix this, but I’m too lazy to do them. Sorry.) Well, we did it. ✈✈✈ Galactic Trendsetters ✈✈✈ ran an MIT Mystery Hunt. Somehow, it slipped my mind…
It’s a strange and darkly funny story — Tim Minchin wrote the album this is from, Apart Together , well before the pandemic hit and social distancing became the norm, and I assume I am not alone in finding that the song resonates unusually strongly as a result. 1 By Jove, it resonates. Nobody needs me to say that it’s been a rough year. People have been complaining that each of the last few years…
Advent of Code (briefly, “AoC”) is a series of 25 festive programming puzzles 1 released daily December 1–25. Each puzzle has two parts, which use the same text input and are related; to solve a part, you submit the right output corresponding to the input on the website. If you’re reading this, I suspect there’s a good chance you knew that already, but in case you’re new to Advent of Code, let me…
By a strange quirk of fate, I have started writing C++ for a living. Learning C++ was about as complicated as I think I expected it to be. By line count, I’ve written a lot of C++ for programming competitions, but I knew that I had only ever used a small cross-section of the language: basic control flow and variables, STL containers and algorithms, structs on which you mechanically define bool…
Not a very completionist run. I graded myself pretty strictly though — both sides of every “and” need to count; “all” means literally all; fuzzy actions and phrases require full psychological commitment to qualify.
One thing many mathematically-inclined programmers run into when implementing mathematical algorithms, particularly number-theoretic ones, is that the modulo operation doesn’t behave how they expect or prefer. In many languages, this operator is denoted % . Concretely, one might prefer that, if the second argument is positive, then the modulo operation would always give a nonnegative result. Under…
Fifth year with ✈✈✈ Galactic Trendsetters ✈✈✈ (previously: 2019 , 2018 , 2017 , 2016 ; writing with Random in 2015 ). We won! But apparently I’m still really busy, so I’ll probably just focus on a few highlights of things I personally experienced and get this post out the door. The theme in a few sentences: As suggested by the invitation sent out to teams, there was a wedding. It turned out to…
This is a weird song choice — I have not even watched the movie. But there is a story, and there is a thematic correspondence. The story is that I was interning remotely at a coworking space over the summer. One night, I attended a karaoke event hosted there, the kind where adult human beings socialize and where I didn’t know anybody else, and I sang this song. Afterwards, another attendee told me…
It’s December, so it’s time for a lot of things, including Advent of Code . I will not be able to be as competitive as I was last year, and already lost a lot of points to a really silly mistake on day 1, but I’ll be playing when I can and golfing the problems when I have time (so far: 7 + 14 bytes). As one might expect, Day 1 is not too complex, but the second part can be analyzed to some…
Call me maybe? nc rev.chal.csaw.io 1001 A rev with a nasty binary. There are so many functions. I do not like this binary. Static Analysis After staring at the sea of functions in IDA for a little bit, I gave up and tried dumb things instead.
come get me http://web.chal.csaw.io:1003 This was a web challenge with a few pages. The “User” page displayed some user information: Name: Alice Email: alice@fakesite.com Group: CSAW2019 Intro: Alice is cool Name: Bob Email: bob@fakesite.com Group: CSAW2019 Intro: Bob is cool too The “About” page simply told us, “Flag is located at /flag.txt, come get it”. The most interesting page was “Upload”,…
Welcome to pwn. nc pwn.chal.csaw.io 1005 Ahhh, CSAW CTF. Amidst all the other CTFs where we’re competing with security professionals who probably have decades of experience and who follow security developments for a living or whatever, there remains a competition where scrubs like me can apply our extremely basic CTF skills and still feel kinda smart by earning points. Now that I’ve graduated and…
not part of the ongoing series, but you can almost pretend it is. This sentence and the one before it are not a puzzle. Imagine a word search. Now imagine you aren’t told what words to look for. Now imagine you aren’t told it’s a word search. Now imagine it isn’t a word search. — Mike Develin, via Thomas Snyder (aka Dr. Sudoku) This post aims to be a fairly comprehensive introduction to…
part of the “what I learned after four years at MIT” series, I guess? When I was very young, I thought cooking was easy. I sliced plastic vegetables with a toy knife and then Velcroed them back together, ad infinitum. For at least some time, I wanted to be a chef when I grew up. When I was slightly less young, I thought cooking was hard. My reference points were mostly (1) my parents, who seemed…
part of the “what I learned after four years at MIT” series, I guess? There’s some oft-cited psychology studies that suggest that once your salary goes above $75,000, additional money doesn’t make you happier. This sounds like a sage bit of life advice if it were true, the ultimate rebuff against excessive greed and materialism and sacrificing other things for a six-digit salary, but it overstates…
part of the “what I learned after four years at MIT” series, I guess? A short post this time. I can’t begin to count the number of times we were exhorted in high school to go to class. College is different, they said. Nobody is going to force you to go to class any more. This is what you came to college to do, what you paid so much time and money for. It’s on you to make sure you’re learning. By…
We interrupt the irregularly scheduled philosophical posts for some programming memes: Over the last few days, the Internet has divided itself over what the value of the expression 8÷2(2+2) should be. Some say it should be evaluated as (8÷2)×(2+2) = 16. Some say it should be evaluated as 8÷(2×(2+2)) = 1. At the risk of belaboring the obvious, the core dispute here is not really mathematical. There…
part of the “what I learned after four years at MIT” series, I guess? I hated timed essays in high school. It’s pretty clear if you skim that part of the blog archives: My [SAT] essay got a 10 out of 12. It’s an essay I’d be ashamed of posting anywhere else; it’s disgustingly traditional and formulaic. […] This was simply because I knew that using my normal essay-writing mindset, I’d get maybe a…
Part of a series of posts about what I learned after four years at MIT. We’re ramping up to deeper topics eventually, I promise. Soon™. This post is about things. You know, physical objects. Earthly possessions. The indispensable yet fickle chains that bind us to this plane of existence. As a freshman I loved getting free stuff. I went into my first career fair starry-eyed, taking free pens and…
I wanted to write a post after two years at college about everything I had learned. I didn’t, firstly because I didn’t make it a priority, and secondly because trying to write about everything I’ve learned at MIT over any nontrivial length of time is the kind of poorly scoped endeavor that I could never complete to my own satisfaction. Two years came and went, and now it’s been two more years and…
http://111.186.63.17/perf.data.gz Environment: Ubuntu 16.04+latex In this challenge, we get a gzipped file called perf.data and a minimal description of an environment. Googling this reveals that perf.data is a record format of the perf tool, a Linux profiler. Installing perf allows us to read perf.data and see some pretty interactive tables of statistics in our terminal describing the profiling…
I put this question in my FAQ, because at least two people have asked me this question, and that’s how frequent a question needs to be to be on my FAQ: I got an IMO 1 gold medal in 2012, as a ninth grader, and an IOI gold medal in 2014, as an eleventh grader. I could have kept going to either, or even decided to try taking the IPhO or something, but I didn’t. Why not? The short answer: It was a…