--- Log opened Sat Sep 25 00:00:07 2010 00:00 -!- MaksimBurnin [~max@44.188-224-87.telenet.ru] has quit [Ping timeout: 240 seconds] 00:01 -!- mbohun [~mbohun@ppp115-156.static.internode.on.net] has joined #go-nuts 00:06 -!- niemeyer [~niemeyer@201-35-72-214.pltce701.dsl.brasiltelecom.net.br] has joined #go-nuts 00:07 -!- photron [~photron@port-92-201-19-184.dynamic.qsc.de] has quit [Ping timeout: 240 seconds] 00:10 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined #go-nuts 00:11 -!- yihuang [~yihuang@183.17.151.98] has joined #go-nuts 00:11 -!- yihuang [~yihuang@183.17.151.98] has left #go-nuts [] 00:14 < plexdev> http://is.gd/frmP9 by [Ian Lance Taylor] in go/test/fixedbugs/ -- test: Add test which causes incorrect error from gccgo. 00:17 -!- kingfishr_ [~kingfishr@38.108.184.253] has quit [Ping timeout: 240 seconds] 00:31 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has quit [Ping timeout: 240 seconds] 00:36 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has joined #go-nuts 00:37 -!- mbohun [~mbohun@ppp115-156.static.internode.on.net] has quit [Quit: Leaving] 00:37 -!- mbohun [~mbohun@ppp115-156.static.internode.on.net] has joined #go-nuts 00:41 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 255 seconds] 00:44 -!- MX80 [~MX80@cust253.253.117.74.dsl.g3telecom.net] has quit [Remote host closed the connection] 00:44 -!- Eridius [~kevin@unaffiliated/eridius] has quit [Quit: brb] 00:45 -!- Eridius [~kevin@unaffiliated/eridius] has joined #go-nuts 00:50 -!- jA_cOp [~yakobu@unaffiliated/ja-cop/x-9478493] has joined #go-nuts 00:55 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Remote host closed the connection] 00:59 -!- aho [~nya@fuld-4d00d7bd.pool.mediaWays.net] has quit [Quit: EXEC_over.METHOD_SUBLIMATION] 01:02 -!- iant [~iant@67.218.106.122] has quit [Quit: Leaving.] 01:12 -!- ukai [~ukai@nat/google/x-cmatqildnftyvkem] has quit [Ping timeout: 276 seconds] 01:14 -!- ukai [~ukai@nat/google/x-xukegvkesbkmjiqd] has joined #go-nuts 01:14 -!- navigator [~navigator@p548973DE.dip.t-dialin.net] has quit [Ping timeout: 264 seconds] 01:21 < exch> durr. utf16.Encode() returns a slice of uint16 codepoints. No hassle with runes needed 01:25 -!- Bombe [~droden@weltgehirnmaschine.de] has quit [Changing host] 01:25 -!- Bombe [~droden@freenet/developer/Bombe] has joined #go-nuts 01:29 -!- JWHardcastle [~jwhardcas@pool-173-75-161-183.bltmmd.east.verizon.net] has joined #go-nuts 01:34 -!- buluca [~buluca@unaffiliated/buluca] has joined #go-nuts 01:34 -!- buluca [~buluca@unaffiliated/buluca] has left #go-nuts [] 01:42 -!- napsy [~luka@88.200.96.18] has joined #go-nuts 01:43 -!- DerHorst [~Horst@e176101218.adsl.alicedsl.de] has joined #go-nuts 01:45 -!- Tv [~tv@gige.bur.digisynd.com] has quit [Ping timeout: 245 seconds] 01:46 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has joined #go-nuts 01:46 -!- mode/#go-nuts [+v iant] by ChanServ 02:02 -!- major_majors [~major_maj@173-10-44-57-Michigan.hfc.comcastbusiness.net] has joined #go-nuts 02:05 -!- mikespook [~mikespook@58.61.203.160] has joined #go-nuts 02:13 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined #go-nuts 02:20 -!- jhawk28 [~jhawk28@user-142gfte.cable.mindspring.com] has joined #go-nuts 02:26 < enferex> why hello jhawk28 02:26 -!- JWHardcastle [~jwhardcas@pool-173-75-161-183.bltmmd.east.verizon.net] has quit [Quit: JWHardcastle] 02:29 -!- Tv [~tv@cpe-76-168-227-45.socal.res.rr.com] has joined #go-nuts 02:34 -!- major_majors [~major_maj@173-10-44-57-Michigan.hfc.comcastbusiness.net] has quit [Quit: major_majors] 02:44 < jhawk28> enferex: hello 02:48 -!- DerHorst [~Horst@e176101218.adsl.alicedsl.de] has quit [Remote host closed the connection] 02:53 -!- jA_cOp [~yakobu@unaffiliated/ja-cop/x-9478493] has quit [Read error: Connection reset by peer] 02:54 -!- jA_cOp [~yakobu@unaffiliated/ja-cop/x-9478493] has joined #go-nuts 02:55 -!- jA_cOp [~yakobu@unaffiliated/ja-cop/x-9478493] has quit [Client Quit] 02:56 -!- Eridius [~kevin@unaffiliated/eridius] has quit [Read error: Operation timed out] 02:58 < scyth> can slices be a regular element inside struct? 02:59 -!- jA_cOp [~yakobu@unaffiliated/ja-cop/x-9478493] has joined #go-nuts 03:01 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit: This computer has gone to sleep] 03:01 -!- codo [75c02639@gateway/web/freenode/ip.117.192.38.57] has joined #go-nuts 03:07 -!- jhawk28 [~jhawk28@user-142gfte.cable.mindspring.com] has quit [Remote host closed the connection] 03:11 -!- jA_cOp_ [~yakobu@unaffiliated/ja-cop/x-9478493] has joined #go-nuts 03:14 -!- jA_cOp [~yakobu@unaffiliated/ja-cop/x-9478493] has quit [Ping timeout: 240 seconds] 03:15 -!- dacc [~Adium@D-128-95-10-133.dhcp4.washington.edu] has quit [Quit: Leaving.] 03:19 -!- codo [75c02639@gateway/web/freenode/ip.117.192.38.57] has quit [Quit: Page closed] 03:41 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 265 seconds] 03:57 < uriel> scyth: sure, why wouldn't they? 03:57 < scyth> uriel, yeah.. figured it out by now 03:57 < scyth> btw, any examples on simple udp client/server? 03:58 < scyth> or tcp .. for that matter 04:02 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Ping timeout: 252 seconds] 04:05 < uriel> see under net/ package 04:05 -!- jcao219 [~jcao219@pool-173-74-61-111.dllstx.fios.verizon.net] has joined #go-nuts 04:05 < uriel> eg., net/dict 04:05 < uriel> (not sure about udp) 04:08 -!- jcao219 [~jcao219@pool-173-74-61-111.dllstx.fios.verizon.net] has quit [Disconnected by services] 04:08 -!- jcao219_ [~jcao219@pool-173-74-61-111.dllstx.fios.verizon.net] has joined #go-nuts 04:08 -!- jcao219 [~jcao219@pool-173-74-61-111.dllstx.fios.verizon.net] has joined #go-nuts 04:08 -!- jcao219_ [~jcao219@pool-173-74-61-111.dllstx.fios.verizon.net] has quit [Read error: Connection reset by peer] 04:08 -!- jcao219 [~jcao219@pool-173-74-61-111.dllstx.fios.verizon.net] has quit [Read error: Connection reset by peer] 04:27 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined #go-nuts 04:42 -!- napsy [~luka@88.200.96.18] has joined #go-nuts 04:46 -!- fabled [~fabled@letku109.adsl.netsonic.fi] has quit [Quit: Ex-Chat] 04:55 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit: This computer has gone to sleep] 05:01 -!- scm [justme@d071211.adsl.hansenet.de] has quit [Ping timeout: 255 seconds] 05:03 -!- scm [scm@d019042.adsl.hansenet.de] has joined #go-nuts 05:04 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts 05:22 -!- res [c9ed8246@gateway/web/freenode/ip.201.237.130.70] has quit [Ping timeout: 252 seconds] 05:32 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3] 05:41 -!- yihuang [~yihuang@183.17.160.183] has joined #go-nuts 05:41 -!- yihuang [~yihuang@183.17.160.183] has left #go-nuts [] 05:42 -!- niemeyer [~niemeyer@201-35-72-214.pltce701.dsl.brasiltelecom.net.br] has quit [Ping timeout: 245 seconds] 06:11 -!- skelterjohn [~jasmuth@c-76-124-135-199.hsd1.nj.comcast.net] has joined #go-nuts 06:30 -!- MaksimBurnin [~max@44.188-224-87.telenet.ru] has joined #go-nuts 06:37 -!- virtualsue [~chatzilla@93-97-62-8.zone5.bethere.co.uk] has joined #go-nuts 06:38 -!- Drahgkar [~Drahgkar@66.93.162.10] has joined #go-nuts 06:38 -!- ikaros [~ikaros@188.107.221.102] has joined #go-nuts 06:41 -!- ssjones [~ssjones@67-61-100-203.cpe.cableone.net] has quit [Read error: Connection reset by peer] 06:42 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 276 seconds] 06:48 -!- napsy [~luka@88.200.96.18] has joined #go-nuts 06:49 -!- ssjones [~ssjones@67-61-100-203.cpe.cableone.net] has joined #go-nuts 06:52 -!- Drahgkar [~Drahgkar@66.93.162.10] has left #go-nuts ["Leaving"] 06:58 -!- jhh [~jhh@f048202058.adsl.alicedsl.de] has joined #go-nuts 06:59 -!- MaksimBurnin [~max@44.188-224-87.telenet.ru] has quit [Ping timeout: 272 seconds] 07:01 -!- tasosos [~tasosos@178.128.49.242.dsl.dyn.forthnet.gr] has joined #go-nuts 07:13 -!- skejoe [~skejoe@188.114.142.231] has joined #go-nuts 07:18 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts 07:20 -!- ikaros [~ikaros@188.107.221.102] has quit [Quit: Leave the magic to Houdini] 07:23 -!- dacc [~Adium@c-67-171-32-251.hsd1.wa.comcast.net] has joined #go-nuts 07:34 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-177-190.clienti.tiscali.it] has joined #go-nuts 07:42 -!- tumdum_ [~tumdum@unaffiliated/tumdum] has joined #go-nuts 07:51 -!- awidegreen [~quassel@62.176.237.78] has joined #go-nuts 07:51 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 240 seconds] 07:54 -!- napsy [~luka@88.200.96.18] has joined #go-nuts 07:54 -!- virtualsue [~chatzilla@93-97-62-8.zone5.bethere.co.uk] has quit [Ping timeout: 265 seconds] 07:57 -!- yihuang [~yihuang@183.17.159.57] has joined #go-nuts 07:58 -!- yihuang [~yihuang@183.17.159.57] has left #go-nuts [] 08:07 -!- jmettraux [~jmettraux@PPPbm5391.kanagawa-ip.dti.ne.jp] has joined #go-nuts 08:10 -!- tumdum_ [~tumdum@unaffiliated/tumdum] has quit [Quit: tumdum_] 08:12 -!- mikespook1 [~mikespook@58.61.203.135] has joined #go-nuts 08:13 -!- mikespook [~mikespook@58.61.203.160] has quit [Ping timeout: 240 seconds] 08:16 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts 08:34 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has joined #go-nuts 08:38 -!- virtualsue [~chatzilla@93-97-62-8.zone5.bethere.co.uk] has joined #go-nuts 08:39 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts 08:48 -!- fenicks [~christian@log77-3-82-243-254-112.fbx.proxad.net] has joined #go-nuts 08:49 < fenicks> hello 08:49 -!- terrex [~terrex@84.122.67.111.dyn.user.ono.com] has joined #go-nuts 08:58 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 276 seconds] 09:02 -!- dacc [~Adium@c-67-171-32-251.hsd1.wa.comcast.net] has quit [Ping timeout: 240 seconds] 09:03 < virtualsue> hello :) 09:04 -!- terrex [~terrex@84.122.67.111.dyn.user.ono.com] has quit [Ping timeout: 245 seconds] 09:05 -!- napsy [~luka@88.200.96.18] has joined #go-nuts 09:15 -!- wrtp [~rog@92.17.36.40] has joined #go-nuts 09:16 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has quit [Quit: slashus2] 09:22 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 265 seconds] 09:26 -!- virtualsue [~chatzilla@93-97-62-8.zone5.bethere.co.uk] has quit [Ping timeout: 265 seconds] 09:36 -!- mikespook1 [~mikespook@58.61.203.135] has quit [Quit: Leaving.] 09:38 -!- virtualsue [~chatzilla@nat/cisco/x-skwxtiyhoqdagffj] has joined #go-nuts 09:38 -!- DanC [~dconnolly@user1.kumc.edu] has quit [Ping timeout: 252 seconds] 09:42 -!- DanC [~dconnolly@user1.kumc.edu] has joined #go-nuts 09:49 -!- Fish [~Fish@9fans.fr] has joined #go-nuts 09:50 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts 10:05 -!- tvw [~tv@e176006015.adsl.alicedsl.de] has joined #go-nuts 10:05 -!- wrtp [~rog@92.17.36.40] has quit [Quit: wrtp] 10:06 -!- napsy [~luka@88.200.96.18] has quit [Read error: Operation timed out] 10:08 -!- DerHorst [~Horst@e176101218.adsl.alicedsl.de] has joined #go-nuts 10:09 -!- napsy [~luka@88.200.96.18] has joined #go-nuts 10:11 -!- skejoe [~skejoe@188.114.142.231] has quit [Quit: leaving] 10:19 -!- xb95 [~weechat@xb95.com] has quit [Changing host] 10:19 -!- xb95 [~weechat@dreamwidth/staff/mark] has joined #go-nuts 10:20 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts 10:25 -!- femtoo [~femto@95-89-248-241-dynip.superkabel.de] has joined #go-nuts 10:29 -!- tvw [~tv@e176006015.adsl.alicedsl.de] has quit [Ping timeout: 245 seconds] 10:30 -!- tvw [~tv@e176006015.adsl.alicedsl.de] has joined #go-nuts 10:44 -!- gmilleramilar [~gmiller@184-106-207-119.static.cloud-ips.com] has quit [Ping timeout: 264 seconds] 10:45 -!- gmilleramilar [~gmiller@184-106-207-119.static.cloud-ips.com] has joined #go-nuts 10:47 -!- nsf [~nsf@jiss.convex.ru] has quit [Read error: Connection reset by peer] 10:48 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts 10:50 -!- femtoo [~femto@95-89-248-241-dynip.superkabel.de] has quit [Quit: Leaving] 10:51 -!- gmilleramilar [~gmiller@184-106-207-119.static.cloud-ips.com] has quit [Ping timeout: 255 seconds] 10:53 -!- gmilleramilar [~gmiller@184-106-207-119.static.cloud-ips.com] has joined #go-nuts 11:00 -!- Soultaker [~Soultaker@hell.student.utwente.nl] has quit [Read error: Connection reset by peer] 11:01 -!- Soultaker [~Soultaker@hell.student.utwente.nl] has joined #go-nuts 11:04 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-177-190.clienti.tiscali.it] has quit [Quit: E se abbasso questa leva che succ...] 11:10 -!- jA_cOp_ [~yakobu@unaffiliated/ja-cop/x-9478493] has quit [Quit: Leaving] 11:33 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Ping timeout: 276 seconds] 11:33 -!- virtualsue [~chatzilla@nat/cisco/x-skwxtiyhoqdagffj] has quit [Ping timeout: 240 seconds] 11:36 < plexdev> http://is.gd/fsnBM by [Alex Brainman] in go/src/pkg/syscall/ -- syscall: add IPPROTO_IPV6 and IPV6_V6ONLY const to fix nacl and windows build 11:40 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined #go-nuts 11:49 < napsy> Hello. How do I use the gopprof profile on my go program. Do I have to specify any flags when compiling? 11:54 -!- norayr [~noch@212.34.238.61] has quit [Remote host closed the connection] 12:04 -!- niemeyer [~niemeyer@201-35-72-214.pltce701.dsl.brasiltelecom.net.br] has joined #go-nuts 12:15 -!- lmoura__ [~lauromour@187.59.119.7] has quit [Read error: Connection reset by peer] 12:17 -!- lmoura__ [~lauromour@187.59.120.160] has joined #go-nuts 12:48 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts 12:53 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts 13:14 -!- ukai [~ukai@nat/google/x-xukegvkesbkmjiqd] has quit [Ping timeout: 252 seconds] 13:15 -!- MX80 [~MX80@cust253.253.117.74.dsl.g3telecom.net] has joined #go-nuts 13:16 -!- ukai [~ukai@nat/google/x-vvtclmpcnfadptux] has joined #go-nuts 13:18 -!- wjlroe [~will@78-86-14-131.zone2.bethere.co.uk] has joined #go-nuts 13:19 < wjlroe> How do you assign a new variable to the contents of another variable, while overriding a field in a struct? something like: second := first{a: 2} 13:20 < wjlroe> assuming first := &First{} 13:20 < nsf> second := first; second.a = 2; 13:22 < wjlroe> ok - is there no combination of those expressions? something akin to erlang's copying of a record while overriding values? 13:22 < nsf> no 13:22 < wjlroe> ok thanks 13:25 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined #go-nuts 13:27 -!- napsy [~luka@88.200.96.18] has quit [Quit: Lost terminal] 13:28 -!- napsy [~luka@88.200.96.18] has joined #go-nuts 13:38 -!- virtualsue [~chatzilla@93-97-62-8.zone5.bethere.co.uk] has joined #go-nuts 13:45 -!- ikaros [~ikaros@188.107.221.102] has joined #go-nuts 13:46 -!- Fish [~Fish@9fans.fr] has quit [Remote host closed the connection] 13:58 -!- major_majors [~major_maj@c-68-40-195-246.hsd1.mi.comcast.net] has joined #go-nuts 14:12 < wjlroe> http://pastebin.org/1188060 <- I'm getting panic: runtime error: invalid memory address or nil pointer dereference when I try to receive from r.tunnel (line 32) 14:15 < wjlroe> er no, http://pastebin.org/1188300 <- I have now initialised the channel, but I'm getting invalid memory address when I try to print on line 34 14:22 -!- virtualsue [~chatzilla@93-97-62-8.zone5.bethere.co.uk] has quit [Ping timeout: 252 seconds] 14:24 < wjlroe> the source and output: http://pastebin.org/1188617 I seem to get the crash when I send the first message to the channel of the first element in the array - can anyone see what I've done wrong? 14:28 -!- peterdn [~peterdn@host81-159-106-59.range81-159.btcentralplus.com] has quit [Quit: ChatZilla 0.9.86-rdmsoft [XULRunner 1.9.2/20100222071121]] 14:34 -!- skejoe [~skejoe@188.114.142.231] has joined #go-nuts 14:37 -!- MaksimBurnin [~max@44.188-224-87.telenet.ru] has joined #go-nuts 14:38 -!- peterdn [~peterdn@host81-159-106-59.range81-159.btcentralplus.com] has joined #go-nuts 14:39 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Ping timeout: 240 seconds] 14:50 < Tv> wjlroe: you make the .tunnel channel in a goroutine, what if that doesn't get run until after the .tunnel <- first_msg 14:51 -!- Tv [~tv@cpe-76-168-227-45.socal.res.rr.com] has left #go-nuts [] 14:53 < Bombe> Yes, that might be a threading issue. 14:54 < Bombe> wjlroe, try creating the tunnels before calling listen(). 14:54 < wjlroe> ok, so now (making the tunnel before launching the listen() ) - I get this ol' chestnut : throw: all goroutines are asleep - deadlock! 14:55 < wjlroe> I'm gonna have to close() the channel(s) somewhere.. 14:58 -!- skejoe [~skejoe@188.114.142.231] has quit [Quit: leaving] 15:02 -!- bfrank [~brad@cpe-098-026-123-011.nc.res.rr.com] has quit [Quit: leaving] 15:02 -!- virtualsue [~chatzilla@nat/cisco/x-ssyjpesbryltlhem] has joined #go-nuts 15:12 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has joined #go-nuts 15:14 -!- napsy [~luka@88.200.96.18] has quit [Read error: Operation timed out] 15:19 -!- peterdn [~peterdn@host81-159-106-59.range81-159.btcentralplus.com] has quit [Ping timeout: 245 seconds] 15:20 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has quit [Quit: slashus2] 15:20 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has joined #go-nuts 15:27 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has quit [Quit: slashus2] 15:32 -!- tvw [~tv@e176006015.adsl.alicedsl.de] has quit [Read error: Connection reset by peer] 15:39 -!- Robbo_ [~robbo@CPE-58-166-67-209.lnse5.cht.bigpond.net.au] has quit [Read error: Connection reset by peer] 15:39 -!- tvw [~tv@e176006015.adsl.alicedsl.de] has joined #go-nuts 15:40 -!- Robbo_ [~robbo@CPE-58-166-67-209.lnse5.cht.bigpond.net.au] has joined #go-nuts 15:42 -!- brad_ [~brad@cpe-098-026-123-011.nc.res.rr.com] has quit [Quit: leaving] 15:49 < wjlroe> http://pastebin.org/1190140 <- I'm not sure where I have to close channels - can anybody point out where I'm going wrong? 15:53 -!- aho [~nya@fuld-4d00d4af.pool.mediaWays.net] has joined #go-nuts 15:53 < Bombe> Hmm, are you sure the nextlink fields are initialized correctly? 15:53 < wjlroe> not certain :) 15:53 < Bombe> I could probably answer that myself if I actually knew Go. :) 15:54 < wjlroe> haha 15:54 < Bombe> Does the make() in line 56 actually create Ringlink objects or just the array? 15:54 < wjlroe> it makes the objects - which is why you can set .tunnel and .fakething etc. 15:55 < Bombe> Yes, you are right. 16:05 -!- napsy [~luka@88.200.96.18] has joined #go-nuts 16:06 -!- rodablo [~rodablo@190.220.132.162] has joined #go-nuts 16:07 -!- rodablo [~rodablo@190.220.132.162] has quit [Client Quit] 16:09 -!- alefnula [~alefnula@188.246.38.197] has joined #go-nuts 16:10 -!- alefnula [~alefnula@188.246.38.197] has quit [Client Quit] 16:11 -!- alefnula [~alefnula@188.246.38.197] has joined #go-nuts 16:11 -!- ronnyy [~quassel@p4FF1D184.dip.t-dialin.net] has joined #go-nuts 16:15 -!- alefnula [~alefnula@188.246.38.197] has quit [Client Quit] 16:15 -!- alefnula [~alefnula@188.246.38.197] has joined #go-nuts 16:16 -!- ronnyy [~quassel@p4FF1D184.dip.t-dialin.net] has quit [Remote host closed the connection] 16:32 -!- peterdn [~peterdn@host81-159-237-3.range81-159.btcentralplus.com] has joined #go-nuts 16:48 -!- alefnula [~alefnula@188.246.38.197] has quit [Quit: Ex-Chat] 16:49 -!- femtoo [~femto@95-89-248-241-dynip.superkabel.de] has joined #go-nuts 16:50 -!- alefnula [~alefnula@188.246.38.197] has joined #go-nuts 16:54 -!- alefnula [~alefnula@188.246.38.197] has quit [Client Quit] 16:54 -!- alefnula [~alefnula@188.246.38.197] has joined #go-nuts 16:55 -!- jmettraux [~jmettraux@PPPbm5391.kanagawa-ip.dti.ne.jp] has quit [Remote host closed the connection] 16:57 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3] 16:59 -!- neurodamage [~neurodama@c-76-102-21-175.hsd1.ca.comcast.net] has joined #go-nuts 17:13 -!- alefnula [~alefnula@188.246.38.197] has quit [Quit: Ex-Chat] 17:14 -!- tvw [~tv@e176006015.adsl.alicedsl.de] has quit [Remote host closed the connection] 17:15 -!- ExtraSpice [~XtraSpice@88.118.34.223] has joined #go-nuts 17:22 -!- emmanueloga [~emmanuelo@190.244.14.111] has quit [Ping timeout: 240 seconds] 17:23 -!- emmanueloga [~emmanuelo@190.244.14.111] has joined #go-nuts 17:36 -!- manual [~a@unaffiliated/lazz0] has joined #go-nuts 17:38 -!- melba [manual@unaffiliated/lazz0] has quit [Ping timeout: 255 seconds] 17:39 -!- virtualsue [~chatzilla@nat/cisco/x-ssyjpesbryltlhem] has quit [Quit: ChatZilla 0.9.86 [Firefox 3.5.13/20100914122142]] 17:41 -!- major_majors [~major_maj@c-68-40-195-246.hsd1.mi.comcast.net] has quit [Quit: major_majors] 17:41 -!- MaksimBurnin [~max@44.188-224-87.telenet.ru] has quit [Ping timeout: 245 seconds] 17:43 -!- MaksimBurnin [~max@44.188-224-87.telenet.ru] has joined #go-nuts 17:44 -!- terrex [~terrex@84.122.67.111.dyn.user.ono.com] has joined #go-nuts 17:46 < scyth> I'm trying to parse an xml message of variable format. The format itself is like this: <start> <main> <type> TypeX </type> </main> <data> ...structure here depends on "TypeX" ...</data> </start> 17:47 < scyth> so I need to get the "main" portion to be able to select different structures for "data" part 17:48 < scyth> any ideas how to "unmarshall" or whatever, only the "main" portion? 17:51 -!- ssjones [~ssjones@67-61-100-203.cpe.cableone.net] has quit [Read error: Connection reset by peer] 17:54 -!- DerHorst [~Horst@e176101218.adsl.alicedsl.de] has quit [Remote host closed the connection] 17:55 -!- theshish [theshish@cpe-68-173-18-52.nyc.res.rr.com] has quit [Read error: Connection reset by peer] 17:57 -!- ssjones [~ssjones@67-61-100-203.cpe.cableone.net] has joined #go-nuts 18:07 < exch> I would probably parse it manually in this case using the tokenizer in the xml package 18:09 -!- tapankarecha [~tapankare@122.167.46.209] has joined #go-nuts 18:13 -!- tapankarecha [~tapankare@122.167.46.209] has left #go-nuts [] 18:13 < scyth> ok 18:15 < Bombe> wjlroe, I have managed to get a version that does not deadlock anymore but it still does not do what it’s supposed to do. 18:17 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit: This computer has gone to sleep] 18:19 < scyth> also, I'm trying to get a string to io.Reader why can't I use strings.NewReader(s)? It returns *Reader .. but functions are expecting io.Reader and not strings.Reader 18:20 -!- piyushmishra [~piyushmis@117.200.228.96] has joined #go-nuts 18:20 < scyth> bytes.NewBufferString() works though 18:25 -!- terrex [~terrex@84.122.67.111.dyn.user.ono.com] has quit [Quit: Leaving.] 18:28 < scyth> damn.. I'm lost 18:30 < wjlroe> Bombe: oh really? how? 18:32 < Bombe> wjlroe, I changed the loop in :45 to what it looks like in :59. 18:32 < Bombe> But as said, that still doesn’t really work. 18:33 < wjlroe> I don't understand the difference 18:34 < Bombe> I thought it has something to do with value vs reference. 18:34 < Bombe> Also, when creating the channel with make(chan *Message, 1) it also does not deadlock but also does not work. 18:35 < Bombe> Go is obviously not my language of choice but I am intrigued by it. :) 18:35 < wjlroe> ok, yeah it seems that because I don't close the channels properly, the goroutines deadlock 18:36 < wjlroe> but it's not clear when they deadlock or what's at fault 18:36 < Bombe> Theoretically at least one goroutine should wake up when the first message is sent. 18:36 < Bombe> Which would in turn wake up another. And so on. 18:37 < Bombe> So, why doesn’t the first message wake up the first goroutine. 18:37 < wjlroe> I don't think the error message is that informative - it's most likely a race condition, rather than that the goroutines are "asleep", whatever that means 18:39 < wjlroe> it could be becase I start each goroutine then send the first message - that the first message hits the first goroutine before the second goroutine has started receiving 18:39 < Bombe> Also, I do have a problem with the Ringlink objects created in :56. 18:40 < Bombe> Hmm… a send to a channel will block until there’s a received so the main thread should simply be waiting for the first goroutine to come up. 18:41 < wjlroe> yeah, I don't understand it - I thought this would be easy given how simple it is in erlang 18:41 -!- thaostra [~joshua@71.168.114.217] has joined #go-nuts 18:42 < napsy> I doubt go and erlang are comparable 18:42 < wjlroe> no indeed 18:42 < wjlroe> but in terms of message passing, there is some commonality 18:44 -!- fabled [~fabled@letku109.adsl.netsonic.fi] has joined #go-nuts 18:46 -!- rejb [~rejb@unaffiliated/rejb] has quit [Ping timeout: 276 seconds] 18:49 -!- ahc [~quassel@c-83-233-18-157.cust.bredband2.com] has joined #go-nuts 18:59 -!- jhh [~jhh@f048202058.adsl.alicedsl.de] has quit [Quit: jhh] 19:03 -!- niemeyer [~niemeyer@201-35-72-214.pltce701.dsl.brasiltelecom.net.br] has quit [Ping timeout: 245 seconds] 19:04 -!- cco3 [~conley@c-69-181-138-209.hsd1.ca.comcast.net] has joined #go-nuts 19:04 -!- Davidian1024 [~Davidian1@cpe-98-27-192-193.neo.res.rr.com] has quit [Ping timeout: 245 seconds] 19:09 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined #go-nuts 19:09 -!- napsy [~luka@88.200.96.18] has quit [Read error: Operation timed out] 19:12 -!- napsy [~luka@88.200.96.18] has joined #go-nuts 19:16 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts 19:16 -!- ssjones [~ssjones@67-61-100-203.cpe.cableone.net] has quit [Read error: Connection reset by peer] 19:18 -!- thaostra [~joshua@71.168.114.217] has quit [Ping timeout: 240 seconds] 19:19 -!- piyushmishra [~piyushmis@117.200.228.96] has quit [Quit: Leaving.] 19:20 -!- ako [~nya@fuld-4d00d5fd.pool.mediaWays.net] has joined #go-nuts 19:23 -!- aho [~nya@fuld-4d00d4af.pool.mediaWays.net] has quit [Ping timeout: 245 seconds] 19:25 -!- ssjones [~ssjones@67-61-100-203.cpe.cableone.net] has joined #go-nuts 19:39 -!- vomjom [~vomjom@99-162-150-88.lightspeed.sntcca.sbcglobal.net] has quit [Ping timeout: 240 seconds] 19:40 -!- vomjom [~vomjom@99-162-150-88.lightspeed.sntcca.sbcglobal.net] has joined #go-nuts 19:44 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has quit [Ping timeout: 264 seconds] 19:47 -!- res [c9ed8246@gateway/web/freenode/ip.201.237.130.70] has joined #go-nuts 19:49 -!- dj2 [~dj2@CPE001f5b35feb4-CM0014048e0344.cpe.net.cable.rogers.com] has quit [Ping timeout: 276 seconds] 19:50 -!- dj2 [~dj2@2002:63ec:1a4e:0:21f:5bff:fe35:feb5] has joined #go-nuts 19:51 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has joined #go-nuts 19:51 -!- mode/#go-nuts [+v iant] by ChanServ 19:53 -!- res [c9ed8246@gateway/web/freenode/ip.201.237.130.70] has quit [Quit: Page closed] 19:53 -!- major_majors [~major_maj@173-10-44-57-Michigan.hfc.comcastbusiness.net] has joined #go-nuts 19:59 < Bombe> Hmm. 19:59 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3] 20:05 -!- virtualsue [~chatzilla@nat/cisco/x-hifhartmqubyrmjc] has joined #go-nuts 20:06 < Bombe> Hmm. 20:08 < Bombe> type Test { int i }; func main() { tests := make([]Test, 5); for i, test := range tests { test.i = i; }; for _, test := range tests { fmt.Println(test.i); }; } 20:08 < Bombe> This does not print 0, 1, 2, 3, 4 as I would expect it to. 20:09 < napsy> Bombe: it's type Test { i int } 20:09 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has joined #go-nuts 20:11 < cbeck> Bombe: test in your range clause will be a copy of Test[i], rather than a reference to it 20:11 < cbeck> err, tests[i] 20:12 < Bombe> I figured that much. Is there a way to get a reference instead of a copy or do I have to use tests[i]? 20:12 < cbeck> use tests[i] or make tests []*Test 20:12 < Bombe> napsy, yeah, it is in the source, I just typed it wrong here. :) 20:13 -!- Davidian1024 [~Davidian1@cpe-98-27-192-193.neo.res.rr.com] has joined #go-nuts 20:14 < Bombe> cbeck, okay, so after make([]*Test, 5) I have to create 5 Test objects and assign them to the slice? 20:15 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 265 seconds] 20:15 < cbeck> Yes, which you can do with for i := range tests { 20:15 < cbeck> tests[i] := &Test{i}} 20:16 -!- napsy [~luka@88.200.96.18] has joined #go-nuts 20:16 < Bombe> Okay, but now if I want to use the “tests” object as a function parameter I have to change all method signatures to []*Test instead of []Test, right? 20:18 < mpl> say, if I do foo := make([]string, m); work with foo[i]; foo = make([]string, n); does the garbage collector take care of freeing whatever I had put in foo initially? 20:19 < cbeck> Bombe, right, so it's probably best to just do tests[i] = foo 20:20 < cbeck> It just depends on your use case 20:20 < cbeck> mpl: yes 20:20 < Bombe> cbeck, I don’t really have use cases yet, only test cases. :) 20:20 < mpl> cbeck: kthx 20:21 < Bombe> cbeck, so the second return value of the range expression is (always?) a copy of the element in question, so it should only used for read-only access? 20:21 < cbeck> Bombe: Fair enough. My experience is that working with pointers is so easy and streamlined in Go, that I use them pretty much everywhere 20:21 < cbeck> Bombe: Yes 20:22 < cbeck> Obviously if the struct has a field which is a reference or pointer type, then you may be able to modify the original, but in general if you need to modify it, just use the single value version of range and index in 20:23 < Bombe> cbeck, okay. Thanks for clearing that up. :) 20:25 < cbeck> anytime 20:26 -!- ahc [~quassel@c-83-233-18-157.cust.bredband2.com] has left #go-nuts [] 20:27 -!- res [c9ed8246@gateway/web/freenode/ip.201.237.130.70] has joined #go-nuts 20:27 < scyth> if I have buf []byte, passed as an argument of type io.Reader to my function, how can I copy that buf to another one? 20:27 < Bombe> wjlroe, I think I just realized why your problem exists. 20:27 < Bombe> wjlroe, after sending the message to the first link’s channel, the main thread is done and exits the program. 20:30 < cbeck> scyth: Depending on what you need, check out io.Copy() or type assertions http://golang.org/doc/go_spec.html#Type_assertions 20:32 < cbeck> If you want your main thread to sleep permanently you can use an empty select statement and call os.Exit(int) elsewhere, or you can create a 'done' channel and have main wait on a read from it 20:32 < cbeck> err, s/thread/goroutine/ 20:33 < wjlroe> Bombe: oh right, yes that's most likely it 20:34 < Bombe> wjlroe, yes, it is, I managed to get it working. :) 20:35 -!- Davidian1024 [~Davidian1@cpe-98-27-192-193.neo.res.rr.com] has quit [Read error: Operation timed out] 20:35 < wjlroe> Bombe: how did you get it to work? 20:36 < Bombe> wjlroe, http://pastebin.org/1193096 20:36 < Bombe> wjlroe, I added the “quit” channel in the message that gets set in start(). 20:37 < Bombe> wjlroe, and you have to iterate differently over the links to call the listen() method. 20:37 < Bombe> wjlroe, because, as I know now, the iterated-over value is a _copy_ of the value in the slice. 20:37 < wjlroe> oh 20:37 < Bombe> wjlroe, so you started the listen() method on one object but sent the message to the channel of a _different_ object. 20:38 < Bombe> And there’s your deadlock. :) 20:38 < scyth> cbeck, sorry, I still don't understand. for io.Copy() I don't understand how to create empty dst 20:38 -!- major_majors [~major_maj@173-10-44-57-Michigan.hfc.comcastbusiness.net] has quit [Quit: major_majors] 20:39 < wjlroe> Bombe: ok, that did it - also I tried using an empty select {} to wait for the os.Exit() to be issued in the last message 20:39 < wjlroe> rather than a quit channel 20:39 < wjlroe> but either way works 20:39 < scyth> cbeck, Why can't I just mydst := make([]byte, 1024) and do io.Copy(mydst, mysrc) if "mysrc" is io.Reader 20:40 < Bombe> wjlroe, I think a quit channel is conceptually a lot clearer. 20:40 < wjlroe> Bombe: yeah, it's not often you'd call Exit like this 20:40 < cbeck> Also more idiomatic 20:40 < Bombe> True.. 20:41 -!- Davidian1024 [~Davidian1@cpe-98-27-192-193.neo.res.rr.com] has joined #go-nuts 20:41 < cbeck> scyth: Really quick, are you trying to recover the []byte wrapped in the reader, or are you trying to copy them? 20:42 < scyth> cbeck, copy 20:43 < wjlroe> Bombe: thanks a lot! 20:43 < scyth> cbeck, because I realised, xml.Unmarshall() removes content from io.Reader .. and I need to make two calls with same content. 20:43 < cbeck> scyth: Ahh, gotcha 20:43 < cbeck> One sec 20:44 < Bombe> wjlroe, no problem. Nice little problem for me to busy myself with Go once again. :) 20:44 < wjlroe> Bombe: it's a good one - from the programatic programmers Programming Erlang :) 20:45 < Bombe> :) 20:46 -!- napsy [~luka@88.200.96.18] has quit [Quit: Lost terminal] 20:48 -!- femtoo [~femto@95-89-248-241-dynip.superkabel.de] has quit [Quit: Leaving] 20:51 -!- vomjom [~vomjom@99-162-150-88.lightspeed.sntcca.sbcglobal.net] has quit [Remote host closed the connection] 20:54 < cbeck> scyth: Perhaps something like raw, err := ioutil.ReadAll(reader); rawCopy := raw[:] 20:55 < cbeck> If you want to pass those to something that takes an io.Reader you'll need to wrap them in a bytes.Buffer 20:55 < cbeck> There's probably an easier way, but it's not occuring to me 21:01 < scyth> oh 21:02 < scyth> cbeck, any idea why bytes.ReadFrom() and other functions also delete all the contents from source buffer? 21:07 < scyth> also.. moving things around to match specific interface (io.Reader, strings.Reader, bytes.Reader....) is really a pain in the ass.. slowing me down completely 21:08 < scyth> large amount of library functions take specific interfaces as arguments... and of course, they differ 21:09 < cbeck> They pretty much all take io.Reader, at least as far as I can see 21:09 < scyth> or bufio.Reader :) 21:10 -!- melba [~a@unaffiliated/lazz0] has left #go-nuts [] 21:10 < cbeck> What requires a bufio.Reader? 21:10 -!- awidegreen [~quassel@62.176.237.78] has quit [Quit: No Ping reply in 180 seconds.] 21:11 -!- awidegreen [~quassel@62.176.237.78] has joined #go-nuts 21:19 < scyth> nothing, my bad 21:19 < scyth> btw, the above solution worked 21:38 -!- wrtp [~rog@92.17.36.40] has joined #go-nuts 21:47 -!- peterdn [~peterdn@host81-159-237-3.range81-159.btcentralplus.com] has quit [Quit: ChatZilla 0.9.86-rdmsoft [XULRunner 1.9.2/20100222071121]] 21:49 -!- tasosos [~tasosos@178.128.49.242.dsl.dyn.forthnet.gr] has quit [Remote host closed the connection] 21:49 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has quit [Quit: slashus2] 21:54 -!- virtualsue_ [~chatzilla@93-97-62-8.zone5.bethere.co.uk] has joined #go-nuts 21:58 -!- virtualsue [~chatzilla@nat/cisco/x-hifhartmqubyrmjc] has quit [Ping timeout: 255 seconds] 22:04 -!- wrtp [~rog@92.17.36.40] has quit [Quit: wrtp] 22:06 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Ping timeout: 265 seconds] 22:17 -!- ikaros [~ikaros@188.107.221.102] has quit [Quit: Leave the magic to Houdini] 22:22 -!- crazy2be [~justin@S0106001ac401d400.cg.shawcable.net] has joined #go-nuts 22:23 -!- kingfishr [~kingfishr@c-24-130-147-77.hsd1.ca.comcast.net] has quit [Quit: Leaving] 22:26 -!- kingfishr [~kingfishr@c-24-130-147-77.hsd1.ca.comcast.net] has joined #go-nuts 22:27 < crazy2be> anyone here worked with the json package before? 22:28 < exch> yes 22:30 < crazy2be> I'm still having trouble getting it to fill my data structures... I have made all my fields start with a capital so that the JSON package can see them properly now 22:30 < crazy2be> but it doesn't seem to be properly filling all of the fields, only some 22:31 < exch> Do you have an example? 22:32 -!- awidegreen [~quassel@62.176.237.78] has quit [Remote host closed the connection] 22:33 < crazy2be> uuuh, right. testcase. Do you know if the json package is at all case sensitive? I didn't see that mentioned in the docs, and it evidently fills some fields that start with capital letters (since otherwise they are not exported) 22:33 < exch> it shouldn't be case sensitive 22:34 -!- napsy [~luka@88.200.96.18] has joined #go-nuts 22:35 < crazy2be> I'm feeding it a atom feed from picasa 22:36 < crazy2be> *an 22:37 < exch> it's hard to say what could be wrong without seeing what you've done. It's either some of the structs/fields which are misdefined or the feed is just broken 22:37 -!- tav [~tav@92.7.64.56] has quit [Ping timeout: 245 seconds] 22:39 -!- tav [~tav@92.7.131.122] has joined #go-nuts 22:42 < cbeck> pastie the raw feed and your struct? 22:42 < crazy2be> hmm i think that the problem is, the json library will not fill []interface{} values if there is only one item in the JSON array 22:43 < crazy2be> I was testing with a different JSON feed and it would fill the Text fields on that one 22:43 < crazy2be> now i'm using an example one and nothing gets filled, likely because there is only one album 22:43 < crazy2be> sec 22:44 < crazy2be> Here's the JSON: http://pastie.org/1181713 22:45 < crazy2be> And here is the struct: http://pastie.org/1181717 22:45 < crazy2be> Note that the JSON is modied as shown there... "normal" picasa feeds have $ signs in variable names 22:48 < crazy2be> hmm.. the problem could actually lay with my replacer code 22:48 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined #go-nuts 22:50 < crazy2be> The $ are kind of a tricky thing to deal with 22:50 < crazy2be> originally i was replacing them with _, but there are some fields that would not get exported then 22:51 < crazy2be> because they would start with an _ 22:51 < crazy2be> so then i changed it to an empty string 22:51 < crazy2be> but since i cast it to a []byte in my replacer code, that gets changed to a null 22:52 < crazy2be> and then the JSON code is complaining 22:52 < cbeck> That could cause issues, certainly 22:52 < cbeck> Hmm 22:52 < cbeck> Replace it by a space? json isn't whitespace sensitive 22:53 < crazy2be> I'm just using the regex package to do the replacing, with a wrapper so that it works with the io.Reader i get from http.Open 22:53 < cbeck> As long as all the $ are at the start of vars, of course 22:54 < crazy2be> cbeck: that's what i figured, but it's not unmarshaling into the " t" values still 22:54 < crazy2be> and the $ are sometimes in the middle as well... 22:54 < cbeck> Bah 22:55 < cbeck> Replace by an upper case S? 22:56 < crazy2be> that seems to work, although it's not the most straightforward solution :P 22:56 < crazy2be> Thanks! 22:57 < crazy2be> Can't believe i didn't think of it sooner :P 22:57 < crazy2be> s/sooner/myself :P 22:57 < cbeck> It seems like a fragile solution, but the webs are full of those =p 22:57 < crazy2be> heh 22:58 < crazy2be> why doesn't go allow $ in variable names? 22:58 < crazy2be> Just wondering, because i didn't see a use for it anywhere in the spec 23:01 < skelterjohn> because it is in the C syntax family 23:02 < crazy2be> Well i never even considered it until i started using jQuery, and then i noticed that it's fine in javascript 23:02 < skelterjohn> javascript is an abomination 23:03 < crazy2be> of the C syntax, or just in general? :P 23:03 -!- jhh [~jhh@f048202058.adsl.alicedsl.de] has joined #go-nuts 23:03 < nbjoerg> well, it's not alphanumeric 23:04 < nbjoerg> nor does it is the space-replacement like _ 23:04 < nbjoerg> so why allow it? 23:04 < crazy2be> I guess why allow/why deny 23:05 < skelterjohn> deny because it is usually denied 23:05 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit: Verlassend] 23:05 < skelterjohn> if they had allowed it in C, it probably would have been allowed in more other languages too 23:05 < crazy2be> but then people can't write php-like $blah = "bllah" 23:05 < skelterjohn> but, in general, the symbols on the top of number keys are not allowed in identifiers 23:05 < crazy2be> which is likely a good thing :P 23:06 < ProNihilist> deny because it's ugly 23:06 < crazy2be> well, most of the symbols have a user 23:06 < crazy2be> *use 23:06 < skelterjohn> and it's ugly because it's unfamiliar 23:06 < crazy2be> although not @ and # i suppose 23:07 < skelterjohn> in the end there are many language decisions that are arbitrary. 23:07 < crazy2be> Unless # is a comment in go... I don't think it is 23:07 -!- jhh [~jhh@f048202058.adsl.alicedsl.de] has quit [Client Quit] 23:07 < cbeck> It isn't 23:07 < ProNihilist> but it's an arbitrary decision that adds 2 needless keystrokes onto every variable name, that kinda adds up 23:07 < crazy2be> but having # would be a bad idea for that reason 23:07 < crazy2be> Well, i've always wished i could use - in variable names 23:08 < crazy2be> it's the fastest to type 23:08 < crazy2be> much faster than _ 23:08 < skelterjohn> counting keystrokes is not a useful thing to do, in my opinion 23:08 < crazy2be> and potentially faster than uppercase 23:08 < nbjoerg> my preference is still to just use digits for variable names and switch to base 26 for numberic literals 23:08 < nbjoerg> so much less ambigious 23:09 < nbjoerg> I know it requires a bit getting used to to write 1 for the loop variable and not i, but that's just a matter of time 23:09 * skelterjohn wishes there were a nice go debugging tool available 23:09 < crazy2be> well, - is commonly used in variable names outside of programming, e.g. css 23:09 < nbjoerg> skelterjohn: it's called print 23:09 < crazy2be> or println, or fmt.Printf, or... 23:09 < skelterjohn> thanks, nbjoerg. i hadn't thought of that. and there can't be anything more convenient, either 23:10 < crazy2be> The best debugger is just not to put any bugs there in the first place :P 23:11 < skelterjohn> Man is evil. 23:12 < crazy2be> as in the unix command or the species? 23:13 < skelterjohn> As in you. 23:13 < ProNihilist> would be lowercase for the unix command 23:13 < crazy2be> ProNihilist: Not necessarily at the start of a sentence :P 23:15 < ProNihilist> since when did people on IRC follow all the proper rules of grammar? 23:16 < crazy2be> Well, by that logic, it might have been lowercase and referencing the species 23:16 < crazy2be> :P 23:16 < skelterjohn> Beware of confusing the existential and universal quantifiers. 23:18 < crazy2be> Is there a go "cheat sheet" of sorts? Just a basic overview of the syntax because i keep forgetting 23:18 < skelterjohn> huh 23:18 < skelterjohn> dunno what that would look like 23:18 < skelterjohn> some example code? 23:18 < skelterjohn> i can point you to some example code 23:19 < crazy2be> like just a basic overview of the various control structures, function syntax, declaration syntax, 23:19 < skelterjohn> i bet if you have to look them up one or two more times you won't need a cheat sheet anymore 23:19 < crazy2be> Right now i just Ctrl+f through the language spec and that works reasonably well 23:19 < skelterjohn> there you go 23:20 < crazy2be> well, i use other languages as well, and go is a little different 23:20 < crazy2be> it's just the little things 23:20 < crazy2be> Like now, i can't remember how to do a for loop to loop though a slice 23:20 < skelterjohn> you can use range 23:21 < skelterjohn> for index, value := range mySlice { 23:21 -!- saati [~bjb@marvin.harmless.hu] has left #go-nuts [] 23:21 < crazy2be> see a sheet with all that on it would be nice 23:21 < crazy2be> i was about to do an old for i = 0; i < blah; i++ loop 23:21 < skelterjohn> that would work great, too 23:21 < skelterjohn> i don't see the problem 23:22 < skelterjohn> i do sometimes forget which comes first in a slice range, index or value. i'm not even sure i have it right in the example i provided 23:22 -!- raylu [raylu@c-24-131-193-106.hsd1.pa.comcast.net] has quit [Read error: Connection reset by peer] 23:22 < skelterjohn> but the compiler tells me if i get it wrong, most of the time 23:22 -!- raylu [raylu@c-24-131-193-106.hsd1.pa.comcast.net] has joined #go-nuts 23:23 < wjlroe> you got it right 23:28 < exch> crazy2be: if it's just indices you need form a slice, you can also do this: for i := range myslice { ... } 23:35 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 240 seconds] 23:36 -!- kingfishr [~kingfishr@c-24-130-147-77.hsd1.ca.comcast.net] has quit [Remote host closed the connection] 23:36 -!- napsy [~luka@88.200.96.18] has joined #go-nuts 23:36 -!- wjlroe [~will@78-86-14-131.zone2.bethere.co.uk] has quit [Quit: Computer has gone to sleep] 23:41 -!- rlab [~Miranda@91.200.158.34] has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org] 23:47 < crazy2be> Anyone know how to select a element from a slice using the template library? 23:48 < crazy2be> I've tried MediaSgroup.MediaScontent.0.Url and MediaSgroup.MediaScontent[0].Url 23:51 < scyth> crazy2be, how did you define MediaScontent? 23:53 < crazy2be> scyth: Well, printing it with %+v gives me: {Title:{ST:Untitled Album Type:text} Summary:{ST:Just a test Type:text} MediaSgroup:{MediaScontent:[{Url:http://lh4.ggpht.com/_tNx5ZR_U-hk/TJ56v2_3OJE/AAAAAAAAAA8/EHvm-hufOkA/UntitledAlbum.jpg Type:image/jpeg Medium:image}] MediaScredit:[{ST:crazy 2be}] MediaSdescription:{ST:Just a test Type:plain} MediaSthumbnail:[{Url:http://lh4.ggpht.com/_tNx5ZR_U-hk/TJ56v2_3OJE/AAAAAAAAAA8/EHvm-hufOkA/s16 23:53 < scyth> crazy2be, I ment in code 23:54 < scyth> as you said, MediaSgroup.MediaScontent[0].Url 23:54 < scyth> that should work 23:54 < scyth> what's wrong with it? 23:55 < crazy2be> the template package doesn't like it, this is in a template file itself 23:55 < crazy2be> says "Error rendering template: line 6: name not found: MediaSgroup.MediaScontent[0].Url in type picasa.Photo" 23:56 -!- peterdn [~peterdn@host81-159-237-3.range81-159.btcentralplus.com] has joined #go-nuts 23:56 < scyth> how does picasa.Photo struct look like? 23:57 < scyth> MediaSgroup -- is that picasa.Photo ? 23:57 < crazy2be> http://pastie.org/1181789 23:58 < crazy2be> hmm 23:58 < crazy2be> Apparently i mixed tabs and spaces somehow 23:59 < crazy2be> now the indents are all messed up 23:59 < scyth> it's ok 23:59 < crazy2be> I'll run it through gofmt 23:59 -!- Davidian1024 [~Davidian1@cpe-98-27-192-193.neo.res.rr.com] has quit [Ping timeout: 276 seconds] 23:59 < scyth> so did you do: MediaSgroup := new(picasa.Photo) ? --- Log closed Sun Sep 26 00:00:07 2010