--- Log opened Wed Dec 15 00:00:01 2010 00:02 -!- dju [dju@at.dmz.me] has joined #go-nuts 00:02 -!- dju [dju@at.dmz.me] has quit [Changing host] 00:02 -!- dju [dju@fsf/member/dju] has joined #go-nuts 00:07 -!- virtualsue [~chatzilla@nat/cisco/x-fymzztcjgasjdkha] has quit [Quit: ChatZilla 0.9.86 [Firefox 3.5.15/20101026200251]] 00:08 -!- photron_ [~photron@port-92-201-219-18.dynamic.qsc.de] has quit [Ping timeout: 265 seconds] 00:10 -!- KBme [~KBme@9angled-2-pt.tunnel.tserv5.lon1.ipv6.he.net] has quit [Quit: KBme kthxbye] 00:11 -!- iant [~iant@nat/google/x-saovuocciukeqsgu] has quit [Quit: Leaving.] 00:12 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 250 seconds] 00:13 -!- KBme [~KBme@9angled-2-pt.tunnel.tserv5.lon1.ipv6.he.net] has joined #go-nuts 00:17 < |Craig|> temoto: did you happen to recently upgrade go? 00:17 < |Craig|> You get issues like that if you have some object files from an old version of go 00:18 < nsf> has anyone tried using new cgo in gc tip? is it ready to use or should I wait for the release? 00:19 < nsf> s/to use/for use/ 00:20 -!- iant [~iant@67.218.110.2] has joined #go-nuts 00:20 -!- mode/#go-nuts [+v iant] by ChanServ 00:26 -!- KBme [~KBme@9angled-2-pt.tunnel.tserv5.lon1.ipv6.he.net] has quit [Ping timeout: 260 seconds] 00:34 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts 00:37 -!- iant [~iant@67.218.110.2] has quit [Ping timeout: 276 seconds] 00:38 -!- iant [~iant@216.239.45.130] has joined #go-nuts 00:38 -!- mode/#go-nuts [+v iant] by ChanServ 00:40 -!- KBme [~KBme@9angled-2-pt.tunnel.tserv5.lon1.ipv6.he.net] has joined #go-nuts 00:41 -!- krutcha [~krutcha@remote.icron.com] has quit [Quit: Leaving] 00:47 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-175-208.clienti.tiscali.it] has joined #go-nuts 00:51 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-170-204.clienti.tiscali.it] has quit [Ping timeout: 265 seconds] 00:52 -!- rbraley [~rbraley@ip72-222-134-229.ph.ph.cox.net] has quit [Read error: Connection reset by peer] 00:56 < plexdev> http://is.gd/iLc8p by [Nigel Tao] in go/src/pkg/html/ -- html: parse "<h1>foo<h2>bar". 01:00 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-167-75.clienti.tiscali.it] has joined #go-nuts 01:02 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-167-75.clienti.tiscali.it] has quit [Client Quit] 01:03 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-175-208.clienti.tiscali.it] has quit [Ping timeout: 260 seconds] 01:05 -!- rlab [~Miranda@91.200.158.34] has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org] 01:08 -!- ExtraSpice [~XtraSpice@88.118.33.48] has quit [Ping timeout: 276 seconds] 01:10 -!- i3d [~i3dmaster@74.125.59.73] has joined #go-nuts 01:11 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3] 01:13 < plexdev> http://is.gd/iLeFK by [Ryan Hitchman] in go/misc/dashboard/godashboard/ -- godashboard: support submitting projects with non-ascii names 01:13 < plexdev> http://is.gd/iLeFU by [Rob Pike] in go/src/cmd/govet/ -- govet: allow directories as arguments, process recursively. 01:16 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts 01:32 -!- noff_ [~noff@195-187.78-83.cust.bluewin.ch] has joined #go-nuts 01:32 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has joined #go-nuts 01:35 -!- [noff] [~noff@48-92.78-83.cust.bluewin.ch] has quit [Ping timeout: 265 seconds] 01:38 -!- artefon [~thiago@189.26.238.4] has quit [Quit: bye] 01:43 -!- Tuller [~tuller@c-69-143-52-174.hsd1.va.comcast.net] has quit [Remote host closed the connection] 01:50 -!- iant [~iant@216.239.45.130] has quit [Ping timeout: 276 seconds] 01:53 -!- cco3 [~conley@c-69-181-138-209.hsd1.ca.comcast.net] has joined #go-nuts 01:54 < uriel> nsf: what 'renaming' stuff? 01:54 -!- niemeyer [~niemeyer@201-2-134-72.pltce701.dsl.brasiltelecom.net.br] has quit [Ping timeout: 265 seconds] 01:54 < nsf> uriel: http://nsf.110mb.com/gocode-rename.swf 01:55 < nsf> gocode was able to perform semantically preserving rename operations on the source code.. sort of 01:56 < _nil> uriel: don't you have a log of pikes thoughts on syntax highlighting? 01:56 < uriel> ah, seems neat, but I'm not sure that belongs to gocode 01:56 < nsf> but it requires too much correctness from semantical analysis, and I don't really have enthusiasm to support it 01:56 < nsf> uriel: indeed 01:56 < nsf> that too.. unix philosophy 01:57 < uriel> _nil: I'd check 9fans archives 01:57 < nsf> one tool - one job 01:57 < nsf> initially I just thought that kind of thing has a lot in common with autocompletion 01:57 < nsf> I was wrong 01:57 -!- KBme [~KBme@9angled-2-pt.tunnel.tserv5.lon1.ipv6.he.net] has quit [Ping timeout: 260 seconds] 01:58 < uriel> _nil: "syntax highlighting is as helpful as writing all english prnouns in bold" or something like that 01:59 < uriel> also, it emphasizes the irrelevant 02:10 -!- KBme [~KBme@9angled-2-pt.tunnel.tserv5.lon1.ipv6.he.net] has joined #go-nuts 02:12 -!- KBme [~KBme@9angled-2-pt.tunnel.tserv5.lon1.ipv6.he.net] has quit [Read error: Operation timed out] 02:14 < nsf> hehe, Go projects on github have started to become more interesting.. quite massive stuff like game servers, nice irc bots 02:14 < nsf> :P 02:15 < nsf> https://github.com/huin/chunkymonkey 02:16 < nsf> https://github.com/jteeuwen/Calculon 02:16 < nsf> two of them I liked 02:19 -!- KBme [~KBme@9angled-2-pt.tunnel.tserv5.lon1.ipv6.he.net] has joined #go-nuts 02:21 < nsf> https://github.com/0xe2-0x9a-0x9b/clingon <- that one is interesting too 02:21 -!- KBme [~KBme@9angled-2-pt.tunnel.tserv5.lon1.ipv6.he.net] has quit [Read error: Operation timed out] 02:31 -!- nettok [~quassel@200.119.173.1] has joined #go-nuts 02:33 -!- KBme [~KBme@9angled-2-pt.tunnel.tserv5.lon1.ipv6.he.net] has joined #go-nuts 02:37 -!- KBme [~KBme@9angled-2-pt.tunnel.tserv5.lon1.ipv6.he.net] has quit [Client Quit] 02:40 -!- KBme [~KBme@9angled-2-pt.tunnel.tserv5.lon1.ipv6.he.net] has joined #go-nuts 02:44 -!- SoniaKeys [Alliebloom@c-24-91-112-191.hsd1.ma.comcast.net] has joined #go-nuts 02:46 -!- xb95 [~weechat@xb95.com] has quit [Changing host] 02:46 -!- xb95 [~weechat@dreamwidth/staff/mark] has joined #go-nuts 02:53 -!- jartur [~jartur@93-88-3-020-xdsl.vntc.ru] has joined #go-nuts 02:58 -!- boscop_ [~boscop@g230090153.adsl.alicedsl.de] has joined #go-nuts 03:01 -!- boscop [~boscop@g230111150.adsl.alicedsl.de] has quit [Ping timeout: 245 seconds] 03:30 -!- Nitro [~Nitro@unaffiliated/nitro] has quit [Quit: This computer has gone to sleep] 03:33 -!- nettok [~quassel@200.119.173.1] has quit [Ping timeout: 264 seconds] 03:43 -!- foocraft [~dsc@78.101.153.252] has quit [Quit: Leaving] 03:55 -!- shvntr [~shvntr@113.84.146.107] has joined #go-nuts 04:00 * MaybeSo mutters about build times, as he waits for boost C++ libs to compile 04:01 < nsf> I can't use C++ anymore 04:01 < nsf> compilation takes too much time 04:01 < nsf> :\ 04:01 < MaybeSo> (90 minutes so far...) 04:01 < MaybeSo> those are neat projects -- it's great that people are actively adding to the space 04:04 < MaybeSo> I wonder if someone is going to end up porting sam and acme to go 04:09 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has joined #go-nuts 04:09 -!- mode/#go-nuts [+v iant] by ChanServ 04:15 * TheSeeker works on maintaining a small MMO game client written in C/C++ (I shouldn't be let near code, but I'm willing to work for almost nothing, so...) 04:16 < TheSeeker> it was poorly written in teh first place, so everyhting's interconnected. can't change much of anything without 30+ minutes recompiling :| 04:16 < nsf> :| 04:18 -!- nettok [~quassel@200.119.173.1] has joined #go-nuts 04:20 < TheSeeker> Once I finally get done adding/debugging the features I've been working on for months now, I'm tempted to try and make a Go clone of the client with Go-OpenGL >_> 04:21 < nsf> Go-OpenGL is broken for some nvidia drivers on linux 04:21 < nsf> well.. kind of broken 04:21 < TheSeeker> And I'm on windows :) 04:21 < nsf> http://code.google.com/p/go/issues/detail?id=1262 04:21 < nsf> maybe in windows too, I don't know 04:22 < nsf> i'm just saying 04:22 < nsf> if people will annoy you with bug reports later :) keep in mind that there is an issue 04:22 < TheSeeker> I've only barely started trying to get go-SDL to compile, haven't even really tried Go-OpenGL yet... need to figure out howtf to get my environment set up. :) 04:24 < TheSeeker> Biggest issue is that I don't have access to net layer sources for the client, just dlls and header files. so I'll need to learn how cgo and/or swig works if I want to actually talk to the server... 04:26 < nsf> cgo is pretty simple 04:27 < nsf> swig is much worse (imho) 04:27 < nsf> it's not like the support for Go is bad, using it is much harder 04:33 -!- rejb [~rejb@unaffiliated/rejb] has quit [Ping timeout: 276 seconds] 05:31 -!- Nitro [~Nitro@unaffiliated/nitro] has joined #go-nuts 05:32 -!- Eridius [~kevin@unaffiliated/eridius] has quit [Ping timeout: 240 seconds] 05:41 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has quit [Ping timeout: 265 seconds] 05:46 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has joined #go-nuts 05:51 -!- tvw [~tv@212.79.9.150] has joined #go-nuts 05:52 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3] 06:00 -!- fabled [~fabled@mail.fi.jw.org] has joined #go-nuts 06:16 -!- zozoR [~zozoR@56346ed3.rev.stofanet.dk] has joined #go-nuts 06:17 -!- Project_2501 [~Marvin@82.84.67.223] has joined #go-nuts 06:18 -!- keithcascio [~keithcasc@nat/google/x-jxzlznaljhjznxqp] has quit [Quit: Leaving] 06:18 -!- _nil [~aiden@c-24-147-65-44.hsd1.ma.comcast.net] has quit [Ping timeout: 250 seconds] 06:36 -!- segy_ [~segfault@pdpc/supporter/active/segy] has quit [Ping timeout: 260 seconds] 06:36 -!- foocraft [~dsc@78.101.153.252] has joined #go-nuts 06:38 -!- segy [~segfault@mail.hasno.info] has joined #go-nuts 06:38 -!- segy [~segfault@mail.hasno.info] has quit [Changing host] 06:38 -!- segy [~segfault@pdpc/supporter/active/segy] has joined #go-nuts 06:40 -!- jeff2 [~sername@c-98-210-113-215.hsd1.ca.comcast.net] has joined #go-nuts 06:56 -!- noff_ [~noff@195-187.78-83.cust.bluewin.ch] has quit [Ping timeout: 255 seconds] 06:59 < jeff2> I'm using cgo with //export to call a Go function from C, like the misc/cgo/life example, and it works fine.. but not if the (C) callee is on a separate pthread, in which case it fails with a null pointer access. is cgo not thread-safe? if so what are my options for calling Go code from another C thread? 06:59 -!- cco3 [~conley@c-69-181-138-209.hsd1.ca.comcast.net] has quit [Ping timeout: 276 seconds] 07:03 -!- jartur [~jartur@93-88-3-020-xdsl.vntc.ru] has quit [Ping timeout: 240 seconds] 07:07 -!- SoniaKeys [Alliebloom@c-24-91-112-191.hsd1.ma.comcast.net] has quit [] 07:08 -!- jartur [~jartur@93-88-4-075-xdsl.vntc.ru] has joined #go-nuts 07:15 -!- ymasory [~ymasory@c-76-99-55-224.hsd1.pa.comcast.net] has quit [Quit: Leaving] 07:24 -!- TSD [~TSD@cpc2-reig2-0-0-cust142.6-3.cable.virginmedia.com] has quit [Ping timeout: 240 seconds] 07:26 -!- TSD [~TSD@cpc2-reig2-0-0-cust142.6-3.cable.virginmedia.com] has joined #go-nuts 07:37 -!- _nil [~aiden@c-24-147-65-44.hsd1.ma.comcast.net] has joined #go-nuts 07:38 -!- TSD [~TSD@cpc2-reig2-0-0-cust142.6-3.cable.virginmedia.com] has quit [Ping timeout: 264 seconds] 07:42 -!- Chopinn [~Chopin@ti0018a380-dhcp1590.bb.online.no] has joined #go-nuts 07:47 -!- jeff2 [~sername@c-98-210-113-215.hsd1.ca.comcast.net] has quit [Quit: This computer has gone to sleep] 07:51 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|] 07:57 -!- Tv [~tv@cpe-76-168-227-45.socal.res.rr.com] has quit [Quit: Leaving.] 08:03 -!- noff [~noff@pub1.heig-vd.ch] has joined #go-nuts 08:06 -!- napsy [~luka@88.200.96.18] has joined #go-nuts 08:27 -!- ExtraSpice [~XtraSpice@88.118.33.48] has joined #go-nuts 08:32 -!- zozoR [~zozoR@56346ed3.rev.stofanet.dk] has quit [Quit: Morten. Desu~] 08:33 -!- xash [~xash@p548E44F7.dip.t-dialin.net] has joined #go-nuts 08:40 -!- xash [~xash@p548E44F7.dip.t-dialin.net] has quit [Ping timeout: 255 seconds] 08:58 -!- KirkMcDonald [~Kirk@python/site-packages/KirkMcDonald] has quit [Ping timeout: 245 seconds] 09:01 -!- KirkMcDonald [~Kirk@24.143.227.33] has joined #go-nuts 09:01 -!- KirkMcDonald [~Kirk@24.143.227.33] has quit [Changing host] 09:01 -!- KirkMcDonald [~Kirk@python/site-packages/KirkMcDonald] has joined #go-nuts 09:17 -!- jartur [~jartur@93-88-4-075-xdsl.vntc.ru] has quit [Ping timeout: 276 seconds] 09:18 -!- l00t [~i-i3id3r_@187.127.135.91] has quit [Ping timeout: 240 seconds] 09:18 -!- l00t [~i-i3id3r_@187.127.167.73] has joined #go-nuts 09:21 -!- noff [~noff@pub1.heig-vd.ch] has quit [Ping timeout: 260 seconds] 09:25 -!- photron_ [~photron@port-92-201-144-86.dynamic.qsc.de] has joined #go-nuts 09:34 -!- Chopinn [~Chopin@ti0018a380-dhcp1590.bb.online.no] has quit [Quit: Leaving] 09:36 -!- noff [~noff@pub1.heig-vd.ch] has joined #go-nuts 09:36 -!- noff [~noff@pub1.heig-vd.ch] has quit [Client Quit] 09:41 -!- photron_ [~photron@port-92-201-144-86.dynamic.qsc.de] has quit [Ping timeout: 264 seconds] 09:44 -!- niemeyer [~niemeyer@201-2-134-72.pltce701.dsl.brasiltelecom.net.br] has joined #go-nuts 09:58 -!- tensorpudding [~user@99.148.202.191] has quit [Read error: Connection reset by peer] 09:58 -!- tensorpudding [~user@99.148.202.191] has joined #go-nuts 09:59 -!- XenoPhoenix [~Xeno@cpc5-aztw24-2-0-cust39.aztw.cable.virginmedia.com] has quit [Ping timeout: 240 seconds] 09:59 -!- XenoPhoenix [~Xeno@cpc5-aztw24-2-0-cust39.aztw.cable.virginmedia.com] has joined #go-nuts 10:01 -!- sahid [~sahid@LNeuilly-152-21-22-10.w193-253.abo.wanadoo.fr] has quit [Ping timeout: 265 seconds] 10:01 -!- pothos [~pothos@111-240-205-247.dynamic.hinet.net] has quit [Quit: leaving] 10:02 -!- pothos [~pothos@111-240-205-247.dynamic.hinet.net] has joined #go-nuts 10:02 -!- tensorpudding [~user@99.148.202.191] has quit [Remote host closed the connection] 10:03 -!- sahid [~sahid@LNeuilly-152-21-22-10.w193-253.abo.wanadoo.fr] has joined #go-nuts 10:04 < plexdev> http://is.gd/iMmZh by [Nigel Tao] in go/src/pkg/reflect/ -- reflect: remove unnecessary indirection in TestCopy. 10:11 -!- ios_ [~ios@180.191.89.158] has joined #go-nuts 10:11 -!- ios_ [~ios@180.191.89.158] has left #go-nuts [] 10:13 -!- virtualsue [~chatzilla@93-97-62-8.zone5.bethere.co.uk] has joined #go-nuts 10:15 -!- foocraft [~dsc@78.101.153.252] has quit [Ping timeout: 260 seconds] 10:34 -!- virtualsue [~chatzilla@93-97-62-8.zone5.bethere.co.uk] has quit [Ping timeout: 240 seconds] 10:35 -!- virtualsue [~chatzilla@nat/cisco/x-iwwegbywotpbqcts] has joined #go-nuts 10:37 -!- xash [~xash@p548E44F7.dip.t-dialin.net] has joined #go-nuts 10:38 -!- artefon [~thiago@189.26.238.4] has joined #go-nuts 10:41 -!- xash [~xash@p548E44F7.dip.t-dialin.net] has quit [Remote host closed the connection] 10:55 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has quit [Ping timeout: 265 seconds] 10:59 -!- xash [~xash@p548E44F7.dip.t-dialin.net] has joined #go-nuts 10:59 < xash> Is it possible to give a function as a parameter to a function? 11:00 < KBme> yes 11:00 < xash> And how was the correct syntax for this? 11:01 < KBme> func myfunc(foo int, f func(int) int) int {return f(foo)} 11:01 < KBme> afaik 11:02 -!- nettok [~quassel@200.119.173.1] has quit [Ping timeout: 260 seconds] 11:02 < xash> Ah, yes, ofc .. thank you :-) 11:07 < plexdev> http://is.gd/iMvKI by [Luuk van Dijk] in 2 subdirs of go/src/ -- [68]l and runtime: GDB support for interfaces and goroutines. 11:07 < xash> Uhrm .. when I try to call myfunc now with f.addCounter as func .. "main.go:21: method f.addCounter is not an expression, must be called" 11:08 < KBme> how do you call it? can you paste it? 11:08 < xash> func (f *Field) getNeighbours(x, y int, handle func(x, y int)) { 11:09 < xash> That's the function 11:09 < xash> f.getNeighbours(x, y, f.addCounter) 11:09 < xash> That's the call 11:09 < KBme> does addCounter have a return value? 11:09 < xash> No 11:10 < xash> func (f *Field) addCounter(x, y int) { 11:11 < Namegduf> That's not called "f.addCounter" 11:11 < Namegduf> It's called "addCounter" 11:11 < Namegduf> Or possibly something else, I'm not sure how it works with methods. 11:11 < KBme> yeah, the issue is probably the fact it's a method 11:11 < Namegduf> At any rate, receiver.method is not passing the method. 11:12 < KBme> i don't know either :-/ 11:12 < xash> Ah, yes, makes sense 11:12 < Namegduf> Since it's lower case and internal to a package as a result, I'd suggest just using a function. 11:12 < KBme> maybe you'd need func myfunc(foo int, recv thereceiver, f func(..)) 11:12 < xash> Well .. but gives "addCounter undefined" error 11:13 < Namegduf> KBme: As it itself is a method on *Field, I assume it already has the receiver 11:13 < KBme> oh right so you do f.f ;) 11:13 < Namegduf> xash: There's probably some way to use it, but I don't know what the syntax is. 11:14 < Namegduf> A cheap solution is to just use a function. 11:14 < Namegduf> Make it "*Field, int, int" instead of "int, int" 11:15 < xash> Hrm .. ok, I'll use it for now for testing .. thank you ;-) 11:29 -!- l00t [~i-i3id3r_@187.127.167.73] has quit [Quit: Leaving] 11:39 < hokapoka_> I'm trying to unmarshal some json, from one of the google apis. There's a datetime property that contains : 2010-12-15T03:56:26.650Z when I use time.Time as the propery type causes the json Unmarshal to error. 11:40 < hokapoka_> Any suggestions on how I should overcome this? The only solution I can think of is to create a func to parse the value whenever I need to reference it. 11:40 -!- Jurek [~Administr@46-129-41-134.dynamic.upc.nl] has joined #go-nuts 11:41 < KBme> yeah, i think unmarshaling only works with builtin types 11:41 < hokapoka_> Well, rather than everytime I reference it, more after the parsing has compleated run through and re-parse all the dates. 11:41 < KBme> you could also post-process it 11:41 < KBme> yep 11:42 < KBme> maybe you can modify the codec or whatever but i don't know how that works 11:42 < hokapoka_> IIRC there's no get/set in go right? 11:43 < KBme> for what? 11:45 < hokapoka_> If I had a property Date_ of type time.Time and then Date of type string. Date_ could be a get{ return parse(Date) } where parse returns the Date in time.Time format. 11:46 -!- Jacek [d4bd2304@gateway/web/freenode/ip.212.189.35.4] has joined #go-nuts 11:46 < Namegduf> There's no language help for getters and setters 11:46 < KBme> i don't understand what get does here, sorry. 11:47 -!- Jurek [~Administr@46-129-41-134.dynamic.upc.nl] has quit [Remote host closed the connection] 11:48 < Jacek> I have a silly question: What does it do if there is like a method name in brackets? For example: socket := conn.(*net.UDPConn) 11:48 < Jacek> ... or err1.(Error).Timeout() 11:48 < Namegduf> That's not a method name. 11:48 < Namegduf> It's a type assertion. 11:49 < hokapoka_> KBme: rather than passign all the date after the json has been unmarshalled It oculd be done on demand. of couse I would cache the value once it had been passed so the next time it used the prev value is returned. 11:49 -!- wrtp [~rog@92.17.39.62] has joined #go-nuts 11:49 < Jacek> Can I use to to convert os.Error into os.Errno? 11:49 < Namegduf> someinterface.(type) == Convert that interface value to <type>, where <type> is the type inside it. 11:49 < Namegduf> You can use x, ok := someint.(type) notation to see if (type) is what is inside it. 11:50 < hokapoka_> KBme: Just wondering waht my options are reeally. I think like you said tho, parse the data values after it's been unmarshelled is the best option. 11:50 < Namegduf> Assuming os.Errno is a type implementing os.Error 11:50 < Namegduf> Yes 11:51 < Jacek> Thank you. I need some time to think about what you've told me. 11:52 < Namegduf> It's basically a way to extract the original value from an interface. 11:52 < Namegduf> The version without ",ok" panics if the interface does not contain a value of that type. 11:52 < Namegduf> The version with ",ok" can be used as a test. 11:56 < wrtp> can anyone see why this program doesn't catch the panic? http://pastebin.com/HPw940y0 11:56 < wrtp> at least, it doesn't for me 11:57 < wrtp> it works ok for catching a divide by zero error or another panic. 11:57 < wrtp> i think it's probably a bug, but i wanted to check before posting it. 11:58 < Namegduf> Is a panic occurring? 11:58 < wrtp> yeah, i just get a traceback 11:58 < Namegduf> (If so, no, I can't) 11:58 < Namegduf> Okay, then no idea. 11:58 < wrtp> the defer function isn't invoked 11:59 < exch> hmm weird 11:59 < wrtp> yeah it's a bug, but strange - why should that panic be different to any other 12:00 < wrtp> ? 12:00 < exch> food question 12:00 < exch> *good 12:00 < exch> time for a bugreport I suppose 12:01 -!- virtualsue [~chatzilla@nat/cisco/x-iwwegbywotpbqcts] has quit [Ping timeout: 276 seconds] 12:03 < wrtp> issue 1349 12:03 < exch> Any other panic() in that loop is intercepted just fine 12:03 < wrtp> yup 12:03 < wrtp> it's weird 12:04 < wrtp> i suppose it may be that the panic is being raised in a different goroutine or something 12:05 < exch> Is it possible that pushing the value into the channel actually happens in another thread? 12:05 < exch> doh 12:05 < wrtp> :-) 12:06 < wrtp> but no, the stack trace clearly shows my program calling send which calls runtime.throw 12:16 -!- xash [~xash@p548E44F7.dip.t-dialin.net] has quit [Ping timeout: 260 seconds] 12:22 < hokapoka_> Is there away to tell time.Parse to ignore segments of a string? for example from the string "2010-12-15T03:56:26.650Z" I'm splitting on "." and then using : t, _ := time.Parse( "2006-01-02T15:04:05", "2010-12-15T03:56:26" ) 12:23 < hokapoka_> Is there anyway I can pass the entire string to the time.Parse function w.o having to split it before parsing it. 12:34 -!- InaVegt [~InaVegt@dsl-087-195-206-242.solcon.nl] has joined #go-nuts 12:34 < InaVegt> Hey 12:40 < wrtp> hokapoka_: i doubt it 12:40 < wrtp> hokapoka_: mind you, it might be nice if Time contained a Nanoseconds field 12:41 < InaVegt> Still no reasonable windows implementation of Go, I assume? 12:42 < wrtp> InaVegt: there are at least two implementations of go under windows, but i'm not sure of the actual status of either 12:43 -!- DarthShrine [~angus@pdpc/supporter/student/DarthShrine] has quit [Quit: DarthShrine] 12:44 < wrtp> InaVegt: (you might not know about this: http://newquistsolutions.com/blog/about/) 12:47 < InaVegt> wrtp, not available for the general public, however. 12:47 -!- Project_2501 [~Marvin@82.84.67.223] has quit [Quit: E se abbasso questa leva che succ...] 12:51 < wrtp> InaVegt: you're right - i had assumed the beta was available to all 12:52 < wrtp> InaVegt: you could try the main go windows port - they seem to be making progress, but i don't know how much more they've got left to do. 12:58 < InaVegt> Apparently not a whole lot I'll be using. 13:00 < InaVegt> I can probably use this until erGo goes live. 13:03 < InaVegt> erGo seems like it'll make for very neat wrapping of Windows APIs, though. That's good to see. 13:04 -!- sacho [~sacho@90.154.204.70] has quit [Ping timeout: 265 seconds] 13:07 -!- skejoe [~skejoe@188.114.142.162] has joined #go-nuts 13:08 -!- temoto [~temoto@81.19.91.15] has left #go-nuts ["Leaving"] 13:10 -!- niemeyer [~niemeyer@201-2-134-72.pltce701.dsl.brasiltelecom.net.br] has quit [Ping timeout: 240 seconds] 13:10 -!- sacho [~sacho@95-42-99-173.btc-net.bg] has joined #go-nuts 13:16 -!- ildorn [~ildorn@dslb-188-105-112-017.pools.arcor-ip.net] has joined #go-nuts 13:25 -!- zozoR [~zozoR@56346ed3.rev.stofanet.dk] has joined #go-nuts 13:25 -!- gnuvince [~vince@64.235.203.1] has quit [Quit: ""] 13:37 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts 13:51 -!- sacho_ [~sacho@95-42-119-153.btc-net.bg] has joined #go-nuts 13:51 -!- zozoR [~zozoR@56346ed3.rev.stofanet.dk] has quit [Ping timeout: 255 seconds] 13:53 -!- sacho [~sacho@95-42-99-173.btc-net.bg] has quit [Disconnected by services] 13:53 -!- zozoR [~zozoR@56346ed3.rev.stofanet.dk] has joined #go-nuts 14:01 -!- arun [~arun@unaffiliated/sindian] has quit [Ping timeout: 260 seconds] 14:02 -!- sauerbraten [~sauerbrat@p508CE743.dip.t-dialin.net] has joined #go-nuts 14:03 -!- artefon [~thiago@189.26.238.4] has quit [Quit: bye] 14:08 -!- Nitro [~Nitro@unaffiliated/nitro] has quit [Quit: Leaving] 14:12 -!- virtualsue [~chatzilla@nat/cisco/x-xqevuetbbrgxldeo] has joined #go-nuts 14:14 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts 14:24 -!- foocraft [~dsc@78.101.153.252] has joined #go-nuts 14:28 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has quit [Quit: Leaving.] 14:32 -!- plainhao [~plainhao@208.75.85.237] has joined #go-nuts 14:33 < hokapoka_> wrtp: I'm a bit delayed here. but yeah adding nanoseconds would fix my string -> time.Time conversion w/o having to slice up the string. 14:34 < wrtp> i don't know what standard formats there are though 14:34 < hokapoka_> I only found them by looking at the source for time 14:34 < wrtp> time.Parse( "2006-01-02T15:04:05.999", "2010-12-15T03:56:26.234" ) 14:34 -!- arun [~arun@unaffiliated/sindian] has joined #go-nuts 14:35 < wrtp> i mean standard formats that have sub-second times in 14:35 < wrtp> you've obviously got one. 14:35 < hokapoka_> From here: http://golang.org/src/pkg/time/format.go#L48 14:35 < hokapoka_> oic 14:37 < hokapoka_> The time format is comming from one of google's apis, they all appear to have that time format in their JSON data. 14:37 < wrtp> go time format doesn't currently support sub-second times 14:37 < wrtp> that's interesting 14:37 < wrtp> that's a good use case 14:37 < hokapoka_> yes, I thought that was the case. 14:37 < hokapoka_> indeed 14:38 < hokapoka_> I just wanted to beable to pass the string and tell it to ignore the ".999Z" suffix 14:40 < wrtp> it would be better if it parsed it 14:41 < wrtp> why don't you suggest it in golang-dev? 14:41 < wrtp> it would not be a hard change to make 14:41 < wrtp> mention that it's a standard google format 14:41 < hokapoka> aye 14:42 -!- iant [~iant@67.218.107.78] has joined #go-nuts 14:42 -!- mode/#go-nuts [+v iant] by ChanServ 14:42 < hokapoka> Moreover, it would be better if the json Unmarshal func would parse the the value into a time.Time type. 14:43 < hokapoka> ATM I'm having to unmarshal the data and then reparse the date strings into Time types where I need them. 14:45 < Namegduf> hokapoka: time.Time would need to implement the json.Unmarshaller interface 14:46 < Namegduf> From your perspective, an option would be to wrap time.Time in your own type, which does implement that interface. 14:46 < wrtp> yup 14:46 < wrtp> it's easy to do 14:47 < Namegduf> Maybe you could make time.Time an anonymous field of your type, which should make your type behave like it but extended. 14:47 < Namegduf> I think. 14:47 < Namegduf> It isn't something I've done a great deal with. 14:47 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 250 seconds] 14:49 < hokapoka> Namegduf: okay, thanks for the suggestion. I'll look into inplymenting the unmarshaller interface. 14:50 < hokapoka> Still, you would have thought that if the date format is standard for JSON it would Unmarshal it correctally. 14:50 -!- zozoR [~zozoR@56346ed3.rev.stofanet.dk] has quit [Read error: Operation timed out] 14:51 < Namegduf> It'd make the json package dependent on the time package 14:51 < Namegduf> But still sounds reasonable 14:56 < plexdev> http://is.gd/iN6Rw by [Anthony Martin] in go/test/bench/ -- test/bench: a couple fixes to timing.sh 14:56 -!- Jacek [d4bd2304@gateway/web/freenode/ip.212.189.35.4] has quit [Quit: Page closed] 15:01 -!- artefon [~thiago@dhcp16.usuarios.dcc.ufmg.br] has joined #go-nuts 15:01 -!- zozoR [~zozoR@56346ed3.rev.stofanet.dk] has joined #go-nuts 15:05 -!- snearch [~snearch@f053007132.adsl.alicedsl.de] has joined #go-nuts 15:09 -!- artefon [~thiago@dhcp16.usuarios.dcc.ufmg.br] has quit [Quit: bye] 15:10 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts 15:12 -!- femtoo [~femto@95-89-196-233-dynip.superkabel.de] has joined #go-nuts 15:17 -!- artefon [~thiago@dhcp16.usuarios.dcc.ufmg.br] has joined #go-nuts 15:18 -!- shvntr [~shvntr@113.84.146.107] has quit [Read error: Connection reset by peer] 15:21 -!- shvntr [~shvntr@123.89.87.171] has joined #go-nuts 15:22 -!- snearch [~snearch@f053007132.adsl.alicedsl.de] has quit [Quit: Verlassend] 15:26 -!- jnwhiteh_ [~jnwhiteh@li37-84.members.linode.com] has quit [Remote host closed the connection] 15:27 < wrtp> hokapoka: http://pastebin.com/uFgjttw0 15:29 -!- zozoR [~zozoR@56346ed3.rev.stofanet.dk] has quit [Ping timeout: 276 seconds] 15:30 -!- Nitro [~Nitro@unaffiliated/nitro] has joined #go-nuts 15:57 -!- temoto [~temoto@81.19.91.15] has joined #go-nuts 16:04 < hokapoka> wrtp: sweet, many thanks indeed. 16:06 -!- Venom_X [~pjacobs@99-8-218-190.lightspeed.hstntx.sbcglobal.net] has joined #go-nuts 16:09 -!- iant [~iant@67.218.107.78] has quit [Quit: Leaving.] 16:10 < temoto> I declared a custom type alias type MuhId int how to cast int variable to this type? 16:11 -!- awidegreen [~quassel@c-eacae555.08-2-73746f39.cust.bredbandsbolaget.se] has joined #go-nuts 16:13 < temoto> MuhId(i) works 16:13 -!- temoto [~temoto@81.19.91.15] has left #go-nuts ["Leaving"] 16:20 < wrtp> hokapoka: it's actually simpler than that - i was stupid. see my reply on the list. 16:32 -!- temoto [~temoto@81.19.91.15] has joined #go-nuts 16:32 < hokapoka> wrtp: oh sweet, yes I was going to say that you can use the Unmarshal methods directally. 16:33 -!- iant [~iant@nat/google/x-furkvgrqhykmpdwy] has joined #go-nuts 16:33 -!- mode/#go-nuts [+v iant] by ChanServ 16:33 < hokapoka> So I've modified the UnmarshalJSON() in the error handler to split the string and then re-parse, but I'm not liking how I'm removeing the .XXXZ suffix. 16:35 < temoto> json.Marshal works with custom struct type. How to make it work with map[int]CustomType ? 16:36 < wrtp> temoto: just implement a MarshalJSON method on CustomType 16:37 < wrtp> hokapoka: strings.TrimRight? 16:37 < hokapoka> http://pastebin.com/j8jRVBLa 16:37 < hokapoka> I've used string.Split(s, ".", -1) 16:37 < wrtp> naah, better to use TrimRight - it works from the right. 16:37 < hokapoka> great. 16:38 < wrtp> or just do it yourself - it's pretty trivial 16:38 -!- kanru [~kanru@118-160-164-24.dynamic.hinet.net] has joined #go-nuts 16:39 < hokapoka> wrtp: I noticed that os.Error returns the actualy message : parsing time "2010-12-15T03:56:26.650Z": extra text: .650Z 16:39 < hokapoka> wondered if it was possible to use that in some way. 16:40 < hokapoka> Either way I must be being retarted, how do I just do a regular substring? 16:41 < hokapoka> s[0:i] // where i is the point I want to substring at 16:42 <+iant> s[i:] ? 16:42 <+iant> not sure what you are asking 16:46 < hokapoka> iant: it's okay, I knew it was trivial to generate substrings but I was ahving a mental block, then I remembered. 16:46 < wrtp> hokapoka s = string.TrimRight(s, "Z"); s = string.TrimRight(s, "0123456789"); s = string.TrimRight(s, ".") 16:46 < hokapoka> http://pastebin.com/KyFqwg64 16:46 < wrtp> job done 16:46 < hokapoka> I've done this: 16:46 < wrtp> that's probably better 16:46 < hokapoka> if i := strings.LastIndex(s,"."); i != -1 { t, err = time.Parse(Fmt, s[0:i]) } 16:47 < hokapoka> brilliant. 16:47 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts 16:48 < hokapoka> Only thing now, I have to use (time.Time)(foo.T).Format(...) rather than foo.T.Format(...) 16:51 -!- fabled [~fabled@mail.fi.jw.org] has quit [Quit: Ex-Chat] 16:51 < temoto> wrtp, MarshalJSON for CustomType never gets called and i still get json: unsupported type: map[int] main.MuhState 16:56 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts 16:56 < temoto> I found that json package docs requires map keys to be strings. 16:57 < wrtp> that's true, but that's not what you were asking for. 16:57 < wrtp> oh wait 16:58 < temoto> If i make map[string]MuhState, it works w/o custom MarshalJSON. 16:59 < wrtp> it works fine for me 16:59 < wrtp> paste some code that doesn't work for you? 17:00 < wrtp> s/\?// 17:00 -!- femtoo [~femto@95-89-196-233-dynip.superkabel.de] has quit [Read error: Connection reset by peer] 17:01 < plexdev> http://is.gd/iNpgF by [Russ Cox] in 30 subdirs of go/ -- remove nacl 17:01 < plexdev> http://is.gd/iNph1 by [Eoghan Sherry] in go/lib/codereview/ -- codereview: keep quiet when not in use 17:01 < plexdev> http://is.gd/iNpi0 by [Adam Langley] in 3 subdirs of go/src/pkg/ -- crypto/tls: support CBC ciphers 17:01 -!- artefon [~thiago@dhcp16.usuarios.dcc.ufmg.br] has quit [Quit: bye] 17:02 < wrtp> temoto: here's some code that works with maps and custom json marshallers: http://pastebin.com/4JpTF4fn 17:04 < temoto> http://paste.ly/2nXG 17:05 < temoto> i entered it in live compile on golang site 17:06 < temoto> Custom types are great, but they don't allow to use int as map key. 17:07 -!- shvntr [~shvntr@123.89.87.171] has quit [Quit: leaving] 17:08 < hokapoka> temoto: temoto is it somethin todo with int are assumed to be arrays in json? 17:09 < hokapoka> Try to make it []CustomType see if that's works? 17:09 -!- sauerbraten [~sauerbrat@p508CE743.dip.t-dialin.net] has quit [Remote host closed the connection] 17:09 < temoto> AFAIK, JSON doesn't distinguish arrays and objects. Arrays are just map[int]. 17:09 < Namegduf> Eh? 17:09 < Namegduf> No. 17:10 < Namegduf> JSON does distinguish arrays and objects. 17:10 < Namegduf> And they turn into slices. 17:10 < Namegduf> I think. JSON definitely distinguishes arrays and objects. 17:11 < Namegduf> Arrays are ["blah","blah2"] and objects are {"name":"blah", "name2":"blah2"} 17:11 < temoto> Of course []CustomType will work. map[string]CustomType works too. But i need something like this on output: {12: foo, 23: bar} 17:12 < temoto> Namegduf, right, i'm confusing JSON and Javascript. 17:12 < wrtp> temoto: int isn't allowed as a map key in json 17:12 < wrtp> see www.json.org 17:15 < temoto> Okay, i had wrong expectations then. 17:15 < temoto> Thanks. 17:19 < nsf> uhm.. nacl support is removed from Go? why? 17:20 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:6190:c403:75db:d075] has joined #go-nuts 17:20 < nsf> of course there is no know users 17:20 < exch> hmm 17:20 < nsf> because it wasn't released yet 17:20 < exch> possibly cos nacl itself isn't quite finished 17:20 -!- Venom_X [~pjacobs@99-8-218-190.lightspeed.hstntx.sbcglobal.net] has quit [Quit: Venom_X] 17:20 < nsf> when it will be in upstream chromium there will be users 17:21 < exch> freebsd is also consistently broken it seems 17:21 < exch> Maintainers are off on hiliday? :p 17:21 < exch> s/hil/hol/ 17:22 -!- ildorn [~ildorn@dslb-188-105-112-017.pools.arcor-ip.net] has quit [Ping timeout: 276 seconds] 17:26 -!- saschpe [~quassel@opensuse/member/saschpe] has joined #go-nuts 17:27 -!- fabled [~fabled@83.145.235.194] has joined #go-nuts 17:32 -!- exch [~exch@h78233.upc-h.chello.nl] has quit [Quit: hmmm] 17:35 -!- exch [~exch@h78233.upc-h.chello.nl] has joined #go-nuts 17:37 -!- artefon [~thiago@dhcp16.usuarios.dcc.ufmg.br] has joined #go-nuts 17:39 < temoto> How to set stdout bufferring mode? 17:39 < temoto> Is it buffered at all? 17:40 < exch> it is always buffered 17:40 -!- wrtp [~rog@92.17.39.62] has quit [Quit: wrtp] 17:40 -!- Tv [~tv@cpe-76-168-227-45.socal.res.rr.com] has joined #go-nuts 17:40 < exch> If you want unbuffered stdin/out, you will probably have to do some syscall magic 17:40 < temoto> I want line-buffered mode. 17:41 < exch> stdin is line buffered by default 17:41 < temoto> stdout? 17:42 < exch> should be as well, but tbh, I have never checked of it is 17:43 < exch> If it isn't, you will probably have to direct output to your own buffering routine and only flush to stdout when a line is complete 17:44 < temoto> Can't i control buffer size as well? 17:45 < exch> In your own buffer routine, sure. have a look at http://golang.org/pkg/bufio/ 17:45 < temoto> No, i mean in os.Stdout.Write 17:46 < exch> Write() just writes whatever you give to it 17:46 -!- iant [~iant@nat/google/x-furkvgrqhykmpdwy] has quit [Ping timeout: 260 seconds] 17:51 -!- cco3 [~conley@c-69-181-138-209.hsd1.ca.comcast.net] has joined #go-nuts 17:52 -!- xash [~xash@d142043.adsl.hansenet.de] has joined #go-nuts 17:58 -!- femtoo [~femto@95-89-196-233-dynip.superkabel.de] has joined #go-nuts 17:59 < nsf> exch: imho it is always unbuffered 17:59 < nsf> in Go 17:59 -!- iant [~iant@nat/google/x-skgkabbbygbxefzh] has joined #go-nuts 17:59 -!- mode/#go-nuts [+v iant] by ChanServ 17:59 < nsf> maybe I'm wrong though 18:00 -!- jnwhiteh [~jnwhiteh@WoWUIDev/WoWI/Featured/Dongle/cladhaire] has joined #go-nuts 18:00 -!- cco3 [~conley@c-69-181-138-209.hsd1.ca.comcast.net] has quit [Ping timeout: 250 seconds] 18:01 < exch> stdout you mean? 18:02 < nsf> yes 18:02 < exch> it's possible. I really have no idea 18:03 < nsf> os.File's Write calls syscall.Write directly 18:04 < nsf> and if one wants it buffered, you use bufio 18:04 < nsf> although it doesn't call Flush automatically 18:04 < nsf> on line breaks etc. 18:04 < nsf> like C lib does 18:07 -!- keithcascio [~keithcasc@nat/google/x-pdhorcybrxipaswg] has joined #go-nuts 18:11 -!- kanru [~kanru@118-160-164-24.dynamic.hinet.net] has quit [Read error: Operation timed out] 18:14 -!- ildorn [~ildorn@dslb-188-105-112-017.pools.arcor-ip.net] has joined #go-nuts 18:14 -!- ildorn [~ildorn@dslb-188-105-112-017.pools.arcor-ip.net] has quit [Client Quit] 18:33 < plexdev> http://is.gd/iNE9I by [Eoghan Sherry] in go/src/pkg/math/ -- math: change float64 bias constant from 1022 to 1023 18:37 < temoto> So Write is what i need, thanks nsf. 18:37 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-179-72.clienti.tiscali.it] has joined #go-nuts 18:44 -!- skelterjohn [~jasmuth@c-71-230-156-50.hsd1.nj.comcast.net] has joined #go-nuts 18:46 -!- gmilleramilar [~gmiller@184-106-207-119.static.cloud-ips.com] has left #go-nuts [] 18:48 -!- cco3 [~conley@c-69-181-138-209.hsd1.ca.comcast.net] has joined #go-nuts 18:51 -!- ildorn [~ildorn@dslb-188-105-112-017.pools.arcor-ip.net] has joined #go-nuts 18:56 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-179-72.clienti.tiscali.it] has quit [Quit: E se abbasso questa leva che succ...] 18:58 -!- nictuku [~nictuku@cetico.org] has quit [Ping timeout: 245 seconds] 18:59 -!- virtualsue [~chatzilla@nat/cisco/x-xqevuetbbrgxldeo] has quit [Ping timeout: 250 seconds] 19:00 -!- pingveno [~pingveno@c-98-246-133-8.hsd1.or.comcast.net] has quit [Read error: Connection reset by peer] 19:01 -!- pingveno [~pingveno@c-98-246-133-8.hsd1.or.comcast.net] has joined #go-nuts 19:04 < plexdev> http://is.gd/iNJhN by [Adam Langley] in go/src/pkg/crypto/tls/ -- crypto/tls: commit fixes which I hadn't saved. 19:08 -!- adu [~ajr@64.134.240.174] has joined #go-nuts 19:13 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts 19:30 -!- femtoo [~femto@95-89-196-233-dynip.superkabel.de] has quit [Read error: Connection reset by peer] 19:30 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-179-72.clienti.tiscali.it] has joined #go-nuts 19:42 -!- nettok [~quassel@200.119.153.64] has joined #go-nuts 19:48 -!- tvw [~tv@212.79.9.150] has quit [Remote host closed the connection] 19:49 -!- skelterjohn [~jasmuth@c-71-230-156-50.hsd1.nj.comcast.net] has quit [Quit: skelterjohn] 19:53 -!- DarthShrine [~angus@60-242-109-62.tpgi.com.au] has joined #go-nuts 19:53 -!- DarthShrine [~angus@60-242-109-62.tpgi.com.au] has quit [Changing host] 19:53 -!- DarthShrine [~angus@pdpc/supporter/student/DarthShrine] has joined #go-nuts 20:03 -!- cbeck [cbeck@gateway/shell/pdx.edu/x-uqchmyrixmrutwpm] has quit [Read error: Connection reset by peer] 20:04 -!- fluffle [~camelid@s.pl0rt.org] has quit [Read error: Connection reset by peer] 20:04 -!- cbeck [cbeck@gateway/shell/pdx.edu/x-lmmooazlphextrpe] has joined #go-nuts 20:04 -!- fluffle [~camelid@s.pl0rt.org] has joined #go-nuts 20:05 -!- bnjmn [~bnjmn@siegel.dreamhost.com] has joined #go-nuts 20:07 -!- illya77 [~illya77@163-100-133-95.pool.ukrtel.net] has joined #go-nuts 20:10 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has quit [Ping timeout: 624 seconds] 20:10 -!- artefon [~thiago@dhcp16.usuarios.dcc.ufmg.br] has quit [Ping timeout: 276 seconds] 20:10 -!- lmoura [~lauromour@187.59.122.14] has quit [Ping timeout: 245 seconds] 20:12 -!- lmoura [~lauromour@187.59.122.14] has joined #go-nuts 20:12 -!- watr_ [~watr@66.183.100.58] has joined #go-nuts 20:14 -!- illya77 [~illya77@163-100-133-95.pool.ukrtel.net] has quit [Read error: Connection reset by peer] 20:15 -!- tav [~tav@92.7.92.103] has quit [Ping timeout: 245 seconds] 20:17 -!- plainhao [~plainhao@208.75.85.237] has quit [Remote host closed the connection] 20:19 -!- gnuvince [~vince@64.235.203.1] has joined #go-nuts 20:21 -!- tav [~tav@92.7.71.177] has joined #go-nuts 20:22 -!- alexis [~alexis@lolnet.org] has left #go-nuts [] 20:29 -!- pothos [~pothos@111-240-205-247.dynamic.hinet.net] has quit [Read error: Connection reset by peer] 20:29 -!- ExtraSpice [~XtraSpice@88.118.33.48] has quit [Read error: Connection reset by peer] 20:31 -!- pothos [~pothos@111-240-210-81.dynamic.hinet.net] has joined #go-nuts 20:40 < temoto> Is for _ = range ch {} a proper idiom to wait until channel is exhausted? 20:41 <+iant> that will wait until the channel is explicitly closed 20:41 <+iant> it is fine for that 20:42 < temoto> Oh that explains why i had some deadlocks before. 20:43 < kimelto> you still have to manage the closed() logic in a select() right? or is select aware of closed channels and does not re try to read from them? 20:43 -!- Fish- [~Fish@9fans.fr] has joined #go-nuts 20:44 <+iant> there can't be anything to read from a closed channel in a select, so that case will never be selected 20:44 <+iant> I mean, assuming you have read all the buffered data 20:45 < temoto> How to properly write this: spawn N threads, wait until all are completed? 20:45 < nsf> temoto: in Go there are no threads :) 20:45 <+iant> have each goroutine write to a channel, wait until you have received N pieces of data 20:46 < temoto> for done_count < N { <-done_ch } ? 20:46 -!- skejoe [~skejoe@188.114.142.162] has quit [Quit: Lost terminal] 20:46 <+iant> something like that, sure 20:46 < nsf> temoto: yeah 20:46 < temoto> Thanks. 20:46 -!- tvw [~tv@e176003040.adsl.alicedsl.de] has joined #go-nuts 20:46 < nsf> but these are goroutines, not threads 20:47 < temoto> nsf, is there a conceptual difference? 20:47 < nsf> yes 20:47 < temoto> What is it? 20:47 < nsf> well, conceptual no 20:47 < temoto> Okay. 20:47 < nsf> practical - yes 20:47 < temoto> What is practical one? 20:48 < nsf> goroutines are scheduled by go runtime and not by underlying OS 20:48 < temoto> Well i didn't say OS threads either. 20:48 < nsf> ok then 20:49 < kimelto> what is the proper strategy to exit a for{} loop in case that all channels of a select have been closed? 20:49 < temoto> O_O 20:50 < kimelto> iant: the spec talk about nil channel, not closed channel. 20:50 < temoto> kimelto, break? 20:50 < kimelto> and closed channels return zero... 20:51 <+iant> kimelto: you're right, I may be confused 20:51 < kimelto> temoto: right, but the question is on which condition to break 20:51 < temoto> kimelto, select {...} break 20:52 <+iant> kimelto: select does return closed channels as ready 20:52 <+iant> so I guess the case has to consider that possibility 20:52 -!- dju [dju@fsf/member/dju] has quit [Quit: Quitte] 20:52 < kimelto> iant: so I wonder if you have to test for closed() in a case statement, if true nil the channel so it wont execute this case again 20:52 < temoto> kimelto, with continue in each other select branch 20:52 < InaVegt> Hrm... is Go interoperable with GWT? 20:53 <+iant> kimelto: yes, something like that 20:54 < kimelto> temoto: you mean for { select {...} break } ? that's a do {..} while(0) loop! 20:55 < temoto> kimelto, read previous my line 20:55 -!- nictuku [~nictuku@cetico.org] has joined #go-nuts 20:55 < nsf> iant: can you say something about Go's GC, is there any real work is going in that direction? 20:56 < kimelto> temoto: oh! right. 20:56 < temoto> kimelto, but that's ugly you see :) 20:56 -!- Venom_X [~pjacobs@99-8-218-190.lightspeed.hstntx.sbcglobal.net] has joined #go-nuts 20:56 <+iant> nsf: yes, rsc is working on it 20:56 < nsf> I see, thanks 20:59 -!- saschpe [~quassel@opensuse/member/saschpe] has quit [Remote host closed the connection] 21:00 -!- ExtraSpice [~XtraSpice@88.118.33.48] has joined #go-nuts 21:01 < kimelto> temoto: http://pastebin.com/DAhGRM7d or http://pastebin.com/DyJi5iue - which one's the less ugly ? :-) 21:02 < temoto> kimelto, oh boy 21:02 < kimelto> :/ 21:03 < temoto> kimelto, i don't think you need to nil channels in continue/break variant 21:04 < kimelto> the point is that a closed channel always return zero. 21:04 < temoto> Don't close then? 21:04 < temoto> http://pastebin.com/3dAWT70Q 21:06 < kimelto> if I dont close there'll always be stuff to do so I dont have to break anymore :) 21:07 -!- adu [~ajr@64.134.240.174] has quit [Quit: adu] 21:09 < temoto> ahh i forgot 21:09 < temoto> select {case ..., case ..., default: break} 21:11 < kimelto> default: is for non-blocking select, isnt it? 21:11 < kimelto> I mean, if select would block, it executes default 21:11 < temoto> yup 21:12 < temoto> Isn't that what you wanted? 21:12 -!- gr0gmint [~quassel@87.60.23.38] has joined #go-nuts 21:12 < temoto> Should stop when all channels are empty. 21:13 < temoto> they have to be buffered at first, though 21:15 -!- wrtp [~rog@92.17.39.62] has joined #go-nuts 21:19 -!- foocraft [~dsc@78.101.153.252] has quit [Read error: Operation timed out] 21:21 < kimelto> but maybe am I not thinking the "go way"? cause I want to close the channel when my pool of workers has done its job. so I know that its finnished. 21:23 -!- Project-2501 [~Marvin@82.84.98.33] has joined #go-nuts 21:23 < temoto> I guess i'm not thinking go-way either. 21:24 < temoto> The only reason why i would want to close channel is to end for item := range channel {} loop 21:25 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3] 21:26 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:6190:c403:75db:d075] has quit [Quit: Leaving.] 21:26 < kimelto> that works like a charm when you only have 1 channel. one trick may be to have one goroutine per channel which does the range channel stuff? 21:26 < kimelto> silly. 21:26 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-179-72.clienti.tiscali.it] has quit [Ping timeout: 272 seconds] 21:31 < temoto> Well not too bad actually. 21:32 < temoto> IMO 21:32 < temoto> It may even look sane enough, wanna try? 21:33 -!- artefon [~thiago@189.26.238.4] has joined #go-nuts 21:33 -!- foocraft [~dsc@89.211.165.246] has joined #go-nuts 21:34 -!- tensorpudding [~user@99.148.202.191] has joined #go-nuts 21:34 -!- ildorn [~ildorn@dslb-188-105-112-017.pools.arcor-ip.net] has quit [Quit: Leaving.] 21:38 -!- artefon [~thiago@189.26.238.4] has quit [Ping timeout: 240 seconds] 21:41 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 265 seconds] 21:41 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts 21:45 -!- tav [~tav@92.7.71.177] has quit [Ping timeout: 240 seconds] 21:49 -!- Eridius [~kevin@unaffiliated/eridius] has joined #go-nuts 21:51 -!- Nitro [~Nitro@unaffiliated/nitro] has quit [Quit: This computer has gone to sleep] 21:51 -!- artefon [~thiago@187.59.187.20] has joined #go-nuts 21:51 -!- tav [~tav@92.7.114.67] has joined #go-nuts 21:54 -!- virtualsue [~chatzilla@2001:470:92f1:0:226:bbff:fe10:3d1a] has joined #go-nuts 21:59 -!- Project-2501 [~Marvin@82.84.98.33] has quit [Quit: E se abbasso questa leva che succ...] 22:01 -!- nettok [~quassel@200.119.153.64] has quit [Ping timeout: 276 seconds] 22:19 -!- Fish- [~Fish@9fans.fr] has quit [Quit: So Long, and Thanks for All the Fish] 22:23 < plexdev> http://is.gd/iOdzi by [Russ Cox] in 5 subdirs of go/src/ -- fix freebsd build 22:26 -!- ildorn [~ildorn@dslb-188-105-112-017.pools.arcor-ip.net] has joined #go-nuts 22:27 -!- fenicks [~christian@log77-3-82-243-254-112.fbx.proxad.net] has joined #go-nuts 22:37 -!- gr0gmint [~quassel@87.60.23.38] has quit [Remote host closed the connection] 22:37 < xash> When I have to goroutines with for { <- access; ...; access <- 1 } they shouldn't be able to access the data in ... at the same time, right? 22:37 <+iant> right 22:38 <+iant> (assuming access is a synchronous channel which does not have a buffer) 22:39 < xash> Exactly .. Then I have to search the error at another place, thanks :-) 22:43 -!- awidegreen [~quassel@c-eacae555.08-2-73746f39.cust.bredbandsbolaget.se] has quit [Remote host closed the connection] 22:44 -!- watr_ [~watr@66.183.100.58] has quit [Ping timeout: 240 seconds] 22:45 < KBme> well, depends, if you pass copies you can 22:45 < KBme> (i.e. not pointers) 22:49 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit: Verlassend] 22:51 -!- Venom_X [~pjacobs@99-8-218-190.lightspeed.hstntx.sbcglobal.net] has quit [Quit: Venom_X] 22:52 -!- Wiz126 [Wiz@h62.126.232.68.ip.windstream.net] has quit [Quit: EOF] 22:55 -!- Method [~Method@unaffiliated/method] has quit [Remote host closed the connection] 23:06 -!- wrtp [~rog@92.17.39.62] has quit [Quit: wrtp] 23:09 < plexdev> http://is.gd/iOlak by [Russ Cox] in go/src/cmd/5l/ -- 5l: fix arm build 23:12 -!- ildorn [~ildorn@dslb-188-105-112-017.pools.arcor-ip.net] has quit [Ping timeout: 240 seconds] 23:13 -!- fabled [~fabled@83.145.235.194] has quit [Read error: Operation timed out] 23:18 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts 23:22 -!- Kashia [~Kashia@port-92-200-39-124.dynamic.qsc.de] has joined #go-nuts 23:41 -!- virtualsue [~chatzilla@2001:470:92f1:0:226:bbff:fe10:3d1a] has quit [Ping timeout: 260 seconds] 23:43 -!- DarthShrine [~angus@pdpc/supporter/student/DarthShrine] has quit [Quit: DarthShrine] 23:45 -!- skelterjohn [~jasmuth@c-68-45-238-234.hsd1.nj.comcast.net] has joined #go-nuts 23:51 -!- Nitro [~Nitro@unaffiliated/nitro] has joined #go-nuts 23:52 -!- rlab [~Miranda@91.200.158.34] has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org] 23:55 -!- LeNsTR [~lenstr@unaffiliated/lenstr] has joined #go-nuts 23:56 < plexdev> http://is.gd/iOsyL by [Alex Brainman] in go/src/pkg/ -- build: add another --no-print-directory 23:56 -!- watr_ [~watr@66.183.100.58] has joined #go-nuts --- Log closed Thu Dec 16 00:00:01 2010