--- Log opened Sat May 21 00:00:50 2011
00:01 -!- tobier [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
quit [Read error: Operation timed out]
00:01 -!- tobier_ [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
quit [Read error: Operation timed out]
00:02 -!- shvntr [~shvntr@113.84.148.11] has quit [Quit: leaving]
00:03 -!- tobier [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
joined #go-nuts
00:07 -!- jarsen [~jarsen@76.8.206.21] has quit [Remote host closed the
connection]
00:17 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has quit [Remote
host closed the connection]
00:27 -!- jarsen [~jarsen@76.8.206.21] has joined #go-nuts
00:28 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has joined
#go-nuts
00:29 -!- Wiz126 [~Wiz@24.229.245.72.res-cmts.sm.ptd.net] has joined #go-nuts
00:31 -!- eestolano [~Adium@4.78.243.126] has quit [Quit: Leaving.]
00:32 -!- eestolano [~Adium@4.78.243.126] has joined #go-nuts
00:34 -!- jarsen [~jarsen@76.8.206.21] has quit [Remote host closed the
connection]
00:37 -!- eestolano [~Adium@4.78.243.126] has quit [Ping timeout: 240 seconds]
00:43 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has quit [Ping
timeout: 264 seconds]
00:50 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has joined #go-nuts
00:55 < hallas> Definately an interesting talk
00:55 < hallas> http://www.youtube.com/watch?v=wbp-3BJWsU8
00:55 -!- eestolano [~Adium@32.159.46.242] has joined #go-nuts
01:01 -!- tobier [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
quit [Read error: Operation timed out]
01:02 -!- tobier [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
joined #go-nuts
01:03 -!- sunfmin [~sunfmin@115.206.253.191] has joined #go-nuts
01:06 -!- diracdelta [~christoph@c-67-180-243-234.hsd1.ca.comcast.net] has joined
#go-nuts
01:25 -!- ericbb [~user@blk-224-153-99.eastlink.ca] has joined #go-nuts
01:28 -!- l00t [~i-i3id3r_@189.105.5.229] has joined #go-nuts
01:28 -!- eestolano [~Adium@32.159.46.242] has quit [Quit: Leaving.]
01:28 -!- dreadlorde [~dreadlord@c-68-43-250-33.hsd1.mi.comcast.net] has joined
#go-nuts
01:30 -!- Natch| [~natch@c-adcee155.25-4-64736c10.cust.bredbandsbolaget.se] has
quit [Read error: Operation timed out]
01:34 -!- Natch| [~natch@c-adcee155.25-4-64736c10.cust.bredbandsbolaget.se] has
joined #go-nuts
01:36 -!- eestolano [~Adium@64.134.226.246] has joined #go-nuts
01:40 -!- nteon [~nteon@c-98-210-195-105.hsd1.ca.comcast.net] has quit [Quit:
leaving]
01:46 -!- eestolano [~Adium@64.134.226.246] has quit [Quit: Leaving.]
01:49 -!- ExsysTech [~ExsysTech@50-46-213-60.evrt.wa.frontiernet.net] has quit
[Read error: Connection reset by peer]
01:52 -!- pamera1 [~Pam@c-76-102-255-99.hsd1.ca.comcast.net] has joined #go-nuts
01:52 -!- ExsysTech [~ExsysTech@50-46-213-60.evrt.wa.frontiernet.net] has joined
#go-nuts
01:54 -!- pamera [~Pam@c-76-102-255-99.hsd1.ca.comcast.net] has quit [Ping
timeout: 240 seconds]
01:54 -!- tobier_ [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
joined #go-nuts
01:55 -!- tobier [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
quit [Read error: Operation timed out]
01:55 -!- Viriix [~joseph@c-67-169-172-251.hsd1.ca.comcast.net] has joined
#go-nuts
02:01 -!- kr [~Keith@204.14.152.118] has quit [Quit: WeeChat 0.3.4]
02:09 -!- ab3 [~abe@83.101.90.66] has quit [Ping timeout: 244 seconds]
02:09 -!- ab3 [~abe@83.101.90.66] has joined #go-nuts
02:10 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts
02:43 -!- hallas [~hallas@x1-6-30-46-9a-b2-c5-1f.k891.webspeed.dk] has quit [Ping
timeout: 240 seconds]
02:50 -!- ericbb [~user@blk-224-153-99.eastlink.ca] has quit [Remote host closed
the connection]
02:54 -!- ab3 [~abe@83.101.90.66] has quit [Ping timeout: 248 seconds]
03:16 -!- gtaylor [~gtaylor@199.15.144.250] has joined #go-nuts
03:18 -!- jarsen [~jarsen@76.8.206.21] has joined #go-nuts
03:25 -!- jarsen [~jarsen@76.8.206.21] has quit [Remote host closed the
connection]
03:33 -!- danilo04 [~danilo04@rm2348358874.student.rit.edu] has joined #go-nuts
03:33 -!- tobym [~tobym@cpe-72-229-2-6.nyc.res.rr.com] has quit [Ping timeout: 260
seconds]
03:36 -!- COBOL2121 [~Null@usr018.bb160-01.udk.im.wakwak.ne.jp] has joined
#go-nuts
03:44 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
03:52 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has quit [Remote host
closed the connection]
03:57 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has quit [Remote
host closed the connection]
03:58 -!- dreadlorde [~dreadlord@c-68-43-250-33.hsd1.mi.comcast.net] has quit
[Ping timeout: 260 seconds]
03:59 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has joined #go-nuts
04:00 -!- aho [~nya@fuld-590c68b4.pool.mediaWays.net] has quit [Quit:
EXEC_over.METHOD_SUBLIMATION]
04:01 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has joined
#go-nuts
04:01 -!- gtaylor [~gtaylor@199.15.144.250] has quit [Quit: gtaylor]
04:02 -!- niemeyer [~niemeyer@200-102-196-125.pltce701.dsl.brasiltelecom.net.br]
has quit [Ping timeout: 240 seconds]
04:13 -!- rejb [~rejb@unaffiliated/rejb] has quit [Disconnected by services]
04:14 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
04:24 -!- diracdelta [~christoph@c-67-180-243-234.hsd1.ca.comcast.net] has quit
[Quit: diracdelta]
04:27 -!- diracdelta [~christoph@c-67-180-243-234.hsd1.ca.comcast.net] has joined
#go-nuts
04:29 -!- photron [~photron@port-92-201-112-131.dynamic.qsc.de] has joined
#go-nuts
04:35 -!- angasule [~angasule@190.2.33.49] has quit [Ping timeout: 258 seconds]
04:38 -!- dfc [~dfc@124-149-35-69.dyn.iinet.net.au] has quit [Ping timeout: 240
seconds]
04:45 -!- nteon [~nteon@c-98-210-195-105.hsd1.ca.comcast.net] has joined #go-nuts
04:46 -!- diracdelta_ [~christoph@c-67-180-243-234.hsd1.ca.comcast.net] has joined
#go-nuts
04:48 -!- diracdelta [~christoph@c-67-180-243-234.hsd1.ca.comcast.net] has quit
[Ping timeout: 276 seconds]
04:52 -!- gtaylor [~gtaylor@97-95-231-85.dhcp.sffl.va.charter.com] has joined
#go-nuts
04:52 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has joined
#go-nuts
04:57 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has quit [Remote host
closed the connection]
04:57 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has quit [Remote
host closed the connection]
04:59 -!- Bigbear1 [~Cody@d173-181-43-12.abhsia.telus.net] has joined #go-nuts
04:59 -!- Bigbear1 [~Cody@d173-181-43-12.abhsia.telus.net] has left #go-nuts []
05:03 -!- chomp [~chomp@c-67-186-35-69.hsd1.pa.comcast.net] has quit [Quit:
Leaving]
05:22 -!- diracdelta [~christoph@c-67-180-243-234.hsd1.ca.comcast.net] has quit
[Quit: diracdelta]
05:23 -!- jarsen [~jarsen@76.8.206.21] has joined #go-nuts
05:26 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has quit
[Ping timeout: 246 seconds]
05:34 -!- Wiz126 [~Wiz@24.229.245.72.res-cmts.sm.ptd.net] has quit [Ping timeout:
240 seconds]
05:34 -!- Wiz126 [~Wiz@24.229.245.72.res-cmts.sm.ptd.net] has joined #go-nuts
05:38 -!- allengeorge [~allengeor@c-24-7-17-50.hsd1.ca.comcast.net] has joined
#go-nuts
05:43 -!- duryodhan [802099e5@gateway/web/freenode/ip.128.32.153.229] has joined
#go-nuts
05:44 < duryodhan> hello ..  I am unable to check out go and run it inside
in ubuntu 11.04, ./all.bash only creates 8l and no 8g
05:45 < duryodhan> I can't figure out the problem ..  it worked fine on my
desktop, but inside vmware it is not working
05:46 < nteon> duryodhan: I imagine it fails at some point during the build.
can you post the output you get from $ reset && ./all.bash
05:46 < nteon> ?
05:46 < duryodhan> 1 minute
05:47 < duryodhan> heh ...  the reset made me think you were trolling; had
to check man reset
05:48 < nteon> duryodhan: I don't usually troll in _this_ channel :)
05:49 < nteon> reset just clears the output from your terminal.  also
helpful if you've mistakenly cat'ed binary content or something and your term is
in a funky state
05:49 < duryodhan> http://patebin.ca/2066133
05:49 < duryodhan> yeah ..  as I said, I checked the man page :)
05:50 -!- unofficialmvp [~dev@94-62-164-227.b.ipv4ilink.net] has joined #go-nuts
05:51 < duryodhan> err http://pastebin.ca/2066133
05:51 < nteon> duryodhan: is that it?
05:51 < duryodhan> sorry ..  I will paste it all
05:51 < nteon> duryodhan: thanks :)
05:51 -!- unofficialmvp [~dev@94-62-164-227.b.ipv4ilink.net] has left #go-nuts []
05:52 < duryodhan> darn ..  just redirecting the output to stdout showed me
the stderr ..  bison not found ! :(
05:52 < duryodhan> thanks ..  I think I can fix it now
05:53 < duryodhan> err ..  redirecting stdout to a file
05:53 < nteon> duryodhan: glad to help
05:53 < nteon> heh, actually i hit the same thing yesterday on a centos 5
box
05:53 < duryodhan> its kinda annoying that it fails in this way...
06:00 -!- duryodhan [802099e5@gateway/web/freenode/ip.128.32.153.229] has quit []
06:03 -!- jarsen [~jarsen@76.8.206.21] has quit [Remote host closed the
connection]
06:08 -!- jarsen [~jarsen@76.8.206.21] has joined #go-nuts
06:10 < skelterjohn> i feel like the installer should check if bison is
available first, and if not, print a big message
06:11 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-165-23.clienti.tiscali.it] has
joined #go-nuts
06:11 -!- gtaylor [~gtaylor@97-95-231-85.dhcp.sffl.va.charter.com] has quit [Quit:
gtaylor]
06:15 -!- diracdelta [~christoph@c-67-180-243-234.hsd1.ca.comcast.net] has joined
#go-nuts
06:16 -!- Natch| [~natch@c-adcee155.25-4-64736c10.cust.bredbandsbolaget.se] has
quit [Ping timeout: 264 seconds]
06:17 -!- Natch| [~natch@c-adcee155.25-4-64736c10.cust.bredbandsbolaget.se] has
joined #go-nuts
06:18 -!- chomp [~chomp@c-67-186-35-69.hsd1.pa.comcast.net] has joined #go-nuts
06:24 -!- bakkal [~hawk@41.143.57.233] has quit [Read error: Connection reset by
peer]
06:27 -!- boscop_ [~boscop@f055029167.adsl.alicedsl.de] has joined #go-nuts
06:27 -!- piranha [~piranha@5ED43A0B.cm-7-5a.dynamic.ziggo.nl] has joined #go-nuts
06:29 -!- boscop [~boscop@unaffiliated/boscop] has quit [Ping timeout: 246
seconds]
06:29 -!- danilo04 [~danilo04@rm2348358874.student.rit.edu] has quit [Quit:
Saliendo]
06:33 -!- diracdelta [~christoph@c-67-180-243-234.hsd1.ca.comcast.net] has quit
[Quit: diracdelta]
06:41 -!- boscop_ [~boscop@f055029167.adsl.alicedsl.de] has quit [Ping timeout:
246 seconds]
06:42 -!- boscop_ [~boscop@f055029167.adsl.alicedsl.de] has joined #go-nuts
06:44 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Quit: Leaving]
06:45 < jarsen> skelterjohn: I agree, I was helping my roommate install go
the other night and we spent like half an hour until we figured this out.
06:45 -!- genbattle [~nick@203-173-207-1.dialup.ihug.co.nz] has joined #go-nuts
06:46 -!- Netsplit *.net <-> *.split quits: rejb
06:49 -!- boscop_ [~boscop@f055029167.adsl.alicedsl.de] has quit [Ping timeout:
250 seconds]
06:49 -!- boscop_ [~boscop@f055029167.adsl.alicedsl.de] has joined #go-nuts
06:54 -!- boscop_ [~boscop@f055029167.adsl.alicedsl.de] has quit [Read error:
Connection reset by peer]
06:55 -!- boscop_ [~boscop@f055029167.adsl.alicedsl.de] has joined #go-nuts
06:58 -!- boscop__ [~boscop@f055029167.adsl.alicedsl.de] has joined #go-nuts
07:01 -!- boscop_ [~boscop@f055029167.adsl.alicedsl.de] has quit [Ping timeout:
246 seconds]
07:04 -!- Bigbear1 [~Cody@d173-181-43-12.abhsia.telus.net] has joined #go-nuts
07:10 -!- Netsplit over, joins: rejb
07:11 -!- huin [~huin@91.85.171.238] has joined #go-nuts
07:12 -!- genbattle [~nick@203-173-207-1.dialup.ihug.co.nz] has quit [Quit:
Leaving]
07:14 -!- ShadowIce
[~pyoro@HSI-KBW-109-193-120-162.hsi7.kabel-badenwuerttemberg.de] has joined
#go-nuts
07:14 -!- ShadowIce
[~pyoro@HSI-KBW-109-193-120-162.hsi7.kabel-badenwuerttemberg.de] has quit
[Changing host]
07:14 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
07:15 < chomp> http://oz.gs/httpsh.png
07:15 < chomp> it works!  :D
07:15 -!- wallerdev [~wallerdev@72.44.102.30] has quit [Quit: wallerdev]
07:22 -!- ExsysTech [~ExsysTech@50-46-213-60.evrt.wa.frontiernet.net] has quit
[Read error: Connection reset by peer]
07:22 -!- Bigbear11 [~Cody@d173-181-43-12.abhsia.telus.net] has joined #go-nuts
07:23 -!- Bigbear1 [~Cody@d173-181-43-12.abhsia.telus.net] has quit [Read error:
Connection reset by peer]
07:23 -!- ExsysTech [~ExsysTech@50-46-213-60.evrt.wa.frontiernet.net] has joined
#go-nuts
07:24 < chomp> you can log in with httpsh / demo if you want to play with it
07:24 < chomp> btw
07:24 -!- NiteRain [~kvirc@c-98-254-236-21.hsd1.fl.comcast.net] has joined
#go-nuts
07:26 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has quit [Ping
timeout: 248 seconds]
07:27 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
07:31 -!- boscop__ [~boscop@f055029167.adsl.alicedsl.de] has quit [Read error:
Connection reset by peer]
07:34 -!- boscop__ [~boscop@f055029167.adsl.alicedsl.de] has joined #go-nuts
07:43 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has joined #go-nuts
07:46 -!- boscop__ [~boscop@f055029167.adsl.alicedsl.de] has quit [Ping timeout:
246 seconds]
07:51 -!- Fish- [~Fish@9fans.fr] has joined #go-nuts
07:59 -!- Bigbear11 [~Cody@d173-181-43-12.abhsia.telus.net] has quit [Read error:
Connection reset by peer]
08:11 -!- jarsen [~jarsen@76.8.206.21] has quit [Remote host closed the
connection]
08:11 -!- GeertJohan [~geertjoha@s51478c91.adsl.wanadoo.nl] has joined #go-nuts
08:21 -!- jarsen [~jarsen@76.8.206.21] has joined #go-nuts
08:40 -!- temoto [~temoto@95-24-28-242.broadband.corbina.ru] has joined #go-nuts
08:41 < temoto> Hello.  I'm looking at gorun source here
http://bazaar.launchpad.net/~niemeyer/gorun/trunk/view/head:/gorun.go and wonder
since when is it possible to use a, err := fun(); b, err := fun2() note err is
declared twice.
08:44 < huin> temoto: not necessarily
08:44 < huin> temoto: depends if b exists
08:44 < huin> as long as at least one of b, err hasn't been declared at the
time of b, err := <expr> - that's allowed, and it declares the undeclared
08:45 < huin> although note that it can cause accidental hiding of variables
due to block scoping
08:49 -!- jarsen [~jarsen@76.8.206.21] has quit [Remote host closed the
connection]
09:01 -!- Varriount [~Varriount@public-craft.com] has quit [Quit: Meep]
09:02 -!- Fish- [~Fish@9fans.fr] has quit [Quit: So Long, and Thanks for All the
Fish]
09:02 -!- partel [~bob@prag322.server4you.de] has quit [Quit: @[]
09:02 -!- partel [~bob@prag322.server4you.de] has joined #go-nuts
09:04 -!- B33p [~mgray@li226-224.members.linode.com] has quit [Remote host closed
the connection]
09:05 -!- jcortez [~chatzilla@host98-55-98-165.movistar.com.ni] has joined
#go-nuts
09:05 < jcortez> hi guys, we need people to play with the software at
www.partidaajedrez.info (in spanish).  Please try it.  thanks
09:06 -!- Fish- [~Fish@9fans.fr] has joined #go-nuts
09:11 < temoto> huin, last time i used go it was an error because at least
of err *has* been declared.
09:11 < temoto> at least err*
09:11 -!- jcortez [~chatzilla@host98-55-98-165.movistar.com.ni] has left #go-nuts
[]
09:12 < huin> temoto: i believe it works these days
09:12 < huin> := only requires that at least one of the lhs names is
undeclared
09:14 < temoto> huin, do you happen to know when it changed?
09:16 < huin> i don't, sorry
09:17 -!- Varriount [~Varriount@99.198.122.47] has joined #go-nuts
09:20 < temoto> uh..  and what do we use instead of closed(chan) now?
09:21 < kevlar> temoto: whenever you receive from the channel, you can get
an optional second value indicating if the value was actually sent over the
channel
09:21 < kevlar> the second value will be false once the channel has been
closed and all values received.
09:22 < temoto> So closed := func(ch) { x, closed :=<-ch ; ch <- x;
return closed } ?
09:23 < huin> yes, but it's prone to race conditions
09:23 < kevlar> that's a really, really bad idea
09:23 < temoto> How?
09:23 < kevlar> just don't do it.
09:23 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
09:23 < kevlar> They made this change so that only readers could check if
the channel was closed
09:23 < huin> what if something else closes the channel between you checking
if it's closed and acting upon that information?
09:23 < huin> hence: race condition
09:25 < temoto> _ := ch <- x ?
09:25 < temoto> will it save from already closed error?
09:26 < huin> i don't think that's valid syntax
09:26 < temoto> yeah, _ = ch <- x
09:26 < kevlar> temoto: ch,open <- x
09:26 < huin> ditto
09:27 < kevlar> er
09:27 < kevlar> x,open <- ch // lol
09:27 < temoto> Huh, what's "ditto"?
09:27 < huin> ditto = "same again"
09:27 < temoto> i remember there was some non-blocking channel send
09:28 < temoto> ah forget it anyways
09:28 < kevlar> temoto: that's: success := ch <- val
09:28 < huin> temoto: i think you use select {} with a default: for that
09:28 < temoto> huin, i believe that's exactly what i wrote
09:28 < huin> ahh
09:28 < kevlar> oh, duh, sorry, they changed that too
09:28 < kevlar> (it was a recent change)
09:29 < temoto> What?  No select with default anymore?
09:29 < huin> mind you, my knowledge of the syntax on this is limited.
haven't used it much
09:29 < kevlar> no no, they removed the nonblocking send oneliner
09:29 < kevlar> which requires that you use the select w/ default to
accomplish it.
09:29 < ww> jcortez: son los datos disponibles?  puede que sea buen de
registrarlos en ckan.net
09:29 < kevlar> I think they removed the nonblocking receive too.
09:30 < ww> oh.  he's gone
09:30 < temoto> Someone should fix goconc to reflect absense of closed :(
09:31 < temoto> It has really nice high-level For, Map, Counter, etc
09:37 < kevlar> temoto: unless you're doing serious functional programming,
those shouldn't really be necessary, and the interface{} overhead gets ugly.
09:38 < temoto> Yeah, interface{} overhead is ugly.
09:40 < temoto> Native parametric polymorphism could fix it ;)
09:44 < ww> i find that in programming practical things with Go i almost
never need to use the empty interface{}
09:45 < ww> in theory generics and suchlike would be nice, but in practice i
haven't really missed them
09:47 -!- boscop__ [~boscop@f055029167.adsl.alicedsl.de] has joined #go-nuts
09:51 -!- boscop__ [~boscop@f055029167.adsl.alicedsl.de] has quit [Read error:
Connection reset by peer]
09:53 -!- boscop [~boscop@unaffiliated/boscop] has joined #go-nuts
09:58 -!- boscop [~boscop@unaffiliated/boscop] has quit [Read error: Connection
reset by peer]
09:58 -!- boscop [~boscop@unaffiliated/boscop] has joined #go-nuts
10:00 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
10:01 -!- halvor [~halvor@95.13.189.109.customer.cdi.no] has quit [Ping timeout:
240 seconds]
10:02 -!- boscop [~boscop@unaffiliated/boscop] has quit [Ping timeout: 258
seconds]
10:03 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:9c15:6042:5d23:dacf] has joined
#go-nuts
10:04 -!- jstemmer [~cheetah@mrpwn.stemmertech.com] has joined #go-nuts
10:08 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-165-23.clienti.tiscali.it] has
quit [Quit: E se abbasso questa leva che succ...]
10:09 -!- sauerbraten [~sauerbrat@p5B38B85D.dip.t-dialin.net] has joined #go-nuts
10:13 -!- partel [~bob@prag322.server4you.de] has quit [Quit: leaving]
10:13 -!- partel [~bob@prag322.server4you.de] has joined #go-nuts
10:27 -!- saschpe [~quassel@opensuse/member/saschpe] has joined #go-nuts
10:28 -!- sacho [~sacho@87-126-42-180.btc-net.bg] has joined #go-nuts
10:31 -!- TheMue [~TheMue@p5DDF5A42.dip.t-dialin.net] has joined #go-nuts
10:34 -!- oal [~oal@5.79-160-122.customer.lyse.net] has joined #go-nuts
10:37 -!- cenuij [~cenuij@105.116.26.93.rev.sfr.net] has joined #go-nuts
10:37 -!- cenuij [~cenuij@105.116.26.93.rev.sfr.net] has quit [Changing host]
10:37 -!- cenuij [~cenuij@base/student/cenuij] has joined #go-nuts
10:37 -!- sauerbraten [~sauerbrat@p5B38B85D.dip.t-dialin.net] has quit [Ping
timeout: 250 seconds]
10:56 -!- hallas [~hallas@x1-6-30-46-9a-b2-c5-1f.k891.webspeed.dk] has joined
#go-nuts
10:56 < huin> that was weird.  managed to have a non-clean build that had a
corrupted string
10:57 < huin> removing all the .8 etc.  and starting a clean build fixed it
10:59 -!- sebastianskejoe [~sebastian@95.142.158.83] has joined #go-nuts
10:59 < aiju> huin: happens
10:59 < huin> had me scratching my head for a while :)
10:59 < aiju> i always do make clean whenever i encounter really strange
bugs
10:59 < aiju> not limited to Go
10:59 < huin> wondering why code that worked before was suddenly chewing up
100% cpu and allocating ram until it ran out
11:00 < huin> yeah, there's a lesson here for me :)
11:03 -!- sebastianskejoe [~sebastian@95.142.158.83] has quit [Client Quit]
11:07 -!- ab3 [~abe@83.101.90.66] has joined #go-nuts
11:14 -!- partel [~bob@prag322.server4you.de] has quit [Quit: leaving]
11:17 < aiju> huin: the go linker had (has?) several bugs btw
11:18 < aiju> i had one where some strings were randomly corrupted
11:19 < huin> in my case the string was of huge size
11:19 < huin> obviously the string length component got corrupted in some
way
11:20 < aiju> strings in Go are limited to 2 GB ;P
11:21 < huin> not sure what it was up to in my case...  i didn't count the
digits.  it was clearly too large
11:21 < huin> runtime: out of memory: cannot allocate 272039936-byte block
(274137088 in use)
11:21 < huin> that's the only record i have of the problem
11:27 -!- a2800276 [~a2800276@xdsl-87-78-22-156.netcologne.de] has quit [Ping
timeout: 248 seconds]
11:27 -!- a2800276 [~a2800276@xdsl-213-196-218-32.netcologne.de] has joined
#go-nuts
11:42 -!- edsrzf [~edsrzf@122-61-221-144.jetstream.xtra.co.nz] has quit [Remote
host closed the connection]
11:48 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Quit:
skelterjohn]
12:04 -!- chipnt [~ciprian.o@paris-18.progdev.fr] has left #go-nuts []
12:09 -!- TheMue [~TheMue@p5DDF5A42.dip.t-dialin.net] has quit [Quit: TheMue]
12:10 -!- boscop [~boscop@unaffiliated/boscop] has joined #go-nuts
12:14 -!- boscop [~boscop@unaffiliated/boscop] has quit [Ping timeout: 250
seconds]
12:18 -!- hallas [~hallas@x1-6-30-46-9a-b2-c5-1f.k891.webspeed.dk] has quit [Ping
timeout: 276 seconds]
12:20 -!- rejb [~rejb@unaffiliated/rejb] has quit [Quit: .]
12:20 -!- moraes_ [~moraes@189.103.179.31] has joined #go-nuts
12:24 -!- moraes [~moraes@189.103.179.31] has quit [Ping timeout: 260 seconds]
12:29 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts
12:43 -!- keidaa [~keidaa@cm-84.210.56.138.getinternet.no] has joined #go-nuts
12:47 -!- TheMue [~TheMue@p5DDF5A42.dip.t-dialin.net] has joined #go-nuts
12:51 -!- COBOL2121 [~Null@usr018.bb160-01.udk.im.wakwak.ne.jp] has quit [Remote
host closed the connection]
12:54 -!- tobym [~tobym@cpe-72-229-2-6.nyc.res.rr.com] has joined #go-nuts
12:59 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts
13:02 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
13:03 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
13:09 -!- temoto [~temoto@95-24-28-242.broadband.corbina.ru] has left #go-nuts
["Leaving"]
13:14 -!- napsy [~luka@88.200.96.18] has quit [Quit: Lost terminal]
13:15 -!- scyth [~scyth@rots.in.rs] has joined #go-nuts
13:24 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has joined #go-nuts
13:24 -!- ExsysTech [~ExsysTech@50-46-213-60.evrt.wa.frontiernet.net] has quit
[Read error: Connection reset by peer]
13:24 -!- Fish- [~Fish@9fans.fr] has quit [Quit: So Long, and Thanks for All the
Fish]
13:25 -!- ucasano [~ucasano@host153-182-static.227-95-b.business.telecomitalia.it]
has joined #go-nuts
13:25 -!- ExsysTech [~ExsysTech@50-46-213-60.evrt.wa.frontiernet.net] has joined
#go-nuts
13:26 -!- jep200404 [~jep@cpe-204-210-242-157.columbus.res.rr.com] has left
#go-nuts []
13:26 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has joined
#go-nuts
13:27 -!- ExsysTech [~ExsysTech@50-46-213-60.evrt.wa.frontiernet.net] has quit
[Read error: Connection reset by peer]
13:28 -!- noam [noam@87.69.42.61.cable.012.net.il] has joined #go-nuts
13:28 -!- ExsysTech [~ExsysTech@50-46-213-60.evrt.wa.frontiernet.net] has joined
#go-nuts
13:28 -!- unofficialmvp1 [~dev@94-62-164-227.b.ipv4ilink.net] has joined #go-nuts
13:33 -!- keidaa [~keidaa@cm-84.210.56.138.getinternet.no] has quit [Remote host
closed the connection]
13:33 < GeertJohan> whow, why would someone allocate a string of 2 Gig's ?
(or is this a wierd question?)
13:36 -!- niemeyer [~niemeyer@200-102-196-125.pltce701.dsl.brasiltelecom.net.br]
has joined #go-nuts
13:41 -!- boscop [~boscop@unaffiliated/boscop] has joined #go-nuts
13:44 < vegai> GeertJohan: Atlas Shrugged?
13:44 -!- boscop_ [~boscop@f050142038.adsl.alicedsl.de] has joined #go-nuts
13:45 -!- boscop [~boscop@unaffiliated/boscop] has quit [Read error: Connection
reset by peer]
13:47 -!- sacho [~sacho@87-126-42-180.btc-net.bg] has quit [Read error: Connection
reset by peer]
13:47 < GeertJohan> Atlas Shrugged?
13:48 -!- unofficialmvp1 [~dev@94-62-164-227.b.ipv4ilink.net] has left #go-nuts []
13:50 -!- boscop_ [~boscop@f050142038.adsl.alicedsl.de] has quit [Ping timeout:
246 seconds]
13:50 -!- dfr|mac_ [~dfr|work@ool-182e3fca.dyn.optonline.net] has joined #go-nuts
13:51 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has quit [Read error:
Operation timed out]
13:56 -!- eimantas [~eimantas@ip-212-52-52-163.kava.lt] has joined #go-nuts
13:56 < eimantas> good day
13:57 -!- boscop [~boscop@unaffiliated/boscop] has joined #go-nuts
13:59 -!- boscop [~boscop@unaffiliated/boscop] has quit [Read error: Connection
reset by peer]
14:00 -!- icy [~icy@lighttpd/icy] has joined #go-nuts
14:01 < icy> can you use select to implement timeouts on Accept() of a
listener?
14:04 < eimantas> are there any rules of thumb for freeing unneeded
variables?
14:09 -!- hargettp [~hargettp@pool-71-174-139-181.bstnma.east.verizon.net] has
joined #go-nuts
14:11 < str1ngs> eimantas: not really unless you are using unsafe?
14:11 < eimantas> str1ngs - not really sure if I am using it
14:11 < eimantas> just created a project to work on
14:11 < eimantas> so just wondering various aspects of allocation,
object-oriented programming, etc.
14:12 < str1ngs> ok mainly you dont have to free variables.  should be more
worried about closing open IO
14:12 < eimantas> got it
14:12 < eimantas> thanks
14:13 < str1ngs> eimantas: also err checking
14:14 < str1ngs> ie you dont want to defer close a os.File until after you
err check
14:14 < str1ngs> other wise the file will be nil and will panic
14:15 < str1ngs> so f,err := os.Open("foo"); if err !=nil { return err};
defer f.Close()
14:18 < eimantas> if I run this in a function, the f.Close() will take place
right after the caller has finished?  (assuming there was no err)
14:18 < str1ngs> when the function returns it will call f.Close()
14:24 -!- boscop [~boscop@unaffiliated/boscop] has joined #go-nuts
14:29 < exch> gofmt's formatting seems a little inconsistent in some places
14:29 < exch> "h = (g - b) / delta" vs "h = 2 + (b-r)/delta"
14:30 < exch> note the lack of spaces in the second (b-r)
14:30 < exch> or rather the precense of spaces in the first (g - b)
14:31 -!- jarsen [~jarsen@76.8.206.21] has joined #go-nuts
14:31 < exch> mm also the spaces around the /
14:31 < exch> though that is prolly due to operator precedence stuff
14:33 < str1ngs> could be a bug?
14:33 < exch> the bit inside the () probably is
14:37 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
14:39 -!- jarsen [~jarsen@76.8.206.21] has quit [Remote host closed the
connection]
14:40 -!- hargettp [~hargettp@pool-71-174-139-181.bstnma.east.verizon.net] has
quit [Quit: Leaving...]
14:41 -!- saschpe [~quassel@opensuse/member/saschpe] has quit [Remote host closed
the connection]
14:41 -!- hargettp [~hargettp@pool-71-174-139-181.bstnma.east.verizon.net] has
joined #go-nuts
14:42 -!- ab3 [~abe@83.101.90.66] has quit [Ping timeout: 260 seconds]
14:43 -!- hargettp [~hargettp@pool-71-174-139-181.bstnma.east.verizon.net] has
quit [Client Quit]
14:48 -!- aho [~nya@fuld-590c7acd.pool.mediaWays.net] has joined #go-nuts
14:49 < exch> issue filed.
14:49 -!- GeertJohan [~geertjoha@s51478c91.adsl.wanadoo.nl] has quit [Quit:
Leaving.]
14:49 < manveru> meh, now i'm back to using mutex
14:53 * ww is having a very hard time being productive today
14:53 < skelterjohn> manveru: so, you were the one to tip off the
apocalypse, eh?
14:53 < manveru> skelterjohn: the who?
14:53 < skelterjohn> today is the beginning of the apocalypse
14:53 < skelterjohn> 6pm local time
14:54 < manveru> in 2 minutes it's the 22nd
14:54 < skelterjohn> i've either got 7 hours until i rapture or 7 months
until the pain ends
14:54 < skelterjohn> oh, i'm sorry.  you must not have made it.
14:54 < manveru> i think that applied only to christians anyway
14:54 < manveru> not much of a threat for japan
14:55 < eimantas> oh
14:55 < eimantas> rapture will begin in less than a minute in my tz
14:55 < eimantas> also
14:55 < skelterjohn> manveru: that makes it a *huge* thread for japan!
14:55 < skelterjohn> eimantas: keep us posted!
14:55 < eimantas> is there a method that is being called when asking for
description of some type
14:55 < eimantas> like to_s in ruby
14:56 < eimantas> or -(NSString *)description in objc
14:56 < manveru> String() i think
14:56 < skelterjohn> i don't know ruby.  what information d you expect ot
get back?
14:56 < manveru> you mean like inspect in ruby?
14:56 < eimantas> inspect calls to_s AFAIK, so yah, basically inspect
14:56 < skelterjohn> do you just want the name of a type inside an
interface?
14:56 < eimantas> skelterjohn - i want my own description for my own type
14:56 < skelterjohn> where is this description defined?
14:57 < eimantas> if i do fmt.Println(MyFooType), what will I get if i have
type MyFooType struct {}
14:57 < skelterjohn> eimantas: can't do that
14:57 < skelterjohn> MyFooType is a type, not a value
14:57 < skelterjohn> in go, types are not values
14:57 < eimantas> ah
14:57 < eimantas> right
14:57 < eimantas> so if i have a value of MyFooType
14:57 < eimantas> like
14:57 < ww> eh?  it's not 2012 yet...
14:57 < eimantas> MyFooType ownFooType := {}
14:57 < manveru> electro: yeah, String
14:58 < eimantas> and then I do fmt.Println(ownFooType)
14:58 < skelterjohn> eimantas: i'm afraid you have failed to rapture, btw
14:58 < eimantas> aww cwap
14:58 < skelterjohn> oh - yes give it a String() string method
14:58 < manveru> func (self Foo) String() string { return "whatever" }
14:58 < skelterjohn> and fmt will see it
14:58 < eimantas> sweet
14:58 < eimantas> thanks
14:59 < eimantas> wow
14:59 < eimantas> func (self Foo)
14:59 < manveru> wow?
15:00 < manveru> also, inspect only calls to_s in the simplest cases in ruby
15:00 < skelterjohn> i write my methods as func (this Foo)
15:01 < skelterjohn> but i guess my learning was in C++ rather than python
or objc :)
15:01 < eimantas> manvery - yah, a bit bizzarre to my taste
15:01 < manveru> i usually write func (foo Foo)
15:01 < eimantas> in my coding experience, the self was ALWAYS implicity
(php -> ruby -> objc)
15:01 < eimantas> or $this (in case of php)
15:01 < manveru> heh
15:01 < eimantas> s/implicity/implicit/
15:02 < eimantas> this go, weird c and python offspring is really weird to
me
15:02 < eimantas> GOtta get used to it
15:02 < eimantas> .P
15:02 < manveru> what're you doing?
15:02 < eimantas> can you be more specific?  .)
15:02 < manveru> what do you plan to use go for?
15:02 < eimantas> oh, just toying
15:02 -!- dfr|mac_ [~dfr|work@ool-182e3fca.dyn.optonline.net] has quit [Remote
host closed the connection]
15:02 < manveru> or just for fun?
15:03 < eimantas> coding zeromq handler for mongrel2
15:03 < manveru> cool :)
15:03 < eimantas> actually, porting from php to go
15:03 < eimantas> but still a good learning practice
15:04 < manveru> yeah
15:04 < manveru> go takes a bit to get used to
15:04 < eimantas> yeah, i remember seeing := for the first time.
15:04 < manveru> you never used smalltalk?
15:04 < eimantas> no
15:04 < eimantas> but i used pascal
15:05 < eimantas> so it nearly gave me a stroke
15:05 < manveru> lol
15:05 < eimantas> didn't like the pascal experience
15:05 < eimantas> although it DOES look like chipmunk face
15:05 < eimantas> so I guess i get where the go logo comes from
15:06 < manveru> well, for some reason writing anything larger in go always
feels like brain surgery
15:06 -!- jarsen [~jarsen@76.8.206.21] has joined #go-nuts
15:06 < eimantas> true
15:06 < eimantas> is there some sort of interactive go?
15:07 < eimantas> uh, a shell
15:07 < eimantas> for...  compiled language
15:07 < eimantas> ?
15:07 < manveru> not really
15:07 < manveru> there's gotry, but it only accepts one statement
15:07 -!- ab3 [~abe@83.101.90.66] has joined #go-nuts
15:07 < manveru> i usually use gobuild -run
15:07 < manveru> but no REPL yet
15:08 < manveru> since go lacks the E part
15:08 < skelterjohn> there are a bunch of utilities that will build and run
a single .go file
15:08 < manveru> tbh, i don't think a REPL would be all that useful
15:09 < manveru> right now i mostly yearn for generics and select over
arbitrary channel colletions :)
15:09 < eimantas> I lost you after the word "football"
15:09 < eimantas> I'm yet to go that far
15:09 < eimantas> .)
15:09 < manveru> :)
15:09 < manveru> have fun
15:10 < manveru> go can be a nice language, but it's also very opinionated
15:10 < manveru> i use it because i hate C even more
15:10 < exch> lol
15:10 -!- TheMue [~TheMue@p5DDF5A42.dip.t-dialin.net] has quit [Quit: TheMue]
15:10 < exch> implying you hate Go, just not as much as C :)
15:11 < manveru> :)
15:11 < manveru> my dayjob is in ruby
15:12 < exch> Go became a lot easier for me to deal with when I forced
myself to let go of all the brainwashing I received from stuff like C#. Stop
comparing Go to something else and just accept that it has its own way of doing
things :)
15:12 < manveru> yeah
15:13 < manveru> my relationship with go is mostly love-hate
15:13 < manveru> it's really nice once you find a way that is easy to
express in go
15:14 < skelterjohn> probably because of your ruby pedigree
15:14 < manveru> but for the project i'm working on right now, it's mostly
banging my head against walls
15:14 < skelterjohn> i can understand coming from a language where the motto
is "can you think of a situation where it would be useful?  ADD IT TO THE
LANGUAGE!"
15:14 < exch> It makes porting programs to Go a bit more difficult at times.
Since you often have to rethink the entire project structure to make it effective
in Go
15:15 < manveru> well, not only that
15:15 < manveru> i'm also having a hard time planning for avoidance of
circular imports for example
15:15 < skelterjohn> if there is a circular dependence then it needs to be
contained in one package
15:15 < manveru> so usually i write the first version in a single file and
split it up later
15:16 < eimantas> is there a way to get separate vars from splitting a
string into an array
15:16 < manveru> also using interfaces everywhere tends to help
15:16 < eimantas> like foo, bar := strings.Slit("foo bar", " ", -1)
15:16 < manveru> eimantas: no
15:16 < eimantas> s/Slit/Split/
15:16 < skelterjohn> eimantas: it returns a slice
15:16 < eimantas> right
15:16 < skelterjohn> otherwise how would the compiler know if that was safe
to do or not?
15:17 < eimantas> seems it's a good time to learn about slices
15:17 < skelterjohn> a slice is like an array
15:17 < manveru> you'll still get runtime errors if you try to access out of
bounds, so not much help
15:17 < skelterjohn> whose length you don't know at compile time
15:17 < skelterjohn> manveru: but you can check
15:17 < skelterjohn> x, y := strings.Split() has no check
15:17 < skelterjohn> it just assumes
15:17 < manveru> yeah
15:18 < manveru> but go doesn't seem to have much problems giving me nils
all over the place otherwise :)
15:18 < skelterjohn> it would also be unsafe to write xy := strings.Split();
x, y := xy[0], xy[1]
15:18 < exch> a nil slice is still a valid slice
15:18 < skelterjohn> but you can only expect so much from go
15:18 < manveru> yeah
15:18 < eimantas> yeah, string manipulation could be easier
15:19 < manveru> i don't want you to solve the halting problem :)
15:19 < skelterjohn> what do you find irritating with string manipulation?
15:20 < ww> well that kind of fiddliness with slitting strings happens with
python too
15:20 < eimantas> skelterjohn - splitting for the most part
15:20 < skelterjohn> btw if you find yourself calling strings.Split(str, "
", -1) a lot, try strings.Fields(str) instead
15:20 < chomp> of all things, i thought splitting was pretty convenient
15:20 < eimantas> I'm writing a mongrel2 handler for zeromq
15:20 < eimantas> so it's mostly like UUID ID PATH SIZE:HEADERS,SIZE:BODY,
15:20 < eimantas> I have to create three slices in order to get to each of
the elements
15:20 < skelterjohn> strings.Fields() :)
15:21 < eimantas> \m/,
15:21 < eimantas> thanks
15:21 -!- hilario [~hilario@187.142.209.185] has joined #go-nuts
15:21 < ww> actually for things like this i wish the ebnf parser returned a
grammar that could directly be used to parse/unmarshal things...
15:21 < eimantas> is there some sort of defined field separator?
15:21 -!- ucasano [~ucasano@host153-182-static.227-95-b.business.telecomitalia.it]
has quit [Quit: ucasano]
15:21 < skelterjohn> for strings.Fields it uses whitespce
15:21 < skelterjohn> but there is also strings.FieldsFunc
15:21 < eimantas> ww++
15:22 < taruti> ragel is quite nice for parsing
15:22 < hilario> hi, in a websocket, how can i know if a user closed the
browser?  any ideas?
15:22 < skelterjohn> which takes a function that indicates if something is a
separator
15:22 < skelterjohn> as a second parameter
15:22 < eimantas> so split returns a []uint8
15:22 < skelterjohn> hilario: javascript
15:22 < eimantas> .(
15:23 < eimantas> I can't use it directly as other function's argument
15:23 < skelterjohn> which split are you talking about
15:23 < eimantas> str.Split
15:23 < hilario> so, no server-side detection (sorry for interrupting)...
15:23 < skelterjohn> strings.Split?
15:23 < eimantas> M2Request.go:24: cannot use strings.Split(headers, ":",
-1)[1] (type string) as type []uint8 in function argument
15:23 < eimantas> yea
15:23 < eimantas> i did import str "strings"
15:23 < eimantas> .)
15:23 < skelterjohn> strings.Split() returns a []string
15:24 < eimantas> right
15:24 < eimantas> so one string is []uint8
15:24 < skelterjohn> not a []uint8...
15:24 < skelterjohn> no it's not :) but you can convert it if you like
15:24 < skelterjohn> it involves a copy
15:24 < eimantas> so the error is about an argument type, not the return
type from Split
15:24 < eimantas> ?
15:25 < skelterjohn> i need more context
15:25 < skelterjohn> oh, you gave it
15:25 < ww> there is an analogous function in the bytes package iirc if you
want to deal with byte arrays instead of strings
15:25 < skelterjohn> yes - the argument type
15:25 -!- serverhorror_ [~martin@krlh-5f725eea.pool.mediaWays.net] has joined
#go-nuts
15:25 < skelterjohn> []uint8(strings.Split(headers, ":", -1)[1])
15:26 < ww> aha.  surprisingly, it's called bytes.Split()
15:26 < skelterjohn> that will convert the string to a byte slice by copying
15:26 < skelterjohn> but yeah - you can use bytes instead of strings if you
want to avoid strings
15:26 < eimantas> hmm
15:26 < eimantas> I need to read on json package
15:26 < skelterjohn> has Fields, Split, etc
15:28 < eimantas> I have a string which is valid json
15:28 < eimantas> I need to make it a map
15:28 < eimantas> or something like that
15:28 < eimantas> it returns a pointer to some weird interface
15:29 -!- hilario [~hilario@187.142.209.185] has left #go-nuts []
15:29 < skelterjohn> type assert
15:30 < skelterjohn> theInterface.(map[string]string)
15:30 < skelterjohn> it probably returns an interface rather than a pointer
to an interface
15:32 < eimantas> it actually doesn't return anything
15:32 < eimantas> quoting: "Unmarshal parses the JSON-encoded data and
stores the result in the value pointed to by v."
15:32 < eimantas> so the second param is a pointer to where should the data
be stored
15:32 -!- jarsen [~jarsen@76.8.206.21] has quit [Remote host closed the
connection]
15:33 < ww> so you could do,
15:33 < ww> var v interface{}
15:33 < ww> Unmarshal(data, &v)
15:33 < ww> but somehow it is a lot nicer if your json is predictable
15:33 < eimantas> it sort of is
15:34 < eimantas> it's http headers presented in json format
15:34 < ww> so instead of having v as interface{} you could have v as struct
shaped like your json
15:34 < eimantas> ah
15:34 < eimantas> hmm...
15:34 < eimantas> not a good fit
15:34 < eimantas> hell knows what kind of requests once can receive
15:34 < eimantas> ww - how do I access stuff from the interface?
15:34 < eimantas> like a generic interface
15:34 < eimantas> in your code sample
15:34 < skelterjohn> if a function takes *interface{}, you can't pass it the
address of a struct
15:34 < eimantas> v[key] // gives value at v[key]
15:34 < ww> i have an example somewhere, hang on
15:35 < eimantas> actually, i have to interface{}s in a struct
15:35 < skelterjohn> eimantas: to get something out of an interface you use
a type assert, like i mentioned earlier
15:35 < skelterjohn> i suggest taking a look at the spec and "effective go"
15:35 < eimantas> mm...  I have like 4 tabs open on golang site atm
15:35 < eimantas> .)
15:36 < ww>
https://bitbucket.org/ww/gold/src/tip/ckanclient/package.go#cl-208
15:37 < ww> that could probably be written in a cleaner way...
15:37 < ww> iirc, in this case i do v := make(map[string]interface{})
because i know the json is just a dictionary but the types of its keys can vary
15:37 < ww> if you know that you have unparsed http headers you could
probably do v := make(map[string]string)
15:38 < ww> the actual json unmarshalling happens at
https://bitbucket.org/ww/gold/src/tip/ckanclient/ckanclient.go#cl-185
15:39 < eimantas> sweet
15:40 < eimantas> zomg, I'll have lots of readings
15:40 < manveru> is it terribly efficient to put a function in a channel?
15:40 -!- hargettp [~hargettp@pool-71-174-139-181.bstnma.east.verizon.net] has
joined #go-nuts
15:43 -!- hargettp [~hargettp@pool-71-174-139-181.bstnma.east.verizon.net] has
quit [Client Quit]
15:43 < chomp> why would it be less efficient than a channel of anything
else?
15:45 < ww> i guess you'd have to have a long sequence of functions to apply
for it to make much sense...
15:46 < manveru> well, yeah
15:46 < eimantas> 'k, gotta go do some real life stuff with my gf
15:46 < eimantas> ttyl peeps!
15:46 < manveru> but right now it's always the same function
15:46 < manveru> i wonder if i should just put a boolean or something
instead
15:47 < manveru> also i probably should add buffering, or i'll always have a
couple hundred goroutines waiting around
15:51 -!- cenuij [~cenuij@base/student/cenuij] has quit [Remote host closed the
connection]
15:51 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
15:54 < manveru> wtf does an exit 255 mean?
15:54 -!- boscop_ [~boscop@f050149066.adsl.alicedsl.de] has joined #go-nuts
15:55 -!- The_Cog [~chatzilla@239.24.187.81.in-addr.arpa] has joined #go-nuts
15:56 -!- cenuij [~cenuij@105.116.26.93.rev.sfr.net] has joined #go-nuts
15:56 -!- cenuij [~cenuij@105.116.26.93.rev.sfr.net] has quit [Changing host]
15:56 -!- cenuij [~cenuij@base/student/cenuij] has joined #go-nuts
15:56 -!- wallerdev [~wallerdev@72.44.102.30] has joined #go-nuts
15:56 -!- boscop [~boscop@unaffiliated/boscop] has quit [Ping timeout: 246
seconds]
15:59 < The_Cog> Is there a library function to change my user id?  i.e.
from root to wwwuser after opening port 80?
16:02 < manveru> The_Cog: http://golang.org/pkg/syscall/#Setuid
16:02 < scyth> syscall.Setuid()
16:03 < The_Cog> Excellent - thank you
16:03 -!- napsy [~luka@88.200.96.18] has quit [Quit: Lost terminal]
16:04 < ww> manveru: exit(255) is an old convention for "some kind of error
occurred but i'm not going to bother trying to tell the calling process what it
was"
16:04 < manveru> :P
16:05 < manveru> ok...  in my case it's probably running out of memory
16:05 < manveru> doesn't container/vector check for successful allocation?
16:06 < skelterjohn> you shouldn't use container/vector
16:06 < skelterjohn> use a slice and append()
16:07 < manveru> append?
16:08 < manveru> uhm
16:08 < manveru> what's the benefit?
16:08 < skelterjohn> append is a built-in function that will add an element
to a slice
16:08 < skelterjohn> the benefit is you don't have to deal with a
[]interface{} and the type assertions that come with it
16:08 < manveru> i don't have to deal with those
16:09 < skelterjohn> container/Vector is a []interface{}
16:09 < skelterjohn> so, yes you do :)
16:09 < aiju> 18:09 < ww> manveru: exit(255) is an old convention for
"some kind of error occurred but i'm not going to bother trying to tell the
calling process what it was"
16:09 < manveru> yeah, i converted them via gofmt for my types
16:09 < aiju> the same thing applies to all error codes, doesn't it?
16:09 < skelterjohn> you took container/vector and rewrote it?
16:09 < manveru> basically
16:09 < skelterjohn> use append...
16:10 < manveru> cat src/pkg/container/vector/vector.go | gofmt -r='Vector
-> ReadyJobs' | gofmt -r='interface{} -> Job' >| job/readyjobs.go
16:10 < manveru> that's it
16:10 < skelterjohn> i understand
16:10 < skelterjohn> use append
16:10 < ww> aiju: some older programs will actually endow exit(1), exit(2),
exit(3) with specific meaning iirc
16:10 < ww> not used much anymore i think
16:10 < manveru> skelterjohn: would append tell me when i'm out of memory?
16:10 < skelterjohn> theslice = append(theslice, aNewElement)
16:10 < aiju> ww: true...  grep etc do
16:10 < skelterjohn> theslice returned would probably be nil
16:10 < aiju> nothing beats Plan 9's exit strings!
16:11 < ww> 255 == -1 fwiw, it's an unsigned char
16:11 < ww> s/un//
16:11 < aiju> no such thing as unsigned char on the PDP-11 ;P
16:11 < skelterjohn> i didn't know that there was a such thing as a signed
char at all
16:11 < skelterjohn> signed int, sure
16:12 < aiju> skelterjohn: char is just an 8-bit int
16:12 < skelterjohn> yes
16:12 < aiju> the PDP-11 converts sign extend bytes if you load them into
registers
16:12 < aiju> MOVB R0, $0xFF sets R0 to 0xFFFF
16:13 < aiju> ehm MOVB $0xFF, R0
16:13 < ww> cgo is actually strict enough that using a *C.char where things
are declared as unsigned char * in the header files is an error
16:13 * aiju always mixes up assembly conventions
16:16 < manveru> skelterjohn: nope
16:17 < manveru> same behaviour with append
16:17 < skelterjohn> at least now your code is proper
16:17 < manveru> ??
16:17 < skelterjohn> how do you know it's OOM?
16:17 -!- chomp [~chomp@c-67-186-35-69.hsd1.pa.comcast.net] has quit [Quit:
Leaving]
16:18 < aiju> OOM is a sign of impending DOOM
16:18 < manveru> i dunno, for all i know 255 means "abducted by aliens"
16:18 < manveru> but all i do is allocating memory, so it just seemed
logical
16:18 < skelterjohn> your go program is returning 255?
16:18 < skelterjohn> or rather, -1?
16:18 < manveru> zsh: exit 255 gobuild -run
16:18 < skelterjohn> that just means gobuild is interpreting the number
wrong
16:19 < manveru> heh
16:19 < skelterjohn> what happens if you just compile the program yourself
and run it?
16:19 < manveru> runtime: address space conflict: map(0xf8cb3d0000) = 0xc
16:19 < skelterjohn> sounds like a memory issue
16:19 < skelterjohn> ah of course - append wouldn't return nil, it would
panci
16:19 < skelterjohn> panic
16:19 < manveru> what you don't say...
16:20 < manveru> so yeah, i have the same behaviour as with vector
16:20 < skelterjohn> well, an "address space conflict" panic is a much
better indication of OOM than "it returned 255" =p
16:20 < skelterjohn> if you want to catch OOM, you can catch the panic using
recover
16:21 < manveru> yeah...
16:21 < skelterjohn> and if gobuild -run doesn't show you the panic, i
suggest using a different tool
16:21 < manveru> gobuild sometimes shows the panic
16:21 < skelterjohn> awesome
16:21 < manveru> :)
16:21 < skelterjohn> i love "sometimes"
16:22 < manveru> yeah...  my whole project right now revolves around
sometimes
16:22 < ww> hmmm...  how much ram do you have?
16:22 < manveru> using mutex and avoiding deadlocks manually is so much fun
16:22 < manveru> ww: 4gb
16:23 < ww> you aren't by any chance overflowing the size of the slice are
you?
16:23 < skelterjohn> oh that's much more likely
16:23 < skelterjohn> good call
16:23 < manveru> the size of the slice?
16:23 < skelterjohn> max size of slice is 2^31-1
16:23 < manveru> oh
16:23 < skelterjohn> since it's held in an int
16:23 < manveru> srsly?
16:23 < manveru> isn't that int64 on x86_64?
16:23 < skelterjohn> no
16:23 < skelterjohn> not necessarily
16:24 < skelterjohn> or usually
16:24 < manveru> ok...  first i'm gonna puke, and then i'm gonna sleep
16:24 < skelterjohn> but the spec doesn't say
16:24 < manveru> thanks folks
16:24 < skelterjohn> what causes you to want to have 2^31 pieces of data in
consecutive memory?
16:25 < ww> this seems to come up a lot...
16:25 < skelterjohn> can't be that much - i'm here 24/7 and it's maybe the
2nd time i've seen it come up O:-)
16:25 < ww> the most plausible real answer is - mmap a big file
16:26 < ww> at any given time there's a mailing list thread about it too
16:27 < skelterjohn> huh
16:27 < ww> eh?
16:28 < skelterjohn> ?
16:31 < ww> wtf.  stupid wget.
16:31 < ww> i run it by hand in the terminal and it "obeys" robots.txt
16:31 < ww> I AM NOT A ROBOT
16:35 < str1ngs> ww: thats why I use gurl :P
16:36 < ksni> wget -e robots=off <url>
16:37 < aiju> ww: hahaha
16:40 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:9c15:6042:5d23:dacf] has quit
[Ping timeout: 260 seconds]
16:41 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
16:54 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:581f:e486:b34d:a545] has joined
#go-nuts
16:55 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
16:58 -!- flaguy48 [~gmallard@user-0c6s350.cable.mindspring.com] has left #go-nuts
[]
17:04 -!- tobym [~tobym@cpe-72-229-2-6.nyc.res.rr.com] has quit [Ping timeout: 248
seconds]
17:04 -!- ab3 [~abe@83.101.90.66] has quit [Quit: leaving]
17:07 -!- rlab_ [~Miranda@91.200.158.34] has joined #go-nuts
17:07 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 246 seconds]
17:08 -!- flaguy48 [~gmallard@user-0c6s350.cable.mindspring.com] has joined
#go-nuts
17:29 -!- gtaylor [~gtaylor@199.15.144.250] has joined #go-nuts
17:42 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has quit [Remote
host closed the connection]
17:55 -!- iainmcgin [~iainmcgin@89.192.139.54] has joined #go-nuts
17:56 < eimantas> anyone still alive?
17:56 < aiju> no
17:57 < aiju> we're all among the 144k
17:57 < eimantas> ah, the rapture?
17:57 < mpl> aiju: is it supposed to be 144k chosen ones?
17:57 < mpl> what's the criterion?
17:58 < mpl> does one needed to go to the mass every sunday?
17:58 < eimantas> 2% i guess
17:59 < eimantas> so that'd be way more than 144k
17:59 < mpl> why 2%?
17:59 < eimantas> read it somewhere
18:00 < aiju> eimantas: there are all kinds of figures
18:00 < aiju> 144k is the most likely one, i'd say
18:00 < aiju> as it is in the revelation
18:00 < eimantas> I believe you
18:01 < aiju> Revelation 7, 4
18:01 < mpl> interesting.
18:02 < aiju> "And I've been told the number of those who are marked with
the seal.  It were 144,000 from all the peoples of the sons of Israels, who wear
the seal"
18:02 < aiju> (my own translation from german ;P)
18:03 < vsmatck> And we think it's unusual that a million fireflys can all
pulse at the same time...
18:04 -!- rael_wiki [~chatzilla@unaffiliated/rael-wiki/x-8420294] has joined
#go-nuts
18:04 < rael_wiki> hello
18:05 -!- iainmcgin [~iainmcgin@89.192.139.54] has quit [Quit: Colloquy for iPhone
- http://colloquy.mobi]
18:05 < ww> are there any christians left?
18:05 < aiju> yes
18:05 < eimantas> >.>
18:05 < aiju> i have met some
18:05 < eimantas> <.<
18:06 < eimantas> not to keep you off topic
18:06 < rael_wiki> lol
18:06 < eimantas> if I have package made of few files
18:06 < eimantas> how do files know of each other (at compile time)
18:06 < eimantas> ?
18:06 < ww> sorry, i've not being paid attention.  why is today significant?
18:06 < aiju> eimantas: 8g foo.go bar.go
18:06 < aiju> that way ;P
18:06 < eimantas> nope
18:07 < aiju> huh?
18:07 < aiju> or 6g
18:07 < eimantas> 6g
18:07 < eimantas> but, uh..
18:07 < aiju> it doesn't fucking matter
18:07 < eimantas> M2Connection.go:4: syntax error: unexpected name,
expecting }
18:07 < eimantas> what's the policy
18:07 < eimantas> oh right
18:07 < eimantas> pastie.org
18:07 < rael_wiki> is it possible that "println("A"); go func(){println("B")
...}()" only prints A?
18:07 < aiju> yes
18:08 < aiju> if the program exits
18:08 < aiju> all goroutines are killed
18:08 < rael_wiki> no, the main keeps waiting
18:08 < aiju> using for {}?
18:08 < aiju> if main doesn't yield it'll never print B
18:08 < rael_wiki> yep but it doesn't even reach that for{}
18:08 < eimantas> http://pastie.org/private/rbyudkywzivdmbwy85g1za
18:08 < rael_wiki> no not in the main
18:08 < eimantas> here's what i've got
18:09 < rael_wiki> the for{} is in the go func(){}
18:09 < aiju> rael_wiki: huh?  nopaste your code
18:11 < vsmatck> I recall a mailing list post or bug tracker post with that
exact code fragment rael_wiki posted.
18:11 < mpl> ww: some guru apparently made some calculation from the bible
and predicted that the chosen ones are supposed to go today.
18:11 < eimantas> he will commit suicide
18:11 < eimantas> and pretend he was taken
18:12 < eimantas> hence lots of gullible morons will follow
18:12 < aiju> eimantas: it's the second time it has happened
18:12 < aiju> his last prediction was 1994
18:12 < eimantas> now THAT must be definition of attention whore
18:12 < rael_wiki> aiju: should I post all the 200 lines of code or just a
part is more readable?
18:12 < cenuij> no he wont, he has a ton of cash from his scam, he'll make a
church and continue the scam.  Just like that guy did when he created the mormon
church.  It's almost exactly the same thing.
18:12 < aiju> he'll just find some pseudo error in his math
18:12 < eimantas> 'k
18:12 < aiju> and it'll be 28.6.2034 or so
18:13 < eimantas> so no idea what's my problem is (with pastie.org above)?
18:13 < aiju> rael_wiki: just post everything
18:14 < ww> mpl: was it rael?
18:14 < rael_wiki> aiju: http://pastie.org/private/elxgegbqdkxwx9hegauiq
18:14 < aiju> rael_wiki: just out of curiosity, why are your variables all
caps?
18:14 < rael_wiki> aiju: just the const
18:15 < rael_wiki> aiju: and the global
18:16 < rael_wiki> aiju: line 155 it prints "STARTING ACCEPTOR" but never
prints "ACCEPTOR STARTED"
18:16 < mpl> ww: no idea, haven't followed either.  my knowledge on this
comes from the random times it was mentionned in the webcomics I read and sites
like imgur.
18:16 < aiju> rael_wiki: you have an infinite loop with a non-blocking read
18:17 -!- rlab_ [~Miranda@91.200.158.34] has quit [Read error: Connection reset by
peer]
18:18 < rael_wiki> aiju: which for{} are you talking about?
18:18 < aiju> e.g.  81
18:18 < aiju> or 112
18:19 < exch> the default: cases make it non-blocking
18:19 < rael_wiki> aiju: uuuhhh, I realized now that it'll never yield the
processor....
18:19 < aiju> at least yield
18:19 < aiju> or better, rewrite them to blocking reads
18:19 < ww> mpl: aha http://theaporetic.com/?p=2253
18:20 < ww> funny how it gives the impression that time zones were invented
my the americans...
18:20 < rael_wiki> aiju: they shouldn't be blocking because if never arrives
the program should be maybe doing something else...  isn't thata the way to do it?
18:20 < aiju> rael_wiki: no
18:20 < rael_wiki> *if nothing arrives
18:22 < aiju> ww: this seems stupid
18:24 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has joined
#go-nuts
18:24 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-158-245.clienti.tiscali.it] has
joined #go-nuts
18:25 < rael_wiki> aiju: so, what is the right way to read a chan and do
something else if nothing arrives?
18:25 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has quit [Remote
host closed the connection]
18:26 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has joined
#go-nuts
18:26 < aiju> what exactly are you trying to do?
18:26 < ww> switch { case v := <-ch: do something; default: do something
else }
18:26 < aiju> do you want a timeout or something?
18:26 < aiju> ww: he wants to do it perpetually
18:26 < ww> for { switch { case v := <-ch: do something; default: do
something else } }
18:26 < aiju> ww: exactly not
18:27 < aiju> you're hogging the CPU and it doesn't work either
18:27 < ww> well, yeild or something
18:27 < aiju> still hogging
18:27 < skelterjohn> presumably the something else doesn't take zero cycles
18:27 < skelterjohn> otherwise the thing he is asking pegs the proc by its
very nature
18:29 < rael_wiki> aiju: maybe I should understand exactly what my processes
should be doing before continuing this conversation, I did that way because I
still don't know what my processes are supposed to do
18:29 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has quit [Remote
host closed the connection]
18:29 < rael_wiki> aiju: thanks for the help
18:30 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:581f:e486:b34d:a545] has quit
[Quit: Leaving.]
18:30 -!- m4dh4tt3r [~Adium@c-98-210-145-213.hsd1.ca.comcast.net] has joined
#go-nuts
18:34 -!- jamesr [~jamesr@173-164-251-190-SFBA.hfc.comcastbusiness.net] has quit
[Ping timeout: 246 seconds]
18:39 -!- m4dh4tt3r [~Adium@c-98-210-145-213.hsd1.ca.comcast.net] has quit [Ping
timeout: 258 seconds]
18:41 < serverhorror_> hmmm Foo(a string) and Foo() in the same file will
throw an error.  Forgot the english term for that language feature now sorry.  I
guess the common solution is to either introduce better names or ...?
18:42 < eimantas> overloading?
18:42 < eimantas> the term
18:42 < serverhorror_> yup right :) thanks
18:44 -!- hargettp [~hargettp@pool-71-174-139-181.bstnma.east.verizon.net] has
joined #go-nuts
18:45 < skelterjohn> better names
18:45 < skelterjohn> using variadics is not the right choice here
18:47 -!- m4dh4tt3r [~Adium@c-98-210-145-213.hsd1.ca.comcast.net] has joined
#go-nuts
18:53 < eimantas> I'm trying to compile a package
18:53 < eimantas> yet getting this weird error: cannot find import "C"
18:54 < vsmatck> eimantas: Are you trying to link to a C programming
language library, or is your Go package called "C"?
18:55 < eimantas> I think neither
18:55 < eimantas> I'm using a package that links with some C lib
18:55 < eimantas> but that package is installed and I'm doing only import of
it
18:55 < skelterjohn> are you on windows?
18:55 < eimantas> and I'm trying to use sample Makefile
18:55 < eimantas> I'm on OSX
18:55 < skelterjohn> what's the lib you're trying to use?
18:56 < eimantas> gozmq package with zmq library bindings
18:56 < skelterjohn> pastebin your source and makefile
18:56 < eimantas> I can paste the Makefile
18:56 < skelterjohn> also did you build gozmq yourself?
18:57 < eimantas> http://pastie.org/1947424
18:57 < eimantas> yes, I built it by myself
18:57 < eimantas> well, followed installation directives
18:57 < skelterjohn> M2Connection.go imports "C"?
18:57 < eimantas> https://github.com/alecthomas/gozmq <-- this one
18:58 < eimantas> skelterjohn - pastie above has all files sourced
18:58 < skelterjohn> ah, yes
18:58 < skelterjohn> CGOFILES are only for .go files that import "C"
18:58 < skelterjohn> if you never import "C", you should only have GOFILES
18:58 < eimantas> ah
18:59 < eimantas> alright!
18:59 < skelterjohn> :)
18:59 < eimantas> make has made it
18:59 < eimantas> what's next <.<
18:59 < skelterjohn> run it?
18:59 < skelterjohn> well, it's a pkg
18:59 < skelterjohn> make a driver to test it?
19:00 < eimantas> hmm
19:00 < eimantas> i have this _6_.go file nao
19:00 < eimantas> I think I should link it with something
19:00 < eimantas> I mean I DO have a driver
19:00 < skelterjohn> you mean _go_.6?  :)
19:00 < eimantas> separate go file
19:00 < eimantas> right
19:00 < eimantas> sorry
19:00 < eimantas> lol
19:00 < skelterjohn> that's an intermediate binary.  to make it so you can
link your pkg to other things, make install
19:01 < skelterjohn> and then people will be able to import "Mongrel2Go"
19:01 < eimantas> woo \o/
19:01 < ww> cgo's line numbers for errors are very bugged :X
19:01 < skelterjohn> ww: yes
19:08 < ww> heh.  importing 17 large files into a database.  each one takes
exactly 22 minutes.  is that enough for exactly 17 episodes of a sitcom?
19:10 < skelterjohn> use 17 goroutines ;)
19:10 -!- captn [~root@pD9FE33AB.dip.t-dialin.net] has joined #go-nuts
19:13 < str1ngs> ww: hehe I agree
19:13 < str1ngs> ww: I've learned to embrace them
19:16 < niemeyer> ww: Use MongoDB through mgo..  streaming a CD in using the
GridFS interface takes less than 10 seconds.
19:18 < str1ngs> goroutines across processes, is netchan the only option?
19:18 < ww> niemeyer: that may be so, but this is about 80Gb of data that
needs deeply indexed and i'm just rebuilding an existing system not rewriting it
:)
19:18 < niemeyer> ww: Roughly speaking..  80 times 10 seconds is still 80
seconds.
19:19 < niemeyer> Erm..  800 seconds..
19:19 < niemeyer> Which is little more than 10 minutes
19:19 < ww> however GridFS is not deeply indexing
19:20 < niemeyer> ww: I don't know what you mean
19:20 < ww> gridfs is blob storage
19:20 < aiju> i remember grabbing 1 MB (yes 1 MB) from an oracle database
19:20 < aiju> took 10 minutes
19:20 < niemeyer> Yes..  you said "importing 17 large files into a
database"..
19:21 < skelterjohn> aiju: was it on the other end of a few joins?
19:21 < aiju> i have no clue
19:21 < ww> rofl...  well, consider them database dumps :)
19:22 < niemeyer> ww: Ok, I guess "importing large files" is equal to
"millions of unrelated DB operations" in other people's books :-)
19:22 < skelterjohn> "import" is a pretty generic term
19:22 < niemeyer> skelterjohn: "large file" is not
19:23 < ww> ok...  importing database dumps that contain about 10 million
rows each
19:23 < aiju> large file is pretty generifc
19:23 < niemeyer> ww: Understood
19:24 < aiju> i think UNIX V6 defined files exceeding 4 KB as large
19:24 < skelterjohn> oh good - that means that the goroutine memory overhead
isn't large
19:24 < aiju> files exceeding 256 KB would be called huge or so
19:30 -!- tobym [~tobym@cpe-72-229-2-6.nyc.res.rr.com] has joined #go-nuts
19:31 -!- ShadowIce`
[~pyoro@HSI-KBW-109-193-120-162.hsi7.kabel-badenwuerttemberg.de] has joined
#go-nuts
19:31 -!- ShadowIce`
[~pyoro@HSI-KBW-109-193-120-162.hsi7.kabel-badenwuerttemberg.de] has quit
[Changing host]
19:31 -!- ShadowIce` [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
19:31 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Read error:
Connection reset by peer]
19:35 -!- Fish- [~Fish@bus77-2-82-244-150-190.fbx.proxad.net] has joined #go-nuts
19:38 -!- gtaylor [~gtaylor@199.15.144.250] has quit [Quit: gtaylor]
19:42 -!- m4dh4tt3r1 [~Adium@c-98-210-145-213.hsd1.ca.comcast.net] has joined
#go-nuts
19:45 -!- m4dh4tt3r [~Adium@c-98-210-145-213.hsd1.ca.comcast.net] has quit [Ping
timeout: 246 seconds]
19:58 -!- danilo04 [~danilo04@66.44.228.140] has joined #go-nuts
20:05 -!- piranha [~piranha@5ED43A0B.cm-7-5a.dynamic.ziggo.nl] has quit [Quit:
Computer has gone to sleep.]
20:06 < serverhorror_> hey, I don't quite get the []bytes to string and vice
versa conversion.  http://paste.debian.net/117569/ I've looked at strings and
bytes pkg and expected to find something like strings.Bytes or bytes.String I'm a
little confused how I have to properly convert between the 2 types
20:07 -!- krutcha [~krutcha@S010600045a27676a.vs.shawcable.net] has joined
#go-nuts
20:07 < vsmatck> serverhorror_: The correct way is with a cast.  var b
[]byte; s := string(b); b = []byte(s);
20:08 < serverhorror_> I guess that was too obvious to try :( -- thanks
20:09 < vsmatck> serverhorror_: I'm not sure if it's obvious.  I got tripped
up on it when I first started.  Didn't see it in any of the intro docs.
20:09 < aiju> read teh spec
20:09 < serverhorror_> it just reads so simple now that I see it
20:10 < serverhorror_> aiju: reading the spec is fine.  But it's quite a
beast to go thru (IMHO) and not really fun.  I agree with vsmatck it would be nice
to find in the tutorial or at leas in effective go.  Somewhere in the io sections
20:11 -!- danilo04 [~danilo04@66.44.228.140] has quit [Quit: Saliendo]
20:11 < aiju> i'm reading USB spec currently, Go spec is worth a literature
nobel prize compared to that ;P
20:11 < aiju> This section defines the Communications Interface Class
notifications that the device uses to notify the
20:11 < aiju> host of interface, or endpoint events, that are common to
several Communications subclasses.
20:12 < vsmatck> I came from C++ and just assumed I wouldn't be able to
understand the spec.  heh
20:12 < aiju> to quote Pike, "I'm moving to a smaller office and I'm not
sure whether I'll have enough space for the C++ spec"
20:15 < vsmatck> I could never afford a physical copy.  I pirated mine.  I
guess I was planning on buying a copy when I got a job as a professional C++
programmer.  But that doesn't appear to be happening.
20:16 < vsmatck> Professional BASIC programmer here.  :-/
20:16 < aiju> hah
20:17 < aiju> why would one even read language specs in the case of C or C++
20:17 < serverhorror_> ouch, bad idea: implement the json.Marshaler
interface and call json.Marshal(t) from within the MarshalJSON method
20:17 < aiju> what the fuck
20:18 < serverhorror_> worth a try :)
20:18 < krutcha> aiju: usb spec is horrible huh?  :P
20:20 -!- eimantas [~eimantas@ip-212-52-52-163.kava.lt] has quit [Quit: eimantas]
20:20 < aiju> "horrible" is quite an understatement
20:21 < krutcha> hehe tell me about it, I just attempted to write a USB-IF
compliant hub in software
20:21 < rael_wiki> is there a fast way in go to insert debug prints that
will be ignored changing a single variable?  (I mean avoiding the verbose "if
debug {println(...)}")
20:22 < KirkMcDonald> func debug(s string) { if _debug { println(s) } }
20:22 < krutcha> would the go compiler compile that out if it noted that
_debug was never set?
20:23 < rael_wiki> KirkMcDonald: I often have to pass many args to a
println, writing a variadic function to do that is quite boring, there's no other
way?
20:24 < KirkMcDonald> func debug(format string, a ...interface{}) { if
_debug { printf(format, a...) } }
20:24 * KirkMcDonald shrugs.
20:25 -!- twopoint718 [~chris@fsf/member/twopoint718] has joined #go-nuts
20:25 < rael_wiki> whoa!  that's great
20:25 < str1ngs> rael_wiki: https://gist.github.com/984869
20:25 < rael_wiki> I should study go syntax more in depth...
20:25 < str1ngs> err sorry missed KirkMcDonald solution
20:26 < rael_wiki> thanks a lot to both
20:27 * rael_wiki was used to C variadic functions...
20:28 < str1ngs> rael_wiki: also fmt.Println("one",two,"three") is handy
20:29 -!- pothos_ [~pothos@111-240-166-48.dynamic.hinet.net] has joined #go-nuts
20:30 -!- GeertJohan [~Squarc@ip4da06866.direct-adsl.nl] has joined #go-nuts
20:31 -!- pothos [~pothos@111-240-173-34.dynamic.hinet.net] has quit [Ping
timeout: 248 seconds]
20:31 -!- twopoint718 [~chris@fsf/member/twopoint718] has quit [Ping timeout: 276
seconds]
20:31 -!- twopoint718 [~chris@fsf/member/twopoint718] has joined #go-nuts
20:32 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
20:36 -!- rutkowski [~adrian@078088206228.walbrzych.vectranet.pl] has joined
#go-nuts
20:37 -!- rutkowski [~adrian@078088206228.walbrzych.vectranet.pl] has quit [Client
Quit]
20:37 -!- rutkowski [~adrian@078088206228.walbrzych.vectranet.pl] has joined
#go-nuts
20:44 -!- edsrzf [~edsrzf@122-61-221-144.jetstream.xtra.co.nz] has joined #go-nuts
20:55 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Ping timeout: 246
seconds]
21:01 -!- cafesofie [~cafesofie@ool-18e4e057.dyn.optonline.net] has joined
#go-nuts
21:04 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-158-245.clienti.tiscali.it] has
quit [Quit: E se abbasso questa leva che succ...]
21:06 -!- rutkowski [~adrian@078088206228.walbrzych.vectranet.pl] has quit [Quit:
WeeChat 0.3.3-dev]
21:08 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Quit:
skelterjohn]
21:09 -!- cafesofie [~cafesofie@ool-18e4e057.dyn.optonline.net] has quit [Remote
host closed the connection]
21:09 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
21:10 -!- cafesofie [~cafesofie@ool-18e4e057.dyn.optonline.net] has joined
#go-nuts
21:17 -!- Fish- [~Fish@bus77-2-82-244-150-190.fbx.proxad.net] has quit [Quit: So
Long, and Thanks for All the Fish]
21:18 -!- cafesofie [~cafesofie@ool-18e4e057.dyn.optonline.net] has quit [Remote
host closed the connection]
21:29 -!- hargettp [~hargettp@pool-71-174-139-181.bstnma.east.verizon.net] has
quit [Quit: Leaving...]
21:30 -!- rael_wiki [~chatzilla@unaffiliated/rael-wiki/x-8420294] has quit [Quit:
ChatZilla 0.9.86.1 [Iceweasel 3.5.19/20110430164311]]
21:30 -!- krutcha [~krutcha@S010600045a27676a.vs.shawcable.net] has quit [Quit:
Leaving]
21:32 -!- photron [~photron@port-92-201-112-131.dynamic.qsc.de] has quit [Ping
timeout: 246 seconds]
21:42 -!- serverhorror_ [~martin@krlh-5f725eea.pool.mediaWays.net] has quit [Quit:
Leaving]
21:45 -!- captn [~root@pD9FE33AB.dip.t-dialin.net] has left #go-nuts []
21:51 -!- GeertJohan [~Squarc@ip4da06866.direct-adsl.nl] has quit [Quit: Leaving.]
21:51 -!- thomas_b [~thomasb@cm-84.215.47.51.getinternet.no] has quit [Quit:
leaving]
21:56 -!- huin [~huin@91.85.171.238] has quit [Quit: bedtime]
22:05 -!- nteon [~nteon@c-98-210-195-105.hsd1.ca.comcast.net] has quit [Quit:
leaving]
22:07 -!- twopoint718 [~chris@fsf/member/twopoint718] has quit [Quit: Lost
terminal]
22:07 -!- kamaji [~kamaji@cpc2-aztw22-2-0-cust775.aztw.cable.virginmedia.com] has
joined #go-nuts
22:15 < cenuij> aiju: does gofy build on tip?
22:15 < aiju> hahahhahahahaha
22:15 < aiju> not at all
22:15 < aiju> i stopped working on it because it would stop working on every
go update
22:15 < cenuij> heh, ok :D
22:16 < aiju> i even use removed language features
22:19 * cenuij wants to get into toy/hobbyist kernel dev
22:20 < cenuij> it would seem pointless to repeat the excercise in C
22:24 -!- ShadowIce` [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit:
Verlassend]
22:26 -!- foocraft [~ewanas@78.101.237.121] has joined #go-nuts
22:27 < cenuij> aiju: do you think gofix could keep up with the .go parts of
it now?
22:27 < aiju> the .go parts are the smallest problems
22:27 < aiju> gofy has deep runtime hacks
22:28 < cenuij> and as I understand, you limited gofy to x86_64?
22:29 < aiju> yes
22:29 < aiju> design decision
22:32 < aiju>
http://code.google.com/p/gofy/source/browse/kernel/runtime/fbi.c
22:32 < aiju> my favourite part of gofy
22:33 < cenuij> laughing in real life should be a part of every experience
when browsing source ;)
22:35 -!- niemeyer [~niemeyer@200-102-196-125.pltce701.dsl.brasiltelecom.net.br]
has quit [Ping timeout: 240 seconds]
22:37 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has joined
#go-nuts
22:44 < cenuij> aiju: I've an important patch, I hope you'll consider it
22:44 < cenuij> aiju: http://paste.opensuse.org/41403087
22:44 < aiju> hahaha
22:45 -!- jstemmer [~cheetah@mrpwn.stemmertech.com] has quit [Quit: leaving]
22:45 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has quit
[Ping timeout: 260 seconds]
22:46 -!- hallas [~hallas@x1-6-30-46-9a-b2-c5-1f.k891.webspeed.dk] has joined
#go-nuts
22:47 -!- jarsen [~jarsen@76.8.206.21] has joined #go-nuts
22:47 -!- NiteRain [~kvirc@c-98-254-236-21.hsd1.fl.comcast.net] has quit [Read
error: Operation timed out]
22:50 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has joined
#go-nuts
23:00 -!- rlab [~Miranda@91.200.158.34] has quit [Quit: Miranda IM! Smaller,
Faster, Easier.  http://miranda-im.org]
23:14 -!- JoshConrad [~JoshConra@ip68-224-97-4.lv.lv.cox.net] has joined #go-nuts
23:15 -!- JoshConrad [~JoshConra@ip68-224-97-4.lv.lv.cox.net] has quit [Client
Quit]
23:15 -!- JoshConrad [~JoshConra@ip68-224-97-4.lv.lv.cox.net] has joined #go-nuts
23:16 -!- JoshConrad [~JoshConra@ip68-224-97-4.lv.lv.cox.net] has quit [Client
Quit]
23:23 -!- The_Cog [~chatzilla@239.24.187.81.in-addr.arpa] has quit [Quit:
ChatZilla 0.9.86.1 [Firefox 4.0.1/20110413222027]]
23:24 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has joined #go-nuts
23:26 -!- Bigbear1 [~Cody@d173-181-43-12.abhsia.telus.net] has joined #go-nuts
23:26 -!- rcrowley [~rcrowley@c-71-202-44-233.hsd1.ca.comcast.net] has quit [Quit:
Computer has gone to sleep.]
23:27 -!- a2800276 [~a2800276@xdsl-213-196-218-32.netcologne.de] has quit [Ping
timeout: 260 seconds]
23:28 -!- dooder [~nate@c-24-21-241-81.hsd1.or.comcast.net] has joined #go-nuts
23:28 -!- a2800276 [~a2800276@xdsl-78-35-234-174.netcologne.de] has joined
#go-nuts
23:29 < dooder> Hey guys I'm trying get a simple program that has one
goroutine writing to a channel and another one reading off it.  Right now the
program just exits immediately sure I'm doing something dumb but can't figure out
what : http://pastebin.com/xdTK03HP
23:30 < Namegduf> dooder: The program terminates as soon as the main
goroutine terminates
23:30 < Namegduf> You need to make it wait on a channel for notification
from the other goroutines that they're done.
23:32 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has quit
[Ping timeout: 246 seconds]
23:38 -!- oal [~oal@5.79-160-122.customer.lyse.net] has quit [Remote host closed
the connection]
23:41 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has joined
#go-nuts
23:42 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has joined
#go-nuts
23:43 -!- TMKCodes [~TMKCodes@unaffiliated/tmkcodes] has quit [Read error:
Connection reset by peer]
23:44 < dooder> Namegduf : cool.  So I have that working.  Now I need to
figure out how to kill the program after x seconds.  Do you typically have a
master channel that can signal the program should terminate?
23:45 < Namegduf> dooder: It depends on the logic for shutdown you want.
23:45 < Namegduf> If you want it to die after X seconds, use a
time.Sleep(X*1e9)
23:46 < Namegduf> If you want it to stop when some set of goroutines are
done, which is more typical, maintaining a count, having a shutdown channel, and
waiting to receive count messages from the channel before terminating is common.
23:46 < kevlar> If you want to have your program signaled on a channel after
X seconds, use ch := time.After(...)
23:52 -!- jarsen [~jarsen@76.8.206.21] has quit [Remote host closed the
connection]
23:52 -!- jarsen [~jarsen@76.8.206.21] has joined #go-nuts
23:52 -!- jarsen [~jarsen@76.8.206.21] has quit [Remote host closed the
connection]
23:58 < dooder> Namegduf, kevlar : Thanks.  I'll try that out.  Still a
super noob having trouble reading the go apis
--- Log closed Sun May 22 00:00:50 2011