Back
[11:46:38] <tjtr33> OT i didnt know Terry Pratchett had died. I was just listening to GuardsGuards and found out .thx terry.
https://xkcd.com/1498/
[14:04:15] <kwallace_T770> Google is not finding anything on what !! does here: char probe_whenclears = !!(probe_type & 2);
[14:05:41] <skunkworks> http://cboard.cprogramming.com/c-programming/133581-what-double-exclamation-mark-c-language.html
[14:06:01] <skunkworks> https://www.google.com/search?q=what+does+double+exclimation+points+mean+in+C&ie=utf-8&oe=utf-8#q=what+does+double+exclimation+points+mean+in+C
[14:08:20] <jepler> ooh skunkworks ftw
[14:08:39] <kwallace_T770> skunkworks, thank you.
[14:09:04] <jepler> in a more civilised language, you might write bool(probe_type & 2)
[14:09:29] <archivist> ew, not in my C standard book
[14:10:29] <kwallace_T770> Now that I know what !! does, it seems fairly obvious.
[14:11:10] <skunkworks> it boils down to asking the right question.... :)
[14:11:28] <jepler> You could write that in C++ or Python. In C, you could write (bool)(probe_type & 2) if you've included <stdbool.h> or <rtapi_bool.h>
[14:13:12] <jepler> !!(x) is an idiom that you won't soon forget, so it doesn't matter much that (bool)(x) might be clearer. They both generate identical code in my test (gcc 4.7 -Os targeting amd64)
[14:13:40] <jepler> (interestingly, !!(probe_type & 2)'s assembly includes a shift instruction!)
[14:14:46] <archivist> bool is in the standard
[14:15:16] <jepler> archivist: C99 has _Bool, _True and _False; if you #include <stdbool.h> it adds bool, true and false.
[14:15:38] <archivist> I have C99 open here :)
[14:15:44] <jepler> ah excellent
[14:16:30] <archivist> I have teh defence when someone shouts were is your C standard in ##C
[14:16:31] <jepler> linuxcnc now has a header <rtapi_bool.h> if you want bool, because in kernelspace, true/false/bool need to come from <linux/types.h>
[14:27:51] <kwallace_T770> Thanks for the help!!
[14:33:48] <kwallace_T770> BTW, Rogge made a G38.6 probe move that allows a move but ignores a make signal. I just need to have a move that ignores the break signal.
[14:38:12] <kwallace_T770> Geeze, it was in the 70's last week, it was snowing about an hour ago.
[14:43:00] <jepler> just drizzle and 50s here, I can't complain
[14:43:06] <jepler> (but I will refrain from going for my lunchtime walk)
[14:46:13] <kwallace_T770> My fin g erz is frozsn.
[17:17:37] <kwallace_T770> Oops, Rogge's 38.6 mentioned above masks make and break signals. My problem is somewhere else.
[23:11:29] <KGB-linuxcnc> 03Chris Morley 052.7 2ff44af 06linuxcnc Merge remote branch 'origin/mozmck/gscreen-rapid-override' into 2.7 * 14http://git.linuxcnc.org/?p=linuxcnc.git;a=commitdiff;h=2ff44af
[23:43:15] <linuxcnc-build> build #3101 of 1306.rip-precise-amd64 is complete: Failure [4failed compile runtests] Build details are at
http://buildbot.linuxcnc.org/buildbot/builders/1306.rip-precise-amd64/builds/3101 blamelist: Chris Morley <chrisinnanaimo@hotmail.com>, Moses McKnight <moses@texband.net>
[23:47:57] <linuxcnc-build> build #3110 of 0000.checkin is complete: Failure [4failed] Build details are at
http://buildbot.linuxcnc.org/buildbot/builders/0000.checkin/builds/3110 blamelist: Chris Morley <chrisinnanaimo@hotmail.com>, Moses McKnight <moses@texband.net>