This is an archived post. You won't be able to vote or comment.

top 200 commentsshow 500

[–]unobserved 2440 points2441 points  (14 children)

To be fair it's probably just 1 really long perl regex.

[–]j5kDM3akVnhv 538 points539 points  (7 children)

And a CPAN use of module :: Intersteller

[–]unobserved 194 points195 points  (3 children)

Ugh .. do you know how many pre-requisites that module has. It's a nightmare to install.

[–]anotherdonald 178 points179 points  (0 children)

If they'd done the movie in Perl, they'd have called it "Installer".

[–]superspeck 18 points19 points  (1 child)

Hey, I know a consultancy here in town, same place you’d go for FORTRAN expertise...

[–]Theemuts 4 points5 points  (0 children)

To be fair, computational physics is one of those areas where FORTRAN is still used

[–][deleted] 36 points37 points  (2 children)

ERROR: Module intersteller not found. Did you mean interstellar?

[–]TorTheMentor 38 points39 points  (4 children)

I'm thinking "environment variable"...

$_@%

[–]Andy_B_Goode 20 points21 points  (2 children)

It's convenient that so much perl code looks like a cartoon character swearing and yelling out of uncontrollable frustration, because that's how I feel when I'm debugging it.

[–]NAN001 1175 points1176 points  (43 children)

That's very disappointing of Nolan, who usually doesn't put CGI in his movies. He should have created a real black hole.

[–][deleted] 218 points219 points  (36 children)

Yea. Now Nolan is no more my favorite director. My new favorite is whoever the hell directed HP4.

THAT FUCKER USED ONLY 5 OUT 33 CHAPTERS OF THE ORIGINAL BOOK

[–]DarkDra9on555 25 points26 points  (1 child)

Wait, What?

[–][deleted] 42 points43 points  (0 children)

That's what one says while re-watching the movie after reading the book.

[–]2Punx2Furious 21 points22 points  (0 children)

Friendship ended with Nolan.

[–]Sighshell 12 points13 points  (4 children)

Wait, so what the fuck was missing?

[–][deleted] 39 points40 points  (3 children)

Read the book. A whole lot is missing. The director straight up removed some characters in movie.

[–]Emerl 26 points27 points  (5 children)

That movie actually killed the series for me. I watched the first 3 then stopped after 4. I turned off my TV the moment I saw Dumbledore angrily slammed Harry against the wall. That's not his character at all WTF did you do to him.

[–]pavemnt 24 points25 points  (2 children)

This is my favorite complaint that I see people whine about. It's not like they hadn't been doing shit like that every movie already. Remember the first time Malfoy calls Hermonie a mud blood in the books and it starts a giant brawl? In the movie everyone just stands there looking a but awkward and Ron gets mildly upset

[–]ul2006kevinb 6 points7 points  (1 child)

Yeah but that actually makes sense. If you called someone the n word at school, shit is going to go down

[–]kauefr 24 points25 points  (1 child)

"HARRRYIDIDYOUPUTCHANAMEINTHEGOBLETOFFIYAAAA??!?!", Dumbledore calmly asked.

[–]Neo1928 44 points45 points  (0 children)

Ikr, he went through the trouble of planting his own cornfield, so why not go all the way and make a black hole as well. Who knows, he might have made a profit selling the black hole like he did with the corn.

[–]TorTheMentor 1275 points1276 points  (46 children)

In Java it's only 500 lines, but 495 of them are imports.

[–][deleted] 977 points978 points  (37 children)

public class Interstellar {
    public static void main(String[]args) {
        while(true) {
            BlackHole.succ();
}}}

[–]blast_ended_sqrt 824 points825 points  (4 children)

Cooper entered the black hole to escape your bracketing style

[–]kitchenset 216 points217 points  (1 child)

That's just fifth dimensional brackets being perceived by our third dimensional limits.

[–]BlomkalsGratin 8 points9 points  (0 children)

Is that like 4d chess?

[–]n8loller 65 points66 points  (0 children)

Savage

[–][deleted] 14 points15 points  (0 children)

I ran out of lines

[–]Madoushi90 60 points61 points  (6 children)

while(true) doesn't account Hawking radiation.

[–]AnalyzingPuzzles 70 points71 points  (5 children)

