Go Language Resources Go, golang, go... NOTE: This page ceased updating in October, 2012

--- Log opened Thu Dec 17 00:00:33 2009
00:01 < skelterjohn> something like python's "from X import Y as Z", where X
has information about the template arguments.  then you wouldn't have to type
extra garbage when you wrote Z
00:06 -!- scarabx [n=scarabx@c-24-147-239-120.hsd1.ma.comcast.net] has joined
#go-nuts
00:08 -!- DerHorst_ [n=Horst@e176111210.adsl.alicedsl.de] has joined #go-nuts
00:08 -!- XniX23 [n=XniX23@89-212-10-29.dynamic.dsl.t-2.net] has quit [Remote
closed the connection]
00:09 -!- rbohn [n=rbohn@192.206.100.4] has quit ["ChatZilla 0.9.86 [Firefox
3.0.15/2009101601]"]
00:10 -!- rog [n=rog@78.147.220.142] has quit []
00:13 -!- r2p2 [n=billy@v32671.1blu.de] has left #go-nuts []
00:16 < taruti> skelterjohn: import "x"; var Z = x.Y;
00:16 < skelterjohn> suppose that works, heh
00:17 -!- adiabatic [n=adiabati@dsl-206-55-130-248.tstonramp.com] has joined
#go-nuts
00:17 -!- adiabatic [n=adiabati@dsl-206-55-130-248.tstonramp.com] has quit [Client
Quit]
00:23 -!- fgb [n=fgb@190.246.85.45] has quit [Read error: 54 (Connection reset by
peer)]
00:23 -!- franksalim [n=frank@adsl-76-221-202-115.dsl.pltn13.sbcglobal.net] has
quit ["Ex-Chat"]
00:23 -!- DerHorst [n=Horst@e176104073.adsl.alicedsl.de] has quit [Read error: 110
(Connection timed out)]
00:25 -!- Raziel2p [n=Raziel2p@ti0032a380-dhcp0316.bb.online.no] has joined
#go-nuts
00:26 -!- lotrpy [n=lotrpy@202.38.97.230] has joined #go-nuts
00:29 -!- scarabx [n=scarabx@c-24-147-239-120.hsd1.ma.comcast.net] has quit ["This
computer has gone to sleep"]
00:33 -!- Associat0r [n=Associat@h163153.upc-h.chello.nl] has quit []
00:39 -!- Rob_Russell [n=chatzill@ip67-152-86-163.z86-152-67.customer.algx.net]
has joined #go-nuts
00:40 -!- leitaox1 [n=leitaox@189.96.209.116] has joined #go-nuts
00:40 -!- Netsplit kornbluth.freenode.net <-> irc.freenode.net quits: mat_,
RooTer
00:41 -!- Netsplit over, joins: RooTer, mat_
00:41 -!- tomestla [n=tom@AToulouse-151-1-103-217.w86-217.abo.wanadoo.fr] has quit
[Read error: 110 (Connection timed out)]
00:42 -!- iant [n=iant@nat/google/x-vplkrrpytswfrjhr] has quit [Read error: 110
(Connection timed out)]
00:43 -!- leitaox1 [n=leitaox@189.96.209.116] has quit [Client Quit]
00:51 -!- iant [n=iant@67.218.102.178] has joined #go-nuts
00:51 -!- mode/#go-nuts [+v iant] by ChanServ
00:55 -!- binaryjohn [n=binaryjo@cpe-24-30-132-50.san.res.rr.com] has quit []
00:55 -!- wobsite [n=ian@pool-96-237-162-24.bstnma.fios.verizon.net] has joined
#go-nuts
00:57 < wobsite> is there an existing library function somewhere to convert
an []int (runes) to a string?  I'm not finding it in the docs, but I've failed to
find other existing functions before.
00:59 -!- kota1111 [n=kota1111@gw2.kbmj.jp] has joined #go-nuts
00:59 < skelterjohn> %v
00:59 < plexdev> http://is.gd/5qA0s by [Robert Griesemer] in
go/src/cmd/gofmt/ -- - Parse expressions as opposed to statements for gofmt
rewrite patterns.
00:59 < skelterjohn> %v uses inspection to use whichever conversion is
appropriate
01:00 <+iant> wobsite: given var v []int, you can say string(v)
01:00 < skelterjohn> if you didn't care about efficiency, i believe you
could use %v for every rune
01:00 < Eridius> iant: that works if v is bytes, not runes, right?
01:00 -!- leitaox [n=leitaox@187.88.168.65] has quit [Read error: 110 (Connection
timed out)]
01:00 < wobsite> thank you.
01:00 < skelterjohn> listening to the dev team is better, i guess
01:00 <+iant> Eridius: it works for both
01:00 < Eridius> iant: it knows that []int is runes and []byte is bytes?
01:00 <+iant> for []byte it converts bytes, for []int it converts runes
01:00 < Eridius> neat
01:00 <+iant> yep
01:01 < skelterjohn> suppose i misinterpreted the question entirely
01:01 -!- Netsplit kornbluth.freenode.net <-> irc.freenode.net quits: mat_,
RooTer
01:01 < skelterjohn> iant: what part of the gc codebase deals with the
garbage collector?
01:01 <+iant> skelterjohn: I think right now all the garbage collector code
is in the runtime; I don't think there is anything in the gc compiler yet
01:02 < skelterjohn> replace "gc" with "go", then
01:03 <+iant> skelterjohn: src/pkg/runtime/mgc0.c
01:03 < skelterjohn> thanks
01:04 -!- fgb [n=fgb@190.246.85.45] has joined #go-nuts
01:04 -!- General1337 [n=support@71-84-247-187.dhcp.gldl.ca.charter.com] has quit
[Read error: 54 (Connection reset by peer)]
01:05 -!- General1337 [n=support@71-84-247-187.dhcp.gldl.ca.charter.com] has
joined #go-nuts
01:05 -!- zeroXten [n=zeroXten@0x10.co.uk] has quit [Read error: 60 (Operation
timed out)]
01:05 -!- zeroXten [n=zeroXten@0x10.co.uk] has joined #go-nuts
01:05 -!- eno_ [n=eno@adsl-70-137-165-81.dsl.snfc21.sbcglobal.net] has joined
#go-nuts
01:06 -!- Netsplit over, joins: RooTer, mat_
01:06 -!- mat_ [n=mat@mx3.absolight.net] has quit [Remote closed the connection]
01:06 -!- mat_ [n=mat@mx3.absolight.net] has joined #go-nuts
01:07 -!- eno [n=eno@nslu2-linux/eno] has quit [Read error: 104 (Connection reset
by peer)]
01:08 -!- Netsplit kornbluth.freenode.net <-> irc.freenode.net quits: mat_,
RooTer
01:08 -!- Netsplit over, joins: mat_, RooTer
01:09 -!- webbpa [n=chatzill@74-92-20-90-NewEngland.hfc.comcastbusiness.net] has
joined #go-nuts
01:09 -!- mbarkhau1 [n=koloss@p54A7EEB3.dip.t-dialin.net] has joined #go-nuts
01:09 -!- mbarkhau1 [n=koloss@p54A7EEB3.dip.t-dialin.net] has quit [Remote closed
the connection]
01:10 -!- wobsite [n=ian@pool-96-237-162-24.bstnma.fios.verizon.net] has quit
[Remote closed the connection]
01:10 -!- Netsplit kornbluth.freenode.net <-> irc.freenode.net quits:
RooTer, mat_
01:10 -!- Netsplit over, joins: mat_, RooTer
01:12 -!- triplez [n=triplez@cm52.sigma225.maxonline.com.sg] has quit []
01:14 -!- Netsplit kornbluth.freenode.net <-> irc.freenode.net quits:
Yappo__, sahazel, soul9, plexdev
01:18 -!- DerHorst_ [n=Horst@e176111210.adsl.alicedsl.de] has quit ["Verlassend"]
01:19 -!- jlouis [i=jlouis@130.225.165.29] has quit [Read error: 60 (Operation
timed out)]
01:20 -!- Netsplit over, joins: soul9, sahazel, plexdev, Yappo__
01:20 -!- rndbot [n=bot@wikipedia/Gracenotes] has joined #go-nuts
01:21 < plexdev> http://is.gd/5qAHs by [Rob Pike] in go/doc/ -- make it more
explicit that design discussions should happen before code reviews
01:23 -!- ffission6 [n=tomgreen@c-76-116-70-202.hsd1.nj.comcast.net] has joined
#go-nuts
01:23 < ffission6> is there currently any xml parse libraries
01:24 < skelterjohn> scan through http://golang.org/pkg/
01:25 -!- mbarkhau [n=koloss@p54A7EF37.dip.t-dialin.net] has quit [Connection
timed out]
01:27 < ffission6> i see xml library but looks more like a tokenizer
01:29 -!- hstimer [n=hans@c-98-234-25-125.hsd1.ca.comcast.net] has joined #go-nuts
01:32 < skelterjohn> it doesn't make DOM trees or anything
01:33 < Ycros> ffission6: it parses xml into structs
01:33 < Eridius> Go is covered under a BSD-style license, yes?
01:33 -!- Xera^ [n=lol@87-194-208-246.bethere.co.uk] has quit [Read error: 54
(Connection reset by peer)]
01:33 -!- Xera^ [n=lol@87.194.208.246] has joined #go-nuts
01:35 < ffission6> ah ok
01:35 < ffission6> can someone explain the syntax and whats going on in line
43, http://github.com/vito/go-play/blob/master/gopaste/controller.go
01:37 < Eridius> did you know you can link to lines?  Add #L43 to that URL
01:37 < Eridius> and what's going on is d has the type interface{}, and it's
being cast to type *callback (callback is a struct)
01:37 -!- Ortzman [n=ortzinat@cpe-065-191-006-129.nc.res.rr.com] has joined
#go-nuts
01:37 < Eridius> (this cast will panic if d is not, in fact, a *callback)
01:38 -!- jb55_ [n=jb55@bas11-kitchener06-2925076894.dsl.bell.ca] has quit [Remote
closed the connection]
01:40 -!- jdp [n=justin@67.82.56.192] has quit [Remote closed the connection]
01:40 < ffission6> d has the type interface{}, where do you see this
01:40 -!- triplez [n=triplez@bb116-14-27-96.singnet.com.sg] has joined #go-nuts
01:41 -!- eno_ [n=eno@adsl-70-137-165-81.dsl.snfc21.sbcglobal.net] has quit
[Remote closed the connection]
01:41 -!- eno [n=eno@70.137.165.81] has joined #go-nuts
01:41 < Eridius> because self.callbacks is a *vector.Vector
01:41 < Eridius> and (*vector.Vector) Data() returns a []interface{}
01:42 < ffission6> hmm
01:42 < ffission6> (*vector.Vector) Data() returns a []interface{} how did
you know that by just looking at the controller code
01:42 -!- skelterjohn [n=jasmuth@c-76-99-92-193.hsd1.nj.comcast.net] has quit []
01:42 < Eridius> because I've been using vectors myself and am familiar with
its interface
01:43 < Eridius> http://golang.org/pkg/container/vector/#Vector.Data
01:43 -!- shardz_ [i=samuel@ilo.staticfree.info] has joined #go-nuts
01:43 -!- laprice_ [n=larry@fremont.zoneverte.org] has joined #go-nuts
01:43 -!- shardz [i=samuel@216.93.243.34] has quit [Remote closed the connection]
01:43 -!- laprice [n=larry@fremont.zoneverte.org] has quit [Remote closed the
connection]
01:44 < ffission6> looking at tha now
01:44 < ffission6> makes sense
01:44 -!- jb55 [n=jb55@bas11-kitchener06-2925076894.dsl.bell.ca] has joined
#go-nuts
01:45 < Eridius> the reason why Vector works on interface{} objects is
because Go has no generics >_<
01:45 -!- carllerche [n=carllerc@99-8-186-86.lightspeed.snfcca.sbcglobal.net] has
quit []
01:45 < Eridius> but it works alright, as long as you're careful with your
types
01:45 < Eridius> and you can always write your own wrapper around Vector
that provides strong typing
01:45 < Eridius> (just like StringVector and IntVector)
01:45 < JBeshir> I'm surprised Go doesn't have a lot more work to avoid
interface{}
01:46 < JBeshir> Because they seem like they skip type safety.
01:46 < Eridius> it's kinda hard without generics
01:46 < JBeshir> I guess so, yeah, generics are the 'real solution' to that.
01:46 < Eridius> I'm perfectly happy that they didn't come up with some
kludge workaround.  This give them the room to introduce a proper Generics later
once they feel like they can do it correctly
01:46 < JBeshir> Yeah, that's better.
01:49 -!- exch [n=nuada@h144170.upc-h.chello.nl] has quit [Read error: 104
(Connection reset by peer)]
01:49 -!- exch [n=nuada@h144170.upc-h.chello.nl] has joined #go-nuts
01:50 -!- smcq__ [n=smcq@c-67-164-97-141.hsd1.ca.comcast.net] has quit [Remote
closed the connection]
01:50 -!- smcq_ [n=smcq@67.164.97.141] has joined #go-nuts
01:50 -!- b00m_chef [n=watr@d64-180-45-230.bchsia.telus.net] has quit [Read error:
60 (Operation timed out)]
01:51 < ffission6> callback := d.(*callback); how is that casting d into
callback?
01:52 < Eridius> that's how you cast interfaces to concrete types
01:52 < Eridius> it's called a type assertion
01:52 < Eridius> http://golang.org/doc/go_spec.html#Type_assertions
01:53 < Eridius> ack, there's a typo on that page...  and I swear I filed a
patch to fix that exact typo a day after go was released...
01:53 < Eridius> yep
01:53 < Eridius> , issue 152092
01:56 < ffission6> interesting
02:00 -!- webbpa [n=chatzill@74-92-20-90-NewEngland.hfc.comcastbusiness.net] has
quit ["ChatZilla 0.9.85 [Firefox 3.5.5/20091109125225]"]
02:01 -!- defectiv [n=clays@75.101.111.19] has quit ["This computer has gone to
sleep"]
02:03 -!- Xera^ [n=lol@87.194.208.246] has quit ["( www.nnscript.com ::
NoNameScript 4.21 :: www.esnation.com )"]
02:03 -!- Ortzinator [n=ortzinat@unaffiliated/ortzinator] has quit [Read error:
110 (Connection timed out)]
02:03 -!- iant [n=iant@67.218.102.178] has quit [Read error: 110 (Connection timed
out)]
02:11 -!- smcq_ [n=smcq@67.164.97.141] has quit [Read error: 110 (Connection timed
out)]
02:17 -!- scarabx [n=scarabx@c-24-147-239-120.hsd1.ma.comcast.net] has joined
#go-nuts
02:21 -!- delsvr [n=delsvr@cpe-24-59-168-135.twcny.res.rr.com] has joined #go-nuts
02:22 -!- scarabx [n=scarabx@c-24-147-239-120.hsd1.ma.comcast.net] has quit [Read
error: 104 (Connection reset by peer)]
02:22 -!- eulenspiegel [n=irssi@p579CA564.dip.t-dialin.net] has quit ["leaving"]
02:23 -!- scarabx [n=scarabx@c-24-147-239-120.hsd1.ma.comcast.net] has joined
#go-nuts
02:26 -!- inittab [n=dlbeer@ip-118-90-107-176.xdsl.xnet.co.nz] has joined #go-nuts
02:27 -!- Intelliware [n=danielb@124-197-59-227.callplus.net.nz] has quit [Read
error: 60 (Operation timed out)]
02:28 -!- eno_ [n=eno@adsl-70-137-153-80.dsl.snfc21.sbcglobal.net] has joined
#go-nuts
02:29 -!- ben [n=v@dslb-088-066-001-104.pools.arcor-ip.net] has joined #go-nuts
02:30 < jessta> `/away
02:33 -!- smooge [n=smooge@int.smoogespace.com] has quit ["-ENOBRAIN"]
02:33 -!- crakrjak [n=merc@rrcs-70-62-156-154.central.biz.rr.com] has joined
#go-nuts
02:34 -!- TankND [n=thomaszi@EV1-DSL-74-83-9-175.fuse.net] has joined #go-nuts
02:40 -!- TankND [n=thomaszi@EV1-DSL-74-83-9-175.fuse.net] has quit [Remote closed
the connection]
02:40 -!- eno [n=eno@nslu2-linux/eno] has quit [Read error: 110 (Connection timed
out)]
02:40 -!- TankND [n=thomaszi@EV1-DSL-74-83-9-175.fuse.net] has joined #go-nuts
02:42 -!- sstangl [n=sean@BERLIN.RES.CMU.EDU] has quit [Remote closed the
connection]
02:42 -!- gl [n=gl@coders.fr] has quit [Remote closed the connection]
02:43 -!- skelterjohn [n=jasmuth@c-76-99-92-193.hsd1.nj.comcast.net] has joined
#go-nuts
02:47 -!- skelterjohn [n=jasmuth@c-76-99-92-193.hsd1.nj.comcast.net] has quit
[Client Quit]
02:48 -!- skelterjohn [n=jasmuth@c-76-99-92-193.hsd1.nj.comcast.net] has joined
#go-nuts
02:50 -!- Alkavan [n=alkavan@87.68.247.236.adsl.012.net.il] has quit ["Leaving"]
02:50 -!- Kibiz0r [n=Adium@adsl-99-35-8-162.dsl.klmzmi.sbcglobal.net] has joined
#go-nuts
02:50 -!- sstangl [n=sean@BERLIN.RES.CMU.EDU] has joined #go-nuts
02:50 -!- gl [n=gl@coders.fr] has joined #go-nuts
02:51 -!- skelterjohn [n=jasmuth@c-76-99-92-193.hsd1.nj.comcast.net] has quit
[Client Quit]
02:52 -!- inittab- [n=dlbeer@ip-118-90-77-105.xdsl.xnet.co.nz] has quit [Read
error: 110 (Connection timed out)]
02:54 -!- stevenyvr [n=schan@76-10-184-108.dsl.teksavvy.com] has quit ["Computer
has gone to sleep"]
02:55 -!- carllerche [n=carllerc@c-69-181-129-204.hsd1.ca.comcast.net] has joined
#go-nuts
03:02 -!- tor7 [n=tor@c-987a71d5.04-50-6c756e10.cust.bredbandsbolaget.se] has quit
[]
03:04 -!- Netsplit kornbluth.freenode.net <-> irc.freenode.net quits: mat_,
RooTer
03:04 -!- Netsplit over, joins: mat_, RooTer
03:05 -!- kanru [n=kanru@61-228-149-169.dynamic.hinet.net] has joined #go-nuts
03:05 -!- Netsplit kornbluth.freenode.net <-> irc.freenode.net quits: mat_,
RooTer
03:06 -!- lolsuper_ [n=super_@unaffiliated/lolsuper-/x-9881387] has quit
["Leaving"]
03:06 -!- lolsuper_ [n=super_@pool-173-65-48-13.tampfl.fios.verizon.net] has
joined #go-nuts
03:07 -!- jlouis [i=jlouis@130.225.165.29] has joined #go-nuts
03:07 -!- Netsplit over, joins: RooTer
03:07 -!- lotrpy [n=lotrpy@202.38.97.230] has quit []
03:08 -!- fgb [n=fgb@190.246.85.45] has quit ["Leaving."]
03:08 -!- Netsplit kornbluth.freenode.net <-> irc.freenode.net quits: RooTer
03:09 -!- mat_ [n=mat@mx3.absolight.net] has joined #go-nuts
03:09 -!- Netsplit over, joins: RooTer
03:10 -!- Rob_Russell [n=chatzill@ip67-152-86-163.z86-152-67.customer.algx.net]
has quit [Read error: 60 (Operation timed out)]
03:12 -!- Netsplit kornbluth.freenode.net <-> irc.freenode.net quits: mat_,
RooTer
03:13 -!- Netsplit over, joins: mat_, RooTer
03:16 -!- [[sroracle]] [n=sroracle@unaffiliated/sroracle] has quit
["<sresp.co.cc>"]
03:21 -!- skelterjohn [n=jasmuth@c-76-99-92-193.hsd1.nj.comcast.net] has joined
#go-nuts
03:29 -!- KillerX [n=anant@gentoo/developer/KillerX] has quit ["Leaving."]
03:29 -!- fgb [n=fgb@190.246.85.45] has joined #go-nuts
03:32 -!- fwiffo [n=fwiffo@unaffiliated/fwiffo] has joined #go-nuts
03:40 -!- path[l] [n=path@115.240.25.37] has joined #go-nuts
03:42 -!- gnuvince [n=vince@70.35.161.58] has quit ["What the fruit is goin' on
here!?"]
03:43 -!- gnuvince [n=vince@72.0.221.201] has joined #go-nuts
03:57 -!- Daminvar [n=Daminvar@129.21.121.159] has joined #go-nuts
03:58 < ffission6> are there classes in Go
04:00 -!- skelterjohn [n=jasmuth@c-76-99-92-193.hsd1.nj.comcast.net] has quit []
04:00 -!- fosho [n=afitz@adsl-190-196-36.asm.bellsouth.net] has joined #go-nuts
04:03 -!- exitstate [n=xorl@xorl.xen.prgmr.com] has quit [Read error: 60
(Operation timed out)]
04:04 -!- exitstate [n=xorl@xorl.xen.prgmr.com] has joined #go-nuts
04:05 -!- Rob_Russell [n=chatzill@ip67-152-86-163.z86-152-67.customer.algx.net]
has joined #go-nuts
04:06 < Ycros> ffission6: sort of, but not really.  There are structs, and
interfaces.  Read the tutorial and the "efficient go" guide
04:08 -!- mejja [n=user@c-49b6e555.023-82-73746f38.cust.bredbandsbolaget.se] has
quit ["ChatZilla 0.9.85-rdmsoft [XULRunner 1.9.0.14/2009090900]"]
04:13 -!- TankND [n=thomaszi@EV1-DSL-74-83-9-175.fuse.net] has quit [Remote closed
the connection]
04:19 -!- Fraeon [n=kzer-za@e212-246-65-153.elisa-laajakaista.fi] has quit []
04:33 < plexdev> http://is.gd/5qHTa by [Russ Cox] in 11 subdirs of
go/src/pkg/ -- runtime: if os/signal is not in use, crash on
04:41 -!- Eridius [n=kevin@growl/Eridius] has quit [Read error: 110 (Connection
timed out)]
04:48 -!- scarabx [n=scarabx@c-24-147-239-120.hsd1.ma.comcast.net] has quit
["Leaving"]
04:48 -!- delsvr [n=delsvr@cpe-24-59-168-135.twcny.res.rr.com] has quit [Remote
closed the connection]
04:53 -!- scarabx [n=scarabx@c-24-147-239-120.hsd1.ma.comcast.net] has joined
#go-nuts
04:56 -!- goplexian [n=goplexia@d154-20-0-9.bchsia.telus.net] has joined #go-nuts
05:06 -!- binaryjohn [n=binaryjo@cpe-24-30-132-50.san.res.rr.com] has joined
#go-nuts
05:07 -!- fredmorcos [n=fred@193.170.135.107] has joined #go-nuts
05:07 -!- fredmorcos [n=fred@193.170.135.107] has quit [Read error: 54 (Connection
reset by peer)]
05:09 -!- Kibiz0r [n=Adium@adsl-99-35-8-162.dsl.klmzmi.sbcglobal.net] has quit
["Leaving."]
05:10 -!- Vova [n=Vova@80.178.30.152.adsl.012.net.il] has quit [Read error: 110
(Connection timed out)]
05:10 -!- Vova [n=Vova@80.178.30.152.adsl.012.net.il] has joined #go-nuts
05:27 -!- Nixpunk [n=macpunk@cpe-72-177-27-209.austin.res.rr.com] has joined
#go-nuts
05:33 -!- nsz [i=nsz@morecp.net] has joined #go-nuts
05:33 -!- nsz_ [i=nsz@morecp.net] has quit [Read error: 104 (Connection reset by
peer)]
05:36 < carllerche> what are the advantages of a ref counting GC over a
generational one?  (just reading the road map)
05:38 -!- iant [n=iant@71.133.8.30] has joined #go-nuts
05:38 -!- mode/#go-nuts [+v iant] by ChanServ
05:40 < anticw> iant: is there a clean/preferred way to create a string from
an arbitrary byte array?
05:42 < Ycros> anticw: string(someByteArray)
05:42 < john6> anticw, in 'strings' package, there is a func bytes()
05:43 < Ycros> I think
05:43 < anticw> Ycros: right, but what happens if the first char is in the
middle of a utf-8 rune ?
05:44 < john6> ah, i misunderstood :p
05:44 < Ycros> anticw: uhm, no idea :P
05:45 < anticw> to clarify, the issue at hand is how to 'correctly' deal
with possibly crappy input (a mime parser fwiw)
05:46 < Ycros> you could test it and see what happens
05:48 < anticw> prob U+FFFD at posn 0 then the next sane rune
05:53 -!- droid001 [n=g1@p4FDCAF3A.dip.t-dialin.net] has joined #go-nuts
05:58 <+iant> anticw: string([]byte) will simply copy the bytes from the
slice into a new string; the bytes will be copied whether or not they are valid
UTF-8
05:58 <+iant> A string is not required to hold valid UTF-8
05:59 <+iant> it is an immutable sequence of bytes
06:02 -!- mitchellh [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has joined
#go-nuts
06:07 < kuroneko> iant: what's the prescribed behaviour for iterating over a
string that's not holding valid UTF-8?
06:07 -!- droid0011 [n=g1@p4FDC95EB.dip.t-dialin.net] has quit [Connection timed
out]
06:07 <+iant> kuroneko: there is no special support for that, you just have
to write for i := 0; i < len(s); i++
06:08 <+iant> or do you mean what happens if you use range if the string is
not valid UTF-8?  Invalid characters are returned as the replacement character
with a length of 1
06:09 < kuroneko> I was referring to the range behaviour
06:10 <+iant> "If the iteration encounters an invalid UTF-8 sequence, the
second variable will be 0xFFFD, the Unicode replacement character, and the next
iteration will advance a single byte in the string."
06:11 < kuroneko> right, so unless a string contains a utf-8 sequence, you
can't trust the behaviour of range
06:11 <+iant> yes
06:12 < kuroneko> I'd say that's a pretty compelling argument that string
should only ever be valid utf-8.
06:13 < Ycros> aye, catch errors as early as you can
06:13 < Ycros> at the point of conversion, not some time later
06:13 <+iant> a string really is just a sequence of bytes
06:13 <+iant> you can store UTF-8 in a string
06:13 < kuroneko> yes, but it's a sequence of bytes with magic behaviour
06:13 <+iant> but you aren't required to
06:14 <+iant> in the language proper, only the range clause cares whether
strings have UTF-8
06:14 <+iant> you don't have to use range
06:14 < kuroneko> I presume that go differciates byte[] from string, and
range on byte[] doesn't have the same magic
06:14 <+iant> that is true
06:14 < Ycros> so, we have byte arrays
06:15 < Ycros> strings should be more intelligent
06:15 <+iant> in what way?
06:15 -!- path[l]_ [n=path@115.240.83.103] has joined #go-nuts
06:15 < Ycros> what we've just been talking about, having them be valid
utf-8 for one thing
06:16 <+iant> what should happen if somebody stores invalid UTF-8 in a
string?
06:16 < Ycros> otherwise they're just an alias for byte[] with magical range
behaviour
06:16 < Ycros> iant: they shouldn't be able to
06:16 <+iant> what should happen?
06:16 < Ycros> an error upon conversion to a string
06:16 <+iant> the difference between string and []byte is that strings are
immutable, which makes them easy to share
06:17 <+iant> what if somebody uses \x to write a sequence of bytes in a
string literal which are not valid UTF-8?
06:17 <+iant> how does making these things an error help programmers?
06:17 < kuroneko> actually, I'd argue that \x should already be interpreted
as a unicode point code
06:18 <+iant> there is already \u and \U, \x is just a byte written in hex
06:18 < Ycros> failing fast is always a better option
06:18 <+iant> I think non-UTF-8 strings are useful
06:19 < kuroneko> I don't have a problem with the silent translation feature
in range, but I do have a problem with then claiming its safe to have non-UTF8 in
the string
06:19 <+iant> it is true that you have to know whether your string is valid
UTF-8 or not
06:20 < kuroneko> why not produce a generic immutable type flag?
06:20 < Ycros> kuroneko: I was just thinking that!
06:20 < kuroneko> we already have the magic of the immutable byte
array^W^Wstring
06:21 < kuroneko> surely that can be refactored to be more generic?
06:23 <+iant> string literals are special in other ways: they have a special
syntax in the language; strings are a basic type in programming, it's convenient
to express them directly in the language
06:23 -!- L29Ah [n=L29Ah@jabber.spbu.ru] has left #go-nuts []
06:25 < kuroneko> yes, but the problem is you're talking about abusing the
abstraction to utilise some of those special attributes, whereas it'd be more
logical to allow those attributes to apply to other types and remove the need for
the abstraction abuse
06:26 < kuroneko> a string is a string, except when it's not.
06:26 < kuroneko> which is a bit backwards.
06:26 <+iant> a string is always a string
06:26 <+iant> it sometimes does not hold valid UTF-8
06:27 -!- path[l] [n=path@115.240.25.37] has quit [Read error: 110 (Connection
timed out)]
06:29 -!- path[l] [n=path@115.240.83.103] has quit []
06:29 < kuroneko> this is getting into silly semantics, but if the encoding
is not valid, then it's not a sequence of characters and is no longer a string.
06:29 <+iant> In Go a string is defined as a sequence of bytes
06:29 < kuroneko> and so now we go about redefining CS again.  >_>
06:30 <+iant> if you just ignore the range clause on a string then
everything is perfectly consistent
06:30 <+iant> so I think your real objection is to the range clause
06:30 -!- scarabx [n=scarabx@c-24-147-239-120.hsd1.ma.comcast.net] has quit ["This
computer has gone to sleep"]
06:30 < kuroneko> and I'd argue that's really more than enough.
06:31 < kuroneko> because there's little to guaranty that other future
implementations won't have other divergences
06:31 <+iant> I'm not sure what you mean, the behaviour is fully specified
06:32 <+iant> the language is still subject to change, but I don't see why
different implementations would diverge
06:32 -!- fgb [n=fgb@190.246.85.45] has left #go-nuts []
06:32 < kuroneko> the other issue is that go likes shorthanding types - if
you set a precident for misuse of strings, people will shoot themselves in the
feet occasionally.
06:33 <+iant> I agree that the range clause on strings can be questioned
06:33 <+iant> for a while it just stepped through bytes
06:33 < kuroneko> I think that's preferable
06:33 < kuroneko> magic behaviour leads to unexpected surprises
06:33 <+iant> the proposal to step through UTF-8 characters was adopted
because stepping through bytes is kind of pointless
06:33 <+iant> that is, it is easy to do in other ways
06:33 < anticw> it's useful certainly
06:34 < anticw> i think for lack of some generic iterator support it's not a
terrible choice
06:34 -!- binaryjohn [n=binaryjo@cpe-24-30-132-50.san.res.rr.com] has quit []
06:35 -!- mitchellh [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has left
#go-nuts []
06:35 < anticw> speaking of which; is there an roadmap plan to consider
iterators in a more generic sense?  using for e := range foo.Iter() is a bit
cumbersome
06:35 < kuroneko> the issue as I see it is that in the implementation of a
language, unless you're writing a DSL, you shouldn't be trying to presume what's
useful for a programmer when it disrupts consistancy in handling.
06:35 <+iant> anticw: there is nothing on the roadmap but it's worth
considering if generics can get sorted out
06:36 < kuroneko> I find having the language behave in a consistant manner
is far more important than 'useful'
06:36 -!- Innominate [n=sirrobin@cpe-071-077-041-139.nc.res.rr.com] has quit [Read
error: 110 (Connection timed out)]
06:36 <+iant> kuroneko: it's a valid point of view
06:36 <+iant> kuroneko: Go tends to err on the side of useful for
programmers rather than precisely consistent
06:36 -!- alecs [n=alc@222.128.129.122] has joined #go-nuts
06:36 <+iant> these issues get argued back and forth a lot
06:36 <+iant> sometimes consistency wins
06:37 -!- Nixpunk [n=macpunk@cpe-72-177-27-209.austin.res.rr.com] has quit
["Leaving"]
06:38 -!- L29Ah [n=L29Ah@195.19.225.242] has joined #go-nuts
06:38 < kuroneko> with strings, I'd say it'd be important to either
establish a string conceptually as being an array of characters and have
character-oriented behaviours, or as an array of bytes, and have byte oriented
behaviours and stick with it.
06:39 <+iant> it's an array of bytes
06:39 <+iant> the range clause is an inconsistency for convenience
06:42 < Ycros> I think that's dangerous, because it'll conveniently work for
people for 7-bit ascii
06:44 < Ycros> brb, going to stand outside in the rain :3
06:44 < kuroneko> eh?  it's raining?
06:45 < Ycros> breif shower
06:45 < kuroneko> darn
06:56 -!- nsz_ [i=nsz@morecp.net] has joined #go-nuts
06:59 -!- fwiffo [n=fwiffo@unaffiliated/fwiffo] has quit ["Lost terminal"]
07:03 -!- gebba [n=gebba@89.253.124.230] has joined #go-nuts
07:03 -!- path[l] [n=path@59.162.86.164] has joined #go-nuts
07:04 -!- nsz [i=nsz@morecp.net] has quit [Read error: 104 (Connection reset by
peer)]
07:06 -!- nullpo [n=nullpo@221x252x46x83.ap221.ftth.ucom.ne.jp] has joined
#go-nuts
07:13 -!- jvogel [n=jonathan@friedpancakes.com] has quit [Client Quit]
07:13 -!- sfuentes_ [n=sfuentes@cpe-98-154-70-216.socal.res.rr.com] has joined
#go-nuts
07:13 -!- jvogel [n=jonathan@friedpancakes.com] has joined #go-nuts
07:14 -!- binaryjohn [n=binaryjo@cpe-24-30-132-50.san.res.rr.com] has joined
#go-nuts
07:21 -!- gebba [n=gebba@89.253.124.230] has quit []
07:21 -!- path[l] [n=path@59.162.86.164] has quit []
07:21 -!- dizm [n=dizm@121.98.168.127] has quit [Read error: 110 (Connection timed
out)]
07:22 -!- hiromtz [n=hiromtz@p4004-ipbf1304akatuka.ibaraki.ocn.ne.jp] has joined
#go-nuts
07:22 -!- dizm [n=dizm@121.98.168.127] has joined #go-nuts
07:25 -!- Sungem_ [i=Sungem@220-136-224-248.dynamic.hinet.net] has joined #go-nuts
07:31 -!- Sungem [i=Sungem@220-136-224-248.dynamic.hinet.net] has quit [Read
error: 60 (Operation timed out)]
07:31 -!- trickie [n=trickie@94.100.112.225] has joined #go-nuts
07:42 -!- binaryjohn [n=binaryjo@cpe-24-30-132-50.san.res.rr.com] has quit []
07:47 -!- dpb [i=dpb@unaffiliated/dpb] has quit ["Hi, I'm a quit message virus.
Please replace your old line with me and help me take over the world of IRC."]
07:52 -!- jophish [n=jophish@hermi.gotadsl.co.uk] has joined #go-nuts
07:57 -!- Innominate [n=sirrobin@cpe-069-134-170-056.nc.res.rr.com] has joined
#go-nuts
08:05 -!- Rob_Russell [n=chatzill@ip67-152-86-163.z86-152-67.customer.algx.net]
has quit [Read error: 60 (Operation timed out)]
08:09 -!- niekie [i=quasselc@CAcert/Assurer/niekie] has joined #go-nuts
08:11 -!- Cyanure [n=cyanure@81-65-189-254.rev.numericable.fr] has joined #go-nuts
08:13 -!- murodese [n=James@203-206-127-49.dyn.iinet.net.au] has joined #go-nuts
08:13 -!- murodes1 [n=James@203-206-127-49.dyn.iinet.net.au] has quit [Read error:
104 (Connection reset by peer)]
08:17 -!- kaigan|work
[n=kaigan@c-8290e255.1411-10-64736c14.cust.bredbandsbolaget.se] has joined
#go-nuts
08:19 -!- jophish [n=jophish@hermi.gotadsl.co.uk] has quit [Remote closed the
connection]
08:20 -!- rog [n=rog@78.148.26.225] has joined #go-nuts
08:23 -!- Associat0r [n=Associat@h163153.upc-h.chello.nl] has joined #go-nuts
08:28 -!- Metaphis [n=cyanure@81-65-189-254.rev.numericable.fr] has joined
#go-nuts
08:29 -!- Cyanure [n=cyanure@81-65-189-254.rev.numericable.fr] has quit [Read
error: 60 (Operation timed out)]
08:36 -!- jlouis [i=jlouis@130.225.165.29] has quit [Remote closed the connection]
08:36 -!- ShadowIce [n=pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
08:39 -!- carllerche [n=carllerc@c-69-181-129-204.hsd1.ca.comcast.net] has quit []
08:41 -!- jlouis [i=jlouis@130.225.165.29] has joined #go-nuts
08:43 -!- p0g0_ [n=pogo@unaffiliated/p0g0] has quit [Read error: 60 (Operation
timed out)]
08:44 -!- Metaphis [n=cyanure@81-65-189-254.rev.numericable.fr] has quit [Read
error: 54 (Connection reset by peer)]
08:44 -!- carllerche [n=carllerc@c-69-181-129-204.hsd1.ca.comcast.net] has joined
#go-nuts
08:45 -!- carllerche [n=carllerc@c-69-181-129-204.hsd1.ca.comcast.net] has quit
[Remote closed the connection]
08:45 -!- Metaphis [n=cyanure@81-65-189-254.rev.numericable.fr] has joined
#go-nuts
08:51 -!- tibshoot [n=tibshoot@linagora-230-146.pr0.nerim.net] has joined #go-nuts
08:54 -!- p0g0_ [n=pogo@unaffiliated/p0g0] has joined #go-nuts
09:00 -!- Fish-Work [n=Fish@86.65.182.194] has joined #go-nuts
09:02 -!- Cyanure[cn] [n=cyanure@81-65-189-254.rev.numericable.fr] has joined
#go-nuts
09:03 -!- Metaphis [n=cyanure@81-65-189-254.rev.numericable.fr] has quit [Read
error: 60 (Operation timed out)]
09:08 -!- geocalc [n=geocalc@lns-bzn-52-82-65-104-5.adsl.proxad.net] has joined
#go-nuts
09:09 -!- GeoBSD [n=geocalc@lns-bzn-33-82-252-54-219.adsl.proxad.net] has quit
[Read error: 60 (Operation timed out)]
09:10 -!- _ejb [n=ejb@unaffiliated/ejb] has joined #go-nuts
09:10 -!- ShadowIce` [i=pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
09:11 -!- matsuatbct [n=hiromtz@p4004-ipbf1304akatuka.ibaraki.ocn.ne.jp] has
joined #go-nuts
09:11 -!- JoLeClodo2 [n=JoLeClod@vian.wallinfire.net] has joined #go-nuts
09:11 -!- MadMethod [n=Method@204.126.3.135] has joined #go-nuts
09:11 -!- p0g0__ [n=pogo@unaffiliated/p0g0] has joined #go-nuts
09:12 -!- garbeam_ [n=arg@212.13.194.175.rev.bitfolk.com] has joined #go-nuts
09:12 -!- nullpo_ [n=nullpo@221x252x46x83.ap221.ftth.ucom.ne.jp] has joined
#go-nuts
09:12 -!- jlouis_ [i=jlouis@130.225.165.29] has joined #go-nuts
09:12 -!- Boggy-B_ [n=rh275@129.12.4.232] has joined #go-nuts
09:12 -!- GeoBSD [n=geocalc@82.65.104.5] has joined #go-nuts
09:13 -!- michaelh- [n=mux@66.169.117.157] has joined #go-nuts
09:13 -!- Nixpunk [n=macpunk@cpe-72-177-27-209.austin.res.rr.com] has joined
#go-nuts
09:13 -!- ___ed [i=bitch@anal-co.it] has joined #go-nuts
09:13 -!- JSharpe [n=jamie@90.209.215.207] has joined #go-nuts
09:13 -!- Netsplit kornbluth.freenode.net <-> irc.freenode.net quits:
scoeri, triplez, DJCapelis, mjburgess, p0g0_, Method, lmoura, viirya, hiromtz,
dizm, (+36 more, use /NETSPLIT to show all of them)
09:14 -!- Netsplit over, joins: jiing
09:14 -!- viirya [n=viirya@140.112.29.179] has joined #go-nuts
09:14 -!- Netsplit over, joins: KirkMcDonald
09:14 -!- DJCapelis [n=djc@capelis.dj] has joined #go-nuts
09:14 -!- nickjohnson [n=arachnid@coilette.notdot.net] has joined #go-nuts
09:15 -!- Netsplit over, joins: niekie
09:15 -!- Fish-Work [n=Fish@86.65.182.194] has quit [Read error: 104 (Connection
reset by peer)]
09:15 -!- Netsplit over, joins: Ycros
09:15 -!- Netsplit over, joins: werdan7
09:15 -!- Fish-Work [n=Fish@86.65.182.194] has joined #go-nuts
09:15 -!- Netsplit over, joins: codemac
09:15 -!- TenOfTen [n=TenOfTen@85.229.37.253] has joined #go-nuts
09:16 -!- Netsplit over, joins: triplez, mjburgess
09:17 -!- Netsplit over, joins: Hong_MinHee, trez
09:17 -!- bluszcz [n=bluszcz@78.47.74.144] has joined #go-nuts
09:17 -!- kuroneko [n=chris@yayoi.xware.cx] has joined #go-nuts
09:17 -!- Netsplit over, joins: kfx
09:17 -!- Netsplit over, joins: exch
09:17 -!- Netsplit over, joins: impl
09:17 -!- scoeri [n=jdekoste@134.184.43.1] has joined #go-nuts
09:19 -!- Cyanure[cn] [n=cyanure@81-65-189-254.rev.numericable.fr] has quit [Read
error: 110 (Connection timed out)]
09:20 -!- Paradox924X [n=Paradox9@245.122.188.72.cfl.res.rr.com] has joined
#go-nuts
09:20 -!- AndrewBC [n=Andrew@97.93.242.12] has joined #go-nuts
09:21 -!- AndrewBC [n=Andrew@97.93.242.12] has left #go-nuts []
09:24 -!- h4xOr [n=prudhvi@aldebaran.surapaneni.in] has quit ["leaving"]
09:26 -!- Amaranth [n=travis@ubuntu/member/Amaranth] has joined #go-nuts
09:28 -!- lmoura [n=lauromou@200.184.118.130] has joined #go-nuts
09:30 -!- mpl [n=mpl@smgl.fr.eu.org] has joined #go-nuts
09:31 -!- hevalbaranov [i=c18cf902@gateway/web/freenode/x-pqvzsptviuqjdyvu] has
joined #go-nuts
09:33 -!- quag [n=quag@121-98-81-61.bitstream.orcon.net.nz] has joined #go-nuts
09:33 -!- mycroftiv [n=infernus@h69-128-47-243.mdsnwi.dedicated.static.tds.net]
has joined #go-nuts
09:33 -!- ct [n=ct@plutonium.ct.id.au] has joined #go-nuts
09:33 -!- dizm [n=dizm@121.98.168.127] has joined #go-nuts
09:33 -!- syd [n=sydcogs@118.127.19.220] has joined #go-nuts
09:33 -!- e1f [n=user@natcho.ee.ryerson.ca] has joined #go-nuts
09:35 -!- johan-s [n=johan@62.70.27.104] has joined #go-nuts
09:38 -!- tomestla [n=tom@AToulouse-151-1-34-184.w83-203.abo.wanadoo.fr] has
joined #go-nuts
09:39 -!- maartenm [i=c207f62b@gateway/web/freenode/x-cxwlqyljsvrltmue] has joined
#go-nuts
09:41 < maartenm> is it possible to install Go on SunOS 5.10 sun4u sparc
SUNW,Sun-Fire-V490 ?
09:42 -!- Fish-Work [n=Fish@86.65.182.194] has quit [Read error: 104 (Connection
reset by peer)]
09:42 < uriel> maartenm: i don't think so
09:42 < uriel> gccgo might work
09:42 < vegai> maartenm: at least the official compiler hasn't been ported
to sparc
09:42 < maartenm> ok, no problem..  I'll ask for an ubuntu vm then
09:43 -!- Fish-Work [n=Fish@86.65.182.194] has joined #go-nuts
09:45 < maartenm> is there a community doing ports?
09:45 < uriel> maartenm: http://go-lang.cat-v.org/os-ports
09:47 < ThunderChicken> not a lot of non-x86 ports.  :(
09:48 < hevalbaranov> Hi all.  I've read both effective go and tutorial
documents but still, I couldn't understand when I should use & and * symbols
before defining method or creating a new instance of a class.
09:50 < hevalbaranov> also, the * symbol in the example of wikipedia (
http://en.wikipedia.org/wiki/Go_(programming_language) ) seems strange to me.  "if
!*omitNewline {" when we should use these symbols, any ideas?
09:54 < hevalbaranov> *bump*
09:57 < vegai> are you familiar with what they mean in C?
09:58 < maartenm> is there a go-mode yet in vim?  (go-mode is illustrously
hard to google)
09:58 -!- slashus2 [n=slashus2@74-137-26-8.dhcp.insightbb.com] has quit []
09:58 -!- tomestla [n=tom@AToulouse-151-1-34-184.w83-203.abo.wanadoo.fr] has quit
[Read error: 110 (Connection timed out)]
09:58 < vegai> hevalbaranov: as you see here
http://golang.org/pkg/flag/#Bool the Bool function returns a pointer
09:59 < vegai> so omitNewLine is a pointer to a bool
09:59 < ShadowIce`> maartenm: is there none in the misc directory?
09:59 < maartenm> sorry I'm still installing
10:00 < maartenm> I'll check it out thanks
10:00 < hevalbaranov> vegai: I had studied C in school but I remember almost
nothing about it.
10:00 < spikebike> anyone here using any of the SQL bindings for go?  which?
10:00 < vegai> hevalbaranov: so if !omitNewLine would be a test against the
pointer to a bool
10:01 < vegai> if !*omitNewLine is a test against the bool that omitNewLine
points to
10:01 < vegai> * says "follow this pointer"
10:01 < vegai> and with &, you move the other way
10:02 < hevalbaranov> vegai: some oop examples defines methods like without
*, like this: func (this Fruit) Eat(){}
10:03 < hevalbaranov> but some others puts * before the Struct
10:03 -!- dizm [n=dizm@121.98.168.127] has quit [Read error: 60 (Operation timed
out)]
10:03 < hevalbaranov> struct name
10:04 -!- dizm [n=dizm@121.98.168.127] has joined #go-nuts
10:04 < vegai> when there's a *, you're passing a pointer of the struct
10:04 < vegai> when there's none, you're passing the actual struct
10:04 < vegai> (a copy of the struct)
10:05 < kevinwatt> spikebike: I'm using mysqlgo.
10:06 < hevalbaranov> ok, is it necessary to pass actual struct to methods?
10:06 < spikebike> kevinwatt: cool, works for ya?
10:06 < spikebike> I just need simple inserts, and some simple queries with
sorted results
10:06 < kevinwatt> spikebike: Yes.  It's working will.
10:07 < spikebike> sweet thanks
10:07 < spikebike> my preference was the sqllite3 bindings (there are at
least 2), but they both looked kinda raw/scary
10:08 < kevinwatt> spikebike: This is why I chouce mysqlgo too.  :)
10:08 < spikebike> good enough I can switch later
10:11 < uriel> hevalbaranov: there are no classes in Go
10:12 -!- Nixpunk [n=macpunk@cpe-72-177-27-209.austin.res.rr.com] has quit
["Leaving"]
10:12 < uriel> maartenm: http://go-lang.cat-v.org/text-editors/
10:14 < hevalbaranov> uriel: right, what should I use instead of "class"?
struct?
10:15 < hevalbaranov> and I guess we say "allocated objects" instead of
"instances", don't we?
10:15 < uriel> hevalbaranov: if you read the docs, you should know what you
are refering to
10:16 < uriel> hevalbaranov: most likely by 'class' you mean 'type'
10:16 < hevalbaranov> uriel: ok
10:18 < maartenm> hmm, when I do 8l map.8 in ../test it doesn't actually
produce map.out
10:18 < maartenm> ls main*
10:18 < maartenm> eh, nor a main.out
10:19 < maartenm> ah, it made 8.out
10:19 < uriel> maartenm: did you read the docs?
10:19 < maartenm> yes but not very well it seems
10:21 < uriel> maartenm: also: 10:12 < uriel> maartenm:
http://go-lang.cat-v.org/text-editors/
10:21 < maartenm> yes thanks for that, I found it
10:22 < maartenm> I didn't know the go-lang.cat-v.org site
10:22 < hevalbaranov> I can't figure out that why some examples contains
some variables named with underscore, for example "response, _, _ :=
http.Get("http://twitter.com/users/Googland.xml")"
10:22 < uriel> hevalbaranov: did you read the docs?
10:23 < hevalbaranov> uriel: Yes I read most of them
10:23 < uriel> hevalbaranov: wich ones?
10:23 < uriel> ok, this is not mentioned in the tutorial
10:24 < hevalbaranov> and effective go and the tutorial
10:24 < uriel> but it is mentioned in Effective Go
10:24 < uriel> _ ignores the asignment
10:24 < uriel> so, if you have a function that returns two values, and you
only are interestd in the first one you do:
10:24 < uriel> v, _ = foo()
10:25 < hevalbaranov> uriel: I get it, thanks
10:27 < hevalbaranov> Can we pass a function to another function?  if yes,
how can we define the function that gets functions as arguments?
10:29 < spikebike> hrm, was looking for a path.walker example, it's turning
out to be elusive
10:31 < hevalbaranov> ...also, I wonder how can we create a list that
contains functions, any ideas?
10:32 -!- nf_ [n=nf@124-168-152-103.dyn.iinet.net.au] has joined #go-nuts
10:32 -!- ShadowIce [n=pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
10:33 -!- nf_ [n=nf@124-168-152-103.dyn.iinet.net.au] has quit [Client Quit]
10:37 -!- r2p2 [n=billy@v32671.1blu.de] has joined #go-nuts
10:37 -!- nf_ [n=nf@124-168-152-103.dyn.iinet.net.au] has joined #go-nuts
10:37 -!- nf_ [n=nf@124-168-152-103.dyn.iinet.net.au] has quit [Client Quit]
10:38 -!- ikke [n=ikkibr@unaffiliated/ikkebr] has joined #go-nuts
10:38 -!- nf [n=nf@124-168-152-103.dyn.iinet.net.au] has quit ["received SIGHEIL"]
10:38 -!- nf_ [n=nf@124.168.152.103] has joined #go-nuts
10:42 -!- Fish-Work [n=Fish@86.65.182.194] has quit [Read error: 54 (Connection
reset by peer)]
10:43 -!- Fish-Work [n=Fish@86.65.182.194] has joined #go-nuts
10:44 < uriel> hevalbaranov: yes, Go has closures
10:44 < uriel> again, this is all covered in effective go
10:45 -!- murodese [n=James@203-206-127-49.dyn.iinet.net.au] has quit [Read error:
110 (Connection timed out)]
10:45 -!- afurlan [n=afurlan@200.160.16.18] has joined #go-nuts
10:46 < hevalbaranov> uriel: sorry but I found nothing about closures except
an anonymous function example.
10:48 -!- tomestla [n=tom@AToulouse-151-1-110-212.w83-193.abo.wanadoo.fr] has
joined #go-nuts
10:50 < maartenm> is the grouping declarations generic, just syntactic
sugar?
10:50 -!- ShadowIce` [i=pyoro@unaffiliated/shadowice-x841044] has quit [Read
error: 110 (Connection timed out)]
10:52 -!- murodese [n=James@203-206-127-49.dyn.iinet.net.au] has joined #go-nuts
10:54 < exDM69> uriel: hevalbaranov: I can't find an example of closures or
anonymous functions effective go
10:54 < hevalbaranov> exDM69: check out goroutines
10:55 < exDM69> found it
10:55 < exDM69> what about the closure property, did you find out already?
10:56 < hevalbaranov> exDM69: not yet
10:56 < exDM69> hevalbaranov: do you have a go compiler handy, it should be
trivial to test
10:56 < exDM69> I don't have one installed and I ain't got the time to do so
10:57 < hevalbaranov> yes I have but I don't know how can I define an array
that contains functions
10:57 < hevalbaranov> uriel: I will be quit, I'm looking for your reply.
10:57 -!- maartenm [i=c207f62b@gateway/web/freenode/x-cxwlqyljsvrltmue] has left
#go-nuts []
10:58 -!- hevalbaranov [i=c18cf902@gateway/web/freenode/x-pqvzsptviuqjdyvu] has
quit ["Page closed"]
10:59 -!- kota1111 [n=kota1111@gw2.kbmj.jp] has quit ["Leaving..."]
11:02 -!- Fish-Work [n=Fish@86.65.182.194] has quit [Read error: 54 (Connection
reset by peer)]
11:02 < spikebike> hrm, anyone of an path.walk example?
11:03 -!- Fish-Work [n=Fish@86.65.182.194] has joined #go-nuts
11:12 -!- taruti [i=taruti@aoi.yi.org] has joined #go-nuts
11:14 -!- eulenspiegel [n=irssi@p579CA43E.dip.t-dialin.net] has joined #go-nuts
11:17 -!- xerox [n=xerox@unaffiliated/xerox] has quit []
11:18 -!- General13372 [n=support@71-84-247-187.dhcp.gldl.ca.charter.com] has
joined #go-nuts
11:23 -!- Fish-Work [n=Fish@86.65.182.194] has quit [Read error: 104 (Connection
reset by peer)]
11:26 -!- Fish-Work [n=Fish@86.65.182.194] has joined #go-nuts
11:30 < spikebike> ack, even the 5 line Absinterface example from
GoCourseDay2.pdf isn't compiling for me 8-(
11:30 -!- XniX23 [n=XniX23@89-212-10-29.dynamic.dsl.t-2.net] has joined #go-nuts
11:31 < XniX23> what the command again to update go?  hg -u or something
like that?
11:31 < spikebike> hg -u update
11:32 -!- Xera^ [n=lol@87-194-208-246.bethere.co.uk] has joined #go-nuts
11:32 < XniX23> thanks
11:35 -!- leitaox [n=leitaox@189.20.94.66] has joined #go-nuts
11:36 -!- General1337 [n=support@71-84-247-187.dhcp.gldl.ca.charter.com] has quit
[Read error: 110 (Connection timed out)]
11:37 < uriel> spikebike: are you running release or tip?
11:39 < spikebike> I hg -u updated tonight
11:39 < ShadowIce> isn't it "hg pull -u"?
11:39 < spikebike> oh, er,
11:41 < uriel> spikebike: then that might be the reason
11:41 < uriel> spikebike: btw, what page is the example?  and what does
'isn't compiling' mean?
11:44 < spikebike> I've been trying to run the interface examples becuase
I'm having problems with the path.walk use of interface
11:44 < spikebike> I had tried page 52
11:44 < spikebike> btw I think hd -u update = hg pull ; hg update release
11:44 < spikebike> er s/hd/hg/
11:45 -!- Fish-Work [n=Fish@86.65.182.194] has quit [Read error: 104 (Connection
reset by peer)]
11:47 -!- nf [n=nf@124.168.152.103] has quit [Remote closed the connection]
11:47 -!- Fish-Work [n=Fish@86.65.182.194] has joined #go-nuts
11:47 -!- nf [n=nf@124-168-152-103.dyn.iinet.net.au] has joined #go-nuts
11:48 < ShadowIce> "hg -u update" gives me an error...maybe we have
different versions installed
11:51 < spikebike> ah sorry
11:51 < spikebike> hg pull -u
11:53 -!- Maxdamantus [n=Maxdam@203-97-238-106.cable.telstraclear.net] has quit
[Read error: 110 (Connection timed out)]
11:53 < ShadowIce> spikebike: did you look at the path_test.go file?  That
always helps me if I can't figure out the documentation ;)
11:57 -!- triplez [n=triplez@bb116-14-27-96.singnet.com.sg] has quit []
11:59 < spikebike> heh
11:59 < spikebike> funny you mention that
11:59 < spikebike> I've been tinkering for an hour or two
11:59 < spikebike> and just in the last 5 minutes found that file
11:59 < spikebike> and yes now my example runs
11:59 < spikebike> Sweet!
11:59 < ShadowIce> *g*
11:59 < spikebike> there needs to be a go wiki so all the docs actually have
examples
12:02 -!- DerHorst [n=Horst@e176111210.adsl.alicedsl.de] has joined #go-nuts
12:04 < XniX23> how can i read the output of my program?
12:07 -!- oal [n=olav@5.79-160-122.customer.lyse.net] has joined #go-nuts
12:09 < spikebike> look at the screen?
12:09 < spikebike> I'm liking this mysqlgo quite a bit
12:11 < XniX23> spikebike: apart from this
12:12 -!- Maxdamantus [n=Maxdam@203-97-238-106.cable.telstraclear.net] has joined
#go-nuts
12:12 -!- tomestla [n=tom@AToulouse-151-1-110-212.w83-193.abo.wanadoo.fr] has quit
[Read error: 60 (Operation timed out)]
12:14 -!- Fish-Work [n=Fish@86.65.182.194] has quit [Read error: 104 (Connection
reset by peer)]
12:15 -!- Fish-Work [n=Fish@86.65.182.194] has joined #go-nuts
12:17 -!- tor7 [n=tor@c-987a71d5.04-50-6c756e10.cust.bredbandsbolaget.se] has
joined #go-nuts
12:21 -!- tor7_ [n=tor@c-987a71d5.04-50-6c756e10.cust.bredbandsbolaget.se] has
joined #go-nuts
12:21 -!- tor7 [n=tor@c-987a71d5.04-50-6c756e10.cust.bredbandsbolaget.se] has quit
[Read error: 54 (Connection reset by peer)]
12:26 -!- Plnt [n=someone@rhea.pwn.cz] has joined #go-nuts
12:44 -!- zuiki [n=wiz@93.90.47.114] has joined #go-nuts
12:44 -!- stalled [n=411@unaffiliated/stalled] has quit [Read error: 104
(Connection reset by peer)]
12:45 < zuiki> hello!  is there an XMPP library for go yet?
12:45 -!- stalled [n=411@unaffiliated/stalled] has joined #go-nuts
12:46 < jessta> zuiki: not that I've seen
12:46 < taruti> Is there a reason why encoding/binary does not support
NativeEndian?
12:47 -!- Guest64551 [n=blee@85.11.190.15] has joined #go-nuts
12:48 < jessta> taruti: I wondered that too
12:48 -!- Spaghett1ni [n=Spaghett@vaxjo6.150.cust.blixtvik.net] has quit [Read
error: 60 (Operation timed out)]
12:49 -!- jepler [n=jepler@emc/developer/pdpc.active.jepler] has quit [Read error:
60 (Operation timed out)]
12:49 -!- jepler [n=jepler@emc/developer/pdpc.active.jepler] has joined #go-nuts
12:53 < jessta> taruti: maybe it's compiled as a no-op if it's native
12:53 -!- Adys [n=Adys@unaffiliated/adys] has quit [Read error: 110 (Connection
timed out)]
12:54 -!- Fish-Work [n=Fish@86.65.182.194] has quit [Read error: 104 (Connection
reset by peer)]
12:55 < taruti> jessta: neither is a no-op
12:55 -!- Adys [n=Adys@unaffiliated/adys] has joined #go-nuts
12:55 -!- Fish-Work [n=Fish@86.65.182.194] has joined #go-nuts
12:55 < zuiki> is it possible to use c bindings?
12:56 < taruti> yes, with cgo
12:57 -!- [Pete_27] [n=noname@115.64.1.61] has quit ["leaving"]
12:59 -!- [Pete_27] [n=noname@115.64.1.61] has joined #go-nuts
13:00 -!- eulenspiegel [n=irssi@p579CA43E.dip.t-dialin.net] has quit ["Lost
terminal"]
13:01 -!- Vova [n=Vova@80.178.30.152.adsl.012.net.il] has quit []
13:03 -!- [Pete_27] [n=noname@115.64.1.61] has quit [Client Quit]
13:03 -!- [Pete_27] [n=noname@115.64.1.61] has joined #go-nuts
13:04 -!- L29Ah [n=L29Ah@195.19.225.242] has left #go-nuts []
13:06 -!- plainhao [n=plainhao@mail.xbiotica.com] has joined #go-nuts
13:06 < uriel> xmpp?  ugh
13:07 -!- L29Ah [n=L29Ah@jabber.spbu.ru] has joined #go-nuts
13:11 * spikebike was all excited about xmpp before google pulled it pre 1.0 or
so.
13:11 < uriel> heh
13:11 < spikebike> and would handily fix my need for push
13:12 < spikebike> (pre 1.0 on android)
13:13 -!- triplez [n=triplez@cm52.sigma225.maxonline.com.sg] has joined #go-nuts
13:17 * spikebike files a bug against mysqlgo
13:20 < exDM69> "against"?
13:21 < exDM69> what's that attitude?
13:22 -!- Fraeon [n=kzer-za@e212-246-65-153.elisa-laajakaista.fi] has joined
#go-nuts
13:23 * spikebike files a policitally correct socially acceptable green gentle
suggestion ...
13:24 < exDM69> filing a bug report is more like doing a favor
13:27 -!- Guest64551 [n=blee@85.11.190.15] has quit [Client Quit]
13:27 -!- melba [n=blee@unaffiliated/lazz0] has joined #go-nuts
13:38 < spikebike> sure
13:39 < spikebike> seems like filing a bug against a project is a pretty
common way to say it
13:40 < spikebike> and isn't meant to imply an adversarial relationship
13:43 -!- mitchellh [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has joined
#go-nuts
13:44 -!- scm [i=justme@c137140.adsl.hansenet.de] has quit [Read error: 104
(Connection reset by peer)]
13:45 -!- Fish-Work [n=Fish@86.65.182.194] has quit [Read error: 104 (Connection
reset by peer)]
13:45 -!- Fish-Work [n=Fish@86.65.182.194] has joined #go-nuts
13:46 -!- scm [i=justme@d018183.adsl.hansenet.de] has joined #go-nuts
14:00 < zuiki> is there comprehensive tutorial on how to use sockets and
such stuff?
14:01 -!- decriptor_ [n=decripto@137.65.132.6] has joined #go-nuts
14:01 -!- decriptor [n=decripto@137.65.132.6] has quit [Read error: 104
(Connection reset by peer)]
14:10 -!- murodes1 [n=James@124-169-139-152.dyn.iinet.net.au] has joined #go-nuts
14:15 -!- fredmorcos [n=fred@193.170.135.107] has joined #go-nuts
14:18 -!- mitchellh [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has quit
["Leaving."]
14:18 -!- Fish-Work [n=Fish@86.65.182.194] has quit [Read error: 104 (Connection
reset by peer)]
14:19 -!- Fish-Work [n=Fish@194.182.65-86.rev.gaoland.net] has joined #go-nuts
14:20 -!- Netsplit kornbluth.freenode.net <-> irc.freenode.net quits:
Yappo__, sahazel, soul9, plexdev, codemac
14:23 -!- codemac [n=codemac@archlinux/developer/codemac] has joined #go-nuts
14:23 -!- chachan [n=chachan@ccscliente156.ifxnetworks.net.ve] has joined #go-nuts
14:25 -!- werdan7 [n=w7@freenode/staff/wikimedia.werdan7] has quit [SendQ
exceeded]
14:27 -!- delsvr [n=delsvr@cpe-24-59-168-135.twcny.res.rr.com] has joined #go-nuts
14:29 -!- hevalbaranov [i=51d62910@gateway/web/freenode/x-hgdguookefkohjij] has
joined #go-nuts
14:29 -!- soul9 [n=none@unaffiliated/johnnybuoy] has joined #go-nuts
14:29 -!- sahazel [n=sah@64.13.131.178] has joined #go-nuts
14:29 -!- plexdev [n=plexdev@arthur.espians.com] has joined #go-nuts
14:29 -!- Yappo__ [n=yappo@221x243x122x124.ap221.ftth.ucom.ne.jp] has joined
#go-nuts
14:29 -!- murodese [n=James@203-206-127-49.dyn.iinet.net.au] has quit [Read error:
110 (Connection timed out)]
14:30 < hevalbaranov> uriel, hi
14:30 < uriel> hi
14:31 < hevalbaranov> do you remember my question about closures?
14:31 -!- Netsplit kornbluth.freenode.net <-> irc.freenode.net quits: mat_,
RooTer
14:31 -!- nanoo [n=nano@95-89-198-45-dynip.superkabel.de] has joined #go-nuts
14:32 -!- Rob_Russell [n=chatzill@ip67-152-86-163.z86-152-67.customer.algx.net]
has joined #go-nuts
14:35 < uriel> no, sorry
14:35 < uriel> sorry, got to go
14:36 -!- fredmorcos [n=fred@193.170.135.107] has quit ["Ex-Chat"]
14:37 -!- iwikiwi [n=iwikiwi@202.3.77.126] has joined #go-nuts
14:39 -!- Fish-Work [n=Fish@194.182.65-86.rev.gaoland.net] has quit [Read error:
104 (Connection reset by peer)]
14:41 < dho> morning
14:41 -!- Netsplit over, joins: mat_, RooTer
14:41 < dho> hevalbaranov: what was your question about closures
14:41 < dho> zuiki: the tests in src/pkg/net are decent.  it's a very
straightforward api
14:41 -!- Fish-Work [n=Fish@194.182.65-86.rev.gaoland.net] has joined #go-nuts
14:41 < zuiki> can someone check the code?  http://dumpz.org/15293/ it
writes ok, but getting stuck at the pointed line
14:48 < hevalbaranov> dho: Do you know how can we define a function that
gets another functions as arguments?  And, can we create an array that contains
functions?
14:50 < dho> No and probably.  (I'm still getting into go programming, just
because I ported it doesn't mean I know all about it :))
14:50 < dho> You can certainly create a map that contains functions
14:52 -!- borisc [n=borisc@borisc2.csbnet.se] has quit [Remote closed the
connection]
14:54 < hevalbaranov> dho: how can I define, any ideas?
14:54 -!- iwikiwi [n=iwikiwi@202.3.77.126] has quit ["I ascend to reality!"]
14:54 < fission6> hevalbaranov: yea you can do this
14:55 < hevalbaranov> fission6: how?
14:57 < fission6> http://golang.org/doc/effective_go.html#interface_methods
shows an example of passing function pointer as argument
15:03 -!- Fish-Work [n=Fish@194.182.65-86.rev.gaoland.net] has quit [Read error:
104 (Connection reset by peer)]
15:03 -!- iwikiwi [n=iwikiwi@202.3.77.126] has joined #go-nuts
15:06 -!- skelterjohn [n=jasmuth@c-76-99-92-193.hsd1.nj.comcast.net] has joined
#go-nuts
15:11 -!- jA_cOp [n=yakobu@unaffiliated/ja-cop/x-9478493] has joined #go-nuts
15:12 -!- dizm [n=dizm@121.98.168.127] has quit [Read error: 60 (Operation timed
out)]
15:14 -!- mrprajesh [i=3b601952@gateway/web/freenode/x-aomgrmiwdtdehkby] has
joined #go-nuts
15:14 -!- nullpo_ [n=nullpo@221x252x46x83.ap221.ftth.ucom.ne.jp] has quit
["Leaving..."]
15:15 -!- p4p4 [n=P4p4@24.121.113.82.net.de.o2.com] has joined #go-nuts
15:20 -!- lux` [n=lux@151.71.141.147] has joined #go-nuts
15:24 -!- gnuvince [n=vince@72.0.221.201] has quit [Remote closed the connection]
15:24 -!- gnuvince [n=vince@70.35.163.18] has joined #go-nuts
15:28 -!- mrprajesh [i=3b601952@gateway/web/freenode/x-aomgrmiwdtdehkby] has quit
["Page closed"]
15:30 -!- iwikiwi [n=iwikiwi@202.3.77.126] has quit ["I ascend to reality!"]
15:31 -!- |chachan| [n=chachan@ccscliente156.ifxnetworks.net.ve] has joined
#go-nuts
15:31 -!- chachan [n=chachan@ccscliente156.ifxnetworks.net.ve] has quit [Read
error: 104 (Connection reset by peer)]
15:32 -!- |chachan| [n=chachan@ccscliente156.ifxnetworks.net.ve] has quit [Client
Quit]
15:32 -!- chachan [n=chachan@ccscliente156.ifxnetworks.net.ve] has joined #go-nuts
15:38 -!- hstimer [n=hans@c-98-234-25-125.hsd1.ca.comcast.net] has quit
["Leaving..."]
15:39 -!- johan-s [n=johan@62.70.27.104] has quit [Read error: 110 (Connection
timed out)]
15:43 -!- kaigan|work
[n=kaigan@c-8290e255.1411-10-64736c14.cust.bredbandsbolaget.se] has quit []
15:56 -!- nanooo [n=nano@95-89-198-45-dynip.superkabel.de] has joined #go-nuts
15:57 -!- alecs [n=alc@222.128.129.122] has quit []
15:57 -!- ThePok [n=fufuuuer@p5DD278F5.dip.t-dialin.net] has joined #go-nuts
15:58 -!- eulenspiegel [n=irssi@p579CA43E.dip.t-dialin.net] has joined #go-nuts
16:01 -!- mauke [n=mauke@p3m/member/mauke] has quit [Read error: 104 (Connection
reset by peer)]
16:01 -!- mauke [n=mauke@p3m/member/mauke] has joined #go-nuts
16:06 -!- addos [n=addos@cpe-065-190-063-023.nc.res.rr.com] has joined #go-nuts
16:10 -!- chachan [n=chachan@ccscliente156.ifxnetworks.net.ve] has quit [Read
error: 113 (No route to host)]
16:10 -!- borisc [n=borisc@borisc2.csbnet.se] has joined #go-nuts
16:12 < scoeri> hevalbaranov: check out function literals and function types
16:13 -!- nanoo [n=nano@95-89-198-45-dynip.superkabel.de] has quit [Read error:
110 (Connection timed out)]
16:13 < scoeri> an argument of a function can be another function (but you
do have to specify the type of that function argument)
16:14 < scoeri> and function pointers are not the same as closures
16:14 < scoeri> go does not have closures
16:14 -!- Rob_Russell [n=chatzill@ip67-152-86-163.z86-152-67.customer.algx.net]
has quit ["ChatZilla 0.9.85 [Firefox 3.5.5/20091102152451]"]
16:16 -!- werdan7 [n=w7@freenode/staff/wikimedia.werdan7] has joined #go-nuts
16:17 -!- triplez [n=triplez@cm52.sigma225.maxonline.com.sg] has quit []
16:20 -!- slashus2 [n=slashus2@74-137-26-8.dhcp.insightbb.com] has joined #go-nuts
16:24 -!- tumdum [n=tumdum@unaffiliated/tumdum] has joined #go-nuts
16:26 < skelterjohn> go doesn't have closures?
16:27 < skelterjohn> functions declared in some scope retain knowledge of
that scope, even when called from elsewhere
16:27 < scoeri> unless I am missing something
16:28 < skelterjohn> maybe i have the vocab wrong: closure = code +
environment?
16:28 < scoeri> argument + body + env
16:28 < scoeri> +s
16:29 < skelterjohn> right
16:29 < scoeri> do function literals have a pointer to their environment?
16:29 < scoeri> because then im wrong
16:29 -!- xerox [n=xerox@151.61.160.246] has joined #go-nuts
16:29 < dho> I guess if I don't know the storage size I need before hand I
should probably use a map?
16:29 < skelterjohn> so if you have { ...  i:=2; return func() {return i;}}
16:29 < skelterjohn> that function that is returned from the top scope will
return the i, even though it's not called from there
16:30 < scoeri> skelterjohn: if go has closures it will
16:30 < skelterjohn> yes
16:30 < skelterjohn> it will
16:30 < dho> hm, no, because you have to make a map too.
16:30 < skelterjohn> i'm not speculating :)
16:30 < scoeri> damn
16:31 < scoeri> i thought they were function pointers like in C
16:31 < skelterjohn> nope
16:31 < dho> Or, actually.
16:31 < skelterjohn> dho: some more context?
16:31 < dho> skelterjohn: I'm trying to build a dependency graph
16:32 < dho> skelterjohn: I don't want to use arrays because I don't know
how many dependencies there are going to be beforehand, obviously
16:32 < dho> So I guess the question is whether there's a canonical growable
list implementation
16:32 < skelterjohn> vector?
16:32 < dho> oh, that's right.
16:32 < skelterjohn> do you need to test for inclusion of an edge quickly or
just iterate them in linear time?
16:33 < dho> haven't decided how i'm traversing yet
16:33 * dho is building gomake
16:33 < skelterjohn> if you need to test for inclusion, a set would be nice,
so people just do map[node] whatever
16:33 -!- hcatlin [n=hcatlin@pdpc/supporter/professional/hcatlin] has joined
#go-nuts
16:33 < skelterjohn> a general graph package would be useful i think
16:33 < skelterjohn> maybe that's what i'll do today instead of studying for
my exam on monday
16:34 < dho> heh
16:34 < skelterjohn> (not good at studying)
16:34 < dho> you should study, i need a graph anyway, and I need to learn go
16:34 < dho> so
16:34 < dho> let me :)
16:34 < skelterjohn> cool
16:34 < dho> porting go isn't a great way to learn it :(
16:35 < skelterjohn> i know - i'll write C code to learn go!
16:35 < dho> hehe
16:35 < skelterjohn> time to drive to campus
16:35 -!- skelterjohn [n=jasmuth@c-76-99-92-193.hsd1.nj.comcast.net] has quit []
16:35 -!- DerHorst_ [n=Horst@e176111210.adsl.alicedsl.de] has joined #go-nuts
16:36 -!- DerHorst [n=Horst@e176111210.adsl.alicedsl.de] has quit [Read error: 113
(No route to host)]
16:37 -!- jophish [n=jophish@hermi.gotadsl.co.uk] has joined #go-nuts
16:39 -!- hevalbaranov [i=51d62910@gateway/web/freenode/x-hgdguookefkohjij] has
quit ["Page closed"]
16:39 -!- amacleod [n=amacleod@c-75-69-45-62.hsd1.ma.comcast.net] has joined
#go-nuts
16:42 -!- Venom_X [n=pjacobs@cpe-67-9-131-167.austin.res.rr.com] has joined
#go-nuts
16:46 -!- iwikiwi [n=iwikiwi@202.3.77.126] has joined #go-nuts
16:48 -!- johan-s [n=johan@cm-84.215.111.48.getinternet.no] has joined #go-nuts
16:54 -!- chickamade [n=chickama@123.16.65.210] has joined #go-nuts
16:57 -!- cryptix [n=cryptix@p4FDE2795.dip.t-dialin.net] has joined #go-nuts
17:02 -!- idea_squirrel [i=ct2rips@77-21-26-194-dynip.superkabel.de] has joined
#go-nuts
17:02 -!- trickie [n=trickie@94.100.112.225] has quit [Read error: 110 (Connection
timed out)]
17:04 -!- codedread [i=81bc211a@gateway/web/freenode/x-mgzsnhbojmkzwsxx] has
joined #go-nuts
17:04 -!- codedread [i=81bc211a@gateway/web/freenode/x-mgzsnhbojmkzwsxx] has left
#go-nuts []
17:05 -!- chickamade [n=chickama@123.16.65.210] has quit ["Leaving"]
17:09 -!- skelterjohn [n=jasmuth@lawn-net168-in.rutgers.edu] has joined #go-nuts
17:10 < Fringehead> Would it be crazy to do something like row level locking
in a database by having a channel for each row?
17:17 -!- kanru [n=kanru@61-228-149-169.dynamic.hinet.net] has quit ["WeeChat
0.3.1-dev"]
17:17 -!- ct2rips [n=ct2rips@77-21-26-194-dynip.superkabel.de] has joined #go-nuts
17:18 -!- smooge [n=smooge@int.smoogespace.com] has joined #go-nuts
17:21 -!- Venom_X [n=pjacobs@cpe-67-9-131-167.austin.res.rr.com] has quit []
17:23 -!- codedread [i=81bc211a@gateway/web/freenode/x-mgzsnhbojmkzwsxx] has
joined #go-nuts
17:23 -!- ct2rips__ [i=ct2rips@77-21-26-194-dynip.superkabel.de] has joined
#go-nuts
17:24 -!- ct2rips__ [i=ct2rips@77-21-26-194-dynip.superkabel.de] has quit [Client
Quit]
17:25 -!- gebba [n=gebba@89-253-124-230.customers.ownit.se] has joined #go-nuts
17:25 -!- hevalbaranov [i=51d62910@gateway/web/freenode/x-jxsbauwpeupmoilm] has
joined #go-nuts
17:26 -!- iwikiwi [n=iwikiwi@202.3.77.126] has quit ["leaving"]
17:33 -!- trickie [n=trickie@86.93.227.181] has joined #go-nuts
17:33 -!- cmarcelo [n=cmarcelo@200.184.118.130] has joined #go-nuts
17:33 -!- tibshoot [n=tibshoot@linagora-230-146.pr0.nerim.net] has quit ["Quitte"]
17:35 -!- idea_squirrel [i=ct2rips@77-21-26-194-dynip.superkabel.de] has quit
[Read error: 110 (Connection timed out)]
17:35 -!- jA_cOp [n=yakobu@unaffiliated/ja-cop/x-9478493] has quit [Read error:
104 (Connection reset by peer)]
17:36 -!- jA_cOp [n=yakobu@unaffiliated/ja-cop/x-9478493] has joined #go-nuts
17:38 -!- ShadowIce [n=pyoro@unaffiliated/shadowice-x841044] has quit [Read error:
110 (Connection timed out)]
17:39 -!- zz [i=fusion@193.104.228.25] has quit [Killed by douglas.freenode.net
(Nick collision)]
17:40 -!- _zz [i=fusion@193.104.228.25] has joined #go-nuts
17:40 -!- ct2rips [n=ct2rips@77-21-26-194-dynip.superkabel.de] has quit [Read
error: 110 (Connection timed out)]
17:41 -!- zz [i=fusion@193.104.228.25] has quit [Killed by sagan.freenode.net
(Nick collision)]
17:42 -!- zz [i=fusion@193.104.228.25] has joined #go-nuts
17:44 -!- zz [i=fusion@193.104.228.25] has quit [Killed by douglas.freenode.net
(Nick collision)]
17:44 -!- _zz [i=fusion@193.104.228.25] has joined #go-nuts
17:47 -!- smcq_ [n=smcq@c-67-164-97-141.hsd1.ca.comcast.net] has joined #go-nuts
17:49 -!- raichoo [n=raichoo@i577B91C4.versanet.de] has joined #go-nuts
17:49 < kimelto> moin
17:51 < skelterjohn> hi
17:51 < dho> skelterjohn: it is handy to have the edges in a map, but you
have to know the size of the map before you create it, no?
17:52 < skelterjohn> no
17:52 < dho> oh, they just grow?
17:52 < skelterjohn> make(map[edge] bool)
17:52 -!- XniX23 [n=XniX23@89-212-10-29.dynamic.dsl.t-2.net] has quit [Remote
closed the connection]
17:52 < skelterjohn> i think so
17:52 < dho> ok
17:52 < dho> hm
17:52 < dho> that's a lot easier
17:52 < skelterjohn> :)
17:52 < dho> also map[edge] bool doesn't seem right
17:52 < skelterjohn> i think set should be one of the primitives
17:52 < skelterjohn> why is that?
17:53 < skelterjohn> you can test for inclusion with _, included :=
themap[edge(node1,node2)]
17:53 * skelterjohn wonders how map compares items
17:53 < skelterjohn> i think (but don't know) it's a hashmap
17:53 < skelterjohn> gonna take a look at the source (beats studying)
17:55 < skelterjohn> well there is hashmap.h/.c so i think the hashmap
theory is looking good
17:55 < dho> ok, your idea of edge is different than mine.  i guess mine's
closer to an adjacency matrix
17:55 < dho> it is a hash
17:56 < skelterjohn> an adjacency matrix is just one way to store edges...
17:56 < skelterjohn> i don't understand what you mean
17:56 < dho> maybe i'm just thinking about this the wrong way
17:56 < dho> s/maybe //
18:02 -!- ShadowIce [i=pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
18:03 -!- johan-s [n=johan@cm-84.215.111.48.getinternet.no] has quit [Read error:
60 (Operation timed out)]
18:03 -!- KillerX [n=anant@nat/mozilla/x-zikvhdwvpflzvfuk] has joined #go-nuts
18:05 -!- leitaox [n=leitaox@189.20.94.66] has quit [Client Quit]
18:13 -!- b00m_chef [n=watr@d64-180-45-230.bchsia.telus.net] has joined #go-nuts
18:17 -!- chachan [n=chachan@ccscliente156.ifxnetworks.net.ve] has joined #go-nuts
18:19 -!- snearch_ [n=olaf@g225063166.adsl.alicedsl.de] has joined #go-nuts
18:21 -!- nanooo [n=nano@95-89-198-45-dynip.superkabel.de] has quit [Client Quit]
18:31 -!- maikeru| [n=maikeru@24-107-56-173.dhcp.stls.mo.charter.com] has joined
#go-nuts
18:37 -!- msw [n=msw@66.192.95.199] has joined #go-nuts
18:38 -!- Daminvar [n=Daminvar@129.21.121.159] has quit ["Leaving"]
18:39 -!- skammer [n=skammer@ppp94-29-58-89.pppoe.spdop.ru] has joined #go-nuts
18:41 -!- r2p2 [n=billy@v32671.1blu.de] has left #go-nuts []
18:41 -!- skammer [n=skammer@ppp94-29-58-89.pppoe.spdop.ru] has quit [Client Quit]
18:46 -!- b00m_chef [n=watr@d64-180-45-230.bchsia.telus.net] has quit [Read error:
110 (Connection timed out)]
18:50 -!- dizm [n=dizm@121.98.168.127] has joined #go-nuts
18:53 -!- lux` [n=lux@151.71.141.147] has quit [Read error: 60 (Operation timed
out)]
18:55 -!- carllerche [n=carllerc@enginey-9.border1.sfo002.pnap.net] has joined
#go-nuts
18:58 -!- DerHorst_ [n=Horst@e176111210.adsl.alicedsl.de] has quit [Remote closed
the connection]
19:08 -!- delsvr [n=delsvr@cpe-24-59-168-135.twcny.res.rr.com] has quit [Remote
closed the connection]
19:09 -!- delsvr [n=delsvr@cpe-24-59-168-135.twcny.res.rr.com] has joined #go-nuts
19:11 -!- hevalbaranov [i=51d62910@gateway/web/freenode/x-jxsbauwpeupmoilm] has
quit [Ping timeout: 180 seconds]
19:12 -!- jA_cOp [n=yakobu@unaffiliated/ja-cop/x-9478493] has quit [Read error:
104 (Connection reset by peer)]
19:12 -!- jA_cOp_ [n=yakobu@unaffiliated/ja-cop/x-9478493] has joined #go-nuts
19:12 -!- hyperbolist [n=hyperbol@c-76-98-110-216.hsd1.nj.comcast.net] has joined
#go-nuts
19:16 -!- gasreaa [n=atwong@nat/slide/x-tpfezojjveesrbgj] has joined #go-nuts
19:17 -!- gasreaa [n=atwong@nat/slide/x-tpfezojjveesrbgj] has left #go-nuts []
19:21 -!- plainhao [n=plainhao@mail.xbiotica.com] has quit []
19:25 < uriel> scoeri: go does indeed have closures
19:25 < uriel> (just in case there was any doubt, didn't read the whole
backlog)
19:27 -!- GeoBSD [n=geocalc@82.65.104.5] has quit [Remote closed the connection]
19:34 -!- rndbot [n=bot@wikipedia/Gracenotes] has joined #go-nuts
19:35 -!- gebba [n=gebba@89-253-124-230.customers.ownit.se] has quit []
19:39 -!- ikke [n=ikkibr@unaffiliated/ikkebr] has quit []
19:52 -!- illya77 [n=illya77@238-128-133-95.pool.ukrtel.net] has joined #go-nuts
19:55 -!- Sungem_ [i=Sungem@220-136-224-248.dynamic.hinet.net] has quit [Client
Quit]
19:55 -!- Sungem [i=Sungem@220-136-224-248.dynamic.hinet.net] has joined #go-nuts
19:56 -!- KillerX [n=anant@gentoo/developer/KillerX] has quit ["Leaving."]
19:56 -!- adiabatic [n=adiabati@dsl-206-55-130-248.tstonramp.com] has joined
#go-nuts
19:56 -!- kwoodson [n=kwoodson@nat/novell/x-qunyiqmchiwpuzsm] has joined #go-nuts
19:57 < kwoodson> I have a beginner question.  I doing a computational heavy
call and I want to use goroutines.  I put them in but they aren't faster than
running without them.  They are actually slower.
19:58 < kwoodson> Am i doing something wrong?
19:58 < skelterjohn> setenv GOMAXPROCS 2
19:58 < skelterjohn> where 2 is the number of cores you ahve
19:58 < skelterjohn> default is 1
19:58 < kwoodson> skelterjohn, I attempted this and even the import runtime
version of that, same result
19:58 < skelterjohn> perhaps there is a synchronization/blocking issue
19:58 < skelterjohn> is the code short?  i'm bored and i could take a look
at it
19:59 < skelterjohn> (gopaste.org)
19:59 -!- Sungem [i=Sungem@220-136-224-248.dynamic.hinet.net] has quit [Client
Quit]
19:59 < kwoodson> Sure.  I'm doing a projecteuler, problem 18.
20:00 -!- Sungem [i=Sungem@220-136-224-248.dynamic.hinet.net] has joined #go-nuts
20:01 < kwoodson> skelterjohn, http://gopaste.org/view/29z74
20:01 < kwoodson> skelterjohn, this is amd64 on linux
20:03 < skelterjohn> well, i don't see anything that would cause either of
your goroutines to wait for eachother
20:03 < kwoodson> skelterjohn, Yeah.  That's why i was a little discouraged.
20:03 < rog> kwoodson: presumably you've taken out the printfs?!
20:03 < skelterjohn> your code doesn't compile with the latest version of go
20:04 < skelterjohn> you should do a hg pull -u
20:04 < skelterjohn> (it's the semicolon newline issue)
20:04 < kwoodson> skelterjohn, will do.
20:04 < skelterjohn> oh, printfs might cause blocking, right
20:04 < kwoodson> interesting
20:05 < rog> well if you've got the printfs in, then you'll always be
blocking on IO
20:05 < kwoodson> rog, thanks.
20:06 < rog> BTW, you do realise that you've got non-synchronised shared
access to the counter variable?
20:06 < rog> which means that the result will be unreliable
20:06 < skelterjohn> how do you run this program?
20:06 -!- Sungem [i=Sungem@220-136-224-248.dynamic.hinet.net] has quit [Client
Quit]
20:06 < skelterjohn> do you have to input that triangle?
20:07 < kwoodson> skelterjohn, euler15, sorry
20:07 -!- Meowtimer [n=meowtime@i577B1E43.versanet.de] has joined #go-nuts
20:07 < skelterjohn> hah
20:07 < kwoodson> rog, sorry, i'm expressing my ignorance but all I want is
a counter and don't mind two guys accessing it at once.
20:08 < skelterjohn> i feel like that one could be solved with a recurrence
relation rather than a program
20:08 < skelterjohn> it's not the reading, kwoodson, it's the writing
20:08 < rog> kwoodson: it just means that the final count won't reflect the
actual number of times that counter++ was called
20:08 < kwoodson> skelterjohn, yeah.  Its a Combination and its a one liner
but I wanted to solve it by programming
20:08 < skelterjohn> the ++ operation is not threadsafe
20:08 < kwoodson> rog, thanks
20:09 < kwoodson> rog, skelterjohn is there a better way to track progress
or keep a counter?
20:09 < rog> kwoodson: you could pass around a pointer to an int for the
counter.  that way it wouldn't need to be shared
20:09 < kwoodson> rog, ok.  thanks
20:10 -!- rog [n=rog@78.148.26.225] has quit [Read error: 60 (Operation timed
out)]
20:10 < kwoodson> btw, i ran this same program in c++ and python.  Single
threaded.
20:11 < kwoodson> Python is still going after 2 days.  C++ took 7.5 hours.
go only took 2 hours 20 min :)
20:11 -!- Sungem [i=ss@220-136-224-248.dynamic.hinet.net] has joined #go-nuts
20:11 < skelterjohn> um
20:11 < kwoodson> The recursion kills python.
20:11 < skelterjohn> do they get the same answer?  it seems unlikely that go
would be faster than c++
20:11 -!- Meowtimer [n=meowtime@i577B1E43.versanet.de] has quit [Client Quit]
20:11 < kwoodson> Yes.  They get the same answer.
20:12 < kwoodson> the c++ code is almost exactly the same.
20:12 -!- gl [n=gl@coders.fr] has quit [Read error: 60 (Operation timed out)]
20:12 -!- gl [n=gl@coders.fr] has joined #go-nuts
20:12 -!- stevenyvr [n=schan@76-10-184-108.dsl.teksavvy.com] has joined #go-nuts
20:15 < kwoodson> skelterjohn, I removed the printf and it is now consuming
2 processors @100%
20:16 < fluffle> http://github.com/fluffle/goirc/ \o/
20:16 < fluffle> been away from real internets for a while, but that gave me
some time to work on this :)
20:20 < skelterjohn> cool, fluffle
20:20 < skelterjohn> hmm i wonder how hard it would be to port curses to og
20:20 < skelterjohn> go
20:24 < plexdev> http://is.gd/5rDwb by [Tor Andersson] in go/src/pkg/xgb/ --
Updated the XGB python script to generate semicolon-free
20:26 -!- skammer [n=skammer@ppp94-29-58-89.pppoe.spdop.ru] has joined #go-nuts
20:26 -!- tumdum [n=tumdum@unaffiliated/tumdum] has quit []
20:28 -!- iwikiwi [n=iwikiwi@202.3.77.126] has joined #go-nuts
20:29 -!- Sungem [i=ss@220-136-224-248.dynamic.hinet.net] has quit [Client Quit]
20:29 -!- Sungem [i=ss@220-136-224-248.dynamic.hinet.net] has joined #go-nuts
20:33 -!- nanoo [n=nano@95-89-198-45-dynip.superkabel.de] has joined #go-nuts
20:39 -!- afurlan [n=afurlan@200.160.16.18] has quit [Remote closed the
connection]
20:41 < plexdev> http://is.gd/5rEu1 by [Devon H. O'Dell] in go/src/cmd/cgo/
-- Use BitSize instead of the field's type native ByteSize when calculating
20:43 -!- illya77 [n=illya77@238-128-133-95.pool.ukrtel.net] has quit [Read error:
54 (Connection reset by peer)]
20:44 < skelterjohn> how do you break out more than one level of a for?
20:45 < skelterjohn> specifically, i have a select inside a for and i want
to break out of the for from inside a select's case
20:46 -!- hcatlin [n=hcatlin@pdpc/supporter/professional/hcatlin] has quit ["peace
in teh middle east"]
20:47 < fluffle> ooi, have the no-semicolon changes made it into the release
branch of go?
20:51 -!- codedread [i=81bc211a@gateway/web/freenode/x-mgzsnhbojmkzwsxx] has quit
["Page closed"]
20:53 < taruti> skelterjohn: labels
20:57 < fluffle> hmm would appear so
20:57 < dho> fluffle: not fully
20:57 < uriel> goto!
20:58 < dho> uriel: break label is `preferred'
20:58 < dho> go supports e.g.
20:58 < uriel> I know, I just wanted an excuse to tell somebody to use goto!
20:58 < dho> for whatever {
20:58 < dho> break foo
20:58 < dho> }
20:58 < dho> foo:
20:59 < uriel> as far as I know, both are completely equivalent in that
context, while I agree break is obviously prefered, I can't pass an oportunity to
try to troll some anti-goto zealot somewhere
20:59 < fluffle> dho: rebuilt go, found a couple of syntax errors due to the
changes.  looking forward to less semicolons in the future \o/
21:00 < dho> uriel: :)
21:00 * fluffle sends the velociraptors after uriel
21:00 < spikebike> http://xkcd.com/292/
21:01 * uriel skillfuly throws a glenda an a gopher at them, which proceed to eat
the velociraptors alive
21:01 -!- skammer [n=skammer@ppp94-29-58-89.pppoe.spdop.ru] has quit [Client Quit]
21:01 < uriel> I mean, a Glenda rabbit and a Gordon gopher, obviously
21:09 -!- Vova [n=Vova@80.178.30.152.adsl.012.net.il] has joined #go-nuts
21:09 -!- nullpo [n=nullpo@221x252x46x83.ap221.ftth.ucom.ne.jp] has joined
#go-nuts
21:09 -!- smcq_ [n=smcq@c-67-164-97-141.hsd1.ca.comcast.net] has quit [Remote
closed the connection]
21:10 -!- smcq_ [n=smcq@c-67-164-97-141.hsd1.ca.comcast.net] has joined #go-nuts
21:10 -!- cmarcelo [n=cmarcelo@enlightenment/developer/cmarcelo] has quit
["leaving"]
21:14 -!- rbohn [n=rbohn@192.206.100.4] has joined #go-nuts
21:15 -!- rbohn [n=rbohn@192.206.100.4] has quit ["ChatZilla 0.9.86 [Firefox
3.0.15/2009101601]"]
21:17 -!- nanoo [n=nano@95-89-198-45-dynip.superkabel.de] has quit [Success]
21:22 -!- GeoBSD [n=geocalc@lns-bzn-52-82-65-104-5.adsl.proxad.net] has joined
#go-nuts
21:23 -!- codedread [i=81bc211a@gateway/web/freenode/x-vglafatvyvwuhlyi] has
joined #go-nuts
21:23 -!- codedread [i=81bc211a@gateway/web/freenode/x-vglafatvyvwuhlyi] has left
#go-nuts []
21:27 < plexdev> http://is.gd/5rHiz by [Devon H. O'Dell] in 2 subdirs of
go/src/ -- Allow cgo to accept multiple .go inputs for a package
21:27 -!- oal [n=olav@5.79-160-122.customer.lyse.net] has quit [Remote closed the
connection]
21:29 -!- Nixpunk [n=macpunk@cpe-72-177-27-209.austin.res.rr.com] has joined
#go-nuts
21:33 -!- ben [n=v@dslb-088-066-001-104.pools.arcor-ip.net] has left #go-nuts []
21:33 -!- bjorn` [i=bjorn@archlinux.no] has quit [Read error: 60 (Operation timed
out)]
21:34 -!- jophish [n=jophish@hermi.gotadsl.co.uk] has quit [Remote closed the
connection]
21:39 -!- fosho_ [n=afitz@adsl-190-193-40.asm.bellsouth.net] has joined #go-nuts
21:43 -!- fosho [n=afitz@adsl-190-196-36.asm.bellsouth.net] has quit [Read error:
60 (Operation timed out)]
21:43 < plexdev> http://is.gd/5rIeB by [Russ Cox] in go/ -- A+C: Ben Olive
(individual CLA)
21:43 < plexdev> http://is.gd/5rIeK by [Ben Olive] in go/src/pkg/time/ --
time: add ISO 8601 time format
21:52 -!- b00m_chef [n=watr@d64-180-45-230.bchsia.telus.net] has joined #go-nuts
21:56 -!- fosho_ [n=afitz@adsl-92-71-252.asm.bellsouth.net] has joined #go-nuts
22:01 -!- aho [n=nya@g227036046.adsl.alicedsl.de] has joined #go-nuts
22:01 -!- bugQ [n=bug-@c-67-171-127-76.hsd1.ut.comcast.net] has joined #go-nuts
22:06 < bugQ> thanks rob
22:07 < bugQ> (I don't know his nick)
22:07 < skelterjohn> assuming you mean rob pike, i have no idea if he idles
here or not
22:08 < bugQ> well anyway the catharsis was nice
22:10 -!- [[sroracle]] [n=sroracle@c-98-215-178-14.hsd1.in.comcast.net] has joined
#go-nuts
22:10 -!- Nixpunk [n=macpunk@cpe-72-177-27-209.austin.res.rr.com] has quit
["Leaving"]
22:11 < dagle> skelterjohn: He has been here.
22:13 -!- 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:14 -!- fosho [n=afitz@adsl-190-193-40.asm.bellsouth.net] has quit [Read error:
110 (Connection timed out)]
22:14 -!- decriptor [n=decripto@137.65.132.6] has quit [Read error: 110
(Connection timed out)]
22:14 -!- fosho [n=afitz@adsl-145-178-108.asm.bellsouth.net] has joined #go-nuts
22:14 -!- fgb [n=fgb@190.246.85.45] has joined #go-nuts
22:15 < plexdev> http://is.gd/5rK18 by [Robert Griesemer] in
go/src/cmd/godoc/ -- use new tab indentation format in godoc, but convert
22:19 -!- defectiv [n=clays@75.101.111.19] has joined #go-nuts
22:23 < taruti> actually I think code would be less confusing with
goto+labels than break/continue/whatever and trying to remember where they break
in different languages.
22:24 -!- fosho_ [n=afitz@adsl-92-71-252.asm.bellsouth.net] has quit [Read error:
110 (Connection timed out)]
22:24 < mauke> in what language does break work differently?
22:25 < KirkMcDonald> taruti: You can use labelled breaks and continues in
Go.
22:25 < KirkMcDonald> labeled*
22:26 < taruti> KirkMcDonald: so why do I need three keywords to do one
thing?
22:26 < KirkMcDonald> But they don't do the same thing.
22:26 < fgb> the behave similar when there's a label
22:26 < KirkMcDonald> Not really.
22:27 < taruti> just having the confusion here is enough argument against
them :)
22:27 < KirkMcDonald> What confusion?
22:27 < taruti> of course some people feel religious about anti-goto
22:27 < taruti> how are they different?
22:28 < taruti> foo: for { if(a) { goto foo } if(b) { break foo } if(c) {
continue foo } }
22:28 < KirkMcDonald> They jump to different places with respect to the
containing loop.
22:29 < KirkMcDonald> I do not understand your point.  These three clauses
all do something different.
22:29 < taruti> which is very confusing
22:29 < KirkMcDonald> Well, the first and third would be more different if
it were not an infinite loop.
22:31 < KirkMcDonald> taruti: In what sense is it confusing?
22:32 -!- gasreaa [n=atwong@nat/slide/x-fszanzvlxmrzaecq] has joined #go-nuts
22:32 -!- Gracenotes [n=person@wikipedia/Gracenotes] has quit ["Leaving"]
22:33 -!- gasreaa [n=atwong@nat/slide/x-fszanzvlxmrzaecq] has left #go-nuts []
22:33 -!- mbarkhau [n=koloss@p54A7EEB3.dip.t-dialin.net] has joined #go-nuts
22:35 < fgb> taruti, break label makes more sense when you have a neested
loop, so you just break or continue the outer one
22:38 -!- jA_cOp_ [n=yakobu@unaffiliated/ja-cop/x-9478493] has quit ["Leaving"]
22:39 -!- rndbot [n=bot@wikipedia/Gracenotes] has quit [Remote closed the
connection]
22:41 -!- gkmngrgn [n=gkmngrgn@unaffiliated/gkmngrgn] has joined #go-nuts
22:47 < skelterjohn> so, it's not that you label an instruction to jump to,
it's that you indicate a specific loop the the label and then you can break or
continue that loop
22:47 < skelterjohn> for { ...  break A ...  } ...  A: stuff
22:47 < skelterjohn> doesn't even make sense?
22:47 < skelterjohn> where with a goto it's clear
22:48 < skelterjohn> these are questions, btw, not assertions
22:50 -!- chrelad [n=chrisd@68-119-20-252.dhcp.stcd.mn.charter.com] has joined
#go-nuts
22:50 < skelterjohn> (some test code i just wrote supports the answer being
'yes')
22:50 -!- chrelad [n=chrisd@68-119-20-252.dhcp.stcd.mn.charter.com] has quit
["WeeChat 0.3.1-dev"]
22:50 < KirkMcDonald> A labeled break must apply to an enclosing loop.
22:50 < skelterjohn> right
22:51 < skelterjohn> that was the confusing part
22:51 -!- chrelad [n=chrisd@68-119-20-252.dhcp.stcd.mn.charter.com] has joined
#go-nuts
22:51 < fgb> http://gopaste.org/view/7L30p
22:51 < fgb> something like that
22:56 -!- bjorn` [i=bjorn@archlinux.no] has joined #go-nuts
22:58 -!- mejja [n=user@c-49b6e555.023-82-73746f38.cust.bredbandsbolaget.se] has
joined #go-nuts
23:00 -!- chrelad [n=chrisd@68-119-20-252.dhcp.stcd.mn.charter.com] has quit
["WeeChat 0.3.1-dev"]
23:07 -!- melba [n=blee@unaffiliated/lazz0] has quit ["MICROSOFT WORD IS A FUN
GAME"]
23:07 -!- zum [n=jsykari@xdsl-83-150-88-4.nebulazone.fi] has quit [Read error: 60
(Operation timed out)]
23:07 -!- p4p4 [n=P4p4@24.121.113.82.net.de.o2.com] has quit ["ChatZilla 0.9.84
[SeaMonkey 2.0a3/20090223135443]"]
23:11 -!- iwikiwi [n=iwikiwi@202.3.77.126] has quit ["I ascend to reality!"]
23:13 -!- ShadowIce [i=pyoro@unaffiliated/shadowice-x841044] has quit
["Verlassend"]
23:13 -!- zum [n=jsykari@xdsl-83-150-88-4.nebulazone.fi] has joined #go-nuts
23:16 < plexdev> http://is.gd/5rNwF by [Russ Cox] in 2 subdirs of go/ -- gc:
fix compiler crash
23:18 -!- gnuvince [n=vince@70.35.163.18] has quit ["What the fruit is goin' on
here!?"]
23:18 -!- General13372 [n=support@71-84-247-187.dhcp.gldl.ca.charter.com] has
joined #go-nuts
23:18 -!- gnuvince [n=vince@72.0.219.18] has joined #go-nuts
23:21 -!- smooge [n=smooge@int.smoogespace.com] has quit [Read error: 104
(Connection reset by peer)]
23:33 < plexdev> http://is.gd/5rOqI by [Robert Griesemer] in
go/src/cmd/gofmt/ -- fix for gofmt rewrite matcher bug
23:35 -!- smooge [n=smooge@int.smoogespace.com] has joined #go-nuts
23:35 -!- cryptix [n=cryptix@p4FDE2795.dip.t-dialin.net] has quit ["leaving"]
23:36 -!- General1337 [n=support@71-84-247-187.dhcp.gldl.ca.charter.com] has quit
[Read error: 110 (Connection timed out)]
23:37 -!- skelterjohn [n=jasmuth@lawn-net168-in.rutgers.edu] has quit []
23:46 -!- JSharpe [n=jamie@90.209.215.207] has quit [Client Quit]
23:47 -!- mejja [n=user@c-49b6e555.023-82-73746f38.cust.bredbandsbolaget.se] has
quit [Remote closed the connection]
23:56 -!- amacleod [n=amacleod@c-75-69-45-62.hsd1.ma.comcast.net] has quit [Read
error: 110 (Connection timed out)]
--- Log closed Fri Dec 18 00:00:33 2009