0303: "Compiling"

This forum is for the individual discussion thread that goes with each new comic.

Moderators: Moderators General, Prelates, Magistrates

po2141
Posts: 174
Joined: Wed Aug 01, 2007 3:55 pm UTC

Postby po2141 » Wed Aug 15, 2007 12:00 pm UTC

And what, pray, is a chair-sword?

cvi
Posts: 8
Joined: Wed Aug 15, 2007 12:00 pm UTC

Re: "Compiling" Discussion

Postby cvi » Wed Aug 15, 2007 12:07 pm UTC

Unforgiven wrote:How the hell do you manage that. How can compiling a single file take that long? Maybe you need to refactor your project into more files.


For excessive compile-times, write a non-trivial parser using boost::spirit, and compile it with full debugging information enabled. Also make sure no inlining/optimization is done.

I've had source files less than 200 lines take more than 40 minutes to fully compile (producing a 60MB object file!) ;-)

User avatar
Toeofdoom
The (Male) Skeleton Guitarist
Posts: 3446
Joined: Wed Jan 10, 2007 10:06 am UTC
Location: Melbourne, Australia
Contact:

Postby Toeofdoom » Wed Aug 15, 2007 12:13 pm UTC

I have a 3 hour lab for 3D... so...

"I'm rendering my scene!"

Its even better because you can change the settings to take up the right amount of time you want it to. raytracing, global illumination, indirect illumination, a3 size at 300 dpi and 10 randomly placed lights :D

And if that still doesnt take long enough, start printing.

all while this is going I can browse the fora, because I can use the internet on the uni computer and render on my laptop. all probably a waste of time.
Hawknc wrote:Gotta love our political choices here - you can pick the unionised socially conservative party, or the free-market even more socially conservative party. Oh who to vote for…I don't know, I think I'll just flip a coin and hope it explodes and kills me.

Website

yim
Posts: 1
Joined: Wed Aug 15, 2007 12:17 pm UTC

Postby yim » Wed Aug 15, 2007 12:19 pm UTC

This reminds me of the time where we used crutches to joust one day in my comp sci class...

swampangel
Posts: 15
Joined: Mon Jun 18, 2007 1:14 pm UTC

Postby swampangel » Wed Aug 15, 2007 12:37 pm UTC

We used to have chair jousts with foam swords in the hall outside the engineering society room. We never had any excuse, except maybe that the mind can only take so much DE or Circuit Analysis in one day without snapping.

Okita wrote:Consequently, a great way to get people to think you're doing a lot of work and/or know a lot of computers is to set up some sort of while loop to just constantly display a steady stream of text.

People take a quick look at my computer screen, see tons of streaming text, and think I'm extremely busy, neck deep in hacking code.

What they don't know is that I'm doodling comics/napping/reading a book on my computer formatted to look like documentation while the code just says "I'm a programmer!" with a couple variations in numbers and placement.

cat /dev/urandom :P

User avatar
durnurd
Posts: 13
Joined: Mon Aug 13, 2007 1:30 pm UTC
Contact:

Re: "Compiling" Discussion

Postby durnurd » Wed Aug 15, 2007 12:58 pm UTC

OmenPigeon wrote:
AlphaPyro wrote:With the code I'm currently working with, when I change one file, it takes about 30 seconds to compile and about 7 minutes to link. Painful.


The code I'm currently working on takes about four hours to do a full build. That is, it takes four hours to do a full build once you've spent a week getting rid of all the bugs in the build process. It uses five makefiles, three or four shell scripts and a host of undocumented environment variables to get everything done.

Getting that thing to work taught me more than I ever wanted to know about makefiles. I guess learning is a good thing?


Best thing to ever happen to the company: http://www.visualbuild.com/

As for batch files, try sticking a few calls to sqlcmd "SELECT * FROM sys.objects".
Edward Dassmesser

Ghona
Posts: 246
Joined: Mon May 21, 2007 1:28 am UTC

Re: "Compiling" Discussion

Postby Ghona » Wed Aug 15, 2007 1:15 pm UTC

AlphaPyro wrote:I highly recommend you read this paper: http://www.acm.org/classics/sep95/, it's an awesome paper.


I read an interesting solution to that.

Get some code for a compiler. We'll call it Source A, and it encodes compiler A.

Find two different compilers for it on the net. We'll call them compilers B and C.

Compile Source A with compiler B and compiler C. The result isn't going to be identical bitwise, but it *should* be identical in function.

