Enough with Preliminaries

The ping-pong pool, if you’re just tuning in, alludes to the fact that if we were to try simulating water using ping-pong balls, then some properties of the simulation would be different from the real thing. In particular, jumping in won’t feel the same. This “blind men and the elephant” effect is especially noticeable with computers. Just try opening a .pdf document in a plain text editor. Having the bytes isn’t enough, you need a .pdf viewer to read .pdfs. The viewer provides the right interface to the document. Interfaces are the name of the game, and Will’s Willow Wisp is my playing token.

To Review

Computers exist. But even before they did, philosophers learned some interesting things about computation and computability. Unfortunately, the computability approach neglects the first person experience of actually using a computer. (Might be because computability came before computers.) It’s a shame since most people are more interested in doing things things with computers than the abstracts of computation. Doubly true for programmers. We don’t just do things with computers, we make the programs that let you do things with computers.

Your average laptop computer is more than a million times faster and has more than a billion times more memory than its giant forbearers of just a few decades ago. The laptop is a mighty machine rendering a 3D scene on its color screen with an unseen beam going between it and some massively multiplayer thing: this is routine.

Even though eens like this wouldn’t have been possible for the dinosaurs of old, some things haven’t changed much. We live in a world where *NIX not only continues to roam the earth; but after thirty years, its avian descendant is touted as “the operating system of the future”. Odd isn’t it.

Going back to the sixties, the foundation of the internet was being laid in California, Nevada, and Utah. Coming up on it’s thirtieth anniversary, the text editor Vi is still loved and fought over. Vi will likely make it to thirty before the next major release of some operating system. Then again, some OS might come out just in time for the golden anniversary of Lisp.

Lispers have often boasted of the superior power and expressivity of their favorite language. The practice continues. They’ve even written a song about its Divine origin. Some things haven’t changed. Some things won’t. Some things shouldn’t. The rest is fair game.

The name of the game, remember, is interfaces. I’m not just talking about those pretty end user GUIs that Aunt Tillie might encounter. The interfaces I’m interested in don’t need to be graphical and certainly aren’t supported by pretty prepackaged toolkits or easy-glue widget sets. Not all interfaces for defining interfaces are created equal, and I haven’t yet found one created in an image that I would call good. This gives me something fun to do. It’s good to have purpose in life. I’m looking for something powerful, simple, and philosophically grounded that also plays well with others. I’ve scoured the earth searching for such a beast. I’ve found many wonderful and exotic creatures; however, none of them is entirely fit for my dark purpose. So I’ve decided to take matters into my own hands! I will speak more of this at length, but we mustn’t forget about Aunt Tillie.

Aunt Tillie’s Email

Aunt Tillie doesn’t do much with her computer. In fact, the only thing she does or wants to do is check her email. Frankly she could care less about email except she gets messages from her nephew Little Johnny. She doesn’t care about bytes on a disk. She doesn’t know what a byte is. She doesn’t care about files or OSes. She doesn’t even care about the words themselves. If she had the words, but they were out of order, she wouldn’t know what the message was. Aunt Tillie doesn’t really care about the document itself. Suppose she received a message from a clever Nigerian Spammer that just happened to look like something Johnny would send. Aunt Tillie might be tricked, but if she found out the truth, she would be very cross. For Aunt Tillie to be happy, the sender can’t be a Nigerian Spammer no matter what the message says. Likewise, if Aunt Tillie can’t read the document (she might have misplaced her glasses), then the document won’t be worth much. What really matters to Aunt Tillie, so far as email goes, is that she have a certain kind of experience. To have a right or good (shall we say felicitous) experience, certain conditions must be met. We’ve just listed a few specific felicity conditions. In general though, what matters is that Aunt Tillie be able to experience her nephew Little Johnny. The message is just a vehicle as are the email program and Aunt Tillie’s glasses. Aunt Tillie wants to experience Little Johnny. She does this by checking her email. So the subject (person experiencing) is Aunt Tillie, the object of her experience is Little Johnny, and her interface to him is email:

01subInterObj.png

This simple diagram overlooks some of the interface details we’ve already discussed. Johnny sends Aunt Tillie messages, and she can only read when wearing her glasses:

02subMoInterMeObj.png

There’s nothing stopping us from splitting the interface into more pieces or putting the pieces together in a different way:

03subInterGlassesObj.png

The Six Triads

