Hacker News new | past | comments | ask | show | jobs | submit login
What a Programmer Sees When He Watches Inception (latestatic.com)
74 points by indiefan on July 18, 2010 | hide | past | favorite | 73 comments

Inception also understands "Big Oh" ideas -- when you are looping inside the third level down, you have 10 seconds on the outside giving you 10^3 seconds on the inside. (EDIT: a single "tick" in one level allows for 20 or so "ticks" at the next level of dreaming, because of extra brain capacity during sleep.)

Hehe -- I loved the movie...

Haha, I was thinking the same thing while watching it last night. Terrific movie indeed.

Except the human brain doesn't have the capacity to process so fast that seconds turns into years.

None the less, the movie was entertaining and I'm just gonna leave it there. I know movie logic shouldn't be a comparison to real world logic, but the geek in me can't help but point out illogical happenings in the film.

in real life dreams are very short. Minutes 1-5. And they feel a lot longer. We can dream a lot 1-5 spinets withing one hour, and they feel like hours.

Hence you see your dream to shift from one place, to the other. Here is a very good NOVA documentary on netflix about it: http://www.netflix.com/WiMovie/What_Are_Dreams_Nova/70129639...

I dot think that's true. Someone did a study where they observed when people entered REM sleep and later woke them up and asked then how long their dream had been going on. They generally said they'd been dreaming for the same amount of time as they were observed to be in REM. Which pretty much proves they were experiencing time at the normal rate, and their dreams weren't condensed (there's even a myth going about that dreams only a couple of seconds). I suppose the possibility remains that people have many dreams in the REM period and each on just happens to seem like it's the same length as the total REM duration (incrementing each time in a =+ fashion). Not seen that documentary you linked to but I'll post the link to the study if I find it.

I'm referring to turning minutes into decades. I doubt the brain has the capacity to process that fast.

Do you remember every single second of the past 10 years? Me neither. If your brain wanted to, it could skip around and fill in fuzzy memories so you only really experienced the last 10 minutes but remembered (fuzzily enough) 30 years before that point.

As long as it has the capacity to make you think decades are passing, it doesn't matter that they aren't.

Well Cobb stated that when he and his wife woke up from their limbo, he stated that they woke up young again, like they lived an entire life. That's what I'm referring to because that's not thinking you did something but an experience.

Another cs-related theme was the massively parallel capabilities demonstrated by the unconscious. It's also interesting that it's decentralized and actor-based. No two projections were aware of each others' knowledge or events unless they directly communicated.

I found the movie didn't make a whole lot of sense at times. It felt like the writer cut a lot of corners when it came to the whole logical coherency of the plot. Maybe if we blow something up they won't notice!

The plot was entertaining and a good idea, but it left a lot to be desired. It's not destined to become a classic like: Fight Club, 12 Monkeys, Requiem for a Dream, Primer. If you enjoyed Inception, do yourself a favor and check those out if you haven't seen them.

I felt exactly them same way when I left the theater, but then I thought "isn't that the way dreams are?"

In dreams (at least mine anyways) there are solutions/objects/processess that suddenly, without explanation, just materialize out of thin air (but makes perfect sense while in the dream) to problems/events that occur in the dream and only realize how absurd the whole thing was when you wake up.

Heh, I felt the same way when I woke up this morning, but it was about the movie. I always wake up in a pissy mood and this time I was lashing out on inception, which, boiled down, is an absurd story of boys playing make believe in a dream and having delusions of grandure.

However, I'm in a better mood now and the movie is still wonderfully entertaining.

Yes that is a comprehensive list. Reminds me of this similarly canonical list, the great universities of England: Cambridge, Oxford and Hull.

Particularly on the criteria of plot 'Requiem for a Dream' can surely not be considered a classic. Conceivably if we were willing to overlook the (lack of) plot and consider the cinematography, acting, realism and artistic choice of title then there's at least an argument. Although in my view it is really just 2hrs of Oscar juice and 'great' acting is surprisingly forthcoming given the right subject matter.

Can you list some of the incoherencies? I found that things that seemed odd at first can actually be reasoned out pretty easily.


For example, a friend was confused how Fischer could be revived. They explained that death with the heavy sedation would lead to limbo, so it could be concluded that dying was actually just a shortcut to go into a deeper dream state, he wasn't actually "dead". When they woke him up from that dream, he came back.

