11 ms·
Inception movie explained programmatically with C and assembly
- qubex 9y agoAwesome.
- Cheyana 9y agoGreat. Now do Memento.
- bonzini 9y ago$ man tac
- MarcScott 9y agoOr Primer.
- zentiggr 9y agotimestamp = now while (true); if ( now - timestamp > rand() ) now = now - rand();
- DeepRote 9y agodef memento(x=Float::INFINITY) memento(x-1) end
- qbrass 9y agoThe events in color are reverse-order and take place after the shooting of Jimmy. The events in black-and-white are in-order and take place before the shooting. The movie interleaves them so you have a post-shooting event then a pre-shooting event until you get to the end where the shooting happens then it leads to the exposition.
- phlillip 9y agoThis reminds me of an awesome site my friend Ben Howdle built called moviesascode. Users would contribute tiny code snippets that summarised a whole movie. As an example: .titanic{ float:none; } Unfortunately he lost the site when he switched hosts, I've been badgering him for years to restart it.
- vanni 9y agoSomething like these? https://github.com/whirmill/movies-as-code/tree/master/movies https://github.com/whirmill/movies-as-code/tree/master/movie... https://twitter.com/hashtag/MoviesAsCode https://twitter.com/hashtag/MoviesAsCode https://web.archive.org/web/20130614010033/http://moviesascode.net/ https://web.archive.org/web/20130614010033/http://moviesasco... https://twitter.com/moviesascode https://twitter.com/moviesascode
- ctdonath 9y agohttps://web.archive.org/web/20130614010033/http://moviesascode.net/ https://web.archive.org/web/20130614010033/http://moviesasco...
- justinfaulkner 9y agoThanks for the link. Some of those are really great. Here's the original titanic/float one: https://web.archive.org/web/20120315194303/http://moviesascode.net:80/disaster/titanic/ https://web.archive.org/web/20120315194303/http://moviesasco...
- msla 9y agoWhy is C in quotes? Better question: Why isn't assembly in quotes?
- sctb 9y agoNot sure, we've removed the quotation marks. (Apologies to Chesteron.)
- msla 9y agoI guess I'll have to resign myself to not knowing why some people program in "C" as opposed to C or JAVA as opposed to Java. Some people always write their surname in ALL-CAPS, too, and I never understood that, either. But it isn't so much that I don't understand. I don't understand a lot of things. It's that nobody else seems to understand, either. Even the ones who do it. Or they've all taken a vow to keep this information from the rest of us.
- brianberns 9y agoEasy there, pal. I think people write "C" because the letter C alone looks odd in a plain English sentence.
- msla 9y agoThat doesn't fully explain what I've observed, and your condescension is not appreciated.
- amake 9y ago> Some people always write their surname in ALL-CAPS, too, and I never understood that, either. Because different cultures order the components of their names differently, and writing the surname in all-caps indicates which is which.
- kbenson 9y agoI can only assume C was used on purpose in tribute to how complex and complicated the original movie was.
- Apocryphon 9y agoWhat movie would be convoluted enough to warrant C++?
- leereeves 9y agoCloud Atlas?
- doktrin 9y agoPrimer?
- deleted 9y ago[deleted]
- sushisource 9y agoPrimer is extremely hard to follow as shot (on purpose) but it's actually fairly reasonable once it's all laid out on paper. I think an "implementation" wouldn't be too hard. https://en.wikipedia.org/wiki/Primer_(film)#/media/File:Time_Travel_Method-2.svg https://en.wikipedia.org/wiki/Primer_(film)#/media/File:Time...
- taneq 9y agoI've seen a different graph of the Primer timeline, which is somewhat more involved. http://unrealitymag.com/wp-content/uploads/2011/09/primer-chart.jpg http://unrealitymag.com/wp-content/uploads/2011/09/primer-ch...
- BatFastard 9y agoDownstream color cout << ARGB.value << endl
- callesgg 9y agoWhat is the point? Is it indented as Art? Was it made simply for the fun of coding?
- vbuwivbiu 9y agowhat's the point of your comment ? is it intended as art ? was it made simply for the fun of commenting ?
- ferentchak 9y agoUncaught RangeError: Maximum call stack size exceeded
- callesgg 9y agoThe point of my question was/is to learn about opinions/thoughts from other people who has a perspective that is different from my own.
- mhink 9y agoIt's a toy project. Looks like a fun way to brush up on pthreads and play with self-modifying code. The fun part about reading it (for me, at least) is the novel idea of using the plot of Inception as the "spec" for the program's behavior. :)
- _e 9y agoIt was probably a weekend project that was over three full weekends.
- vbuwivbiu 9y agoWhile we're here, can someone explain how a "dream within a dream" works in Inception ? Presumably someone has to "fall asleep" inside their (or someone else's) dream and go into a dream state again on another level so to speak. The only way I can see the brain implementing that is to dream of its own state so completely that it can run itself as a virtual machine, and fall asleep inside that VM. I haven't read the code, but I doubt the C implementation includes a VM that can run inside itself, Smalltalk-style.
- TallGuyShort 9y agoUser-mode Linux was capable of self-hosting. There's always that.
- jwilk 9y agoUML inside UML doesn't work for me: $ linux Locating the bottom of the address space ... do_syscall_stub : ret = -1, offset = 1052680, data = 18ca9008 do_syscall_stub: syscall 192 failed, return value = 0xffffffff, expected return value = 0x1000 syscall parameters: 0x1000 0x1000 0x7 0x11 0x3 0x2449 Failed to flush page for address 0x1000 Killed
- TallGuyShort 9y agoI was fairly certain I had done it before. I did some Googling to sanity-check myself and found, "UML can be compiled to run within UML" [1]. I don't seem to recall any unusual compiling options to make it work, but then that was a long time ago, as was that document, I suspect (although it has no dates). Maybe it's broken... [1] http://user-mode-linux.sourceforge.net/old/UserModeLinux-HOWTO-1.html http://user-mode-linux.sourceforge.net/old/UserModeLinux-HOW...
- _e 9y agoIt is like falling asleep in a Docker container. You don't know what is outside of the container and you don't know where you are because kubernetes doesn't tell you. Everything is abstracted. This is pretty neat overview though: http://www.inception-explained.com/ http://www.inception-explained.com/
- spadros 9y agoNow, if only it were actually readable...
- tribby 9y ago(2011)
- mschuster91 9y agoHmm, something's broken on x64 OS X (10.11), in the last line: > [Fischer] exiting back to reality from level [1] with the THOUGHT: > Illegal instruction: 4
- dhritzkiv 9y agoTo fix this, I changed L14 of the Make file from ARCH_FLAGS := -m64 to ARCH_FLAGS := -m32
- danwroy 9y agoWhy not lisp
- arjo1 9y agoOur CS1010 teacher in college used to test us on movies. I believe one year he had done inception. Other years he did transformers, Star Wars etc.
- minademian 9y agoso novel and simple!
- agentgt 9y agoI briefly glanced at the code and was expecting a game like clock to emulate the time dilation that the dream within a dream caused. I can't remember in the movie what was the deepest dream possible but you could pick a large base ticker value in case whatever you decide as the lowest dream is not (I remember the movie leaving that as an open question).
- teekert 9y agoHmm, I agree with Rick on this one: Rick: Boy, you're really gonna flip your lid over this one. Morty: Oh, w-wh... what is it? Rick: It's a device, Morty, that when you put it in your ear, you can enter people's dreams, Morty. It's just like that movie you keep crowing about! Morty: You're talking about Inception? Rick: That's right, Morty! This is gonna be a lot like that, except y'know, it's gonna me-beh... make sense. Morty: Inception made sense! Rick: You don't have to try and impress me, Morty! and Rick: "It's been six hours. Dreams move one one-hundredth the speed of reality, and dog time is one-seventh human time. So, you know, every day here is like a minute. It's like Inception, Morty, so if it's confusing and stupid, then so is everyone's favorite movie." I still bugs me that they float in one layer because the fall in another (or the other way around) then one layer deeper this is not a problem at all. It seems so arbitrary. Like they based in on a novel but ignored all the parts where they actually put in an effort to help you suspend your disbelieve.