@_Felipei
iAccount based inBrazil
About this account
- Account based in
- Brazil
- Connected via
- Brazil App Store
Account-level information from X, not a live location or the device used for a specific post.
@ApacheArrow / Databases / Compilers. (past @SDFLabs, VoDa, @Spotify). Rust/C++/TLA⁺🇧🇷 → 🇸🇪 → 🌎
Joined June 2008
- Tweets29.2K
- Following2.5K
- Followers5.5K
- Likes41K
If you wanted fast but broken assembly, there’s a tool for that already! It’s the -O3 optimization level.
Programming Languages aren’t fast nor slow. Programs implemented in them can be fast or slow. You can say some PLs impose overhead on certain constructs. Rewriting from Python to Rust makes it likely, but not certain, that performance will improve.
Felipe O. Carvalho retweeted
Replying to @filpizlo
Do you really think that writing a program in assembly makes it 17x faster than writing it in Rust? I wish compilers had that much potential 🤣
One day, tpot is talking about formal specs to make sure programs are correct. The other day the talk is about generating asm directly. Formal guarantees be damned.
dhh be like “look at how ugly Rust is!” then proceeds to show a beautiful snippet of polymorphic Rust code that can be compiled to code that doesn’t need virtual calls.
Impressive how a PR can have multiple pages describing the code with no mention of the motivation for the change because motivations don’t come into the LLM context.
When you realize type systems can be way better than Java’s type system in 2006 and you can remain consistent with your aesthetics by claiming you never actually look at Rust code because agents do all the work.
If you don’t try to break the TLA+ specs, you might not catch implementation mistakes. It’s very easy to assume atomicity where there isn’t one. At the same time, you can’t have a model with super fine-grained steps lest you end up with combinatorial blowup.
ALT I ran it - and it passed cleanly (2941 states, no violation). That's a real (negative) finding, not a wasted run: this simplified model can't reproduce the bug, and it's worth understanding why before going further. Why it doesn't fail: in this flat model, WorkerClaimKey bundles "claim the key" and "send it" into one atomic step - a worker never sits in a state of "has claimed key i but hasn't sent it yet." DriverExitMainLoop (Main → DrainConnecting)
TLA+ mentioned!
I used Opus 5.5 to formally verify the Claude Agent SDK using Lean. A couple short prompts = 16 PRs fixing various bugs and race conditions. Video attached.
TLA+ also works well. I sometimes combine Lean and TLA+ to look for issues around data flow, concurrency, and state mgmt.
I don't know either language well, but Claude is excellent at both. This approach is super useful for formally modeling your code and finding bugs that a human probably wouldn't have spotted.
Is formal verification the future of coding (or at least, bug finding)?
My face doesn’t hide that I’m a bit star-struck.
I have been watching @andy_pavlo’s lectures for so many years! 🤩
I’m at the Rows & Columns @ClickHouseDB event. @andy_pavlo is teaching us about the history OLAP/OLTP/HTAP and how it relates to Larry Ellison’s marriages across the decades.
The hard thing about monetizing the automation of shopping is that most people love shopping. They are addicted to the process. They are not going to delegate their hobby to AI.
I learned this a long time ago, but the most important lesson was shutting up about it. It does help when naming stuff in a compiler project though.