Compile Source A twice, using both versions of Compiler A. The odds that both the other compilers are untrustworthy, and in exactly the same manner, are very low. The two compiled versions of A should be bitwise identical.

Repeat for as many compilers you want until satisfied.
If you're taking me too seriously, you probably are making a mistake.

User avatar
Sprocket
Seymour
Posts: 5951
Joined: Mon Mar 26, 2007 6:04 pm UTC
Location: impaled on Beck's boney hips.
Contact:

Postby Sprocket » Wed Aug 15, 2007 1:16 pm UTC

Ah, I could lay this one right on top of any day at Athena.
"She’s a free spirit, a wind-rider, she’s at one with nature, and walks with the kodama eidolons”
Image
Image
Image
Image
Image
Zohar wrote: Down with the hipster binary! It's a SPECTRUM!

Ghona
Posts: 246
Joined: Mon May 21, 2007 1:28 am UTC

Postby Ghona » Wed Aug 15, 2007 1:19 pm UTC

po2141 wrote:And what, pray, is a chair-sword?

this is XKCD. It's Chairsword-fighting.
If you're taking me too seriously, you probably are making a mistake.

Elridge
Posts: 9
Joined: Wed Aug 15, 2007 1:01 pm UTC

Postby Elridge » Wed Aug 15, 2007 1:20 pm UTC

po2141 wrote:Aaaah, chemistry, natures code.

Soem people theorise that the entire universe might be a program running on an unimaginable computer, what if we arn't even that, what if we are just compiling?!


Hmm... Hitchhiker's Guide to the Galaxy, anyone?


By the way, one of my last tasks at work was to remotely install Office on every machine on the building...
Some of those machines are very slow, including mine, so I had to do it one at a time: That's five minutes starting up the installation process and telling the user the company's new normatives, and then 30+ minutes waiting.
Last edited by Elridge on Wed Aug 15, 2007 1:24 pm UTC, edited 1 time in total.

User avatar
Lil'Bondy
Posts: 29
Joined: Wed Aug 08, 2007 10:15 am UTC
Location: Melbourne, Australia
Contact:

Postby Lil'Bondy » Wed Aug 15, 2007 1:22 pm UTC

Elridge wrote:
po2141 wrote:Aaaah, chemistry, natures code.

Soem people theorise that the entire universe might be a program running on an unimaginable computer, what if we arn't even that, what if we are just compiling?!


Hmm... Hitchhiker's Guide to the Galaxy, anyone?


Well, lets hope it doesn't go down like that. I don't like highways
So I 'meow' a lot... Get used to it!

User avatar
noonie
Posts: 73
Joined: Sat Jul 14, 2007 6:10 am UTC
Location: the long tidal river

Postby noonie » Wed Aug 15, 2007 1:49 pm UTC

so very very true.
anything i'd like to be remembered for saying can't be said to everyone.

User avatar
LizardKing
Posts: 33
Joined: Wed Aug 08, 2007 2:53 pm UTC
Location: 127.0.0.1

Postby LizardKing » Wed Aug 15, 2007 1:50 pm UTC

Toeofdoom wrote:I have a 3 hour lab for 3D... so...

"I'm rendering my scene!"

Its even better because you can change the settings to take up the right amount of time you want it to. raytracing, global illumination, indirect illumination, a3 size at 300 dpi and 10 randomly placed lights :D


One of my scenes in Lightwave 3D takes about 30 hours to render, even without radiosity =/

Last time I adjusted the program priority so I could spend about 98% CPU time on Lightwave, and the rest on letting me play Diablo 2.

User avatar
noonie
Posts: 73
Joined: Sat Jul 14, 2007 6:10 am UTC
Location: the long tidal river

Postby noonie » Wed Aug 15, 2007 1:51 pm UTC

Lil'Bondy wrote:
Elridge wrote:
po2141 wrote:Aaaah, chemistry, natures code.

Soem people theorise that the entire universe might be a program running on an unimaginable computer, what if we arn't even that, what if we are just compiling?!


Hmm... Hitchhiker's Guide to the Galaxy, anyone?


Well, lets hope it doesn't go down like that. I don't like highways


but i really wouldn't mind having that giant apology from god.
anything i'd like to be remembered for saying can't be said to everyone.

SuprousOxide
Posts: 20
Joined: Mon Jun 11, 2007 4:36 pm UTC

Postby SuprousOxide » Wed Aug 15, 2007 2:14 pm UTC

faendryl wrote:"My sim is running."


