#emc-devel | Logs for 2006-01-18

[00:06:07] <rayh> back
[00:06:13] <SWPadnos> hiya
[00:06:37] <rayh> I did set line buffering on several tests.
[00:06:51] <rayh> Need to clean up this script a bit brb
[00:06:56] <SWPadnos> ok
[06:21:39] <SWPadnos> SWPadnos is now known as SWP_Away
[16:13:26] <SWP_Away> SWP_Away is now known as SWPadnos
[16:57:03] <rayh> SWPadnos: You available for a couple minutes. Got a thought on halcmd -skf.
[16:57:35] <SWPadnos> sure
[16:59:03] <rayh> I am able to loop the gets or read commands and see the output of a show xx
[16:59:29] <SWPadnos> but you can't tell when it's done?
[16:59:31] <rayh> What I can't do is quit the loop when it runs out of stuff.
[16:59:58] <rayh> could we/you put an eof at the end of each reply
[17:00:16] <SWPadnos> eof would be bad, I think. the pipe should close on EOF
[17:00:51] <rayh> We can define a different eof as far as the channel is concerned.
[17:00:59] <SWPadnos> ah
[17:01:19] <SWPadnos> there should be an option to print the prompt while in script mode - that was something that jmk and I had discussed
[17:01:21] <rayh> something that a terminal might ignore
[17:01:26] <SWPadnos> when you get the prompt, the output is over
[17:02:01] <rayh> prompt? like halcmd:
[17:02:05] <SWPadnos> yes
[17:02:19] <SWPadnos> you still want the other features of sript mode, so you don't want to leave out the '-s'
[17:02:37] <SWPadnos> it's aeasy to change so that the prompt is still printed in script mode though
[17:02:57] <rayh> How about a % for -s prompt
[17:03:03] <SWPadnos> I can tell you how to do it in 1 minute (can't do it myself, since the emc machine isn't on)
[17:03:08] <SWPadnos> that would work as well
[17:03:14] <rayh> k
[17:04:00] <SWPadnos> load up src/hal.utils/halcmd.c
[17:04:36] <SWPadnos> hi Alex
[17:04:53] <rayh> k
[17:05:12] <SWPadnos> two changes to make
[17:05:28] <SWPadnos> the first is at lines 307-309
[17:05:38] <SWPadnos> comment those lines out
[17:05:58] <SWPadnos> (should be: if scriptmode !=0 promptmode=0)
[17:06:31] <rayh> is // okay
[17:06:35] <SWPadnos> yes
[17:06:40] <rayh> done
[17:07:10] <SWPadnos> ok. go to line 352, and change it from this:
[17:07:14] <SWPadnos> rtapi_print("halcmd: ");
[17:07:18] <SWPadnos> to this:
[17:07:50] <SWPadnos> rtapi_print(scriptmode ? "% " : "halcmd: ");
[17:08:15] <SWPadnos> heh - that looks almost as bad as ASM in gcc ;)
[17:09:16] <rayh> k
[17:09:29] <SWPadnos> save, and recompile
[17:10:53] <rayh> error 2
[17:10:56] <rayh> phone
[17:10:59] <SWPadnos> ok
[17:11:10] <SWPadnos> error 2 is "phone"?
[17:11:53] <rayh> halcmd.c:477: parse error before `if'
[17:12:45] <SWPadnos> did you get all 3 lines (including the close curly brace) at 307-309 ?
[17:13:26] <SWPadnos> you can just delete those lines instead
[17:14:36] <SWPadnos> oops - the % probably needs a \ in front of it:
[17:14:54] <SWPadnos> rtapi_print(scriptmode ? "\% " : "halcmd: ");
[17:15:02] <SWPadnos> or %%
[17:15:59] <rayh> k
[17:17:25] <SWPadnos> I shouldn't code before coffee. change it like so:
[17:17:47] <SWPadnos> rtapi_print(scriptmode ? "\%\n" : "halcmd: ");
[17:18:01] <SWPadnos> that'll make it work with gets, since you need the newline
[17:18:03] <rayh> It compiled with the previous.
[17:18:10] <SWPadnos> compiled, but won't work ;)
[17:19:05] <rayh> fixed
[17:19:17] <SWPadnos> that last line will print a percent sign, then a newline as the "finished" signal (or prompt)
[17:23:32] <rayh> compiled
[17:28:14] <SWPadnos> cool
[17:34:43] <rayh> rayh@ray64:~/emcdevelop/emc2$ bin/halcmd -skf
[17:34:43] <rayh> %
[17:34:43] <rayh> show sig M
[17:34:44] <rayh> bit FALSE MySig1
[17:34:44] <rayh> bit FALSE MySig2
[17:34:45] <rayh> halcmd:
[17:35:02] <SWPadnos> oops - there are two prompt prints - hold on a sec.
[17:36:02] <SWPadnos> line 467 (unless you deleted the other 3 lines)
[17:36:20] <SWPadnos> make it the same as line 352
[17:36:31] <rayh> k
[17:37:03] <SWPadnos> (that last rtapi_print line I pasted, in case the line numbers don't match up)
[17:38:36] <SWPadnos> you may not get a prompt after you send a "quit" line, by the way
[17:38:50] <SWPadnos> not that you'd really need it in that instance
[17:45:29] <rayh> No difference with the fconfigure still locks up during a gets.
[17:45:49] <SWPadnos> at the end of the output?
[17:45:49] <rayh> I could use a string search command I suppose but that takes time.
[17:47:50] <rayh> It does show the % as an eof
[17:48:05] <rayh> * rayh goes of to play with the new toy.
[17:48:13] <SWPadnos> ok. does the fgets hang after the halcmd output?
[17:50:48] <rayh> fgets??
[17:50:53] <SWPadnos> sorry - gets
[17:51:07] <SWPadnos> fgets in c "get string from file"
[17:51:17] <SWPadnos> rather than stdin
[17:51:45] <rayh> I knew I'd heard of it. Yes. I am using blocking and line buffering.
[17:53:21] <SWPadnos> when does the gets hang? is it waiting for more input at the end of the halcmd output, or is there something else going on?
[17:57:12] <rayh> still testing to see where.
[17:57:16] <SWPadnos> ok
[18:21:04] <rayh> If I don't use fconfigure -eofchar {"%" {}}
[18:21:31] <rayh> I can pick up the output until it runs out of data.
[18:21:38] <SWPadnos> you don't want to treat it as an eof, since that would normally cause the file handle to be closed
[18:22:00] <SWPadnos> you should read a line, and then stop reading if you see that the line returned is "%"
[18:22:04] <rayh> If I use the % then it does not return anything.
[18:22:25] <SWPadnos> hmmm
[18:23:23] <rayh> Yes I can test for % but that will be a lot of checking. I was hoping that there was a channel based approach.
[18:23:41] <SWPadnos> yes - that would be better
[18:23:59] <SWPadnos> I'm not sure how tcl uses the EOF char - there may be a mode to tell it not to close the file at eof
[18:24:06] <SWPadnos> (though that would be weird)
[18:25:57] <rayh> The % does not close the channel.
[18:26:03] <SWPadnos> ok - that's good
[18:26:32] <SWPadnos> what did you mean when you said "if I use % then it does not return anythinig"?
[18:26:40] <SWPadnos> use % where, and what is "it"?
[18:45:30] <rayh> as the fconfigure eol
[18:45:39] <rayh> eof
[18:46:21] <rayh> the command line is fconfigure $tmp -buffering line -blocking yes -eofchar {{%} {}}
[18:46:40] <rayh> and with it I get nothing returned from halcmd.
[18:46:48] <SWPadnos> what's the second curly brace in the eofchar param?
[18:47:25] <SWPadnos> ok - outgoing
[18:49:38] <rayh> right.
[18:50:01] <rayh> I guess I've got to quit trying and go to something useful.
[18:50:14] <SWPadnos> does the gets block?
[18:50:29] <rayh> Yes most ways it will
[18:50:30] <SWPadnos> ie, do you get no return from gets, or does gets return nothing?
[18:50:58] <SWPadnos> can you pop the source into the dropbox or something - I may be able to take a look later today
[18:51:04] <rayh> It will block with some combinations of fconfigure and it will return nothing on some.
[18:51:33] <rayh> I can certainly send you the test file I'm using if that would help.
[18:51:59] <rayh> dcc would be easy but i can email as well.
[18:52:01] <SWPadnos> it wouldn't help this minute, since I'm not on a Linux machine (and I don't know what hairy translations will be done going from Windows -> linux)
[18:52:08] <SWPadnos> email would be fine
[18:52:16] <SWPadnos> spadnos at sover dot net
[18:52:41] <rayh> k I'll get it to you.
[18:53:00] <SWPadnos> thanks - I'll see if I can figure out anything (considering that I'm a TCL newbie ;) )
[18:55:07] <rayh> Thanks. I'll play for a bit yet.
[18:55:10] <SWPadnos> ok
[19:29:17] <rayh> borked emc reboot time
[19:43:23] <alex_joni> hello
[19:43:41] <SWPadnos> hi
[19:43:48] <alex_joni> :P
[19:43:52] <SWPadnos> :P
[19:43:52] <alex_joni> what's up?
[19:44:25] <SWPadnos> not too much. Ray's trying to get tcl to accept halcmd output reliably (piped)
[19:46:46] <alex_joni> aha
[20:23:37] <SWPadnos> argh
[20:25:01] <SWPadnos> this BDI vs. emc2 war is getting very annoying
[20:25:25] <cradek> I agree
[20:25:48] <cradek> I miss the time we were all working together
[20:26:03] <alex_joni> SWPadnos: ditto
[20:26:10] <SWPadnos> I'm having a hard time finding the right words to convey the message that it's FUCKING STUPID for everyone to keep acting like 5-year-olds
[20:27:23] <cradek> surely not everyone is doing that
[20:27:37] <SWPadnos> not everyone, but close, I'd say
[20:28:05] <SWPadnos> not necessarily at present, but at some time in this "conflict"
[20:48:46] <alex_joni> SWPadnos: what conflict?
[20:48:46] <alex_joni> :D
[20:49:23] <SWPadnos> yeah - har har ;)
[20:51:44] <alex_joni> it's a small dispute at most
[20:55:40] <SWPadnos> well, there's a general attitude that the BDI and emc2 projects are adversaries, and in "competition"
[20:55:59] <alex_joni> probably "perception" is a better word
[20:56:13] <alex_joni> I'm working on emc2, and I'm not trying to compete with anyone
[20:56:22] <SWPadnos> I agree
[20:56:49] <SWPadnos> on this side, there's an attitude that we can't ask Paul for anything (libraries, ideas for kernelspace issues, etc)
[20:57:03] <SWPadnos> packaging ...
[20:57:09] <alex_joni> well.. I did ask in the past, and always got a decent answer
[20:58:14] <SWPadnos> me, too - I asked about the small libs for KDE-style config files, and got a prompt reply
[20:58:28] <SWPadnos> (the library look unmaintained, so it's probably not a good thing for us to use)
[20:59:21] <alex_joni> right, he can be a very good sport (sometime)
[20:59:37] <SWPadnos> well, everyone can be an asshole sometimes :)
[20:59:56] <alex_joni> it's just a matter of inner diameter
[21:00:02] <alex_joni> ROFL
[21:00:21] <SWPadnos> the list mails are just annoying. "of course this is possible" (but I'm not going to tell you how I did it) ...
[21:02:33] <alex_joni> finally getting cable at home (for internet access I mean)
[21:02:42] <SWPadnos> that should be nice
[21:02:49] <SWPadnos> high speed is so necessary these days ;)
[21:02:54] <alex_joni> yeah, not that expensive either
[21:03:01] <alex_joni> 1024kbps for 19EUR
[21:03:16] <SWPadnos> not bad
[21:03:31] <alex_joni> * alex_joni longs to move to taiwan
[21:03:32] <SWPadnos> that's about the same as here - $30 for 2MBits/s
[21:03:39] <SWPadnos> yeah -fiber 100mbit
[21:03:45] <alex_joni> 54Mbit for 40$
[21:05:28] <SWPadnos> there's only one *fast* service in the US at the moment, FIOS from Verizon (other than real connections, like DS3 and the like)
[21:06:07] <SWPadnos> I think that's 15 mbits/s
[21:06:15] <alex_joni> heh.. I'd like a NOC in my backyard
[21:06:20] <alex_joni> btw, do you know 1&1 ?
[21:06:25] <SWPadnos> 1
[21:06:36] <alex_joni> big server farm in germany
[21:06:44] <SWPadnos> ah - never heard of them
[21:06:55] <SWPadnos> I've only heard of t-online (now onlinehome, I think)
[21:08:26] <alex_joni> t-online is for access
[21:08:31] <SWPadnos> yep
[21:08:34] <alex_joni> 1&1 is for renting servers & webspae
[21:08:36] <alex_joni> space
[21:08:49] <SWPadnos> ah. I may have heard of them
[21:08:59] <SWPadnos> why do you ask?
[21:09:01] <alex_joni> just read an article about them :D
[21:09:05] <alex_joni> NICE
[21:09:06] <SWPadnos> ah
[21:09:14] <alex_joni> 2 million kW power consumption / month
[21:09:20] <alex_joni> imagine that
[21:09:30] <SWPadnos> 2M KW?
[21:09:35] <alex_joni> yup
[21:09:35] <SWPadnos> KWh?
[21:09:39] <alex_joni> yup
[21:09:45] <SWPadnos> that's a bunch
[21:10:08] <alex_joni> they need to announce the power grid when they are doing tests to come offline
[21:10:20] <alex_joni> because the excess in energy brings everything down in the area
[21:10:21] <alex_joni> :D
[21:10:24] <SWPadnos> heh
[21:10:34] <SWPadnos> I've done some software for a local company like that
[21:10:39] <alex_joni> they also have big diesel power gens.
[21:10:50] <alex_joni> 2000 l/h diesel consumption
[21:11:00] <SWPadnos> they make large power supplies, and tap directly to the 13.2kV lines
[21:11:25] <SWPadnos> they had an oscillation in a 4MW supply, and it caused lights to flicker on the entire trunk
[21:11:34] <SWPadnos> for about 5 miles
[21:12:34] <alex_joni> heh.. I imagine
[21:15:06] <alex_joni> care for a flash?
[21:15:12] <alex_joni> http://index.hu/homar/media/honda_civic_choir.swf
[21:17:51] <SWPadnos> heh - funny
[21:18:05] <SWPadnos> I winder if the people actually made all those sounds
[21:18:07] <SWPadnos> wonder
[21:20:34] <alex_joni> probably not..
[21:20:43] <alex_joni> omg, I'm reading bash.org again :D
[21:21:02] <SWPadnos> heh - BOFH! (or are those the irc logs?)
[21:22:03] <alex_joni> yeah..
[21:22:17] <alex_joni> let me paste an example:)
[21:22:26] <SWPadnos> I'm looking at the top 100 now ;)
[21:22:36] <SWPadnos> <erno> hm. I've lost a machine.. literally _lost_. it responds to ping, it works completely, I just can't figure out where in my apartment it is.
[21:22:38] <alex_joni> ok ;)
[21:25:12] <alex_joni> http://www.bash.org/?515093 ROFLMAO
[21:25:30] <SWPadnos> yep - that's an old one, but still funny
[21:26:29] <SWPadnos> http://bash.org/?602224
[21:28:24] <alex_joni> <@AntiHeiss> it was a girl cop, she was pretty cute too
[21:28:26] <alex_joni> <@AntiHeiss> she said anything you say can and will be held against you....he sat there for a while and said 'tits'
[21:28:34] <SWPadnos> heh
[21:29:11] <SWPadnos> <Sceptic> I am not going to argue mideast history and politics here. I have better, more useful things to do--such as draining the ocean with a spoon.
[21:29:13] <SWPadnos> <David> Just out of interest, where will you be putting the water?