Conversation with #inferno at Mon Apr 6 04:22:04 2009 on powerman-asdf@irc.freenode.net (irc) (04:55:39) tombohannon left the room (quit: ). (05:17:33) anothy_x [n=a@adsl-99-155-110-100.dsl.bcvloh.sbcglobal.net] entered the room. (05:42:53) caerwyn left the room (quit: "ChatZilla 0.9.84 [Firefox 3.0.8/2009032609]"). (05:44:34) hotaru2k3 [n=hotaru@cpe-24-29-193-226.neo.res.rr.com] entered the room. (05:58:13) hotaru2k3 left the room (quit: "ChatZilla 0.9.84 [Firefox 3.1b3/20090305152042]"). (12:19:56) gualteri [n=unknown@crespins.disca.upv.es] entered the room. (12:36:58) gdiaz_ios [n=none@217.14.40.16] entered the room. (13:17:02) sqweek left the room (quit: Remote closed the connection). (13:20:29) andguent [n=andre@p4FF66EEB.dip.t-dialin.net] entered the room. (13:36:32) aguent left the room (quit: Read error: 101 (Network is unreachable)). (13:40:39) gualteri left the room (quit: Read error: 60 (Operation timed out)). (13:46:38) gualteri [n=unknown@crespins.disca.upv.es] entered the room. (14:38:46) tombohannon [n=tombohan@h117.255.18.98.static.ip.windstream.net] entered the room. (14:46:02) tombohannon left the room (quit: ). (15:35:10) tombohannon [n=tombohan@h117.255.18.98.static.ip.windstream.net] entered the room. (15:39:47) maht-: great, the Inferno at vita has bitrotted into crashing, the Windows version sometimes crashes when I press TAB or BACKSPACE and I can't work out how to build one from scratch (15:43:01) gualteri: maht, you could workaround it using an emu.exe from caerwyn's inferno-bin (15:47:49) powerman: maht-: charles going to update inferno installation at vn to current from svn soon afaik, that should solve such issues (15:50:00) ***maht- wishes for a feature freeze on ALL computers & software packages (15:50:23) soul9: hah (15:51:56) C-Keen: maht-: that would imply that there is a release plan (15:52:15) C-Keen: or even a feature list for a version (15:52:21) C-Keen: heck what's a version anyway (15:52:46) powerman: main issue with feature freeze is security holes. so real feature freeze is possible only on computer disconnected from network and which doesn't use fdd/usb/dvd - pretty useless one, yeah? :) (15:54:16) C-Keen: that's not what feature freeze means (to me) (15:59:01) maht-: NO MORE APIs :> (16:18:32) gdiaz_ios: http://9grid.es/store. . download ios windows package, built from svn tree of march (16:19:24) gdiaz_ios: i'll uddate those packages soon (16:24:10) soul9: what is ios? (16:26:13) C-Keen: inferno-os I guess (16:28:14) gdiaz_ios: yes, just a name . . . i'm not great with names. . . ☺ (16:34:46) soul9: hehe, aaaah, damn :-D (16:35:03) soul9: yeah, should've jumped to my eyes...oh well (16:36:55) gdiaz_ios: then think i put there those packages for my own usage at the moment, until i complete http://9grid.es/ios wiki with something more useful (16:37:08) gdiaz_ios: i meant the thing is i put. . . (16:53:15) sqweek [n=none@203-206-71-143.dyn.iinet.net.au] entered the room. (17:21:17) fortyseventeen [n=47teen@c-67-171-113-158.hsd1.ut.comcast.net] entered the room. (17:35:20) mennis [n=mennis@adsl-219-169-69.asm.bellsouth.net] entered the room. (17:37:13) mennis_ [n=mennis@adsl-219-169-69.asm.bellsouth.net] entered the room. (17:38:10) mennis_ left the room. (17:57:57) C-Keen: hm, what else needs to be patched in inferno-os to get a working spim 64bit toolchain? the compiled limbo binary fails with an illegal instruction error on linux/mipsel (17:58:42) C-Keen: I wrote my own mk file for the target (18:05:40) gualteri left the room (quit: "leaving"). (18:18:31) mjl-: there are only a few places with assembler in them... those should be enough i think (18:18:41) mjl-: perhaps you can try the simplest c program? (18:18:47) mjl-: utils/cat/ (18:18:49) mjl-: for example (18:19:11) mjl-: still links in lib9 (18:23:22) gdiaz_ios: there is a mail from charles speaking about what would be needed to get a x64 emu i think (18:23:52) gdiaz_ios: btw, what's the most common reason for a module to not load? (i module i did and lives under a random folder) (18:24:48) anothy_x: when i'm writing the code? typos in the path. ;-) (18:25:08) anothy_x: more generally, fingerprint changes. (18:25:20) gdiaz_ios: well i do not specify the PATH i guess it uses current dir if not? (18:25:25) anothy_x: (i'd guess. "most common" is hard to say, really) (18:25:56) gdiaz_ios: i just get [DBO] Broken: "module not loaded" (18:26:36) gdiaz_ios: the dis file is there, and i don't get any type errors and the like . . (18:27:12) mjl-: do you check for "mod == nil" after loading? (18:27:25) mjl-: if so, than some module inside the loaded module may not be loaded (18:27:46) anothy_x: i presume you're giving the path in the .m? (18:27:49) mjl-: sometimes i get these errors when i didn't call the modules init() function (where the module loads the instances it needs) (18:28:01) gdiaz_ios: hum. . that could be. . . (18:28:20) gdiaz_ios: sh creating an init function, that will run upon the module load? (18:28:41) gdiaz_ios: or must be explicity called ? (18:29:57) mjl-: usually you must call them explicitly. some modules check whether its local modules are loaded in each function (18:31:20) gdiaz_ios: hum. . .you're right (18:31:37) gdiaz_ios: i'll check that on each function and call an internal init function to load the mods it needs (18:31:59) gdiaz_ios: that's another interesting thing to put somewhere on a tips&tricks. . . (18:36:59) gdiaz_ios: hum emu is exiting. . . without any errors . . . now that the module loads, and executes. . .the code make emu crash XD (18:39:02) maht-: if it's Limbo i.e. a .b file, don't forget the debugger ! you can see what is nil beforehand (18:39:48) gdiaz_ios: it was a silly thing, now seems to "work", i was filling a var: ref ADT, instead of filling var: ADT and returning a ref var. . . (18:41:17) mjl-: no matter what, it's strange to see emu quitting... (18:45:06) gdiaz_ios: i'm on windows so i do not have coredumps, but dr. watson and windows crash report tool didn't appeared (18:46:52) gdiaz_ios: the thing i was doing was: var: ref ADT; var.value=string; return var; and when i changed it to var: ADT; var.value=string; return ref var; started to work (18:47:35) gdiaz_ios: i do not have the time to digg more, but sending a proof to the list will get someone looking into it may be. . . (18:47:51) gdiaz_ios: given any of you can reproduce the behaviour (18:58:06) powerman: gdiaz_ios: isn't you should initialize var before using it: var=ADT(...) (18:59:36) powerman: in case with ref ADT without initilizing (=) there will be no memory allocation for this adt, I think (18:59:59) powerman: without ref it may work, because memory allocated while declaring var (19:01:41) powerman: maybe emu crash on dereferencing uninitialized ref ADT while var.value=. but emu anyway shouldn't crash, only you module should crash in this case. (19:04:21) gdiaz_ios: hum it could be the way i call emu. . . (19:04:45) gdiaz_ios: i'll try without the script. . . but i supposed even with the script i should be able to see error messages. . . (19:06:27) gdiaz_ios: it just exits automatically with no errors (19:17:44) gdiaz_ios: off to home, see you (19:20:04) gdiaz_ios left the room (quit: Remote closed the connection). (19:38:16) ***fortyseventeen watches the newsqueak talk, squints to see through awful keywords (19:53:40) fortyseventeen: holy crap, lazy prime list (20:21:30) KillerX [n=anant@gentoo/developer/KillerX] entered the room. (22:13:22) newmanbe [n=btdn@138.74.131.25] entered the room. (22:30:16) C-Keen: hm, I am now at my 64 bit spim machine and (22:30:23) C-Keen: I get an illegal instruction at this line of code: j = j*10 + (c - '0'); where j is an int and c is a long variable (22:30:27) C-Keen: any idea what might get wrong? the multiplication or the casting in the addition? (22:31:15) mjl-: that code is generated by gcc? (22:31:58) mjl-: i guess i would probably start a debugger, and print the assembler there... (22:32:09) mjl-: the assembler should probably see that the instruction is illegal, right? (22:33:48) C-Keen: hm (22:34:01) mjl-: uhh, i meant to see: the debugger should probably see that ... (22:34:14) mjl-: assuming it has a disassembler in it, like acid (22:34:14) C-Keen: I will try with another -march than just -mips64 first (22:34:24) C-Keen: well gdb has (22:36:55) C-Keen: ah that did it (22:37:30) C-Keen: but I fear I will need to fiddle with the floating point stuff as well as I have read charles' mails on the list (22:41:37) C-Keen: I guess you already all knew about http://github.com/ericvh/inferno-os/tree/master right? (22:42:29) mjl-: nopes :) (22:42:38) mjl-: that should be interesting, thanks (22:42:59) mjl-: hmm, what's with the light grey text on which background (22:43:28) mjl-: do you know how much development is going on there? (22:43:35) mjl-: does eric have much code? (22:44:24) C-Keen: it says it is only a mirror of the svn code (22:44:33) mjl-: hmm, ok (22:44:49) mjl-: i guess git is nicer than svn. especially not having all those annoying .svn dirs all over the place :) (22:44:49) C-Keen: but I think this is still nice to have (22:45:00) mjl-: time for a hg mirror :P (22:45:05) C-Keen: indeed (22:45:13) mjl-: and then implement pulling and updating in hgfs+related... (22:47:23) C-Keen: :) (22:47:39) C-Keen: I am playing with an mp3 decoder atm (22:47:55) mjl-: in limbo? (22:48:00) C-Keen: yep (22:48:05) mjl-: wah, sweet! (22:48:14) mjl-: is that doable/complex/easy? (22:48:32) mjl-: of course its doable :D (22:49:33) C-Keen: I am not done yet :) but it is ok, a lot of bit twiddling on the way and I am not using too much inferno features atm, it is just a little program, where you pipe an mp3 file in and should get inferno audio files out (22:49:47) C-Keen: but I am still testing it against the refsoft (22:50:10) mjl-: but is is all limbo? no partial c lib? (22:50:16) mjl-: and is it integer? or floats? (22:50:47) mjl-: i seem to remember both types (integer vs floats) exist (22:50:56) mjl-: and are you doing a pretty straightforward port? (22:51:05) C-Keen: I was thinking about using a fixed point implementation but I stuck with the float (22:51:36) C-Keen: with the usual lack of time to play with I am making some progress :) (22:52:09) C-Keen: I have no clue whether this will be fast enough for real time (22:52:22) C-Keen: or live decoding (22:52:31) C-Keen: but hey better than nothing :p (22:52:35) mjl-: probably will be. how much cpu do you have to spare :) (22:52:46) mjl-: yeah, having an mp3 decoder would be nice (22:52:52) C-Keen: I hope I can keep this legal too :) (22:54:10) mjl-: why wouldn't it? (22:55:13) C-Keen: I am not allowed to use internal code (22:55:53) C-Keen: but I am allowed to ask my colleques =) (22:56:32) mjl-: ☺ (22:56:52) C-Keen: $ emu -r . (22:57:07) C-Keen: SYS: process mail faults: Illegal instruction (22:57:09) C-Keen: bah (23:01:10) olegfink: eric has lots of secret inferno repos, i.e. inferno-tx on code.google.com (23:01:53) C-Keen: hm, how can I attach to the spawned process from emu so I see where it crashes with gdb? (23:02:29) olegfink: gdb probably knows nothing about emu's internal threads? (23:03:17) olegfink: so you can only attach to emu itself (23:03:27) C-Keen: probably, my problem is that it gets a SIGKILL and is terminated...maybe I should tell the debugger to stop on sigkill (23:03:48) mjl-: emu -s makes the breaking proc not quit (23:05:08) C-Keen: hm, does not help, then it just quits (23:05:33) olegfink: but then probably gdb will be able to handle that? (23:09:55) C-Keen: hm (23:10:15) C-Keen: I don't know, not handing the process any signals does not help (23:15:33) C-Keen: mjl-: it is not really difficult, in haskell it looks like this http://blog.bjrn.se/2008/10/lets-build-mp3-decoder.html (23:15:47) C-Keen: it also has a nice explanation of what needs to be done (23:16:38) C-Keen: gnite (23:17:19) mjl-: that looks like a very good read (23:17:41) mjl-: there should be more documents like that (00:03:02) olegfink: mjl-: alive? (00:04:26) olegfink: probably not. (00:06:56) olegfink: anyway, I don't know why I should ask anyone for this. (00:07:21) mjl-: sort of alive (00:07:22) mjl-: what's up (00:07:53) olegfink: ah, it's just that I've written too much text, it's too late, and the comment form is too persistent. (00:08:05) olegfink: I'd say it's even too immutable. (00:08:31) mjl-: are you talking about gsoc stuff? :) (00:08:39) olegfink: yep. (00:08:43) mjl-: ok (00:09:16) olegfink: so if you could take a quick look and say if I have switched to russian, talked about bananas or something like that in the text, it would be nice. :-) (00:10:31) mjl-: i can do that (00:10:34) mjl-: i think :) (00:10:39) mjl-: is it up somewhere? (00:10:53) olegfink: yes, http://rain.ifmo.ru/~olegfink/cgi-bin/gsoc.cgi/ForkComment (00:10:55) olegfink: thanks (00:11:12) olegfink: hm, not in a full-page layout it looks way too long for a comment. :-/ (00:11:16) olegfink: s/not/now/ (00:17:54) mjl-: the gsoc comment box is pretty inadequate... (00:17:59) mjl-: i read it. didn't understand all parts (00:18:03) mjl-: like when aan should come in (00:18:24) mjl-: and "returning the same fids for each attach" is weird too (00:19:48) olegfink: file servers that are aware of our evil plans have some mechanism (say, a ctl file) by which we can tell them that we want to fork/advance to the next revision (00:20:49) olegfink: for the rest of the kind, a proxy should probably be used which keeps a connection to the underlying file server and ignores any special ctl requests. (00:21:12) olegfink: (i have no idea why I called it aan-like, it's kind of reverse aan if there's any similarity at all) (00:22:12) mjl-: ah ok, so the fids for the reopened files will just point to the right fs-internal representation/version of the file (00:22:40) mjl-: there is no correspondence to the numbers of the fids (which are just ints i think) (00:23:27) mjl-: aan is just a program through which data is written to a tcp connection. if the connection breaks it will redial & resync & resend data not yet sent. but it works at blocks-of-bytes level afaik. (00:23:56) olegfink: ah, then I should just remove it, I thought it was 9p-level. (00:24:22) olegfink: thanks, I should probably state that clearer (00:27:49) olegfink: http://rain.ifmo.ru/~olegfink/cgi-bin/gsoc.cgi/?diff=true&page=ForkComment&revision=1.2 -- this is only viewable if you have 'fit to width in your browser' :/ (00:28:03) olegfink: I should find a way to make
 still be wrapped.
