2013-01-24 00:01 dandon_ has joined #qi-hardware 2013-01-24 00:03 dandon has quit [Ping timeout: 255 seconds] 2013-01-24 00:03 dandon_ is now known as dandon 2013-01-24 00:17 mth has quit [Ping timeout: 246 seconds] 2013-01-24 01:20 dandon_ has joined #qi-hardware 2013-01-24 01:21 dandon has quit [Ping timeout: 246 seconds] 2013-01-24 01:21 dandon_ is now known as dandon 2013-01-24 01:43 wej has quit [Ping timeout: 264 seconds] 2013-01-24 01:49 wej has joined #qi-hardware 2013-01-24 01:54 panda|x201 has quit [Ping timeout: 245 seconds] 2013-01-24 02:01 wej has quit [Ping timeout: 264 seconds] 2013-01-24 02:03 mth has joined #qi-hardware 2013-01-24 02:07 panda|x201 has joined #qi-hardware 2013-01-24 02:07 mth_ has joined #qi-hardware 2013-01-24 02:07 mth has quit [Read error: Connection reset by peer] 2013-01-24 02:16 emeb has quit [Quit: Leaving.] 2013-01-24 02:18 emeb has joined #qi-hardware 2013-01-24 02:21 Jurting_pc2_ has joined #qi-hardware 2013-01-24 02:24 Jurting_pc2 has quit [Ping timeout: 245 seconds] 2013-01-24 02:41 emeb has quit [Quit: Leaving.] 2013-01-24 02:42 emeb has joined #qi-hardware 2013-01-24 02:51 Jurting_pc2_ has quit [Quit: No Ping reply in 180 seconds.] 2013-01-24 02:52 Jurting_pc2 has joined #qi-hardware 2013-01-24 03:01 bzb has joined #qi-hardware 2013-01-24 03:52 wolfspraul has quit [Quit: leaving] 2013-01-24 03:52 wolfspraul has joined #qi-hardware 2013-01-24 04:03 DocScrutinizer05 has quit [Disconnected by services] 2013-01-24 04:03 DocScrutinizer05 has joined #qi-hardware 2013-01-24 04:10 liuqi has quit [Ping timeout: 256 seconds] 2013-01-24 04:12 liuqi has joined #qi-hardware 2013-01-24 04:15 emeb has quit [Quit: Leaving.] 2013-01-24 04:46 porchaso0 has joined #qi-hardware 2013-01-24 04:46 porchao has quit [Ping timeout: 264 seconds] 2013-01-24 05:00 panda|x201 has quit [Ping timeout: 245 seconds] 2013-01-24 05:05 panda|x201 has joined #qi-hardware 2013-01-24 05:09 porchaso0 has quit [Quit: Leaving...] 2013-01-24 05:26 porchao has joined #qi-hardware 2013-01-24 05:29 FrankBlues has quit [Remote host closed the connection] 2013-01-24 06:44 LunaVorax has joined #qi-hardware 2013-01-24 06:47 Hi 2013-01-24 06:57 hmm. seems that i've found a code generation bug in gcc :-( (cross-compiling for the ben) 2013-01-24 06:58 given a code fragment tricky = foo; if (blah) tricky = bar; is adds the equivalent of else tricky = tricky; 2013-01-24 06:59 unfortunately, "tricky" is a register (with volatile and all that) ... 2013-01-24 07:02 mth_ is now known as mth 2013-01-24 07:05 ... PDFUNS, to be precise. and it very much resents this sort of treatment. 2013-01-24 07:15 LunaVorax has quit [Ping timeout: 260 seconds] 2013-01-24 07:31 jekhor has joined #qi-hardware 2013-01-24 07:41 megha has joined #qi-hardware 2013-01-24 07:52 LunaVorax has joined #qi-hardware 2013-01-24 07:59 wpwrak: sounds like an optimizer gone wrong 2013-01-24 08:00 I'm fairly sure that volatile semantics (apart from being inapplicable for I/O memory) forbids that 2013-01-24 08:03 jluis has quit [Remote host closed the connection] 2013-01-24 08:06 jluis has joined #qi-hardware 2013-01-24 08:18 megha has quit [Ping timeout: 248 seconds] 2013-01-24 08:34 megha has joined #qi-hardware 2013-01-24 08:56 panda|x201 has quit [Ping timeout: 245 seconds] 2013-01-24 08:57 jekhor has quit [Ping timeout: 256 seconds] 2013-01-24 09:31 wpwrak: can you paste the code? 2013-01-24 09:50 megha has quit [Ping timeout: 244 seconds] 2013-01-24 10:12 jekhor has joined #qi-hardware 2013-01-24 10:52 xiangfu has joined #qi-hardware 2013-01-24 11:08 dandon_ has joined #qi-hardware 2013-01-24 11:09 dandon has quit [Ping timeout: 252 seconds] 2013-01-24 11:10 dandon_ is now known as dandon 2013-01-24 11:49 jekhor has quit [Ping timeout: 276 seconds] 2013-01-24 11:50 whitequark: yes, looks like the optimizer got confused. i think my code indicates things correctly. need to see if i may have been a bit overzealous with the volatile, though. (not that this would be an excuse, but it may have made life unnecessarily hard for the poor compiler.) 2013-01-24 11:50 but first the morning mails and some caffeine ... 2013-01-24 11:50 megha has joined #qi-hardware 2013-01-24 11:57 xiangfu has quit [Read error: Connection reset by peer] 2013-01-24 12:02 urandom__ has joined #qi-hardware 2013-01-24 12:21 xiangfu has joined #qi-hardware 2013-01-24 12:23 xiangfu has quit [Remote host closed the connection] 2013-01-24 12:32 Hoolxi has joined #qi-hardware 2013-01-24 12:46 xiangfu has joined #qi-hardware 2013-01-24 13:12 megha has quit [Quit: WeeChat 0.3.9.2] 2013-01-24 13:16 megha has joined #qi-hardware 2013-01-24 13:16 panda|x201 has joined #qi-hardware 2013-01-24 13:20 kuribas has joined #qi-hardware 2013-01-24 13:28 i need a senility check. given this code fragment: http://pastebin.pl/72768 2013-01-24 13:30 if you compile it with gcc 4.6.3 or gcc 4.7.2, e.g., for amd64 or mipsel, gcc reads from *ptr. my understanding is that it's not supposed to do that. anyone disagrees ? 2013-01-24 13:31 btw, with llvm 3.0, i get the code i expect. in fact, llvm is a bit too zealous and treats "ptr" as volatile as well 2013-01-24 13:32 (compiling with -O9) 2013-01-24 13:44 hum it seems gcc should only write to ptr 2013-01-24 13:53 2:1 against gcc's interpretation :) or 3:1 if we count llvm. 2013-01-24 13:57 there is probably a clause somewhere in the standard that permits this 2013-01-24 13:57 and gcc sticks to the standard and not to what is practical 2013-01-24 13:58 the standard is pretty fuzzy about "volatile" 2013-01-24 13:59 and gcc's documentation is more confusing than helpful there. http://gcc.gnu.org/onlinedocs/gcc-4.7.2/gcc/Volatiles.html 2013-01-24 13:59 particularly the memory barrier example is puzzling. it would seem that just making that pointer volatile ought to do the trick. yet ... 2013-01-24 14:07 I even get the problem without the first *ptr = 1; 2013-01-24 14:08 ah, no misread the generated cod 2013-01-24 14:08 e 2013-01-24 14:10 It's a bit strange anyway on ARM it generates "movne r2, #2; ldreq r2, [r3]; str r2, [r3]" while the shorter "movne r2, #2; strne r2, [r3]" would be correct 2013-01-24 14:12 yeah, it really really wants to do that read :) 2013-01-24 14:13 an obsessive-compulsive anti-optimization 2013-01-24 14:14 whitequark: ruby got almost 50% https://github.com/search?p=&q=path:.ssh/id_rsa&type=Repositories 2013-01-24 14:21 Jurting_pc2 has quit [Read error: Connection reset by peer] 2013-01-24 14:21 grmbl. in 2010, this was a theoretical issue. seems that we've progressed beyond that. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44943 2013-01-24 14:22 Jurting_pc2 has joined #qi-hardware 2013-01-24 14:26 larsc: compare with total count of repositories by language 2013-01-24 14:26 idiots are distributed roughly evenly ;) 2013-01-24 14:27 larsc: what actually worries me is Puppet. because sysadmins gotta know it better. 2013-01-24 14:27 whitequark: turns out I copy pasted the link to fast, the path: filter doesn't seem to work 2013-01-24 14:27 it's just text somewhere in a readme file 2013-01-24 14:28 larsc: the actual link has the majority in ruby too 2013-01-24 14:35 larsc: btw I'm not even sure why does it has the same distribution or shows ruby at all. That stuff should be in dotfiles theoretically... 2013-01-24 14:37 Openfree has joined #qi-hardware 2013-01-24 14:41 Hoolxi has quit [Ping timeout: 264 seconds] 2013-01-24 15:10 Openfree has quit [Remote host closed the connection] 2013-01-24 15:20 bzb has quit [Quit: Leaving] 2013-01-24 15:27 panda|x201 has quit [Ping timeout: 276 seconds] 2013-01-24 15:33 xiangfu has quit [Read error: Connection reset by peer] 2013-01-24 15:38 xiangfu has joined #qi-hardware 2013-01-24 16:19 megha has quit [Quit: WeeChat 0.3.9.2] 2013-01-24 16:21 emeb has joined #qi-hardware 2013-01-24 16:25 Jurting_pc2 has quit [Ping timeout: 245 seconds] 2013-01-24 16:39 kilae has joined #qi-hardware 2013-01-24 16:41 jluis has quit [Ping timeout: 248 seconds] 2013-01-24 17:02 rz2k has joined #qi-hardware 2013-01-24 17:10 LunaVorax has quit [Ping timeout: 260 seconds] 2013-01-24 17:27 LunaVorax has joined #qi-hardware 2013-01-24 17:44 megha has joined #qi-hardware 2013-01-24 18:01 xiangfu has quit [Remote host closed the connection] 2013-01-24 18:16 LunaVorax has quit [Ping timeout: 260 seconds] 2013-01-24 18:37 [commit] Werner Almesberger: ubb-la/Makefile (CFLAGS): -O9 is currently unsafe; use -O1 (master) http://qi-hw.com/p/ben-blinkenlights/e1eea4f 2013-01-24 18:37 [commit] Werner Almesberger: ubb-patgen/Makefile (CFLAGS): -O9 is currently unsafe; use -O1 (master) http://qi-hw.com/p/ben-blinkenlights/00ef01a 2013-01-24 18:37 of course, now my delay measurements are probably off ... 2013-01-24 19:02 LunaVorax has joined #qi-hardware 2013-01-24 19:08 can't you just work around the bug? 2013-01-24 19:09 FrankBlues has joined #qi-hardware 2013-01-24 19:12 i could change the API. e.g., instead of PDFUNS = foo; it would become write_reg(PDFUNS, foo), etc. 2013-01-24 19:12 but i kinda like to keep those register accesses nice and simple. besides, a lot of other people are probably using quite similar things. 2013-01-24 19:13 so the work-around for now is to drop the optimization level 2013-01-24 19:18 (API change) or do things like #define PDFUNS(x) write_reg(__PDFUNS, x). a little less ugly, but still. also, there may be other registers outside the GPIO group that don't have nice *ptr = *ptr semantics either 2013-01-24 19:18 only that those might be even harder to spot 2013-01-24 19:39 jekhor has joined #qi-hardware 2013-01-24 19:57 bzb has joined #qi-hardware 2013-01-24 20:01 jekhor has quit [Ping timeout: 248 seconds] 2013-01-24 20:20 hmm. still getting trouble despite the -O1 :-( 2013-01-24 20:32 kilae has quit [Quit: ChatZilla 0.9.89 [Firefox 18.0.1/20130116073211]] 2013-01-24 20:38 [commit] Werner Almesberger: ubb-la/Makefile (CFLAGS): even -O1 isn't safe; use -O0 instead (master) http://qi-hw.com/p/ben-blinkenlights/bac21bf 2013-01-24 20:38 * wpwrak hates compiler bugs 2013-01-24 20:39 hates bugs 2013-01-24 20:39 some can be amusing though 2013-01-24 20:41 especially those you find in other people's code :) (and even more so if what you do doesn't depend on their code) 2013-01-24 20:43 well, this one has quite interesting effects. what happens is that the bad accesses to PDFUNS mess up the keyboard. in ubb-la, this means that the "press key to abort" functionality i'm adding mis-fires. (and of course, the keyboard in general doesn't behave very well after that involuntary reconfiguration) 2013-01-24 20:45 i also saw this earlier in ubb-patgen, but didn't realize what it was. there, it caused Enter to repeat endlessly. that's why the invocation of ubb-patgen at the end of http://downloads.qi-hardware.com/people/werner/ubb/patgen/ubb-patgen-demo.jpg 2013-01-24 20:46 wasn't actually run (the waveform is from an earlier run) 2013-01-24 20:46 well, at least that's the theory. haven't verified yet whether this is really what happened there. 2013-01-24 21:27 [commit] Werner Almesberger: ubb-la/ubb-la.c: add command-line options, keyboard abort (master) http://qi-hw.com/p/ben-blinkenlights/62284fb 2013-01-24 22:29 [commit] Maarten ter Huurne: Changed text color of warnings from yellow to magenta (packages) http://qi-hw.com/p/gmenu2x/a18730e 2013-01-24 22:29 [commit] Maarten ter Huurne: Made GMenu2X::menu private (packages) http://qi-hw.com/p/gmenu2x/e4d78be 2013-01-24 22:29 [commit] Maarten ter Huurne: Ignore OPK files of which the name starts with a dot (packages) http://qi-hw.com/p/gmenu2x/90ec4b9 2013-01-24 23:09 [commit] Werner Almesberger: ubb-patgen/Makefile (CFLAGS): even -O1 isn't safe; use -O0 instead (master) http://qi-hw.com/p/ben-blinkenlights/fc4b8e7 2013-01-24 23:09 [commit] Werner Almesberger: ubb-la/ubb-la.c (do_buf): skip over the first 122 samples (master) http://qi-hw.com/p/ben-blinkenlights/4ce6866 2013-01-24 23:09 [commit] Werner Almesberger: ubb-la/README: brief description of ubb-la (master) http://qi-hw.com/p/ben-blinkenlights/0702675 2013-01-24 23:17 LunaVorax has quit [Ping timeout: 260 seconds] 2013-01-24 23:20 rz2k has quit [] 2013-01-24 23:32 kuribas has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]