#emc-devel | Logs for 2010-10-25

Back
[01:31:58] <ries_> ries_ is now known as ries
[02:11:06] <skunkworks> spindle-at-speed looks like it ignores rapid moves - very nicce
[02:11:10] <skunkworks> nice
[03:37:42] <cradek> skunkworks: thanks for noticing :-)
[03:57:55] <jthornton_> jthornton_ is now known as jthornton
[04:48:46] <CIA-112> EMC: 03seb 07master * rca372400f907 10/debian/emc2.files.in: include the new glade3 dir in the debs
[12:52:37] <jepler> anyone want to double-check my fix for SF#3092250 (near doesn't work for negative numbers and relative difference) http://emergent.unpy.net/files/sandbox/near.patches.mbox
[12:53:02] <jepler> or for that matter these partially-untested config changes: http://emergent.unpy.net/files/sandbox/kill-newsig-linkXX.patches.mbox
[12:54:45] <SWPadnos> jepler, any reason to not change those to the "leaner" net form?
[12:55:12] <SWPadnos> (ie, "net a pin1 pin2" instead of "net a pin1" / "net a pin2")
[12:55:50] <alex_joni> SWPadnos: did you see how it's generated?
[12:56:16] <SWPadnos> I can imagine some sed-fu
[12:56:19] <alex_joni> SWPadnos: grep for "were made mechanically"
[12:57:36] <alex_joni> I doubt you can do "net a pin1 pin2" automatically (usually there are 2 linksp's you want to replace, most usually not in the same place in the hal files)
[12:57:41] <SWPadnos> well, that's a good enough reason :)
[13:03:39] <cradek> jepler: thanks for fixing near, and your new test and its results make me happy
[13:04:18] <Jymmm> * Jymmm waits for cradek to do the Happy Dance!
[13:25:22] <alex_joni> this is cool: http://www.youtube.com/watch?v=QyrKonIATxo
[13:33:58] <cradek> unless it throws the egg and catches it, I'm not impressed
[13:36:29] <Jymmm> cradek: You first! LOL
[13:37:21] <Jymmm> I'd just like to know if when it was screwing the lightbulb, did it move up/down
[13:38:06] <Jymmm> I would expect so to compensate for the threads
[13:39:38] <Jymmm> cradek: to catch the egg, are you speaking via trajectory or sensors?
[13:40:18] <cradek> either
[13:40:42] <cradek> making a funnel shaped "hand" and catching a ball in it just isn't that hard
[13:41:22] <Jymmm> true
[13:59:38] <jepler> SWPadnos: I could do something more sophisticated if it really bugs you
[14:00:42] <jepler> one problem that comes to mind is I'd either have to move the 'net' line down to the end of the file, or do something sophisticated to understand which pins come from which components, ala loadrt mod1 / linksp / loadrt mod2 / linksp
[14:00:43] <SWPadnos> it doesn't really bug me. it just seemed like it would be better to use whatever style we recommend in the samples (and I'm assuming that we would recommend the more concise version)
[14:01:29] <SWPadnos> yeah, I was thinking about how to do it, and it seems possible except that it's hard to figure out where the last reference to a particular net is
[14:01:33] <SWPadnos> unless you do two passes
[14:01:45] <SWPadnos> then output the full net line in the last place it's seen
[14:27:40] <alex_joni> cradek: I saw a robot once that used to throw a ping-pong ball using a spoon
[14:27:51] <alex_joni> it would position under a hole, and throw the ball up
[14:28:07] <alex_joni> then it would move the spoon around the obstacle and catch the ball before it falls down
[14:28:14] <alex_joni> surely a bit easier than with an egg
[15:41:32] <CIA-2> EMC: 03seb 07master * r4ec3ff5553cb 10/debian/control.in: fix installed-file conflict when upgrading from 2.4 to master
[16:18:37] <jepler> I was thinking it would be interesting to find a way to let comps include their own testsuite
[16:20:08] <jepler> for instance, you could write a single test of the logic of the "_" function of or2 like this: in1=0; in2=1; CALL(_); CHECK(out == 1);
[16:21:47] <CIA-2> EMC: 03jepler 07v2.4_branch * rf4ae49cc6509 10/tests/near.0/ (README expected runstreamer test.hal): near: add a test for correctness
[16:21:58] <CIA-2> EMC: 03jepler 07v2.4_branch * r1b5432c084c1 10/src/hal/components/near.comp: near: fix for negative inputs (SF#3092250)
[16:22:08] <jepler> cradek: thank you for checking my fix for near
[16:23:51] <cradek> thanks for fixing it
[17:36:12] <andypugh> A chap on the forum wants to use the 2.5 version (he has a 7i39 and needs three-phase pwm). He has got 2.4.5 via git, and can't work out where 2.5~pre is hiding.
[17:36:13] <andypugh> http://www.linuxcnc.org/component/option,com_kunena/Itemid,20/func,view/catid,27/id,2151/limit,6/limitstart,6/lang,german/#4843
[17:36:23] <andypugh> is it git checkout origin/master?
[17:40:09] <psha> if he was cloning repo then he's already on master
[17:40:14] <psha> if not - then git checkout
[17:41:24] <andypugh> I think he did a clone, then carried on following the instructions that are on the Wiki and checked our 2.4.4. Then he did an apt-get update and is on 2.4.5
[17:42:41] <psha> so he have to switch back
[17:44:09] <andypugh> And the command to do that is? (I am fairly clueless with git)
[17:44:52] <psha> git checkout master
[17:44:53] <psha> :)
[17:45:00] <psha> but i'll check for git checkout origin/master
[17:46:08] <psha> git checkout master or if this fails git checkout -b master origin/master
[17:46:23] <psha> it depends on how repo was cloned
[17:46:30] <psha> then git pull
[17:46:34] <psha> for sure :)
[17:48:20] <andypugh> Thanks, i have passed it on.
[18:38:49] <jepler> andypugh: our wiki page on git covers this. http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Git#Work_with_branches
[18:40:00] <andypugh> I told him it was git checkout master, then he said that hadn't worked (he was wrong)
[18:40:16] <andypugh> So I assumed that I was wrong.
[18:43:06] <andypugh> Talking of wrong: u32 *ptr ; *ptr = 100 ; is wrong isn't it? Though I rather thought that compilers caught it. (Though in the case where I think I have done it, different input conditions avoid it, so perhaps that is why)
[18:44:14] <cradek> yes, you need to point that pointer at something before you dereference it
[18:45:28] <jepler> in that kind of code you *might* get a compiler warning like
[18:45:28] <andypugh> Something is wrong with my current hostmot2 build, but there is no indication what in dmesg or elewhere
[18:45:29] <jepler> badptr.c:3: warning: ‘ptr’ is used uninitialized in this function
[18:48:13] <jepler> do you get any information in dmesg?
[18:49:06] <andypugh> "Default trap handler: Vector 14: suspend RT task eede7000
[18:49:29] <jepler> ok.
[18:50:02] <andypugh> I think the problem almost certainly is a null pointer dereference
[18:50:28] <jepler> yes, I think that's likely to be the case
[18:51:59] <jepler> I thought maybe the error message would include the address of the code that caused the problem, which it would be possible to at least relate back to the function name..
[18:53:11] <jepler> but that hex number is not the address of the code
[18:55:32] <andypugh> emc2 starts up cheerfully in "config_sserial" mode, so it looks like I have failed to consider some important difference between the modes.
[19:01:31] <andypugh> I think I might have found it. But now I have a coding-style question. To do something if a flag is false should I prefer:
[19:01:39] <andypugh> if (!hm2->config.sserial_setup_mode) {
[19:01:49] <cradek> yep
[19:01:49] <andypugh> if ( 0 == hm2->config.sserial_setup_mode) {
[19:01:54] <cradek> nope
[19:02:04] <andypugh> or if (hm2->config.sserial_setup_mode == 0) {
[19:02:08] <cradek> nope
[19:02:35] <andypugh> I just think it is a bit easy to lose that ! against such a long variable name
[19:03:14] <cradek> you could use a space?
[19:03:33] <andypugh> I just did :-)
[19:03:38] <cradek> but really, if(flag) and if(!flag) are the way to go
[19:12:42] <jepler> actually, I take the view that you should write 0 == (boolean expression) for greater clarity.
[19:12:59] <cradek> * cradek kicks jepler in the shin
[19:13:08] <jepler> Of course, (0 == (boolean expression)) is a boolean expression, and since I'm always consistent, I prefer writing (0 == (0 == (boolean expression))).
[19:13:33] <jepler> .. and so on, until I'm fired
[19:14:22] <SWPadnos> it would be much more readable if you would first #define '==' to be 'EQUALS'
[19:14:28] <cradek> IS
[19:14:30] <SWPadnos> or possible 'IS_EQUAL_TO'
[19:14:42] <SWPadnos> or maybe 'IS_THE_EQUIVALENT_OF'
[19:14:49] <jepler> AINT x EQUAL_TO 0
[19:15:25] <jepler> SEEIN_AS(AINT x EQUAL_TO 0) LETS rtapi_print_msg("this is insantity) OK
[19:15:29] <cradek> I know emc1 used IS, but did it have ISNT?
[19:15:31] <andypugh> FALSE == (boolean expression) ?
[19:15:50] <SWPadnos> then your hideous code becomes a thing of beauty: (0 = IS_THE_EQUIVALENT_OF (0 IS_THE_EQUIVALENT_OF (boolean expression) ) ) ...
[19:15:56] <SWPadnos> -=
[19:16:05] <jepler> you should never write FALSE, because who knows what its value is. You should just write (1 == 0) where you would have written FALSE.
[19:16:17] <cradek> #define IS ==
[19:16:17] <cradek> #define ISNT !=
[19:16:19] <cradek> yep
[19:16:23] <jepler> e.g., if earlier in the program the error was made if(FALSE = x) { ... }
[19:16:42] <jepler> but if((1 == 0) = x) is a compile error
[19:17:01] <cradek> #define SQRT 12
[19:17:19] <andypugh> if (TRUE = 0/0) will make any comparison to TRUE return false. That could be fun.
[19:17:51] <jepler> oh holy moley -- cradek's not making that one up!
[19:17:52] <jepler> src/emc/rs274ngc/interp_internal.hh:#define SQRT 12
[19:18:07] <andypugh> Even the comparison (0 == TRUE) will be false..
[19:18:45] <cradek> if ((block->r_flag ISNT ON) AND (ijk_flag ISNT ON)) first SET_TO (settings->program_x IS UNKNOWN);
[19:18:48] <cradek> hahahahaha
[19:19:03] <cradek> andypugh: so you should be using "ISNT ON" to test flags
[19:19:16] <SWPadnos> but only for EMC 1, right?
[19:20:08] <jepler> (who came up with the function names FIX and FUP, anyway?)
[19:20:39] <SWPadnos> some HP calculator user, probably
[19:20:56] <cradek> jepler: I think they were in the NCMS doc
[19:21:04] <Jymmm> Hey, I resemble that remark!
[19:21:15] <SWPadnos> FUCKUP would have been more indicative of the actual function, but it was a government project, so they had to shorten it
[19:21:40] <Jymmm> I love my HP 20S
[19:22:06] <andypugh> ?hsilop
[19:22:10] <SWPadnos> 28S here, if I can still find N size batteries
[19:22:47] <Jymmm> N? Those are used in car remote controls. 12V
[19:22:58] <Jymmm> err car alrm remotes
[19:22:58] <SWPadnos> wow. I just fired up an old 6.06 machine. there are a lot of updates for that :)
[19:23:17] <SWPadnos> no, they're 1.5V (or 1.25V, depending on the chemistry)
[19:23:48] <jepler> I installed a debian testing system recently. it seems to have updates a lot more frequently than (a released) ubuntu
[19:24:13] <psha> potentialy another debian user :)
[19:24:14] <SWPadnos> I think the last time I booted this machine (into Linux) was about 1-2 years ago
[19:24:31] <psha> but it'll enter freeze state in near future...
[19:24:37] <psha> i mean squeeze
[19:26:16] <Jymmm> SWPadnos: http://www.google.com/products/catalog?q=n+battery&um=1&ie=UTF-8&cid=17322076005706767109&ei=NNnFTLGOBo3UtQPlx7WvDQ&sa=X&oi=product_catalog_result&ct=result&resnum=2&ved=0CC8Q8wIwAQ#
[19:26:36] <SWPadnos> yeah, it looks like Radio Shack still carries them as well
[19:27:12] <Jymmm> SWPadnos: Get Energizer brand ONLY. If they leak, that will send you a check
[19:31:34] <SWPadnos> I wonder how much they'd pay me for my 20+ year old calculator
[19:31:49] <SWPadnos> which quite probably can't be replaced
[19:32:04] <Jymmm> SWPadnos: If you can find the receipt, purchase price.
[19:32:20] <SWPadnos> hmmm. probably not, as I bought this one around 1988
[19:32:55] <Jymmm> SWPadnos: I got a $300 check for a MP3 player
[19:33:00] <SWPadnos> wow. there are some on eBay
[19:33:20] <Jymmm> I think I want one of these http://en.wikipedia.org/wiki/HP48G
[19:33:42] <SWPadnos> not enough buttons: http://cgi.ebay.com/HP-Hewlett-Packard-28S-Advanced-Scientific-Calculator-/130445496189?pt=Calculators&hash=item1e5f284f7d
[19:38:37] <Jymmm> SWPadnos: Here ya go.... http://cgi.ebay.com/TDS-HP-48GX-Data-Collector-with-Environmental-Case_W0QQitemZ230540144727QQcategoryZ55808QQcmdZViewItem
[20:02:58] <skunkworks> I started out with one of these - http://cgi.ebay.com/Vintage-Radio-Shack-Tandy-PC-8-Pocket-Computer-BOX-/110591425924?pt=Calculators&hash=item19bfc33d84
[20:03:04] <skunkworks> then got the next model,
[20:08:57] <JT-Work> I started with this made from whale bone http://cgi.ebay.com/Education-Collection-Abacus-Wooden-Chinese-Tradition-/200509391975?pt=AU_Toys_Hobbies_Wooden_Toys&hash=item2eaf4a8467
[20:24:38] <skunkworks> this one actually - http://cgi.ebay.com/Vintage-Tandy-Pocket-Scientific-Computer-PC-6-/220684494005?pt=LH_DefaultDomain_0&hash=item3361d224b5
[20:36:38] <cradek> wow I bet that keyboard sucked
[20:38:30] <skunkworks> it was a 2 finger keyboard
[20:44:02] <andypugh> from Wikipedia: One of the first low-cost calculators was the http://en.wikipedia.org/wiki/Sinclair_Cambridge, launched in August 1973. It retailed for http://en.wikipedia.org/wiki/Pound_sterling29.95, or £5 less in kit form. The Sinclair calculators were successful because they were far cheaper than the competition; however, their design was flawed and their accuracy in some functions was questionable. The scientific
[20:44:02] <andypugh> programmable models were particularly poor in this respect, with the programmability coming at a heavy price in http://en.wikipedia.org/wiki/Transcendental_function accuracy
[20:48:33] <cradek> can one of you smart people fix the web bbs so it stops biting people in the ass when they use anything that's not 7 bit ascii?
[20:52:56] <jepler> I don't know enough about the web bbs to know how to fix it. For /docview/ I had to use HTML entities for all non-ASCII characters. all joomla pages are iso-8859-1, but I suspect that nowadays peoples browsers submit non-ascii text as UTF-8(?)
[20:53:00] <jepler> it's 2010, you know.
[20:54:04] <andypugh> It mde me very angry this evening.
[20:54:29] <cradek> well, web bbses suck, but sounds like ours sucks even more than average
[20:54:53] <andypugh> I typed an elipsis ( ... ) and somewhere along the line that got converted to something special and unprintable, so my long message to the bbs got hidden
[20:55:14] <JT-Work> I've looked for a setting but found none for that
[20:56:13] <andypugh> Seems bizarre that you can set the bbs to Russian, but can't even uese a £ sign, let alone cyrillic.