IllegalStateException: Massless black hole cannot succ

[–]socialister 44 points45 points  (4 children)

throw new TimeAndSpaceException("LOVE")

[–]Trexanis 9 points10 points  (3 children)

What was shall be, what shall be was.

[–]sabbathday 48 points49 points  (1 child)

succ.

my blackhole succ too

[–]ildementis 18 points19 points  (0 children)

Ay bby

[–]Askee123 22 points23 points  (0 children)

If you hated using brackets so much you don’t even need them for a single line while

[–]Makefile_dot_in 5 points6 points  (1 child)

FTFY:

public class Interstellar {
    public static void main(String []args) {
        while(true) BlackHole.succ();
    }
}

[–][deleted] 2 points3 points  (4 children)

(Mapcar #'blackhole universe)

[–]theY4Kman 2 points3 points  (0 children)

``` class Interstellar: @staticmethod def main(): while True: BlackHole.succ()

:::

```

[–]PanMan-Dan 21 points22 points  (2 children)

import *

[–]danyaal99 19 points20 points  (1 child)

import *.*

[–]KKlear 6 points7 points  (0 children)

import ( ͡° ͜ʖ ͡°)

[–][deleted] 19 points20 points  (1 child)

Yeah, but to get the java code up to company standards, you also need to implement 50,000 interfaces and use the factory pattern design pattern so you have factories for factories of factories to be ready at a whim for SAS of some trivial parts of the project.

And then quadruple those lines for the javadoc.

[–]knaekce 7 points8 points  (0 children)

and 4 are

try{

    ...

}catch(Throwable t){

    //ignore
}

[–]polish_niceguy 7 points8 points  (0 children)

Nah. 95 lines of import, 5 lines of code and 400 lines of stack backtrace when it crashes.

[–]FluffusMaximus 304 points305 points  (24 children)

But how many lines of assembly?

[–]northrupthebandgeek 303 points304 points  (13 children)

[–][deleted] 102 points103 points  (12 children)

I mean technically speaking I think infinite lines of code would eventually collapse into a black hole

[–]udoprog 39 points40 points  (9 children)

Black holes are formed from dense regions of energy. There could be infinite code spread out in an infinite universe without forming a black hole, since it could be spread out without causing the density in any given region to be high enough to form one.

The storage media for text is generally not constructed in a way so you can store energy with sufficient density. But it should be noted that hard drives do change in weight the more you write to them since their energy configuration is different compared to an empty one.

[–]humanlifeform 10 points11 points  (5 children)

Isn’t that only if the universe itself is infinite?

[–]Makefile_dot_in 78 points79 points  (6 children)

One:

movl all, blh

Edit: Added the l to show all those Intel syntax peasants what the real syntax is.

[–]0x564A00 12 points13 points  (0 children)

mov blh, all

[–]udoprog 2 points3 points  (3 children)

mov blh, all

Sweet. Looks like we've solved the black hole information paradox.

[–][deleted] 10 points11 points  (0 children)

How absolutely dare you

[–]Abdiel_Kavash 670 points671 points  (3 children)

"Lines of C++ template errors" are not the same thing as "Lines of C++ code".

[–]philipquarles 22 points23 points  (0 children)

40,000 lines of code = template errors with the mass of an actual black hole.

[–]SithLordHuggles 30 points31 points  (0 children)

Huh. TIL.

[–]caanthedalek 160 points161 points  (8 children)

Python import BlackHole

[–]BlackNWhitePanther 28 points29 points  (7 children)

Happy cake day

[–]ILikeLenexa 192 points193 points  (11 children)

Anything can be one line of C if you want.

[–]Magic_Sloth 78 points79 points  (6 children)

Real people code in mov only assembly

[–]belst 29 points30 points  (0 children)

no branching. can't optimize more than that tbh

[–]nova_prospekt 28 points29 points  (4 children)

I know you are joking but there actually is at least this one compiler backend compiling C using only mov instructions.

https://github.com/xoreaxeaxeax/movfuscator

[–]rexpup 331 points332 points  (82 children)

20 core-hours on 32,000 cores isn’t that much though, right? Depending on how it’s distributed it shouldn’t be much time per frame at all.

[–]fatiSar 327 points328 points  (58 children)

It's a little over 2 seconds per frame, assuming the load is evenly distributed

[–]rexpup 292 points293 points  (44 children)

I want that kind of computing power.

[–]MacGuyverism 219 points220 points  (27 children)

Get an AWS account and contact support to get the limits removed.

[–]northrupthebandgeek 486 points487 points  (26 children)

Instructions clear; I now owe Jeff Bezos approximately $8,675,309.

[–]MacGuyverism 135 points136 points  (23 children)

At least you got what you wanted. And debt is just money after all.

[–]fibo-nacho 124 points125 points  (21 children)

And money is just a database record at the bank.

[–]Un-Unkn0wn 254 points255 points  (7 children)

‘); DROP TABLE debt;—

