This is a story we are going to tell about magic. We should perhaps start with that rather dreaded question: is magic real?
You might have a variety of answers to this question. It rather depends on what, exactly, we mean by “magic”, and also by “real”, right? (Maybe we can add “is” while we’re at it.)
magic in fiction
In fiction, ‘magic’ can be all sorts of shit. In older works, which draw more directly on mythology: some numinous, inexplicable force intervenes to structure a narrative. It’s not without restrictions; magic might be imbued in physical artefacts (the seven-league boots, the magic sword), it may be an ability (transforming into an animal) that only some people have, it might involve forming relationships with powerful nonhuman creatures such as gods; you just have to take on faith that these things can happen.
For the sake of dramatic tension, it is usually available to the protagonists of a story only in limited ways. Taking after figures such as Merlin, the magician (disguised angel, talking lion) is a weirdo, who is sought out or else shows up sometimes for inscrutable reasons; they may help at a cost, or in recognition of the hero’s virtues. In ‘sword and sorcery’ works, magicians tend to be an antagonist (a sorcerer that Conan must kill, the sneering wizard who teleports Cugel at the outset of his journey) or at least an antihero (Elric).
In more modern works in what has become known as the ‘fantasy’ genre, coming in the wake of transitional works like A Wizard of Earthsea, you are more likely to encounter a ‘magic system’ with more explicit rules, which typically grants certain characters in the narrative special abilities. (This is not always called magic; it might instead be deemed ‘superpowers’ or ‘psychic powers’ or ‘mutations’.) The convention is that the rules will be laid out and have some central theme or logical structure, and the protagonists should stay within them, cleverly exploiting their structure to advantage.
Meanwhile, in supernatural ‘horror’, elements of ‘magic’ (demons, ghosts, cenobites…) tend to intrude violently on everday life; elsewhere again, in the ‘magical realism’ genre, things we call ‘magic’ are simply present and have some role to play in the modern world (a family member becomes a jiangshi, someone can teleport), typically serving a more metaphorical purpose—to fulfil its role in the story, such ‘magic’ tends to be weird and disorienting.
In all these cases, in analysing fiction, we label a thing ‘magic’ because (we believe) it doesn’t happen in the ‘real world’, and it fills certain recognised narrative roles.
In our world, there are many practices which fall under this nebulous label of ‘magic’, ‘esotericism’, ‘occultism’ and the like, blending continuously with the wider world of religion. Some people pursue membership in orders, study tables of correspondences, or draw sigils. They may speak of making contact and forming relationships with an impressive array of “entities”, and observe certain rituals in respect to them, or warn each other of the great dangers of reckless magic workings. Other people may say they can detect auras, discern hidden information, or bring subtle benefits or harm. People may use various powerful tools to get their minds into a shape more amenable to interaction with gods, spirits, and other entities: psychedelic drugs, group worship, extreme endurance, sexuality, hypnosis…
Others, describing themselves as skeptics, disparage these practices or at least their claimed effects, talking about cognitive biases, superstitions, and so forth; in response, there are plenty of people (all the way up to national intelligence agencies) who pursue rigorous experiments to detect or rule out such ‘supernatural’ effects, a research programme which generally speaking has not proven especially fruitful.
And then, of course, there are further groups of people who study ‘magic’ and ‘religion’ in an academic way, in terms of texts, traditions and practices, the construction of meaning, how stories evolve, and so on. Esoterica is for us the iconic example. They may overlap with one or both of the previous categories; they may come at it from a place of skepticism or a place of asking fiddly theological questions in the tradition they were raised in. Maybe it’s just a Special Interest, for which no explanation is needed.
This hopefully suffices as a quick survey. We are not exactly going to be talking about that.
a magic trick
We can give you some information about a faraway place right now. In a certain place in Glasgow, on a warm, cloudy night of June 6 2026, there was a desk with a MIDI keyboard, VR headset controllers, roleplaying dice, a drawing tablet, a floppy disc which generates oscilloscope music, and a bookmark from Treadwell’s. Here, we took a picture:
Magical tools.
Assuming you believe us, you didn’t receive the info by standing here in the room and looking with your eyes, did you? You remotely viewed a room, perhaps in another city or another continent. Whooooahhhhh spooky…
…you’re not very impressed by that, are you? This isn’t ‘magic’. It’s ‘technology’; ‘engineering’; ‘science’. That belongs to an entirely different category of thing. Doesn’t it?
Without really saying whether all of those other magical traditions ‘work’ or ‘don’t’ (to whatever end)… I want to teach you about a form of magic that definitely works. It is a form of magic that requires quite an alien way of thinking, like all good things—and yet we call it magic for this reason: it all really does come back to the fundamental magical act of giving names to things that you cannot see.
where it came from
Magic is a very tradition-bound thing. Even the radical (post)modernist traditions, such as Chaos Magic, are traditions. They are elaborations on something that came before.
The magic I want to teach you about today does not usually call itself magic. It calls itself a science. What exactly is a science?
The word ‘science’ traditionally just meant ‘scholarly’ study of something. In the mid 20th-century, its sense narrowed to the ‘natural sciences’, ‘social sciences’ and perhaps the ‘formal sciences’, though I’ll admit the first time I heard that last phrase was on Wiktionary just now. These are quite wildly different disciplines, and the ‘demarcation problem’ of figuring out what is a ‘science’ and what isn’t has consumed a great deal of philosophical energy in the late 20th century. What are the typical characteristics of a ‘science’, though? A typical answer would probably cover features like formal rigour, statistical methods, skepticism and empiricism; you might get a bit of Popperian falsificationism and so on.
But this distinction is pretty modern. In the 16th and 17th centuries in Europe, the weirdos who pursued what we now call ‘science’ pursued all sorts of weird stuff with equal vigour.
Isaac Newton, for example: his occupations included “mathematician, physicist, astronomer, alchemist, theologian, author and inventor”, a fellow who spent as much time writing about theology and alchemy as all the contributions to calculus, mechanics and optics that made him famous. (Dude also invested in the slave trade, which tends to get left out.) John Dee: “mathematician, astronomer, teacher, astrologer, occultist, and alchemist”. He’s most famous for talking to angels through his buddy Edward Kelley and other such sorcerous things, but in his time he was also known as a navigation expert and pretty good at maths too. (Mathematicians never exactly stopped getting a bit funky with it.)
Of course, over the ensuing centuries, the tradition of ‘natural philosophy’ diverged from these prior traditions. For example, some of these people took an interest in some weird rocks which like to point in certain directions and pull metals towards them, and similar effects that occur when you rub something sticky like amber, which led to this phenomenon being called ‘electricity’, which glosses to ‘amber-y-ness’.
Others stumbled on the strange fact that if you soak certain metals in salt water in a special circular arrangement it can make a dead frog’s leg twitch. Before long they figured out special arrangements of metal bits in salt water which would do this weird frog/amber thing, whatever it is, more reliably and powerfully.
The alchemists were hard at work through all this, gradually sifting through all the different possibilities of mixing up bottles of stuff and heating, straining and filtering, trying to figure out what was made up of what, in a huge and very convoluted game—taking a very intricate occult tradition which had once concerned itself with the production of gold and finding instead all sorts of uses in medicine, mining and also plenty of opportunities to defraud the rich.
To try to organise their understanding of all this weird shit, they had to come up with some theories. Maybe it would make sense to think the world is made up of a bunch of little things, let’s call them corpuscules of different types, and that these are better called ‘elements’ than, for example, Aristotle’s air, water, fire and earth? Maybe there is a substance, we could call it ‘caloric’ in hot things, which likes to spread out? Maybe, in the voltaic pile, the ‘voltaic amber-y-ness’ produced by the stack of metal and salt water was the same thing as the ‘magnetic amber-y-ness’ produced by moving the aforementioned weird rock? Maybe there are two types of electrical thing, all mixed up with each other?
interacting with entities
These days we cannot are all traditionally magical questions. ‘What is everything made of’, balances of ‘elements’, how can the sick be healed, and so on.
You cannot see the corpuscles, the caloric, and so on. You have to imagine that there are such things, work out a theory of what they would do if they were real, and if your theory is anywhere close, it will tell you how to fiddle with these invisible things and get a desired result. If it isn’t… think of something else. But you do have to go out on a limb of speculating about a ‘thing’ that is not directly accessible to the senses.
In fact, we now consider both theories to be obsolete, though they were along the right track. Boyle’s divisible ‘corpuscules’ anticipated the modern theory of atoms, which turned out to be a bad name for things that can actually be divided after all… but chemistry does act as if there are corpuscules pretty well. The random jiggly motions of these atoms can be collectively described as representing something called ‘heat energy’, which in many circumstances acts as if it is a fluid.
Now, let’s draw some funny little symbols.
\[\begin{aligned}\nabla \cdot \mathbf {E} \,\,\,&={\frac {\rho }{\varepsilon _{0}}}\\\nabla \cdot \mathbf {B} \,\,\,&=0\\\nabla \times \mathbf {E} &=-{\frac {\partial \mathbf {B} }{\partial t}}\\\nabla \times \mathbf {B} &=\mu _{0}\left(\mathbf {J} +\varepsilon _{0}{\frac {\partial \mathbf {E} }{\partial t}}\right)\end{aligned}\]There are two possibilities here: you have studied electromagnetism up to around undergraduate level, in which case you know that these are Maxwell’s laws in differential form, and what they mean… or, you haven’t, and if I said these shapes encode a description of ‘an energy field… (which) surrounds us and penetrates us. it binds the galaxy together’ (ok, that’s cheeky, I’d more likely say a pair of vector fields that exist at every point in space) you could only really be like ‘ok, sure…’, same as if I told you that you could summon a demon called Gaap by drawing this seal:
The Goetic seal corresponding to Gaap in the Lesser Key of Solomon, as seen in Umineko.
If you know what to do with those equations—using an additional set of conceptual tools such as ‘vector calculus’, and a knowledge of the practices which can be used to identify and measure things like ‘electric charge’—you can use them to, for example, build an electric circuit. You don’t actually need to use them. You can build a radio, for example, perfectly well without ever doing vector calculus, just by building up a set of rules about which components go where. If you’re a radio engineer, you likely wouldn’t directly use these equations—doing a first-principles calculation from Maxwell’s laws would be fiddly and unhelpful.
Some day, however, you might want to ask why your radio works. Where do all these rules about transistors and capacitors and ‘electric currents’ come from? Why does “electricity” do any of that shit? And then you could work through the derivations of, for example, the transmission line equations. You could read up on the experiments that established electromagnetism, and maybe perform them yourself if you want to. You could learn about how weird it is that the resulting list of laws is ‘reference frame independent’, and how that led to thought experiments at the beginning of the 20th century which showed something is very wrong with the prior understanding of physics.
And, if you’re feeling especially daring, you could take it further: you might prefer to have the covariant form of Maxwell’s laws, for use in special relativity:
\[\partial _{\alpha }F^{\alpha \beta }=\mu _{0}J^{\beta }\]If the last set of weird symbols was vexing, this one probably feels like it’s taking the piss. Why are some of the Greek letters up and others down? What does \(\partial_\alpha\) mean? (This is a nice efficient notation for doing relativity calculations. It is hopelessly esoteric for anyone but physicists and mathematicians.)
You might go into learning about classical field theory, and Noether’s theorem. You might understand how this is really the only sort of vector field that would occur in a universe with Minkowski symmetry: this strange, seemingly arbitrary feature of our universe has a weird mathematical inevitability to it when we look at it from the right perspective… oh, we haven’t even touched on quantisation yet.
Which I think would be rather a delight to the Newtons of this world. It turns out, if you go looking for a mystical, abstract structure behind everything, with the right lens, with enough effort… well, maybe you actually find one. We call it ‘gauge field theory’ and only people with postgraduate degrees, or commensurate effort without any institutional support, get to build up enough structures in their heads to understand it. Once you do, it’s really elegant though! …pretty fucked up, yeah.
Nevertheless, by pursuing this quest as an nth-degree recursive elaboration on that thing with the frog legs, we have found ways to create immense light and sound, travel at great speeds, speak to faraway people, move heavy objects, wash our clothes, warm and cool spaces, keep our food from spoiling, kill each other, and even occasionally revive the very recently dead. And we also figured out it’s a great way to build a “computer”, which is what the rest of this story is about.
But it’s not magic, right? If we found out “magic” was real it would be like… something else. Electromagnetism doesn’t have the right vibes, somehow.
What’s missing?
In many ways, the ‘magic’ we’ve described so far falls far short of what motivated the search. We can predict the celestial bodies, but it’s not actually much help in predicting the future on the scale of humans. It certainly doesn’t tell us how to live. Here in the middle, things are so damn complicated, and only get more so.
Why is that? A short answer: it’s because things like electromagnetism and chemistry form a substrate on which abstractions can live.
what is a computer
OK so: surprise. This is actually an article about computers. We want to introduce you to the magic that absolutely, unambiguously works, and we want to do the unusual thing of presenting it as magic.
Imagine we lived in another universe with different physics. No Minkowski spacetime, no electromagnetism, none of the familiar chemicals. Perhaps it’s something like the world of Tryslmaistan.
In such a universe, computers could at least potentially still exist. All sorts of things can be computers. A computer is not (necessarily) an electronic device; it is something altogether more abstract.
So what is a computer?
When we are first introduced to the concept of computers as children, we probably form an idea like this: a computer is a box with buttons and lights. It has a screen which shows you things, it makes sounds, and there are various things called ‘programs’ inside it. It can do an absolutely bewildering array of things and it also sometimes makes adults very annoyed when it doesn’t work.
A Victorian would say: a computer is someone, usually a woman, who works to draw up big tables of numbers for performing mathematical calculations. (For example, tables of logarithms can be used to quickly do multiplication.) By the beginning of the next century, a computer would become a machine which can be used to make calculations: for example, a ballistics computer on a ship could rapidly calculate integrals, derivatives and multiplications by rolling a ball on a specially shaped metal drum.
We’re about to mention a bunch of concepts in quick succession. If they are of interest, we can elaborate later.
a little history tangent
If you’ve had much exposure to computer science in a traditional way, you might come up with a different story: there is this thing, a thought experiment rather than a real thing, which is called a Turing machine. It can perform ‘algorithms’ according to certain rules, which tell it to go up and down an arbitrarily long tape, reading and writing symbols at each point; by doing this, it is able to determine what other, simpler machines would do. A computer is a mechanical system which is, in a certain mathematical sense, ‘equivalent to’ a Turing machine: you can simulate a Turing Machine on it, and vice versa.
(Turing was a mathematician who created the machines which broke Nazi codes for the British government, and also thought very hard about things pretending to be other things until the government drove him to suicide with involuntary hormone therapy. You probably know that part.)
Turing did not invent computers, but alongside Alonzo Church and Kurt Gödel, who invented mathematically equivalent systems called the lambda calculus and general recursive functions at almost exactly the same time, he came up with the theory which founds the discipline of magic we’re about to get stuck into. Church and Gödel were coming at it from a different angle, trying to understand the foundations of mathematics in terms of strings of symbols and procedures for manipulating them. Remarkably, it turned out that all three of their ideas were equivalent: a Turing machine can run the lambda calculus, and the lambda calculus can model a Turing machine.
This led to what we now call the Church-Turing thesis (sorry Gödel), which is that this is basically as good as it gets: roughly, if a Turing machine can’t do it, then nothing can. Since then, this is effectively the definition of a computer: if a system can be shown to be ‘Turing complete’, i.e. do whatever a Turing machine can, then it’s a computer.
You can at least in principle make a computer with e.g. water, dominos, laser beams or billiard balls: generally the recipe is to find a way to make the system follow the logical rules we call a NOR gate (or NAND gate) and find a means to chain them together in succession. All these things are, however, generally slow as shit compared to electronic computers. (Optical computing might have a chance but that’s still electromagnetism.)
So, if not Turing, who did invent computers? Arguably someone in ancient Greece who made the Antikythera mechanism, a complex geared mechanical orrery. Tho, astonishing as it is, though, the Antikythera mechanism doesn’t meet Turing’s standard: it can’t do whatever a Turing machine can. The first person to conceptualise a machine which can do that might be Charles Babbage, who dreamed up (but never actually built) the Analytical Engine.
But even Babbage didn’t quite know what he’d stumbled upon; his buddy the countess Ada Lovelace went further in imagining some programs which the Analytical Engine might one day run. Lovelace is a fascinating figure, a self-described ‘analyst & metaphysician’ who, as she worked to translate articles about it, speculated on how things like music might be encoded in the machine. (Perhaps if her Bernoulli number algorithm is the first computer program, these speculations could make her something like the first digital music producer?)
These four—Turing, Church, Babbage, and Lovelace—are some of the venerated figures of our strange practice, people who happened to be in the right time and place to come up with a really far-reaching idea or ten. Perhaps one day they will fade as deep into mythology as Paracelsus or Hermes Trismegistus. There are plenty of others more recent, we’ll learn about them in time.
All of it is a fascinating history… but it’s not actually very helpful to talk about Turing machines, right now. Without a lot of time trying stuff and intuition, it’s very hard to get a sense for what this thing with the tape can do.
It might as well be… magic.
We’d be better off starting with the computers we have in everyday life.
what’s in a word
Programmers use the word ‘magic’ fairly often, in fact.
For example: the 1984 textbook Structure and Interpretation of Computer Programs depicts Hermes Trismegistus bestowing knowledge of the Lambda Calculus to Ramon Llull, adapted from a panel of alchemists in the 1849 French history book Le Moyen Age et la Renaissance. Accordingly, it enjoyed a reputation as the ‘wizard book’ in hacker culture; if you understand its contents, people might joke that you belong to an esoteric order called the Knights of the Lambda Calculus.
But in everyday hacker language, ‘magic’ is generally used in computing for things the speaker doesn’t want to explain in detail, perhaps because they are too complicated to understand. For example: ‘then the compiler does some magic to optimise this away’. A particularly inscrutable algorithm might be described as ‘black magic’, or even ‘evil’. This use is largely unchanged from 1988’s jargon file:
MAGIC adj. 1. As yet unexplained, or too complicated to explain. (Arthur C. Clarke once said that magic was as-yet-not-understood science.) “TTY echoing is controlled by a large number of magic bits.” “This routine magically computes the parity of an eight-bit byte in three instructions.” 2. (Stanford) A feature not generally publicized which allows something otherwise impossible, or a feature formerly in that category but now unveiled. Example: The keyboard commands which override the screen-hiding features.
Under this sense, things stop being magic once you understand them. Understanding the inner workings of a system might be compared to understanding the trick behind a piece of stage magic.
This is somewhat contrary to depictions of magic as something that you study. It’s also a bit different from the account of magic we’re using here. To understand magic, for us, is to build up a structure in your head which can hold it.
In short, we want to help you understand and wield the magic. Whether that means it stops being magic depends on what you call magic.
Comments