Magic Isn't Real

59 pointsposted 13 hours ago
by dvektor

47 Comments

tehmillhouse

4 hours ago

When understanding a new "magic", there's this beautiful moment when you grok it, and the abstraction poofs away.

It's when you take apart a mechanical clock and keep looking for the time-keeping part, until you figure out that there isn't a time-keeping part in there, it's just gears and a spring.

It's when you learn about integrated circuits and full-adders, and keep trying to understand how a bunch of transistors can do Mathematics, until you figure out that there isn't a mathematics-doing part in there, it's just circuits and wires, arranged in a way that makes the voltages come out right.

It's when your understanding of the top-down structure snaps together with the bottom-up mechanics of the building blocks. There's no space left for the ghost in the machine to haunt, and you go "Oh. huh". I live for that moment.

hiAndrewQuinn

3 hours ago

I went through an EE degree instead of a CS degree in undergrad specifically so I could peel back this magic and really understand what's going on, to some detail, down to the electromagnetism level. It is indeed a very freeing feeling to be resting atop so many layers of abstractions, with the understanding that if you ever had to, you could go down to any one of them and kind of feel your way around.

I think for me the biggest magic-killing moment was when I realized that CPU clock cycles, timing trees, etc. were all just ways for us to shoehorn a fundamentally analog thing (how much voltage is in area X?) to a digital thing (does area X have enough voltage? yes? OK, call it a 1 and let's move on already!). Somehow to me that feels like the ultimate "leaky" abstraction, although of course decades and trillions of dollars have gone into making it ever more watertight for 99.99-several-more-9s% of the time. At least to the end user. Your mileage may vary if you're a TSMC researcher or something, of course.

pclmulqdq

2 hours ago

I work with FPGAs and embedded systems occasionally, and you have no idea how amazingly watertight the phone/desktop/server CPU abstraction is in comparison to what you get the moment you do something slightly weird. A combination of the chips, the firmware, and the OS does so much work to give you the abstraction of "machine runs code and it just works."

bena

an hour ago

I've always felt the whole binary/digital thing was one of the most clever bits of compromise with the real world I've ever seen.

You have this thing, you want to be able to translate its value into something useful. In this case, the amount of voltage in a circuit to a number. And you spend so much time trying to make sure the voltage level passed is rock solid, that your read is equally solid, etc. Until you realize that you'd have to invent so many more industries just to do this one thing that you just give up and say the only thing you can know with certainty is that there is or is not voltage passing through the circuit.

Then you need to be able to translate "ON" and "OFF" into actual usable values. And eventually coming down to a base 2 counting system so that 4 circuits gives you 16 distinct values seems obvious in hindsight, but had to be a revelation when they realized it.

asimovfan

3 hours ago

“The true delight is in the finding out rather than in the knowing.” ― Isaac Asimov

dvektor

2 hours ago

Keeping true to your username :)

Man I'm not going to lie tho... I just could not make it through the foundation series

Joker_vD

3 hours ago

I've recently done reading "Digital Design and Computer Architecture" by Harris and Harris, and the part about microarchitecture had this exact impression on me: "oh, so we just demux the opcode, enable/disable the necessary signals/paths and it all... just works out in the end, if the clock is fine. Huh. Well, in retrospect it's kinda obvious."

Lerc

3 hours ago

That's the difference between technology magic and illusionist magic, When you see how the trick is done with illusions it's always a bit of a letdown because the answer is usually prosaic, the 'magic' vanishes and it becomes a trick.

When you understand how a piece of technology works you get that beautiful moment.

tialaramex

3 hours ago

I've never got that. I feel the same way in either case, if your trick was easy everybody would do it. Sleight of hand tricks for example, if you're good they're completely seamless, I could never hope to reproduce and yet I know exactly how it's done.

Take that Penn & Teller trick where the live audience is just lying - that's a bit lazy, we're not supposed to have some great admiration for this trick they're just showing you it's an option to just have the live audience lie to the recorded audience and that "works". Whereas their transparent version of cups and balls is the opposite, you must be a sleight of hand master or this won't look like anything.

gspencley

an hour ago

My wife and I are part time magicians. In my experience, people who share your mindset become magicians.

At the risk of just repeating exactly what the person you're replying to wrote: The reason that non-magicians often feel let down when they find out how a trick is executed, is that it often feels like an insult to their intelligence. Magic toys with and exploits your assumptions. As soon as you find out that those assumptions were incorrect, and that you were just lied to by a prop (for example), your experience and perception of that illusion goes from "OMG" to "oh, that's all?"

What we want the methods to be is some grandiose Ocean's 11 like "heist" with tons of sneaky maneuvers and difficult sleight of hand ... but MOST magic tricks, including the ones that Penn & Teller fool you with (not the ones where they tip the method) are not that.