Another oddity I found was that they needed to synchronize all the kicks, wouldn't one kick in the deepest dream suffice? Well, in one level of dreaming if you think you're falling, you can actually feel it (whether the falling feeling happens in the sleeping environment (dude sleeping in a chair and being tipped) or in the dream (dude being thrown out of a building)), but at 2 levels of dreaming, the falling would be too abstract to cascade all the way up.

You probably found different glitches in the movie, but the above shows the process I used to answer some questions.

Movies are much too subjective. 12 monkeys had some fine writing, but the editing, direction, and acting are way better in Inception (IMO of of course). Is it an all time great? Not sure, but it's a darn fine movie

If you haven't already I would highly recommend you watch The Pier (La Jetee) which was the inspiration for 12 Monkeys. It has a really beautiful and unique style being composed almost completely of still images which suits the story very well.

+1 for Primer.

Furthermore, ... I thought it was interesting the movie only went down 4 levels. I have a rule of thumb when working on hierarchical structures (like a directory tree holding lots of data) that three levels of hierarchy is all a person can hold in their head at a time. This is sort of the like the 7 items +/- 2, except I think that the seven items rule only applies "across" a structure. To understand more than three levels deep requires supplementary structures like indexing, sorting, or nesting ...

(of nesting (of nesting (...)))

When they added the 4th level, I explicitly thought to myself "Oh, this is an effort by the filmmaker to pull us out of logical thought by making it too much to organize in our heads in real time."


It wasn't too much though, the top two were just sleeping in a plane and a falling van, which isn't too much to remember. The elevator scene was just him setting up charges, much more action was happening at the hospital and the limbo level.