When he's done running, make sure he remembers to go to work. If he doesn't go to work two days in a row he'll get fired, and then they'll come and reposess the toaster.

Armentia
Posts: 6
Joined: Fri Dec 22, 2006 6:36 pm UTC

Postby Armentia » Wed Aug 15, 2007 2:15 pm UTC

po2141 wrote:Aaaah, chemistry, natures code.

Soem people theorise that the entire universe might be a program running on an unimaginable computer, what if we arn't even that, what if we are just compiling?!


Actually, I've got a good short read about a topic like that.

I don't know Timmy, being God is a big responsibility

User avatar
Phenriz
I'm daaancin' like a monkey!
Posts: 2450
Joined: Fri Apr 06, 2007 10:33 pm UTC
Contact:

Postby Phenriz » Wed Aug 15, 2007 2:16 pm UTC

this comic is pure justice!
I loveded you piggy, i lovded youuuu!!!

po2141
Posts: 174
Joined: Wed Aug 01, 2007 3:55 pm UTC

Postby po2141 » Wed Aug 15, 2007 2:16 pm UTC

Didn't god dissappear "in a puff of his own logic"? The code deleted the user!!

Leliel
Posts: 43
Joined: Fri Jun 15, 2007 4:31 pm UTC

Postby Leliel » Wed Aug 15, 2007 2:19 pm UTC

faendryl wrote:"My sim is running."

Also, I have two sturdy foam swords in my office. Haven't tried the chair thing, yet.


Same here. (well, the simulation software that is. I seem to have a distressing lack of swords.)

It is, in fact, running as I type this. Usually I just tell people Halp, halp! The [modeling software] has stolen my megahertz!!

User avatar
Foone
Posts: 17
Joined: Tue Nov 21, 2006 11:14 pm UTC
Location: Asheville, NC
Contact:

Postby Foone » Wed Aug 15, 2007 2:21 pm UTC

schrodingersduck wrote:"I'll be able to help as soon as this query finishes."
"How long will that be?"
"3 or 4 hours. It's a big database."


Mmm, I've had fun with that. I'm running a database with 45 million rows (5 indexes, one fulltext!) on a server I bought off ebay for 100$.
I've had queries take over a week before :)

But yeah, this is one of the things I miss from Java now that I'm doing Python all the times. It's great when you're being paid by the hour and your codebase takes 35 minutes for a full compile.

dskippy
Posts: 30
Joined: Wed May 16, 2007 5:48 pm UTC
Location: Somerville, MA
Contact:

Postby dskippy » Wed Aug 15, 2007 2:38 pm UTC

I just hung this up on the wall in development at my work right where we have our sword fights and hockey games. It's just so appropriate.

-mike

User avatar
Invisible Queen
Posts: 254
Joined: Sat Jun 30, 2007 1:30 pm UTC
Location: The present
Contact:

Postby Invisible Queen » Wed Aug 15, 2007 2:52 pm UTC

You stand accused for mass murder, cannibalism, rape and returning videotapes without rewinding them. What do you have to say to your defense?
Compiling!
"Everything a person can imagine is a concievable reality."

User avatar
OmenPigeon
Peddler of Gossamer Lies
Posts: 673
Joined: Mon Sep 25, 2006 6:08 am UTC
Contact:

Re: "Compiling" Discussion

Postby OmenPigeon » Wed Aug 15, 2007 3:06 pm UTC

durnurd wrote:Best thing to ever happen to the company: http://www.visualbuild.com/

As for batch files, try sticking a few calls to sqlcmd "SELECT * FROM sys.objects".


Unfortunately, it isn't our code, we're just doing some work on it. Though after we finish the current round of new things the plan is for some people to remake the build process with [url=scons.org]scons[/url]. It probably won't make it any faster in computer time, but it should make it take less people time.
As long as I am alive and well I will continue to feel strongly about prose style, to love the surface of the earth, and to take pleasure in scraps of useless information.
~ George Orwell

Skiessi
Posts: 1
Joined: Wed Aug 15, 2007 3:03 pm UTC
Location: Rovaniemi
Contact:

Cappuccino

Postby Skiessi » Wed Aug 15, 2007 3:17 pm UTC

No one hasn't mentioned this? o_O https://www.cgabriel.org/software/wiki/Cappuccino It's everything you need.

zenten
Posts: 3799
Joined: Fri Jun 22, 2007 7:42 am UTC
Location: Ottawa, Canada

Re: "Compiling" Discussion

