--- Log opened Sun May 01 00:00:26 2011
--- Day changed Sun May 01 2011
00:00 -!- tylerl [~tylerl@ip24-251-232-171.ph.ph.cox.net] has joined #go-nuts
00:00 < tylerl> are there runtime dependencies for programs built in go?
00:01 < Namegduf> No.
00:02 < tylerl> so if you use library code like the webserver, it compiles
in statically?
00:02 < Namegduf> Yes.
00:02 < tylerl> coo.  thanks
00:02 < Namegduf> Unless you're using cgo to link with non-Go code outside
the stdlib.
00:02 < tylerl> ic
00:03 < Namegduf> Later versions of Go may depend on the OS's libc, but
aside that, no runtime dependencies.
00:04 < tylerl> thats helpful.
00:05 < uriel> Namegduf: that is a real shame, shame on the OSes that have
destroyed all that was good about Unix *sigh*
00:05 < tylerl> when i install the developer libraries, whats the best way
to put it in a shared location for all users?  Does "sudo.bash" fit in there
anywhere?
00:06 < Namegduf> As far as I know, the easiest way is "don't", but for
actually doing it, I'm not sure.
00:06 < uriel> tylerl: just curious, but why do you want to do a system
install?
00:06 < Namegduf> Go gets "unhappy" if it can't write to its package
directory, and I don't know how to fix that (although it might be fixable)
00:06 < tylerl> uriel: several users on a machine wanting to write with go,
and would prefer to not duplicate the entire 250M tree in each's home dir
00:08 < tylerl> sorry..  800M source tree.
00:08 < Namegduf> Shouldn't be 800MB.
00:09 < Namegduf> It's 224MB here.
00:09 < vsmatck> 128mB
00:09 < tylerl> it balooned up to 800M after I ran "all.bash"
00:09 < Namegduf> Mine's had that run, so odd.
00:10 < cbeck> Mine is about 800M, but that's with all three toolchains
00:12 < tylerl> you still need ./src after you've built the toolchains?
00:12 < vsmatck> You'd need it for goinstall.
00:13 < tylerl> vsmatck: otherwise no?
00:14 < vsmatck> tylerl: Not sure.
00:14 < uriel> you really want goinstall
00:14 < tylerl> i do?
00:15 < uriel> yes
00:15 < uriel> goinstall is the way to install libraries and pretty much
anything go-related that is not part of the distribution
00:21 -!- fmoo [~Adium@c-76-102-41-101.hsd1.ca.comcast.net] has quit [Quit:
Leaving.]
00:23 -!- Allotabits [~Joshwa@h18.214.213.151.dynamic.ip.windstream.net] has quit
[Ping timeout: 240 seconds]
00:44 -!- dshep [~dss@c-76-21-12-46.hsd1.ca.comcast.net] has joined #go-nuts
00:54 -!- tylerl [~tylerl@ip24-251-232-171.ph.ph.cox.net] has quit [Ping timeout:
276 seconds]
00:57 -!- fmoo [~Adium@c-76-102-41-101.hsd1.ca.comcast.net] has joined #go-nuts
01:04 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit:
Verlassend]
01:06 -!- shvntr [~shvntr@116.26.135.102] has joined #go-nuts
01:11 -!- jyxent [~jyxent@129.128.191.54] has quit [Read error: Connection reset
by peer]
01:13 -!- espeed [~espeed@63.246.231.57] has joined #go-nuts
01:16 -!- fmoo [~Adium@c-76-102-41-101.hsd1.ca.comcast.net] has quit [Quit:
Leaving.]
01:17 -!- jyxent [~jyxent@129.128.191.54] has joined #go-nuts
01:17 -!- xash [~xash@d062158.adsl.hansenet.de] has quit [Quit: Lost terminal]
01:19 -!- Allotabits [~Joshwa@h18.214.213.151.dynamic.ip.windstream.net] has
joined #go-nuts
01:27 -!- thomas_b [~thomasb@cm-84.215.47.51.getinternet.no] has quit [Ping
timeout: 240 seconds]
01:29 -!- damikin11 [~chris@cpe-24-30-179-173.socal.res.rr.com] has joined
#go-nuts
01:30 -!- thomas_b [~thomasb@cm-84.215.47.51.getinternet.no] has joined #go-nuts
01:31 -!- gtaylor [~gtaylor@99-5-124-9.lightspeed.gnvlsc.sbcglobal.net] has joined
#go-nuts
01:31 -!- gtaylor [~gtaylor@99-5-124-9.lightspeed.gnvlsc.sbcglobal.net] has left
#go-nuts []
01:38 -!- rejb [~rejb@unaffiliated/rejb] has quit [Ping timeout: 246 seconds]
01:41 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
01:49 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
01:53 -!- espeed [~espeed@63.246.231.57] has quit [Ping timeout: 250 seconds]
02:01 -!- dshep [~dss@c-76-21-12-46.hsd1.ca.comcast.net] has quit [Ping timeout:
248 seconds]
02:06 -!- anticw [~anticw@67.169.68.180] has quit [Ping timeout: 260 seconds]
02:09 -!- rlab [~Miranda@91.200.158.34] has quit [Read error: Connection reset by
peer]
02:25 -!- boscop_ [~boscop@g225209076.adsl.alicedsl.de] has joined #go-nuts
02:27 -!- boscop [~boscop@f055008161.adsl.alicedsl.de] has quit [Ping timeout: 250
seconds]
02:29 -!- artefon [~thiago@189.59.180.35.dynamic.adsl.gvt.net.br] has quit [Read
error: Connection reset by peer]
02:30 -!- Allotabits [~Joshwa@h18.214.213.151.dynamic.ip.windstream.net] has quit
[Ping timeout: 240 seconds]
02:41 -!- jyxent [~jyxent@129.128.191.54] has quit [Read error: Connection reset
by peer]
02:43 -!- ab3 [~abe@83.101.90.66] has quit [Read error: Operation timed out]
02:47 -!- jyxent [~jyxent@129.128.191.54] has joined #go-nuts
02:56 < plexdev> http://is.gd/DxTyo4 by [Brad Fitzpatrick] in
go/src/pkg/http/ -- http: new error for reading a body after it's been closed
02:56 < plexdev> http://is.gd/5MoSK9 by [Brad Fitzpatrick] in
go/src/pkg/mime/multipart/ -- mime/multipart: fix regression from previous
ReadSlice change
02:58 -!- kr [~kr@182.sub-174-254-229.myvzw.com] has joined #go-nuts
03:01 -!- kr [~kr@182.sub-174-254-229.myvzw.com] has quit [Client Quit]
03:15 -!- jhawk28 [~jhawk28@user-387c58d.cable.mindspring.com] has quit [Quit:
Linkinus - http://linkinus.com]
03:25 -!- anticw [~anticw@c-98-210-108-13.hsd1.ca.comcast.net] has joined #go-nuts
03:28 -!- gedevan [~gedevan@83.167.106.253] has quit [Quit: Leaving...]
03:29 -!- Adys [~Adys@unaffiliated/adys] has quit [Quit: Quit]
03:29 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts
03:57 -!- nictuku [~yvesj@unaffiliated/nictuku] has quit [Ping timeout: 250
seconds]
03:57 -!- nictuku [~yvesj@unaffiliated/nictuku] has joined #go-nuts
04:13 -!- vpit3833 [~user@CPE-58-160-37-24.phzl1.ken.bigpond.net.au] has joined
#go-nuts
04:17 -!- rejb [~rejb@unaffiliated/rejb] has quit [Disconnected by services]
04:17 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
04:18 -!- photron_ [~photron@port-92-201-19-120.dynamic.qsc.de] has joined
#go-nuts
04:19 -!- chadk [~chadk@S010600045a27676a.vs.shawcable.net] has joined #go-nuts
04:24 -!- a2800276_ [~a2800276@xdsl-87-79-214-206.netcologne.de] has joined
#go-nuts
04:24 -!- wchicken [~chicken@c-24-7-112-207.hsd1.ca.comcast.net] has joined
#go-nuts
04:24 < wchicken> hey guys -- how can I set the usage message with the flags
package?
04:26 -!- a2800276 [~a2800276@xdsl-213-196-209-13.netcologne.de] has quit [Ping
timeout: 246 seconds]
04:30 -!- jamesr [~jamesr@173-164-251-190-SFBA.hfc.comcastbusiness.net] has joined
#go-nuts
04:55 -!- gtaylor [~gtaylor@99-5-124-9.lightspeed.gnvlsc.sbcglobal.net] has joined
#go-nuts
04:58 < edsrzf> wchicken: You set a usage string for each flag that your
command uses
04:59 < edsrzf> wchicken: Alternatively, you can set the flag.Usage variable
to your own custom function that prints the usage.
04:59 < edsrzf> (I never noticed that second one before now, actually.)
05:00 < wchicken> edsrzf: ahh, I see.  the second is what I need since I
want to specify the usage of args instead of flags and it's nice to stay within
the flags package.  thanks!
05:10 -!- dshep [~dss@c-76-21-12-46.hsd1.ca.comcast.net] has joined #go-nuts
05:11 -!- jamesr [~jamesr@173-164-251-190-SFBA.hfc.comcastbusiness.net] has quit
[Quit: Leaving]
05:15 -!- arun_ [~arun@unaffiliated/sindian] has quit [Ping timeout: 250 seconds]
05:24 -!- damikin11 [~chris@cpe-24-30-179-173.socal.res.rr.com] has quit [Quit:
Leaving]
05:27 -!- tylerl_ [~tylerl@ip24-251-232-171.ph.ph.cox.net] has joined #go-nuts
05:29 < tylerl_> does go use epoll?
05:29 < tylerl_> (where available)
05:31 < vsmatck> yup
05:39 -!- gedevan [~gedevan@83.167.106.253] has joined #go-nuts
05:43 -!- foocraft [~dsc@78.100.208.32] has quit [Quit: Leaving]
05:46 -!- iant [~iant@216.239.45.130] has quit [Read error: Connection reset by
peer]
06:08 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has joined #go-nuts
06:08 -!- mode/#go-nuts [+v iant] by ChanServ
06:32 -!- Viriix [~joseph@c-67-169-172-251.hsd1.ca.comcast.net] has joined
#go-nuts
06:34 -!- nf [~nf@2001:470:21:20::4444:61d9] has joined #go-nuts
06:34 -!- mode/#go-nuts [+o nf] by ChanServ
06:36 -!- Viriix [~joseph@c-67-169-172-251.hsd1.ca.comcast.net] has left #go-nuts
[]
06:55 -!- wrtp [~rog@92.17.111.113] has joined #go-nuts
07:03 -!- gtaylor [~gtaylor@99-5-124-9.lightspeed.gnvlsc.sbcglobal.net] has quit
[Quit: gtaylor]
07:04 -!- piranha [~piranha@83.221.140.244] has joined #go-nuts
07:09 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
07:15 < kevlar> tylerl_: The best way to install Go for multiple users is to
put it in a standard place (say /opt/go) and add all users to a "gousers" group or
similar
07:16 < tylerl_> kevlar: do you only need write access to be able to install
new packages, or do you need it to be able to compile as well?
07:16 < kevlar> I would then make a root crontab to chown -R root:gousers
/opt/go && chmod -R g+w /opt/go
07:17 < kevlar> and then make a common goenv.sh file in /etc/bash.d/ or
whatever it is for your distro that adds the /opt/go/bin to their paths.
07:17 < kevlar> tylerl_: you only would need read access to compile your own
Go code, but you would need write access to update Go to the latest version or to
goinstall new packages or to make install your own packages to the Go root
07:18 < kevlar> which you probably will want to do when you're writing your
own programs.
07:19 < kevlar> (if you don't trust the other go users or you just want to
be secure, you might make that crontab chmod also take off setuid and setgid)
07:21 < tylerl_> it seems like there should be some logical way of putting
shared code in /usr/lib/...  and goinstall'ing to your own local store if not root
07:21 < tylerl_> you know, like *every other language*
07:21 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has joined
#go-nuts
07:23 < tylerl_> not complaining or anything -- it's just that it all seems
like a temporary workaround for now until someone comes up with an intentional
structure
07:24 < kevlar> It's actually intended to be installed on a per-user basis
07:25 < kevlar> that way each user can maintain the source tree however they
wish
07:25 < tylerl_> and that doesn't seem at all silly to you?
07:25 < kevlar> Go executable are, at present, largely statically linked and
as such don't need a central repository
07:25 < kevlar> tylerl_: nope.
07:25 < tylerl_> I don't install python on a per-user basis and maintain my
own source tree, even though I may be the only one using it.
07:26 < kevlar> Most people using C aren't going to touch cstdlib with a ten
foot pole
07:26 < kevlar> Go users are comparatively quite likely to hack on the
libraries or add their own
07:26 < kevlar> therefore it makes sense that they have their own complete
set.
07:26 < kevlar> *of libraries and binaries.
07:27 < tylerl_> I don't have to maintain my own private source tree of gcc
in order to compile C code...
07:27 < tylerl_> is that any different?
07:27 < kevlar> Yes.
07:27 < kevlar> See above.
07:27 < kevlar> Nobody on your system is going to be changing how "printf"
works
07:28 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has quit [Ping
timeout: 260 seconds]
07:28 < kevlar> but if you have more than one user, it's entirely possible
that one will decide that he doesn't quite like the way that prints something and
make the change
07:28 < kevlar> blah, %U *
07:28 < tylerl_> kevlar: you mean printf in go, or in stdlib?
07:28 < kevlar> go.
07:28 < kevlar> well, the "nobody will change it" is C, the "someone might
try" is for Go
07:29 < kevlar> also, how often do you update your gcc install?  your glibc
install?
07:29 < tylerl_> kevlar: you mean hack the original definition, or extend
the functionality?
07:29 < kevlar> if you're using Go, you're probably updating it weekly or
monthly.
07:29 < kevlar> tylerl_: it doesn't matter.
07:30 < kevlar> The point is, you have your own Go source tree because it's
mutable and other users shouldn't be subject to your mutations and you REALLY do
not want to be subject to theirs.
07:30 < tylerl_> kevlar: well, the nice thing about go is i can change the
way library code works without having to edit the canonical definitions.
07:30 < kevlar> Not really, no...
07:30 < tylerl_> kevlar: but doesen't that make your code non-portable?
07:31 < tylerl_> because your code will only work with your printf
modifications that no one else wants?
07:31 < kevlar> tylerl_: Only if you release something before you get the CL
approved.
07:31 < tylerl_> kevlar: then you're talking about developing Go itself, not
developing applications with Go.
07:31 < kevlar> for instance, my IRC daemon was running with a change to the
DNS library for a few weeks before it made it into a release
07:32 < kevlar> it wouldn't make sense for another developer on my machine
to have his code possibly break when he didn't know it was going to happen
07:33 < kevlar> and he wouldn't, because he'd be running with his own
$GOROOT.
07:33 < kevlar> And if he was inadvisably using mine, that's his fault.
07:34 < tylerl_> So, you're saying that the private package layout is a
reaction to the fact that Go is under heavy development?
07:34 < kevlar> Putting the word "reaction" in my mouth is a
mischaracterization of everything I said.
07:34 < tylerl_> "answer"?
07:35 < kevlar> It *empowers* heavy development
07:35 < tylerl_> or "solution"?
07:35 < kevlar> but even if you don't like that argument, there's still the
fact that there are no go shared libraries that have to stick around somewhere for
binaries to work
07:35 < tylerl_> well, if I'm on the Python team, I'm not using a shared
install even though it would otherwise be the default.
07:36 < kevlar> and that's almost the definition of how C binaries work
07:36 < tylerl_> but the package structure doesn't force *everyone* to be
empowered to be a language developer
07:37 < kevlar> so, since you apparently don't like my reasons for the way
it is, tell me: why do you *dislike* the way it is?
07:37 < kevlar> If you don't like the extra "800M" of disk space, stop
complaining because disk space is cheap on average
07:38 < tylerl_> ...
07:38 < kevlar> if you don't like the fact that it requires users to set it
up themselves, then stop complaining because if they can't figure that out then
they probably will have even more issues when they get to the actual coding
07:38 -!- aho [~nya@fuld-590c7ef0.pool.mediaWays.net] has joined #go-nuts
07:39 < tylerl_> complaining?
07:39 < kevlar> and if you don't like it because you think you have a better
idea, stop complaining and submit a CL to fix it :)
07:39 < tylerl_> /sigh
07:39 -!- wrtp [~rog@92.17.111.113] has quit [Quit: wrtp]
07:39 < tylerl_> no complaining here.  don't get too worked up.
07:40 < edsrzf> I don't see any reason packages couldn't be kept in /usr/lib
now.
07:41 < tylerl_> edsrzf: i think in some cases they may be.
07:42 < tylerl_> i would wager that the RPM package they're trying to get in
to Fedora doesn't install to $HOME/go
07:43 < kevlar> There's no reason your $GOROOT can't be /usr/lib/go, but the
semantics of /usr/lib in the C world are completely different from Go.
07:43 < tylerl_> kevlar: the semantics?
07:44 < kevlar> tylerl_: /usr/lib would be more analogous to
$GOROOT/pkg/$GOOS_$GOARCH
07:44 < edsrzf> I'm not talking about putting the entire tree under
/usr/lib, just the package files that currently go under $GOROOT/pkg/$GOOS_$GOARCH
07:44 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has joined #go-nuts
07:45 < kevlar> if you were so inclined, I think you could edit the standard
Make.inc (?) to change the pkgroot from that to /usr/lib/go
07:46 < kevlar> but I still think the fact that it's used at compile-time
not run-time is different enough from the c/c++ model to warrant pause.
07:46 < edsrzf> Static C/C++ libraries still go under /usr/lib
07:46 < kevlar> indeed that's why /usr/lib exists, is it not?
07:46 < edsrzf> Shared libraries go there too
07:47 < kevlar> oh, I see what you meant
07:47 * kevlar was thinking "not changing" not "statically linked"
07:47 < edsrzf> Ah :P
07:47 < edsrzf> "static" means many different things in the programming
world.  :)
07:47 < tylerl_> ideally the API will be relatively static once things get a
little more stable
07:48 < kevlar> heh.  "Oh, you didn't mean 'there's only ever one in
existence?'"
07:48 < kevlar> tylerl_: we've actually started moving in that direction
07:48 < kevlar> we now have weekly releases and "release" tags
07:48 < tylerl_> i saw that.
07:48 < kevlar> and we're getting close to having release tags be more than
just retags of stable weekly things by intentionally omitting certain things
07:49 < edsrzf> There are still some pretty big breaks between releases
though.
07:49 < kevlar> like I think the net rewrite won't go into the next release
but is still in weekly
07:49 < edsrzf> Release and weekly are on the same branch
07:49 < kevlar> for now
07:50 < edsrzf> It's pretty much, release weeklies and then every so often
say "hey, that was a pretty good weekly" and then it's tagged as a release.
07:50 < kevlar> I think with some of the major changes planned release will
be its own branch, at least until some things are proven out
07:50 < edsrzf> Anything's possible, but I don't see that happening any time
soon.
07:54 < tylerl_> what are the practical limits to how many goroutines you'd
want to create at a time?
07:55 < edsrzf> I'm not sure what you're really asking
07:56 < tylerl_> say you're writing a c10k application -- you wouldn't want
10k goroutines active at a time --
07:56 < |Craig|> I had 20000 go routines running for a while.  didn't cause
any issues
07:56 < tylerl_> right?
07:57 < tylerl_> so maybe you would, then.
07:57 < |Craig|> I can't say performance was great as I had nothing to
compare to, but it seemed ok
07:57 < KirkMcDonald> tylerl_: Goroutines are multiplexed over actual
threads.  In theory, the language is designed such that you can create goroutines
without worrying about how many you have.
07:58 < tylerl_> So, if you were re-implementing nginx in Go, would you
create a pool of goroutines, or do one per connection?
07:59 < edsrzf> I'm not sure which would be better.  I'd probably start out
with one goroutine per connection for simplicity.
08:07 -!- ExtraSpice [XtraSpice@88.118.35.153] has joined #go-nuts
08:08 -!- tylerl_ [~tylerl@ip24-251-232-171.ph.ph.cox.net] has quit [Quit:
leaving]
08:17 -!- Kafo [~Henry@a91-154-0-50.elisa-laajakaista.fi] has joined #go-nuts
08:22 -!- nkdnstbr [~nkdnstbr@cpe-173-172-231-83.rgv.res.rr.com] has quit [Quit:
Lost terminal]
08:30 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
08:53 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:c184:a11c:a961:2072] has joined
#go-nuts
08:56 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
08:58 -!- SecretAgent [sa@28.158.143.98.nitemare.name] has quit [Ping timeout: 276
seconds]
08:58 -!- SecretAgent [sa@28.158.143.98.nitemare.name] has joined #go-nuts
09:07 -!- cenuij [~cenuij@93.26.130.28] has joined #go-nuts
09:07 -!- cenuij [~cenuij@93.26.130.28] has quit [Changing host]
09:07 -!- cenuij [~cenuij@base/student/cenuij] has joined #go-nuts
09:07 -!- cenuij [~cenuij@base/student/cenuij] has quit [Remote host closed the
connection]
09:11 -!- huin [~huin@91.84.64.19] has joined #go-nuts
09:27 < Kafo> Is there SDL or similar bindings working on Windows?
09:29 -!- zimsim [~simon@87.72.77.195] has joined #go-nuts
09:33 -!- edsrzf [~edsrzf@122-61-221-144.jetstream.xtra.co.nz] has quit [Remote
host closed the connection]
09:35 -!- nkdnstbr [~nkdnstbr@cpe-173-172-231-83.rgv.res.rr.com] has joined
#go-nuts
09:41 -!- fmoo [~Adium@c-76-102-41-101.hsd1.ca.comcast.net] has joined #go-nuts
09:42 < uriel> I think the windows helper libs will let you do graphics on
windows
09:42 < uriel> I'm not sure any of the sdl bindings have been ported to
windows
10:05 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 240 seconds]
10:13 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
10:16 -!- rlab [~Miranda@91.200.158.34] has quit [Read error: Connection reset by
peer]
10:18 * ww is happier having wrangled xml package sufficiently (and just resorted
to hard-coding the dictionary of namespaces in the template)
10:18 * ww wonders why he is labouring on labour day...
10:18 < ww> happy labour day everyone
10:20 -!- fmoo1 [~Adium@c-76-102-41-101.hsd1.ca.comcast.net] has joined #go-nuts
10:24 -!- fmoo [~Adium@c-76-102-41-101.hsd1.ca.comcast.net] has quit [Ping
timeout: 240 seconds]
10:25 -!- fmoo1 [~Adium@c-76-102-41-101.hsd1.ca.comcast.net] has quit [Quit:
Leaving.]
10:32 -!- vpit3833 [~user@CPE-58-160-37-24.phzl1.ken.bigpond.net.au] has left
#go-nuts ["ERC Version 5.3 (IRC client for Emacs)"]
11:16 -!- Kafo [~Henry@a91-154-0-50.elisa-laajakaista.fi] has quit [Read error:
Connection reset by peer]
11:42 -!- ab3 [~abe@83.101.90.66] has joined #go-nuts
11:52 -!- flaguy48 [~gmallard@user-0c6s350.cable.mindspring.com] has joined
#go-nuts
11:54 -!- TheMue [~TheMue@p5DDF5522.dip.t-dialin.net] has joined #go-nuts
11:57 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has quit [Ping
timeout: 240 seconds]
11:59 -!- wrtp [~rog@host81-149-212-233.in-addr.btopenworld.com] has joined
#go-nuts
12:02 -!- wrtp [~rog@host81-149-212-233.in-addr.btopenworld.com] has quit [Client
Quit]
12:03 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has joined
#go-nuts
12:09 -!- tvw [~tv@e176005164.adsl.alicedsl.de] has joined #go-nuts
12:10 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has quit [Ping
timeout: 258 seconds]
12:34 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has joined
#go-nuts
12:38 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has quit [Ping
timeout: 240 seconds]
12:40 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has joined
#go-nuts
12:42 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has quit
[Client Quit]
12:46 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has joined
#go-nuts
12:50 -!- zimsim [~simon@87.72.77.195] has quit [Ping timeout: 248 seconds]
13:03 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has joined
#go-nuts
13:04 -!- zimsim [~simon@87.72.77.195] has joined #go-nuts
13:31 -!- welterde [welterde@thinkbase.srv.welterde.de] has quit [Read error:
Operation timed out]
13:42 -!- welterde [welterde@thinkbase.srv.welterde.de] has joined #go-nuts
13:52 -!- gedevan [~gedevan@83.167.106.253] has quit [Quit: Linkinus -
http://linkinus.com]
13:57 -!- a2800276 [~a2800276@xdsl-87-79-214-206.netcologne.de] has quit [Remote
host closed the connection]
13:57 -!- artefon [~thiago@189.59.180.35.dynamic.adsl.gvt.net.br] has joined
#go-nuts
13:57 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has quit
[Ping timeout: 246 seconds]
14:02 -!- chadk [~chadk@S010600045a27676a.vs.shawcable.net] has quit [Quit:
Leaving]
14:04 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Quit:
skelterjohn]
14:05 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
14:40 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
14:52 -!- unhygienix [~unhygieni@host86-135-59-30.range86-135.btcentralplus.com]
has joined #go-nuts
14:58 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 260 seconds]
15:00 -!- djcapelis [~djc@blender/coder/DJCapelis] has quit [Read error: Operation
timed out]
15:01 -!- djcapelis [~djc@capelis.dj] has joined #go-nuts
15:01 -!- djcapelis [~djc@capelis.dj] has quit [Changing host]
15:01 -!- djcapelis [~djc@blender/coder/DJCapelis] has joined #go-nuts
15:06 -!- shvntr [~shvntr@116.26.135.102] has quit [Quit: leaving]
15:23 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
15:23 -!- meanburrito920 [~john@woozy.STUDENT.CWRU.Edu] has joined #go-nuts
15:23 -!- meanburrito920 [~john@woozy.STUDENT.CWRU.Edu] has quit [Changing host]
15:23 -!- meanburrito920 [~john@unaffiliated/meanburrito920] has joined #go-nuts
15:26 -!- piranha [~piranha@83.221.140.244] has quit [Quit: Computer has gone to
sleep.]
15:33 -!- jyxent [~jyxent@129.128.191.54] has quit [Ping timeout: 264 seconds]
15:37 -!- jyxent [~jyxent@129.128.191.54] has joined #go-nuts
16:18 -!- napsy [~luka@88.200.96.18] has quit [Quit: Lost terminal]
16:22 -!- jyxent [~jyxent@129.128.191.54] has quit [Read error: Connection reset
by peer]
16:22 -!- jyxent [~jyxent@129.128.191.54] has joined #go-nuts
16:24 -!- artefon [~thiago@189.59.180.35.dynamic.adsl.gvt.net.br] has quit [Quit:
bye]
16:25 -!- mattn_jp [~mattn@112-68-60-198f1.hyg1.eonet.ne.jp] has joined #go-nuts
16:35 -!- keidaa [~keidaa@cm-84.210.56.138.getinternet.no] has joined #go-nuts
16:42 -!- ako [~nya@fuld-590c7cf0.pool.mediaWays.net] has joined #go-nuts
16:45 -!- aho [~nya@fuld-590c7ef0.pool.mediaWays.net] has quit [Ping timeout: 250
seconds]
16:53 -!- keidaa [~keidaa@cm-84.210.56.138.getinternet.no] has quit [Ping timeout:
250 seconds]
16:56 -!- keidaa [~keidaa@cm-84.210.56.138.getinternet.no] has joined #go-nuts
17:08 -!- nictuku [~yvesj@unaffiliated/nictuku] has quit [Ping timeout: 246
seconds]
17:09 -!- tvw [~tv@e176005164.adsl.alicedsl.de] has quit [Read error: Connection
reset by peer]
17:21 < ww> hmmm...  something's broken in the latest weekly on freebsd
17:24 -!- nictuku [~yvesj@unaffiliated/nictuku] has joined #go-nuts
17:28 -!- juliankrause [~juliankra@li55-88.members.linode.com] has joined #go-nuts
17:29 < juliankrause> I am currently trying to run a networked server and
I'd like to every so often do some maintience task.  If I was doing a select loop
I could do that with a non blocking accept but it does not seem that you can get
access to that.  How does one do such a thing?
17:31 -!- rejb [~rejb@unaffiliated/rejb] has quit [Ping timeout: 246 seconds]
17:31 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
17:39 < aiju> juliankrause: not at all
17:39 < aiju> or what do you mean?
17:40 < juliankrause> So I'm running a server which will accept multiple
connections, let's say I want to do something every 10 or so seconds like send out
a ping message to all currently connected clients to make sure everyone is still
online.
17:40 < juliankrause> How would I do such a thing?
17:40 < aiju> go routines?
17:40 < aiju> go func() {for {connection.Ping() ; time.Sleep(1e10))}
17:40 < exch> spawn a single goroutine which polls clients and then sleeps
for x seconds
17:40 < aiju> +}
17:41 < juliankrause> It is non obvious how to do that when Accept is
blocking.
17:41 < ww> go func() { for { _ <- time.After(10e9); ping(); }}()
17:41 < ww> istr some sort of threading issue with time.Sleep that doesn't
affect time.After
17:42 -!- boomtopper
[~boomtoppe@cpc12-nrte22-2-0-cust249.8-4.cable.virginmedia.com] has joined
#go-nuts
17:42 < aiju> time.Sleep is broken, wtf?
17:42 < ww> i vaguely remember something on the list about it occupying an
os thread
17:42 -!- jyxent [~jyxent@129.128.191.54] has quit [Read error: Connection reset
by peer]
17:42 -!- jyxent [~jyxent@129.128.191.54] has joined #go-nuts
17:43 < aiju> i highly doubt it
17:46 < ww>
https://groups.google.com/group/golang-nuts/browse_thread/thread/5c1d3741a2ef97f3/1bc91127543cc0da?lnk=gst&q=Sleep+After#1bc91127543cc0da
17:46 < ww> pike says: Sleep should be implemented in the runtime rather
than by a system
17:46 < ww> call.  Until then, time.After is your friend.
17:47 < skelterjohn> time.Sleep() blocks
17:48 < juliankrause> So yeah, blocking is bad, and it doesn't seem you can
get a nonblocking accept?  So how do you do other things in "downtime" while
waiting for accepts.
17:48 < aiju> juliankrause: just use a damn go routine
17:48 < skelterjohn> what's a non-blocking accept?
17:48 < skelterjohn> oh, for listening to a port?
17:48 < juliankrause> Yeah
17:48 < skelterjohn> yes - the solution is to accept in a different
goroutine
17:48 * aiju throws goroutines at juliankrause
17:48 < skelterjohn> as aiju says so caustically
17:49 < ww> much as i hate to admit it, aiju's right :)
17:49 < juliankrause> Okay, that's starting to make sense, thanks.
17:49 < aiju> hahahah
17:49 < skelterjohn> aiju: people don't pay attention to you when you swear
at them
17:49 < skelterjohn> fact of life
17:50 < aiju> some do
17:50 < aiju> and i don't give a fucking shit what the rest does ;P
17:50 < ww> weekly's seriously broken on freebsd...  the dynamic linker
yells me about invalid format of /lib/ when trying to run a go program
17:50 < ww> downgrated to lastweekly and all is fine...
17:50 < aiju> go doesn't use dynamic linking
17:51 < aiju> so someone is *really* fucked up
17:51 < aiju> s/one/thing
17:51 < ww> ummm aiju...  sorry...  kind of necessary unless i want to
rewrite a bunch of libraries in go
17:52 < aiju> oh right cgo
17:52 < ww> if you want to rewrite libxslt and libraptor for me in go, i'll
happily use them
17:52 < aiju> xslt is wrong either way
17:52 -!- ayo [~nya@fuld-590c7eb1.pool.mediaWays.net] has joined #go-nuts
17:53 < ww> nobody likes xml but sometimes needs must
17:54 -!- a2800276 [~a2800276@xdsl-87-79-211-11.netcologne.de] has joined #go-nuts
17:55 -!- ako [~nya@fuld-590c7cf0.pool.mediaWays.net] has quit [Ping timeout: 250
seconds]
17:56 < ww> until then, i make pretty pictures with it like this:
http://semantic.ckan.net/record/9df8df51-6327-37a8-e044-0003ba9b0d98
17:59 < skelterjohn> ww: did you do a clean of your existing stuff?
17:59 < skelterjohn> you might be trying to link old binaries
18:00 < skelterjohn> i always do a "goinstall -a -clean" whenever i rebuild
go
18:00 -!- boomtopper
[~boomtoppe@cpc12-nrte22-2-0-cust249.8-4.cable.virginmedia.com] has quit [Quit:
Lost terminal]
18:00 < ww> skelterjohn: yes, did clean out everything
18:01 < ww> i'll try recreating in a sandbox a bit later...
18:05 -!- Guest10648 [~nya@fuld-590c7eb1.pool.mediaWays.net] has quit [Ping
timeout: 250 seconds]
18:06 -!- Guest10648 [~nya@fuld-590c7f0b.pool.mediaWays.net] has joined #go-nuts
18:07 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
18:10 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has quit [Quit:
Geek insindeĀ®]
18:11 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has joined
#go-nuts
18:18 -!- tvw [~tv@e176005164.adsl.alicedsl.de] has joined #go-nuts
18:19 -!- Kafo [~Henry@a91-154-0-50.elisa-laajakaista.fi] has joined #go-nuts
18:23 < vsmatck> The inotify API is weird.  I watch a file for modify and
delete.  Only sometimes does it tell me the name of the deleted file.  According
to man inotify 7 the name is only supposed to be present for files in watched
directories.
18:23 < vsmatck> But it is present sometimes when I just watch files.
18:24 < vsmatck> If it's not going to be there all the time I wonder if I
should just do one goroutine per file.  Then I could infer the file name because
it'd be the only one watched.  Hm.
18:26 < kevlar> vsmatck: Whether or not you are provided with the name
should be deterministic
18:27 < kevlar> you could also run through all of the watched files and
store their names as a map from inode
18:28 -!- ako [~nya@fuld-590c7fe1.pool.mediaWays.net] has joined #go-nuts
18:28 < vsmatck> Is the cookie the inode?
18:28 * vsmatck writes some code to check.
18:30 -!- juliankrause [~juliankra@li55-88.members.linode.com] has left #go-nuts
[]
18:30 -!- Guest10648 [~nya@fuld-590c7f0b.pool.mediaWays.net] has quit [Ping
timeout: 250 seconds]
18:30 < vsmatck> oh nvm.  That's just to identify two events are for the
same file for when there's a rename.
18:31 -!- zozoR [~Morten@90.185.81.29] has joined #go-nuts
18:33 < vsmatck> kevlar: The inode idea is good.  That should work for me.
:)
18:34 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has left
#go-nuts []
18:35 -!- dshep [~dss@c-76-21-12-46.hsd1.ca.comcast.net] has quit [Read error:
Connection reset by peer]
18:35 < vsmatck> Wait a minute.  No it won't.  I think I'll just invalidate
entire cache upon every delete event.  I'm only caching a few hundred k of text
files.
18:36 -!- dshep [~dss@c-76-21-12-46.hsd1.ca.comcast.net] has joined #go-nuts
18:38 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has joined
#go-nuts
18:48 -!- boomtopper
[~boomtoppe@cpc12-nrte22-2-0-cust249.8-4.cable.virginmedia.com] has joined
#go-nuts
18:48 -!- nkdnstbr [~nkdnstbr@cpe-173-172-231-83.rgv.res.rr.com] has quit [Quit:
Lost terminal]
18:59 -!- ekontsevoy [~ekontsevo@209.20.66.251] has quit [Ping timeout: 246
seconds]
19:00 < aiju> i wish go { foo } was valid syntax
19:01 -!- xb95 [~xb95@dreamwidth/staff/mark] has quit [Remote host closed the
connection]
19:02 < fzzbt> why go foo() instead of go foo
19:02 < fzzbt> or nvm
19:02 < aiju> foo could be anything
19:02 < aiju> go { ch <- 42 }
19:02 < aiju> go { for { ch <- 1 } }
19:02 < aiju> it's the common case for me
19:03 -!- xb95 [~xb95@dreamwidth/staff/mark] has joined #go-nuts
19:03 < kevlar> aiju: There's been recent discussions about adding that,
actually
19:03 < |Craig|> when compared to the existing use of go, that goes not
change the functionality, makes a lot of stuff shorter/cleared, and at worst adds
2 characters.
19:03 -!- mattn_jp [~mattn@112-68-60-198f1.hyg1.eonet.ne.jp] has quit [Quit:
Ex-Chat]
19:03 < aiju> hehe
19:03 < aiju> "adds 2 characters"?
19:03 < kevlar> aiju: but the thought is that we are going to avoid adding
syntactic sugar now so that we don't screw ourselves later
19:04 < |Craig|> go foo() could be go {foo()}
19:04 < aiju> well, make the common case easy
19:04 < aiju> currently it allows *only* function calls
19:04 < aiju> go ch <- 42 is invalid
19:04 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
19:04 < |Craig|> without a closure yes thats invalid
19:05 < kevlar> it only allows function calls because that's how "go" and
"defer" work, by creating a stack frame and not running it
19:05 -!- ekontsevoy [~ekontsevo@209.20.66.251] has joined #go-nuts
19:05 < aiju> {} could be just syntactic sugar for func() {} () ...
19:06 < kevlar> aiju: I think that would also make it even easier for the
loop-goroutine bug
19:06 < aiju> loop goroutine bug?
19:06 < aiju> sounds awkward
19:06 < kevlar> for x := range whatever { go func() { do something with x }
() }
19:06 < |Craig|> sending using a closure in a loop...
19:06 < |Craig|> I had that bug.
19:07 < kevlar> that's a very common bug and it would be difficult to see
the solution if you had the syntactic sugar in place of the go func(){}()
19:07 < aiju> what is the solution?
19:07 < aiju> i'd prefer fixing the damn bug
19:07 < kevlar> for x := range whatever { go func(x type) { do something
with x } (x) }
19:08 -!- ab3 [~abe@83.101.90.66] has quit [Read error: Operation timed out]
19:08 < |Craig|> kevlar, would putting x:=x in the loop body work too?  (oh
what a mess)
19:09 < kevlar> |Craig|: I don't know.  Possibly?
19:10 < |Craig|> I'd guess it wouldn't, but it kinda seems like it should
19:10 < kevlar> no, I think it might
19:11 < kevlar> but to understand that solution you'd still need to
understand what went wrong, and it's difficult to do that if you've been using the
syntactic sugar, which most people would all the time.
19:11 < aiju> it's like 2[array] in C
19:11 < kevlar> how so?
19:11 < kevlar> 2[array] might look weird, but it doesn't introduce weird
bugs
19:11 < aiju> to understand that, you must also get behind the syntactic
sugar
19:12 < aiju> ture
19:12 < aiju> *true
19:12 -!- chadk [~chadk@S010600045a27676a.vs.shawcable.net] has joined #go-nuts
19:12 < kevlar> one of the things I like about Go is that it's easy to write
code that works, so I'm really hesitant to support sugar that may make it easier
to write wrong code.
19:13 < kevlar> (even though I wish for sugar like that quite often)
19:13 -!- chadk [~chadk@S010600045a27676a.vs.shawcable.net] has quit [Client Quit]
19:13 < aiju> x := x works
19:14 < aiju> so i don't quite see the problem
19:15 < kevlar> aiju: but would you know to do that if you'd been using go
{} the entire time you'd been programming Go and had no idea that it was actually
a defered function call on a separate stack?
19:15 < kevlar> it would look to you like the elements in your slice or the
values coming from your channel were wrong
19:16 < Namegduf> I wonder if the language could just outlaw closing over
loop variables.
19:16 < Namegduf> In a range.
19:16 < rm445_> hmm, the for x:=range..  { go func() {..  thing, what does
that do?  Completely unpredictable x based on which of the caller and goroutines
happen to run?
19:16 < Namegduf> It's almost certainly an error.
19:17 < Namegduf> rm445_: x is a single variable, so all the goroutines
operate on the same x, which is changed concurrently to their execution
19:18 < kevlar> if you put a fmt.Println(x) in there, you'll typically see N
prints of Y, where N is the number of elements and Y is the last element
19:18 < |Craig|> Namegduf: its not always an error, suppose you have a loop
that blocks until the call is done
19:18 < kevlar> then why use a goroutine?
19:18 < kevlar> but yes, it's not always an error.
19:18 < Namegduf> You can't detect that a goroutine is being used easily.
19:18 < |Craig|> kevlar: I mean without a go routine
19:19 < Namegduf> You'd have to detect the closure, then detect a goroutine
on that closure...
19:19 < kevlar> oh, true, closures don't have to be executed in a goroutine.
19:19 < Namegduf> It gets messy and unreliable.
19:19 < Namegduf> The closure creation can be distinct from the go
statement, as well.
19:19 < kevlar> so it's just defering a closure around a loop variable
that's bad.
19:19 < |Craig|> suppose you need the loop var in a map reduce in a loop
19:19 < Namegduf> Hmm.
19:19 < Namegduf> You can still use x := x, though.
19:19 < |Craig|> closures are not only useful for use with goroutines
19:19 < kevlar> Namegduf: what if you make the closure and store it in a map
and then use "go" to run that closure later?
19:19 < kevlar> it's not an easy problem
19:20 < Namegduf> Right, exactly.
19:20 < Namegduf> You can't detect just closures starting goroutines easily.
19:20 -!- dataviruset [~datavirus@90-230-44-14-no55.tbcn.telia.com] has joined
#go-nuts
19:20 < Namegduf> The legitimate usecases, you're doing a function call
anyway, you can afford to copy your loop variable.
19:20 < Namegduf> And close over the copy.
19:21 < aiju> you don't need to for range
19:21 < Namegduf> You do.
19:21 < aiju> no
19:21 < aiju> for i := 1; i < 10; i++ {
19:21 < aiju> go func() {ch <- i} ()
19:21 < aiju> }
19:21 < aiju> is just as wrong
19:21 < Namegduf> Yes, it is.
19:21 < kevlar> Namegduf: but there could still be instances where you DO
want the behavior of closing over the loop variable
19:21 < Namegduf> It's also much more obvious.
19:21 < Namegduf> But just as wrong.
19:21 < Namegduf> kevlar: There is no behaviour you can only get that way.
19:21 < aiju> it happens with any changing variable
19:22 < |Craig|> if you hide the issue with loops where its common, people
will still have the bug, but it will be worse.  Close over the var, then change it
later not in a loop has the same issue
19:22 < Namegduf> Closing over the loop variable is the same as closing over
a copy of it, and copying it back after if you need to be able to change it.
19:22 < Namegduf> I'm saying to forbid the closing.
19:22 < Namegduf> So it's not being "hidden".
19:22 < kevlar> Namegduf: no, what if I *want* the loop variable to change
inside my closure because I know I'm not going to call the closure until after the
loop?
19:23 < Namegduf> kevlar: Then you can explicitly create a variable
containing an address
19:23 < Namegduf> And close over that
19:23 < Namegduf> Which is weird but still possible, and your use case is
weird but possible, so it suits.
19:24 < kevlar> but see, now you're forcing people to work around the rules
19:24 < aiju> what if you WANT to shoot yourself in the foot?
19:24 < |Craig|> I wouldn't mind closures doing a copy, so if you want the
value to change you use a pointer
19:24 < kevlar> which is a worse case.
19:24 < Namegduf> No, not really.
19:24 < Namegduf> I'm forcing people who actually want to do something which
is almost always a bug to be more explicit about it, and if they want to do
something really arcane they have to do it oddly.
19:25 < aiju> the weird world of closure semantics
19:25 < Namegduf> That's it.
19:25 -!- tav [~tav@2.96.34.10] has quit [Ping timeout: 250 seconds]
19:25 < kevlar> Also, you're special-casing loop variables
19:25 < Namegduf> I dispute that that's worse than people closing over
variables accidentally, because it's an irritating source of bugs.
19:25 < |Craig|> when I call a function, it does a copy, why not when I make
a closure?  Personally I don't care which it is, the issue is that while learning
go, I never learned which it was until I had a bug caused by my assuming it was
the other way
19:25 < kevlar> unless you really want all closures to have to have pointers
to what they modify
19:26 < Namegduf> What they modify is pushed onto the heap anyway.
19:26 < kevlar> in which case you'll end up with more than single-pointers
and suddenly Go turns nasty.
19:26 < Namegduf> Why would all closures need to have pointers to what they
modify?
19:26 < kevlar> (does go even allow x **int?)
19:26 < aiju> kevlar: sure
19:26 < Namegduf> That's hyperbole in no way implied by anything I said.
19:26 < aiju> i've used **int somewhere
19:26 -!- tav [~tav@92.7.116.120] has joined #go-nuts
19:27 -!- fmoo [~Adium@c-76-102-41-101.hsd1.ca.comcast.net] has joined #go-nuts
19:27 < aiju> i've used ****int in C code lol
19:27 < Namegduf> They would need to have a single pointer in one case: to a
variable generated by range.
19:27 < kevlar> I figured it did.  It allows pointers to interfaces, so it
should.
19:27 < |Craig|> you can use **********in
19:27 < kevlar> Namegduf: so you are special-casing loop variables?
19:27 < aiju> in Go i rather have a slice in between
19:27 < aiju> *[]*int is not that rare
19:27 < Namegduf> kevlar: Yes.
19:27 < rm445_> tbh I probably wouldn't mind if Go just didn't have closures
at all, but I know it's just ignorance.  Can someone explain why closures are
good?
19:27 < kevlar> Namegduf: that violates the principle of least surprise
19:27 < Namegduf> kevlar: The suggestion was "why not forbid closing over
loop variables?"
19:28 < Namegduf> kevlar: It violates nothing for 99.9% of code which
doesn't close over loop variables because there's very little legitimate reason to
do that.
19:29 < Namegduf> Where it is being done, the odds are the user is expecting
it to be a separate variable per loop iteration
19:29 < Namegduf> And the violation of least surprise is there, the compiler
is just catching it before it gets to runtime
19:29 < |Craig|> the change I'd like to see is one in the docs to make the
issue more clear.  I'd like to avoid adding special cases (which would need
documentation too)
19:29 < kevlar> when the actual behavior and the expected behavior are at
odds, the best thing to do is what is done everywhere else, POLS.
19:30 -!- ab3 [~abe@83.101.90.66] has joined #go-nuts
19:30 < kevlar> |Craig|: it is in the docs
19:30 < kevlar> !gofaq closures
19:30 < GoBIR_> kevlar: Q. closures and goroutines -
http://golang.org/doc/go_faq.html#closures_and_goroutines
19:30 < aiju> heh
19:30 < aiju> nice bot
19:30 < kevlar> half the time I try that he's not here or i don't know what
keyword to use, lol.
19:30 < |Craig|> ah, the faq, I guess that counts
19:31 < Namegduf> I dispute that...  claim.
19:31 < Namegduf> WHen the actual behaviour and the expected behaviour are
at odds, the best thing to do remains a complex equation of safety, usefulness,
maintainability, ease of use, etc
19:31 < Namegduf> Just like it is when they aren't
19:31 < Namegduf> That may or may not be the solution used elsewhere
19:32 < Namegduf> Not surprising people for no reason is good, but useful
changes are also good.
19:32 < Namegduf> Also a whole bunch of other relevant languages lack
closures, or don't do what Go does with loop variables, so...
19:33 < Namegduf> There's nothing done "everywhere else" anyway, making it a
moot point.
19:33 < rm445_> There are different expected behaviours, and different
mental models they are based on.  What you expect if you know how closures work,
may be less common than other expectations, but may be based on a less complex or
better model of understanding.
19:33 < kevlar> the only change I might support in this case would be making
for x := range actually have a separate "x" for each loop
19:33 < Namegduf> That has a performance hit
19:34 < Namegduf> I think that is why it is not done.
19:34 < kevlar> but it would not be special casing the treatment of loop
variables in closures.
19:34 < aiju> it doesn't solve anything
19:34 < aiju> for i := 1; i < 100; i++ {
19:34 < aiju> is still broken
19:34 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has joined
#go-nuts
19:34 < kevlar> aiju: correct, but that is (as was mentioned earlier) much
more clearly wrong
19:34 -!- GeertJohan [~Squarc@ip4da06866.direct-adsl.nl] has joined #go-nuts
19:35 -!- GeertJohan1 [~Squarc@ip4da06866.direct-adsl.nl] has joined #go-nuts
19:35 -!- a2800276 [~a2800276@xdsl-87-79-211-11.netcologne.de] has quit [Quit:
a2800276]
19:35 -!- GeertJohan1 [~Squarc@ip4da06866.direct-adsl.nl] has quit [Client Quit]
19:35 < Namegduf> I'm not sure the change is worth the complexity add, but I
think it'd otherwise be a useful check.  Maybe we need a golint.
19:35 < kevlar> just like var x int; for x = range y {...} would be a lot
more easy to see the issue because you hand-wrote the definition
19:35 < Namegduf> Yeah, that's obvious.
19:35 < Namegduf> Hmm.
19:36 < kevlar> it's mostly the range operator that people slip up on with
closures.
19:36 < kevlar> from what I've seen and what I've done.
19:36 < Namegduf> for var x int; x = range y { ...  }
19:36 < Namegduf> Not really worth it to make a very nice construct longer.
19:36 < kevlar> nope.
19:36 -!- boomtopper
[~boomtoppe@cpc12-nrte22-2-0-cust249.8-4.cable.virginmedia.com] has quit [Quit:
Lost terminal]
19:37 < kevlar> though that might indeed be a good way to express the reason
why it is wrong...  I've never written it out like that.
19:37 * kevlar wonders if that could be incorporated into the FAQ.
19:37 < Namegduf> I find myself wishing for a program-at-once golint, heh.
19:38 < Namegduf> Just because there's a lot you could do at that scale to
detect errors.
19:38 < plexdev> http://is.gd/95mfVc by [Andrew Gerrand] in go/src/pkg/http/
-- http: rename ErrBodyReadAferClose to ErrBodyReadAfterClose
19:38 < Namegduf> Maybe I should try to write one this summer, if I'm
free...  I doubt I'll have time, though.
19:38 < kevlar> lol, nice one adg.
19:39 < kevlar> I wish someone had done that years ago with Referer.
19:39 < kevlar> now half the time I spell it wrong in real life and half the
time I spell it wrong in code.
19:43 -!- dataviruset [~datavirus@90-230-44-14-no55.tbcn.telia.com] has quit []
20:10 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:c184:a11c:a961:2072] has quit
[Quit: Leaving.]
20:13 -!- foocraft [~dsc@178.152.93.75] has joined #go-nuts
20:19 -!- zozoR [~Morten@90.185.81.29] has quit [Ping timeout: 250 seconds]
20:21 -!- nbm [~nathan@dhcp-0-25-9c-d3-a7-c7.cpe.townisp.com] has quit [Quit:
Leaving]
20:25 -!- Blue_Opal_ [~quassel@5e0f02fb.bb.sky.com] has joined #go-nuts
20:25 -!- Blue_Opal_ [~quassel@5e0f02fb.bb.sky.com] has left #go-nuts []
20:27 < skelterjohn> aiju: regarding go { stuff }:
http://code.google.com/p/go/issues/detail?id=404
20:28 < aiju> too bad
20:29 -!- pothos_ [~pothos@111-240-171-155.dynamic.hinet.net] has joined #go-nuts
20:30 -!- pothos [~pothos@111-240-167-21.dynamic.hinet.net] has quit [Ping
timeout: 276 seconds]
20:31 -!- artefon [~thiago@189.59.180.35.dynamic.adsl.gvt.net.br] has joined
#go-nuts
20:37 -!- wchicken [~chicken@c-24-7-112-207.hsd1.ca.comcast.net] has quit [Ping
timeout: 260 seconds]
20:39 -!- TheMue [~TheMue@p5DDF5522.dip.t-dialin.net] has quit [Quit: TheMue]
20:42 -!- artefon [~thiago@189.59.180.35.dynamic.adsl.gvt.net.br] has quit [Ping
timeout: 240 seconds]
20:53 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts
20:55 -!- artefon [~thiago@189.59.176.40.dynamic.adsl.gvt.net.br] has joined
#go-nuts
20:59 -!- a2800276 [~a2800276@xdsl-87-79-211-11.netcologne.de] has joined #go-nuts
20:59 -!- dshep [~dss@c-76-21-12-46.hsd1.ca.comcast.net] has quit [Ping timeout:
260 seconds]
21:00 -!- Paradox924X [~Paradox92@vaserv/irc/founder] has quit [Ping timeout: 240
seconds]
21:02 -!- boomtopper
[~boomtoppe@cpc12-nrte22-2-0-cust249.8-4.cable.virginmedia.com] has joined
#go-nuts
21:04 < skelterjohn> that was like a year ago, though
21:04 < skelterjohn> perhaps minds have changed
21:08 -!- photron_ [~photron@port-92-201-19-120.dynamic.qsc.de] has quit [Read
error: Operation timed out]
21:10 -!- a2800276 [~a2800276@xdsl-87-79-211-11.netcologne.de] has quit [Remote
host closed the connection]
21:14 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has quit
[Ping timeout: 260 seconds]
21:19 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has quit [Remote
host closed the connection]
21:23 -!- keidaa [~keidaa@cm-84.210.56.138.getinternet.no] has quit [Quit:
Leaving]
21:24 -!- wchicken [~chicken@adsl-71-132-206-248.dsl.pltn13.pacbell.net] has
joined #go-nuts
21:24 < Namegduf> The big case I wish for more conciseness is when I'm
passing many-parametered closures to things taking functions, but I don't see an
easy way to do that.
21:24 < Namegduf> I'm considering refactoring all that anyway.
21:24 -!- GeertJohan [~Squarc@ip4da06866.direct-adsl.nl] has quit [Quit: Leaving.]
21:25 -!- kamaji [~kamaji@cpc2-aztw22-2-0-cust775.aztw.cable.virginmedia.com] has
quit [Read error: Operation timed out]
21:27 -!- jyxent [~jyxent@129.128.191.54] has quit [Read error: Connection reset
by peer]
21:28 -!- KingPhilroy [~kingphilr@shc-nat-newhall.stonehill.edu] has quit [Remote
host closed the connection]
21:30 -!- wchicken [~chicken@adsl-71-132-206-248.dsl.pltn13.pacbell.net] has quit
[Quit: leaving]
21:32 -!- jyxent [~jyxent@129.128.191.54] has joined #go-nuts
21:36 -!- zimsim [~simon@87.72.77.195] has quit [Remote host closed the
connection]
21:43 -!- rlab [~Miranda@91.200.158.34] has quit [Read error: Connection reset by
peer]
21:47 -!- boomtopper
[~boomtoppe@cpc12-nrte22-2-0-cust249.8-4.cable.virginmedia.com] has quit [Ping
timeout: 240 seconds]
21:49 -!- fmoo [~Adium@c-76-102-41-101.hsd1.ca.comcast.net] has quit [Quit:
Leaving.]
21:51 -!- fmoo [~Adium@c-76-102-41-101.hsd1.ca.comcast.net] has joined #go-nuts
22:06 -!- Paradox924X [~Paradox92@vaserv/irc/founder] has joined #go-nuts
22:14 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit:
Verlassend]
22:17 -!- l00t [~i-i3id3r_@189.105.102.222] has quit [Remote host closed the
connection]
22:18 -!- Kafo [~Henry@a91-154-0-50.elisa-laajakaista.fi] has quit [Read error:
Connection reset by peer]
22:19 -!- huin [~huin@91.84.64.19] has quit [Quit: off to bed]
22:24 -!- thiago__ [~thiago@189.59.176.40.dynamic.adsl.gvt.net.br] has joined
#go-nuts
22:27 -!- artefon [~thiago@189.59.176.40.dynamic.adsl.gvt.net.br] has quit [Read
error: Connection reset by peer]
22:40 -!- nictuku [~yvesj@unaffiliated/nictuku] has quit [Quit: .bye.]
22:43 -!- jyxent [~jyxent@129.128.191.54] has quit [Read error: Connection reset
by peer]
22:43 -!- jyxent [~jyxent@129.128.191.54] has joined #go-nuts
22:55 -!- gedevan [~gedevan@83.167.106.253] has joined #go-nuts
22:56 -!- gtaylor [~gtaylor@99-5-124-9.lightspeed.gnvlsc.sbcglobal.net] has joined
#go-nuts
23:11 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has joined
#go-nuts
23:18 -!- gedevan [~gedevan@83.167.106.253] has quit [Quit: Leaving...]
23:29 -!- htoothrot [~mux@66-169-185-121.dhcp.ftwo.tx.charter.com] has quit [Read
error: Connection reset by peer]
23:32 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has quit
[Ping timeout: 240 seconds]
23:33 -!- htoothrot [~mux@66-169-185-121.dhcp.ftwo.tx.charter.com] has joined
#go-nuts
23:45 < plexdev> http://is.gd/SmnlQ8 by [Evan Shaw] in go/src/pkg/syscall/
-- syscall: add Windows file mapping functions and constants
23:45 -!- res99 [~anonymous@201.237.130.70] has quit [Quit: res99]
23:52 -!- ExtraSpice [XtraSpice@88.118.35.153] has quit [Remote host closed the
connection]
23:55 -!- prip [~foo@host217-133-dynamic.43-79-r.retail.telecomitalia.it] has quit
[Ping timeout: 240 seconds]
--- Log closed Mon May 02 00:00:50 2011