Monday 13th, January 2020.
A company's office on Goswell Road, London.
Monthly meeting of the London Ruby User Group (LRUG), and a presentation by h-lame about "listening" to source files. In the description of the talk, the following:
Some time ago I stumbled across the header description for WAV files and wondered, what if I took a file and calculated the appropriate WAV file header for it, could I hear my data? Yes, you can. You probably don't want to, but you can.
"Who WOULDN'T want to?" was what I thought. There was something fun and useless in that project that I found brilliant. But maybe that's just me, whose very first project was a random sentence generator.
Fast-forward a year and, mid-pandemic, I asked h-lame about this project. He told me the the project was a few years old, that it was inspired by people who were trying to visualize Microsoft Word's executable file. At first, he said, he played with turning any file into a WAV file by changing the file header; then he explored changing files into bitmaps, which required changes in the header and also certain manipulation of the data as well; and finally he ventured into MIDI, for which both data and headers had to be messed with quite a lot. In his presentation, he transformed all of Ruby's source code files into WAV, BMP, and then MIDI. And to be fair, it was pretty amazing. It's not every day that you get to hear what Ruby "sounds" and "looks" like.
I really appreciate when programming does something different and fun. There's something about being able to ask a computer to do something that's sort of pointless, but is fun and there's like a playfulness. And historically, I don't know if it's necessarily true anymore, the Ruby community cared about that kind of thing, and characters like _why embrace that.
_why is a mythical character in the Ruby community. A token of a previous era, when everything in the Ruby world was a bit less corporate, when performance and types were not so much on the horizon. Back then, Ruby was already paying the bills of a lot of people of course, but at least you had the chance of wondering why cartoon foxes loved chunky bacon.
And that was something that Ruby kind of cared about… It is a bit more pragmatic these days as a community I think, but like that [i.e. the fun] was what drew me, I think, to Ruby in the first place. And there's no one creating this stuff that he used to create, and I think that's a real shame.
_why's playfulness attracted a good many people to the community. Like Sunny, for example, who gave a whole talk about _why at the 2020 ParisRubyConf.
I felt that _why had an impact on why I chose Ruby because, for me, not only Ruby was this weird little thing that came from Japan, it was also this weird thing where some weird people do some wonderful things with it that are fun. That are colorful. That are welcoming. That lets kids take part in. And that can make something very, very simple or goofy. And at the same time you can do some actual, strongly built, sturdy programs on it.
How did he inspire so many people to become rubyists? What exactly did he encapsulate that made him so representative of the community? What is the quality of _why's playfulness?
In a 2006 short video-collage titled "Time.now.is_a? MagicTime", _why ironically describes the future of Ruby. In the video, a guy with a microphone asks several people to imagine what Ruby will be like in 3 years time. Unsatisfied with their unimaginative replies, the guy with the microphone (_why?) urges them to go further:
What if we had a chewing gum, that had a virtual machine inside it, and while you're chewing, it's using the kinetic energy from your colliding jaws to compile a cure for rabies?
There is something comical and bizarre in that sentence. But maybe there is also something that makes us think about programming in a different way? If I imagine a virtual machine inside a chewing gum, I'm already somewhere else, and god knows what kind of interesting associations my mind can make. If that VM can be the cure for something, well, then that's the ultimate fitbit. Surely, the ruby core-team must consider something like that for ruby 4.
However, whenever I read _why's writings, I'm never 100% sure what it means. There is always a feeling of looking at an impenetrable mist. I think I get it, mostly, but I'm never certain. Is that what makes his works so attractive? Maybe there is a certain hope in demystifying _why by exploring his code, and perhaps that also attracted some to the Ruby community.
In a documentary about _why, Steve Klabnik says that it's easy to construe _why's silly and unuseful code as art but that his working code is also artful because it makes you think about coding. Like good art, he says, it makes you understand or realize something about what Ruby can do.
His famous HTML parser was called Hpricot. It was written as a C extension and by simply requiring it in a ruby file, you have a nice and fast way of exploring a big chunk of HTML. You can, for instance, parse the index page of this website, search through the resulting document, find all links, and get the URL for one of them. In this case, you can find a link to _why's also very famous poignant guide to the Ruby language.
To me, there is something simple and natural in the way that Hpricot scans through a document and returns an array of Hpricot::Elements that you can manipulate as you would with any ruby array. By giving you a library that is both focused on a specific task (HTML parsing) but very similar to a rubyist way of exploring objects, _why's Hpricot takes you to unfamiliar territory with a familiar language. And, the README is also great:
Hpricot is a standalone library. It requires no other libraries. Just Ruby! While priding itself on speed, Hpricot works hard to sort out bad HTML and pays a small penalty in order to get that right. So that's slightly more important to me than speed.
It must've been a shock to most people in the community when _why started deleting all his public code, shutting down his website, and then totally dissappeared on August 2009.
The popular Ruby message boards, listservs, and blogs descended into a state of panic. Had he been hacked? Who had heard from him? Was he in physical danger? And there was one especially pressing question, the irony of which hardly went unnoticed by passionate Rubyists: Why?
About 4 years after his disappearance, _why came back very briefly. He sent messages around directing people to connect to a network at a specific time, from which he would print out his final act. People who had heard of him waited impatiently to see what he would do. For some, it felt like watching the reunion of a band they long admired but never thought would get back together. In an IRC channel created to follow the release of that work, the last message, after everything had come through, at 11.25pm, reads "he wants us to go insane". Next, a series of people start leaving the channel. That last message was writen by Eric Wood, who told me that he "was probably the only person to actually use their real name in an IRC chat."
I asked Eric about what it was like at the time. Did it feel like he was back or did it feel like it was his final act? He replied that everyone was just trying to make sense of what was happening, but that the "prevailing thought was that it was sort of an explanation and not necessarily a return." However, as explanations go, _why's final act - later titled CLOSURE - was not exactly the clearest thing, which was quite fitting.
It's a fitting title because the more you read into it, it's like "OK. this is kind of like an explanation of his disappearance." But it's also more _why type stuff, where you can't necessarily fully comprehend it.
In this document (CLOSURE), _why gives us some hints. He writes "I'm totally disillusioned, I feel betrayed by computers", and that "[i]t is strange - I felt a great relief in those days, to no longer be programming," but then adds a line which makes you question if he's actually being serious: "I felt happy to no longer be loading Windows Vista and testing." It is clearly a document of introspection, one in which his name, more than anything, is the topic of the conversation:
Well I knew there were reasons I liked "why the lucky stiff," but I couldn't think of what they were. […] The name "why" is introspective. It lends itself to profundity.
::_why, in CLOSURE
CLOSURE is yet another _why piece to decipher, to think through. A work that is very meta. And it's no wonder _why thought the best section of his poignant-guide was the one about metaprogramming.
_why chose an RPG where a rabbit battles an array of creatures as his example to explore metaprogramming. It is the most focused chapter, as if he was really trying to get a message across. Oddly, it's the only chapter that he quotes academics - like Terry Eagleton. This is quite strange for _why and he knows it too. Right after quoting Eagleton to say that code is a language about language, he feels obliged to downplay the seriousness of what he just wrote:
The metaprogramming stuff I feel is rather thorough. I think the introduction to metaprogramming is more revealing than anything else I've seen around. The code is simple, useful, practical (a usable RPG game is hardly contrived) and fully explained.
You could say that programming itself is meta-language. All code speaks the language of action, of a plan which hasn't been played yet, but shortly will. Stage directions for the players inside your machine. I've waxed sentimental on this before.
Here, in the metaprogramming section, he has perhaps the best definition of the subject. After saying that metap is "writing code that writes code" - a commom definition - he compares it to a pill and comes up with this short definition.
Let’s say it’s more like a little orange pill you won at the circus. When you suck on it, the coating wears away and behind your teeth hatches a massive, floppy sponge brontosaurus. He slides down your tongue and leaps free, frolicking over the pastures, yelping, “Papa!” And from then on, whenever he freaks out and attacks a van, well, that van is sparkling clean afterwards.
Finally, he sums it all up:
Metaprogramming is packing code into pill-form, such that a slender drop of water could trigger it to expand.
Through the things that he built, the way he performed, and the books that he wrote, _why makes us think about code and also about ourselves. It makes us think about ourselves as programmers. In a sense, _whywas the meta-programmer, the one that generates other programmers by promoting reflexivity. By making us think what it would be like to be a cartoon fox or a chewing gum virtual machine, by teaching us to inspect and analyze our methods, _why helped to conceive of one-self as a rubyist. If a small drop of water can make code expand into something incredible when it has been metaprogrammed correctly, perhaps we can say that a small drop of water can make a rubyist expand when they've been metaprogrammed by _why.