#emc-devel | Logs for 2010-12-23

[07:00:33] <mhaberler__> mhaberler__ is now known as mhaberler
[07:31:08] <psha> logger_dev: bookmark
[07:31:08] <psha> Just this once .. here's the log: http://www.linuxcnc.org/irc/irc.freenode.net:6667/emcdevel/2010-12-23.txt
[15:07:12] <psha> mhaberler: ping?
[15:07:28] <mhaberler> pong
[15:08:14] <psha> take a look into gladevcp-actions
[15:08:30] <psha> gladevcp configs/gladevcp/gaxis.ui
[15:08:42] <psha> with running axis/touchy instance
[15:13:47] <mhaberler> ok, it will take me an hour or two since I gotta run but bbl!
[15:15:12] <psha> ok
[17:00:34] <jepler> sigh, why won't somebody affected submit an actual patch for the pci_find_device problem?
[17:00:56] <jepler> i see stuff like this (this time in the gentoo build) and it irritates me
[17:00:56] <jepler> # replace pci_find_device to pci_get_device
[17:00:56] <jepler> find . -type f -print0 | xargs -0 sed -i 's:pci_find_device:pci_get_device:g'
[17:02:06] <jepler> (the right fix is not as simple as that, there's a reference counting issue)
[17:17:43] <psha> jepler: everyone are lazy :)
[17:17:51] <psha> mhaberler: i've added basic mdi widget
[17:18:21] <mhaberler> oh! ah!
[17:18:38] <psha> without macro substitution still
[17:18:46] <psha> jepler: i need your advice :)
[17:18:49] <mhaberler> fair enough
[17:19:33] <jepler> psha: I'll try to answer but please make the questione asy
[17:19:36] <jepler> easy
[17:19:39] <psha> consider 'MDI command' widget - something like halui MDI command pin
[17:20:02] <psha> in most cases user want to pass some parameters from different hal pins
[17:20:27] <psha> now only way i see is connecting them to motion dio/aio pins
[17:20:47] <psha> and then reading with M60(?) command
[17:20:50] <psha> M66
[17:21:23] <psha> another way is to give command as G1 X$(pin-name) and perform pin value substution prior to execution
[17:21:35] <psha> $() is only for example
[17:23:10] <psha> thus it offloads pin value lookup from interp and command is not depending on time-chainging values
[17:26:35] <jepler> psha: if so, consider using something based on string.substitute instead of rolling your own
[17:27:08] <psha> mostly i need some conclusion on sanity of this feature :)
[17:27:39] <jepler> >>> string.Template("G1 X$x").substitute({'x': 3.14})
[17:27:39] <jepler> 'G1 X3.14'
[17:27:54] <psha> ah, thanks
[17:28:35] <jepler> so you'll have some fun preparing the dictionary argument, but the rest doesn't seem too bad
[17:29:55] <psha> nice
[17:30:07] <psha> this will simplify building interfaces
[17:30:39] <psha> even i encountered two cases where this thing was needed
[17:30:42] <mhaberler> aja.
[17:30:54] <psha> btw that's why i've fixed O-calls %)
[17:31:23] <jepler> I thought cradek had recently hit something that still wasn't fixed about O-calls from MDI :(
[17:31:39] <cradek> no, it works fine
[17:31:49] <jepler> cradek: wasn't there something with a probing cycle?
[17:31:50] <cradek> it was a mis?feature of probing in mdi that was biting me
[17:31:51] <jepler> or did that get fixed
[17:32:01] <cradek> I "fixed" it
[17:32:04] <mhaberler> yes, as far as I can tell
[17:32:12] <cradek> I've been using it - and whee, it's nice
[17:32:46] <cradek> a certain probing error, which only happened when not in auto mode, was printing a message but not setting the abort flags correctly
[17:32:55] <mhaberler> psha: looked at hal_actions, some comments
[17:33:02] <cradek> this made it look extremely flaky, and of course I blamed psha :-)
[17:33:40] <jepler> cradek: that makes me happy
[17:34:04] <cradek> yes, me too
[17:34:41] <Jymmm> that you blamed psha?
[17:34:59] <Jymmm> ;)
[17:35:02] <cradek> I only blame psha when I can't realistically blame jepler
[17:35:20] <Jymmm> cradek: Gotcha, keep up the good work!
[17:35:48] <Jymmm> cradek: We can blame jthornton and SWPadnos for everything else
[17:36:17] <cradek> no, you can only blame SWPadnos for *not* doing things
[17:40:20] <Jymmm> Really? Hmmmm, I've been blaming him for everything all these years and it's worked out pretty well. Man dies on the moon, blame SWPadnos. Sky is falling, blame SWPadnos. Zombied processes, blame SWPadnos
[17:42:05] <jepler> on the news this morning, somebody with an axe to grind against ethanol used the example of rocket fuel in the challenger to justify his skepticism of ethanol as an auto fuel.
[17:42:19] <jepler> it wasn't clear exactly what his point was
[17:42:25] <cradek> yeah sounds like.
[17:44:41] <psha> jepler: template is nice until you need to substitute something like pin-name :)
[17:44:48] <jepler> "I think it is a complete bastardization of comparison to say, 'Well, NASCAR can use it, then the average driver can use it' -- no more than you can say, 'Look, if it is good enough for NASA to put rocket fule in Challenger, then we can put it in automobiles, too," Drevna says.
[17:44:59] <jepler> psha: I think that's ${pin-name}
[17:45:13] <psha> In [52]: string.Template('G0 X${pin.name}xx').safe_substitute({'pin.name':'100'})
[17:45:14] <jepler> Charles Drevna [is] president of the National Petrochemical and Refiners Association.
[17:45:16] <psha> Out[52]: 'G0 X${pin.name}xx'
[17:45:16] <cradek> it's pretty well established that the average driver can use ethanol
[17:45:37] <cradek> I mean, as well as anything else the average driver can manage to do
[17:45:50] <psha> with pin-name it's same...
[17:46:12] <jepler> >>> string.Template('${x.y}').substitute({})
[17:46:14] <jepler> ValueError: Invalid placeholder in string: line 1, col 1
[17:46:16] <jepler> ugh
[17:46:19] <psha> cradek: but after average driver use ethanol he's prohibited to use car
[17:47:45] <jepler> psha: subclass string.Template
[17:47:46] <jepler> >>> class HalTemplate(string.Template):
[17:47:46] <jepler> ... idpattern = '[_a-z][-._a-z0-9]*'
[17:47:48] <jepler> something like this ^^
[17:47:52] <jepler> >>> print HalTemplate('G0 X${pin.name}xx').safe_substitute({'pin.name':'100'})
[17:47:55] <jepler> G0 X100xx
[17:47:59] <jepler> bbl
[17:48:40] <psha> ah, thanks
[17:48:41] <psha> :)
[20:33:27] <dgarr> cradek: the error you mention was probably there before too
[20:33:43] <cradek> yes I agree
[20:34:00] <dgarr> i'll have to work later on cases like that
[20:34:02] <cradek> is the intent that EXISTS works like the rest of the unary words?
[20:34:24] <cradek> ok. do you want me to push the partial fix, or just hold off?
[20:34:24] <dgarr> the intent is much more limited than general purpose functions involved with arithemetic etc
[20:34:36] <dgarr> one moment please
[20:34:42] <cradek> np
[20:35:58] <cradek> maybe you can test line[i] after the for breaks?
[20:41:38] <dgarr> i updated the patch to improve two // comments in the file, this is all i have time for at the moment
[20:42:15] <dgarr> the intent is much more limited than general purpose functions involved with arithemetic etc
[20:50:57] <psha> mhaberler: here?
[20:55:53] <psha_> psha_ is now known as psha
[21:04:21] <psha> mhaberler_: i've added substitution for local panel pins
[21:06:32] <psha> it's in gladevcp-actions branch
[21:06:43] <psha> local pins may be given without prefix
[21:13:58] <psha> bb
[21:21:17] <dgarr> cradek: updated http://www.panix.com/~dgarrett/stuff/0001-interp-allow-comments-on-line-with-EXISTS-function.patch
[22:53:07] <mhaberler__> mhaberler__ is now known as mhaberler