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