--- Log opened Tue Mar 15 00:00:59 2011 |
00:40 | | Attilla [Some.Dude@Nightstar-92c9199f.cable.virginmedia.com] has quit [Ping timeout: 121 seconds] |
00:52 | | You're now known as TheWatcher[T-2] |
00:57 | | You're now known as TheWatcher[zZzZ] |
01:22 | | cpux is now known as shade_of_cpux |
01:32 | | shade_of_cpux [chatzilla@Nightstar-c978de34.dyn.optonline.net] has quit [[NS] Quit: ChatZilla 0.9.86 [Firefox 3.6.14/20110218125750]] |
01:42 | | shade_of_cpux [chatzilla@Nightstar-c978de34.dyn.optonline.net] has joined #code |
01:44 | | shade_of_cpux_ [chatzilla@Nightstar-c978de34.dyn.optonline.net] has joined #code |
01:47 | | shade_of_cpux [chatzilla@Nightstar-c978de34.dyn.optonline.net] has quit [Ping timeout: 121 seconds] |
01:47 | | shade_of_cpux_ is now known as shade_of_cpux |
02:01 | | Derakon[AFK] is now known as Derakon |
02:03 | | celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has joined #code |
02:26 | | Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has quit [Ping timeout: 121 seconds] |
--- Log closed Tue Mar 15 02:36:47 2011 |
--- Log opened Tue Mar 15 02:42:40 2011 |
02:42 | | TheWatcher[zZzZ] [chris@Nightstar-b4529b0c.zen.co.uk] has joined #code |
02:42 | | Irssi: #code: Total of 26 nicks [10 ops, 0 halfops, 0 voices, 16 normal] |
02:42 | | mode/#code [+o TheWatcher[zZzZ]] by Reiver |
02:42 | | * Derakon links TW to http://tasvideos.org/forum/viewtopic.php?p=265447#265447 |
02:43 | | Irssi: Join to #code was synced in 48 secs |
02:49 | < Tarinaky> | Won't the main loop sail through again and again even if there's nothing to do? |
02:49 | <@Derakon> | Check the second-to-last line. |
02:49 | <@Derakon> | I assure you this code is fully-functional, and, as far as I'm aware, bug-free. |
02:50 | < Tarinaky> | second-to-last of what? |
02:52 | <@Derakon> | ...of the code? What else could I have been referring to? |
02:54 | < Tarinaky> | Wait, the article I'm reading or a different link? |
02:54 | <@Derakon> | Oh, sorry. I thought you were talking about http://tasvideos.org/forum/viewtopic.php?p=265447#265447 |
02:55 | <@Derakon> | I believe the sleep is implicit in that article. |
02:56 | < Tarinaky> | Apparently not. |
02:56 | < Tarinaky> | Now I'm confused. |
03:47 | | Rhamphoryncus [rhamph@C06FE3.F5723C.BE3FEB.9D4666] has quit [Client exited] |
04:22 | | Reiv [orthianz@3CF3A5.E1CD01.36D449.95F5A5] has quit [Ping timeout: 121 seconds] |
04:29 | | Reiv [orthianz@3CF3A5.E1CD01.36D449.95F5A5] has joined #code |
04:38 | | SchoolPhox [NSwebIRC@Nightstar-d9d726da.exta.sait.ca] has joined #code |
04:38 | < SchoolPhox> | Does anyone mind if I ask a really low-level question? |
04:39 | < SchoolPhox> | I have a for loop. This is what I'm using to make it " for(i = 12; i <= 24; i++)" |
04:40 | < SchoolPhox> | Now, the behaviour for this, assuming nothing changes i in the loop, is that i will initialize at 12, and increment every repetition until it equals 24. |
04:40 | < SchoolPhox> | Is that correct? |
04:40 | <@Kazriko> | It would execute once at 24 as well. |
04:40 | <@Kazriko> | it would stop at 25 |
04:40 | < SchoolPhox> | Right |
04:40 | < SchoolPhox> | I'm not having any luck on that front, though |
04:40 | < SchoolPhox> | I'll past the whole thing. Four lines |
04:41 | < SchoolPhox> | for(i = 12; i <= 24; i++) { bitstream[i] = (digital_output >> bit_mask) & 1; bit_mask--; } |
04:41 | < SchoolPhox> | It loops indefinitely. i reaches 24, and resets to 0 |
04:41 | < Tarinaky> | What is i? |
04:41 | <@Kazriko> | Is there anything outside of that loop? |
04:42 | < SchoolPhox> | i is an int, and outside of the loop is just generic code. No while loops or anything |
04:42 | <@Derakon> | Yeah, why don't you paste the entire function here? http://paste.ubuntu.com/ |
04:43 | < SchoolPhox> | Yeah, I was about to do that |
04:43 | <@Derakon> | Because from what you've pasted there the only thing modifying i is the for loop, which shouldn't ever decrement it. So something else is going on. |
04:43 | | * Kazriko ponders. |
04:44 | < SchoolPhox> | http://paste.ubuntu.com/580428/ |
04:44 | <@Derakon> | The loop being lines 10-14, yes? |
04:44 | < SchoolPhox> | Yeah |
04:45 | < SchoolPhox> | Also, bad formatting in there. This is old code |
04:45 | <@Kazriko> | you have another loop using i there, resets it to 0 |
04:45 | | * SchoolPhox has gotten better |
04:45 | < SchoolPhox> | But, it doesn't even reach there |
04:45 | <@Derakon> | Lines 10-14 loop indefinitely? |
04:45 | < SchoolPhox> | I had a breakpoint on line 15. Never reaches it |
04:45 | < SchoolPhox> | Yeah, 10-14 |
04:45 | <@Derakon> | (Are you sure the version that's looping indefinitely is the same as the version you pasted?) |
04:46 | < SchoolPhox> | Just copied it in. Oddly enough, it works if I change the for loop to i < 24 |
04:46 | <@Derakon> | ... |
04:46 | < SchoolPhox> | I could work around this by using i < 25, for the same functionality, but that's a hack |
04:47 | <@Derakon> | So it loops indefinitely with a condition of "i <= 24", but it works fine with a condition of "i < 25"? |
04:48 | < SchoolPhox> | Hmm. Works for i < 24, but not i < 25. |
04:48 | < SchoolPhox> | That helps, a bit. |
04:48 | <@Derakon> | 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24. How long is that list? |
04:48 | < SchoolPhox> | Hang on, just testing quickly. Think I found it |
04:49 | <@Kazriko> | Ahh, index issue. |
04:49 | <@Kazriko> | accessing [24] on a 24 length array? |
04:49 | <@Derakon> | I don't see how an indexing issue could be causing i to reset unless you got very, very lucky with your memory layout. |
04:49 | <@Derakon> | But yeah. |
04:49 | < SchoolPhox> | Yeah |
04:49 | < SchoolPhox> | But, it looks like it |
04:49 | <@Kazriko> | Compilers tend to do wierd things when you exceed their boundaries. GCC on arm causes all kinds of issues. |
04:49 | < SchoolPhox> | And consistantly hit it, as well. |
04:50 | < Tarinaky> | Derakon: Add a superfluous line of code - if he stops being so lucky it was luck. |
04:50 | <@Kazriko> | I did compile it with gcc and it ran without issue, but I commented out all of the delay and dout stuff. |
04:52 | < SchoolPhox> | Hmm. Odd that the compiler didn't give me an error with that. |
04:52 | <@Derakon> | C/C++ compilers are perfectly happy to let you tromp around in memory so long as you don't step on anything restricted. |
04:52 | <@Derakon> | You created a bunch of variables at the beginning of the function; they're probably adjacent in memory. |
04:53 | <@Derakon> | So modifying off the end of the array could well end up changing one of the other variables' values. |
04:53 | <@Derakon> | Naturally not anything you'd want to rely on. |
04:53 | < Tarinaky> | If you put the compiler in Pedantic mode should catch errors like that tbh. |
04:53 | < Tarinaky> | *it should |
04:53 | <@Kazriko> | Derakon, The one for the vxworks on arm seems to pack things so tightly, that every time I step out of an array the OS crashes. heh |
04:54 | <@Kazriko> | which is why I do such long and involved unit tests on that platform... |
04:55 | < SchoolPhox> | Well, function runs. Doesn't do what I wanted it to do, but thanks for the hand, there |
04:55 | | * SchoolPhox packs up to get some sleep |
04:55 | <@Derakon> | Sleep well. |
05:03 | | SchoolPhox [NSwebIRC@Nightstar-d9d726da.exta.sait.ca] has quit [Ping timeout: 121 seconds] |
05:17 | | 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!] |
05:37 | | Derakon is now known as Derakon[AFK] |
06:55 | | AnnoDomini [annodomini@D553D1.75652E.1FF023.A20751] has joined #code |
06:55 | | mode/#code [+o AnnoDomini] by Reiver |
07:04 | | kwsn [kwsn@Nightstar-5a8951e9.res.rr.com] has quit [[NS] Quit: moo] |
07:07 | | You're now known as TheWatcher |
07:16 | | Gruber [lenin@9D46A2.F4E9D7.E4B4CF.2072AD] has joined #code |
07:17 | | simon_ [simon@Nightstar-a12ff716.gjk.dk] has quit [Ping timeout: 121 seconds] |
07:17 | | simon_ [simon@FEE8B2.936B30.5A6437.EA7E8B] has joined #code |
07:17 | | gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has quit [Ping timeout: 121 seconds] |
08:09 | | You're now known as TheWatcher[afk] |
--- Log closed Tue Mar 15 09:27:46 2011 |
--- Log opened Tue Mar 15 09:28:08 2011 |
09:28 | | TheWatcher[afk] [chris@Nightstar-b4529b0c.zen.co.uk] has joined #code |
09:28 | | Irssi: #code: Total of 24 nicks [10 ops, 0 halfops, 0 voices, 14 normal] |
09:28 | | Irssi: Join to #code was synced in 48 secs |
09:52 | | You're now known as TheWatcher |
10:04 | | AnnoDomini [annodomini@D553D1.75652E.1FF023.A20751] has quit [[NS] Quit: leaving] |
10:35 | | Attilla [Some.Dude@Nightstar-92c9199f.cable.virginmedia.com] has joined #code |
10:35 | | mode/#code [+o Attilla] by Reiver |
10:44 | | Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has joined #code |
11:44 | | Gruber is now known as gnolam |
12:12 | | AnnoDomini [annodomini@D553D1.75652E.1FF023.A20751] has joined #code |
12:12 | | mode/#code [+o AnnoDomini] by Reiver |
14:16 | | Kindamoody|away [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has quit [Ping timeout: 121 seconds] |
14:18 | | Kindamoody|away [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has joined #code |
14:23 | | SmithKurosaki [smith@DCDEB4.F95CFD.2EEAA4.B1AE3D] has quit [Ping timeout: 121 seconds] |
14:28 | | SmithKurosaki [smith@Nightstar-7820a96a.dsl.teksavvy.com] has joined #code |
14:45 | | You're now known as TheWatcher[afk] |
14:48 | | Rhamphoryncus [rhamph@C06FE3.F5723C.BE3FEB.9D4666] has joined #code |
15:07 | | SmithKurosaki [smith@Nightstar-7820a96a.dsl.teksavvy.com] has quit [Ping timeout: 121 seconds] |
15:13 | | Reiv [orthianz@3CF3A5.E1CD01.36D449.95F5A5] has quit [Client closed the connection] |
15:13 | | Reiv [orthianz@3CF3A5.E1CD01.36D449.95F5A5] has joined #code |
15:21 | | Syloqs-AFH [Syloq@NetworkAdministrator.Nightstar.Net] has quit [[NS] Quit: ] |
15:22 | | Syloqs_AFH [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code |
15:23 | | Syloqs_AFH is now known as Syloqs-AFH |
15:54 | | Reiv [orthianz@3CF3A5.E1CD01.36D449.95F5A5] has quit [Connection reset by peer] |
15:54 | | Reiv [orthianz@3CF3A5.E1CD01.36D449.95F5A5] has joined #code |
16:20 | | Reiv [orthianz@3CF3A5.E1CD01.36D449.95F5A5] has quit [Connection reset by peer] |
16:20 | | Reiv [orthianz@3CF3A5.E1CD01.36D449.95F5A5] has joined #code |
16:31 | | Kindamoody|away [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has quit [Ping timeout: 121 seconds] |
16:32 | | Kindamoody|away [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has joined #code |
16:44 | | Tamber [tamber@furryhelix.co.uk] has quit [[NS] Quit: ~~+++~~ATH] |
16:44 | | Tamber [tamber@Nightstar-d36aadfc.co.uk] has joined #code |
16:56 | | gnolam [lenin@9D46A2.F4E9D7.E4B4CF.2072AD] has quit [Ping timeout: 121 seconds] |
17:00 | | gnolam [lenin@9D46A2.F4E9D7.E4B4CF.2072AD] has joined #code |
17:34 | | AnnoDomini is now known as ShadowOverSun |
17:52 | | You're now known as TheWatcher |
18:36 | | Kindamoody|away [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has quit [Ping timeout: 121 seconds] |
18:37 | | Kindamoody|away [Kindamoody@35E323.4A5F05.9893B9.A684A3] has joined #code |
19:07 | | RichardBarrell [mycatverbs@297948.B19D49.AD5D3D.EAFE1C] has joined #code |
20:13 | | Reiv [orthianz@3CF3A5.E1CD01.36D449.95F5A5] has quit [Ping timeout: 121 seconds] |
20:17 | | Reiv [orthianz@3CF3A5.E1CD01.36D449.95F5A5] has joined #code |
21:33 | | Kindamoody|away is now known as Kindamoody |
21:42 | | RichardBarrell [mycatverbs@297948.B19D49.AD5D3D.EAFE1C] has left #code ["ERC Version 5.3 (IRC client for Emacs)"] |
21:43 | <@McMartin> | 'Some people, when confronted with numbers, think "I know, I'll add them with JavaScript." Now they have 1.99999999999997 problems.' |
21:44 | < gnolam> | :-) |
21:58 | | ShadowOverSun is now known as AnnoDomini |
21:59 | < Tarinaky> | McMartin: Reminds me of that rap song, "I've got 1.99999999999997 problems but the JavaScript ain't one." |
22:01 | <@McMartin> | 98.9999999997, surely~ |
22:01 | < Tarinaky> | I wasn't sure if the number was significant. |
22:01 | < gnolam> | The only rap I listen to is Public Enemy. All the other rap is so... inaccessible. Outside the class, anyway. |
22:17 | | celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has joined #code |
23:02 | | shade_of_cpux is now known as cpux |
23:06 | | AnnoDomini [annodomini@D553D1.75652E.1FF023.A20751] has quit [[NS] Quit: leaving] |
23:22 | | Kindamoody [Kindamoody@35E323.4A5F05.9893B9.A684A3] has quit [Ping timeout: 121 seconds] |
23:26 | | Kindamoody [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has joined #code |
23:26 | | Kindamoody|away [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has joined #code |
23:39 | | Kindamoody [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has quit [Ping timeout: 121 seconds] |
23:39 | | Kindamoody|away [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has quit [Ping timeout: 121 seconds] |
23:42 | | Kindamoody|away [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has joined #code |
23:42 | | Kindamoody [Kindamoody@Nightstar-4764665d.tbcn.telia.com] has joined #code |
23:54 | | You're now known as TheWatcher[T-2] |
23:56 | | You're now known as TheWatcher[zZzZ] |
--- Log closed Wed Mar 16 00:00:01 2011 |