Conversation with #inferno at Thu Nov 26 12:23:49 2009 on powerman-asdf@irc.freenode.net (irc) (12:23:53) uriel: although somebody found a neat trick to do exceptions without changing the language using closuers and channels: (12:23:53) mjl-: i've used limbo exceptions to good effect in very limited cases (12:23:59) mjl-: oh? (12:24:31) uriel: http://code.google.com/p/go/source/detail?r=aff697587839774c069bbf35bc120257d4a83865 (12:24:59) uriel: I don't think it is very useful in general, but it shows that even without exceptions in the language there are quite a few possibilities (12:25:30) uriel: I also like the simplified control structures (12:25:43) uriel: and closures are nice (I don't think limbo has closures, right?) (12:25:43) mjl-: at first sight it looks like crippled java ;) (12:25:54) mjl-: no, closures are missing from limbo :( (12:25:59) uriel: well, that is more of a hack than anything else (12:26:10) mjl-: though i've been reasonably ok without them (12:26:19) uriel: I'm not one of those clusures zealots, but I think they fit very well with the rest of the language in go (12:27:22) mjl-: yuck, i sure hope people won't write code like in that exception handling example... (12:27:29) uriel: hehe (12:27:50) mjl-: it reminds me of that "javascript: the good parts" example where every array initialisation was turned into a closure call (12:27:55) uriel: really, the more I think about it, the less I like the whole concept of exceptions (12:28:06) uriel: on all the python code I have been writing lately, I have avoided them completely (12:28:24) uriel: I use multi-value returns, which turns out is what Go uses too (although obviously one can do that in limbo too) (12:28:30) mjl-: true (12:28:44) mjl-: but sometimes i get annoyed by all the "return (nil, nil, big 0, -1, "some error") (12:28:55) mjl-: where there are usually many error cases (12:28:58) mjl-: and 1 success case (12:29:11) uriel: my conclusion is that exceptions are like CAMEFROM, you deffine where control flow will jump to, but not where from... (12:29:12) mjl-: so i strip the last string element of the tuple fromt he return value (12:29:21) mjl-: and raise "myfunc:"+error on error (12:29:34) uriel: well, instead of returning that you would return a struct most likely (12:30:00) uriel: and in case of error you return nil, os.Error (12:30:05) mjl-: and wrap the function in an {return myfunc0(args)}exception x{"myfunc:*" => return (..., x)} (12:30:40) uriel: that is another thing, the if construct in Go makes checking for errors very nice (12:30:48) uriel: a normal idiom is: (12:31:11) uriel: if x, ok =: foo(); ok { success } (12:32:02) mjl-: hmm, really =: ? (12:32:19) uriel: hmm... I think so, now I'm not sure ;P (12:32:26) mjl-: x, ok := foo() (12:32:38) mjl-: i think would make the vars x, ok (12:32:42) mjl-: in limbo at least (12:32:57) mjl-: you suffer the original c reversal of += vs =+ ;) (12:33:07) uriel: er, obviously, sorry (12:33:24) mjl-: but, you can have several statements in a conditional? (12:33:36) mjl-: and only the last matters for evaluation of the condition? (12:34:15) uriel: I think the first statement is similar to the first one in a for loop in C (12:34:38) mjl-: check (12:34:50) mjl-: makes some sense i guess (12:35:03) mjl-: are x & ok still in scope after the if statement? (12:35:28) uriel: ah, I'm not sure! heh (12:35:59) uriel: I think not (12:39:09) mjl-: do you know if a book will come out? (12:39:14) mjl-: i bet they'll make one some day (12:39:21) mjl-: and then i'll read it and be up to date! (12:39:34) uriel: well, rob has said that now they are focusing on finishing the language (12:39:39) uriel: they still have quite a bit of work to do (12:40:13) uriel: ah, one thing it doesn't have, which I think was a good decission, is polimorphic functions (are they called that?) (12:40:21) mjl-: ah, this michael elkins is developer at google, for go (if i can believe the hg logs) (12:40:25) uriel: seems that since they were added to limbo I only hear people complain about bugs in them (12:40:41) mjl-: that's a problem with the implementation, not the idae ;) (12:40:42) mjl-: idea* (12:40:44) mjl-: i like them a lot (12:41:13) uriel: I don't know, I like that it is clear what type a method takes (12:41:25) mjl-: why? (12:41:32) mjl-: go has maps right? (12:41:34) uriel: on the other hand, it is less of an issue in Go because of implicit interfaces (12:41:39) uriel: which are really wonderful (12:42:29) mjl-: hmm, seems google has quite some devs working on go? (12:42:34) uriel: yes, go has maps as a built in (12:43:01) uriel: well, ken, russ, rob, gri, iant, and a few others I'm forgetting (12:43:49) uriel: although it is not clear how many other than russ are working full time on Go (also it is unclear what other go-related projects are going on behind the scences, rob has made allusions to a few) (12:44:17) mjl-: yeah, i bet will stick to the philosophy "use it and see where the problems lie" (12:44:27) mjl-: instead of only writing a language for fun (12:45:08) uriel: well, qite a bit of code comes with the distribution, most of it quite good (12:45:19) uriel: but I suspect they have other bigger projects somewhere we don't know about ;) (12:45:30) uriel: (the web server that comes with Go is quite nice) (12:45:39) mjl-: i bet they have that yeah :) (12:45:49) mjl-: do you know by chance whether go works on openbsd yet? (12:45:52) mjl-: or other bsds (12:46:30) uriel: dho did the fbsd port (12:46:44) mjl-: i get the appearance of many people working on go btw. they assign original names to the mercurial commits, and place the name of the actual hg committer in the commit message (12:46:46) uriel: somebody else was doing the obsd port, but haven't heard from them in a while (12:47:20) uriel: yes, as I said quite a few people has contributed stuff in the last couple of weeks (12:55:12) mjl-: once it works on openbsd, and i have time, i'll learn the language (12:55:19) mjl-: now time to write some more libmo code (12:55:20) mjl-: limbo* (13:02:51) uriel: heheh (13:30:55) mjl-: i wrote something inotify-like (13:30:59) mjl-: but without the races (13:31:12) mjl-: (well, depending on the implementation, but mine doesn't have races that i'm aware of) (13:31:19) mjl-: here's how it works: (13:31:23) mjl-: http://www.ueber.net/who/mjl/tmp/watch.txt (13:31:28) mjl-: if anyone has comments (13:31:40) mjl-: or knows things i've missed, i'm interested in comments (13:59:16) uriel: nice (14:19:35) mjl-: yesterday i implemented a very simplistic mailfs. each mail is a separate file. so upon delivery (create+write of new mail+data), mailfs gets the event that new data is available, so it parses the mail and adds it to its file system. (14:20:05) mjl-: and again the mailfs has a file for reading changes to the mailbox/maildir, so upon new mail parsed, a mailreader can get a signal that a new mail was delivered (14:20:36) uriel: maht: why are you not in #cat-v! I need to talk with you about offtopic shit ;P (14:20:45) mjl-: seems to work quite okay (except for the fact that mail parsing is pretty bogus) (14:53:45) robot12 left the room (quit: "????? ? ?? ??? (xchat 2.4.5 ??? ??????)"). (14:58:23) mjl-: i've got the need for garbage collecting progs again... (15:19:08) maht: i was sick of the OT stuff, too noisy (15:19:18) maht: go this, go that (15:19:24) anth_x [n=a@c-98-221-26-115.hsd1.nj.comcast.net] entered the room. (15:44:27) mjl-: so, email about progs sent to inferno-list (16:18:39) uriel: maht: hehehe (16:18:55) uriel: maht: well, now we were go this go that here ;P (16:19:20) uriel: maht: I wanted to talk with you about OT shit, but oh well :)) (16:23:56) ***uriel was reading up about the KLF and the K Foundation, had never heard of it before, interesting.. (16:25:26) mjl-: link? (16:25:35) mjl-: google (16:25:36) mjl-: !! (16:27:12) uriel: http://en.wikipedia.org/wiki/The_K_Foundation_burn_a_million_quid (17:04:05) anth_x: not nearly enough to make any difference for everyone else's value. they'd need a billion to make a dent. (17:05:14) uriel: what I find amusing is that people found it offensive (17:05:36) uriel: "How dare they increase the value of my money!" (17:05:52) uriel: yay for economic illiteracy! (17:20:40) anth_x: yeah, but £1m won't do nearly enough to make a difference. (17:22:10) anth_x: i don't know what the right economic term is, but it's basically price elasticity on currency. (17:46:12) uriel: sticky prices (17:46:47) uriel: still, destroying currency does automatically increase the value of all other currency (17:46:54) uriel: measurable or not (17:47:34) uriel: (of course, the central bank is running the printing presses much faster than anyone can burn the cash, so it just reduces inflation more than anything else) (17:52:51) anth_x: i don't think it does until it overcomes price stickyness. (17:54:42) uriel: well, eventually it will, because the amount of cash around to be the spent has gone down, it is just question of how long it takes for that to take effect (17:55:07) uriel: and given that the effect would be pretty much impossible to meassure (as if measuring prices was not hard enough)...