Penn & Teller have said themselves that (paraphrasing): "if the method is more interesting than the trick, the trick is not very good ... and that's when we show you the method. But the tricks we actually want to fool you with are just a bit of gaffer tape and a lie."

The fact that you say that you appreciate magic tricks that involve a lot of sleight of hand, or require technical mastery, kind of supports what we're saying. Most magic tricks aren't that.

To understand why, look at it from the point of view of a professional magician trying to pay the bills.

I can do card manipulation. I have a card manipulation act that I perform. It is by far the most technically challenging routine that I do and it has literally taken me years to get to the point where I can execute it and perform it. It's closer to juggling than it is to what most magic is (though it's still magic because I'm producing playing cards and fans of playing cards at my fingertips in short sleeves).

Now imagine that the majority of my act was that type of trick. I have bills to pay. I have crowds to entertain TODAY... and if I make just one mistake in a performance, the trick falls flat.

Penn & Teller tip cups & balls because the methods employed in that trick are genuinely entertaining to watch.

And the "let's have the audience lie"... I'm pretty sure you're referencing a segment in their 1990 TV special "Don't Try This at Home" where they had a large semi trailer truck run over Teller while surrounded by an audience who could see how it was done, which they tipped at the end. I wouldn't call that "lazy", I would call that using a medium to convey a message.

Magic doesn't work on television. You need to see it in person to really appreciate that it wasn't done with stooges/actors and camera tricks. That's a thesis that they have carried with them over the years. No one would do that "trick" in any other venue than in a television special. You can't get a big truck up on stage... and if you're doing "instant stooge" type of work, where people on stage from the audience are in on it ... at the risk of getting philosophical, they didn't even experience a magic trick. So it's not so much that the method was "lazy" ... it's that it was completely ineffective, and thus not even a magic trick for a certain group of people. Which was the entire point of the segment.

tialaramex

7 minutes ago

You're correct about the TV special with the truck. I don't agree that magic doesn't work on TV. Regardless of whether it's a TV show or performed in front of me the nature of magic† (as a performance) is that the performer gets to decide what to show and obviously they aren't going to leave only a single possibility open to explain what I saw, that's something Penn has talked about - there's only one way to do that trick in The Prestige so you would never do that trick.

I've never seen Penn & Teller live, but I have seen Derren Brown both on TV and in person. Now, on TV one of the things which most impresses me is Derren's use of forces. There are a handful that even an amateur who knows what they're looking for can see in some of the TV shows and there are more places where it's obviously a force but I can't figure out how it's done. In person though, that experience is actually less fun, because of course the force doesn't work on me. So he's forced a theatre full of other people to do what he wanted, and they don't know how. It didn't work on me in the TV audience but that's fine, I'm not the target - when it doesn't work in a theatre full of people it's a bit disappointing. When I listened to a recording of "Thou shalt always kill" I knew from the outset what the last two lines would be but that still kinda works, again in person it wouldn't land the same.

† If you claim not to be a magician, that this is real, then it's not up to you what is shown or not shown, if Millikan's drop experiment only worked with this custom made box and a specified oil recipe then it's just a trick. We do the experiment in whatever circumstances are available and it works because it's measuring a fact about our universe, it's not a trick.

quesera

3 hours ago

I was certain that you were going to conclude with a paragraph about LLMs.

tehmillhouse

an hour ago

I was this close to concluding with a paragraph about Buddhism and the Self. Which is basically the same thing, but from the first-person perspective.

AnimalMuppet

2 hours ago

> It's when you take apart a mechanical clock and keep looking for the time-keeping part, until you figure out that there isn't a time-keeping part in there, it's just gears and a spring.

The time-keeping part is arranging gears and a spring in a way that will, in fact, keep time.

> It's when you learn about integrated circuits and full-adders, and keep trying to understand how a bunch of transistors can do Mathematics, until you figure out that there isn't a mathematics-doing part in there, it's just circuits and wires, arranged in a way that makes the voltages come out right.

The mathematics-doing part in there is the arrangement of circuits and wires in ways that can actually do arithmetical operations on voltages.

It's not magic. But an adder, while never more than a bunch of circuits and wires, is still a mathematics-doing part.

harperlee

2 hours ago

Well to be pedantic: the time-keeping part isn’t the gears but a pendulum.

The spring gives energy to the pendulum, but that can’t effect more than in its amplitude: the period of a given pendulum is constant. Later springs demultiply the tick tack of the pendulum into desired units.

The heart of the clock is that choke on energy though a period.

Thats also why the famous phrase: clocks dont measure time but other clocks.

(Please dont mind the grammar: writing on mobile)

wruza

7 hours ago

One interesting thing of (accidentally) starting with assembly is that you mostly can’t see magic at all, but instead you see learning magicians explaining computers in all sorts of funny ways.

