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

--- Log opened Thu Sep 08 00:00:24 2011
00:02 -!- scyth [~scyth@rots.in.rs] has quit [Quit: Leaving]
00:02 -!- franciscosouza [~francisco@187.105.26.180] has quit [Quit:
franciscosouza]
00:12 -!- gobeginner [~nwood@cpc2-lee23-0-0-cust152.7-1.cable.virginmedia.com] has
quit [Ping timeout: 264 seconds]
00:12 -!- adlan [~adlan@110.159.236.17] has quit [Quit: Leaving]
00:15 -!- aat [~aat@cpe-72-225-174-173.nyc.res.rr.com] has joined #go-nuts
00:17 -!- Tv__ [~Tv__@cpe-76-168-227-45.socal.res.rr.com] has joined #go-nuts
00:20 -!- replore [~replore@203.152.213.161.static.zoot.jp] has joined #go-nuts
00:20 -!- c00w [~colin@barh-459.dynamic.rpi.edu] has joined #go-nuts
00:21 -!- odoacre [~antonio@218.241.169.34] has quit [Ping timeout: 252 seconds]
00:24 -!- miker2 [~miker2@pool-71-175-94-30.phlapa.fios.verizon.net] has joined
#go-nuts
00:31 -!- rcrowley [~rcrowley@50-0-18-168.dsl.static.sonic.net] has quit [Quit:
Computer has gone to sleep.]
00:32 -!- Cork[home] [Cork@firefox/community/cork] has quit [Disconnected by
services]
00:32 -!- unCork[home] [Cork@h27n1c1o1042.bredband.skanova.com] has joined
#go-nuts
00:33 -!- lucid_ [~rbl@84-74-139-92.dclient.hispeed.ch] has joined #go-nuts
00:34 -!- lucid [~rbl@84-74-139-92.dclient.hispeed.ch] has quit [Read error:
Operation timed out]
00:34 -!- tux21b [~christoph@cpe90-146-162-55.liwest.at] has joined #go-nuts
00:34 -!- tux21b [~christoph@cpe90-146-162-55.liwest.at] has quit [Client Quit]
00:35 -!- tux21b [~christoph@cpe90-146-162-55.liwest.at] has joined #go-nuts
00:36 -!- odoacre [~antonio@218.241.169.34] has joined #go-nuts
00:36 -!- tux21b [~christoph@cpe90-146-162-55.liwest.at] has quit [Client Quit]
00:36 -!- tux21b [~christoph@cpe90-146-162-55.liwest.at] has joined #go-nuts
00:37 -!- losehole [~Adium@140.109.98.187] has joined #go-nuts
00:42 -!- squeese [~squeese@cm-84.209.17.156.getinternet.no] has quit [Remote host
closed the connection]
00:49 -!- losehole [~Adium@140.109.98.187] has quit [Quit: Leaving.]
00:49 -!- losehole [~Adium@140.109.98.187] has joined #go-nuts
00:54 -!- dustyw [~dustyw@c-98-247-248-194.hsd1.wa.comcast.net] has quit [Remote
host closed the connection]
01:13 -!- ericvh [~Adium@cpe-72-177-122-77.austin.res.rr.com] has quit [Quit:
Leaving.]
01:14 -!- ajzeneski [~jaz@cpe-68-173-252-59.nyc.res.rr.com] has joined #go-nuts
01:15 -!- ajzeneski [~jaz@cpe-68-173-252-59.nyc.res.rr.com] has left #go-nuts []
01:16 -!- ericvh [~Adium@cpe-72-177-122-77.austin.res.rr.com] has joined #go-nuts
01:35 -!- dfr|sanbruno [~dfr|work@nat/google/x-wkxjjpkjlkeohjeh] has quit [Ping
timeout: 264 seconds]
01:40 -!- thrashr888 [~thrashr88@64.125.143.6] has quit [Quit: thrashr888]
01:48 -!- rcrowley [~rcrowley@c-71-202-44-233.hsd1.ca.comcast.net] has joined
#go-nuts
01:52 -!- rcrowley [~rcrowley@c-71-202-44-233.hsd1.ca.comcast.net] has quit
[Client Quit]
01:54 -!- xulfer [~xulfer@ipv6.cheapbsd.net] has quit [Quit: quitting]
01:54 -!- xulfer [~xulfer@ipv6.cheapbsd.net] has joined #go-nuts
01:55 -!- flaguy48 [~gmallard@user-0c6s350.cable.mindspring.com] has left #go-nuts
[]
01:56 -!- rcrowley [~rcrowley@c-71-202-44-233.hsd1.ca.comcast.net] has joined
#go-nuts
01:58 -!- miker2 [~miker2@pool-71-175-94-30.phlapa.fios.verizon.net] has quit
[Quit: Computer has gone to sleep.]
02:02 -!- _panic_ [~jaz@cpe-68-173-252-59.nyc.res.rr.com] has joined #go-nuts
02:04 -!- paprikas [~mac@FL1-122-131-71-217.hrs.mesh.ad.jp] has joined #go-nuts
02:04 -!- paprikas [~mac@FL1-122-131-71-217.hrs.mesh.ad.jp] has quit [Client Quit]
02:05 -!- rcrowley [~rcrowley@c-71-202-44-233.hsd1.ca.comcast.net] has quit [Quit:
Computer has gone to sleep.]
02:10 -!- _panic_ [~jaz@cpe-68-173-252-59.nyc.res.rr.com] has quit [Quit: leaving]
02:13 -!- MX80 [~MX80@cust151.253.117.74.dsl.g3telecom.net] has joined #go-nuts
02:14 -!- qeed [~qeed@adsl-98-85-43-115.mco.bellsouth.net] has quit [Quit:
Leaving]
02:14 -!- _panic [~irc@cpe-68-173-252-59.nyc.res.rr.com] has joined #go-nuts
02:17 -!- sl [none@phoenix.inri.net] has quit [Remote host closed the connection]
02:18 -!- sl [none@ks363729.kimsufi.com] has joined #go-nuts
02:22 -!- _panic [~irc@cpe-68-173-252-59.nyc.res.rr.com] has left #go-nuts []
02:39 -!- _panic [~irc@cpe-68-173-252-59.nyc.res.rr.com] has joined #go-nuts
02:40 -!- dfr|sanbruno [~dfr|work@c-69-181-71-244.hsd1.ca.comcast.net] has joined
#go-nuts
02:41 -!- ericvh [~Adium@cpe-72-177-122-77.austin.res.rr.com] has quit [Quit:
Leaving.]
02:41 -!- c00w [~colin@barh-459.dynamic.rpi.edu] has quit [Quit: Ex-Chat]
02:44 -!- zeebo [~zeebo@ip72-218-115-129.hr.hr.cox.net] has joined #go-nuts
02:57 -!- ericvh [~Adium@cpe-72-177-122-77.austin.res.rr.com] has joined #go-nuts
02:58 -!- ericvh [~Adium@cpe-72-177-122-77.austin.res.rr.com] has quit [Client
Quit]
03:13 -!- rcrowley [~rcrowley@c-71-202-44-233.hsd1.ca.comcast.net] has joined
#go-nuts
03:28 -!- NiteRain [~NiteRain@c-98-254-236-21.hsd1.fl.comcast.net] has quit [Ping
timeout: 258 seconds]
03:32 -!- _panic [~irc@cpe-68-173-252-59.nyc.res.rr.com] has quit [Quit: leaving]
03:43 -!- Rakko [~rakko@96-42-31-132.dhcp.mdsn.wi.charter.com] has joined #go-nuts
03:44 < Rakko> this channel has the hardest-to-find name
04:05 -!- GoTest [~gotest@184.95.57.99] has joined #go-nuts
04:05 -!- GoTest [~gotest@184.95.57.99] has quit [Remote host closed the
connection]
04:09 < f2f> Rakko: no it doesn't.
04:09 < f2f> it's splattered all over the documentation :)
04:10 -!- benjack [~benjack@bb116-15-174-30.singnet.com.sg] has joined #go-nuts
04:12 < f2f> russ discussed union interfaces in the mailing list.
04:14 < Rakko> ah...  I haven't read the docs or learned the language yet
04:14 -!- BizarreCake [~BizarreCa@IGLD-84-228-60-55.inter.net.il] has joined
#go-nuts
04:15 -!- BizarreCake [~BizarreCa@IGLD-84-228-60-55.inter.net.il] has quit [Client
Quit]
04:16 -!- BizarreCake [~BizarreCa@IGLD-84-228-60-55.inter.net.il] has joined
#go-nuts
04:19 -!- niemeyer [~niemeyer@200.102.220.181] has quit [Ping timeout: 240
seconds]
04:21 < prudhvi> what is golang approach for writing a job dispatcher in a
distributed scenario.  netchans ?
04:22 < f2f> or simple rpc?
04:22 < prudhvi> which one is prefered?
04:22 < f2f> i use json with my own rpc
04:22 < f2f> i don't think one is
04:23 < prudhvi> ok
04:24 < f2f> i don't know how general netchans are, especially when dealing
with outages -- can you reconnect and establish a new netchan with the remote site
if it goes away and back again?
04:25 < f2f> also, there seemed to be a few issues with netchans that were
fixed recently.  i don't know how stable they are
04:28 < prudhvi> ok
04:28 -!- bemasher [~bemasher@host-69-146-93-159.lar-wy.client.bresnan.net] has
joined #go-nuts
04:28 -!- cbeck [cbeck@gateway/shell/pdx.edu/x-xrejzprpezahvobm] has quit [Read
error: Connection reset by peer]
04:28 < prudhvi> i think rpc approach is much simpler
04:29 < bemasher> is there a good way to read binary data that isn't byte
aligned in go?
04:29 -!- cbeck [cbeck@gateway/shell/pdx.edu/x-zaaynsrceociydcf] has joined
#go-nuts
04:29 < bemasher> i have some data that is specified in odd numbers of
nibbles...
04:29 -!- thrashr888 [~thrashr88@adsl-99-71-196-46.dsl.pltn13.sbcglobal.net] has
joined #go-nuts
04:30 -!- thrashr888 [~thrashr88@adsl-99-71-196-46.dsl.pltn13.sbcglobal.net] has
quit [Client Quit]
04:31 -!- ericvh [~Adium@cpe-72-177-122-77.austin.res.rr.com] has joined #go-nuts
04:34 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
04:37 < bemasher> ah, nvm
04:37 < bemasher> i think i've figured out what i need to do
04:40 < uriel> 20:01 < NfNitLoop> Is there a way to import things so
that they're accessible without a namespace/package prefix?
04:40 < uriel> 20:01 < qeed> yeah use .
04:40 < uriel> 20:01 < rsesek> import . "package"
http://golang.org/doc/go_spec.html#Import_declarations
04:40 < uriel> don't do this
04:40 -!- dreadlorde [dreadlorde@c-68-42-82-10.hsd1.mi.comcast.net] has quit [Ping
timeout: 260 seconds]
04:41 -!- wallerdev [~wallerdev@72.44.102.30] has joined #go-nuts
04:49 -!- franciscosouza [~francisco@187.105.26.180] has joined #go-nuts
04:49 -!- aat [~aat@cpe-72-225-174-173.nyc.res.rr.com] has quit [Quit: Computer
has gone to sleep.]
04:53 < uriel> it is (very bad) style
04:54 -!- fossil-njv [~nigel@62.225.38.155] has quit [Quit: Konversation
terminated!]
04:56 -!- fossil-njv [~nigel@62.225.38.155] has joined #go-nuts
05:02 -!- fabled [~fabled@83.145.235.194] has joined #go-nuts
05:03 -!- homa_rano [~ede@30-51-226.dynamic.csail.mit.edu] has quit [Ping timeout:
260 seconds]
05:03 -!- homa_rano [~ede@30-51-226.dynamic.csail.mit.edu] has joined #go-nuts
05:05 < f2f> in many ways go is like a university exam where calculators are
disallowed.  sure, you'd like to have a graphing calculator to do all your
calculations, but it's much easier for the examiner to check your test if you
showed your work in the sidelines :)
05:05 < f2f> and, of course, everybody is bitching that they can't use a
graphing calculator even if all they're doing is some basic multiplication and
division :)
05:07 -!- alexluya [~alexluya@111.186.5.87] has joined #go-nuts
05:11 -!- franciscosouza [~francisco@187.105.26.180] has quit [Read error:
Connection reset by peer]
05:13 -!- franciscosouza [~francisco@187.105.26.180] has joined #go-nuts
05:14 -!- BizarreCake [~BizarreCa@IGLD-84-228-60-55.inter.net.il] has quit [Remote
host closed the connection]
05:15 -!- ericvh [~Adium@cpe-72-177-122-77.austin.res.rr.com] has quit [Quit:
Leaving.]
05:19 -!- Rakko [~rakko@96-42-31-132.dhcp.mdsn.wi.charter.com] has quit [Quit:
Leaving]
05:22 -!- Tv__ [~Tv__@cpe-76-168-227-45.socal.res.rr.com] has quit [Quit: Tv__]
05:34 -!- goraes [~goraes@189.103.177.124] has joined #go-nuts
05:38 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
05:39 -!- rcrowley [~rcrowley@c-71-202-44-233.hsd1.ca.comcast.net] has quit [Quit:
Computer has gone to sleep.]
05:49 -!- vegai [v@178.79.146.25] has quit [Changing host]
05:49 -!- vegai [v@archlinux/developer/vegai] has joined #go-nuts
06:16 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 264 seconds]
06:20 -!- vmil86 [~vmil86@88.118.38.213] has joined #go-nuts
06:22 -!- gobeginner [~nwood@cpc2-lee23-0-0-cust152.7-1.cable.virginmedia.com] has
joined #go-nuts
06:25 -!- remy_o [~babar@archlinux/developer/remy-o] has joined #go-nuts
06:31 -!- noodles775 [~michael@91.189.93.65] has joined #go-nuts
06:31 -!- noodles775 [~michael@91.189.93.65] has quit [Changing host]
06:31 -!- noodles775 [~michael@canonical/launchpad/noodles775] has joined #go-nuts
06:34 -!- wallerdev [~wallerdev@72.44.102.30] has quit [Quit: wallerdev]
06:34 -!- gobeginner [~nwood@cpc2-lee23-0-0-cust152.7-1.cable.virginmedia.com] has
quit [Ping timeout: 264 seconds]
06:44 -!- TheSeeker [riiight@99-153-248-206.lightspeed.irvnca.sbcglobal.net] has
quit [Ping timeout: 260 seconds]
06:48 < f2f> that djangocon keynote must've been really something.  uriel,
find the video, please :)
06:48 -!- kergoth [~kergoth@ip24-251-167-38.ph.ph.cox.net] has quit [Quit:
Leaving...]
06:52 -!- TheSeeker [riiight@99-153-248-206.lightspeed.irvnca.sbcglobal.net] has
joined #go-nuts
06:53 -!- TheSeeker [riiight@99-153-248-206.lightspeed.irvnca.sbcglobal.net] has
left #go-nuts []
06:53 -!- TheSeeker [riiight@99-153-248-206.lightspeed.irvnca.sbcglobal.net] has
joined #go-nuts
06:56 -!- remy_o [~babar@archlinux/developer/remy-o] has quit [Ping timeout: 245
seconds]
07:00 -!- GeertJohan [~geertjoha@s51478c91.adsl.wanadoo.nl] has joined #go-nuts
07:04 -!- mavar [~mavar@188.92.169.90] has joined #go-nuts
07:07 < goraes> what was the keynote about?
07:15 < f2f> http://bradfitz.com/talks/2011-09-Djangocon/#1
07:15 < f2f> but the caveat is that it doesn't make sense without the video
07:16 < f2f> people seem to have liked it a lot:
http://twitter.com/#!/tehjones/status/111498936786747392
07:16 < goraes> "Itch Scratching"
07:16 < goraes> yeah saw on his g+
07:19 < goraes> yeah must be interesting
07:19 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
07:23 < f2f> g+ is where i got it from
07:23 < goraes> "every piece of software you touch will generate email for
life"
07:24 < f2f> just alerting uriel here, who'll fish the video out as soon as
it's posted :)
07:24 < f2f> goraes: i have to agree with that :)
07:24 < goraes> seeing the slides only now
07:24 < f2f> i get stuff for code i've written 10 years ago
07:24 < goraes> yeah i know.
07:25 < goraes> i didn't code 10 years ago but i get reports and requests
for old stuff.
07:25 < goraes> and want to answer "please don't use that anymore", or "you
wrote to the wrong rodrigo moraes"
07:26 < f2f> > While running in Visual studio
07:26 < f2f> > i got this error water-tex.rgb was not found.
07:26 < f2f> >
07:26 < f2f> > Please help me sir
07:26 < f2f> > It wil be very useful to proceed further..
07:26 < f2f> > waiting for your reply
07:26 < f2f> :)
07:26 < goraes> hehe
07:27 < goraes> its funny that brad is involved with go
07:27 < f2f> see slide 91
07:28 < f2f> i was thinking of that
07:28 < f2f> re: involvement with go
07:28 < f2f> and i came to the conclusion that brad simply wants to write
the most software with the least amount of effort :)
07:29 < f2f> granted, i don't know him personally.  that's just from what i
hear about the person and the trail he leaves on teh intertubes :)
07:29 < goraes> :)
07:29 < goraes> i mean, i've seen he involved with a variety of projects
07:29 < goraes> like pubsubhubbub, and perl stuff, and etc
07:30 < goraes> i like go's http.  it is mainly his child?
07:30 < goraes> it was lacking, still lacks stuff but it is evolving.
07:30 < f2f> i don't think so.  http was there from the first release
07:31 < f2f> but a lot of his improvements went in
07:31 < f2f> go's strength is in its http :)
07:31 < f2f> be it server or client
07:31 < goraes> i like the opportunity to not get into the framework mess of
other languages with a solid http package
07:31 < f2f> and a lot of that is because people like brad were early
adopters
07:32 < goraes> "request and response abstractions built in"
07:33 < f2f> off to bed now.  that video should be fun, even if not go
related
07:34 < goraes> noooo
07:34 < goraes> the channel will be quiet
07:35 < goraes> why sleep?  really, you think you need that?  you're wrong.
07:35 < goraes> ok.  good night.
07:40 < goraes> uriel, changed license, sir.
07:41 < goraes> and btw, finished sessions.  dude, its sweet, i think.
"Package gorilla/sessions provides cookie sessions and infrastructure for custom
session backends."
07:41 < goraes> now, docs and more tests.
07:44 -!- napsy [~luka@193.2.66.6] has joined #go-nuts
07:44 -!- photron [~photron@port-92-201-16-53.dynamic.qsc.de] has joined #go-nuts
07:52 -!- TimKack [~tkack@213.208.236.186] has joined #go-nuts
07:57 -!- arun_ [~arun@unaffiliated/sindian] has joined #go-nuts
08:00 -!- foocraft [foocraft@ibawizard.net] has quit [Read error: Connection reset
by peer]
08:01 -!- foocraft [foocraft@ibawizard.net] has joined #go-nuts
08:08 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
08:10 -!- benjack [~benjack@bb116-15-174-30.singnet.com.sg] has quit [Quit:
Leaving.]
08:12 -!- smw [~stephen@unaffiliated/smw] has quit [Ping timeout: 276 seconds]
08:16 -!- smw [~stephen@unaffiliated/smw] has joined #go-nuts
08:16 -!- pyrhho [~pyrhho@host-92-27-75-48.static.as13285.net] has joined #go-nuts
08:19 -!- meling [~meling@134.81-167-41.customer.lyse.net] has quit [Remote host
closed the connection]
08:21 -!- smw [~stephen@unaffiliated/smw] has quit [Ping timeout: 258 seconds]
08:25 -!- dfr|sanbruno [~dfr|work@c-69-181-71-244.hsd1.ca.comcast.net] has quit
[Remote host closed the connection]
08:27 -!- erus` [~chatzilla@mailgate.ips-international.com] has joined #go-nuts
08:29 -!- marcux [~marco@189.121.104.181] has joined #go-nuts
08:29 -!- sahid [~sahid@LNeuilly-152-21-22-10.w193-253.abo.wanadoo.fr] has quit
[Read error: Operation timed out]
08:31 -!- gobeginner [~nwood@84-93-217-24.plus.net] has joined #go-nuts
08:32 -!- preflex_ [~preflex@unaffiliated/mauke/bot/preflex] has joined #go-nuts
08:33 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has quit [Ping
timeout: 245 seconds]
08:34 -!- kamaji [~kamaji@handtomouse.demon.co.uk] has quit [Read error:
Connection reset by peer]
08:34 < goraes> r60 is out.
08:34 -!- kamaji [~kamaji@handtomouse.demon.co.uk] has joined #go-nuts
08:43 -!- hnry [576c1698@gateway/web/freenode/ip.87.108.22.152] has joined
#go-nuts
08:45 < vegai> yay!
08:48 -!- BigBlackDog
[~BigBlackD@HSI-KBW-109-192-007-188.hsi6.kabel-badenwuerttemberg.de] has joined
#go-nuts
08:49 -!- voegelas
[~voegelas@HSI-KBW-109-192-051-187.hsi6.kabel-badenwuerttemberg.de] has joined
#go-nuts
08:50 -!- hnry [576c1698@gateway/web/freenode/ip.87.108.22.152] has quit [Ping
timeout: 252 seconds]
08:52 < zozoR> this itch scratching slideshow is..  weird?  o.o
08:53 < vegai> seems to require the actual presentation to be useful
08:55 < Gertm> cd ..
08:55 < Gertm> arr wrong terminal
08:58 < goraes> it gives you an idea that he is talking about development
and/or maintaining open source projects
08:58 < goraes> i know what he is talking about guilty
08:59 < goraes> want to watch that presentation too
09:00 -!- sahid [~sahid@LNeuilly-152-21-22-10.w193-253.abo.wanadoo.fr] has joined
#go-nuts
09:01 < gobeginner> goraes: what are you looking at?  (only just joined the
channel)
09:02 < goraes> brad's presentation at djangocon received lots of praise:
http://bradfitz.com/talks/2011-09-Djangocon/#1
09:02 < goraes> gobeginner, ^
09:02 < gobeginner> thanks
09:03 < goraes> but video is needed
09:06 -!- bemasher [~bemasher@host-69-146-93-159.lar-wy.client.bresnan.net] has
quit [Read error: Connection reset by peer]
09:15 -!- hutuworm [~Administr@205.204.113.251] has joined #go-nuts
09:17 -!- alexluya [~alexluya@111.186.5.87] has quit [Quit: Leaving]
09:18 -!- replore [~replore@203.152.213.161.static.zoot.jp] has quit [Read error:
Connection reset by peer]
09:18 -!- yogib [~yogib@131.234.59.64] has joined #go-nuts
09:33 -!- nekoh [~nekoh@dslb-178-004-068-194.pools.arcor-ip.net] has joined
#go-nuts
09:37 < jnwhiteh> can you test for deadlock using defer/recover?
09:39 < jessta> jnwhiteh: maybe, but it seems unlikely.  which goroutine
should the panic go to?
09:39 < jnwhiteh> that was my thought, just wanted a sanity check =)
09:39 < jnwhiteh> it wouldn't really work :P
09:47 -!- tvw [~tv@212.79.9.150] has joined #go-nuts
10:01 -!- tux21b [~christoph@cpe90-146-162-55.liwest.at] has quit [Remote host
closed the connection]
10:03 -!- tux21b [~christoph@cpe90-146-162-55.liwest.at] has joined #go-nuts
10:11 -!- tux21b [~christoph@cpe90-146-162-55.liwest.at] has quit [Remote host
closed the connection]
10:12 -!- voegelas
[~voegelas@HSI-KBW-109-192-051-187.hsi6.kabel-badenwuerttemberg.de] has quit
[Quit: Leaving.]
10:16 -!- BizarreCake [~BizarreCa@IGLD-84-228-60-55.inter.net.il] has joined
#go-nuts
10:16 -!- BizarreCake [~BizarreCa@IGLD-84-228-60-55.inter.net.il] has quit [Client
Quit]
10:16 -!- BizarreCake [~BizarreCa@IGLD-84-228-60-55.inter.net.il] has joined
#go-nuts
10:17 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
10:20 -!- avelino [~avelino@unaffiliated/avelino] has joined #go-nuts
10:22 -!- napsy [~luka@193.2.66.6] has quit [Ping timeout: 264 seconds]
10:22 -!- pbgc [~pbgc@bl20-102-248.dsl.telepac.pt] has joined #go-nuts
10:29 -!- tjyang__ [~tjyang@c-71-201-81-103.hsd1.il.comcast.net] has joined
#go-nuts
10:31 -!- napsy [~luka@193.2.66.6] has joined #go-nuts
10:32 -!- tjyang_ [~tjyang@c-67-175-235-146.hsd1.il.comcast.net] has quit [Ping
timeout: 260 seconds]
10:35 -!- aat [~aat@cpe-72-225-174-173.nyc.res.rr.com] has joined #go-nuts
10:36 -!- zcram [~zcram@8.177.190.90.sta.estpak.ee] has joined #go-nuts
10:36 -!- aat [~aat@cpe-72-225-174-173.nyc.res.rr.com] has quit [Client Quit]
10:36 -!- replore [~replore@ntkngw133234.kngw.nt.ftth.ppp.infoweb.ne.jp] has
joined #go-nuts
10:37 -!- zcram [~zcram@8.177.190.90.sta.estpak.ee] has quit [Client Quit]
10:38 < goraes> i should have read this long long ago
http://golang.org/doc/go_faq.html#Pointers
10:51 -!- hutuworm [~Administr@205.204.113.251] has quit [Ping timeout: 245
seconds]
10:58 -!- niemeyer [~niemeyer@200-102-220-181.pltce701.dsl.brasiltelecom.net.br]
has joined #go-nuts
10:58 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has joined
#go-nuts
11:03 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has quit [Ping
timeout: 276 seconds]
11:08 -!- photron [~photron@port-92-201-16-53.dynamic.qsc.de] has quit [Ping
timeout: 276 seconds]
11:10 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.5]
11:14 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
11:24 -!- NiteRain [~NiteRain@c-98-254-236-21.hsd1.fl.comcast.net] has joined
#go-nuts
11:27 < jlaffaye> how would you ensure that a item in a slice does not exist
before appending?
11:27 < jlaffaye> maps seems too much for tthat
11:27 < goraes> check first
11:28 < jlaffaye> with O(n) ?
11:29 < goraes> if it matters you can use bnary search:
http://golang.org/pkg/sort/#Search
11:29 < goraes> *binary
11:30 < goraes> then it must be sorted.  meh.
11:31 -!- replore [~replore@ntkngw133234.kngw.nt.ftth.ppp.infoweb.ne.jp] has quit
[Remote host closed the connection]
11:31 -!- stalled [~stalled@unaffiliated/stalled] has quit [Ping timeout: 252
seconds]
11:33 -!- marcux [~marco@189.121.104.181] has quit [Quit: marcux]
11:37 < goraes> I FINALLY UNDERSTAND WHEN EXACTLY I SHOULD PASS OR RETURN
POINTERS OR VALUES.
11:38 < jlaffaye> good for you ;)
11:38 < goraes> :P
11:40 -!- TimKack [~tkack@213.208.236.186] has quit [Read error: Connection reset
by peer]
11:46 -!- TimKack [~tkack@213.208.236.186] has joined #go-nuts
11:49 < valentin> and the answer is ?
11:50 < dmg> what's the amoritized runtime of append for a slice?
11:50 -!- hutuworm [~Administr@115.200.252.184] has joined #go-nuts
11:51 -!- meling [~meling@pico.ux.uis.no] has joined #go-nuts
11:51 -!- stalled [~stalled@unaffiliated/stalled] has joined #go-nuts
11:51 -!- tncardoso [~thiago@189.59.185.205.dynamic.adsl.gvt.net.br] has joined
#go-nuts
11:52 < dmg> as in, is doing something like for { l := b.ReadString('\t');
sli=append(sli, l); } incredibly stupid?
11:53 < valentin> looks normal
11:54 < valentin> (if sli is a []T and string is assignable to T)
11:55 < dmg> valentin: ok, thanks.
11:56 < valentin> for further info, take a look at
http://golang.org/doc/effective_go.html#append
11:57 < dmg> valentin: yeah, I read that..  I just wasn't sure of how long
the append operation would take on average.
11:57 < dmg> Kind of the like string concatenation vs.  stringbuffer append
in java.
11:58 < valentin> i think its comparable to a java.util.ArrayList#add
implementation
11:59 < goraes> i understand that you should not worry until you really have
to worry.  slice operations are fast.
12:02 < valentin> and in this case, a naive "optimization" is to allocate an
underlying sting array large enough to contain all your strings, so append don't
need to reallocate (which is allways ~expensive~)
12:03 < goraes> or allocate batches.
12:03 < dmg> I don't know how many string items I'm going to have -- they're
coming in from stdin..  (if I knew in advance, I'd use sli[i] = l; i++ )
12:03 < goraes> allocate, say, 100, then drop in the end
12:03 < goraes> if that makes sense
12:04 < dmg> Assuming array expansions happen with a sane schedule, I'll
just use the append() version for now and optimize it it becomes apparent that its
a bottleneck.
12:04 < valentin> SGTM
12:04 < dmg> However, seeing as this is the input mangling for a map/reduce
processor, it seems unlikely.
12:15 -!- sebastianskejoe [~sebastian@56345a20.rev.stofanet.dk] has joined
#go-nuts
12:15 -!- miker2 [~miker2@64.55.31.190] has joined #go-nuts
12:20 < goraes> valentin, does this look ok to you?
http://gorilla-web.appspot.com/src/pkg/gorilla/sessions/sessions.go?s=3999:4051#L103
12:21 < valentin> GenerateSessionId ?
12:21 < goraes> yes
12:21 -!- hutuworm1 [~Administr@74.82.1.19] has joined #go-nuts
12:22 < goraes> seems pretty trivial, but i'm afraid to be missing something
12:22 -!- hutuworm [~Administr@115.200.252.184] has quit [Ping timeout: 240
seconds]
12:23 < valentin> is your random generator guaranteed to have a(very) long
period ?
12:24 < goraes> its crypto/rand, so it is provided by the system
12:24 < goraes> if that is what you're asking
12:24 < valentin> (detail, i'd rather use strconv.Itob(id, 16))
12:24 < goraes> ah ok
12:24 < valentin> (instead of fmt.Sprintf)
12:24 < goraes> ok, will use that thanks
12:24 < valentin> (and check that bytes >= 0)
12:25 < goraes> assert bytes > 0, panic("bummer.")
12:25 -!- meling [~meling@pico.ux.uis.no] has quit [Remote host closed the
connection]
12:26 < valentin> it will panic anyway, i'd rather return an error
12:28 < goraes> i don't get strconv names
12:28 < goraes> Itob?
12:28 < goraes> wtf.
12:29 < jessta> they come from C
12:29 -!- Argue [~Argue@112.201.172.5] has joined #go-nuts
12:29 < goraes> ah
12:30 < jessta> I guess it could have been Itoab() but that probably
woulnd't have help in readabilty
12:30 < exch> Does go perform automatic rearranging of struct fields for
padding?
12:31 < jessta> IntegerToStringWithBase()
12:36 < exch> nvm, it does
12:40 -!- franciscosouza [~francisco@187.105.26.180] has quit [Quit:
franciscosouza]
12:40 < goraes> FromIntWithBase()
12:51 -!- hutuworm1 [~Administr@74.82.1.19] has left #go-nuts []
12:56 -!- hnry [50dd2595@gateway/web/freenode/ip.80.221.37.149] has joined
#go-nuts
12:58 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.5]
12:58 -!- napsy [~luka@193.2.66.6] has quit [Ping timeout: 258 seconds]
12:59 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
13:03 -!- tux21b [~christoph@cpe90-146-162-55.liwest.at] has joined #go-nuts
13:04 -!- cr3 [~cr3@64.34.151.178] has joined #go-nuts
13:07 -!- Netsplit *.net <-> *.split quits: araujo, kkress, sl, brett,
jstemmer, cnuke, suiside, tdnrad, kamaji, zaero, (+32 more, use /NETSPLIT to show
all of them)
13:07 -!- Netsplit over, joins: prasmussen
13:08 -!- Netsplit over, joins: Soultaker, joshbaptiste, tdnrad
13:08 -!- Netsplit over, joins: foocraft, suiside, btipling, hokapoka, kkress,
lmnop
13:08 -!- Netsplit over, joins: noam
13:08 -!- jlaffaye [~jlaffaye@abydos.jlaffaye.net] has joined #go-nuts
13:08 -!- Netsplit over, joins: kamaji, muke, fluffle
13:08 -!- Netsplit over, joins: Archwyrm
13:08 -!- Netsplit over, joins: prudhvi
13:08 -!- noodles775 [~michael@91.189.93.65] has joined #go-nuts
13:08 -!- Netsplit over, joins: reggna
13:08 -!- noodles775 [~michael@91.189.93.65] has quit [Changing host]
13:08 -!- noodles775 [~michael@canonical/launchpad/noodles775] has joined #go-nuts
13:08 -!- Netsplit over, joins: cnuke
13:08 -!- exch [~blbl@ip34-181-209-87.adsl2.static.versatel.nl] has joined
#go-nuts
13:08 -!- Netsplit over, joins: NiteRain, djbrown
13:08 -!- Netsplit over, joins: yugui_zzz, xyproto
13:08 -!- coffeejunk [~max@78.47.62.58] has joined #go-nuts
13:08 -!- ericvh [~Adium@cpe-72-177-122-77.austin.res.rr.com] has joined #go-nuts
13:08 -!- zaero [~eclark@2001:470:1f11:b82:21e:c9ff:fe53:1f03] has joined #go-nuts
13:08 -!- Netsplit over, joins: brett
13:09 -!- Xenith [~xenith@2001:470:1:25f::1001] has joined #go-nuts
13:09 -!- Netsplit over, joins: serialhex
13:09 -!- Netsplit over, joins: araujo
13:09 -!- xulfer [~xulfer@2600:3c01::f03c:91ff:fe96:c1cd] has joined #go-nuts
13:10 -!- r_linux [~r_linux@static.200.198.180.250.datacenter1.com.br] has joined
#go-nuts
13:12 -!- hnry [50dd2595@gateway/web/freenode/ip.80.221.37.149] has quit [Ping
timeout: 252 seconds]
13:13 -!- Boney [~paul@124-148-184-56.dyn.iinet.net.au] has joined #go-nuts
13:17 -!- grncdr [~stephen@sdo.csc.UVic.CA] has joined #go-nuts
13:19 -!- valentin [~valentin@darkstar2.fullsix.com] has joined #go-nuts
13:19 -!- niemeyer [~niemeyer@200-102-220-181.pltce701.dsl.brasiltelecom.net.br]
has joined #go-nuts
13:21 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
13:22 -!- jstemmer [~cheetah@mrpwn.stemmertech.com] has joined #go-nuts
13:25 -!- icebrain [~icebrain@co3-84-90-63-109.netvisao.pt] has joined #go-nuts
13:25 -!- dreadlorde [~dreadlord@141.217.140.71] has joined #go-nuts
13:30 -!- rcrowley [~rcrowley@c-71-202-44-233.hsd1.ca.comcast.net] has joined
#go-nuts
13:31 -!- miker2 [~miker2@64.55.31.190] has quit [Quit: Computer has gone to
sleep.]
13:33 -!- miker2 [~miker2@64.55.31.190] has joined #go-nuts
13:33 -!- miker2 [~miker2@64.55.31.190] has quit [Client Quit]
13:37 -!- miker2 [~miker2@64.55.31.190] has joined #go-nuts
13:41 -!- taos [~Taos@host-92-20-189-254.as13285.net] has joined #go-nuts
13:41 < taos> is there a recursion limit in go?
13:41 -!- rcrowley [~rcrowley@c-71-202-44-233.hsd1.ca.comcast.net] has quit [Quit:
Computer has gone to sleep.]
13:41 -!- GeertJohan [~geertjoha@s51478c91.adsl.wanadoo.nl] has quit [Quit:
Leaving.]
13:42 < erus`> yep
13:42 < erus`> a stack overflow
13:43 < Namegduf> Running out of memory
13:43 < erus`> they dont want tail recursion because its harder to debug
13:43 < Namegduf> Go can't stack overflow per se
13:43 < Namegduf> Because it grows its stack dynamically
13:43 < Namegduf> But you can run out of memory.
13:44 < nsf> yes, no recursion limits, just your memory
13:46 < zozoR> you might want to try it
13:46 < zozoR> looks awesome on your memory bar when go goes OM NOM NOM
13:46 < zozoR> :D
13:46 -!- replore_ [~replore@ntkngw133234.kngw.nt.ftth.ppp.infoweb.ne.jp] has
joined #go-nuts
13:46 -!- goraes [~goraes@189.103.177.124] has quit [Remote host closed the
connection]
13:47 < nsf> well, I don't suggest to try it
13:47 < nsf> at least without setting ulimits
13:47 < nsf> because it's linux, the world of crappy software
13:48 < nsf> most apps will just die on out of memory condition
13:48 < nsf> :)
13:48 < Tonnerre> Or be OOM killed
13:48 < zozoR> hehe
13:48 < Namegduf> Nah
13:48 < Namegduf> If you actually OOM, you're good.
13:48 < zozoR> you should be ready to kill it
13:48 < zozoR> :P
13:48 < Namegduf> The app eating the most memory (or whose children are)
will die.
13:48 < nsf> I had few inf recursion bugs
13:48 < Namegduf> The problem is swap.
13:48 < nsf> and my desktop started to die slowly :D
13:49 < nsf> one app after another :D
13:49 < Namegduf> Yeah
13:49 < Namegduf> Weird
13:49 < nsf> swap, yes
13:49 < nsf> if you have swap it's actually good
13:49 < Namegduf> No, if you have swap it's bad.
13:49 < Namegduf> If you hit swap from something going into an infinite loop
13:49 < nsf> because your OS starts to swapping and becomes unresponsive
13:49 < nsf> but, you have time to kill go app
13:49 < Namegduf> It won't be stopped until you run out of swap, which can
take literally hours.
13:49 < nsf> before other apps start dying :D
13:50 < Namegduf> Hah
13:50 < Namegduf> If it's responsive enough to manage.
13:50 < jlaffaye> hit the power button!
13:50 < Namegduf> Something is wrong if the Go app isn't what is dying,
though.
13:50 < nsf> well, you have to be patient :D
13:50 < Namegduf> The OOM killer's algorithm is fairly well defined and
looks solid
13:50 < Namegduf> Unless the app is somehow being ignored, or other apps
being given a boosted priority for killing...
13:51 < jlaffaye> it will probably kill firefox first ;p
13:51 < Namegduf> Well, if most of your memory is currently running desktop
apps, yeah, they might well be picked first.
13:52 < gmilleramilar> nsf: are you working on Go stuff again (I thought you
had stopped a while back)
13:52 < nsf> gmilleramilar: I write some gocode stuff, yes
13:52 < nsf> mainly there is a bug in syscall.StartProcess on windows
13:52 < gmilleramilar> cool.
13:52 < nsf> I want to raise that issue on the ML soon
13:53 < gmilleramilar> My version is a bit out of date, but it keeps
chugging along...
13:53 < nsf> plus I rewrote packages parser for gocode recently
13:53 < nsf> well
13:53 < nsf> I copy & pasted it
13:53 < nsf> from Go lib :D
13:53 < gmilleramilar> nice.
13:53 < nsf> but I had to fork it, because the data representation is
different (for types and for declarations)
13:53 < nsf> and interfaces are horrible in "go/types"
13:54 < nsf> e.g.  it searches packages for you, you can't just parse a
package from a specific file
13:54 -!- fabled [~fabled@83.145.235.194] has quit [Quit: Ex-Chat]
13:54 < nsf> anyways, it all works now
13:54 < nsf> 3x times faster
13:54 < nsf> than my hackerish approac
13:54 < nsf> approach*
13:55 -!- avelino [~avelino@unaffiliated/avelino] has quit [Remote host closed the
connection]
13:55 < nsf> plus I want to make emacs plugin for gocode better
13:55 < nsf> but not sure when that will happen
13:55 < gmilleramilar> (would love that, but have no lisp skillz)
13:55 < nsf> on emacs there is a lot of autocompletion stuff
13:56 < nsf> CompletionUI, Company mode, Autocompletion Mode
13:56 < gmilleramilar> both all.
13:56 < nsf> and all of it is not exactly what I want
13:56 < nsf> :D
13:56 < nsf> I'm new to elisp as well, so..  we'll see
13:57 < taos> So let me get this right
13:57 < taos> we have to write our own open method?
13:57 < taos> not call syscall.Open?
13:57 < nsf> taos: uhm?
13:57 < taos> sorry im dead stupid btw
13:58 < nsf> :D
13:58 < taos> I want to open a file for reading and open a file for writing
13:58 < nsf> well, first of all you need "os" package
13:58 < taos> aye.
13:59 < nsf> see os.Open, os.Create
13:59 < taos> Ah!
13:59 < nsf> os.OpenFile for fine tuning
13:59 -!- cabello [~cabello@nat/yahoo/x-dlameetcjybcvcei] has joined #go-nuts
13:59 < nsf> in short
13:59 -!- TimKack [~tkack@213.208.236.186] has quit [Quit: TimKack]
13:59 < nsf> use os.Open for read
13:59 < nsf> and os.Create for write
13:59 < nsf> os.OpenFile provides full interface for all the permissions and
flags settings
14:00 < nsf> also keep in mind that in Go os.File is not buffered
14:00 < nsf> in most cases you want buffered I/O for performance reasons
14:00 < taos> buffered Io
14:00 < taos> hmmmmmmm
14:00 < nsf> so..  wrap os.File into a bufio stuff
14:00 < nsf> (package "bufio")
14:01 < nsf> but if you use fmt for example
14:01 < nsf> it's ok to use it as it is
14:01 < nsf> because it does the buffering also
14:01 < taos> Slightly confused but give me a minute to play
14:02 < nsf> well, I guess you came to Go from a dynamic language, right?
14:02 < nsf> most of them do buffering for you :D
14:02 < nsf> silently
14:02 < nsf> I'm just saying
14:02 < nsf> well, you shouldn't worry about that in general
14:03 < nsf> but sometimes doing buffering on I/O intensitive apps helps
14:03 < nsf> intensive*
14:03 -!- pbgc [~pbgc@bl20-102-248.dsl.telepac.pt] has joined #go-nuts
14:11 < taos> nsf: right so wrap os.Open with a buffer
14:11 < nsf> http://golang.org/pkg/bufio/
14:11 < nsf> with Reader of Writer, yes
14:11 < nsf> from that package
14:12 < taos> okay this is starting to make alittle sence
14:12 < nsf> and don't forget to "Flush" at the end
14:12 < nsf> traditionally most people are familiar with C's file I/O
14:13 < nsf> fopen stuff in C does buffering behind the scenes, plus fprintf
function flushes the buffer on '\n' symbol
14:13 < nsf> therefore most people just use printf or something else and
don't notice that
14:13 < nsf> but the buffering is here
14:13 < nsf> in Go it's a bit more explicit
14:13 < nsf> and clear and simple as a matter of fact
14:14 < nsf> also C stuff on fclose flushes the buffers as well
14:14 < nsf> in Go you have to call Flush explicitly
14:14 < taos> nsf: okay this is step one on a long journey :D
14:14 < nsf> because bufio.Reader and bufio.Writer aren't Closers
14:14 < nsf> :D
14:14 < nsf> it's all simple actually
14:15 < nsf> well, for me
14:15 < nsf> I guess you need time to get it
14:15 < nsf> I understand :D
14:15 < taos> nsf: actually lost already :(
14:16 < nsf> don't worry, forget about buffers
14:16 < taos> so I do file, err := os.Open('this file?')
14:16 < nsf> write some stuff
14:16 < nsf> yes
14:16 < nsf> f, err := os.Open("file.txt")
14:16 < nsf> if err != nil { panic(err) }
14:16 < nsf> well
14:16 < nsf> there are other ways to read a file actually
14:16 < nsf> io/ioutil package contains some nice stuff
14:17 < taos> Argh!
14:17 < nsf> for example
14:17 < nsf> contents, err := ioutil.ReadFile("file.txt")
14:17 < taos> and this is better?
14:17 < nsf> it opens and reads all the file into a fresh new []byte buffer
'contents'
14:17 < nsf> it's not better, it's different
14:17 < nsf> :D
14:18 < nsf> it uses os.Open behind the scenes of course
14:18 < zeebo> depends on the application.  if you're reading a 10gb file,
you probably don't want all of it in memory at once
14:18 < nsf> yeah
14:19 < nsf> https://github.com/nsf/bin2go/blob/master/bin2go.go
14:19 < taos> zeebo: im reading small scripts atm
14:19 < nsf> some stuff using Go's I/O
14:20 < nsf> taos: for small scripts, ioutil.ReadFile is the way to go
14:20 < nsf> or ioutil.ReadAll
14:20 < nsf> :D
14:21 * nsf is master of confusion
14:21 < taos> Not ReadFull?
14:21 < nsf> there is no ReadFull
14:21 -!- flaguy48 [~gmallard@user-0c6s350.cable.mindspring.com] has joined
#go-nuts
14:21 < taos> D:
14:22 < nsf> it's in "io" package
14:22 < taos> right!
14:22 < nsf> I'm talking about "io/ioutil"
14:22 < nsf> no, ReadFull has different purpose
14:22 < nsf> it doesn't allocate memory
14:22 -!- aat [~aat@rrcs-184-75-54-130.nyc.biz.rr.com] has joined #go-nuts
14:23 < taos> Right
14:35 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.5]
14:36 -!- replore_ [~replore@ntkngw133234.kngw.nt.ftth.ppp.infoweb.ne.jp] has quit
[Remote host closed the connection]
14:38 -!- dreadlorde [~dreadlord@141.217.140.71] has quit [Ping timeout: 264
seconds]
14:38 -!- hnry [50dd2595@gateway/web/freenode/ip.80.221.37.149] has joined
#go-nuts
14:38 < taos> Sorry still dead lost :(
14:38 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
14:40 -!- sl [none@ks363729.kimsufi.com] has joined #go-nuts
14:41 < jessta> taos: what's the trouble?
14:42 -!- jbooth1 [~jay@209.249.216.2] has joined #go-nuts
14:44 < taos> jessta: reading a file
14:44 < taos> Im trying to write a function given a string filename read the
contents and return
14:44 < jessta> contents, err := ioutil.ReadFile("file.txt")
14:46 -!- TimKack [~tkack@e196069.upc-e.chello.nl] has joined #go-nuts
14:46 < jessta> that will read the contents of file.txt in to 'contents'
14:46 -!- Tv__ [~Tv__@cpe-76-168-227-45.socal.res.rr.com] has joined #go-nuts
14:47 < taos> what "type" is contents then
14:47 < taos> a string?
14:47 < jessta> http://golang.org/pkg/io/ioutil/#ReadFile
14:48 < jessta> ReadFile(filename string) ([]byte, os.Error)
14:48 < jessta> contents is a []byte
14:48 < taos> thats an array of bytes right?
14:48 < jessta> that's a slice of bytes
14:49 < jessta> taos: have you read the tutorial?  and effective Go?
14:49 < taos> I am still reading it
14:50 -!- avelino [~avelino@unaffiliated/avelino] has joined #go-nuts
14:50 -!- malavv [84cff633@gateway/web/freenode/ip.132.207.246.51] has joined
#go-nuts
14:50 < jessta> I recommend reading effective go and even the go spec before
attempting to write any Go.
14:51 < taos> :/
14:51 < jessta> The spec is fairly short
14:51 -!- ampleyfly [ampleyfly@gateway/shell/blinkenshell.org/x-abqqfwokhjqpmrmc]
has joined #go-nuts
14:52 < jessta> the spec is so short and the language is so simple that
reading the spec is quicker than guessing and asking questions
14:53 < taos> I prefer people sometimes
14:53 < jessta> http://golang.org/doc/effective_go.html#slices
14:53 < jessta> slices are references to sections of an array
14:53 < valentin> jessta : +1
14:55 -!- CoverSli1e [~richard@216.2.249.50] has joined #go-nuts
14:55 -!- CoverSlide [~richard@216.2.249.50] has quit [Disconnected by services]
14:56 -!- chomp [~chomp@dap-209-166-184-50.pri.tnt-3.pgh.pa.stargate.net] has
joined #go-nuts
14:59 < taos> brb
14:59 -!- avelino [~avelino@unaffiliated/avelino] has quit [Remote host closed the
connection]
15:00 -!- taos [~Taos@host-92-20-189-254.as13285.net] has quit [Read error:
Connection reset by peer]
15:03 -!- niekie [~niek@CAcert/Assurer/niekie] has quit [Excess Flood]
15:04 -!- niekie [~niek@CAcert/Assurer/niekie] has joined #go-nuts
15:06 -!- meling [~meling@pico.ux.uis.no] has joined #go-nuts
15:07 -!- zanget` [~zanget@hurf.durf.me] has joined #go-nuts
15:08 -!- niekie [~niek@CAcert/Assurer/niekie] has quit [Excess Flood]
15:09 -!- Xenith_ [~xenith@xenith.org] has joined #go-nuts
15:09 -!- niekie [~niek@CAcert/Assurer/niekie] has joined #go-nuts
15:10 -!- coffeeju1k [~max@static.58.62.47.78.clients.your-server.de] has joined
#go-nuts
15:10 -!- zeroXten_ [~zeroXten@0x10.co.uk] has joined #go-nuts
15:11 -!- zaero- [~eclark@servo.m.signedint.com] has joined #go-nuts
15:11 -!- madari_ [madari@idm.irc-galleria.net] has joined #go-nuts
15:11 -!- tncardoso [~thiago@189.59.185.205.dynamic.adsl.gvt.net.br] has quit
[Read error: Connection reset by peer]
15:11 -!- xulfer_ [~xulfer@ipv6.cheapbsd.net] has joined #go-nuts
15:13 -!- xulfer [~xulfer@2600:3c01::f03c:91ff:fe96:c1cd] has quit [Disconnected
by services]
15:16 -!- dforsyth_ [~dforsyth@ec2-50-18-22-230.us-west-1.compute.amazonaws.com]
has joined #go-nuts
15:17 -!- Netsplit *.net <-> *.split quits: dforsyth, Tv__, zaero, cabello,
lucid_, welterde, Xenith, zanget, Innominate, coffeejunk, (+7 more, use /NETSPLIT
to show all of them)
15:17 -!- niekie [~niek@CAcert/Assurer/niekie] has quit [Excess Flood]
15:19 -!- niekie [~niek@CAcert/Assurer/niekie] has joined #go-nuts
15:20 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has joined #go-nuts
15:22 -!- Innominate [~sirrobin@cpe-076-182-074-143.nc.res.rr.com] has joined
#go-nuts
15:22 -!- tux21b [~christoph@cpe90-146-162-55.liwest.at] has joined #go-nuts
15:22 -!- lucid_ [~rbl@84-74-139-92.dclient.hispeed.ch] has joined #go-nuts
15:22 -!- chomp [~chomp@dap-209-166-184-50.pri.tnt-3.pgh.pa.stargate.net] has
joined #go-nuts
15:22 -!- cabello [~cabello@nat/yahoo/x-nrchebndmcolybyv] has joined #go-nuts
15:22 -!- niekie [~niek@CAcert/Assurer/niekie] has quit [Excess Flood]
15:23 -!- gobeginner [~nwood@2a02:16c8:40:0:21e:37ff:fed2:cf06] has joined
#go-nuts
15:24 -!- niekie [~niek@CAcert/Assurer/niekie] has joined #go-nuts
15:25 -!- Rennex [rennex@giraf.fi] has joined #go-nuts
15:27 -!- niekie [~niek@CAcert/Assurer/niekie] has quit [Read error: Connection
reset by peer]
15:29 -!- dlowe [~dlowe@nat/google/x-trgctlyskukqotse] has joined #go-nuts
15:32 -!- yogib [~yogib@131.234.59.64] has quit [Ping timeout: 245 seconds]
15:32 -!- malavv [84cff633@gateway/web/freenode/ip.132.207.246.51] has quit [Ping
timeout: 252 seconds]
15:33 -!- welterde [welterde@thinkbase.srv.welterde.de] has joined #go-nuts
15:34 -!- zeroXten_ [~zeroXten@0x10.co.uk] has quit [Quit: leaving]
15:34 -!- zeroXten [~zeroXten@0x10.co.uk] has joined #go-nuts
15:37 -!- napsy [~luka@88.200.96.18] has quit [Quit: Lost terminal]
15:39 -!- arun_ [~arun@unaffiliated/sindian] has joined #go-nuts
15:44 -!- tvw [~tv@212.79.9.150] has quit [Remote host closed the connection]
15:47 -!- jlaffaye [~jlaffaye@abydos.jlaffaye.net] has quit [Changing host]
15:47 -!- jlaffaye [~jlaffaye@freebsd/developer/jlaffaye] has joined #go-nuts
15:51 -!- avelino [~avelino@unaffiliated/avelino] has joined #go-nuts
15:53 -!- mavar [~mavar@188.92.169.90] has quit [Ping timeout: 245 seconds]
15:54 -!- erus` [~chatzilla@mailgate.ips-international.com] has quit [Quit:
ChatZilla 0.9.87 [Firefox 6.0.2/20110902133214]]
15:55 -!- mattn_jp [~mattn@112-68-89-155f1.hyg1.eonet.ne.jp] has joined #go-nuts
15:56 -!- hnry [50dd2595@gateway/web/freenode/ip.80.221.37.149] has quit [Ping
timeout: 252 seconds]
15:57 -!- Adys [~Adys@unaffiliated/adys] has quit [Read error: Connection reset by
peer]
15:59 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts
16:05 -!- mavar [~mavar@81-226-52-85-no179.tbcn.telia.com] has joined #go-nuts
16:07 < exch> http://my.opera.com/taviso/blog/show.dml/639454 Go doesn't
fall for this trap :)
16:10 -!- magn3ts_ [~magn3ts@colemickens.unl.edu] has joined #go-nuts
16:11 -!- magn3ts_ [~magn3ts@colemickens.unl.edu] has quit [Read error: Connection
reset by peer]
16:12 -!- gobeginner [~nwood@2a02:16c8:40:0:21e:37ff:fed2:cf06] has left #go-nuts
[]
16:12 -!- wallerdev [~wallerdev@72.44.102.30] has joined #go-nuts
16:12 -!- larva [~larvanitr@ec2-46-51-171-183.eu-west-1.compute.amazonaws.com] has
quit [Write error: Connection reset by peer]
16:15 -!- tncardoso [~thiagon@150.164.2.20] has joined #go-nuts
16:17 -!- sinclair [~chatzilla@ip-118-90-5-90.xdsl.xnet.co.nz] has joined #go-nuts
16:17 -!- BizarreCake [~BizarreCa@IGLD-84-228-60-55.inter.net.il] has quit [Remote
host closed the connection]
16:18 -!- Argue [~Argue@112.201.172.5] has quit [Quit: Leaving]
16:21 -!- rcrowley [~rcrowley@64.125.181.68] has joined #go-nuts
16:21 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.5]
16:23 -!- dfr|sanbruno [~dfr|work@c-69-181-71-244.hsd1.ca.comcast.net] has joined
#go-nuts
16:24 -!- dfr|sanbruno [~dfr|work@c-69-181-71-244.hsd1.ca.comcast.net] has quit
[Remote host closed the connection]
16:24 -!- sahid [~sahid@LNeuilly-152-21-22-10.w193-253.abo.wanadoo.fr] has quit
[Quit: Ex-Chat]
16:27 -!- Natch| [~natch@178.73.217.133] has joined #go-nuts
16:29 -!- `micro` [~quassel@96-42-218-124.dhcp.roch.mn.charter.com] has quit [Read
error: Connection reset by peer]
16:29 -!- replore_ [~replore@ntkngw133234.kngw.nt.ftth.ppp.infoweb.ne.jp] has
joined #go-nuts
16:29 -!- ShadowIce
[~pyoro@HSI-KBW-109-193-121-123.hsi7.kabel-badenwuerttemberg.de] has joined
#go-nuts
16:29 -!- ShadowIce
[~pyoro@HSI-KBW-109-193-121-123.hsi7.kabel-badenwuerttemberg.de] has quit
[Changing host]
16:29 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
16:32 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
16:34 -!- icebrain [~icebrain@co3-84-90-63-109.netvisao.pt] has quit [Ping
timeout: 260 seconds]
16:38 -!- erus` [~chatzilla@cpc2-gill2-0-0-cust701.basl.cable.virginmedia.com] has
joined #go-nuts
16:39 -!- XenoPhoenix [~Xeno@cpc13-aztw24-2-0-cust23.aztw.cable.virginmedia.com]
has quit [Ping timeout: 260 seconds]
16:40 -!- squeese [~squeese@cm-84.209.17.156.getinternet.no] has joined #go-nuts
16:46 -!- mattn_jp [~mattn@112-68-89-155f1.hyg1.eonet.ne.jp] has quit [Ping
timeout: 276 seconds]
16:48 -!- mattn_jp [~mattn@112-68-89-155f1.hyg1.eonet.ne.jp] has joined #go-nuts
16:55 -!- pyrhho [~pyrhho@host-92-27-75-48.static.as13285.net] has quit [Quit:
pyrhho]
16:58 -!- awidegreen [~quassel@h-170-226.a212.priv.bahnhof.se] has joined #go-nuts
17:11 -!- Venom_X [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has
joined #go-nuts
17:12 -!- remy_o [~babar@archlinux/developer/remy-o] has joined #go-nuts
17:13 -!- cr3 [~cr3@64.34.151.178] has quit [Quit: leaving]
17:15 -!- photron [~photron@port-92-201-16-53.dynamic.qsc.de] has joined #go-nuts
17:15 -!- cr3 [~cr3@64.34.151.178] has joined #go-nuts
17:24 -!- tncardoso [~thiagon@150.164.2.20] has quit [Ping timeout: 250 seconds]
17:24 -!- tncardoso [~thiagon@150.164.2.20] has joined #go-nuts
17:33 -!- Fish- [~Fish@9fans.fr] has joined #go-nuts
17:36 -!- thrashr888 [~thrashr88@64.125.143.6] has joined #go-nuts
17:36 -!- valentin [~valentin@darkstar2.fullsix.com] has quit [Remote host closed
the connection]
17:37 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
17:53 -!- wallerdev [~wallerdev@72.44.102.30] has quit [Quit: wallerdev]
17:54 -!- mattn_jp [~mattn@112-68-89-155f1.hyg1.eonet.ne.jp] has quit [Quit:
Ex-Chat]
17:54 -!- sebastianskejoe [~sebastian@56345a20.rev.stofanet.dk] has quit [Quit:
Lost terminal]
17:57 -!- tjyang [~tjyang@c-71-201-81-103.hsd1.il.comcast.net] has joined #go-nuts
17:59 -!- clr_ [~colin@2620:0:2820:a7:224:d7ff:fe3e:71b4] has joined #go-nuts
18:01 -!- tjyang__ [~tjyang@c-71-201-81-103.hsd1.il.comcast.net] has quit [Ping
timeout: 276 seconds]
18:05 -!- dfr|sanbruno [~dfr|work@adsl-71-134-241-138.dsl.pltn13.pacbell.net] has
joined #go-nuts
18:09 -!- dfr|sanbruno [~dfr|work@adsl-71-134-241-138.dsl.pltn13.pacbell.net] has
quit [Remote host closed the connection]
18:11 -!- dfr|sanbruno [~dfr|work@nat/google/x-laiygzpzenmmrcxa] has joined
#go-nuts
18:19 -!- niekie [~niek@CAcert/Assurer/niekie] has joined #go-nuts
18:21 -!- awidegreen [~quassel@h-170-226.a212.priv.bahnhof.se] has quit [Read
error: Connection reset by peer]
18:22 -!- niekie [~niek@CAcert/Assurer/niekie] has quit [Read error: Connection
reset by peer]
18:25 -!- Project_2501 [~progettin@dynamic-adsl-94-36-150-225.clienti.tiscali.it]
has joined #go-nuts
18:27 -!- aat [~aat@rrcs-184-75-54-130.nyc.biz.rr.com] has quit [Ping timeout: 252
seconds]
18:28 -!- niekie [~niek@CAcert/Assurer/niekie] has joined #go-nuts
18:30 -!- thrashr888 [~thrashr88@64.125.143.6] has quit [Quit: thrashr888]
18:31 -!- aat [~aat@rrcs-184-75-54-130.nyc.biz.rr.com] has joined #go-nuts
18:32 -!- TimKack [~tkack@e196069.upc-e.chello.nl] has quit [Quit: TimKack]
18:34 < cr3> what's the proper way of expressing an enum type in go?
something like this perhaps: type Foo int; const ( BAR = Foo(1); BAZ =
Foo(1<<1)...
18:35 < KirkMcDonald> Foo(1 << iota)
18:36 < cr3> KirkMcDonald: gotcha, is it a good idea to do
Foo(1<<iota) instead of just 1<<iota?
18:37 < KirkMcDonald> Personally, I probably wouldn't bother making it its
own type.
18:37 < KirkMcDonald> But there's no reason why you couldn't.
18:37 < cr3> another way might be BAR Foo = 1 << iota
18:40 -!- niekie [~niek@CAcert/Assurer/niekie] has quit [Read error: Connection
reset by peer]
18:42 -!- patcoll [~patcollin@173-13-48-166-Pennsylvania.hfc.comcastbusiness.net]
has joined #go-nuts
18:44 -!- dmg [~dmg@ip56513def.adsl-surfen.hetnet.nl] has quit [Ping timeout: 276
seconds]
18:44 < nsf> cr3: I think there is no typesafe enums in Go
18:44 < nsf> so, don't even try to do that :D
18:44 < nsf> var x Foo = 5
18:44 < nsf> 5 will be silently converted to Foo
18:45 < kevlar_work> the normal way is type foo int; const ( ONE foo = iota;
TWO; THREE; FOUR )
18:45 < nsf> abstract number can be used as any type that represents number
18:45 < nsf> kevlar_work: no
18:45 -!- erus` [~chatzilla@cpc2-gill2-0-0-cust701.basl.cable.virginmedia.com] has
quit [Read error: Connection reset by peer]
18:45 < nsf> in fact Go doesn't repeat type in const groups
18:45 < nsf> TWO THREE and FOUR will be ints
18:45 < kevlar_work> yes it does.
18:46 < nsf> last time I checked it didn't
18:46 -!- erus` [~chatzilla@cpc2-gill2-0-0-cust701.basl.cable.virginmedia.com] has
joined #go-nuts
18:46 < nsf> let's see
18:47 -!- pbgc [~pbgc@bl20-102-248.dsl.telepac.pt] has quit [Quit: Textual IRC
Client: http://www.textualapp.com/]
18:48 < nsf> ok, it does
18:48 < kevlar_work> https://gist.github.com/1204276
18:48 < nsf> still, it won't really help
18:48 < kevlar_work> oh?
18:49 < nsf> as I said you can use any number as Foo
18:49 < nsf> but you can't use these constants as int though
18:49 < kevlar_work> a local type with constant, exported values is as close
as you can get to an enum in Go
18:49 < nsf> so..  it's kind of like a type safety
18:49 < nsf> but not really
18:49 < kevlar_work> you can use BARE numbers as foo, but no variables
18:49 < nsf> true
18:49 < nsf> ok
18:49 < nsf> I agree with "as close as you can get"
18:49 < nsf> that's a good way to describe that :D
18:51 -!- pjacobs [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has
joined #go-nuts
18:52 -!- Venom_X [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has quit
[Read error: Connection reset by peer]
18:53 -!- dfr|sanbruno [~dfr|work@nat/google/x-laiygzpzenmmrcxa] has quit [Ping
timeout: 250 seconds]
18:53 -!- yogib [~yogib@dslb-188-100-003-164.pools.arcor-ip.net] has joined
#go-nuts
18:53 < kevlar_work> it's also the "idiomatic" way to do it; see the
standard library.
18:54 < exch> The whole typed 'enum' thing is handy to make function
signatures clear.  If something requires a specific enum type as argument, doing
type T int will make the function signature a lot easier to understand
18:54 -!- tncardoso [~thiagon@150.164.2.20] has quit [Quit: Leaving]
18:57 < nsf> yeah, sure, but I wanted to point out that "enums" are not
fully type safe in Go
18:57 -!- thrashr888 [~thrashr88@64.125.143.6] has joined #go-nuts
18:59 < kevlar_work> there are so many cool things you can do though, like
having really nice pretty printing: https://gist.github.com/1204276
18:59 < nsf> yes
18:59 * tav waves
19:00 < tav> hey nsf
19:00 < nsf> tav: hi
19:00 < exch>
http://gotocon.com/aarhus-2011/presentation/Opening%20Keynote:%20Dart,%20a%20new%20programming%20language%20for%20structured%20web%20programming
19:00 -!- c00w [~colin@2620:0:2820:a7:224:d7ff:fe3e:71b4] has quit [Ping timeout:
260 seconds]
19:00 < exch> google comes wth another programming language
19:00 < nsf> omg
19:00 < nsf> one more
19:01 < exch> My gopher is insulted that it's not Go
19:01 < nsf> let's do new programming languages every week!
19:01 < f2f> structured web programming!
19:01 < nsf> sounds like a Go to me
19:01 < nsf> :D
19:01 < exch> Google seems to be going the DSL route.  A language ieadl for
backends and a lgnaueg ideal for frontends
19:02 < exch> minus all the typos
19:02 < nsf> c'mon, nativeclient will have no competitors
19:02 < nsf> for frontends
19:02 < tav> wait, gilad bracha works at google??
19:03 < nsf> who's that?  :)
19:03 < tav> heh
19:03 -!- tux21b [~christoph@cpe90-146-162-55.liwest.at] has quit [Ping timeout:
260 seconds]
19:03 < f2f> go dart spot
19:03 < f2f> what's next?  :)
19:04 < tav> spot ?
19:04 < nsf> guys, does anyone know if there is a similar emacs command to
vim's "r" in normal mode?
19:04 < nsf> i.e.  quickly replace one char without moving a cursor
19:04 * nsf is addicted to it
19:05 < f2f> tav, spot is just speculation atm:
http://whois.domaintools.com/spot-lang.com
19:07 < tav> nsf: probably, but wouldn't it be just as easy to ^d (or
whatever you have delete-char bound to), and then type the replacement char ?
19:07 -!- TheMue [~FMueller@p5DDF6EE1.dip.t-dialin.net] has joined #go-nuts
19:07 < nsf> tav it moves cursor to the position after the char
19:07 < nsf> and I usually need to replace a 5-10 chars in a single column
19:07 < nsf> in vim it's just: jr1 jr2 jr3 jr4 jr5
19:07 < nsf> etc.
19:07 < tav> i see
19:16 < tav> nsf: sorry, after much googling, can't find any native support
or support within custom packages except within the vi/vim-related ones like
http://www.emacswiki.org/emacs/vimpulse.el
19:16 < nsf> tav: yeah, I've tried to find it too
19:17 < nsf> of course I understand I can make it work with elisp
19:17 < nsf> I can do anything with elisp :)
19:17 < tav> heh, yes
19:18 < nsf> someone should make an editor that takes all good stuff from
emacs and vim
19:18 < nsf> and combines that in an ultimate power tool
19:18 < nsf> :D
19:18 < tav> i try to avoid responding to emacs feature desires with "just
code it yourself"
19:18 < nsf> into*
19:18 < remy_o> vim has already all good stuff from emacs :p
19:18 < Namegduf> They can call it Emacim, destroyer of worlds.
19:18 < remy_o> (and conversely)
19:18 < nsf> remy_o: it has bad sides too
19:18 < tav> nsf: that is guaranteed to not satisfy either emacs or vi
lovers
19:18 < nsf> too many stuff built-in
19:18 < nsf> for example recently
19:19 < nsf> there was a patch in vim
19:19 < nsf> that broke autocompletion
19:19 < nsf> and I had to complain on their mailing list in order to fix
that
19:19 < nsf> so..  the balance
19:19 < nsf> I need balance :D
19:20 < nsf> emacs' overlays are great
19:20 < nsf> I like C-a C-e better than $ ^
19:20 < nsf> many things in emacs are great, but actually editting text in
vim is easier :D
19:20 < Namegduf> I too like everything about emacs except the text editor.
19:20 < nsf> :D
19:20 < Ginto8> lol
19:21 < nsf> indeed, it's a very nice platform
19:21 < nsf> a toolkit
19:21 < brandini> why does going to work always have to suck so bad
19:21 < brandini> errr, sorry
19:22 < exch> brandini: You picked the wrong job :)
19:22 < brandini> apparently I've picked a lot of them :)
19:26 -!- goraes [~goraes@189.103.177.124] has joined #go-nuts
19:29 -!- wallerdev [~wallerdev@c-68-60-43-43.hsd1.mi.comcast.net] has joined
#go-nuts
19:29 < cr3> how would a C union be expressed in Go? I read something about
untagged unions being unsafe and something from Pike saying something equivalent
could be done more safely with interfaces, any example somewhere?
19:31 -!- TimKack [~tkack@e196069.upc-e.chello.nl] has joined #go-nuts
19:31 -!- smw [~stephen@unaffiliated/smw] has joined #go-nuts
19:32 < exch> Funny how all the commenters on that Dart thing are fiercely
upholding they prefer to have one all-purpose language for everything
19:32 < exch> I kind of feel the opposite.  I would perfer as many DSL's as
necessary and each one tailored and optimized to give the easiest and best
solutions for a specific problem area
19:32 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Read error: Operation
timed out]
19:33 < exch> Learning the ins and outs of a DSL will automatically force
you to become more familiar with the specific problem area it addresses
19:33 < cr3> exch: I share the feeling but the problem arises when trying to
get those DSLs to interoperate
19:33 < exch> mm yea that can be problematic I suppose
19:34 < rsesek> with the flag package, I have flags that I register in a
library because multiple commands use them.  but they don't appear to be parsing
in the commands.  anyone know if/how a library can be made to parse common flags?
19:36 -!- tncardoso [~thiago@189.59.185.205.dynamic.adsl.gvt.net.br] has joined
#go-nuts
19:38 -!- Natch| [~natch@178.73.217.133] has quit [Quit:  /(bb|[^b]{2})/]
19:38 -!- replore_ [~replore@ntkngw133234.kngw.nt.ftth.ppp.infoweb.ne.jp] has quit
[Remote host closed the connection]
19:44 < kevlar_work> rsesek, there's no easy way to do it
19:44 < kevlar_work> if the flags are globals or in init() they will be
registered with the flag package
19:44 < rsesek> kevlar_work: I think I understand why, but is it because of
the package-local commandLine?
19:44 < kevlar_work> so doing flag.Parse() in main should parse them
19:45 < rsesek> hm.  need to see what's going on then.
19:45 < kevlar_work> rsesek, if you do binary -help do they show up?
19:45 < rsesek> kevlar_work: yes.  but no values are being stored, not even
the default.
19:47 < zozoR> oh, the Dart presentation is in Århus, nice :D
19:48 < brandini> what is a YAML and why would someone need to parse it?
19:49 < rsesek> brandini: yaml is another text-based markup (like json) to
store structured data
19:49 < rsesek> commonly used for config files
19:51 -!- aat [~aat@rrcs-184-75-54-130.nyc.biz.rr.com] has quit [Ping timeout: 252
seconds]
19:51 -!- aat [~aat@rrcs-184-75-54-130.nyc.biz.rr.com] has joined #go-nuts
19:52 -!- niekie [~niek@CAcert/Assurer/niekie] has joined #go-nuts
20:02 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Remote host closed
the connection]
20:04 -!- Project_2502 [~progettin@dynamic-adsl-94-36-151-46.clienti.tiscali.it]
has joined #go-nuts
20:04 -!- Project_2501 [~progettin@dynamic-adsl-94-36-150-225.clienti.tiscali.it]
has quit [Disconnected by services]
20:05 -!- thrashr888 [~thrashr88@64.125.143.6] has quit [Quit: thrashr888]
20:05 -!- tux21b [~christoph@cpe90-146-162-55.liwest.at] has joined #go-nuts
20:06 -!- remy_o [~babar@archlinux/developer/remy-o] has quit [Ping timeout: 276
seconds]
20:07 < kevlar_work> brandini, it's also super complicated, which is why I
made go-gypsy, which will only attempt to barse the most basic subset of YAML.
20:08 < kevlar_work> parse, even
20:09 -!- pyrhho [~paul@027bf849.bb.sky.com] has joined #go-nuts
20:09 -!- pyrhho [~paul@027bf849.bb.sky.com] has quit [Client Quit]
20:12 -!- remy_tel [~remy_tel@89.95.59.132] has joined #go-nuts
20:12 -!- thrashr888 [~thrashr88@64.125.143.6] has joined #go-nuts
20:12 -!- remy_tel [~remy_tel@89.95.59.132] has quit [Remote host closed the
connection]
20:13 -!- ccc_ [~macroron@c-98-249-244-254.hsd1.fl.comcast.net] has joined
#go-nuts
20:13 < goraes> yaml spec is huge.
20:14 < goraes> it is pretty insane actually.
20:14 < nsf> have you read it
20:14 < jlaffaye> its xml but hidden, so :p
20:14 < nsf> ?
20:14 < nsf> I did
20:14 < nsf> it's simple
20:14 < nsf> but big, yes
20:15 < goraes> nsf, i did
20:15 < kevlar_work> it stops being simple when you get to things like
tagged values
20:15 < goraes> i actually fixed/improved a yaml parser in c# once :P
20:15 < kevlar_work> *shudder*
20:15 < nsf> cool
20:15 < jlaffaye> if you want something simple use json :)
20:15 < nsf> but I disagree that it's "insane"
20:15 < nsf> it's ok
20:15 < kevlar_work> jlaffaye, if you're expecting stupid humans to edit a
config file, it can't be in JSON.
20:15 < goraes> 1.2 is less dense it seems?
20:16 < nsf> have no idea, 1.2 is the one I read
20:16 < goraes> http://yaml.org/spec/1.1/
20:16 < nsf> never seen 1.0 and 1.1
20:16 < jlaffaye> kevlar_work: true
20:16 < goraes> 1.1 was a tad longer
20:16 -!- yogib [~yogib@dslb-188-100-003-164.pools.arcor-ip.net] has quit [Quit:
yogib]
20:16 < goraes> yeah i worked with 1.1
20:16 < kevlar_work> the fact that there are quotes around the keys in json
confuses some people to no end.
20:16 -!- aat [~aat@rrcs-184-75-54-130.nyc.biz.rr.com] has quit [Quit: Computer
has gone to sleep.]
20:17 < kevlar_work> aw, sad face, the exp/regexp package is slower than the
original for regexdna :(
20:18 < goraes> what is regex-dna used for?
20:19 < kevlar_work> it's just one of the benchmarks with which people try
to nail us to the wall.
20:19 < goraes> ah.  damn.
20:19 -!- aat [~aat@rrcs-184-75-54-130.nyc.biz.rr.com] has joined #go-nuts
20:19 < Namegduf> goraes: It's a benchmark of how fast the C regular
expression library your language is using is.
20:20 < goraes> ok.
20:20 < Namegduf> A library rather than a language benchmark.
20:20 < goraes> i think yaml is a pretty sweet syntax.  but it has maybe too
many corner cases to implement a parser.
20:20 < Namegduf> Because Go does not use an existing, highly optimised
regex library, but has its own, it performs relatively poorly.
20:21 < kevlar_work> too bad it doesn't benchmark
(a(a(a(a(a(a(a(a)?)?)?)?)?)?)?)?aaaaaaaaaaaa is (or whatever the pathological case
is for pcre)
20:21 < Namegduf> Which could be interesting if you specifically needed to
parse regexes really fast, it'd mean you wouldn't essentially want the stdlib
implementation.
20:21 < Namegduf> Potentially.
20:21 < Namegduf> But as a metric for the language it is fairly awful
20:21 < kevlar_work> indeed.
20:21 < niemeyer> I disagree, FWIW
20:21 < kevlar_work> though RE2 is one of the fastest C regex libraries
20:21 -!- aat [~aat@rrcs-184-75-54-130.nyc.biz.rr.com] has quit [Client Quit]
20:21 < kevlar_work> and it's what exp/regexp is based on
20:22 < niemeyer> Having a standard regexp library that can be trusted to
perform in linear time under any circumstances is a pretty unique feature
20:22 < dlowe> the cl-ppcre library is the fastest full-featured matcher
I've heard of
20:22 < goraes> so regexdna is just regex abuse.
20:23 < niemeyer> If you disagree, give me a link to your webapp written in
Python that offers regex as a user interface
20:23 < niemeyer> ;-)
20:23 < kevlar_work> niemeyer, I don't understand your comment...  go DOES
have a linear-time regex library
20:23 < niemeyer> kevlar_work: Yep, exactly
20:23 < goraes> thats unique
20:24 < goraes> i tried to read russ post explaining it but my head exploded
20:24 < kevlar_work> haha
20:24 < kevlar_work> those posts are awesome
20:25 < kevlar_work> (and make me appreciate that he's developing Go)
20:28 -!- TheMue [~FMueller@p5DDF6EE1.dip.t-dialin.net] has quit [Quit: leaving]
20:29 < f2f> how much slower is the new regex?  orders of magnitude?
20:30 < niemeyer> f2f: Slower than what?
20:30 < niemeyer> f2f: and in what circumstances?  ;)
20:30 < goraes> nail to the wall circumstances
20:31 < f2f> regexdna specifically, as that's what was mentioned above
20:31 < Namegduf> regex-dna is a benchmark
20:31 < Namegduf> Not a regex implementation
20:31 < f2f> you know full well what i'm asking, considering the previous
discussion.  no need to be glib.
20:31 < Namegduf> No, not really.
20:31 < niemeyer> f2f: I didn't, but your attitude puts me away..  I'll do
something useful
20:32 < kevlar_work> f2f, on my machine it runs the basic regexdna in .42
sec as opposed to .38 sec
20:32 < f2f> 14:18 <kevlar_work> aw, sad face, the exp/regexp package
is slower than the original for regexdna :(
20:32 < Namegduf> Than C?
20:32 < Namegduf> The original was 30x
20:32 < Namegduf> Which is a remarkable improvement, it used to be
100-something times slower.
20:32 < f2f> kevlar_work: thanks.
20:33 < goraes>
http://shootout.alioth.debian.org/u32/performance.php?test=regexdna
20:34 < Namegduf> Go on 32bit is pretty dreadful
20:34 < goraes>
http://shootout.alioth.debian.org/u32/performance.php?test=regexdna
20:34 < goraes> oops
20:34 < goraes>
http://shootout.alioth.debian.org/u64q/performance.php?test=regexdna
20:34 -!- Ginto8 [~ginto8@pool-71-188-103-55.cmdnnj.east.verizon.net] has quit
[Ping timeout: 245 seconds]
20:35 * kevlar_work runs it against the full 5000000 dataset
20:35 -!- Ginto8 [~ginto8@pool-71-188-103-55.cmdnnj.east.verizon.net] has joined
#go-nuts
20:36 -!- scyth [~scyth@rots.in.rs] has joined #go-nuts
20:38 < kevlar_work> lol, that's actually an embarrasingly parallel problem.
20:38 * kevlar_work will try it with gomaxprocs set in a minute.
20:43 -!- BigBlackDog
[~BigBlackD@HSI-KBW-109-192-007-188.hsi6.kabel-badenwuerttemberg.de] has quit
[Quit: WeeChat 0.3.6-dev]
20:44 < tux21b> maybe exp/regexp is a bit slower now, because it supports
all the perl/re2 features now by default.  But as far as I know, a plain
compilePosix() is planned again (and already available under the hood)
20:44 < f2f> gc regex-dna 3.34u 0.00s 3.35r
20:44 < f2f> gc regex-dna-re23.70u 0.00s 3.71r
20:45 < f2f> s/re2/re2 /
20:47 -!- dlowe [~dlowe@nat/google/x-trgctlyskukqotse] has quit [Quit: Leaving.]
20:47 -!- dmg [~dmg@ip56513def.adsl-surfen.hetnet.nl] has joined #go-nuts
20:47 -!- qeed [~qeed@adsl-98-85-35-116.mco.bellsouth.net] has joined #go-nuts
20:48 < goraes> as i see it, it is slower abusing it.  i want to see some
back to the ground benchmarks.
20:48 -!- pack3754 [~daniel@71.216.93.203] has joined #go-nuts
20:49 < goraes> like, "wow, go is the slowest in the regex-parsecomplexhtml
benchmark"
20:49 < goraes> doh, how about not parsing dna or html using regex?
20:50 * goraes hides
20:50 < jlaffaye> if benchmarks represend real cases, we would have heard by
now ;)
20:51 -!- Fish- [~Fish@9fans.fr] has quit [Quit: WeeChat 0.3.5]
20:51 < f2f> the reddit crowd loves alioth
20:51 < tux21b> at least the benchmarks are close to the real world.
parsing contex free grammars with regular expressions is done all the time 0o
20:51 < tux21b> stackoverflow is full with questions like those :D
20:52 -!- c00w [~colin@barh-459.dynamic.rpi.edu] has joined #go-nuts
20:53 < f2f> tux,
http://commandcenter.blogspot.com/2011/08/regular-expressions-in-lexing-and.html
20:56 -!- donutface [~donut@109.78.196.64] has joined #go-nuts
20:58 < tux21b> f2f, i know this post, but this answer on SO is still my
favorite :)
http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454#1732454
20:58 -!- donutface [~donut@109.78.196.64] has left #go-nuts []
20:58 -!- ap3xo [~apexo@2a01:238:436b:8301:5054:ff:fe87:82fb] has quit [Quit: ZNC
- http://znc.sourceforge.net]
20:58 -!- dfr|sanbruno [~dfr|work@nat/google/x-sljmtacahpuvnwdj] has joined
#go-nuts
20:58 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit:
Verlassend]
20:58 < f2f> and i know that post too :)
20:59 -!- apexo [~apexo@2a01:238:436b:8301:5054:ff:fe87:82fb] has joined #go-nuts
20:59 -!- miker2 [~miker2@64.55.31.190] has quit [Ping timeout: 246 seconds]
21:00 < cr3> should tests, in *_test.go files, use the same package name as
the package under test or should they use package_test instead?
21:02 < tux21b> you normally put them into the same package, so that you can
access all internals of the package you want to test
21:03 < tux21b> (internals as in "not exported classes and functions")
21:03 < goraes> i don't know why http has tests in a separate package
21:04 < cr3> tux21b: I was actually wondering about testing internal
functions, you preempted my next question :)
21:04 < goraes> then thats the only way you could test them
21:04 < cr3> goraes: I'm seeing lots of packages test on the outside, maybe
it's sometimes intended as blackbox tests
21:11 < kevlar_work> never use the _test package
21:11 < kevlar_work> that is only for removing circular dependencies
21:12 < kevlar_work> (that's why it's required for http, because http_test
depends on things which depend on http)
21:13 < Namegduf> What is it with people and wanting to use Go for hard
realtime stuff
21:13 < Namegduf> Half the design decisions in Go are just horribly
detrimental for it
21:14 < Namegduf> You can't GC, which means concurrency becomes a horrible
pain instead of a benefit, and you either can't use or need to manage in a fun way
closures.
21:15 < kevlar_work> Namegduf, lots of people on the mailing list just
"want." They see something that go doesn't do 100% the way they want it to be, so
they suggest changing the language.
21:15 < Namegduf> The way interfaces allocate memory off the stack means
each one created has to be treated as an allocation and managed as such.
21:15 < kevlar_work> I'm not too worried about it, as the Go team has done
what I would consider an absolutely heroic job of curating the go language and
libraries.
21:15 < Namegduf> Yeah.
21:16 < kevlar_work> I just try to save them some work by repeating their
reasons for not adding stuff when I see repeated questions.
21:16 < kevlar_work> though most people aren't satisfied until they hear
"No." straight from the horse's mouth, and not even then in some cases.
21:17 < kevlar_work> (yet another reason my generics proposal remains
unpublished...  I have a hard time believing that my idea hasn't already been shot
down during their internal design)
21:17 < Namegduf> Yeah.
21:17 < Namegduf> Does it seem good to you?
21:17 < Namegduf> The proposal, I mean.
21:18 < kevlar_work> It seems good on the surface, but I'm letting it
percolate so I can better understand the implications and round out some of the
corner cases.
21:18 < Namegduf> Ah.
21:18 < Namegduf> Makes sense.
21:18 -!- chomp [~chomp@dap-209-166-184-50.pri.tnt-3.pgh.pa.stargate.net] has quit
[Quit: Leaving]
21:19 < kevlar_work> there are still some uses of a generic type as
arguments of a method in an interface that I think might be non-obvious, for
instance
21:20 < kevlar_work> in any case, I'll probably send it to golang-dev first,
so that any humiliation has a limited audience ;-)
21:20 < Namegduf> How active is that list?
21:20 < Namegduf> I've never followed it, but I should.
21:21 -!- TimKack [~tkack@e196069.upc-e.chello.nl] has quit [Quit: TimKack]
21:21 < kevlar_work> probably 2/3 as many threads per day as golang-nuts
21:21 -!- mavar [~mavar@81-226-52-85-no179.tbcn.telia.com] has quit [Ping timeout:
252 seconds]
21:21 < kevlar_work> but a vast, vast majority are code reviews
21:21 < kevlar_work> probably only 1 or 2 threads per week that are separate
from a code review.
21:22 -!- pbgc [~pbgc@bl20-102-248.dsl.telepac.pt] has joined #go-nuts
21:25 < Namegduf> Ah.
21:31 < f2f> golang-dev: 3.3k, 2.4k, 2.3k posts in june, july and august;
golang-nuts: 2.2k, 1.9k and 1.6k respectively
21:31 < f2f> but the number of threads is indeed lower
21:31 < f2f> for golang-dev
21:32 < nsf> it's summer!
21:32 < nsf> vacation time
21:32 < chilts> not in the southern hemisphere :)
21:33 < nsf> well, ok, we need Go users statistic :D
21:33 < nsf> from which part of the world each user is
21:33 < nsf> :D
21:34 < f2f> can you guess the top poster in go-nuts?
21:34 -!- avelino [~avelino@unaffiliated/avelino] has quit [Remote host closed the
connection]
21:35 < nsf> uhm..
21:35 < KirkMcDonald> Was it me?
21:35 < nsf> Russ?
21:35 < nsf> no, I think he codes more
21:35 < f2f> all time is rsc, by a wide margin
21:35 < nsf> :D
21:36 < f2f> but this month he shares it with paolo pinto :)
21:36 < f2f> at 22 each
21:36 -!- avelino [~avelino@unaffiliated/avelino] has joined #go-nuts
21:37 * nsf checked out this sublime text editor
21:37 < nsf> looks neat
21:38 < nsf> I mean it actually looks like a text editor from 10s
21:38 < nsf> or 20s
21:44 -!- avelino [~avelino@unaffiliated/avelino] has quit [Remote host closed the
connection]
21:45 -!- taruti [taruti@ultra.violetti.org] has quit [Ping timeout: 260 seconds]
21:45 -!- franciscosouza [~francisco@201.7.186.67] has joined #go-nuts
21:50 -!- taruti [taruti@ultra.violetti.org] has joined #go-nuts
21:51 < goraes> 20s?
21:51 -!- Taos [~Taos@host-92-20-189-254.as13285.net] has joined #go-nuts
21:51 < Taos> How do I change a string into []bytes?
21:51 < goraes> []bytes(string)
21:52 < goraes> []byte(string)
21:52 < goraes> the latter.
21:53 < goraes> sublime looks neat from the first install.  normally editors
look awful when you just installed them and scream for customization.
21:53 < nsf> yeah
21:53 < nsf> default settings rock
21:53 -!- cr3 [~cr3@64.34.151.178] has quit [Quit: leaving]
21:53 < goraes> yep.  that's why ruby guys adopted...  what was the name.
21:53 < Taos> Now comes the challenge of tokenizing :(
21:54 < nsf> Taos: https://github.com/nsf/shebang/blob/master/lexer.go
21:54 < nsf> tokenizing :D
21:54 < nsf> I like gotos
21:54 < Taos> -_- wut
21:54 < nsf> it's a lexer I wrote recently
21:54 < Taos> This looks so complicated D:
21:54 < nsf> it's simpel
21:54 < nsf> simple*
21:55 < Taos> This is what I want to tokenize
21:55 < Taos> http://paste.pocoo.org/show/472698/
21:55 < nsf> uhm..  looks simple
21:55 < nsf> but
21:55 < nsf> will you have strings?  comments?
21:56 < nsf> what's that?  :)
21:56 < Taos> Thats something im making upo
21:56 < nsf> I wrote a lexer for a complete programming language :D
21:56 < Taos> I want to do assignment, integers, addition and function
calls.
21:56 < Taos> (just one function)
21:56 < nsf> ah, I see
21:56 < nsf> well it will be much simpler
21:56 < nsf> good luck :D
21:57 < nsf> you can actually use Go's tokenizer lib
21:57 < Taos> oh?
21:57 < Taos> I thought that was "just" for go
21:57 < nsf> http://golang.org/pkg/scanner/
21:57 < nsf> oops
21:57 < nsf> I mean scanner
21:57 < nsf> that one is generic
21:57 < nsf> but there is also a "go/scanner"
21:57 < nsf> which is for go
21:58 < Taos> I see....
21:58 < Taos> This makes the confusing more confusing
21:59 * nsf is the master of confusion, be aware
21:59 < nsf> :D
21:59 < exch> Writing your own parsers is much more fun!
21:59 -!- replore [~replore@ntkngw133234.kngw.nt.ftth.ppp.infoweb.ne.jp] has
joined #go-nuts
21:59 < nsf> gocode packages parser uses "scanner" library
22:00 < nsf> the main problem with it
22:00 < Taos> Does this make it slightly clearer?
22:00 < Taos> http://paste.pocoo.org/show/472702/
22:00 < nsf> it doesn't provide line/column info
22:00 < nsf> for a serious language it won't work
22:00 < Taos> I want to convert my stuff into "bytecode"
22:00 < nsf> Taos: sure, but you need a parser
22:00 < nsf> lexer and a parser
22:00 < nsf> if this is all what you want
22:00 < nsf> it will be a simple task
22:01 < nsf> but on the other hand
22:01 < nsf> I see an expression
22:01 * exch never understood all the strange terminologies in that field
22:01 < nsf> and when it comes to expressions
22:01 < exch> I write something that turns plain text into a flat list of
tokens and then something that turns that list into a tree I can hand off to a
compiler or whatever
22:01 < nsf> it's quite interesting to write an expressions parser with all
the precedence for operators stuff etc
22:01 < Taos> Your talking to a complete idiot here, can you simplify?
22:02 < nsf> exch: sure, a lexer, a parser and a compiler :D
22:02 < nsf> the tree is AST :D
22:02 < nsf> Taos: it is simple
22:02 < exch> ah ok :p
22:02 * exch rites that down
22:02 < Taos> nsf: not for me its not :(
22:02 < exch> *writes
22:02 < KirkMcDonald> There's also the distinction between a lexeme and a
token.
22:02 < nsf> Taos: but if you want to write software like that, it should
become simple for you
22:02 < KirkMcDonald> Which is more academic than it is useful, admittedly.
22:02 < nsf> because these are basics
22:03 < Taos> nsf: This is just for learning purposes but its still
confusing the hell outa me
22:03 < nsf> http://en.wikipedia.org/wiki/Parser
22:03 < nsf> what can I say
22:03 < nsf> educate yourself :D
22:05 < exch> It's really not rocket science tbh
22:05 < exch> Didn't Rob give a talk last week about a lexer written in Go?
22:05 < exch> Specifically the one for the new template pkg
22:05 < Taos> exch: it IS rocket science for me though!
22:05 -!- rlab [~Miranda@91.200.158.34] has quit [Quit: Miranda IM! Smaller,
Faster, Easier.  http://miranda-im.org]
22:05 < exch> Taos: that video may clear things up a bit
22:06 < Taos> Which video sorry?
22:07 < exch> looking for a link, sec
22:08 < f2f> http://www.youtube.com/watch?v=HxaD_trXwRE
22:08 < goraes> docs finished :)
http://gorilla-web.appspot.com/pkg/gorilla/sessions/
22:11 -!- sacho [~sacho@82.137.64.217] has joined #go-nuts
22:12 < exch> arg.  The new google groups UI is even worse than the old one
-.-
22:12 < exch> It scales terribly to an 800x600 screen.  he actual thread
listing is like 2x2 pixels and the sidebar can't be removed anymore
22:15 < goraes> exch, and it uses WYSIWYG for new messages (argh)
22:15 -!- Taos [~Taos@host-92-20-189-254.as13285.net] has quit [Quit: HydraIRC
-> http://www.hydrairc.com <- The alternative IRC client]
22:16 < exch> The humongous buttons at the top take about 1/3 of my screen,
surrounded by a ton of useless empty space
22:16 < goraes> i gave that new interface a name: WYGWYUGWT ("what you get
when you use GWT")
22:16 < exch> :P
22:16 -!- photron [~photron@port-92-201-16-53.dynamic.qsc.de] has quit [Ping
timeout: 260 seconds]
22:17 < goraes> hope they will realize that and change it to a more
gmail-like / google-plus-like feel
22:17 < goraes> *feeling
22:17 < exch> I doubt it
22:18 < exch> ffs.  I can display only 1 thread title in the listing
><
22:19 < goraes> i think they will.  all google properties are adopting the
new 'plus theme'
22:19 < exch> I'm afraid this new UIis supposed to be for that purpose
22:19 < exch> it wasn't there yesterday
22:19 < goraes> no, it is there for almost one year
22:19 < goraes> but optional
22:20 < exch> I think we're talking about a different UI
22:20 < goraes> yes.  just realized that.
22:21 < goraes> i was talking about the GWT first attempt.
22:21 < goraes> just saw that a new one is in place.  thanks god they killed
the GWT one.
22:21 < exch> yea, that at least had the capacity to have the sidebar
removed
22:22 -!- c00w [~colin@barh-459.dynamic.rpi.edu] has quit [Ping timeout: 240
seconds]
22:23 < goraes> still uses WYSIWYG, meh
22:23 -!- EClaesson
[~EClaesson@c-9d89e555.013-19-6c6b7013.cust.bredbandsbolaget.se] has joined
#go-nuts
22:23 < goraes> but indeed, too much wasted space.  maybe they'll polish it.
22:23 < goraes> better than GWT.
22:26 -!- Adys [~Adys@unaffiliated/adys] has quit [Remote host closed the
connection]
22:28 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts
22:28 < chilts> yeah, the new groups interface is bad, but the new calendar
interface is even worse
22:29 < chilts> and I'm not switching my Gmail over to the new one either
22:29 < chilts> whereas I find it's ok in Google+
22:29 -!- EClaesson_
[~EClaesson@c-9d89e555.013-19-6c6b7013.cust.bredbandsbolaget.se] has joined
#go-nuts
22:30 < chilts> the new docs interface isn't very nice either ...  but to be
honest, all the have to do is put a few more delineation lines in and get rid of
all that whitespace :)
22:30 -!- franciscosouza [~francisco@201.7.186.67] has quit [Quit: franciscosouza]
22:32 -!- EClaesson
[~EClaesson@c-9d89e555.013-19-6c6b7013.cust.bredbandsbolaget.se] has quit [Ping
timeout: 276 seconds]
22:33 -!- EClaesson_
[~EClaesson@c-9d89e555.013-19-6c6b7013.cust.bredbandsbolaget.se] has quit [Client
Quit]
22:34 -!- Project_2502 [~progettin@dynamic-adsl-94-36-151-46.clienti.tiscali.it]
has quit [Quit: E se abbasso questa leva che succ...]
22:35 -!- itrekkie [86868b4a@gateway/web/freenode/ip.134.134.139.74] has joined
#go-nuts
22:36 < goraes> i like the new gmail one
22:36 < goraes> and the new google news one too
22:36 < goraes> (yeah i use google news)
22:37 -!- smcquay [~smcquay@30.236.sfcn.org] has joined #go-nuts
22:37 -!- tncardoso [~thiago@189.59.185.205.dynamic.adsl.gvt.net.br] has quit
[Quit: bye]
22:40 < scyth> Sublime Text may be downloaded and evaluated for free,
however a license must be purchased for continued use.  There is no enforced time
limit for the evaluation.
22:41 < scyth> what does this mean?:)
22:41 -!- r_linux [~r_linux@static.200.198.180.250.datacenter1.com.br] has quit
[Quit: Lost terminal]
22:41 < scyth> MUST be purchased, but there's no enforced time limit :)
22:41 < itrekkie> can anyone shed some light on the idiomatic approach to
New in a module?  i.e., I'm struggling with whether or not it's needed to
initialize a struct, and if it should return a pointer, or not, and so on
22:41 < itrekkie> I love sublime text with gocode, for what it's worth,
totally slick
22:41 < Namegduf> itrekkie: It should return what you expect users to be
working with.
22:42 < Namegduf> If you expect your struct to be passed around by value,
return it by value.
22:42 < Namegduf> Otherwise, return a pointer.
22:42 < Namegduf> Pointers re more usual.
22:42 < Namegduf> A New function is not usually needed, though; it is
idiomatic to make the zero-initialised struct the initial, default value.
22:42 < Namegduf> And to let users simply use new().
22:43 < itrekkie> great thanks :)
22:43 < Namegduf> No problem.
22:45 < exch> oh look.  My screen isn't even 800x600.  It's 800x480
22:48 < Namegduf> It's shrinking!
22:48 < Namegduf> Already too small to be saved.  :(
22:48 < Namegduf> That'll be the standard monitor resolution next year.
22:49 < Namegduf> On new PCs.
22:49 -!- jbooth1 [~jay@209.249.216.2] has quit [Quit: Leaving.]
22:49 -!- replore [~replore@ntkngw133234.kngw.nt.ftth.ppp.infoweb.ne.jp] has quit
[Remote host closed the connection]
22:49 < goraes> schilly, it is what it says.  "must be purchased but we
won't bother to stop you from using it illegally, because people would crack it
anyway".
22:51 < scyth> yeah
22:51 < itrekkie> there's no way of getting the address of a label, is
there?
22:51 < Namegduf> I do not believe addresses have labels.
22:51 < scyth> though it looks and feels really great, it's a bit expensive
for a text editor
22:51 < Namegduf> Er, whoops.
22:51 < Namegduf> Labels have addresses.
22:51 < Namegduf> What are you wanting to do?
22:51 < itrekkie> (I don't think there is, but maybe I overlooked something)
22:52 < Namegduf> You can't.
22:52 < itrekkie> I'd like to save the address of label at the start of an
opcode implementation
22:53 < itrekkie> trying to figure out a way to improve performance on a
simple virtual machine
22:53 < Namegduf> I suppose the address of a label would be a pointer into a
function.  I'm not sure you can use that for anything.
22:53 < Namegduf> Hmm.  Aside for future gotos in the same function, I
suppose.
22:54 < Namegduf> But nevertheless, no, I'm pretty sure Go doesn't support
it.
22:54 -!- franciscosouza [~francisco@187.105.26.180] has joined #go-nuts
22:54 < itrekkie> C doesn't either, I've been depending on a gcc extension,
so I can't really blame go ;)
22:57 -!- CoverSlide [~richard@216.2.249.50] has quit [Quit: KonnichiWa Bitches]
22:57 -!- espeed [~espeed@63.246.231.57] has joined #go-nuts
23:00 < itrekkie> are there any tricks in unsafe maybe that can be used to
execute writable memory?
23:02 -!- patcoll_ [~patcollin@173-13-48-166-Pennsylvania.hfc.comcastbusiness.net]
has joined #go-nuts
23:03 < qeed> i got it to execute dynamic generated code using mmap
23:04 < itrekkie> oh sounds interesting?
23:05 < qeed> i dont know if what i did is right though i think the right
way is to use cgo to execute it
23:05 < qeed> http://pastie.org/2505539
23:06 < qeed> err disregard the infinite loop and goroutines
23:06 < qeed> that was a test
23:06 < kevlar_work> itrekkie, don't go optimizing your code that way
23:06 -!- erus` [~chatzilla@cpc2-gill2-0-0-cust701.basl.cable.virginmedia.com] has
quit [Remote host closed the connection]
23:06 -!- patcoll [~patcollin@173-13-48-166-Pennsylvania.hfc.comcastbusiness.net]
has quit [Ping timeout: 260 seconds]
23:07 < kevlar_work> I highly doubt you're going to get a significant
performance benefit out of it, and it will only serve to make your code less
readable and anti-idiomatic.
23:07 -!- Peet__ [~Peet__@unaffiliated/peet--/x-2416233] has quit [Ping timeout:
276 seconds]
23:07 < itrekkie> why not, rolling a really basic jit would hopefully
speedup vs the switch dispatch statement
23:07 -!- squeese [~squeese@cm-84.209.17.156.getinternet.no] has quit [Remote host
closed the connection]
23:08 < itrekkie> It looks like over 99% of the program execution is in that
switch statement, which is a good thing, but there's not much left to squeeze out
of it I'm afraid :(
23:09 -!- Peet__ [~Peet__@unaffiliated/peet--/x-2416233] has joined #go-nuts
23:09 -!- xash [~xash@d004144.adsl.hansenet.de] has joined #go-nuts
23:09 < kevlar_work> if you're worried about the switch overhead (which I
presume is small; maybe post the output of pprof lines for vm.Execute?) do
something similar to what iant did for his parser
23:09 < kevlar_work> type stateFun func() stateFun
23:09 < kevlar_work> then your loop is just state = state()
23:10 -!- wallerdev [~wallerdev@c-68-60-43-43.hsd1.mi.comcast.net] has quit [Quit:
wallerdev]
23:10 -!- patcoll [~patcollin@173-13-48-166-Pennsylvania.hfc.comcastbusiness.net]
has quit [Remote host closed the connection]
23:10 < exch> that doesn't really apply to a VM
23:10 < itrekkie> is there an option to get annotated source with hotspots
labeled?
23:11 -!- patcoll [~patcollin@173-13-48-166-Pennsylvania.hfc.comcastbusiness.net]
has joined #go-nuts
23:11 < kevlar_work> itrekkie, that's what the "list" command in pprof gives
you
23:11 < kevlar_work> (as described in the profiling blog post I linked you
;-))
23:11 -!- patcoll [~patcollin@173-13-48-166-Pennsylvania.hfc.comcastbusiness.net]
has quit [Client Quit]
23:11 < itrekkie> thank you :)
23:11 < kevlar_work> exch, it's not directly relatable, but you can use the
same optimization
23:12 < exch> kevlar_work: it's not really an optimization in this case
Function calls carry their own overhead
23:12 < exch> possibly more than a switch statement
23:12 < kevlar_work> definitely more than a switch statement itself, but the
branch predictor and added clarity for the inliner could speed it up
23:13 < qeed> maybe just use C if you want speed that much
23:13 < itrekkie> what about a disassembly level profiling view?
23:13 < kevlar_work> itrekkie, it's all there.
23:13 < kevlar_work> but really
23:13 < itrekkie> no way I'm going back to C, go is way more fun
23:14 < kevlar_work> honestly, I think you're getting past the fun part when
you start using unsafe
23:14 < itrekkie> well, if it's just a little hack to execute some generated
code, I don't think it would be too bad
23:14 < kevlar_work> nopaste the pprof list for your vm.execute
23:15 < kevlar_work> it would be bigger than a little hack, I'm afraid
23:15 < itrekkie> it would be pretty exciting to have a basic
code-generation library for go, lots of uses for it :)
23:15 -!- iant [~iant@216.239.45.130] has joined #go-nuts
23:15 -!- mode/#go-nuts [+v iant] by ChanServ
23:15 < kevlar_work> oh dear lord please no.
23:16 < itrekkie> I'm still trying to figure out gopprof, sorry for the
delay
23:16 < kevlar_work> it's the same thing you did to get the svg, except you
use "list <func>" instead of "web"
23:17 < itrekkie> got it, thanks :)
23:18 < itrekkie> http://pastie.org/2505585
23:20 < kevlar_work> so, I am not sure why there are so many samples on the
return case, but other than that it looks like a majority of your time is being
spent in the slices
23:21 < kevlar_work> can you relink the full code again?
23:21 -!- nekoh [~nekoh@dslb-178-004-068-194.pools.arcor-ip.net] has quit [Quit:
nekoh]
23:21 < itrekkie> how do you mean?
23:21 < kevlar_work> the link to the gist or pastie or github or whatever
that has the full code for this file
23:22 < kevlar_work> I'm wondering if we can't speed up your slice accesses.
23:22 < itrekkie> to just this file?  I'll put it up
23:22 < kevlar_work> I seem to recall machine.stack machine.frames, etc all
being in this file
23:23 < itrekkie> http://pastie.org/2505598
23:25 < kevlar_work> yeah, I would define constants at the top const (
StackDepth = 128; FrameDepth = 128; Memory = 128 ) or something and then turn all
of those slices into arrays: type Machine struct {...  stack [StackDepth]int64
...}
23:25 < kevlar_work> which makes your New into New(program) *Machine {
return &Machine{program: program} }
23:26 < itrekkie> what's the impact of array vs.  slice?
23:26 -!- espeed [~espeed@63.246.231.57] has quit [Quit: Leaving]
23:26 < kevlar_work> the arrays could have better memory locality
23:27 < kevlar_work> and should all be allocated in one fell swoop
23:27 < itrekkie> another there I was wondering is if the instruction list
(from function) has bad locality, since it's jsut a list of pointers
23:27 < kevlar_work> also, is function.Instructions a map[int64]Intruction?
23:28 < itrekkie> no, Instructions []*instruction.Instruction
23:28 < kevlar_work> ah, cool.
23:28 < kevlar_work> no maps at all in this?
23:29 < itrekkie> no, but that's the issue I was thinking of
23:29 < kevlar_work> also, and this shouldn't help, but you might want to
try at the top of Execute do something like var ( stack, frames = machine.stack,
machine.frames )
23:30 < kevlar_work> and replace all machine.stack and machine.frames with
those
23:30 < itrekkie> the dispatch loop spends a lot of time fetching
instructions from that slice, and they're pointers, so there's a pointer
indirection and possibly bad locality
23:30 < kevlar_work> how big is Instruction?
23:30 < kevlar_work> if it's only a few words, you could make it
Instructions []instruction.Instruction
23:30 < itrekkie> I'm not sure, it's an int64 + size of constant
23:31 < kevlar_work> there's not really any point in it being a pointer
unless you're expecting to change it and someone else might have its address
23:31 < kevlar_work> (or if you're passing it as an argument to a function a
lot, which you aren't)
23:32 < itrekkie> I did try changing the instruction slice to values, but
unfortunately it causes some weird bugs
23:32 < kevlar_work> hmm, you might want to track those down
23:32 < kevlar_work> it oculd potentially help
23:34 < itrekkie> hm, changing it causes stack access to go too far down
past the start, it's really confusing
23:34 < itrekkie> there's no debugger yet is there?
23:36 < jlaffaye> oh, what is this "dart" thing?  :/
23:37 < f2f> structured web programming :)
23:37 < Ginto8> f2f, and what does that really mean?
23:37 < Ginto8> :P
23:37 < f2f> i wish i knew
23:37 < f2f> waiting for the definition in tomorrow's talk
23:38 < itrekkie> I hope it's like Go, would be nice to use something
similar on both server and client?
23:39 -!- pbgc [~pbgc@bl20-102-248.dsl.telepac.pt] has quit [Quit: Textual IRC
Client: http://www.textualapp.com/]
23:40 < Ginto8> itrekkie, well if it's like go without the concurrency.  I'm
not sure how well concurrency would work in a web client :P
23:41 < Ginto8> but in the strong typing, nice memory model, useful
interfaces, those would all be nice
23:41 < itrekkie> so are we guessing it's a client side type setup, maybe
running on V8?
23:42 < jlaffaye> node.js ? :p
23:43 < f2f> i'd lean towards that guess too
23:43 < kevlar_work> itrekkie, what do you mean "too far down past the
start"?
23:44 < exch> I'm guessing a much needed replacement to javascript
23:44 < f2f> jlaffaye: presumably on the client side, to make all the
hash-magic more palatable?
23:44 < itrekkie> I mean that the stack operations hit negative for some
reason
23:44 < itrekkie> that doesn't seem to happen when I deal with pointers to
the instructions
23:44 < kevlar_work> yeah, that change shouldn't cause that, so there is
probably a bug somewhere else
23:44 < itrekkie> joy :D
23:44 < kevlar_work> also, you might want to not do instr := in every loop
23:45 < f2f> kevlar_work: he found performance decreased when removing the
:= at the top of the for{}
23:45 < itrekkie> I tried doing a var isntr outside the loop, and it
actually slows it down
23:45 < kevlar_work> even now that you took out the function calls?
23:45 < itrekkie> yup
23:46 < kevlar_work> I would make that change and profile it and see where
the new time is spent
23:46 -!- iXeno_ [~ixeno@106.80-203-229.nextgentel.com] has joined #go-nuts
23:47 < kevlar_work> normally when that happens it's because you're riding
the split stack boundary in an inner loop
23:47 -!- iXeno [~ixeno@106.80-203-229.nextgentel.com] has quit [Ping timeout: 260
seconds]
23:48 < kevlar_work> (which can sometimes be fixed by adding a closure
around a call somewhere up the stack)
23:48 < itrekkie> okay, I might be lying, it might be faster now, the
difference is small
23:49 < f2f> did you try compiling with -s?
23:49 < itrekkie> nope, what's -s do>
23:49 < f2f> disables the escape analysis so more things are allocated on
the heap
23:50 < f2f> if you're riding the stack boundary that may keep you below it,
at the price of having more things on the heap
23:50 < itrekkie> hm, didn't know we had escape analysis, cool
23:50 < f2f> it was reported to increase performance in at least one
real-life app
23:51 < itrekkie> this maybe be stupid, but shouldn't it _decrease_
performance?  I thought escape analysis was an optimization
23:52 < qeed> maybe just try it its a flag switch heh
23:53 < smcquay> So I tried implementing a Monte Carlo Pi calculation using
goroutines and channels and was slightly disappointed by the performance (I
expected linear scaling to my 8 cpus, but it was good up to 2, and bad
afterwards).  Is this not an intended usecase of the two?
23:53 < itrekkie> dumb things to try first, did you make sure to set
GOMAXPROCS?
23:54 < kevlar_work> !gofaq GOMAXPROCS
23:54 < GoBIR> kevlar_work: Q. Why GOMAXPROCS -
http://golang.org/doc/go_faq.html#Why_GOMAXPROCS
23:54 < kevlar_work> smcquay, see that link.
23:55 < exch> judging by his question, I am guessing he already knows about
GOMAXPROCS :)
23:55 -!- replore [~replore@203.152.213.161.static.zoot.jp] has joined #go-nuts
23:55 -!- replore [~replore@203.152.213.161.static.zoot.jp] has quit [Read error:
Connection reset by peer]
23:55 < kevlar_work> tl;dr: the scheduler is currently not smart enough for
all applications of goroutines+channels to get better as gomaxprocs increases.
23:55 < itrekkie> -s doesn't seem to have any impact
23:56 < itrekkie> -B does though :)
23:56 < kevlar_work> exch, the question is "Why does using GOMAXPROCS > 1
sometimes make my program slower?"
23:56 -!- replore_ [~replore@203.152.213.161.static.zoot.jp] has joined #go-nuts
23:56 < exch> yea, but that's not really what he asked :p
23:56 < f2f> itrekkie: you should've seen newstack() in the function profile
if that was the case
23:56 < exch> well, in a ruond about sort of way, perhaps it is
23:58 < kevlar_work> itrekkie, as I said, I would figure out why inlining
the instruction kills it
23:58 < smcquay> eyah, I set GOMAXPROCS and control the quantity of
goroutines accordingly
23:58 < kevlar_work> smcquay, that doesn't change my answer
23:59 < kevlar_work> smcquay, unless you have really long-running
computations that don't ever block (no channel communication, no syscalls, no i/o)
you are relatively likely to see performance degrade instead of improve
23:59 < smcquay> kevlar_work: yeah, I recall reading this when I tested it
(a month ago).  I thought I did all my computation and then only at the end do I
send information into the channel.
--- Log closed Fri Sep 09 00:00:23 2011