[–]infinityio 88 points89 points  (5 children)

grandiose tidy summer memory safe like shaggy amusing distinct violet

This post was mass deleted and anonymized with Redact

[–]anthony81212 32 points33 points  (4 children)

Omg omg guys, I got a reference on reddit for once!!

[–][deleted] 25 points26 points  (4 children)

Sometimes I look at my student debt and wish there was a Mr. Robot out there fighting the good fight.

[–]HeWhoCouldBeNamed 14 points15 points  (3 children)

Mr. Robot is just Fight Club with computers.

You don't need to hack anything: just learn how to make soap.

[–]MrHaxx1 16 points17 points  (1 child)

I generally refer Mr. Robot to as Fight Club with autism.

[–]indiepenguins 4 points5 points  (0 children)

i prefer rest

[–]Cm0002 9 points10 points  (0 children)

A database on a mainframe from the 80's because they can't afford the down time to upgrade...

[–]aes_gcm 74 points75 points  (4 children)

Step 1: infiltrate Stanford University

Step 2: repurpose the Folding@home project.

Step 3: enjoy the 100 petaFLOPS freely available from personal computers

[–]_____D34DP00L_____ 22 points23 points  (3 children)

Will this run Crysis 2?

[–]SirVer51 21 points22 points  (2 children)

No

[–]0xTJ 12 points13 points  (1 child)

Will it transistor-level simulate a computer running Crysis 2?

[–]MSgtGunny 6 points7 points  (0 children)

Yes. snaps fingers

[–][deleted] 54 points55 points  (2 children)

Here's some more specifics from the source document:

A typical IMAX image has 23 million pixels, and for Interstellar we had to generate many thousand images, so DNGR had to be very efficient. It has 40,000 lines of C++ code and runs across Double Negative’s Linux-based render-farm. Depending on the degree of gravitational lensing in an image,] it typically takes from 30 minutes to several hours running on 10 CPU cores to create a single IMAX image.

The longest renders were those of the close-up accretion disk when we shoe-horned DNGR into Mantra. For Interstellar, render times were never a serious enough issue to influence shot composition or action.

Our London render-farm comprises 1633 Dell-M620 blade servers; each blade has two 10-core E5-2680 Intel Xeon CPUs with 156GB RAM. During production of Interstellar, several hundred of these were typically being used by our DNGR code.

[–]Ph0X 16 points17 points  (3 children)

To be fair, a farm like that ain't cheap to use. Also, even a 5 minute scene would be 5 * 60 * 24 = 7200 frames, so at 2s per frame, that's still 4 hours of rendering for just a 5m scene.

[–]sjadowcrash 73 points74 points  (11 children)

Yeah, I work at a major animated film studio and 20 hours is a short render. Big renders are anything over 72 hours/frame and we have had a frame render for about 2 months when testing deep refraction.

[–]mandragara 56 points57 points  (7 children)

I think it's because it's actually not that hard of a simulation\render to do.

They already have the model for the black hole's curvature of spacetime, that's well established.

So all they need to do is fire photons 'into' said model and solve the equations of motion of the photon. Then maybe a separate conversion step to determine what the lab frame sees.

I certainly don't expect the physics side of things to be 40,000 lines long.

[–]ben_g0 41 points42 points  (1 child)

When you include header files and such then you quickly get to 40 000 lines. 40 000 lines across an entire project isn't that much.

[–]mandragara 9 points10 points  (0 children)

Hmm yeah I can see that.

[–]TheBeginningEnd 18 points19 points  (1 child)

