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

--- Log opened Thu Jul 21 00:00:01 2011
00:08 -!- franciscosouza [~francisco@187.105.25.184] has joined #go-nuts
00:12 -!- skelterjohn_ [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
00:14 -!- miker2 [~miker2@pool-96-245-224-59.phlapa.fios.verizon.net] has quit
[Ping timeout: 246 seconds]
00:14 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Ping
timeout: 260 seconds]
00:15 -!- vpit3833 [~user@203.111.33.203] has joined #go-nuts
00:15 -!- squeese [~squeese@h51580273.semamkb.dyn.perspektivbredband.net] has
joined #go-nuts
00:16 -!- sniper506th [~sniper506@rrcs-70-61-192-18.midsouth.biz.rr.com] has quit
[Quit: Computer has gone to sleep.]
00:21 -!- miker2 [~miker2@pool-96-245-224-59.phlapa.fios.verizon.net] has joined
#go-nuts
00:24 -!- hargettp [~hargettp@pool-71-174-140-162.bstnma.east.verizon.net] has
quit [Quit: Linkinus - http://linkinus.com]
00:30 -!- jhawk28 [~jhawk28@user-387c58d.cable.mindspring.com] has quit [Quit:
Linkinus - http://linkinus.com]
00:37 -!- Chat0170 [mhepcl@app5.chatmosphere.org] has joined #go-nuts
00:37 < Chat0170> f
00:38 -!- Chat0170 [mhepcl@app5.chatmosphere.org] has quit [Client Quit]
00:38 -!- wallerdev [~wallerdev@c-68-60-43-43.hsd1.mi.comcast.net] has joined
#go-nuts
00:48 -!- iant [~iant@66.109.106.125] has quit [Quit: Leaving.]
00:48 -!- tvw [~tv@e176006223.adsl.alicedsl.de] has quit [Ping timeout: 255
seconds]
00:49 -!- tvw [~tv@e176000246.adsl.alicedsl.de] has joined #go-nuts
00:52 -!- eikenberry [~jae@173-164-68-213-Oregon.hfc.comcastbusiness.net] has quit
[Quit: End of line.]
01:06 -!- meling [~meling@cse-dhcp-10-91.ucsd.edu] has quit [Remote host closed
the connection]
01:10 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Quit:
skelterjohn]
01:12 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has quit []
01:15 -!- dreadlorde [dreadlorde@c-68-42-82-10.hsd1.mi.comcast.net] has joined
#go-nuts
01:17 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined
#go-nuts
01:19 -!- franciscosouza [~francisco@187.105.25.184] has quit [Read error:
Connection reset by peer]
01:19 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Remote
host closed the connection]
01:20 -!- Chat0080 [ftjara@app5.chatmosphere.org] has joined #go-nuts
01:20 < Chat0080> مساء الخير
01:20 -!- Chat0080 [ftjara@app5.chatmosphere.org] has quit [Client Quit]
01:20 -!- franciscosouza [~francisco@187.105.25.184] has joined #go-nuts
01:25 -!- meling [~meling@99-10-121-218.lightspeed.sndgca.sbcglobal.net] has
joined #go-nuts
01:27 -!- magn3ts [~magn3ts@ip68-103-225-65.ks.ok.cox.net] has quit [Quit:
Leaving]
01:31 -!- sniper50_ [~sniper506@cpe-098-122-099-052.sc.res.rr.com] has joined
#go-nuts
01:37 -!- moraes [~moraes@189.103.188.201] has quit [Quit: Leaving]
01:39 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
01:40 -!- clip9 [clip9@er.en.svarteper.com] has quit [Ping timeout: 246 seconds]
01:40 -!- clip9 [clip9@er.en.svarteper.com] has joined #go-nuts
01:46 -!- miker2 [~miker2@pool-96-245-224-59.phlapa.fios.verizon.net] has quit
[Ping timeout: 252 seconds]
01:46 -!- crazy2be [~crazy2be@d75-152-167-124.abhsia.telus.net] has joined
#go-nuts
01:48 < crazy2be> is there some way to do packet.RawData[readlen:] = buf
01:49 < crazy2be> oh, io.ReadFull
01:50 < fzzbt> why doesnt go have enum :[
01:51 < jessta_> because const achieves the same thing
01:51 < fzzbt> but then you have to prefix all the consts with something and
it is ugly?
01:52 < fzzbt> you have to repeat yourself
01:53 -!- miker2 [~miker2@pool-96-245-224-59.phlapa.fios.verizon.net] has joined
#go-nuts
01:55 -!- miker2 [~miker2@pool-96-245-224-59.phlapa.fios.verizon.net] has quit
[Client Quit]
01:56 < jessta_> fzzbt: you can give the consts types
01:57 -!- gtaylor [~gtaylor@108-196-160-120.lightspeed.tukrga.sbcglobal.net] has
joined #go-nuts
01:58 < jessta_> where do you have to repeat yourself/
02:04 -!- sniper50_ [~sniper506@cpe-098-122-101-192.sc.res.rr.com] has joined
#go-nuts
02:05 -!- tvw [~tv@e176000246.adsl.alicedsl.de] has quit [Remote host closed the
connection]
02:05 -!- sniper506th [~sniper506@cpe-098-122-099-052.sc.res.rr.com] has quit
[Ping timeout: 255 seconds]
02:06 < fzzbt> without using separate package, you cant group consts in one
place like MyTypes.A, MyTypes.B, MyTypes.C instead of writing consts MyTypeA,
MyTypeB, MyTypeC
02:06 -!- Kami_ [~kami@unaffiliated/kami-/x-9078513] has quit [Excess Flood]
02:07 -!- wallerdev [~wallerdev@c-68-60-43-43.hsd1.mi.comcast.net] has quit [Quit:
wallerdev]
02:08 -!- Kami_ [~kami@unaffiliated/kami-/x-9078513] has joined #go-nuts
02:17 < jessta_> fzzbt: you could make a struct if that's your need
02:18 < jessta_> but you can declare a const with a type that tells the user
where to use it
02:20 -!- franciscosouza [~francisco@187.105.25.184] has quit [Quit:
franciscosouza]
02:21 -!- franciscosouza [~francisco@187.105.25.184] has joined #go-nuts
02:30 -!- sniper506th [~sniper506@cpe-098-122-101-192.sc.res.rr.com] has quit
[Read error: Connection reset by peer]
02:35 -!- Natch| [~natch@178.73.216.126] has quit [Ping timeout: 260 seconds]
02:41 -!- sniper506th [~sniper506@cpe-098-122-101-192.sc.res.rr.com] has joined
#go-nuts
02:45 -!- Natch| [~natch@178.73.216.126] has joined #go-nuts
03:10 -!- icy [~icy@lighttpd/icy] has quit [Ping timeout: 276 seconds]
03:18 -!- icy [~icy@singularity.cryosphere.de] has joined #go-nuts
03:18 -!- icy [~icy@singularity.cryosphere.de] has quit [Changing host]
03:18 -!- icy [~icy@lighttpd/icy] has joined #go-nuts
03:20 -!- mnemoc [~amery@shell.opensde.net] has quit [Read error: Operation timed
out]
03:23 -!- gtaylor [~gtaylor@108-196-160-120.lightspeed.tukrga.sbcglobal.net] has
quit [Quit: gtaylor]
03:26 -!- mnemoc [~amery@shell.opensde.net] has joined #go-nuts
03:34 -!- crazy2be [~crazy2be@d75-152-167-124.abhsia.telus.net] has quit [Remote
host closed the connection]
03:43 -!- pjacobs [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has quit
[Ping timeout: 258 seconds]
03:45 -!- Kami_ [~kami@unaffiliated/kami-/x-9078513] has quit [Quit: Off]
03:45 -!- Kami_ [~kami@unaffiliated/kami-/x-9078513] has joined #go-nuts
03:51 -!- qeed [~qeed@adsl-98-85-61-254.mco.bellsouth.net] has quit [Quit:
Leaving]
03:53 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has joined #go-nuts
03:56 -!- robteix [~robteix@host27.190-30-213.telecom.net.ar] has quit [Quit:
Leaving...]
04:03 -!- Queue29 [~Queue29@egress-w.sfo1.yelpcorp.com] has quit [Remote host
closed the connection]
04:06 -!- angasule [~angasule@190.2.33.49] has quit [Ping timeout: 260 seconds]
04:23 -!- sniper506th [~sniper506@cpe-098-122-101-192.sc.res.rr.com] has quit
[Quit: Leaving...]
04:25 -!- kergoth_ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has quit [Quit:
Computer has gone to sleep.]
04:25 -!- Queue29 [~Queue29@173-8-182-114-SFBA.hfc.comcastbusiness.net] has joined
#go-nuts
04:28 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
04:30 -!- jimbaker` [~jbaker@c-67-176-84-43.hsd1.co.comcast.net] has quit [Quit:
Coyote finally caught me]
04:33 -!- Count_Niedar [~bleh@ip68-99-166-222.hr.hr.cox.net] has quit [Read error:
Connection reset by peer]
04:33 -!- Niedar [~bleh@ip68-99-166-222.hr.hr.cox.net] has joined #go-nuts
04:34 -!- squeese [~squeese@h51580273.semamkb.dyn.perspektivbredband.net] has quit
[Remote host closed the connection]
04:36 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has joined #go-nuts
04:36 -!- mode/#go-nuts [+v iant] by ChanServ
04:45 -!- Bigbear1 [~Cody@d75-158-136-171.abhsia.telus.net] has joined #go-nuts
04:46 -!- magn3ts [~magn3ts@ip68-103-225-65.ks.ok.cox.net] has joined #go-nuts
04:51 -!- smw [~stephen@unaffiliated/smw] has quit [Ping timeout: 258 seconds]
04:56 -!- krolaw [~krolaw@port165-235.ubs.maxnet.co.nz] has quit [Quit: krolaw]
04:57 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has quit [Remote host
closed the connection]
04:58 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Quit: Leaving]
05:00 -!- fabled [~fabled@83.145.235.194] has joined #go-nuts
05:01 -!- segv [~segv@sig.segv.net] has joined #go-nuts
05:02 < segv> Hey, what's the easiest way to do a multi-line string in
go-lang, been looking for a peticular method/standard for the unavoidable
multi-line string.
05:06 <+iant> a raw string literal
05:12 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has quit [Ping
timeout: 255 seconds]
05:13 -!- franciscosouza [~francisco@187.105.25.184] has quit [Read error:
Connection reset by peer]
05:13 -!- iant [~iant@216.239.45.130] has joined #go-nuts
05:13 -!- mode/#go-nuts [+v iant] by ChanServ
05:15 -!- kergoth_ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has joined #go-nuts
05:16 -!- fotang [~fotang@41.220.69.44] has joined #go-nuts
05:19 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
05:20 -!- franciscosouza [~francisco@187.105.25.184] has joined #go-nuts
05:21 -!- telexicon_ [~telexicon@c-67-160-124-195.hsd1.wa.comcast.net] has joined
#go-nuts
05:21 -!- keithcascio [~keithcasc@nat/google/x-cmfcmzemsnaqjzqx] has quit [Quit:
Leaving]
05:22 -!- telexicon [~telexicon@unaffiliated/chowmeined] has quit [Ping timeout:
252 seconds]
05:24 -!- edsrzf [~edsrzf@122-61-221-144.jetstream.xtra.co.nz] has joined #go-nuts
05:32 < AndrewBC> What the heck is up with the special namespaces in go's c
sources?
05:33 < AndrewBC> What's parsing those before the CC does?
05:33 < edsrzf> Nothing
05:33 < edsrzf> It allows that character (the middle dot)
05:33 < AndrewBC> oh really, wow
05:34 < AndrewBC> so it's just considered one identifier?
05:34 < edsrzf> Yeah
05:34 < AndrewBC> I see.  Thanks
05:37 -!- Bigbear1 [~Cody@d75-158-136-171.abhsia.telus.net] has quit [Ping
timeout: 264 seconds]
05:38 < niemeyer_> Kind of..  that's not the entire truth..  but close
enough
05:39 < niemeyer_> Anyway with a 386 freebsd available for a test?
05:39 < niemeyer_> Anyone
05:50 -!- Urtie [~kim@90-227-159-22-no57.tbcn.telia.com] has quit [Ping timeout:
264 seconds]
05:54 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Remote host closed
the connection]
05:59 -!- Queue29 [~Queue29@173-8-182-114-SFBA.hfc.comcastbusiness.net] has quit
[Remote host closed the connection]
06:04 -!- Queue29 [~Queue29@173-8-182-114-SFBA.hfc.comcastbusiness.net] has joined
#go-nuts
06:11 -!- mukyuu [~mukyuu@S0106889ffaff3ed7.ca.shawcable.net] has joined #go-nuts
06:12 -!- exch [~blbl@ip34-181-209-87.adsl2.static.versatel.nl] has quit [Ping
timeout: 258 seconds]
06:14 -!- NiteRain [~kvirc@c-98-254-236-21.hsd1.fl.comcast.net] has quit [Quit:
KVIrc 4.1.1 Equilibrium http://www.kvirc.net/]
06:18 -!- exch [~blbl@ip34-181-209-87.adsl2.static.versatel.nl] has joined
#go-nuts
06:20 -!- stalled [~stalled@unaffiliated/stalled] has joined #go-nuts
06:25 -!- noodles775 [~michael@canonical/launchpad/noodles775] has joined #go-nuts
06:31 -!- ronnyy [~quassel@p4FF1C427.dip0.t-ipconnect.de] has joined #go-nuts
06:31 -!- yogib [~yogib@131.234.59.64] has joined #go-nuts
06:33 -!- Queue29 [~Queue29@173-8-182-114-SFBA.hfc.comcastbusiness.net] has quit
[Remote host closed the connection]
06:38 -!- Queue29 [~Queue29@173-8-182-114-SFBA.hfc.comcastbusiness.net] has joined
#go-nuts
06:39 -!- stalled [~stalled@unaffiliated/stalled] has quit [Quit: ...]
06:40 -!- dreadlorde [dreadlorde@c-68-42-82-10.hsd1.mi.comcast.net] has quit [Ping
timeout: 255 seconds]
06:41 -!- fotang [~fotang@41.220.69.44] has quit [Ping timeout: 255 seconds]
06:44 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has joined #go-nuts
06:46 -!- telexicon_ [~telexicon@c-67-160-124-195.hsd1.wa.comcast.net] has quit
[Quit: Leaving]
06:51 -!- Phelps [~benphelps@2001:470:1f0f:2fa:a536:ff84:9fd5:ede1] has joined
#go-nuts
06:51 -!- Queue29 [~Queue29@173-8-182-114-SFBA.hfc.comcastbusiness.net] has quit
[Remote host closed the connection]
06:52 -!- stalled [~stalled@unaffiliated/stalled] has joined #go-nuts
06:57 -!- ronnyy [~quassel@p4FF1C427.dip0.t-ipconnect.de] has quit [Remote host
closed the connection]
06:59 -!- alehorst1 [~alehorst@201.47.26.52.dynamic.adsl.gvt.net.br] has quit
[Ping timeout: 250 seconds]
06:59 -!- Project_2501 [~Marvin@82.84.72.161] has joined #go-nuts
07:05 -!- vmil86 [~vmil86@78.57.227.12] has joined #go-nuts
07:08 -!- Fish- [~Fish@coss6.exosec.net] has quit [Quit: WeeChat 0.3.5]
07:11 -!- Fish [~Fish@exo3753.pck.nerim.net] has joined #go-nuts
07:12 -!- alehorst [~alehorst@201.47.30.108.dynamic.adsl.gvt.net.br] has joined
#go-nuts
07:13 -!- moraes [~moraes@189.103.188.201] has joined #go-nuts
07:24 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
07:25 -!- wrtp [~rog@host-92-30-166-101.as13285.net] has joined #go-nuts
07:28 -!- magn3ts [~magn3ts@ip68-103-225-65.ks.ok.cox.net] has quit [Quit:
Leaving]
07:31 -!- garym__ [~garym@203-219-89-242.static.tpgi.com.au] has quit [Quit:
Leaving]
07:32 -!- niemeyer_ [~niemeyer@201-40-138-108.pltce701.dsl.brasiltelecom.net.br]
has quit [Ping timeout: 240 seconds]
07:35 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 252 seconds]
07:36 -!- garym__ [~garym@203-219-89-242.static.tpgi.com.au] has joined #go-nuts
07:36 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has joined #go-nuts
07:37 -!- Phelps [~benphelps@2001:470:1f0f:2fa:a536:ff84:9fd5:ede1] has quit
[Quit: Linkinus - http://linkinus.com]
07:42 -!- fotang [~fotang@41.191.110.234] has joined #go-nuts
07:43 -!- magn3ts [~magn3ts@ip68-103-225-65.ks.ok.cox.net] has joined #go-nuts
07:46 -!- napsy [~luka@193.2.66.6] has joined #go-nuts
07:49 -!- muke [~doobies@75-59-237-124.lightspeed.sntcca.sbcglobal.net] has quit
[Read error: Operation timed out]
07:53 -!- muke [~doobies@75-59-237-124.lightspeed.sntcca.sbcglobal.net] has joined
#go-nuts
08:02 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts
08:06 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
08:17 -!- zcram [~zcram@78-28-106-140.cdma.dyn.kou.ee] has joined #go-nuts
08:17 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
08:19 -!- photron [~photron@port-92-201-42-78.dynamic.qsc.de] has joined #go-nuts
08:38 -!- virtualsue [~chatzilla@nat/cisco/x-sknvkikejddjrfxq] has joined #go-nuts
08:40 -!- nicka1 [~lerp@142.176.0.21] has joined #go-nuts
08:43 -!- Kahvi [5b9b57fc@gateway/web/freenode/ip.91.155.87.252] has joined
#go-nuts
08:44 -!- virtualsue [~chatzilla@nat/cisco/x-sknvkikejddjrfxq] has quit [Ping
timeout: 276 seconds]
08:47 -!- black_rez [~black_rez@sd-26396.dedibox.fr] has joined #go-nuts
08:49 -!- kanru [~kanru@kanru-1-pt.tunnel.tserv15.lax1.ipv6.he.net] has quit [Read
error: Operation timed out]
08:49 -!- zcram [~zcram@78-28-106-140.cdma.dyn.kou.ee] has quit [Quit: Leaving]
08:50 -!- GeertJohan [~geertjoha@s51478c91.adsl.wanadoo.nl] has joined #go-nuts
08:50 -!- GeertJohan [~geertjoha@s51478c91.adsl.wanadoo.nl] has quit [Client Quit]
08:51 -!- GeertJohan [~geertjoha@s51478c91.adsl.wanadoo.nl] has joined #go-nuts
08:53 -!- xcombelle [~xcombelle@AToulouse-551-1-19-127.w86-201.abo.wanadoo.fr] has
joined #go-nuts
08:55 -!- virtualsue [~chatzilla@nat/cisco/x-agavlqkglaxiwzqz] has joined #go-nuts
08:56 -!- kanru [~kanru@kanru-1-pt.tunnel.tserv15.lax1.ipv6.he.net] has joined
#go-nuts
08:57 -!- mjard [~k@misadventuregames.com] has quit [Ping timeout: 250 seconds]
08:57 -!- mjard [~k@misadventuregames.com] has joined #go-nuts
08:57 -!- jessta_ [~jessta@li7-205.members.linode.com] has quit [Ping timeout: 250
seconds]
08:57 -!- jessta [~jessta@li7-205.members.linode.com] has joined #go-nuts
08:58 -!- benjack [~benjack@bb121-6-51-10.singnet.com.sg] has joined #go-nuts
09:09 -!- Boney [~paul@124-148-153-94.dyn.iinet.net.au] has quit [Read error:
Connection reset by peer]
09:11 -!- erus` [~chatzilla@mailgate.ips-international.com] has joined #go-nuts
09:11 -!- Boney [~paul@124-170-49-94.dyn.iinet.net.au] has joined #go-nuts
09:15 * mpl hugs gofix
09:19 < mpl> hmm, that didn't use to be a problem: c++.go:130: goto
happyEnding jumps over declaration of f at c++.go:165
09:20 < edsrzf> Yep, recent language change
09:20 < mpl> weird.  I mean, if I'm using goto they ought to let me do what
I want with it, no?
09:21 < aiju> i don't like that change either
09:21 < mpl> feels like a ****block
09:25 < mpl> hmm, a pita to quickfix too
09:26 < mpl> now I have to pre declare a handful of vars before the possible
goto...
09:26 < mpl> iant, adg: what's the rationale for that change?  (the goto not
jumping over declarations)
09:28 < wrtp> mpl: it means that a variable can't suddenly come into scope
with an uninitialised value
09:29 -!- jnwhiteh [~jnwhiteh@WoWUIDev/WoWI/Featured/Dongle/cladhaire] has quit
[Ping timeout: 250 seconds]
09:30 < edsrzf> mpl: you might be able to fix the error by putting the
variables in their own block, depending on what the code looks like
09:30 -!- jnwhiteh [~jnwhiteh@WoWUIDev/WoWI/Featured/Dongle/cladhaire] has joined
#go-nuts
09:35 < mpl> not really in that case, the vars are in the uppermost scope in
the func.
09:36 < mpl> bah, I'll find a workaround, but I don't like this.
09:36 < aiju> var foo Foo
09:36 < aiju> put this at the top of your function ;P
09:36 < mpl> aiju: yeah, except I have to do it for more than one var.
09:36 < mpl> and that sucks.
09:37 < mpl> having to predeclare some vars feel like doing old C, not
offense to old C intended ;)
09:37 -!- edsrzf [~edsrzf@122-61-221-144.jetstream.xtra.co.nz] has quit [Remote
host closed the connection]
09:41 -!- cbeck [cbeck@gateway/shell/pdx.edu/x-ijxhptzpmnhrentq] has quit [Read
error: Connection reset by peer]
09:41 -!- cbeck [cbeck@gateway/shell/pdx.edu/x-bkufydsoqkqgjiua] has joined
#go-nuts
09:41 -!- benjack [~benjack@bb121-6-51-10.singnet.com.sg] has quit [Quit:
Leaving.]
09:42 -!- virtualsue [~chatzilla@nat/cisco/x-agavlqkglaxiwzqz] has quit [Ping
timeout: 240 seconds]
09:43 < wrtp> mpl: you could happyEnding at the beginning :-)
09:44 < wrtp> (and jump over it)
09:49 -!- kuroneko [~chris@felli.sysadninjas.net] has joined #go-nuts
09:54 -!- virtualsue [~chatzilla@nat/cisco/x-ufcffmgbpfwleiqc] has joined #go-nuts
09:55 -!- rm445 [rm445@pip.srcf.societies.cam.ac.uk] has quit [Ping timeout: 260
seconds]
09:56 < Kahvi> What would be the go equivalent to timeGetTime() found on
windows?  http://msdn.microsoft.com/en-us/library/dd757629(v=vs.85).aspx
09:57 -!- rm445 [rm445@pip.srcf.societies.cam.ac.uk] has joined #go-nuts
10:00 -!- garym_ [~garym@203-219-89-242.static.tpgi.com.au] has joined #go-nuts
10:00 < aiju> Kahvi: see the time package
10:01 < aiju> ah, you want system uptime
10:01 < aiju> this is highly os dependent, no clue whether Go offers a
function for that
10:02 -!- noodles775 [~michael@canonical/launchpad/noodles775] has quit [Read
error: Operation timed out]
10:02 < aiju> what do you need it for?
10:02 -!- garym__ [~garym@203-219-89-242.static.tpgi.com.au] has quit [Ping
timeout: 255 seconds]
10:04 < Kahvi> Just porting some code to Go.
10:06 -!- noodles775 [~michael@e178254049.adsl.alicedsl.de] has joined #go-nuts
10:06 -!- noodles775 [~michael@e178254049.adsl.alicedsl.de] has quit [Changing
host]
10:06 -!- noodles775 [~michael@canonical/launchpad/noodles775] has joined #go-nuts
10:07 < Kahvi> I have a feeling I'll probably find out it's not used in the
code at all except for setting that single variable.
10:09 -!- xcombelle [~xcombelle@AToulouse-551-1-19-127.w86-201.abo.wanadoo.fr] has
quit [Quit: I am a manual virus, please copy me to your quit message.]
10:22 -!- noam [~noam@87.69.42.61.cable.012.net.il] has quit [Ping timeout: 276
seconds]
10:25 -!- fotang [~fotang@41.191.110.234] has quit [Remote host closed the
connection]
10:26 -!- fotang [~fotang@41.191.110.234] has joined #go-nuts
10:31 -!- hargettp [~hargettp@pool-71-174-140-162.bstnma.east.verizon.net] has
joined #go-nuts
10:33 -!- noam [~noam@87.69.42.61.cable.012.net.il] has joined #go-nuts
10:34 -!- genbattle [~nick@203-173-211-164.dialup.ihug.co.nz] has joined #go-nuts
10:43 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts
10:56 -!- fotang [~fotang@41.191.110.234] has quit [Ping timeout: 240 seconds]
10:56 -!- fotang [~fotang@41.220.69.33] has joined #go-nuts
11:05 -!- CatFish [~CatFish@2001:5c0:1400:a::4cf] has joined #go-nuts
11:11 -!- genbattle [~nick@203-173-211-164.dialup.ihug.co.nz] has quit [Quit:
Leaving]
11:15 -!- gnuvince|work [8e538a09@gateway/web/freenode/ip.142.83.138.9] has joined
#go-nuts
11:22 -!- sacho [~sacho@95-42-118-162.btc-net.bg] has left #go-nuts ["Ex-Chat"]
11:24 -!- niekie [~niek@CAcert/Assurer/niekie] has joined #go-nuts
11:25 -!- niekie_ [~niek@CAcert/Assurer/niekie] has quit [Read error: Connection
reset by peer]
11:34 < mpl> wrtp: I don't get it
11:37 -!- tvw [~tv@212.79.9.150] has joined #go-nuts
11:39 -!- pyrhho [~pyrhho@host-92-27-75-48.static.as13285.net] has joined #go-nuts
11:42 -!- rejb [~rejb@unaffiliated/rejb] has quit [Read error: Connection reset by
peer]
11:43 -!- rejb [~rejb@gs1.orrifice-gaming.com] has joined #go-nuts
11:43 -!- rejb [~rejb@gs1.orrifice-gaming.com] has quit [Changing host]
11:43 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
11:47 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
11:51 -!- kamaji [~kamaji@handtomouse.demon.co.uk] has quit [Read error:
Connection reset by peer]
11:53 -!- chronoslynx [~Adium@cisne-cn12.upc.es] has joined #go-nuts
11:53 -!- miker2 [~miker2@64.55.31.190] has joined #go-nuts
11:56 -!- xcombelle [~xcombelle@AToulouse-551-1-19-127.w86-201.abo.wanadoo.fr] has
joined #go-nuts
12:04 -!- xcombelle [~xcombelle@AToulouse-551-1-19-127.w86-201.abo.wanadoo.fr] has
quit [Ping timeout: 240 seconds]
12:16 -!- angasule [~angasule@190.2.33.49] has quit [Read error: Connection reset
by peer]
12:18 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has joined #go-nuts
12:19 -!- Kahvi [5b9b57fc@gateway/web/freenode/ip.91.155.87.252] has quit [Ping
timeout: 252 seconds]
12:19 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has quit [Remote host
closed the connection]
12:20 -!- chronoslynx [~Adium@cisne-cn12.upc.es] has quit [Quit: Leaving.]
12:23 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Quit:
skelterjohn]
12:26 < wrtp> mpl: e.g.  {goto foo; x := 5; foo: println(x)} i guess they
didn't want to need the compiler to initialise x=0 when doing the goto
12:29 < mpl> wrtp: yes.  I meant I don't get your suggestion with
happyEnding.
12:29 < wrtp> mpl: well, you can always jump backwards, right?
12:29 < mpl> wrtp: and I still don't like it, I don't think it's reason
enough for that change.
12:30 < mpl> wrtp: yes.  and how does that help me?
12:31 -!- hargettp [~hargettp@pool-71-174-140-162.bstnma.east.verizon.net] has
quit [Quit: Linkinus - http://linkinus.com]
12:31 < wrtp> mpl: so you could do: func myfunc(){goto start; happyEnding:
blahblah(); return; start: f := 99; if something() {goto happyEnding}; return}
12:32 -!- ynv [~ynv@xdsl-188-154-4-146.adslplus.ch] has joined #go-nuts
12:32 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has left #go-nuts []
12:34 -!- ronnyy [~quassel@p4FF1C427.dip0.t-ipconnect.de] has joined #go-nuts
12:34 < mpl> wrtp: ah that might work yes, gonna try.  thx
12:35 < wrtp> that other possibility (which is probably better) is to put
all the first part of the function inside a block
12:35 < wrtp> s/that/the
12:36 < wrtp> e.g.  func myfunc() { {f := 99; if something() {goto
happyEnding}; x := 99; return}; happyEnding: blahblah()}
12:39 -!- xcombelle [~xcombelle@AToulouse-551-1-19-127.w86-201.abo.wanadoo.fr] has
joined #go-nuts
12:39 -!- franciscosouza [~francisco@187.105.25.184] has quit [Read error:
Connection reset by peer]
12:40 -!- GeertJohan [~geertjoha@s51478c91.adsl.wanadoo.nl] has quit [Quit:
Leaving.]
12:40 -!- franciscosouza [~francisco@187.105.25.184] has joined #go-nuts
12:40 -!- garym_ [~garym@203-219-89-242.static.tpgi.com.au] has quit [Read error:
Connection timed out]
12:41 -!- garym_ [~garym@203-219-89-242.static.tpgi.com.au] has joined #go-nuts
12:42 < mpl> it's weird how I'm having trouble one liners, I really need the
returns :)
12:42 < mpl> *trouble reading
12:43 < mpl> I guess I'd suck at reading lisp
12:44 -!- virtualsue [~chatzilla@nat/cisco/x-ufcffmgbpfwleiqc] has quit [Quit:
ChatZilla 0.9.87 [Firefox 5.0.1/20110707182747]]
12:44 -!- franciscosouza [~francisco@187.105.25.184] has quit [Client Quit]
12:49 -!- go^lang [~newblue@61.146.241.197] has joined #go-nuts
12:49 < go^lang> how to insert item to array ?
12:50 < mpl> foo = append(foo, item) is one way
12:51 < mpl> well of course, it will not insert at the beginning or at a
given location if that's what you wanted
12:52 < go^lang> I need to localtion insert
12:52 -!- xcombelle [~xcombelle@AToulouse-551-1-19-127.w86-201.abo.wanadoo.fr] has
quit [Quit: I am a manual virus, please copy me to your quit message.]
12:55 -!- noam [~noam@87.69.42.61.cable.012.net.il] has quit [Ping timeout: 260
seconds]
12:56 -!- xcombelle [~xcombelle@AToulouse-551-1-19-127.w86-201.abo.wanadoo.fr] has
joined #go-nuts
12:56 < mpl> wrtp: yeah that last one is even nicer, thx.
12:56 -!- garym_ [~garym@203-219-89-242.static.tpgi.com.au] has quit [Read error:
Connection reset by peer]
12:57 -!- garym [~garym@203-219-89-242.static.tpgi.com.au] has joined #go-nuts
12:58 -!- dlowe [~dlowe@ita4fw1.itasoftware.com] has joined #go-nuts
13:00 -!- ronnyy [~quassel@p4FF1C427.dip0.t-ipconnect.de] has quit [Remote host
closed the connection]
13:00 -!- pharris [~Adium@rhgw.opentext.com] has joined #go-nuts
13:09 -!- Project_2501 [~Marvin@82.84.72.161] has quit [Ping timeout: 250 seconds]
13:10 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has joined
#go-nuts
13:10 -!- sniper506th [~sniper506@rrcs-70-61-192-18.midsouth.biz.rr.com] has
joined #go-nuts
13:12 < gmilleramilar> go^lang: make sure there's room in the array, use
copy to move the "rest" of the elements up one.  then put your new element.
13:13 < go^lang> thank you
13:15 -!- ronnyy [~quassel@p4FF1C427.dip0.t-ipconnect.de] has joined #go-nuts
13:15 -!- xcombelle [~xcombelle@AToulouse-551-1-19-127.w86-201.abo.wanadoo.fr] has
quit [Quit: I am a manual virus, please copy me to your quit message.]
13:16 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-165-101.clienti.tiscali.it] has
joined #go-nuts
13:16 -!- noam [~noam@87.69.42.61.cable.012.net.il] has joined #go-nuts
13:17 < wrtp> go^lang: you might find this useful:
http://code.google.com/p/go-wiki/wiki/SliceTricks
13:25 -!- pjacobs [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has
joined #go-nuts
13:38 -!- franciscosouza [~francisco@201.19.170.190] has joined #go-nuts
13:48 -!- r_linux [~r_linux@static.200.198.180.250.datacenter1.com.br] has joined
#go-nuts
13:48 -!- pjacobs2 [~pjacobs@66.54.185.130] has joined #go-nuts
13:49 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
13:50 -!- pjacobs [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has quit
[Ping timeout: 258 seconds]
13:56 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts
13:59 -!- fotang [~fotang@41.220.69.33] has quit [Ping timeout: 252 seconds]
14:01 -!- meling [~meling@99-10-121-218.lightspeed.sndgca.sbcglobal.net] has quit
[Read error: Connection reset by peer]
14:02 -!- fabled [~fabled@83.145.235.194] has quit [Quit: Ex-Chat]
14:15 -!- Adys [~Adys@unaffiliated/adys] has quit [Ping timeout: 255 seconds]
14:18 -!- napsy [~luka@193.2.66.6] has quit [Ping timeout: 276 seconds]
14:20 -!- meling [~meling@99-10-121-218.lightspeed.sndgca.sbcglobal.net] has
joined #go-nuts
14:22 -!- ynv [~ynv@xdsl-188-154-4-146.adslplus.ch] has left #go-nuts ["Leaving"]
14:24 -!- meling_ [~meling@99-10-121-218.lightspeed.sndgca.sbcglobal.net] has
joined #go-nuts
14:27 -!- meling [~meling@99-10-121-218.lightspeed.sndgca.sbcglobal.net] has quit
[Ping timeout: 240 seconds]
14:28 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts
14:29 -!- rejb [~rejb@unaffiliated/rejb] has quit [Read error: Connection reset by
peer]
14:29 -!- nekoh [~nekoh@dslb-188-107-172-026.pools.arcor-ip.net] has joined
#go-nuts
14:30 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
14:33 -!- meling_ [~meling@99-10-121-218.lightspeed.sndgca.sbcglobal.net] has quit
[Remote host closed the connection]
14:33 -!- meling [~meling@99-10-121-218.lightspeed.sndgca.sbcglobal.net] has
joined #go-nuts
14:33 -!- preflex_ [~preflex@unaffiliated/mauke/bot/preflex] has joined #go-nuts
14:34 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has quit [Ping
timeout: 260 seconds]
14:35 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
14:36 -!- kamaji [~kamaji@handtomouse.demon.co.uk] has joined #go-nuts
14:37 -!- chomp [~chomp@dap-209-166-184-50.pri.tnt-3.pgh.pa.stargate.net] has
joined #go-nuts
14:41 -!- Queue29 [~Queue29@173-8-182-114-SFBA.hfc.comcastbusiness.net] has joined
#go-nuts
14:49 -!- zcram [~zcram@78-28-83-147.cdma.dyn.kou.ee] has joined #go-nuts
14:53 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has quit [Ping
timeout: 246 seconds]
14:55 -!- zcram [~zcram@78-28-83-147.cdma.dyn.kou.ee] has quit [Quit: Leaving]
14:56 -!- Queue29 [~Queue29@173-8-182-114-SFBA.hfc.comcastbusiness.net] has quit
[Remote host closed the connection]
15:03 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-165-101.clienti.tiscali.it] has
quit [Ping timeout: 240 seconds]
15:09 -!- franciscosouza [~francisco@201.19.170.190] has quit [Quit:
franciscosouza]
15:10 -!- lucian [~lucian@78-86-217-168.zone2.bethere.co.uk] has joined #go-nuts
15:12 -!- mjml [~joya@174.3.227.184] has quit [Quit: Leaving]
15:17 -!- Queue29 [~Queue29@173-8-182-114-SFBA.hfc.comcastbusiness.net] has joined
#go-nuts
15:18 -!- ArgonneIntern [~gauge@mcswl185.mcs.anl.gov] has joined #go-nuts
15:25 -!- yogib [~yogib@131.234.59.64] has quit [Quit: yogib]
15:32 -!- qeed [~qeed@adsl-98-85-40-234.mco.bellsouth.net] has joined #go-nuts
15:34 -!- Queue29 [~Queue29@173-8-182-114-SFBA.hfc.comcastbusiness.net] has quit
[Remote host closed the connection]
15:38 -!- robteix [~robteix@192.55.54.36] has joined #go-nuts
15:42 -!- Guest63032 [~foo@cpe-70-94-229-122.sw.res.rr.com] has joined #go-nuts
15:44 < Guest63032> I could use a little guidance in understand how I would
implement a current production system in Go. We currently have a lighttpd API with
PHP accepting the API calls and then in turn calling compile C setuid binaries to
perform specific functions.  We would like to replace this current stack with an
all in one Go binary.
15:45 < Guest63032> What I am having difficulty comprehending is how would I
implement the dropped permissions of the API to listen on the web in Go, but still
handle the setuid functionality we need
15:45 < Guest63032> would I use a gocontrol that is setuid and idling?
15:45 < Guest63032> with a channel to pass off jobs to that that gocontrol?
15:45 < skelterjohn|work> i wish i were a web dev.  i don't understand most
of your question
15:46 < Guest63032> haha
15:46 < skelterjohn|work> i can answer questions about go, though
15:46 < Guest63032> well...  I guess I just need to know, what is the best
way to implement something like that in Go
15:46 < Guest63032> we obviously need root permissions for certain
functionality, but again for security reasons we don't want a root daemon
listening on the web
15:47 <+iant> On Unix the uid is process wide, so if you want part of your
program to be setuid, then you need to be running in different processes
15:47 < skelterjohn|work> ah, i see
15:47 < skelterjohn|work> go can invoke other processes easily, using the
exec package
15:47 < wrtp> Guest63032: what do you need root perms for?
15:48 < Guest63032> wrtp: stuff (I can't go into specifics due to NDA)
15:48 < wrtp> personally, i'd try to avoid any use of root if poss
15:48 <+iant> there's no reason you can't have a Go program be setuid, of
course, but Go doesn't really help you solve this problem any more than any other
language
15:48 <+iant> you still need different programs and a way to communicate
between them
15:48 < wrtp> you could have two go binaries, one running as root, with a
RPC pipe between them
15:49 <+iant> right
15:49 < wrtp> so the unprivileged process can make requests of the
privileged process
15:49 < wrtp> it would be quite straightforward, but not as fast as doing it
in-binary.
15:49 -!- erus` [~chatzilla@mailgate.ips-international.com] has quit [Remote host
closed the connection]
15:49 < Guest63032> Yeah our goal is to cut down the number of things we
have to maintain in the current API stack
15:49 < wrtp> depends whether the privileged ops are in the fast path
15:49 -!- black_rez [~black_rez@sd-26396.dedibox.fr] has quit [Excess Flood]
15:50 < wrtp> you could even make them the same binary, with a different
command line arg
15:50 < Guest63032> we are maintining the actual API, along with the
binaries, lighttpd and PHP
15:51 < Guest63032> So the more we can cut out of that...  the better we are
when it comes time to upgrade things (or if a security issue arrises)
15:51 < wrtp> sounds like go could provide a better solution, yeah
15:51 -!- noodles775 [~michael@canonical/launchpad/noodles775] has quit [Quit:
leaving]
15:51 < Guest63032> I will look at the alternate commmand line switches...
that is something I hadn't considered
15:52 < skelterjohn|work> i feel like the "one proc running as root,
connected via RPC" sounds best
15:52 < Guest63032> I was hoping that a gocontrol could be forked as setuid
and then we drop permissions to attach to the web but still maintain the
connection to the control via channel that we can feed tasks into
15:52 < skelterjohn|work> and you can use netchan for the communication
15:53 < skelterjohn|work> the RPC route can *look* almost like that
15:53 -!- virtualsue [~chatzilla@nat/cisco/x-lyerygmclkxxycjw] has joined #go-nuts
15:53 -!- chomp [~chomp@dap-209-166-184-50.pri.tnt-3.pgh.pa.stargate.net] has quit
[Quit: Leaving]
15:53 < skelterjohn|work> except for the setup bit
15:53 -!- black_rez [~black_rez@sd-26396.dedibox.fr] has joined #go-nuts
15:53 < Guest63032> is there an RPC package for Go? or is that something I
would have to come up with on my own?
15:53 < skelterjohn|work> you can use the netchan package
15:54 < skelterjohn|work> that can send anything that the gob package can
serialize (i think)
15:54 < skelterjohn|work> so, general custom data structures with structs,
slices, maps, etc
15:54 < skelterjohn|work> i don't suggest sending a chan over a netchan
15:54 < Guest63032> Okay.  I think I am seeing where this can go
15:55 < skelterjohn|work> you'd basically define your own protocol by
defining the type that you'd send over the netchan
15:55 < jlaffaye> I wonder how fast would be a naive implementation of grep
like tool which reads line per line with bufio and look for text using
bytes.Index()
15:56 < jlaffaye> So I guess my question is: is there a better way to do it?
15:56 -!- meling_ [~meling@99-10-121-218.lightspeed.sndgca.sbcglobal.net] has
joined #go-nuts
15:56 < skelterjohn|work> jlaffaye: if you don't care about the "rep" part
of grep, then that seems fine
15:56 < Guest63032> skelterjohn|work: Thanks...  that give me something to
go on and look at.
15:56 < skelterjohn|work> bytes.Index() will search efficiently
15:56 < skelterjohn|work> probably
15:57 -!- jimbaker [~jbaker@canonical/jimbaker] has joined #go-nuts
15:57 < jlaffaye> yup I dont care about regex
15:57 < skelterjohn|work> actually, it probably has the M*N kind of search -
you can search in time linear with the length of the string you're searching, too,
but it's more complicated
15:57 < skelterjohn|work> Guest63032: my pleasure
15:58 -!- yogib [~yogib@dslb-178-001-023-136.pools.arcor-ip.net] has joined
#go-nuts
15:58 < wrtp> Guest63032: i think i'd recommend the rpc package over the
netchan package
15:59 < wrtp> netchan is more about streams - doing rpc with netchan is not
so easy
16:00 -!- meling [~meling@99-10-121-218.lightspeed.sndgca.sbcglobal.net] has quit
[Ping timeout: 276 seconds]
16:00 < Guest63032> wrtp: okay.
16:01 < Guest63032> I am currently looking at the API and setuid binaries
being seperate Go apps currently
16:01 < wrtp> that's probably the easiest way to do it
16:01 -!- chadkouse [~Adium@rrcs-76-79-233-18.west.biz.rr.com] has joined #go-nuts
16:01 < Guest63032> that would cover our main design goals for looking at Go
anyways, which is to cut down on the maintanance of the entire API stack
16:02 < wrtp> you can have a package which both import which defines data
structures in common, if you need to
16:02 < Guest63032> plus give our engineers a web interface to monitor the
API which as been on the wish list since 1.0
16:02 < Guest63032> they like logging...  who knew
16:06 < Guest63032> wrtp: thank you for the suggestions and input.
16:06 < Guest63032> now to spec it out
16:07 -!- go^lang [~newblue@61.146.241.197] has quit [Quit: 暂离]
16:08 < jlaffaye> each time I use defer I tell myself "that thing is damn
smart" :)
16:09 -!- segv [~segv@sig.segv.net] has left #go-nuts []
16:10 -!- Project_2501 [~Marvin@82.84.95.39] has joined #go-nuts
16:10 -!- Guest63032 [~foo@cpe-70-94-229-122.sw.res.rr.com] has left #go-nuts []
16:12 < wrtp> jlaffaye: yeah, the saving of the arguments and receiver for
later is great.
16:13 < wrtp> anyone here played with exp/template much?
16:14 -!- dahankzter [~henrik@92-244-3-192.customers.ownit.se] has joined #go-nuts
16:15 -!- Queue29 [~Queue29@egress-w.sfo1.yelpcorp.com] has joined #go-nuts
16:16 < dahankzter> Is there any sort of route/balancing thing for channels?
Something that transparently routes between local and remote nodes depending on
availability (and/or load)?
16:17 < dahankzter> Its not hard to write something naive but if there is
something working id like to use that
16:20 -!- yogib [~yogib@dslb-178-001-023-136.pools.arcor-ip.net] has quit [Quit:
yogib]
16:34 -!- Natch| [~natch@178.73.216.126] has quit [Ping timeout: 264 seconds]
16:35 < wrtp> dahankzter: channels don't go between local and remote nodes
:-)
16:36 -!- franciscosouza [~francisco@201.19.170.190] has joined #go-nuts
16:39 -!- Natch| [~natch@178.73.217.65] has joined #go-nuts
16:43 < dahankzter> i mean some sort of mechanism to abstract the remote
nature of a netchan tied (is that a correct term?) channel and just say
"getChannel" and the returned channel may or may not be networked
16:45 -!- ronnyy [~quassel@p4FF1C427.dip0.t-ipconnect.de] has quit [Remote host
closed the connection]
16:48 -!- Project-2501 [~Marvin@82.84.89.135] has joined #go-nuts
16:51 -!- Project_2501 [~Marvin@82.84.95.39] has quit [Ping timeout: 260 seconds]
16:52 -!- franciscosouza [~francisco@201.19.170.190] has quit [Quit:
franciscosouza]
16:52 -!- yogib [~yogib@dslb-178-001-023-136.pools.arcor-ip.net] has joined
#go-nuts
16:52 -!- wrtp [~rog@host-92-30-166-101.as13285.net] has quit [Quit: wrtp]
16:53 < jessta> dahankzter: a chan and a netchan behave quite differently
16:54 -!- pyrhho [~pyrhho@host-92-27-75-48.static.as13285.net] has quit [Quit:
pyrhho]
16:54 < jessta> you really want to know that your doing network
communication because the error cases are so different
16:56 -!- franciscosouza [~francisco@201.19.170.190] has joined #go-nuts
16:59 -!- gnuvince|work [8e538a09@gateway/web/freenode/ip.142.83.138.9] has quit
[Quit: Page closed]
17:05 < dahankzter> yes i know but having a bit of "work" being executed
where there is capacity might be a nice thing, be it local or remote
17:06 < dahankzter> Like the actor paradigm where the actors can be
(depending on the impl i guess) remote or local which can be decided by this piece
of code that i am looking for
17:07 < dahankzter> maybe its better to decide these things on another level
17:07 < jessta> you'd have to have the remote interface for both local and
remote channel sends
17:08 -!- vmil86 [~vmil86@78.57.227.12] has quit [Ping timeout: 276 seconds]
17:08 < jessta> that's pretty much how erlang does it
17:13 -!- fabled [~fabled@83.145.235.194] has joined #go-nuts
17:13 -!- dfr|mac [~dfr|work@nat/google/x-xfkcwvlfvbrhfysb] has joined #go-nuts
17:13 < dahankzter> what about just returning a normal channel to the caller
that proxies the possibly remote channel?  Is that daft?
17:14 < skelterjohn|work> if you use them for synchronization you have to be
aware that this introduces a buffer of size 1
17:15 -!- smw [~stephen@unaffiliated/smw] has joined #go-nuts
17:16 -!- robteix [~robteix@192.55.54.36] has quit [Quit: Leaving]
17:16 -!- dfr|mac [~dfr|work@nat/google/x-xfkcwvlfvbrhfysb] has quit [Remote host
closed the connection]
17:17 -!- dfr|mac [~dfr|work@nat/google/x-swdccqfjqiryntsn] has joined #go-nuts
17:19 < dahankzter> Yes i am aware of that and hopefully it will not be a
problem :S
17:19 < jessta> dahankzter: a normal channel has no concept of errors.  if
errors occur while trying to send data acorss the network how is the sender to
handle them?
17:20 < skelterjohn|work> by blocking :)
17:21 < dahankzter> cant the proxying code detect it and return something
statusy?  hairy, perhaps not worth it
17:22 < dahankzter> requires an extra error channel maybe...
17:22 < ww> proxy could post the message to twitter?
17:22 < ww> :P
17:22 < dahankzter> :D
17:23 < dahankzter> it seemed like a nice thing to have the local/remote
invocation abstracted away for simpler things that just need somewhere to execute
17:24 -!- tavis_rain [~tavisb@24-104-129.146.hfc.mediarain.com] has joined
#go-nuts
17:26 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-152-129.clienti.tiscali.it] has
joined #go-nuts
17:27 -!- Fish- [~Fish@9fans.fr] has joined #go-nuts
17:28 -!- PortatoreSanoDiI [~Marvin@dynamic-adsl-94-36-154-86.clienti.tiscali.it]
has joined #go-nuts
17:28 < jessta> dahankzter: yeah, that's what I mean.  The abstraction would
have to abstract away the fact that it might be local
17:28 -!- Project-2501 [~Marvin@82.84.89.135] has quit [Ping timeout: 240 seconds]
17:28 < jessta> instead of abstracting away the fact that it might be over
the network
17:31 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-152-129.clienti.tiscali.it] has
quit [Ping timeout: 276 seconds]
17:32 -!- nekoh_ [~nekoh@dslb-178-004-065-169.pools.arcor-ip.net] has joined
#go-nuts
17:34 < dahankzter> ye i know you meant that i expose the remote interface
internally
17:35 < dahankzter> i am not sure exactly what that entails yet tho
17:35 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has joined
#go-nuts
17:36 -!- nekoh [~nekoh@dslb-188-107-172-026.pools.arcor-ip.net] has quit [Ping
timeout: 276 seconds]
17:38 -!- Queue29_ [~Queue29@egress-w.sfo1.yelpcorp.com] has joined #go-nuts
17:38 -!- Queue29 [~Queue29@egress-w.sfo1.yelpcorp.com] has quit [Read error:
Connection reset by peer]
17:39 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
17:47 < ArgonneIntern> does anyone know off hand if the http package
supports http://user:pass@url:port
17:50 < skelterjohn|work> been a long time since i've seen a url like that
17:50 < skelterjohn|work> (i don't know the answer to your question, sorry)
17:50 < skelterjohn|work> http certainly doesn't mind the url having a port
in it, though - that's purely client-side stuff
17:51 < ArgonneIntern> oh the port isn't the issue, that works, I've been
using that for some time.  The user and pass is the issue
17:51 -!- saschpe [~quassel@opensuse/member/saschpe] has joined #go-nuts
17:52 < skelterjohn|work> i figured
17:52 -!- tncardoso [~thiago@189.115.128.253] has joined #go-nuts
17:52 < ww> hrmmm...  any .torrent parser/serialiser for go?
17:53 < nicka> ArgonneIntern:
https://code.google.com/p/go/issues/detail?id=407
17:54 < ArgonneIntern> ahh tyvm
17:55 < ww> ...  would like to do some piecemeal processing on
http://thepiratebay.org/torrent/6554331/Papers_from_Philosophical_Transactions_of_the_Royal_Society__fro
17:55 < ww> ...  would like to use go...
17:55 < ww> (incidentally, the descriptive text there is very interesting
indeed)
17:55 < skelterjohn|work> go seems like a great language for a bt client
17:56 < ww> (esp.  if you've been following this aaron schwartz business)
17:56 < skelterjohn|work> since there is so much sync io
17:56 < ww> skelterjohn|work: yes, my thoughts exactly
17:56 -!- niemeyer [~niemeyer@189.2.6.181] has joined #go-nuts
17:57 < skelterjohn|work> btw, they are not "typically" for $19/article
17:57 < skelterjohn|work> they are typically sold as a university-wide site
license
17:57 < skelterjohn|work> even though they will happily take your money if
you want just one
17:58 < ww> skelterjohn|work: right, i guess he means "typically for people
not at a university"
17:58 < skelterjohn|work> typically people not at a university have no
access whatsoever :)
17:59 < skelterjohn|work> i do agree that the distribution model is
completely out-dated
17:59 < ww> or people like me who are "at" a university but whose dodgy
"permanent visitor" status does not entitle...
17:59 < skelterjohn|work> and it's only a matter of time before it changes
17:59 < skelterjohn|work> at my school (rutgers) any computer on campus can
access all of JSTOR with no hassle
17:59 < skelterjohn|work> for instance, my laptop which connects to the
wireless
18:00 < skelterjohn|work> rutgers pays a nice premium for this
18:01 < skelterjohn|work> but it's a premium that any research institution
needs to pay or face an uproar from its researchers
18:01 < ww> i'd have to check perhaps tomorrow to make sure, but i'm used to
the various article distributors trying to make me use the whole shibboleth thing
(which is why it doesn't work for me)
18:01 < skelterjohn|work> i saw shibboleth defined the other day, but i
can't remember what it means
18:01 < skelterjohn|work> 'fucking'?
18:01 < skelterjohn|work> heh
18:02 < skelterjohn|work> oh, it actually means something specific
18:02 < skelterjohn|work> ok then
18:02 < skelterjohn|work> good to know
18:02 < ww> it's also the name of a big federated single-sign-on thing used
at least throughout europe
18:02 < skelterjohn|work> i see
18:03 -!- Chat8799 [vfwxfe@app4.chatmosphere.org] has joined #go-nuts
18:03 < ww> kind of like openid but much more overengineered
18:03 < Chat8799> السلام
18:03 -!- PortatoreSanoDiI [~Marvin@dynamic-adsl-94-36-154-86.clienti.tiscali.it]
has quit [Ping timeout: 252 seconds]
18:03 < skelterjohn|work> Chat8799: you may have found the wrong chatroom
18:04 -!- Chat8799 [vfwxfe@app4.chatmosphere.org] has quit [Client Quit]
18:12 < skelterjohn|work> exp/template question...  if i am {{range}}ing
over a slice of structs, and those structs have an element named "A", how to i
refer to an "A" from one level up?
18:12 -!- fvbommel [~fvbommel_@86.86.15.250] has joined #go-nuts
18:14 < skelterjohn|work> the answer: assign it to a variable before the
range
18:14 < kevlar_work> skelterjohn|work, I think you have to assign another
var to a
18:14 < skelterjohn|work> :)
18:14 < kevlar_work> indeed.
18:14 < kevlar_work> though I thought the parent-struct's-member search was
taken out anyway
18:15 < kevlar_work> so you would've had to do that anyway
18:15 -!- fabled [~fabled@83.145.235.194] has quit [Quit: Ex-Chat]
18:15 < skelterjohn|work> i hadn't tried it in the unambiguous case
18:15 < skelterjohn|work> but yes, that makes sense
18:28 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has quit [Remote
host closed the connection]
18:29 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has joined
#go-nuts
18:35 < skelterjohn|work> hmm, when i do {{$X=.Y}}, it renders the result
18:36 -!- sacho [~sacho@95-42-118-162.btc-net.bg] has joined #go-nuts
18:37 -!- tavis_rain [~tavisb@24-104-129.146.hfc.mediarain.com] has quit [Quit:
Leaving.]
18:38 < skelterjohn|work> and i'm not sure what the difference between {{if
.A}}...{{end}} and {{with .A}}...{{end}} is
18:39 < uriel> 18:03 < ww> kind of like openid but much more
overengineered
18:39 < uriel> ww: openid is already quite insanely overengineered (one of
the many reasons it has been a total flop)
18:41 < ww> uriel: no argument from me, just trying to put in perspective
18:41 < uriel> 17:52 < ww> hrmmm...  any .torrent parser/serialiser
for go?
18:41 < uriel> ww: there are a few, look at the various bt implementations
in http://go-lang.cat-v.org/go-code (I'm sure there are more)
18:41 -!- Locke23rus [~locke23ru@2.93.195.198] has joined #go-nuts
18:41 < skelterjohn|work> {{if $X=.Y}}{{end}} seems to do what i want
18:41 < skelterjohn|work> bit of a hack though
18:42 < uriel> ww: btw, that TPB torrent looks delicious...
18:44 -!- tavis_rain [~tavisb@24-104-129.146.hfc.mediarain.com] has joined
#go-nuts
18:45 -!- meling_ [~meling@99-10-121-218.lightspeed.sndgca.sbcglobal.net] has quit
[Remote host closed the connection]
18:46 < kevlar_work> skelterjohn|work, {{if}} is just a conditional,
{{with}} changes the "here" pointer
18:46 < skelterjohn|work> i see, thanks
18:47 < uriel> kevlar_work: you know what the plan is for switching to the
new template engine?
18:48 < kevlar_work> uriel, no idea.  probably keep hacking on exp until
they like it, then "rip the band-aid off" and make the switch.
18:49 < uriel> kevlar_work: I see, somehow I assumed it was mostly finished
18:49 < kevlar_work> or, contrariwise, delete it if it doesn't come out
looking as pretty as they want.
18:49 < uriel> kevlar_work: russ said the new regexp package was done, any
idea what is the plan for that?
18:49 < kevlar_work> I assume the same, lol
18:50 < skelterjohn|work> i can't imagine they'll abandon the new template
18:50 < skelterjohn|work> it's a lot slicker
18:50 < kevlar_work> they may be able to do the new regexp changes with
gofix, but I don't think they'll be able to do that with template
18:50 < kevlar_work> from everything I've seen, it looks a lot more
complicated and the templates look kinda ugly
18:50 < skelterjohn|work> for some reason exp/template doesn't have a
MustParse function...  just a MustParseFile
18:50 < kevlar_work> (not that I've ever really liked any template
syntax...)
18:50 < skelterjohn|work> kevlar_work: it's a lot more regular and
consistent
18:51 < kevlar_work> I like that the default delimiters aren't something
that I use constantly, lol
18:51 < skelterjohn|work> that's nice too :)
18:52 < kevlar_work> maybe they're waiting for autoescape?
18:52 * kevlar_work doesn't know.
18:52 < skelterjohn|work> what do you mean?
18:52 < kevlar_work> context-sensitive autoescaping for HTML, javascript,
and CSS
18:52 < nicka1> Is there an eta for the new regexp package?
18:52 < skelterjohn|work> i see
18:52 < kevlar_work> nicka1, there's never an ETA for anything in Go :)
18:53 < skelterjohn|work> nicka1: it's in exp/regexp right now
18:53 < skelterjohn|work> so you can use it
18:53 < nicka1> I should have examined the package listing a little closer
before starting with the current regexp package :P
18:54 < skelterjohn|work> it's only in the weekly, atm
18:54 < skelterjohn|work> not release
18:55 < uriel> I hope exp/template doesn't get autoescape by default
18:55 < nicka1> yeah I use the weeklies.  I just didn't look very closely
18:55 -!- miker2 [~miker2@64.55.31.190] has quit [Ping timeout: 240 seconds]
18:57 < skelterjohn|work> uriel: I don't imagine it will - i remember
someone saying something about how that'd be possible, but it would likely be
something that wrapped the package
18:58 < mukyuu> in the go language runtime, running on linux x86-64, I'm not
seeing any of the runtime debugger messages being printed to stderr, is there
something I'm overlooking?
19:02 < skelterjohn|work> mukyuu: runtime debugger messages?  you mean stuff
like fmt.Fprintf(os.Stderr, msg)?
19:04 < mukyuu> no, stuff like runtime·printf
19:05 < skelterjohn|work> are you calling it in your go code?  cgo C code?
expecting something else to call it?
19:05 < skelterjohn|work> i've never heard of this function (but there is a
lot i've never heard of, so don't let that stop you)
19:05 < mukyuu> no, I'm hacking around within the language runtime itself,
familiarizing myself with the task scheduler used for scheduling goroutines
19:06 < skelterjohn|work> i see.  out of my area of expertise, unfortunately
19:07 < skelterjohn|work> if you're mucking around in the runtime, you are
writing C code, right?  you can't use fprintf(stderr, ...)?
19:07 < mukyuu> I've added some proof of concept code to detect the logical
number of processor cores, that way you don't need to futz around with the
GOMAXPROCS environment variable
19:07 < mukyuu> but I can't see my debug messages, let alone any debug
messages, heh
19:08 < skelterjohn|work> mukyuu: i like the easy way to limit the number of
processes go will use :) but i suppose there are other more standard ways to do
that kind of thing
19:09 < mukyuu> skelterjohn|work, yeah, I'm not making changes to gccgo, not
sure what the differences are with that, but with the core go implementation, it
has zero dependencies, it has it's own subset of libc taken from the Plan9 sources
I think
19:09 < mukyuu> so glibc and much of the posix interfaces aren't available
19:09 < mukyuu> including fprintf
19:09 < skelterjohn|work> i see, very interesting
19:11 < mukyuu> skelterjohn|work, yeah, I'm not removing GOMAXPROCS, and I'm
still using that if it is defined, but if it's not defined, it will auto-detect
19:11 -!- tvw [~tv@212.79.9.150] has quit [Read error: Connection reset by peer]
19:11 -!- zcram [~zcram@8.177.190.90.sta.estpak.ee] has joined #go-nuts
19:11 < mukyuu> the proper way to do it would be to let the
user/administrator specify a processor and/or processor group affinity masks
19:12 < mukyuu> so they can choose precisely what processors to let a go
process use
19:12 -!- erus` [~chatzilla@cpc2-gill2-0-0-cust701.basl.cable.virginmedia.com] has
joined #go-nuts
19:12 < skelterjohn|work> which sounds like an OS-level thing rather than a
program-level thing
19:12 < mukyuu> because as it stands now, the threads jump around on all of
the CPU cores, even if you only say set GOMAXPROCS to 6 when you have a total of 8
cores
19:12 < mukyuu> yeah
19:13 < skelterjohn|work> generally that's a good thing, w/r/t CPU
temperature, etc
19:14 < mukyuu> it can, but it's a bad thing for performance (and also CPU
power utilization), causes a lot of cache thrashing
19:14 < skelterjohn|work> interesting
19:14 < skelterjohn|work> this is not stuff i usually thing about :)
19:15 < mukyuu> heh
19:15 < skelterjohn|work> what were you thinking of doing to the goroutine
scheduler?
19:16 < mukyuu> improve scalability and performance, but right now I'm just
kind of treading the waters, getting a feeling for the code base, maybe fix a few
smaller problems first
19:17 -!- saschpe [~quassel@opensuse/member/saschpe] has quit [Remote host closed
the connection]
19:17 < mukyuu> from what I can tell, the current scheduler just has a
single global queue for all goroutines, and when a worker thread needs a new
goroutine to run, it locks the global queue
19:17 < mukyuu> which is generally bad when it comes to scalability and
schedulers
19:18 < skelterjohn|work> i can imagine something that groups goroutines
together based on which bits of memory they tend to access could give some nice
improvements
19:19 < skelterjohn|work> and only lock when a goroutine wants to jump from
one group to another
19:19 < mukyuu> it's better if each worker thread has it's own queue,
implemented with lock-free/wait-free algorithms, and worker threads can steal jobs
from other works when they become starved, thus you get automatic load-balancing
19:19 < skelterjohn|work> (a group would correspond to a processor)
19:19 < skelterjohn|work> yep, that's what i'm talking about
19:20 -!- noam [~noam@87.69.42.61.cable.012.net.il] has quit [Ping timeout: 246
seconds]
19:21 < mukyuu> yeah
19:21 -!- huin [~huin@91.84.179.118] has joined #go-nuts
19:22 < skelterjohn|work> well, sounds fun
19:22 < mukyuu> Linux, Windows, and I believe the BSDs (not sure about OS X
though) provide APIs for determining NUMA nodes and clusters, so you can build
your worker groups around that stuff
19:23 < skelterjohn|work> os x is a BSD
19:23 < skelterjohn|work> but really, how often do you get a many-core mac
19:23 < aiju> very often?
19:23 < skelterjohn|work> people don't run web servers on os x
19:23 < skelterjohn|work> or do they?
19:23 < aiju> yes they do
19:23 < aiju> it's like saying people don't run rails
19:24 < skelterjohn|work> in that it's "not true", i suppose that's a good
analogy =p
19:24 < mukyuu> anyway, need to figure out this dastardly runtime·printf
stuff
19:25 < erus`> 10 mins to download a linux distro :) i love my new internet
19:25 < mukyuu> aren't there mbps and macs with core i7s now?  (8 logical
cores if you count hyperthreading)
19:26 < erus`> didnt apple stop making servers?
19:26 < aiju> since when do people care about hyperthreading
19:26 < aiju> jesus christ
19:26 < skelterjohn|work> why wouldn't people care about hyperthreading?
19:26 < mukyuu> well, regular people don't
19:26 < aiju> it's a ridiculous thing
19:26 < mukyuu> people who write task schedulers do
19:26 < skelterjohn|work> what, having two process contexts for each
processor?
19:26 < aiju> yeah
19:27 < aiju> just complicates the scheduler
19:27 < skelterjohn|work> i always figured hyperthreading is to multiple
processors as goroutines are to processes
19:27 < skelterjohn|work> since you don't have to do an expensive context
switch to swap the two processes
19:28 < nicka1> So is the exp/regexp package just what's in
exp/regexp/syntax?
19:28 < nicka1> Or am I looking in the wrong place entirely
19:29 < mukyuu> well, it's a bit more than that, when one hardware thread is
blocked waiting on a cache page fetch due to a load/store instruction, the other
hardware thread can still make use of the instruction pipeline
19:29 < mukyuu> it takes advantage of instruction parallelism
19:29 < skelterjohn|work> oh - nicka1 maybe i was wrong about it being
available.  that doesn't look terribly useful.
19:29 < skelterjohn|work> mukyuu: that's why i made the goroutine analogy
19:30 < skelterjohn|work> you can alternate between the two processes
without loading anything into the contexts
19:32 < mukyuu> yeah
19:34 < ArgonneIntern> i think hyperthreading is a good idea
19:34 < ArgonneIntern> although as processors get more and more cores it
becomes less necessary
19:34 -!- dahankzter [~henrik@92-244-3-192.customers.ownit.se] has quit [Quit:
Leaving.]
19:34 < skelterjohn|work> of course
19:35 < skelterjohn|work> though if two processes share a lot of memory, it
can still have advantages
19:35 < erus`> i have 4
19:35 < aiju> i don't mind hyperthreading as long as i can turn it off
19:35 < ArgonneIntern> i remember in single core p4's hyperthreading was
pretty good.
19:35 < ArgonneIntern> although p4's themselves kinda suckedlol
19:36 < aiju> that's quite an understatement
19:36 < mukyuu> lol
19:36 < ArgonneIntern> just think, now we have, duh duh duuuuuun, turbo
boost!
19:36 -!- noam [~noam@87.69.42.61.cable.012.net.il] has joined #go-nuts
19:36 < ArgonneIntern> it's the lastest and greatest
19:36 < nicka1> the p4s were on fire man
19:36 < nicka1> I don't know waht you're talking about
19:36 < skelterjohn|work> i've never heard of turbo boost
19:37 < ArgonneIntern> really
19:37 < ArgonneIntern> i7's come with it
19:37 < skelterjohn|work> i only follow the latest processor news when i'm
making a new computer
19:37 < skelterjohn|work> and i don't have a lot of disposable income right
now
19:37 < ArgonneIntern> turboboost came on the first i7's
19:37 < ArgonneIntern> I think it's still there
19:38 < skelterjohn|work> the last time i put together a machine was in 2007
19:38 < ArgonneIntern> http://www.intel.com/technology/turboboost/index.htm
19:38 < ArgonneIntern> it's basically a dynamic overclocking system
19:38 < skelterjohn|work> i see
19:38 < aiju> aka cores are always underclocked
19:38 < aiju> and they clock them higher if necessary?
19:39 < skelterjohn|work> the machine i made had a 12% overclock.  was great
for a long time - but my friend's new laptop is faster now :\
19:39 < ArgonneIntern> well some older programs only use one core, but
relied on higher clock cycles, so they tune other cores down and overclock the
single cores
19:39 < ArgonneIntern> sometimes 1 or 2 or whatever, and it monitors power
draw and temp to constatly change the overclocking
19:40 < skelterjohn|work> sounds pretty reasonable
19:40 < ArgonneIntern> off the top of my head, it's useful for everquest 2
19:40 < skelterjohn|work> ok?
19:40 < ArgonneIntern> just trying to give an example
19:41 < skelterjohn|work> hehe
19:41 -!- meling [~meling@cse-dhcp-10-91.ucsd.edu] has joined #go-nuts
19:44 -!- chadkouse [~Adium@rrcs-76-79-233-18.west.biz.rr.com] has quit [Quit:
Leaving.]
19:49 -!- jmil [~jmil@2001:468:1802:e148:223:32ff:feb1:9dfc] has joined #go-nuts
19:51 -!- sacho [~sacho@95-42-118-162.btc-net.bg] has quit [Ping timeout: 260
seconds]
19:56 -!- alehorst [~alehorst@201.47.30.108.dynamic.adsl.gvt.net.br] has quit
[Quit: Leaving.]
19:57 -!- moraes [~moraes@189.103.188.201] has quit [Quit: Leaving]
20:00 -!- tvw [~tv@e176000246.adsl.alicedsl.de] has joined #go-nuts
20:02 -!- alehorst [~alehorst@201.47.30.108.dynamic.adsl.gvt.net.br] has joined
#go-nuts
20:12 -!- virtualsue [~chatzilla@nat/cisco/x-lyerygmclkxxycjw] has quit [Quit:
ChatZilla 0.9.87 [Firefox 5.0.1/20110707182747]]
20:19 -!- yogib [~yogib@dslb-178-001-023-136.pools.arcor-ip.net] has quit [Quit:
yogib]
20:27 -!- alexandere [~alexander@eijg.xs4all.nl] has joined #go-nuts
20:31 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has left
#go-nuts []
20:31 -!- alehorst [~alehorst@201.47.30.108.dynamic.adsl.gvt.net.br] has quit
[Remote host closed the connection]
20:37 -!- franciscosouza [~francisco@201.19.170.190] has quit [Quit:
franciscosouza]
20:37 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Remote host closed
the connection]
20:38 -!- franciscosouza [~francisco@201.19.170.190] has joined #go-nuts
20:39 < uriel> iant: i know I repeat myself, but you guys *really* should do
something about the spam in the Go lists
20:45 -!- franciscosouza [~francisco@201.19.170.190] has quit [Quit:
franciscosouza]
20:46 -!- tncardoso [~thiago@189.115.128.253] has quit [Read error: Connection
reset by peer]
20:47 -!- Fish- [~Fish@9fans.fr] has quit [Quit: WeeChat 0.3.5]
20:49 -!- jbooth1 [~jay@209.249.216.2] has quit [Ping timeout: 250 seconds]
20:50 -!- pjacobs [~pjacobs@66.54.185.130] has quit [Quit: Leaving]
20:50 -!- pharris [~Adium@rhgw.opentext.com] has quit [Quit: Leaving.]
20:51 -!- franciscosouza [~francisco@201.7.186.67] has joined #go-nuts
20:54 -!- sacho [~sacho@87.246.4.214] has joined #go-nuts
21:01 < erus`> replace the mailing lists with forums :)
21:02 < mukyuu> well, solved my problems, got cpu core count auto-detection
working on linux x86/x86-64, what a pain
21:03 -!- dlowe [~dlowe@ita4fw1.itasoftware.com] has quit [Quit: Leaving.]
21:05 < erus`> i thought go told you?
21:08 -!- r_linux [~r_linux@static.200.198.180.250.datacenter1.com.br] has quit
[Quit: Lost terminal]
21:09 -!- huin [~huin@91.84.179.118] has quit [Quit: leaving]
21:09 -!- jdahm [~jdahm@kappa.citi.umich.edu] has left #go-nuts ["WeeChat 0.3.5"]
21:09 < schmichael> if it doesn't python seems to have a decent
crossplatform way:
http://hg.python.org/cpython/file/44a02d6b74e4/Lib/multiprocessing/__init__.py#l108
21:10 < fluffle> ohai.  how can I check whether a channel I want to send on
is closed or not?  the only way I found in the spec was to use the two-arg form of
the receive op, but this blocks on the receive
21:13 < fluffle> should I just try to send and trap the panic?  this seems
wrong :/
21:16 < uriel> fluffle: the sender should close
21:17 < uriel> not the receiver(s)
21:17 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 258 seconds]
21:17 < uriel> (this really deserves an entry in the wiki, if it doesn't
have one already)
21:18 < fluffle> uriel: the close is actually happening in a shutdown()
routine, unfortunately there appears to be a race condition where a different
goroutine triggers something to send based on data recieved before shutdown() is
called that gets executed afterwards
21:18 < fluffle> the alternative is to set a flag, i guess i'll go that way
21:19 -!- keithcascio [~keithcasc@nat/google/x-tbkbifzsrsnmorcy] has joined
#go-nuts
21:19 < uriel> fluffle: again, *only the sender should ever close a channel*
21:19 < uriel> and even then, it rarely so
21:20 < uriel> as others have said, close() should have been called
endrange() or some such
21:20 < fluffle> so should I just not close the channels in this instance?
21:20 < uriel> (changing the name of close() is probably a good idea, just
as deleting container/vector, it seems to confuse people all the time)
21:21 < mukyuu> erus, it does?
21:21 < rm445> uriel: 'the wiki' - is there a go wiki?
21:21 < aiju> rägnarok(ch)
21:21 < uriel> fluffle: there is no need to close a channel unless the
reader is ranging over it
21:21 < fluffle> ref: https://github.com/fluffle/goirc/issues/6 and line
266+ of https://github.com/fluffle/goirc/blob/master/client/commands.go
21:21 < fluffle> uriel: okay, i clearly need to do some more reading, then
:)
21:21 -!- sniper506th [~sniper506@rrcs-70-61-192-18.midsouth.biz.rr.com] has quit
[Quit: Leaving...]
21:21 < fluffle> i'll stop calling close instead
21:22 -!- Natch| [~natch@178.73.217.65] has quit [Remote host closed the
connection]
21:22 < fluffle> can i still safely make() new channels over the top of the
old ones without causing leaks, or should I ensure that's only done at the object
creation time to avoid problems?
21:23 < Namegduf> Yes, you can.
21:23 < fluffle> awesome, thanks :)
21:23 < Namegduf> You don't need to close channels to clean them up.
21:23 < Namegduf> Only close them as a writer, to signal readers that you're
done.
21:23 -!- Locke23rus [~locke23ru@2.93.195.198] has quit [Remote host closed the
connection]
21:24 < fluffle> thanks for explaining this
21:24 < fluffle> i've not had enough time to keep up with Go dev, or learn
the semantics properly :/.
21:24 < Namegduf> That's fine.
21:29 < fluffle> aha, I do still need to close the Err channel, but that
should be fine as i'm sending on it and using the closedness of it to signal a
disconnect to a waiting listener
21:29 < fluffle> aiui that's what you're saying is a "correct" use of close,
yes?
21:29 < Namegduf> Yep.
21:30 < kevlar_work> they specifically changed the semantics of
closedness-checking to make it more difficult for a reader to close the channel or
a writer to check if it's closed; this was a major source of errors originally
21:31 < KirkMcDonald> An easy way to make a race condition.
21:31 < kevlar_work> (people would have the reader close the channel to
signal the writer to stop writing)
21:32 < Namegduf> The old version was also unreliable with multiple readers,
as you could read a legitimate zero, check for closed, and think it was a close,
while another reader read the final closing zero.
21:32 < Namegduf> New semantics are good.
21:32 < fluffle> hmm, the sendss to this channel are still potentially
happening in other goroutines than the close()
21:32 < Namegduf> In that case, you can't use close()
21:32 < fluffle> maybe I should use a different method to communicate to
listeners about the state change
21:33 < kevlar_work> fluffle, or you tell the writer that it's time to close
the channel
21:33 < uriel> close() confuses most newbies, it really should be renamed
(thankfully this days it is harder to mis-use)
21:33 < Namegduf> Yeah.
21:33 < Namegduf> close() says "no more to read", which means "no more is
being written"
21:33 < Namegduf> You need to coordinate things such that nothing more will
be written if you are to use close().
21:34 < kevlar_work> I've idly mused about calling it eof() but that
duplicates an existing concept.
21:34 < fluffle> kevlar_work: the channel is used at various points to dump
error messages out to the code using the library.  Chances are this is a bad
architecture design choice and i shouldn't use it :-)
21:34 < kevlar_work> fluffle, if it's a logging channel, why do you need to
close it?
21:34 < Namegduf> The normal idiom is ", ok" on function calls.
21:35 < Namegduf> (Possibly using panics to skip up the stack internally,
but only internally)
21:35 < fluffle> kevlar_work: because i was using the range idiom to read
the logging info and trigger things on the close
21:35 < kevlar_work> also, for such things, often I use the channel
internally and the callers don't know about it (e.g.  blah.NewLogger() makes and
stores a channel and starts a routine reading from it and writing to file, then
all method calls on the logger send a message on the channel
21:35 < fluffle> again, I'm probably making bad design choices here
21:35 < Namegduf> A logging info channel seems sensible, though
21:35 < kevlar_work> fluffle, what are you triggering off the close?
21:36 < fluffle> https://github.com/fluffle/goirc/blob/master/client.go #
line 79
21:36 < kevlar_work> oh, irc, lol
21:36 * kevlar_work has now accumulated two IRC daemons written in Go.
21:36 < fluffle> it's my standard "learn a new language" exercise
21:36 < kevlar_work> me too!  except with a bot
21:37 < kevlar_work> not a client.
21:37 < fluffle> meh this isn't a full client
21:37 < kevlar_work> !goego channels
21:37 < GoBIR> kevlar_work: Effective Go channels -
http://golang.org/doc/effective_go.html#channels
21:37 < kevlar_work> ^ my bot :)
21:37 < fluffle> it's a library that does IRC so you can write bots with a
nice event framework
21:37 < fluffle> unfortunately people started using the library, so I have
to fix bugs in it :)
21:37 < kevlar_work> lol
21:37 < nicka1> haha
21:37 < kevlar_work> one of the pitfalls of godashboard
21:38 < kevlar_work> though someone who found my go-gypsy project has been
so helpful that I made him a committer, lol
21:38 < fluffle> nice :D
21:38 -!- sacho [~sacho@87.246.4.214] has quit [Ping timeout: 250 seconds]
21:39 < fluffle> so, if i don't close the Err channel, range will sit
infinitely reading
21:39 -!- segv [~segv@sig.segv.net] has joined #go-nuts
21:39 < kevlar_work> correct
21:39 < segv> So, quick question, I'm using "id" and exec.Command to return
the value of id -u username, i keep getting a []uint8
21:39 < kevlar_work> which should be fine if it's just logging information;
devise a way to trigger the events you used to trigger on close that is
independent
21:40 < fluffle> would it be best to make a completely separate 'Quit'
channel that I only strobe once on disconnect, then users can select between them?
21:40 -!- ArgonneIntern [~gauge@mcswl185.mcs.anl.gov] has quit [Ping timeout: 240
seconds]
21:40 < kevlar_work> fluffle, that would be relatively idiomatic, yes
21:40 < fluffle> ok, great
21:40 < fluffle> thanks :)
21:40 < kevlar_work> though usually event-driven stuff involves registering
callbacks with closures :)
21:40 < kevlar_work> irc.OnQuit( func() { /* blah */ } )
21:41 < fluffle> that's a good point
21:41 < fluffle> I guess I can fire a synthetic event for the disconnect
21:41 < kevlar_work> channels are lovely, but I find that they rarely work
nicely as an externally visible interface
21:41 < kevlar_work> they're great for connecting up internals though.
21:41 < fluffle> yes :)
21:42 < fluffle> ok, i'll go think about this a bit more
21:42 < fluffle> thanks for the help and advice!  :)
21:42 < kevlar_work> segv, do you want to get a string or what?
21:42 < segv> kevlar_work: yes, expecting a string.
21:42 < kevlar_work> []byte is used throughout the standard library for
character data reading adn writing
21:42 < kevlar_work> *and
21:43 < kevlar_work> it is freely convertable to a string
21:43 < kevlar_work> !golang conversions
21:43 < GoBIR> kevlar_work: Spec Section Conversions -
http://golang.org/doc/go_spec.html#Conversions
21:43 < segv> I am stumped as to how to, heh.  []uint8 to string isn't a
good google search term i'm guessing haha
21:44 < kevlar_work> var data []byte; ...; s := string(data)
21:44 < segv> ah
21:44 < kevlar_work> see the link my illustrious companion posted.
21:44 < segv> Got it
21:45 < kevlar_work> I'm not sure it mentions it, but keep in mind that
doing string(data) will always cause an allocation
21:45 < kevlar_work> same with []byte(s)
21:46 < kevlar_work> so try to avoid doing it in a loop, and always remember
that pretty much everything in package "strings" is also in package "bytes" and
vice versa
21:46 < segv> id, err := exec.Command("/usr/bin/id", "-u", *user).Output()
so that returning []uint8, would be var data []id; ..  s: = string(data)
21:46 < segv> ah
21:46 < segv> that's good to know
21:46 < segv> thanks for that info, wouldn't have realized that otherwise
21:46 < kevlar_work> output, err := exec.Command(...); id := string(output)
21:46 < segv> ah
21:48 < segv> see, i was overthinking it.
21:49 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
21:51 -!- sacho [~sacho@87.246.4.214] has joined #go-nuts
21:53 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit:
Verlassend]
21:56 -!- niemeyer [~niemeyer@189.2.6.181] has quit [Ping timeout: 240 seconds]
22:01 -!- nicka [~nicka@unaffiliated/nicka] has quit [Ping timeout: 264 seconds]
22:02 -!- Peet__1 [~Peet__@blk-222-42-163.eastlink.ca] has quit [Ping timeout: 240
seconds]
22:03 < jlaffaye> can I compare letters with < or > like I would do in
C?
22:03 -!- miker2 [~miker2@pool-96-245-224-59.phlapa.fios.verizon.net] has joined
#go-nuts
22:03 < exch> 'a' < 'b'
22:03 -!- zmoazeni [~zmoazeni@50-57-89-129.static.cloud-ips.com] has quit [Quit:
Quitting]
22:03 < jlaffaye> (I want to know if the letter is in lower case)
22:04 -!- zmoazeni [~zmoazeni@50-57-89-129.static.cloud-ips.com] has joined
#go-nuts
22:05 -!- Peet__ [~Peet__@unaffiliated/peet--/x-2416233] has joined #go-nuts
22:05 < qeed> unicode.IsUpper
22:05 < qeed> or IsLower
22:05 < jlaffaye> d.Name[0] >= 'a' seems to work :)
22:05 < qeed> need an end range for that
22:07 -!- robteix [~robteix@host27.190-30-213.telecom.net.ar] has joined #go-nuts
22:07 -!- berma [~duraffour@ks355364.kimsufi.com] has quit [Ping timeout: 250
seconds]
22:07 -!- nicka [~nicka@unaffiliated/nicka] has joined #go-nuts
22:09 -!- Natch| [~natch@178.73.218.121] has joined #go-nuts
22:12 -!- CatFish [~CatFish@2001:5c0:1400:a::4cf] has quit [Read error: Connection
reset by peer]
22:13 < kevlar_work> qeed, not really
22:14 < segv> yay fixed all my code, works again, thanks kevlar_work
22:15 < kevlar_work> np
22:15 < qeed> i guess it cant go pass z then?
22:15 -!- wrtp [~rog@host-92-30-166-101.as13285.net] has joined #go-nuts
22:18 -!- wrtp [~rog@host-92-30-166-101.as13285.net] has quit [Client Quit]
22:18 -!- franksalim [~frank@64-71-23-250.static.wiline.com] has joined #go-nuts
22:18 < kevlar_work> qeed, if you only care about ascii letters, >'Z' is
a fine way to check for lowercase and < 'a' is a fine way to check for
uppercase
22:19 < kevlar_work> especially if the check is only used to do case
folding, after which you can do a normal ch-'a' check against 0 and 26.
22:21 -!- miker2 [~miker2@pool-96-245-224-59.phlapa.fios.verizon.net] has quit
[Quit: Computer has gone to sleep.]
22:25 -!- tvw [~tv@e176000246.adsl.alicedsl.de] has quit [Remote host closed the
connection]
22:27 -!- photron [~photron@port-92-201-42-78.dynamic.qsc.de] has quit [Ping
timeout: 252 seconds]
22:30 -!- moraes [~moraes@189.103.188.201] has joined #go-nuts
22:35 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts
22:41 -!- robteix [~robteix@host27.190-30-213.telecom.net.ar] has quit [Quit:
Leaving...]
22:43 -!- franciscosouza [~francisco@201.7.186.67] has quit [Quit: franciscosouza]
22:43 -!- rlab [~Miranda@91.200.158.34] has quit [Read error: Connection reset by
peer]
22:45 -!- NiteRain [~kvirc@c-98-254-236-21.hsd1.fl.comcast.net] has joined
#go-nuts
22:52 -!- robteix [~robteix@host27.190-30-213.telecom.net.ar] has joined #go-nuts
22:54 -!- miker2 [~miker2@pool-96-245-224-59.phlapa.fios.verizon.net] has joined
#go-nuts
22:54 -!- ronnyy [~quassel@p4FF1C427.dip0.t-ipconnect.de] has joined #go-nuts
22:55 -!- dfr|mac [~dfr|work@nat/google/x-swdccqfjqiryntsn] has quit [Ping
timeout: 258 seconds]
22:56 -!- Bigbear1 [~Cody@d75-158-129-33.abhsia.telus.net] has joined #go-nuts
23:00 -!- miker2 [~miker2@pool-96-245-224-59.phlapa.fios.verizon.net] has quit
[Quit: Computer has gone to sleep.]
23:01 -!- alexandere [~alexander@eijg.xs4all.nl] has quit [Quit: alexandere]
23:14 -!- tavis_rain [~tavisb@24-104-129.146.hfc.mediarain.com] has quit [Read
error: Connection reset by peer]
23:16 -!- franciscosouza [~francisco@187.105.25.184] has joined #go-nuts
23:17 -!- Adys [~Adys@unaffiliated/adys] has quit [Ping timeout: 255 seconds]
23:19 -!- Vejeta [~user@unaffiliated/vejeta] has joined #go-nuts
23:19 -!- ronnyy [~quassel@p4FF1C427.dip0.t-ipconnect.de] has quit [Remote host
closed the connection]
23:25 -!- robteix [~robteix@host27.190-30-213.telecom.net.ar] has quit [Ping
timeout: 258 seconds]
23:28 -!- erus` [~chatzilla@cpc2-gill2-0-0-cust701.basl.cable.virginmedia.com] has
quit [Quit: ChatZilla 0.9.87 [Firefox 5.0/20110615151330]]
23:39 -!- sacho [~sacho@87.246.4.214] has quit [Ping timeout: 250 seconds]
23:44 -!- sacho [~sacho@87.246.4.214] has joined #go-nuts
23:50 -!- garym [~garym@203-219-89-242.static.tpgi.com.au] has quit [Quit:
Leaving]
23:50 -!- sacho [~sacho@87.246.4.214] has quit [Ping timeout: 240 seconds]
--- Log closed Fri Jul 22 00:00:01 2011