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

--- Log opened Wed Sep 08 00:00:06 2010
00:00 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has quit [Ping timeout:
630 seconds]
00:04 -!- gnuvince_ [~vince@70.35.168.202] has quit [Read error: No route to host]
00:05 -!- gnuvince_ [~vince@70.35.168.202] has joined #go-nuts
00:06 -!- iant [~iant@216.239.45.130] has joined #go-nuts
00:06 -!- mode/#go-nuts [+v iant] by ChanServ
00:09 -!- skelterjohn [~jasmuth@c-68-32-232-55.hsd1.nj.comcast.net] has joined
#go-nuts
00:12 -!- dj2 [~dj2@CPE001f5b35feb4-CM0014048e0344.cpe.net.cable.rogers.com] has
joined #go-nuts
00:17 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined
#go-nuts
00:19 -!- bragin [~bragin@95.167.98.250] has quit [Remote host closed the
connection]
00:19 -!- ronnyy [~quassel@2001:6f8:12c6:2a:224:1dff:fed7:9541] has joined
#go-nuts
00:21 -!- luruke [~luruke@151.53.13.191] has joined #go-nuts
00:35 < plexdev> http://is.gd/eZVYh by [Robert Griesemer] in
go/src/cmd/godoc/ -- godoc: moved package directory support code into separate
file
00:38 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Remote
host closed the connection]
00:39 -!- skelterjohn [~jasmuth@c-68-32-232-55.hsd1.nj.comcast.net] has quit
[Quit: skelterjohn]
00:41 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined
#go-nuts
00:41 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Remote
host closed the connection]
00:42 -!- kanru [~kanru@118-160-165-166.dynamic.hinet.net] has quit [Ping timeout:
240 seconds]
00:44 -!- jcao219 [~jcao219@pool-173-74-61-111.dllstx.fios.verizon.net] has quit
[Remote host closed the connection]
00:44 -!- jcao219 [~jcao219@pool-173-74-61-111.dllstx.fios.verizon.net] has joined
#go-nuts
00:45 < steven_t> is there a flag to disable to automatic insertion of
semicolons?
00:45 < steven_t> its making me nauseous
00:45 <+iant> something you never see is making you nauseous?
00:45 <+iant> there is no such flag
00:45 < steven_t> damnit
00:45 <+iant> that would just be a useless language dialect
00:49 -!- luruke [~luruke@151.53.13.191] has quit [Quit: Leaving]
00:56 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit:
This computer has gone to sleep]
00:59 -!- skelterjohn [~jasmuth@c-68-32-232-55.hsd1.nj.comcast.net] has joined
#go-nuts
01:01 -!- nighty^ [~nighty@210.188.173.245] has joined #go-nuts
01:05 -!- iant [~iant@216.239.45.130] has quit [Ping timeout: 255 seconds]
01:11 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Read error: Connection
reset by peer]
01:19 -!- Venom_X [~pjacobs@74.61.90.217] has joined #go-nuts
01:20 -!- Venom_X [~pjacobs@74.61.90.217] has quit [Client Quit]
01:26 -!- Bombe [~droden@weltgehirnmaschine.de] has quit [Changing host]
01:26 -!- Bombe [~droden@freenet/developer/Bombe] has joined #go-nuts
01:26 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined
#go-nuts
01:26 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has joined #go-nuts
01:28 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Remote
host closed the connection]
01:35 -!- scm [justme@d057131.adsl.hansenet.de] has quit [Ping timeout: 240
seconds]
01:36 -!- scm [justme@d018155.adsl.hansenet.de] has joined #go-nuts
01:40 -!- enherit [~enherit@cpe-98-149-170-48.socal.res.rr.com] has quit [Quit:
leaving]
01:44 -!- scm [justme@d018155.adsl.hansenet.de] has quit [Read error: Operation
timed out]
01:49 -!- scm [justme@d057195.adsl.hansenet.de] has joined #go-nuts
01:51 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 264 seconds]
01:57 -!- ukai [~ukai@nat/google/x-zjukgbtkertnulve] has quit [Ping timeout: 245
seconds]
01:58 -!- ukai [~ukai@nat/google/x-rkhntgxszjzlzzdi] has joined #go-nuts
02:11 -!- cco3 [~conley@c-69-181-138-209.hsd1.ca.comcast.net] has joined #go-nuts
02:27 < steven_t> guys
02:27 < steven_t> ugh
02:28 < steven_t> nm, i apparently need a * here
02:42 < skelterjohn> will any star do?
02:45 < steven_t> ye
02:45 < steven_t> s
02:46 < steven_t> hahahaha
02:46 < steven_t> i dont think fmt.Print* know how to properly handle
recursive maps
02:46 < steven_t> :D
02:46 < steven_t> i wonder if go's GC does
02:56 < skelterjohn> i can't imagine the two have anything to do with each
other
02:59 < skelterjohn> and it seems to handle it fine
02:59 < skelterjohn> output from a test: map[map[what:is up]:map[hi:there]]
02:59 < skelterjohn> you can imagine what the code might have been
03:01 < steven_t> well i had a slightly different cyclical map
03:01 < steven_t> m1["a"] = m2; m2["a"] = m1
03:02 -!- rejb [~rejb@unaffiliated/rejb] has quit [Ping timeout: 276 seconds]
03:02 < skelterjohn> what type do m1 and m2 have?
03:02 < skelterjohn> map[string]interface{}?
03:03 < exch> map[string] map[string] map[string] map[string] ...  infinity
etc :p
03:03 < skelterjohn> yeah i was wondering how you were planning on typing
that
03:04 < skelterjohn> doesn't sound like a fmt issue
03:16 < cbeck> To borrow a page from haskell: Could not construct infinite
type.
03:16 < steven_t> yes skelterjohn
03:17 < steven_t> map[string]interface{}
03:17 < steven_t> so is that why it wont print from fmt.Println()?
03:17 < cbeck> yes
03:18 < skelterjohn> when i try, it goes into what i assume is an infinite
loop
03:19 -!- skelterjohn [~jasmuth@c-68-32-232-55.hsd1.nj.comcast.net] has quit
[Quit: skelterjohn]
03:31 -!- steveno [~stevenoli@paludis/cheerleader/steveno] has quit [Quit:
steveno]
03:38 -!- nelson__ [~nelson@204.sub-75-213-74.myvzw.com] has quit [Ping timeout:
258 seconds]
03:40 -!- quag [~quag@121-98-81-61.bitstream.orcon.net.nz] has quit [Ping timeout:
276 seconds]
03:42 -!- quag [~quag@121-98-81-61.bitstream.orcon.net.nz] has joined #go-nuts
03:57 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined
#go-nuts
04:19 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has joined #go-nuts
04:19 -!- mode/#go-nuts [+v iant] by ChanServ
04:19 -!- aceluck [~aceluck@175.137.79.23] has joined #go-nuts
04:27 -!- jcao219 [~jcao219@pool-173-74-61-111.dllstx.fios.verizon.net] has quit
[Ping timeout: 245 seconds]
04:35 -!- b00m_chef [~watr@66.183.100.197] has joined #go-nuts
04:39 -!- jcao219 [~jcao219@pool-173-74-61-111.dllstx.fios.verizon.net] has joined
#go-nuts
04:47 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-177-247.clienti.tiscali.it] has
joined #go-nuts
04:48 < Project_2501> goodmorning o.o/
04:49 -!- jcao219 [~jcao219@pool-173-74-61-111.dllstx.fios.verizon.net] has quit
[Ping timeout: 245 seconds]
04:55 -!- zozoR [~zozoR@90.185.39.115] has joined #go-nuts
04:56 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit:
This computer has gone to sleep]
05:02 -!- scm [justme@d057195.adsl.hansenet.de] has quit [Ping timeout: 264
seconds]
05:03 -!- scm [justme@d071156.adsl.hansenet.de] has joined #go-nuts
05:03 -!- mikespook [~mikespook@219.137.75.6] has joined #go-nuts
05:09 -!- idr0 [~idr@g225103090.adsl.alicedsl.de] has joined #go-nuts
05:37 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts
05:49 -!- LeNsTR [~lenstr@unaffiliated/lenstr] has joined #go-nuts
05:53 -!- sacho [~sacho@213.91.244.15] has joined #go-nuts
06:00 -!- aho [~nya@fuld-4d00d471.pool.mediaWays.net] has quit [Quit:
EXEC_over.METHOD_SUBLIMATION]
06:10 -!- acts_as [~acts_as@208.236.105.27] has quit [Quit: acts_as]
06:16 -!- major_majors [~major_maj@c-68-40-195-246.hsd1.mi.comcast.net] has quit
[Quit: major_majors]
06:35 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has joined #go-nuts
06:37 -!- LeNsTR [~lenstr@unaffiliated/lenstr] has quit [Quit: LeNsTR]
06:38 -!- skejoe [~skejoe@188.114.142.231] has joined #go-nuts
06:39 -!- skejoe [~skejoe@188.114.142.231] has quit [Client Quit]
06:39 -!- skejoe [~skejoe@188.114.142.231] has joined #go-nuts
06:41 -!- LeNsTR [~lenstr@unaffiliated/lenstr] has joined #go-nuts
06:43 -!- lmoura [~lauromour@187.112.3.18] has quit [Ping timeout: 240 seconds]
06:44 -!- lmoura [~lauromour@187.112.3.18] has joined #go-nuts
06:52 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3]
06:55 -!- JimmyRcom [~jimmy@adsl-76-201-179-216.dsl.rcsntx.sbcglobal.net] has quit
[Ping timeout: 272 seconds]
07:02 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
07:07 -!- b00m_chef [~watr@66.183.100.197] has quit [Ping timeout: 258 seconds]
07:08 -!- lmoura [~lauromour@187.112.3.18] has quit [Ping timeout: 258 seconds]
07:10 -!- lmoura [~lauromour@187.58.103.242] has joined #go-nuts
07:15 -!- scm [justme@d071156.adsl.hansenet.de] has quit [Ping timeout: 264
seconds]
07:16 -!- scm [justme@d136128.adsl.hansenet.de] has joined #go-nuts
07:22 -!- zozoR [~zozoR@90.185.39.115] has quit [Quit: Morten.  Desu~]
07:26 -!- acts_as [~acts_as@208.236.105.27] has joined #go-nuts
07:26 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has quit [Quit:
slashus2]
07:32 -!- aceluck [~aceluck@175.137.79.23] has quit [Ping timeout: 276 seconds]
07:33 -!- lmoura [~lauromour@187.58.103.242] has quit [Read error: Connection
reset by peer]
07:34 -!- jmettraux [~jmettraux@211.19.55.177] has quit [Remote host closed the
connection]
07:34 -!- aceluck [~aceluck@175.137.79.23] has joined #go-nuts
07:37 -!- lmoura [~lauromour@187.58.105.102] has joined #go-nuts
07:39 -!- Paradox924X [~Paradox92@vaserv/irc/founder] has quit [Ping timeout: 252
seconds]
07:52 -!- ikaros [~ikaros@188.107.208.221] has joined #go-nuts
07:55 -!- acts_as [~acts_as@208.236.105.27] has quit [Quit: acts_as]
07:57 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3]
08:00 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has quit [Quit: WeeChat
0.3.2]
08:01 -!- idr0 [~idr@g225103090.adsl.alicedsl.de] has quit [Remote host closed the
connection]
08:07 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has joined #go-nuts
08:08 -!- ivan` [~ivan@unaffiliated/ivan/x-000001] has quit [Ping timeout: 258
seconds]
08:11 -!- nsf [c340cb02@gateway/web/freenode/ip.195.64.203.2] has joined #go-nuts
08:12 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
08:17 -!- ivan` [~ivan@unaffiliated/ivan/x-000001] has joined #go-nuts
08:23 -!- aceluck [~aceluck@175.137.79.23] has quit [Quit: aceluck]
08:24 -!- Paradox924X [~Paradox92@vaserv/irc/founder] has joined #go-nuts
08:42 -!- lmoura [~lauromour@187.58.105.102] has quit [Ping timeout: 276 seconds]
08:46 -!- photron [~photron@port-92-201-234-58.dynamic.qsc.de] has joined #go-nuts
08:52 -!- lmoura [~lauromour@186.212.108.186] has joined #go-nuts
08:59 -!- lmoura [~lauromour@186.212.108.186] has quit [Ping timeout: 265 seconds]
09:12 -!- lmoura [~lauromour@187.59.118.182] has joined #go-nuts
09:15 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 276 seconds]
09:15 -!- wrtp [~rog@92.16.124.106] has joined #go-nuts
09:18 -!- ikaros [~ikaros@188.107.208.221] has quit [Quit: Leave the magic to
Houdini]
09:22 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
09:24 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
09:33 -!- saschpe [~quassel@mgdb-4d0cf294.pool.mediaWays.net] has joined #go-nuts
09:37 -!- virtualsue [~chatzilla@nat/cisco/x-kxyuryiuosecfgyr] has joined #go-nuts
09:43 -!- tvw [~tv@212.79.9.150] has joined #go-nuts
09:44 -!- luruke [~luruke@151.53.13.191] has joined #go-nuts
09:45 -!- mikespook [~mikespook@219.137.75.6] has quit [Quit: Leaving.]
09:59 -!- niemeyer [~niemeyer@200-203-56-246.pltce701.dsl.brasiltelecom.net.br]
has joined #go-nuts
10:04 -!- virtualsue [~chatzilla@nat/cisco/x-kxyuryiuosecfgyr] has quit [Ping
timeout: 260 seconds]
10:08 -!- synth [~cb@obfuscated.us] has joined #go-nuts
10:09 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Quit: Leaving]
10:13 -!- nighty^ [~nighty@210.188.173.245] has quit [Quit: Disappears in a puff
of smoke]
10:15 -!- Luixsia [~Luixsia@AToulouse-254-1-90-165.w86-207.abo.wanadoo.fr] has
joined #go-nuts
10:16 -!- Xurix [~Luixsia@AToulouse-254-1-65-131.w81-49.abo.wanadoo.fr] has quit
[Ping timeout: 245 seconds]
10:19 -!- jmettraux [~jmettraux@PPPbm5391.kanagawa-ip.dti.ne.jp] has joined
#go-nuts
10:27 -!- nsf [c340cb02@gateway/web/freenode/ip.195.64.203.2] has quit [Quit: Page
closed]
10:29 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
10:30 -!- tav [~tav@2001:0:53aa:64c:0:3ffa:a3f8:a4f5] has quit [Quit: tav]
10:57 -!- macroron [~ron@c-98-242-168-49.hsd1.fl.comcast.net] has joined #go-nuts
10:59 -!- General1337 [~support@71-84-244-55.dhcp.gldl.ca.charter.com] has joined
#go-nuts
11:02 -!- General13372 [~support@71-84-244-55.dhcp.gldl.ca.charter.com] has quit
[Ping timeout: 276 seconds]
11:22 -!- rsaarelm [~rsaarelm@cs181128175.pp.htv.fi] has left #go-nuts []
11:27 -!- cco3 [~conley@c-69-181-138-209.hsd1.ca.comcast.net] has quit [Ping
timeout: 265 seconds]
11:31 -!- Shyde [~shyde@HSI-KBW-078-043-070-132.hsi4.kabel-badenwuerttemberg.de]
has joined #go-nuts
11:32 -!- [synth] [~cb@obfuscated.us] has joined #go-nuts
11:34 -!- synth [~cb@obfuscated.us] has quit [Ping timeout: 240 seconds]
11:36 -!- artefon [~thiago@189.107.129.61] has joined #go-nuts
12:07 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined
#go-nuts
12:16 -!- lmoura [~lauromour@187.59.118.182] has quit [Ping timeout: 265 seconds]
12:16 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Remote
host closed the connection]
12:23 -!- skejoe [~skejoe@188.114.142.231] has quit [Quit: leaving]
12:25 -!- ExtraSpice [~XtraSpice@88.118.32.225] has joined #go-nuts
12:27 -!- [synth] [~cb@obfuscated.us] has left #go-nuts []
12:29 -!- lmoura [~lauromour@187.113.106.111] has joined #go-nuts
12:32 < steven_t> mornin
12:32 < steven_t> hey guys,
12:32 < exch> lo
12:32 < steven_t> is there a one liner to test if a var is both non-nil and
can be converted to a given type?
12:32 < steven_t> like v != nil && v.(T)
12:33 < steven_t> (except obviously that wont work)
12:33 < napsy> trere probably is a way using the reflect package
12:34 -!- jdp [gu@24.238.32.162.res-cmts.segr.ptd.net] has joined #go-nuts
12:36 < exch> if t, ok := v.(T); ok && t != nil { ...  }
12:36 < exch> thats the closest I can think of
12:39 -!- b0r3d [~m@unaffiliated/b0r3d] has joined #go-nuts
12:44 -!- JimmyRcom [~jimmy@adsl-76-201-179-216.dsl.rcsntx.sbcglobal.net] has
joined #go-nuts
12:45 -!- lmoura_ [~lauromour@187.113.111.193] has joined #go-nuts
12:48 -!- lmoura [~lauromour@187.113.106.111] has quit [Ping timeout: 245 seconds]
12:51 -!- lmoura__ [~lauromour@187.58.106.245] has joined #go-nuts
12:51 -!- lmoura_ [~lauromour@187.113.111.193] has quit [Ping timeout: 264
seconds]
12:52 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has quit [Ping timeout: 276
seconds]
12:53 -!- skelterjohn [~jasmuth@c-68-32-232-55.hsd1.nj.comcast.net] has joined
#go-nuts
12:54 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has quit [Quit: Leaving.]
13:08 -!- b0r3d [~m@unaffiliated/b0r3d] has quit []
13:10 -!- synth [~cb@obfuscated.us] has joined #go-nuts
13:11 < steven_t> exch: that wont work afaik, because if v == nil, it will
panic
13:12 < steven_t> from the nil.(T) part
13:12 -!- skelterjohn [~jasmuth@c-68-32-232-55.hsd1.nj.comcast.net] has quit
[Quit: skelterjohn]
13:14 < exch> That would be inconsistent if it does.  A nil value is always
a usable version of a type
13:14 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined
#go-nuts
13:15 -!- skelterjohn [~jasmuth@c-68-32-232-55.hsd1.nj.comcast.net] has joined
#go-nuts
13:22 -!- major_majors [~major_maj@m582336d0.tmodns.net] has joined #go-nuts
13:22 -!- major_majors [~major_maj@m582336d0.tmodns.net] has left #go-nuts []
13:23 -!- major_majors [~major_maj@m282336d0.tmodns.net] has joined #go-nuts
13:25 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit:
Leaving]
13:27 -!- kanru [~kanru@118-160-165-166.dynamic.hinet.net] has joined #go-nuts
13:27 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has quit [Quit:
Leaving.]
13:29 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has joined
#go-nuts
13:30 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined
#go-nuts
13:37 -!- major_majors [~major_maj@m282336d0.tmodns.net] has quit [Ping timeout:
252 seconds]
13:39 -!- iant [~iant@66.109.106.2] has joined #go-nuts
13:39 -!- mode/#go-nuts [+v iant] by ChanServ
13:46 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3]
13:47 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit:
This computer has gone to sleep]
13:48 -!- major_majors [~major_maj@m282336d0.tmodns.net] has joined #go-nuts
13:49 < steven_t> hi
13:52 -!- ExtraSpice [~XtraSpice@88.118.32.225] has quit [Quit: Leaving]
13:53 -!- fenicks [~christian@log77-3-82-243-254-112.fbx.proxad.net] has quit
[Read error: Operation timed out]
13:54 < steven_t> hmm
13:54 -!- femtoo [~femto@95-89-248-51-dynip.superkabel.de] has joined #go-nuts
13:54 < steven_t> using the comma-ok paradigm seems to coalesce both a
map-get and a type conversion
13:55 < steven_t> thats handy, but i dont see that its described in the spec
that it should act that way
13:55 -!- tav [~tav@2001:0:53aa:64c:0:3ffa:a3f8:a4f5] has joined #go-nuts
13:55 -!- fenicks [~christian@log77-3-82-243-254-112.fbx.proxad.net] has joined
#go-nuts
13:56 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined
#go-nuts
13:59 < steven_t> oh wait
13:59 <+iant> using comma-ok out of a map should just do an assignment
13:59 < steven_t> its not coalescing them
13:59 < steven_t> right.
13:59 < steven_t> its assinging nil (not found) to my var
13:59 < steven_t> which im then converting to a Hash
13:59 < steven_t> which is typed to be map[string]interface{}
13:59 < steven_t> and nil is a valid map
14:00 < steven_t> so its succeeding in both the hash-get and the conversion
14:00 -!- evildho [~devon@onager.omniti.com] has quit [Ping timeout: 276 seconds]
14:01 -!- evildho [~devon@onager.omniti.com] has joined #go-nuts
14:05 -!- skelterjohn [~jasmuth@c-68-32-232-55.hsd1.nj.comcast.net] has quit [Ping
timeout: 245 seconds]
14:08 -!- zozoR [~zozoR@4705ds1-ris.0.fullrate.dk] has joined #go-nuts
14:09 -!- lmoura__ [~lauromour@187.58.106.245] has quit [Quit: Leaving]
14:10 -!- lmoura [~lauromour@187.58.106.245] has joined #go-nuts
14:11 -!- l00t [~i-i3id3r_@189.105.114.178] has quit [Read error: Connection reset
by peer]
14:15 -!- skelterjohn [~jasmuth@c-68-32-232-108.hsd1.nj.comcast.net] has joined
#go-nuts
14:15 -!- boscop_ [~boscop@g227157019.adsl.alicedsl.de] has joined #go-nuts
14:16 -!- boscop_ [~boscop@g227157019.adsl.alicedsl.de] has left #go-nuts []
14:16 -!- boscop [~boscop@g227130150.adsl.alicedsl.de] has quit [Disconnected by
services]
14:16 -!- boscop [~boscop@g227157019.adsl.alicedsl.de] has joined #go-nuts
14:19 -!- rbetts [~rbetts@173-166-80-33-newengland.hfc.comcastbusiness.net] has
joined #go-nuts
14:21 < plexdev> http://is.gd/f0S9U by [Russ Cox] in go/src/cmd/gc/ -- gc:
better printing of named constants, func literals
14:21 < plexdev> http://is.gd/f0S9Z by [Jukka-Pekka Kekkonen] in
go/src/pkg/http/ -- http: do not cache CanonicalHeaderKey
14:22 -!- LeNsTR [~lenstr@unaffiliated/lenstr] has quit [Quit: LeNsTR]
14:22 -!- jmettraux [~jmettraux@PPPbm5391.kanagawa-ip.dti.ne.jp] has quit [Remote
host closed the connection]
14:22 -!- skelterjohn [~jasmuth@c-68-32-232-108.hsd1.nj.comcast.net] has quit
[Quit: skelterjohn]
14:22 -!- luruke [~luruke@151.53.13.191] has quit [Quit: This computer has gone to
sleep]
14:23 -!- skelterjohn [~jasmuth@c-68-32-232-108.hsd1.nj.comcast.net] has joined
#go-nuts
14:36 < steven_t> do you guys have any simple examples of your own packages?
14:36 < steven_t> im trying to write a little package for myself and im
having a hard time following this guide:
http://golang.org/doc/code.html#New_package
14:38 < exch> this may be helpful http://www.youtube.com/watch?v=jDWBJOXs_iI
14:39 < steven_t> my main concern is im trying to figure out what my
directory structure should be when i want to write a personal package
14:40 < steven_t> ah i see
14:40 -!- snearch [~snearch@f053005165.adsl.alicedsl.de] has joined #go-nuts
14:42 -!- ucasano [~ucasano@host153-182-static.227-95-b.business.telecomitalia.it]
has joined #go-nuts
14:45 -!- Shyde [~shyde@HSI-KBW-078-043-070-132.hsi4.kabel-badenwuerttemberg.de]
has quit [Quit: Shyde]
14:52 -!- cco3 [~conley@c-69-181-138-209.hsd1.ca.comcast.net] has joined #go-nuts
14:57 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
14:58 -!- virtualsue [~chatzilla@nat/cisco/x-zscqjpuvmthyiath] has joined #go-nuts
15:01 -!- iant [~iant@66.109.106.2] has quit [Quit: Leaving.]
15:04 -!- kanru [~kanru@118-160-165-166.dynamic.hinet.net] has quit [Ping timeout:
260 seconds]
15:04 -!- skelterjohn [~jasmuth@c-68-32-232-108.hsd1.nj.comcast.net] has quit
[Quit: skelterjohn]
15:07 -!- Luixsia [~Luixsia@AToulouse-254-1-90-165.w86-207.abo.wanadoo.fr] has
quit [Quit: Leaving]
15:11 -!- iant [~iant@nat/google/x-ulhvmhgayjqtxtvg] has joined #go-nuts
15:11 -!- mode/#go-nuts [+v iant] by ChanServ
15:11 -!- artefon [~thiago@189.107.129.61] has quit [Remote host closed the
connection]
15:13 -!- Venom_X [~pjacobs@74.61.90.217] has joined #go-nuts
15:17 -!- LeNsTR [~lenstr@unaffiliated/lenstr] has joined #go-nuts
15:24 -!- awidegreen [~quassel@62.176.237.78] has joined #go-nuts
15:28 -!- major_majors_ [~major_maj@166.132.74.43] has joined #go-nuts
15:31 -!- ucasano [~ucasano@host153-182-static.227-95-b.business.telecomitalia.it]
has quit [Quit: ucasano]
15:31 -!- LeNsTR [~lenstr@unaffiliated/lenstr] has quit [Quit: LeNsTR]
15:31 -!- ucasano [~ucasano@host153-182-static.227-95-b.business.telecomitalia.it]
has joined #go-nuts
15:32 -!- major_majors [~major_maj@m282336d0.tmodns.net] has quit [Ping timeout:
240 seconds]
15:33 -!- acts_as [~acts_as@208.236.105.27] has joined #go-nuts
15:36 -!- ronnyy [~quassel@2001:6f8:12c6:2a:224:1dff:fed7:9541] has quit [Remote
host closed the connection]
15:40 -!- tvw [~tv@212.79.9.150] has quit [Remote host closed the connection]
15:43 -!- deso [~deso@x0561a.wh30.tu-dresden.de] has joined #go-nuts
15:49 -!- major_majors [~major_maj@166.132.74.43] has left #go-nuts []
15:50 -!- zozoR [~zozoR@4705ds1-ris.0.fullrate.dk] has quit [Ping timeout: 276
seconds]
15:51 -!- Xurix [~Luixsia@AToulouse-254-1-90-165.w86-207.abo.wanadoo.fr] has
joined #go-nuts
15:51 -!- Xurix [~Luixsia@AToulouse-254-1-90-165.w86-207.abo.wanadoo.fr] has quit
[Read error: Connection reset by peer]
15:52 -!- Xurix [~Luixsia@AToulouse-254-1-90-165.w86-207.abo.wanadoo.fr] has
joined #go-nuts
15:59 -!- kanru [~kanru@118-160-165-166.dynamic.hinet.net] has joined #go-nuts
15:59 -!- artefon [~thiagon@150.164.2.20] has joined #go-nuts
16:00 -!- ucasano [~ucasano@host153-182-static.227-95-b.business.telecomitalia.it]
has quit [Quit: ucasano]
16:01 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has quit [Ping
timeout: 265 seconds]
16:03 -!- Sseur [~david@mic92-12-88-161-108-143.fbx.proxad.net] has joined
#go-nuts
16:06 -!- major_majors [~major_maj@166.132.74.43] has joined #go-nuts
16:06 -!- kanru [~kanru@118-160-165-166.dynamic.hinet.net] has quit [Ping timeout:
260 seconds]
16:06 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has joined #go-nuts
16:10 -!- Xurix [~Luixsia@AToulouse-254-1-90-165.w86-207.abo.wanadoo.fr] has quit
[Read error: Connection reset by peer]
16:14 -!- timepilot [~timepilot@66.71.230.193] has joined #go-nuts
16:14 -!- timepilot [~timepilot@66.71.230.193] has quit [Client Quit]
16:15 < Project_2501> brb o.o
16:16 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-177-247.clienti.tiscali.it] has
quit [Quit: E se abbasso questa leva che succ...]
16:19 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-177-247.clienti.tiscali.it] has
joined #go-nuts
16:20 -!- ssb [~ssb@213.167.39.150] has quit [Ping timeout: 276 seconds]
16:25 -!- sahid [~sahid@LNeuilly-152-21-22-10.w193-253.abo.wanadoo.fr] has quit
[Quit: Ex-Chat]
16:25 -!- skejoe [~skejoe@188.114.142.231] has joined #go-nuts
16:26 -!- skelterjohn [~jasmuth@lawn-net168-in.rutgers.edu] has joined #go-nuts
16:29 -!- ShadowIce` [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
16:33 -!- ucasano [~ucasano@host153-182-static.227-95-b.business.telecomitalia.it]
has joined #go-nuts
16:39 -!- Fish [~Fish@9fans.fr] has joined #go-nuts
16:39 -!- ikaros [~ikaros@188.107.208.221] has joined #go-nuts
16:41 -!- sacho [~sacho@213.91.244.15] has quit [Remote host closed the
connection]
16:42 -!- LeNsTR [~lenstr@unaffiliated/lenstr] has joined #go-nuts
16:42 -!- macroron [~ron@c-98-242-168-49.hsd1.fl.comcast.net] has quit [Quit:
Leaving]
16:46 -!- ikaros [~ikaros@188.107.208.221] has quit [Quit: Leave the magic to
Houdini]
16:47 -!- cco3 [~conley@c-69-181-138-209.hsd1.ca.comcast.net] has quit [Ping
timeout: 240 seconds]
16:48 -!- ssb_ [~ssb@213.167.39.150] has joined #go-nuts
16:50 -!- ssb_ [~ssb@213.167.39.150] has quit [Read error: Operation timed out]
16:52 -!- ikaros [~ikaros@188.107.208.221] has joined #go-nuts
16:52 -!- virtualsue [~chatzilla@nat/cisco/x-zscqjpuvmthyiath] has quit [Ping
timeout: 276 seconds]
16:55 -!- major_majors [~major_maj@166.132.74.43] has left #go-nuts []
16:59 -!- ssb_ [~ssb@213.167.39.150] has joined #go-nuts
17:01 -!- lmoura [~lauromour@187.58.106.245] has quit [Ping timeout: 276 seconds]
17:03 -!- ssb_ [~ssb@213.167.39.150] has quit [Ping timeout: 240 seconds]
17:04 -!- ssb_ [~ssb@213.167.39.150] has joined #go-nuts
17:04 -!- lmoura [~lauromour@187.58.108.184] has joined #go-nuts
17:09 -!- ssb_ [~ssb@213.167.39.150] has quit [Ping timeout: 255 seconds]
17:09 -!- LeNsTR [~lenstr@unaffiliated/lenstr] has quit [Quit: LeNsTR]
17:09 -!- ucasano [~ucasano@host153-182-static.227-95-b.business.telecomitalia.it]
has quit [Quit: ucasano]
17:12 -!- royger [~royger@175.18.21.95.dynamic.jazztel.es] has joined #go-nuts
17:12 < royger> hi
17:13 < nickaugust> howdy
17:13 < royger> when I do for i, file := range files { I get an error saying
implicit assignment of unexported field 'fd' of os.File in assignment, where files
is []os.File
17:15 < royger> I don't get it
17:15 -!- ssb_ [~ssb@213.167.39.150] has joined #go-nuts
17:16 -!- snearch [~snearch@f053005165.adsl.alicedsl.de] has quit [Quit:
Verlassend]
17:17 < skelterjohn> yeah - you can't make an assignment to something of
type os.File outside of the os package
17:17 < skelterjohn> it has unexported files
17:18 < skelterjohn> type *os.File, however, would be fine
17:18 < skelterjohn> since it's just a pointer
17:18 -!- LeNsTR [~lenstr@unaffiliated/lenstr] has joined #go-nuts
17:18 < skelterjohn> and i believe using *os.File is the canonical way to do
it
17:20 < royger> skelterjohn: thanks!
17:20 -!- ssb_ [~ssb@213.167.39.150] has quit [Ping timeout: 265 seconds]
17:20 < royger> skelterjohn: I use *os.File always, I don't know why I was
using os.File...
17:21 -!- steveno [~stevenoli@paludis/cheerleader/steveno] has joined #go-nuts
17:22 < skelterjohn> it happens
17:23 -!- LeNsTR [~lenstr@unaffiliated/lenstr] has quit [Quit: LeNsTR]
17:27 -!- steveno [~stevenoli@paludis/cheerleader/steveno] has quit [Quit:
steveno]
17:28 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-148-80.clienti.tiscali.it] has
joined #go-nuts
17:31 -!- ssb_ [~ssb@213.167.39.150] has joined #go-nuts
17:31 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-177-247.clienti.tiscali.it] has
quit [Ping timeout: 245 seconds]
17:33 -!- ucasano [~ucasano@host153-182-static.227-95-b.business.telecomitalia.it]
has joined #go-nuts
17:34 -!- LeNsTR [~lenstr@unaffiliated/lenstr] has joined #go-nuts
17:34 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-183-121.clienti.tiscali.it] has
joined #go-nuts
17:36 -!- wrtp [~rog@92.16.124.106] has quit [Read error: Connection reset by
peer]
17:36 -!- wrtp [~rog@92.16.124.106] has joined #go-nuts
17:38 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-148-80.clienti.tiscali.it] has
quit [Ping timeout: 276 seconds]
17:39 -!- ssb_ [~ssb@213.167.39.150] has quit [Ping timeout: 264 seconds]
17:40 -!- Project-2501 [~Marvin@82.84.96.93] has joined #go-nuts
17:41 -!- Project-2501 [~Marvin@82.84.96.93] has quit [Read error: Connection
reset by peer]
17:43 -!- fenicks [~christian@log77-3-82-243-254-112.fbx.proxad.net] has left
#go-nuts []
17:43 -!- paulzhol [~yuval@46-116-252-230.bb.netvision.net.il] has joined #go-nuts
17:44 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-183-121.clienti.tiscali.it] has
quit [Ping timeout: 276 seconds]
17:45 -!- plainhao [~plainhao@mail.xbiotica.com] has joined #go-nuts
17:45 -!- ssb_ [~ssb@213.167.39.150] has joined #go-nuts
17:48 -!- ssb_ [~ssb@213.167.39.150] has quit [Read error: Operation timed out]
17:48 -!- artefon [~thiagon@150.164.2.20] has quit [Quit: Leaving]
17:49 -!- aceluck [~aceluck@175.137.79.23] has joined #go-nuts
17:49 -!- aceluck [~aceluck@175.137.79.23] has left #go-nuts []
17:55 < paulzhol> hello, when submitting a change to codereview and setting
Reviewer to golang-dev@googlegroups.com when should my change appear on the
mailing list ?
17:55 <+iant> it should be sent when you run "hg mail"
17:56 <+iant> running "hg upload" will add it to the code review site,
running "hg mail" will send mail about it
17:56 -!- mafs [~maikeru@unaffiliated/maikeru/x-7708887] has quit [Ping timeout:
276 seconds]
17:56 < paulzhol> iant: I did "hg mail" and got it to my gmail account but I
don't see it on the mailing list (http://codereview.appspot.com/2135044/)
17:57 <+iant> sometimes there is a delay between the code review site and
the mailing list for some reason
17:57 <+iant> probably spam filtering or something
17:57 <+iant> when did you run the hg mail?
17:57 <+iant> I see it on the mailing list now
17:57 < paulzhol> about an hour ago
17:58 <+iant> I see it on the group web site, anyhow
17:58 < paulzhol> ohh right, just appeared
17:59 <+iant> I've asked the groups people here to look into these delays,
but no word back
17:59 < paulzhol> thanx
18:01 -!- aho [~nya@fuld-4d00d259.pool.mediaWays.net] has joined #go-nuts
18:13 -!- saschpe [~quassel@mgdb-4d0cf294.pool.mediaWays.net] has quit [Remote
host closed the connection]
18:16 -!- ssb_ [~ssb@213.167.39.150] has joined #go-nuts
18:17 < nickaugust> can i build the package documentation html files
locally?
18:18 <+iant> nickaugust: you can run godoc locally
18:19 < nickaugust> iant: ahah!  :) thx
18:20 -!- enherit [~enherit@cpe-98-149-170-48.socal.res.rr.com] has joined
#go-nuts
18:30 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 252 seconds]
18:32 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
18:41 -!- ucasano [~ucasano@host153-182-static.227-95-b.business.telecomitalia.it]
has quit [Quit: ucasano]
18:42 -!- tsdh [~user@p54AF1E20.dip0.t-ipconnect.de] has joined #go-nuts
18:47 < tsdh> Hi. I have a global var c I want to assign in a function to
the first value returned by a function call.  The second return value is assigned
to a new local var e.  When I do "c, e := f()", c is a new local var, so I either
have to do "x,e:=f(); c=x" or "var e *Error; c,e = f()".  Isn't there a better way
to do that?
18:50 <+iant> No, I don't think so
18:51 < exch> nope.  using := you are explicitely defining a new variable in
the given scope.  'var e *Error; c, e = f()' is the 'proper' way to do this.
18:53 -!- ssb_ [~ssb@213.167.39.150] has left #go-nuts []
18:53 -!- ssb [~ssb@213.167.39.150] has joined #go-nuts
18:54 -!- mattikus [~mattikus@ip24-250-73-154.br.br.cox.net] has quit [Remote host
closed the connection]
18:54 < tsdh> exch, iant: Ok, thanks.
18:56 < tsdh> Maybe that's a place where some syntactic sugar could be
added.  Maybe something like "@c, e := f()" with the meaning of "use the already
declared c instead of declaring a new one".
18:56 <+iant> seems kind of special purpose
19:00 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has quit [Quit:
peace in teh middle east]
19:04 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Remote
host closed the connection]
19:12 < tsdh> iant: Hm, the first return value is much more likely to be
assigned to some global whereas the error is most likely to be handled locally, so
I'd prefer not having to declare the error beforehand...
19:16 -!- femtoo [~femto@95-89-248-51-dynip.superkabel.de] has quit [Quit:
Leaving]
19:17 -!- Eridius [~kevin@unaffiliated/eridius] has joined #go-nuts
19:18 < exch> not necessarily this sort of thing happens often
http://pastebin.com/e4RtA2xM
19:22 < tsdh> Another thing.  I want to use flag.String() with no default
value, but nil or string(nil) doesn't work.  Do I need to use the empty string?
But that can be provided at the cmd line too?
19:24 <+iant> tsdh: that's right; the flag package does not let you
distinguish the case where the user provides the default value on the command line
19:24 < tsdh> ok
19:31 -!- plainhao [~plainhao@mail.xbiotica.com] has quit [Quit: plainhao]
19:31 -!- tasosos [~tasosos@193.92.229.85.dsl.dyn.forthnet.gr] has quit [Remote
host closed the connection]
19:31 -!- tsdh [~user@p54AF1E20.dip0.t-ipconnect.de] has quit [Ping timeout: 245
seconds]
19:32 -!- erje [~erje@port-92-201-92-230.dynamic.qsc.de] has joined #go-nuts
19:34 -!- ako [~nya@fuld-4d00d248.pool.mediaWays.net] has joined #go-nuts
19:34 -!- aho [~nya@fuld-4d00d259.pool.mediaWays.net] has quit [Ping timeout: 245
seconds]
19:38 -!- wrtp [~rog@92.16.124.106] has quit [Ping timeout: 245 seconds]
19:43 -!- royger [~royger@175.18.21.95.dynamic.jazztel.es] has quit [Ping timeout:
240 seconds]
19:44 -!- wrtp [~rog@92.16.124.106] has joined #go-nuts
19:45 -!- jturner [~james@command.huskycoding.com] has left #go-nuts []
19:45 -!- royger [~royger@166.19.21.95.dynamic.jazztel.es] has joined #go-nuts
19:56 -!- Guldlok [~mvs@95.166.161.93] has joined #go-nuts
19:57 -!- skejoe [~skejoe@188.114.142.231] has quit [Quit: leaving]
20:02 -!- snearch [~snearch@f053005165.adsl.alicedsl.de] has joined #go-nuts
20:09 -!- b00m_chef [~watr@xx208110096208.cipherkey.com] has joined #go-nuts
20:11 < nickaugust> if i have a channel of strings what will signal the end
of items in the chan?  i'm trying r == nil but getting invalid operation: r == nil
(type string == nil) snippet here http://sprunge.us/egjV
20:12 < exch> "" is the nil value for a string
20:12 < nickaugust> exch: ok thanks
20:13 < exch> From that example, I am guessing the channel is no longer used
once the last string is sent?  It should then be close()'d on the sending end.
You can just continue looping until it's closed
20:14 < exch> for { if closed(c) { break } r := <- c; ....  }
20:14 < nickaugust> correct.  how is the loop structured...  ah..  nice :)
20:14 < nickaugust> thanks exch
20:15 < exch> or possibly: for !closed(c) { r := <-c; ...  }
20:19 -!- joc85 [~jose@216.64.28.214] has joined #go-nuts
20:19 < nickaugust> so i just c.close() before i return c?  or after the
creation loop?  thats weird that the function returns because isnt the chan
blocking until its read by the outside function?
20:20 < exch> lemme wip up a short example.  sec
20:20 < nickaugust> k thanks man
20:21 -!- joc85 [~jose@216.64.28.214] has quit [Client Quit]
20:22 -!- joc1985 [~jose@216.64.28.214] has joined #go-nuts
20:24 < exch> nickaugust: http://pastebin.com/8fS7djx3
20:24 -!- joc1985 [~jose@216.64.28.214] has quit [Client Quit]
20:24 < exch> close() and closed() are builtin functions in Go
20:25 -!- joc [~jose@216.64.28.214] has joined #go-nuts
20:25 < nickaugust> exch: ah, so i have to fill the chan in a go routine
20:25 < nickaugust> thats what i was missing
20:25 < nickaugust> otherwise it will block right?
20:25 < exch> yes
20:26 < nickaugust> ok.  that makes sense.  thanks again man
20:26 -!- joc [~jose@216.64.28.214] has quit [Client Quit]
20:27 -!- joc85 [~jose@216.64.28.214] has joined #go-nuts
20:28 -!- joc85 [~jose@216.64.28.214] has quit [Client Quit]
20:28 -!- joc1985 [~jose@216.64.28.214] has joined #go-nuts
20:31 < joc1985> hi all, anyone have a quick example of how to do a dynamic
size array in go?
20:31 < skelterjohn> look at container/vector/Vector.go
20:31 < skelterjohn> it's Add() method will resize when necessary
20:31 < skelterjohn> its, i mean
20:31 < joc1985> skelter is that for me?
20:31 < skelterjohn> yes
20:31 < joc1985> oh cool thanks!  :-d
20:32 -!- joc1985 [~jose@216.64.28.214] has quit [Client Quit]
20:35 -!- b00m_chef [~watr@xx208110096208.cipherkey.com] has quit [Ping timeout:
265 seconds]
20:37 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 276 seconds]
20:49 < nickaugust> exch: it seems that close(c) sends a "" down the channel
as well...  so if my loop sends c <- "" for some reason that will close the
channel?
20:50 < exch> it won't close the channel, just send an empty string
20:50 < nickaugust> interesting...  but close(c) does send a "" before
closing the chan?
20:50 < exch> you'll have to check if the value you get from the channel !=
"" then
20:50 < skelterjohn> close sends a zero-value
20:50 < exch> yes I noticed
20:50 < skelterjohn> which for strings is ""
20:50 < exch> that is a bit strange
20:51 < exch> why would it do that?
20:51 < nickaugust> yeah but if I !closed(c) it still runs the loop one more
time
20:51 < nickaugust> and the "" is processed...  seems silly
20:52 < skelterjohn> if you do "for ; !closed(c); val <- c { }
20:52 < nickaugust> so I do if r == "" { continue; } and the next time
closed(c) returns true
20:52 < skelterjohn> it should work as expected
20:52 < nickaugust> ah
20:52 < exch> that ending nil value seems a bit superfluous
20:58 < plexdev> http://is.gd/f1opC by [Ian Lance Taylor] in
go/test/fixedbugs/ -- test: Actually run bug296.
20:58 < plexdev> http://is.gd/f1opI by [Ian Lance Taylor] in
go/test/fixedbugs/ -- test: Match gccgo error messages.
21:02 < skelterjohn> maybe iant can explain the motivation
21:02 <+iant> you get an extra value before you see that the channel is
closed in order to avoid race conditions
21:02 <+iant> is that what the question was?
21:02 < cbeck> why not just for val := range c ?
21:02 <+iant> otherwise you wouldn't know whether you had read all the data
from the channel
21:02 <+iant> yeah, the range clause takes care of that for you
21:02 -!- jdp [gu@24.238.32.162.res-cmts.segr.ptd.net] has quit [Ping timeout: 276
seconds]
21:02 < exch> hmm but an empty string may well be part of the list you are
sending through the channel
21:02 -!- evilhackerdude [~stephan@evilhackerdu.de] has quit [Ping timeout: 276
seconds]
21:02 <+iant> you have to read a value, then test closed; if closed returns
true, then you ignore the value you just read
21:02 < exch> the loop will break prematurely in that case and the goroutine
will deadlock
21:02 < nickaugust> i havent worked with it enough to judge but it was
certainly unexpected
21:02 -!- Guldlok [~mvs@95.166.161.93] has quit [Ping timeout: 276 seconds]
21:02 -!- felipe [~felipe@my.nada.kth.se] has quit [Ping timeout: 276 seconds]
21:02 <+iant> I haven't looked at the code but I don't see how that could
cause a premature break
21:02 -!- cw [~cw@71.6.196.126] has quit [Ping timeout: 276 seconds]
21:02 < skelterjohn> if a channel might close, use either range, val, ok
<- chan, or !closed(chan)
21:02 -!- nictuku [~nictuku@unaffiliated/nictuku] has quit [Ping timeout: 276
seconds]
21:02 < skelterjohn> "range" and "val, ok <- chan" being two separate
options
21:02 -!- forgey_ [brook@seahawk.ript.net] has quit [Remote host closed the
connection]
21:02 -!- Robbo__ [~robbo@CPE-58-166-67-209.lnse5.cht.bigpond.net.au] has quit
[Ping timeout: 276 seconds]
21:02 -!- thomas_b [~thomasb@cm-84.215.47.51.getinternet.no] has quit [Ping
timeout: 276 seconds]
21:02 < exch> ah
21:02 < exch> http://pastebin.com/XXDYJrXQ seems to work properly this way
21:02 -!- Guldlok_ [~mvs@95.166.161.93] has joined #go-nuts
21:02 -!- Robbo_ [~robbo@CPE-58-166-67-209.lnse5.cht.bigpond.net.au] has joined
#go-nuts
21:02 < skelterjohn> more or less.  the problem is when zero values are
things that could be sent over the channel
21:02 < skelterjohn> with a chan int, for example
21:02 < nickaugust> where would the race condition occur?
21:02 < skelterjohn> multiple goroutines both trying to read all values from
the channel
21:02 < skelterjohn> if they check closed(c) before reading, there is no
guarantee that it will behave properly
21:02 < skelterjohn> both goroutines could check closed(c)
21:02 < skelterjohn> range c isn't threadsafe
21:02 < skelterjohn> oh, it does now?
21:02 < nickaugust> oooh..  gotcha
21:02 < skelterjohn> i remember filing an issue about that, and it seemed
like is was becoming a "nofix"
21:02 < skelterjohn>
http://code.google.com/p/go/issues/detail?id=397&can=5&colspec=ID%20Priority%20Status%20Owner%20Reporter%20Summary
21:02 -!- LeNsTR [~lenstr@unaffiliated/lenstr] has quit [Quit: LeNsTR]
21:02 < skelterjohn> iant: that also seems not threadsafe
21:02 -!- forgey [brook@seahawk.ript.net] has joined #go-nuts
21:02 -!- thomas_b [~thomasb@cm-84.215.47.51.getinternet.no] has joined #go-nuts
21:02 <+iant> yes, if multiple clients read from a channel, and they check
closed, and zero values are valid values on the channel, then you have a problem
21:02 <+iant> not sure how to avoid that
21:02 < skelterjohn> race conditions often "seem to work properly"
21:02 -!- cw [~cw@parsec.stupidest.org] has joined #go-nuts
21:02 -!- Venom_X [~pjacobs@74.61.90.217] has quit [Ping timeout: 276 seconds]
21:02 -!- evilhack1rdude [~stephan@evilhackerdu.de] has joined #go-nuts
21:02 -!- Fish [~Fish@9fans.fr] has quit [Remote host closed the connection]
21:02 -!- Venom_X [~pjacobs@74.61.90.217] has joined #go-nuts
21:03 -!- ukai [~ukai@nat/google/x-rkhntgxszjzlzzdi] has quit [Ping timeout: 265
seconds]
21:03 -!- Guldlok_ [~mvs@95.166.161.93] has quit [Client Quit]
21:03 -!- ukai [~ukai@nat/google/x-euzuyujzpyeetgwh] has joined #go-nuts
21:03 < skelterjohn> the answer that i thought sounded the best was for
"val, ok <- ch" not be the non-blocking version it is now, but instead block
and have ok = false if the channel was closed
21:04 < skelterjohn> a non-blocking channel read could still be done via
select
21:04 < skelterjohn> but that would require lots of code rewrite
21:05 -!- paulzhol [~yuval@46-116-252-230.bb.netvision.net.il] has quit [Remote
host closed the connection]
21:06 -!- mafs [~maikeru@unaffiliated/maikeru/x-7708887] has joined #go-nuts
21:07 -!- snearch [~snearch@f053005165.adsl.alicedsl.de] has quit [Quit:
Verlassend]
21:11 -!- gnuvince_ [~vince@70.35.168.202] has quit [Ping timeout: 240 seconds]
21:12 -!- major_majors [~major_maj@166.132.74.43] has joined #go-nuts
21:12 -!- major_majors [~major_maj@166.132.74.43] has left #go-nuts []
21:12 -!- gnuvince [~vince@70.35.173.114] has quit [Ping timeout: 260 seconds]
21:14 -!- skelterjohn [~jasmuth@lawn-net168-in.rutgers.edu] has quit [Quit:
skelterjohn]
21:14 < plexdev> http://is.gd/f1pya by [Ian Lance Taylor] in
go/test/fixedbugs/ -- test: Recognize gccgo error messages.
21:18 < Soultaker> I agree with skelterjohn
21:18 < Soultaker> it always seemed strange to me that there is no atomic
way to read a value from a channel and check whether it succeeded
21:18 < Soultaker> (while intuition suggests channel operations should be
atomic)
21:25 -!- prudhvi [~nobody@nullpointer.in] has quit [Quit: Lost terminal]
21:27 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
21:34 -!- welterde [~welterde@not.welterde.de] has quit [Ping timeout: 252
seconds]
21:35 -!- wrtp [~rog@92.16.124.106] has quit [Quit: wrtp]
21:40 -!- wrtp [~rog@92.16.124.106] has joined #go-nuts
21:40 -!- wrtp [~rog@92.16.124.106] has quit [Client Quit]
21:41 -!- wrtp [~rog@92.16.124.106] has joined #go-nuts
21:48 -!- wrtp [~rog@92.16.124.106] has quit [Quit: wrtp]
21:52 -!- jcao219 [~jcao219@pool-173-74-61-111.dllstx.fios.verizon.net] has joined
#go-nuts
21:58 -!- mattikus [~mattikus@ip24-250-73-154.br.br.cox.net] has joined #go-nuts
21:59 -!- gnuvince [~vince@70.35.168.205] has joined #go-nuts
22:00 -!- Venom_X [~pjacobs@74.61.90.217] has quit [Ping timeout: 276 seconds]
22:00 -!- d_m [d6@SDF.ORG] has joined #go-nuts
22:01 -!- Venom_X [~pjacobs@66.54.185.131] has joined #go-nuts
22:02 -!- gnuvince_ [~vince@70.35.173.114] has joined #go-nuts
22:03 -!- rlab [~Miranda@91.200.158.34] has quit [Quit: Miranda IM! Smaller,
Faster, Easier.  http://miranda-im.org]
22:04 -!- ShadowIce` [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit:
Verlassend]
22:04 -!- photron [~photron@port-92-201-234-58.dynamic.qsc.de] has quit [Ping
timeout: 272 seconds]
22:12 -!- deso [~deso@x0561a.wh30.tu-dresden.de] has quit [Remote host closed the
connection]
22:13 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined
#go-nuts
22:14 -!- ikaros [~ikaros@188.107.208.221] has quit [Quit: Leave the magic to
Houdini]
22:20 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Remote
host closed the connection]
22:21 -!- skelterjohn [~jasmuth@c-68-32-232-108.hsd1.nj.comcast.net] has joined
#go-nuts
22:21 -!- royger [~royger@166.19.21.95.dynamic.jazztel.es] has quit [Quit: Lost
terminal]
22:23 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined
#go-nuts
22:23 < steven_t> guys
22:24 < nbjoerg> lady
22:25 < steven_t> in C, if A contains a struct and you do B = A, it copies
the struct.  in Go, if you have var B struct{i int} = A, will that reference the
existing struct from 2 places (A and B) like in python/ruby/etc, or will it copy
it like in C?
22:26 < Eridius> I would assume it copies it, though I don't know offhand
22:26 < steven_t> oh hi Eridius
22:26 < Eridius> you should be able to test this fairly trivially
22:26 < steven_t> hows stuff
22:26 < Eridius> hi steven_t
22:26 < steven_t> still hang out in #macdev?
22:26 < yiyus> go always copy, it is in some faq i think
22:26 < Eridius> yeah, though I just lurk these days
22:26 < steven_t> yiyus: i looked in "assignment" in the spec, saw no
mention of it
22:27 < steven_t> Eridius: cool.  yeah im still banned from there.  its a
lifelong ban i guess
22:27 < steven_t> but thats ok, its not the only place on the net
22:27 < Eridius> who banned you?
22:27 < steven_t> eddienull with arwyns support
22:27 < yiyus> i remember learning it in some discussion about function
arguments, but dont know where
22:27 < steven_t> i reeeally earned the ban, though
22:27 < Eridius> oh, I can't do anything about that then
22:27 < Eridius> if it was RTFM_FTW then it would be a different matter
22:27 < steven_t> but man it was so long ago, you'd think people forgive
and/or forget, eh?
22:28 < Eridius> you could always try asking nicely, though knowing them,
you probably won't have much luck
22:29 < steven_t> i did ask eddienull a few months ago.  and i think it
worked, since i was magically unbanned for a few days.  then arwyn banned me and
scolded me in PM for not knowing what a permaban was
22:29 < steven_t> aaanyway.  so how do you like Go?
22:30 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Ping
timeout: 246 seconds]
22:30 < steven_t> im trying to convince mikeash to take a look at it, but
hes so in love with C, i guess because its so portable and low level
22:31 < Tonnerre> C <3
22:31 -!- tav [~tav@2001:0:53aa:64c:0:3ffa:a3f8:a4f5] has quit [Quit: tav]
22:31 < steven_t> yeah C is nice.  Go is nice too.
22:31 < Tonnerre> Exactly
22:31 < steven_t> (but Ruby kicks everyone elses ass)
22:32 < napsy> such arrogance
22:32 < steven_t> no no no, you misunderstand
22:32 < steven_t> i dont think any language is better than any other.
22:32 < steven_t> (except Ruby, which is better than any other)
22:33 -!- Sseur [~david@mic92-12-88-161-108-143.fbx.proxad.net] has quit [Ping
timeout: 272 seconds]
22:37 < steven_t> look all im saying is im tired of ObjC's (C's)
limitations.  and so here i am.
22:39 -!- awidegreen [~quassel@62.176.237.78] has quit [Remote host closed the
connection]
22:41 < Eridius> steven_t: convincing mikeash to do anything is like pulling
teeth
22:41 < steven_t> lol.  he says he'll use it if i write Objective-Go ;)
22:41 < Eridius> steven_t: I used to like Ruby.  Then I tried using it in a
production environment
22:41 -!- major_majors [~major_maj@c-68-40-195-246.hsd1.mi.comcast.net] has joined
#go-nuts
22:41 < steven_t> i havent done that yet ;)
22:41 < steven_t> which might be why i still like Ruby :D
22:41 < Eridius> dynamic typing coupled with interpreted language == major
pain
22:42 < Eridius> there's a reason Ruby pushes unit tests and 100% code
coverage so heavily.  Because it's absolutely necessary in an environment where
you don't have compile-time checking
22:42 < steven_t> i dunno.  i think if you dont abuse it or write stupid
code, then it should be fine
22:42 < steven_t> but with things like RoR, or Sinatra, i havent seen anyone
do it any other way
22:42 < Eridius> naw, you can make a simple typo and won't even realize it
until that line of code is executed
22:42 < Eridius> Ruby is great for quick scripts.  But I wouldn't use it for
anything else
22:43 < Eridius> I don't think people realize what a problem it is for web
dev because web dev has historically been using interpreted languages anyway
22:43 < steven_t> looks like it does copy.  though i would have guessed it
would assign, like in Python or Ruby
22:44 < nbjoerg> Eridius: the problem is more that as soon as you start to
aggressively use a database or so, the advantages of static typing often disappear
too
22:44 < steven_t> seein as how Go is all about type-inferrence and vars are
just containers for values
22:44 < nbjoerg> Eridius: because they normally don't deal well with the
domain switch
22:44 < Eridius> steven_t: interfaces are boxes.
22:44 < Eridius> steven_t: but a struct-typed var isn't a box
22:45 < steven_t> Eridius: remember when websites were written in C?
22:45 < steven_t> (before they were written inperl)
22:45 < Eridius> nbjoerg: perhaps, although there's some interesting stuff
even there.  IIRC a while back someone came up with a compile-time-checked DSL to
do SQL queries in a compiled language (I think it was OCaml)
22:45 < nbjoerg> it is possible, but not generally used
22:45 * steven_t HATES ruby's DSL-ability, via class_eval and instance_eval
22:46 -!- kanru [~kanru@118-160-165-166.dynamic.hinet.net] has joined #go-nuts
22:46 < Eridius> steven_t: you should see the kind of hacks I wrote for
Thrift Ruby
22:46 < Eridius> a couple yeras ago I did a major overhaul of the Thrift
ruby library, including changing all the class names
22:46 < steven_t> but anyway yeah.  b = *a copies the value.
22:46 < steven_t> Eridius: wow scary
22:46 < Eridius> and used major runtime hackery to get the old names to
still work, and yet print out a warning to console
22:47 < Eridius> last I checked that's gone now, which is good, as it was
meant to be a stopgap to get people to move to the new namespaced names
22:47 < steven_t> yeah, Ruby is powerful.  i like that but i cant think of
any way i could see someone using that power in a controlled manner that i would
ever want to use
22:47 -!- Eridius [~kevin@unaffiliated/eridius] has quit [Remote host closed the
connection]
22:48 -!- Eridius [~kevin@unaffiliated/eridius] has joined #go-nuts
22:48 < steven_t> hey man feel free to come by #giantrobot any time
22:48 < Eridius> ugh, irssi segfaulted
22:48 < Eridius> what's #giantrobot?
22:48 -!- duaneb [80ef9d30@gateway/web/freenode/ip.128.239.157.48] has joined
#go-nuts
22:48 < duaneb> hey guys
22:48 < duaneb> anyone around to ask a question?
22:48 < duaneb> or rather, to answer one?
22:49 < nbjoerg> I was about to ask why you wanted someone to ask questions
22:49 < Xenith> Why doesn't a woodchuck chuck wood?
22:49 < steven_t> Eridius: its the sack into which i shove the smart people
i find on freenode
22:49 < steven_t> (and then i watch them fight over peanuts for
entertainment)
22:50 < steven_t> err, i mean..  its just some channel
22:50 < Eridius> duaneb: nobody here but us cookies
22:50 -!- gnuvince_ [~vince@70.35.173.114] has quit [Ping timeout: 240 seconds]
22:50 < Eridius> haha
22:50 < duaneb> heh
22:50 < duaneb> ok
22:50 < duaneb> brb lemme repair
22:50 < duaneb> err, prepare*
22:50 -!- ronnyy [~quassel@2001:6f8:12c6:2a:224:1dff:fed7:9541] has joined
#go-nuts
22:50 -!- gnuvince [~vince@70.35.168.205] has quit [Ping timeout: 240 seconds]
22:50 < duaneb> I don't wanna file a bug report without looking really
stupid
22:50 < Xenith> File it while wearing a banana hat?
22:51 < duaneb> umm
22:51 < duaneb> what pastebin do y'all use?
22:51 < cbeck> pastie.org
22:51 < Eridius> gist.github.com
22:51 < nickaugust> sprunge.us
22:52 < duaneb> ok
22:52 < duaneb> heh
22:52 < duaneb> ok, so here's an example file:
22:52 < duaneb> http://pastie.org/1147009
22:52 < Xenith> rafb.net
22:52 < duaneb> I thought that rafb.net closed :/
22:52 < Xenith> I know, such a shame.
22:52 < duaneb> heh yea
22:52 < duaneb> it's some guy's blog now.  o.O
22:52 < Tonnerre> I typically just scp a file to my server
22:53 < duaneb> anyway, in that file ^^
22:53 < nbjoerg> me too
22:53 < duaneb> one of the go files produced by cgo fails to compile with
the error
22:53 < duaneb> test.go:5[test.cgo1.go:7]: cannot use *_Cvar_mystruct_struct
(type _Ctypedef_mystruct) as type MyStruct in assignment
22:53 < duaneb> oh, right, forgot a crucial bit of information
22:53 < nickaugust> ive got a shell script that I pipe to that posts to
sprunge.us.  so in sam '25,50>url' works nice
22:54 < duaneb> http://gist.github.com/571009
22:54 < duaneb> that's the c header where the struct is defined and
mystruct_struct is declared
22:54 < duaneb> So, shouldn't the type of mystruct_struct technically be
_Ctypedef_mystruct?
22:57 -!- gnuvince [~vince@70.35.173.114] has joined #go-nuts
22:59 < duaneb> :(
22:59 -!- nictuku [~nictuku@cetico.org] has joined #go-nuts
23:00 -!- felipe [~felipe@my.nada.kth.se] has joined #go-nuts
23:00 -!- General13372 [~support@71-84-244-55.dhcp.gldl.ca.charter.com] has joined
#go-nuts
23:00 -!- mattikus [~mattikus@ip24-250-73-154.br.br.cox.net] has quit [Remote host
closed the connection]
23:00 < duaneb> all relevant files are in http://gist.github.com/571009
23:01 -!- gnuvince_ [~vince@70.35.168.205] has joined #go-nuts
23:02 -!- General1337 [~support@71-84-244-55.dhcp.gldl.ca.charter.com] has quit
[Ping timeout: 252 seconds]
23:03 < duaneb> oh never mind
23:03 < duaneb> goddammit
23:03 < duaneb> excuse my language :(
23:05 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
23:26 -!- gnuvince [~vince@70.35.173.114] has quit [Ping timeout: 264 seconds]
23:26 -!- gnuvince_ [~vince@70.35.168.205] has quit [Ping timeout: 255 seconds]
23:27 -!- iant [~iant@nat/google/x-ulhvmhgayjqtxtvg] has quit [Read error:
Operation timed out]
23:27 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined
#go-nuts
23:28 -!- rbetts [~rbetts@173-166-80-33-newengland.hfc.comcastbusiness.net] has
quit [Quit: rbetts]
23:28 -!- falconindy [~noclaf@unaffiliated/falconindy] has quit [Ping timeout: 272
seconds]
23:29 -!- duaneb [80ef9d30@gateway/web/freenode/ip.128.239.157.48] has quit [Ping
timeout: 252 seconds]
23:30 -!- falconindy [~noclaf@unaffiliated/falconindy] has joined #go-nuts
23:33 -!- iant [~iant@66.109.106.2] has joined #go-nuts
23:34 -!- mode/#go-nuts [+v iant] by ChanServ
23:35 -!- mbohun [~mbohun@202.124.73.128] has joined #go-nuts
23:35 -!- bohunm [~mbohun@202.124.72.52] has joined #go-nuts
23:37 -!- bohunm [~mbohun@202.124.72.52] has quit [Client Quit]
23:38 -!- bohunm [~mbohun@202.124.72.52] has joined #go-nuts
23:38 -!- bohunm [~mbohun@202.124.72.52] has quit [Client Quit]
23:39 -!- gnuvince [~vince@70.35.173.114] has joined #go-nuts
23:39 -!- mbohun [~mbohun@202.124.73.128] has quit [Ping timeout: 258 seconds]
23:40 -!- mbohun [~mbohun@202.124.72.52] has joined #go-nuts
23:41 -!- welterde [~welterde@2001:470:1f0b:592:10:1:1:0] has joined #go-nuts
23:41 -!- gnuvince_ [~vince@70.35.168.205] has joined #go-nuts
23:42 -!- artefon [~thiago@189.107.129.61] has joined #go-nuts
23:45 -!- Venom_X [~pjacobs@66.54.185.131] has quit [Quit: Venom_X]
23:45 -!- l00t [~i-i3id3r_@189.105.125.72] has joined #go-nuts
23:49 -!- jmettraux [~jmettraux@211.19.55.177] has joined #go-nuts
23:59 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Read error: Connection
reset by peer]
--- Log closed Thu Sep 09 00:00:06 2010