I'd love to read fantasy novel in which the system of magic would be inspired by the IT world:

Spells are nearly free, don't require any sacrifices, nor conservation of energy - that's not the issue. The issue is: to be able to super-precisely, down to the atom, describe what exactly the given spell is supposed to do. Sorcerers are needed, who can specify what exactly is meant by "turn a city to ashes". If you prefer, you can try to omit this step, but next thing you know is that your touch turned your whole family into gold statues, or the enemy's city turned into a plasma-filled hole sucking atmosphere with you, and/or paperclips. Spells are by necessity very complicated, multi-layer and modular, therefore mages spend years in libraries and conferences. Most importantly though, they need to cooperate to create anything substantial. Wizards, despite their absurdly high power, do not represent big threat to the rulers, because on their own, a mage can only use whatever they've learned and understood and it would be difficult for a single person to surprise an organized army of the ruler with something new, at least not consistently over and over again. Subordination of the wizards comes chiefly from bribing them, where implicitly the big part of the offer is that the employer is capable of motivating the other mages to work on the same enterprise - there is no natural, convergent goal which wizards would naturally gravitate towards, except perhaps a longing slowly developed over the years to describe something huge. Sitting in their libraries, watching battlefields and factories only telepathically through eyes of their gnomes, they lose more and more the grip on reality and what used to be means to a goal, became the end goal in itself: to precisely describe what's difficult to describe - and the question of it being good or bad, or even useful at all - doesn't matter that much anymore. Obviously, in a population this big, there are also mages, who dream of creating something, who have ambitious vision - the truth is, though, that if you train yourself for years in "HOW?" - not "WHAT?" - your ideas rarely turn out to be good at any other axis than being a spectacular use of your talent of description, and tend to flop, even if they temporarily gain interest of a group of wizards. Nonetheless, it happens - extremely rarely - that a mage, either through inborn talent, or luck, or hard work, figures out not only a path to a given goal, but also the goal itself. These are the most dangerous kind, because their twisted through years of working on "HOW?" brains guarantee that they'll succeed in reaching their goal, and even worse, their "WHAT?" tends to be completely not optimized for the needs of average peasant. Obviously, realization of such a goal requires that day after day they turn from mages to rulers - you can't keep up with being the best at both "WHAT?" and "HOW?" at the same time. That's how Warlocks are made.

Some books that I've read have some of that, but none of them seems to show this dynamic of "coordination and vision as the limiting factors":

- "Unsong" by Scott Alexander Siskind  

- "Harry Potter and the Methods of Rationality" by Eliezer Yudkowsky 

- "Worm" by Wildbow 

- "Ruch Generała" by Jacek Dukaj (closest in spirit, but in Polish)

Do you know some other books which would explore this idea?

New Answer
New Comment

5 Answers sorted by

Trevor Hill-Hand


Ra by Sam Hughes is the most austere version of the idea I've personally read. It intentionally starts with the premise, "What if magic worked like computer science?" The story then moves more to answering the question, "....Wait, why is that the case?" but you get lots of fun exploration of the premise along the way.


Magic is real.

Discovered in the 1970s, magic is now a bona fide field of engineering. There's magic in heavy industry and magic in your home. It's what's next after electricity.

Student mage Laura Ferno has designs on the future: her mother died trying to reach space using magic, and Laura wants to succeed where she failed. But first, she has to work out what went wrong. And who her mother really was.

And whether, indeed, she's dead at all...

Came here to suggest exactly this, based on just the title of the question. https://qntm.org/structure has some similar themes as well.

The revelation in later chapters of why magic works like programming was especially nice

Which chapter? I'm particularly curious for that.
Sorry, just noticed this question (LessWrong notification system... suboptimal). There isn't a single place I can point and it is a MAJOR spoiler about the world of the book that is uncovered slowly over entire length of it, but picks up the speed at around the "Abstract War" chapter and later. TLDR: it works like programming because it IS programming. On some level with some flexible definitions. Telling you more will be detrimental to the reading experience :)

I've just finished reading it, and wanted to thank you very much for recommending this great experience :)