Entering Limbo = Memory Leak. The reference to an object is nullified (the subject's projection/reference is killed in the dream), so the object is leaked and there is no way to access it, until either a garbage collection happens, or when the parent process is stopped. (i.e. the subject is awaken up).

Garbage collection offers a nice explanation for why limbo is only a problem under the influence of the "strong sedative". If garbage collection is a feature of normal dreaming, the "strong sedative" disables it. If you can stretch the metaphor further be my guest.

What I thought:

* These dreams are far too cohesive and realistic. Dreams aren't like The Matrix where physics is normal and you do something to it. They're more like weird shit happens and you accept it as normal.

* Dreaming nested 3 levels of recursion deep? Done it, didn't need a sedative.

Anybody else think of the book Godel Escher Bach when they were watching this movie? Beautiful how the movie wraps in on itself like a mobius strip.

I thought about GEB when they paid homage to Escher with the stairway.

Is this wrapping around because of the first "act", when washes up on shore? I still don't quite understand how that fits in, if someone cares to elucidate.


Don't read if you haven't seen it yet!

Saito dies at some level (if I remember right at the top dream level) and he enters limbo. Cobb goes there from the snow compound dream level but Saito has already been there 20-40 years (maybe they said in the movie, I forgot that too). Cobb then helps him remember Saito is in a dream so they can wake up together from the limbo state.


Except they don't, you never see them kill themselves (to exit the dream) or pass through the other levels of dreams, it just cuts straight to the plane. Then at the end he sees his kids, but they're exactly as they appear in his dreams. The top continuing to spin just makes it more explicit.

So he never made it out of limbo, when you see him awaking in the plane that's just him creating his own reality inside limbo, one where he gets to go back to his kids.

"Then at the end he sees his kids, but they're exactly as they appear in his dreams. The top continuing to spin just makes it more explicit."

Nolan was just doing that to mess with the audience. Yes, the kids were wearing the same clothes, but the top started wobbling right before it cut away. So the audience is left not knowing if he is stuck in limbo or not. It could be interpreted either way.

Anyways, an easy way to tell if you are in a dream without relying on a totem (in the movie's universe) is to look at an analog clock. The numbers appear upside down in the dream world. For some reason this was only illustrated once in the movie.

I seem to remember some Batman cartoon where Batman realizes he's in a dream because letters shift around oddly while he's trying to read something.

Indeed, I remember from my own dreams that text and numbers behaves oddly (disappears/changes when you look around).

I've also heard this technique is used by lucid dreamers (http://en.wikipedia.org/wiki/Lucid_dream) to figure out that they're dreaming so they can begin to take control of the dream.

Or you could consider that the movie creators wanted to make the point : does it really matter? As long as he was happy and got to see his kids, maybe it didn't really matter if he was dreaming or not.

I think he left it very ambiguous on purpose. The kids looking exactly like in the dream might just be an artistic thing to connect everything together. Also, the top was starting to jerk around a little bit at the end, so we can't be sure if it was about to fall.

The first scene is "here's where he is at now" and then the rest of the movie is a flashback explaining how this happened.

Can someone explain why the zero g scenes didn't cascade down through each dream level? They were feeling forces in the first dream in the van and those would go to the hotel but those sleeping there would not feel the same forces (eg lack of gravity) the next level down.

I did really love the idea behind the totem though, very clever.

The totem reminded me of passing a reference down a series of recursive calls. Hehe.

The root layer reads acceleration from a real sensor (the inner ear) while each successive layer reads acceleration from a virtual sensor provided by the layer above it. That virtual sensor reports the parent layer's acceleration minus a vector taken when the layer was initialized, plus gravity.

They didn't talk about it explicitly, but in my mind it was connected to how the guy who got injured felt progressively better each time he went down a dream level. Dreams are affected by what happens above them, but it's sort of passed through a filter.

Exactly, the dreamers in the van are feeling 0g, so they're dreaming in 0g as well. However, it's still a dream so when you reach the dream-within-a-dream level, the brain probably defaults to what it's more used to.

There are a lot of inconsistencies and you just noticed another one but it's still a really good movie because the inconsistencies are all subtle enough that you are willing to overlook them when you are watching the movie.

Why doesn't the totem work if someone else touches it, though?

The point of the totem is that only you know how it behaves, and how it feels and how it's weight is distributed.

If someone else has held and seen your totem, they can possible recreate it exactly in a dream. If they can recreate it then they can trick you into thinking you aren't dreaming when you actually are.

The totems seem to be pretty vulnerable to trickery, but the film didn't explore that much. For example, (spoiler alert) replace Joseph Gordon-Levitt's loaded die with a fair one. He'll think he's in a dream and kill himself. Making an ever-spinning top would be harder though.

What a computer scientist sees is an infinite tower of reflective interpreters.

'Inception' was a classic example of recursion.

Not really, just a callstack four* calls deep.

...just four?

Hmm, actually there was multi-threading, using sort of kick-based synchronisation primitive.

actually there was multi-threading, using sort of kick-based synchronisation primitive

I think they actually used an actor-based threading model.

if(depth > 3) return false; else {

  try {
  // ... do what the OP wrote
  } catch (DeathException D) {
    enterLimboState() ...

What if she watches it?

You might be interested in reading this: http://en.wikipedia.org/wiki/Gender_in_English#Modern_Englis.... As third person singular personal pronouns, he and he/she are both acceptable in the dual gender case. If we're going to be strictly PC we should say gender-neutral, but A Comprehensive Grammar of the English Language was written in 1985, so I hope you let it pass. :)

Perhaps the post's author was speaking more personally. It is semiotically ambiguous.

What a Programmer Sees When He or She Watches Inception does not have the same panache.

I've never understood the animosity towards overloading `they` as a neuter singular pronoun. It doesn't seem to introduce any sort of ambiguity in the language and replaces a whole slurry of fumbling and hackish attempts with a single widely understood syllable. It's damned convenient.

Of course, I also hold a disdain for "proper quoting".

> Of course, I also hold a disdain for "proper quoting".

What do you mean here? When talking about "proper quoting", I much prefer what I just did to what you're supposed to do (in American English) for "proper quoting."

I feel like when you quote things they become a unit together with the quotes, and the punctuation should then treat the whole composition as a single object. You wouldn't stick punctuation in the middle of the word at the end of a claus,e so why would you do that with quote?s

The problem is, when a person uses 'they' as a single pronoun, he seems uneducated.

That's interesting, I don't think it makes one seem anymore uneducated than any other piece of correctly used grammar (correct use of the word "one", "none of them is" etc). I wouldn't regard my self as uneducated, having had the privelege to go to a good (if not public/private) school.

By any chance is this one of those quirks of American grammar usage that I've not come across before. The only times where I've seen disapproval of the use of 'they' in that fashion was on the Internet... By any chance is this another Ame

"They is so smart!" --> the apparent subject-verb disagreement is just too unfamiliar to most ears.

You are still supposed to use plural declensions despite talking about a single person.

For instance: "if such a person existed, they were very quiet about their existence". Note that it's not "they was", which is grammatically incorrect.

That's because it should read, "they are so smart".

Someone should make a hacker's manual of style.

As opposed to "proper quoting?" I doubt most people understand the reference anymore.

Do you hold disdain for properly citing references in technical journals? The rational for proper quoting is the same.

What a Programmer Sees When Watching Inception is just as good, and makes no unwarranted assumptions.

"He" is a common vernacular; get off your soapbox.

I agree with the thrust of your comment that vernacular is what it is and attempts to police it are foolish. Though there's no need to be rude. And "he" is not a vernacular (Muphry's Law?). But this case is a lot more subtle than you imply.

Generic singular "he" is an older usage that is slowly phasing out as society changes. When I find myself using "he" for this, I always notice that it doesn't quite feel right anymore. Of course most people who favor this usage point to its "standard" correctness (cf. this thread), but that's pointing to the past. What's interesting is that we're in a pluralistic stage where there are many competing alternatives -- generic "he", alternating "he" and "she", "he or she", singular "they" -- none of which quite feels right.

This is untenable in the long run because it forces you to think about which one to use. That's way too much runtime overhead, and it's not how language works. Vernacular is a don't-make-me-think thing. That's the real problem with sprout's suggestion in the GP, i.e. rewording to drop the generic singular altogether. It's a viable alternative, and I do it all the time, but it's also the most expensive.

There's no way this gap won't get filled. The only reason we haven't seen it yet is that fundamental language shifts are slow relative to a human lifespan.

The option I find most annoying is the "sometimes use 'he' and sometimes use 'she'" one, which is like solving a design problem in a function by offloading it entirely to the caller. Not only do you have to think about which one to use, you also have to reference-count to keep the two in balance over time. No way is that one going to survive. (I also find that people who do this tend to be annoying tsk-tsk types, though maybe that's a prejudice.) My money's on singular "they", because it's the simplest, it's truly generic, and -- amusingly contrary to all the pseudo-grammarians who freak out about it -- it has a long history in English. Great examples at http://en.wikipedia.org/wiki/Singular_they.

"He" as gender-neutral singular pronoun is not even vernacular -- it is standard English.

Standard English is a construct of a society predominantly run by, and for, men. It is, in no small way, the English of Those Who Rule, which is to say, at least for a very long time, men.

I don't disagree that standard language is dynamic and a representation of culture (and those who control it).

However -- while I have heard plenty of suggestions for resolving the issue from college english professors, none of them have managed to convince the Central Board of Oppressive English to accept their proposal, and so we might just be stuck with non gender-neutral pronouns and awkward she/he constructions for the time being.

'They' might emerge as a ambiguously plural/singular gender-neutral pronoun, but in the meantime I won't berate anyone for sticking to the accepted standard.

So? It means what it means; you can't argue that something is insulting because it would be insulting if someone else was directing the growth of the language.

Question: When you read the title, did you imagine the article was by a female author?

The sex of an author who's article I'm reading has never crossed my mind. Who gives a crap if they're male/female? They're an author, they should be treated as such.

Okay, then another question: if after you read the title, someone asked you something about the author so that you had to "instantiate" the author in your head, which sex would you think of? Is it likely than anyone would think of a woman? Is it then true that we're hiding women behind a male pronoun? Surely it's impossible to picture a "prototypical human" without gender, no?

Don't get me wrong. I don't believe in the strict male/female binary or in universal identity, and I don't know if a woman inherently writes different from a man. But I do think that language's assumptions shape the way we think, and therefore the laws we make. That is enough for me to seek a more neutral and equitable way of speaking.

If your not considering the sex, race, or age of an author then you are not considering all aspects of the article especially when the article is an opinion piece. We already know that the sexes think different, maturity matters and the races have different perspectives so why ignore a pertinent bit of information?

Applications are open for YC Winter 2022

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact