Conversation with #inferno at Sat Dec 8 05:55:51 2012 on powerman@irc.freenode.net (irc) (06:13:21) powerman: leetspete: is it possible without 'load std' to force failed exit status? i.e. do what `status err` or `raise err` do (06:22:03) leetspete: powerman: I don't believe so. You could use kill, but ${pid} is from std. (06:22:29) powerman: how about `run` file with syntax error? :) (06:23:40) leetspete: Ha, fun. (06:24:31) powerman: didn't tried, but should work. am I pervert? :) (06:25:40) leetspete: I'd argue it's a little hacky, haha. But it doesn't seem to work, though. (06:25:52) leetspete: sh -c 'run /NOTICE; echo hi' (06:26:00) leetspete: You still get 'hi' at the end. (06:26:24) powerman: no, it work (06:26:30) powerman: try && echo hi (06:26:42) powerman: ; echo $status (06:26:42) powerman: parse error (06:27:02) leetspete: && relies on std, though. (06:27:31) leetspete: sh -c 'unload std; echo hi && echo yes' (06:28:59) powerman: ; run <{echo '{'} >[2]/dev/null && echo ok || echo err $status (06:28:59) powerman: err parse error (06:29:59) powerman: so, here it is: (06:30:01) powerman: false={run <{echo '{'} >[2]/dev/null} (06:30:19) powerman: ; $false && echo ok || echo err (06:30:19) powerman: err (06:30:26) leetspete: Ha, cool. (06:30:36) powerman: pure sh, no std (06:30:38) leetspete: But still...you can't do '&&' without std. (06:30:50) powerman: I can do my $if :) (06:32:45) leetspete: Acutally, thinking of that... (06:33:33) leetspete: false={x:='{';$x} (06:35:37) leetspete: Ah, doesn't work. (10:18:24) `jpi left the room (quit: Ping timeout: 244 seconds). (10:26:15) `jpi [~jpi@unaffiliated/pseud0cod3r] entered the room. (10:47:54) raphaelsc left the room (quit: Ping timeout: 240 seconds). (12:10:27) Fish left the room (quit: Quit: WeeChat 0.3.8). (12:26:50) rogpeppe [~rog@host-92-30-186-158.as13285.net] entered the room. (13:04:32) powerman: http://habrahabr.ru/post/161859/ my new article about inferno shell (in Russian) (13:07:14) rogpeppe left the room (quit: Ping timeout: 240 seconds). (14:31:05) Fish [~Fish@bus77-2-82-244-150-190.fbx.proxad.net] entered the room. (17:31:01) mennis left the room. (17:42:42) dreadlorde left the room (quit: Ping timeout: 264 seconds). (17:54:27) dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] entered the room. (18:31:45) anth_r: powerman: what's the motivation for avoiding std so completely? (18:32:14) C-Keen left the room (quit: Quit: system maintenance). (19:40:21) powerman: anth_r: motivation is to prove "pure sh" is really full-featured and complete language (19:52:51) powerman: btw, what's the point in removing "fail:" prefix from $status? this introduce inconsistency because script can't know is app failed with 'some' exception (and now in broken state) or 'fail:some', which is bad side, but what is good side of this feature? (19:53:24) powerman: slightly shorter pattern matching on $status?! (20:56:27) C-Keen [cckeen@pestilenz.org] entered the room. (20:58:03) raphaelsc [~raphaelsc@201-78-24-81.user.veloxzone.com.br] entered the room. (20:58:47) powerman: I wonder is there any chance shell is so slow because of wide usage of bufio? (21:01:41) powerman: my http://code.google.com/p/inferno-contrib-iobuf/ "On reading text file it's about 30-40 times faster than bufio, …", so maybe this is the bottleneck (21:03:08) powerman: I mean, there is no magic in iobuf, it's pure limbo module, no C inferno drivers to speedup like in cjson, so it's not "iobuf fast", it's probably "bufio slow" instead (22:01:10) fdd left the room (quit: Read error: Connection reset by peer). (22:01:35) fdd [fdd@2a02:2f02:8029:f005::bc18:492e] entered the room. (22:01:52) fdd left the room (quit: Changing host). (22:01:52) fdd [fdd@unaffiliated/fdd] entered the room. (23:11:53) anth_r: interesting, i'd not seen iobuf. i'll check that out. (23:28:25) powerman: it's probably worth try to take some simple but slow sh script (like leetspete's /man/*/INDEX generator) and rewrite all used apps (sh, sh-std, sort, tr, uniq) using iobuf, and then check how this affect script's speed (23:29:36) powerman: maybe it'll be simpler to re-implement bufio interface using iobuf, but this will add extra layer which may slow things down (00:28:44) Fish left the room (quit: Quit: WeeChat 0.3.8). (00:34:54) raphaelsc left the room (quit: Ping timeout: 240 seconds). (00:48:04) raphaelsc [~raphaelsc@187-127-238-162.user.veloxzone.com.br] entered the room. (00:54:42) raphaelsc left the room (quit: Ping timeout: 264 seconds). (01:06:57) raphaelsc [~raphaelsc@187-127-221-245.user.veloxzone.com.br] entered the room. (01:20:34) raphaelsc left the room (quit: Ping timeout: 240 seconds). (01:33:49) raphaelsc [~raphaelsc@187-127-71-64.user.veloxzone.com.br] entered the room. (03:08:55) powerman: I've translated article about shell to English: http://powerman.name/doc/Inferno/sh_en (03:09:42) powerman: but I'm afraid my English isn't real English and can be hard to understand :( (03:10:47) powerman: writing new texts easier than translating, even when translating own texts (03:15:39) ddf [fdd@2a02:2f02:8029:f005::bc18:492e] entered the room. (03:16:14) ddf left the room (quit: Changing host). (03:16:14) ddf [fdd@unaffiliated/fdd] entered the room. (03:18:34) fdd left the room (quit: Ping timeout: 240 seconds). (03:54:42) raphaelsc left the room (quit: Ping timeout: 264 seconds). (04:07:26) raphaelsc [~raphaelsc@187-127-90-133.user.veloxzone.com.br] entered the room. (05:52:26) The account has disconnected and you are no longer in this chat. You will automatically rejoin the chat when the account reconnects.