(00:28:23) olegfink: (or why is there 
 at all)
(00:29:10) olegfink: i guess just looking at the fourth paragraph is better than using diff.
(00:29:29) mjl-: css's white-space: pre-wrap?
(00:30:18) olegfink: hm, that would break more than it fixes, as there's only one '+'/'-' per line in diff's output
(00:32:03) olegfink: so, is this one clear now?
(00:32:35) mjl-: yes
(00:32:40) mjl-: second line first paragraph less so
(00:32:42) mjl-: Otherwise it seems there isn't much sense in getting what editors with undo buffer save to disk
(00:32:46) mjl-: doesn't parse here
(00:33:02) mjl-: but that paragraph doesn't really say which kind of programs would benefit
(00:37:22) mjl-: have to sleep now
(00:37:25) mjl-: ttyl
(00:37:29) olegfink: thanks a lot
(01:15:57) ooooo [i=none@201.80.224.34] entered the room.
(01:24:25) andguent left the room (quit: "This computer has gone to sleep").
(02:57:32) KillerX left the room (quit: ).
(04:09:32) ooooo left the room (quit: Remote closed the connection).
(04:12:11) ooooo [i=none@201.80.224.34] entered the room.
(04:15:01) ooooo left the room (quit: Remote closed the connection).
(04:16:55) ooooo [i=none@201.80.224.34] entered the room.
(04:20:27) tombohannon left the room (quit: ).
(04:49:36) fortyseventeen left the room (quit: Remote closed the connection).
(04:51:16) olegfink left the room (quit: Read error: 60 (Operation timed out)).
(04:51:24) fortyseventeen [n=47teen@c-67-171-113-158.hsd1.ut.comcast.net] entered the room.
(04:53:05) olegfink [n=olegfink@snupt.com] entered the room.
(04:53:31) olegfink is now known as Guest6594
(06:09:11) Guest6594 is now known as olegfink
(07:16:27) fortyseventeen left the room (quit: "beep").
(08:56:47) andguent [n=andre@p4FF66EEB.dip.t-dialin.net] entered the room.
(09:33:10) eno__ [n=eno@adsl-70-137-136-180.dsl.snfc21.sbcglobal.net] entered the room.
(09:44:36) eno left the room (quit: Read error: 110 (Connection timed out)).
(10:13:44) olegfink left the room (quit: Remote closed the connection).
(10:14:19) olegfink [n=olegfink@snupt.com] entered the room.
(10:14:44) olegfink is now known as Guest86417
(11:24:42) gdiaz_ios [n=none@217.14.40.23] entered the room.
(11:32:53) npe [n=npe@195.207.5.2] entered the room.
(12:14:03) hotaru2k3 [n=hotaru@cpe-66-61-20-230.neo.res.rr.com] entered the room.
(12:55:19) gdiaz_ios: any odbc user here? just after i send a mail to interno mai llist. . 
(12:55:35) gdiaz_ios: opening the error file means the connection is closed?
(12:55:49) gdiaz_ios: it shouln'd right?
(12:56:17) hotaru2k3 left the room (quit: "ChatZilla 0.9.84 [Firefox 3.1b3/20090305152042]").
(13:12:37) npe left the room (quit: No route to host).
(13:20:36) aguent [n=andre@p4FF67D3E.dip.t-dialin.net] entered the room.
(13:26:30) gualteri [n=unknown@crespins.disca.upv.es] entered the room.
(13:31:21) npe [n=npe@195.207.5.2] entered the room.
(13:37:51) andguent left the room (quit: Read error: 101 (Network is unreachable)).
(14:02:18) gdiaz_ios: how to avoid inferno freeing a reference?
(14:03:55) Guest86417 is now known as olegfink
(14:04:44) mjl-: keep a reference? :)
(14:05:33) mjl-: if you no longer have a reference, you normally don't want to access it again, right?  you always need some way to reference the value...
(14:06:56) gdiaz_ios: well, i need to keep a file open. . . 
(14:07:10) gdiaz_ios: but inferno closes it as soon as i stop working with it
(14:07:14) mjl-: yes
(14:07:26) mjl-: when the fd reference is out of scope, the fd is closed
(14:07:33) mjl-: so, just keep a reference to the fd somewhere
(14:07:35) mjl-: e.g. in a global variable
(14:07:43) mjl-: or in some adt to which you still have a reference
(14:07:46) gdiaz_ios: odbc needs to keeps a file opened until you finish your work
(14:07:56) gdiaz_ios: hum
(14:08:05) gdiaz_ios: that's what i was doing i think
(14:08:13) gdiaz_ios: storing the reference into an ADT. . 
(14:08:22) gdiaz_ios: but it closes it anyway. . . 
(14:08:49) mjl-: and you really do keep a reference to the adt with the fd in it too?  and you don't overwrite the fd with a new fd?
(14:09:01) gdiaz_ios: well, i'm storing it in a self ref ADT type. . . 
(14:09:28) gdiaz_ios: that stores it in a copy or in the ADT i reference outside?
(14:09:34) mjl-: as long as the reference to that adt doesn't go away (the self-part doesn't matter), the fd should not be closed
(14:09:47) mjl-: it stores it in the adt itself (ref adt)
(14:10:57) mjl-: perhaps you can put some debug print's in the code, and run iostats to dump the styx messages.  then see exactly where the reference is lost.
(14:11:06) gdiaz_ios: ok, then i have something else wrong, because the connection is closed. . . when i was using Iobuf for that file that worked, but now i'm using ref FD (i need to control the write) and doesn't. . . 
(14:11:14) mjl-: or if you could paste the code in one of the paste-websites...
(14:12:16) gdiaz_ios: hum let me check if i can paste it somehwere. . .
(14:13:13) olegfink: hi
(14:15:59) gdiaz_ios: the code is in http://rafb.net/p/IwE2Qw94.html
(14:16:36) gdiaz_ios: the reference is created in the line  71 
(14:17:17) gdiaz_ios: dbh reference is on the dbc program, created by open, in the line 334
(14:21:36) mjl-: ok, i'm looking.  this isn't necessarily a problem, but you do know that line 40 & line 43 create two different references?
(14:23:00) gdiaz_ios: hum, well mount just need to read so that reference is just passing some values, that fn was using a couple of params before
(14:23:37) mjl-: jups
(14:23:44) gdiaz_ios: then one i'm interested in is the one created in line 43, that's what the user will use on his program line the dbc.b i put there
(14:23:51) mjl-: where do you get errors?
(14:24:42) gdiaz_ios: i do not get errors because the connection dies before i can get them
(14:25:36) mjl-: line 49 & 59 seem wrong
(14:25:48) mjl-: id: array of byte;
(14:25:55) mjl-: if((n:=sys->read(dbh.conn, id,10)) < 0 ) {
(14:26:06) mjl-: you need to make id an array of at least 10 bytes
(14:26:11) mjl-: like so:  id := array[10] of byte;
(14:26:44) mjl-: sys->read won't change the size of the array, just the bytes in it, which must already have been allocated
(14:27:13) mjl-: this needs change too:  dbh.connpath=dbh.mntpt+"/db/"+ string id;
(14:27:27) mjl-: use:  string id[:n]
(14:27:34) gdiaz_ios: oh!!!!
(14:27:38) gdiaz_ios: hahahaha
(14:27:45) gdiaz_ios: thanks
(14:28:21) mjl-: hope it helps!
(14:28:40) mjl-: btw, of line 83 & 84, an explicit assign of nil to the fd will cause a close
(14:28:47) mjl-: dbh.clt = nil; etc
(14:29:52) gdiaz_ios: mjl- oh i see, it has sense. . .i just didn't think enough
(14:31:19) gdiaz_ios: what have no sense were the strings i was getting when the buffer was not initialized correctly. . . 
(14:31:43) gdiaz_ios: well, the read was not failing at all. . .
(14:34:12) mjl-: btw, i would also add a function to print error & exit.  rather then only print the error and continue
(14:34:51) mjl-: i usually import sprint from sys, and then call fail(sprint("some error: %r"));  when things go wrong.  where fail is:  fail(s: string) { sys->fprint(sys->fildes(2), "%s\n"); raise "fail:"+s; }
(14:35:18) mjl-: but i think you are just trying to get most debug info as possible in your code :)
(14:35:21) mjl-: at this stage
(14:35:27) gdiaz_ios: hum there is a fatal somewhere, if i continue is to probe all reports errors nicely without breaking anything
(14:35:58) gdiaz_ios: yes, that is. . . odbc behaves weird. . and dealing with it is what i-m doing. . .
(14:36:29) gdiaz_ios: this kind of module would be useless if odbc behaved differently
(14:49:49) gdiaz_ios: well, let's check if this can eat a 200000 row query. . . on a list of string. . . XDD
(14:50:12) mjl-: good luck :D
(14:50:59) gdiaz_ios: i have odbc in debug mode and it's becoming very slow. . . , emu is eating 20mb and going up ☺
(14:51:07) olegfink: mjl-: what would you suggest for experimenting with fids? plan9 or inferno?
(14:51:46) mjl-: doesn't matter very much i think... at least use iostats, or use the styx trace printing options of the libs (both p9 and inferno have them)
(14:51:59) olegfink: at the moment I'd like to have some dull 'persistent' file server (e.g. serving a lone file which contents are its revision number, no write at first)
(14:52:12) mjl-: otherwise i would go with the thing you are most experienced with.  to minimize distractions
(14:53:00) olegfink: I have written about one inferno and about one plan9 file server in my life, so I think I'm equally inexperienced in both.
(14:53:08) mjl-: i can't remember if i ever wrote an fs in plan 9 (c) that i ever really used.  did that in limbo though
(14:53:41) mjl-: i can give you skeleton code for a file server in limbo
(14:54:01) mjl-: should get you up & running quickly
(14:54:13) olegfink: that would be good. also will see if I remember much from my past playing with limbo.
(14:54:15) gdiaz_ios: ramfs is a good start in plan9
(14:54:39) mjl-: http://www.ueber.net/who/mjl/tmp/newfs.b
(14:54:42) gdiaz_ios: off to eat :) i'll let this running . . .
(14:55:31) mjl-: i don't think it compiles out of the box, but shouldn't need many changes
(15:01:52) olegfink: thanks a lot, will try play with that after I finish something
(15:30:04) tombohannon [n=tombohan@adsl-068-016-104-079.sip.asm.bellsouth.net] entered the room.
(16:36:55) gdiaz_ios: hello
(16:42:56) newmanbe: Hello.
(16:43:53) newmanbe left the room (quit: Read error: 104 (Connection reset by peer)).
(16:45:45) newmanbe [n=btdn@138.74.131.25] entered the room.
(16:46:00) newmanbe left the room (quit: Read error: 104 (Connection reset by peer)).
(16:56:21) newmanbe [n=btdn@138.74.131.25] entered the room.
(17:16:10) sqweek: mjl-: do you have "quit windows" for caim`` and caim```?
(17:17:53) gdiaz_ios: yes i have them too
(17:18:09) mjl-: yes
(17:18:21) sqweek: huh, so i guess it is deterministic
(17:18:33) mjl-: hmm, good piont
(17:18:34) mjl-: point*
(17:19:00) mjl-: it really is starting to become more annoying.  i'm not in some larger channels (many users) because that would be too much, window-wise
(17:19:01) mjl-: ...
(17:19:02) sqweek: it seems to leak fds also, eventually my emu session can't do anything because it has exceeded 64 fds
(17:19:14) mjl-: is that ircfs?  or wm/irc?
(17:19:19) sqweek: ircfs
(17:19:30) mjl-: hmm, i didn't expect that
(17:19:51) mjl-: ircfs just has an fd to the irc server, and stdin,stdout for styx, and stderr for messages
(17:19:51) sqweek: there's usually a bunch of log files open for sessions which aren't open at all as far as i'm aware
(17:19:54) mjl-: oh, no!  log files
(17:19:55) maht-: heheh I switched to acme-sac's emu and now my code is broken !  :>
(17:20:13) mjl-: log files is a very good point
(17:20:19) sqweek: but most of the fd table is full of "/ (/dev/wd0a)"
(17:20:40) sqweek: not quite sure what that means
(17:24:32) mjl-: perhaps there is something wrong with Target accounting, that even dead targets never get removed from the targets array.  then the log file will never be closed
(17:24:44) mjl-: i don't know what the / is about... i also don't know where it needs so many procs
(17:31:04) npe left the room (quit: ).
(17:45:05) olegfink left the room (quit: Remote closed the connection).
(17:45:48) olegfink [n=olegfink@87.118.112.203] entered the room.
(17:46:13) olegfink is now known as Guest75292
(17:58:21) fortyseventeen [n=47teen@c-67-171-113-158.hsd1.ut.comcast.net] entered the room.
(18:03:00) gdiaz_ios: damn windows, i wonder what's the option to enable debug information. . XD
(18:05:24) maht-: type -d during boot
(18:11:33) C-Keen: gdiaz_ios: for kernel dumps?
(18:13:23) eno__ is now known as eno
(18:14:15) gdiaz_ios: no, applictation crash
(18:14:46) gdiaz_ios: well, i have visual studio express, i can attach to the process, but no debug symbols can be loaded
(18:14:48) C-Keen: aw :)
(18:14:58) mennis_ [n=mennis@adsl-068-016-104-079.sip.asm.bellsouth.net] entered the room.
(18:15:03) gdiaz_ios: i need to specify options to cl and link to include debug information,. . . 
(18:15:07) gdiaz_ios: but i don't know how. . 
(18:15:11) C-Keen: recompile with debug symbols :)
(18:15:36) C-Keen: in visual studio it is just a matter of taking the debug configuration
(18:15:53) C-Keen: I don't know how crippled visual studio express is though
(18:17:01) Guest75292 is now known as olegfink
(18:18:42) gdiaz_ios: haha that's just the problem, what's the cl option to add debug symbols. . /Yd does not work, neuther did /Zi. . . 
(18:19:28) C-Keen: hang on
(18:20:42) C-Keen: gdiaz_ios: I also need /MTd (for multithreaded debug dll)
(18:21:29) C-Keen: # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /GZ /c
(18:22:15) C-Keen: bus time
(18:22:16) gdiaz_ios: hum. . . let's check that. . . 
(18:25:13) gdiaz_ios: same meeesage from visual studio debugger, binary was not built with debug information. . . 
(18:26:37) mennis_: So when a dependency module is not loaded or fails to load the program returns with a message that simply says something like programname:module failed to load.  Is it required then to check each load for success like:   fio := sys->file2chan(dir, f);
(18:26:37) mennis_:  if (fio == nil) {
(18:26:37) mennis_:   sys->fprint(stderr, "ramfile: file2chan failed: %r\n");
(18:26:38) mennis_:   return; 
(18:27:07) gdiaz_ios: mennis i think so
(18:27:09) mennis_: or is there some Limbo warning flag that can check for these kinds of errors?
(18:27:42) mennis_: Yuck.  That's frustrating.
(18:27:51) gdiaz_ios: modules can be loaded dynamically and if it fails to load probably it will tell you, when you use it
(18:28:05) gdiaz_ios: but not in the load statement
(18:28:31) mjl-: mennis: sys->file2chan is not a "load".  but you have to check errors yes
(18:29:07) mjl-: you can make a function checknil(fio, "reason"); that prints & raises an error when the first arg is nil...
(18:29:58) mjl-: i usually don't check if loads at startup succeeded.  i will see when the program runs.  but loads usually only fail for me if i forgot to compile or install something, or i changed a module interface.  proper mkfiles normally prevent such errors.
(18:30:30) mjl-: so for the rare case i see a failed load, i can usually find the problem quickly
(18:30:41) mjl-: i do remember charles saying something about perhaps changing the handling of failed loads
(18:31:28) mjl-: i think it raising an exception with some known prefix would be good, like "fail:load:", then you can catch that error if you want to (and cope), or have your program exit with error as normal when a load does fail
(18:32:25) mjl-: anyway, any other function that can fail (and usually returns nil, or an error string), has to be checked explicitly
(18:32:29) mjl-: so make sure your code is small ;)
(18:33:01) mennis_: I guess it would just be nice if the failure were to reference the name of the module that wasn't loaded at exit.  Instead the error is confusing to new programmers and not really very useful at all.
(18:34:38) mennis_: mjl-: Right the load would be ( sys = load Sys Sys->PATH;)  
(18:35:27) gdiaz_ios: if ((sys=load sys sys->path) == nil) exit(); ?
(18:36:35) gdiaz_ios: odbc keeps crashing with a select with multiple tables. . .but it crash recovering the error. . . i wonder why. . .damn wind debbugers
(18:36:38) mennis_: :) That's a cleaver idiom ,
(18:38:04) mennis_: I think the problem is most often that I have forgotten to issue the load at all though.  I guess I'll just have to stop forgetting.  If I can remember.
(18:38:27) gdiaz_ios: haha yes you should :)
(18:38:51) olegfink: mjl-: is there a proposal on adding some language to dis?
(18:41:18) fortyseventeen: I don't know if he's allowed to say
(18:42:47) olegfink: why not?
(18:43:18) fortyseventeen: well, like I said, I don't know
(18:48:08) mjl-: olegfink: not a concrete proposal i think.  just something charles once mentioned, it might be on inferno mailing list
(18:48:26) olegfink: I meant, an application.
(18:48:46) olegfink: for whatever reason, I'm building my lists of gsoc favourites.
(18:49:02) olegfink: not that my opinion matters.
(18:49:27) mjl-: olegfink: oh, never mind, i didn't fully read your question...
(18:49:38) olegfink: hm, on a related note, is the generic-like polymorphism the only kind of polymorphism in limbo?
(18:49:42) mjl-: and, i think i shouldn't comment...
(18:49:57) mjl-: mennis & gdiaz: http://rafb.net/p/ffMop467.html
(18:49:58) olegfink: "opensource is so secret"
(18:50:03) mjl-: might be helpful for testing
(18:50:22) mjl-: the error message is wrong though... but it points to the right path.
(18:50:48) olegfink: it sort of agrees with my feeling that there isn't a way to express a parametric polymorphism a la Curry in a type system a la Church
(18:51:03) olegfink: but just wanted to check :-)
(18:51:12) mjl-: http://rafb.net/p/STj8gj84.html ← that example gives this output
(18:51:50) mjl-: ho, hang on
(18:52:02) mjl-: something is wrong there, never mind that patch yet
(19:04:19) gualteri: http://pics.nase-bohren.de/job-almost-finished.jpg
(19:11:59) fortyseventeen left the room (quit: "beep").
(19:25:17) mjl-: http://rafb.net/p/DNUrea57.html
(19:25:17) mjl-: http://rafb.net/p/3Rfls265.html
(19:25:17) mjl-: http://rafb.net/p/WCcWUo43.html
(19:25:39) mjl-: the first is a diff to libinterp/xec.c, to print & raise an exception when a load fails.
(19:26:06) mjl-: the second is the behaviour of three test programs.  they exit by default, with status set.
(19:26:13) mjl-: the third are the three programs.
(19:26:33) mjl-: perhaps it's better to raise a non-fail:-error, so the shell prints it, and the program is left in broken state
(19:27:24) gdiaz_ios: i've got the bug at last, ebuf was too small. . . 
(19:27:47) gdiaz_ios: and strcat was used. . . 
(19:30:01) mjl-: annoying bugs...
(19:30:12) mjl-: no you can get data from odbc in inferno?
(19:31:53) gdiaz_ios: i can, just odbc was crashing, when reporting errors, i tried to lear how to debug programs in windows. . but i ended printing. . 
(19:32:27) gdiaz_ios: i'm going to open an issue in googlecode, i guess charles got those right?
(19:34:12) mjl-: he reads those yets
(19:34:15) mjl-: afaik
(19:41:38) gdiaz_ios: done
(19:55:20) fortyseventeen [n=47teen@c-67-171-113-158.hsd1.ut.comcast.net] entered the room.
(20:09:48) fortyseventeen: I don't like <-=, it makes lhs less obvious as a chan and looks falsely like a single op
(20:09:54) fortyseventeen: is it just because it looks nicer?
(20:14:02) fortyseventeen: to me having <- always open on one end makes it easier to distinguish from -> and =>
(20:22:29) fortyseventeen: or am I being silly?
(20:24:38) fortyseventeen: oh, I am.  it's because c<- doesn't work on its own.
(20:24:43) fortyseventeen: *self-effacement*
(20:47:36) mjl-: you can write <- = afaik
(20:48:36) fortyseventeen: ya, that works
(20:50:47) mjl-: i usually write var := <-somechan;  for receiving
(20:51:03) mjl-: but <-= for sending...
(20:56:45) gualteri left the room (quit: "leaving").
(21:03:57) gdiaz_ios: today restaurant dinner, off to a date
(21:04:06) gdiaz_ios left the room (quit: Remote closed the connection).
(21:41:31) mennis_: mjl-: That xec hack looks very helpful thanks.
(21:43:51) mjl-: mennis_: i refined it a bit
(21:44:35) mjl-: it really shouldn't raise a fail:-error (which is recognized by the shell, and doesn't warn about it).  the message came from fprint in emu in my examples.  that's pretty horrible.
(21:44:55) mjl-: http://www.ueber.net/who/mjl/files/inferno-xec-loaderror.diff
(21:45:01) mjl-: this one is shorter too! :)
(21:46:07) mjl-: now you get a "broken" message too, from the shell, but with this more detailed information (and on load, not when you use the nil-module)
(21:46:51) mennis_: Nice.  I'll give it a whirl.
(21:46:53) mjl-: right now in inferno-os, bad signatures messages are printed to stderr from emu.  that's a bit bad too.  it should be propagated to the exception string.
(21:54:36) megaboz left the room (quit: Read error: 110 (Connection timed out)).
(21:54:40) ooooo left the room (quit: Read error: 110 (Connection timed out)).
(21:58:27) olegfink: mjl-, seems my last comment made the wrong impression.
(22:06:44) newmanbe left the room (quit: Read error: 104 (Connection reset by peer)).
(22:07:10) newmanbe [n=btdn@138.74.131.25] entered the room.
(22:16:15) mennis_ left the room.
(22:16:42) mennis_ [n=mennis@adsl-068-016-104-079.sip.asm.bellsouth.net] entered the room.
(22:19:15) mennis left the room (quit: Remote closed the connection).
(23:04:34) newmanbe left the room (quit: Read error: 104 (Connection reset by peer)).
(23:05:20) newmanbe [n=btdn@138.74.131.25] entered the room.
(23:05:43) newmanbe left the room (quit: Read error: 104 (Connection reset by peer)).
(23:07:37) npe [n=npe@108.192-78-194.adsl-fix.skynet.be] entered the room.
(23:11:36) npe left the room (quit: Client Quit).
(23:38:18) ooooo [i=none@201.80.224.34] entered the room.
(23:47:29) aguent left the room (quit: "This computer has gone to sleep").
(23:55:31) mjl-: olegfink: which one?
(00:12:13) olegfink: the one you sanitezed yesterday.
(00:12:19) olegfink: sanitized, even
(00:13:22) mjl-: how so?
(00:16:24) olegfink: well, maybe I'm too anxious. I remember charles taking long breaks in communication back when I tried to understand powerpc jit.
(00:17:13) olegfink: http://www.ubnt.com/challenge/ -- sounds good
(00:23:54) tombohannon left the room (quit: ).
(00:25:36) olegfink: mjl-: is fd the only thing a process is aware of?
(00:26:12) mjl-: related to fids?
(00:26:28) olegfink: hm, apparently I can change its namespace from, say, a parent or a kernel.
(00:27:25) olegfink: yes, actually I think almost all the state is defined by fds for a process?
(00:27:56) olegfink: file space, environment variables, devices
(00:31:04) mjl-: the fd's are kept in fgrp's, that's a resource.  but those fall under fd's i suppose
(00:31:30) olegfink: hmm
(00:31:32) olegfink: FORKFD
(00:31:34) olegfink: Place the process in a new file descriptor group containing a copy of the current set of file descriptors. The file descriptors listed in movefd are closed in the old group. After this call, changes the process makes to its set of open file descriptors will not be visible to other processes. 
(00:31:37) olegfink: isn't that what I want?
(00:32:01) mjl-: no
(00:32:12) mjl-: the forked fd's are the same fid's
(00:32:26) mjl-: and closed fd's you would have to reopen manually (in the program)
(00:32:46) olegfink: yes, I don't want to use movefd; but then it's indeed not what I want.
(00:34:01) olegfink: how is dup called in inferno?
(00:34:23) olegfink: ah, it's in sys-dup
(00:37:21) olegfink: hm, actually, I could probably use the FD abstraction, it will make things simplier, but then it's probably too high-level to be of interest (how do I forbid all fd-level operations?)
(00:39:18) mjl-: programs al use FD's, not numbers (unless to get an FD)
(00:40:04) olegfink: hmm, seems things become much sexier if I just modify FD a little.
(00:41:48) olegfink: by the way, what book to read on limbo? the manual and the limbo papers on vitanuova are an excellent resource, but I'd like something a bit more structured (nemo's intro.pdf for inferno? :-)
(00:42:22) mjl-: inferno programming with limbo
(00:42:35) mjl-: it's dated (old-style exceptions, no polymorphism), but it's an easy read
(00:43:20) olegfink: the png is the only [legal] free version iirc?
(00:44:31) olegfink: even at a dumb first look, FD allows be to just change the fildes underfoot.
(00:44:37) olegfink: s/be/me/
(00:44:59) olegfink: ah, no. :-(
(00:45:23) olegfink: why, why, why there's sys->fildes
(00:45:40) mjl-: it think programs that do that are buggy
(00:45:53) mjl-: yes, you can shoot yourself in the foot
(00:46:15) mjl-: and you're right on the book
(00:46:23) mjl-: people found cheap copies on bookshopsites
(00:47:36) olegfink: I live in the middle of nowhere.
(00:48:01) mjl-: mail doesn't get delivered to you? :)
(00:48:25) olegfink: if it's paid by paypal
(00:49:43) olegfink: well, actually, almost all abstractions leak, but some in a more controlled way
(00:49:59) olegfink: e.g. haskell has unsafePerformIO :: IO a -> a
(00:50:18) olegfink: but when you see unsafe* in code, you know it's something to pay attention to
(00:52:36) olegfink: oh, uriel the swedish pirate has a pdf version of seemingly the final edition.
(00:58:21) mjl-: heh, no matter how good the abstraction.  if you really need more access, you can just add it in as needed.
(00:58:59) olegfink: but if it's already there, I will have a hard time making use of the abstraction
(00:59:04) olegfink: % fs exec @{grep fildes $file} {select *.b /appl} | wc -l
(00:59:06) olegfink:     974
(00:59:44) olegfink: though it's mostly used for fd 0, 1 or two
(01:00:22) olegfink: but it can be connected to anything.
(01:00:38) mjl-: end of beer
(01:00:40) mjl-: have sleep
(01:00:41) mjl-: ttyl
(01:00:54) olegfink: thanks, see you
(01:17:28) mennis_ left the room (quit: Client Quit).
(02:49:12) anothy_x left the room (quit: Read error: 110 (Connection timed out)).
(02:51:32) anothy_olpc1 left the room (quit: Read error: 110 (Connection timed out)).
(03:21:54) ooooo left the room (quit: Remote closed the connection).
(03:27:31) underspecified left the room (quit: Read error: 110 (Connection timed out)).
(03:41:16) underspecified [n=eric@softbank220043052007.bbtec.net] entered the room.
(03:49:39) tombohannon [n=tombohan@h117.255.18.98.static.ip.windstream.net] entered the room.