My first “pc” was a clone of zx spectrum and all I had was a built-in BASIC and then some assembler on a cassette. Both went with “books” on how to use them, together with all of the unlimited time you have when you’re a kid.

This transferred to my first PC and eventually I learned how FAT, DOS, BIOS work, how to make a TSR and fool around B8000/A0000, first steps with 386+. It also helped that my granddad was an impulse electronics engineer and taught me how actual gates work and how computers count, sum and select numbers. He also had access to multiple books on hardware. I knew it all down to the silicon.

Other people had all sorts of magical ideas on how computers work. Special “hidden system areas”, “graphics card does X”, “computers multiply by addition”, etc etc. It’s a human thing that if we don’t understand something, our mind tries to yadda yadda it.

And the more you yadda yadda, the less chances it leaves that you’ll actually learn it. I tend to fight with these half-baked autogenerated explanations and try to dig down to how it really works. For no particular reason, that’s just what I like to do. It leaves a mark on how you work though.

Nevermark

6 hours ago

> yadda yadda

Like LLMs, we confabulate. We fill in knowledge holes, with imagined knowledge we don't really have.

marcosdumay

an hour ago

What the GP is explaining is actually the other way around. It's our brain leaving holes even though they are just explained on the text.

And yeah ML models do that too.

jeffparsons

5 hours ago

> Like LLMs, we confabulate.

Thank you for describing LLM behaviour that way. It's a much better description than the more popular but less apt "hallucination".

bunderbunder

2 hours ago

You're in good company with that thought. Many deep learning researchers and practitioners have suggested the same thing.

Heck, even ChatGPT itself agrees: https://community.openai.com/t/hallucination-vs-confabulatio...

dahart

an hour ago

Hallucinate seems like a good word for image-producing neural nets (which is probably where it’s use originated?). Confabulate might be a better word for talkative LLMs, and less good for images.

I wonder if any neuroscientists or psychologists agree about humans and neural nets being similar this way. It’s less than unlikely that the mechanisms are the same between people and LLMs saying not true things. Aside from there being a wide variety of reasons people fabricate untrue things, we already know the mechanisms for neural net hallucinations and confabulations. It’s a non-self-aware machine designed to output tokens or pixels or whatever, it will turn the crank and spit out something with no concept of whether it’s true or not at all times. People, on the other hand, are often using emotion to drive what they say (and often without knowing it). People will sometimes rationalize their confabulations, sometimes say untrue things based on belief, sometimes say things driven by fear or embarrassment, sometimes lie because they have ulterior motives. None of these things apply to neural nets, so the similarity between human and NN confabulations seems at best limited to superficial summaries, no?

Nevermark

5 hours ago

I agree, hallucination is a completely different phenomena from inadvertently filling in knowledge gaps.

Hallucinating to me, is not a one off effect, but a dynamic phenomena. When our sensory processing/interpreting continues iterating, but wanders away from, or separates from, actual sensory input.

Dreams being a functional example. Drugs that cause our sensory systems to be disrupted or overwhelmed by unusual internal signals, being another example.

Retric

2 hours ago

LLM’s operate in discrete steps. So that “interpretation continues iterating” is a very good description of what’s actually happening.

There’s a little uncertainty in the process, so sometimes it will pick the wrong symbol at the wrong time and the entire process just spirals into nonsense. But it’s semi lucid nonsense like a dream or hallucination not line noise.

The confidently stating the wrong thing bit is arguably a different though related problem. There’s making up a citations that don’t exist and there’s inserting song lyrics where a citation should be.

user

2 hours ago

[deleted]

jl6

5 hours ago

> Special “hidden system areas”

I guess "hidden" can be a matter of perspective, from filenames beginning with a period, right through to things like the Intel Management Engine.

mistercow

2 hours ago

Sometimes a remnant of the magic remains in the math, though, even after you understand why the math must work. The Burrows-Wheeler transform used in bzip2 is an example of this for me. I get why it works, but it just feels too damned convenient, almost as if this is one of the universe’s APIs, and you don’t get to look into the source code of this one to find out why such a simple maneuver is so effective on exactly the sort of data we like to compress.

criddell

2 hours ago

I've always thought the Diffie-Hellman key exchange is pretty neat.

shermantanktop

7 hours ago

So many frameworks and dev-oriented features are sold with the claim that domain X is super complicated and full of esoteric useless trivia, so instead someone has put a clean facade on that which simplifies everything and protects the hapless dev from having to learn. Which is nice, it’s a tidy abstraction, we all have other things to do, now we go fast.

Except…the dev has to learn the new API, which we can call domain Y, and which can become quite complicated and hard to map conceptually to domain X (e.g. React events vs browser rendering, or Java GC vs real memory).

And when the cool facade doesn’t quite work for some exotic use case, now what? The dev gets to learn the original domain X anyway, plus how X and Y interact. In the worst case they have rewrite all their Y-using code.

