--- Log opened Fri Aug 05 00:00:19 2011
00:02 < scyth> finally, a #c type discussion :))
00:02 -!- thomas_b [~thomasb@cm-84.215.47.51.getinternet.no] has quit [Ping
timeout: 264 seconds]
00:02 < scyth> I always wondered when it's gonna start happening :)
00:08 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts
00:14 < jlaffaye> mmh Im far from mastering netchan
00:14 < jlaffaye> got EOF :'(
00:20 < jlaffaye> Ok, I was exiting to early.  Sleeping one nanosecond fixed
the problem.
00:21 < Tv__> jlaffaye: s/fixed/hid/
00:21 < str1ngs> sleeping might not be enough.  you might need to actually
block
00:21 < Tv__> jlaffaye: you probably need a notification mechanism added
there
00:22 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has joined
#go-nuts
00:22 < jlaffaye> Im playing with a dumb server and dumb client ;)
00:24 < jlaffaye> Tv__: what do you mean?
00:29 < angasule> jlaffaye: what protocol?
00:30 < jlaffaye> tcp
00:31 -!- stalled [~stalled@unaffiliated/stalled] has quit [Ping timeout: 252
seconds]
00:33 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has quit [Ping
timeout: 260 seconds]
00:35 -!- squeese [~squeese@cm-84.209.17.156.getinternet.no] has quit [Remote host
closed the connection]
00:36 < f2f> package version
00:36 < f2f> autogenerated by the codereview plugin
00:36 -!- flaguy48 [~gmallard@user-0c6s350.cable.mindspring.com] has joined
#go-nuts
00:44 -!- stalled [~stalled@unaffiliated/stalled] has joined #go-nuts
00:48 -!- sniper506th [~sniper506@rrcs-70-61-192-18.midsouth.biz.rr.com] has quit
[Quit: Leaving...]
00:59 -!- moraes [~moraes@189.103.188.201] has quit [Ping timeout: 276 seconds]
01:17 < str1ngs> f2f: package version for go . as related to the above
issue?
01:27 -!- htoothrot [~mux@66-169-185-121.dhcp.ftwo.tx.charter.com] has quit [Ping
timeout: 260 seconds]
01:28 < f2f> yes.  one that's updated only when codereview users commit
issues (i.e., only when people from google commit issues, and they all use hg
anyway).
01:28 < f2f> so you can extract the sources without any hg info and still
have 8g -V work
01:28 < str1ngs> doest that exist now or you are suggesting it as a
solution?
01:29 < f2f> suggesting it as a possible solution, although i doubt taking
the name 'version' for a package of one const is justified.
01:29 < str1ngs> ya I dont know enough about the codereview tool
01:29 -!- htoothrot [~mux@66-169-185-121.dhcp.ftwo.tx.charter.com] has joined
#go-nuts
01:30 < str1ngs> for git you can fish in .git without git and get stuff .
but hg I'm clueless
01:30 < str1ngs> and it still requires a .hg tree but thats not so bad.
01:30 < f2f> codereview is just a python script.  it's capable of rewriting
a file with necessary info, i'm sure
01:30 < f2f> i mean one can have it do so, not that it's doing so at the
moment
01:30 < str1ngs> http://code.google.com/p/go/issues/detail?id=2133 here's
the link to the issue
01:30 < f2f> s/have/rewrite/
01:31 < f2f> yes, i saw it
01:31 < str1ngs> if you have stuff in mind maybe add it, if you can
01:31 < str1ngs> this is not a game breaking issue.  but seems I get hit
without on more then one occation
01:31 < f2f> wait.  wrong.  8g isn't written in go :)
01:31 < f2f> my idea is stupid
01:31 < str1ngs> hit with it*
01:33 < f2f> they'll have to do something eventually, when go is more stable
and source-only repos appear that don't need to track everything from hg all the
time.
01:33 < str1ngs> imo the best solution it probably to hardcode release
versions into a file.  and tarball them
01:33 < str1ngs> anything coming from hg build can use version.bash
01:34 < f2f> imagine something like the gcc 2.95 vs 3.* fiasco
01:34 < str1ngs> not aware of that what happened there?
01:34 < f2f> a lot of distros were slow to move to 3.*
01:35 < f2f> openbsd was one of them, i believe.  mplayer was 2.95 for long
too.  that's why it's still maintained
01:35 < str1ngs> gcc and glibc are bad for breakage though.  I dont blame
people for not upgrading
01:35 < f2f> or was maintained
01:36 < str1ngs> people still use 4.5
01:36 < f2f> latest 2.95 release is in 03, when mainline gcc was at 3.3..6
01:38 < str1ngs> last issue I reported.  there was a 3meg binary in the hg
tree . how nobody noticed was beyond me hehe
01:38 < str1ngs> and I blame a mac guy because it was Mach-O :P
01:39 < str1ngs> actually I know how it got missed eval/eval would not be
that obvious in a code review
01:40 < str1ngs> and with a binary no diff probably for ir
01:40 < str1ngs> it*
01:44 -!- miker2 [~miker2@pool-96-245-224-59.phlapa.fios.verizon.net] has joined
#go-nuts
01:44 < jlaffaye> Im not sure how to handle Sender on the exporter side of a
netchan
01:45 < f2f> :)
01:45 < jlaffaye> cases like the importer doesnt import it, or it import it
but exit, ...
01:46 < f2f> sorry, haven't done anything with netchans
01:46 < str1ngs> jlaffaye: I think there is an example on the netchan doc
page or thats not enough?
01:47 < jlaffaye> the example shows the importer side
01:48 < jlaffaye> Im worried about the exporter side
01:48 < str1ngs> ya, I knew this before but i only played with it once
01:48 < str1ngs> so its not fresh in my old mind :P
01:49 < jlaffaye> basically I have a server, which listen forever and a
client which send a message to the server, and get a message from the server then
exit
01:50 < jlaffaye> the problem is when I run the client for the second time,
the server get a broken pipe to send the message to the client
01:50 < str1ngs> are you useing Drain?
01:51 < str1ngs> also maybe look at Sync
01:52 < str1ngs> seem Importer on has Drain which iirc is probably what you
need
01:53 < str1ngs> at that the time I played with netchan it didnt exist and
it caused problems like this.  so I switched to rpc
01:58 -!- benjack [~benjack@bb220-255-251-77.singnet.com.sg] has joined #go-nuts
01:59 -!- Dr_Who [~tgall_foo@linaro/tgall-foo] has joined #go-nuts
02:05 -!- bthomson [~bthomson@c-68-33-5-232.hsd1.va.comcast.net] has joined
#go-nuts
02:06 -!- miker2 [~miker2@pool-96-245-224-59.phlapa.fios.verizon.net] has quit
[Ping timeout: 250 seconds]
02:12 -!- Dr_Who [~tgall_foo@linaro/tgall-foo] has quit [Quit: ZZZZZzzzzz]
02:18 -!- jhawk28 [~jhawk28@user-387c58d.cable.mindspring.com] has quit [Quit:
Linkinus - http://linkinus.com]
02:29 -!- mikespook [~mikespook@116.21.254.251] has joined #go-nuts
02:48 -!- gridaphobe [~gridaphob@cpe-74-68-151-24.nyc.res.rr.com] has quit [Quit:
Leaving]
02:54 -!- benjack [~benjack@bb220-255-251-77.singnet.com.sg] has quit [Quit:
Leaving.]
02:56 -!- benjack [~benjack@bb220-255-251-77.singnet.com.sg] has joined #go-nuts
02:57 -!- benjack [~benjack@bb220-255-251-77.singnet.com.sg] has quit [Client
Quit]
02:59 -!- benjack [~benjack@bb220-255-251-77.singnet.com.sg] has joined #go-nuts
03:00 -!- angasule [~angasule@190.2.33.49] has quit [Ping timeout: 250 seconds]
03:04 -!- benjack [~benjack@bb220-255-251-77.singnet.com.sg] has quit [Ping
timeout: 250 seconds]
03:07 -!- meling [~meling@100.81-167-33.customer.lyse.net] has quit [Read error:
Connection reset by peer]
03:08 -!- meling [~meling@100.81-167-33.customer.lyse.net] has joined #go-nuts
03:10 -!- xcombelle [~xcombelle@AToulouse-551-1-60-4.w92-146.abo.wanadoo.fr] has
joined #go-nuts
03:12 -!- keithcascio [~keithcasc@nat/google/x-inoxkdvultfeotlq] has quit [Quit:
Leaving]
03:16 -!- dfr|mac [~dfr|work@ool-18baf7e7.dyn.optonline.net] has joined #go-nuts
03:17 -!- nicka [~lerp@unaffiliated/nicka] has quit [Quit: Leaving.]
03:19 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has joined
#go-nuts
03:37 -!- dfr|mac [~dfr|work@ool-18baf7e7.dyn.optonline.net] has quit [Remote host
closed the connection]
03:37 -!- qeed [~qeed@adsl-98-85-37-144.mco.bellsouth.net] has quit [Quit:
Leaving]
03:38 -!- Jamra [~Jamra@89-139-63-150.bb.netvision.net.il] has joined #go-nuts
03:48 -!- Wiz126 [Wiz@h229.120.232.68.dynamic.ip.windstream.net] has quit [Ping
timeout: 246 seconds]
03:52 -!- Queue29 [~Queue29@egress-w.sfo1.yelpcorp.com] has quit [Remote host
closed the connection]
03:54 -!- Wiz126 [Wiz@h229.120.232.68.dynamic.ip.windstream.net] has joined
#go-nuts
04:11 -!- Jamra [~Jamra@89-139-63-150.bb.netvision.net.il] has quit [Ping timeout:
255 seconds]
04:12 -!- rcrowley [~rcrowley@c-71-202-44-233.hsd1.ca.comcast.net] has quit [Quit:
Computer has gone to sleep.]
04:17 -!- vmil86 [~vmil86@88.118.36.96] has joined #go-nuts
04:23 -!- odoacre [~antonio@218.241.169.34] has joined #go-nuts
04:24 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts
04:30 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has quit [Ping
timeout: 240 seconds]
04:31 -!- moraes [~moraes@189.103.188.201] has joined #go-nuts
04:34 -!- niemeyer [~niemeyer@200.102.194.39] has quit [Ping timeout: 240 seconds]
04:46 -!- Queue29 [~Queue29@173-8-182-114-SFBA.hfc.comcastbusiness.net] has joined
#go-nuts
04:56 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
05:09 -!- fabled [~fabled@83.145.235.194] has joined #go-nuts
05:16 -!- Jamra [~Jamra@46-116-186-208.bb.netvision.net.il] has joined #go-nuts
05:20 -!- thomas_b [~thomasb@cm-84.215.47.51.getinternet.no] has joined #go-nuts
05:30 -!- mikespook [~mikespook@116.21.254.251] has quit [Quit: Leaving.]
05:36 -!- Jamra [~Jamra@46-116-186-208.bb.netvision.net.il] has quit [Ping
timeout: 255 seconds]
06:06 -!- Queue29 [~Queue29@173-8-182-114-SFBA.hfc.comcastbusiness.net] has quit
[Remote host closed the connection]
06:09 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
06:25 -!- noodles775 [~michael@canonical/launchpad/noodles775] has joined #go-nuts
06:35 -!- yogib [~yogib@131.234.59.64] has joined #go-nuts
06:36 -!- dk_ [~dee@213-190-51-108.static.zebra.lt] has joined #go-nuts
06:37 < dk_> hello
06:40 < dk_> Is it possible to call variadic C function from Go language
(with cgo tool)?
06:41 < dk_> C function is CURLcode curl_easy_setopt(CURL *curl, CURLoption
option, ...);
06:42 < cbeck> http://code.google.com/p/go/issues/detail?id=1800
06:43 < cbeck> Possibly with SWIG, but I'm not sure
06:43 < cbeck> If possible, you can wrap the variadic c func in a
non-variadic one and call that
06:45 < dk_> thanks
06:46 -!- Tv__ [~Tv__@cpe-76-168-227-45.socal.res.rr.com] has quit [Ping timeout:
246 seconds]
06:47 < dk_> then I guess I should write non-variadic C wrapper for this
function
06:49 -!- dk_ [~dee@213-190-51-108.static.zebra.lt] has quit [Remote host closed
the connection]
06:56 -!- sebastianskejoe [~sebastian@56344f29.rev.stofanet.dk] has joined
#go-nuts
07:01 -!- samuell [~samuel@pc2-samuel.uppmax.uu.se] has joined #go-nuts
07:15 -!- erus` [~chatzilla@mailgate.ips-international.com] has joined #go-nuts
07:22 -!- photron [~photron@port-92-201-49-206.dynamic.qsc.de] has joined #go-nuts
07:30 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 264 seconds]
07:38 -!- Wiz126 [Wiz@h229.120.232.68.dynamic.ip.windstream.net] has quit [Ping
timeout: 252 seconds]
07:41 -!- napsy [~luka@193.2.66.6] has joined #go-nuts
08:04 -!- xcombelle [~xcombelle@AToulouse-551-1-60-4.w92-146.abo.wanadoo.fr] has
quit [Ping timeout: 240 seconds]
08:07 -!- Fish [~Fish@exo3753.pck.nerim.net] has quit [Quit: WeeChat 0.3.5]
08:08 -!- ronnyy [~quassel@p4FF1C46C.dip0.t-ipconnect.de] has joined #go-nuts
08:10 -!- seb32 [~sebastian@89.246.67.229] has joined #go-nuts
08:10 -!- Fish [~Fish@exo3753.pck.nerim.net] has joined #go-nuts
08:11 -!- crunge [~Crunge@about/security/staff/crunge] has quit [Ping timeout: 240
seconds]
08:11 -!- GoBIR_ [~gobir@70-90-168-189-SFBACalifornia.hfc.comcastbusiness.net] has
quit [Ping timeout: 260 seconds]
08:14 -!- sahid [~sahid@LNeuilly-152-21-22-10.w193-253.abo.wanadoo.fr] has joined
#go-nuts
08:15 -!- xcombelle [~xcombelle@AToulouse-551-1-152-231.w109-214.abo.wanadoo.fr]
has joined #go-nuts
08:18 -!- yogib [~yogib@131.234.59.64] has quit [Read error: Connection reset by
peer]
08:18 -!- yogib [~yogib@131.234.59.64] has joined #go-nuts
08:24 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
08:25 < aiju> 10:17 < Tv__> [01:23:13] i have very little inclination
to touch hg, so i'm not gonna fix that part; migrate to git and i'll do it ;)
08:25 < aiju> 10:17 < nicka> [01:28:01] are you aiju in disguise
08:25 < aiju> does not compute
08:26 < aiju> i don't participate in this silly hg vs git war
08:29 < moraes> yes!  finally someone reasonable.
08:39 -!- ronnyy [~quassel@p4FF1C46C.dip0.t-ipconnect.de] has quit [Remote host
closed the connection]
08:46 -!- GoBIR [~gobir@70-90-168-189-SFBACalifornia.hfc.comcastbusiness.net] has
joined #go-nuts
08:55 -!- GoBIR [~gobir@70-90-168-189-SFBACalifornia.hfc.comcastbusiness.net] has
quit [Ping timeout: 240 seconds]
08:58 -!- GoBIR [~gobir@70-90-168-189-SFBACalifornia.hfc.comcastbusiness.net] has
joined #go-nuts
09:14 -!- virtualsue [~chatzilla@nat/cisco/x-klbfkdotqplcumcf] has joined #go-nuts
09:16 -!- rlab [~Miranda@80-110-95-178.pool.ukrtel.net] has joined #go-nuts
09:21 -!- EvilJStoker [jstoker@unaffiliated/jstoker] has quit [Ping timeout: 240
seconds]
09:23 -!- abomb [~abomb@pool-71-160-32-70.lsanca.dsl-w.verizon.net] has joined
#go-nuts
09:26 -!- GoBIR [~gobir@70-90-168-189-SFBACalifornia.hfc.comcastbusiness.net] has
quit [Ping timeout: 250 seconds]
09:30 -!- EvilJStoker [jstoker@unaffiliated/jstoker] has joined #go-nuts
09:33 -!- noodles775 [~michael@canonical/launchpad/noodles775] has quit [Ping
timeout: 250 seconds]
09:33 -!- abomb999 [~abomb@pool-71-160-32-70.lsanca.dsl-w.verizon.net] has quit
[Ping timeout: 250 seconds]
09:34 -!- sebastianskejoe [~sebastian@56344f29.rev.stofanet.dk] has quit [Quit:
Lost terminal]
09:35 -!- noodles775 [~michael@g229200039.adsl.alicedsl.de] has joined #go-nuts
09:35 -!- noodles775 [~michael@g229200039.adsl.alicedsl.de] has quit [Changing
host]
09:35 -!- noodles775 [~michael@canonical/launchpad/noodles775] has joined #go-nuts
09:36 < xyproto> What github-projects are people here working on these days?
09:36 < xyproto> build-systems for go?  git rewritten in go?  editors?
09:37 < xyproto> (or other github-like places)
09:41 < zozoR> go-sdl
09:41 < zozoR> :3
09:51 -!- wrtp [~rog@host-92-30-154-96.as13285.net] has joined #go-nuts
09:55 -!- GoBIR [~gobir@70-90-168-189-SFBACalifornia.hfc.comcastbusiness.net] has
joined #go-nuts
09:57 -!- jstemmer [~cheetah@mrpwn.stemmertech.com] has quit [Ping timeout: 240
seconds]
09:59 < moraes> xyproto, plenty: http://go-lang.cat-v.org/
10:00 < aiju> xyproto: if i make a github-like place, it's going to be
called peenemünde (parodying launchpad)
10:02 < moraes> also it would be a nice way to show that package names can
have special characters
10:08 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Read error:
Connection reset by peer]
10:12 -!- squeese [~squeese@cm-84.209.17.156.getinternet.no] has joined #go-nuts
10:20 -!- tvw [~tv@212.79.9.150] has joined #go-nuts
10:23 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
10:31 -!- nekoh [~nekoh@dslb-178-004-029-086.pools.arcor-ip.net] has joined
#go-nuts
10:49 -!- berak [~chatzilla@89.204.153.136] has joined #go-nuts
10:59 < skelterjohn> xyproto: you probably know about
github.com/skelterjohn/go-gb
10:59 < skelterjohn> since i'm not shy about linking it
11:07 -!- moraes [~moraes@189.103.188.201] has quit [Ping timeout: 252 seconds]
11:15 < zozoR> would be nice if someone made a lightweight IDE for go
11:15 < zozoR> in go
11:15 < zozoR> :D
11:16 < skelterjohn> i tried once, but i failed because i suck at
html/js/css
11:16 < str1ngs> ther is one.  VIM!
11:16 < skelterjohn> VIM is written in go?
11:16 < zozoR> skelterjohn, you tried making it in html?  :o
11:16 < zozoR> nice idea!  i like that :o
11:17 * zozoR is thinking HARD
11:17 < str1ngs> exec.Command("vim").Run() ..  does that count?
11:18 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts
11:18 < aiju> 13:15 < zozoR> would be nice if someone made a
lightweight IDE for go
11:18 < aiju> someone port ed to go
11:18 -!- napsy [~luka@193.2.66.6] has quit [Quit: Lost terminal]
11:18 < zozoR> ?
11:18 < str1ngs> actually that would be a good project
11:18 < str1ngs> does go still require ed to build?
11:18 < aiju> haha
11:18 < aiju> i hope yes
11:19 < str1ngs> sed would be nice in go also.
11:19 -!- ronnyy [~quassel@p4FF1C46C.dip0.t-ipconnect.de] has joined #go-nuts
11:19 -!- odoacre [~antonio@218.241.169.34] has quit [Quit: Leaving]
11:20 < str1ngs> or something like it anyways.
11:36 -!- tncardoso [~thiago@189.59.176.164.dynamic.adsl.gvt.net.br] has joined
#go-nuts
11:37 -!- napsy [~luka@193.2.66.6] has joined #go-nuts
11:38 < xyproto> skelterjohn: I've heard about go-gb, and have high hopes
for it, but am yet to try it.  I was thinking about trying it out right now.
What's a good way to try it out?
11:39 < aiju> run your kernel image through it!
11:39 < jlaffaye> I love the Makefiles generation :)
11:40 < aiju> what does the g even stand for?
11:40 < xyproto> zozoR: there's "golangide", which is based on lightide.
There's a package for it in Arch Linux.
11:41 < zozoR> ^^
11:41 < xyproto> (which I maintain, incidentally)
11:42 < xyproto> It has some quirks and I have not tested it extensively,
but it seems to be promising.
11:54 < skelterjohn> xyproto: if you're using the release version of go,
goinstall github.com/skelterjohn/go-gb/gb
11:54 < skelterjohn> and take a look at go-gb.googlecode.com for example
usage
11:55 < skelterjohn> golangide/liteide enforce a directory structure that i
don't like
11:55 -!- xcombelle [~xcombelle@AToulouse-551-1-152-231.w109-214.abo.wanadoo.fr]
has quit [Read error: Operation timed out]
11:56 -!- miker2 [~miker2@64.55.31.190] has joined #go-nuts
11:56 < aiju> sam doesn't enforce any directory structure
11:56 -!- xcombelle [~xcombelle@AToulouse-551-1-152-231.w109-214.abo.wanadoo.fr]
has joined #go-nuts
11:56 < aiju> awesome, isn't it?
11:56 < exch> magical
11:57 < skelterjohn> it's also not very good at building go projects
11:58 < aiju> huh?
11:58 < aiju> it's very good at it
11:58 < aiju> you type !make and it builds!
11:58 < skelterjohn> so, one target at a time
11:59 < aiju> "one target at a time"?
11:59 < aiju> !make -j2?
11:59 < skelterjohn> unless you want to spend an hour making a set of
makefiles that will build a group of targets correctly
11:59 < aiju> skelterjohn: then use your own gb tool?
11:59 < aiju> IDEs are as far from UNIX philosophy as you can get
12:00 < jlaffaye> Where is my closed() ? :'(
12:00 < aiju> jlaffaye: closed was racy
12:00 < skelterjohn> i buy that, about IDEs
12:00 < skelterjohn> but we were talking about IDEs :)
12:00 < exch> jlaffaye: its gone :) It caused race conditions, so wasn't
very useful to begin with
12:00 < skelterjohn> well, one thing about closed() is you know it never
gave you a false positive
12:00 < skelterjohn> so it did give *some* information
12:01 < aiju> still, closed was easy to abuse
12:02 < exch> Does len(channel) still work?  I imagine that is equally racey
12:03 < skelterjohn> potentially racy, but less abused i'd think
12:03 -!- napsy [~luka@193.2.66.6] has quit [Quit: leaving]
12:06 -!- schilly [~schilly@boxen.math.washington.edu] has quit [Ping timeout: 264
seconds]
12:13 -!- tgall_foo [~tgall@206.9.88.154] has joined #go-nuts
12:16 < uriel> anyone knows if Gustavo Niemeyer hangs out in irc?
12:20 < xyproto> skelterjohn: what's a better directory structure, so that I
may perhaps improve it?
12:20 < xyproto> skelterjohn: also, gb installed perfectly fine, after I
updated go to the latest hg version
12:23 < xyproto> skelterjohn: I just tried gb.  I removed the Makefile,
typed gb and it produced a binary.  Great stuff!  :)
12:24 < xyproto> skelterjohn: but, if there's only one .go file in a
directory, how can I tell gb to use the name of the file instead of of the
directory?
12:24 < xyproto> skelterjohn: (for the name of the produced executable)
12:27 < xyproto> skelterjohn: wish for gb: to use the packagename as the
default executable name instead of the directory, and have a switch to select
between using the directory name, package name or the name of the file that
contains func main
12:28 < xyproto> skelterjohn: if I'm not too demanding, after having tried
it for just a minute ;)
12:28 < xyproto> I know, I know, lurk moar?
12:29 < fluffle> uriel: [05:34] --- niemeyer [~niemeyer@200.102.194.39] has
quit [Ping timeout: 240 seconds]
12:29 < fluffle> that's BST
12:29 < xyproto> skelterjohn: but hey, I'm convinced, I'm a gb fan now
12:29 < uriel> fluffle: thanks
12:36 < str1ngs> uriel: he does on and off uriel
12:37 -!- yogib [~yogib@131.234.59.64] has quit [Read error: Connection reset by
peer]
12:38 -!- fabled [~fabled@83.145.235.194] has quit [Quit: Ex-Chat]
12:38 -!- yogib [~yogib@131.234.59.64] has joined #go-nuts
12:39 -!- niemeyer [~niemeyer@200-102-194-39.pltce701.dsl.brasiltelecom.net.br]
has joined #go-nuts
12:43 < xyproto> skelterjohn: also, how do I clean with gb, so that the
produced executables are cleaned as well?  I tried both -c and -N
12:43 < uriel> this reminds me another CommonMistake: close() should always
be done by the writter!
12:43 < uriel> (and even then, depending on channels getting closed is
usually not the way to go)
12:46 -!- qeed [~qeed@adsl-98-85-59-142.mco.bellsouth.net] has joined #go-nuts
12:48 -!- squeese [~squeese@cm-84.209.17.156.getinternet.no] has quit [Remote host
closed the connection]
12:50 -!- knowmerc1 [~knowmercy@mobile-198-228-224-237.mycingular.net] has joined
#go-nuts
12:53 < wrtp> uriel: i disagree.  that's precisely why the close primitive
is there.
12:54 < wrtp> uriel: niemeyer is usually around here from around midday GMT
12:54 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Remote host closed
the connection]
12:55 < aiju> the writer can use close() to signal something like EOF
12:55 < aiju> actually the reader can use it, too, to signal that it needs
no further data
12:59 -!- Dr_Who [~tgall_foo@206.9.88.154] has joined #go-nuts
12:59 -!- Dr_Who [~tgall_foo@206.9.88.154] has quit [Changing host]
12:59 -!- Dr_Who [~tgall_foo@linaro/tgall-foo] has joined #go-nuts
13:02 < niemeyer> wrtp: Yo
13:03 -!- Wiz126 [Wiz@h229.120.232.68.dynamic.ip.windstream.net] has joined
#go-nuts
13:03 < niemeyer> uriel: I'm here, but I lost any messages you may have sent
before I joined
13:03 < wrtp> niemeyer: hiya!
13:03 < wrtp> aiju: the reader should never call close()
13:03 < wrtp> aiju: and if you tried it, you'd quickly find out why
13:07 -!- Dr_Who [~tgall_foo@linaro/tgall-foo] has quit [Quit: ZZZZZzzzzz]
13:07 -!- sniper506th [~sniper506@rrcs-70-61-192-18.midsouth.biz.rr.com] has
joined #go-nuts
13:11 -!- ronnyy [~quassel@p4FF1C46C.dip0.t-ipconnect.de] has quit [Remote host
closed the connection]
13:13 < f2f> the problem with close i encounter most is that you close a
channel and get on with life thinking it's all done, but often there's a lot of
data still in it.
13:14 < knowmerc1> though the reader could call close if they neededto
13:14 < fluffle> ok
13:14 < knowmerc1> but I imagine that only makes sense in very small edge
cases
13:14 < fluffle> erp, this isn't the right window
13:14 < f2f> so anything that the closer does afterwards may impact the
goroutines servicing the just-closed-but-not-yet-dead channel
13:15 < knowmerc1> probably should only be used for shutdown type situations
13:16 < knowmerc1> "I can no longer do work...  close" etc
13:16 < wrtp> knowmerc1: the reader SHOULD NEVER call close!
13:17 < knowmerc1> I agree, I'm just trying to make a case for why the go
devs created a case that you *could* if you felt like it
13:17 < knowmerc1> :)
13:17 < wrtp> knowmerc1: the only reason why you can is that channels have
only got one handle for both ends
13:18 < wrtp> f2f: i know what you mean, but only for unbuffered chans -
close is asynchronous whereas sending an "EOF value" is synchronous so you know
that the other end has got eof
13:19 -!- xcombelle [~xcombelle@AToulouse-551-1-152-231.w109-214.abo.wanadoo.fr]
has quit [Quit: I am a manual virus, please copy me to your quit message.]
13:20 < knowmerc1> ok
13:21 -!- angasule [~angasule@190.2.33.49] has quit [Ping timeout: 264 seconds]
13:23 < skelterjohn|work> maybe you shouldn't be able to close a <-chan
type
13:23 < skelterjohn|work> only chan and chan<-
13:24 -!- artefon [~thiago@189.59.176.164.dynamic.adsl.gvt.net.br] has joined
#go-nuts
13:26 -!- tncardoso [~thiago@189.59.176.164.dynamic.adsl.gvt.net.br] has quit
[Ping timeout: 255 seconds]
13:27 < wrtp> skelterjohn|work: i agree, and i've suggested that in the
past.
13:27 < skelterjohn|work> then a package could give its caller a <-chan
and not worry about it closing for some reason
13:28 < skelterjohn|work> instead of having a runtime panic
13:29 < jnwhiteh> Hrm, it seems like there are plenty of use cases where
closing a <-chan makes sense
13:29 < skelterjohn|work> example?
13:29 < jnwhiteh> any process-oriented system where the consumer needs to
shut down for some reason
13:29 < skelterjohn|work> send a message back to the producer
13:30 < jnwhiteh> *nod* that's another way to do it
13:30 < jnwhiteh> the problem isn't being able to close a <-chan, its the
fact that it can be closed with data still in the buffer that winds up being
unconsumed.
13:30 * jnwhiteh ponders
13:30 < skelterjohn|work> it can still be consumed
13:31 < jnwhiteh> aye if the consumer decides to sink the channel
13:31 < skelterjohn|work> closing just prevents anything that hasn't been
sent already
13:31 < jnwhiteh> since the producer wouldn't know to do that
13:31 < jnwhiteh> aye, I know that =)
13:31 < jnwhiteh> yeah, very interesting question
13:31 < skelterjohn|work> it's very straightforward to send a message back
to the producer
13:31 < skelterjohn|work> it can be confusing to send that message by
closing the read end of the channel
13:32 < jnwhiteh> I'm not disagreeing with you on that, I'm just saying that
its a bit weird to restrict close() to chan and chan<-
13:32 < kuroneko> not really - that makes sense.
13:32 < skelterjohn|work> "weird" and "makes sense" can coexist
13:32 < kuroneko> it doesn't make any sense to close the writing end of a
channel
13:32 < jnwhiteh> skelterjohn|work: of course
13:33 < jnwhiteh> kuroneko: I don't necessarily agree with that statement
13:34 < kuroneko> sorry, I am a bitconfused tonight
13:34 < kuroneko> it's been a long day.  :)
13:35 < kuroneko> sorry, I will maintain that the way it's designed does
make sense
13:35 < kuroneko> the problem with allowing the reading end to be closed is
that it has to be atomic against writes
13:35 < kuroneko> and writes have to have a one-op send if open function
13:36 < jnwhiteh> but I think those problems are already solved
13:36 < jnwhiteh> I should be able to write code the closes the channel and
then consumes anything left on the channel before exiting
13:36 < jnwhiteh> I don't see a reason to restrict me from being able to
write code like that
13:36 < jlaffaye> so finally after testing rpc and netchan I think I will
implement my own protocol with Gobs over UnixListener
13:37 < kuroneko> but you can do that.
13:37 < jnwhiteh> kuroneko: I wouldn't be able to do if you prevented me
from calling close on a <-chan
13:37 < kuroneko> jnwhiteh: the point is the sender closes the channel, and
the receiver uses 2-arg receiver to work out if the channel has been emptied or
not.
13:37 < jnwhiteh> that's one way of writing code, yes.
13:38 < kuroneko> that is The Way.
13:38 < jnwhiteh> no, it's not.
13:38 < jnwhiteh> the language specification shows this clealy
13:38 < kuroneko> the problem with what you're proposing is that it
introduces a race between the close and a sender
13:38 < jnwhiteh> by allowing close on a <-chan
13:38 < jlaffaye> one question though, how would you identify the end of a
message (of a gob entity) on the stream?  :)
13:38 < jnwhiteh> kuroneko: is that conjecture, or do you know for a fact
that's a problem?
13:38 < skelterjohn|work> jnwhiteh: how can the sender not panic on the
send?
13:38 < skelterjohn|work> is there a way to attempt to send on a closed
channel without panicking?
13:38 < jnwhiteh> yes
13:39 < jnwhiteh> ..
13:39 < skelterjohn|work> does select do it?
13:39 < jnwhiteh> as far as I am aware, yes.
13:39 < jnwhiteh> let me check the spec
13:40 < skelterjohn|work> i don't believe it does
13:40 < skelterjohn|work> this code panics: http://pastebin.com/5MskYeu8
13:41 < jnwhiteh> huh, interesting.
13:41 < kuroneko> select is only safe to read from nil channels
13:41 < skelterjohn|work> select works with a channel no one is listening
to, but not one that is closed
13:41 < jnwhiteh> maybe this is a relic of when closed() used to exist
13:41 < jnwhiteh> since it basically requires you to use recover() to
'solve' it
13:41 < kuroneko> closed() vs two-result receive is also a race problem.
13:41 < jnwhiteh> oh yeah, two result receive is much better
13:42 < jnwhiteh> Thanks, I learned something new =)
13:42 < skelterjohn|work> moral of the story: closing without notifying all
potential senders somehow is a race condition that can result in a panic
13:42 < jnwhiteh> the language spec used to say you should not close from a
receiver
13:43 < jnwhiteh> which it would still have to say, since not everyone uses
channel ports
13:43 < jnwhiteh> I wonder why it doesn't make note of this anymore
13:43 < skelterjohn|work> channel ports?
13:43 < jnwhiteh> endpoints, <-chan chan<-
13:43 < skelterjohn|work> ah
13:43 < jnwhiteh> csp/occam terminology
13:43 -!- dlowe [~dlowe@ita4fw1.itasoftware.com] has joined #go-nuts
13:44 -!- dreadlorde [dreadlorde@c-68-42-82-10.hsd1.mi.comcast.net] has joined
#go-nuts
13:44 -!- dfr|mac [~dfr|work@ool-18baf7e7.dyn.optonline.net] has joined #go-nuts
13:46 -!- gridaphobe [~gridaphob@cpe-74-68-151-24.nyc.res.rr.com] has joined
#go-nuts
13:50 -!- moraes [~moraes@189.103.188.201] has joined #go-nuts
13:52 < wrtp> "I should be able to write code the closes the channel and
then consumes anything left on the channel before exiting"
13:52 < wrtp> why would you want to do that?
13:52 < wrtp> jnwhiteh: ^^
13:53 < jnwhiteh> The forced panic and (missing) lines in the spec make it
clear that that is undesirable
13:53 < jnwhiteh> but its not something that doesn't make sense
13:54 < jnwhiteh> I reason about process oriented systems all day long and
it is one way to think about solving certain producer/consumer interactions
13:54 < wrtp> jnwhiteh: but you were arguing that it's something you'd want
to be able to do.  i was wondering why?
13:55 < wrtp> presumably at that stage you know that there is no producer
13:55 < jnwhiteh> what do you mean there is no producer?
13:55 < wrtp> well, if there was a producer, then it would panic if it wrote
a value
13:55 < jnwhiteh> yes, we've gotten there
13:55 < jnwhiteh> and I've said that my comment makes no sense in light of
that now.
13:56 < jnwhiteh> because the spec is forcing these semantics
13:56 < jnwhiteh> yet doesn't make that as clear as it has in past revisions
13:56 < wrtp> oh sorry, i didn't read closely enough
13:56 < wrtp> yeah, it should
13:56 < jnwhiteh> its purely an implementation/optimization that is why this
is disallowed
13:56 < jnwhiteh> it makes perfect sense
13:56 < wrtp> i'm not sure
13:56 < jnwhiteh> not widely used, but it still makes sense =)
13:56 < wrtp> it's there to avoid the race between reader and closer
13:57 < jnwhiteh> certainly
13:57 < jnwhiteh> but we don't avoid countless other races =)
13:57 < wrtp> which sounds like more than optimisation to me
13:57 < jnwhiteh> I'm not saying its a bad idea
13:57 -!- nicka [~lerp@unaffiliated/nicka] has joined #go-nuts
13:57 < jnwhiteh> I just don't agree with the assertion that no one should
ever think about writing programs like that
13:57 < jessta> what happens to a sender blocking on sending to a channel?
13:58 < wrtp> jessta: it unblocks and panics
13:58 < wrtp> jnwhiteh: if you want to write a program like that, don't use
<-chan...
13:58 < jnwhiteh> I understand how to write my programs =)
13:58 < wrtp> jnwhiteh: i do think that closing <-chan should be an error
13:59 < jnwhiteh> I'm not convinced, that's why I wanted to talk about it =)
13:59 -!- Loonacy [~Loonacy@c-67-172-248-248.hsd1.ut.comcast.net] has quit [Ping
timeout: 240 seconds]
13:59 -!- robteix [~robteix@nat/intel/x-zhenlfapzeksltdk] has joined #go-nuts
14:01 < wrtp> jnwhiteh: if that was the rule, then a producer could hand out
a <-chan and guarantee that writing to the channel would never panic
14:01 < jnwhiteh> yes, and that's a good property
14:01 < wrtp> i think so
14:01 < jnwhiteh> one could imagine channel semantics that avoid race
conditions between reader/write/closer are avoided, and sending to the channel
does not need to panic
14:02 < jnwhiteh> now, that would make channels slower and that would be a
bad thing
14:02 < jnwhiteh> this is why I say it seems to me that this is an
optimization
14:02 < jnwhiteh> I'm with you guys, especially in light of the force panic
14:03 < jnwhiteh> Just enjoy talking about it, its incredibly relevant to
what I do
14:04 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
14:05 < wrtp> jnwhiteh: one could imagine it, but is it actually possible?
14:06 < wrtp> i think you're saying it in the same category as, say, Occam
disallowing ALT on send
14:06 < wrtp> i'm not sure
14:07 < wrtp> [caveat: i haven't used occam for a very long time...  that
restriction may have been lifted since!]
14:07 < jnwhiteh> yeah I'm not sure
14:07 < jnwhiteh> I'm more Go than occam
14:07 < wrtp> me too
14:07 < wrtp> i only spent 6 months writing occam
14:07 < jnwhiteh> well, if close is implemented as essentially a tagged
value sent on the channel, and the channel structure knows when a close has
happened, then reads automatically proceed until a close is encountered, you can't
close a channel that is already closed, and a send on a channel gains a return.
14:08 < jnwhiteh> That may be naive thinking, I'm not entirely sure
14:09 -!- jbooth1 [~jay@209.249.216.2] has joined #go-nuts
14:12 < jnwhiteh> I agree, in light of the current semantics, the rules make
sense and enforce a communication pattern that makes obvious sense.
14:12 < jnwhiteh> Sorry for the noise =)
14:12 -!- TheMue [~FMueller@p5DDF5FF0.dip.t-dialin.net] has joined #go-nuts
14:12 < TheMue> re
14:13 -!- replore [~replore@ntkngw133234.kngw.nt.ftth.ppp.infoweb.ne.jp] has
joined #go-nuts
14:14 < wrtp> jnwhiteh: no noise
14:14 < jnwhiteh> wrtp: in my imaginary world where channels are implemented
like I said, is there an obvious issue I'm missing?
14:14 < wrtp> i'll have to think about the tagged value possibility and
whether it makes a difference
14:15 < jnwhiteh> yeah, ping me and let me know if you come up with
something
14:15 < jnwhiteh> I like being wrong when it means I can learn something new
:P
14:15 < wrtp> will do
14:15 < wrtp> (me too)
14:18 -!- Loonacy [~Loonacy@c-67-172-248-248.hsd1.ut.comcast.net] has joined
#go-nuts
14:22 < uriel> niemeyer: just wanted to let you know the ensemble link here
is broken: http://blog.labix.org/2011/08/05/ensemble-go-and-mongodb-at-canonical
14:22 < niemeyer> uriel: Ah, thanks a lot
14:22 < niemeyer> uriel: I noticed a couple of comments this morning about
it, and already fixed it
14:22 < uriel> 12:55 < aiju> actually the reader can use it, too, to
signal that it needs no further data
14:23 < uriel> aiju: this is COMPLETELY WRONG
14:23 < skelterjohn|work> uriel: that has been covered by the last 30
minutes of discussion
14:24 < niemeyer> uriel: Btw, http://labix.org/mgo..  note the second
quote..  just reminded of that page you maintain re.  organizations that use Go
14:24 < uriel> skelterjohn|work: still worth repeating :)
14:25 < uriel> niemeyer: ah, cool!
14:25 < uriel> http://go-lang.cat-v.org/organizations-using-go
14:25 -!- chomp [~chomp@dap-209-166-184-50.pri.tnt-3.pgh.pa.stargate.net] has
joined #go-nuts
14:25 < niemeyer> uriel: Yeah, certainly worth a new entry there :-)
14:27 < uriel> done
14:28 < skelterjohn|work> it's like magic
14:28 < uriel> niemeyer: also, would be interesting if some day you could
write an article about the experience of using go at Canonical
14:29 -!- Sep102_ [~Sep102@c-67-170-74-228.hsd1.wa.comcast.net] has quit [Ping
timeout: 240 seconds]
14:30 < niemeyer> uriel: Sounds like a good idea
14:30 < niemeyer> uriel: Thanks for updating the list there
14:30 < uriel> thanks for the heads up, and for the awesome work on mgo and
everythng else!
14:31 < skelterjohn|work> i wish i had a reason to use a database
14:34 < uriel> skelterjohn|work: heheheh
14:36 * TheMue likes Canonicals decision.
14:36 < exch> the first rule of product design and sale: Don't wait for a
usecase, Just build a product and then make everyone need it
14:36 -!- dfr|mac [~dfr|work@ool-18baf7e7.dyn.optonline.net] has quit [Remote host
closed the connection]
14:37 < skelterjohn|work> whaaaa
14:37 < nicka> Your product needs a name before you build it
14:37 < skelterjohn|work> i think mgo should be called mongogo
14:38 -!- yogib [~yogib@131.234.59.64] has quit [Quit: yogib]
14:38 < skelterjohn|work> and then its logo could be topless
14:38 -!- ancientlore [~ancientlo@12.54.6.218] has joined #go-nuts
14:39 < nicka> I'm still waiting for package gonad
14:42 -!- dreadlorde [dreadlorde@c-68-42-82-10.hsd1.mi.comcast.net] has quit [Ping
timeout: 260 seconds]
14:47 < knowmerc1> gorest eh :)
14:49 -!- ancientlore_ [~ancientlo@12.54.6.218] has joined #go-nuts
14:51 < uriel> niemeyer: seems that your friend here might need some help
understanding some things (eg., why static linking is awesome :))
http://blog.dustinkirkland.com/2011/08/giving-it-go.html
14:51 < skelterjohn|work> i was just reading that too
14:51 < exch> He doesnt seem convinced
14:51 < uriel> (also, as far as I know 'nil' has been used in quite a few
other places before Go, in Plan 9 C, you use nil instead of null)
14:51 -!- ancientlore [~ancientlo@12.54.6.218] has quit [Ping timeout: 255
seconds]
14:51 < skelterjohn|work> some of the "bad" things were just unfamiliar
14:51 < uriel> he doesn't seem to have quite 'got it' for the most part
14:51 < exch> ruby has it to
14:52 < exch> (nil that is)
14:52 < uriel> oh and: http://go-lang.cat-v.org/go-search
14:52 < uriel> exch: good point, I knew there was some popular lang this
days that used nil, but I tried to erase as much of ruby from my brain as I could
:)
14:52 < chomp> nil was also in clisp
14:52 < chomp> is*
14:53 < skelterjohn|work> i don't understand why anyone would complain about
which version of null/nil/nothing/empty a language chooses
14:53 < niemeyer> uriel: Yeah, there are quite a few "impedance mismatch"
problems there regarding different ways of thinking..  but I was actually
surprised about how positive it was on a very first contact
14:53 < chomp> ^
14:54 < skelterjohn|work> one thing i agree with, though i don't know if he
stated it explicitly - python and go don't really fill the same niche (for me
anyway)
14:54 < skelterjohn|work> i still use python for scripting stuff
14:54 < niemeyer> skelterjohn|work: It does for a lot of people
14:54 < skelterjohn|work> simple programs where i don't mind if there isn't
any static typing
14:55 < niemeyer> skelterjohn|work: and I would personally be happier to see
trivial scripts written in Go rather than Python, to be honest
14:55 < skelterjohn|work> but i have tried to use python for larger programs
- it's a recipe for confusion unless you're very careful
14:55 * uriel still uses rc shell for scripting stuff
14:55 < niemeyer> skelterjohn|work: For things that are actually distributed
in Ubuntu, that is
14:55 < uriel> python is WAY too copmlicated a language, and the python libs
are for the most part a horrible mess
14:55 < f2f> go has replaced all my python servers, but i still do the
one-off scripts in python.  go fills just the right niche for me :)
14:56 < skelterjohn|work> to create large projects with python i end up
putting types in the identifiers
14:56 < niemeyer> uriel: Funny to be reading that now..  it was once prized
precisely for being simple, but I guess it's true now
14:56 < f2f> actually scratch that.  i do one-offs in go too
14:56 < f2f> anythong involving network
14:56 < f2f> anything even!
14:56 -!- ancientlore_ [~ancientlo@12.54.6.218] has quit [Read error: Connection
reset by peer]
14:56 -!- dreadlorde [dreadlorde@c-68-42-82-10.hsd1.mi.comcast.net] has joined
#go-nuts
14:56 < skelterjohn|work> maybe if i used gorun or one of those i'd have an
easier time using go for tiny programs
14:57 < niemeyer> skelterjohn|work: I've seen silly programs in Python
breaking before..  vmbuilder had a command line option that was badly broken due
to a typo, for instance
14:57 < niemeyer> skelterjohn|work: Sure..  bad testing one might say, but
still..
14:57 < uriel> networking in python is a pain compared to Go
14:58 < skelterjohn|work> i also like bringing up the python console and
doing semi-complex math stuff
14:58 -!- ancientlore_ [~ancientlo@12.54.6.218] has joined #go-nuts
14:58 < uriel> niemeyer: still, one of the reasons why Go makes sense for
one-off-small-scripts is that often building tests for them is not worth the
trouble, so at least you get static checking
14:58 < niemeyer> and if you don't think Python is too complex,
http://entitycrisis.blogspot.com/2009/04/yield-from-redundant-syntax.html
14:59 < niemeyer> Yeah, yield from is coming..
14:59 < uriel> python is ridiculously complex, the type system is close to
insane
14:59 < niemeyer> uriel: Yeah, exactly
14:59 < skelterjohn|work> i stopped learning python before all this yield
business got introduced
14:59 < uriel> i stopped when the metaclasses insanity started
15:01 < niemeyer> I was early on with Python too, but still use it quite a
bit nowadays within Canonical
15:02 < niemeyer> THe problem is really that the complexity hasn't stopped
going into the language
15:02 < niemeyer> E.g.
15:02 < TheMue> I still like scripting in Python, but nothing larger.  Here
I've done a lot with Java (sigh) and today with Smalltalk (yeah).
15:02 < skelterjohn|work> and don't get me wrong - i didn't see yields and
then scream "this is bullshit!"
15:02 < skelterjohn|work> i just already knew how to do anything i cared to
do
15:02 < niemeyer> What does this does in Python 1.5 is trivial to describe:
for i in f(): if i.test(): return
15:02 < niemeyer> I _challenge_ you to tell me what this may be doing in
Python 2/3
15:02 < xyproto> is it easy to emulate yield in go?
15:03 < f2f> select{}
15:03 < niemeyer> The question will certainly start with..  "In what
version?" :-)
15:04 < xyproto> niemeyer: f() generates objects with a .test() method
(hopefully), i is assigned to each of these objects in turn, i.test() is run, and
if the result is positive (a string, positive number, true etc), the outer
function returns
15:04 < xyproto> niemeyer: is it different from python 2 and 3?
15:05 < xyproto> niemeyer: runtime AttributeError with "object has no
attribute 'test'" is likely ;)
15:06 < niemeyer> xyproto: f() may return a generator, potentially with
context entrance/exit, return may be stopping a generator, or returning from the
function, depending on context, i.test may be a variable, or a class descriptor,
or an item in the instance dict
15:06 < niemeyer> xyproto: The list goes on,.
15:06 -!- dreadlorde [dreadlorde@c-68-42-82-10.hsd1.mi.comcast.net] has quit [Ping
timeout: 264 seconds]
15:06 < niemeyer> xyproto: Now, review thousands of lines of code a day as a
job
15:08 < niemeyer> and people are groovy because now they'll have yield from
rather than typing a few lines of code..
15:08 < niemeyer> </rant>
15:09 < f2f> my personal "scare" was when i first got exposed to twisted
15:10 < f2f> that's when i gave up
15:11 -!- artefon [~thiago@189.59.176.164.dynamic.adsl.gvt.net.br] has quit
[Remote host closed the connection]
15:14 -!- ronnyy [~quassel@p4FF1C46C.dip0.t-ipconnect.de] has joined #go-nuts
15:15 < niemeyer> xyproto: yield is a way to stay in context while you build
and return elements..
15:15 < niemeyer> xyproto: goroutine + channel == profit
15:17 < uriel> f2f: I still can't understand how anyone could use twisted
for anything
15:19 < jessta> f2f: I got the same scare, looked like some monkeys got
loose and tried to write a networking lib
15:19 -!- ancientlore [~ancientlo@12.54.6.218] has quit [Quit: ~ Trillian Astra -
www.trillian.im ~]
15:20 < uriel> more than 'a networking lib' was like 'every networking lib
in the history of mankind'
15:20 < uriel> all in the same place
15:20 < f2f> i wrote one server app with it, then promptly adopted py9p.
much simpler.
15:21 < f2f> that was before go
15:22 < knowmerc1> how is java's green threading different than a goroutine?
15:22 < xyproto> niemeyer: Good points, there are too many unknowns to make
yield as clear and unambiguous as one would wish.  However, surely there must be a
way to make yield safer and better?  As you said, I guess goroutines + channels is
one way.
15:24 < uriel> knowmerc1: you can have hundreds of thousands of goroutines,
I'm quite ure java's green threads are much more expensive
15:24 < uriel> knowmerc1: also, Go has channels, without channels goroutines
are not too useful
15:24 < uriel> plus select
15:24 < f2f> green theads aren't cooperative, are they?
15:25 < uriel> (when I heard stackless-python had channels, but no way to
read/write on multiple channels at once I was WTF?!??!)
15:25 < uriel> f2f: no idea really, IIRc they were deprecated ages ago
anyway
15:25 < knowmerc1> ahhh
15:25 < knowmerc1> ok
15:25 < uriel> (in java)
15:25 < uriel> knowmerc1: also Go multiplexes goroutines on real OS threads
as needed (eg., when they do something that blocks on the OS)
15:26 < uriel> knowmerc1:
http://en.wikipedia.org/wiki/Green_threads#Green_threads_in_the_Java_virtual_machine
15:27 < uriel> no clue what was the spawning speed and memory overhead java
green threads had, but I'm sure it was more than Go's 4k,
15:27 < uriel> (and slower)
15:30 < knowmerc1> based on that article green threads are not even close to
the same thing as goroutines
15:32 -!- ronnyy [~quassel@p4FF1C46C.dip0.t-ipconnect.de] has quit [Remote host
closed the connection]
15:33 * uriel is happy to remember very little of the days of java green threads
15:33 < knowmerc1> :)
15:35 < knowmerc1> java pays my bills, beyond that I have no appreciation
for it
15:36 -!- nicka [~lerp@unaffiliated/nicka] has quit [Quit: Leaving.]
15:37 -!- iri [8afd30b4@gateway/web/freenode/ip.138.253.48.180] has joined
#go-nuts
15:38 < iri> I'm not understanding something about go's copy semantics, and
I'm not getting it from "Effective Go".  I have a User struct.  I want many users
in a slice (array?) so I do this:
15:38 < iri> users := make([]User, 5)
15:38 < iri> Then I understand that I have a slice containing 5 blank User
objects?
15:39 < iri> I wanted to initialize them with "for i, user := range users {
user.id = i }" (for a contrived example)
15:39 < iri> The problem is that my users seem to forget their id after the
loop, presumably because the inside of the loop is seeing a copy of the user?
15:39 < iri> I can't figure out how how to modify my users.
15:40 < iri> (inside a loop)
15:40 < uriel> iri: use a slice of pointers to User
15:40 < TheMue> user is a local variable inside the loop
15:40 < iri> So, users := make([]*User, 5) ?
15:40 < uriel> or do a[i].id = x
15:41 < iri> If I make a slice of pointers, do I have to new(User) for every
element?
15:41 < iri> What is an idiomatic way to initialize all of my users?
15:41 < jlaffaye> a loop?
15:41 < iri> Have a "func (self *User) init() { ...  }" ?
15:41 < jlaffaye> oh
15:41 < jlaffaye> NewUser()
15:42 < jlaffaye> which return &User{bal: "foo"}
15:42 -!- nicka [~nicka@unaffiliated/nicka] has joined #go-nuts
15:42 < iri> Then I can assign that to user in "for _, user := range users {
user = NewUser() }" ?
15:42 -!- nekoh [~nekoh@dslb-178-004-029-086.pools.arcor-ip.net] has quit [Ping
timeout: 246 seconds]
15:42 < jlaffaye> iri: yes
15:42 < iri> Where users is a "make([]*User, ...)"
15:43 < jlaffaye> well
15:43 < jlaffaye> users := []*User
15:44 < jlaffaye> users = append(users, myUser)
15:44 < jlaffaye> append automaticall grows your slice
15:45 < iri> User has stopped looking like a word.  Okay.  So it would be
idiomatic to start with an empty slice of User pointers, and append to it new
users from a NewUser() function which returns a *User ?
15:45 < iri> with &User{asdf}
15:45 < jlaffaye> yes
15:46 < f2f> iri,
http://golang.org/doc/play/#package%20main%0Aimport%20%22fmt%22%0Atype%20User%20struct%7Bid%20int%7D%0Afunc%20main()%20%7B%0A%09f%20%3A%3D%20make(%5B%5DUser%2C%205)%0A%09for%20i%20%3A%3D%20range%20f%20%7B%0A%09%09f%5Bi%5D%20%3D%20User%7Bi%7D%0A%09%7D%0A%09for%20_%2C%20v%20%3A%3D%20range%20f%20%7B%0A%09%09fmt.Println(v.id)%0A%09%7D%0A%7D%0A
15:46 < exch> this is a classic case of 'Semantic satiation'
15:46 < iri> exch: :D
15:46 < aiju> 17:39 < iri> The problem is that my users seem to forget
their id after the loop, presumably because the inside of the loop is seeing a
copy of the user?
15:47 < aiju> for i := range users { users[i].id = i }
15:47 < aiju> that's the way to go
15:47 < iri> f2f/aiju: Yeah, I realised I could do that, actully
15:47 < iri> But I would rather understand how pointers/modifiable objects
worked
15:47 < iri> I think the key think I didn't understand was that if I have a
list of Objects rather than *Objects, then when you "for i, object := range
objects" them, "object" is a copy.
15:48 < iri> ..  if I understand correctly
15:48 < iri> But if "objects" is a list of "*Object", then it works how I
would expect
15:48 < aiju> iri: for i, object := range objects { foo }
15:48 < aiju> is equivalent to
15:48 < aiju> for i := range objects { object := objects[i]; foo }
15:48 < iri> And object := objects[i] copies objects[i] if it is a
non-pointer type?
15:48 < aiju> you could use pointers and then do *object = foo, but honestly
i don't see the point
15:49 < iri> aiju: the point is mainly a learning exercise to map my brain
onto how this all works
15:49 -!- erus` [~chatzilla@mailgate.ips-international.com] has quit [Remote host
closed the connection]
15:49 < iri> I want to start passing users around to other agents which are
going to live in goroutines, so it will become really important to understand when
copies are being created
15:49 < aiju> except for maps and channels everything in Go is a value
15:49 -!- abomb [~abomb@pool-71-160-32-70.lsanca.dsl-w.verizon.net] has joined
#go-nuts
15:50 < aiju> a := b, if b is a pointer, the *pointer* is copied
15:50 < aiju> if it is a struct, the struct is copied
15:50 -!- TheMue [~FMueller@p5DDF5FF0.dip.t-dialin.net] has quit [Quit: Lost
terminal]
15:50 < aiju> maps and channels always behave like pointers to the "real
thing"
15:50 < iri> Interesting.
15:50 < aiju> slices work entirely like pointers in this regard
15:51 < aiju> except they are three / two times as wide
15:51 < iri> I think I didn't understand what "for i, x := range y" actually
did.  Your example with "x := y[i]" really helped.
15:51 -!- TheMue [~FMueller@p5DDF5FF0.dip.t-dialin.net] has joined #go-nuts
15:51 < TheMue> Strange, keyboard doesn't react until logout and login.
15:51 < iri> What do you mean "as wide"?  In memory consumption?
15:51 < aiju> yeah
15:51 < iri> i.e.  a pointer is N bytes, a slice is N*2 ..  N*3
15:51 < aiju> a pointer is 4 bytes (x86, arm) or 8 bytes (amd64)
15:52 < iri> right.
15:52 < aiju> a slice is 12 bytes (x86, arm) or 16 bytes (amd64)
15:52 -!- Sep102 [~Sep102@c-67-170-74-228.hsd1.wa.comcast.net] has joined #go-nuts
15:52 < aiju> a slice is basically (in C) struct { void *v; int size, cap; }
15:53 < aiju> when you do a := b these three elements get copied, the
underlying data gets not
15:53 < aiju> (i.e.  whatever v points to)
15:53 < iri> Is there syntax equivalent to python's "for i in xrange(a, b)"
or do I have to write "for i := a; i < b; i++" ?
15:53 < aiju> the latter
15:53 < iri> :-(
15:53 < aiju> it's more obvious
15:53 < iri> It's annoying to have to write "i" three times.
15:53 < aiju> does xrange(a, b) include b?
15:53 < aiju> what if you want to include b?
15:53 < iri> (okay, not if it's "i".)
15:53 < aiju> (these are rhetoric questions)
15:54 < aiju> the C for loop is more clear and more versatile
15:54 < iri> Hm, I would debate that :-)
15:55 -!- knowmerc1 [~knowmercy@mobile-198-228-224-237.mycingular.net] has quit
[Ping timeout: 240 seconds]
15:55 < iri> "for descriptive_index_name := 0; descriptive_index_name <
blah; descriptive_index_name++" is rather more ick than "for
descriptive_index_name in xrange(blah)", IMO.
15:55 < f2f> you will lose that debate, iri
15:56 < iri> Fair enough, often you usually deal in short index variables
like "i".  Occasionally it is nice to be more explicit
15:56 < iri> f2f: Hehe.
15:56 < iri> Interesting.
15:56 < aiju> hahahaha
15:56 < f2f> just on the basis of naming: 'why x?' 'because 'range was
taken' 'why two ranges?' 'one returns a list, the other something else'
15:56 < f2f> etc
15:56 < iri> :-)
15:57 < iri> yes, xrange is a stupid name for it.
15:57 < f2f> etc, ec
15:57 < iri> The concept is quite nice and useful though.
15:57 < aiju> iri: simplicity and clearity beats being short to type imho
15:57 < f2f> for is simpler.  you know for, you know what the author meant
15:57 < iri> O_o
15:57 < aiju> iri: also
15:57 < iri> Wow, we're diving into some subjectivity here :-)
15:57 -!- xcombelle [~xcombelle@AToulouse-551-1-152-231.w109-214.abo.wanadoo.fr]
has joined #go-nuts
15:57 < aiju> for i in xrange(len(array)): # whawhawha
15:57 < iri> aiju: You would never do that in python
15:57 < aiju> but?
15:57 < aiju> am i missing something?
15:57 < iri> That's not how python would answer that question
15:58 < aiju> after years of coding python
15:58 < iri> And yes, that looks horrible :-)
15:58 < aiju> so what's the right way
15:58 < aiju> +?
15:58 < iri> In python you'd do "for i, value in enumerate(array)" and be
done with it
15:58 -!- tncardoso [~thiagon@150.164.2.20] has joined #go-nuts
15:58 < aiju> ah
15:58 < aiju> heh
15:58 < iri> or just "for value in array" if you don't care about the index
15:58 < f2f> "This is an opaque sequence type which yields the same values
as the corresponding list, without actually storing them all simultaneously."
15:58 < f2f> okay :)
15:58 < iri> which reads like english
15:58 < aiju> 17:57 < iri> Wow, we're diving into some subjectivity
here :-)
15:58 < aiju> try having an objective discussion
15:58 < iri> aiju :-)
15:58 < aiju> i can't remember the last time i had one
15:59 < aiju> at least i admit i'm being subjective
15:59 < iri> that's because objective discussion is hard.
15:59 < iri> Yes, me too :-)
15:59 < iri> So, I think, when we make statements like "x reads like
english" or "y is easier to understand, more explicit and clear", then we have to
consider that each is coming from a different background :-)
16:00 < aiju> yeah
16:00 < aiju> i'm not english
16:00 < iri> hehehe.
16:00 < aiju> and i know a language which is really like english
16:00 < iri> I must thank you for helping me wrap my head around go'd
pointers.
16:00 < iri> *s
16:00 < aiju> MULTIPLY CURRENT-VAL BY MULTIPLICATOR GIVING NEXT-VAL.
16:00 < aiju> ^-- cobol
16:00 < iri> Yes, and clearly that would be a ridiculous extreme
16:01 < iri> I happen to like python's middle ground.  If you're used to
writing assembler (for a given hypothetical value of "you") then I wouldn't be so
surprised or hurt if you disagreed with me ;-)
16:01 < aiju> i have written a several thousand line assembly program
16:02 < iri> There we go, then
16:02 < aiju> but i'm mostly a C programmer
16:02 < iri> I have read lots of assembly, but not written so much.
16:02 < aiju> assembly is a rather horrible language in practice
16:02 < aiju> (no surprise)
16:02 < iri> I've done a fair amount of C, but I have been fairly tainted by
python's way by now
16:02 < aiju> i have written python for years, but now i'm not writing it
any longer
16:02 < iri> It's an interesting exercise for me to try and learn some new
idioms in Go
16:03 < aiju> some people say it's because i write C in python ;P
16:03 < iri> I like the "for i, value := range values" syntax.  This is
nice.
16:03 < aiju> heh, that's one i don't like that much , actually
16:03 < aiju> it has this magic := range construct
16:03 < iri> I'd like a "for i := range N" syntax.
16:03 < f2f> go's stated goal is to allow the programmer to lay down code
which is unambigously interpreted by the compiler (and subsequent readers of that
code).  a certain level of terseness and multifunctionality avoidance is to be
expected :)
16:03 < iri> Yeah, magic sucks
16:03 < aiju> iri: you're not the first to demand that
16:03 < iri> That's one of the reasons I had a problem grasping it in the
first place
16:04 < aiju> i think it should be called foreach or something
16:04 < iri> I struggled to find documentation for "for := range" that made
clear what would happen if you had a slice of structs
16:04 < aiju> instead of overloading the for loop even more
16:04 < aiju> but that's bikeshit
16:04 < aiju> *shed
16:04 < aiju> haha
16:04 < iri> Heh
16:05 < iri> Okay, now that I understands Go's pointers better I will go
back to my simulation
16:05 < aiju> heh
16:05 < iri`gone> ta.
16:07 -!- pjacobs [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has
joined #go-nuts
16:13 -!- statue [4ad41a06@gateway/web/freenode/ip.74.212.26.6] has joined
#go-nuts
16:20 -!- Nisstyre [~nisstyre@infocalypse-net.info] has quit [Ping timeout: 264
seconds]
16:20 < jlaffaye> If someone is brave enough to tell me what is wrong with
my code http://people.freebsd.org/~jlaffaye/netchan.tar.gz
16:21 < jlaffaye> When you run the client for the 2nd time you should get a
broken pipe on the server side
16:24 -!- nicka [~nicka@unaffiliated/nicka] has quit [Read error: Connection reset
by peer]
16:24 -!- nicka [~nicka@unaffiliated/nicka] has joined #go-nuts
16:25 -!- nicka [~nicka@unaffiliated/nicka] has quit [Client Quit]
16:28 < qeed> if i have a c struct i want to convert to a go struct i
declare a go struct to have all the members of the c struct and same size, is it
fine to cast the c struct to the go struct or do i have to copy field by field
16:30 -!- TheMue [~FMueller@p5DDF5FF0.dip.t-dialin.net] has quit [Ping timeout:
246 seconds]
16:31 < jessta> qeed: using unsafe you can do what ever you want
16:31 < exch> if the alignment, field ordering and type sizes are the same,
you should be able to just cast it with some unsafe magic
16:32 -!- Nisstyre [~nisstyre@infocalypse-net.info] has joined #go-nuts
16:32 < qeed> does making the field ordering and size the same automatically
give the same alignment and padding?
16:33 < qeed> that is what i am not sure about
16:33 < exch> Go allows manual padding, so you should probably ensure that
is represented properly
16:34 < qeed> ok thanks
16:39 -!- iri`gone [8afd30b4@gateway/web/freenode/ip.138.253.48.180] has quit
[Quit: Page closed]
16:40 -!- crunge [~Crunge@about/security/staff/crunge] has joined #go-nuts
16:40 -!- sahid [~sahid@LNeuilly-152-21-22-10.w193-253.abo.wanadoo.fr] has quit
[Quit: Ex-Chat]
16:42 < f2f> what is short int in C nowadays?
16:42 < f2f> sizeof-wise?
16:43 < exch> that would depend on the platform I presume
16:46 < f2f> i'm thinking one would have trouble translating a long double
or a short int to Go types preserving the alighnment
16:46 < str1ngs> ww: file $(which cgo)
16:46 < str1ngs> /go/bin/cgo: ELF 32-bit LSB executable, ARM, version 1
(SYSV), statically linked, not stripped
16:46 < f2f> short int is still 2 bytes on intel.  long double is 16
16:46 < str1ngs> ww: amazing go builds on android.
16:47 < f2f> s/intel/osx lion/
16:49 < f2f> 32-bit gcc gives 2 and 12
16:49 < f2f> on linux
16:52 < abomb> self modifying code is pretty clear in assembly.  at least
clearer then it was injecting hex with c++ into the process memory..  I wonder how
it will end up looking in go.]
16:53 < abomb> and clear is subjective here :D
16:54 < aiju> 18:42 < f2f> what is short int in C nowadays?
16:54 < aiju> 2 bytes
16:54 < aiju> although i think it is 1 on some embedded platforms
16:54 < aiju> i want back to PDP-11 types
16:54 < aiju> char 1 byte, int 2 byte, long 4 byte PERIOD
16:54 < f2f> long double changes between -m64 and -m32 however.
16:54 < f2f> on linsux
16:54 < aiju> long double is 80 bits
16:55 -!- seb32 [~sebastian@89.246.67.229] has quit [Ping timeout: 252 seconds]
16:56 -!- TheMue [~FMueller@p5DDF5FF0.dip.t-dialin.net] has joined #go-nuts
16:57 < f2f> " An exception is Microsoft Visual C++ for x86, which makes
long double a synonym for double."
16:59 < aiju> f2f: it's not the only exceptions
17:01 -!- adk9 [4bad40ec@gateway/web/freenode/ip.75.173.64.236] has joined
#go-nuts
17:01 < adk9> quick question: is there a built-in/package fn to check for
array membership?
17:01 < aiju> no
17:02 < adk9> aiju: ok thanks, so i have to pretty much "range" over it and
compare?
17:02 < aiju> exactly
17:09 < xb95> win close
17:09 < xb95> (times I've failed at simple commands)++
17:09 -!- xb95 [~xb95@dreamwidth/staff/mark] has left #go-nuts []
17:11 < abomb> could go create a fast application server, e.g.  an mmo serv?
17:13 < qeed> there is a c union that goes something like this typedef union
Event { int type; ...  } Event; I try to access it using ev._type and
ev.union_type, but it doesnt work
17:14 < qeed> says field or method not found, what is the syntax for
accessing it
17:18 -!- TheMue [~FMueller@p5DDF5FF0.dip.t-dialin.net] has quit [Remote host
closed the connection]
17:18 -!- TheMue [~FMueller@p5DDF5FF0.dip.t-dialin.net] has joined #go-nuts
17:18 -!- dfr|work [~dfr|work@nat/google/x-wanspngcawjwajhu] has quit [Read error:
No route to host]
17:18 < jessta> abomb: you could create such a thing in Go.
17:19 < jessta> Go is very good for creating network services
17:23 -!- adk9 [4bad40ec@gateway/web/freenode/ip.75.173.64.236] has quit [Quit:
Page closed]
17:23 -!- chadkouse [~Adium@rrcs-74-218-87-242.central.biz.rr.com] has joined
#go-nuts
17:24 -!- Queue29 [~Queue29@egress-w.sfo1.yelpcorp.com] has joined #go-nuts
17:25 -!- dfr|work [~dfr|work@nat/google/x-ylyumbjndglukgca] has joined #go-nuts
17:32 < skelterjohn|work> anyone ever use goinstall successfully in windows?
17:33 < skelterjohn|work> for me it builds fine, but when i run it, it just
says something about a bad file descriptor and bombs
17:38 -!- nekoh [~nekoh@dslb-088-069-157-137.pools.arcor-ip.net] has joined
#go-nuts
17:40 -!- r_linux [~r_linux@189.38.220.35] has joined #go-nuts
17:41 -!- samuell [~samuel@pc2-samuel.uppmax.uu.se] has quit [Quit: Ex-Chat]
17:41 -!- TheMue [~FMueller@p5DDF5FF0.dip.t-dialin.net] has quit [Ping timeout:
258 seconds]
17:46 -!- knowmerc1 [~knowmercy@mobile-198-228-227-202.mycingular.net] has joined
#go-nuts
17:47 -!- knowmerc2 [~knowmercy@mobile-198-228-227-202.mycingular.net] has joined
#go-nuts
17:47 -!- napsy [~luka@88.200.96.18] has quit [Quit: Lost terminal]
17:49 -!- knowmerc2 [~knowmercy@mobile-198-228-227-202.mycingular.net] has left
#go-nuts []
17:53 -!- erus` [~chatzilla@cpc2-gill2-0-0-cust701.basl.cable.virginmedia.com] has
joined #go-nuts
17:55 -!- Fish- [~Fish@9fans.fr] has joined #go-nuts
17:56 < abomb> I did a concurrent ubuntu install to setup a good Go dev
environment
17:56 < abomb> I'm very happy I made that choice :D
17:56 < skelterjohn|work> what do you mean concurrent ubuntu install?
17:56 < skelterjohn|work> the next release...  concurrent cat?
17:56 < aiju> ubuntu with channels
17:56 < abomb> a simple partition shrink, expand, concurrent ubuntu distrib,
and bam!
17:56 < abomb> yah i'll get the link one sec
17:56 < skelterjohn|work> dual boot?
17:57 < abomb> yes
17:57 < skelterjohn|work> that's what i did at work here - couldn't handle
dev on windows
17:57 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
17:57 < abomb> i made the partition with admin tools, and then let the
installer do the work.  I have an inspiron 1501 with windows 7, dual intel
processor
17:58 < abomb> http://www.ubuntu.com/download/ubuntu/windows-installer
17:58 < abomb> sooo easy
17:59 < abomb> I need to figure out good ide for go, I'm looking at bluefish
or eclipse.  I do miss visual studio.
17:59 < skelterjohn|work> how much memory do you have?
17:59 < abomb> 4 gigs
18:00 < skelterjohn|work> you might be able to get away with emacs, then
18:00 < str1ngs> skelterjohn|work: what editor do you use?
18:00 < skelterjohn|work> sublime
18:00 < skelterjohn|work> for the moment
18:01 < str1ngs> ah I recall that now.  how is it?
18:01 < skelterjohn|work> it's ok - it's light weight and has a file tree
panel on the left
18:01 < skelterjohn|work> that's pretty much all i want
18:01 < str1ngs> ya I'm kinds stuck with vim.  I've tried other things but I
always come back
18:02 < str1ngs> I think I lasted a week with emacs.  nothing wrong with it
just to use to vim I guess
18:02 < abomb> gnu emacs 23, i'm getting that.  is that the right one?
18:02 < str1ngs> acme was kinda neat though when I tried it
18:02 < skelterjohn|work> whoah, i was joking
18:02 < skelterjohn|work> but i guess you can use it if you want
18:02 < abomb> err no
18:02 < abomb> lol
18:02 < abomb> I'm such a noob at linux dude
18:03 < skelterjohn|work> it was a joke on how much garbage is built into
emacs
18:03 < skelterjohn|work> try sublime text
18:03 < skelterjohn|work> it's nice.
18:03 < str1ngs> abomb: gvim or gedit.  probably gedit is a good start
18:03 < abomb> lol, i'm like mr.  take's it too seriously
18:03 < abomb> ok i'll try vim!
18:03 < str1ngs> or sublime.  sorry have not used it to comment on it.
18:03 < skelterjohn|work> do you know anything about vim?
18:03 < abomb> I can be like the boys at lucas ranch.
18:03 < aiju> abomb: sam
18:04 < abomb999> I'm not sam
18:04 < skelterjohn|work> if you don't, you should make a video of when you
try it for the first time
18:04 -!- TheMue [~FMueller@p5DDF5FF0.dip.t-dialin.net] has joined #go-nuts
18:04 -!- erus` [~chatzilla@cpc2-gill2-0-0-cust701.basl.cable.virginmedia.com] has
quit [Ping timeout: 255 seconds]
18:04 < skelterjohn|work> abomb999: sam is an editor that you don't want to
use
18:04 < aiju> shut up
18:04 < mpl> pff
18:04 < str1ngs> you need 4 thumbs to use emacs.  it is known :P
18:04 < aiju> i'm not saying this about your editors
18:05 < skelterjohn|work> i figured you weren't paying attention
18:05 < aiju> sam is easier to learn that vim
18:05 < abomb999> Ok, I'll check out sam.
18:05 < abomb999> Thanks aiju.
18:05 < mpl> hmm I wouldn't say easier.  they're both confusing in their own
way.
18:05 < skelterjohn|work> that wasn't *that* much of a pro for sam
18:06 < aiju> if you're completely new to everything it's probably easier to
start with gedit
18:06 < aiju> or kwrite
18:06 < abomb999> I want a good editor
18:06 < str1ngs> I agree
18:06 < abomb999> I don't care how long I have to study it
18:06 < abomb999> or work at it
18:06 < sl> sam is great
18:06 < aiju> then i'd say go with sam
18:06 < abomb999> sam it is
18:07 < mpl> yeah.  honestly even acme can be used by a newbie once you've
understood that middle click on Put saves the file.
18:07 < abomb999> I hate working in subpar enviroments
18:07 < abomb999> I fucking have choice!11onet
18:07 < abomb999> wo
18:07 < aiju> heh
18:08 < sl> sam proficiency is complimentary to sed, awk, acme.
18:09 < f2f> nice password :)
18:09 < mpl> sl: hmm, awk maybe, but is there anything that can't be done
with the sam language from acme (Edit) and that can with sed (as easily) ?
18:09 < abomb999> I'm so goddamn excited about GO!.  my first project after
the effective go manual is to port khan's academy to GO and compare the
performance.  I'll need da bomb ide for that.
18:10 < aiju> hahahahahaha
18:11 < mpl> you should whip out the almight Eclipse then!!!!!!
18:11 < exch> people are generally widely devided on their needs as far as
IDEs are concerned.  Many just stick with vim/emacs/whatever
18:11 < mpl> *almighty
18:11 < exch> personally, I don't feel a need for a custom Go ide
18:12 -!- smw [~stephen@unaffiliated/smw] has quit [Ping timeout: 276 seconds]
18:12 < exch> I must confess though that I do have Go syntax highlighting in
gedit
18:12 < skelterjohn|work> the think i miss in sublime is a code outline
18:13 < aiju> everytime i use an IDE i feel a need for a simple text editor
18:13 < mpl> exch: my editor is wiser, it doesn't make Go jealous because
they're no syntax highlighting for any language in it ;)
18:13 < mpl> s/they're/there's/
18:14 < uriel> every time I use what most people call 'a simple text
editor', I feel a need for cyanide capsules
18:14 < aiju> hahahahaha
18:14 < skelterjohn|work> uriel: i feel the same
18:14 < uriel> as for IDEs, no clue, have not used one in >10 years
18:14 < mpl> skelterjohn|work: that one http://www.sublimetext.com/ ?
18:14 < skelterjohn|work> yes
18:14 < abomb999> intellisense is required.
18:14 < skelterjohn|work> mpl: i'm using sublime text 2, since the free
trial doesn't expire
18:14 < aiju> abomb999: vim with gocode is it then
18:15 < aiju> if you REALLY need it
18:15 < abomb999> yes
18:15 < sl> mpl: i just meant, knowledge of each program in that list of
programs compliments each other.
18:15 < f2f> "you're a very good program" said the other program
18:15 < sl> if you know sed, sam is easier to learn.  if you're familiar
with sam command language, awk starts making sense.
18:15 < aiju> hahaha
18:16 < aiju> sl: i knew awk before sam
18:16 < mpl> sl: agreed.
18:16 < sl> aiju: well, me too
18:16 < mpl> skelterjohn|work: hmm, that "view from above" in the left bar
is interesting.
18:17 < sl> structural regular expressions make life easier.
18:17 < skelterjohn|work> is that what they call the file tree bar?
18:17 < mpl> skelterjohn|work: no the minimap thing.
18:17 < skelterjohn|work> oh yeah i like that too
18:17 < skelterjohn|work> it's on the right for me
18:25 -!- huin [~huin@91.84.179.118] has joined #go-nuts
18:26 -!- chomp [~chomp@dap-209-166-184-50.pri.tnt-3.pgh.pa.stargate.net] has quit
[Quit: Leaving]
18:30 -!- niemeyer_ [~niemeyer@201-11-214-156.pltce701.dsl.brasiltelecom.net.br]
has joined #go-nuts
18:32 -!- sniper506th [~sniper506@rrcs-70-61-192-18.midsouth.biz.rr.com] has quit
[Quit: Leaving...]
18:33 -!- niemeyer [~niemeyer@200-102-194-39.pltce701.dsl.brasiltelecom.net.br]
has quit [Ping timeout: 240 seconds]
18:43 -!- tncardoso [~thiagon@150.164.2.20] has quit [Ping timeout: 240 seconds]
18:48 -!- tvw [~tv@212.79.9.150] has quit [Remote host closed the connection]
18:50 -!- tncardoso [~thiagon@150.164.2.20] has joined #go-nuts
18:59 -!- xcombelle [~xcombelle@AToulouse-551-1-152-231.w109-214.abo.wanadoo.fr]
has quit [Ping timeout: 255 seconds]
19:03 -!- miker2 [~miker2@64.55.31.190] has quit [Ping timeout: 276 seconds]
19:04 -!- statue [4ad41a06@gateway/web/freenode/ip.74.212.26.6] has quit [Quit:
Page closed]
19:11 -!- rlab [~Miranda@80-110-95-178.pool.ukrtel.net] has quit [Ping timeout:
252 seconds]
19:11 -!- xcombelle [~xcombelle@AToulouse-551-1-70-28.w92-146.abo.wanadoo.fr] has
joined #go-nuts
19:12 -!- rlab [~Miranda@80-110-95-178.pool.ukrtel.net] has joined #go-nuts
19:18 -!- iXeno_ [~ixeno@106.80-203-229.nextgentel.com] has quit [Ping timeout:
246 seconds]
19:20 -!- zaero [~eclark@50-82-164-104.client.mchsi.com] has quit [Ping timeout:
255 seconds]
19:23 -!- iXeno [~ixeno@106.80-203-229.nextgentel.com] has joined #go-nuts
19:24 -!- zaero [~eclark@servo.m.signedint.com] has joined #go-nuts
19:25 < uriel> anyone knows if there is a video of Rob's presentation at
OSCON?
19:27 -!- moraes [~moraes@189.103.188.201] has quit [Quit: Leaving]
19:32 -!- wrtp [~rog@host-92-30-154-96.as13285.net] has quit [Quit: wrtp]
19:33 -!- photron [~photron@port-92-201-49-206.dynamic.qsc.de] has quit [Ping
timeout: 250 seconds]
19:34 -!- wrtp [~rog@host-92-30-154-96.as13285.net] has joined #go-nuts
19:34 -!- wrtp [~rog@host-92-30-154-96.as13285.net] has quit [Client Quit]
19:40 -!- Fish- [~Fish@9fans.fr] has quit [Quit: WeeChat 0.3.5]
19:40 -!- Fish- [~Fish@9fans.fr] has joined #go-nuts
19:41 -!- Fish- [~Fish@9fans.fr] has quit [Client Quit]
19:41 -!- eikenberry [~jae@173-164-68-213-Oregon.hfc.comcastbusiness.net] has
joined #go-nuts
19:41 -!- Fish- [~Fish@9fans.fr] has joined #go-nuts
19:44 -!- xcombelle [~xcombelle@AToulouse-551-1-70-28.w92-146.abo.wanadoo.fr] has
quit [Ping timeout: 252 seconds]
19:57 -!- xcombelle [~xcombelle@AToulouse-551-1-91-15.w92-149.abo.wanadoo.fr] has
joined #go-nuts
19:58 -!- virtualsue [~chatzilla@nat/cisco/x-klbfkdotqplcumcf] has quit [Ping
timeout: 240 seconds]
19:58 -!- alehorst [~alehorst@201.47.8.210.dynamic.adsl.gvt.net.br] has quit
[Quit: Leaving.]
20:00 < jnwhiteh> is there a constant I should use to catch 'SIGINT"
20:00 < jnwhiteh> or should I hardcode it as "SIGINT: interrupt"?
20:00 -!- abomb_workmode_a [~abomb@pool-71-160-32-70.lsanca.dsl-w.verizon.net] has
quit [Remote host closed the connection]
20:01 < jnwhiteh> or, any resources as to how people are handling signals in
Go programs?
20:02 -!- alehorst [~alehorst@201.47.8.210.dynamic.adsl.gvt.net.br] has joined
#go-nuts
20:02 < skelterjohn|work> you're using the "signal" package, right?
20:02 < jnwhiteh> aye
20:02 < skelterjohn|work> just making sure
20:02 < jnwhiteh> but that's just a channel for all signals
20:02 < skelterjohn|work> beyond that i have no ide
20:02 < skelterjohn|work> a
20:02 < jnwhiteh> and there are no const definitions for any signals
20:02 < jnwhiteh> hrm, alright
20:02 < jnwhiteh> its also all-or-nothing
20:03 < jnwhiteh> I really only care about SIGINT, but I get keyboard stops
as well
20:04 -!- rlab [~Miranda@80-110-95-178.pool.ukrtel.net] has quit [Ping timeout:
258 seconds]
20:05 -!- rlab [~Miranda@0-40-95-178.pool.ukrtel.net] has joined #go-nuts
20:05 -!- dfr|mac [~dfr|work@nat/google/x-lkhdgycccfmhvzve] has joined #go-nuts
20:07 < str1ngs> https://gist.github.com/73f1ac6f05b532a35c3a
20:07 < str1ngs> jnwhiteh: should help maybe more then what you were asking
for.
20:07 < jnwhiteh> yeah, thanks.
20:07 < jnwhiteh> just breaks being able to control-z for example
20:07 < aiju> you can't block control-z
20:08 < jnwhiteh> ^Z2011/08/05 21:08:06 Got signal: SIGTSTP: keyboard stop
20:08 < jnwhiteh> just did
20:08 < jnwhiteh> =)
20:08 < aiju> what the-
20:08 < aiju> shouldn't it send SIGSTOP
20:09 -!- dlowe [~dlowe@ita4fw1.itasoftware.com] has quit [Quit: Leaving.]
20:10 -!- virtualsue [~chatzilla@host81-148-104-166.in-addr.btopenworld.com] has
joined #go-nuts
20:10 -!- virtualsue [~chatzilla@host81-148-104-166.in-addr.btopenworld.com] has
quit [Client Quit]
20:10 < jnwhiteh> anyone know of any open CLs regarding this?
20:13 -!- tncardoso [~thiagon@150.164.2.20] has quit [Quit: Leaving]
20:19 < f2f> uriel, no video yet.  the presentation is available, as you've
probably found out
20:20 -!- vmil86 [~vmil86@88.118.36.96] has quit [Ping timeout: 276 seconds]
20:22 < uriel> f2f: yup, I hope we get the video soon
20:22 < aiju> what was rob pike talking about?
20:22 < aiju> more web programming in Goß
20:22 < aiju> *?
20:22 < uriel> (were there any other Go related talks?  and what is that
stuff being mentioned in go-nuts about questions and RPC?)
20:23 < aiju> using Go with XML to manage software patents?  ;P
20:23 < uriel>
http://assets.en.oreilly.com/1/event/61/The%20Expressiveness%20of%20Go%20Presentation.pdf
20:23 < uriel> aiju: stop trying to troll, you get trolled enough as it is
;P
20:24 < f2f> just more of the same.  but someone came here a few days ago
saying his cow-orker was a convert.  his cow-orker was a java dude :)
20:24 < uriel> (the Stubby RPC duscussion I mean)
20:24 < uriel> (which refers to some QA with CDiBona and brad (and rob?))
20:25 < f2f> i feel like a 10 yo talking about a justin bieber concert she
couldn't attent :)
20:26 < aiju> hahaha
20:26 -!- danilo04
[~danilo04@province-wireless-173-84-27-249.dr02.roch.ny.frontiernet.net] has
joined #go-nuts
20:27 < aiju> haha
20:27 < aiju> Go -- language of the year
20:29 -!- danilo04
[~danilo04@province-wireless-173-84-27-249.dr02.roch.ny.frontiernet.net] has quit
[Client Quit]
20:29 < str1ngs> on reddit?  :P
20:29 < aiju> no, some weird award
20:29 < f2f> /r/programming really :)
20:29 < str1ngs> hehe
20:30 < f2f> 'where formal language theory experts debate the finer points
of exception handling'
20:30 < f2f> there was this guy foaming at the mouth that 'go breaks all
formal language theory rules'
20:31 < f2f> and how languages like ocaml are so much better
20:31 < aiju> there are many people like that
20:31 -!- danilo04
[~danilo04@province-wireless-173-84-27-249.dr02.roch.ny.frontiernet.net] has
joined #go-nuts
20:31 < f2f> then i went through his history and he turned out to be some
kid who only knew c++ and a month ago was debating that you can't do graphics in
haskell because it's too slow :)
20:32 < f2f> s/knew/talked about writing a game in/
20:32 < aiju> no one knows C++
20:32 < f2f> but hey, they're anonymous and they feed off each other.
20:33 -!- wrtp [~rog@host-92-30-154-96.as13285.net] has joined #go-nuts
20:33 < f2f> 0xABADC0DA may be the best thing that happened to go.  guy is
so anti-go that he never fails to mention it in every thread possible.
20:33 < aiju> haha
20:34 < f2f> maybe ken interviewed him at google or something.  he
definitely has a personal grudge against go's developers :)
20:36 < exch> language theorists are like phylosophers.  Its a nice past
time on a friday night, when you're high on something, but in the real world
people will just laugh at you
20:36 -!- askhader [~askhader@taurine.csclub.uwaterloo.ca] has left #go-nuts []
20:38 -!- squeese [~squeese@cm-84.209.17.156.getinternet.no] has joined #go-nuts
20:40 < aiju> exch: unlike philosophers they like to get out some example
20:40 < aiju> like "hey!  $program is written in $academiclanguage!  and it
sold!"
20:41 < exch> :P
20:42 -!- danilo04
[~danilo04@province-wireless-173-84-27-249.dr02.roch.ny.frontiernet.net] has quit
[Quit: Leaving]
20:46 -!- niemeyer [~niemeyer@201-11-214-156.pltce701.dsl.brasiltelecom.net.br]
has quit [Quit: Leaving]
20:49 -!- jbooth1 [~jay@209.249.216.2] has left #go-nuts []
20:53 -!- hargettp_ [~hargettp_@dhcp-161.mirrorimage.net] has left #go-nuts []
20:54 -!- keithcascio [~keithcasc@nat/google/x-kciwgpleyvsqwwvl] has joined
#go-nuts
20:54 -!- knowmerc1 [~knowmercy@mobile-198-228-227-202.mycingular.net] has quit
[Quit: leaving]
20:55 -!- btipling [~btipling@unaffiliated/sk/x-5968384] has left #go-nuts
["WeeChat 0.3.5"]
20:55 -!- Kumul [~Kumul@66-50-109-42.prtc.net] has joined #go-nuts
20:55 < jnwhiteh> f2f: any links?
20:55 < jnwhiteh> i enjoy troll-watching :P
20:56 -!- noodles775 [~michael@canonical/launchpad/noodles775] has quit [Quit:
leaving]
20:59 < f2f>
http://www.reddit.com/r/programming/comments/ixm7c/exceptions_and_go/
21:00 -!- Adys [~Adys@unaffiliated/adys] has quit [Read error: Connection reset by
peer]
21:00 < f2f> here's some action from the aforementioned friend:
21:00 < f2f>
http://www.reddit.com/r/programming/comments/j48tf/how_is_c_better_than_d/c2980je
21:02 < aiju> Comparing against C then is basically just a straw man to make
Google Go look good.
21:02 < aiju> fuck
21:02 < f2f> this thread is golden.  just search for "formal language
theory":
21:02 < f2f>
http://www.reddit.com/r/programming/comments/ii3yb/now_we_get_to_the_annoying_aspects_of_go/
21:02 < aiju> can someone shoot him
21:02 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts
21:03 < f2f> but really, a lot of stuff in there is quite good trolling.  if
you look at it by time, a lot of the guys went in mild, saw that somebody else
agreed with them and then went full retard.  i believe the correct term is
'circlejerk'
21:03 < aiju> wait
21:03 < aiju> at first he said Go is "watered down"
21:03 < aiju> and not "the real thing"
21:03 < f2f> that thread made me fire up irssi again
21:03 < aiju> and then he ends with how comparing Go to C just makes Go
looks good
21:04 < aiju> he isn't even a consistent troll
21:05 < f2f> he's not trolling, he's raging
21:09 < mpl> this guys make me feel good.  I don't know enough about
languages in general to argue on these topics, but thanks to them I can see that
some ppl know even less and are not ashamed to show it :)
21:10 < f2f> dunning-kruger :)
21:10 -!- TheMue [~FMueller@p5DDF5FF0.dip.t-dialin.net] has quit [Quit: leaving]
21:11 -!- berak [~chatzilla@89.204.153.136] has quit [Quit: ChatZilla 0.9.84
[SeaMonkey 2.0a3/20090223135443]]
21:11 < aiju> also, unlike these other languages, you can actually know Go
21:11 < jlaffaye> do we have someting like atexit(3) ?
21:11 -!- rlab [~Miranda@0-40-95-178.pool.ukrtel.net] has quit [Quit: Miranda IM!
Smaller, Faster, Easier.  http://miranda-im.org]
21:12 -!- kamaji_ [~kamaji@handtomouse.demon.co.uk] has quit [Read error:
Connection reset by peer]
21:12 < aiju> jlaffaye: defer ;)
21:12 -!- kamaji [~kamaji@handtomouse.demon.co.uk] has joined #go-nuts
21:12 < mpl> aiju: yeah that's the most important to me.  I'm always
reluctant to learn things by heart when I know I can look them up in previous
snippets of code I have handy, but with go I know I can actually memorize things
for good that I can easily reuse :)
21:13 < jlaffaye> aiju: a defer when the program exit would be nice
21:13 < aiju> jlaffaye: defer in main
21:13 < f2f> defer in recover() to be sure ;)
21:13 < skelterjohn> f2f i didn't find "formal language theory" in any of
the links
21:14 < f2f> skelterjohn:
http://www.reddit.com/r/programming/comments/ii3yb/now_we_get_to_the_annoying_aspects_of_go/c246itd
21:14 < jlaffaye> well, I wanted to register the cleanup function in the
function which create the files to be cleaned up, and not in the main
21:15 -!- tvw [~tv@e176008253.adsl.alicedsl.de] has joined #go-nuts
21:22 -!- zhujo01
[jon.zhu@CPE00222d5acb80-CM00222d5acb7d.cpe.net.cable.rogers.com] has joined
#go-nuts
21:22 -!- kamaji [~kamaji@handtomouse.demon.co.uk] has quit [Read error:
Connection reset by peer]
21:22 -!- kamaji [~kamaji@handtomouse.demon.co.uk] has joined #go-nuts
21:22 < zhujo01> hello
21:22 -!- squeese [~squeese@cm-84.209.17.156.getinternet.no] has quit [Remote host
closed the connection]
21:23 -!- robteix [~robteix@nat/intel/x-zhenlfapzeksltdk] has quit [Quit: Leaving]
21:23 < skelterjohn> hi
21:25 < uriel> somebody should register formallanguagetheory.com
21:25 < aiju> and put goatse on it
21:25 -!- Barbarossa [~max@rfc2324.org] has left #go-nuts []
21:27 < uriel> haha
21:28 < mpl> goatse is too nice.  a justin bieber rickroll would be nastier.
21:31 -!- kamaji [~kamaji@handtomouse.demon.co.uk] has quit [Ping timeout: 250
seconds]
21:33 -!- kamaji [~kamaji@handtomouse.demon.co.uk] has joined #go-nuts
21:36 -!- qeed [~qeed@adsl-98-85-59-142.mco.bellsouth.net] has quit [Quit:
Leaving]
21:41 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has joined
#go-nuts
21:44 -!- Fish- [~Fish@9fans.fr] has quit [Quit: WeeChat 0.3.5]
21:51 -!- erus` [~chatzilla@cpc2-gill2-0-0-cust701.basl.cable.virginmedia.com] has
joined #go-nuts
21:51 -!- huin [~huin@91.84.179.118] has quit [Quit: off to bed]
22:03 -!- wrtp [~rog@host-92-30-154-96.as13285.net] has quit [Quit: wrtp]
22:11 -!- tvw [~tv@e176008253.adsl.alicedsl.de] has quit [Ping timeout: 250
seconds]
22:13 -!- serialhex [~quassel@99-101-148-183.lightspeed.wepbfl.sbcglobal.net] has
quit [Read error: Connection reset by peer]
22:15 -!- dlowe [~dlowe@ita4fw1.itasoftware.com] has joined #go-nuts
22:18 -!- dfr|mac [~dfr|work@nat/google/x-lkhdgycccfmhvzve] has quit [Remote host
closed the connection]
22:18 -!- dlowe [~dlowe@ita4fw1.itasoftware.com] has quit [Client Quit]
22:26 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has quit [Ping
timeout: 250 seconds]
22:27 -!- homa_rano [~ede@30-51-251.dynamic.csail.mit.edu] has quit [Ping timeout:
264 seconds]
22:31 -!- serialhex [~quassel@99-101-148-183.lightspeed.wepbfl.sbcglobal.net] has
joined #go-nuts
22:31 -!- r_linux [~r_linux@189.38.220.35] has quit [Quit: Lost terminal]
22:31 -!- moraes [~moraes@189.103.188.201] has joined #go-nuts
22:32 -!- kergoth [~kergoth@ip24-251-173-232.ph.ph.cox.net] has joined #go-nuts
22:34 -!- homa_rano [~ede@30-51-251.dynamic.csail.mit.edu] has joined #go-nuts
22:43 -!- pjacobs [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has quit
[Ping timeout: 240 seconds]
22:52 -!- noam [~noam@87.69.42.61.cable.012.net.il] has quit [Ping timeout: 246
seconds]
23:01 -!- brett [~brett@rdnzl.net] has quit [Ping timeout: 276 seconds]
23:05 -!- noam [~noam@87.69.42.61.cable.012.net.il] has joined #go-nuts
23:34 -!- niemeyer [~niemeyer@201-11-214-156.pltce701.dsl.brasiltelecom.net.br]
has joined #go-nuts
23:37 -!- ajstarks [~ajstarks@pool-173-54-115-34.nwrknj.fios.verizon.net] has
joined #go-nuts
23:49 -!- replore [~replore@ntkngw133234.kngw.nt.ftth.ppp.infoweb.ne.jp] has quit
[Remote host closed the connection]
--- Log closed Sat Aug 06 00:00:19 2011