Postby zenten » Wed Aug 15, 2007 3:20 pm UTC

Ghona wrote:
AlphaPyro wrote:I highly recommend you read this paper: http://www.acm.org/classics/sep95/, it's an awesome paper.


I read an interesting solution to that.

Get some code for a compiler. We'll call it Source A, and it encodes compiler A.

Find two different compilers for it on the net. We'll call them compilers B and C.

Compile Source A with compiler B and compiler C. The result isn't going to be identical bitwise, but it *should* be identical in function.

Compile Source A twice, using both versions of Compiler A. The odds that both the other compilers are untrustworthy, and in exactly the same manner, are very low. The two compiled versions of A should be bitwise identical.

Repeat for as many compilers you want until satisfied.


I've got a better one. Find/write a C compiler in LISP. First compile your LISP compiler in C, then compile your C compiler using your new LISP compiler.

What would work even better is if you used a language that didn't exist in 1984.

User avatar
heXiuM
Posts: 53
Joined: Wed Aug 15, 2007 1:02 pm UTC
Location: -lost-

Postby heXiuM » Wed Aug 15, 2007 3:25 pm UTC

I actually use "my code's compiling..." as an excuse for slacking off so I'm really getting a kick out of these replies :lol:
bad, bad sig. No donut for you.

evilninjax
Posts: 5
Joined: Mon Jun 25, 2007 1:47 pm UTC

Postby evilninjax » Wed Aug 15, 2007 3:26 pm UTC

Man, this totally takes me back to when i was working in Boston, writing computer games. Except for us (back in the day), it would be "I'm doing a 'make clean'" or "someone checked in foo.h forcing a full build" followed by "anyone wanna play Magic The Gathering?"

lol

-goro-

User avatar
space_raptor
Posts: 1497
Joined: Fri Nov 17, 2006 5:02 pm UTC
Location: Calgary
Contact:

Postby space_raptor » Wed Aug 15, 2007 4:51 pm UTC

I wish there was somebody at work I could have a swordfight with while standing on office chairs.
The drinking will continue until morale improves.

User avatar
Mr_Bakitus
Posts: 4
Joined: Thu Jun 28, 2007 4:30 am UTC

Postby Mr_Bakitus » Wed Aug 15, 2007 5:15 pm UTC

Yeah, this happened a lot in CS class. Especially when we still used old crappy slow computers that would take forever to complie and run.

User avatar
Okita
Staying Alive
Posts: 3071
Joined: Fri Aug 10, 2007 7:51 pm UTC
Location: Finance land.

Postby Okita » Wed Aug 15, 2007 5:24 pm UTC

Sometimes I tell them that they're getting in the way of the wireless network, blocking my access to the internet and that unless they move, the data gathering/ compiling is going to take even longer.

Works great too if you want to get out of moving furniture and have a wireless router in the vicinity.
"I may or may not be a raptor. There is no way of knowing until entering a box that I happen to be in and then letting me sunder the delicious human flesh from your body in reptile fury."

User avatar
Mister_Penguin
Posts: 210
Joined: Sun Apr 08, 2007 6:56 am UTC
Location: Madison, WI

Postby Mister_Penguin » Wed Aug 15, 2007 5:43 pm UTC

I'm only two semesters into my computer science education, so my longest compilations are around 1min-ish.

The longest bit of free-time I've ever seen in the UW-madison Linux lab occurred one night during finals week. It was about 9:00 pm, and there were only two of us in the lab.We were studying graphs by making a program that processed large graphs of actors, and did basic graph algorithms to play the Kevin Bacon(Or Erdos) game.We had three batches of data to test the program on. One with three actors and four movies, one with several hundred of each, and one with thousands.

For me, the one with thousands took about thirty seconds to build the graph, but for whatever reason, the other guy's program took fifteen minutes to build the graph.

I think the problem was that for whatever reason, some people instituted an edge class, creating several thousand more objects than were necessary.
"Only on XKCD do we try to figure out which tessellating shape for burgers results in the least waste-meat." -aleflamedyud

jdmack
Posts: 29
Joined: Wed Aug 15, 2007 5:42 pm UTC

Postby jdmack » Wed Aug 15, 2007 5:52 pm UTC

Other occupations have similar work-stoppers. I'm a video editor, and often my projects are "rendering."

J. D.

User avatar
Chris the Bridge
Posts: 6
Joined: Tue May 29, 2007 7:56 pm UTC
Location: Amsterdam, Netherlands