Great abstractions are good magic; bad abstractions are evil magic. And yet good vs evil is often hard to tell apart when you pick up the problem.

dartos

6 hours ago

The only areas I’ve ever seen that were truly super complicated were when synchronization is involved.

It’s so hard to wrap my head around how a CPU reorders instructions and I need to think very slowly and very carefully whenever I work with synchronization.

Same with distributed systems. I implemented a toy version of raft forever ago, but just wrapping my head around it took a month, and I still think I don’t really grasp it.

Haven’t even looked into paxos yet.

xxs

2 hours ago

Sync is easy. Concurrency is hard. Partly b/c as humans we can't multitask.

CPU reordering instructions (and speculative execution) should be not be hard to understand. It tries to do as much work as it could before it has to stall due to lack of data

highfrequency

2 hours ago

> I’m sure I’m not alone, in that each time you pull the curtain off a piece of ‘magic’, you have the same thought: Oooooh yeah. I mean, well duh.. how else would you do that? I can't believe I couldn't see it.

This is the great paradox of good ideas. The best ideas are obvious, but only in retrospect. You would be very unlikely to encounter the idea by randomly fumbling around, yet it feels so simple and obvious (and often even easy to implement!) after someone else points it out and you mull it over. Usually it requires looking in a different dimension than the one you were focused on rather than looking further along familiar dimensions, which is our default behavior.

In this way there’s a parallel to modern machine learning, where backprop on gigantic models allows us to find very short paths in very high dimensions, rather than finding very long circuitous paths in low dimensions. It turns out this also solves the overfitting problem, in the same way that “retrospectively obvious” is a good filter for ideas.

anymouse123456

4 hours ago

TFW the real wizards are the ones working in the strata just below the one I understand...

After nearly 30 years of persistent excavation, I'm finally at bedrock with registers, some assembly and embedded C.

Lifting my head up to find the mess we've created for graphical application development is admittedly disheartening, but also thrilling as there are ways to make it better.

noelwelsh

4 hours ago

There is at least one more layer, which lies behind the abstraction boundary the ISA presents. E.g. x86-64 specifies only 16 general purpose registers, but the Zen 4 has 224. Even as far back as Pentium II the CPU had more registers than the ISA.

josh-sematic

2 hours ago

You’re not even close to hitting rock bottom on explanations of the layers below until you find yourself comparing proposed theories of quantum gravity :-)

kevindamm

2 hours ago

It is around that point that you may be convinced that rocks are capable of conscious thought and the strange loop begins again at the top.

hnfong

34 minutes ago

I am a conscious thinking rock.

(kinda)

mst

5 hours ago

Corollary: Sufficiently well encapsulated magic is indistinguishable from technology.

zavec

3 hours ago

Now I kind of want to read a story where it turns out the technology we use in our modern lives is actually very carefully hidden magic. Sort of like the opposite of (rot13 for book spoilers) gur fgrrefjbzna frevrf.

tayloramurphy

an hour ago

Charles Petzold's book "Code" was the book that revealed the magic behind computers for me. While I don't fully understand everything that happens with a computer, there's a confidence that I could if I needed to. It made tough problems feel solvable in a way I hadn't felt in other disciplines.

bananaflag

2 hours ago

The only two examples of real "magic" I've encountered (would be interested in more):

1) You cannot do preemptive multitasking except by having a timer interrupt (okay, maybe one can also allow emulation).

2) Quantum key distribution (starting with BB84) depends crucially on the fact that the world is not classical.

But in general I agree with the article, it's more or less why I did not become a programmer.

Joker_vD

3 hours ago

On the topic of how that implementation comptime in Go works: I've toyed with a similar idea for implementing constant folding/beta reduction — generate a temporary file with the relevant subset of definitions, insert the constant expression/function call you'd like to evaluate and... compile and run this file. It may not be the most performant thing to do but at least you get the correct semantics without writing a separate constexpr interpreter.

nuancebydefault

3 hours ago

You will indeed find the _magic_ to be no such thing when you dig deep down in the abstactions. Each part makes sense and is comprehensible.

However the magic is what emerges when the parts come together, the system becomes more than the sum of its parts.

Think of a car or a cellphone, an llm, it feels magical what it does, while the elementary parts do not consist of magic.

GrantMoyer

3 hours ago

Sufficiently understood magic is by definition technology.

niemandhier

4 hours ago

Going the other direction, towards higher levels of abstraction tends to strip away the magic too!

I recently write some robotics code using ROS, taking a step back I looked a the result and thought: Actually that is not much different conceptually from running K8s deployments coupled by Kafka.

zaphar

3 hours ago

Magic isn't real. But unnecessary magic can be annoying and sometimes doesn't pull it's weight.