A message isn’t an atomic object: it has parts. There are sentences, words, individual characters, and since Aunt Tillie is reading the message on a screen those characters are made out of pixels. Also, associated with every word and sentence is a meaning. So there’s more than one way to decomposed a message. There’s meronymic decomposition: a message is made up of several paragraphs is made up of several sentences is made up of several words. There’s also semiotic decomposition: combinations of pixels represent words, combinations of words represent ideas. Similar to the subject-interface-object triad, we have the meronymic triad: whole-place-part, and the semiotic triad: meaning-interpretation-sign. As we saw with interfaces, multiple triads of the same kind can be stacked:

04semMer.png

When were talk about a message, we end up with a semiotic split because messages are used to represent things. Programming is more than just writing. We go farther: we use magic to turn words into active independent entities otherwise known as executables. I call the abstract shape or form of an entity its essence. The ultimate source for the entities’ active behavior I call substance. The thing that joins the two is an implementation:

05essImplSub.png

I call this, the triad of being. In addition to the triad of experience, the triad of being, the meronymic triad, and the semiotic triad, I recognize two other triads: the dynamic and the generic. The dynamic triad is used to represent change over time, and the generic triad is used to represent ontological relationships: a cat is a animal is a living thing. In total there are six triads:

06triads.png

Interfaces to Interfaces

You can characterize almost any feature of an interaction, such as Aunt Tillie checking her email, using the six triads. The one missing thing is that there is no way to step outside of an interaction: to view it from a third person perspective. For this seventh aspect, we don’t need to introduce another triad, we just need the ability to watch the six from outside.

The only difference between experiencing and watching is who fills what roles. When Aunt Tillie checks her email, she’s the subject, the email program is the interface, and the message is the object. When we watch her check her email, we are the subject, the interface is whatever we use to do the watching, and the object is what we’re trying to watch:

07metaCracker.png

In this diagram, the email program is playing a dual role. It’s both the interface connecting Aunt Tillie to her message, and it is the object of our evil Nigerian plot (or alternatively our efforts to protect freedom.) Either way, the interesting thing is that we are able to observe the interface from the outside. This is accomplished by using another interface: a meta-interface. When programming, we use these meta-interfaces:

08metaHacker.png

With a setup like this, we could fix bugs in the email client. The debugger lets us see what’s going on, the source lets us prepare changes, and the compiler lets is put those changes into practice. Thus, the debugger is a meta-interface for watching the dynamics of the program, the compiler is a meta-interface for the executable, and the source gives us access to the other triads. Of course, viewing the source requires an interface like good old Vi. Put the text editor, the debugger, and compiler into one integrated package and you can sell a development environment to anyone who isn’t fond of using the three tools individually as well as all the other tools you’ll need: CVS, make, ant, grep, cscope, and whatever else. Each tool provides a little bit of meta-interface. Each tool represents a lot of hard work. Learning each tool takes hard work too. At the end of the day, if you’re very diligent you can fix Aunt Tillie’s Email client. You might even be able to save her from Nigerians and freedom fighters. The only problem with all these tools is that getting them to play together is tricky. So much so, that using the tool can take more work than just doing things by hand.

The Better Mousetrap

What would a better development environment be like? A development environment is a special kind of interface to programs. It’s not like the interface that Aunt Tillie uses. It’s a meta-interface. It lets you look inside programs and change things. Which things? Pretty much anything: any of the six triads. So a development environment needs to be a meta-interface in all six dimensions. That’s the minimum requirement.

A good development environment provides good meta-interfaces. Simplicity, efficiency, sufficiency—all the things that make any program, tool, or system good. It ought to be good enough to serve as its own meta-interface. Thus, if we call our development environment MI, the following should be possible:

09refIndirect.png

Many programming systems support this. Those that don’t are built on others that do. A better development environment takes things a step further. Not only can it do the meta-interface thing, it can do it reflectively:

10refDirect.png

The closer the object part is to the interface part, the more integrated and transparent the object and interface levels become. A step beyond meta object reflection is possible:

11selfAware.png

However, self awareness requires that reflection be in place, and only a few reflective constructs are available in programming languages. Functions, objects, even continuations have been given first class status. Aspect Oriented Programming adds principled and powerful reflective features. But all of these taken together do not provide reflection across all six triads. I can’t find anything that does. Thus, my quest is to build a development environment that implements reflection on all six triads. I’m not sure what the system will be like, but I do have a name for it: Will’s Willow Wisp. Next time, I’ll explain the name, and list some features it will implement.