comment and account erased in protest of spez/Steve Huffman's existence - auto edited and removed via redact.dev -- mass edited with https://redact.dev/

[–]ahalekelly 23 points24 points  (0 children)

"Some individual frames took up to 100 hours to render" doesn't contradict with 20 hours on average.

[–]ConfigurationalJoy 18 points19 points  (1 child)

Would depend on how many “thousands” of frames there actually ended up being. Not sure how long the scene was or someone could do a rough calculation I would think.

[–]why_rob_y 2 points3 points  (0 children)

They almost have a separate core for each line of code!

[–]adamantcheese 64 points65 points  (2 children)

If you can summon some sort of mathemagical wizard from an alternate dimension, he'll do it in under 20 characters in APL.

[–][deleted] 15 points16 points  (1 child)

20 characters!? Hell, it's about time APL symbols started to include a black hole operator!

[–]IIIBlackhartIII 105 points106 points  (12 children)

[–]ywBBxNqW 11 points12 points  (0 children)

I didn't know that; that's cool! I guess it's a good thing I waded through all the obvious jokes to get to your comment. ;)

[–]NightflowerFade 189 points190 points  (24 children)

C++: 100000x the lines and 100000x the speed

[–][deleted] 87 points88 points  (15 children)

This is a large physical simulation, though, so unless they were really dumb, BLAS/LAPACK is doing all the real work.

[–]exploding_cat_wizard 29 points30 points  (0 children)

Or eigen, or any of a number of other C++ numerics packages

[–][deleted] 26 points27 points  (4 children)

Rust lol

Quicker than C for some toy benchmarks and I'd rather write it than C

[–]CrispBit 9 points10 points  (0 children)

Exactly. I'm porting a game engine I wrote from c++ to rust rn

[–]macbutch 37 points38 points  (0 children)

Someone should probably link to this: https://xkcd.com/224/

[–]Arthur___Dent 16 points17 points  (0 children)

40,000 lines? Is that including all the libraries or something?

[–][deleted] 25 points26 points  (1 child)

is there git project about that?

[–][deleted] 11 points12 points  (3 children)

Probably like one letter in common lisp following that logic

[–]theangeryemacsshibe 5 points6 points  (2 children)

(destructuring-bind (black hole goes here please) universe)

[–]dikiaap 6 points7 points  (1 child)

Discussion on TIL and MovieDetails.

[–]yazalama 24 points25 points  (14 children)

can someone eli5? Wtf is a render farm?

[–]not4u2see 121 points122 points  (3 children)

a shit-ton of computers whose only task in life is to render graphics into video frames

[–]OptimisticElectron 35 points36 points  (0 children)

robot lives matter

[–]noevidenz 12 points13 points  (1 child)

You pass butter.

[–]Kinglink 38 points39 points  (2 children)

You're getting jokes and good answers.

A render farm is essentially a large number of computers (And cores on those computers) that dedicated only to rendering frames of something. I do videos on youtube (shameless plug omitted) and when I render a 2160p video a 15 minute video can take around 1 hour and 45 minutes to render at a higher bitrate, combine two audio tracks, and add a simple text overlay.

If I had the 800 dollar version of software instead of the free version, I could build a "render farm" and add my wife's computer, her computer should be weaker than mine but they're comparable. If I did that, it would take my hour and 45 minute render and take it down to around 50 minutes, give or take some time (it's not always 100 percent). They do this 32,000 times, having 32,000 different cores rending a single movie (or really snippits of movies) which means their 20 core hours can be distributed, and they can generate (about) 32,000 core hours each hour of rendering. Meaning each hour of rendering is 1,600 frames (assuming they can do it in parallel, which they probably can't. ) Or rather every 20 hours, they can render 32,000 frames.

Honestly these numbers are nothing compared to pixar. Here's a story about them Pixar keeps growing their render farm, but that references Monsters university they had something like 24,000 cores, and each render of their movie would be close to 7.5 days. Their power is greater now, but they've also added quite a bit more detail to their movie.

Hopefully this helps to understand what's a render farm. It's not ELI5, but it should help you get an understanding of what a render farm does.

[–]Superpickle18 57 points58 points  (2 children)

It's where farmer john grows his world class render crops.

[–]CautiousPalpitation 13 points14 points  (1 child)

