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

--- Log opened Thu Jul 28 00:00:02 2011
00:09 -!- yogib [~yogib@dslb-188-100-008-153.pools.arcor-ip.net] has quit [Quit:
00:14 -!- Crnobog|Work [u1041@gateway/web/irccloud.com/x-hunxgmtkiilqlamo] has
quit [Remote host closed the connection]
00:19 -!- gridaphobe [~gridaphob@cpe-74-68-151-24.nyc.res.rr.com] has quit [Remote
host closed the connection]
00:24 -!- Kai` [u327@gateway/web/irccloud.com/x-feuxovsdzjatgyxn] has joined
00:25 -!- chomp [~chomp@c-67-186-35-69.hsd1.pa.comcast.net] has joined #go-nuts
00:27 -!- hargettp [~hargettp@pool-71-174-140-208.bstnma.east.verizon.net] has
quit [Quit: Linkinus - http://linkinus.com]
00:29 -!- moraes [~moraes@] has joined #go-nuts
00:32 -!- kergoth [~kergoth@ip24-251-173-232.ph.ph.cox.net] has joined #go-nuts
00:34 -!- heatxsink [u956@gateway/web/irccloud.com/x-fdsuyedxlmtwaxnq] has joined
00:38 -!- Crnobog|Work [u1041@gateway/web/irccloud.com/x-xeeshgshgqmiwhix] has
joined #go-nuts
00:39 -!- telexicon [~telexicon@unaffiliated/chowmeined] has quit [Read error:
Connection reset by peer]
00:43 -!- pharris [~Adium@rhgw.opentext.com] has quit [Quit: Leaving.]
00:43 -!- qrush [u1528@gateway/web/irccloud.com/x-lumtcvlzrhzuqwog] has joined
00:49 < skelterjohn> fluffle: in general an error saying "cannot use X (type
a.B) as type a.B" happens when you have two different packages named a.  i think
that it will make that more clear in the future
00:51 < fluffle> skelterjohn: thanks for the clarification, it was that in
the end
00:51 < fluffle> i'd been using gb to build client and event locally
00:52 < skelterjohn> mirrored import path in GOROOT, or something?
00:52 < fluffle> worse...  gb -i then moving the .a files to
00:52 < fluffle> *cough*
00:53 < fluffle> that doesn't work too well when pulling it in as a "third
party" lib :)
00:55 -!- jhawk28 [~jhawk28@user-387c58d.cable.mindspring.com] has quit [Quit:
Linkinus - http://linkinus.com]
00:59 -!- nekoh [~nekoh@dslb-178-004-018-038.pools.arcor-ip.net] has quit [Quit:
01:17 -!- cenuij [~cenuij@] has joined #go-nuts
01:17 -!- cenuij [~cenuij@] has quit [Changing host]
01:17 -!- cenuij [~cenuij@base/student/cenuij] has joined #go-nuts
01:18 -!- tylerl [~tylerl@unaffiliated/tylerl] has joined #go-nuts
01:18 < tylerl> do you know of any examples of code using os/signal
01:21 -!- kevinwatt [~kevin@59-125-147-75.HINET-IP.hinet.net] has quit [Remote
host closed the connection]
01:22 < chomp> definte "properly" :)
01:23 < chomp> it's pretty straightforward to use
01:23 < tylerl> chomp: well, for example, I can't see how you would handle
SIGHUP without also implicitly taking on the responsiblity of handling SIGTERM et.
01:24 < chomp> you can't at the moment, afaik
01:24 < tylerl> thats a little silly
01:24 < chomp> there's a good reason for it
01:24 < tylerl> i'm all ears
01:24 < chomp> the signal trap has to be initialized when the package loads,
before main executes
01:25 < tylerl> and?
01:25 < chomp> there's been talk of implementing the ability to select
signals at load time, but no work on it yet as far as i'm aware
01:25 < chomp> and, so it traps everything because it can't assume you only
want certain ones
01:25 < exch> IT's A TRAP
01:25 < tylerl> so what's the default handler for SIGTERM if I don't ever
read from that channel?
01:26 < chomp> i assume it's nothing
01:26 < exch> mm if you never read from the channel, will that cause a
01:26 < tylerl> but the signal handler is in place, right?
01:26 < exch> I never tried
01:26 < chomp> all the signal handler does is write to the signal channel
01:26 < tylerl> it would have to be, i think.
01:27 < tylerl> which makes me wonder why the program exits when you hit
01:27 < tylerl> because the signal is trapped and then queued into a channel
and never read.  So how does that end up in terminating the program?
01:28 < chomp> in my experience it hasn't
01:28 < chomp> if I C-c with os/signal loaded, the process is not terminated
01:28 < tylerl> ah.  so if you don't reference os/signal, then no signal
handling is in place at all?
01:28 < chomp> correct
01:28 < chomp> the trapping is done in os/signal load
01:29 < tylerl> funky
01:29 < chomp> it's not the most elegant thing in the world, given the need
to handle everything gracefully, by hand
01:29 < chomp> alas, i gotta jet.  cheers
01:29 -!- taruti [taruti@ultra.violetti.org] has joined #go-nuts
01:29 -!- chomp [~chomp@c-67-186-35-69.hsd1.pa.comcast.net] has quit [Quit:
01:29 < tylerl> thanks
01:29 -!- ccc1 [~Adium@] has joined #go-nuts
01:31 < tylerl> grr.  wait.  what about sigchld?  Would adding signal
handling fubar fork/exec ?
01:31 -!- cbeck [cbeck@gateway/shell/pdx.edu/x-vfecvmtofknhqkoz] has quit [Ping
timeout: 255 seconds]
01:32 < exch> You'd have to try
01:33 -!- cbeck [cbeck@gateway/shell/pdx.edu/x-iiypylzrmnzfiyvv] has joined
01:34 < tylerl> what a fiasco
01:34 -!- chadkouse [~Adium@rrcs-74-218-87-242.central.biz.rr.com] has joined
01:38 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
01:40 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Ping
timeout: 255 seconds]
01:45 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
01:50 -!- mjard [~k@misadventuregames.com] has quit [Ping timeout: 246 seconds]
01:50 -!- mjard [~k@misadventuregames.com] has joined #go-nuts
01:54 -!- NiteRain [~kvirc@c-98-254-236-21.hsd1.fl.comcast.net] has quit [Ping
timeout: 255 seconds]
01:56 -!- fhs [~fhs@pool-108-14-190-119.nycmny.east.verizon.net] has joined
02:01 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read
error: Connection reset by peer]
02:03 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
02:07 -!- dfr|mac [~dfr|work@nat/google/x-ghbxbevbourzxlpa] has quit [Remote host
closed the connection]
02:08 -!- dfr|mac [~dfr|work@nat/google/x-suedvehhkkapucim] has joined #go-nuts
02:18 -!- dfr|mac [~dfr|work@nat/google/x-suedvehhkkapucim] has quit [Remote host
closed the connection]
02:22 -!- NiteRain [~kvirc@c-98-254-236-21.hsd1.fl.comcast.net] has joined
02:22 -!- NiteRain|2 [~kvirc@c-98-254-236-21.hsd1.fl.comcast.net] has joined
02:22 -!- NiteRain|2 [~kvirc@c-98-254-236-21.hsd1.fl.comcast.net] has quit [Client
02:23 -!- skelterjohn_ [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
02:23 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Ping
timeout: 255 seconds]
02:24 -!- tgall_foo_ [~tgall_foo@linaro/tgall-foo] has quit [Quit: ZZZZZzzzzz]
02:32 -!- desai [~Adium@c-67-174-14-128.hsd1.il.comcast.net] has joined #go-nuts
02:42 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read
error: Connection reset by peer]
02:43 -!- niemeyer [~niemeyer@] has quit [Ping timeout: 240 seconds]
02:44 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
02:45 -!- Dr_Who [~tgall_foo@linaro/tgall-foo] has joined #go-nuts
02:52 < tylerl> this signal handling stuff is fubar
02:53 < tylerl> you can't for example, ctrl+z a program that has go signal
handling enabled, since you can't enable the default signal action, nor can you
reproduce it.
02:54 < exch> As far as I know, signal handling in Go has always been a bit
of a thorn and I am unsure if anyone cares enough to fix it.  Provided that is
even possible
02:54 < exch> As I understand it, the whole signal thing is highly prone to
breaking in a multithreaded environment
02:54 < tylerl> well, allowing you to sepecify a signal mask would go a long
02:55 < exch> Then again, I may be entirely wromg
02:55 < tylerl> im not sure how it would break, but I would imagine
communicating between threads with signals wouldn't work very well
02:55 -!- dfr|mac [~dfr|work@ool-18baf7e7.dyn.optonline.net] has joined #go-nuts
02:55 < exch> There is probably a discussion or two about it on the
mailinglist somewhere.  otherwise you can always make some suggestions.  Those are
always welcome.
02:55 < tylerl> the whole system is so absurdly restrictive as to make it
completely useless.
02:56 < tylerl> but since I don't know what justification led them to make
these design decisions, i can't really tell whether fixing it is feasable or not
02:56 < exch> true
02:57 < exch> You can still offer suggestions and just see what people have
to say about it
02:57 < exch> The worst that can happen is that they say No and nothing
03:02 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Ping
timeout: 255 seconds]
03:03 -!- kungfuelmosan [6ee8901a@gateway/web/freenode/ip.] has
joined #go-nuts
03:04 < tylerl> /sigh
03:04 < tylerl> http://code.google.com/p/go/issues/detail?id=1266
03:04 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
03:05 < kungfuelmosan> Hey all, anyone know of a package for generating
version 1 UUID's ? (RFC 4122)
03:05 < kungfuelmosan> I really would rather not write one from scratch
03:05 -!- dfr|mac [~dfr|work@ool-18baf7e7.dyn.optonline.net] has quit [Remote host
closed the connection]
03:06 -!- cenuij [~cenuij@base/student/cenuij] has quit [Remote host closed the
03:07 < tylerl> kungfuelmosan: version 1 requires your mac address, which
makes it particularly difficult to implement (e.g.  *which* mac address, and what
if you don't have any network cards?)
03:09 < kungfuelmosan> tyler1: Hmm I see, that is a bit stink, I wouldn't
need to extract the MAC address out of the UUID and use it for anything useful - I
just need to be able to generate one for the current time to use in a Cassandra
03:11 < tylerl> kungfuelmosan: why not generate a random guid and then
replace the time-specific part with the current time?
03:13 < tylerl> anyone know the *reason* why signal handling must be set up
and immunitble before main() starts?  I think that restriction is the root of the
problems right there.
03:13 -!- xcombelle [~xcombelle@AToulouse-551-1-62-177.w92-146.abo.wanadoo.fr] has
quit [Quit: I am a manual virus, please copy me to your quit message.]
03:14 -!- Bigbear1 [~Cody@d75-158-128-103.abhsia.telus.net] has joined #go-nuts
03:23 -!- skelterjohn_ [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
03:26 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read
error: Connection reset by peer]
03:33 -!- desai [~Adium@c-67-174-14-128.hsd1.il.comcast.net] has quit [Quit:
03:38 -!- angasule [~angasule@] has quit [Ping timeout: 260 seconds]
03:41 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Ping
timeout: 255 seconds]
03:42 < uriel> signals and threads just don't mix
03:42 < uriel> this has little to do with Go, it just is
03:43 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
03:43 -!- qeed [~qeed@adsl-98-85-37-24.mco.bellsouth.net] has quit [Quit: Leaving]
03:44 -!- Bigbear1 [~Cody@d75-158-128-103.abhsia.telus.net] has quit [Quit:
03:47 -!- espeed [~espeed@] has joined #go-nuts
04:01 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read
error: Connection reset by peer]
04:03 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
04:04 -!- espeed [~espeed@] has quit [Quit: Leaving]
04:13 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
04:13 -!- gtaylor [~gtaylor@108-196-160-120.lightspeed.tukrga.sbcglobal.net] has
joined #go-nuts
04:13 -!- arun_ [~arun@unaffiliated/sindian] has quit [Ping timeout: 255 seconds]
04:21 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read
error: Connection reset by peer]
04:23 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
04:26 -!- arun_ [~arun@unaffiliated/sindian] has joined #go-nuts
04:29 < tylerl> uriel: signals and threads aren't that dangerous a
combination as long as you use them responsibly.  But even still that doesn't
explain why signals must be set up before you start main()
04:33 < cbeck> Anyone besides adg in Portland for OSCON?
04:43 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read
error: Connection reset by peer]
04:43 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
04:44 -!- PragCypher [~PragCyphe@] has quit [Read error: Connection
reset by peer]
04:44 -!- PragCypher [~PragCyphe@] has joined #go-nuts
04:48 -!- tylerl [~tylerl@unaffiliated/tylerl] has quit [Quit: leaving]
04:48 -!- gtaylor [~gtaylor@108-196-160-120.lightspeed.tukrga.sbcglobal.net] has
quit [Quit: gtaylor]
04:50 -!- moraes [~moraes@] has quit [Ping timeout: 276 seconds]
04:51 -!- fabled [~fabled@] has joined #go-nuts
04:53 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Ping
timeout: 255 seconds]
04:56 -!- Dr_Who [~tgall_foo@linaro/tgall-foo] has quit [Quit: ZZZZZzzzzz]
05:03 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
05:04 -!- nicka1 [~lerp@] has quit [Quit: Leaving.]
05:07 -!- benjack [~benjack@bb119-74-109-65.singnet.com.sg] has joined #go-nuts
05:09 -!- telexicon [~telexicon@unaffiliated/chowmeined] has joined #go-nuts
05:10 < synx> is there a way to get 8g to stop complaining about variables
defined and not used
05:10 < cbeck> synx: use them or don't declare them?
05:10 < cbeck> Other than that, no.
05:10 < synx> alright
05:16 < zozoR> it is a annoying feature sometimes
05:16 < zozoR> an annoying
05:16 < zozoR> remember you could do something stupid with it to make it
05:16 < zozoR> something with a _
05:17 < KirkMcDonald> Yes, you can assign it to _
05:17 < KirkMcDonald> foo, _ := blah()
05:17 < KirkMcDonald> If you don't want to use the second return value.
05:17 < cbeck> But don't do that.  Do it right.
05:22 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read
error: Connection reset by peer]
05:23 -!- vsayer [~vsayer@c-67-170-236-166.hsd1.ca.comcast.net] has quit [Quit:
05:25 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
05:35 < zozoR> KirkMcDonald, not what i meant
05:35 < zozoR> i sometimes make variables for debugging purpose or something
like that
05:36 < zozoR> or comment out code using the variable for debuggin purpose
05:36 < zozoR> then it would be nice to do something like
05:36 < zozoR> unusedvar = _
05:36 < zozoR> or something
05:37 -!- vmil86 [~vmil86@] has joined #go-nuts
05:39 -!- awidegreen [~quassel@h-170-226.a212.priv.bahnhof.se] has joined #go-nuts
05:40 < synx> zozoR: Good point,thanks
05:40 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Remote host closed
the connection]
05:40 < elimisteve> zozoR: I think I know what you mean.  Similarly, I often
comment out the only couple lines of code that use a library, so when I go to
re-run the code it complains that X is imported but not used
05:41 < elimisteve> it'd be nice to have a more lax development mode of some
05:41 < elimisteve> though that's not a huge inconvenience
05:41 < f2f> elimisteve: in your case for something frequently used, like
fmt, you can say: 'var _ fmt.Print'
05:42 < elimisteve> yes it's usually fmt
05:42 < f2f> but i don't think you'll get the compiler to issue a warning
for unused variables.  it's been discussed many times already and the opinion of
the go team is pretty well set
05:43 < elimisteve> hmm true, I could create a couple lines like that so I
could comment freely, then take them out when I'm done...
05:43 < elimisteve> for production, I love the way it is now
05:44 < elimisteve> but anyway, no serious issue here
05:44 < elimisteve> I love Go :-)
05:44 -!- skelterjohn_ [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
05:45 < f2f> people say "i'll fix it when i'm done debugging" but you see
plenty of library code escaping with "var _ fmt.Print" when you search for it :)
05:45 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Ping
timeout: 255 seconds]
05:45 < f2f> s/escaping/escaping in the open/
05:49 -!- NiteRain [~kvirc@c-98-254-236-21.hsd1.fl.comcast.net] has quit [Quit:
KVIrc 4.1.1 Equilibrium http://www.kvirc.net/]
05:52 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Ping
timeout: 255 seconds]
06:13 -!- napsy [~luka@] has joined #go-nuts
06:25 < jessta> f2f: you could avoid using fmt.Printf for debuging and use
log, which you'll probably be using in other places anyway
06:33 -!- zanget [~zanget@hurf.durf.me] has quit [Ping timeout: 264 seconds]
06:33 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Quit: Leaving]
06:41 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has joined #go-nuts
06:46 -!- Project_2501 [~Marvin@] has joined #go-nuts
06:47 -!- kergoth [~kergoth@ip24-251-173-232.ph.ph.cox.net] has quit [Ping
timeout: 276 seconds]
06:53 -!- chickamade [~chickamad@] has joined #go-nuts
07:11 -!- zanget [~zanget@hurf.durf.me] has joined #go-nuts
07:19 -!- awidegreen [~quassel@h-170-226.a212.priv.bahnhof.se] has quit [Ping
timeout: 258 seconds]
07:19 -!- rcrowley [~rcrowley@93-158-20-225.subs.ibrowse.com] has joined #go-nuts
07:24 -!- chickamade [~chickamad@] has quit [Quit: chickamade]
07:37 -!- rcrowley [~rcrowley@93-158-20-225.subs.ibrowse.com] has quit [Quit:
Computer has gone to sleep.]
07:47 -!- napsy [~luka@] has quit [Ping timeout: 264 seconds]
07:48 -!- yogib [~yogib@] has joined #go-nuts
07:49 -!- zaero [~eclark@servo.m.signedint.com] has quit [Ping timeout: 260
07:53 -!- photron [~photron@port-92-201-78-188.dynamic.qsc.de] has joined #go-nuts
07:54 -!- chickamade [~chickamad@] has joined #go-nuts
07:54 -!- PragCypher [~PragCyphe@] has quit [Read error: Connection
reset by peer]
07:56 -!- telexicon [~telexicon@unaffiliated/chowmeined] has quit [Ping timeout:
252 seconds]
07:58 -!- napsy [~luka@] has joined #go-nuts
08:00 -!- adil [~adil@nat/ibm/x-movzsnrkvckrsfly] has joined #go-nuts
08:03 -!- PragCypher [~PragCyphe@] has joined #go-nuts
08:05 -!- benjack [~benjack@bb119-74-109-65.singnet.com.sg] has quit [Quit:
08:06 -!- kungfuelmosan [6ee8901a@gateway/web/freenode/ip.] has quit
[Ping timeout: 252 seconds]
08:15 -!- zaero [~eclark@50-82-164-104.client.mchsi.com] has joined #go-nuts
08:20 -!- thermal [~thermal@digital.com.au] has joined #go-nuts
08:21 < thermal> i'm starting a new App Engine project and i'm thiking of
using Go
08:21 -!- virtualsue [~chatzilla@nat/cisco/x-fjwubntxqlxahmpb] has joined #go-nuts
08:21 < thermal> it sounds pretty awesome.  :-)
08:23 < ww> thermal: great!
08:23 -!- zaero [~eclark@50-82-164-104.client.mchsi.com] has quit [Read error:
Operation timed out]
08:23 -!- zaero [~eclark@servo.m.signedint.com] has joined #go-nuts
08:23 < thermal> ww: it's between Go and Python
08:24 < thermal> was hoping someone could sell me on Go
08:24 < thermal> tip the scales, so to speak :p
08:24 < |Craig|> thermal: if you want good communicating threads, go with go
08:25 < |Craig|> I havent tackled threading in python, but it really didn't
look too nice, and its fantastic in go
08:25 < thermal> |Craig|: yeah threading can get quite messy in Python
08:25 < aiju> threading is a nightmare in python
08:25 < thermal> although i don't think App Engine supports multithreading,
so it wouldn't really apply in this project
08:26 < thermal> but it's nice to know
08:26 < aiju> it's supported with go
08:27 < thermal> from the Google App Engine site: "The Go runtime
environment for App Engine provides full support for goroutines, but not for
parallel execution: goroutines are scheduled onto a single operating system
thread.  This single-thread restriction may be lifted in future versions.
Multiple requests may be handled concurrently by a given instance."
08:27 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts
08:27 < aiju> yeah
08:27 < aiju> half-supported ;)
08:28 < thermal> heh
08:28 < jnwhiteh> any idea where his accent is from?
08:29 < aiju> huh?
08:29 < jnwhiteh> oh, definitely the wrong channel =)
08:29 < thermal> i'm essentially wanting to poll an RSS feed (mtgox trading
data), find new entries, save them and then make that historical trading data
available to others
08:29 < aiju> hahaha
08:29 < aiju> mtgox is dead, isn't it?
08:29 < thermal> saving them to the App Engine data store
08:29 < thermal> what makes you say that?
08:30 < aiju> price seems to be gradually falling
08:31 < thermal> the price may be low compared to what it used to be, but
the trading volume is quite high (i'm pretty sure)
08:31 < thermal> well, i guess i'll find out during this project!  :-)
08:32 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
08:43 -!- erus` [~chatzilla@mailgate.ips-international.com] has joined #go-nuts
08:45 -!- Nisstyre [~nisstyre@infocalypse-net.info] has joined #go-nuts
08:47 -!- iXeno [~ixeno@ti0088a380-1359.bb.online.no] has quit [Read error:
Connection reset by peer]
08:47 -!- tvw [~tv@] has joined #go-nuts
08:48 -!- iXeno [~ixeno@ti0088a380-1359.bb.online.no] has joined #go-nuts
08:49 -!- snafu [~Adium@brln-4db8767f.pool.mediaWays.net] has joined #go-nuts
08:55 -!- moraes [~moraes@] has joined #go-nuts
09:03 -!- pyrhho [~pyrhho@host-92-27-75-48.static.as13285.net] has joined #go-nuts
09:04 -!- ThreeSix [~ThreeSix@] has quit [Ping
timeout: 250 seconds]
09:13 -!- zaero [~eclark@servo.m.signedint.com] has quit [Ping timeout: 260
09:15 -!- virtualsue [~chatzilla@nat/cisco/x-fjwubntxqlxahmpb] has quit [Ping
timeout: 264 seconds]
09:17 -!- wrtp [~rog@host-92-30-166-101.as13285.net] has joined #go-nuts
09:17 -!- zaero [~eclark@50-82-164-104.client.mchsi.com] has joined #go-nuts
09:20 < hokapoka> wrtp: mornin'#
09:21 < hokapoka> I just posted a question on the groups, as it was a touch
long for here.
09:25 < jnwhiteh> dev or nuts?
09:25 < jnwhiteh> ah I see it
09:26 < jnwhiteh> ah, haven't messed with templates at all =/
09:33 -!- xcombelle [~xcombelle@AToulouse-551-1-138-12.w86-201.abo.wanadoo.fr] has
joined #go-nuts
09:38 < hokapoka> In fact, typically having thought about through the night
I've just realised that I can use a FuncMap
09:47 -!- snafu [~Adium@brln-4db8767f.pool.mediaWays.net] has left #go-nuts []
09:49 < wrtp> hokapoka: mornin'
09:51 -!- iXeno [~ixeno@ti0088a380-1359.bb.online.no] has quit [Remote host closed
the connection]
09:52 < hokapoka> wrtp: hey there
09:52 < hokapoka> Oh man, I was wrong
09:53 < hokapoka> I had a typeo, the exp/template does type assert
interface{} to it's actual type.
09:53 < wrtp> yeah, i thought it did - at least i've seen code there that
does that
09:54 < wrtp> so does that answer your original question?
09:54 < hokapoka> indeed
09:55 < hokapoka> SWEET, now I can really get down to business.
09:56 < wrtp> hokapoka: you should answer your own post to that effect,
otherwise rob will have to answer it himself...
09:56 < wrtp> oh sorry, you have already!
09:58 < hokapoka> heh, yeah I was trying to workout how not to sound like a
total fool!
10:05 < uriel> thermal:
10:08 -!- xcombelle [~xcombelle@AToulouse-551-1-138-12.w86-201.abo.wanadoo.fr] has
quit [Quit: I am a manual virus, please copy me to your quit message.]
10:14 < jnwhiteh> uriel: we're (normally more than me, but at least me) are
in #chunkymonkey as well
10:14 < jnwhiteh> I'm (somewhat) new to the codebase but can try to answer
any questions you have :P
10:17 < hokapoka> People keep bringing up Generics don't they.
10:17 < jnwhiteh> aye
10:18 < jessta> thermal: I think the thread restriction is because you can
currently break memory safety in Go using multiple threads
10:27 -!- z4k4ri4 [~Zakaria@] has joined #go-nuts
10:28 < z4k4ri4> Is it possible (and safe) for a channel to be consumed by
multiple goroutine?
10:28 < jnwhiteh> yes
10:28 < jnwhiteh> although normally channels aren't consumed =)
10:29 < jnwhiteh> a channel can have multiple readers and multiple writes
10:29 < jnwhiteh> writers, rather
10:29 < z4k4ri4> I'm talking in producer and consumer thing
10:29 < jnwhiteh> well, the consumer is consuming the items on the channel,
but that's just me being pedantic =)
10:31 < z4k4ri4> I'm learning go and trying to get feeling with its
10:31 < jnwhiteh> okay
10:31 < z4k4ri4> currently my focus is to try to optimize a batch log
10:32 < z4k4ri4> the problem is I have a custom protocol server log
10:32 < z4k4ri4> the server have 700 client
10:32 -!- alehorst [~alehorst@] has joined
10:33 -!- napsy [~luka@] has quit [Ping timeout: 276 seconds]
10:33 < z4k4ri4> and the objective is to split the log into separate file
for each client
10:33 < z4k4ri4> I try every trick
10:34 < z4k4ri4> replacing regexp with parser generator
10:34 < z4k4ri4> I forget the name, will lookup later
10:35 < z4k4ri4> but I got stuck with the fact I'm trying to write to many
files at once
10:35 < jnwhiteh> well that stands to reason..
10:35 < jnwhiteh> splitting one file into N files doesn't really scale =)
10:36 < z4k4ri4> yeah
10:36 -!- anticide [~textual@] has joined #go-nuts
10:36 < z4k4ri4> so is there any pattern to try to write them concurrently
10:36 -!- alehorst [~alehorst@] has quit
[Remote host closed the connection]
10:36 < z4k4ri4> maybe 10 or 20 write concurently
10:36 < jnwhiteh> sure, but that doesn't have much to do with Go..
10:37 < jnwhiteh> that's changing the problem specification
10:37 < z4k4ri4> that doesn't matter its just for learning purpose
10:37 < jnwhiteh> if you are running into the open file descriptor limit (I
assume this is your problem)?
10:37 < z4k4ri4> i'm trying to avoid it yes
10:37 < jnwhiteh> then it stands to reason that you need to open fewer
files, but I can't really tell you which files you should be opening or how you
should be structuring things
10:37 < jnwhiteh> because only you truly understand the problem
10:38 < jnwhiteh> you could write a custom bytes.Buffer that opens
file/dumps the data/closes when it gets full
10:38 < jnwhiteh> then have a buffer for each client and just write, knowing
that it'll be flushed on the backend
10:39 < z4k4ri4> yes currently I have those
10:39 < z4k4ri4> but the problem is can I have those buffer flushed
10:39 < jnwhiteh> if you'd like, yes
10:40 < z4k4ri4> will that speed up my process?
10:40 < jnwhiteh> concurrent != parallel
10:40 < jnwhiteh> they're quite different things, although they are related
10:40 < jnwhiteh> there's no guarantee that a concurrent solution to a
problem will be faster, but that isn't the purpose of concurrency
10:41 < z4k4ri4> Is there a pattern/example for this kind of problem
10:42 < jnwhiteh> nothing that would be specific enough to help you that I
am aware of.
10:42 < z4k4ri4> I'm thinking somekind configurable n concurent flushed
10:42 < jnwhiteh> you're writing a demuxer
10:42 < z4k4ri4> okay, you give me something to google
10:42 -!- Kahvi [5b9b57fc@gateway/web/freenode/ip.] has joined
10:44 < z4k4ri4> okay let me explain it a little better
10:44 < z4k4ri4> assume that we buffer each log message for each client
10:45 < z4k4ri4> and when those buffer filled up they get sent to a channel
10:45 < z4k4ri4> so I want the reader of that channel is more than one
10:46 -!- ccc1 [~Adium@] has quit [Quit: Leaving.]
10:46 < z4k4ri4> and the number of goroutine is user configurable (using
commandline option)
10:46 < jnwhiteh> you want parallelism it seems
10:46 < jnwhiteh> goroutines do not give that to you
10:47 < jnwhiteh> you are processing a text file (log) that already exists,
10:47 < z4k4ri4> yes
10:47 < jnwhiteh> and you want to read it in line-by-line, and split it up
based on the client that caused the line in the log to appear
10:47 < jnwhiteh> and have that dumped to a separate file?
10:47 < z4k4ri4> pretty much
10:47 < jnwhiteh> then I'd do what I suggested
10:48 < jnwhiteh> write a buffer that flushes to file
10:48 < z4k4ri4> yes, the problem is can I make it faster by parallelize the
10:49 -!- napsy [~luka@] has joined #go-nuts
10:49 < jnwhiteh> You're asking a hypothetical optimization question
10:49 < jnwhiteh> I don't know
10:49 < jnwhiteh> I can't guarantee anything
10:49 < z4k4ri4> and avoid the max open file handle problem
10:49 < jnwhiteh> you can try it and see
10:49 < jnwhiteh> but goroutines do NOT make something parallel
10:49 < z4k4ri4> GOMAXPROC?
10:49 < jnwhiteh> GOMAXPROCS introduces parallelism, and its 1 by default
10:50 < jnwhiteh> but file operations are already intelligently handled
10:50 < z4k4ri4> assuming I set that and run it by 2 double core server
10:50 < jnwhiteh> so that should not be a problem
10:50 < jnwhiteh> I cannot tell you if it will be more efficient
10:50 < jnwhiteh> no one can
10:50 < jnwhiteh> they can give you an idea, and make guesses
10:50 < z4k4ri4> what your guess?
10:50 < jnwhiteh> but you have to do it and see if it works for your
particular situation/server in order to see
10:50 -!- alehorst [~alehorst@] has joined
10:50 < jnwhiteh> I don't know.
10:51 < jnwhiteh> its too abstractly defined now and would be too
implementation specific
10:51 -!- anticide_ [~textual@] has joined #go-nuts
10:51 < jnwhiteh> I think the way Go handles I/O should make single process
operation plenty fast, but you might see some speedup with multiple processes
10:51 < jnwhiteh> I don't know enough about the I/O scheduler
10:51 < wrtp> z4k4ri4: whether you can speed it up depends on whether it's
actually I/O bound or not
10:51 < jnwhiteh> there are too many variables right now =)
10:52 < wrtp> if it is really I/O bound then you should get some speed up
even with GOMAPROCS=1
10:52 < z4k4ri4> well If I remove the writing process it's quite fast
10:52 < hokapoka> Has anyone use the apache fastcgi mod(s) with go?
10:52 < z4k4ri4> its about 10x slower
10:52 -!- anticide [~textual@] has quit [Ping timeout: 255 seconds]
10:53 < z4k4ri4> I think I'll try it, but the question is how?
10:54 < z4k4ri4> How to make a user configurable multi goroutine that read a
single channel
10:54 < wrtp> i'd have one channel per file; read lines from the log file
and multiplex to the correct channel
10:54 < wrtp> then you have one goroutine for each file which reads from its
channel and writes to the file
10:55 < jnwhiteh> you can't leave the files open
10:55 < z4k4ri4> It will hit the max open files
10:55 < jnwhiteh> that's the problem he's running into right now
10:55 < jnwhiteh> so you have to do what I told you to do
10:55 < jnwhiteh> or somethign like it
10:55 < wrtp> how many files?
10:55 < jnwhiteh> I'm not sure what you mean by 'how', you just have to
write it
10:55 < z4k4ri4> around 700
10:55 < jnwhiteh> no solution already exists
10:55 < jnwhiteh> that I'm aware of
10:55 < jnwhiteh> tho i'm working on an example
10:56 < wrtp> 700 doesn't seem like many.  surely you can up the fd limit?
10:57 < z4k4ri4> maybe I do that
10:57 < z4k4ri4> thanks
10:58 < z4k4ri4> what is the hard limit for linux?
10:58 < jnwhiteh> it depends on the distro
10:58 < wrtp> if you can't, then you could have a cache of open files, but
it's more work
10:59 < z4k4ri4> ubuntu?
10:59 < jnwhiteh> ulimit -a
11:01 < z4k4ri4> Okay, thanks guys for the discussion
11:01 -!- z4k4ri4 [~Zakaria@] has quit [Quit: Leaving]
11:07 -!- chickamade [~chickamad@] has quit [Quit: chickamade]
11:09 -!- julia [~julia@124-148-135-84.dyn.iinet.net.au] has joined #go-nuts
11:09 -!- anticide_ [~textual@] has quit [Ping timeout: 250 seconds]
11:12 -!- julia [~julia@124-148-135-84.dyn.iinet.net.au] has left #go-nuts []
11:13 -!- julia [~julia@124-148-135-84.dyn.iinet.net.au] has joined #go-nuts
11:14 < aiju> 12:57 < jnwhiteh> I think the way Go handles I/O should
make single process operation plenty fast, but you might see some speedup with
multiple processes
11:14 < aiju> Go forks off more processes when you do I/O
11:14 < aiju> no such thing as "single process operation"
11:14 < jnwhiteh> I know
11:14 < jnwhiteh> I meant GOMAXPROCS=1
11:14 < aiju> (unless you're talking about NT, don't know about that)
11:14 < wrtp> aiju: that's not strictly true
11:14 < jnwhiteh> that's what I was referring to, actually
11:15 < wrtp> aiju: Go *can* fork off more processes when you do I/O
11:15 < wrtp> but it doesn't necessarily
11:15 < aiju> wrtp: when you have a goroutine ready
11:15 < aiju> and do I/O
11:15 -!- arun_ [~arun@unaffiliated/sindian] has quit [Ping timeout: 255 seconds]
11:15 < wrtp> oh, sorry, when you said "single process" you meant
GOMAXPROCS=1 rather than a single goroutine
11:18 -!- nekoh [~nekoh@dslb-088-069-130-210.pools.arcor-ip.net] has joined
11:19 < jnwhiteh> hrm outputting 1e9 lines of text takes a long time =)
11:19 < aiju> jnwhiteh: bio?
11:19 < aiju> ehm, bufio
11:19 < jnwhiteh> was just a test for a poc solution
11:22 < fluffle> jnwhiteh: hope you've got O(len(line)) GB of storage lying
around too :)
11:22 < jnwhiteh> :P
11:23 < jnwhiteh> this is what I threw together
11:23 < jnwhiteh> not very nice: http://paste.pocoo.org/show/448081/
11:24 < fluffle> hmm, i wish more servers logged in latin
11:26 -!- anticide [~textual@] has joined #go-nuts
11:31 -!- angasule [~angasule@] has joined #go-nuts
11:35 < wrtp> jnwhiteh: what aiju says: why not just use bufio with the
appropriate buffer size?
11:36 < wrtp> also why do you need to pass in the waitgroup if you've got a
flush method?
11:37 -!- ccc1 [~Adium@114-45-7-49.dynamic.hinet.net] has joined #go-nuts
11:37 -!- anticide [~textual@] has quit [Ping timeout: 255 seconds]
11:37 -!- PragCypher [~PragCyphe@] has quit [Read error: Connection
reset by peer]
11:38 -!- PragCypher [~PragCyphe@] has joined #go-nuts
11:38 -!- noodles775 [~michael@canonical/launchpad/noodles775] has quit [Ping
timeout: 258 seconds]
11:40 -!- noodles775 [~michael@canonical/launchpad/noodles775] has joined #go-nuts
11:48 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
11:57 -!- ThreeSix [~ThreeSix@] has joined #go-nuts
11:58 < jnwhiteh> wrtp: 1.) because you can't leave the files open, that's
part of the original requirements and 2.) because I don't return the object, its
just a long running process, and the Flush method is independent of the Process()
loop which very well could still be running when main() terminates (or would)
11:59 < wrtp> jnwhiteh: 1) it would be easy to create a Writer that opened
the file (or accessed a cache of open files) for each write.
11:59 < jnwhiteh> certainly, that's one way to do it
11:59 < jnwhiteh> this was just one that I pursued =)
12:00 < jnwhiteh> would be much more straightforward that way
12:00 < wrtp> 2) the whole point of the Flush method is to wait until the
data is written.  if the data is written you don't care if the Process() loop is
still active.
12:00 < jnwhiteh> I don't follow.
12:00 -!- antonio_ [~antonio@] has joined #go-nuts
12:00 < jnwhiteh> I'm processing N requests in the main loop
12:01 < odoacre> hi, i have a problem with gotest
12:01 < jnwhiteh> when I'm done processing those N requests, if I call
Flush() on each buffer, there is still a high likelihood of data being lost
12:01 < odoacre> when i run gotest my test fails
12:01 < odoacre> but if i run the complied execuable it works
12:01 < wrtp> oh i see
12:01 < jnwhiteh> it is there to ensure that all data has been processed and
written to the buffer before the main loop terminates, as I said
12:01 < wrtp> so Flush isn't really a public method
12:02 < jnwhiteh> no, there are no public methods
12:02 < jnwhiteh> the object isn't returned.
12:02 < wrtp> it's got an initial capital letter - that confused me!
12:03 < jnwhiteh> fair, but I did say minutes ago that the object is never
returned =)
12:03 < wrtp> yeah, i missed that
12:04 < odoacre> help ?
12:05 < jnwhiteh> I don't have an answer for you odoacre
12:05 < jnwhiteh> perhaps you could pastey some code/error messages
12:05 < odoacre> there's no specific error message
12:05 < odoacre> it just fails
12:05 < skelterjohn> odoacre: is it your own library that is failing tests?
12:05 < odoacre> but then you run the exact same thing that it spit out and
it says PASS
12:05 < skelterjohn> and if it fails it should tell you which test failed
12:06 < odoacre> yeah, my library
12:06 < skelterjohn> odoacre: do you mean running gotest vs ./testmain?  or
whatever the binary is called
12:06 < odoacre> yes
12:06 < odoacre> running gotest -> fail
12:06 < skelterjohn> that *is* strange :)
12:06 < odoacre> runnin 6.out -> pass
12:07 < odoacre> i know
12:07 < skelterjohn> since you wrote the tests, you can put a useful message
in all of your t.Fail() calls
12:07 < odoacre> it's driving me crazy
12:07 < skelterjohn> so you can see which one fails
12:07 < odoacre> the test is really basic
12:07 < odoacre> i ll do a pastie
12:09 -!- Dr_Who [~tgall_foo@linaro/tgall-foo] has joined #go-nuts
12:09 < odoacre> http://pastie.org/2284250
12:09 < odoacre> the test that fails
12:09 < odoacre> is the onejust before the last
12:10 < odoacre> it looks as if it's running the function AFTER the data is
12:10 < skelterjohn> "IsDAG finds nonexistant cycle"?
12:10 < odoacre> yes
12:10 < skelterjohn> dunno
12:10 < skelterjohn> make clean?
12:10 < odoacre> tried :(
12:10 < skelterjohn> maybe 6.out is leftover
12:10 < odoacre> checked very carefully
12:11 < odoacre> well i'll separate it completely from the other one and see
if it still fails
12:16 < odoacre> no joy :(
12:16 -!- ccc1 [~Adium@114-45-7-49.dynamic.hinet.net] has quit [Ping timeout: 246
12:17 < jnwhiteh> I've never heard of anything like this before O.o
12:17 -!- ccc1 [~Adium@114-45-82-104.dynamic.hinet.net] has joined #go-nuts
12:17 < odoacre> i can send you the code
12:17 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has quit [Ping
timeout: 255 seconds]
12:17 -!- preflex_ [~preflex@unaffiliated/mauke/bot/preflex] has joined #go-nuts
12:19 -!- desai [~Adium@c-67-174-14-128.hsd1.il.comcast.net] has joined #go-nuts
12:22 < odoacre> http://pastie.org/2284292 is someone wants to try it/tell
me whet i'm doing wrong
12:25 < wrtp> skelterjohn: yeah, i'd factor it differently - i wouldn't
expose a channel in the API
12:33 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
12:37 < wrtp> skelterjohn: oops, i meant that to be addressed to jnwhiteh
12:37 < jnwhiteh> *nod*
12:37 < jnwhiteh> just was implementing what I thought he was saying he
12:39 < jnwhiteh> but even that was very confused
12:48 -!- desai [~Adium@c-67-174-14-128.hsd1.il.comcast.net] has quit [Quit:
13:01 -!- Kahvi [5b9b57fc@gateway/web/freenode/ip.] has quit [Ping
timeout: 252 seconds]
13:05 -!- nicka [~nicka@unaffiliated/nicka] has quit [Ping timeout: 250 seconds]
13:09 -!- nicka [~lerp@unaffiliated/nicka] has joined #go-nuts
13:15 -!- sniper506th [~sniper506@rrcs-70-61-192-18.midsouth.biz.rr.com] has
joined #go-nuts
13:19 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Remote host closed
the connection]
13:36 -!- gridaphobe [~gridaphob@cpe-74-68-151-24.nyc.res.rr.com] has joined
13:38 -!- angasule [~angasule@] has quit [Read error: Connection reset
by peer]
13:40 -!- franciscosouza [~francisco@] has joined #go-nuts
13:48 -!- smw [~stephen@unaffiliated/smw] has quit [Ping timeout: 260 seconds]
13:49 -!- pharris [~Adium@rhgw.opentext.com] has joined #go-nuts
13:52 -!- desai [~Adium@anlextwls003-089.wl.anl-external.org] has joined #go-nuts
13:53 -!- smw [~stephen@unaffiliated/smw] has joined #go-nuts
13:59 -!- Kahvi [5b9b57fc@gateway/web/freenode/ip.] has joined
14:00 -!- moraes [~moraes@] has quit [Ping timeout: 250 seconds]
14:00 -!- franciscosouza_ [~francisco@] has joined #go-nuts
14:00 -!- Gauge [~gauge@anlextwls093-157.wl.anl-external.org] has joined #go-nuts
14:02 -!- niemeyer [~niemeyer@201-11-231-55.pltce701.dsl.brasiltelecom.net.br] has
joined #go-nuts
14:02 -!- franciscosouza [~francisco@] has quit [Ping timeout: 252
14:05 -!- julia [~julia@124-148-135-84.dyn.iinet.net.au] has quit [Quit: julia]
14:08 -!- r_linux [~r_linux@static.] has joined
14:23 -!- zaero [~eclark@50-82-164-104.client.mchsi.com] has quit [Read error:
Operation timed out]
14:23 -!- zaero [~eclark@servo.m.signedint.com] has joined #go-nuts
14:25 -!- napsy [~luka@] has quit [Quit: Lost terminal]
14:25 -!- napsy [~luka@] has joined #go-nuts
14:27 -!- rlab [~Miranda@147-66-95-178.pool.ukrtel.net] has joined #go-nuts
14:30 -!- ancientlore [~ancientlo@] has joined #go-nuts
14:31 -!- kergoth [~kergoth@ip24-251-173-232.ph.ph.cox.net] has joined #go-nuts
14:35 -!- ancientlore [~ancientlo@] has quit [Read error: Connection
reset by peer]
14:36 -!- ancientlore [~ancientlo@] has joined #go-nuts
14:38 -!- smw [~stephen@unaffiliated/smw] has quit [Ping timeout: 240 seconds]
14:40 -!- adil [~adil@nat/ibm/x-movzsnrkvckrsfly] has left #go-nuts []
14:41 -!- ronnyy [~quassel@p4FF1C5FB.dip0.t-ipconnect.de] has joined #go-nuts
14:42 -!- ccc1 [~Adium@114-45-82-104.dynamic.hinet.net] has quit [Quit: Leaving.]
14:43 -!- GoBIR_ [~gobir@70-90-168-189-SFBACalifornia.hfc.comcastbusiness.net] has
quit [Read error: Connection reset by peer]
14:43 -!- GoBIR [~gobir@70-90-168-189-SFBACalifornia.hfc.comcastbusiness.net] has
joined #go-nuts
14:43 -!- Gauge [~gauge@anlextwls093-157.wl.anl-external.org] has quit [Ping
timeout: 276 seconds]
14:45 -!- ancientlore [~ancientlo@] has quit [Read error: Connection
reset by peer]
14:46 -!- ancientlore [~ancientlo@] has joined #go-nuts
14:46 -!- ancientlore [~ancientlo@] has left #go-nuts []
14:47 -!- smw [~stephen@unaffiliated/smw] has joined #go-nuts
14:52 -!- Gauge [~gauge@anlextwls093-157.wl.anl-external.org] has joined #go-nuts
14:56 -!- qeed [~qeed@adsl-98-85-58-69.mco.bellsouth.net] has joined #go-nuts
14:56 -!- yogib [~yogib@] has quit [Ping timeout: 255 seconds]
14:57 -!- taruti [taruti@ultra.violetti.org] has quit [Ping timeout: 252 seconds]
14:57 < skelterjohn|work> morning all
14:57 -!- taruti [taruti@ultra.violetti.org] has joined #go-nuts
14:58 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has quit [Quit: Leaving.]
15:01 < mpl> hello to you
15:02 < skelterjohn|work> i was thinking some more about what might make an
interesting go programming competition
15:02 < skelterjohn|work> i haven't come up with anything, really :)
15:02 < skelterjohn|work> be nice to be something that benefits from
concurrency and communication
15:03 < jnwhiteh> any multi-agent system
15:04 < Gauge> what would make an interesting go programming competition is
if they allowed go at ACM prog comps
15:04 < skelterjohn|work> that's a much more general flavor of competition
15:05 < Gauge> I'd still use it lol
15:05 < skelterjohn|work> oh, me too
15:05 < skelterjohn|work> but it's not what i'm thinking about
15:05 < skelterjohn|work> i'm thinking about some kind of fun community
15:05 < skelterjohn|work> jnwhiteh: do you mean multiple agents, each
written by a different competitor?
15:06 < Gauge> almost anything involving a listen socket has to use a go
15:06 < jnwhiteh> skelterjohn|work: no, but that would work as well
15:06 < Gauge> if you are trying to think of things to force use of them
15:06 < jnwhiteh> for example, you create a maze and they write a program to
navigate the maze
15:06 < Gauge> the serial solution to that jnwhiteh is much faster I think
than a parallel one
15:06 < jnwhiteh> or anything where multiple autonomous agents interact
15:07 -!- Bigbear1 [~Cody@d75-158-128-103.abhsia.telus.net] has joined #go-nuts
15:07 < jnwhiteh> this isn't about parallelism
15:07 < jnwhiteh> its about concurrency
15:07 < jnwhiteh> =)
15:07 < skelterjohn|work> Gauge: not at all, if you actually mean parallel
15:07 < skelterjohn|work> pathfinding is something that is embarassingly
15:07 < Gauge> i get confused between the terms constantly
15:07 < Gauge> oh I know it is
15:08 < jnwhiteh> that's why you don't give them the maze at once, you just
give them the state of the room they're in, something like that
15:08 < Gauge> but there are algorithms that are stupid fast for solving
those in serial
15:08 < Gauge> unless the maze is incredibly large
15:08 < jnwhiteh> it wasn't an optimisation problem
15:08 < skelterjohn|work> finding solutions to mazes is not that
interesting, but more general planning is, i think
15:08 < jnwhiteh> if it was, we wouldn't use Go =)
15:08 < jnwhiteh> we'd write everything in machine code :P
15:08 -!- statik [~emurphy@newyork.elliotmurphy.com] has quit [Quit: Coyote
finally caught me]
15:09 < Gauge> I thought the idea was to think of problems that enforce the
use of go routines?
15:09 < jnwhiteh> skelterjohn|work: just think about having multiple robots
or agents doing *something*
15:09 < jnwhiteh> Gauge: not *enforce* but wherein communication and
goroutines work well
15:09 < jnwhiteh> and they do, with what I've been talking about
15:09 < Gauge> oh so channels then lol
15:10 < ww> there are open problems in query federation for data mining (and
other uses) that are possibilities
15:10 < skelterjohn|work> one learning problem i always thought was
interesting (but kind of got shot down by my advisor for time constraints) is when
you have some environment with many agents - they have a collective knowledge
aobut what has happened so far
15:10 < skelterjohn|work> and they need to jointly choose the best things to
do to learn quickly so they can exploit
15:10 < ww> so there's an element of parallelism for the queries on
different sources
15:10 < jnwhiteh> i love implementing the borg
15:10 < ww> ...  and cooperation for combining the responses
15:11 < Gauge> is posting of an http connection go routine safe?
15:11 < Gauge> like logging is
15:11 < skelterjohn|work> you mean, multiple goroutines posting on the same
15:11 < Gauge> yes
15:12 < skelterjohn|work> probably not, but i don't know
15:12 < skelterjohn|work> i don't imagine that it's done with one write
15:12 < skelterjohn|work> but maybe there is some internal mutexing
15:12 -!- tvw [~tv@] has quit [Remote host closed the connection]
15:13 < jessta> Gauge: safe in what way?
15:14 < Gauge> with logging 2 go routines can log to the same logger at the
same time and it will be safe
15:14 < Gauge> was windering if http conns were also like that
15:15 < Gauge> I would assume so, but making assumptions i bad with sockets
15:15 < skelterjohn|work> the logger is safe because the whole message is
written with one .Write() call
15:15 < ww> i would guess that, absent muxing like spdy does, the http
protocol should serialise them
15:15 < ww> no idea if it actually does though
15:16 < jessta> Gauge: it's probably safe in the same way that log is safe,
but that's not really safe for http
15:17 < jessta> if logging the order of the lines are unimportant, but for
http they are
15:18 < Gauge> no my services are stateless
15:18 < Gauge> so the order doesn't matter
15:18 < Gauge> i'm looking in server.go to see if I can find anything
15:19 < skelterjohn|work> posting is done from the client side, no?
15:19 < skelterjohn|work> i was just tracing through the code...it's kind of
15:22 < Gauge> yea I'm in client.go now
15:22 < Gauge> server.go is for servers and responses
15:22 < Gauge> err request.go sorry
15:23 -!- Kahvi [5b9b57fc@gateway/web/freenode/ip.] has quit [Quit:
Page closed]
15:23 -!- yogib [~yogib@dslb-178-001-017-155.pools.arcor-ip.net] has joined
15:24 -!- GilJ [~GilJ@zeus.ugent.be] has quit [Read error: Operation timed out]
15:24 -!- tav [~tav@host-92-20-103-198.as13285.net] has quit [Ping timeout: 255
15:24 -!- PragCypher [~PragCyphe@] has quit [Read error: Connection
reset by peer]
15:25 < Gauge> hmm, as long as I make a new request everytime it looks safe
15:25 -!- PragCypher [~PragCyphe@] has joined #go-nuts
15:25 < Gauge> eh w/e i'll try it
15:26 -!- smw [~stephen@unaffiliated/smw] has quit [Ping timeout: 260 seconds]
15:28 -!- GilJ [~GilJ@zeusgw.ugent.be] has joined #go-nuts
15:31 < kevlar_work> Gauge, using the same http.Client for multiple requests
is safe; using the same request, response, etc is not advised.
15:31 < Gauge> yea
15:31 < Gauge> that's what I gathered from the go sources files
15:31 < Gauge> I'm actually using the client package, and on every post is
creates a new request for you and sends, so it looks prefectly safe
15:31 -!- dahankzter [~henke@92-244-3-192.customers.ownit.se] has joined #go-nuts
15:32 < kevlar_work> are you talking about an HTTP Server or an application
that can act as an HTTP Client?
15:33 < kevlar_work> (or something like a proxy that does both)
15:35 < dahankzter> huuu copy on assignment is weird if you are not used to
15:35 < Gauge> i have many tiers of http daemons, some receive requests only
to send requests off to other server, so they can act as both a server and client
15:36 -!- anticide [~textual@] has joined #go-nuts
15:41 -!- anticide [~textual@] has quit [Read error: Connection reset
by peer]
15:46 < jessta> dahankzter: I've never used a language that doesn't copy on
15:49 < dahankzter> aha i mean arrays
15:49 < dahankzter> it does copy the whole of it right?
15:50 < jessta> = in Go copies the value on the right in to the variable on
the left
15:50 < jessta> arrays, pointers, int, string, slice, interface are all
15:50 < jessta> *values
15:51 < kevlar_work> funcs are also values
15:51 < kevlar_work> (even though they're pointers behind-the-scenes)
15:51 < jessta> and maps
15:51 < dahankzter> i am stuck on the array content but i get it
15:51 < kevlar_work> oh, I thought you got that one, yeah.
15:51 -!- robteix [~robteix@] has joined #go-nuts
15:52 < aiju> funcs are not values
15:52 < jessta> dahankzter: it's rare that you'd use arrays on their own
15:52 < kevlar_work> aiju, how do you figure?
15:52 < dahankzter> as parts of structures mostly i guess and copy on
assignment makes for nice concurrency support
15:53 < dahankzter> as long as youdon't forget how it works
15:53 < aiju> kevlar_work: funcs are pointers
15:54 -!- odoacre [~antonio@] has quit [Quit: Leaving]
15:54 < jessta> dahankzter: java, python etc.  also do copy on assignment
15:55 -!- erus` [~chatzilla@mailgate.ips-international.com] has quit [Remote host
closed the connection]
15:55 < dahankzter> but not of the whole content, at least in Java
15:56 < dahankzter> the values in the array
15:57 < jessta> almost everything in java is a reference type
15:57 < jessta> so a java array is like a Go slice
15:58 < dahankzter> yes surely we copy the reference but not what it refers
16:00 < kevlar_work> aiju, and pointers are values.
16:01 < kevlar_work> but since they have no * in them, I don't think you can
just blindly assume everyone knows they're pointers.
16:01 < kevlar_work> (*func is NOT the same as func)
16:03 < jessta> dahankzter: yeah, = only means shallow copy
16:05 < dahankzter> yes but not so in go right?
16:05 < dahankzter> for arrays?
16:05 < jessta> the difference between Go and Java is how the = operator
16:05 < jessta> *is not
16:06 < jessta> the difference is what things are values
16:06 < dahankzter> yes you are right and it is i think what got me at first
16:06 < dahankzter> the whole array is a value right?
16:07 < jessta> Java only has object references, and a few numberic values
16:08 -!- fabian__ [~fabian@p5DCDB695.dip.t-dialin.net] has joined #go-nuts
16:09 < jessta> Go has a bunch of reference
types(map,func,interface,slice,string), pointers, structs, arrays and all the
numeric values
16:09 -!- moraes [~moraes@] has joined #go-nuts
16:10 -!- smw [~stephen@unaffiliated/smw] has joined #go-nuts
16:11 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
16:11 -!- anticide [~textual@] has joined #go-nuts
16:18 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has quit [Ping
timeout: 255 seconds]
16:19 -!- erus` [~chatzilla@cpc2-gill2-0-0-cust701.basl.cable.virginmedia.com] has
joined #go-nuts
16:19 -!- iant [~iant@] has joined #go-nuts
16:19 -!- mode/#go-nuts [+v iant] by ChanServ
16:20 -!- fabian__ [~fabian@p5DCDB695.dip.t-dialin.net] has quit [Ping timeout:
258 seconds]
16:20 -!- fabian__ [~fabian@p5DCDAACD.dip.t-dialin.net] has joined #go-nuts
16:22 < kevlar_work> dahankzter, stop using arrays :P
16:22 < kevlar_work> only use them if you really need them, which you almost
certainly don't when you're starting out.
16:23 < kevlar_work> slices are far more idiomatic and are what (almost?)
every stdlib function requires
16:24 < fluffle> hi again!  if I want to make a copy of a struct that I have
a pointer to, can i just do: newstruct := *pointer
16:24 < dahankzter> i am having trouble seeing the difference :D
16:24 < fluffle> (i realise this is a shallow copy, but that's fine in this
16:25 < dahankzter> visually in the code i mean...  for a function
declaration it slice []t is it the same in vars?
16:25 < fluffle> oh, hmm, no it's not, the struct contains an []string
16:25 < aiju> slices are not reference types
16:25 < aiju> for the ten billionth time
16:26 < fluffle> aiju: was that to me?
16:26 < aiju> jessta
16:27 < fluffle> ah
16:27 < dahankzter> "Slices are reference types" from the docs tho
16:28 -!- Crnobog|Work [u1041@gateway/web/irccloud.com/x-xeeshgshgqmiwhix] has
quit [Remote host closed the connection]
16:28 -!- Kai` [u327@gateway/web/irccloud.com/x-feuxovsdzjatgyxn] has quit [Remote
host closed the connection]
16:28 -!- heatxsink [u956@gateway/web/irccloud.com/x-fdsuyedxlmtwaxnq] has quit
[Remote host closed the connection]
16:28 -!- qrush [u1528@gateway/web/irccloud.com/x-lumtcvlzrhzuqwog] has quit [Read
error: Connection reset by peer]
16:29 < fabian__> hey, the gob encoding can just be used by go written
programs, right?
16:30 < aiju> no
16:30 < pharris> fabian__: The format is well defined, so it can be used
from elsewhere if you want.  eg: http://code.google.com/p/libgob/
16:30 < aiju> you could also use a different language
16:32 -!- anticide [~textual@] has quit [Quit: Computer has gone to
16:32 < fluffle> http://pastie.org/2285345 -- Will this Do What I Want (bar
the lack of duplicating the Timestamp field, which I'm fine with) ?
16:32 < jessta> aiju: so what do you call a type that specifically contains
a pointer(reference)?
16:32 < aiju> jessta: "value"
16:33 -!- fabian__ [~fabian@p5DCDAACD.dip.t-dialin.net] has quit [Ping timeout:
246 seconds]
16:33 < jessta> aiju: that's a rather vauge way to describe it
16:33 < aiju> or maybe
16:33 < aiju> "pointer"?
16:34 < jessta> but it's not a pointer
16:34 -!- fabian__ [~fabian@p5DCDB55C.dip.t-dialin.net] has joined #go-nuts
16:35 < dahankzter> its a type whose value is a pointer?
16:38 < jessta> in the case of an interface value, it's more vague.  Because
it's not a pointer and conceptually it doesn't contain a pointer but copying it
doesn't actually copy the data it refers to.
16:38 -!- pjacobs [~pjacobs@] has joined #go-nuts
16:40 -!- pjacobs2 [~pjacobs@] has joined #go-nuts
16:40 -!- pjacobs [~pjacobs@] has quit [Disconnected by services]
16:40 < jessta> I guess "reference value" is reasonable
16:42 < jessta> fluffle: that's not goign to work as you expect
16:42 -!- iXeno [~ixeno@cm-] has joined #go-nuts
16:42 -!- aboSamoor [~rmyeid@nat/google/x-cslqhhzijbqkifse] has quit [Remote host
closed the connection]
16:42 < jessta> fluffle: line.Args and nl.Args are using the same array
16:44 < fluffle> ah, so I need to create a new slice, copy to that, then
assign it to nl.Args?
16:44 * fluffle goes to read about copy properly
16:45 < jessta> fluffle: I think you can just set nl.Args to nil and then
16:45 < fluffle> oh, uh, it's copy(dst, src) for one thing :/
16:46 < jessta> ah, that only works for append(), anyway
16:47 < fluffle> no worries
16:47 < fluffle> thanks for the help
16:49 -!- Bigbear1 [~Cody@d75-158-128-103.abhsia.telus.net] has quit [Read error:
Connection reset by peer]
16:51 -!- fabian__ [~fabian@p5DCDB55C.dip.t-dialin.net] has quit [Ping timeout:
260 seconds]
16:54 -!- ThreeSix [~ThreeSix@] has quit [Ping
timeout: 252 seconds]
16:55 -!- awidegreen [~quassel@h-170-226.a212.priv.bahnhof.se] has joined #go-nuts
16:55 -!- Project-2501 [~Marvin@] has joined #go-nuts
16:56 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:7963:ebbf:dc5a:d64b] has joined
16:59 -!- Fish- [~Fish@exo3753.pck.nerim.net] has joined #go-nuts
16:59 -!- Project_2501 [~Marvin@] has quit [Ping timeout: 255 seconds]
17:02 -!- Fish [~Fish@exo3753.pck.nerim.net] has quit [Ping timeout: 250 seconds]
17:02 -!- Crnobog|Work [u1041@gateway/web/irccloud.com/x-exlgtekbzkghpzwx] has
joined #go-nuts
17:04 -!- heatxsink [u956@gateway/web/irccloud.com/x-exgivzmsastagwds] has joined
17:05 -!- fabian__ [~fabian@p5DCDAE80.dip.t-dialin.net] has joined #go-nuts
17:07 < skelterjohn|work> aiju: i don't think it's meaningful to refer to
both struct types and slice types as values
17:07 < skelterjohn|work> in go the word "reference" has meaning.  it's not
the same as in C++, but it does have meaning
17:07 < skelterjohn|work> we just use the word "reference" to mean a pointer
wrapped with some extra data
17:08 -!- pyrhho [~pyrhho@host-92-27-75-48.static.as13285.net] has quit [Quit:
17:08 -!- tvw [~tv@e176007174.adsl.alicedsl.de] has joined #go-nuts
17:11 < jessta> "In programming language theory, a reference type is a data
type that can only be accessed by references.  Unlike objects of value types,
objects of reference types cannot be directly embedded into composite objects and
are always dynamically allocated."
17:11 -!- fabian__ [~fabian@p5DCDAE80.dip.t-dialin.net] has quit [Ping timeout:
264 seconds]
17:12 < aiju> what the fuck?
17:12 < jessta> that's what wikipedia seems to think
17:12 -!- fabian__ [~fabian@p5DCDA35C.dip.t-dialin.net] has joined #go-nuts
17:12 <+iant> obviously Go is not using that definition when it says
"reference type"
17:12 <+iant> or rather, perhaps in a sense it is
17:12 <+iant> but not in the obvious sense
17:12 <+iant> there is an underlying map type in Go which meets that
definition of reference type
17:13 <+iant> but it's not the type that Go calls "map[int]int"
17:13 < skelterjohn|work> the person writing the wiki entry was clearly
thinking of a specific language
17:13 < skelterjohn|work> and decided that the way that language did it was
the only way that made sense
17:14 < skelterjohn|work> "cannot be directly embedded into composite
objects" that's a pretty silly thing to add to the defn of a reference type
17:14 < skelterjohn|work> the dynamically allocated bit, too
17:15 < skelterjohn|work> i'm pretty sure if in C++ you write "int a = 5;
int& b = a; b += 2;" it doesn't dynamically allocate b
17:15 -!- napsy [~luka@] has quit [Ping timeout: 276 seconds]
17:15 < skelterjohn|work> i'm pretty sure the whole reference type syntax is
just dressed up pointers
17:15 <+iant> in C++ it is, yes
17:15 < skelterjohn|work> yes, in C++
17:16 -!- fabled [~fabled@] has quit [Quit: Ex-Chat]
17:19 -!- fabled [~fabled@] has joined #go-nuts
17:20 -!- fabian__ [~fabian@p5DCDA35C.dip.t-dialin.net] has quit [Ping timeout:
258 seconds]
17:20 -!- fabian__ [~fabian@p5DCDB5B2.dip.t-dialin.net] has joined #go-nuts
17:21 < exch> http://www.solipsys.co.uk/new/EveryLanguageFixesSomething.html
kind of them to mention Go in there, but I think the reasoning is a bit limited
17:21 < exch> (in the second graph)
17:22 < aiju> seems quite wrong
17:23 < aiju> Javascript does not descend from Java
17:23 < skelterjohn|work> wow, they put that in there?
17:23 < KirkMcDonald> The important distinction between Go's reference types
and references in C++ is in what happens when you assign to them.
17:23 < skelterjohn|work> not in the 2nd figure...
17:23 < skelterjohn|work> they have js coming from "self" which i have never
heard of
17:23 < aiju> this is full of crapp
17:24 < skelterjohn|work> read the disclaimer at th etop
17:24 -!- tvw [~tv@e176007174.adsl.alicedsl.de] has quit [Ping timeout: 255
17:25 < f2f> hmm.  touring machines begat lisp.
17:25 < skelterjohn|work> (turing)
17:25 < f2f> sorry.
17:27 < aiju> hahahaha, touring machine
17:29 -!- jstemmer [~cheetah@mrpwn.stemmertech.com] has quit [Quit: leaving]
17:30 -!- Fish [~Fish@9fans.fr] has joined #go-nuts
17:31 -!- arun_ [~arun@unaffiliated/sindian] has joined #go-nuts
17:32 -!- jstemmer [~cheetah@mrpwn.stemmertech.com] has joined #go-nuts
17:36 -!- arun_ [~arun@unaffiliated/sindian] has quit [Read error: Connection
reset by peer]
17:36 -!- arun_ [~arun@e71020.upc-e.chello.nl] has joined #go-nuts
17:36 -!- arun_ [~arun@e71020.upc-e.chello.nl] has quit [Changing host]
17:36 -!- arun_ [~arun@unaffiliated/sindian] has joined #go-nuts
17:41 < skelterjohn|work> it makes sense - the machine tours around the
infinite magnetic tape
17:42 < aiju> the infinite tape bit is a nice one
17:43 -!- qrush [u1528@gateway/web/irccloud.com/x-mzqfptrctfyzkozd] has joined
17:47 -!- Queue29 [~Queue29@egress-w.sfo1.yelpcorp.com] has joined #go-nuts
17:47 -!- Queue29 [~Queue29@egress-w.sfo1.yelpcorp.com] has quit [Remote host
closed the connection]
17:50 -!- Queue29 [~Queue29@egress-w.sfo1.yelpcorp.com] has joined #go-nuts
17:50 -!- iXeno [~ixeno@cm-] has quit [Remote
host closed the connection]
17:57 -!- ronnyy [~quassel@p4FF1C5FB.dip0.t-ipconnect.de] has quit [Remote host
closed the connection]
17:58 -!- kergoth [~kergoth@ip24-251-173-232.ph.ph.cox.net] has quit [Ping
timeout: 276 seconds]
18:03 -!- PortatoreSanoDiI [~Marvin@dynamic-adsl-94-36-154-99.clienti.tiscali.it]
has joined #go-nuts
18:04 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has joined
18:07 -!- Project-2501 [~Marvin@] has quit [Ping timeout: 258 seconds]
18:10 -!- Queue29 [~Queue29@egress-w.sfo1.yelpcorp.com] has quit [Remote host
closed the connection]
18:11 -!- Project_2501 [~Marvin@] has joined #go-nuts
18:12 -!- Queue29 [~Queue29@egress-w.sfo1.yelpcorp.com] has joined #go-nuts
18:14 -!- PortatoreSanoDiI [~Marvin@dynamic-adsl-94-36-154-99.clienti.tiscali.it]
has quit [Ping timeout: 257 seconds]
18:22 -!- kamaji [~kamaji@handtomouse.demon.co.uk] has joined #go-nuts
18:24 -!- photron [~photron@port-92-201-78-188.dynamic.qsc.de] has quit [Ping
timeout: 255 seconds]
18:32 -!- Project_2501 [~Marvin@] has quit [Quit: E se abbasso questa
leva che succ...]
18:34 < erus`> write an AI for this without bruting it :D
18:34 -!- smcquay [~smcquay@30.236.sfcn.org] has joined #go-nuts
18:36 -!- saschpe [~quassel@opensuse/member/saschpe] has joined #go-nuts
18:37 -!- tav [~tav@host-92-20-54-201.as13285.net] has joined #go-nuts
18:37 -!- durin42 [~durin@adium/durin42] has joined #go-nuts
18:38 -!- durin42 [~durin@adium/durin42] has left #go-nuts []
18:39 -!- fabled [~fabled@] has quit [Read error: No route to host]
18:39 -!- saschpe [~quassel@opensuse/member/saschpe] has quit [Remote host closed
the connection]
18:42 < kevlar_work> erus`, AI = search, so that's a pretty trivial DFS with
some heuristic (think A*)
18:44 -!- yogib [~yogib@dslb-178-001-017-155.pools.arcor-ip.net] has quit [Quit:
18:46 -!- pharris [~Adium@rhgw.opentext.com] has quit [Quit: Leaving.]
18:51 -!- chomp [~chomp@dap-209-166-184-50.pri.tnt-3.pgh.pa.stargate.net] has
joined #go-nuts
18:51 -!- TheMue [~FMueller@p5DDF6659.dip.t-dialin.net] has joined #go-nuts
18:51 < TheMue> re
18:54 -!- Archwyrm [~archwyrm@archwyrm.net] has joined #go-nuts
18:55 -!- smcquay [~smcquay@30.236.sfcn.org] has quit [Read error: Connection
reset by peer]
19:00 -!- Archwyrm [~archwyrm@archwyrm.net] has quit [Quit: Changing server]
19:01 -!- Queue29 [~Queue29@egress-w.sfo1.yelpcorp.com] has quit [Remote host
closed the connection]
19:02 -!- DisposaBoy [~DisposaBo@] has joined #go-nuts
19:05 -!- TheMue [~FMueller@p5DDF6659.dip.t-dialin.net] has quit [Ping timeout:
250 seconds]
19:07 -!- TheMue [~FMueller@p5DDF6659.dip.t-dialin.net] has joined #go-nuts
19:08 -!- Archwyrm [~archwyrm@archwyrm.net] has joined #go-nuts
19:09 -!- Kai` [u327@gateway/web/irccloud.com/x-cynjhqoiymweusxx] has joined
19:17 < smw> is there a way to get code coverage statistics from gotest?
19:18 -!- Queue29 [~Queue29@egress-w.sfo1.yelpcorp.com] has joined #go-nuts
19:21 -!- zaero [~eclark@servo.m.signedint.com] has quit [Ping timeout: 255
19:22 -!- kungfuelmosan [6ee8901a@gateway/web/freenode/ip.] has
joined #go-nuts
19:22 -!- Queue29 [~Queue29@egress-w.sfo1.yelpcorp.com] has quit [Remote host
closed the connection]
19:25 -!- Queue29 [~Queue29@egress-w.sfo1.yelpcorp.com] has joined #go-nuts
19:26 -!- yogib [~yogib@dslb-178-001-017-155.pools.arcor-ip.net] has joined
19:27 -!- zaero [~eclark@50-82-164-104.client.mchsi.com] has joined #go-nuts
19:33 -!- Gauge [~gauge@anlextwls093-157.wl.anl-external.org] has quit [Ping
timeout: 276 seconds]
19:34 -!- fabian__ [~fabian@p5DCDB5B2.dip.t-dialin.net] has quit [Ping timeout:
240 seconds]
19:39 -!- huin [~huin@] has joined #go-nuts
19:40 -!- magn3ts [~magn3ts@ip68-103-225-65.ks.ok.cox.net] has joined #go-nuts
19:43 < TheMue> smw: Not with gotest, but maybe http://golang.org/cmd/cov/
19:48 -!- nicka1 [~nicka@] has joined #go-nuts
19:50 -!- keithcascio [~keithcasc@nat/google/x-ywkrkbdjmyktulwn] has joined
19:54 -!- iXeno [~ixeno@cm-] has joined #go-nuts
19:57 -!- alehorst [~alehorst@] has quit
[Quit: Leaving.]
20:00 -!- ThreeSix [~ThreeSix@] has joined #go-nuts
20:02 -!- alehorst [~alehorst@] has joined
20:04 -!- iXeno_ [~ixeno@cm-] has joined
20:05 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Quit: Leaving]
20:06 < smw> TheMue, we need some way to combine gotest and cov :-)
20:07 -!- iXeno [~ixeno@cm-] has quit [Ping
timeout: 258 seconds]
20:07 < TheMue> smw: Yep
20:10 -!- fabian__ [~fabian@koln-4d0d1bde.pool.mediaWays.net] has joined #go-nuts
20:12 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts
20:13 -!- vmil86 [~vmil86@] has quit [Read error: Connection reset by
20:16 < skelterjohn|work> kevlar_work: you might be surprised at how
difficult that can be
20:16 < skelterjohn|work> also, what would you use as an admissible
heuristic for A* in that game?
20:16 < skelterjohn|work> it's not obvious to me what would work
20:17 -!- DisposaBoy [~DisposaBo@] has quit [Remote host closed the
20:22 < kevlar_work> skelterjohn, I said it'd be a trivial dfs, I didn't say
the heuristic would be trivial ;-)
20:24 < kevlar_work> though I would hazard that you could get by with a
heuristic that involves the area between your dot and the finish line.
20:24 < skelterjohn|work> i still don't think a DFS would be the best
solution (A* is not a kind of DFS, btw)
20:24 < kevlar_work> I'm probably getting the names confused; I know what I
mean in my head, lol
20:25 < kevlar_work> my ai training focused more on explaining the concepts,
we only learned the names for them very late in the game.
20:25 < kevlar_work> s/explaining/learning/
20:26 < TheMue> So, just release a new Tideland Common Go Library release
with another more flexible identifier generation function.
20:26 < skelterjohn|work> i think that manhattan distance would not be
20:26 < skelterjohn|work> it's an interesting game
20:26 < skelterjohn|work> TheMue: what is Tideland anyway
20:26 < skelterjohn|work> i've seen it around but never looked into what it
20:27 < TheMue> skelterjohn|work: It's my little one person software label.
Take a look at the dashboard, there are five libs I provide now.
20:28 < skelterjohn|work> there is both CGL and Common Go Library
20:28 -!- Fish [~Fish@9fans.fr] has quit [Quit: WeeChat 0.3.5]
20:28 < TheMue> skelterjohn|work: CGL is a lot of stuff, monitoring,
map/reduce, parallel sorting, supervising, uuid, other ids ...
20:28 -!- rcrowley [~rcrowley@93-158-11-253.subs.ibrowse.com] has joined #go-nuts
20:28 < TheMue> skelterjohn|work: I love those old TLAs (three letter
20:29 < TheMue> skelterjohn|work: GNL = Go Numeric Library / RWF = RESTful
Web Framework / RDC = Redis Database Client / ECA = Event-driven Cell Architecture
20:30 < skelterjohn|work> gnl has a broken link on the dashboard
20:31 < TheMue> skelterjohn|work: Hehe, yes, thx for the hint, the leading t
is missing.  I'll write a note to Andrew.
20:32 < skelterjohn|work> if you add the t it's still not a good link :)
remove the /hg too
20:32 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-164-114.clienti.tiscali.it] has
joined #go-nuts
20:34 -!- synx` [~dhorn@unaffiliated/synx/x-4957395] has quit []
20:37 -!- rcrowley [~rcrowley@93-158-11-253.subs.ibrowse.com] has quit [Quit:
Computer has gone to sleep.]
20:39 -!- synx` [~dhorn@kodiak.cs.sonoma.edu] has joined #go-nuts
20:39 -!- synx` [~dhorn@kodiak.cs.sonoma.edu] has quit [Changing host]
20:39 -!- synx` [~dhorn@unaffiliated/synx/x-4957395] has joined #go-nuts
20:39 -!- rcrowley [~rcrowley@93-158-11-253.subs.ibrowse.com] has joined #go-nuts
20:43 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-169-217.clienti.tiscali.it] has
joined #go-nuts
20:44 -!- robteix [~robteix@] has quit [Quit: Leaving]
20:45 -!- PragCypher [~PragCyphe@] has quit [Read error: Connection
reset by peer]
20:45 -!- PragCypher [~PragCyphe@] has joined #go-nuts
20:46 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-164-114.clienti.tiscali.it] has
quit [Ping timeout: 252 seconds]
20:48 -!- rcrowley [~rcrowley@93-158-11-253.subs.ibrowse.com] has quit [Quit:
Computer has gone to sleep.]
20:49 -!- r_linux [~r_linux@static.] has quit
[Quit: Lost terminal]
20:50 -!- qeed [~qeed@adsl-98-85-58-69.mco.bellsouth.net] has quit [Quit: Leaving]
20:53 -!- rcrowley [~rcrowley@93-158-11-253.subs.ibrowse.com] has joined #go-nuts
20:57 -!- Natch| [~natch@c-adcee155.25-4-64736c10.cust.bredbandsbolaget.se] has
quit [Remote host closed the connection]
20:58 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:7963:ebbf:dc5a:d64b] has quit
[Quit: Leaving.]
21:04 -!- rcrowley [~rcrowley@93-158-11-253.subs.ibrowse.com] has quit [Ping
timeout: 252 seconds]
21:17 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has quit [Remote
host closed the connection]
21:17 -!- kergoth_ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has joined #go-nuts
21:18 -!- yogib [~yogib@dslb-178-001-017-155.pools.arcor-ip.net] has quit [Quit:
21:20 -!- TheMue [~FMueller@p5DDF6659.dip.t-dialin.net] has quit [Quit: Lost
21:21 -!- huin [~huin@] has quit [Quit: leaving]
21:28 -!- gridaphobe [~gridaphob@cpe-74-68-151-24.nyc.res.rr.com] has quit [Remote
host closed the connection]
21:30 -!- kergoth__ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has joined #go-nuts
21:30 -!- kergoth_ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has quit [Ping
timeout: 252 seconds]
21:31 < fluffle> has anyone used the PCRE bindings listed on
http://go-lang.cat-v.org/library-bindings ?
21:32 < fluffle> i'd quite like to be able to do regex substitutions, and
neither the go standard library's regexp package or the sre2 implementation go
that for
21:32 < kevlar_work> uh
21:32 < fluffle> (I could perform the substitutions manually from the index
list, at a pinch, but that seems like a lot of work)
21:33 < kevlar_work> fluffle, regexp.ReplaceAll?
21:33 < fluffle> oh.
21:33 < fluffle> damn
21:33 < fluffle> um, ignore me, i clearly can't read tonight
21:33 < fluffle> sorry!
21:33 < kevlar_work> lol
21:33 < kevlar_work> it's entirely possible you need things stdlib regexp
doesn't have, that just happens to be one it does :)
21:33 < kevlar_work> you should also check out exp/regexp
21:34 < kevlar_work> (if you are on the bleeding edge)
21:34 < fluffle> not currently, i went there and ended up shooting myself in
the foot a couple of times :)
21:35 < kevlar_work> but the dashboard is almost entirely black now!
21:35 < fluffle> 'No support is provided for expressions (e.g.  \1 or $1) in
the replacement text.' <-- this makes me sad
21:35 < kevlar_work> ReplaceFunc
21:35 < kevlar_work> er, ReplaceAllFunc
21:35 < kevlar_work> + sprintf
21:36 < kevlar_work> I think that's one of the many things coming with the
21:36 < fluffle> ok
21:36 < fluffle> thanks again
21:36 * fluffle considers his options
21:37 < kevlar_work> oh, nevermind, I thought the replacement functions took
the subexpressions
21:39 -!- fabian__ [~fabian@koln-4d0d1bde.pool.mediaWays.net] has quit [Quit:
21:40 < fluffle> I could probably hack something up with
regexp.FindAllStringSubmatchIndex() but it looks like hard work
21:46 < f2f> nothing in Go is hard work ;)
21:47 < fluffle> well, compared to e.g.  perl where regex are a first-class
language construct, for example :p
21:50 -!- sniper506th [~sniper506@rrcs-70-61-192-18.midsouth.biz.rr.com] has quit
[Quit: Leaving...]
21:53 -!- gridaphobe [~gridaphob@cpe-74-68-151-24.nyc.res.rr.com] has joined
21:56 -!- desai [~Adium@anlextwls003-089.wl.anl-external.org] has quit [Quit:
21:57 < kevlar_work> fluffle, any programming problem is easy in the
language designed to solve that programming problem
21:58 < fluffle> good point well made
21:58 * fluffle stops whining
21:59 -!- magn3ts [~magn3ts@ip68-103-225-65.ks.ok.cox.net] has quit [Ping timeout:
276 seconds]
22:02 -!- rlab [~Miranda@147-66-95-178.pool.ukrtel.net] has quit [Read error:
Connection reset by peer]
22:05 -!- franciscosouza [~francisco@] has quit [Quit: franciscosouza]
22:06 < ThreeSix> when I type "var v SyncedBuffer" does it uses stack?
22:06 < f2f> yes.  it's put on the heap if you take its pointer
22:07 < f2f> assuming SyncedBuffer isn't a pointer type :)
22:07 < ThreeSix> nice :o
22:07 < ThreeSix> cool
22:09 < kevlar_work> you shouldn't care about that and it's an
implementation detail.
22:10 < ThreeSix> I just was curious to know how does it works :P
22:12 -!- magn3ts [~magn3ts@ip68-103-225-65.ks.ok.cox.net] has joined #go-nuts
22:12 < kevlar_work> ThreeSix, escape analysis is coming soon to gc, and
then we won't be able to answer the stack/heap question for you simply ;-)
22:16 -!- Nisstyre [~nisstyre@infocalypse-net.info] has quit [Ping timeout: 240
22:20 -!- wrtp [~rog@host-92-30-166-101.as13285.net] has quit [Quit: wrtp]
22:20 < ThreeSix> escape analysis?
22:21 -!- awidegreen [~quassel@h-170-226.a212.priv.bahnhof.se] has quit [Ping
timeout: 240 seconds]
22:21 < Namegduf> kevlar_work: It's good to know when you can easily assume
it's on the stack, though, for performance reasons
22:24 -!- chomp [~chomp@dap-209-166-184-50.pri.tnt-3.pgh.pa.stargate.net] has quit
[Ping timeout: 252 seconds]
22:25 -!- moraes [~moraes@] has quit [Ping timeout: 252 seconds]
22:25 < kevlar_work> yeah
22:25 < kevlar_work> though the whole point is that all you should have to
do is confine its use to one function and it will be on the stack
22:25 < kevlar_work> which is why lvd is working on escape analysis
22:27 < Namegduf> It'd be nice if I could assume that, yeah.
22:27 < nicka> To what extent is it done currently?
22:27 < Namegduf> "not at all"
22:28 < Namegduf> You take the address, it goes on the stack.
22:29 < Namegduf> I'm wishing for it only putting it on the stack if you 1)
Put it in a global variable.  2) Send to another goroutine 3) Call a function that
does one of these things.
22:29 < Namegduf> Should be possible to tag function parameters for "will
not be referenced anywhere by this function when it returns">
22:30 < Namegduf> And then you can use the stack mostly as you could in C.
22:30 < Namegduf> But anything is a nice start.
22:31 < kevlar_work> I am pretty sure the escape analysis that's being done
is quite thorough, based on some of the commentary
22:31 < Namegduf> Nice.
22:31 < kevlar_work> e.g.  I think it tags each argument of each function
with whether or not it is leaked
22:31 < Namegduf> Awesome.
22:32 < kevlar_work> don't quote me on that though; it's on the go-dev list
if you want to check it out.
22:32 < kevlar_work> I haven't taken the time to understand the code, so I
try to read the comments and infer :)
22:33 < kevlar_work> (and the reviewer comments)
22:34 < Namegduf> I won't.
22:35 -!- franciscosouza [~francisco@] has joined #go-nuts
22:37 -!- kergoth` [~kergoth@ip24-251-173-232.ph.ph.cox.net] has quit [Read error:
Connection reset by peer]
22:42 -!- NiteRain [~kvirc@] has joined #go-nuts
22:45 -!- Nisstyre [~nisstyre@infocalypse-net.info] has joined #go-nuts
22:57 -!- NiteRain|2 [~kvirc@] has joined #go-nuts
22:57 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-169-217.clienti.tiscali.it] has
quit [Quit: E se abbasso questa leva che succ...]
22:58 -!- NiteRain|2 [~kvirc@] has quit [Client Quit]
23:04 -!- erus` [~chatzilla@cpc2-gill2-0-0-cust701.basl.cable.virginmedia.com] has
quit [Remote host closed the connection]
23:21 -!- magn3ts [~magn3ts@ip68-103-225-65.ks.ok.cox.net] has quit [Remote host
closed the connection]
23:21 -!- moraes [~moraes@] has joined #go-nuts
23:22 -!- NiteRain [~kvirc@] has quit [Quit: KVIrc 4.1.1 Equilibrium
23:31 -!- PragCypher [~PragCyphe@] has quit [Read error: Connection
reset by peer]
23:32 -!- PragCypher [~PragCyphe@] has joined #go-nuts
23:33 -!- pjacobs [~pjacobs@] has quit [Quit: Leaving]
23:51 -!- robteix [~robteix@host123.190-30-191.telecom.net.ar] has joined #go-nuts
23:55 -!- angasule [~angasule@] has joined #go-nuts
--- Log closed Fri Jul 29 00:00:02 2011