Conversation with #inferno at Mon Nov 29 22:37:51 2010 on powerman-asdf@irc.freenode.net (irc) (22:49:52) KillerX [~anant@nat/mozilla/x-xqpcyuypyupaiivu] entered the room. (01:14:20) Fish left the room (quit: Quit: So Long, and Thanks for All the Fish). (04:29:33) anth_x left the room (quit: Quit: Leaving.). (04:30:01) anth_x [none@cpe-76-190-129-110.neo.res.rr.com] entered the room. (05:45:44) KillerX left the room (quit: Quit: KillerX). (07:09:34) anth_x left the room (quit: Ping timeout: 260 seconds). (07:09:40) anth_r left the room (quit: Ping timeout: 276 seconds). (07:16:58) anth_x [none@cpe-76-190-129-110.neo.res.rr.com] entered the room. (08:34:32) Gegemon [~ynv@mx1.airis.ru] entered the room. (09:53:31) robot12 [~kazzhilki@proxy10.ts.fujitsu.com] entered the room. (10:26:02) jumzi [~jumzi@c-89-233-234-125.cust.bredband2.com] entered the room. (10:26:16) bvalek2 [c3e41404@gateway/web/freenode/ip.195.228.20.4] entered the room. (10:56:10) anth_x left the room (quit: Ping timeout: 240 seconds). (11:06:52) anth_x [none@cpe-76-190-129-110.neo.res.rr.com] entered the room. (12:39:48) Fish [~Fish@9fans.fr] entered the room. (13:49:56) anth_x left the room (quit: Ping timeout: 240 seconds). (13:55:30) anth_x [none@cpe-76-190-129-110.neo.res.rr.com] entered the room. (14:14:37) vpm left the room (quit: Remote host closed the connection). (14:14:43) vpm [~vpm@reverse-94.fdn.fr] entered the room. (16:51:34) Gegemon left the room (quit: Quit: Leaving.). (17:08:15) robot12 left the room. (17:59:28) bvalek2 left the room (quit: Quit: Page closed). (19:02:16) bvalek2 [5985141d@gateway/web/freenode/ip.89.133.20.29] entered the room. (19:39:44) mjl- left the room (quit: Ping timeout: 240 seconds). (19:52:55) mjl- [~mjl@brutus.ueber.net] entered the room. (20:05:41) KillerX [~anant@nat/mozilla/x-mamlmumlzjtyunyq] entered the room. (20:48:57) anth_x: so, anyway. (20:49:39) anth_x: this week i'm going to briefly try the "judicious use of prints" debug method and see if i can get anything good to show up on the serial console (which works in the 3e kernel). (20:49:55) anth_x: if i can't get any good info there, i'll spend the time doing the graphics stuff properly. (20:50:09) vsrinivas: okay. os/pc has noscreen.c iirc in 4e, fwiw.... (20:50:26) anth_x: (which i'd like to get to eventually, but isn't a priority for the uses i have in mind) (20:50:29) vsrinivas: (i don't remember if that does pc text mode or no output) (20:50:48) anth_x: from memory, i think that's no output. which is good here. (20:54:23) mjl- left the room (quit: Ping timeout: 240 seconds). (21:01:03) mjl- [~mjl@brutus.ueber.net] entered the room. (21:01:53) vsrinivas: how much else did you have to bring forward to 4e? (21:21:37) bvalek2 left the room (quit: Quit: Page closed). (21:57:30) anth_x: not as much as i thought. the 4e port was in better shape than i'd realized (or looks that way; ask me again after i get it booting for real). (21:57:43) anth_x: devlance, the ethernet driver. (21:58:09) anth_x: a few other things weren't right, but i don't recall off-hand. (23:03:50) KillerX left the room (quit: Quit: KillerX). (23:22:42) KillerX [~anant@nat/mozilla/x-kpeiuzcngdeasiaa] entered the room. (23:38:29) KBme: more people behind nat? is that even possible? (23:38:41) KBme: there are entire countries that are behind nat (00:20:36) MrWGW left the room (quit: Ping timeout: 250 seconds). (00:22:01) MrWGW [MrWGW@74.124.192.8] entered the room. (01:51:00) KillerX left the room (quit: Quit: KillerX). (01:59:51) KillerX [~anant@nat/mozilla/x-qhgcgdijzfcsvolv] entered the room. (02:02:26) vpm left the room (quit: Ping timeout: 250 seconds). (02:04:50) Fish left the room (quit: Quit: So Long, and Thanks for All the Fish). (05:46:09) vpm [~vpm@reverse-94.fdn.fr] entered the room. (06:41:31) anth_x left the room (quit: Quit: Leaving.). (06:44:17) robot12 [~kazzhilki@proxy10.ts.fujitsu.com] entered the room. (07:07:26) anth_r [none@cpe-76-190-129-110.neo.res.rr.com] entered the room. (07:07:32) anth_r left the room (quit: Remote host closed the connection). (07:13:27) anth_r [none@cpe-76-190-129-110.neo.res.rr.com] entered the room. (07:47:08) bvalek2 [c3e41404@gateway/web/freenode/ip.195.228.20.4] entered the room. (08:34:35) Gegemon [~ynv@mx1.airis.ru] entered the room. (09:42:52) vsrinivas left the room (quit: Read error: Connection reset by peer). (11:44:16) powerman: i'm thinking about implementing 9p for perl with non-blocking i/o support, for using in epoll/event-loop -based applications (11:45:08) powerman: while implementing 9p itself isn't a problem at all, using it looks like a nightmare (11:47:39) powerman: thing is, 9p is too low-level, to do anything useful (like reading file or accessing usual hierarchy with clone/ctl/data) user will have to do a lot of small operations (walk/open/read/write) (11:48:22) powerman: in non-blocking/event-based world this mean user will have to do these operations one-by-one, providing special callback to each (11:49:07) powerman: keeping in mind need to handle possible errors for each operation… :( (11:57:13) powerman: reading file to eof become something like http://pastebin.ca/2007555 (11:57:35) powerman: and this is without actual errors handling and processing data (12:04:51) powerman: probably coroutines may solve interface usability issue, but as far as I understood coroutines was added to perl (by CPAN module Coro) as amazingly bold hack, and I think it will be irresponsibly to use it in production code :( (12:06:37) mjl-: and using threads instead? or is that too heavy-weight in perl? (12:07:14) powerman: threads in perl is dead. too slow for anything than helloworld (12:08:55) powerman: only idea I've for now is provide some wrapper functions for popular tasks - like one which will read given file to EOF, hiding all huge amount of callbacks inside, and requiring only callback from user, which will be called either with error (happens on any walk/open/read) or full file contents. and probably similar wrappers for clone/ctl/data, etc. (12:10:11) mjl-: btw, i've seen (had to replace) perl code that was using some form of coroutines. i think with anonymous code blocks or something. it wasn't pretty, or maintainable (they had their own scheduler!), so i cannot recommend doing something like that... (12:10:46) powerman: yep, it's Coro CPAN module I mentioned above (12:11:05) powerman: bold hack. amazing to look at, but too scary to use in production (12:14:36) powerman: mjl-: btw, I remember some cgi-related limbo modules on your site. is it effective to implement fastcgi with complex html/email templates in limbo? (12:15:34) mjl-: i haven't done anything very complex. but i have done stuff with templates, so yes (12:15:57) mjl-: i have some code for templates and scgi btw (12:16:30) powerman: our current html templates contain perl code… probably it's possible to implement similar level of flexibility with limbo (compile templates to limbo modules after search&replace conversion of template code to limbo code) (12:17:09) mjl-: yes, should be possible. i think you'll have to write something. i'm not _very_ happy with what i've got. (12:17:16) mjl-: http://www.ueber.net/code/r/web <- it's in there. (12:17:17) powerman: and no access to mysql, I suppose? (12:18:33) mjl-: nopes (12:18:47) powerman: we using nosql in many cases (actually, mostly plain json files), but sometimes sql is better solution (large stat databases for analyse, etc.) (12:18:49) mjl-: should not be too hard to write. i think maht once wrote code to access postgresql (12:18:59) mjl-: in pure limbo (12:19:36) mjl-: btw, some examples of the template thing i have, this is a template: http://www.ueber.net/hg/lyricd/files/tip/lib/template/lyricscgi/intro (if you strip off "intro", you'll see other files) (12:19:49) mjl-: and this is code that uses templates: http://www.ueber.net/hg/lyricd/files/tip/appl/cmd/lyricscgi.b (12:20:03) mjl-: it is probably far too rudimentary for you (12:21:26) powerman: yep. i see no if/for (12:23:29) mjl-: i think i had that (12:23:47) mjl-: http://www.ueber.net/hg/web/files/tip/appl/lib/template.y (12:23:55) mjl-: that's the template parsing library (12:23:55) powerman: maybe, but you probably don't use it in these templates :) (12:27:05) powerman: I prefer to compile templates to native code. I.e. transform "Hi, <%= $user %>!" to "sub tmpl { print 'Hi, '; print $user; print '!'; }", eval/compile it and run later to render template. (12:28:35) powerman: Except downside of lower security (designer can add <% system('rm -rf /') %> inside template) it's most simple, flexible and in most cases fastest way to go. (12:31:41) powerman: But implementing same for limbo, keeping in mind it's strong typing language, may be a little tricky. (12:41:11) powerman: i see node.js use same terrible chains of callbacks for accessing files http://nodejs.org/docs/v0.3.1/api/fs.html (12:44:03) powerman: looks like non-blocking i/o with events is dead-end when we need a lot of small operations depending on each other (like walk-open-read-read-read-seek-write-write-clunk) (12:48:53) Fish [~Fish@9fans.fr] entered the room. (13:29:17) mjl-: jups (13:29:37) mjl-: i think (hope) the only reason those js guys use all that asynchronous stuff is that they don't have any synchronous options... (15:03:43) powerman: can someone help me with strange namespace-related issue, please? (15:03:43) powerman: 1) i've app A which should work 24x7, and which need data from remote service X (15:03:43) powerman: 2) remote service X registered in inferno's registry R (which also run on remote server) (15:03:43) powerman: 3) so, A should keep connection to R, and remount it to /mnt/registry if needed (15:03:43) powerman: 4) also A should monitor registry events to notice changes in service X address (X listen on 'tcp!*!0', so port changes on restart) (15:03:43) powerman: to do "3)" I use "retrymount -A tcp!myhost!registry /mnt/registry" https://code.google.com/p/inferno-contrib-retrymount/source/browse/appl/cmd/retrymount.b (15:03:43) powerman: to do "4)" I use RegMonitor https://code.google.com/p/inferno-contrib-regmonitor/source/browse/appl/lib/regmonitor.b (15:04:05) powerman: can someone help me with strange namespace-related issue, please? (15:04:10) powerman: 1) i've app A which should work 24x7, and which need data from remote service X (15:04:16) powerman: 2) remote service X registered in inferno's registry R (which also run on remote server) (15:04:21) powerman: 3) so, A should keep connection to R, and remount it to /mnt/registry if needed (15:04:26) powerman: 4) also A should monitor registry events to notice changes in service X address (X listen on 'tcp!*!0', so port changes on restart) (15:04:31) powerman: to do "3)" I use "retrymount -A tcp!myhost!registry /mnt/registry" https://code.google.com/p/inferno-contrib-retrymount/source/browse/appl/cmd/retrymount.b (15:04:37) powerman: to do "4)" I use RegMonitor https://code.google.com/p/inferno-contrib-regmonitor/source/browse/appl/lib/regmonitor.b (15:06:14) powerman: problem is: after R restarts, and retrymount re-mounts /mnt/registry, the RegMonitor got error (correct), wait 1 second (correct) and try to connect to registry again using standard Registry.new(nil) at https://code.google.com/p/inferno-contrib-regmonitor/source/browse/appl/lib/regmonitor.b#49 (15:06:56) powerman: but Registry.new(nil) failed to sys->open('/mnt/registry/index') with "does not exist" in %r (15:07:48) powerman: when I connect to this app using rstyx, or when I just run it in background, then from console I'm able to do 'ls /mnt/registry' after retrymount will re-mount /mnt/registry (15:08:10) powerman: no one of these modules/applications do pctl(FORKNS) (15:09:04) powerman: so, RegMonitor expected to see changes in fs after remounting /mnt/registry, just like shell/rstyx see it, but it somehow got "not found" error (15:10:39) powerman: the /prog/1/ns and /prog/53/ns differs (53 is RegMonitor's pid): (15:13:55) powerman: here is diff: http://pastebin.ca/2007646 (15:14:39) powerman: after starting retrymount I also use 'memfs -b /mnt', but this shouldn't harm anything, I think (15:18:40) powerman: app A which use RegMonitor use sys->pctl(Sys->NEWPGRP|Sys->FORKFD|Sys->FORKENV, nil) before calling regmonitor… is this may somehow disconnect it from common namespace (where /mnt/registry will be re-mounted later)? (15:33:38) mjl-: powerman-asdf: it seems memfs does a pctl NEWNS (15:33:41) mjl-: unless you give option -s (15:33:47) mjl-: perhaps that is it? (15:34:08) powerman: nope. $ grep pctl lib/memfs.b (15:34:08) powerman: sys->pctl(Sys->FORKFD, nil); (15:34:08) powerman: sys->pctl(Sys->NEWFD, 0::1::2::nil); (15:34:37) mjl-: oh, i though appl/cmd/memfs.b (15:34:58) mjl-: thought* (15:35:01) powerman: oh, you right! (15:36:49) powerman: so, if I'll start memfs before retrymount it should solve this issue… (15:37:55) mjl-: hopefully :) (15:38:56) powerman: mjl-: no, this doesn't work :( (15:39:21) powerman: the retrymount and RegMonitor processes still has different nsgrp (15:41:45) powerman: hm. looks like I solved it by moving retrymount from ~/profile to ~/startapp.sh (15:42:28) powerman: the idea was to do 'memfs -b /mnt' and 'retrymount /mnt/registry' in ~/profile, because they are general enough (15:42:47) powerman: and then start everything needed by some app from separate .sh file (15:46:33) powerman: hm. looks like starting new .sh script result in NEWNS. that have sense. (16:06:39) powerman: nice. to solve this bug it was enough to replace first line in startapp.sh from '#!/dis/sh' to '#!/dis/sh -n' (16:09:41) mjl-: :) (16:12:34) powerman: subtle enough issue, but I think this class of issues able to catch us only once. next time I'll be aware of it! :) (16:54:51) Gegemon left the room (quit: Quit: Leaving.). (17:28:21) mjl-: i need to do something about wm/man. it is so slow... (18:13:52) bvalek2 left the room (quit: Quit: and God said: let the torsion tensor be zero for all times, and behold, ice-cream was created! God tasted it, and saw that it was good). (19:43:57) bvalek2 [5985141d@gateway/web/freenode/ip.89.133.20.29] entered the room. (20:07:29) anth_x [none@cpe-76-190-129-110.neo.res.rr.com] entered the room. (20:09:00) KillerX left the room (quit: Quit: KillerX). (20:09:24) KillerX [~anant@nat/mozilla/x-iwhwrjpciavoskro] entered the room. (23:57:53) bvalek2 left the room (quit: Quit: I'll be Bach). (00:27:54) The account has disconnected and you are no longer in this chat. You will be automatically rejoined in the chat when the account reconnects.