--- Log opened Wed Jul 16 00:00:25 2008 |
00:05 | | Attilla [~The.Attil@92.17.53.ns-3189] has joined #code |
00:05 | | mode/#code [+o Attilla] by ChanServ |
00:11 | <@gnolam> | Argh. Polygons with holes complicate things. |
00:11 | <@gnolam> | No, wait, they don't. I can just fake it. |
00:16 | < Shoukanjuu> | Why do they complicate things, exactly? |
00:16 | < Shoukanjuu> | Is it an area thing? >_> |
00:24 | <@gnolam> | No wait, they /do/ complicate things. Arrrgh. |
00:24 | <@gnolam> | Shoukanjuu: they get trickier to triangulate properly. |
00:27 | < Shoukanjuu> | I see. |
00:27 | < Shoukanjuu> | How does it get trickier? o: |
00:28 | < McMartin> | Not a convex hull |
00:28 | < McMartin> | Harder to turn into a set of convex hulls than a non-holed concave poly. |
00:29 | < Shoukanjuu> | Aha. |
00:38 | | Attilla [~The.Attil@92.17.53.ns-3189] has quit [Ping Timeout] |
00:39 | | Attilla [~The.Attil@92.17.53.ns-3189] has joined #code |
00:39 | | mode/#code [+o Attilla] by ChanServ |
00:42 | | Attilla [~The.Attil@92.17.53.ns-3189] has quit [Ping Timeout] |
00:50 | | Attilla [~The.Attil@92.0.125.ns-26634] has joined #code |
00:50 | | mode/#code [+o Attilla] by ChanServ |
00:55 | | Attilla [~The.Attil@92.0.125.ns-26634] has quit [Ping Timeout] |
01:08 | | Attilla [~The.Attil@92.9.153.ns-3442] has joined #code |
01:08 | | mode/#code [+o Attilla] by ChanServ |
01:53 | < McMartin> | Hm, whoops |
01:53 | | * McMartin finds in the midst of a load of spam a report of problems with his Inform Unicode Interrogation routines. |
02:14 | | gnolam [lenin@Nightstar-2037.A163.cust.bahnhof.se] has quit [Quit: Z?] |
02:29 | | Attilla_ [~The.Attil@92.9.153.ns-3442] has joined #code |
02:29 | | Attilla [~The.Attil@92.9.153.ns-3442] has quit [Ping Timeout] |
05:36 | | Thaqui [~Thaqui@Nightstar-25920.jetstream.xtra.co.nz] has joined #code |
05:36 | | mode/#code [+o Thaqui] by ChanServ |
06:03 | < Doctor_Nick> | what are the advantages of heap allocation over stack allocation |
06:04 | < McMartin> | Objects so allocated can outlive the procedure that allocated them |
06:04 | < McMartin> | Among other things, you cannot return a stack-allocated value. |
06:04 | < Doctor_Nick> | ? |
06:05 | < Doctor_Nick> | that's all i've been doing so far |
06:05 | < Doctor_Nick> | returning stack allocated values, i mean |
06:06 | <@Vornicus> | Or, more precisely: you can't return a value that's not "in the return value slot" in a stack. |
06:06 | < Doctor_Nick> | yeah |
06:06 | < Doctor_Nick> | thats what your lecture said ;) |
06:07 | <@Vornicus> | So if you build an object and want things other than the current function to see it, you need to put it on the heap. |
06:07 | <@Vornicus> | You can't give anybody else a pointer to a location o nteh stack. |
06:07 | < Doctor_Nick> | right, I know that |
06:08 | < Doctor_Nick> | im just trying to think of situations where heap allocation would be more advantageous than stack allocation |
06:08 | < Doctor_Nick> | all I can think of is that stack size is limited |
06:08 | < McMartin> | Well, um |
06:08 | < McMartin> | Constructors of any kind |
06:08 | <@Vornicus> | On the other hand stuff on the stack you don't have to clean up. |
06:08 | < Doctor_Nick> | right |
06:08 | < McMartin> | "Here's a file, please give me a big complex data structure that represents the contents of the file" |
06:08 | < Doctor_Nick> | McMartin: so constructors are always heap allocated? |
06:09 | < Doctor_Nick> | er |
06:09 | < Doctor_Nick> | they always allocate on the heap? |
06:09 | < McMartin> | Depends on the language. |
06:09 | < Doctor_Nick> | lets say the gnu implementation of C++ |
06:09 | <@Vornicus> | Any time you want to give more data than is reasonable to return, any time you want to have data that you want to keep around without explicitly throwing it around... |
06:09 | < McMartin> | C++ pretends not to, but then secretly calls copiers. |
06:10 | < Doctor_Nick> | what I've read is that stack allocated objects have a certain amount of pre-allocated space |
06:10 | < Doctor_Nick> | and if it takes up more space than that, it gets put on the heap |
06:10 | < McMartin> | ... no. |
06:10 | < Doctor_Nick> | but i would think that would lead to memory leaks |
06:10 | < Doctor_Nick> | ok |
06:10 | < McMartin> | Also no. |
06:10 | < McMartin> | Because there's nothing stopping you from automatically cleaning up the heap value when the stack frame is exited |
06:10 | < McMartin> | In fact, auto_ptr does exactly this |
06:10 | < Doctor_Nick> | ahh |
06:13 | < Doctor_Nick> | can I get ops to send a URL? |
06:14 | < McMartin> | Anyway, in C++ you can "return" stack-allocated objects. |
06:15 | < McMartin> | What actually happens is that the copy constructor or operator=() is called on a similarly-sized object in the caller's stack frame. |
06:16 | | mode/#code [+oooooo Attilla_ Doctor_Nick EvilDarkLord McMartin MyCatVerbs Shoukanjuu] by Vornicus |
06:16 | | mode/#code [+vo DiceBot Syloqs-AFH] by Vornicus |
06:22 | <@Doctor_Nick> | McMartin: but I've done that on objects where I haven't overloaded the copy constructor or the = operator |
06:28 | <@Vornicus> | That's because there's already one built for you. |
06:28 | <@Doctor_Nick> | they dont do deep copy by default, though, right? |
06:29 | <@Vornicus> | You don't need to build a copy constructor or an = operator for simple objects because the copy constructor that already exists copies the data associated with the object. |
06:29 | <@Vornicus> | It's a shallow copy, yes, it doesn't know anything about pointers. |
06:29 | <@Doctor_Nick> | well, i've avoided using pointers up to this point |
06:31 | <@Doctor_Nick> | Now I'm introducing them and i have to think of a good reason for why we have to do heap allocation |
06:31 | <@Doctor_Nick> | (I am teaching a class in C++ programming) |
06:35 | <@McMartin> | "Here's a file name; return a big compound object" |
06:36 | <@Doctor_Nick> | or linked lists |
06:36 | <@Doctor_Nick> | i have to teach them data structures anyway |
06:41 | <@McMartin> | Of course, the correct way to do linked lists in C++ is with vector<>, but. |
06:42 | <@Doctor_Nick> | right |
06:42 | <@Doctor_Nick> | but its in the syllabus |
06:46 | <@McMartin> | Yeah |
06:52 | | Attilla_ [~The.Attil@92.9.153.ns-3442] has quit [Ping Timeout] |
07:16 | | Shoukanjuu [~Shoukanju@Nightstar-20375.dhcp.embarqhsd.net] has quit [Quit: Shoukanjuu] |
07:20 | | Shoukanjuu [~Shoukanju@Nightstar-20375.dhcp.embarqhsd.net] has joined #code |
07:27 | | cybergirl [~cybergirl@Nightstar-16477.w90-31.abo.wanadoo.fr] has joined #code |
07:29 | | cybergirl [~cybergirl@Nightstar-16477.w90-31.abo.wanadoo.fr] has quit [Quit: ] |
09:13 | | You're now known as TheWatcher |
10:12 | | Attilla [~The.Attil@92.9.153.ns-3442] has joined #code |
10:12 | | mode/#code [+o Attilla] by ChanServ |
11:27 | | Thaqui [~Thaqui@Nightstar-25920.jetstream.xtra.co.nz] has left #code [Leaving] |
12:00 | | gnolam [lenin@Nightstar-2037.A163.cust.bahnhof.se] has joined #Code |
12:01 | | mode/#code [+o gnolam] by ChanServ |
13:28 | <@gnolam> | FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT my ass! |
13:29 | | * Vornicus submits a patch to Python. |
13:31 | <@gnolam> | Ah. It needed complete glTexParameters as well. |
13:36 | <@gnolam> | And now for the stencil buffer... |
13:40 | <@gnolam> | ... GL_FRAMEBUFFER_UNSUPPORTED_EXT. |
13:40 | | * gnolam sighs. |
13:44 | <@gnolam> | Ah, you need EXT_packed_depth_stencil. |
13:44 | <@gnolam> | Hmm. |
13:44 | <@gnolam> | Sounds like too much work - I can just abuse the depth buffer instead. |
13:56 | | You're now known as TheWatcher[afk] |
14:03 | | * gnolam dances a happy dance. |
14:43 | | MyCatVerbs [~mycatverb@Nightstar-13709.lurkingfox.co.uk] has quit [Ping Timeout] |
16:00 | <@jerith> | This is a rant. |
16:00 | <@jerith> | Ruby is fucking broken. |
16:00 | <@jerith> | At this point, I am *seriously* reconsidering employment opportunities so that I don't have to debug it. |
16:01 | | * jerith takes a deep breath. |
16:01 | <@jerith> | Chalain: You may want to look at this. (Ignore the ranty bits. I don't want an argument, I want to let of steam.) |
16:01 | <@jerith> | >> (1 + 2 |
16:01 | <@jerith> | >> + 4) |
16:01 | <@jerith> | => 4 |
16:01 | <@jerith> | >> (1 + 2 + |
16:01 | <@jerith> | ?> 4) |
16:01 | <@jerith> | => 7 |
16:02 | <@jerith> | >> 1 + 2 + |
16:02 | <@jerith> | ?> 4 |
16:02 | <@jerith> | => 7 |
16:02 | <@jerith> | >> 1 + 2 \ |
16:02 | <@jerith> | ?> + 4 |
16:02 | <@jerith> | => 7 |
16:02 | <@jerith> | In what universe is that sane behaviour? |
16:05 | <@Vornicus> | what the shit? |
16:06 | <@jerith> | I *think* it's seeing a complete expression and then throwing it away. What it sees on the next line is also a complete expression, so it's happy. |
16:06 | <@jerith> | >> (puts |
16:06 | <@jerith> | >> 4) |
16:06 | <@jerith> | => 4 |
16:06 | <@jerith> | (With an empty line in between.) |
16:06 | <@jerith> | >> (puts 3 |
16:06 | <@jerith> | >> 4) |
16:06 | <@jerith> | 3 |
16:06 | <@jerith> | => 4 |
16:08 | <@Vornicus> | But... the parens? |
16:08 | <@Vornicus> | what the crap drugs is it on? |
16:09 | <@ToxicFrog> | Yeah, howe is "+ 4)" a complete expression? |
16:09 | <@jerith> | Do you want to try it to see if it's not just my machine? |
16:09 | <@jerith> | Nonono, '+ 4' is a complete expression. |
16:10 | <@jerith> | The parens just group it. |
16:10 | <@jerith> | Or something. |
16:10 | <@ToxicFrog> | But they aren't matched parens |
16:11 | <@ToxicFrog> | Or is the implication here that it's parsing as ((1+2) (+4))? |
16:11 | <@jerith> | It is. And then it's throwing away the result of the first expression. |
16:12 | <@ToxicFrog> | What's the meaning of +4 in ruby? Same as in haskell? |
16:12 | <@jerith> | If the first expression is incomplete, it continues on the next line as expected. |
16:12 | <@jerith> | >> +4 |
16:12 | <@jerith> | => 4 |
16:12 | <@jerith> | I think it allows + as a sign operator. |
16:12 | <@ToxicFrog> | Aah. |
16:12 | <@jerith> | Essentially a nop. |
16:12 | <@ToxicFrog> | How do you get that interactive mode? |
16:13 | <@jerith> | >> (1 + 2 |
16:13 | <@jerith> | >> -4) |
16:13 | <@jerith> | => -4 |
16:13 | | * ToxicFrog dies laughing at the man page for ruby(1) |
16:13 | <@jerith> | irb |
16:13 | <@ToxicFrog> | Simple syntax |
16:13 | <@ToxicFrog> | Ruby has a simple syntax influenced slightly from Eiffel. |
16:13 | <@jerith> | It's a separate thing. |
16:13 | <@Vornicus> | ...okay that's a laugh riot. |
16:13 | <@ToxicFrog> | Which is not installed. Aah well, I don't care enough. |
16:14 | <@jerith> | Try it in a script. It works there also. |
16:14 | <@Vornicus> | ....what the shit |
16:14 | <@Vornicus> | Reproduced. |
16:44 | <@jerith> | http://jerith.livejournal.com/44750.html |
17:33 | | You're now known as TheWatcher |
18:24 | | * ToxicFrog eyes this code |
18:24 | <@ToxicFrog> | The changes made to the SMP kernel are also present in the UP kernel. |
18:24 | <@ToxicFrog> | ...but I don't remember sideporting them. |
18:32 | <@Vornicus> | Blame someone else. |
18:33 | <@ToxicFrog> | Well, it's not blame, they should be present in both kernels |
18:33 | <@ToxicFrog> | The thing is, no-one else is working on this code. |
18:33 | <@ToxicFrog> | I don't remember sideporting, but unless someone else is sneaking into my system and doing it without my knowledge, I must have done so... |
18:38 | <@Vornicus> | Elves. |
18:38 | <@Vornicus> | Software elves. |
18:38 | <@gnolam> | Gnomes. |
18:41 | <@Vornicus> | Them too. |
19:24 | | * jerith has exorcised his fury at the gym. |
19:26 | | * gnolam exorcises jerith's furry. |
19:26 | <@jerith> | I lack a furry. |
19:41 | <@gnolam> | Now you do. |
19:43 | | Attilla [~The.Attil@92.9.153.ns-3442] has quit [Ping Timeout] |
19:48 | | Attilla [~The.Attil@92.9.153.ns-3442] has joined #code |
19:48 | | mode/#code [+o Attilla] by ChanServ |
20:31 | | AnnoDomini [AnnoDomini@Nightstar-27974.neoplus.adsl.tpnet.pl] has joined #Code |
20:31 | | mode/#code [+o AnnoDomini] by ChanServ |
20:41 | <@gnolam> | Arghl. Work, damn you! |
20:43 | <@jerith> | No. I have about eleven hours before I need to work again. |
20:44 | <@AnnoDomini> | gnolam: I need an opinion. I have three choices I can see at present to get to Sweden. Ferry to Ystad. Ferry to Kariskrona. And ferry to Nynashamn. Which would be best, in terms of getting to your place as cheaply and efficiently as possible? |
21:08 | <@gnolam> | Ooo-kay. The depth buffer has stopped working altogether. That's... weird. |
21:08 | <@gnolam> | AnnoDomini: I have no idea. |
21:12 | <@AnnoDomini> | I'm going to be talking with my GM here whether he's going to have a problem with me going et al. |
21:16 | <@gnolam> | Your GM? Does the decision involve D20s? :) |
21:18 | <@AnnoDomini> | Opposed Charisma check. I get a circumstance bonus since he owes me money. |
21:21 | <@gnolam> | Hah. |
21:22 | <@AnnoDomini> | Seriously though, he doesn't like d20. He likes TriStat. |
21:26 | | * gnolam WTFs. |
21:26 | <@gnolam> | There's something rotten in the state machine of OpenGL. |
21:36 | <@gnolam> | glGetError gladly reports GL_NO_ERROR. AFAICT, I'm doing everything by the book. Yet glClear refuses to clear the depth buffer, and glDepthFunc now appears to have only one possible comparison function: GL_STOCHASTIC. |
21:37 | <@gnolam> | Bah! |
21:37 | | * gnolam gives up on OpenGL for the day and wanders off to play TF2 instead. |
21:50 | | Vornicus is now known as Vornicus-Latens |
22:24 | | You're now known as TheWatcher[T-2] |
22:26 | | You're now known as TheWatcher[zZzZ] |
23:47 | <@McMartin> | gnolam: That may be your driver being insane |
23:47 | <@McMartin> | God knows we had a hell of a time just simulating *sprites* in OpenGL reliably |
--- Log closed Thu Jul 17 00:00:36 2008 |