Dan Wallach

537 Followers
839 Following
414 Posts
Program Manager, DARPA Information Innovation Office (on leave from Rice University)
Twitterhttps://twitter.com/danwallach
Githubhttps://github.com/danwallach
Homepagehttps://www.cs.rice.edu/~dwallach/
Mediumhttps://medium.com/@dwallach

I've recently been playing around with vibe coding some basic tree-like data structures (treaps, red-black trees, AVL trees, and hash-array mapped tries) in Rust, and then twisting the arm of the LLM to do an optimization from Sarnak and Tarjan (1986) that lets you keep a version history without paying O(log n) path copying costs. This is the sort of thing that, in the old days, might have made for a useful undergraduate senior thesis that they'd crank on for a semester.

I'm at a point where I now have modest confidence in the correctness of my vibe code (e.g., it's got property-based tests that check the invariants, and also doesn't crash under load, despite lots of internal calls to Option::expect()), but I'm not confident enough to share it. It's not bad but not great.

At some point, I'll write up something useful about what I've learned about how to vibe code (in short, write vicious unit tests or you're doomed), but meanwhile I thought I'd skip straight to the data.

For comparison, I also included Rust's "im_rc" crate, which includes a human-written HAMT by
@bodil; I'm using the faster "Rc" version since that's how I vibe-coded all those others.

Punchline 1: @bodil wins. Their work is the "IM HashMap" in the graph. Higher is better. X-axis is problem size and Y-axis is throughput. The benchmark was 80% reads and 20% a mix of inserts, deletions, and updates. Every "version" is saved, creating (hopefully) real memory pressure.

Punchline 2:
The Sarnak-Tarjan optimization definitely helps for the various binary trees, but my attempt to do it for HAMT ended up costing a factor of two in perf. Yikes.

Graph below generated by Criterion.rs. Yes the colors are horrible. Measured on my M1 MacBook Air, because why not.

I gave a keynote talk last week at NDSS. I spent the front half talking about memory safety and how we can, once and for all, eliminate things like buffer overflows. In the back half, I talked about how DARPA works, saying all the things that I wish I'd known about DARPA when I was starting my own academic career. I also wore my favorite vintage aloha shirt.

Coffee nerding: decaf edition.

Coffee YouTuber James Hoffman organized a cool thing: he bought several tons of a specific single origin bean and then divided it four ways. Three went to different decaffeination plants, one normal as a control. Then they divided all that across fifty different roasters. I bought a set from a Houston local roaster (New Heights Coffee Roasting). They included their own decaf just to be fun.

This is a set up for a coffee "cupping", wherein you spoon it out and slurp to taste. Or, if you're interested in not sharing spit, you spoon it into a cup and slurp from the cup. My father-in-law and I did the latter version this afternoon.

Tentative conclusion: Swiss Water process decaf tastes closest to the original, caffeinated bean. Ethyl acetate process had a funny, chemical side taste. CO2 process was better but still not right.
#coffee

Meanwhile, at Casa Wallach.

I'd been getting lazy on the care and feeding of my sourdough starter, and my bread was suffering (flat, blah), so I spent the past few days refreshing the starter daily. I also added a bit of pickle juice (from proper fermented pickles, not vinegar) to try to spike the starter with more lactobacilli.

The results seem very promising. Taste tests coming soon.

It's my turn to bring something sweet to the staff meeting today, so I went for it and baked an enormous chocolate babka, braided in the style of a four-strand challah. It barely fit corner-to-corner on the sheet pan.
Selfie, of sorts, with the 89% eclipse and my sophisticated, multilens pinhole camera.
Work in progress: NY deli-style fermentation pickled green tomatoes. Ready to eat in maybe a month. #fermentation #pickles
Dug out of a drawer in the midst of a long-overdue cleaning of my office: three HP calculators, corresponding roughly to being a high school sophomore, senior, and then college freshman. The HP-28S, in particular, was a beast of a machine. It has lambdas, kinda, that you could push to the stack and then execute.
Seems like a good day for a #CatsOfMastodon post. I suppose it always is.