The Wizard's Bane series by Rick Cook. The basic idea is great: a Silicon Valley programmer is transported into a magical universe where he has to figure out how to apply programming to a magic system. Caveat lector: the writing is not the best quality, it's a bit juvenile, but still a light, enjoyable read :)

As I recall most of the interest in in the first book in the series, "Wizards Bane" (1989). I don't think it's a spoiler under the circumstances - guy builds a spell generation VM using Forth (because he has no actual computers at hand, he needs to keep things really simple).

It's implied in later books that he bootstraps more complex systems from there.



I don't know about the rest of your article, but the first paragraph is more or less the premise of Break Them All. The main character is an accidental dimensional traveler who receives tutoring in the ways of higher sorcery, so that as he wanders the worlds looking for a way home, he will still be able to do his own magic, rather than relying on each dimension's conceptual frameworks for their local magic.

He then later discovers that the more-or-less scientific approach to magic makes him pretty OP in most dimensions, and in one his kind of sorcery makes him a "kill on sight" type of threat precisely because people who work directly with raw magic and physics are the most dangerous possible kind of wizard.

(The author claims that Break Them All won't be interesting to people who aren't reading the Worm fanfic it's a prequel to, but I disagree: unlike its sequel, Break Them All hasn't become bogged down by a cast of literally hundreds of sapient spiders who have different superpowers and varying sizes but barely distinguishable personalities.)



Avaunt has a magic system that sounds similar to this. It's not directly the central focus of the story, but it does contribute to the flavour of the story and some of the plot.



Scott's Anglophysics world could probably become something like this with more development.

6 comments, sorted by Click to highlight new comments since:

This sounds a lot like the "Precisely Bound Demons and their Behavior" concept that Yudkowsky described but never wrote the story for.

Ra also features magic-as-engineering.

I don't think this is an actual stable world. It is too easy to destroy everything with one typo. Also, there are lots of things that are in practice world disrupting that are easy to describe. Duplication of arbitrary matter. (including humans) Conjuring of energy. Making an object infinitely strong. Controlling the flow of time. Portals. 

I suspect that in such universes that are not destroyed very quickly, an early user creates fail-safe spell constructs that limit such destruction by future users (including themselves under most conditions). This does leave open the possibility that some primordial magic user with root access still exists somewhere, and is very careful to use such power only when absolutely necessary, and only with the minimum weakening of ordinary constraints.

If energy is not a constraint, such world would quickly get destroyed. Whatever effect you made, just yell "now, 1000 times more of the same". If it does not destroy the world immediately, repeat this two or three times.

For example, the world can be easily destroyed by creating a sufficiently high temperature (which will warm up the atmosphere and burn everyone), or sufficient amounts of matter (black-hole amount, gravity-changing amount, or just enough water to create a global tsunami and/or rise ocean levels).

Possible fix -- if we assume magic, we might as well have a magical solution, right? -- if the side effects of a spell kill the wizard, time is reverted and the wizard just immediately dies instead. (Question is, how fast and how directly must the wizard be killed; e.g. in case of the global tsunami created on a different continent. Magical answer: 3 days, any cause of death. Among other things, this allows you to reset the timeline by assassinating the wizard after the spell was successfully cast.)

In The Name of the Wind sympathy magic just allows to move energy around. They are talking about units of energy that can be moved around and one emergency source of energy is body temperature with wizard's chill as a danger. There are implied formula about decrease with distance etc. Thus that world wouldn't blow up with IT. The book is not about algorithms/programs though the magic domain of artifactory there could embed something like that.

Wouldn't the same argumentation lead to conclusion, that world should've already end soon after we've figured out how to make atomic bomb?

I don't know  how to write a novel with world which survives in equilibrium longer than a week (and this is one reason I've asked this question - I'd like to read ideas of others) but I suspect that the same way atomic bomb releases insane amounts of energy, yet we have reasons not to do that repeatedly, mages in would have good reasons to avoid destroying the world. Perhaps there's not much to gain from doing so, maybe there's M.A.D., maybe once you are smart enough to do that you are also smart enough not to do that, maybe you have to swear not to do that. 

It could also be the case that I am too confident of our nuclear security. What's currently our best reason not to blow up ourselves? Is it that nuclear energy costs a lot?