--- Log opened Wed Apr 06 00:00:18 2011 |
00:03 | | Vornicus-Latens is now known as Vornicus |
00:43 | | Reivles [orthia@Nightstar-d6c757d1.lightwire.co.nz] has joined #code |
00:48 | | Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has quit [Ping timeout: 121 seconds] |
00:59 | | RichardBarrell [mycatverbs@Nightstar-f68eb197.cable.virginmedia.com] has quit [Client closed the connection] |
01:17 | | You're now known as TheWatcher[T-2] |
01:21 | | Attilla [Some.Dude@Nightstar-92c9199f.cable.virginmedia.com] has quit [Ping timeout: 121 seconds] |
01:22 | | You're now known as TheWatcher[zZzZ] |
01:38 | | Derakon[AFK] is now known as Derakon |
01:50 | | Derakon is now known as Derakon[cleansing] |
01:59 | | Kindamoody is now known as Kindamoody[zZz] |
02:08 | | Derakon[cleansing] is now known as Derakon |
--- Log closed Wed Apr 06 02:36:07 2011 |
--- Log opened Wed Apr 06 02:36:19 2011 |
02:36 | | TheWatcher[zZzZ] [chris@Nightstar-b4529b0c.zen.co.uk] has joined #code |
02:36 | | Irssi: #code: Total of 24 nicks [4 ops, 0 halfops, 0 voices, 20 normal] |
02:37 | | Irssi: Join to #code was synced in 49 secs |
02:42 | | Reivles [orthia@Nightstar-d6c757d1.lightwire.co.nz] has quit [Ping timeout: 121 seconds] |
02:43 | | Reivles [orthia@B83485.152663.45B6A7.5BA13C] has joined #code |
03:11 | < ToxicFrog> | This is...what |
03:11 | < ToxicFrog> | QUESTION: how many 1Kx8 RAM chips are needed to provide a total capacity of 4096 bytes? |
03:11 | < ToxicFrog> | Correct answer: 4 |
03:11 | < ToxicFrog> | Answer provided: 4681 |
03:12 | < Tamber> | -blinks- |
03:12 | < Tamber> | Lots and lots of redundancy? |
03:13 | < ToxicFrog> | He appears to have missed the 'K' in '1Kx8' and then gotten another 585 from somewhere |
--- Log closed Wed Apr 06 03:21:04 2011 |
--- Log opened Wed Apr 06 03:32:42 2011 |
03:32 | | TheWatcher[zZzZ] [chris@Nightstar-b4529b0c.zen.co.uk] has joined #code |
03:32 | | Irssi: #code: Total of 25 nicks [4 ops, 0 halfops, 0 voices, 21 normal] |
03:33 | | Irssi: Join to #code was synced in 48 secs |
03:35 | | Syloqs-AFH [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Connection reset by peer] |
03:36 | | Syloqs_AFH [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code |
03:37 | | Syloqs_AFH is now known as Syloqs-AFH |
04:20 | | cpux is now known as shade_of_cpux |
04:26 | | Kazriko [kaz@31356A.679E64.986B00.962247] has quit [Connection closed] |
06:00 | | Kazriko [kaz@31356A.679E64.986B00.962247] has joined #code |
06:00 | | Kindamoody[zZz] is now known as Kindamoody |
06:39 | | Derakon is now known as Derakon[AFK] |
07:10 | | celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!] |
07:12 | | kwsn is now known as kwsn\t-2 |
07:16 | | kwsn\t-2 [kwsn@Nightstar-9d744862.dyn.centurytel.net] has quit [[NS] Quit: moo...] |
07:18 | < Vornicus> | Seen in another channel just now: do { ... } while (0) |
07:18 | < Tamber> | Even better than that. |
07:18 | < Tamber> | do { if(a_dbg_level >= a_dbg_level){ printk("<" #a_dbg_level ">" MODULE_NAME ": " format, ## arg); } while (0) |
07:19 | < Tamber> | if you can't assume a variable is at least equal to itself, printk is probably not gonna help you; the entire thing is so insane that it's about on fire and nobody will ever see the debug message. :p |
07:20 | < Vornicus> | No, it looks like you'll see the debug message anyway |
07:20 | < Tamber> | I know. |
07:20 | < Tamber> | It does work, it's just mad. |
07:22 | < Vornicus> | what is that language anyway? |
07:22 | < Tamber> | C. |
07:22 | < Vornicus> | aha |
07:22 | < Vornicus> | man, preprocessor shit. |
07:23 | < Tamber> | There's a lot of it in things that have to deal with the kernel, it seems. :) |
07:45 | | gnolaptop [lenin@Nightstar-4f227521.dialup.ice.net] has joined #code |
07:48 | < Rhamphoryncus> | do { ... } while (0) is actually a common trick in C |
07:49 | < Rhamphoryncus> | it's used in macros so you can call them as FOO(); and have the semicolon work right |
07:49 | < Tamber> | ...huh. |
07:49 | < Vornicus> | ...huh? |
07:55 | < Rhamphoryncus> | that protects against cases where you have if (...) FOO(); else BAR(); |
08:00 | < Rhamphoryncus> | anyway, I need some sleep, so if you're still curious you'll have to google it ;) |
08:00 | | Rhamphoryncus [rhamph@C06FE3.F5723C.BE3FEB.9D4666] has quit [Client exited] |
08:24 | | AnnoDomini [annodomini@D553D1.41311B.ABD3FB.50BDA4] has joined #code |
08:26 | | Vornicus is now known as Vornicus-Latens |
09:00 | | Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has joined #code |
09:24 | | Alek [omegaboot@490720.5E22A0.CA107A.D7BF53] has quit [Ping timeout: 121 seconds] |
09:25 | | Alek [omegaboot@490720.5E22A0.CA107A.D7BF53] has joined #code |
09:28 | | McMartin [mcmartin@Nightstar-5d6d0af3.pltn13.sbcglobal.net] has quit [Ping timeout: 121 seconds] |
09:32 | | Alek [omegaboot@490720.5E22A0.CA107A.D7BF53] has quit [Ping timeout: 121 seconds] |
09:34 | | Kindamoody is now known as Kindamoody|out |
09:34 | | Alek [omegaboot@490720.5E22A0.CA107A.D7BF53] has joined #code |
09:40 | | McMartin [mcmartin@1526F6.B1ED4D.379C75.6B300E] has joined #code |
11:04 | | Attilla [Some.Dude@Nightstar-92c9199f.cable.virginmedia.com] has joined #code |
11:13 | | You're now known as TheWatcher |
11:15 | < gnolaptop> | "Software development == church development. Step 1: Build it. Step 2: Pray." |
11:23 | | Attilla [Some.Dude@Nightstar-92c9199f.cable.virginmedia.com] has quit [[NS] Quit: ] |
11:23 | | gnolaptop [lenin@Nightstar-4f227521.dialup.ice.net] has quit [[NS] Quit: Oh hey, looks like this bus is arriving] |
12:02 | | gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has joined #code |
12:27 | | shade_of_cpux [chatzilla@510B1D.8D602E.9FE2BE.9FAE21] has quit [[NS] Quit: ChatZilla 0.9.86.1 [Firefox 4.0/20110318052756]] |
15:12 | | Attilla [Some.Dude@Nightstar-92c9199f.cable.virginmedia.com] has joined #code |
15:34 | | celticminstrel [celticminst@Nightstar-f8b608eb.cable.rogers.com] has joined #code |
16:04 | | Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has quit [Ping timeout: 121 seconds] |
17:06 | | Rhamphoryncus [rhamph@C06FE3.F5723C.BE3FEB.9D4666] has joined #code |
17:12 | | Syloqs-AFH [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds] |
17:16 | | Kindamoody|out is now known as Kindamoody |
17:18 | | Reiv [orthianz@3CF3A5.E1CD01.36D449.95F5A5] has quit [Client closed the connection] |
17:18 | | Reiv [orthianz@3CF3A5.E1CD01.36D449.95F5A5] has joined #code |
17:19 | | Syloqs_AFH [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code |
17:20 | | Syloqs_AFH is now known as Syloqs-AFH |
17:50 | | SchoolPhox [NSwebIRC@FD3571.2233F7.69D3C5.F389F5] has joined #code |
17:51 | < SchoolPhox> | So, what's the deal with global variables in C? Are they something that should be avoided when possible? |
17:52 | < SchoolPhox> | I'm in a situation where I can either use a global variable, or I can calculate the value. Which is preferred? |
17:53 | < Tamber> | I would think it depends on how expensive the calculation is, and how it affects how easily one can understand the code when you come back to it later. |
17:54 | < ToxicFrog> | As is generally the case, they are something that should be used sparingly and with caution. |
17:54 | < ToxicFrog> | For this case in particular, is there a reason you can't use a file local variable? |
17:55 | < SchoolPhox> | It's two separate functions that don't call each other. |
17:56 | < Kindamoody> | If it's in two places, I'd use a global. |
17:58 | < Kindamoody> | I once made the mistake of comparing two strings that should have been constants, and I mistyped one of them, so they were not equal even though they should have been. |
17:58 | < ToxicFrog> | SchoolPhox: are the functions in the same file? Use a file static rather than a global, then. |
17:58 | < SchoolPhox> | Ooh, that's a good idea |
17:59 | < SchoolPhox> | Think I'll go with that one |
17:59 | < ToxicFrog> | Um |
17:59 | < ToxicFrog> | Kindamoody: as in, you were comparing two string literals? |
17:59 | < ToxicFrog> | That should have been the same? |
17:59 | < ToxicFrog> | Can't you just replace the entire expression with 'true' in that case? |
18:00 | < Kindamoody> | I set two strings to compare, and both were set in two different places. |
18:01 | < Kindamoody> | On one of them, I added a colon at the end of the strings. |
18:01 | < Kindamoody> | By mistake. |
18:02 | < Kindamoody> | Like, Name1 and Name2 in one place, and Name1: and Name2: in the other. |
18:02 | < Kindamoody> | So, Name1 was not equal to Name1: of course. |
18:02 | < Kindamoody> | Cost me about $300. |
18:05 | < celticminstrel> | ? |
18:05 | < celticminstrel> | How? |
18:42 | | Syloqs-AFH [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Connection closed] |
18:51 | | Syloqs_AFH [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code |
18:52 | | Syloqs_AFH is now known as Syloqs-AFH |
18:58 | | Vornucopia [NSwebIRC@C888DE.7F9621.E9EB68.0518B1] has joined #code |
18:59 | | SchoolPhox [NSwebIRC@FD3571.2233F7.69D3C5.F389F5] has quit [Ping timeout: 121 seconds] |
19:21 | < Kindamoody> | Sorry, I didn't follow up what I said... I had to take $300 off the bill to make the client happy. |
19:33 | < ToxicFrog> | Hmm. |
19:34 | < ToxicFrog> | My sIPD algorithm thinks that (4,1) is adjacent to (1,3). |
19:35 | < Vornucopia> | sIPD? |
19:44 | < ToxicFrog> | Spatial Iterated Prisoner's Dilemma. |
19:54 | < ToxicFrog> | Basically, cellular automata with N cell states, where each state corresponds to an IPD strategy. |
19:54 | < ToxicFrog> | Each tick, each cell IPDs with all of its neighbors, and copies itself into all adjacent weaker cells. |
19:54 | < Vornucopia> | Yeah, I found some. |
20:08 | | Vornucopia_ [NSwebIRC@C888DE.7F9621.E9EB68.0518B1] has joined #code |
20:08 | | Vornucopia [NSwebIRC@C888DE.7F9621.E9EB68.0518B1] has quit [Ping timeout: 121 seconds] |
20:11 | | Vornucopia_ is now known as Vornucopia |
20:24 | | kwsn [kwsn@Nightstar-9d744862.dyn.centurytel.net] has joined #code |
20:37 | | Stalker [Z@26ECB6.A4B64C.298B52.D80DA0] has joined #code |
21:47 | | Vornucopia [NSwebIRC@C888DE.7F9621.E9EB68.0518B1] has quit [[NS] Quit: Page closed] |
21:58 | | gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has quit [[NS] Quit: Reboot] |
22:05 | | celticminstrel is now known as celmin|away |
22:15 | | gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has joined #code |
23:37 | | AnnoDomini [annodomini@D553D1.41311B.ABD3FB.50BDA4] has quit [[NS] Quit: leaving] |
--- Log closed Thu Apr 07 00:00:32 2011 |