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

--- Log opened Fri Aug 12 00:00:21 2011
00:00 -!- tvw [~tv@e176009065.adsl.alicedsl.de] has quit [Remote host closed the
connection]
00:01 -!- dRbiG [p@bofh.edu.pl] has joined #go-nuts
00:04 < leterip> i'm using the rpc library and im wondering if there's a way
to check if a server will respond to a specific call.  is that possible?
00:05 -!- tavis_rain [~tavisb@24-104-129.146.hfc.mediarain.com] has quit [Read
error: Connection reset by peer]
00:06 < jessta> leterip: you could make that call and find out.
00:06 < leterip> yeah thats what im doing, but the server logs the fact that
it cant find the service
00:07 < leterip> and id like to avoid that.  i dont see any flags to turn
that off too
00:07 < jessta> leterip: what are you trying to achieve with this?
00:09 < leterip> well i have a bunch of nodes and some nodes have some
functionality that others don't
00:09 < leterip> by registering different rcp handlers
00:09 < leterip> rpc*
00:10 < jessta> how about a call that returns the valid calls?
00:10 -!- sjbrown [~sjbrown@c-98-210-195-242.hsd1.ca.comcast.net] has quit [Quit:
Leaving]
00:10 < jessta> or version ids
00:11 < leterip> a level of indirection?  have every rpc call go through a
specific call that routes it?
00:11 < leterip> hmm
00:11 < leterip> that could work.  basically i just want to comment out this
line: http://golang.org/src/pkg/rpc/server.go#L399
00:11 < jessta> not indirection, just identification
00:11 < jessta> once you know what a node support you just use that
00:11 < leterip> its kinda annoying that the standard library decides to log
and theres no way for me to override that
00:12 < leterip> id really prefer not to have to store what nodes support
what.  thats a huge layer of complexity
00:12 < jessta> guessing what nodes support what seems like a bad idea
00:13 < leterip> yeah i understand the concern but i dont think its really a
big deal in this case
00:13 < leterip> i guess i could always make my own type and embed a
rpc.Server and override ServeCodec with some copy/paste to remove that log
00:13 -!- exch [~blbl@ip34-181-209-87.adsl2.static.versatel.nl] has quit [Ping
timeout: 276 seconds]
00:14 < str1ngs> leterip: the logging is annoying but without it they would
have to use something else to handle warnings
00:14 < leterip> str1ngs: yeah.  a flag would be nice considering you cant
programatically catch the warnings anyway
00:14 < leterip> or a logger you could pass in or something at least
00:15 < str1ngs> what you can do is use your ownlogger
00:15 < str1ngs> if you need to tweak the rpc logger you can call the log.
Methods
00:16 < knowmercy> is there a porting guide for go?
00:16 < leterip> the specific call is: log.Println("rpc:", err)
00:16 < leterip> i dont think i can silence that
00:16 < leterip> its the log package
00:16 < str1ngs> becuase you are using log also right?
00:16 < leterip> i make my own loggers
00:17 < leterip> so silencing the default logger in the log package would be
fine
00:17 < str1ngs> so something like log.SetOutput and use a /dev/null
io.writer
00:17 < leterip> ah!  i didnt see the SetOutput method
00:17 < str1ngs> that would squelch it in theory
00:17 < leterip> perfect.  thanks
00:18 < str1ngs> I have not tested this so let me know if it works :P
00:19 < str1ngs> also you will miss errors.  so you might want flag that
turns this on should you need to debug.
00:19 < leterip> yeah
00:19 < leterip> correct.
00:19 -!- ccc1 [~Adium@140.109.98.187] has joined #go-nuts
00:19 < str1ngs> or better yet.  right way to do this is to just have it log
to a file
00:19 < str1ngs> rpc.log or something
00:20 < leterip> yeah thats a good idea
00:20 < leterip> it didnt appear to work though.
00:20 < knowmercy> I need some help porting the pkg/runtime stuff
00:20 < str1ngs> knowmercy: what are you porting to?
00:20 < knowmercy> openbsd
00:21 < leterip> oh!  no im just dumb it might work
00:21 < leterip> works perfect.  thanks a ton str1ngs
00:21 < str1ngs> np
00:21 < str1ngs> knowmercy: is there not a port already?
00:22 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 252 seconds]
00:22 < knowmercy> not in tip
00:22 < str1ngs> how about the freebsd stuff ?
00:23 < str1ngs> anyways might be better to post to the google group.
encase someone is working on it already.
00:23 -!- niemeyer [~niemeyer@72-254-19-205.client.stsn.net] has quit [Ping
timeout: 240 seconds]
00:27 * knowmercy looks
00:27 < kevlar_work> knowmercy, yeah, search the group, there was talk about
it recently
00:27 < kevlar_work> I'm not sure if it was active work or preparatory work
or what
00:28 < kevlar_work> it should mostly be verifying the syscalls and swapping
out kqueue/epoll with the openbsd flavor, whatever it is.
00:28 < kevlar_work> (from what I understand of the process)
00:29 -!- mdxi [~mdxi@li11-97.members.linode.com] has joined #go-nuts
00:30 < knowmercy> well now there is another one!
00:30 -!- pearle [~pearle@blk-224-181-222.eastlink.ca] has quit [Quit: Leaving]
00:31 -!- pearle [~pearle@blk-224-181-222.eastlink.ca] has joined #go-nuts
00:31 < knowmercy> I've been watching the list pretty closely and nothing
has come through recently for openbsd
00:31 -!- sniper506th [~sniper506@rrcs-70-61-192-18.midsouth.biz.rr.com] has quit
[Quit: Leaving...]
00:32 < uriel> knowmercy: see the dev list
00:32 < uriel> at least some bits of net and os for OpenBSD have gone in
during the last couple of weeks
00:33 < knowmercy> :)
00:34 < knowmercy> maybe that's why my build went so smoothly
00:34 < knowmercy> yeah, I just replied to the one where andrew said there
wasn't a working port
00:40 -!- ancientlore [~ancientlo@ip68-110-238-176.dc.dc.cox.net] has joined
#go-nuts
00:45 -!- robteix [~robteix@host16.200-82-96.telecom.net.ar] has joined #go-nuts
00:53 < knowmercy> oh heh os: add support for openbsd (thanks Joel Sing).
in the weekly from yesterday!
00:56 -!- miker2 [~miker2@pool-96-245-224-59.phlapa.fios.verizon.net] has joined
#go-nuts
00:58 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts
01:00 -!- TheSeeker [riiight@99-153-250-110.lightspeed.irvnca.sbcglobal.net] has
quit [Ping timeout: 246 seconds]
01:00 -!- exch [~blbl@87.209.181.34] has joined #go-nuts
01:00 -!- TheSeeker [riiight@99-153-250-110.lightspeed.irvnca.sbcglobal.net] has
joined #go-nuts
01:09 -!- danilo04
[~danilo04@province-wireless-173-84-27-187.dr02.roch.ny.frontiernet.net] has
joined #go-nuts
01:10 -!- nicka1 [~nicka@blk-222-42-163.eastlink.ca] has joined #go-nuts
01:13 -!- dgnorton2 [~snorkel@rrcs-74-218-231-11.se.biz.rr.com] has quit []
01:16 -!- Kahvi [5b9b57fc@gateway/web/freenode/ip.91.155.87.252] has quit [Ping
timeout: 252 seconds]
01:18 -!- sniper506th [~sniper506@cpe-098-122-109-075.sc.res.rr.com] has joined
#go-nuts
01:21 -!- aat [~aat@cpe-72-225-174-173.nyc.res.rr.com] has joined #go-nuts
01:22 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has quit [Ping
timeout: 264 seconds]
01:23 -!- fhs [~fhs@pool-108-14-190-119.nycmny.east.verizon.net] has quit [Quit:
leaving]
01:24 -!- a2800276_ [~a2800276@vian.visitor.camp.ccc.de] has joined #go-nuts
01:28 -!- a2800276 [~a2800276@node-clrwtif73qmetxl.camp.ccc.de] has quit [Ping
timeout: 260 seconds]
01:28 -!- a2800276_ [~a2800276@vian.visitor.camp.ccc.de] has quit [Ping timeout:
240 seconds]
01:30 < chilts> knowmercy: that sucks -- but it's also good at the same, and
I bet you learnt a few things!  :)
01:32 -!- a2800276 [~a2800276@node-tgi.camp.ccc.de] has joined #go-nuts
01:34 < knowmercy> yup
01:37 -!- nicka [~nicka@unaffiliated/nicka] has quit [Ping timeout: 240 seconds]
01:46 -!- replore_ [~replore@ntkngw133234.kngw.nt.ftth.ppp.infoweb.ne.jp] has
joined #go-nuts
01:48 -!- nteon [~nteon@ool-4a58e438.dyn.optonline.net] has quit [Ping timeout:
240 seconds]
01:55 -!- hargettp [~hargettp@pool-71-184-177-187.bstnma.east.verizon.net] has
quit [Quit: Leaving...]
01:59 -!- kergoth [~kergoth@ip24-251-173-232.ph.ph.cox.net] has joined #go-nuts
02:00 -!- qeed [~qeed@adsl-98-85-46-108.mco.bellsouth.net] has quit [Quit:
Leaving]
02:04 -!- moraes [~moraes@189.103.188.201] has quit [Quit: Leaving]
02:04 -!- robteix [~robteix@host16.200-82-96.telecom.net.ar] has quit [Quit:
Leaving...]
02:04 < knowmercy> now the only thing that needs to happen is the sysctls
for openbsd
02:05 < knowmercy> s/sysctls/syscalls/
02:15 -!- miker2 [~miker2@pool-96-245-224-59.phlapa.fios.verizon.net] has quit
[Quit: Computer has gone to sleep.]
02:15 -!- aat [~aat@cpe-72-225-174-173.nyc.res.rr.com] has quit [Quit: Computer
has gone to sleep.]
02:23 -!- franciscosouza [~francisco@187.105.21.97] has quit [Read error:
Connection reset by peer]
02:29 -!- franciscosouza [~francisco@187.105.21.97] has joined #go-nuts
02:29 -!- a2800276 [~a2800276@node-tgi.camp.ccc.de] has quit [Quit: a2800276]
02:38 -!- replore_ [~replore@ntkngw133234.kngw.nt.ftth.ppp.infoweb.ne.jp] has quit
[Remote host closed the connection]
02:42 -!- russell_h [~russell_h@ash.osuosl.org] has quit [Ping timeout: 246
seconds]
02:43 -!- russell_h [~russell_h@ash.osuosl.org] has joined #go-nuts
02:43 -!- benjack [~benjack@bb220-255-251-77.singnet.com.sg] has joined #go-nuts
02:45 -!- TheSeeker [riiight@99-153-250-110.lightspeed.irvnca.sbcglobal.net] has
quit [Ping timeout: 246 seconds]
02:51 -!- TheSeeker [riiight@99-153-250-110.lightspeed.irvnca.sbcglobal.net] has
joined #go-nuts
02:52 -!- dublisk
[~dublisk@CPEc03f0ee1cc39-CM001947573208.cpe.net.cable.rogers.com] has joined
#go-nuts
02:59 -!- danilo04
[~danilo04@province-wireless-173-84-27-187.dr02.roch.ny.frontiernet.net] has quit
[Quit: Leaving]
03:00 -!- franciscosouza [~francisco@187.105.21.97] has quit [Read error:
Connection reset by peer]
03:00 -!- franciscosouza [~francisco@187.105.21.97] has joined #go-nuts
03:04 < dublisk> are there any math/statistical libraries for go ?
03:06 < f2f> http://golang.org/pkg/math/
03:06 < dublisk> I mean beside the standard built in one
03:06 < dublisk> like a GSL
03:06 < f2f> i think somebody was working on a third-party stats package,
but i haven't seen it announced
03:07 < f2f> https://bitbucket.org/fhs/go-gsl/src
03:11 -!- smw [~stephen@unaffiliated/smw] has quit [Ping timeout: 260 seconds]
03:13 < dublisk> You'd think that someone at google would have picked a
programming language that is easier to google than go
03:13 < dublisk> language name
03:15 < ancientlore> I usually google for "golang"
03:22 < chilts> yeah, golang wins for me too
03:29 -!- aat [~aat@cpe-72-225-174-173.nyc.res.rr.com] has joined #go-nuts
03:30 -!- franciscosouza [~francisco@187.105.21.97] has quit [Read error:
Connection reset by peer]
03:31 < jessta> dublisk: python is a snake, ruby is a gem
03:31 -!- franciscosouza [~francisco@187.105.21.97] has joined #go-nuts
03:32 < dublisk> ?
03:32 < jessta> dublisk: go isn't difficult to search for, it's just not
well associated with the programming language yet
03:34 < jessta> searching for "go programming" gives lots of Go related
results
03:34 < jessta> Java is a country and a brand of coffee.
03:35 -!- sniper506th [~sniper506@cpe-098-122-109-075.sc.res.rr.com] has quit
[Quit: Leaving...]
03:36 < dublisk> "Java plotting", "Python plotting", "ruby plotting", "go
plotting" <--- the last one will match Lots of programming languages because of
the use of the word go, such as " How would i go about making plots in C++ " ?
03:37 < dublisk> "go programming plotting library" first hit matches a c++
question for this reason
03:38 -!- pingveno [~pingveno@c-98-246-133-8.hsd1.or.comcast.net] has quit [Ping
timeout: 276 seconds]
03:39 -!- pingveno [~pingveno@c-98-246-133-8.hsd1.or.comcast.net] has joined
#go-nuts
03:39 -!- aat [~aat@cpe-72-225-174-173.nyc.res.rr.com] has quit [Quit: Computer
has gone to sleep.]
03:40 < Boney> what about golang?
03:41 -!- s|k [~bjorn@unaffiliated/sk/x-5968384] has joined #go-nuts
03:42 -!- s|k [~bjorn@unaffiliated/sk/x-5968384] has quit [Client Quit]
03:43 < jessta> dublisk: likely because it's yet to exist
03:43 -!- s|k [~bjorn@c-76-126-163-6.hsd1.ca.comcast.net] has joined #go-nuts
03:43 < jessta> and yet to have any reasonable number of incoming links
03:43 -!- kergoth_ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has joined #go-nuts
03:49 < skelterjohn> dublisk, f2f: gostat.googlecode.com
gomatrix.googlecode.com
03:49 < skelterjohn> though gostat is probably misnamed - it's just an
extended collection of distributions
03:49 < dublisk> thanks
03:49 -!- shoenig [~shoenig@bastion.sfo1.yelpcorp.com] has quit [Remote host
closed the connection]
03:49 < dublisk> Maybe go is the wrong choice, I was just considering
alternatives to R/python
03:50 < skelterjohn> my field is machine learning - i do all my
experimentation w/ go
03:50 < f2f> alternatives for what?
03:50 < skelterjohn> and the ML stuff is why i wrote gomatrix and gostat
03:50 < dublisk> various math/stat/data analysis
03:51 < skelterjohn> but for stats and data analysis you really can't beat R
03:51 < dublisk> R has tons of libraries, is interactive, awesome plots,
nice data frames, but as a language it is crap.
03:51 < skelterjohn> there is that
03:51 < dublisk> and looping is ridiculously slow
03:51 < dublisk> if you are unable to vectorize
03:52 < dublisk> I have experimented with python a bit which is certainly a
better language
03:52 < f2f> availability of libraries perhaps not, but the speed of
prototyping your own and "putting it out there" for other programs to use --
perhaps yes.
03:52 < skelterjohn> i tried python for my ML stuff once - it was too hard
to maintain
03:52 * f2f has written rudimentary first-order analysis tools for weather data in
go.
03:52 < skelterjohn> the code was too freeform
03:53 < skelterjohn> i started with go because of the google cache and
concurrency support - seemed useful
03:54 < skelterjohn> but i've stuck with it because i spend almost no time
writing code that doesn't matter
03:54 < skelterjohn> that is, boiler plate stuff, object hierarchies, header
files
03:54 -!- aat [~aat@cpe-72-225-174-173.nyc.res.rr.com] has joined #go-nuts
03:54 < dublisk> 'google cache' ?
03:54 < skelterjohn> cash-ay
03:54 < skelterjohn> caché
03:55 < dublisk> I stopped french after grade 9, you'll have to remind me
03:55 -!- benjack [~benjack@bb220-255-251-77.singnet.com.sg] has quit [Quit:
Leaving.]
03:56 < skelterjohn> the fact that it was google putting it out added some
authority and confidence
03:56 < skelterjohn> apparently in english we spell that word cachet
03:56 < skelterjohn> interesting
03:57 < dublisk> what kind of machine learning
03:58 < skelterjohn> reinforcement learning, but more relevantly bayesian
model inference
03:58 -!- dfr|mac [~dfr|work@ool-18baf7e7.dyn.optonline.net] has joined #go-nuts
03:58 < skelterjohn> (and how to apply it to RL)
03:58 < dublisk> academia or industry
03:59 < skelterjohn> academia
03:59 < skelterjohn> not much RL in industry
04:00 < cbeck> Except in spam detection and the like
04:00 < dublisk> whats a good introduction to RL
04:01 < skelterjohn> don't really see how to apply RL to spam detection
04:01 < skelterjohn> dublisk: depends on what level you're thinking
04:01 < skelterjohn> what's your background?
04:01 < dublisk> graduate level pure math and stats
04:01 < cbeck> I need to read better, nm
04:01 < skelterjohn> dublisk: any AI background?
04:02 < dublisk> the closest thing I've done is things with HMMs
04:02 < skelterjohn> there is this http://arxiv.org/pdf/cs.AI/9605103
04:02 < skelterjohn> HMMs have no decision making, so that's no good :)
04:02 < skelterjohn> michael littman is my advisor
04:03 < dublisk> is this sort of a genetic algo approach
04:03 < skelterjohn> it's a framework for certain kinds of problems
04:03 < skelterjohn> nothing about RL suggests a particular algorithm,
though some are certainly more popular than others
04:04 < skelterjohn> here is the book everyone has to have
http://150.185.222.161/~dfinol/NeuroCienciaCognitiva/ReinforcemenLearmning%20BOOK%20-%20F119696Bd01.pdf
04:04 < dublisk> thanks
04:04 < skelterjohn> alright, i'm off to bed
04:05 < skelterjohn> http://paul.rutgers.edu/~jasmuth/bayes/asmuth11.pdf
<- my latest paper, if you're interested
04:05 < skelterjohn> all the experimentation within was written in go
04:05 < skelterjohn> not that RL people care what language is used
04:06 < dublisk> I work in finance, I've dabbled with general machine
learning but in general have not found much success
04:07 -!- dfr|mac_ [~dfr|work@ool-18baf7e7.dyn.optonline.net] has joined #go-nuts
04:09 -!- dfr|mac [~dfr|work@ool-18baf7e7.dyn.optonline.net] has quit [Ping
timeout: 258 seconds]
04:10 -!- homa_rano [~ede@30-51-251.dynamic.csail.mit.edu] has quit [Ping timeout:
240 seconds]
04:10 -!- homa_rano [~ede@30-51-251.dynamic.csail.mit.edu] has joined #go-nuts
04:10 -!- franciscosouza [~francisco@187.105.21.97] has quit [Read error:
Connection reset by peer]
04:12 -!- franciscosouza [~francisco@187.105.21.97] has joined #go-nuts
04:15 -!- ancientlore [~ancientlo@ip68-110-238-176.dc.dc.cox.net] has quit [Quit:
~ Trillian Astra - www.trillian.im ~]
04:19 -!- shoenig [~shoenig@173-8-182-114-SFBA.hfc.comcastbusiness.net] has joined
#go-nuts
04:40 -!- dgnorton [~dgnorton@97.65.135.112] has quit [Read error: Connection
reset by peer]
04:41 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
04:45 -!- dfr|mac_ [~dfr|work@ool-18baf7e7.dyn.optonline.net] has quit [Remote
host closed the connection]
04:59 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has joined
#go-nuts
05:01 -!- dublisk
[~dublisk@CPEc03f0ee1cc39-CM001947573208.cpe.net.cable.rogers.com] has quit [Ping
timeout: 240 seconds]
05:01 -!- fabled [~fabled@83.145.235.194] has joined #go-nuts
05:13 -!- Guest1234 [~Pestilenc@95.87.216.153] has joined #go-nuts
05:20 -!- s|k [~bjorn@c-76-126-163-6.hsd1.ca.comcast.net] has quit [Changing host]
05:20 -!- s|k [~bjorn@unaffiliated/sk/x-5968384] has joined #go-nuts
05:21 -!- pearle [~pearle@blk-224-181-222.eastlink.ca] has quit [Ping timeout: 250
seconds]
05:26 -!- allengeorge [~allengeor@c-24-7-17-50.hsd1.ca.comcast.net] has quit
[Quit: allengeorge]
05:26 -!- angasule [~angasule@190.2.33.49] has quit [Remote host closed the
connection]
05:27 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts
05:29 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
05:38 -!- raylu [raylu@173-228-31-111.static.sonic.net] has quit [Quit: leaving]
05:46 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
05:52 -!- danilo04
[~danilo04@province-wireless-173-84-27-187.dr02.roch.ny.frontiernet.net] has
joined #go-nuts
05:52 -!- danilo04
[~danilo04@province-wireless-173-84-27-187.dr02.roch.ny.frontiernet.net] has quit
[Remote host closed the connection]
06:01 -!- raylu [raylu@173-228-31-111.static.sonic.net] has joined #go-nuts
06:04 -!- aat [~aat@cpe-72-225-174-173.nyc.res.rr.com] has quit [Quit: Computer
has gone to sleep.]
06:10 -!- kergoth_ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has quit [Ping
timeout: 250 seconds]
06:15 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
06:21 -!- Jamra [~Jamra@93-173-58-72.bb.netvision.net.il] has joined #go-nuts
06:23 -!- foxen [~foxen@212.12.18.237] has left #go-nuts []
06:24 -!- kevlar_work [~kevlar@unaffiliated/eko] has quit [Ping timeout: 264
seconds]
06:27 -!- Kumul [~Kumul@67.224.219.226] has quit [Quit: gone]
06:29 -!- Jamra_ [~Jamra@93-173-58-72.bb.netvision.net.il] has joined #go-nuts
06:30 -!- avelino [~avelino@unaffiliated/avelino] has quit [Remote host closed the
connection]
06:31 -!- Jamra [~Jamra@93-173-58-72.bb.netvision.net.il] has quit [Ping timeout:
250 seconds]
06:34 -!- Jamra_ [~Jamra@46-116-185-116.bb.netvision.net.il] has joined #go-nuts
06:36 -!- Jamra [~Jamra@93-173-58-72.bb.netvision.net.il] has quit [Ping timeout:
250 seconds]
06:36 -!- noodles775 [~michael@g225133231.adsl.alicedsl.de] has joined #go-nuts
06:36 -!- noodles775 [~michael@g225133231.adsl.alicedsl.de] has quit [Changing
host]
06:36 -!- noodles775 [~michael@canonical/launchpad/noodles775] has joined #go-nuts
06:40 -!- Jamra_ [~Jamra@93-173-142-9.bb.netvision.net.il] has joined #go-nuts
06:42 -!- Jamra [~Jamra@46-116-185-116.bb.netvision.net.il] has quit [Ping
timeout: 250 seconds]
06:44 -!- allengeorge [~allengeor@c-67-188-178-118.hsd1.ca.comcast.net] has joined
#go-nuts
06:49 -!- clr_ [~colin@97-112-204-183.frgo.qwest.net] has quit [Ping timeout: 240
seconds]
06:50 -!- Jamra_ [~Jamra@93-172-85-42.bb.netvision.net.il] has joined #go-nuts
06:51 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has quit [Ping
timeout: 250 seconds]
06:52 -!- Jamra [~Jamra@93-173-142-9.bb.netvision.net.il] has quit [Ping timeout:
250 seconds]
06:53 -!- fvbommel [~fvbommel_@86.86.15.250] has quit [Ping timeout: 264 seconds]
06:55 -!- Jamra [~Jamra@93-172-85-42.bb.netvision.net.il] has joined #go-nuts
06:56 -!- Jamra_ [~Jamra@93-172-85-42.bb.netvision.net.il] has quit [Ping timeout:
252 seconds]
07:09 -!- sebastianskejoe [~sebastian@563455dd.rev.stofanet.dk] has joined
#go-nuts
07:10 -!- alehorst [~alehorst@201.47.21.29.dynamic.adsl.gvt.net.br] has quit [Ping
timeout: 250 seconds]
07:11 -!- Jamra [~Jamra@93-172-85-42.bb.netvision.net.il] has quit [Ping timeout:
260 seconds]
07:13 -!- cbeck [cbeck@gateway/shell/pdx.edu/x-vxnizwpzbnzvuonm] has quit [Read
error: Connection reset by peer]
07:13 -!- cbeck [cbeck@gateway/shell/pdx.edu/x-zkuihljjjafahefv] has joined
#go-nuts
07:14 -!- Soak [~Mangano@92-89-15-217.reverse.alphalink.fr] has joined #go-nuts
07:17 -!- meling_ [~meling@134.81-167-41.customer.lyse.net] has quit [Remote host
closed the connection]
07:23 -!- photron [~photron@port-92-201-20-158.dynamic.qsc.de] has joined #go-nuts
07:23 -!- alehorst [~alehorst@201.47.13.221.dynamic.adsl.gvt.net.br] has joined
#go-nuts
07:26 -!- vmil86 [~vmil86@88.118.36.96] has joined #go-nuts
07:29 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 240 seconds]
07:36 -!- a2800276 [~a2800276@node-uy8.camp.ccc.de] has joined #go-nuts
07:42 -!- samuell [~samuel@student-244-206.eduroam.uu.se] has joined #go-nuts
07:45 -!- napsy [~luka@193.2.66.6] has joined #go-nuts
07:45 -!- meling [~meling@pico.ux.uis.no] has joined #go-nuts
07:50 -!- moraes [~moraes@189.103.188.201] has joined #go-nuts
07:54 -!- allengeorge [~allengeor@c-67-188-178-118.hsd1.ca.comcast.net] has quit
[Quit: allengeorge]
07:56 -!- Jamra [~Jamra@93-173-142-9.bb.netvision.net.il] has joined #go-nuts
08:00 -!- benjack [~benjack@bb220-255-251-77.singnet.com.sg] has joined #go-nuts
08:02 -!- a2800276 [~a2800276@node-uy8.camp.ccc.de] has quit [Quit: a2800276]
08:02 -!- Nisstyre [~nisstyre@infocalypse-net.info] has quit [Ping timeout: 264
seconds]
08:08 -!- s|k [~bjorn@unaffiliated/sk/x-5968384] has quit [Ping timeout: 260
seconds]
08:09 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
08:10 -!- Jamra_ [~Jamra@93-173-142-9.bb.netvision.net.il] has joined #go-nuts
08:12 -!- Jamra [~Jamra@93-173-142-9.bb.netvision.net.il] has quit [Ping timeout:
250 seconds]
08:21 -!- Nisstyre [~nisstyre@infocalypse-net.info] has joined #go-nuts
08:26 -!- wrtp [~rog@host-92-23-136-250.as13285.net] has joined #go-nuts
08:30 -!- Jamra_ [~Jamra@93-172-85-42.bb.netvision.net.il] has joined #go-nuts
08:30 -!- s|k [~bjorn@c-76-126-163-6.hsd1.ca.comcast.net] has joined #go-nuts
08:31 -!- Kahvi [5b9b57fc@gateway/web/freenode/ip.91.155.87.252] has joined
#go-nuts
08:32 -!- Jamra [~Jamra@93-173-142-9.bb.netvision.net.il] has quit [Ping timeout:
250 seconds]
08:33 -!- shoenig [~shoenig@173-8-182-114-SFBA.hfc.comcastbusiness.net] has quit
[Remote host closed the connection]
08:40 -!- Jamra_ [~Jamra@93-173-142-9.bb.netvision.net.il] has joined #go-nuts
08:40 -!- yogib [~yogib@131.234.59.64] has joined #go-nuts
08:42 -!- fvbommel [~fvbommel_@86.86.15.250] has joined #go-nuts
08:42 -!- Jamra [~Jamra@93-172-85-42.bb.netvision.net.il] has quit [Ping timeout:
250 seconds]
08:48 -!- samuell [~samuel@student-244-206.eduroam.uu.se] has quit [Ping timeout:
264 seconds]
08:50 -!- Jamra_ [~Jamra@212.143.214.77] has joined #go-nuts
08:50 -!- gobeginner [~nwood@cpc2-lee23-0-0-cust152.7-1.cable.virginmedia.com] has
joined #go-nuts
08:52 < hokapoka> mornin;
08:52 -!- Jamra [~Jamra@93-173-142-9.bb.netvision.net.il] has quit [Ping timeout:
250 seconds]
08:52 -!- ronnyy [~quassel@p4FF1C431.dip0.t-ipconnect.de] has joined #go-nuts
08:53 -!- Kahvi [5b9b57fc@gateway/web/freenode/ip.91.155.87.252] has quit [Ping
timeout: 252 seconds]
08:56 < gobeginner> Hi All
08:56 < gobeginner> Are writes to channels atomic?  specifically if two
goroutines running in separate os threads write to the same channel simultaneously
can the two messages become corrupted by being merged together?
08:56 < gobeginner> I expect channels prevent this corruption but I couldn't
find a bit of the language specification stating this.
08:56 < jessta> gobeginner: yes
08:56 < gobeginner> thanks
09:00 -!- Jamra_ [~Jamra@109-186-44-100.bb.netvision.net.il] has joined #go-nuts
09:02 -!- Jamra [~Jamra@212.143.214.77] has quit [Ping timeout: 250 seconds]
09:02 -!- samuell [~samuel@pc2-samuel.uppmax.uu.se] has joined #go-nuts
09:05 < wrtp> gobeginner: yeah, channels are fully thread safe - that's one
of the main reasons they exist
09:08 < hokapoka> It's been a while since I did, but IIRC the reverse is
true too.  That is if you have 2 Goroutines read from a chan only one of them will
receive the message.
09:10 < wrtp> hokapoka: that's still thread safe - it just means values
don't get arbitrarily duplicated
09:10 < hokapoka> yeah
09:11 -!- a2800276 [~a2800276@node-cp6.camp.ccc.de] has joined #go-nuts
09:11 < gobeginner> Could someone point me at an example of using the code
coverage tool please?
09:11 < wrtp> hokapoka: in fact given that a channels isn't associated with
a thread, i don't see how it could work otherwise
09:11 < wrtp> gobeginner: i've never used it, sorry
09:12 -!- Jamra_ [~Jamra@93-172-85-42.bb.netvision.net.il] has joined #go-nuts
09:12 < hokapoka> wrtp: ndeed,
09:14 -!- erus` [~chatzilla@mailgate.ips-international.com] has joined #go-nuts
09:14 -!- Jamra [~Jamra@109-186-44-100.bb.netvision.net.il] has quit [Ping
timeout: 250 seconds]
09:17 < hokapoka> I would like to spend a few hours looking at how the Go
Authors have implimented channels, not had a chance yet.  What's presented to us
is so simple you, well at least I, overlook what actually they are doing.
09:19 -!- samuell [~samuel@pc2-samuel.uppmax.uu.se] has quit [Ping timeout: 240
seconds]
09:20 -!- s|k [~bjorn@c-76-126-163-6.hsd1.ca.comcast.net] has quit [Ping timeout:
260 seconds]
09:22 -!- moraes [~moraes@189.103.188.201] has quit [Ping timeout: 276 seconds]
09:24 < zozoR> is go always compiled with debug flags?
09:27 < jessta> zozoR: I believe the compilers add debug information to all
binaries
09:28 -!- Jamra_ [~Jamra@212.143.214.77] has joined #go-nuts
09:30 -!- Jamra [~Jamra@93-172-85-42.bb.netvision.net.il] has quit [Ping timeout:
250 seconds]
09:30 < str1ngs> strip em :P
09:31 -!- Jamra [~Jamra@46-116-185-116.bb.netvision.net.il] has joined #go-nuts
09:31 -!- Argue [~Argue@112.201.133.68] has joined #go-nuts
09:33 -!- Jamra_ [~Jamra@212.143.214.77] has quit [Ping timeout: 250 seconds]
09:33 -!- Solak [~stijnw@cthia.xs4all.nl] has joined #go-nuts
09:34 -!- samuell [~samuel@nl119-201-142.student.uu.se] has joined #go-nuts
09:34 < xyproto> Hey, if you are going to implement linked lists, make sure
not to use additional pointers, as that might be patended soon:
http://www.google.com/patents?id=26aJAAAAEBAJ
09:34 < xyproto> *facepalm*
09:34 < gobeginner> surely there are several million examples of prior art
09:35 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
09:36 -!- ccc1 [~Adium@140.109.98.187] has quit [Quit: Leaving.]
09:39 < hokapoka> And you just know that the person reading the patient
request isn't going to understand the conecpt either.
09:43 < nsf> uhm, guys..  how does GOPATH work?
09:43 < nsf> is it like GOROOT?
09:43 < nsf> I mean
09:43 < nsf> $GOPATH/$GOOS_$GOARCH
09:43 < nsf> or something else?
09:44 < hokapoka> I've only used it with goinstall for install local
package,
09:44 < wrtp> nsf: each element of GOPATH is like a GOROOT
09:44 < nsf> sure, but where it installs them
09:44 < wrtp> well, has the same structure
09:44 < nsf> so
09:44 < nsf> even
09:45 < nsf> $GOPATH/pkg/$GOOS_$GOARCH
09:45 < nsf> then
09:45 < nsf> right?
09:45 < wrtp> nsf: read http://tip.goneat.org/cmd/goinstall/
09:45 < wrtp> in particular the section "The GOPATH Environment Variable"
09:46 < nsf> 'foo/bar' and installed as
'$GOPATH/pkg/$GOOS_$GOARCH/foo/bar.a'
09:46 < nsf> all I wanted to know
09:46 < nsf> thanks
09:46 < wrtp> hokapoka: yeah, it's worth having a look at
src/pkg/runtime/chan.c to get an idea for what's going on underneath
09:49 -!- virtualsue [~chatzilla@nat/cisco/x-qjhlcgznelqqpxld] has joined #go-nuts
09:49 -!- arun_ [~arun@unaffiliated/sindian] has quit [Ping timeout: 250 seconds]
09:50 -!- arun_ [~arun@unaffiliated/sindian] has joined #go-nuts
09:51 -!- Jamra_ [~Jamra@93-172-85-42.bb.netvision.net.il] has joined #go-nuts
09:51 -!- Argue_ [~Argue@112.201.133.68] has joined #go-nuts
09:53 -!- Jamra [~Jamra@46-116-185-116.bb.netvision.net.il] has quit [Ping
timeout: 250 seconds]
09:53 -!- s|k [~bjorn@c-76-126-163-6.hsd1.ca.comcast.net] has joined #go-nuts
09:53 < hokapoka> Yeah, I really didn't concider it until the other week.
I've been taking chan for granted, I should apprecate it a bit more me-thinks.
09:53 -!- Argue [~Argue@112.201.133.68] has quit [Ping timeout: 252 seconds]
09:59 -!- benjack [~benjack@bb220-255-251-77.singnet.com.sg] has quit [Quit:
Leaving.]
10:00 < nsf> for gocode users, I've implemented new package searching
scheme, according to this issue: https://github.com/nsf/gocode/issues/47
10:00 < nsf> but I haven't tested it
10:01 < nsf> if anyone is willing to do so, it would be nice
10:03 -!- hargettp [~hargettp@pool-71-184-177-187.bstnma.east.verizon.net] has
joined #go-nuts
10:06 -!- meling [~meling@pico.ux.uis.no] has quit [Remote host closed the
connection]
10:06 -!- meling [~meling@pico.ux.uis.no] has joined #go-nuts
10:07 < wrtp> hokapoka: chans are probably the most technically difficult
thing in all of Go
10:07 < wrtp> in particular getting select right
10:09 < hokapoka> wrtp: yes I was looking at how they were doing that.
10:09 -!- noodles775 [~michael@canonical/launchpad/noodles775] has quit [Read
error: Connection reset by peer]
10:10 < nsf> making them fast is also very hard :) there are different
efficient known algos for different cases: many senders - one receiver, many
senders - many receivers, one sender - many receivers
10:10 < hokapoka> nsf: I just installed and tested against local packages
installed in GOPATH and it's finding them.
10:10 < nsf> hokapoka: good :)
10:10 < nsf> I'm mostly concerned about IDEs (goeclipse)
10:10 < nsf> I know they use lib-path a lot
10:10 < nsf> for something
10:12 < hokapoka> I've only used it in vim
10:12 < nsf> anyway, thanks..  I'll close the issue
10:13 < hokapoka> I recall installing it many moons ago, prolly >12
months, but didn't get on with it.  Now I've installed it I might stick with it.
10:13 < nsf> gocode?  goclipse?
10:13 -!- Jamra_ [~Jamra@93-172-85-42.bb.netvision.net.il] has joined #go-nuts
10:13 < hokapoka> gocode in vim
10:13 < nsf> ah
10:13 < nsf> it's nice I guess
10:14 -!- noodles775 [~michael@canonical/launchpad/noodles775] has joined #go-nuts
10:14 < nsf> I mostly use ccode (its brother for C/C++, based on clang)
10:14 < nsf> it's much slower though
10:14 < nsf> but helps :D
10:15 -!- Jamra [~Jamra@93-172-85-42.bb.netvision.net.il] has quit [Ping timeout:
250 seconds]
10:17 < wrtp> nsf: in go it's even harder because it's very hard to know
which of those cases is happening
10:17 < nsf> wrtp: that's what I meant
10:18 < nsf> I think it is possible to do at runtime though
10:18 < wrtp> interprocedural escape analysis could help
10:18 < nsf> partially or fully
10:18 < nsf> wrtp: a bit, you need to know how many goroutines are running
and such
10:18 < nsf> well, scheduler knows that
10:18 < nsf> and it should be responsible for choosing the algo
10:19 < wrtp> nsf: not in quite a few cases - if you can determine that a
channel doesn't escape, then you know it's only used in one goroutine
10:19 < nsf> channel is used in one goroutine?
10:19 < nsf> I mean, their purpose is communication between goroutines
10:19 < nsf> :D
10:19 < nsf> at least two
10:19 < nsf> two is the case most likely where there is only one sender and
one receiver
10:20 < nsf> it's quite easy to implement without blocking
10:20 < nsf> but, testing is hard
10:21 < wrtp> the point is if you know a channel doesn't escape, then you
know that the set of channel operations in that thread is all there is.
10:21 < nsf> well, true
10:21 < wrtp> (for one end of the channel)
10:21 < wrtp> which can help determine one-to-one, or one-to-many etc
10:22 < wrtp> it's not about how many goroutines are around, it's about how
many goroutines do what with the channel
10:22 < nsf> yes
10:23 < nsf> that kind of analysis is very hard anyway, I wouldn't do it
10:23 < wrtp> i don't know anything about the various algorithms, but i
imagine that the efficient algorithms take advantage of statically known
guarantees about number of senders and receivers - if you only know that at run
time, then it's likely that the more specific algs aren't applicable
10:24 < wrtp> (because, for instance, they don't have locks in the right
place)
10:24 < nsf> personally I think it's much easier to add an ability to give
hints to a channel
10:24 < wrtp> there already is...
10:24 < nsf> and then check these conditions at runtime
10:24 < nsf> something like make(chan int, _, ONE_TO_ONE)
10:24 < nsf> or something
10:25 < nsf> it's easy to check, when there is ONE on sender or receiver
side, you just have to attach a goroutine to that channel
10:25 < wrtp> yeah, but that assumes that the efficient algorithm will work
(or be escapable) when used many-to-many
10:25 < nsf> and make sure it's the only goroutine who does an operation
10:26 < wrtp> but that's not sufficient
10:26 < wrtp> be
10:26 < nsf> is it?
10:26 < wrtp> because it's fine to hand off a channel to another goroutine
and it still be one-to-one
10:26 < wrtp> as long as the original goroutine does nothing with the
channel
10:27 < nsf> another big question: are these optimizations worth the pain?
10:27 < wrtp> that is indeed a big question
10:27 < wrtp> depends on the possible efficiency gains
10:27 -!- Jamra [~Jamra@93-172-85-42.bb.netvision.net.il] has quit [Quit: Jamra]
10:27 -!- gobeginner [~nwood@cpc2-lee23-0-0-cust152.7-1.cable.virginmedia.com] has
quit [Ping timeout: 250 seconds]
10:27 < wrtp> and you've got to think about how all the algs interact with
select too
10:27 < nsf> sure
10:28 < nsf> offtopic: http://armorgames.com/play/12198/scuba <-
minecraft clone on flash, finally, lol
10:28 < nsf> :D
10:28 < nsf> or more like terraria clone
10:29 -!- Soak [~Mangano@92-89-15-217.reverse.alphalink.fr] has quit [Quit: I mine
on BitMinter.com]
10:30 < nsf> wrtp: but as you know, I'm not a big fan of goroutines and
channels in general
10:30 * wrtp has never played minecraft or terraria
10:30 < wrtp> nsf: i do :-)
10:30 < wrtp> nsf: perhaps you would be more of a fan if you were doing more
network-oriented programming
10:30 < nsf> I guess
10:31 < wrtp> i think that's where they come into their own
10:32 < wrtp> nsf: got any references for those different algs BTW?
10:32 < nsf> nope
10:32 < nsf> well, there is an article by this guy from microsoft
10:32 < nsf> wait, I'll try to find it
10:33 < nsf> the guy is Herb Sutter
10:34 < nsf> http://drdobbs.com/high-performance-computing/210604448?pgno=1
10:34 < nsf> but the article is about lockfree algo for one producer, one
consumer
10:35 -!- ronnyy [~quassel@p4FF1C431.dip0.t-ipconnect.de] has quit [Remote host
closed the connection]
10:35 < nsf> http://drdobbs.com/cpp/210604448
10:35 < nsf> that one is interesting too
10:36 < nsf> oops, wait, it's the same one
10:36 < nsf> :D
10:36 -!- Jamra [~Jamra@46-116-185-116.bb.netvision.net.il] has joined #go-nuts
10:37 -!- nekoh [~nekoh@dslb-188-107-174-060.pools.arcor-ip.net] has joined
#go-nuts
10:37 < nsf> anyways, if you google for it, it's clear that there are
different efficient algorithm for different kinds of async queues
10:38 < nsf> algorithms*
10:38 < nsf> however
10:38 < nsf> lockless programming is very hard to get right
10:38 < nsf> and the question if it has more benefits than drawbacks
10:38 < nsf> is open
10:40 < wrtp> sure.  i thought dmitry's web site was interesting
10:40 < wrtp> on that issue
10:41 < nsf> and well, there are other issues about performance on SMP
machines
10:41 < nsf> CPUs still share the same memory
10:41 < wrtp> ish :-)
10:41 -!- hargettp [~hargettp@pool-71-184-177-187.bstnma.east.verizon.net] has
quit [Quit: Leaving...]
10:41 < nsf> I remember one of the Herb's (again) talks
10:41 < nsf> where he was showing a demo program
10:42 -!- hargettp [~hargettp@pool-71-184-177-187.bstnma.east.verizon.net] has
joined #go-nuts
10:42 < nsf> where by adding simply an offset between data processing
buffers for different threads the speed up was tremendous
10:42 < wrtp> that drdobbs link is about a queue, whereas chans are often
not queues
10:43 < nsf> wrtp: uhm, what are they then?
10:43 < wrtp> in fact they're never queues, they're ring buffers
10:43 < wrtp> in that article the producer can never block AFAICS
10:43 < nsf> ring buffer is a FIFO data structure as well
10:44 < nsf> I think that article describes ring buffers as well :D
10:44 < wrtp> sure it's FIFO but the behaviour is different
10:44 -!- Argue_ [~Argue@112.201.133.68] has quit [Quit: Leaving]
10:44 < nsf> ah, no
10:44 < nsf> it's about lists
10:44 < wrtp> indeed
10:45 < nsf> I don't like lists
10:45 < nsf> I've seen a similar article about ring buffers afair
10:45 < wrtp> lists can be great
10:46 < wrtp> (particularly when they share structure)
10:46 < nsf> well, anyway, this lockless high performance stuff is for guys
with beards
10:47 < nsf> I use GAsyncQueue in my C stuff
10:47 < nsf> and I'm happy with it :D
10:47 < wrtp> indeed.  i'll just use chans...
10:47 -!- bobbysworld [~bobbyswor@99-20-88-178.lightspeed.austtx.sbcglobal.net]
has joined #go-nuts
10:47 < wrtp> or sync.Mutex etc
10:49 -!- a2800276 [~a2800276@node-cp6.camp.ccc.de] has quit [Quit: a2800276]
10:50 -!- noam [~noam@87.69.42.61.cable.012.net.il] has quit [Ping timeout: 252
seconds]
10:51 -!- Jamra_ [~Jamra@93-173-58-72.bb.netvision.net.il] has joined #go-nuts
10:53 < nsf>
http://chrome.blogspot.com/2011/08/building-better-web-apps-with-new.html
10:53 < nsf> interesting
10:53 -!- Jamra [~Jamra@46-116-185-116.bb.netvision.net.il] has quit [Ping
timeout: 250 seconds]
10:53 < nsf> I think it's getting stable
10:54 -!- noam [~noam@87.69.42.61.cable.012.net.il] has joined #go-nuts
10:55 -!- Jamra [~Jamra@212.143.214.77] has joined #go-nuts
10:57 -!- Jamra_ [~Jamra@93-173-58-72.bb.netvision.net.il] has quit [Ping timeout:
250 seconds]
10:57 -!- GeertJohan [~Squarc@clal-5-212.eduroam.inholland.nl] has joined #go-nuts
11:09 -!- Jamra_ [~Jamra@109-186-44-100.bb.netvision.net.il] has joined #go-nuts
11:11 -!- Jamra [~Jamra@212.143.214.77] has quit [Ping timeout: 250 seconds]
11:21 -!- dublisk
[~dublisk@CPEc03f0ee1cc39-CM001947573208.cpe.net.cable.rogers.com] has joined
#go-nuts
11:22 -!- Jamra [~Jamra@109-186-44-100.bb.netvision.net.il] has quit [Quit: Jamra]
11:26 -!- odoacre [~antonio@218.241.169.34] has quit [Quit: Leaving]
11:28 -!- hargettp [~hargettp@pool-71-184-177-187.bstnma.east.verizon.net] has
quit [Quit: Leaving...]
11:39 -!- tncardoso [~thiago@187.59.187.239] has joined #go-nuts
11:40 < skelterjohn> nsf: regarding $GOPATH - it's a : or ; (for windows)
separated list of directories
11:40 < skelterjohn> not just one directory, so $GOPATH/pkg/etc won't always
make sense
11:41 < nsf> skelterjohn: uhm..  is it?
11:41 < nsf> but what for?
11:41 < nsf> it's used in goinstall right?
11:41 < nsf> how will it choose which one to use?
11:41 < skelterjohn> goinstall puts stuff in the first GOPATH entry, unless
you're running it from one of the others
11:41 < nsf> :\
11:41 < skelterjohn> it's so you can use goinstall to do local building
11:41 < skelterjohn> you just add the current workspace to GOPATH and use it
11:42 < nsf> ...
11:42 < nsf> horrible shit
11:42 < nsf> I must say
11:42 < nsf> :D
11:42 < skelterjohn> i don't like using env vars that way either
11:42 < nsf> I'll reread docs then
11:42 < skelterjohn> but i see nothing wrong about having multiple binary
sites
11:42 < nsf> ok, will try to fix it later
11:43 < nsf> most people use single GOPATH anyway, so..  it will work for
some :)
11:43 < nsf> for now
11:45 < skelterjohn> probably, yes
11:48 < zozoR> nsf is back, yay :D
11:49 < nsf> zozoR: I wasn't gone
11:49 < nsf> I'm here all the time, but rarely on #go-nuts
11:50 < nsf> irc is a big distraction to me, you see, I'm a troll :D
sometimes I cannot resist to say something and start a pointless discussion
11:50 < nsf> :D
11:54 < zozoR> but being on #go-nuts is very important :o
11:55 < zozoR> we need pointless discussions
11:56 < zozoR> nsf, have you tried doing an empty for loop in C and go and
find out who is faster?  :D
11:56 < zozoR> go took 0.7s to count to 1e9 and c (optimized) took 1.3 :D
11:57 -!- tvw [~tv@212.79.9.150] has joined #go-nuts
11:58 -!- replore [~replore@ntkngw133234.kngw.nt.ftth.ppp.infoweb.ne.jp] has
joined #go-nuts
11:58 -!- sacho [~sacho@90.154.219.54] has joined #go-nuts
11:59 < nsf> no, I haven't
11:59 < nsf> but
11:59 < nsf> I wrote a simple perlin noise generator benchmark
11:59 < nsf> Go: http://pastie.org/2360789
12:00 -!- miker2 [~miker2@64.55.31.190] has joined #go-nuts
12:00 < nsf> C: http://pastie.org/2360790
12:00 < nsf> D: http://pastie.org/2360793
12:01 < nsf> Python:
12:01 < nsf> http://pastie.org/2360796
12:01 < nsf> guess who's the fastest?  :)
12:01 < zozoR> python?  :D
12:02 < nsf> hehe
12:02 < nsf> sadly, no
12:02 < nsf> I can't remember exact timings
12:02 < zozoR> C then : |
12:02 < nsf> but something like that:
12:03 < nsf> C: 0.4s, D: 1.2s, Go: 3.0s, PyPy: 12s, CPython: > 2 minutes
12:03 < zozoR> now i wonder
12:03 < zozoR> when you have nested for loops in go
12:04 < zozoR> isnt it inefficient to do := at all the initializers?
12:04 < leterip> i dont think theres any runtime overhead
12:04 < nsf> zozoR: most languages allocate stack space once
12:04 < leterip> doesn't the compiler just look at the expression and derive
the type?
12:04 < nsf> for all the branches and variables
12:04 < nsf> on the function entry
12:04 < nsf> point
12:04 < zozoR> suppose so ''
12:11 -!- nicka [~nicka@142.176.0.21] has joined #go-nuts
12:11 -!- nicka [~nicka@142.176.0.21] has quit [Changing host]
12:11 -!- nicka [~nicka@unaffiliated/nicka] has joined #go-nuts
12:12 -!- nekoh [~nekoh@dslb-188-107-174-060.pools.arcor-ip.net] has quit [Ping
timeout: 240 seconds]
12:13 -!- Boney [~paul@124.168.124.201] has quit [Quit: Reconnecting]
12:13 -!- Boney [~paul@124.168.124.201] has joined #go-nuts
12:13 -!- f2f [~testing@glenda.cpsc.ucalgary.ca] has quit [Ping timeout: 258
seconds]
12:14 -!- Boney [~paul@124.168.124.201] has quit [Client Quit]
12:15 -!- Boney [~paul@124.168.124.201] has joined #go-nuts
12:15 -!- f2f [~testing@glenda.cpsc.ucalgary.ca] has joined #go-nuts
12:17 -!- dublisk
[~dublisk@CPEc03f0ee1cc39-CM001947573208.cpe.net.cable.rogers.com] has quit [Ping
timeout: 246 seconds]
12:23 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has joined
#go-nuts
12:24 -!- franciscosouza [~francisco@187.105.21.97] has quit [Quit:
franciscosouza]
12:25 -!- Boney_ [~paul@124.168.124.201] has joined #go-nuts
12:25 -!- bobbysworld [~bobbyswor@99-20-88-178.lightspeed.austtx.sbcglobal.net]
has quit [Ping timeout: 258 seconds]
12:27 -!- kamaji [~kamaji@handtomouse.demon.co.uk] has quit [Read error:
Connection reset by peer]
12:30 -!- bobbysworld [~bobbyswor@99-20-88-178.lightspeed.austtx.sbcglobal.net]
has joined #go-nuts
12:32 -!- kamaji [~kamaji@handtomouse.demon.co.uk] has joined #go-nuts
12:35 -!- dgnorton [~dgnorton@97.65.135.112] has joined #go-nuts
12:36 -!- GeertJohan [~Squarc@clal-5-212.eduroam.inholland.nl] has quit [Ping
timeout: 276 seconds]
12:39 -!- knowmerc1 [~knowmercy@mobile-198-228-226-060.mycingular.net] has joined
#go-nuts
12:39 < knowmerc1> morning
12:40 -!- nekoh [~nekoh@dslb-178-004-065-099.pools.arcor-ip.net] has joined
#go-nuts
12:42 < knowmerc1> so I updated to the weekly last night and started the
build and things got a lot further than when I was starting my port to openbsd
12:43 < knowmerc1> unfortunately I don't have access to my openbsd box on my
20% day :/
12:43 < jnwhiteh> aww
12:43 < nicka> how many of you are googlers?
12:44 -!- moraes [~moraes@189.103.188.201] has joined #go-nuts
12:47 -!- franciscosouza [~francisco@201.7.186.67] has joined #go-nuts
12:48 < wrtp> no i
12:48 < wrtp> not i
12:50 < knowmerc1> me either
12:50 < nicka> oh, you just work for a different company with cool policies
12:50 < knowmerc1> Hey, the syscalls just went in
12:51 < knowmerc1> 4798060
12:51 < knowmerc1> Yay!
12:57 -!- robteix [~robteix@ec2-174-129-247-164.compute-1.amazonaws.com] has
joined #go-nuts
12:59 -!- ronnyy [~quassel@p4FF1C431.dip0.t-ipconnect.de] has joined #go-nuts
13:02 -!- Boney [~paul@124.168.124.201] has quit [Quit: leaving]
13:06 -!- napsy [~luka@193.2.66.6] has quit [Ping timeout: 260 seconds]
13:12 < xyproto> nicka: I search with google nearly daily.  That makes me a
googler.
13:12 < xyproto> nicka: Though the allure from duckduckgo.com is strong
13:13 < knowmerc1> Google called me one time about a job
13:13 < knowmerc1> then after a few interviews said I wasn't a strong enough
fit for what they wanted
13:13 < knowmerc1> it was still fun
13:15 < moraes> duckduckgolang
13:19 < moraes> go is lovely.  i officially approve it.
13:19 < moraes> rob pike mention in a talk that something is coming to
replace makefiles.  is it?
13:20 < wrtp> moraes: goinstall will be renamed to gomake at some point
13:20 < wrtp> moraes: i don't know if it will replace makefiles entirely
though
13:20 < moraes> ok
13:21 < wrtp> in particular it might easily not replace code which requires
the code itself to be run as a pre-processor
13:21 < wrtp> i think the idea is that you can use gomake/goinstall without
worrying about security issues until you actually start to use it
13:22 < wrtp> whereas makefiles can, as we know, delete lots of files if
they choose to
13:22 < wrtp> moraes: PS glad you like go.
13:22 < moraes> :)
13:22 < moraes> i'm finally getting somewhere.  i'm alow learner.
13:22 < moraes> *slow
13:24 < wrtp> go takes quite a bit of learning, like any language.  the
basics are simple, but being able to write good, idiomatic code takes a while
13:24 < wrtp> in particular getting to grips with everything provided by the
standard library
13:25 < wrtp> it helps that all the source code is instantly accessible and
easy to navigate, i think
13:25 < exch> I hate that with every knew language.  Being dropped in the
middle of 9000 libraries and not knowing where to look for what
13:26 < nsf> exch: I have more problems with quality of the libraries
13:27 < nsf> it's hard to find a really good library these days
13:27 < nsf> Go is very lucky with that issue
13:27 < nsf> standard library has high quality
13:28 < exch> Except the bits that don't.  But those are being revamped and
fixed on an ongoing basis
13:28 < nsf> relatively to other libraries, it has high quality
13:29 < nsf> lately I'm playing with all sorts of "languages that no one
uses"
13:29 < nsf> and stuff like that
13:29 < nsf> seriously, Go has a very good library :)
13:30 -!- Kahvi [559ce99a@gateway/web/freenode/ip.85.156.233.154] has joined
#go-nuts
13:30 < erus`> haskell has a good library too
13:34 -!- ccc1 [~Adium@118-166-215-203.dynamic.hinet.net] has joined #go-nuts
13:36 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
13:36 < wrtp> without its library Go would be of only academic interest
13:36 < nsf> true
13:37 < wrtp> with Go, the particularly nice thing is that the language
design promotes the creation of packages that are independently understandable
13:37 < nsf> hehe, btw, it's possible to implement Go's interfaces in D 2.0
13:37 < nsf> but the problem is that dmd compiler has few runtime reflection
features which are not implemented
13:37 < nsf> yet
13:37 < nsf> I tried recently :D
13:38 < wrtp> so you don't have to understand 100 other things before
understanding the thing you're after
13:38 < wrtp> nsf: what new feature enables that?
13:38 < wrtp> (go-style interfaces, that is)
13:38 < nsf> well you have to inspect what methods a class/struct has
13:38 < nsf> in runtime
13:38 < nsf> at*
13:39 -!- sniper506th [~sniper506@rrcs-70-61-192-18.midsouth.biz.rr.com] has
joined #go-nuts
13:39 < nsf> when one interface is being casted to another interface
13:39 < nsf> it's a very dynamic process
13:39 < nsf> currently it's only possible to implement static Go interfaces
in D
13:40 < wrtp> you also have to do it very quickly, otherwise it's not very
useful
13:40 < nsf> wrtp: that's an implementation detail
13:40 < nsf> of course it matters
13:40 < wrtp> you also have to keep the old type around
13:40 < wrtp> can you do that?
13:40 < nsf> uhm
13:41 < nsf> but you're not replacing anything
13:41 < nsf> or what do you mean?
13:41 < wrtp> i mean that an interface has both a static and a dynamic type
13:41 < nsf> sure
13:41 < wrtp> and that when you cast a type to an interface, the underlying
type remains
13:41 < nsf> but interface has a pointer to its data
13:41 < nsf> that data has associated RTTI
13:42 < nsf> wrtp: yes
13:42 < nsf> you simply investigate that real RTTI
13:42 < nsf> for necessary methods
13:42 < nsf> and build vtable
13:42 < nsf> if it's not in cache already
13:43 < nsf> it's not a hard feature to implement
13:43 < moraes> the -er convention for interfaces is cute at first.  but
some words are hard to be er-ded.
13:43 < moraes> (side note)
13:43 -!- Dr_Who [~tgall_foo@linaro/tgall-foo] has joined #go-nuts
13:43 < wrtp> moraes: yes, and there are some counter-examples in the std
library
13:43 < nsf> and someday, when D will be capable of doing that, I'm going to
try :D
13:43 < wrtp> moraes: e.g.  ReaderFrom rather than ReadFromer
13:44 < moraes> ReadFromer looks awful
13:44 < wrtp> yeah - hence they didn't use that
13:45 < wrtp> nsf: even if it's capable of doing it, hardly anyone will.
interfaces become useful only when they're ubiquitous.
13:45 < wrtp> eg.  io.Writer
13:45 < nsf> wrtp: then I will try to make a IO library
13:45 < nsf> why not :D
13:45 < nsf> or should I say: then I will try to port Go's library to D
13:45 < nsf> :D
13:46 < wrtp> nsf: it would be interesting to see...
13:46 < nsf> indeed
13:46 < nsf> although I must say
13:46 < wrtp> moraes: i've currently got a dilemma over how to name an
interface for that reason
13:46 < nsf> that IO library without multiple return values is hard to
design
13:47 < nsf> where Reader and Writer both use that feature
13:47 < wrtp> doesn't D have multiple return values?
13:47 < nsf> no
13:47 < wrtp> yeuch
13:47 < moraes> wrtp, i have a Router.  the interface has to be Routerer :P
13:47 < wrtp> moraes: i have an interface which allows creation of a new
Converter...  what should the interface be called?
13:48 < moraes> Converterer
13:48 < wrtp> no
13:48 < wrtp> :-)
13:48 < moraes> this convention is lame
13:48 < wrtp> working name is Conversions
13:48 < wrtp> moraes: got a better suggestion?
13:48 < moraes> ConverterMaker
13:49 < moraes> no, i don't
13:49 < moraes> the java convention results in ugly names too - IConverter
13:49 -!- shoenig [~shoenig@173-8-182-114-SFBA.hfc.comcastbusiness.net] has joined
#go-nuts
13:50 < wrtp> actually that could work.  then it would be type
ConverterMaker interface {MakeConverter() Converter}
13:50 < nsf> ConverterSource, ConverterFactory (don't throw rocks at me)
13:50 < nsf> ?
13:50 < nsf> :)
13:50 < moraes> I prefer a prefix but not very idiomatic because go tends to
reduce names - ConverterInterface
13:50 < moraes> *sufix
13:51 < wrtp> i prefer it when the interface type name reflects the name of
its method (for one-method interfaces)
13:52 < wrtp> moraes: what does your "Routerer" interface do?
13:52 < moraes> it matches and builds urls according to registered "routes"
13:53 < moraes> register(route)/match(url)/build(route_name)
13:54 -!- kergoth_ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has joined #go-nuts
13:54 < moraes> this is my learning project :)
13:54 < aiju> 15:50 < nsf> ConverterSource, ConverterFactory (don't
throw rocks at me)
13:55 * aiju launches an ICBM
13:55 < aiju>
ConverterGenericJSONFrameworkbasedGeneralpurposeorientedSolution!
13:55 < nicka> You need an IcbmFactory
13:55 < aiju> i just do new(ICBM)
13:55 < moraes> FactoryFactories are awesome
13:56 < nicka>
http://static.springsource.org/spring/docs/2.5.x/api/org/springframework/aop/framework/AbstractSingletonProxyFactoryBean.html
13:56 < moraes> boolean
doesShorterNameExistThatEquallyConvaysTheBehaviorOfTheMethod(String s) should be
refactored to boolean isTooLong(String s)
13:57 < moraes> ^heh, from stack overflow
13:57 < aiju> boolean shitsucks(String s)
13:57 < nsf> :D
13:57 < nsf> you're laughing, but I've seen names like that in real code
13:57 < nsf> :D
13:58 -!- meling [~meling@pico.ux.uis.no] has quit [Remote host closed the
connection]
13:58 < aiju> me too
13:58 < aiju> that's what makes it funny
13:58 < nsf> :(
13:58 < nsf> or sad
13:58 < knowmerc1> I name all my methods like that
13:58 < aiju> the 9front bullshit generator sometimes spits out real IBM
products
13:59 -!- ronnyy [~quassel@p4FF1C431.dip0.t-ipconnect.de] has quit [Remote host
closed the connection]
13:59 < knowmerc1> We have weeks of meetings about variable names and stuff
so I write all my documentation in my method names
13:59 < aiju> my variables are at most three bytes long
13:59 < aiju> *variable names
14:00 < aiju> and this is because of long UTF-8 encodings
14:00 < aiju> int 卐;
14:00 < knowmerc1> findUserNameByAccountIdBecauseUsernamesAreNotUnique()
14:00 < aiju> NotNecessarilyUnique!
14:00 < knowmerc1> that's the overloaded method
14:01 -!- fabled [~fabled@83.145.235.194] has quit [Quit: Ex-Chat]
14:01 < aiju> i'd call that one getname()
14:01 < knowmerc1>
resolveAccountOnlyCallThisDuringInitialAccountUseAndAddItToSessionConfig()
14:01 < aiju> setupshit()
14:02 < knowmerc1> Anyhow, time to write more go
14:02 -!- gridaphobe [~gridaphob@cpe-74-68-151-24.nyc.res.rr.com] has joined
#go-nuts
14:02 < knowmerc1> aiju: I'd agree with you if I wasn't getting payed to
spite people who waste time on meaningless variable name standardization
14:02 < aiju> switch jobs
14:02 < knowmerc1> in my home life my variables are short
14:02 < knowmerc1> I just did
14:02 < aiju> e.g.  enter prostitution
14:02 < aiju> or sell crack
14:03 < knowmerc1> if they don't heed my advice to dump .NET I'll change
again :)
14:03 < knowmerc1> I'd rather sell go than crack :)
14:03 < wrtp> moraes: i'd've thought that "Router" would be a fine name for
your interface
14:04 < wrtp> the "er" convention is only desirable for interfaces with a
single method
14:04 < aiju> the Go compiler should limit variable names to 8 characters
14:04 < aiju> that would solve all these problems
14:05 -!- nteon [~nteon@ool-4a58e438.dyn.optonline.net] has joined #go-nuts
14:06 < wrtp> moraes: and the other question i'd have is: is it necessary
that there's an interface, or would a normal type do?
14:07 < moraes> wrtp, re: "Router".  probably, i have to mess around.  and i
want it to be an interface, yes, because i have other plans.
14:08 < wrtp> moraes: it's often good to design the concrete type first and
then make an interface later based on what you've arrived at.
14:08 < wrtp> at least that's what i've found
14:09 -!- mytrile [~mitko@77.70.29.148] has joined #go-nuts
14:09 < moraes> well i have the concrete now, so i'm now moving it to
interface.
14:10 < moraes> i'm at the 2nd stage
14:10 < moraes> :)
14:11 -!- knowmerc1 [~knowmercy@mobile-198-228-226-060.mycingular.net] has quit
[Ping timeout: 240 seconds]
14:11 < moraes> my plan is to make a collection of web-related pocket
libraries.  codename pocket.go.
14:12 < aiju> may i suggest the change s/web/icbm/?
14:12 < moraes> i don't even know what is icbm :P
14:13 < aiju> inter-continental ballistic missile
14:13 < moraes> that is for ada, not go
14:13 -!- sacho [~sacho@90.154.219.54] has quit [Ping timeout: 258 seconds]
14:14 -!- a2800276 [~a2800276@node-vb9.camp.ccc.de] has joined #go-nuts
14:15 < skelterjohn> what's a pocket library
14:15 < moraes> it is a library with a cute name
14:15 < aiju> if you print it on punch tape, it fits in your pocket
14:15 < aiju> unlike e.g.  BOOST
14:15 < moraes> haha
14:15 < moraes> thats hilarious
14:15 < skelterjohn> if you can fit a hard drive in your pocket, boost can
go in your pocket
14:15 < aiju> skelterjohn: i said punch tape
14:16 < skelterjohn> and i said hard drive
14:16 -!- niemeyer [~niemeyer@72-254-49-196.client.stsn.net] has joined #go-nuts
14:17 -!- dfr|mac [~dfr|work@ool-18baf7e7.dyn.optonline.net] has joined #go-nuts
14:17 < dgnorton> aiju: you just need to print BOOST in a smaller font
14:18 < nsf> I think there should be more "standard" libraries
14:18 < nsf> why people don't create more?
14:18 < dgnorton> nsf: http://xkcd.com/927/
14:18 < nsf> sure, but competition is good
14:18 < nsf> :D
14:19 < moraes> nsf, what exactly do you mean?  standard as in 'go standard
package'?
14:19 < nsf> no
14:19 < nsf> as a collection of basic libraries
14:19 < nsf> like, IO formatting logging and alike
14:19 -!- mytrile [~mitko@77.70.29.148] has quit [Quit: Leaving.]
14:20 -!- mytrile [~mitko@77.70.29.148] has joined #go-nuts
14:20 < aiju> "IO formatting logging"?
14:20 < aiju> don't we have the log package?
14:20 < nsf> aiju: I'm sure someone can do better or worse
14:20 < nsf> I want more
14:20 < nsf> MOOOAARR
14:20 < aiju> i don't even use log
14:20 < nsf> me to
14:20 < nsf> too*
14:20 < aiju> fmt, motherfuckers
14:20 < dgnorton> logging usually turns into evil
14:21 < aiju> logging did WTC
14:21 -!- r_linux [~r_linux@static.200.198.180.250.datacenter1.com.br] has joined
#go-nuts
14:21 < moraes> people build libraries but others have other requirements
and the result is 15 different libraries with mixed features and 1 giant
enterprise one.
14:21 < aiju> and people like me just write fucking code
14:21 < nsf> aiju: reinventing the wheel
14:22 < nsf> :)
14:22 -!- shoenig [~shoenig@173-8-182-114-SFBA.hfc.comcastbusiness.net] has quit
[Ping timeout: 250 seconds]
14:22 < aiju> ll
14:22 < aiju> *well
14:22 < nsf> I'm not saying it's bad though
14:22 < aiju> some people earn their living with literally reinvinting the
wheel
14:22 < nsf> and I'm basically proposing the same
14:22 < nsf> reinvent more wheels
14:22 < nsf> :D
14:22 < dgnorton> *aiju works for Goodyear
14:22 < nsf> it makes average wheel much closer to the perfect wheel
14:23 < aiju> dgnorton: hahaha
14:23 < aiju> code reuse is just a hilarious source of complexity
14:23 -!- knowmerc2 [~knowmercy@mobile-198-228-226-060.mycingular.net] has joined
#go-nuts
14:23 -!- pharris [~Adium@rhgw.opentext.com] has joined #go-nuts
14:25 < nsf> yeah, there is a problem with that
14:25 < nsf> it's good to take some code that works
14:25 < nsf> but is there a way to remove code that you don't use
14:25 < nsf> like there is a library which formats strings
14:26 < nsf> but if I don't want to format floats
14:26 < nsf> ever
14:26 < nsf> :D
14:26 -!- a2800276 [~a2800276@node-vb9.camp.ccc.de] has quit [Quit: a2800276]
14:26 < nsf> why should I carry that complexity
14:26 < aiju> i don't even mean that
14:26 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has quit [Ping
timeout: 250 seconds]
14:26 < aiju> when i "reuse" code (i.e.  copy and paste), i usually adapt it
14:27 < aiju> sometimes i end up with something entirely different
14:27 < aiju> in a library you just add more complexity on top of what
exists
14:27 < aiju> BOOST was not built in a day
14:27 < nsf> yeah, I know you don't mean that, my point is kind of unrelated
14:28 < nsf> but it's just an example of backwards thinking
14:28 < nsf> you want to add functionality - good, take a library
14:28 < moraes> and you have to deal with same bugs that were worked around
elsewhere and etc.  not every library must be boost-monster-like.
14:28 < nsf> but what if I want to remove functionality
14:28 < aiju> moraes: i don't work around bugs
14:28 < aiju> i fix them.
14:29 < moraes> you're defending that libraries should not exist?
14:29 < aiju> no
14:29 < aiju> i'm just saying you shouldn't go nuts about them
14:29 < aiju> there are good libraries
14:30 < aiju> crypto code is a very good example
14:30 < moraes> but this is #go-nuts
14:30 < moraes> meh.
14:31 < wrtp> moraes: you're doing a more sophisticated version of
http.ServeMux?
14:31 < aiju> try avoiding building a huge dependency tree
14:31 < moraes> wrtp, yes.
14:31 < moraes> that one is too simple.
14:31 < aiju> also, code i wrote can't break in a future release unless i
touch it :)
14:31 < wrtp> good plan.  i'd thought of doing something like that myself
14:31 < wrtp> moraes: something that supports regexps, for example?
14:32 < moraes> yes :)
14:32 < skelterjohn> huh - mux is short for multiplexor?  i always thought
it was short for mutex
14:32 < moraes> and reversing urls
14:32 < aiju> skelterjohn: hahahaha, yes
14:32 < wrtp> moraes: the important thing is that your new type should
implement http.Handler
14:32 < aiju> reversing URLs?  fucking rocket science!
14:32 < moraes> wrtp, it does
14:32 < skelterjohn> moraes: you've seen web.go, right?
14:32 < skelterjohn> it does regexp
14:32 < moraes> i did
14:33 < wrtp> moraes: so...  ServeMux isn't an interface, why should your
url router be an interface?
14:33 < moraes> i know eb.py as well
14:33 < moraes> *web.py
14:33 -!- qeed [~qeed@adsl-98-85-42-19.mco.bellsouth.net] has joined #go-nuts
14:34 < wrtp> the nice thing about implementing Handler is that you'll be
able to mix and match your url router with servemux and friends
14:34 -!- pjacobs [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has
joined #go-nuts
14:34 < moraes> wrtp, so that it can be used in things that require
url-building support, i thought
14:34 < moraes> aiju, i'll ignore you :P
14:34 < aiju> anyone remember the polynomial approximation of a second
partial derivative on a grid?
14:35 < aiju> moraes: weren't you the same guy which already did ignore me
14:35 < moraes> no i think.  anyway i'm kidding.  i'm just picking a project
to learn the idiom.
14:36 < wrtp> moraes: i'm not sure i see
14:36 < wrtp> tbh i'm not sure i know what you mean by "url-building" anyway
:-)
14:38 -!- Soak [~Mangano@92-89-15-217.reverse.alphalink.fr] has joined #go-nuts
14:38 < moraes> wrtp, it is simply passing some values to be replaced in the
registered urls
14:39 -!- shvntr [~shvntr@119.121.186.225] has joined #go-nuts
14:39 < moraes> wrtp, e.g., https://routes.groovie.org/generating.html
14:40 < moraes> that is a lot more un-zen than what i plan
14:40 -!- dlowe [~dlowe@ita4fw1.itasoftware.com] has joined #go-nuts
14:40 < wrtp> moraes: i'm not sure why that means that the _Router_ should
be an interface
14:41 < wrtp> moraes: although i could understand if some other interface
(or type) was given as an argument to the handler function to help url building
14:42 -!- aat [~aat@rrcs-184-75-54-130.nyc.biz.rr.com] has joined #go-nuts
14:42 < moraes> wrtp, i need to advance before i can defend it :)
14:43 < wrtp> i understand!
14:43 < wrtp> if you want to propose an API, i'll have a look for you...
14:45 -!- virtualsue [~chatzilla@nat/cisco/x-qjhlcgznelqqpxld] has quit [Ping
timeout: 240 seconds]
14:45 < moraes> that'd be awesome.
14:45 < wrtp> http://codereview.appspot.com/4875043/ oh it's lovely to see
someone else doing all the hard work :-)
14:47 -!- Dr_Who [~tgall_foo@linaro/tgall-foo] has quit [Quit: ZZZZZzzzzz]
14:48 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has quit [Read error:
Operation timed out]
14:48 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has joined #go-nuts
14:49 -!- shvntr [~shvntr@119.121.186.225] has quit [Quit: leaving]
14:50 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has joined
#go-nuts
14:50 < moraes> wrtp, it is a remake of
http://webapp-improved.appspot.com/guide/routing.html
14:51 < moraes> a little more zen.  i did that one.
14:51 < moraes> will follow this:
http://webapp-improved.appspot.com/guide/routing.html#the-regex-template
14:51 < moraes> but currently named arguments are required
14:52 < xyproto> wrtp: ah, unicode composition and decomposition?
14:53 -!- sahid [~sahid@LNeuilly-152-21-22-10.w193-253.abo.wanadoo.fr] has quit
[Quit: Ex-Chat]
14:53 -!- sebastianskejoe [~sebastian@563455dd.rev.stofanet.dk] has quit [Quit:
Lost terminal]
14:53 < wrtp> xyproto: unicode normalisation
14:54 < wrtp> xyproto: which enables proper unicode comparison for one
14:54 < wrtp> (and yeah composition is a big part of that)
14:55 < wrtp> moraes: the difficulty with regexp matching (and the reason, i
think why ServeMux doesn't do it) is that the order that rules are added becomes
significant
14:56 < wrtp> moraes: the nice thing about ServeMux is that any package can
add a url in init and the order that init statements are run doesn't matter
14:57 < wrtp> (because of the "longest first" rule)
14:59 -!- preflex_ [~preflex@unaffiliated/mauke/bot/preflex] has joined #go-nuts
14:59 -!- ancientlore [~ancientlo@12.54.6.218] has joined #go-nuts
15:00 -!- Kahvi [559ce99a@gateway/web/freenode/ip.85.156.233.154] has quit [Ping
timeout: 252 seconds]
15:00 < wrtp> moraes: one nice thing that you could do in Go (as opposed to
python) is check the type of the handler function against the regep.
15:01 < wrtp> s/regep/regexp/
15:01 -!- Kumul [~Kumul@cvx-ppp-66-50-136-199.coqui.net] has joined #go-nuts
15:01 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has quit [Ping
timeout: 258 seconds]
15:01 < moraes> check the type?
15:03 < wrtp> e.g.  router.Handle(`/documents/([^/]+)/(\d+)`,
http.HandlerFunc(func(w http.ResponseWriter, r *http.Request, user string, docId
int) { ...  }))
15:03 < moraes> wrtp, re: ordering -- first idea to require centralized url
declaration :-/ but enclosing regexps allows us to give them priority too.
15:03 < wrtp> enclosing regexps?
15:04 < moraes> yes, they are not defined with pure regexps
15:04 < moraes> see
http://webapp-improved.appspot.com/guide/routing.html#the-regex-template
15:05 < moraes> there's a little more syntax sugar
15:06 < wrtp> how do enclosing regexps help with precedence?  they look a
bit like named capture groups to me
15:06 < wrtp> (not that i know the syntax for those...)
15:07 -!- virtualsue [~chatzilla@nat/cisco/x-ehbossxbrmpujasv] has joined #go-nuts
15:07 < wrtp> by checking the type, i meant that the type of the handler
function could directly reflect the URL, so each argument of the function could be
taken from a group in the URL.  when the handler is added, the router could check
that the number of arguments to the function matches the number of capture groups
in the regexp.
15:08 -!- erus` [~chatzilla@mailgate.ips-international.com] has quit [Quit:
ChatZilla 0.9.87 [Firefox 5.0/20110615151330]]
15:08 -!- fabled [~fabled@83.145.235.194] has joined #go-nuts
15:09 -!- tncardoso [~thiago@187.59.187.239] has quit [Quit: bye]
15:09 < wrtp> moraes: another possibility is to do precedence based on
longest literal prefix.
15:09 < moraes> i don't think they can help with precedence.  which would
required them to be declared in a single place.
15:09 < moraes> i never wanted to calculate precedence, actually.  that was
removed from the original intentionally.  :-/
15:09 < qeed> l
15:09 -!- Argue [~Argue@112.201.133.68] has joined #go-nuts
15:10 < qeed> woops sorry
15:10 -!- avelino [~avelino@unaffiliated/avelino] has joined #go-nuts
15:10 < wrtp> yeah i see that - but it's just really nice to be able to have
multiple independent package serving parts of the same name space
15:11 < moraes> the type idea is really nice
15:11 < moraes> implicit argument naming
15:11 < wrtp> well, implicit argument association anyway
15:11 < moraes> and that changes what i'm doing completely
15:11 < wrtp> because fn args aren't named
15:11 < moraes> :P
15:11 -!- GeertJohan [~Squarc@clal-5-212.eduroam.inholland.nl] has joined #go-nuts
15:11 < wrtp> :-)
15:12 < moraes> hm.
15:12 < wrtp> it'll give you a good excuse to have a delve into the
reflection library...
15:12 < moraes> wrtp, passing a map would be horrible?
15:12 < wrtp> you could pass a map,.
15:12 < wrtp> bu
15:12 < wrtp> t
15:12 < wrtp> 
15:12 < wrtp> 
15:12 < moraes> for the variables i mean
15:13 < wrtp> but it would mean the router couldn't do so much work for the
handlers
15:13 < moraes> well map makes no sense.  we lose the reflection idea.
15:13 < wrtp> i like the idea of (for instance) automatic conversion to int
15:13 < wrtp> yeah
15:13 < moraes> conversion is also something i didn't want to do
15:14 < moraes> to keep it simple
15:14 < wrtp> another possibility would be to allow a pointer to a struct
15:15 < wrtp> func(w http.ResponseWriter, r *http.Request, args struct {User
string; Group int})
15:15 -!- Dr_Who [~tgall_foo@linaro/tgall-foo] has joined #go-nuts
15:15 < wrtp> it would be quite trivial to allow conversion of any type that
could be converted with fmt.Scan
15:16 < wrtp> oops func(w http.ResponseWriter, r *http.Request, args *struct
{User string; Group int})
15:16 < wrtp> note the added *
15:16 < wrtp> erm, no
15:16 < wrtp> pointer not necessary!
15:17 -!- Dr_Who [~tgall_foo@linaro/tgall-foo] has quit [Client Quit]
15:17 < wrtp> but anyway, that way you get names and types and ordering
15:17 -!- Dr_Who [~tgall_foo@linaro/tgall-foo] has joined #go-nuts
15:18 < wrtp> and some init-time checking of regexps vs handler functions
15:18 < moraes> yep
15:18 < moraes> init-time things is what makes it awesome compared to python
15:19 < moraes> wrtp, those are some nice ideas that i have to explore now
15:19 -!- thomas_b_ [~thomasb@cm-84.215.47.51.getinternet.no] has quit [Quit:
leaving]
15:19 < wrtp> yeah.  the combination of reflection and static types is a
winner in my book
15:19 < wrtp> have fun
15:21 * moraes saves chat log
15:22 < moraes> i'll have to ruminate these ideas for a while
15:23 -!- ShadowIce
[~pyoro@HSI-KBW-109-193-121-123.hsi7.kabel-badenwuerttemberg.de] has joined
#go-nuts
15:23 -!- ShadowIce
[~pyoro@HSI-KBW-109-193-121-123.hsi7.kabel-badenwuerttemberg.de] has quit
[Changing host]
15:23 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
15:23 < wrtp> moraes: the down side of using reflection is it can slow
things down.  but the overhead might not be significant.
15:24 < moraes> wrtp, the reason ServeMux also doesn't do it is that current
regexp package is very feature-lacking :)
15:24 < wrtp> that is, reflect.Value.Call is significantly slower than just
calling a function pointer or method
15:24 < wrtp> moraes: see exp/regexp
15:24 < moraes> yeah that's the one i'm using
15:24 < wrtp> cool
15:24 < moraes> but that didn't exist
15:25 < moraes> sre2 was the one
15:25 -!- niemeyer [~niemeyer@72-254-49-196.client.stsn.net] has quit [Ping
timeout: 240 seconds]
15:25 < wrtp> sre2 was even more feature lacking than regexp...
15:25 < wrtp> (apart from the regexp syntax itself)
15:26 -!- knowmerc2 [~knowmercy@mobile-198-228-226-060.mycingular.net] has quit
[Quit: leaving]
15:27 < moraes> wrtp, you work in the go team?
15:29 < wrtp> moraes: no, just been interested from the start
15:29 < moraes> ok.
15:29 -!- noodles775 [~michael@canonical/launchpad/noodles775] has quit [Quit:
leaving]
15:29 < moraes> if they were planning a better mux for the std lib i'd
choose a different project.
15:30 < wrtp> moraes: i don't think they are.  i think there's a good space
for a url router that doesn't try to entirely replace the http package but fits in
alongside it
15:32 < hsoj> ugh, having a brainfart; what's an easy way to create an
io.Writer for quick testing (even if not preferred)?
15:33 < mkb218> isn't os.Stdout one?
15:34 < wrtp> yeah, os.Stdout
15:35 < wrtp> or new(bytes.Buffer)
15:35 < hsoj> think new(bytes.Buffer) is what I was thinking about
15:36 < hsoj> now to remember why the hell I was even looking for this; just
one of those days for me
15:36 < wrtp> or it's trivial to define a no-op writer if you want one: e.g.
type NopWriter struct{}; func (_ NopWriter) Write(buf []byte) (int, os.Error) {
return len(buf) }
15:36 < wrtp> return len(buf), nil
15:36 < wrtp> of course
15:36 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has quit [Ping
timeout: 240 seconds]
15:36 < hsoj> nod
15:38 -!- sebastianskejoe [~sebastian@56345f15.rev.stofanet.dk] has joined
#go-nuts
15:42 -!- sebastianskejoe [~sebastian@56345f15.rev.stofanet.dk] has quit [Ping
timeout: 240 seconds]
15:43 -!- robteix [~robteix@ec2-174-129-247-164.compute-1.amazonaws.com] has quit
[Quit: Leaving]
15:44 -!- sebastianskejoe [~sebastian@563455dd.rev.stofanet.dk] has joined
#go-nuts
15:49 -!- Dr_Who [~tgall_foo@linaro/tgall-foo] has quit [Quit: ZZZZZzzzzz]
15:49 -!- ancientlore_ [~ancientlo@12.54.6.218] has joined #go-nuts
15:49 -!- Soak [~Mangano@92-89-15-217.reverse.alphalink.fr] has quit [Quit: I mine
on BitMinter.com]
15:52 -!- a2800276 [~a2800276@node-viw.camp.ccc.de] has joined #go-nuts
15:52 -!- ancientlore [~ancientlo@12.54.6.218] has quit [Ping timeout: 250
seconds]
15:55 -!- Fish- [~Fish@9fans.fr] has joined #go-nuts
15:58 -!- larva [~larvanitr@ec2-46-51-171-183.eu-west-1.compute.amazonaws.com] has
joined #go-nuts
15:58 -!- tncardoso [~thiagon@150.164.2.20] has joined #go-nuts
16:00 -!- niemeyer [~niemeyer@72-254-49-196.client.stsn.net] has joined #go-nuts
16:00 -!- larva [~larvanitr@ec2-46-51-171-183.eu-west-1.compute.amazonaws.com] has
quit [Remote host closed the connection]
16:01 -!- larva [~larvanitr@ec2-46-51-171-183.eu-west-1.compute.amazonaws.com] has
joined #go-nuts
16:03 -!- pjacobs2 [~pjacobs@66.54.185.130] has joined #go-nuts
16:05 -!- larva [~larvanitr@ec2-46-51-171-183.eu-west-1.compute.amazonaws.com] has
quit [Remote host closed the connection]
16:06 -!- larva [~larvanitr@ec2-46-51-171-183.eu-west-1.compute.amazonaws.com] has
joined #go-nuts
16:06 -!- pjacobs [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has quit
[Ping timeout: 258 seconds]
16:09 -!- allengeorge [~allengeor@c-67-188-178-118.hsd1.ca.comcast.net] has joined
#go-nuts
16:10 -!- r_linux [~r_linux@static.200.198.180.250.datacenter1.com.br] has quit
[Ping timeout: 252 seconds]
16:11 -!- r_linux [~r_linux@189.38.220.35] has joined #go-nuts
16:11 -!- dfr|mac [~dfr|work@ool-18baf7e7.dyn.optonline.net] has quit [Remote host
closed the connection]
16:12 < moraes> wrtp, that's the plan.
16:14 -!- vmil86 [~vmil86@88.118.36.96] has quit [Read error: Connection reset by
peer]
16:16 < wrtp> moraes: sounds like a good one to me
16:17 -!- r_linux [~r_linux@189.38.220.35] has quit [Ping timeout: 252 seconds]
16:18 -!- r_linux [~r_linux@189.38.220.35] has joined #go-nuts
16:19 -!- robteix [~robteix@ec2-174-129-247-164.compute-1.amazonaws.com] has
joined #go-nuts
16:20 -!- clr_ [~colin@97-112-204-183.frgo.qwest.net] has joined #go-nuts
16:25 -!- nekoh [~nekoh@dslb-178-004-065-099.pools.arcor-ip.net] has quit [Read
error: Connection reset by peer]
16:25 -!- molto_alfredo [~molto_alf@142.176.0.21] has joined #go-nuts
16:26 -!- sniper506th [~sniper506@rrcs-70-61-192-18.midsouth.biz.rr.com] has quit
[Quit: Leaving...]
16:27 -!- molto_alfredo1 [~molto_alf@142.176.0.21] has quit [Ping timeout: 264
seconds]
16:37 -!- Guest1234 [~Pestilenc@95.87.216.153] has quit [Quit: WeeChat 0.3.5]
16:42 -!- virtualsue [~chatzilla@nat/cisco/x-ehbossxbrmpujasv] has quit [Ping
timeout: 252 seconds]
16:43 -!- photron [~photron@port-92-201-20-158.dynamic.qsc.de] has quit [Quit:
Leaving]
16:45 -!- GeertJohan [~Squarc@clal-5-212.eduroam.inholland.nl] has quit [Ping
timeout: 240 seconds]
16:46 -!- nekoh [~nekoh@dslb-088-068-003-241.pools.arcor-ip.net] has joined
#go-nuts
16:50 -!- ancientlore__ [~ancientlo@12.54.6.218] has joined #go-nuts
16:51 -!- Sh4rK [sh4rk@3e44bc91.adsl.enternet.hu] has joined #go-nuts
16:51 -!- alanl [~yogafire@c-71-204-189-190.hsd1.ca.comcast.net] has quit [Read
error: Connection reset by peer]
16:51 < Sh4rK> HI!
16:51 < Sh4rK> I'm on windows
16:51 -!- a2800276 [~a2800276@node-viw.camp.ccc.de] has quit [Remote host closed
the connection]
16:51 -!- a2800276_ [~a2800276@vian.visitor.camp.ccc.de] has joined #go-nuts
16:51 < Sh4rK> and goinstall doesn't install an executable package in a
GOPATH to it's bin directory
16:51 -!- alanl [~yogafire@c-71-204-189-190.hsd1.ca.comcast.net] has joined
#go-nuts
16:52 < Sh4rK> instead leaves it in the src/pkgname directory
16:52 < Sh4rK> is this a bug?
16:52 < Sh4rK> and on latest weekly
16:53 -!- ancientlore_ [~ancientlo@12.54.6.218] has quit [Ping timeout: 260
seconds]
16:54 -!- ccc1 [~Adium@118-166-215-203.dynamic.hinet.net] has quit [Quit:
Leaving.]
16:55 -!- TheMue [~FMueller@p5DDF7D39.dip.t-dialin.net] has joined #go-nuts
16:57 < Sh4rK> it works with -make=false
16:59 < Sh4rK> ok
16:59 -!- robteix [~robteix@ec2-174-129-247-164.compute-1.amazonaws.com] has quit
[Quit: Leaving]
16:59 < Sh4rK> bye
16:59 -!- Sh4rK [sh4rk@3e44bc91.adsl.enternet.hu] has quit [Quit: I'm out]
17:01 -!- jstemmer [~cheetah@mrpwn.stemmertech.com] has joined #go-nuts
17:01 -!- Kahvi [559ce99a@gateway/web/freenode/ip.85.156.233.154] has joined
#go-nuts
17:02 -!- shoenig [~shoenig@egress-w.sfo1.yelpcorp.com] has joined #go-nuts
17:04 -!- yogib [~yogib@131.234.59.64] has quit [Ping timeout: 246 seconds]
17:05 -!- allengeorge [~allengeor@c-67-188-178-118.hsd1.ca.comcast.net] has quit
[Quit: allengeorge]
17:07 -!- shoenig [~shoenig@egress-w.sfo1.yelpcorp.com] has quit [Remote host
closed the connection]
17:09 -!- a2800276_ [~a2800276@vian.visitor.camp.ccc.de] has quit [Ping timeout:
240 seconds]
17:10 -!- shoenig [~shoenig@egress-w.sfo1.yelpcorp.com] has joined #go-nuts
17:13 -!- r_linux [~r_linux@189.38.220.35] has quit [Ping timeout: 240 seconds]
17:14 -!- r_linux [~r_linux@static.200.198.180.250.datacenter1.com.br] has joined
#go-nuts
17:33 -!- sebastianskejoe [~sebastian@563455dd.rev.stofanet.dk] has quit [Quit:
Lost terminal]
17:33 -!- r_linux [~r_linux@static.200.198.180.250.datacenter1.com.br] has quit
[Read error: Operation timed out]
17:34 -!- skydive69 [hoquwh@app5.chatmosphere.org] has joined #go-nuts
17:36 -!- smw [~stephen@unaffiliated/smw] has joined #go-nuts
17:36 -!- boscop [~unknown@dyndsl-085-016-036-066.ewe-ip-backbone.de] has joined
#go-nuts
17:37 -!- skydive69 [hoquwh@app5.chatmosphere.org] has quit [Quit: Chatmosphere
for Blackberry]
17:40 -!- tvw [~tv@212.79.9.150] has quit [Remote host closed the connection]
17:40 -!- r_linux [~r_linux@static.200.198.180.250.datacenter1.com.br] has joined
#go-nuts
17:44 -!- kinofcain [~KinOfCain@h-64-105-141-42.snvacaid.static.covad.net] has
joined #go-nuts
17:45 -!- boscop [~unknown@dyndsl-085-016-036-066.ewe-ip-backbone.de] has left
#go-nuts ["See you later, alligator!"]
17:46 -!- r_linux [~r_linux@static.200.198.180.250.datacenter1.com.br] has quit
[Ping timeout: 260 seconds]
17:49 -!- angasule [~angasule@190.2.33.49] has quit [Read error: No route to host]
17:53 -!- r_linux [~r_linux@static.200.198.180.250.datacenter1.com.br] has joined
#go-nuts
18:07 -!- clr_ [~colin@97-112-204-183.frgo.qwest.net] has quit [Ping timeout: 252
seconds]
18:08 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has joined
#go-nuts
18:09 -!- Fish- [~Fish@9fans.fr] has quit [Quit: WeeChat 0.3.5]
18:11 -!- chomp [~chomp@dap-209-166-184-50.pri.tnt-3.pgh.pa.stargate.net] has
joined #go-nuts
18:12 -!- virtualsue [~chatzilla@nat/cisco/x-rwsmcgbxkqsiyscs] has joined #go-nuts
18:12 -!- Argue [~Argue@112.201.133.68] has quit [Quit: Leaving]
18:16 -!- glad_chd [nuewbh@app3.chatmosphere.org] has joined #go-nuts
18:17 -!- glad_chd [nuewbh@app3.chatmosphere.org] has quit [Read error: Connection
reset by peer]
18:17 -!- huin [~huin@91.84.179.118] has joined #go-nuts
18:21 -!- Wiz126 [Wiz@h229.120.232.68.dynamic.ip.windstream.net] has quit []
18:23 < uriel> https://github.com/anchor/Orchestra
18:23 < uriel> kuroneko: cool, very interesting
18:33 -!- knowmerc1 [~knowmercy@mobile-198-228-226-060.mycingular.net] has joined
#go-nuts
18:33 < knowmerc1> just look at all the openbsd goodness rolling in!
18:34 -!- samuell [~samuel@nl119-201-142.student.uu.se] has quit [Quit: Ex-Chat]
18:35 < uriel> hehe, nice
18:36 < sl> what's this?
18:36 < knowmerc1> porting work to get go to run in openbsd
18:36 < f2f> it's an orchestrator :)
18:36 -!- allengeorge [~allengeor@c-67-188-178-118.hsd1.ca.comcast.net] has joined
#go-nuts
18:36 * kergoth_ wonders what the main use cases are of Orchestra
18:37 < f2f> it orchestrates workload between utility providers.
18:37 * f2f wishes he didn't know all these things ;)
18:39 -!- Halavanja [~chatzilla@mcswl207.mcs.anl.gov] has joined #go-nuts
18:40 < Halavanja> are there any known issues with the tab writer class?  It
seems that every time I try to use it to format my output the last field is always
skewed far right.  my format usually follows var\t var\t var\t var\n to signal
that it is a line.  I usually have to pad the next to the last one and it makes it
look weird.
18:51 -!- pearle [~pearle@blk-224-181-222.eastlink.ca] has joined #go-nuts
18:55 -!- molto_alfredo1 [~molto_alf@142.176.0.21] has joined #go-nuts
18:55 -!- smw [~stephen@unaffiliated/smw] has quit [Ping timeout: 260 seconds]
18:55 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
18:56 -!- knowmerc1 [~knowmercy@mobile-198-228-226-060.mycingular.net] has quit
[Ping timeout: 276 seconds]
18:56 -!- molto_alfredo [~molto_alf@142.176.0.21] has quit [Ping timeout: 246
seconds]
18:56 -!- allengeorge [~allengeor@c-67-188-178-118.hsd1.ca.comcast.net] has quit
[Quit: allengeorge]
18:58 -!- clr_ [~colin@97-112-204-183.frgo.qwest.net] has joined #go-nuts
19:03 -!- tncardoso [~thiagon@150.164.2.20] has quit [Quit: Leaving]
19:05 -!- niemeyer [~niemeyer@72-254-49-196.client.stsn.net] has quit [Ping
timeout: 240 seconds]
19:07 -!- erus` [~chatzilla@cpc2-gill2-0-0-cust701.basl.cable.virginmedia.com] has
joined #go-nuts
19:10 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has quit [Remote
host closed the connection]
19:11 -!- cabello [~cabello@nat/yahoo/x-juwjbpbaqijoqibj] has quit [Remote host
closed the connection]
19:12 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
19:13 -!- a2800276_ [~a2800276@node-siw.camp.ccc.de] has joined #go-nuts
19:16 -!- chomp [~chomp@dap-209-166-184-50.pri.tnt-3.pgh.pa.stargate.net] has quit
[Quit: Leaving]
19:18 -!- niemeyer [~niemeyer@72-254-49-196.client.stsn.net] has joined #go-nuts
19:18 -!- knowmerc1 [~knowmercy@mobile-198-228-227-151.mycingular.net] has joined
#go-nuts
19:22 -!- ancientlore_ [~ancientlo@12.54.6.218] has joined #go-nuts
19:22 -!- ancientlore_ [~ancientlo@12.54.6.218] has quit [Client Quit]
19:25 -!- smw [~stephen@unaffiliated/smw] has joined #go-nuts
19:25 -!- ancientlore [~ancientlo@12.54.6.218] has quit [Ping timeout: 252
seconds]
19:25 -!- TheSeeker [riiight@99-153-250-110.lightspeed.irvnca.sbcglobal.net] has
quit [Ping timeout: 240 seconds]
19:30 -!- TheSeeker [riiight@99-153-250-110.lightspeed.irvnca.sbcglobal.net] has
joined #go-nuts
19:31 -!- moraes [~moraes@189.103.188.201] has quit [Read error: Connection reset
by peer]
19:34 -!- niemeyer [~niemeyer@72-254-49-196.client.stsn.net] has quit [Quit:
Leaving]
19:37 -!- fabled [~fabled@83.145.235.194] has quit [Quit: Ex-Chat]
19:42 -!- robteix [~robteix@ec2-174-129-247-164.compute-1.amazonaws.com] has
joined #go-nuts
19:49 -!- moraes [~moraes@189.103.188.201] has joined #go-nuts
19:54 < Kahvi> Can we have const []byte in Go?
19:54 < aiju> no
19:54 < aiju> we have strin
19:54 < aiju> *string
19:55 -!- miker2 [~miker2@64.55.31.190] has quit [Ping timeout: 252 seconds]
19:55 -!- replore [~replore@ntkngw133234.kngw.nt.ftth.ppp.infoweb.ne.jp] has quit
[Remote host closed the connection]
19:58 -!- tvw [~tv@e176005046.adsl.alicedsl.de] has joined #go-nuts
19:58 -!- tvw [~tv@e176005046.adsl.alicedsl.de] has quit [Remote host closed the
connection]
19:58 -!- alehorst [~alehorst@201.47.13.221.dynamic.adsl.gvt.net.br] has quit
[Quit: Leaving.]
19:59 -!- tvw [~tv@e176005046.adsl.alicedsl.de] has joined #go-nuts
20:00 -!- MorningSon [~MorningSo@cpe-70-117-27-48.satx.res.rr.com] has joined
#go-nuts
20:03 -!- alehorst [~alehorst@201.47.13.221.dynamic.adsl.gvt.net.br] has joined
#go-nuts
20:04 -!- moraes [~moraes@189.103.188.201] has quit [Ping timeout: 264 seconds]
20:05 < MorningSon> i'm trying to solve project euler problem 25 and that
requires getting the results of the fibonacci sequence until the length of the
result is greater than 1000, my code so far is here
https://gist.github.com/1142873
20:06 -!- maragato [~robteix@ec2-174-129-247-164.compute-1.amazonaws.com] has
joined #go-nuts
20:07 < MorningSon> when i evaluate fibo(300) i get -1287770608 which is
confusing, how does it get a negative result, also how do I get this program to
give me answers longer than 11 digits?
20:07 -!- robteix [~robteix@ec2-174-129-247-164.compute-1.amazonaws.com] has quit
[Ping timeout: 240 seconds]
20:07 < MorningSon> not sure if the "big" package is what I'm looking for
20:07 < f2f> use the big package
20:08 < MorningSon> out of curiousity why does it return a negative value?
and where is that number even coming from
20:08 < f2f> you are using signed integers
20:09 < f2f> when a signed integer overflows it becomes a negative
20:09 < f2f> and if you underflow a negative int it becomes positive
20:09 < f2f> by the way, you are much better off if you don't use recursion
20:09 < MorningSon> ?
20:09 < f2f> use a loop
20:10 < nicka> you can also solve it algebraically
20:11 -!- franciscosouza [~francisco@201.7.186.67] has quit [Quit: franciscosouza]
20:11 < MorningSon> how is looping better?
20:12 < MorningSon> this is the code i'm trying to translate
https://raw.github.com/epequeno/project-euler/master/id25.py
20:12 < f2f> go doesn't have tail-recursion optimization, so looping is
faster.
20:13 < qeed> is there a reason why it doesnt have that?
20:13 < nicka> young compiler I think
20:14 < aiju> it's difficult to implement
20:14 < aiju> really difficult
20:14 < nicka> and that
20:14 < aiju> you can do some half-assed thing like gcc does
20:14 < f2f>
http://groups.google.com/group/golang-nuts/browse_thread/thread/d282193c786b0f36/ffb0a5936d972f32
20:14 < aiju> and lose all traces of predictability along the way
20:14 < f2f> it's there for some cases, they say.
20:14 < aiju> i've never seen it
20:15 < aiju> not even in the most trivial cases
20:15 < qeed> how do functional language do it?
20:15 -!- zcram [~zcram@8.177.190.90.sta.estpak.ee] has joined #go-nuts
20:15 -!- knowmerc1 [~knowmercy@mobile-198-228-227-151.mycingular.net] has quit
[Quit: leaving]
20:15 < aiju> qeed: not compiling
20:15 < aiju> or using an entirely different calling convention
20:17 < aiju> tail calls ruin stack frames :\
20:19 < f2f> do they now?
20:20 < f2f> i thought tail recursion with accumulators can trivially be
converted to an iteration
20:20 < aiju> f2f: there are three dozens trivial cases
20:20 < aiju> a generic implementation is difficult
20:20 < aiju> hell, you can easily sneak in a platform dependency that way
20:21 < aiju> amazingly fun: code which runs out of memory on some
architecture and runs fine on some other
20:21 < aiju> how do you handle the debugging problem in functional
language?
20:21 < aiju> i mean basically tail calls are glorified goto statements
20:22 < aiju> how do you know where you came from?
20:22 -!- franciscosouza [~francisco@201.7.186.67] has joined #go-nuts
20:23 -!- Halavanja [~chatzilla@mcswl207.mcs.anl.gov] has quit [Quit: ChatZilla
0.9.87 [Firefox 5.0/20110622232440]]
20:28 < f2f> are you asking me?  i know the reason russ doesn't want
tail-call optimizations is stack traces.
20:37 -!- shoenig [~shoenig@egress-w.sfo1.yelpcorp.com] has quit [Remote host
closed the connection]
20:39 -!- zcram [~zcram@8.177.190.90.sta.estpak.ee] has quit [Quit: Leaving]
20:39 -!- hargettp [~hargettp@pool-71-184-177-187.bstnma.east.verizon.net] has
joined #go-nuts
20:40 < f2f> MorningSon: here's a looping implementation using package big:
20:40 < f2f> http://pastie.org/2362972
20:40 < f2f> 1000th number (verified with wolfram alpha) is:
20:41 < f2f>
43466557686937456435688527675040625802564660517371780402481729089536555417949051890403879840079255169295922593080322634775209689623239873322471161642996440906533187938298969649928516003704476137795166849228875
20:41 < f2f> on my computer the result is achieved in 0.03s (bash's time) or
0.00s (/usr/bin/time)
20:42 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.5]
20:48 < uriel> f2f: is that really the reason why russ doesn't want
tail-calls?
20:49 -!- bobbysworld_ [~bobbyswor@99-20-88-178.lightspeed.austtx.sbcglobal.net]
has joined #go-nuts
20:49 < f2f> that's what he stated on the mailing list.  a good stack trace
is worth it.  let me find it
20:49 < uriel> yea, but I think he had other reasons
20:50 < f2f> There are no such plans for gc (6g, 5g, 8g).
20:50 < f2f> Personally, I find meaningful stack traces helpful more
20:50 < f2f> often than I find myself using unbounded tail recursions.
20:50 -!- bobbysworld [~bobbyswor@99-20-88-178.lightspeed.austtx.sbcglobal.net]
has quit [Ping timeout: 250 seconds]
20:50 < f2f> ^ rsc quotes
20:50 -!- r_linux [~r_linux@static.200.198.180.250.datacenter1.com.br] has quit
[Quit: Lost terminal]
20:51 < f2f> well, i'll take him at face value.  it's not an issue for me
20:51 < uriel> maybe I'm confusing this with other discussions of the topic
20:52 -!- pearle [~pearle@blk-224-181-222.eastlink.ca] has quit [Quit: Leaving]
20:53 < uriel> also, I have heard the pro-tail-call folks claim that there
are ways to deal with the stack race issues, but of course the would say that,
wouldn' they?  ;P
20:54 < aiju> you could as well solve the halting problem
20:55 < MorningSon> f2f thank you for the help
20:56 -!- hargettp [~hargettp@pool-71-184-177-187.bstnma.east.verizon.net] has
quit [Quit: Linkinus - http://linkinus.com]
20:57 -!- shoenig [~shoenig@egress-w.sfo1.yelpcorp.com] has joined #go-nuts
20:57 < f2f> i hadn't done anything with package big before.  in the time it
takes python to find the 1000th fibonacci number Go finds the 100000th :)
20:59 < MorningSon> ? you aren't looking for the 1000th fibo number tho, you
are looking for the first fibo # to have a len > 1000
20:59 < MorningSon> the answer is ~ 4000
21:00 < f2f> oh :)
21:00 -!- hargettp [~hargettp@pool-71-184-177-187.bstnma.east.verizon.net] has
joined #go-nuts
21:00 < MorningSon> but your example is still very useful and explains a
lot, thank you
21:01 -!- maragato [~robteix@ec2-174-129-247-164.compute-1.amazonaws.com] has quit
[Ping timeout: 246 seconds]
21:03 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has joined
#go-nuts
21:10 < f2f> MorningSon: the answer is 4787 ;)
21:10 < MorningSon> yeah to be precise
21:10 < MorningSon> :D
21:11 < MorningSon> what was the time for the go code to find the solution
21:13 < MorningSon> my code using python and recursion was real 0m0.474s
21:13 < f2f> 0.004s
21:13 < MorningSon> wow quite a bit faster
21:20 < MorningSon> i'm new to go so can you explain what the * in *big.Int
is for/
21:20 < qeed> pointer
21:21 -!- pjacobs [~pjacobs@66.54.185.130] has quit [Quit: Leaving]
21:21 < MorningSon> is it required to use a pointer?
21:22 < qeed> it depends on the bignum package interface
21:22 < MorningSon> it may, most of the examples use the *
21:22 < f2f> MorningSon: the equivalent python program prints the same
result in 0.029s on my machine.  comparing apples to apples :)
21:23 < MorningSon> looping instead of recursion?
21:23 < f2f> yes, looping.
21:24 -!- a2800276 [~a2800276@node-siw.camp.ccc.de] has quit [Quit: a2800276]
21:24 < f2f> identical code, only in python the use of big ints is implicit
21:25 < f2f> ah, my result is wrong ;)
21:25 < MorningSon> can i see the python code?
21:26 -!- miker2 [~miker2@pool-96-245-224-59.phlapa.fios.verizon.net] has joined
#go-nuts
21:26 -!- pharris [~Adium@rhgw.opentext.com] has quit [Quit: Leaving.]
21:27 < f2f> as soon as i've fixed it :) i'm off-by-one in counting digits
21:27 < MorningSon> sure, i wanted to see if i could spot the mistake ;)
21:28 -!- Nisstyre [~nisstyre@infocalypse-net.info] has quit [Ping timeout: 250
seconds]
21:28 < f2f> 4782 is the correct answer
21:29 < f2f> http://pastie.org/2363169
21:29 -!- TheSeeker [riiight@99-153-250-110.lightspeed.irvnca.sbcglobal.net] has
quit [Ping timeout: 260 seconds]
21:30 < f2f> and that's also conveniently verified with wolfram alpha.  i
like it.
21:30 < f2f> more and more.
21:31 < MorningSon> wolfram?  yeah it's pretty awesome
21:31 < MorningSon> i don't get the 10**999-1 part
21:31 < aiju> wolfram alpha is always great, in the 5% of cases where it
works
21:33 -!- TheSeeker [riiight@99-153-250-110.lightspeed.irvnca.sbcglobal.net] has
joined #go-nuts
21:33 < f2f> 10*999 is 1 followed by 999 zeros, i.e.  the smallest
1000-digit number.  subtract 1 and you get 999 9s, the largest 999-digit number.
when our fibonacci sequence is bigger than that one then we're in 1000-digit
territory
21:34 < f2f> 10**999
21:34 < f2f> 1e999
21:35 < MorningSon> i'd have just used str() and len() but i see what you
were working at now
21:36 -!- meling [~meling@134.81-167-41.customer.lyse.net] has joined #go-nuts
21:36 -!- huin [~huin@91.84.179.118] has quit [Remote host closed the connection]
21:36 < f2f> that would be slower.
21:36 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has quit [Ping
timeout: 252 seconds]
21:37 -!- kergoth_ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has quit [Ping
timeout: 252 seconds]
21:38 -!- TheMue [~FMueller@p5DDF7D39.dip.t-dialin.net] has quit [Quit: Lost
terminal]
21:42 -!- shoenig [~shoenig@egress-w.sfo1.yelpcorp.com] has quit [Remote host
closed the connection]
21:44 -!- jbooth1 [~jay@209.249.216.2] has left #go-nuts []
21:45 -!- moraes [~moraes@189.103.188.201] has joined #go-nuts
21:51 -!- TheSeeker [riiight@99-153-250-110.lightspeed.irvnca.sbcglobal.net] has
quit [Ping timeout: 276 seconds]
21:51 -!- TheSeeker [riiight@99-153-250-110.lightspeed.irvnca.sbcglobal.net] has
joined #go-nuts
21:52 -!- dlowe [~dlowe@ita4fw1.itasoftware.com] has quit [Quit: Leaving.]
21:52 -!- Solak [~stijnw@cthia.xs4all.nl] has quit [Remote host closed the
connection]
21:53 -!- rlab [~Miranda@91.200.158.34] has quit [Read error: Connection reset by
peer]
21:58 -!- Soak [Soak@gas45-5-88-182-12-78.fbx.proxad.net] has joined #go-nuts
21:58 -!- miker2 [~miker2@pool-96-245-224-59.phlapa.fios.verizon.net] has quit
[Read error: Connection reset by peer]
21:58 < MorningSon> did go have a package called bignum?  is that now the
big package?
21:59 < uriel> yes
21:59 < MorningSon> ah
22:00 -!- miker2 [~miker2@pool-96-245-224-59.phlapa.fios.verizon.net] has joined
#go-nuts
22:01 -!- dmg [~dmg@ip56513def.adsl-surfen.hetnet.nl] has joined #go-nuts
22:01 < dmg> I finished my LZO wrapper and put it on github.
https://github.com/dgryski/dgolzo
22:01 < dmg> What now?
22:03 < skelterjohn> submit to godashboard.appspot.com/project
22:03 < skelterjohn> and announce on the group
22:03 -!- yogib [~yogib@dslb-188-100-012-059.pools.arcor-ip.net] has joined
#go-nuts
22:05 -!- clr_ [~colin@97-112-204-183.frgo.qwest.net] has quit [Ping timeout: 240
seconds]
22:06 -!- dmg [~dmg@ip56513def.adsl-surfen.hetnet.nl] has quit [Quit: leaving]
22:06 -!- tvw [~tv@e176005046.adsl.alicedsl.de] has quit [Remote host closed the
connection]
22:07 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Quit:
skelterjohn]
22:07 -!- dmg [~dmg@ip56513def.adsl-surfen.hetnet.nl] has joined #go-nuts
22:08 < dmg> hrm ..  weird connection there.
22:08 -!- clr_ [~colin@97-112-204-183.frgo.qwest.net] has joined #go-nuts
22:10 -!- franciscosouza [~francisco@201.7.186.67] has quit [Quit: franciscosouza]
22:13 -!- miker2 [~miker2@pool-96-245-224-59.phlapa.fios.verizon.net] has quit
[Quit: Computer has gone to sleep.]
22:14 -!- clr_ [~colin@97-112-204-183.frgo.qwest.net] has quit [Ping timeout: 260
seconds]
22:17 -!- dmg [~dmg@ip56513def.adsl-surfen.hetnet.nl] has quit [Ping timeout: 240
seconds]
22:17 -!- dmg [~dmg@ip56513def.adsl-surfen.hetnet.nl] has joined #go-nuts
22:18 < smw> is it possible to use fmt.scanf to read a 50 digit int?
22:19 -!- TheSeeker [riiight@99-153-250-110.lightspeed.irvnca.sbcglobal.net] has
quit [Ping timeout: 240 seconds]
22:19 -!- a2800276 [~a2800276@node-siw.camp.ccc.de] has joined #go-nuts
22:19 -!- dmg [~dmg@ip56513def.adsl-surfen.hetnet.nl] has quit [Client Quit]
22:20 < nicka1> smw: use scanf to get it as a string then use big?
22:21 < smw> can big take a string?
22:21 -!- TheSeeker [riiight@99-153-250-110.lightspeed.irvnca.sbcglobal.net] has
joined #go-nuts
22:22 < nicka1> well, there is a SetString method
22:22 < smw> cool
22:22 < smw> thanks
22:26 -!- TheSeeker [riiight@99-153-250-110.lightspeed.irvnca.sbcglobal.net] has
quit [Ping timeout: 250 seconds]
22:33 -!- TheSeeker [riiight@99-153-250-110.lightspeed.irvnca.sbcglobal.net] has
joined #go-nuts
22:41 -!- sniper506th [~sniper506@cpe-098-122-109-075.sc.res.rr.com] has joined
#go-nuts
22:42 -!- sniper506th [~sniper506@cpe-098-122-109-075.sc.res.rr.com] has quit
[Client Quit]
22:42 -!- sniper506th [~guilty_sp@cpe-098-122-109-075.sc.res.rr.com] has joined
#go-nuts
22:42 -!- TheSeeker [riiight@99-153-250-110.lightspeed.irvnca.sbcglobal.net] has
quit [Ping timeout: 258 seconds]
22:42 -!- sniper506th [~guilty_sp@cpe-098-122-109-075.sc.res.rr.com] has quit
[Client Quit]
22:43 -!- sniper506th [~guilty_sp@cpe-098-122-109-075.sc.res.rr.com] has joined
#go-nuts
22:43 -!- sniper506th [~guilty_sp@cpe-098-122-109-075.sc.res.rr.com] has quit
[Client Quit]
22:44 -!- guilty_spark [~guilty_sp@cpe-098-122-109-075.sc.res.rr.com] has joined
#go-nuts
22:49 -!- wrtp [~rog@host-92-23-136-250.as13285.net] has quit [Quit: wrtp]
22:59 -!- shoenig [~shoenig@173-8-182-114-SFBA.hfc.comcastbusiness.net] has joined
#go-nuts
22:59 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit:
Verlassend]
23:08 -!- avelino [~avelino@unaffiliated/avelino] has quit [Ping timeout: 258
seconds]
23:08 -!- TheSeeker [riiight@99-153-250-110.lightspeed.irvnca.sbcglobal.net] has
joined #go-nuts
23:10 -!- hargettp [~hargettp@pool-71-184-177-187.bstnma.east.verizon.net] has
quit [Quit: Leaving...]
23:13 < knowmercy> I wonder if these openbsd syscalls are good
23:13 < knowmercy> I should just grab the diff, apply it and see what
happens :)
23:19 -!- shoenig [~shoenig@173-8-182-114-SFBA.hfc.comcastbusiness.net] has quit
[Ping timeout: 250 seconds]
23:27 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Remote host closed
the connection]
23:34 -!- allengeorge [~allengeor@64.134.220.173] has joined #go-nuts
23:38 < knowmercy> Just found a upnp server in go, I'm laughing and happy!
23:38 < knowmercy> what a great way to spend a friday night!
23:39 -!- allengeorge [~allengeor@64.134.220.173] has quit [Ping timeout: 240
seconds]
23:41 -!- clr_ [~colin@97-112-204-183.frgo.qwest.net] has joined #go-nuts
23:44 -!- moraes [~moraes@189.103.188.201] has quit [Ping timeout: 250 seconds]
23:51 -!- TheSeeker [riiight@99-153-250-110.lightspeed.irvnca.sbcglobal.net] has
quit [Ping timeout: 240 seconds]
23:54 -!- Kahvi [559ce99a@gateway/web/freenode/ip.85.156.233.154] has quit [Quit:
Page closed]
23:55 -!- aat [~aat@rrcs-184-75-54-130.nyc.biz.rr.com] has quit [Ping timeout: 252
seconds]
23:56 -!- TheSeeker [~riiight@99-153-248-206.lightspeed.irvnca.sbcglobal.net] has
joined #go-nuts
23:57 -!- a2800276 [~a2800276@node-siw.camp.ccc.de] has quit [Ping timeout: 250
seconds]
--- Log closed Sat Aug 13 00:00:20 2011