--- Log opened Thu Dec 10 00:00:31 2009 00:00 -!- rbohn [n=chatzill@d103.digis.net] has quit ["ChatZilla 0.9.85 [Firefox 3.5.5/20091102152451]"] 00:02 -!- slashus2 [n=slashus2@74-137-26-8.dhcp.insightbb.com] has joined #go-nuts 00:03 -!- tomestla [n=tom@78.251.229.30] has quit ["Leaving."] 00:03 -!- tomestla [n=tom@78.251.229.30] has joined #go-nuts 00:05 -!- amuck [n=amuck@h154.65.88.75.dynamic.ip.windstream.net] has quit [] 00:08 -!- druidu [n=druidu@78.97.155.94] has joined #go-nuts 00:08 -!- druidu [n=druidu@78.97.155.94] has quit [Client Quit] 00:08 -!- druidu [n=druidu@78.97.155.94] has joined #go-nuts 00:09 -!- slashus2_ [n=slashus2@74-137-26-8.dhcp.insightbb.com] has joined #go-nuts 00:10 -!- skelterjohn [n=jasmuth@c-76-116-176-34.hsd1.nj.comcast.net] has joined #go-nuts 00:18 -!- KillerX [n=anant@gentoo/developer/KillerX] has quit ["Leaving."] 00:19 -!- mitchellh [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has quit ["Leaving."] 00:20 -!- manuelzs [n=manuelzs@190.157.86.9] has left #go-nuts ["Killed buffer"] 00:20 -!- KernelJ [n=cipherja@zone2.robinson.cam.ac.uk] has left #go-nuts [] 00:21 < nf> If I create non-intersecting slices over an array, can I modify them concurrently from separate goroutines? 00:22 -!- felipe [n=felipe@my.nada.kth.se] has quit [Client Quit] 00:22 -!- raichoo [n=raichoo@i577B9653.versanet.de] has quit ["http://raichoo.blogspot.com"] 00:22 < nf> (efficiently?) 00:23 < uriel> nf: I think that should be ok 00:23 < dho> sounds reasonable. 00:23 < uriel> but be careful that they don't overlap if you grow them or something 00:23 < nf> I am seeing if I can parallelise a quicksort of a (large) array, to see if it actually improves performance 00:24 < dho> probably 00:24 < dho> http://en.wikipedia.org/wiki/Quicksort#Parallelizations 00:25 -!- slashus2 [n=slashus2@74-137-26-8.dhcp.insightbb.com] has quit [Read error: 110 (Connection timed out)] 00:28 -!- iant [n=iant@nat/google/x-ukqmhmzxtftbjxob] has quit [Read error: 60 (Operation timed out)] 00:30 -!- armence [n=armence@c-67-188-229-128.hsd1.ca.comcast.net] has joined #go-nuts 00:32 -!- mejja [n=user@c-49b6e555.023-82-73746f38.cust.bredbandsbolaget.se] has joined #go-nuts 00:33 -!- skyyy [i=caw@129.21.116.238] has joined #go-nuts 00:34 -!- pvandusen [n=pdusen@crob4-55.flint.umich.edu] has quit [Read error: 113 (No route to host)] 00:34 -!- pdusen [n=pdusen@crob4-55.flint.umich.edu] has joined #go-nuts 00:38 -!- gkmngrgn [n=gkmngrgn@unaffiliated/gkmngrgn] has quit [Remote closed the connection] 00:39 -!- gkmngrgn [n=gkmngrgn@78.183.58.226] has joined #go-nuts 00:41 -!- Zaba_ [n=zaba@about/goats/billygoat/zaba] has joined #go-nuts 00:43 -!- amuck [n=amuck@h154.65.88.75.dynamic.ip.windstream.net] has joined #go-nuts 00:45 -!- eulenspiegel [n=irssi@p579CA78F.dip.t-dialin.net] has quit ["leaving"] 00:45 -!- gasreaa [n=atwong@nat/slide/x-eptxcwjsubhjkmnf] has left #go-nuts [] 00:48 -!- turutosiya [n=turutosi@219.106.251.65] has joined #go-nuts 00:48 -!- Zaba [n=zaba@about/goats/billygoat/zaba] has quit [Read error: 110 (Connection timed out)] 00:49 -!- kanru [n=kanru@61-228-148-113.dynamic.hinet.net] has joined #go-nuts 00:51 < skelterjohn> I made a googlecode project to keep track of some useful concurrency patterns - http://code.google.com/p/goconc/ 00:51 -!- fwiffo [n=fwiffo@unaffiliated/fwiffo] has joined #go-nuts 00:51 -!- carllerche [n=carllerc@enginey-9.border1.sfo002.pnap.net] has quit [Read error: 110 (Connection timed out)] 00:51 -!- iant [n=iant@67.218.107.235] has joined #go-nuts 00:52 -!- mode/#go-nuts [+v iant] by ChanServ 00:55 -!- Rob_Russell [n=chatzill@206-248-157-156.dsl.teksavvy.com] has quit [Read error: 113 (No route to host)] 00:55 -!- teedex [n=teedex@204.14.155.161] has quit ["Leaving..."] 00:56 -!- ohday [n=ohday@unaffiliated/ohday] has joined #go-nuts 00:56 -!- Rob_Russell [n=chatzill@206-248-157-156.dsl.teksavvy.com] has joined #go-nuts 00:56 -!- felipe [n=felipe@my.nada.kth.se] has joined #go-nuts 00:57 -!- bfrank2 [n=addos@cpe-069-134-163-125.nc.res.rr.com] has joined #go-nuts 00:58 -!- triplez [n=triplez@cm52.sigma225.maxonline.com.sg] has quit [] 00:59 -!- kota1111 [n=kota1111@gw2.kbmj.jp] has joined #go-nuts 01:01 -!- armence [n=armence@c-67-188-229-128.hsd1.ca.comcast.net] has quit [Read error: 54 (Connection reset by peer)] 01:02 -!- grizzlysmit [n=grizzlys@123-243-91-241.tpgi.com.au] has joined #go-nuts 01:03 -!- grizzlysmit [n=grizzlys@123-243-91-241.tpgi.com.au] has left #go-nuts [] 01:03 -!- gkmngrgn [n=gkmngrgn@unaffiliated/gkmngrgn] has quit [Remote closed the connection] 01:13 < uriel> skelterjohn: cool, I will add a link to http://go-lang.cat-v.org 01:14 < skelterjohn> neat 01:14 < skelterjohn> You should convince the golang guys to link your site on the homepage 01:14 < bfrank2> you wouldn't think that would be that difficult 01:15 < bfrank2> uriel is the man 01:15 < bfrank2> :) 01:16 < uriel> bfrank2: some things are trickier than it might seem... 01:16 < uriel> bfrank2: and thanks for the encouragement 01:17 < KiNgMaR> amazing how much stuff people came up with already 01:17 < uriel> KiNgMaR: I'm sure I'm missing quite a lot of stuff 01:17 -!- fgb [n=fgb@190.246.85.45] has joined #go-nuts 01:17 < bfrank2> your site has all kinds of great stuff 01:18 < uriel> well, glad you folks find it useful 01:18 * uriel has a cold and trouble thinking, so has spent some time working on his programming quotes collection: http://quotes.cat-v.org/programming/ 01:21 < bfrank2> when using := with a piece of code, is there any way to determine what type a variable is? 01:23 < uriel> bfrank2: what do you mean about using :=? 01:23 < uriel> if you want to determine what type a variable is, usually a type switch is the best way to go 01:23 < bfrank2> hmm 01:24 < uriel> what are you trying to do? 01:24 < KirkMcDonald> bfrank2: Its type is the type of the initializer. 01:24 < KirkMcDonald> bfrank2: So check what the initializer's type is. 01:24 < uriel> (note that there is never any ambiguity as to the type of something declared with := 01:24 < uriel> well, what KirkMcDonald said :) 01:24 -!- ohday [n=ohday@unaffiliated/ohday] has quit ["Leaving"] 01:25 -!- triplez [n=triplez@bb116-14-64-2.singnet.com.sg] has joined #go-nuts 01:25 < bfrank2> I guess I need to look into a type switch. Basically, I want to retrieve data from functions, assign them with := and then have a way for it to tell me what type it is 01:26 < uriel> well, what type does the function return? 01:26 < uriel> that will be the type of the variable 01:27 -!- Gracenotes [n=person@wikipedia/Gracenotes] has quit [Remote closed the connection] 01:27 -!- Venom_X [n=pjacobs@cpe-67-9-131-167.austin.res.rr.com] has quit [] 01:28 -!- jsgotangco [n=JSG@ubuntu/member/jsgotangco] has joined #go-nuts 01:28 < bfrank2> ReadFile said it returns []bytes, or atleast I thought it did. But when I tried to do the assignment to the wrong variable type, the compiler said that it was trying to assign a uint8. Is a uint8 considered []bytes? 01:28 < bfrank2> I am probably juust severely confused 01:28 -!- BMeph [n=black_me@65.103.151.24] has joined #go-nuts 01:29 < KirkMcDonald> 'byte' is an alias for uint8. 01:30 < bfrank2> ahhh 01:30 -!- fhs [n=fhs@pool-72-89-203-117.nycmny.east.verizon.net] has joined #go-nuts 01:30 < KirkMcDonald> Pastebin the code, perhaps? 01:31 < bfrank2> ha, I got it working, when I didn't define the type of the variable, when I just used := 01:31 < bfrank2> but I wasn't sure why, until you mentioned that byte and uint8 are the same thing 01:32 -!- Associat0r [n=Associat@h163153.upc-h.chello.nl] has quit [] 01:32 < bfrank2> having a way to have the language tell me whatype a variable is might be nice] 01:33 < bfrank2> is there a list of those aliases? 01:33 < skelterjohn> Sounds like a job for an IDE 01:33 < KirkMcDonald> bfrank2: Normally this is patently obvious. 01:33 < bfrank2> true 01:33 < KirkMcDonald> bfrank2: That is, the static type of a variable is usually obvious. 01:33 < KirkMcDonald> bfrank2: The dynamic type of an interface variable is another matter. 01:34 < skelterjohn> seems weird to me that byte would be an alias for uint8, rather than "type byte uint8" 01:34 < KirkMcDonald> bfrank2: http://golang.org/doc/go_spec.html#Types 01:34 < bfrank2> thanks 01:34 < skelterjohn> but right there in your link, it says that 01:34 -!- boscop_ [n=unknown@f055200178.adsl.alicedsl.de] has quit [Client Quit] 01:35 < uriel> 01:31 < bfrank2> ha, I got it working, when I didn't define the type of the variable, when I just used := 01:35 < uriel> bfrank2: as I said := *does* define the type of the variable 01:35 < uriel> it defines it to the type of the rvalue 01:35 < bfrank2> well, I mean, I didn't explicitly define it 01:35 < uriel> it does *explicitly define it 01:35 < bfrank2> hmm 01:35 < KirkMcDonald> It does. The coder doesn't. 01:36 < bfrank2> when I tried, I mean, I was doing it wrong. Letting the language do it, worked, but I didn't know why... 01:36 < uriel> the expression to the right of := does have a well defined type, that is the type 01:36 < skelterjohn> i tend to think of that as an implicit type declaration, rather than an explicit one 01:36 < bfrank2> yeah, I sorta do too 01:36 < bfrank2> but that is just me 01:36 < KirkMcDonald> It is type inference. 01:36 < skelterjohn> x := y *implies* that x has the same type as y 01:36 < KirkMcDonald> That is the usual name. 01:36 < uriel> skelterjohn: there is no semantic different whatsoever between either 01:36 < skelterjohn> implicit and explicit mean different things :) 01:37 < uriel> skelterjohn: it doesn't imply, it is the only way, it can be anything else 01:37 < skelterjohn> explicit means you state. implicit means you infer 01:37 < uriel> s/can/can't/ 01:37 < skelterjohn> imply doesn't mean that there are other possibilities 01:37 < skelterjohn> it means you have to figure it out from the evidence presented 01:37 < kfx> just because it isn't in english doesn't mean it's not explicit there 01:37 < uriel> skelterjohn: sure, but that is not what bfrank2 was implying 01:38 -!- decriptor [n=decripto@53.250.sfcn.org] has joined #go-nuts 01:38 < uriel> the point is, there is only one possible way to interprest x := y 01:38 < skelterjohn> yes 01:38 < skelterjohn> I feel like no one is actually disagreeing. This conversation is confusing me. 01:39 < bfrank2> I think aliases are part of why it was confusing 01:39 < uriel> skelterjohn: sure, sorry, lack of sleep and a cold is making me dense 01:39 < bfrank2> heh 01:39 < uriel> bfrank2: what aliases? 01:39 < skelterjohn> "byte is a common alias for uint8" 01:39 < skelterjohn> says that in the lang spec 01:39 < bfrank2> well, and my complete lack of knowledge on how to use this language 01:39 < skelterjohn> which I take to mean it's different than "type byte uint8" 01:40 < bfrank2> yeah, my bad, I should read that before asking any other stupid question 01:40 < skelterjohn> expecting you to devour the lang spec is unreasonable 01:40 <+iant> skelterjohn: yes, it's different from "type byte uint8" and the difference is detectable when using type reflection 01:40 < skelterjohn> this is a good forum for that sort of question 01:40 < skelterjohn> iant: is there a way to create your own aliases? 01:41 < uriel> hmmm.. I had noticed that myself, that sounds a bit confusing then.. 01:41 <+iant> no, although we've discussed it off and on 01:41 * uriel would rather have no aliases 01:41 < uriel> they don't seem to add much to the language 01:41 < skelterjohn> i agree 01:41 <+iant> yeah, that's kind of why they aren't in there now 01:41 -!- mejja [n=user@c-49b6e555.023-82-73746f38.cust.bredbandsbolaget.se] has quit [Remote closed the connection] 01:41 < uriel> (well, I guess int being an alias of a type that makes sense on this arch does make sense) 01:41 < skelterjohn> but having only one alias, defined by the language, is confusing 01:42 < skelterjohn> though not overly so - but consistency is comforting ;) 01:42 <+iant> it is a little weird, I agree, but nobody has really felt compelled to change it 01:42 -!- musty [n=musty@unaffiliated/musty] has joined #go-nuts 01:42 < musty> hmm, new syntax x[lo:] is shorthand for x[lo:len(x)]. 01:42 < uriel> skelterjohn: I agree 01:42 < skelterjohn> easy to ignore if you don't like it 01:43 -!- turutosiya [n=turutosi@219.106.251.65] has quit [Read error: 110 (Connection timed out)] 01:43 < sladegen> type bit uint1 01:43 < skelterjohn> heh 01:43 < uriel> sladegen: haha 01:44 < uriel> btw, I like the new semicolon proposal sounds like it might clear up things a bit, but i will miss the string concatenation... 01:44 < uriel> but it is probably a non-issue 01:46 < uriel> iant: what would be the biggest problem with having type byte uint8? I guess a few things might break, but doesn't sound like a big loss.. 01:47 -!- binaryjohn [n=binaryjo@cpe-24-30-132-50.san.res.rr.com] has joined #go-nuts 01:47 < adiabatic> Aren't there some systems where type byte int8 would be preferred, or have they all gone the way of the dodo? 01:47 <+iant> I think the biggest problem would be that code that uses type reflection and needs to handle byte values would need to have an extra case 01:48 <+iant> adiabatic: it's much simpler to reason about it if byte doesn't change signedness 01:48 < adiabatic> iant: wholly agreed 01:48 -!- binaryjohn [n=binaryjo@cpe-24-30-132-50.san.res.rr.com] has quit [Client Quit] 01:49 < alexsuraci> i noticed a point where type aliases would've really come in handy when i was working on my parser lib 01:49 <+iant> alexsuraci: really? how so? 01:50 < alexsuraci> iant: in the lib, I have, say, "type Parser func(Vessel) (Output, bool)" 01:50 < skelterjohn> aha 01:50 < alexsuraci> trouble is when defining a function there's no way to say it's a Parser 01:50 <+iant> I see the problem, but how would type aliases help solve it? 01:50 < alexsuraci> i worked around it by having functions that return parsers (also helps with infinitely recursive parser combinators) 01:51 < alexsuraci> in this case, certain functions in the lib take a flexible number of args and reflect them as Parsers 01:51 < alexsuraci> but parsers defined externally will be a "func (Vessel) (Output, bool)" 01:51 < alexsuraci> thus, although the types are equivalent, they won't match 01:51 < alexsuraci> if types were just aliases it wouldn't matter there, would it? 01:51 < alexsuraci> rather, if Parser was just an alias 01:52 <+iant> could you use an explicit type conversion? the types should be conversion compatible 01:52 < alexsuraci> hang on, let me reopen my code as a refresher 01:52 -!- fenicks [n=christia@log77-4-82-246-228-78.fbx.proxad.net] has quit ["Leaving."] 01:53 < alexsuraci> iant: it goes over the args (as a StructValue), and does "parser := p.Field(i).Interface().(Parser)" 01:53 -!- Wiz126 [i=Wiz126@72.20.222.5] has joined #go-nuts 01:53 <+iant> yeah, something like that, maybe 01:54 < alexsuraci> yea that's what was failing 01:54 <+iant> wait, sorry 01:54 <+iant> I mean something like: Parser(p.Field(i).Interface().(func (...) ...)) 01:54 < alexsuraci> yeah, was just gonna guess that 01:54 < alexsuraci> i'll try it out 01:54 <+iant> good luck, I have to sign off now 01:54 < alexsuraci> thanks, see ya 01:55 < bfrank2> is there something that can read files a line at a time? 01:55 < bfrank2> ReadFile reads the whole thing into a string 01:55 < bfrank2> or do I have to split the lines apart or something? 01:58 -!- skelterjohn [n=jasmuth@c-76-116-176-34.hsd1.nj.comcast.net] has quit [] 01:58 < alexsuraci> iant: if you're still there, just tested and that just flips around what happens - Parsers fail, but func (...) ... matches 01:58 < alexsuraci> perhaps i'll take it to a relevant ML thread ;) 01:59 < uriel> alexsuraci: I think I'm missing the point, so this might be a really stupid suggestion, but why not make Parser an interface? 01:59 < uriel> an interface with a single parse function 02:00 -!- KinOfCain [n=KinOfCai@rrcs-64-183-61-2.west.biz.rr.com] has quit [Remote closed the connection] 02:00 < alexsuraci> that would make them a bit harder to make 02:00 < alexsuraci> right now they just have to be a function that takes an input and returns an output and "success" bool 02:00 -!- skelterjohn [n=jasmuth@c-76-116-176-34.hsd1.nj.comcast.net] has joined #go-nuts 02:01 < alexsuraci> plus functions are just sort of natural with a library like this 02:01 -!- kanru [n=kanru@61-228-148-113.dynamic.hinet.net] has quit ["WeeChat 0.3.1-dev"] 02:02 < uriel> yea, I agree 02:03 -!- tomestla [n=tom@78.251.229.30] has quit ["Leaving."] 02:03 < uriel> maybe some kind of sugar to wrap single functions as an interface or something might be nice, but i'm talking out of my ass 02:03 < alexsuraci> i got around it by having functions that return Parsers 02:03 -!- kanru [n=kanru@61-228-148-113.dynamic.hinet.net] has joined #go-nuts 02:04 < alexsuraci> there the type is explicit, plus that can be used for infinitely-nested stuff 02:04 < alexsuraci> so sort of a neat pattern that emerged from a language limitation :P 02:04 < uriel> heh :) 02:05 < alexsuraci> it pretty much just uses currying everywhere 02:05 < alexsuraci> almost, anyway 02:06 < uriel> alexsuraci: still, might be worth bringing up the issue on the mailing list, it certainly would be more intersting than most of the stuff that is posted there :) 02:06 < alexsuraci> e.g. Satisfy(unicode.IsLower) returns a Parser that parses any character that is a unicode lowercase 02:06 < alexsuraci> haha, sure. 02:16 -!- iant [n=iant@67.218.107.235] has quit [Read error: 110 (Connection timed out)] 02:17 -!- ohday [n=ohday@unaffiliated/ohday] has joined #go-nuts 02:20 -!- jsgotangco [n=JSG@ubuntu/member/jsgotangco] has quit ["This computer has gone to sleep"] 02:21 -!- Sparkie [n=Penguin@CPE-121-216-135-238.lnse2.ken.bigpond.net.au] has joined #go-nuts 02:22 -!- sm [n=sm@cpe-76-173-194-242.socal.res.rr.com] has quit [] 02:24 < alexsuraci> uriel: posted 02:24 < alexsuraci> title: "An odd case for type aliasing" 02:25 -!- Sparkie [n=Penguin@CPE-121-216-135-238.lnse2.ken.bigpond.net.au] has left #go-nuts [] 02:28 -!- ajstarks [n=ajstarks@pool-98-109-198-180.nwrknj.fios.verizon.net] has joined #go-nuts 02:33 -!- ajstarks [n=ajstarks@pool-98-109-198-180.nwrknj.fios.verizon.net] has quit [] 02:33 < uriel> cool 02:33 < uriel> (for the record, I'm still in favor of getting rid of aliasing completely) 02:36 < uriel> "Why anyone writes anything other than assembler is beyond me." 02:36 < uriel> hahaha :)) 02:37 -!- musty [n=musty@unaffiliated/musty] has quit ["Leaving"] 02:39 < alexsuraci> haha 02:42 -!- Kniht [n=kniht@c-68-58-17-177.hsd1.in.comcast.net] has joined #go-nuts 02:52 -!- triplez_ [n=triplez@bb116-14-64-2.singnet.com.sg] has joined #go-nuts 02:58 -!- triplez [n=triplez@bb116-14-64-2.singnet.com.sg] has quit [Read error: 60 (Operation timed out)] 03:01 < alexsuraci> oo, I like the semicolons proposal. 03:06 -!- Alkavan [n=alkavan@IGLD-84-229-142-45.inter.net.il] has joined #go-nuts 03:06 < asyncster> hey, let's say I have a StructValue . Is there a way to get a PtrValue to the underlying struct? 03:14 -!- Spaghett1ni [n=Spaghett@vaxjo6.150.cust.blixtvik.net] has joined #go-nuts 03:15 -!- KiNgMaR [n=ingmar@2001:41d0:2:7518:1:3:3:7] has quit [Read error: 113 (No route to host)] 03:15 -!- stalled_ [n=411@unaffiliated/stalled] has joined #go-nuts 03:15 -!- [[sroracle]] [n=sroracle@unaffiliated/sroracle] has quit ["<sresp.co.cc>"] 03:15 < fgb> for !foo() { 03:15 < fgb> ... I guess waiting on channels is not that obvious, huh 03:16 -!- asyncster2 [n=asyncste@206.169.213.106] has joined #go-nuts 03:17 -!- uxp [n=uxp@uxp.dsl.xmission.com] has joined #go-nuts 03:17 -!- Netsplit kornbluth.freenode.net <-> irc.freenode.net quits: StDan, asyncster, stalled, uxp_, vegai, shasbot, rhc_, beneth`_, borisc, syd, (+7 more, use /NETSPLIT to show all of them) 03:18 -!- Netsplit over, joins: JBeshir 03:19 -!- Netsplit over, joins: Fish-Work, borisc, asyncster, uxp_, syd, lazzurs, StDan, vegai, analogue, rhc_ (+5 more) 03:19 -!- BMeph [n=black_me@65.103.151.24] has quit [Killed by douglas.freenode.net (Nick collision)] 03:19 -!- borisc [n=borisc@borisc2.csbnet.se] has quit [Connection reset by peer] 03:19 -!- triplez_ [n=triplez@bb116-14-20-203.singnet.com.sg] has joined #go-nuts 03:19 -!- borisc_ [n=borisc@borisc2.csbnet.se] has joined #go-nuts 03:19 -!- lazzurs [n=lazzurs@77.74.198.235] has quit [Broken pipe] 03:19 -!- rhc_ [n=matt@qnan.org] has quit [Remote closed the connection] 03:19 -!- lazzurs [n=lazzurs@77.74.198.235] has joined #go-nuts 03:19 -!- rhc [n=matt@qnan.org] has joined #go-nuts 03:19 -!- Spaghettini [n=Spaghett@vaxjo6.150.cust.blixtvik.net] has quit [SendQ exceeded] 03:21 -!- Wiz126 [i=Wiz126@72.20.222.5] has quit [Connection timed out] 03:21 -!- asyncster [n=asyncste@206.169.213.106] has quit [Connection reset by peer] 03:21 < uriel> asyncster2: &yourval? 03:21 < uriel> fgb: where is that? 03:22 < fgb> the list 03:22 -!- Cyanure [n=cyanure@212-198-164-142.rev.numericable.fr] has quit [Connection timed out] 03:23 -!- Cyanure [n=cyanure@81-65-189-254.rev.numericable.fr] has joined #go-nuts 03:23 < uriel> fgb: hah 03:28 -!- triplez__ [n=triplez@124.155.195.7] has joined #go-nuts 03:30 < skelterjohn> uriel: referring to my post about busy waiting, no doubt 03:31 < skelterjohn> If someone can come up with a less busy-waity kind of way to do what I want, I'm all ears. 03:31 < uriel> as fgb said, what is wrong with channels? 03:31 < uriel> if you are busy waiting, you are doing it wrong 03:32 -!- fynn [n=fynn@unaffiliated/fynn] has joined #go-nuts 03:32 < skelterjohn> the context is: I want to read from a channel, or abort if another channel is closed 03:32 -!- fynn [n=fynn@unaffiliated/fynn] has left #go-nuts ["Leaving"] 03:32 < skelterjohn> not every event that I might want to wait for can easily be sent on a channel 03:33 -!- path[l] [n=path@115.240.6.20] has joined #go-nuts 03:33 < uriel> skelterjohn: select 03:33 -!- uxp_ [n=uxp@uxp.dsl.xmission.com] has quit [SendQ exceeded] 03:33 < uriel> what events can't be sent on a channel? 03:34 < skelterjohn> how can i get the event that "Someone closed channel X" to be sent on channel Y without adding extra infrastructure? 03:34 < uriel> what does 'closed channel' mean? 03:34 -!- triplez [n=triplez@bb116-14-64-2.singnet.com.sg] has quit [Read error: 110 (Connection timed out)] 03:34 < skelterjohn> i don't want to require that when the other channel is closed, the programmer *must* send a nonsense message along a second channel 03:34 < uriel> just have a channel to send any notification you like 03:34 < skelterjohn> close(thechannel) 03:35 < fgb> not closed, we usually use waitchannels 03:35 < uriel> why do you want to close the channel? uhu 03:35 * uriel just doesn't get it 03:35 < skelterjohn> 1) does it really matter? it's a valid thing to want to do 03:35 < skelterjohn> 2) http://code.google.com/p/goconc/source/browse/fold.go 03:36 < uriel> skelterjohn: no, to busy-wait just doesn't make any sense, just send events over channels, that is the way Go works, and there is nothing wrong with it 03:36 < fgb> ok, it's just one of those paradigm things 03:36 -!- turutosiya [n=turutosi@219.106.251.65] has joined #go-nuts 03:36 < fgb> the !foo() stuff assumes you either have a global or static variable 03:36 -!- rafa7 [n=EasyScri@20151046015.user.veloxzone.com.br] has quit [": Agora nos sabores manga com laranja e abacaxi com menta! Experimente!"] 03:36 < fgb> that you're checking or something that's going to happen 03:36 < uriel> so, listen on a channel and send that over a channel when it happens 03:36 < fgb> why just don't you notify in a channel when the condition changed? 03:37 < skelterjohn> because "I" am not the one changing the condition 03:37 < skelterjohn> it's the anonymous developer 03:37 < skelterjohn> this is what I want to do: 03:37 < skelterjohn> pass Fold() a channel 03:37 < skelterjohn> fold does stuff with the things that come on that channel, until that channel is closed 03:37 < skelterjohn> once that channel closes it can return a value 03:38 < fgb> you can have more than 1 channel.. 03:38 < fgb> in anycase it's a paradigm thing 03:38 < skelterjohn> sure, but that is a bulky api 03:38 < skelterjohn> it would be nice to just wait for it to close 03:38 < skelterjohn> since that is something i can check, built into the language 03:38 < uriel> what fgb said, pass Fold two channels, read from one, and have Fold send something down the channel when it is done 03:39 < uriel> skelterjohn: do not close channels, just send *stuff* down channels 03:39 < fgb> the function waiting doesn't even need a loop, it just blocks until the function sends "I'm done!" 03:40 < skelterjohn> what if i get a Vector iterator 03:40 < skelterjohn> i haven't examined Vector, but I believe the iterator is a channel that sends the values in the vector 03:40 -!- Cyanure [n=cyanure@81-65-189-254.rev.numericable.fr] has quit [Read error: 104 (Connection reset by peer)] 03:40 < skelterjohn> and closes when done 03:40 -!- Cyanure [n=cyanure@81-65-189-254.rev.numericable.fr] has joined #go-nuts 03:40 < skelterjohn> i can pass that to Fold() 03:40 < uriel> so? 03:40 < skelterjohn> how would I know when the iterator is done? 03:40 < skelterjohn> Fold knows, because the channel closes 03:40 < uriel> skelterjohn: by having Fold send you a 'done' message down a channel! 03:41 < skelterjohn> no - Fold doesn't decide when it's done 03:41 < skelterjohn> the thing that I give to fold 03:41 < skelterjohn> the input channel 03:41 < uriel> uhu? 03:41 < skelterjohn> when it is exhausted, then fold can finish 03:41 < skelterjohn> otherwise fold might have to deal with more values 03:41 < uriel> Fold() doesn't know when it is done? are you frking serious? 03:41 -!- Kniht [n=kniht@c-68-58-17-177.hsd1.in.comcast.net] has quit [Read error: 110 (Connection timed out)] 03:42 < skelterjohn> Fold(), as I implemented it, is a function that takes a channel and a function that will combine two items from the channel 03:42 < uriel> how can it not know? it has to stop reading from the channel! 03:42 < skelterjohn> it stops reading when the channel is closed 03:42 < uriel> so? 03:42 < uriel> fine, and then sends 'done' down another channel 03:42 < dho> skelterjohn: why not just use for !closed(chan) { <-chan } 03:42 -!- BMeph [n=black_me@65.103.151.24] has joined #go-nuts 03:42 < uriel> dho: that is just wrong 03:43 < skelterjohn> first, i'd need to read the values off of chan 03:43 < skelterjohn> the last one i'd get would be zeroed 03:43 < skelterjohn> how do i know if its valid, or i got zero because the chan was closed? 03:43 < fgb> errors? 03:43 < skelterjohn> checking closed immediately after is no good, because i could have gotten a valid zero and have the chan close before i can check 03:43 < skelterjohn> fgb: ? 03:44 < dho> uriel: why 03:44 < fgb> you return and error when an error happens 03:44 < uriel> dho: busy waiting is just wrong 03:44 < skelterjohn> but a zero isn't an error 03:44 < dho> uriel: that's busy waiting? 03:44 < skelterjohn> how could i even tell if it was an error? 03:44 < fgb> skelterjohn, why are you usign callbacks in the first place? 03:44 -!- toft [n=jlewis@unaffiliated/crassworm] has joined #go-nuts 03:44 < uriel> dho: calling !closed() in a loop 03:44 < skelterjohn> fgb: what are you referring to now 03:44 < skelterjohn> uriel: there was a <- chan in there, so it wasn't busy waiting 03:44 < dho> uriel: where you're reading the channel you're figureing out if it's closed? 03:45 < dho> uriel: the !closed is the condition, the loop blocks. 03:45 < dho> it's not a busy wait. 03:45 < fgb> ok, who cares if the channel is closed? 03:45 < skelterjohn> Fold() does? 03:45 < fgb> if you have to check that, then the logic is all wrong 03:45 < skelterjohn> why? by definition? 03:45 < fgb> yes 03:45 < uriel> skelterjohn: well, if Fold() does care if the channel it is closed, it should *know* when it is closed, and can say 'done' 03:46 < fgb> skelterjohn, who closes the channel? 03:46 < uriel> and what problem are you trying to solve with this arrangement anyway? 03:46 < skelterjohn> the code that creates it 03:46 -!- triplez_ [n=triplez@bb116-14-20-203.singnet.com.sg] has quit [No route to host] 03:46 < fgb> the one that closes the channel should notify the other goroutines that are using that channel 03:46 < fgb> ... 03:46 < skelterjohn> uriel: the Fold() problem 03:46 < uriel> skelterjohn: what is 'the Fold() problem'? 03:46 < dho> skelterjohn: also, that's not true re: closed 03:47 < dho> skelterjohn: it will return a zero value and then closed will return true. 03:47 < skelterjohn> the problem of implementing the fold operation...a list processing function 03:47 < fgb> skelterjohn, sorry, but what's the problem you're trying to solve? 03:47 < fgb> (it all starts here...) 03:47 < skelterjohn> :) alright 03:47 < dho> if you get a valid 0, then the channel closes, you will still have another 0 to read before closed() returns true. 03:47 < skelterjohn> dho: eh? 03:47 < skelterjohn> first: what is fold() 03:47 < uriel> skelterjohn: what is the problem? you could implement the fold by having a function that takes one channel and returns another channel 03:47 < dho> http://golang.org/doc/go_spec.html#Close_and_closed 03:48 < skelterjohn> why would it return another channel 03:48 < uriel> skelterjohn: the channel with the 'folded' values! 03:48 < skelterjohn> there is only one folded value 03:48 < uriel> it works just as a filter 03:48 < skelterjohn> let me explain fold 03:48 < skelterjohn> it's not a filter 03:48 < uriel> well, then even simpler 03:48 < skelterjohn> if i fold the list [1,2,3,4,5] with the function +, I get 10 03:49 -!- sliceofpi [n=sliceofp@c-98-197-1-232.hsd1.tx.comcast.net] has quit [Read error: 110 (Connection timed out)] 03:49 < uriel> oh, that, again, even simpler 03:49 < uriel> take a channel, and a return channel 03:49 < skelterjohn> [1,2,3,4,5] -> [3 ,3,4,5] -> [6 ,4,5] -> etc 03:49 < alexsuraci> wouldn't that be 15? 03:49 < skelterjohn> yes 03:49 < skelterjohn> not so good at arirthmetic 03:49 < uriel> do your thing, and when you are done, send the result down the result channel 03:49 < alexsuraci> haha 03:49 < xerox> fold doesn't look like it's easy to parallalelize in general 03:49 < dho> alexsuraci: base 15 03:49 < dho> :) 03:50 < alexsuraci> lol 03:50 < skelterjohn> so, the way I did it, is I have a "ready" channel. first thing is I dump all of the input channel onto the ready channel 03:50 < skelterjohn> then I grab pairs of values off the ready channel, apply the function to them, and put them back on the channel 03:50 < skelterjohn> with appropriate goroutines to make it go in parallel nicely 03:50 < skelterjohn> http://code.google.com/p/goconc/source/browse/fold.go 03:50 < xerox> skelterjohn: the idea is to do one fold in another thread? 03:51 < skelterjohn> each application of the function to pairs of values runs in its own thread 03:51 < dho> skelterjohn: grab pairs? fold [1,2,3,4,5] with function / doesn't work like that 03:51 < skelterjohn> and i have a counter to keep track of how many values are being processed and are nt back on the ready queue yet 03:51 -!- viirya [n=viirya@cml506-25.csie.ntu.edu.tw] has quit ["leaving"] 03:51 < skelterjohn> how does fold with / work? 03:51 < xerox> dho: well spotted, associativity of the operation is vital 03:52 < dho> skelterjohn: you divide. 03:52 < xerox> you have two different fold, foldr and foldl 03:52 < fgb> skelterjohn, I don't get the problem you're trying to solve, otherwise I'll sketch you a solution... 03:52 < skelterjohn> well, maybe i got fold wrong 03:52 < xerox> see http://foldr.com/ and http://foldl.com/ 03:52 < xerox> (for a visual explanation) 03:52 < skelterjohn> didn't realize that you could do it with non commutative operators 03:52 < skelterjohn> i understand how to do this when order matters 03:52 < xerox> oh, foldl.com is bad 03:53 < alexsuraci> aw. 03:53 < skelterjohn> i figured it just worked like reduce 03:53 -!- BMeph [n=black_me@65.103.151.24] has quit [Read error: 104 (Connection reset by peer)] 03:53 < xerox> skelterjohn: it's not commutativity, it's associativity here 03:53 -!- BMeph [n=black_me@65.103.151.24] has joined #go-nuts 03:53 < skelterjohn> arithmetic again, remind me of which is which? 03:53 < xerox> namely the relation between (a*b)*c and a*(b*c) 03:53 < skelterjohn> right 03:53 -!- rbohn [n=chatzill@d103.digis.net] has joined #go-nuts 03:53 < skelterjohn> i figured fold just didn't make sense if you couldn't reoder them 03:53 < skelterjohn> certainly doesn't for my funciton 03:53 < alexsuraci> xerox: here you go ;) http://web.archive.org/web/20060327112912/http://foldl.com/ 03:53 < skelterjohn> function 03:54 < dho> ok. 03:54 < xerox> alexsuraci: nice :) 03:54 < dho> well if you have that guarantee, then you can do it. 03:54 < xerox> so you have two folds, but neither is easy to parallelize. 03:54 < skelterjohn> i agree 03:54 < skelterjohn> so my function shouldn't be called fold 03:55 < skelterjohn> i still think it's an interesting function 03:55 < dho> xerox: no, if you guarantee correct associativity, you can do it in pairs like that, and that can be parallelized easily 03:55 < skelterjohn> call it foldLR 03:55 < skelterjohn> or something 03:55 -!- viirya [n=viirya@cml506-25.csie.ntu.edu.tw] has joined #go-nuts 03:55 -!- aho [n=nya@g226201055.adsl.alicedsl.de] has quit ["EXEC_over.METHOD_SUBLIMATION"] 03:55 < skelterjohn> or reduce_with_no_identity 03:56 < xerox> makes sense to call it only fold if you stipulate the contract with the caller that the operation is associative 03:56 -!- Cyanure [n=cyanure@81-65-189-254.rev.numericable.fr] has quit [Read error: 104 (Connection reset by peer)] 03:56 -!- Cyanure [n=cyanure@81-65-189-254.rev.numericable.fr] has joined #go-nuts 03:56 < skelterjohn> either way, requiring the user to send a message through a separate channel to signify the end of the inputs is not good for two reasons 03:56 < skelterjohn> 1) lots of extra typing - the information is already there 03:56 < xerox> also the list does need not to be empty, or you have to pass in a default value for that case 03:56 < xerox> (which is what foldr and foldl do) 03:56 < dho> skelterjohn: i don't see why the !closed() won't work for you 03:56 < skelterjohn> 2) sometimes you get an iterator channel and that's it, you don't know where it came from 03:57 < xerox> (but that in your case is quite arbitrary where to put) 03:57 < skelterjohn> dho: if you're right that the last value read before closed(chan) returns true is always nil, then that will work 03:57 < skelterjohn> i didn't think that was the case though 03:57 < dho> skelterjohn: it's in the language spec 03:57 < skelterjohn> i almost want to think it's a typo 03:57 < dho> it always returns the zero value for the type over the channel 03:58 < skelterjohn> i'll run a test 03:58 < dho> and closed() will not return true until that value is read 03:58 < skelterjohn> so val, isClosed := <- myChan, closed(myChan) 03:59 < skelterjohn> if isClosed is true, i can disregard val 03:59 < skelterjohn> is that what you mean? 03:59 < skelterjohn> gonna test that 04:00 -!- codedread [i=81bc2119@gateway/web/freenode/x-pbjoxiigrfihodsl] has quit ["Page closed"] 04:00 < dho> i guess, theoretically yes. 04:00 < dho> if not, it's a bug. 04:00 < skelterjohn> or a doc typo 04:00 < dho> no, that's the intention. 04:00 < dho> otherwise closed() isn't useful 04:01 < skelterjohn> isn't *as* useful, perhaps 04:01 < dho> it's completely unuseful, because you can never make the guarantee that you've finished processing the values of the channel 04:01 < dho> anyway 04:01 < dho> yes, test 04:02 -!- path[l] [n=path@115.240.6.20] has quit [] 04:02 < skelterjohn> works as advertised (by dho) 04:02 < skelterjohn> that makes things simpler 04:03 < skelterjohn> thanks for pointing this out :) 04:03 < dho> no problem 04:04 -!- Knarfian [i=4c70014c@gateway/web/freenode/x-vqzerfsfutmrzxzr] has quit [Ping timeout: 180 seconds] 04:04 -!- Xera^ [n=lol@87-194-208-246.bethere.co.uk] has quit ["( www.nnscript.com :: NoNameScript 4.21 :: www.esnation.com )"] 04:05 * dho saw aho's quit and then wondered how he was still in the channel 04:05 * dho needs a better font and sleep 04:06 -!- rbohn [n=chatzill@d103.digis.net] has left #go-nuts ["zzz"] 04:07 -!- BMeph [n=black_me@65.103.151.24] has quit [Remote closed the connection] 04:07 -!- KiNgMaR [n=ingmar@2001:41d0:2:7518:1:3:3:7] has joined #go-nuts 04:08 * dho -> sleep 04:11 -!- Zaba_ [n=zaba@about/goats/billygoat/zaba] has quit [Read error: 60 (Operation timed out)] 04:13 -!- Cyanure [n=cyanure@81-65-189-254.rev.numericable.fr] has quit [Read error: 54 (Connection reset by peer)] 04:13 -!- Cyanure [n=cyanure@81-65-189-254.rev.numericable.fr] has joined #go-nuts 04:15 -!- triplez [n=triplez@124.155.195.7] has quit [Read error: 104 (Connection reset by peer)] 04:17 -!- Zaba [n=zaba@ip102.148.adsl.wplus.ru] has joined #go-nuts 04:20 -!- joeyadams [n=joey@208.96.182.115] has joined #go-nuts 04:21 < joeyadams> nice, #go-nuts has about nine times as many users as #go 04:21 < joeyadams> Anyway, I'm looking in src/pkg/runtime/chan.c, and the basic algorithm behind it is close to what I expected 04:22 < joeyadams> one interesting thing I noticed in chanrecv (among others) is the asynch goto loop. 04:23 < joeyadams> I expected a condition variable here. Instead, I see unlock(&chanlock); gosched(); lock(&chanlock); 04:23 -!- Amaranth [n=travis@ubuntu/member/Amaranth] has joined #go-nuts 04:23 < joeyadams> I suppose that's much like a condition variable (it spins, but it tries to let the CPU do other stuff) 04:23 <+danderson> looks like it just yields to the goroutine scheduler 04:24 <+danderson> presumably having registered interest in reading from the channel first 04:24 <+danderson> that way, the OS thread can be reused by another goroutine while the current one is blocked 04:25 <+danderson> eventually, something else will write, and the scheduler can arrange rendezvous 04:25 < joeyadams> right 04:25 -!- skyyy [i=caw@129.21.116.238] has quit [Client Quit] 04:25 < joeyadams> so I guess it has no notion of broadcast? 04:25 <+danderson> so, yeah, similar to a condition variable. The implementation with yielding to the scheduler is just rather plain. 04:25 -!- franksalim [n=frank@adsl-76-221-202-115.dsl.pltn13.sbcglobal.net] has quit [Read error: 60 (Operation timed out)] 04:25 <+danderson> in what sense? 04:25 < joeyadams> e.g. pthread_cond_broadcast (which explicitly tells waiting threads (or in this case, goroutines) that the channel has data) 04:25 <+danderson> well, goroutines are not threads 04:26 <+danderson> broadcast uses the kernel notion of threads to make the right threads runnable 04:26 <+danderson> but with many goroutines sharing and hopping between OS threads, how would the broadcast know what to awaken? 04:27 <+danderson> I don't know how the unblocking is implemented in the Go runtime, but I suspect that it's a similar mechanism, but implemented one level up in the stack 04:27 <+danderson> broadcast in the OS, in the end, just walks a list of threads 04:27 < joeyadams> It could hypothetically have each channel have a bit that, when set to true, indicates it can go 04:27 <+danderson> same for unblocking a channel read 04:27 < joeyadams> But I'm guessing that wouldn't do much good 04:28 < joeyadams> do chansend and chanrecv run in goroutine scope? 04:28 < joeyadams> As in, would a goroutine call chansend? 04:28 <+danderson> no idea, sorry. 04:28 < joeyadams> just wondering 04:28 -!- Rob_Russell [n=chatzill@206-248-157-156.dsl.teksavvy.com] has quit [Read error: 113 (No route to host)] 04:28 <+danderson> (despite the voice, I'm not a go developer, I just lurk around and kick off spammers) 04:28 < joeyadams> lol 04:29 < joeyadams> I'm like that in other places 04:29 <+danderson> and on that note, it's 5:30am, my parser is being stupid, and I have a meeting this morning. Time for a nap. 04:29 < joeyadams> What's fun is acting like a go developer by correctly answering questions by looking directly in the source :D 04:29 -!- Zaba_ [n=zaba@about/goats/billygoat/zaba] has joined #go-nuts 04:29 -!- Cyanure [n=cyanure@81-65-189-254.rev.numericable.fr] has quit [Read error: 104 (Connection reset by peer)] 04:29 -!- Zaba [n=zaba@about/goats/billygoat/zaba] has quit [Read error: 60 (Operation timed out)] 04:29 < joeyadams> anyway, good night 04:29 -!- Cyanure [n=cyanure@81-65-189-254.rev.numericable.fr] has joined #go-nuts 04:30 <+danderson> thx, and good luck with your code walking :) 04:44 -!- kaib [n=kaib@76.102.52.156] has joined #go-nuts 04:44 -!- mode/#go-nuts [+v kaib] by ChanServ 04:45 -!- triplez [n=triplez@bb116-14-20-203.singnet.com.sg] has joined #go-nuts 04:47 -!- halfdan_ [n=halfdan@p57A96DB4.dip.t-dialin.net] has joined #go-nuts 04:48 -!- turutosiya [n=turutosi@219.106.251.65] has quit [Read error: 110 (Connection timed out)] 04:48 -!- Amaranth [n=travis@ubuntu/member/Amaranth] has quit ["Ex-Chat"] 04:49 -!- KiNgMaR [n=ingmar@2001:41d0:2:7518:1:3:3:7] has quit [Read error: 113 (No route to host)] 04:49 -!- Fraeon [n=kzer-za@e212-246-65-153.elisa-laajakaista.fi] has quit [] 04:49 -!- Cyanure [n=cyanure@81-65-189-254.rev.numericable.fr] has quit [Connection timed out] 04:49 -!- KiNgMaR [n=ingmar@2001:41d0:2:7518:1:3:3:7] has joined #go-nuts 04:50 -!- Amaranth [n=travis@ubuntu/member/Amaranth] has joined #go-nuts 04:52 -!- hugh4life [n=hugh4lif@client-208-124-113-132.consolidated.net] has joined #go-nuts 04:55 -!- path[l] [n=path@115.240.68.250] has joined #go-nuts 04:58 -!- sliceofpi [n=sliceofp@c-98-197-1-232.hsd1.tx.comcast.net] has joined #go-nuts 05:02 -!- viirya_ [n=viirya@cml506-25.csie.ntu.edu.tw] has joined #go-nuts 05:02 -!- robot12 [n=root@inferno.kgts.ru] has joined #go-nuts 05:04 -!- viirya [n=viirya@cml506-25.csie.ntu.edu.tw] has quit [Read error: 104 (Connection reset by peer)] 05:06 -!- halfdan [n=halfdan@p57A9790A.dip.t-dialin.net] has quit [Read error: 110 (Connection timed out)] 05:10 < skelterjohn> Alright, for the no one who's still awake, I fixed Fold() to not do any busy waiting. It's much nicer this way. 05:13 < ohday> Amaranth, hi. 05:13 < uriel> skelterjohn: how did you do it? 05:14 < skelterjohn> first, I used dho's enlightenment and read from the inputs, and knew when i was done, without busywaiting 05:14 < skelterjohn> once i was done, i sent a signal along a channel reserved for that purpose 05:14 < skelterjohn> kept track of the number of inputs read, and used the knowledge that i'll fold exactly one time less than that number 05:15 < skelterjohn> so in the folding loop, if all inputs are read and folds == inputCount-1, you'reDone() 05:16 -!- fwiffo [n=fwiffo@unaffiliated/fwiffo] has quit ["Lost terminal"] 05:16 < uriel> nice 05:16 -!- rndbot [n=bot@wikipedia/Gracenotes] has joined #go-nuts 05:17 < skelterjohn> it's a lot slicker this way, aesthetically 05:18 -!- Gracenotes [n=person@wikipedia/Gracenotes] has joined #go-nuts 05:19 -!- ohday [n=ohday@unaffiliated/ohday] has quit ["Leaving"] 05:20 -!- path[l]_ [n=path@115.240.42.18] has joined #go-nuts 05:29 -!- droid001 [n=g1@p4FDCA123.dip.t-dialin.net] has quit [Success] 05:31 -!- slashus2 [n=slashus2@74-137-26-8.dhcp.insightbb.com] has quit [] 05:31 -!- droid001 [n=g1@p4FDC98B1.dip.t-dialin.net] has joined #go-nuts 05:33 -!- Yappo_ [n=yappo@221x243x122x124.ap221.ftth.ucom.ne.jp] has quit ["Server Configuration changed; disconnect"] 05:33 < skelterjohn> whenever i'm up late coding and my vision starts to get blurry, I feel really cool, like Randy from snowcrash 05:36 -!- hugh4life [n=hugh4lif@client-208-124-113-132.consolidated.net] has left #go-nuts ["Leaving"] 05:37 -!- amuck [n=amuck@h154.65.88.75.dynamic.ip.windstream.net] has quit [Remote closed the connection] 05:39 -!- path[l] [n=path@115.240.68.250] has quit [Connection timed out] 05:41 -!- binaryjohn [n=binaryjo@cpe-24-30-132-50.san.res.rr.com] has joined #go-nuts 05:42 -!- asyncster2 [n=asyncste@206.169.213.106] has quit [Read error: 110 (Connection timed out)] 05:42 < skelterjohn> when i said snowcrash, i meant cryptonomicon 05:42 -!- Spaghettini [n=Spaghett@vaxjo6.150.cust.blixtvik.net] has joined #go-nuts 05:44 -!- sliceofpi [n=sliceofp@c-98-197-1-232.hsd1.tx.comcast.net] has quit ["Lost terminal"] 05:48 -!- Cyanure [n=cyanure@81-65-189-254.rev.numericable.fr] has joined #go-nuts 05:48 -!- carllerche [n=carllerc@99-8-186-86.lightspeed.snfcca.sbcglobal.net] has joined #go-nuts 05:49 -!- carllerche [n=carllerc@99-8-186-86.lightspeed.snfcca.sbcglobal.net] has quit [Client Quit] 05:53 -!- sliceofpi [n=sliceofp@98.197.1.232] has joined #go-nuts 05:56 -!- scarabx [n=scarabx@c-24-147-239-120.hsd1.ma.comcast.net] has quit ["This computer has gone to sleep"] 05:59 -!- Spaghett1ni [n=Spaghett@vaxjo6.150.cust.blixtvik.net] has quit [Connection timed out] 05:59 -!- binaryjohn [n=binaryjo@cpe-24-30-132-50.san.res.rr.com] has quit [] 06:05 -!- Cyanure [n=cyanure@81-65-189-254.rev.numericable.fr] has quit [Read error: 54 (Connection reset by peer)] 06:05 -!- Cyanure [n=cyanure@81-65-189-254.rev.numericable.fr] has joined #go-nuts 06:07 -!- murodese [n=James@203-59-51-137.dyn.iinet.net.au] has joined #go-nuts 06:10 -!- asyncster [n=asyncste@206.169.213.106] has joined #go-nuts 06:12 -!- Zaba [n=zaba@ip102.148.adsl.wplus.ru] has joined #go-nuts 06:14 -!- Yappo__ [n=yappo@221x243x122x124.ap221.ftth.ucom.ne.jp] has joined #go-nuts 06:16 -!- Zaba_ [n=zaba@about/goats/billygoat/zaba] has quit [Read error: 145 (Connection timed out)] 06:17 -!- fgb [n=fgb@190.246.85.45] has left #go-nuts [] 06:21 -!- Cyanure [n=cyanure@81-65-189-254.rev.numericable.fr] has quit [Read error: 104 (Connection reset by peer)] 06:21 -!- Cyanure [n=cyanure@81-65-189-254.rev.numericable.fr] has joined #go-nuts 06:24 -!- carllerche [n=carllerc@99-8-186-86.lightspeed.snfcca.sbcglobal.net] has joined #go-nuts 06:25 < carllerche> Is there a Go package for associating process signals to funcs? 06:28 < uriel> carllerche: at the moment AFAIK there is no good way to handle signals, there is an issue about it 06:29 < carllerche> uriel: alright, thanks for that. I'm guessing it won't be too long 06:29 < uriel> http://code.google.com/p/go/issues/detail?id=71 06:29 < uriel> well, avoiding singals is usually a good idea 06:29 < carllerche> uriel: what do you mean? 06:30 < uriel> I mean that signals are always trouble 06:31 < uriel> specially in concurrent environments 06:31 < carllerche> it's true, but how would you handle restart requests elegantly, etc...? 06:31 < carllerche> reload, etc.. 06:32 < uriel> over a pipe? 06:32 < jessta> signal handling doesn't seem to be much different to what a goroutine would be doing anyway 06:32 -!- Fringehead [n=fringe@c-24-126-235-188.hsd1.ga.comcast.net] has quit ["sleep()"] 06:33 < uriel> jessta: goroutines communicate over channels, signals are totally random 06:34 -!- hiromtz [n=hiromtz@p4004-ipbf1304akatuka.ibaraki.ocn.ne.jp] has joined #go-nuts 06:34 < jessta> signals are, on this signal jump here and do such and such and jump back 06:35 < jessta> the issue with them is that the change program state in unexpected places 06:36 < jessta> *they change 06:36 < uriel> so, they just break everything for the most part, they are like exceptions, but much worse 06:36 < jessta> well, you limit their ability to change shared data structures 06:36 -!- BMeph [n=black_me@65.103.151.24] has joined #go-nuts 06:36 < carllerche> uriel: so, how do you handle stuff like SIGHUP? (I'm a noob, so I'm not super familiar about how to use pipes over signals) 06:37 -!- Zaba_ [n=zaba@ip102.148.adsl.wplus.ru] has joined #go-nuts 06:37 < jessta> a signal could spawn a goroutine to handling it 06:37 -!- skelterjohn [n=jasmuth@c-76-116-176-34.hsd1.nj.comcast.net] has quit [] 06:38 < uriel> carllerche: as I said, don't use sighup, use a pipe to communicate with your program and send commands 06:38 < uriel> (or even better, a file systems, but on *nix that is just not practical) 06:38 -!- Cyanure [n=cyanure@81-65-189-254.rev.numericable.fr] has quit [Read error: 104 (Connection reset by peer)] 06:38 -!- r2p2 [n=billy@v32671.1blu.de] has joined #go-nuts 06:39 -!- Cyanure [n=cyanure@81-65-189-254.rev.numericable.fr] has joined #go-nuts 06:39 < carllerche> something to think about 06:39 -!- turutosiya [n=turutosi@219.106.251.65] has joined #go-nuts 06:42 < uriel> I'm sure there will be a reasonable way to handle signals soon, but in general it is just a good idea to avoid them 06:42 < uriel> I think it was Dennis Ritchie that said long ago signals should only be used to kill programs 06:43 -!- carllerche [n=carllerc@99-8-186-86.lightspeed.snfcca.sbcglobal.net] has quit [] 06:45 -!- Zaba [n=zaba@about/goats/billygoat/zaba] has quit [Read error: 110 (Connection timed out)] 06:47 -!- itrekkie [n=itrekkie@ip72-200-111-111.tc.ph.cox.net] has joined #go-nuts 06:47 -!- slashus2 [n=slashus2@74-137-26-8.dhcp.insightbb.com] has joined #go-nuts 06:55 -!- ulq [i=ulq@anapnea.net] has quit ["Lost terminal"] 06:55 -!- Cyanure [n=cyanure@81-65-189-254.rev.numericable.fr] has quit [Read error: 54 (Connection reset by peer)] 06:56 -!- hiromtz [n=hiromtz@p4004-ipbf1304akatuka.ibaraki.ocn.ne.jp] has quit [Read error: 113 (No route to host)] 06:56 -!- Cyanure [n=cyanure@81-65-189-254.rev.numericable.fr] has joined #go-nuts 06:58 < nf> isn't it not a problem of signals, but the way they're handled? it is possible to ensure your SIGHUP handler changes the program state in a concurrency-safe way. 07:00 < nf> eg, sending a "config reload" message via a channel to a main loop 07:00 < nf> (forgive me if this is obvious) 07:03 -!- carllerche [n=carllerc@99-8-186-86.lightspeed.snfcca.sbcglobal.net] has joined #go-nuts 07:04 -!- iant [n=iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has joined #go-nuts 07:04 -!- mode/#go-nuts [+v iant] by ChanServ 07:07 < uriel> nf: maybe, the way I'd like to see it is a way to get signals via a channel... 07:07 < uriel> nf: I'm sure there are other ways, but it is tricky business 07:07 -!- carllerche [n=carllerc@99-8-186-86.lightspeed.snfcca.sbcglobal.net] has quit [Client Quit] 07:07 -!- trickie [n=trickie@94.100.112.225] has joined #go-nuts 07:13 -!- Cyanure [n=cyanure@81-65-189-254.rev.numericable.fr] has quit [Read error: 104 (Connection reset by peer)] 07:13 -!- Cyanure [n=cyanure@81-65-189-254.rev.numericable.fr] has joined #go-nuts 07:17 -!- itrekkie [n=itrekkie@ip72-200-111-111.tc.ph.cox.net] has quit [] 07:27 -!- hiromtz [n=hiromtz@114.165.147.4] has joined #go-nuts 07:28 -!- AndrewBC [n=Andrew@97.93.242.12] has quit [Read error: 113 (No route to host)] 07:33 -!- Cyanure [n=cyanure@81-65-189-254.rev.numericable.fr] has quit [Connection timed out] 07:33 -!- iwikiwi [n=iwikiwi@202.3.77.126] has joined #go-nuts 07:37 -!- hiromtz [n=hiromtz@114.165.147.4] has quit [Read error: 148 (No route to host)] 07:40 -!- path[l] [n=path@115.240.42.18] has quit [Connection timed out] 07:42 -!- lambo4jos [n=chatzill@c-76-126-250-10.hsd1.ca.comcast.net] has joined #go-nuts 07:49 -!- rog [n=rog@92.28.217.99] has joined #go-nuts 07:52 -!- iwikiwi [n=iwikiwi@202.3.77.126] has quit ["I ascend to reality!"] 07:55 -!- iwikiwi [n=iwikiwi@202.3.77.126] has joined #go-nuts 08:00 -!- asyncster [n=asyncste@206.169.213.106] has quit [Read error: 110 (Connection timed out)] 08:03 -!- kaib [n=kaib@76.102.52.156] has quit [] 08:07 -!- aarapov [n=aarapov@nat/redhat/x-kztlhdduxgwfikfx] has joined #go-nuts 08:13 -!- Fish-Work [n=Fish@194.182.65-86.rev.gaoland.net] has quit [Remote closed the connection] 08:14 -!- Fish-Work [n=Fish@86.65.182.194] has joined #go-nuts 08:16 -!- super__ [n=super_@unaffiliated/lolsuper-/x-9881387] has quit [Read error: 104 (Connection reset by peer)] 08:16 -!- lambo4jos [n=chatzill@c-76-126-250-10.hsd1.ca.comcast.net] has quit ["ChatZilla 0.9.85 [Firefox 3.5.5/20091102152451]"] 08:18 -!- tibshoot [n=tibshoot@linagora-230-146.pr0.nerim.net] has joined #go-nuts 08:22 -!- decriptor [n=decripto@53.250.sfcn.org] has quit [Read error: 60 (Operation timed out)] 08:26 -!- turutosiya [n=turutosi@219.106.251.65] has quit [Read error: 110 (Connection timed out)] 08:34 -!- __ed [i=bitch@anal-co.it] has quit [Connection reset by peer] 08:34 -!- mbruce [n=bruce@d60-204-191.col.wideopenwest.com] has quit [Read error: 110 (Connection timed out)] 08:35 -!- __ed [i=bitch@62.147.134.58] has joined #go-nuts 08:38 -!- iwikiwi [n=iwikiwi@202.3.77.126] has quit ["Computer has gone to sleep"] 08:38 -!- iwikiwi [n=iwikiwi@202.3.77.126] has joined #go-nuts 08:41 -!- gobo [i=43bc9a39@gateway/web/freenode/x-pkxfqlvgpwozmbog] has joined #go-nuts 08:41 -!- gobo [i=43bc9a39@gateway/web/freenode/x-pkxfqlvgpwozmbog] has quit [Client Quit] 08:42 -!- Issac [i=43bc9a39@gateway/web/freenode/x-olkwjfucqqjfdynw] has joined #go-nuts 08:42 -!- benjack [n=Ben@cm101.gamma247.maxonline.com.sg] has joined #go-nuts 08:42 -!- benjack [n=Ben@cm101.gamma247.maxonline.com.sg] has quit [Client Quit] 08:42 -!- StDan [n=danielb@124-197-59-227.callplus.net.nz] has quit [Remote closed the connection] 08:43 -!- JSharpe2 [n=jamie@5ad93956.bb.sky.com] has quit [Read error: 110 (Connection timed out)] 08:43 -!- JSharpe2 [n=jamie@5ad50265.bb.sky.com] has joined #go-nuts 08:45 -!- ShadowIce [i=shadowic@unaffiliated/shadowice-x841044] has joined #go-nuts 08:46 -!- turutosiya [n=turutosi@219.106.251.65] has joined #go-nuts 08:55 -!- triplez [n=triplez@bb116-14-20-203.singnet.com.sg] has quit [] 08:59 -!- AndrewBC [n=Andrew@97.93.242.12] has joined #go-nuts 08:59 -!- AndrewBC [n=Andrew@97.93.242.12] has quit [Client Quit] 09:07 -!- path[l] [n=path@59.162.86.164] has joined #go-nuts 09:10 -!- sliceofpi [n=sliceofp@98.197.1.232] has quit ["Get MacIrssi - http://www.sysctl.co.uk/projects/macirssi/"] 09:13 -!- path[l] [n=path@59.162.86.164] has quit [] 09:14 -!- path[l] [n=path@59.162.86.164] has joined #go-nuts 09:14 -!- Fish-Work [n=Fish@86.65.182.194] has quit [Read error: 145 (Connection timed out)] 09:14 -!- Fish-Work [n=Fish@86.65.182.194] has joined #go-nuts 09:16 -!- kaigan|work [n=kaigan@c-8290e255.1411-10-64736c14.cust.bredbandsbolaget.se] has joined #go-nuts 09:18 -!- mjard [n=k@70.114.138.168] has quit [Read error: 110 (Connection timed out)] 09:18 -!- iankt [n=iankt@CPE-124-188-96-237.lbcz1.ken.bigpond.net.au] has joined #go-nuts 09:20 -!- StDan [n=danielb@124-197-59-227.callplus.net.nz] has joined #go-nuts 09:20 -!- path[l]_ [n=path@59.162.86.164] has joined #go-nuts 09:26 -!- Associat0r [n=Associat@h163153.upc-h.chello.nl] has joined #go-nuts 09:29 -!- tokuhiro_______2 [n=tokuhiro@s230.GtokyoFL21.vectant.ne.jp] has quit [Read error: 110 (Connection timed out)] 09:31 -!- iwikiwi [n=iwikiwi@202.3.77.126] has quit [Read error: 110 (Connection timed out)] 09:31 -!- GeoBSD [n=geocalc@lns-bzn-28-82-250-129-199.adsl.proxad.net] has joined #go-nuts 09:34 -!- iwikiwi [n=iwikiwi@202.3.77.126] has joined #go-nuts 09:40 -!- muzzy [i=muzzy@hack.fi] has quit [Read error: 60 (Operation timed out)] 09:40 -!- path[l] [n=path@59.162.86.164] has quit [Read error: 110 (Connection timed out)] 09:47 -!- Whtiger [n=josh@c-68-60-92-33.hsd1.mi.comcast.net] has quit [Read error: 110 (Connection timed out)] 09:50 -!- StDan [n=danielb@124-197-59-227.callplus.net.nz] has quit [Read error: 110 (Connection timed out)] 09:51 -!- slashus2 [n=slashus2@74-137-26-8.dhcp.insightbb.com] has quit [] 10:08 -!- jdp [n=justin@ool-435238c0.dyn.optonline.net] has joined #go-nuts 10:09 -!- Whtiger [n=josh@c-68-60-92-33.hsd1.mi.comcast.net] has joined #go-nuts 10:12 -!- ikke [n=ikkibr@unaffiliated/ikkebr] has joined #go-nuts 10:16 -!- geocalc [n=geocalc@lns-bzn-53-82-65-24-155.adsl.proxad.net] has joined #go-nuts 10:19 -!- Fish-Work [n=Fish@86.65.182.194] has quit [Remote closed the connection] 10:20 -!- Fish-Work [n=Fish@86.65.182.194] has joined #go-nuts 10:20 -!- ritolatu [n=ritolatu@dsl-olubrasgw1-fe54fb00-201.dhcp.inet.fi] has quit [] 10:22 -!- boot0 [n=nf@124-171-26-50.dyn.iinet.net.au] has joined #go-nuts 10:25 -!- Issac [i=43bc9a39@gateway/web/freenode/x-olkwjfucqqjfdynw] has quit [Ping timeout: 180 seconds] 10:28 -!- analogue [n=analogue@toulouse.jfg-networks.net] has quit [Read error: 104 (Connection reset by peer)] 10:29 -!- JoNaZ [n=jonaz@77.105.229.77] has quit [Remote closed the connection] 10:31 -!- iankt [n=iankt@CPE-124-188-96-237.lbcz1.ken.bigpond.net.au] has quit ["ChatZilla 0.9.85 [Firefox 3.5.5/20091102134505]"] 10:33 -!- GeoBSD [n=geocalc@lns-bzn-28-82-250-129-199.adsl.proxad.net] has quit [Read error: 110 (Connection timed out)] 10:34 -!- analogue [n=analogue@toulouse.jfg-networks.net] has joined #go-nuts 10:36 -!- turutosiya [n=turutosi@219.106.251.65] has quit [Read error: 110 (Connection timed out)] 10:39 -!- p0g0 [n=pogo@unaffiliated/p0g0] has joined #go-nuts 10:39 -!- lazzurs [n=lazzurs@77.74.198.235] has quit ["finux"] 10:45 -!- iwikiwi [n=iwikiwi@202.3.77.126] has quit [Read error: 110 (Connection timed out)] 10:47 -!- iwikiwi [n=iwikiwi@202.3.77.126] has joined #go-nuts 10:49 -!- afurlan [n=afurlan@scorpion.mps.com.br] has joined #go-nuts 10:53 -!- iwikiwi [n=iwikiwi@202.3.77.126] has quit ["I ascend to reality!"] 10:54 -!- joeyadams [n=joey@208.96.182.115] has quit ["Leaving"] 10:54 -!- robot12[1] [n=root@host.89-154-138-78.kgts.ru] has joined #go-nuts 11:00 -!- Fish-Work [n=Fish@86.65.182.194] has quit [Read error: 104 (Connection reset by peer)] 11:03 -!- robot12[1] [n=root@host.89-154-138-78.kgts.ru] has quit ["Ухожу я от вас (xchat 2.4.5 или старше)"] 11:09 -!- robot12 [n=root@inferno.kgts.ru] has quit [Read error: 110 (Connection timed out)] 11:12 -!- Fraeon [n=kzer-za@e212-246-65-153.elisa-laajakaista.fi] has joined #go-nuts 11:14 -!- kota1111 [n=kota1111@gw2.kbmj.jp] has quit ["Leaving..."] 11:18 -!- TR2N` [i=email@89-180-155-121.net.novis.pt] has joined #go-nuts 11:19 -!- General1337 [n=support@71.84.247.187] has joined #go-nuts 11:21 -!- Maxdamantus [n=Maxdam@203-97-238-106.cable.telstraclear.net] has joined #go-nuts 11:31 -!- rrr [i=rrr@gateway/gpg-tor/key-0x9230E18F] has quit [Remote closed the connection] 11:31 -!- melba [n=blee@unaffiliated/lazz0] has joined #go-nuts 11:31 -!- stalled [n=411@unaffiliated/stalled] has quit [Read error: 104 (Connection reset by peer)] 11:31 -!- Diablo150 [n=Diablo15@ABordeaux-253-1-72-169.w83-200.abo.wanadoo.fr] has quit [Read error: 60 (Operation timed out)] 11:36 -!- ContraSF [i=email@89.180.155.121] has quit [Read error: 110 (Connection timed out)] 11:37 -!- General13372 [n=support@71-84-247-187.dhcp.gldl.ca.charter.com] has quit [Read error: 110 (Connection timed out)] 11:38 -!- scyth [n=scyth@rots.in.rs] has quit [Remote closed the connection] 11:49 -!- tomestla [n=tom@78.251.229.30] has joined #go-nuts 12:02 -!- JPascal [n=jpascal@195.239.8.22] has joined #go-nuts 12:02 < JPascal> Hi all 12:03 < JPascal> I try bind C function in Go. I took error on "make" -> cannot use command (type string) as type *_C_char in function argument 12:04 -!- ruam [n=ruam@cpe-69-203-1-249.nyc.res.rr.com] has joined #go-nuts 12:04 < ruam> hi everyone. 12:05 < JPascal> hi 12:05 < ruam> the libraries seem to be coming along rather rapidly. any itches that need scratched in that respect right now? 12:07 < dagle> Graphics libs I think. 12:07 < Vova> what does the last go update contains? 12:07 < ruam> dagle: what, like opengl bindings? 12:07 < Boggy-B> graphics libraries would be nice :) 12:08 < vegai> there's the draw lib 12:09 < dagle> And how complete is draw? 12:09 -!- youngbull [n=youngbul@129.177.48.60] has joined #go-nuts 12:10 < dpb> is it out of exp already? 12:10 < JPascal> I try bind C function in Go. I took error on "make" -> cannot use command (type string) as type *_C_char in function argument :( 12:10 < Boggy-B> i was talking to the guys work work with KROC today, about the strange way GO works with multiple cores 12:12 < Boggy-B> but they were talking about Go -> Occam conversions 12:12 < Boggy-B> which would be interesting 12:12 < ruam> Boggy-B: what's strange about it? 12:12 < Boggy-B> ruam: strange = i was told it was crap, but have no idea if that is true :) 12:13 < ruam> it's just untested, AFAIK. 12:13 < ruam> given how slow the uptake on multicore has been software side, a little experimentation won't kill anyone. 12:13 < Boggy-B> i agree 12:14 -!- Kibiz0r1 [n=Adium@99.48.204.31] has joined #go-nuts 12:15 < ruam> frankly the only complaints I've heard about Go have been pure conjecture/thought experiment. What little data I've seen against it is pure implementation stuff. It's nonsense. Better to play and build and see what comes of it. 12:15 < Boggy-B> :) 12:17 < ruam> btw, the composite literals are a nice touch, I'm just glad they didn't use colons as the separator inside the braces though. My python brain would've screamed "DICTIONARY, IT'S A KEY:VALUE STORE", instead of, "oh look, members of blah" 12:18 -!- ikke3 [n=ikkibr@189.58.215.61.dynamic.adsl.gvt.net.br] has joined #go-nuts 12:21 -!- sladegen [n=nemo@unaffiliated/sladegen] has quit [Remote closed the connection] 12:23 -!- lux` [n=lux@151.95.190.245] has joined #go-nuts 12:27 -!- Nanoo [n=Nano@95-89-198-45-dynip.superkabel.de] has joined #go-nuts 12:28 -!- ikke [n=ikkibr@unaffiliated/ikkebr] has quit [Read error: 110 (Connection timed out)] 12:31 -!- vt3 [n=a431824@m016020.ppp.asahi-net.or.jp] has quit ["Ex-Chat"] 12:34 -!- path[l] [n=path@59.162.86.164] has quit [] 12:35 -!- path[l] [n=path@59.162.86.164] has joined #go-nuts 12:45 -!- melba [n=blee@unaffiliated/lazz0] has quit [Read error: 54 (Connection reset by peer)] 12:46 -!- lazz0 [n=blee@unaffiliated/lazz0] has joined #go-nuts 12:49 -!- lazz0 [n=blee@unaffiliated/lazz0] has quit [Read error: 104 (Connection reset by peer)] 12:49 -!- melba [n=blee@unaffiliated/lazz0] has joined #go-nuts 12:59 -!- Rob_Russell [n=chatzill@206-248-157-156.dsl.teksavvy.com] has joined #go-nuts 13:02 -!- robot12 [n=root@host.89-154-138-78.kgts.ru] has joined #go-nuts 13:12 -!- Fish-Work [n=Fish@86.65.182.194] has joined #go-nuts 13:13 -!- tomestla1 [n=tom@78.251.229.30] has joined #go-nuts 13:15 -!- tomestla [n=tom@78.251.229.30] has quit [Read error: 104 (Connection reset by peer)] 13:17 -!- ShadowIce [i=shadowic@unaffiliated/shadowice-x841044] has quit ["Leaving"] 13:20 -!- ShadowIce [n=pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts 13:20 -!- path[l] [n=path@59.162.86.164] has quit [] 13:20 -!- druidu [n=druidu@78.97.155.94] has quit [Read error: 104 (Connection reset by peer)] 13:23 -!- afurlan [n=afurlan@scorpion.mps.com.br] has quit [Remote closed the connection] 13:23 < youngbull> have anyone read any news on generics in go? 13:26 -!- Fish-Work [n=Fish@86.65.182.194] has quit [Read error: 60 (Operation timed out)] 13:26 -!- karpar [n=zhilihu@221.4.207.10] has joined #go-nuts 13:28 -!- karpar [n=zhilihu@221.4.207.10] has quit [Client Quit] 13:30 -!- afurlan [n=afurlan@scorpion.mps.com.br] has joined #go-nuts 13:38 -!- scm [i=justme@c133024.adsl.hansenet.de] has quit [Read error: 131 (Connection reset by peer)] 13:42 -!- scm [i=justme@c165241.adsl.hansenet.de] has joined #go-nuts 13:46 -!- lolsuper_ [n=super_@unaffiliated/lolsuper-/x-9881387] has joined #go-nuts 13:48 -!- Cyanure [n=cyanure@81-65-189-254.rev.numericable.fr] has joined #go-nuts 13:48 -!- ikkebr [n=ikkibr@unaffiliated/ikkebr] has quit [] 13:48 -!- ruam [n=ruam@cpe-69-203-1-249.nyc.res.rr.com] has quit [] 13:50 -!- Cyanure [n=cyanure@81-65-189-254.rev.numericable.fr] has quit [Read error: 60 (Operation timed out)] 13:59 -!- adante_ [n=adante@59.167.212.65] has joined #go-nuts 14:00 -!- adante [n=adante@59.167.212.65] has quit [Remote closed the connection] 14:00 < JPascal> I try bind C function in Go. I took error on "make" -> cannot use command (type string) as type *_C_char in function argument :( 14:02 < dagle> JPascal: Tried the ML instead? 14:02 < JPascal> ML? 14:02 < dagle> Mailing list. 14:03 < JPascal> :) 14:04 -!- ponce [n=ponce@paradisia.net] has joined #go-nuts 14:15 -!- boscop [n=unknown@f055200178.adsl.alicedsl.de] has joined #go-nuts 14:16 -!- fhs [n=fhs@pool-72-89-203-117.nycmny.east.verizon.net] has quit ["leaving"] 14:27 -!- skelterjohn [n=jasmuth@c-76-116-176-34.hsd1.nj.comcast.net] has joined #go-nuts 14:28 -!- Kibiz0r1 [n=Adium@99.48.204.31] has quit ["Leaving."] 14:31 -!- tokuhiro_______2 [n=tokuhiro@s230.GtokyoFL21.vectant.ne.jp] has joined #go-nuts 14:47 -!- neilk [n=neilk@shed.goonies.be] has joined #go-nuts 14:49 -!- Meidor [n=quassel@cl-936.ams-05.nl.sixxs.net] has quit ["http://quassel-irc.org - Chat comfortably. Anywhere."] 14:51 -!- aarapov [n=aarapov@nat/redhat/x-kztlhdduxgwfikfx] has quit ["Leaving."] 14:52 -!- Meidor [n=quassel@cl-936.ams-05.nl.sixxs.net] has joined #go-nuts 14:56 -!- tomestla1 [n=tom@78.251.229.30] has quit [Read error: 60 (Operation timed out)] 14:57 -!- chachan [n=chachan@ccscliente156.ifxnetworks.net.ve] has joined #go-nuts 15:03 -!- rrr [i=rrr@gateway/gpg-tor/key-0x9230E18F] has joined #go-nuts 15:03 -!- Fish-Work [n=Fish@86.65.182.194] has joined #go-nuts 15:06 -!- decriptor [n=decripto@53.250.sfcn.org] has joined #go-nuts 15:11 -!- stalled [n=411@unaffiliated/stalled] has joined #go-nuts 15:12 -!- vegai [n=vegai@archlinux/developer/vegai] has left #go-nuts [] 15:16 -!- armence [n=armence@c-67-188-229-128.hsd1.ca.comcast.net] has joined #go-nuts 15:16 -!- sm [n=sm@cpe-76-173-194-242.socal.res.rr.com] has joined #go-nuts 15:20 -!- Smergo [n=smergo@mail.hellstrom.st] has quit [Read error: 111 (Connection refused)] 15:23 -!- skelterjohn [n=jasmuth@c-76-116-176-34.hsd1.nj.comcast.net] has quit [] 15:25 < bfrank2> does go have a way to read files, a line at a time? 15:26 < jb55> making a multiplayer javascript game using websockets and a Go server, should be fun :) http://ws.jb55.com 15:29 -!- JPascal [n=jpascal@195.239.8.22] has left #go-nuts [] 15:31 -!- codedread [i=81bc2119@gateway/web/freenode/x-twwgopbpqpelbtmj] has joined #go-nuts 15:32 < jb55> vi .gitconfig 15:32 < jb55> oops 15:32 -!- sm [n=sm@cpe-76-173-194-242.socal.res.rr.com] has quit [] 15:49 -!- skelterjohn [n=jasmuth@c-76-116-176-34.hsd1.nj.comcast.net] has joined #go-nuts 15:51 -!- chickamade [n=chickama@123.16.87.162] has joined #go-nuts 15:52 < neilk> the go sieve of erasthones just blew my mind 15:53 -!- Rob_Russell [n=chatzill@206-248-157-156.dsl.teksavvy.com] has quit [Read error: 113 (No route to host)] 15:58 -!- smooge [n=smooge@int.smoogespace.com] has joined #go-nuts 16:00 -!- smooge [n=smooge@int.smoogespace.com] has quit [Client Quit] 16:01 -!- smooge [n=smooge@66.93.220.253] has joined #go-nuts 16:01 -!- r2p2 [n=billy@v32671.1blu.de] has left #go-nuts [] 16:02 -!- Venom_X [n=pjacobs@cpe-67-9-131-167.austin.res.rr.com] has joined #go-nuts 16:03 -!- Kniht [n=kniht@c-68-58-17-177.hsd1.in.comcast.net] has joined #go-nuts 16:05 -!- stalled [n=411@unaffiliated/stalled] has quit [Read error: 104 (Connection reset by peer)] 16:06 -!- stalled [n=411@unaffiliated/stalled] has joined #go-nuts 16:09 -!- theGussi [n=gussi@gussi.is] has joined #go-nuts 16:10 -!- xerox [n=xerox@unaffiliated/xerox] has quit [] 16:10 -!- Rob_Russell [n=chatzill@bas3-windsor12-1177904025.dsl.bell.ca] has joined #go-nuts 16:12 -!- kaigan|work [n=kaigan@c-8290e255.1411-10-64736c14.cust.bredbandsbolaget.se] has quit [] 16:13 -!- BrianAnthony [n=brian@138.210.160.69] has joined #go-nuts 16:13 < BrianAnthony> hey =] 16:13 < BrianAnthony> how does one parse an xml document with go? 16:14 -!- eno [n=eno@nslu2-linux/eno] has quit [Read error: 60 (Operation timed out)] 16:15 -!- carllerche [n=carllerc@99.22.229.11] has joined #go-nuts 16:15 -!- triplez [n=triplez@cm52.sigma225.maxonline.com.sg] has joined #go-nuts 16:15 -!- KillerX [n=anant@65.123.0.210] has joined #go-nuts 16:16 -!- pwned [i=pwned@88.251.69.51] has quit [Read error: 110 (Connection timed out)] 16:16 -!- eno [n=eno@nslu2-linux/eno] has joined #go-nuts 16:17 -!- pwned [i=pwned@78.176.113.21] has joined #go-nuts 16:19 < alexsuraci> BrianAnthony: this may be of interest - http://research.swtch.com/2009/12/data-structures-go-programs.html 16:19 <+iant> BrianAnthony: there is an xml package 16:20 < BrianAnthony> thanks a lot! 16:21 -!- prip [n=_prip@host69-133-dynamic.46-79-r.retail.telecomitalia.it] has quit [Read error: 110 (Connection timed out)] 16:21 -!- prip [n=_prip@host122-123-dynamic.32-79-r.retail.telecomitalia.it] has joined #go-nuts 16:21 -!- Gussi [n=gussi@gussi.is] has quit [Connection timed out] 16:26 -!- skelterjohn [n=jasmuth@c-76-116-176-34.hsd1.nj.comcast.net] has quit [] 16:27 -!- KillerX [n=anant@gentoo/developer/KillerX] has quit ["Leaving."] 16:29 -!- decriptor [n=decripto@53.250.sfcn.org] has quit [Read error: 113 (No route to host)] 16:32 -!- aarapov [n=aarapov@r2ah201.net.upc.cz] has joined #go-nuts 16:33 -!- lux` [n=lux@151.95.190.245] has quit [Read error: 54 (Connection reset by peer)] 16:41 -!- kaib [n=kaib@c-76-102-52-156.hsd1.ca.comcast.net] has joined #go-nuts 16:41 -!- mode/#go-nuts [+v kaib] by ChanServ 16:44 -!- kaib [n=kaib@c-76-102-52-156.hsd1.ca.comcast.net] has quit [Client Quit] 16:44 -!- Venom_brb [n=pjacobs@cpe-67-9-131-167.austin.res.rr.com] has quit [] 16:44 -!- decriptor [n=decripto@137.65.133.23] has joined #go-nuts 16:44 -!- iwikiwi [n=iwikiwi@202.3.77.160] has joined #go-nuts 16:45 -!- Venom_X [n=pjacobs@cpe-67-9-131-167.austin.res.rr.com] has joined #go-nuts 16:51 -!- idea_squirrel [i=ct2rips@77-21-26-177-dynip.superkabel.de] has joined #go-nuts 16:57 -!- kaib [n=kaib@c-76-102-52-156.hsd1.ca.comcast.net] has joined #go-nuts 16:57 -!- mode/#go-nuts [+v kaib] by ChanServ 16:59 -!- fgb [n=fgb@190.246.85.45] has joined #go-nuts 17:02 -!- skelterjohn [n=jasmuth@lawn-net168-in.rutgers.edu] has joined #go-nuts 17:05 -!- kaib [n=kaib@c-76-102-52-156.hsd1.ca.comcast.net] has quit [] 17:06 -!- trickie [n=trickie@94.100.112.225] has quit [Read error: 145 (Connection timed out)] 17:07 -!- carllerche [n=carllerc@99.22.229.11] has quit [] 17:07 -!- Fish-Work [n=Fish@86.65.182.194] has quit [Remote closed the connection] 17:08 -!- franksalim [n=frank@adsl-76-221-202-115.dsl.pltn13.sbcglobal.net] has joined #go-nuts 17:08 -!- tomestla [n=tom@78.251.174.90] has joined #go-nuts 17:08 -!- tibshoot [n=tibshoot@linagora-230-146.pr0.nerim.net] has quit ["Quitte"] 17:08 -!- tibshoot [n=tibshoot@linagora-230-146.pr0.nerim.net] has joined #go-nuts 17:10 -!- xerox [n=xerox@unaffiliated/xerox] has joined #go-nuts 17:15 -!- sm [n=sm@pool-96-229-122-118.lsanca.dsl-w.verizon.net] has joined #go-nuts 17:22 -!- AndrewBC [n=Andrew@97.93.242.12] has joined #go-nuts 17:22 -!- tibshoot [n=tibshoot@linagora-230-146.pr0.nerim.net] has quit [Remote closed the connection] 17:23 -!- tomestla [n=tom@78.251.174.90] has quit [Remote closed the connection] 17:25 -!- AndrewBC [n=Andrew@97.93.242.12] has quit [Client Quit] 17:25 -!- carllerche [n=carllerc@enginey-9.border1.sfo002.pnap.net] has joined #go-nuts 17:25 -!- tomestla [n=tom@78.251.174.90] has joined #go-nuts 17:30 -!- Fish-Work [n=Fish@86.65.182.194] has joined #go-nuts 17:31 -!- slashus2 [n=slashus2@74-137-26-8.dhcp.insightbb.com] has joined #go-nuts 17:32 <+iant> does anybody here hate the semicolon proposal? 17:35 < fgb> no 17:35 < alexsuraci> i like it. all or nothing is the way to go, and i'd rather nothing. 17:35 < dho> I understand the dissidence, but I don't agree with it 17:35 < xerox> what is the proposal about? 17:36 -!- lotrpy [n=lotrpy@202.38.97.230] has joined #go-nuts 17:36 -!- AndrewBC [n=Andrew@97.93.242.12] has joined #go-nuts 17:36 < dho> xerox: semicolons are being removed and there is thus some ambiguity added to the grammar by removing them. 17:36 < alexsuraci> xerox: simplifying the parser/etc. by making them optional in most areas, rather than some 17:36 <+iant> xerox: http://groups.google.com/group/golang-nuts/browse_thread/thread/5ee32b588d10f2e9 17:36 < dho> it's explained in Rob's email on the list. 17:36 < dho> yes, that 17:36 -!- __ed [i=bitch@62.147.134.58] has quit [Remote closed the connection] 17:37 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 17:38 -!- DerHorst [n=Horst@e176125240.adsl.alicedsl.de] has joined #go-nuts 17:39 -!- djanderson [n=dja@dsl-66-243-210-195.fairpoint.net] has joined #go-nuts 17:39 < alexsuraci> what is the stuff on the language shootout run on? releases or the repo? 17:42 < youngbull> this semicolon proposal seems to me like the one in javascript, it introduces a whole lot of errors... 17:43 -!- lotrpy [n=lotrpy@202.38.97.230] has quit [] 17:43 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"] 17:43 <+danderson> iant: I think a large amount of churn is caused by the bikeshed principle. 17:43 < mpl> youngbull: if you read again, rob precises it's not at all like in js. 17:43 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 17:43 -!- lmoura [n=lauromou@200.184.118.130] has quit [Remote closed the connection] 17:43 <+danderson> Compared to implementing exceptions or generics and other things, everyone feels they can chime in with an opinion on semicolons :) 17:43 <+iant> youngbull: it's definitely not who Javascript works 17:44 <+danderson> (not saying everyone should shut up, just saying that a large quantity of apparent controversy does not imply a controversial change) 17:44 <+iant> danderson: sure, I'm not concerned by mild dislike, but if there is something deeply wrong with it I'd like to make sure we don't miss the message 17:45 < dho> There are a lot of people who don't like using python because it dictates the format your code must follow 17:45 <+danderson> they'll hate Go then :) 17:45 <+danderson> all style is bound by law in gofmt 17:46 < dho> (It's not as bad as those people make it sound) 17:46 < fgb> the terminators are still there, you just don't seee them 17:46 < mycroftiv> i wish we could go back to the principle of making whitespace neutrality the prime directive because linebreaks are always the first thing to get messed up as code is copied and pasted around 17:46 < fgb> damn, see 17:47 -!- KillerX [n=anant@nat/mozilla/session] has joined #go-nuts 17:47 -!- r2p2 [n=billy@v32671.1blu.de] has joined #go-nuts 17:49 < AndrewBC> seems more like an editor's problem to me 17:49 < fgb> my editor works just fine 17:49 < AndrewBC> responding to mycroftiv. :p 17:49 < dho> If you have to run gofmt over your code before you compile it, that's fine. But to some degree I feel like it's now possible for people to spend a fair amount of time debugging stuff because they forget to run gofmt and they've got one of these constructs that you guys are saying ``doesn't appear often'' 17:49 < dho> You all have the most Go code written by far, so currently you're the authority, but if Go were ever to reach the number of people who use it daily, and if it is ever something that's taught in schools, minor gotchas are a really big deal, just because they're so subtly inconvenient 17:49 -!- lmoura [n=lauromou@200.184.118.130] has joined #go-nuts 17:49 < dho> ERUNON 17:49 < Zaba> go tchas? 17:49 < fgb> iant, to me looks like makes the grammar rules clearer and from the user POV is just a matter of taste 17:49 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"] 17:49 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 17:51 < dho> And having worked with code written by college kids and electrical engineers who both (in my experience) have horribly broken code formatting, those four or five ambiguities are not something I'd expect to see infrequently. 17:52 -!- Fish-Work [n=Fish@86.65.182.194] has quit [Success] 17:52 < dho> iant: Perhaps it isn't a bad idea for 6g to attempt to spawn gofmt before attempting to compile? 17:52 <+iant> dho: it's pretty hard to write the ambiguous codes because the types have to be exactly right 17:53 <+iant> I'm not sure running gofmt would make much difference, it won't join lines or insert semicolons 17:54 < dho> warnings if those types are detected then 17:55 < fgb> (2:54:19 PM) dho: iant: Perhaps it isn't a bad idea for 6g to attempt to spawn gofmt before attempting to compile? 17:55 < fgb> one job, one tool? 17:55 < dho> the kencc toolchain is terse enough that people will probably pay attention to those sorts of warnings. 17:55 < rog> is it just me or does anyone else find themselves want to do: while x := something; condition(x) { } ? 17:55 < youngbull> I think that this will make programming in go quite complex. In both the case of Python, and C, there is no doubt about what will happen when you break something up in several lines and how to do it, however this way there is some uncertainty involved... 17:55 < rog> s/want/wanting/ 17:55 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"] 17:56 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 17:56 -!- Rob_Russell [n=chatzill@bas3-windsor12-1177904025.dsl.bell.ca] has quit [Read error: 110 (Connection timed out)] 17:56 <+iant> youngbull: where is the uncertainty? there is really only one rule to remember 17:56 < rog> currently i do: for x:=something; condition(x); x=something {} 17:56 -!- chachan [n=chachan@ccscliente156.ifxnetworks.net.ve] has quit ["KVIrc Insomnia 4.0.0, revision: , sources date: 20090520, built on: 2009/06/06 11:44:47 UTC http://www.kvirc.net/"] 17:56 < youngbull> is that one rule: "don't do it?" 17:56 < rog> but it's a pattern that repeats itself... 17:58 <+iant> youngbull: the rule is that the end of the line ends a statement, unless the last token on the line is an operator like + or - 17:58 < youngbull> iant: oh ok... 18:01 < youngbull> iant: but then there are the rules that the gofmt imposes... 18:01 < fgb> rog, I almost never use while loops... 18:01 <+iant> the formatting imposed by gofmt is not the same as the requirements of the language spec 18:02 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"] 18:02 < rog> fgb: in C (or limbo) i quite often do: while((x := foo()) != nil){ ... } 18:02 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 18:03 < rog> in the same way that in C i can do if ((x := foo()) != nil) { }, which turns into the go: if x := foo; x != nil { } 18:03 -!- pshahmumbai [n=prashant@59.164.24.51] has joined #go-nuts 18:05 < fgb> rog, I don't like side effects in conditions, but I get your point 18:06 < rog> it's an idiom - and easy to read once you're used to it 18:06 < youngbull> iant: yea but since it will format differently, compiling with or without it makes or breaks it, but of course those things are separate, and so has nothing to do with the language really 18:06 <+iant> I'm not sure that is true, though; gofmt should never rewrite a program in a way that changes the meaning 18:06 <+iant> that is, gofmt will preserve the existing line breaks 18:07 <+iant> the proposal is for gofmt to remove semicolons that are no longer required, but that won't change the meaning of the program 18:07 -!- itrekkie [n=itrekkie@ip72-200-111-111.tc.ph.cox.net] has joined #go-nuts 18:08 < fgb> rog, I know specially when reading a whole file while((n=read(fd, buf, sizeof(buf))) > 0){} 18:09 < fgb> so, you win 18:09 -!- lux` [n=lux@151.95.190.245] has joined #go-nuts 18:12 < rog> fgb: yeah, that's a particularly good example of why i want a similar idiom in Go 18:12 < rog> fgb: you have to stutter it... 18:12 -!- deso [n=deso@x0561a.wh30.tu-dresden.de] has joined #go-nuts 18:13 < rog> fgb; or use a for {... break ...} loop 18:13 < fgb> rog, that tends to be my weapon of choice 18:14 < fgb> but I find myself typing the while() unconsciously, the idiom is quite strong... 18:16 -!- rakd [n=rakd@219.117.252.7.static.zoot.jp] has quit ["See you..."] 18:18 -!- p0g0 [n=pogo@unaffiliated/p0g0] has quit [Read error: 113 (No route to host)] 18:21 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"] 18:22 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 18:28 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"] 18:28 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 18:30 -!- path[l] [n=path@115.240.91.204] has joined #go-nuts 18:30 -!- __ed [i=bitch@anal-co.it] has quit [Read error: 60 (Operation timed out)] 18:31 -!- itrekkie [n=itrekkie@ip72-200-111-111.tc.ph.cox.net] has quit [] 18:31 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 18:37 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"] 18:37 -!- chickamade [n=chickama@123.16.87.162] has quit ["Leaving"] 18:37 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 18:38 -!- zz [i=fusion@193.104.228.25] has quit ["changing servers"] 18:38 -!- zz [n=fusion@193.104.228.25] has joined #go-nuts 18:43 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"] 18:44 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 18:44 -!- asyncster [n=asyncste@206.169.213.106] has joined #go-nuts 18:46 -!- maacl [n=mac@0x573526c8.virnxx17.dynamic.dsl.tele.dk] has joined #go-nuts 18:48 -!- snearch [n=olaf@g225054176.adsl.alicedsl.de] has joined #go-nuts 18:48 -!- youngbull [n=youngbul@129.177.48.60] has quit [Read error: 113 (No route to host)] 18:50 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"] 18:50 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 18:51 -!- Adys [n=Adys@unaffiliated/adys] has quit [Read error: 104 (Connection reset by peer)] 18:52 -!- Adys [n=Adys@unaffiliated/adys] has joined #go-nuts 18:55 -!- slashus2 [n=slashus2@74-137-26-8.dhcp.insightbb.com] has quit [] 18:56 -!- sm [n=sm@pool-96-229-122-118.lsanca.dsl-w.verizon.net] has quit [] 18:56 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"] 18:56 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 18:57 -!- chachan [n=chachan@ccscliente156.ifxnetworks.net.ve] has joined #go-nuts 19:00 -!- Xera^ [n=lol@87-194-208-246.bethere.co.uk] has joined #go-nuts 19:01 -!- JSharpe2 [n=jamie@5ad50265.bb.sky.com] has quit [Read error: 54 (Connection reset by peer)] 19:01 -!- JSharpe [n=jamie@5ad50265.bb.sky.com] has joined #go-nuts 19:02 -!- BrianAnthony [n=brian@138.210.160.69] has quit [Read error: 110 (Connection timed out)] 19:02 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"] 19:02 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 19:06 -!- lux` [n=lux@151.95.190.245] has quit [Remote closed the connection] 19:07 -!- pshahmumbai [n=prashant@59.164.24.51] has quit ["Ex-Chat"] 19:08 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"] 19:09 -!- lux` [n=lux@151.95.190.245] has joined #go-nuts 19:09 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 19:12 -!- p0g0 [n=pogo@unaffiliated/p0g0] has joined #go-nuts 19:13 -!- gkmngrgn [n=gkmngrgn@unaffiliated/gkmngrgn] has joined #go-nuts 19:14 < rog> is there a printf verb that'll allow me to print just the address of a channel? 19:14 < rog> i thought %p would do it, but apparently not 19:15 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"] 19:15 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 19:15 < xerox> maybe %v 19:15 -!- ukl [n=ukl@f053121158.adsl.alicedsl.de] has joined #go-nuts 19:16 < rog> interesting, so it does. should've tried it - i expected it to be a little more verbose 19:16 < rog> mind you, i think that %p should work for anything pointerlike 19:17 -!- __ed [i=bitch@anal-co.it] has quit [Read error: 60 (Operation timed out)] 19:17 < ukl> hello. Given Tree is a struct, how can I 'make' (or probably 'new' but that's a strange verbification) an empty [4]*Tree ? (Like, an empty array of pointers to a Tree struct?) 19:17 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 19:18 < ukl> new([4]*Tree) fails as does new([4]Tree), both don't really seem like the right thing anyway. make([4]*Tree) is refused by 6g, too. 19:18 < rog> make([]*Tree, 4) 19:18 < fluffle> http://gopaste.org/view/p0mK2 # can anyone help me with this? 19:18 < ukl> rog: thanks 19:18 < rog> or just var x [4]*Tree 19:18 < rog> if you want an array not a slice 19:19 -!- clearscreen [n=clearscr@e248070.upc-e.chello.nl] has quit [Read error: 104 (Connection reset by peer)] 19:20 < ukl> rog: cannot use make([]*main.Tree25, 4) (type []*Tree25) as type [4]*Tree25 in function argument <<< I do need an array, but I'd like to pass it to another function directly 19:20 < ukl> (without some "var x") 19:20 -!- aaront [n=aaront@d24-141-25-171.home.cgocable.net] has joined #go-nuts 19:20 < fluffle> ukl: i think you need to use [...] to indicate you want the underlying array rather than a slice 19:20 < ukl> hmm, I could change the other occurances of arrays to slices, probably 19:21 -!- __ed [i=bitch@anal-co.it] has quit [Read error: 60 (Operation timed out)] 19:21 < fluffle> but using slices is probably a better idea 19:21 < ukl> fluffle: [...] ? in what way? 19:21 < ukl> ok, I'll try converting to slices first :) 19:21 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 19:21 < fluffle> make([...]*Tree, 4); 19:21 < ukl> fluffle: thanks 19:22 < ukl> slicification worked, thanks rog & fluffle. 19:22 < dho> fluffle: oh hello 19:22 < rog> fluffle: i'm surprised if that works 19:23 < fluffle> rog: well, it doesn't, that's why i'm here ;) 19:23 < fluffle> dho: ohai :) 19:23 -!- sm [n=sm@pool-96-229-122-118.lsanca.dsl-w.verizon.net] has joined #go-nuts 19:23 -!- __ed [i=bitch@anal-co.it] has quit [Read error: 60 (Operation timed out)] 19:23 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 19:24 < Maxdamantus> Hm.. Just reading the tutorial atm, but quickly, does the import and const with () work with all similar keywords in all contexts, or is it only in the file scope or something. 19:24 < Maxdamantus> File scope is probably a bad term. 19:25 < Maxdamantus> const (foo = "bar"; baz = "blah";) 19:25 < rog> i think so 19:25 < fluffle> rog: the thing is, the "Method expressions" section of the language spec indicates that I should be able to turn a Method of a Type into a Function Type representing that Method 19:25 < fluffle> and this, I *should* be able to then add it to my map 19:26 < rog> fluffle: they haven't implemented that yet (it's documented) 19:26 < fluffle> but i keep getting "must call IRCConn.h_connected" from the compiler 19:26 < fluffle> rog: aawwwughghgr 19:26 < fluffle> that explains the fail, then ;) 19:26 < rog> i'm surprised the error msg isn't more informative tho 19:27 -!- clearscreen [n=clearscr@e248070.upc-e.chello.nl] has joined #go-nuts 19:27 -!- clearscreen [n=clearscr@e248070.upc-e.chello.nl] has quit [Read error: 104 (Connection reset by peer)] 19:28 < fluffle> rog: if hte parser/compiler doens't understand that syntax then it's going to assume you are trying to call the method and failing 19:28 < fluffle> ah well 19:28 < fluffle> i'll leave setupHandlers() full of anonymous functions for now then 19:28 < fluffle> \o/ 19:29 < neilk> how do/can i concatenate slices? 19:29 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"] 19:29 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 19:30 < fluffle> neilk: allocate a new one big enough to hold them both and copy them in :) 19:32 -!- p0g0 [n=pogo@unaffiliated/p0g0] has quit [Read error: 60 (Operation timed out)] 19:32 < neilk> ok 19:35 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"] 19:36 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 19:41 -!- tomestla [n=tom@78.251.174.90] has quit [Read error: 110 (Connection timed out)] 19:42 -!- tomestla [n=tom@78.251.174.90] has joined #go-nuts 19:42 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"] 19:42 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 19:44 -!- AndrewBC [n=Andrew@97.93.242.12] has quit [] 19:48 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"] 19:48 -!- smooge [n=smooge@66.93.220.253] has left #go-nuts ["-ENOCAFFEINE"] 19:48 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 19:51 < dho> ew. 19:51 < dho> iant: this label: ;\n} stuff is really gross :( 19:52 <+iant> it's kind of gross but note that "int f() { label: }" also fails to compile in C 19:53 <+iant> (with or without a \n) 19:54 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"] 19:54 < dho> ok, fair point. 19:54 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 19:56 -!- aarapov [n=aarapov@r2ah201.net.upc.cz] has quit [Nick collision from services.] 19:56 -!- aarapov1 [n=aarapov@r2ah201.net.upc.cz] has joined #go-nuts 19:57 < skelterjohn> Why does go support goto? 19:57 -!- Rob_Russell [n=chatzill@206-248-157-156.dsl.teksavvy.com] has joined #go-nuts 19:57 < dho> because goto is not evil. 19:58 < skelterjohn> some consider it harmful 19:58 < dho> bad programmers are harmful 19:58 < dho> goto is not 19:59 < mycroftiv> citation: Knuth, 1974 ("Structured Programming with Goto Statements") 19:59 -!- deso [n=deso@x0561a.wh30.tu-dresden.de] has quit [Read error: 104 (Connection reset by peer)] 19:59 < carllerche> I'm having an error returned from TCPConn Read, and i'm not sure which one it is. the message is "Dest write: write tcp:127.0.0.1:62386->127.0.0.1:3000: broken pipe" but i can't map that to an os.(error) 19:59 < neilk> i tried to like it, but go is currently disgusting to me 20:00 < neilk> :( 20:00 < carllerche> it's not os.EAGAIN 20:00 <+iant> carllerche: I think broken pipe is os.EPIPE 20:01 < dho> yeah but i thought that came back up the network stuff differently 20:01 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"] 20:01 -!- stalled_ [n=411@unaffiliated/stalled] has joined #go-nuts 20:01 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 20:01 <+iant> that could be true.... 20:01 < vsmatck1> There's a Dijkstra article called "goto considered harmful". I have the impression a lot of people rely on the authority of Dijkstra for the idea that goto is harmful. 20:01 <+danderson> without reading the article, no doubt. 20:01 < dho> because go can't catch it, so the runtime has to 20:01 <+danderson> or contextualizing it in the time of publication 20:01 < carllerche> iant: doesn't seem to be os.EPIPE 20:01 < vsmatck1> danderson: I have that impression too. :) 20:01 < dho> carllerche: it isn't 20:01 < dho> hold on 20:01 <+iant> What Dijkstra really meant is that spaghetti code is harmful 20:01 <+danderson> exactly 20:02 < vsmatck1> I'm glad a teacher made me read it in a programming language class. 20:02 < dho> oh 20:02 < dho> yep 20:02 < neilk> excessive, unstructured use of goto is harmful 20:02 < dho> from rsc ``SIGPIPE is handled and turns into an EPIPE returned from Write.'' 20:02 < dho> I'm assuming it's the same as read 20:02 < vsmatck1> I like the example of breaking out of a loop nested in a loop (as an argument for a valid use of goto). 20:02 <+iant> carllerche: you won't be able to compare that os.Error with os.EPIPE directly, you have to get to the real error code if you want to use == os.EPIPE 20:02 -!- deso [n=deso@x0561a.wh30.tu-dresden.de] has joined #go-nuts 20:03 < neilk> although if you want to use that example, someone else will say if you've got a loop nested in a loop and you want to break out of both loops, you probably want to be using a function :)( 20:03 < dho> I have no doubt that Dijkstra was a far more brilliant man than I am, but I really don't agree with all his claims. 20:03 <+danderson> vsmatck1: arguably, if you find yourself doing that often, you may need to refactor a bit 20:03 <+danderson> pretty much what neilk just said :) 20:03 < neilk> danderson: actually, i said someone else would say it, and you did 20:03 < carllerche> iant: is there any documentation as to which error code it might be? I can't find in the pkg source where the error is created 20:03 <+danderson> neilk: prophecy fulfiller, that's me. 20:04 < vsmatck1> True, it seems like one of those things rarely used, but nice when you really need it. 20:04 < neilk> goto is usually a bad idea, but sometimes you've got to program a bad idea 20:04 -!- aarapov [n=aarapov@r2ah201.net.upc.cz] has quit ["Leaving."] 20:04 < dho> defer handles at least one popular use of goto 20:04 <+danderson> I'm reminded of the security class I had when I started at google 20:04 <+iant> carllerche: it's probably os.PathError; one quick way to find out is fmt.Printf("%T", error) 20:04 < dho> but nested loops aren't always bad 20:05 < neilk> i'm on the fence about goto used as a poor man's exception handler in C 20:05 <+danderson> the entire talk was pretty much "Use common sense" sprinkled with examples to calibrate said common sense 20:05 <+danderson> same with goto. Code readability is paramount, and sometimes goto is the right way to make it readable. 20:05 <+iant> Go does also let you break out of nested loops without using goto 20:05 <+danderson> but use common sense and don't build a spaghetti table 20:05 < skelterjohn> iant: how is that? 20:06 < dho> iant: but it's break label; right? 20:06 < dho> well s/;// 20:06 <+iant> yes, break label 20:06 < dho> right, so essentially goto anyway :) 20:06 < skelterjohn> how is that different from goto label 20:06 < vsmatck1> Does go have a break 2; or something? *looks for docs& 20:06 <+iant> well, yes, break is basically a limited goto 20:06 < neilk> but a limited use of goto 20:06 < neilk> switch is also a limited goto 20:06 <+iant> so is continue 20:06 < neilk> but it's limited so as to be mostly harmless 20:06 <+danderson> actually, there's a case for keeping the semicolons: in IRC conversations, lack of semicolon makes it hard to see where code terminates and English resumes :) 20:06 < dho> danderson: haha 20:06 < dho> +1 20:06 < dho> :) 20:07 < carllerche> iant: it's a os.PathErrorDest, thanks for the Printf trick 20:07 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"] 20:07 < vsmatck1> switch seems like a bad thing to me. Seems like a duplicate feature. But then whether or no duplicate features should be in a language is argueable. 20:07 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 20:07 < vsmatck1> Because it can be replaced with if/else if. 20:08 < vsmatck1> Without losing any generality. Anyone disagree with this? 20:08 < dho> well, between defer / break label, I don't expect to use goto much at all. 20:08 < neilk> switch is more efficient than if/else if. 20:08 <+danderson> it can, but if/else if chains are a pain in the ass to type 20:08 < neilk> maybe not the way it's implemented in go 20:08 < jessta> the switch statement has better syntax than lots of if/else 20:08 <+danderson> I die a little inside each time I have to implement it, and yearn for a lisp cond 20:08 < neilk> but in C, it can be more efficient precisely because it's a kind of goto 20:08 < vsmatck1> Interesting. I've not heard about efficiency benefits of switch. 20:09 <+iant> if the case labels are constants, switch can be more efficient 20:09 < KirkMcDonald> vsmatck1: In C, a switch statement can frequently be implemented as a jump table. 20:09 < jdp> let's just have a match keyword and guards and be done with it ;) 20:09 < KirkMcDonald> vsmatck1: With if/else if, you need to check each condition in turn. 20:09 < dho> I'd guess an optimizing compiler would generate the same output for equivilent switch and if/else if constructs. 20:09 < neilk> switch (...) case 1: case 2: case 3: case 4: case 5:... can be compiled into assembly as 'is val between 1 and 5? if so, jump to the instruction stored in n+val 20:09 -!- afurlan [n=afurlan@scorpion.mps.com.br] has quit ["Leaving"] 20:10 < neilk> instead of "is n=1? if not, is n=2? if not, is n=3?" etc 20:10 -!- Nanoo [n=Nano@95-89-198-45-dynip.superkabel.de] has quit ["Leaving"] 20:10 < vsmatck1> Ah, interesting optimization. I understand how that could work. 20:10 < neilk> depending on what you're switching and how fast, this can make a big difference or none at all 20:10 <+danderson> dho: probably, but even if it comes down to readability, choice between more than 2 alternatives should not have to be constructed out of chaining binary switches 20:11 -!- __ed [i=bitch@anal-co.it] has quit [Read error: 60 (Operation timed out)] 20:11 < dho> danderson: certainly 20:11 -!- illya77 [n=illya77@141-210-133-95.pool.ukrtel.net] has joined #go-nuts 20:11 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 20:11 < KirkMcDonald> Even with the case expressions being strings, you can compile it as a constant hash table. 20:11 <+danderson> that's why eg. lisp has both if for binary decisions and cond for many-way decisions 20:11 <+danderson> and it really does help convey intent, imho. 20:11 -!- rrr [i=rrr@gateway/gpg-tor/key-0x9230E18F] has quit [Success] 20:11 < skelterjohn> even with non consecutive switch cases, if they're constants then the compiler can have the code do binary search or something instead of linear lookup 20:11 < KirkMcDonald> Or a hash table. 20:12 < skelterjohn> or a hashtable, as kirk mentioned 20:12 -!- ContraSF [i=email@89.180.135.176] has joined #go-nuts 20:12 -!- stalled [n=411@unaffiliated/stalled] has quit [Read error: 110 (Connection timed out)] 20:12 <+danderson> if anything, go should have called the keyword 'cond', so that people don't look at it with the prejudice of C/C++ switch :) 20:12 < KirkMcDonald> It can attempt to find a perfect hash table for the constant keys. 20:12 < skelterjohn> right, hashtable seems more appropriate. 20:12 * dho goes out to promote lung cancer 20:13 -!- __ed [i=bitch@anal-co.it] has quit [Read error: 60 (Operation timed out)] 20:13 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 20:13 -!- mkanat [n=mkanat@c-67-188-1-39.hsd1.ca.comcast.net] has joined #go-nuts 20:14 < rog> lisp has case too 20:14 < rog> CL, that is 20:16 -!- raichoo [n=raichoo@i577BBEEB.versanet.de] has joined #go-nuts 20:17 -!- raichoo [n=raichoo@i577BBEEB.versanet.de] has quit [Client Quit] 20:19 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"] 20:19 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 20:20 -!- tav [n=tav@78.145.25.137] has quit [] 20:21 -!- cmbntr [n=cmbntr@80-218-229-4.dclient.hispeed.ch] has joined #go-nuts 20:21 -!- __ed [i=bitch@anal-co.it] has quit [Read error: 60 (Operation timed out)] 20:22 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 20:22 -!- DerHorst [n=Horst@e176125240.adsl.alicedsl.de] has quit ["Verlassend"] 20:26 < rbancroft> case is more like a switch statement 20:26 < rbancroft> cond is more like if/elses 20:27 <+danderson> ooh, new gcc compiler error. Fun. 20:28 <+danderson> and in the STL no less, I wonder what I screwed up :) 20:28 -!- divoxx [n=divoxx@c925af25.virtua.com.br] has joined #go-nuts 20:28 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"] 20:28 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 20:28 -!- rrr [i=rrr@gateway/gpg-tor/key-0x9230E18F] has joined #go-nuts 20:29 < divoxx> Hi there. I'm wondering if there is a way to define a interface for a constructor... I have some interfaces I'm defining but I'd like to also define a interface for a constructor that will build the object that conforms to that interface... 20:29 < divoxx> Not sure if I'm making sense though :) 20:29 -!- TR2N` [i=email@89-180-155-121.net.novis.pt] has quit [Success] 20:33 -!- rrr [i=rrr@gateway/gpg-tor/key-0x9230E18F] has quit [Remote closed the connection] 20:34 < rbancroft> and neilk, does any compiler perform that particular optimization? it wouldn't even work, unless that instruction was another jump 20:34 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"] 20:34 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 20:35 < neilk> which optimization? 20:36 < neilk> the switch 1..5 one? 20:36 < rbancroft> neilk: yes 20:36 -!- Gracenotes [n=person@wikipedia/Gracenotes] has quit ["Leaving"] 20:36 -!- EddieRingle [n=EddieRin@64.233.242.70] has quit [Read error: 110 (Connection timed out)] 20:36 < neilk> i'm fairly sure it's not an uncommon way to compile it 20:38 < neilk> i just observed gcc 4.1.2 performing it 20:38 -!- cmbntr [n=cmbntr@80-218-229-4.dclient.hispeed.ch] has quit [] 20:39 < neilk> i think it's the whole reason they put switch in the language 20:40 -!- oal [n=olav@5.79-160-122.customer.lyse.net] has joined #go-nuts 20:40 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"] 20:40 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 20:40 < oal> Can I use C libraries with golang? 20:40 -!- rndbot [n=bot@wikipedia/Gracenotes] has quit [Remote closed the connection] 20:40 -!- cmbntr [n=cmbntr@80-218-229-4.dclient.hispeed.ch] has joined #go-nuts 20:41 < rbancroft> neilk: I guess so. a branch table 20:41 < asyncster> given an os.Error, is there a way to get the unix error code? 20:41 < asyncster> it seems to convert everything to a string 20:42 < carllerche> asyncster: I'm trying to do something similar and having some type problems. 20:42 -!- tav [n=tav@78.145.25.137] has joined #go-nuts 20:42 < carllerche> if e.Error == os.Errno(54) won't compile for me, not sure why os.Errno is an os.Error 20:42 -!- snearch [n=olaf@g225054176.adsl.alicedsl.de] has quit ["Ex-Chat"] 20:42 < xerox> oal: iirc no ffi is available yet 20:42 < carllerche> I'm getting invalid operation: e.Error == 54 (type os.Error == os.Errno) 20:43 < neilk> rbancroft: try it, write a simple C program with switch cases 0..5 and compile it with -S 20:43 < neilk> or try it with 1..5 and see how the compiler subtracts 1 from your reuslt : 20:44 < rbancroft> neilk: I misunderstood your initial comment, so I agree it would work btw 20:44 < neilk> oh, okay 20:44 -!- fenicks [n=christia@log77-4-82-246-228-78.fbx.proxad.net] has joined #go-nuts 20:44 < jessta> oal: look at cgo 20:45 -!- rrr [i=rrr@gateway/gpg-tor/key-0x9230E18F] has joined #go-nuts 20:45 < oal> jessta: thanks 20:46 < jessta> oal: but there isn't any way to call go code from C, so libraries that use callbacks won't work 20:46 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"] 20:46 < dho> sort of 20:47 < oal> Ok 20:47 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 20:47 < dho> the person who did the lua port made a hack to allow that. 20:47 < oal> Could Go be a replacement for C/C++ in some years? Or is that not the goal for Go? 20:47 < skelterjohn> systems language of the future 20:47 < skelterjohn> I'm sure one of their dreams is to have it supplant C 20:48 < skelterjohn> but C is sort of embedded into our cultural psyche 20:48 < skelterjohn> so basically, who knows? 20:48 < oal> interesting ;) 20:48 < skelterjohn> I certainly like it better, esp for concurrent programming 20:48 < asyncster> carllerche: this seems to work 20:48 < asyncster> err.(*os.PathError).Error.(os.Errno) 20:49 < neilk> it sure is better than pthreads 20:49 < carllerche> asyncster: what is the err.(...) syntax, is that for type conversion? 20:50 < asyncster> carllerche 20:50 < skelterjohn> I'm not exactly sure why everyone hates pthreads so much 20:50 -!- boscop_ [n=unknown@g230092011.adsl.alicedsl.de] has joined #go-nuts 20:50 < asyncster> yeah, it takes the eror, converts it into a path Error 20:50 < skelterjohn> but I don't think about things on the OS level 20:50 < skelterjohn> or I try not to 20:50 < jessta> oal: it's the kind of thing that actually could replace C for a lot of things 20:50 < asyncster> then takes the Error property of the PathError, and converts it into an Errno 20:50 < jessta> oal: nothing else I've seen really comes close 20:51 < asyncster> that's the unix error no 20:51 < skelterjohn> jessta: there have been things that merit coming close, but don't have the backing of google 20:51 -!- tomestla [n=tom@78.251.174.90] has quit [Read error: 110 (Connection timed out)] 20:51 -!- foo___ [i=50dae504@gateway/web/freenode/x-suiwxplvojutksmh] has joined #go-nuts 20:51 < skelterjohn> The fact that google can hold a press conference and suddenly there is a community... 20:51 < skelterjohn> that is pretty clutch 20:51 -!- Gracenotes [n=person@wikipedia/Gracenotes] has joined #go-nuts 20:52 -!- foo___ [i=50dae504@gateway/web/freenode/x-suiwxplvojutksmh] has quit [Client Quit] 20:52 < oal> jessta: Can one make gui applications in go atm? 20:52 < ShadowIce> carllerche: this might work as well: e.(os.Errno) == 54 20:53 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"] 20:53 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 20:54 < carllerche> ShadowIce: doesn't type conversion return 2 things? 20:54 < ShadowIce> hmm....yes 20:55 < KirkMcDonald> That is a type assertion, not a conversion. 20:55 < KirkMcDonald> And it may return one or two things, depending on the context in which it is used. 20:55 < carllerche> i was under the impression that foo.(type) was a type assertion 20:55 < carllerche> and type(foo) was a conversion 20:55 < KirkMcDonald> Yes. 20:55 < KirkMcDonald> And he typed e.(os.Errno), yes? 20:56 -!- Meidor [n=quassel@cl-936.ams-05.nl.sixxs.net] has quit ["http://quassel-irc.org - Chat comfortably. Anywhere."] 20:56 < carllerche> yes, i belive so 20:56 < carllerche> this is what i was doing: e.Error == os.Errno(54), which doesn't compile 20:56 < carllerche> 20:56 < KirkMcDonald> Oh, I see. 20:57 < jessta> oal: not really at the moment 20:57 < carllerche> before that, i have e, ok := err.(*os.PathError) 20:58 < ShadowIce> ah, sorry....I though e was of type Error 20:58 < carllerche> ShadowIce: well, os.Error is an interface 20:58 < ShadowIce> yes I know 20:58 < carllerche> e is a *os.PathError, so e.Error should be an os.Errno 20:58 < jessta> oal: http://go-lang.cat-v.org/library-bindings 20:59 < oal> jessta: thank you 20:59 < ShadowIce> no, e.Error is _something_ that implements the Error interface, it doesn't have to be Errno 21:00 < KirkMcDonald> ShadowIce: e is a variable of type *os.PathError. 21:00 -!- oal [n=olav@5.79-160-122.customer.lyse.net] has quit [Remote closed the connection] 21:00 < KirkMcDonald> ShadowIce: And os.PathError has a member named Error. 21:00 < fgb> oal, there is no such a thing as C/C++, you either have C or C++ 21:00 < ShadowIce> KirkMcDonald: I know now ;) 21:00 < skelterjohn> Or, you write C code and compile it with g++ 21:00 < KirkMcDonald> carllerche: The docs say that e.Error is of type os.Error. 21:01 -!- illya77 [n=illya77@141-210-133-95.pool.ukrtel.net] has quit [Read error: 104 (Connection reset by peer)] 21:01 < ShadowIce> so my previous line should have been: e.Error.(os.Errno) == 54 21:01 < skelterjohn> or is not the case that you can do that, in general 21:01 < carllerche> ShadowIce: I shall try that out, thanks 21:01 < ShadowIce> and of course I didn't try that and I'm fairly new to Go....so no idea if that's correct ;= 21:02 < KirkMcDonald> It is syntactically correct. But I don't know if you have any assurance that e.Error will always be an Errno. 21:02 -!- boscop [n=unknown@f055200178.adsl.alicedsl.de] has quit [Read error: 110 (Connection timed out)] 21:02 -!- __ed [i=bitch@anal-co.it] has quit [Read error: 60 (Operation timed out)] 21:03 < fgb> and that wouldn't be quite portable 21:03 < ShadowIce> KirkMcDonald: yes, you should check the second return value as well.... 21:03 < fgb> what about systems that don't have errno... 21:03 < ShadowIce> if you want to write good software ^^ 21:03 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 21:04 -!- __ed [i=bitch@anal-co.it] has quit [Remote closed the connection] 21:11 < gnuvince> If I want to write a little program and use gotest, do I need to write my program in $GOROOT/src/pkg? 21:11 -!- EddieRingle [n=EddieRin@64.233.242.70] has joined #go-nuts 21:11 < KirkMcDonald> No. 21:11 < KirkMcDonald> Just include Make.pkg, and it'll work. 21:12 -!- clearscreen [n=clearscr@e248070.upc-e.chello.nl] has joined #go-nuts 21:12 < KirkMcDonald> Like, here's my own third-party package's Makefile: http://code.google.com/p/optparse-go/source/browse/Makefile 21:12 < KirkMcDonald> (You can ignore the last three lines.) 21:12 < KirkMcDonald> And 'make test' runs the unit tests just fine. 21:17 < skelterjohn> the gotest infrastructure is quite nice 21:20 < carllerche> is it generally a good idea to play with GOMAXPROCS right now? the docs say that it's going to go away 21:21 < skelterjohn> Worth setting it to the number of cores you've got on your machine, and otherwise ignoring it 21:21 -!- pvandusen [n=pdusen@crob4-55.flint.umich.edu] has joined #go-nuts 21:25 -!- mbarkhau [n=koloss@p54A7E65F.dip.t-dialin.net] has joined #go-nuts 21:26 -!- Alkavan [n=alkavan@IGLD-84-229-142-45.inter.net.il] has quit [Read error: 104 (Connection reset by peer)] 21:27 -!- cmbntr [n=cmbntr@80-218-229-4.dclient.hispeed.ch] has quit [] 21:27 -!- Alkavan [n=alkavan@87.68.247.236.adsl.012.net.il] has joined #go-nuts 21:28 -!- eulenspiegel [n=irssi@p579CA350.dip.t-dialin.net] has joined #go-nuts 21:28 -!- idea_squirrel [i=ct2rips@77-21-26-177-dynip.superkabel.de] has quit ["Verlassend"] 21:34 -!- ajhager [n=ajhager@c-69-136-3-186.hsd1.in.comcast.net] has joined #go-nuts 21:34 -!- mitchellh [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has joined #go-nuts 21:38 -!- gkmngrgn [n=gkmngrgn@unaffiliated/gkmngrgn] has quit [Read error: 113 (No route to host)] 21:38 < fenicks> hello 21:39 -!- pdusen [n=pdusen@crob4-55.flint.umich.edu] has quit [Read error: 110 (Connection timed out)] 21:39 -!- aho [n=nya@f051040079.adsl.alicedsl.de] has joined #go-nuts 21:43 -!- amacleod [n=amacleod@c-75-69-45-62.hsd1.ma.comcast.net] has joined #go-nuts 21:47 -!- cmbntr [n=cmbntr@80-218-229-4.dclient.hispeed.ch] has joined #go-nuts 21:47 < bfrank2> has anyone found a way to read files a line at a time? 21:49 < skelterjohn> I believe io/ioutils has some stuff for htat 21:49 < skelterjohn> i lied 21:49 < skelterjohn> Seems like a reasonable utility function, though, that creates a channel and sends lines on this channel 21:49 < skelterjohn> someone should write it. 21:50 < dho> readline, too. 21:50 -!- fenicks [n=christia@log77-4-82-246-228-78.fbx.proxad.net] has quit ["Leaving."] 21:51 < dho> or, probably better, libedit 21:51 < skelterjohn> If you can grab all the data from the file, pass it to http://golang.org/pkg/regexp/#Regexp.AllMatchesStringIter 21:51 < skelterjohn> with the appropriate regexp 21:51 < skelterjohn> but it is something common enough to want to do that it should be its own function 21:51 < skelterjohn> dho: libedit? 21:51 -!- encolpe [n=encolpe@gai69-3-82-235-15-3.fbx.proxad.net] has joined #go-nuts 21:52 < dho> what the BSDs use instead of readline. 21:52 < bfrank2> so there isn't one? 21:52 -!- fenicks [n=christia@log77-4-82-246-228-78.fbx.proxad.net] has joined #go-nuts 21:52 -!- fenicks [n=christia@log77-4-82-246-228-78.fbx.proxad.net] has left #go-nuts [] 21:52 < bfrank2> hmm 21:52 < bfrank2> yeah, and reading a line at a time seems a bit more efficient, for really large file processing 21:53 < skelterjohn> I won't say there *isn't*, but I don't know of one and a cursory scan of the libraries didn't turn anything up 21:53 < KirkMcDonald> It's not that hard to implement it. 21:53 < KirkMcDonald> Read a block at a time, read lines from the block, keep the partial line at the end, read the next block... 21:54 -!- fenicks [n=christia@log77-4-82-246-228-78.fbx.proxad.net] has joined #go-nuts 21:54 < hagna> the x axis on the chart shown here is what, n? http://swtch.com/~rsc/regexp/regexp1.html 21:54 < KirkMcDonald> hagna: Yes. 21:55 < KirkMcDonald> hagna: Note, too, the difference in the units on the Y-axes. 21:55 -!- supershoe0 [i=DCEmuUse@ACA216B9.ipt.aol.com] has joined #go-nuts 21:56 -!- ukl [n=ukl@f053121158.adsl.alicedsl.de] has quit ["..."] 21:56 < supershoe0> hellooooooo? 21:57 < dho> only from aol. 21:57 -!- Gracenotes [n=person@wikipedia/Gracenotes] has quit [Remote closed the connection] 21:58 < supershoe0> anyone play vba? 22:00 < hagna> hah! thanks for pointing that out 22:00 -!- neilk [n=neilk@shed.goonies.be] has left #go-nuts [] 22:03 -!- supershoe0 [i=DCEmuUse@ACA216B9.ipt.aol.com] has left #go-nuts [] 22:03 -!- ineol [n=hal@mar75-9-88-171-191-168.fbx.proxad.net] has joined #go-nuts 22:04 -!- codedread [i=81bc2119@gateway/web/freenode/x-twwgopbpqpelbtmj] has left #go-nuts [] 22:05 -!- KillerX [n=anant@gentoo/developer/KillerX] has quit [Read error: 104 (Connection reset by peer)] 22:05 -!- ponce [n=ponce@paradisia.net] has left #go-nuts [] 22:12 -!- rbohn [n=rbohn@192.206.100.4] has joined #go-nuts 22:14 -!- r2p2 [n=billy@v32671.1blu.de] has left #go-nuts [] 22:14 -!- KillerX [n=anant@nat/mozilla/x-luhmimexbqcugoqa] has joined #go-nuts 22:20 -!- nigwil [n=chatzill@berkner.ccamlr.org] has joined #go-nuts 22:22 -!- nigwil [n=chatzill@berkner.ccamlr.org] has left #go-nuts [] 22:24 -!- sebastiandeutsch [n=sebastia@dslb-084-058-250-059.pools.arcor-ip.net] has joined #go-nuts 22:25 -!- youngbull [n=youngbul@129.177.48.24] has joined #go-nuts 22:30 -!- chachan [n=chachan@ccscliente156.ifxnetworks.net.ve] has quit ["KVIrc Insomnia 4.0.0, revision: , sources date: 20090520, built on: 2009/06/06 11:44:47 UTC http://www.kvirc.net/"] 22:30 -!- melba [n=blee@unaffiliated/lazz0] has quit ["MICROSOFT WORD IS A FUN GAME"] 22:32 -!- ineol [n=hal@mar75-9-88-171-191-168.fbx.proxad.net] has quit [] 22:34 -!- decriptor [n=decripto@137.65.133.23] has quit [Read error: 110 (Connection timed out)] 22:37 -!- ikke [n=ikke@unaffiliated/ikkebr] has joined #go-nuts 22:37 -!- deso [n=deso@x0561a.wh30.tu-dresden.de] has quit [Read error: 104 (Connection reset by peer)] 22:41 -!- Tuller [n=Tuller@pool-72-84-246-12.rcmdva.fios.verizon.net] has joined #go-nuts 22:42 -!- i3d [n=i3dmaste@74.125.59.65] has quit [Client Quit] 22:46 -!- AndrewBC [n=Andrew@97.93.242.12] has joined #go-nuts 22:47 -!- itrekkie [n=itrekkie@ip72-200-111-111.tc.ph.cox.net] has joined #go-nuts 22:53 -!- amacleod [n=amacleod@c-75-69-45-62.hsd1.ma.comcast.net] has quit ["Bye Bye"] 22:56 -!- asyncster [n=asyncste@206.169.213.106] has quit [Read error: 110 (Connection timed out)] 22:56 -!- cmbntr [n=cmbntr@80-218-229-4.dclient.hispeed.ch] has quit [] 22:57 -!- Kniht [n=kniht@c-68-58-17-177.hsd1.in.comcast.net] has quit [Read error: 110 (Connection timed out)] 22:57 -!- asyncster [n=asyncste@206.169.213.106] has joined #go-nuts 23:01 -!- Wiz126 [n=Wiz126@24.102.254.150.res-cmts.sm.ptd.net] has joined #go-nuts 23:09 -!- Gracenotes [n=person@wikipedia/Gracenotes] has joined #go-nuts 23:15 -!- skelterjohn [n=jasmuth@lawn-net168-in.rutgers.edu] has quit [] 23:16 -!- raichoo [n=raichoo@i577BBEEB.versanet.de] has joined #go-nuts 23:17 -!- lambo4jos [n=chatzill@c-76-126-250-10.hsd1.ca.comcast.net] has joined #go-nuts 23:19 -!- General13372 [n=support@71-84-247-187.dhcp.gldl.ca.charter.com] has joined #go-nuts 23:21 -!- lux` [n=lux@151.95.190.245] has quit [Remote closed the connection] 23:23 -!- Gracenotes [n=person@wikipedia/Gracenotes] has quit [Read error: 60 (Operation timed out)] 23:24 -!- rakd [n=rakd@219.117.252.7.static.zoot.jp] has joined #go-nuts 23:25 -!- iant [n=iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has quit [Read error: 110 (Connection timed out)] 23:26 -!- subat_qn [n=subat_qn@78.236.214.16] has joined #go-nuts 23:27 -!- mizai [n=mizai@rhou-164-107-213-111.resnet.ohio-state.edu] has joined #go-nuts 23:27 -!- General1337 [n=support@71.84.247.187] has quit [Read error: 145 (Connection timed out)] 23:32 -!- ShadowIce [n=pyoro@unaffiliated/shadowice-x841044] has quit ["Verlassend"] 23:36 -!- Axman6 [n=Axman6@pdpc/supporter/student/Axman6] has quit [Connection timed out] 23:37 -!- JSharpe2 [n=jamie@5ad50265.bb.sky.com] has joined #go-nuts 23:37 -!- hooopy [i=hoopy@173-30-98-140.client.mchsi.com] has joined #go-nuts 23:39 -!- scarabx [n=scarabx@c-24-147-239-120.hsd1.ma.comcast.net] has joined #go-nuts 23:39 -!- JSharpe [n=jamie@5ad50265.bb.sky.com] has quit [Read error: 104 (Connection reset by peer)] 23:42 -!- ruam [n=ruam@cpe-69-203-1-249.nyc.res.rr.com] has joined #go-nuts 23:42 -!- maacl [n=mac@0x573526c8.virnxx17.dynamic.dsl.tele.dk] has quit [] 23:53 -!- mejja [n=user@c-49b6e555.023-82-73746f38.cust.bredbandsbolaget.se] has joined #go-nuts 23:54 -!- mitchellh [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has quit ["Leaving."] 23:58 -!- skelterjohn [n=jasmuth@c-76-116-176-34.hsd1.nj.comcast.net] has joined #go-nuts 23:59 -!- subat_qn [n=subat_qn@78.236.214.16] has left #go-nuts [] --- Log closed Fri Dec 11 00:00:31 2009