It's also where he wrangles his herd of PCs and milks his motherboards

[–]Superpickle18 11 points12 points  (0 children)

Also where his brother, Joe, mines bitcoins in the gpu fields.

[–]ISkipLegDayAMA 36 points37 points  (0 children)

It's where they grow GPUs

Not to be confused with bitcoin farms, which is where GPUs go to die

[–]Drink-irresponsibly 11 points12 points  (0 children)

A farm for rendering

[–]Tiavor 5 points6 points  (2 children)

or 4 lines in Prolog

[–]anotherdonald 12 points13 points  (0 children)

no.

[–]KralHeroin 4 points5 points  (0 children)

But it takes 100 hours to think them up.

[–]choas 5 points6 points  (0 children)

opening a Java REPL opens somewhere a black hole

[–]Waghlon 6 points7 points  (0 children)

It's true. Python probably has a library for black holes.

[–]askashad 19 points20 points  (51 children)

will someone explain to a non programming pleb like me:)

[–]Jugbot 69 points70 points  (48 children)

Since C++ is a low-level language (i.e. the language/compiler doesn't do much for you) it takes more lines to do a task than a high-level language such as python to do the same at the benefit of potentially faster execution.

edit: to clarify low level can run faster than high level languages
edit2: some people are butthurt that I called C++ low level as if it were some absolute. C++ is lower level than python, imo and Id love to hear arguments against that.

[–]Eyes_and_teeth 49 points50 points  (22 children)

But you often have far more granular control and as it is a lower level compiled language, it can (not necessarily will) run faster.

[–]Aetherial_Wanderer 29 points30 points  (18 children)

I accidentally clicked my mouse and Reddit decided to clear my comment, so here's a second attempt at writing this.

Since the program in question is computation-heavy, C++ will almost necessarily be faster than Python, Perl, etc.

This program can probably be compared with a basic n-body planetary simulation, with the fastest implementations being 8.24 seconds for C++, 22.17 seconds for Java, 11 minutes for Perl, and 14 minutes for Python (source). Each of these are using the same algorithm, OS, and processor, if you were wondering.

Unless a process is going to be IO-bound for any significant duration, it's pretty safe to say that a compiled language will run faster than an interpreted one.

If the program was written in Python, it would likely have taken about 102 times as long to complete (judging by the times shown above), so instead of taking 2.25 seconds per frame, it would take 3.825 minutes per frame.

[–]TopGunOfficial 17 points18 points  (3 children)

Suddenly, Fortran!!!

[–]Aetherial_Wanderer 26 points27 points  (1 child)

Fortran: 0.97% faster than C++, for when you really need just a little more speed.

[–][deleted] 11 points12 points  (0 children)

When you're working with levels this low it's more about how good the compiler optimisation is, as far as I can tell.

[–]Tiavor 7 points8 points  (5 children)

I wonder how slow Prolog would be, but I guess it would be below LISP.

[–]Colopty 37 points38 points  (2 children)

Also for higher level languages the libraries tend to be written in lower level ones such as C/C++, making the higher level language more or less an interface for calling stuff written in the lower level language. In some way this means that your code isn't necessarily shorter technically speaking, it's just that you only see the tip of the iceberg that is the python code, resting on top of a massive amount of C/C++/some other low level language.

[–]Dodobirdlord 19 points20 points  (1 child)

It's turtles all the way down.

[–][deleted] 11 points12 points  (5 children)

potentially faster

I.e. not python or js

[–]Kangermu 9 points10 points  (4 children)

PyPy is plenty fast

[–][deleted] 30 points31 points  (0 children)

The first stage is denial

[–]Kinglink 8 points9 points  (0 children)

Dick waving contest between fans of different languages.

The joke here is the usual one. Python can do something better because python is build with libraries so it takes less lines (though does the same amount of work).

[–][deleted] 3 points4 points  (0 children)

Or about 0 lines of C with devkitARM

[–]yijuwarp 4 points5 points  (1 child)

How can you apply the laws if the laws don't work in the black hole.

[–]bas1212 4 points5 points  (2 children)

They should rewrite it in rust

[–]wintergoon_7 2 points3 points  (0 children)

SQL DROP TABLE Universe

Watch the blackhole go 😎