← Legos, Unix Piping, & Open-Endedness

It’s kind of incredible that given any two Lego pieces, you’re able to attach them together. Of course this system is constrained by physical laws, but besides that, you can build to your heart’s content.

What allows for this modularity is the standardized system of pegs. No matter the color, shape, or size, all Legos share a common interface so they’re able to interact with one another. Now for building bricks, this might seem simple enough, but what happens when we want to tackle larger problems?

For instance, how might you write a program to plot and sort out your CPU temperatures over the past hour? Time might be stored in one format and temperature in another, so you’d have to do a bunch of conversions in between. If you wanted to manipulate lots of different types of data, then you can see how having to convert from one format to another gets exponentially more cumbersome.

Rather than dealing with that, everything on your computer is stored in files. Your CPU temperature, time, and even what’s showing on your display right now. Behind the scenes, everything is just long strings of 0s and 1s. This is more than some boring implementation detail. Because everything is the same format, it means we can build generic tools that take in and spit out files which can connect all these parts of your computer together.

In Unix, this is called piping. You have a bunch of little programs which do relatively simple things (aka your Lego pieces), but by passing data between one another, they’re able to do quite complex tasks like analyzing chess games really quickly or browsing memes. Rather than building a set of chess/meme specific tools, because everything is a file, we’re able to put together our text “Lego pieces” to do something each piece could never have accomplished on its own.1

Modularity has this beautiful feature that if things all operate on this one medium, you can get infinite complexity out of very simple primitives and their recombinations. But how do you go from a simple soup of primitives to infinite open-ended evolution? That’s the puzzle yet to be solved. Whatever the solution is though, I’m thoroughly convinced that some sort of some sort of modularity will play a key role in it.


  1. Fun footnote, people are trying to make the Web a common interface through the semantic web! In theory, this would be a beautiful way to link all of human knowledge into one large graph, but I’m sure you can think of some issues of why this hasn’t worked yet.↩︎