Postby Chris the Bridge » Wed Aug 15, 2007 6:02 pm UTC

As ^ but my computer is doing FEM calculations.
non-linear ones are preferred. Having your computer solve over 200000 equations on 10 iterations makes good minesweeper time.

dealmaster00
Posts: 14
Joined: Mon Dec 25, 2006 6:14 pm UTC

Postby dealmaster00 » Wed Aug 15, 2007 6:22 pm UTC

This comic describes some of the people in my hall to a tee. xD

User avatar
Banksy
Posts: 54
Joined: Wed Mar 28, 2007 12:41 pm UTC
Location: The Frozen North
Contact:

Postby Banksy » Wed Aug 15, 2007 8:14 pm UTC

I'm not a programmer, but I was drawn into this comic by the sword-fighting on chairs.
Genius!
But if anyone were ever to discover the meaning of life, all of space and time would collapse in on itself, and in the place that remained a large sign would appear saying:

Level 2.

User avatar
Vaniver
Posts: 9422
Joined: Fri Oct 13, 2006 2:12 am UTC

Postby Vaniver » Wed Aug 15, 2007 8:23 pm UTC

hatguy wrote:
faendryl wrote:"My sim is running."


Ah yes. Compiling and running a sim can free up an entire week for chair-swordfighting.
At the DoD lab where I work, they have supercomputers for their sims, so they end up only taking a few minutes to produce gigabytes of data.

But, all that means is "My sim is running" has been replaced with "I'm waiting while my sim is in the queue." :P
I mostly post over at LessWrong now.

Avatar from My Little Pony: Friendship is Magic, owned by Hasbro.

User avatar
Xanthir
My HERO!!!
Posts: 5426
Joined: Tue Feb 20, 2007 12:49 am UTC
Location: The Googleplex
Contact:

Re: "Compiling" Discussion

Postby Xanthir » Wed Aug 15, 2007 8:49 pm UTC

zenten wrote:
Ghona wrote:
AlphaPyro wrote:I highly recommend you read this paper: http://www.acm.org/classics/sep95/, it's an awesome paper.


I read an interesting solution to that.

Get some code for a compiler. We'll call it Source A, and it encodes compiler A.

Find two different compilers for it on the net. We'll call them compilers B and C.

Compile Source A with compiler B and compiler C. The result isn't going to be identical bitwise, but it *should* be identical in function.

Compile Source A twice, using both versions of Compiler A. The odds that both the other compilers are untrustworthy, and in exactly the same manner, are very low. The two compiled versions of A should be bitwise identical.

Repeat for as many compilers you want until satisfied.


I've got a better one. Find/write a C compiler in LISP. First compile your LISP compiler in C, then compile your C compiler using your new LISP compiler.

What would work even better is if you used a language that didn't exist in 1984.

Nod. The hack relies on the compromised compiler being able to recognize that it's compiling a compiler. If the code produces a sufficiently different structure, it won't know what it's compiling, and can't insert itself into the code.

So, using a language that gives out an entirely different sort of parse structure (as I'm sure Lisp would do) will work just fine. For a win, try Haskell. ^_^

User avatar
Sprocket
Seymour
Posts: 5951
Joined: Mon Mar 26, 2007 6:04 pm UTC
Location: impaled on Beck's boney hips.
Contact:

Postby Sprocket » Wed Aug 15, 2007 8:52 pm UTC

Chris the Bridge wrote:As ^ but my computer is doing FEM calculations.
non-linear ones are preferred. Having your computer solve over 200000 equations on 10 iterations makes good minesweeper time.
Woah...back for your 4th post I see.
"She’s a free spirit, a wind-rider, she’s at one with nature, and walks with the kodama eidolons”
Image
Image
Image
Image
Image
Zohar wrote: Down with the hipster binary! It's a SPECTRUM!

User avatar
noouch
Posts: 132
Joined: Mon Jul 16, 2007 11:32 am UTC
Contact:

Postby noouch » Thu Aug 16, 2007 1:47 am UTC

For me the long render times give me an excuse to slack off. Monte-carlo raytracing algorithms do quite a good job at it.

oblivimous
Posts: 139
Joined: Tue Nov 07, 2006 6:36 pm UTC
Location: Fremont, CA

Postby oblivimous » Thu Aug 16, 2007 2:14 am UTC

Please enlighten the noncoders: what exactly is compiling?


Return to “Individual XKCD Comic Threads”

Who is online

Users browsing this forum: No registered users and 92 guests