TinselCity

Masamune Shirow's Orion is a peculiar mix of, as Wikipedia puts it, “Buddhism, Taoism, ancient Japanese myth, elements of cyberpunk, Yin/Yang mysticism, and particle physics”.

It's certainly a complex read, full with ideas coming from all those different origins and intermixed in a sometimes confusing narrative under some very rich visuals. With not much imagination, we could easily see a number of interesting parallels to many other ideas.

I want to focus, though, on only one particular thing. One of the things involved at various points in the story is the dharmaquations. These are not exactly like equations, but more like functions or even programs. That is, these are formulas that at the lowest level describe things. It uses yin and yang to describe the origin of the universe as representing somethingness and nothingness, then yin and yang produce through combination four phenomena and then the famous eight trigrams you can see in many places in the East. But then, by combining and transforming the trigrams, the equations not only become more complex but actually become “live” or “active”, sort of “magic spells”. That is, they become formulas that not only describe but also produce a result. I don't really want to go into that part of the story because there's no reason to start dropping spoilers.

But there is a scene, where Susano, god of destruction, builds a dharmaquation as he explains how it works (approximately). And I find a couple of interesting points.

First there's this idea that from descriptions -a declarative style- and through combining and transforming -composition and extension- you can reach something that when activated it produces some result. This could be a charming explanation of functional programming xD

But then there's something more specific. The equations are first drawn -weaved or formed- and then they are activated. And there's even a point were one such equation gets activated accidentally. This is clearly the invocation operator -() in many languages- and a frequent error many inexperienced programmers fall into sometimes: The difference between carrying an equation -handling a function as a value-…

setupSomeStuff({
    bla: 3,
    blabla: callback
});

…and activating that equation -executing the function-:

setupSomeStuff({
    bla: 3,
    blabla: callback()
});

This is a fairly common mistake I've seen inexperienced developers fall into. And I think it does fit quite well with that scene.