This week’s theme song is Van Morrison’s “Caravan”. It’s a banger. Turn it up. That’s enough. So you know it’s got soul. Does it tie in with anything in this issue of Last Week in Pony? I could probably invent something, but really, I just love to drop something I’ve been enjoying lately in here every week because why not? If I’m going to write all this stuff up every week, I deserve a few indulgences.
This week’s theme song is Player’s “Baby Come Back”. People ask me sometimes how many people use Pony, whether it’s used in production. The honest answer to both is that I have no idea. We’ve never had much visibility into who’s out there. Every so often a hint comes through that someone is shipping Pony for real, and then it goes quiet again.
This week’s theme song is The Shallaras’ “I Put Something in Your Drink”. The Shallaras are two people. One plays drums and guitar at the same time. The other plays sax and sings. Two people, and they sound like a whole band. I think about that a lot, how much a small group can get done. That was this week.
Pony’s runtime has a set of stress tests. They run in CI, each one a program that exercises the runtime over and over for an extended period of time: one passes messages between actors without a break, another opens and closes network connections again and again, sending data back and forth. The idea is that the more you push on a part of the runtime you think is bug-prone, and the longer you keep at it, the more likely you are to shake out a bug that only turns up once in a while. For the runtime, bug-prone means “susceptible to concurrency issues”. And we hammer away at those areas as much as we can. Or try to anyway. That was the idea.
This week’s theme song is Willie Nelson’s “Midnight Rider”. There’s no clever reason behind it. It’s a great song, it brims with energy, and this was a week with energy to spare. Sometimes a theme is just a vibe, a feel. This one fits.
Calling C from Pony is usually easy. You write the FFI declarations, you call the function, you’re done. Sometimes it isn’t that easy: you need to call a macro, so there’s no symbol to bind to. Or you have to fill in a struct by hand before you can pass it in. Or the calling convention is one Pony’s FFI can’t express. C has all kinds of little oddities that don’t line up with Pony. When you hit one of those oddities, it is time to reach for a shim: a small piece of C between Pony and the library. Building it and shipping it has always been the hard part. Not anymore.
This week’s theme song is The Rubberbandits’ “Horse Outside”, and it’s completely brilliant. It’s a man at a wedding telling everyone to keep their cars. Fuck your Honda Civic, he’s got a horse outside. Pony spent the week in that exact mood. Fuck your external linker, it’s gone. Fuck your second build system, ponyc compiles your C shims itself now. That last one came together so fast it just felt good. Pony is the fucking horse outside.
This week’s theme song is Willie Nelson’s “Uncloudy Day”. Last week shipped with some brimstone in it, and this week the skies cleared. No releases went out, but main kept filling up, and the headline is that RFC 86 is implemented. The stdlib json package now has a way to turn any JsonValue back into a string.
This week’s theme song is 16 Horsepower’s “Black Soul Choir”, all banjo and brimstone, because we shipped a release with some brimstone in it. ponyc 0.64.0 is out. Three breaking changes, two long-standing compiler bugs put to bed, and the recursive type alias work all landed in one drop. The whole networking stack moved over with it. Red also shipped the first release of a timezone library.
Here’s how it is: for a few years, off and on, I went looking for a bug.
My aarch64 testing machine, a sturdy little Raspberry Pi, was the site of so very many segfaults. The same tests would fail run after run, and I could boil the crash down to a handful of lines of try and error. It came out of the machinery Pony uses to unwind the stack when error fires. So I’d pull that code up and compare it to the spec. It looked right. I’d run out of leads and put it down. Months later I’d pick it up and start over.
I never found it.
I kept coming back to it. I’d talk it through with Sylvan, and we’d end up in the same place. I’d talk it through with Joe, and we’d end up there too. The bug probably isn’t ours. It’s probably down in the guts of LLVM, somewhere we don’t own. Probably.
So I stopped chasing the bug and looked at where it lived: the stack unwinding. Pony doesn’t have to unwind the stack to raise an error. Take the unwinding away, and the bug has nowhere left to be. Soon, that’s how it’ll work — there’s a pull request open against the compiler that takes stack unwinding out of Pony’s errors, and that bug is part of why I wrote it. But only a part.