Conversation with #inferno at Wed Sep 16 20:01:35 2009 on powerman-asdf@irc.freenode.net (irc) (20:16:09) gualteri left the room (quit: "Leaving."). (20:57:45) rapidfx left the room (quit: "Leaving."). (21:41:48) mennis left the room (quit: ). (22:52:42) Fish left the room (quit: Remote closed the connection). (22:53:51) Fish [n=Fish@AVelizy-152-1-43-27.w82-120.abo.wanadoo.fr] entered the room. (00:50:55) mjl-: hmm (00:51:03) mjl-: how does one use restricted ports with sys-dial(2)? (01:10:47) anothy_x: inferno does not restrict ports. (01:11:20) anothy_x: if you're in emu and the underlying OS does, you'll need to convince the host OS to let you do it. (01:11:50) anothy_x: in most cases, that involves running as root, unfortunately, because unix is dumb and thinks it's 1980 on a closed campus network. (01:29:23) Fish- [n=Fish@AVelizy-152-1-88-15.w86-217.abo.wanadoo.fr] entered the room. (01:30:21) mjl-: anothy_x: i fixed my openbsd kernel to allow that (01:30:45) mjl-: but, i don't know which args to pass to sys->dial to make it do a "connect ip!port!r" to the tcp ctl... (01:30:57) mjl-: sys->dial("tcp!hostname!port!r", nil) doesn't work (01:31:16) Fish- left the room (quit: Read error: 104 (Connection reset by peer)). (01:37:37) anothy_x: oh, right. dial, not listen. sorry. (01:41:58) Fish left the room (quit: Read error: 110 (Connection timed out)). (01:50:43) mjl-: i'll have a look at it tomorrow (01:51:07) mjl-: i had the linux nfsd set to "insecure", meaning it doesn't check the connections source port... (01:51:13) mjl-: quite sad to have to do that today (01:51:24) mjl-: http://www.ueber.net/code/r/nfssrv ← just added an nfs (v3) client to that (02:08:44) me__ [n=me@c-68-39-87-198.hsd1.nj.comcast.net] entered the room. (03:59:18) megaboz [i=none@201.80.224.28] entered the room. (07:50:34) eno__ [n=eno@adsl-70-137-149-10.dsl.snfc21.sbcglobal.net] entered the room. (08:00:50) eno left the room (quit: Read error: 110 (Connection timed out)). (08:42:18) rapidfx [n=host666@vl-cen-ce1.avtlg.ru] entered the room. (10:42:42) Fish [n=Fish@AVelizy-152-1-88-15.w86-217.abo.wanadoo.fr] entered the room. (10:49:43) mjl-: good day all (10:53:50) gualteri [n=speiro@158.42.54.58] entered the room. (11:21:57) Fish left the room (quit: Remote closed the connection). (11:22:33) paigeadele is now known as skriptkitteh (11:23:03) Fish [n=Fish@AVelizy-152-1-88-15.w86-217.abo.wanadoo.fr] entered the room. (12:08:32) maht_ is now known as mahtawkmeister (12:12:49) andguent: what do keys do i press to end a running program in wm/sh ? (12:13:05) andguent: DEL is not working (12:13:29) mjl-: there is no key (12:13:40) mjl-: open a new window and kill the hanging program (12:13:45) mjl-: yes, that's quite a annoying (12:13:51) andguent: hmkay (12:13:56) mjl-: -a (12:14:00) andguent: i just keep a taskmanager open then... (12:14:14) mjl-: that should work (12:14:39) mjl-: it's annoying btw, that threads show up with the module they are currently running code in, not the name of the module that has the init function, i.e. the name of the program (12:15:11) andguent: really? (12:15:29) mjl-: yeah (12:15:37) andguent: i mean my program was waiting in sys->listen (12:15:43) mjl-: i think so... (12:15:43) andguent: but the taskmanager showed my module (12:15:50) mjl-: hmm, perhaps i'm mistaken (12:16:22) mjl-: i often see progs running in Bufio (12:16:30) mjl-: i'm sure there is no program called Bufio :) (12:16:34) andguent: heh (12:16:46) andguent: may be a corner case...who knows :D (12:16:52) mjl-: yeah :) (12:17:14) mjl-: it would be useful to know both of course. where the prog is executing now, and where it came from. especially for broken progs (12:17:33) andguent: debug it? (12:17:41) mjl-: jups, that works (12:17:46) mjl-: but i'm being lazy ;) (12:18:23) mjl-: andguent: btw, do you still have plans for writing a receive-only smtpd? (12:18:44) andguent: that's what i am currently doing (12:18:49) mjl-: cool! (12:18:50) andguent: guess why my program waited in a listen :D (12:18:53) mjl-: :D (12:19:04) andguent: don't expect much (12:19:12) andguent: first time i ever use inferno or limbo for that matter (12:19:31) mjl-: hah, nice (12:19:52) mjl-: well, if you have questions on how to do things let me know (12:20:03) andguent: sure :) (12:22:43) andguent: i got this "inferno programming with limbo" book...pretty handy for starters (12:24:02) mjl-: yeah, that's nice (12:27:08) gualteri: lookman(1) & sig(1) are handy too (12:39:38) mahtawkmeister: and if you dont use channels, pick, spawn or alt then you've failed ;) even if it works ok (12:39:45) andguent: bufio is the right way for parsing my lines, right? (12:40:31) mjl-: jups (12:40:42) andguent: hm yet gets will not really do it (12:40:51) andguent: smtp is \n\r (12:40:53) mjl-: b := bufio->fopen(conn.dfd); s := b.gets('\n"); ... (12:40:59) mjl-: yeah, that's annoying (12:41:05) mjl-: \r\n i bet (12:41:19) mahtawkmeister: be careful, \n\r is nota always used (12:41:48) mjl-: i bet \n is common too. i usually read until \n. then strip the \n and a \r if is before the \n. giving the line without either \n or \r\n (12:42:01) andguent: yeah something like that... (12:42:04) andguent: pretty ugly though (12:42:10) maht-wrk [n=maht@87.84.137.37] entered the room. (12:42:19) mjl-: andguent: hide it in a function :) (12:42:44) mahtawkmeister: better yet a channel ! (12:42:51) mjl-: :P (12:43:04) andguent: well i am not sure myself what balance of RFC compilance i'll bring it (12:43:13) andguent: i am certainly not doing it all (12:43:38) mjl-: andguent: does speaking smtp mean you have to parse entire messages? or just headers? (12:43:47) mjl-: or not even headers? (12:43:51) andguent: neither (12:43:54) mjl-: hmm (12:44:08) mjl-: ok, that's nice (12:44:24) andguent: well for actual filtering into the mailboxes this can't be avoided eventually (12:44:28) mjl-: i bet many smtpd's do parse headers, for finding mail loops and such? but that's not necessary if you're just storing locally (12:44:32) andguent: but that is not in the scope for the start (12:44:56) mahtawkmeister: http://www.proweb.co.uk/~matt/awk/smtpd.awk thats all you need for listen only (12:45:11) andguent: i know (12:45:25) mahtawkmeister: i know you know :> (12:45:25) andguent: (have seen this awk script before (12:45:40) mjl-: i would think about an append-only mail box (at least from smtpd perspective). then the client can do smarter things to organize (pretend to delete) the mail. (12:45:53) andguent: actually i want to do a Sh module (12:46:18) andguent: for filtering and stuff... (12:46:32) mahtawkmeister: postfix adds headers for mail loops, but mostly as it works by re-injection (12:46:51) andguent: so the filter script gets the smtp information and eventually when i come around the parsed mail headers (12:47:04) andguent: but for now i would be happy receiving any mails in any form :D (12:47:18) ***mahtawkmeister is working on a big postfix installation (12:47:47) andguent: mail is so broken... (12:49:16) maht-wrk: wait until you get a full address without a @ in it (12:50:07) andguent: something i'll reject for sure... (12:51:48) maht-wrk: my fave feature is maht-anything@..... which postfix/qmail delivers to maht@..... (12:52:19) andguent: hm? can you explain that again (12:53:39) maht-wrk: whenever i sign up for things i use maht-domain.name@maht0x0r.net and then when it comes to my qmail/postfix they strip the domain.name when determining the mailbox (12:54:34) andguent: oh dear (12:54:37) maht-wrk: so maht-9fans@maht0x0r.net gets my 9fans email but it all goes to the same account as maht (13:10:04) andguent: why is it: "Connection : import Sys;" but "Iobuf : import bufio" ? (13:10:54) mjl-: Iobuf has code associated with it. bufio is a module _instance_ (with code associated with it, by "load ..."). Connection is just a type. (13:11:19) andguent: ah. there you go (13:11:19) mjl-: (so a module _interface_ is enough. Sys is the interface, sys the instance. Bufio is the interface, bufio the instance. (13:11:28) andguent: great. thanks (13:12:01) mjl-: np (13:12:06) mjl-: lunch time (13:12:07) mjl-: ! (13:12:07) andguent: so "Connection : import Sys;" == "Connection : import sys;" in that cas? (13:16:37) mjl-: you can import from instance too. that's not a problem indeed. (13:16:57) mjl-: you need to import an adt from an instance if it has functions (that you're calling). i.e. code (13:17:51) andguent: yap understood. just wanted to verify with that case (13:23:46) Fish left the room (quit: Remote closed the connection). (13:31:03) Fish [n=Fish@AVelizy-152-1-88-15.w86-217.abo.wanadoo.fr] entered the room. (14:32:57) mjl-: argh, it sucks hard that google's code search broke clicking on code... you can't middle-click to open many code fragments in tabs... when will they learn? (14:37:59) mjl-: hmms (14:38:09) mjl-: this styx/9p msize negotiation is quite annoying (14:38:36) mjl-: clients can request a max message size smaller than e.g. a stat response can possibly fit in. (14:39:08) mjl-: what should servers do? respond with (truncated) error(5) i suppose (14:39:19) andguent: "screw that guy" (14:39:24) mjl-: yeah, that's better (14:39:43) mjl-: but the server cannot just quit (14:40:10) mjl-: well, cannot if it's not a single user (e.g. styxlisten) (14:40:32) mjl-: and the server doesn't know what the min message size it has to return is... (14:40:57) mjl-: with a read(dir) response, or stat, the min size depends on the name of the file to return (14:42:39) mjl-: you can return error(5), but you have to undo state changes, like creating new fids... (14:43:55) mjl-: hah, and if you've walked on a fid (to the same fid, not a new one), you'll have to restore the state of the fid before the walk (14:44:41) mjl-: but i'm being pedantic here (14:44:52) mjl-: though that's what you have to be if you want to claim you're compatible (14:50:51) maht-wrk: mail russ re code search, he wrote it! (15:01:50) mjl-: true enough. or i should file a bug report. (15:01:56) mjl-: i doubt it'll change anything (15:38:19) andguent: okay this is strange. maybe someone can explain me that. i am connecting to my Iobuf and the thread is waiting in s:=bio.get('\n') ...in that moment i just close the connection...then gets returns and then s is filled with EOTs and has a seemingly random size (15:38:34) andguent: bio.gets even (15:39:15) mjl-: how do you close it? (15:39:17) mjl-: the bio (15:39:32) andguent: i am telnetting on another terminal (15:39:36) andguent: and closing that one (15:39:39) mjl-: ah, ok (15:39:47) mjl-: hmm (15:39:50) mjl-: not sure then (15:40:02) mjl-: otherwise i was going to say that iobuf's cannot be used from multiple threads (15:40:20) andguent: it is only that thread knowing and using the iobuf (15:40:38) andguent: the documentation said iobufs are non concurrent (15:40:38) andguent: or cannot be used in such way... (15:40:45) mjl-: yeah, that makes sense. i usually only need 1 buffered i/o per fd (15:40:55) mjl-: but, not closer to a solution (15:41:07) mjl-: could it be telnet(1) throwing in chars? (15:41:16) andguent: yeah that's what i thought too (15:41:20) andguent: strange though :-/ (15:41:24) mjl-: netcat wouldn't do that at least (15:41:43) mjl-: myeah, i haven't had problems with telnet throwing in chars, so would be surprised if it started with that now (15:42:00) andguent: maybe it's this stupid apple telnet (15:42:03) andguent: i try another one... (15:42:15) mjl-: you're not reading after the first time bio.gets() returns nil? (15:42:26) mjl-: (meaning eof, perhaps it doesn't properly return eof again the next time?) (15:42:40) andguent: it is the very first read (15:42:41) andguent: i connect (15:42:47) andguent: and disconnect immediately (15:43:47) andguent: seems to be with the apple telnet o_O (15:43:58) andguent: eg. the inferno one doesn't do it (15:44:08) andguent: there gets returns nil (18:13:15) gualteri left the room. (19:58:46) andguent left the room ("Leaving"). (19:58:51) andguent [n=andguent@qcx.be] entered the room. (19:59:05) andguent: can acme Mail read maildirs? (20:01:00) uriel: no (20:03:31) mjl-: there's a problem with maildir on plan 9/inferno, i think (20:03:48) mjl-: doesn't maildir require atomic moving of files between dirs? (20:03:55) mjl-: e.g. new/ tmp/ whatever? (20:04:00) andguent: yeah kind of (20:04:01) mjl-: or is that just atomic creation? (20:04:04) andguent: but not really (20:04:11) andguent: afterall maildir does contain race conditions (20:04:38) andguent: just wondering what format i want smtpd.dis to drop the stuff (20:04:50) mjl-: yes, that's a good one (20:05:09) mjl-: nupas uses some new format that's supposed to be fast, i think (20:05:42) mjl-: as i mentioned, i would be very tempted to go for an append-only log of mail messages, and meta info such as "have read", "deleted" in a separate thing, managed by mail program (20:06:18) andguent: honestly i probably just drop them with filename DATE-SHA1 (20:07:46) mjl-: should work too (20:08:00) mjl-: if you're not going to keep spam mails around ;) (20:08:03) andguent: but then i asked because of reader support... (20:08:21) mjl-: opening my autospam dir (automatically classified spam) is quite slow to load with 40k spams (20:08:22) andguent: writing a smtpd is one thing...writing a new mail client (20:08:23) andguent: bah (20:08:23) mjl-: in a maildir (20:08:25) mjl-: i think (20:08:35) mjl-: i'm still interested in writing a mailfs (20:08:37) mjl-: for inferno (20:08:47) mjl-: might do it one day, unless you beat me to it! (20:08:51) mjl-: cannot be _that_ hard (20:08:56) mjl-: once you find the rfc's that apply (20:09:03) andguent: ha (20:09:11) andguent: reading rfcs is so disappointing (20:09:23) andguent: why easy when you can do it complicated... (20:09:37) mjl-: true (20:09:42) mjl-: but at least there are docs :) (20:30:55) maht-wrk: i'd go wiath maildir (20:31:49) maht-wrk: easier to delete stuff (20:33:07) maht-wrk: better for imap too (20:39:25) olcc [n=none@AMarseille-158-1-139-117.w90-10.abo.wanadoo.fr] entered the room. (20:58:59) te left the room (quit: Read error: 110 (Connection timed out)). (21:05:24) rapidfx left the room (quit: "Leaving."). (21:18:33) maht-wrk left the room. (23:55:10) gualteri [n=salva@84.123.158.129.dyn.user.ono.com] entered the room. (00:13:27) gualteri left the room (quit: "Leaving."). (00:14:21) gualteri [n=salva@84.123.158.129.dyn.user.ono.com] entered the room. (00:56:55) olcc left the room (quit: Read error: 110 (Connection timed out)). (01:25:48) gualteri left the room (quit: "Leaving."). (02:23:58) Fish left the room (quit: Read error: 104 (Connection reset by peer)). (05:33:26) rapidfx [n=host666@vl-cen-ce1.avtlg.ru] entered the room. (10:41:30) te [i=tao@gateway/shell/blinkenshell.org/x-dhqufhrmzicfbmqa] entered the room. (11:43:39) Fish [n=Fish@AVelizy-152-1-88-15.w86-217.abo.wanadoo.fr] entered the room. (12:01:34) gualteri [n=speiro@crespins.disca.upv.es] entered the room. (12:41:01) andguent: can i use already compiled regexs concurrently? (14:26:48) gualteri: more on media servers: http://www.nslu2-linux.org/wiki/HowTo/SlugAsAudioPlayer (14:28:09) gualteri: and the usb-ir (beta design) to control them: http://sites.google.com/site/saoretone/Home/usb-ir.jpg (15:49:02) uriel: andguent: I would hope so (16:15:55) gualteri left the room.