code logs -> 2009 -> Mon, 26 Oct 2009< code.20091025.log - code.20091027.log >
--- Log opened Mon Oct 26 00:00:07 2009
01:00
< Alek>
as in network file sharing.
01:01 McMartin [mcmartin@Nightstar-cd8a4fac.pltn13.sbcglobal.net] has quit [[NS] Quit: kernel upgrade]
01:04 McMartin [mcmartin@Nightstar-cd8a4fac.pltn13.sbcglobal.net] has joined #code
01:05 mode/#code [+o McMartin] by Reivles
01:15 * gnolam declares victory over the sun!
01:19
< gnolam>
(In other words, I now have a sun that travels realistically over the skybox according to the time of day, day of year and latitude and longitude)
01:22
< gnolam>
Now I just have to add some blooming and lens flares.
01:32
<@Vornicus>
Pfff.
01:32
<@Vornicus>
How about shadows?
01:49
< gnolam>
No shadows. Just Phong lighting.
01:52 Syloqs_AFH [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code
01:52
< gnolam>
... also, it seems I hadn't fully conquered the Evil Daystar after all. After correcting the day of year factor, the altitude calculation is off. Way off. Either that, or the Arctic Circle has moved 8 degrees South.
01:53 Syloqs_AFH is now known as Syloqs-AFH
01:56
<@Vornicus>
I gotta ask
01:56
<@Vornicus>
Why do you care?
01:57
< gnolam>
Because it's generally advisable that the sun /actually sets/ in a time-of-day effects system. :)
01:59
<@Vornicus>
Well yes, but...
01:59
<@Vornicus>
I mean, why do you care what direction the sun is coming from?
01:59
< gnolam>
What do you mean?
02:00
<@Vornicus>
Well first, why are you implementing time of day anyway/
02:04 Dae [Dae@Nightstar-6bffd408.dial.as9105.com] has joined #code
02:05
<@Vornicus>
And then, why do you care that it's accurately placed as far as time/day/lat/long go?
02:05
< gnolam>
Several reasons. 1) It's cool. The only reason you need, really. 2) The project is an outdoor environment (specifically: ocean environment) renderer, and getting the sun right makes an incredible difference in realism. 3) The specification says so. ^-^
02:05
<@Vornicus>
heh
03:00 Attilla [The.Attilla@FBC920.A5C359.15BD32.425F3F] has quit [[NS] Quit: ]
03:32 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has quit [[NS] Quit: Z?]
--- Log closed Mon Oct 26 03:49:56 2009
--- Log opened Mon Oct 26 03:50:01 2009
03:50 TheWatcher[zZzZ] [chris@Nightstar-b4529b0c.zen.co.uk] has joined #code
03:50 Irssi: #code: Total of 21 nicks [6 ops, 0 halfops, 0 voices, 15 normal]
03:50 mode/#code [+o TheWatcher[zZzZ]] by Reivles
03:50 Irssi: Join to #code was synced in 51 secs
04:25 * Vornicus wishes he could use more modern Javascript; iterators would be nice right about now.
04:26
<@Vornicus>
That and I'm 300 lines deep in writing a B-tree and haven't even gotten to deletion.
05:03 Syloqs-AFH [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Connection reset by peer]
06:11 AnnoDomini [farkoff@Nightstar-d12b5489.adsl.tpnet.pl] has joined #code
06:11 mode/#code [+o AnnoDomini] by Reivles
06:16 Derakon is now known as Derakon[AFK]
06:18 MyCatVerbs [mycatverbs@Nightstar-492e7e67.co.uk] has quit [Ping timeout: 121 seconds]
06:23 * AnnoDomini lawls upon xkcd.
06:28
<@AnnoDomini>
The redesign, specifically.
06:54 Rhamphoryncus [rhamph@Nightstar-a62bd960.abhsia.telus.net] has joined #code
07:11
< jerith>
That *hurts*!
07:11
< jerith>
Looking upon it is physically painful. :-(
07:12
< Namegduf>
One of the opers should global it, telling people to go look at the new redesign.
07:14
<@Vornicus>
No.
07:14
< Namegduf>
Come ooooooooon.
07:14
< Namegduf>
It'd be funny.
07:14
< Namegduf>
:P
07:22
<@Kazriko>
Heh.
07:26 You're now known as TheWatcher
07:58 Rhamphoryncus [rhamph@Nightstar-a62bd960.abhsia.telus.net] has quit [Client exited]
08:05 You're now known as TheWatcher[afk]
08:15 Vornicus is now known as Vornicus-Latens
08:40 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has joined #code
09:57 You're now known as TheWatcher[wr0k]
10:14 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has joined #code
10:16 * gnolam laughs out loud at XKCD.
10:18
<@TheWatcher[wr0k]>
...
10:18
<@TheWatcher[wr0k]>
mein eyemeats
10:26
< dmlandrum>
Geocities: The End of an Era
10:27
< Reiver>
An era of completely awful webpages.
10:29
< gnolam>
It's missing the spinning skulls, torches and blood dripping horizontal bars though.
10:30
< dmlandrum>
All web pages in the nineties were awful. The Geocities ones just pushed that to the limit.
10:34
< gnolam>
And after Geocities died, Myspace took up the torch of awfulness.
10:47
< Reiver>
Not all 90s pages were awful.
10:47
< Reiver>
Most, certainly
10:47
< Reiver>
But you did get the beginning inklings of 'professional' out there still.
10:48
< dmlandrum>
Well, I'm speaking more of the limitations of the tech of the time.
11:02 * gnolam prods opengl.org.
11:10 AnnoDomini [farkoff@Nightstar-d12b5489.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds]
11:16 AnnoDomini [farkoff@Nightstar-7dc80cf4.adsl.tpnet.pl] has joined #code
11:16 mode/#code [+o AnnoDomini] by Reivles
11:18 MyCatVerbs [mycatverbs@Nightstar-492e7e67.co.uk] has joined #code
11:18 mode/#code [+o MyCatVerbs] by Reivles
11:44 Attilla [The.Attilla@FBC920.A5C359.15BD32.425F3F] has joined #code
11:44 mode/#code [+o Attilla] by Reivles
14:01
< gnolam>
Ah. Back up again.
14:02
< SmithKurosaki>
:)
14:42 You're now known as TheWatcher[afk]
15:03 Syloqs_AFH [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code
15:05 Syloqs_AFH is now known as Syloqs-AFH
15:36 ErikMesoy|sleep is now known as ErikMesoy
16:12 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has quit [Connection closed]
17:11
< GeekSoldier>
Man, xkcd did great with this one.
17:12
<@AnnoDomini>
http://xkcd.isitfunnytoday.com/
17:16
<@MyCatVerbs>
Ooh, that's a neat site.
17:57 Derakon[work] [Derakon@Nightstar-d44d635e.ucsf.edu] has joined #code
17:57
< Derakon[work]>
Today I discovered a memory leak on one of the other microscope machines. Maybe that is causing the crashes...
17:58
< Derakon[work]>
So now I just get to figure out why a (apparently pure-Python this time!) program is leaking memory.
18:00
<@McMartin>
Circular references.
18:00
<@McMartin>
Python's pure reference count until it's too late.
18:01 * Derakon[work] nods.
18:01
< Derakon[work]>
I have the added bonus here that the buggy program is one I've not yet looked at.
18:01
< Derakon[work]>
So I get to figure out how it works while I figure out why it's not working.
18:01
<@McMartin>
Oh, well, hell
18:01
<@McMartin>
Unsnapped global arrays. =P
18:02
< Derakon[work]>
Er?
18:02
< Derakon[work]>
"Unsnapped"?
18:03
<@McMartin>
"global array isn't snapping its connections to objects that are supposed to be dead; thus, it never truly becomes garbage."
18:03
<@McMartin>
Either by assigning None to its elements or to the entire array
18:03
< Derakon[work]>
Ah.
18:23
< Derakon[work]>
...ergh, Sebastian, why do you do this? ;.;
18:23 * Derakon[work] discovers that much of the work is done in a compiled C library.
18:23
< ErikMesoy>
Sebastian? A cow-orker?
18:23
< Derakon[work]>
Implementor of the project that I'm working on; long-since fled to Germany.
18:25
< Derakon[work]>
Has a tendency to use opaque variable names, heavily customized build environments, zero comments, and massively obfuscated interdependencies.
18:25
< gnolam>
And wonderfully descriptive filenames as well, IIRC.
18:26
< Derakon[work]>
Ah, yes. sebC.py, sebH.py, sebTests.py, etc.
18:30
< Derakon[work]>
% grep -ri seb *|wc -l
18:30
< Derakon[work]>
7949
18:34
< gnolam>
In other words, the code is suffering from sebsis.
18:34
< Derakon[work]>
...
18:34
< Derakon[work]>
Yes.
18:35
< Derakon[work]>
Another thing Sebastian does is fail to understand proper use of whitespace. To wit:
18:35
< Derakon[work]>
void Reply(int answer)
18:35
< Derakon[work]>
{ write_mailbox(answer, MONITOR_MBOX); }
18:58 Derakon[work] [Derakon@Nightstar-d44d635e.ucsf.edu] has quit [Ping timeout: 121 seconds]
19:16 You're now known as TheWatcher
19:25
<@AnnoDomini>
I like how Google Translate is shaping up. It automatically recognizes language, and gives translations in English for some words it doesn't know in the target language.
19:30
< gnolam>
And translates "Jag är svensk", "I am Swedish" into "I am American". ^-^
19:30
< ErikMesoy>
...
19:31
<@AnnoDomini>
Not, it doesn't.
19:31
<@AnnoDomini>
-t
19:36
< gnolam>
It did.
19:41 * gnolam flails at C++'s lack of native threading.
19:54 AnnoDomini [farkoff@Nightstar-7dc80cf4.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds]
19:58 AnnoDomini [farkoff@Nightstar-7dc80cf4.adsl.tpnet.pl] has joined #code
19:58 mode/#code [+o AnnoDomini] by Reivles
20:02 * gnolam also stabs SDL's documentation.
20:22 AnnoDomini [farkoff@Nightstar-7dc80cf4.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds]
20:24 AnnoDomini [farkoff@Nightstar-7dc80cf4.adsl.tpnet.pl] has joined #code
20:24 mode/#code [+o AnnoDomini] by Reivles
20:32 Derakon [Derakon@Nightstar-d44d635e.ucsf.edu] has joined #code
20:32 mode/#code [+o Derakon] by Reivles
20:33 Derakon is now known as Derakon[work]
20:36
<@Derakon[work]>
Whelp, I've tracked down the memory leak to InitProfile(), a 122-line C++ function.
21:02
<@Vornicus-Latens>
Gah.
21:04
<@Derakon[work]>
if((C67InternalEvent=CreateEvent(NULL, FALSE, FALSE, NULL)) == NULL)
21:09
<@Vornicus-Latens>
Fuuuuck
21:10
<@Derakon[work]>
/ don't try to allocate infinate memory
21:10
<@Derakon[work]>
// don't try to allocate infinate memory
21:10
<@Derakon[work]>
Rather.
21:12
<@AnnoDomini>
*infinite
21:12
<@Derakon[work]>
I've stripped it down to 72 lines by removing commented-out code and a rather large block surrounded by "if(0)"
21:12
<@Derakon[work]>
Anno: yes, I'm aware of the typo. It's part of the reason I pasted it.
21:16
< ErikMesoy>
"if(0)" ??
21:16
<@Derakon[work]>
if (0) { stuff you don't want executed but still want around for some reason}
21:16
<@Derakon[work]>
Generally done via #if 0, since that way the code doesn't make it into your compiler.
21:16
< ErikMesoy>
So it's like obfuscated commenting out?
21:17
<@Derakon[work]>
Kinda, yeah.
21:17
<@McMartin>
It's like commenting out that lets you have comments in what you're commenting out.
21:17
<@McMartin>
Since you can't use /* */
21:17
<@McMartin>
Since those don't nest
21:17
<@Vornicus-Latens>
It works better than /* */ because you can nest it
21:17
<@Vornicus-Latens>
But it's also worse because it looks horrible.
21:17
<@Derakon[work]>
Generally if I want to comment out blocks, I do so with //-style comments, to avoid that problem.
21:18
< ErikMesoy>
YO DAWG I HEAR YOU LIKE COMMENTS?
21:18
<@McMartin>
That tends to screw up my formatting
21:18 * Derakon[work] has Erik taken out and shot.
21:18 * jerith <3 M-;
21:18
<@Derakon[work]>
:.,'as/^/#
21:19
<@Derakon[work]>
^ vim command to comment out the block going from the cursor to the "a" marker you set earlier.
21:20
<@AnnoDomini>
To me it looks like a newt, floor, floor, floor, ant, spider, wand, trap, wand, sink.
21:20 Vornicus-Latens is now known as Vornicus
21:21
<@Derakon[work]>
Clearly you're playing the wrong kind of roguelike~
21:21 * ErikMesoy haunts Derakon.
21:21 * Derakon[work] can't detect ghosts, therefore does not care.
21:21
<@AnnoDomini>
This interpretation would be Dwarfhack or something.
21:28
<@Derakon[work]>
Just a quick sanity check: this is the right way to call free, right?
21:28
<@Derakon[work]>
if (foo != NULL) {
21:28
<@Derakon[work]>
free(foo);
21:28
<@Derakon[work]>
foo = NULL;
21:28
<@Derakon[work]>
}
21:29
<@AnnoDomini>
If the pointer doesn't point to nowhere, free the memory pointed by the pointer, and make the pointer point to nowhere. Sounds good to me.
22:49 ErikMesoy is now known as ErikMesoy|sleep
22:56 AnnoDomini [farkoff@Nightstar-7dc80cf4.adsl.tpnet.pl] has quit [[NS] Quit: There is no Dana, only Zuul.]
22:58
<@ToxicFrog>
Derakon[work]: calling free() on NULL is in fact safe.
22:58
<@Derakon[work]>
Ah hah.
23:01
<@McMartin>
The Thing That Kills you is calling delete on something you allocated with new[], or vice versa.
23:06
<@Vornicus>
double frees are also bad but you'll get yelled at by at least the debug build if you do that.
23:17
< gnolam>
Don't count on that.
23:18
< gnolam>
Double deallocation can be a real bitch to track down.
23:25 Derakon[work] [Derakon@Nightstar-d44d635e.ucsf.edu] has quit [[NS] Quit: Leaving]
23:30
<@Vornicus>
Well, it may give you a stack trace. But figuring out why it's happening can be a real bitch.
23:30
<@Vornicus>
Since most of the time you're ending up freeing the same thing twice /in the same place/
23:31
<@Vornicus>
So just removing the free gives you a memory leak.
23:49 You're now known as TheWatcher[T-2]
23:53 You're now known as TheWatcher[zZzZ]
--- Log closed Tue Oct 27 00:00:22 2009
code logs -> 2009 -> Mon, 26 Oct 2009< code.20091025.log - code.20091027.log >