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

--- Log opened Thu Aug 25 00:00:21 2011
00:04 < crazy2be> pike?
00:05 -!- nekoh [~nekoh@dslb-188-107-175-130.pools.arcor-ip.net] has quit [Quit:
nekoh]
00:08 < prudhvi> Is it possible for a func foo(z,y string) ([]string,
os.Error) to be called as a goroutine ?
00:09 < crazy2be> prudhvi: yes, with a closure
00:09 < crazy2be> or even without
00:09 < crazy2be> depending on if you value the return values
00:10 < prudhvi> also something like this is valid, q,err := go foo(z,y) ?
00:10 < crazy2be> no, that's silly
00:10 < prudhvi> ok
00:11 < crazy2be> you're asking the compiler to suspend execution of the
current thread of execution, start a new thread of execution with that function,
and then copy the return values back to this thread and resume this thread
00:11 -!- kergoth_ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has quit [Read error:
Connection reset by peer]
00:11 < crazy2be> s/compiler/language
00:11 < crazy2be> esentially accompilishing nothing but wasting resources
00:11 < crazy2be> because you have not increased the parellism of the system
00:12 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts
00:12 < crazy2be> are you calling this function a whole bunch of times?
00:13 -!- vmil86 [~vmil86@78.57.250.113] has quit [Ping timeout: 268 seconds]
00:14 -!- qrush [u1528@gateway/web/irccloud.com/x-cpswbwcohvshstqh] has left
#go-nuts []
00:15 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read
error: Connection reset by peer]
00:16 < prudhvi> crazy2be: no
00:16 < prudhvi> i am just calling this once per page request
00:17 < crazy2be> what does the function do?
00:17 < crazy2be> i.e.  can execution be deferred until the request has
completed or somehow cached?
00:17 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
00:17 < prudhvi> calculate and return a bunch of hash values
00:17 < prudhvi> crazy2be: yes
00:18 < crazy2be> which?
00:19 < prudhvi> yes, the calculation of hash values, is not dependent on
the page-output, it can happen on the backend, totally transparent to the user.
00:19 < crazy2be> oh ok
00:19 < crazy2be> where do you store the values when you are done?
00:19 -!- ericvh [~Adium@cpe-72-177-122-77.austin.res.rr.com] has quit [Quit:
Leaving.]
00:19 < prudhvi> crazy2be: back to a Database.
00:19 < f2f> i imagine magn3ts was referring to "system software research is
irrelevant" rather than the es project.  the former is by pike and inspired the
latter :)
00:20 -!- avelino [~avelino@unaffiliated/avelino] has quit [Remote host closed the
connection]
00:20 < crazy2be> prudhvi: Should be easy to do async then
00:20 * magn3ts may have mistakenly given Pike too much credit and may not have a
good grasp on the project yet too :P
00:21 < crazy2be> just have a function that wraps the calculation function
and puts the values in the database
00:21 < crazy2be> and call that using go dbFunc()
00:21 < crazy2be> i.e.
00:21 < crazy2be> go dbFunc(x, y)
00:21 < crazy2be> or you can use an unnamed function (closure)
00:21 < crazy2be> same difference really
00:23 < prudhvi> crazy2be: yes
00:25 -!- sunfmin [~sunfmin@115.195.136.136] has joined #go-nuts
00:35 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read
error: Connection reset by peer]
00:37 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
00:39 -!- kergoth_ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has joined #go-nuts
00:39 < crazy2be> skelterjohn: I'm a bit confused how gb works with unit
tests
00:39 < crazy2be> The wiki says "If you want to do some blackbox testing,
put in a test directory, and the _test.go files a different package name.  gb does
not require that a directory have any regular package source in order to run
tests."
00:40 < crazy2be> but what if your tests are setting private fields in the
package's structs?
00:40 < crazy2be> i.e.  in the early stages of testing
00:40 < crazy2be> and how do you determine what the different package name
should be?
00:41 -!- ccc [~macroron@c-76-26-54-186.hsd1.fl.comcast.net] has joined #go-nuts
00:41 < chilts> crazy2be: call it <package>_test
00:42 < chilts> similar to the filename
00:42 < chilts> ie package in package.go, package_test in package_test.go
00:43 < crazy2be> hmm
00:47 < crazy2be> huh
00:47 < crazy2be> gb doesn't assume a GOROOT of ~/go if not set
00:50 -!- EvilJStoker [jstoker@unaffiliated/jstoker] has joined #go-nuts
00:55 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read
error: Connection reset by peer]
00:57 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
00:58 < str1ngs> I guess its safe to assume all reader/writers close there
underlying io when you close them?
00:58 -!- dfr|youtube [~dfr|work@nat/google/x-qnsxjkusrvvksqri] has quit [Remote
host closed the connection]
01:01 -!- kergoth_ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has quit [Read error:
Connection reset by peer]
01:02 -!- iant [~iant@66.109.104.221] has quit [Quit: Leaving.]
01:05 <@adg> str1ngs: ReadClosers and WriteClosers should, yes
01:05 < knowmercy> well I thought I wanted to write a upnp media server in
go but since I don't know how to implement upnp I don't think I'm going to get
very far
01:05 < crazy2be> what happens if you convert a utf-8 string to a []byte and
it has unicode characters?
01:06 <@adg> str1ngs: but often WriteClosers (like a gzip.Writer) will wrap
a Writer, not a WriteCloser, so you need to close both
01:06 -!- chadkouse [~Adium@rrcs-74-218-87-242.central.biz.rr.com] has quit [Quit:
Leaving.]
01:06 <@adg> (nor should they, really)
01:07 < chilts> wouldn't closing the wrapper close the wrapped?
01:07 < str1ngs> adg: ok this is good to know, I better check the code.
just so happens this is gzip/tar related
01:07 -!- unCork[home] [Cork@h27n1c1o1042.bredband.skanova.com] has joined
#go-nuts
01:07 -!- Cork[home] [Cork@firefox/community/cork] has quit [Disconnected by
services]
01:08 < str1ngs> also as far as I can see I cant wrap tar/gzip while
compressing unlike decompression
01:09 < knowmercy> in this talk andrew did he said go is orthogonal...  what
does that mean?
01:09 < f2f> it means concepts don't depend on each other
01:10 < f2f> for example, interfaces don't really depend on the type system
01:10 < knowmercy> ok
01:11 < knowmercy> generally considered a good thing
01:12 < f2f> one of the best "orthogonal" examples in my experience is that
you don't have to predefine the interfaces that your type implements
01:12 < f2f> it either does, or does not.  to be determined at compile time.
01:12 < f2f> with interface{}'s exception
01:12 < knowmercy> I need to write more go code I think
01:12 <@adg> chilts: if you're only wrapping a Writer, how does it know to
Close it?  the wrapper type only sees the Write method
01:12 < f2f> a lot of boilerplate goes out the window
01:13 < knowmercy> Rob Pike's talk at standford is really good
01:13 < chilts> adg: ah true ...  I see it now
01:13 < chilts> makes sense :)
01:13 <@adg> chilts: it _could_ do a type assertion to io.Closer and close
it, but that would be surprising
01:14 <@adg> and inconvenient in many cases - like when i'm writing a Zip
file with a section that's Deflate encoded, I don't want my flate.Writer to close
the underlying Zip file (I'm not done with it)
01:15 < chilts> knowmercy: is that talk on YouTube somewhere?  I've seen
most of them, but not sure I've seen that one
01:15 < f2f> adg, go gopher real world experience for you: my daughter
thought it was an owl before I explained it was a gopher.  then, everybody at her
daycare thought it was an owl too :)
01:15 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read
error: Connection reset by peer]
01:16 < f2f> owls are good at pretending to be gophers, i guess.
01:16 -!- ccc12 [~Adium@140.109.98.187] has quit [Quit: Leaving.]
01:16 -!- ccc1 [~Adium@140.109.98.187] has joined #go-nuts
01:17 <@adg> cheeky owls :)
01:17 < knowmercy> one sec chilts http://www.youtube.com/watch?v=7VcArS4Wpqk
01:17 < f2f> chilts: $GOROOT/doc/talks/go_talk-20100112.html
01:17 < str1ngs> mr.  gopher why what big eyes you have :P
01:17 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
01:18 < f2f> i want to put the owl on my desk, but she likes it too much to
relinquish access to it.
01:18 < knowmercy> f2f: it's not a google sponsored talk so I'm not sure if
it's up there
01:19 < f2f> is that not the same talk?
01:19 < f2f> the one in doc/talks?
01:23 < niemeyer> chilts: ping
01:24 -!- sunfmin [~sunfmin@115.195.136.136] has quit [Quit: sunfmin]
01:24 < chilts> niemeyer: pong
01:24 < niemeyer> chilts: Hey!
01:24 < chilts> :)
01:25 < niemeyer> chilts: I'm reviewing your sdb branch..  I'm trying to
figure what's the best way to proceed with it
01:25 -!- sunfmin [~sunfmin@115.195.136.136] has joined #go-nuts
01:25 < chilts> ok, what are the options?
01:25 -!- sunfmin [~sunfmin@115.195.136.136] has quit [Client Quit]
01:25 < chilts> I obviously need to flesh it out a bit more ...  and test it
a bit more :)
01:26 < niemeyer> chilts: Right..  one option is holding it off until you
sort it out
01:26 < niemeyer> chilts: A different option is getting that base in place
01:26 < niemeyer> chilts: and debating about a few things to improve it
01:26 < chilts> I'm happy to hear any thoughts
01:27 < niemeyer> chilts: I'm tempted to merge and go from there
01:27 < chilts> also, I have some ideas for the *Attributes operations ...
I might have to do something interesting with marshalling/unmarshalling
01:27 < chilts> ok, sounds good
01:27 < niemeyer> chilts: One thing we need is integration tests
01:27 < chilts> right
01:27 < niemeyer> chilts: It's important to touch base with reality
01:28 < chilts> I'll crack on with those too
01:28 < chilts> presumably whoever runs the integration tests would somehow
have to pass their credentials to the test somehow?
01:28 -!- exch [~blbl@ip34-181-209-87.adsl2.static.versatel.nl] has quit [Ping
timeout: 276 seconds]
01:28 < niemeyer> chilts: Yeah, check out how it's done in EC2 and S3
01:28 -!- exch [~blbl@ip34-181-209-87.adsl2.static.versatel.nl] has joined
#go-nuts
01:29 < chilts> ah, I must have missed those :/
01:29 < niemeyer> chilts: You can mimic the logic there
01:29 < chilts> ok
01:29 < chilts> ahah, ec2i_test.go :D
01:29 < chilts> heh, I _did_ see them, I must have just passed them by
01:29 < chilts> ah well, I got most of the rest
01:30 < niemeyer> chilts: Note they only run if you provide a flag
01:30 < chilts> ok, gotchyer ...  I thought there must be some magic
somewhere
01:30 < chilts> thanks for letting me know :)
01:30 < crazy2be> hrm
01:30 < crazy2be> whadya know
01:30 < niemeyer> chilts: re.  CreateDomainOpt and ListDomainsOpt..  does it
really make sense to have those types?
01:31 < niemeyer> and DeleteDomainOpt
01:31 < crazy2be> <b>foo<i>bar</b>!</i> isn't proper
(x)html
01:31 < chilts> I guess I wanted it all to be symmetrical
01:31 < chilts> but I'm happy if they aren't needed
01:31 < crazy2be> which usually makes sence, but is kinda wierd in this case
01:31 < chilts> also, it's my first real hack on Go so I'm just kinda
feeling my way around for the moment :)
01:31 < niemeyer> chilts: I've only used that trick when it becomes actually
inconvenient to use normal parameters
01:32 < chilts> ah ok, though I did like that idea
01:32 < niemeyer> chilts: E.g.  RunInstances has *16* options
01:32 < chilts> I'm not a bit fan of positional parameters, I must admit, so
there is a little of that opinion coming through there :)
01:32 < chilts> yeah, I see what you mean
01:32 < chilts> happy to go with your gut instinct :D
01:33 < niemeyer> chilts: It's a good idea for those cases, but if there are
a couple (or zero) parameters, positional is the convention to go with
01:33 < chilts> yeah, maybe a limit of 3 or 4?
01:33 < niemeyer> chilts: Right..
01:33 < niemeyer> chilts: It's also a bit related to the number of required
params
01:33 < chilts> yeah, I was gonna say that too
01:34 < niemeyer> chilts: We can debate specific cases, though
01:34 < chilts> I'll review on a case by case basis then
01:34 < chilts> yup
01:34 < niemeyer> chilts: Alright, I'm just merging your current sdb as is
01:34 < chilts> any other thoughts or does it look ok so far?
01:34 < niemeyer> chilts: Once you have something on top of the current
revision, please submit a merge proposal
01:34 < chilts> will do
01:34 < niemeyer> chilts: It looks quite good
01:35 < chilts> probably something this weekend (last weekend was a
write-off) :)
01:35 < chilts> thanks, and thanks again for all your help :)
01:35 < niemeyer> chilts: No problem, thanks for the code!
01:35 < chilts> my pleasure
01:35 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read
error: Connection reset by peer]
01:37 < chilts> it's good to have had something there already, so I get a
feel for how go does things ...  would have been harder for me to start from
scratch
01:37 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
01:38 -!- smw [~stephen@unaffiliated/smw] has quit [Ping timeout: 260 seconds]
01:38 -!- hargettp [~hargettp@pool-71-174-142-225.bstnma.east.verizon.net] has
quit [Quit: Linkinus - http://linkinus.com]
01:39 < niemeyer> chilts: I know what you mean..  copy & paste rules the
world
01:39 < chilts> heh
01:39 < chilts> niemeyer: what's the flag to run the integration tests?
01:40 < niemeyer> chilts: Let me look :)
01:40 < niemeyer> chilts: -i
01:40 < niemeyer> chilts: Check the top of suite_test.go
01:40 < chilts> ah, I see, it's in the suite file :)
01:41 < chilts> must be a slow day for me :)
01:41 < niemeyer> chilts: No worries
01:42 < niemeyer> chilts: Note the target branch in
https://code.launchpad.net/~andychilton/goamz/ec2/+merge/72292 is wrong
01:42 < niemeyer> chilts: It should be lp:goamz/ec2 rather than goamz/aws
01:43 < chilts> I think I mentioned this the other day ...  when I did the
merge request, I got it wrong somehow
01:43 < niemeyer> chilts: Resubmitted here:
01:43 < chilts> I just said to ignore it ...  sorry about that
01:43 < niemeyer>
https://code.launchpad.net/~andychilton/goamz/ec2/+merge/72818
01:43 < chilts> sweet, thanks :)
01:45 < niemeyer> chilts: and the diff is available
01:45 < niemeyer> chilts: np
01:45 < prudhvi> to what type does go unmarshall json date objects to?
01:46 < str1ngs> depends on the struct you pass it
01:47 < prudhvi> niemeyer: any idea on when aws api supports Route 53 ?
01:47 < str1ngs> prudhvi: ah date I miss read that.
01:48 < chilts> prudhvi: I'll probably be implementing that in the next few
weeks or so
01:48 < chilts> unless someone gets to it first
01:48 < chilts> prudhvi: I'm doing SimpleDB now and Route53 is next on my
list
01:48 < prudhvi> chilts: awesome, i am actually planning to write one
myself.  But, thanks
01:48 < niemeyer> prudhvi: Does JSON have a date type?
01:49 < chilts> prudhvi: unfortunately I have a contract that uses Perl and
JavaScript ...  not Go, which is why it's an evening/weekend thing for me at the
moment
01:49 < chilts> prudhvi: but please go for it if you feel like it
01:49 < niemeyer> prudhvi: re.  Route 53, do you mean the Go library, or AWS
itself?
01:49 < prudhvi> its usually an ISO 8601 date format
01:49 < niemeyer> prudhvi: Yeah, but that's not part of the spec
01:49 < niemeyer> prudhvi: It's up to the app really
01:50 < prudhvi> niemeyer: Route 53 support in your AWS api.  Which i use it
extensively :)
01:50 < niemeyer> prudhvi: Aha, I see
01:50 < niemeyer> prudhvi: Well, we can support it sooner in case it's
necessary :-)
01:50 < prudhvi> If i could spin up an instance and dynamically set the
hostname makes my developers happy
01:51 < niemeyer> prudhvi: Cool, I'll add that to the queue
01:51 < str1ngs> prudhvi: can you paste an example of the json output?
01:51 < chilts> niemeyer: depending on whether someone jumps in first,
Route53 is next on my list after SimpleDB :)
01:51 < prudhvi> str1ngs: http://developer.github.com/v3/repos/commits/
01:51 < niemeyer> prudhvi: A bit overwhelmed with Ensemble right now, so
it's been eating my personal time too, but I'll try to do that asap
01:51 < prudhvi> date in commiter object
01:51 < niemeyer> prudhvi: What's your email?
01:51 -!- qeed [~qeed@adsl-74-235-197-58.mco.bellsouth.net] has quit [Quit:
Leaving]
01:52 < niemeyer> chilts: Ah, sweet!
01:52 < str1ngs> prudhvi: so string
01:52 < str1ngs> prudhvi: but you can make your own marshaller that will
convert to say time
01:55 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read
error: Connection reset by peer]
01:57 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
01:57 < niemeyer> chilts: http://goneat.org/lp/goamz/sdb
02:00 < niemeyer> chilts: I'll rename Sencode to Encode
02:00 < niemeyer> chilts: Please note this is unrelated to http
02:00 < niemeyer> chilts: The set of encoded characters is very particular
02:00 < niemeyer> chilts: as it's part of a signature
02:01 < niemeyer> chilts: http actually has URLEscape
02:08 -!- angasule [~angasule@190.2.33.49] has quit [Ping timeout: 250 seconds]
02:10 < chilts> ah ok, I think it was sencode in the other one, so I kept it
the same (not knowing the exact reason why it was named so)
02:10 < chilts> I noticed that http.URLEscape expects a complete URL, which
also wasn't good to us either :)
02:11 < chilts> luckily I figured the signature out pretty easily since I've
done it before in my Perl libraries (integration tests will prove that though
...)!
02:14 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has quit [Ping
timeout: 245 seconds]
02:15 < niemeyer> chilts: Yeah..  I'm really more comfortable we have this
inside goamz itself
02:15 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read
error: Connection reset by peer]
02:15 < niemeyer> chilts: Since we know it won't be touched..  there are
tons of ways to encode URLs..  if we encode something slightly differently,
signatures will break
02:15 < chilts> so moving it to aws was alright then?
02:15 < chilts> true
02:16 < chilts> I mean aws.go
02:16 < niemeyer> chilts: It is alright yeah
02:16 < chilts> sweet
02:17 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
02:22 -!- clr_ [~colin@c-67-183-138-2.hsd1.wa.comcast.net] has joined #go-nuts
02:26 < niemeyer> chilts: Alright, I think all of your changes are in
02:26 < niemeyer> chilts: Sorry for the delay..  things have been
significantly crazyer than usual lately
02:27 -!- dRbiG [p@bofh.edu.pl] has quit [Ping timeout: 268 seconds]
02:27 < chilts> niemeyer: not a problem ...  I've been busy the last few
days too :)
02:28 < chilts> I'll just send a merge request in a few days time when I've
done a bit more (or finished off sdb) :)
02:28 < niemeyer> chilts: Sweet
02:30 -!- smw [~stephen@unaffiliated/smw] has joined #go-nuts
02:30 -!- kergoth_ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has joined #go-nuts
02:30 -!- kergoth_ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has quit [Client
Quit]
02:30 -!- dfr|youtube [~dfr|work@c-69-181-71-244.hsd1.ca.comcast.net] has joined
#go-nuts
02:33 -!- skelterjohn_ [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
02:34 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read
error: Connection reset by peer]
02:35 < str1ngs> hmm seens you can wrap a tar/gzip writer.  not what I
expected
02:35 < str1ngs> seems*
02:36 -!- dfr|youtube [~dfr|work@c-69-181-71-244.hsd1.ca.comcast.net] has quit
[Remote host closed the connection]
02:51 -!- xash [~xash@d004066.adsl.hansenet.de] has quit [Quit: Lost terminal]
02:54 -!- nteon [~nteon@ool-4a58e438.dyn.optonline.net] has quit [Ping timeout:
245 seconds]
03:08 -!- gridaphobe [~gridaphob@cpe-74-68-151-24.nyc.res.rr.com] has quit [Remote
host closed the connection]
03:19 -!- alm [~alm@unaffiliated/alm] has quit [Quit: leaving]
03:24 < f2f> ухм
03:24 < f2f> err, sorry
03:26 -!- moraes [~moraes@189.103.177.124] has quit [Quit: Leaving]
03:29 -!- niemeyer [~niemeyer@200-102-220-163.pltce701.dsl.brasiltelecom.net.br]
has quit [Ping timeout: 240 seconds]
03:42 -!- Bigbear1 [~Cody@S010600222dcddd0f.cg.shawcable.net] has joined #go-nuts
03:47 -!- NiteRain [~NiteRain@c-98-254-236-21.hsd1.fl.comcast.net] has joined
#go-nuts
03:48 -!- dustyw [~dustyw@c-98-247-248-194.hsd1.wa.comcast.net] has quit [Ping
timeout: 260 seconds]
03:49 -!- benjack [~benjack@cm224.omega195.maxonline.com.sg] has quit [Quit:
Leaving.]
03:59 -!- Bigbear1 [~Cody@S010600222dcddd0f.cg.shawcable.net] has quit [Read
error: Connection reset by peer]
04:00 -!- Ginto8 [~ginto8@pool-173-72-98-105.cmdnnj.fios.verizon.net] has joined
#go-nuts
04:02 -!- dustyw [~dustyw@c-98-247-248-194.hsd1.wa.comcast.net] has joined
#go-nuts
04:06 -!- benjack [~benjack@bb116-15-174-30.singnet.com.sg] has joined #go-nuts
04:15 -!- djbrown [~djbrown@unaffiliated/djbrown] has joined #go-nuts
04:24 < prudhvi> If i have a template like this http://pastie.org/2426123
how can i extract the value of an object in a Output section inside of a Files
section
04:32 -!- danilo04 [~danilo04@cpe-002275a40cdf.cpe.cableonda.net] has joined
#go-nuts
04:35 < Ginto8> A little question about anonymous fields...  you can access
the fields of the anonymous field directly right?
04:35 < Ginto8> not just methods
04:36 < f2f> easy to check :)
04:36 < crazy2be> anonymous fields?  Like embedded types?
04:36 < Ginto8> yep
04:36 < crazy2be> hmmm, I assumed so
04:37 < crazy2be> never tried
04:37 < Ginto8> f2f, I don't have go fully installed yet :P
04:38 < Ginto8> the standard seems to say so, but I seem to remember there
being some exception about that
04:44 -!- crazy2be [~crazy2be@S01060012171a573b.cg.shawcable.net] has quit [Ping
timeout: 240 seconds]
04:45 -!- vmil86 [~vmil86@78.57.250.113] has joined #go-nuts
04:45 < f2f> if two anonymous fields implement the same method you'll get an
error.
04:45 < f2f> no inheritance in go
04:58 -!- fabled [~fabled@83.145.235.194] has joined #go-nuts
05:03 -!- dfr|youtube [~dfr|work@c-69-181-71-244.hsd1.ca.comcast.net] has joined
#go-nuts
05:07 -!- rejb [~rejb@unaffiliated/rejb] has quit [Read error: Connection reset by
peer]
05:07 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
05:12 -!- knowmercy [~orbit@adsl-69-221-165-38.dsl.akrnoh.ameritech.net] has quit
[Ping timeout: 264 seconds]
05:19 -!- clr_ [~colin@c-67-183-138-2.hsd1.wa.comcast.net] has quit [Quit:
Ex-Chat]
05:27 -!- rcrowley [~rcrowley@c-71-202-44-233.hsd1.ca.comcast.net] has quit [Quit:
Computer has gone to sleep.]
05:30 -!- Nisstyre [~yours@infocalypse-net.info] has joined #go-nuts
05:31 -!- dfr|youtube [~dfr|work@c-69-181-71-244.hsd1.ca.comcast.net] has quit
[Remote host closed the connection]
05:34 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has joined #go-nuts
05:34 -!- mode/#go-nuts [+v iant] by ChanServ
05:37 -!- danilo04 [~danilo04@cpe-002275a40cdf.cpe.cableonda.net] has quit [Ping
timeout: 264 seconds]
05:38 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
05:49 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has quit [Ping
timeout: 245 seconds]
05:49 -!- danilo04 [~danilo04@cpe-002275a40cdf.cpe.cableonda.net] has joined
#go-nuts
05:50 -!- iant [~iant@216.239.45.130] has joined #go-nuts
05:50 -!- mode/#go-nuts [+v iant] by ChanServ
06:22 -!- remy_o [~babar@archlinux/developer/remy-o] has joined #go-nuts
06:28 -!- photron [~photron@port-92-201-190-191.dynamic.qsc.de] has joined
#go-nuts
06:30 -!- jajamana [~jcb@cm-84.209.210.27.getinternet.no] has joined #go-nuts
06:31 -!- danilo04 [~danilo04@cpe-002275a40cdf.cpe.cableonda.net] has quit [Quit:
Leaving]
06:34 -!- rajender [~rajender@122.183.102.226] has joined #go-nuts
06:41 -!- jajamana [~jcb@cm-84.209.210.27.getinternet.no] has quit [Quit: This
computer has gone to sleep]
06:43 -!- meling [~meling@85.252.66.250] has quit [Remote host closed the
connection]
06:56 -!- benjack1 [~benjack@bb116-15-174-30.singnet.com.sg] has joined #go-nuts
06:57 -!- benjack1 [~benjack@bb116-15-174-30.singnet.com.sg] has quit [Client
Quit]
06:58 -!- benjack1 [~benjack@bb116-15-174-30.singnet.com.sg] has joined #go-nuts
06:59 -!- remy_o [~babar@archlinux/developer/remy-o] has quit [Ping timeout: 240
seconds]
06:59 -!- benjack [~benjack@bb116-15-174-30.singnet.com.sg] has quit [Ping
timeout: 240 seconds]
07:08 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has joined #go-nuts
07:09 -!- moraes [~moraes@189.103.177.124] has joined #go-nuts
07:12 -!- Niedar [~dgdfg@ip68-99-166-222.hr.hr.cox.net] has quit [Ping timeout:
252 seconds]
07:14 -!- meling [~meling@85.252.66.250] has joined #go-nuts
07:18 -!- tvw [~tv@e176001151.adsl.alicedsl.de] has joined #go-nuts
07:20 -!- aho [~nya@fuld-590c7dea.pool.mediaWays.net] has quit [Quit:
EXEC_over.METHOD_SUBLIMATION]
07:24 -!- Slant [~scott@124-148-185-254.dyn.iinet.net.au] has joined #go-nuts
07:24 -!- meling [~meling@85.252.66.250] has quit [Remote host closed the
connection]
07:26 -!- Husio [husiatyn@oceanic.wsisiz.edu.pl] has quit [Read error: Operation
timed out]
07:26 -!- Soultaker [~Soultaker@hell.student.utwente.nl] has quit [Read error:
Operation timed out]
07:26 -!- Soultaker [~Soultaker@hell.student.utwente.nl] has joined #go-nuts
07:26 -!- Husio [husiatyn@oceanic.wsisiz.edu.pl] has joined #go-nuts
07:27 -!- zanget [~zanget@hurf.durf.me] has quit [Read error: Operation timed out]
07:27 -!- zanget [~zanget@hurf.durf.me] has joined #go-nuts
07:31 -!- yogib [~yogib@131.234.59.64] has joined #go-nuts
07:39 -!- samuell [~samuel@pc2-samuel.uppmax.uu.se] has joined #go-nuts
07:39 -!- yogib [~yogib@131.234.59.64] has quit [Quit: yogib]
07:41 -!- Eataix [~Eataix@130.56.93.42] has joined #go-nuts
07:44 -!- exch [~blbl@ip34-181-209-87.adsl2.static.versatel.nl] has quit [Ping
timeout: 258 seconds]
07:45 -!- exch [~blbl@87.209.181.34] has joined #go-nuts
07:46 -!- odoacre [~antonio@218.241.169.34] has quit [Ping timeout: 250 seconds]
07:51 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: sudo rm -R /]
08:03 -!- TimKack [~tkack@e196069.upc-e.chello.nl] has joined #go-nuts
08:08 -!- erus` [~chatzilla@mailgate.ips-international.com] has joined #go-nuts
08:08 -!- odoacre [~antonio@us.exoweb.net] has joined #go-nuts
08:12 -!- Eataix [~Eataix@130.56.93.42] has quit []
08:14 -!- Slant [~scott@124-148-185-254.dyn.iinet.net.au] has quit [Quit: Slant]
08:18 -!- odoacre [~antonio@us.exoweb.net] has quit [Ping timeout: 258 seconds]
08:21 -!- odoacre [~antonio@us.exoweb.net] has joined #go-nuts
08:26 -!- zcram [~zcram@8.177.190.90.sta.estpak.ee] has joined #go-nuts
08:31 < moraes> zeebo, now template is parsed manually, so {x,y} repetitions
won't be broken inside regexps (and it can detect unbalanced braces).
08:31 -!- ccc [~macroron@c-76-26-54-186.hsd1.fl.comcast.net] has quit [Quit:
leaving]
08:32 < moraes> (and curiously, parsing manually was faster than the
previous pure-regexp based approach)
08:32 < moraes> and go'od morning.
08:33 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has left #go-nuts []
08:34 < adamhassel> Can I assign a slice range directly to a couple of vars?
As in 'i, j := slice[0:2]' , where i,j are ints, and slice is []int?
08:37 -!- Solak [~stijnw@cthia.xs4all.nl] has joined #go-nuts
08:38 -!- TimKack [~tkack@e196069.upc-e.chello.nl] has quit [Quit: TimKack]
08:39 < str1ngs> you mean like i,j := slice[0:2], slice[0:2] ?
08:40 < adamhassel> no, I want to extract values from slice and store them
in non-slices...
08:40 < adamhassel> Actually, 'slice' is a function, that returns a slice,
and I want to avoid a temp var and calling it twice.
08:41 < str1ngs> in that case use the index
08:43 -!- photron [~photron@port-92-201-190-191.dynamic.qsc.de] has quit [Ping
timeout: 260 seconds]
08:43 < adamhassel> And how do I do that, without doing
i,j:=slice[0],slice[1]?
08:43 < xyproto> adamhassel: you can have i, j := splitInTwo(slice[0:2])
08:43 -!- odoacre [~antonio@us.exoweb.net] has quit [Ping timeout: 258 seconds]
08:43 < xyproto> adamhassel: where splitInTwo is a very simple function to
write
08:43 < str1ngs> what xyproto is a good approach
08:43 < str1ngs> said*
08:44 < adamhassel> xyproto, right, but there's no native way to do it?
08:44 < xyproto> adamhassel: there are a few omissions in Go, on purpose.
It's the "splitInTwo" function, min, max and several more.
08:44 < xyproto> adamhassel: I assume you come from a Python background?
08:44 < adamhassel> splitInN, actually, is the general functionality we need
:)
08:44 < adamhassel> No, perl :)
08:44 < xyproto> adamhassel: I see.  :)
08:44 < adamhassel> And C
08:44 -!- erus` [~chatzilla@mailgate.ips-international.com] has quit [Ping
timeout: 245 seconds]
08:45 < xyproto> adamhassel: However, as I understand the serious hardcore
Go-author developer-peeps, splitN is rarely needed, so one can just write
splitInTwo and splitInThree and be happy.  How many splits do you really want on
one line of code?
08:45 -!- erus` [~chatzilla@mailgate.ips-international.com] has joined #go-nuts
08:46 < xyproto> adamhassel: perl and C, that should give a good background
to appreciate Go, I would think
08:46 < adamhassel> Well, say I want to split a <char> delimited
string into individual vars....
08:46 < adamhassel> xyproto, it does indeed.  I am a fan!
08:46 < xyproto> adamhassel: great, me too :)
08:46 < str1ngs> adamhassel: this is strings.Split or am i reading how you
want to split this wrong?
08:46 < xyproto> adamhassel: well, if you wish to split a <char>
delimited string into 1000 variables, you probably want a loop in any case?
08:47 < adamhassel> str1ngs, it is indeed, except it returns a slice.  Hence
with my predicament.
08:47 < adamhassel> xyproto, say I only want the n first, or n last or
whatever.
08:47 -!- odoacre [~antonio@us.exoweb.net] has joined #go-nuts
08:48 < xyproto> adamhassel: then you could loop over a slice
08:48 < str1ngs> adamhassel: ah you can do some stuff with strings.Join
also.  but seems maybe thats now what you are after.
08:48 < adamhassel> True, there are multiple ways to go about it with more
code.
08:48 < str1ngs> need more context
08:49 < adamhassel> I was looking for something similar to perls my (a, b) =
array[0,1]
08:49 < xyproto> I think the core of the apple is that once a programmer
needs "a, b, c, d, e ...  := functionThatReturnsABazillion", a loop and/or slice
may be less work
08:50 < str1ngs> I have found with go, its best to put "insert other
language here" aside
08:50 < xyproto> adamhassel: if you just want two elements, write a tiny
function that returns two elements
08:50 < xyproto> adamhassel: other than that, I bet some trickery is
possible with the interface{} type
08:50 < xyproto> adamhassel: or the "unsafe" module
08:50 < str1ngs> I would think there is no need for unsafe here :P
08:51 < str1ngs> almost never a reason to use unsafe.
08:51 < xyproto> str1ngs: ;)
08:51 < adamhassel> Yeah, I won't go down that path.
08:51 < adamhassel> Especially since this will potentially be production
code at some point :)
08:51 < xyproto> str1ngs: just illustrating a point, not saying there's a
reason to go all unsafe, like not taking an umbrella to work on day, just in case
:O :P ;)
08:52 < xyproto> *every day :P
08:52 < str1ngs> xyproto: no really unless you are using cgo . there is no
need for unsafe.
08:52 < xyproto> bad morning humor, sorry :P
08:52 < str1ngs> ah your just joking.  sorry my bad.
08:53 < xyproto> str1ngs: you're right, unsafe is not needed in this case :)
08:54 -!- erus` [~chatzilla@mailgate.ips-international.com] has quit [Read error:
Connection reset by peer]
08:54 < xyproto> adamhassel: if you have a specific task that requires the
splitN functionality, I'm sure someone here will give you working Go code to solve
it, once presented
08:55 < adamhassel> Yeah, that's OK, I got what I came for.  Thanks :)
08:57 -!- erus` [~chatzilla@mailgate.ips-international.com] has joined #go-nuts
08:58 -!- valentin_ [~valentin@darkstar2.fullsix.com] has joined #go-nuts
09:00 -!- odoacre [~antonio@us.exoweb.net] has quit [Ping timeout: 252 seconds]
09:16 -!- preflex_ [~preflex@unaffiliated/mauke/bot/preflex] has joined #go-nuts
09:17 -!- odoacre [~antonio@218.241.169.34] has joined #go-nuts
09:18 -!- yogib [~yogib@webauth-79-196.uni-paderborn.de] has joined #go-nuts
09:19 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has quit [Ping
timeout: 276 seconds]
09:49 -!- tvw [~tv@e176001151.adsl.alicedsl.de] has quit [Remote host closed the
connection]
09:50 -!- erus`_ [~chatzilla@mailgate.ips-international.com] has joined #go-nuts
09:52 -!- erus` [~chatzilla@mailgate.ips-international.com] has quit [Ping
timeout: 240 seconds]
09:55 -!- erus` [~chatzilla@mailgate.ips-international.com] has quit [Quit:
ChatZilla 0.9.87 [Firefox 6.0/20110811165603]]
09:59 -!- benjack1 [~benjack@bb116-15-174-30.singnet.com.sg] has quit [Quit:
Leaving.]
10:04 -!- foxen [~foxen@212.12.18.237] has joined #go-nuts
10:04 -!- foxen [~foxen@212.12.18.237] has left #go-nuts []
10:07 -!- noam [~noam@87.69.42.61.cable.012.net.il] has quit [Ping timeout: 258
seconds]
10:10 -!- yogib [~yogib@webauth-79-196.uni-paderborn.de] has quit [Quit: yogib]
10:10 -!- yogib [~yogib@webauth-79-196.uni-paderborn.de] has joined #go-nuts
10:11 -!- erus` [~chatzilla@mailgate.ips-international.com] has joined #go-nuts
10:12 -!- yogib [~yogib@webauth-79-196.uni-paderborn.de] has quit [Remote host
closed the connection]
10:12 -!- yogib [~yogib@131.234.59.64] has joined #go-nuts
10:13 -!- avelino [~avelino@unaffiliated/avelino] has joined #go-nuts
10:19 -!- noam [~noam@87.69.42.61.cable.012.net.il] has joined #go-nuts
10:23 -!- meling [~meling@85.252.66.250] has joined #go-nuts
10:25 -!- meling [~meling@85.252.66.250] has quit [Remote host closed the
connection]
10:26 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
10:26 < nsf> oh, and inlining comes to Go
10:27 < nsf> that's very neat
10:28 < erus`> where
10:28 < erus`> when?
10:28 < erus`> how?
10:28 < nsf> it's in review somewhere
10:28 < chilts> evening all :)
10:29 < nsf> http://codereview.appspot.com/4849051/
10:29 < rajender> nsf, is it that significant?
10:30 < nsf> inlining is one of the best optimizations for computation
intensitive loops
10:30 < nsf> for example ray tracing
10:31 < rajender> oh, good
10:31 < nsf> without inlining ray tracers give very bad performance
10:31 < nsf> of course you can do all manually
10:31 < nsf> but that's not the best idea ever :)
10:31 < rajender> have checked the implementation?
10:32 < nsf> no, I haven't
10:32 -!- nekoh [~nekoh@dslb-088-069-135-148.pools.arcor-ip.net] has joined
#go-nuts
10:32 < rajender> is escape analysis CL related to this?
10:32 < nsf> probably, I don't know
10:32 < nsf> author is the same
10:32 -!- schilly [~schilly@boxen.math.washington.edu] has quit [Ping timeout: 252
seconds]
10:33 < nsf> as far as I understand
10:33 < nsf> Luuk van Dijk
10:33 < rajender> ya thats why i asked
10:33 < nsf> I have this simple test
10:34 < nsf> perlin noise 2d image, 256x256
10:34 < nsf> drawing it 100 times
10:34 < nsf> currently Go is 6 times slower than C
10:34 < nsf> 3 times slower than D and C#
10:35 < nsf> and 4 times faster than pypy :D
10:35 < nsf> mostly floating point calculations
10:35 < nsf> and that's x86
10:35 < nsf> on x86_64 should be better probably
10:35 < rajender> lets see how this CL affects then...
10:36 < nsf> I'll definitely test it against both inlining and escape
analysis
10:36 < nsf> yeah
10:36 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts
10:37 -!- wrtp [~rog@host-92-23-125-43.as13285.net] has joined #go-nuts
10:37 -!- iXeno_ [~ixeno@106.80-203-229.nextgentel.com] has joined #go-nuts
10:38 < nsf> oh
10:38 < nsf> my distro has gccgo package
10:38 < nsf> I'll try it now as well
10:39 < nsf> well, it's about the same as C#
10:39 < nsf> with -O3
10:39 -!- iXeno [~ixeno@106.80-203-229.nextgentel.com] has quit [Ping timeout: 240
seconds]
10:40 < rajender> thats a good sign right?
10:40 < nsf> very close to D with -march=native -ffast-math
10:40 < nsf> D: 1.1s, gccgo: 1.2s
10:40 < nsf> well
10:41 < nsf> it could be better I guess
10:41 < nsf> gcc is known to be very good at optimizing FP math
10:49 < nsf> and C is still 2x times faster at least
10:50 < rajender> hmm
10:50 < str1ngs> http://code.google.com/p/google-api-go-client/
10:50 <@adg> str1ngs: :)
10:51 < nsf> https://gist.github.com/1170424
10:51 < nsf> here's the source code
10:51 < nsf> D, C and Go
10:53 < nsf> hm, I should try to tune few things also
10:53 < str1ngs> adg: thats alot of go code.
10:53 < str1ngs> nice to see
10:55 <@adg> str1ngs: it's generated
10:55 < str1ngs> I was wondering that
10:55 <@adg> the json files are the api spec in json schema:
http://code.google.com/p/google-api-go-client/source/browse/latitude/v1/latitude-api.json
10:59 -!- remy_tel [~remy_tel@80.214.4.206] has joined #go-nuts
11:14 < moraes> was curious about test benchmarks.  then bleh; nanoseconds
for 10k iterations?  bleh; i don't care.  bye.
11:20 -!- remy_tel [~remy_tel@80.214.4.206] has quit [Remote host closed the
connection]
11:29 -!- sebastianskejoe [~sebastian@5634688f.rev.stofanet.dk] has joined
#go-nuts
11:39 -!- yogib_ [~yogib@webauth-79-196.uni-paderborn.de] has joined #go-nuts
11:42 -!- yogib [~yogib@131.234.59.64] has quit [Ping timeout: 240 seconds]
11:53 -!- angasule [~angasule@190.2.33.49] has quit [Quit: Konversation
terminated!]
11:53 < xyproto> good news with the inlining
11:55 -!- odoacre [~antonio@218.241.169.34] has quit [Quit: Leaving]
12:03 < zozoR> inline recursive?  :D
12:08 -!- mlh [~mlh@c220-239-104-232.belrs4.nsw.optusnet.com.au] has quit [Ping
timeout: 272 seconds]
12:08 -!- mlh [~mlh@220.239.104.232] has joined #go-nuts
12:10 -!- meling [~meling@85.252.66.250] has joined #go-nuts
12:10 -!- noam [~noam@87.69.42.61.cable.012.net.il] has quit [Ping timeout: 252
seconds]
12:14 < xyproto> zozoR: do you miss optimized tail calls?
12:22 -!- noam [~noam@87.69.42.61.cable.012.net.il] has joined #go-nuts
12:24 -!- odoacre [~antonio@218.241.169.34] has joined #go-nuts
12:29 -!- Argue [~Argue@112.201.172.5] has joined #go-nuts
12:30 -!- mlh [~mlh@220.239.104.232] has quit [Ping timeout: 272 seconds]
12:30 -!- mlh [~mlh@c220-239-104-232.belrs4.nsw.optusnet.com.au] has joined
#go-nuts
12:38 -!- meling [~meling@85.252.66.250] has quit [Remote host closed the
connection]
12:38 -!- sunfmin [~sunfmin@115.197.45.90] has joined #go-nuts
12:40 -!- squeese [~squeese@cm-84.209.17.156.getinternet.no] has joined #go-nuts
12:52 -!- dreadlorde [dreadlorde@c-68-42-82-10.hsd1.mi.comcast.net] has joined
#go-nuts
12:55 < erus`> they have TCO now?  :)
12:55 < nsf> no
12:56 < jessta> it's hardly an optimisation
12:56 < erus`> stack traces are hard
12:59 -!- dreadlorde [dreadlorde@c-68-42-82-10.hsd1.mi.comcast.net] has quit [Ping
timeout: 240 seconds]
13:00 -!- dreadlorde [dreadlorde@c-68-42-82-10.hsd1.mi.comcast.net] has joined
#go-nuts
13:05 -!- franciscosouza [~francisco@201.7.186.67] has joined #go-nuts
13:06 -!- Eataix [~Eataix@CPE-121-223-176-127.lns1.civ.bigpond.net.au] has joined
#go-nuts
13:08 -!- pharris [~Adium@rhgw.opentext.com] has joined #go-nuts
13:08 < zeebo> ls
13:10 < xyproto> README
13:10 < xyproto> INSTALL
13:10 < xyproto> configure
13:10 < xyproto> Makefile
13:10 < Tonnerre> Permission denied
13:11 < erus`> cabal install myapp
13:11 -!- Kahvi [5b9b57fc@gateway/web/freenode/ip.91.155.87.252] has joined
#go-nuts
13:11 < xyproto> ;)
13:12 < erus`> if C had proper modules and stuff we wouldn't need all this
makefile pants
13:12 -!- moraes [~moraes@189.103.177.124] has quit [Ping timeout: 252 seconds]
13:13 < nsf> erus`: it's more complicated than that
13:13 < nsf> imho
13:13 < nsf> projects need generic build systems
13:14 < skelterjohn> i agree.
13:14 < nsf> generating documentation, man pages, icons, extracting version
information, connecting everything together
13:14 < nsf> a lot of work
13:14 < skelterjohn> wouldn't it be interesting if gb -i copied the contents
of the "documentation" package into a man page?
13:15 < skelterjohn> (no, it's not going to do that)
13:15 -!- Solak [~stijnw@cthia.xs4all.nl] has quit [Remote host closed the
connection]
13:16 -!- Solak [~stijnw@cthia.xs4all.nl] has joined #go-nuts
13:17 -!- niemeyer [~niemeyer@200-102-220-163.pltce701.dsl.brasiltelecom.net.br]
has joined #go-nuts
13:21 -!- Niedar [~dgdfg@ip68-99-166-222.hr.hr.cox.net] has joined #go-nuts
13:25 -!- ericvh [~Adium@cpe-72-177-122-77.austin.res.rr.com] has joined #go-nuts
13:27 -!- gridaphobe [~gridaphob@cpe-74-68-151-24.nyc.res.rr.com] has joined
#go-nuts
13:27 -!- exch [~blbl@87.209.181.34] has quit [Ping timeout: 240 seconds]
13:30 < str1ngs> I think that would be a good feature.
13:34 -!- exch [~blbl@ip34-181-209-87.adsl2.static.versatel.nl] has joined
#go-nuts
13:38 -!- squeese [~squeese@cm-84.209.17.156.getinternet.no] has quit [Remote host
closed the connection]
13:44 -!- kergoth_ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has joined #go-nuts
13:48 -!- rajender [~rajender@122.183.102.226] has quit [Quit: Leaving]
13:49 -!- nteon [~nteon@ool-4a58e438.dyn.optonline.net] has joined #go-nuts
13:52 -!- magn3ts [~magn3ts@colemickens.unl.edu] has quit [Ping timeout: 260
seconds]
13:54 -!- tvw [~tv@e176001151.adsl.alicedsl.de] has joined #go-nuts
13:55 < zozoR> nsf, you are awesome, how would you go about crosscompiling
from linux to windows enabling cgo?  :D
13:56 < zozoR> all.bash complains about windows.h not being found :3
13:56 < nsf> I haven't crosscompiled anything in my life
13:56 < aiju> hahaha
13:56 < aiju> wow
13:56 < nsf> zozoR: all I can say
13:56 < nsf> that cgo stuff involves gcc
13:56 < nsf> and crosscompiling with gcc is not easy at all
13:56 < nsf> (that's what I've heard)
13:57 < aiju> zozoR: install mingw on linux
13:57 < zozoR> done
13:57 -!- brandini [~orbit@metabug/brandon] has joined #go-nuts
13:57 < brandini> morning
14:02 -!- Netsplit *.net <-> *.split quits: djcapelis, alanl, rejb
14:02 -!- meling [~meling@85.252.66.250] has joined #go-nuts
14:03 -!- meling [~meling@85.252.66.250] has quit [Remote host closed the
connection]
14:06 -!- Netsplit over, joins: rejb, alanl, djcapelis
14:10 -!- Bigbear1 [~Cody@S010600222dcddd0f.cg.shawcable.net] has joined #go-nuts
14:15 -!- Kahvi [5b9b57fc@gateway/web/freenode/ip.91.155.87.252] has quit [Ping
timeout: 252 seconds]
14:20 -!- miker2 [~miker2@64.55.31.190] has joined #go-nuts
14:23 -!- meling [~meling@85.252.66.250] has joined #go-nuts
14:27 -!- rcrowley [~rcrowley@c-71-202-44-233.hsd1.ca.comcast.net] has joined
#go-nuts
14:27 -!- Cork[home] [Cork@h27n1c1o1042.bredband.skanova.com] has quit [Changing
host]
14:27 -!- Cork[home] [Cork@firefox/community/cork] has joined #go-nuts
14:35 -!- Eataix [~Eataix@CPE-121-223-176-127.lns1.civ.bigpond.net.au] has quit []
14:36 -!- elephants [~elephants@66.207.210.2] has joined #go-nuts
14:48 -!- rcrowley [~rcrowley@c-71-202-44-233.hsd1.ca.comcast.net] has quit [Quit:
Computer has gone to sleep.]
14:53 -!- tncardoso [~thiago@187.114.48.53] has joined #go-nuts
14:55 -!- kergoth__ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has joined #go-nuts
14:56 -!- kergoth_ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has quit [Ping
timeout: 240 seconds]
14:59 -!- molto_alfredo1 [~molto_alf@142.176.0.21] has joined #go-nuts
15:00 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.5]
15:00 -!- crazy2be [~crazy2be@S01060012171a573b.cg.shawcable.net] has joined
#go-nuts
15:01 -!- djbrown [~djbrown@unaffiliated/djbrown] has quit [Quit: leaving]
15:02 -!- molto_alfredo [~molto_alf@142.176.0.21] has quit [Ping timeout: 252
seconds]
15:03 -!- arauko [~araujo@190.73.44.29] has joined #go-nuts
15:03 -!- arauko [~araujo@190.73.44.29] has quit [Read error: Connection reset by
peer]
15:03 < crazy2be> go party()
15:08 -!- aho [~nya@fuld-590c7a4b.pool.mediaWays.net] has joined #go-nuts
15:23 -!- meling [~meling@85.252.66.250] has quit [Remote host closed the
connection]
15:23 -!- meling [~meling@85.252.66.250] has joined #go-nuts
15:24 -!- meling [~meling@85.252.66.250] has quit [Remote host closed the
connection]
15:29 -!- magn3ts [~magn3ts@colemickens.unl.edu] has joined #go-nuts
15:30 -!- tncardoso [~thiago@187.114.48.53] has quit [Quit: bye]
15:30 -!- fabled [~fabled@83.145.235.194] has quit [Ping timeout: 245 seconds]
15:32 -!- meling [~meling@85.252.66.250] has joined #go-nuts
15:32 -!- erus` [~chatzilla@mailgate.ips-international.com] has quit [Quit:
ChatZilla 0.9.87 [Firefox 6.0/20110811165603]]
15:32 -!- pjacobs [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has
joined #go-nuts
15:34 -!- magn3ts [~magn3ts@colemickens.unl.edu] has quit [Ping timeout: 240
seconds]
15:36 -!- dreadlorde [dreadlorde@c-68-42-82-10.hsd1.mi.comcast.net] has quit [Ping
timeout: 260 seconds]
15:38 -!- gzmask [~ray@corwin.cat.uregina.ca] has joined #go-nuts
15:39 -!- tvw [~tv@e176001151.adsl.alicedsl.de] has quit [Remote host closed the
connection]
15:39 -!- napsy [~luka@88.200.96.18] has quit [Quit: Lost terminal]
15:41 -!- Project_2501 [~Marvin@82.84.64.180] has joined #go-nuts
15:46 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
15:47 -!- dfr|youtube [~dfr|work@c-69-181-71-244.hsd1.ca.comcast.net] has joined
#go-nuts
15:50 -!- Project-2501 [~Marvin@82.84.94.76] has joined #go-nuts
15:53 -!- Project_2501 [~Marvin@82.84.64.180] has quit [Ping timeout: 260 seconds]
15:54 -!- dlowe [~dlowe@nat/google/x-lpddqrytfcvvmzqz] has joined #go-nuts
15:56 -!- fabled [~fabled@83.145.235.194] has joined #go-nuts
16:00 -!- Bigbear11 [~Cody@S010600222dcddd0f.cg.shawcable.net] has joined #go-nuts
16:00 -!- sunfmin [~sunfmin@115.197.45.90] has quit [Quit: sunfmin]
16:01 -!- Bigbear1 [~Cody@S010600222dcddd0f.cg.shawcable.net] has quit [Ping
timeout: 276 seconds]
16:02 -!- Bigbear1 [~Cody@S010600222dcddd0f.cg.shawcable.net] has joined #go-nuts
16:04 -!- yogib [~yogib@webauth-79-196.uni-paderborn.de] has quit [Quit: yogib]
16:04 -!- Bigbear11 [~Cody@S010600222dcddd0f.cg.shawcable.net] has quit [Ping
timeout: 276 seconds]
16:05 -!- Argue [~Argue@112.201.172.5] has quit [Ping timeout: 258 seconds]
16:07 -!- Argue [~Argue@112.201.172.5] has joined #go-nuts
16:19 -!- JakeyChan_ [~JakeyChan@118.132.214.248] has joined #go-nuts
16:20 -!- moraes [~moraes@189.103.177.124] has joined #go-nuts
16:21 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
16:22 -!- JakeyChan_ [~JakeyChan@118.132.214.248] has quit [Client Quit]
16:23 -!- pearle [~pearle@142.162.153.224] has joined #go-nuts
16:25 -!- erus` [~chatzilla@cpc2-gill2-0-0-cust701.basl.cable.virginmedia.com] has
joined #go-nuts
16:26 -!- Sh4rK [sh4rk@4d6f41c7.adsl.enternet.hu] has joined #go-nuts
16:26 < Sh4rK> Hi!
16:26 < Sh4rK> how can I make a string from an io.Reader?
16:27 < mpl> What are you trying to achieve?
16:27 < Sh4rK> I want to read everything from an io.Reader into a string
16:28 < crazy2be> yes but why?
16:28 < crazy2be> also wtf is with this error?  Error parsing number 0 :
parsing "0": invalid argument
16:28 < crazy2be> using strconv.Atoi
16:28 < Sh4rK> at the moment, to print it
16:28 < crazy2be> io.Copy(os.Stdout, reader)
16:29 < Sh4rK> ok, but I'll need a string anyway
16:29 < Sh4rK> to feed it into other functions which need a string
16:29 < crazy2be> well you can get a string using a bytes.Buffer
16:29 < crazy2be> but it doesn't scale well
16:30 < crazy2be> if you are reading large amounts of data, it then has to
allocate enough memory for the entire data set
16:30 -!- dfr|youtube [~dfr|work@c-69-181-71-244.hsd1.ca.comcast.net] has quit
[Remote host closed the connection]
16:30 < crazy2be> the point of having a io.Reader/io.Writer is that you can
process it incrementally
16:30 -!- tncardoso [~thiagon@150.164.2.20] has joined #go-nuts
16:30 < crazy2be> in buffer sizes that make sence for your application
16:30 < mpl> Sh4rK: to answer really simply you can convert to a string the
[]byte buffer you're reading into with string(b).
16:31 < crazy2be> mpl: True, but then you have to know the size of the
buffer
16:31 < crazy2be> don't you?
16:31 < mpl> to do just that, no.
16:31 < mpl> for the read operation yes.
16:32 < zozoR> bytes.BUFFER
16:32 < zozoR> desu
16:32 < mpl> that is, if you want to be sure to read it all.  or use a
buffered one as you said.
16:32 < Sh4rK> ok
16:32 < Sh4rK> thanks
16:32 < mpl> without more context it's not easy to answer.  hence why I
asked what he wanted to do.
16:32 < crazy2be> if you do know the message size, you can use
ioutil.ReadFull
16:33 < Sh4rK> it's coming rom an http request
16:33 < Sh4rK> *from
16:33 < crazy2be> yeah, mpl, converting a io.Reader to a string is kinda a
wierd question
16:33 -!- JakeyChan_ [~JakeyChan@118.132.214.248] has joined #go-nuts
16:33 < crazy2be> Sh4rk: What is it?
16:33 < Sh4rK> soI think I know the size
16:33 < Sh4rK> it's in the header
16:33 < Sh4rK> what is what?
16:33 < crazy2be> what is it that you are reading?
16:33 < crazy2be> like a file?
16:33 < crazy2be> from a form submission?
16:34 < crazy2be> reading that into a string would leave you vunerable to
DOS attacks
16:34 < crazy2be> by uploading a large file
16:34 < crazy2be> since you have to allocate memory for the whole file
16:35 < Sh4rK> no
16:35 < Sh4rK> I'm making a post request to a server
16:35 < Sh4rK> and reading the reply
16:35 < crazy2be> what format is the reply in?
16:35 -!- Argue [~Argue@112.201.172.5] has quit [Quit: Leaving]
16:35 < Sh4rK> simple text
16:36 -!- r_linux [~r_linux@189.38.220.35] has joined #go-nuts
16:36 < Sh4rK> oh wait
16:36 < crazy2be> always small?
16:36 < Sh4rK> it is compressed
16:36 < Sh4rK> yeah it's small
16:36 < Sh4rK> can I do deflate in Go?
16:36 < crazy2be> yes, if you have an io.Reader :)
16:37 < Sh4rK> yeah
16:37 < Sh4rK> I have it
16:37 < Sh4rK> :D
16:37 < Sh4rK> its response.Body
16:37 < Sh4rK> :D
16:38 < Sh4rK> what can I put into Accept-Encoding to get simple text?
16:38 < mpl> pkg/compress/deflate
16:38 < mpl> *flate
16:38 -!- pearle [~pearle@142.162.153.224] has quit [Quit: Leaving]
16:39 < aiju> Sh4rK: "none"?
16:39 < aiju> it's HTTP, be creative!
16:39 < crazy2be> try random strings of characters until you get what you
want!
16:39 < crazy2be> heh
16:39 < Sh4rK> lol
16:39 < Sh4rK> I looked after it
16:40 < Sh4rK> if I put nothing I get text
16:40 < Sh4rK> hopefully :)
16:40 -!- james- [~blaster@75-145-1-118-Naples.hfc.comcastbusiness.net] has joined
#go-nuts
16:40 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.5]
16:41 -!- wrtp [~rog@host-92-23-125-43.as13285.net] has quit [Quit: wrtp]
16:41 -!- rcrowley [~rcrowley@c-71-202-44-233.hsd1.ca.comcast.net] has joined
#go-nuts
16:44 -!- Bigbear1 [~Cody@S010600222dcddd0f.cg.shawcable.net] has quit [Ping
timeout: 264 seconds]
16:45 -!- JakeyChan_ [~JakeyChan@118.132.214.248] has quit [Remote host closed the
connection]
16:48 < Sh4rK> new question
16:48 < Sh4rK> how can I add headers to a http post request?
16:48 < kevlar_work> Sh4rK, don't use Client.Post
16:48 < Sh4rK> then what?
16:48 < kevlar_work> newrequest then .Do
16:48 < kevlar_work> with the header modification in between
16:49 < Sh4rK> thanks
16:49 < Sh4rK> I got it
16:52 -!- Bigbear1 [~Cody@S010600222dcddd0f.cg.shawcable.net] has joined #go-nuts
16:53 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has joined
#go-nuts
16:53 -!- erus` [~chatzilla@cpc2-gill2-0-0-cust701.basl.cable.virginmedia.com] has
quit [Quit: ChatZilla 0.9.87 [Firefox 6.0/20110811165603]]
17:01 -!- XenoPhoenix [~Xeno@cpc13-aztw24-2-0-cust23.aztw.cable.virginmedia.com]
has quit [Ping timeout: 240 seconds]
17:02 -!- XenoPhoenix [~Xeno@cpc13-aztw24-2-0-cust23.aztw.cable.virginmedia.com]
has joined #go-nuts
17:02 -!- erus` [~chatzilla@cpc2-gill2-0-0-cust701.basl.cable.virginmedia.com] has
joined #go-nuts
17:05 -!- valentin_ [~valentin@darkstar2.fullsix.com] has quit [Remote host closed
the connection]
17:08 < crazy2be> oh it's probably just a bug in tip
17:08 < crazy2be> strconv.Atoi doesn't work :/
17:09 < crazy2be> I only updated to tip so I could apply the latest
WebSocket patch
17:09 -!- thomas_b [~thomasb@cm-84.215.47.51.getinternet.no] has quit [Ping
timeout: 258 seconds]
17:10 -!- samuell [~samuel@pc2-samuel.uppmax.uu.se] has quit [Quit: Ex-Chat]
17:13 -!- awidegreen [~quassel@h-170-226.a212.priv.bahnhof.se] has joined #go-nuts
17:13 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit:
Verlassend]
17:13 -!- chadkouse [~Adium@rrcs-74-218-87-242.central.biz.rr.com] has joined
#go-nuts
17:14 < f2f> how does it not work?
17:15 < f2f> example?
17:16 -!- wrtp [~rog@host-92-23-125-43.as13285.net] has joined #go-nuts
17:17 -!- thomas_b [~thomasb@cm-84.215.47.51.getinternet.no] has joined #go-nuts
17:17 -!- ShadowIce
[~pyoro@HSI-KBW-109-193-121-123.hsi7.kabel-badenwuerttemberg.de] has joined
#go-nuts
17:17 -!- ShadowIce
[~pyoro@HSI-KBW-109-193-121-123.hsi7.kabel-badenwuerttemberg.de] has quit
[Changing host]
17:17 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
17:25 -!- dfr|youtube [~dfr|work@67.218.107.229] has joined #go-nuts
17:27 -!- sebastianskejoe [~sebastian@5634688f.rev.stofanet.dk] has quit [Quit:
leaving]
17:28 -!- sacho [~sacho@46.10.17.252] has quit [Quit: Ex-Chat]
17:30 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit:
Verlassend]
17:31 < s|k> should strings.TrimSpace also trim null values?
17:31 < s|k> it doesn't
17:33 -!- xash [~xash@d026238.adsl.hansenet.de] has joined #go-nuts
17:33 -!- ShadowIce
[~pyoro@HSI-KBW-109-193-121-123.hsi7.kabel-badenwuerttemberg.de] has joined
#go-nuts
17:33 -!- ShadowIce
[~pyoro@HSI-KBW-109-193-121-123.hsi7.kabel-badenwuerttemberg.de] has quit
[Changing host]
17:33 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
17:33 < Sh4rK> how can I create a byte[] from a string?
17:33 < aiju> []byte(str)
17:34 < Sh4rK> lol
17:34 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has joined #go-nuts
17:34 < Sh4rK> that was easy :)
17:34 -!- preflex_ [~preflex@unaffiliated/mauke/bot/preflex] has quit [Read error:
Operation timed out]
17:34 < s|k> it's stupid that my terminal shows a space for null characters
17:34 < aiju> your terminal is broken
17:34 < s|k> yes
17:34 -!- XenoPhoenix [~Xeno@cpc13-aztw24-2-0-cust23.aztw.cable.virginmedia.com]
has quit [Ping timeout: 240 seconds]
17:34 < aiju> the holy standard says it shouldn't display anything
17:35 < s|k> let me try it with another terminal
17:35 < aiju> why do you even care?
17:35 < aiju> you shouldn't litter nullbytes into output
17:35 < s|k> both terminal.app and iterm2.app show spaces for null
characters
17:36 < aiju> OS X?
17:36 < s|k> yes
17:36 < s|k> I'm just messing around
17:36 -!- Fish- [~Fish@9fans.fr] has joined #go-nuts
17:36 < s|k> not actually making anything
17:36 < s|k> learning go
17:37 < s|k> hrm
17:37 < s|k> it could just be the fmt.Print
17:39 < s|k> nevermind
17:39 < s|k> it's not
17:42 -!- james- [~blaster@75-145-1-118-Naples.hfc.comcastbusiness.net] has quit
[Ping timeout: 245 seconds]
17:43 -!- ccc1 [~Adium@140.109.98.187] has quit [Quit: Leaving.]
17:45 -!- Kahvi [5b9b57fc@gateway/web/freenode/ip.91.155.87.252] has joined
#go-nuts
17:46 -!- cybergggirl [~cybergggi@212-198-248-35.rev.numericable.fr] has joined
#go-nuts
17:47 -!- cybergggirl [~cybergggi@212-198-248-35.rev.numericable.fr] has quit
[Client Quit]
17:48 -!- XenoPhoenix [~Xeno@cpc13-aztw24-2-0-cust23.aztw.cable.virginmedia.com]
has joined #go-nuts
17:52 -!- aat [~aat@cpe-72-225-174-173.nyc.res.rr.com] has joined #go-nuts
17:56 -!- Kahvi [5b9b57fc@gateway/web/freenode/ip.91.155.87.252] has quit [Ping
timeout: 252 seconds]
17:56 -!- james- [~blaster@75-145-1-118-Naples.hfc.comcastbusiness.net] has joined
#go-nuts
18:00 -!- dfr|youtube [~dfr|work@67.218.107.229] has quit [Remote host closed the
connection]
18:00 < crazy2be> that's kinda wierd
18:00 < crazy2be> i'm making an operational transformation library
18:01 < crazy2be> but sometimes the characters to be inserted are inserted
in random positions
18:02 < s|k> I was wrong it's not inserting spaces
18:03 -!- wrtp [~rog@host-92-23-125-43.as13285.net] has quit [Quit: wrtp]
18:03 < s|k> what happened was that I was reading from stdin into a large
buffer that was padded with null characters and my call to strings.TrimSpace
didn't eliminate the new line due to the null characters
18:04 < s|k> the new line led me to assume I was seeing null characters as
spaces but I realized it wasn't
18:05 < s|k> reading from stdin with os.Stdin.Read appends the new line
18:06 -!- magn3ts [~magn3ts@colemickens.unl.edu] has joined #go-nuts
18:07 < Sh4rK> how can I create a regex in a package without calling any
functions?
18:07 < Sh4rK> something like initialization
18:07 < f2f> make sure to reslice the buffer after you read.
18:08 < f2f> n, err := Read(buf)
18:08 < f2f> buf[:n] is used everywhere afterwards.
18:08 < f2f> s/is used/is to be used/
18:10 -!- meling [~meling@85.252.66.250] has quit [Remote host closed the
connection]
18:11 -!- magn3ts [~magn3ts@colemickens.unl.edu] has quit [Ping timeout: 240
seconds]
18:11 -!- dfr|youtube [~dfr|work@216.239.45.22] has joined #go-nuts
18:12 -!- dfr|youtube [~dfr|work@216.239.45.22] has quit [Remote host closed the
connection]
18:12 -!- nteon [~nteon@ool-4a58e438.dyn.optonline.net] has quit [Ping timeout:
264 seconds]
18:12 -!- remy_o [~babar@archlinux/developer/remy-o] has joined #go-nuts
18:12 -!- dfr|youtube [~dfr|work@nat/google/x-kbsdpcsghjymbuww] has joined
#go-nuts
18:13 -!- nteon [~nteon@ool-4a58e438.dyn.optonline.net] has joined #go-nuts
18:14 < crazy2be> Sh4rK: ?
18:15 < Sh4rK> I want to use a regexp in a package
18:15 < Sh4rK> but want to compile it only once
18:15 < Sh4rK> where should I do it?
18:15 < crazy2be> can't you do var myGlobalRegex =
regex.MustCompile("foobar")?
18:15 < KirkMcDonald> Sh4rK: var foo = regexp.Compile("blah")
18:15 < KirkMcDonald> Oh, right.
18:15 < KirkMcDonald> MustCompile
18:15 < Sh4rK> does it work in the global scope outside of functions?
18:16 < KirkMcDonald> Sh4rK: Yes.
18:16 < crazy2be> or else var myGlobalRegex, myGlobalErr =
regex.Compile("foobar") :P
18:16 < Sh4rK> ok
18:16 < KirkMcDonald> crazy2be: (The package is named "regexp".)
18:16 < Sh4rK> because earlier I tried to do something like this and it gave
me some error
18:16 < crazy2be> oops, my bad
18:17 < Sh4rK> thet's why I asked
18:17 < KirkMcDonald> Sh4rK: Did you use := ?
18:17 < Sh4rK> yes
18:17 < crazy2be> i've never actually used it
18:17 < KirkMcDonald> Sh4rK: You can't use := at the package scope.
18:17 < KirkMcDonald> Sh4rK: You have to use "var"
18:17 < Sh4rK> interesting
18:17 < crazy2be> see I noticed that too
18:17 < Sh4rK> why is this?
18:17 < crazy2be> why is that?
18:17 -!- dfr|youtube [~dfr|work@nat/google/x-kbsdpcsghjymbuww] has quit [Ping
timeout: 260 seconds]
18:17 < KirkMcDonald> All declarations at the package scope must start with
a keyword.
18:17 < KirkMcDonald> That's just how the syntax is wired up.
18:17 < Sh4rK> why?
18:18 < crazy2be> func, type, var, etc.  Makes sence
18:18 < Sh4rK> ok
18:18 < Sh4rK> right
18:18 < Sh4rK> thanks for pointing that out
18:18 < crazy2be> that's kinda cool actually
18:19 -!- xash [~xash@d026238.adsl.hansenet.de] has quit [Ping timeout: 252
seconds]
18:19 < s|k> f2f: that makes a lot of sense, thanks!
18:20 -!- dfr|youtube [~dfr|work@nat/google/x-nxqxxoriddriogiq] has joined
#go-nuts
18:20 -!- dfr|youtube [~dfr|work@nat/google/x-nxqxxoriddriogiq] has quit [Remote
host closed the connection]
18:20 < Sh4rK> can I do ungreedy regexps?
18:20 < Sh4rK> like in python
18:20 < Sh4rK> .*?
18:20 < aiju> no
18:20 < Sh4rK> for example
18:21 < Sh4rK> that's not good
18:21 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
18:21 < KirkMcDonald> The regexp package is dead simple.
18:21 < mkb218> greed is good
18:21 < Sh4rK> not always :D
18:21 < KirkMcDonald> To the point of being of fairly limited utility.
18:21 < aiju> yes
18:21 < aiju> because regexp packages need to be bloated to the moon
18:21 < KirkMcDonald> Sh4rK: Oftentimes you can work around it.
18:21 < aiju> to be even MARGINALLY useful
18:21 < mkb218> LEO will do
18:21 < aiju> what good is a regexp package which doesn't do complex
arithmetic in base 13
18:22 < KirkMcDonald> aiju: I would settle for at least having character
classes.
18:22 < KirkMcDonald> aiju: And word boundaries.
18:22 < Sh4rK> I need to get the values from a list of these (with different
values of course): <INPUT NAME=logurl TYPE=hidden
VALUE="j2log-bKmYEkSYIOHUVAMEUADG-detail">
18:22 < KirkMcDonald> Ah, you're parsing HTML.
18:22 < Sh4rK> no
18:22 < Sh4rK> not parsing
18:23 < Sh4rK> just getting data from them :)
18:23 < Sh4rK> th interesting parts are the logurl, hidden and
"j2log-bKmYEkSYIOHUVAMEUADG-detail"
18:23 < Sh4rK> that's what I need
18:23 < KirkMcDonald> Sh4rK: Well, if you want the stuff between quotes, you
just need to e.g.: VALUE="[^"]"
18:23 < KirkMcDonald> Er
18:23 < KirkMcDonald> [^"]*
18:24 < crazy2be> oh god parsing html with regexp
18:24 < KirkMcDonald> crazy2be: That's what I said.
18:24 -!- dfr|mac [~dfr|work@nat/google/x-lazneqklfbcpbmse] has joined #go-nuts
18:24 < Sh4rK> but logurl and hidden arent in quotes
18:24 < Sh4rK> well, this is the easiest way
18:24 < KirkMcDonald> Sh4rK: NAME=([^ ]*)
18:24 < Sh4rK> or tell me an easier
18:24 < KirkMcDonald> There *must* be an HTML parser for Go out there.
18:24 < crazy2be> please read
http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags
18:25 < crazy2be> and there is
18:25 < crazy2be> import "html"
18:25 < KirkMcDonald> Ah.
18:25 < KirkMcDonald> But is it actually useful?
18:25 < Sh4rK> but that's unusable
18:25 < Sh4rK> mostly
18:25 < KirkMcDonald> Is it forgiving of actual HTML as found in the wild?
18:25 < skelterjohn> fwiw, "parsing html" and "getting data from html" mean
the same thing
18:26 < Sh4rK> it doesn't have any useful functions for doing things with
the parsed html
18:26 < Sh4rK> skelterjohn: to get these values, you don't have to actually
parse the whole html
18:26 < Sh4rK> that's why I said "getting values"
18:27 < Sh4rK> *data
18:28 < Sh4rK> I like this channel
18:28 < Sh4rK> I actually get answers to my question
18:28 < Sh4rK> and within a reasonable amount of time
18:28 < Sh4rK> :)
18:29 < kevlar_work> lol
18:29 < kevlar_work> the html package is inching toward the HTML5 "standard"
for lenient HTML parsing
18:29 < kevlar_work> which should be a pretty close approximation of the way
that real browsers in the wild will handle the same HTML
18:30 < aiju> 20:22 < KirkMcDonald> aiju: I would settle for at least
having character classes.
18:30 < aiju> []
18:30 < aiju> although yeah unicode character classes
18:31 -!- fabled [~fabled@83.145.235.194] has quit [Quit: Ex-Chat]
18:31 < Sh4rK> yeah
18:31 < aiju> but there are like three different syntaxes and most packages
implement all three of them because it's fun
18:31 < Sh4rK> that would be useful
18:31 < aiju> (not to say i have have _ever_ used character classes)
18:32 < KirkMcDonald> aiju: Yeah, there's [], but [ \t\n] or whatever isn't
as nice as \s
18:32 < f2f> pkg unicode defines character classes
18:33 < aiju> KirkMcDonald: \s is bullshit
18:33 < aiju> [ \t\n]
18:33 < KirkMcDonald> aiju: Pfft.
18:33 < f2f> [ \t\n\f]
18:33 < aiju> defining over 9000 "handy" shortcuts is annoying
18:33 < KirkMcDonald> aiju: But word boundaries (\b) are intensely useful.
18:33 < aiju> f2f: when have you EVER encountered \f in actual data
18:33 < skelterjohn> whitespace is a pretty basic one
18:33 < f2f> [ \t\n\f\r]
18:34 < f2f> [ \t\n\f\r\v]
18:34 < aiju> [ go fuck yourself]
18:34 < f2f> [ \t\n\f\r\vU+0085]
18:34 < crazy2be> yay unicode seperators!
18:34 < zeebo> good ol' lovable aiju
18:34 < f2f> nothing beats youtful enthusiasm :)
18:34 < aiju> making up problem which don't matter is always fun
18:34 < aiju> hey
18:34 * exch gives aiju a hug
18:34 < aiju> what if someone uses EBCDIC in his input
18:34 < aiju> your regex should accomodate that
18:35 < aiju> else it's worthless crap
18:35 < skelterjohn> like the problem that having \s is too feature rich?
18:35 < KirkMcDonald> Also, non-grouping parentheses.
18:35 < KirkMcDonald> I use these often.
18:35 < aiju> \s \a \p \q \卐 \ᛋ
18:36 < crazy2be>
[U+2028U+2029U+2000U+2001U+2002U+2003U+2004U+2005U+2006U+2007U+2008U+2009U+200AU+205F
18:36 -!- dfr|mac [~dfr|work@nat/google/x-lazneqklfbcpbmse] has quit [Remote host
closed the connection]
18:36 < crazy2be> ]
18:36 < crazy2be> should be most of the unicode seperators
18:36 < zeebo> just write a regex preprocessor gosh
18:36 < aiju> now please also add EBCDIC support
18:36 < KirkMcDonald> aiju: What.
18:36 < crazy2be> Oh i forgot the mongolian vowel seperator U+180E
18:37 -!- ccc [~macroron@c-76-26-54-186.hsd1.fl.comcast.net] has joined #go-nuts
18:37 -!- dfr|mac [~dfr|work@nat/google/x-thyvtfyrvgrmvrjp] has joined #go-nuts
18:37 < crazy2be> and the Ideographic Space (U+3000)
18:37 < aiju> most importantly, regexes break
18:37 < KirkMcDonald> aiju: Sure, when they're broken.
18:38 < aiju> how do you tell a regex is right?
18:38 < KirkMcDonald> When it doesn't break.
18:38 < zeebo> thats exactly how i tell when circles are circular
18:38 < zeebo> what a coincidence :)
18:38 -!- wrtp [~rog@host-92-23-125-43.as13285.net] has joined #go-nuts
18:39 * skelterjohn draws an oval
18:39 < f2f> squares aren't.
18:39 < KirkMcDonald> The oval is sufficiently round to pass the unit tests.
SHIP IT
18:40 < crazy2be> who the heck draws ovals anyway?
18:40 < skelterjohn> everybody
18:40 < aiju> what the fuck do people use regex for anyway
18:40 < KirkMcDonald> aiju: Parsing log files.
18:40 < f2f> back to the topic at hand, what's the inscriptional pahlavi
space char?
18:40 < skelterjohn> text matching, mostly
18:40 < f2f> irc!
18:40 < aiju> f2f: 卐
18:41 < f2f> aiju, shhh, kid.  don't mention the war
18:41 < aiju> when i use regex, i usually use sed or awk or similar
18:41 < aiju> i hardly ever feel a need for them in "real" programming
languages
18:42 < skelterjohn> i use it in gb to detect when an import is
goinstallable
18:42 < skelterjohn> that's the only time in the past 10 years, though,
outside of teaching
18:42 < aiju> see
18:42 < aiju> heuristics
18:43 < skelterjohn> but we don't need a lot of regexps in machine learning
=p
18:43 < skelterjohn> so the sample is biased.
18:43 * f2f wrote an irc client that used regex to match messages.  in C
18:43 < f2f> once upon a time
18:43 < aiju> i mean, when you're currently not on crack
18:44 < f2f> then there's the httpd rewrite rewrite that uses regex too.
18:44 < f2f> so, examples abound my dear boy :)
18:44 < aiju> PCRE regex is turing complete, iirc
18:44 -!- meling [~meling@85.252.66.250] has joined #go-nuts
18:44 < aiju> you can do everything with it
18:44 < aiju> i meant *where it is actually a good idea*
18:46 < skelterjohn> so, a question with a subjective answer that you can
unilaterally deny
18:46 < Sh4rK> json mraz :D
18:46 < aiju> skelterjohn: no, if someone comes up with a good answer, i'll
accept it
18:47 < KirkMcDonald> I already gave one of those.
18:47 < skelterjohn> i use grep to search text files all the time
18:47 < aiju> skelterjohn: so do i
18:47 < aiju> i meant in Go code
18:47 < skelterjohn> oh but you mean from within a high level programming
language
18:48 < KirkMcDonald> 11:44 < KirkMcDonald> aiju: Parsing log files.
18:48 < zeebo> i sorta feel like anything that has a structure that regex
can exploit you should probably just write a parser for
18:48 < Sh4rK> parsing compiler output to get the error position
18:49 < zeebo> i dont see the value of it in a programming language.  its a
convenient shortcut for one line shell commands imo
18:49 < KirkMcDonald> Log files tend to work will as they usually consist of
lines with a series of distinct fields.
18:49 < aiju> why do you read log files
18:50 * f2f uses regular expressions for lexing and parsing exclusively.  blog
posts be damned :)
18:50 < Sh4rK> aiju: why not?  :D
18:50 < aiju> zeebo: exactly.
18:50 < KirkMcDonald> aiju: To normalize and aggregate the error messages
logged by the server.
18:50 < KirkMcDonald> (Or, really, by all of the servers.)
18:52 < zeebo> i would be ok with it for pattern matching like..  http url
requests or something
18:54 -!- huin [~huin@91.85.139.164] has joined #go-nuts
18:54 < zeebo> which is guaranteed to be sanitized by nature of the protocol
18:55 -!- dfr|mac_ [~dfr|work@nat/google/x-drphxqaljznowlwo] has joined #go-nuts
18:55 -!- dfr|mac [~dfr|work@nat/google/x-thyvtfyrvgrmvrjp] has quit [Read error:
Connection reset by peer]
18:56 -!- meling_ [~meling@85.252.66.250] has joined #go-nuts
18:57 -!- meling [~meling@85.252.66.250] has quit [Ping timeout: 252 seconds]
18:59 -!- alehorst [~alehorst@201.47.17.122.dynamic.adsl.gvt.net.br] has quit
[Ping timeout: 245 seconds]
19:04 -!- dfr|mac [~dfr|work@nat/google/x-rgogzzedmnsuswvp] has joined #go-nuts
19:04 -!- dfr|mac_ [~dfr|work@nat/google/x-drphxqaljznowlwo] has quit [Ping
timeout: 240 seconds]
19:06 -!- squeese [~squeese@cm-84.209.17.156.getinternet.no] has joined #go-nuts
19:07 < Sh4rK> can I get somehow an md5 has string with the md5 module?
19:07 < Sh4rK> s/has/hexx
19:07 < Sh4rK> -x
19:08 -!- moraes [~moraes@189.103.177.124] has quit [Quit: Leaving]
19:09 -!- sacho [~sacho@92-247-208-87.spectrumnet.bg] has joined #go-nuts
19:11 -!- moraes [~moraes@189.103.177.124] has joined #go-nuts
19:12 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
19:13 -!- alehorst [~alehorst@177.40.2.212] has joined #go-nuts
19:13 < KirkMcDonald> Sh4rK: See the %x format specifier in the fmt package.
19:14 -!- tncardoso [~thiagon@150.164.2.20] has quit [Quit: Leaving]
19:15 < Sh4rK> thanks
19:15 < niemeyer> Sh4rK: There's also encoding/hex
19:15 < niemeyer> Sh4rK: hex.EncodeToString(whatever)
19:15 < Sh4rK> are they the same?
19:16 < Sh4rK> I mean do they produce the same output?
19:16 < niemeyer> Sh4rK: I would guess so, yeah..  I'd use hex if that's all
I wanted to do, though
19:17 < Sh4rK> ok
19:19 -!- dfr|mac [~dfr|work@nat/google/x-rgogzzedmnsuswvp] has quit [Remote host
closed the connection]
19:19 -!- dfr|mac [~dfr|work@nat/google/x-rskhgidetrgvrvnt] has joined #go-nuts
19:21 -!- Project-2501 [~Marvin@82.84.94.76] has quit [Quit: E se abbasso questa
leva che succ...]
19:23 -!- molto_alfredo1 [~molto_alf@142.176.0.21] has quit [Quit: Leaving.]
19:33 -!- TimKack [~tkack@e196069.upc-e.chello.nl] has joined #go-nuts
19:34 < chilts> niemeyer: good morning ...  and a quick question :) I see a
place where we have an 'err' in the test (of os.Error) but it's really a
sdb.Error, so I presume "err.(*sdb.Error)" is somehow typecasting it to sdb.Error,
is that correct?
19:35 * chilts has never seen that syntax before :)
19:35 < niemeyer> chilts: Yeah, you get it right
19:35 < chilts> sweet, ok, just wanted to check
19:35 < chilts> I have my integration tests running :D
19:35 < chilts> (but not passing, yet)
19:35 < niemeyer> chilts: http://golang.org/doc/go_spec.html#Type_assertions
19:36 < chilts> ta
19:36 < chilts> ahah, I'll have a good read of that section :)
19:36 < chilts> I like learning something by doing something :)
19:36 < niemeyer> chilts: It's an assertion rather than a cast because it
only works if the type is precisely the one you ask for
19:37 < chilts> gotchyer ...  yeah, it looked weird at first, but then the
compiler was directing me until I figured it out
19:37 < chilts> it's kinda nice having a compiler which tells you things,
reminds me of Ada which I did about 10 years ago!
19:37 * chilts is used to dynamic typing these days
19:38 < erus`> im gonna make template-go
19:38 < Sh4rK> anyone knows if http.Requests are reusable?
19:38 < erus`> hurr hurr
19:39 < erus`> Sh4rK: i think so
19:39 < Sh4rK> ok
19:40 -!- tncardoso [~thiago@187.114.48.53] has joined #go-nuts
19:44 < skelterjohn> erus`: what is template-go?
19:44 < s|k> do I always need to compile packages separately or can I
combine them in a single make file with the actual program that will use them?
19:44 < s|k> would be annoying to have to compile everything separately
19:44 < skelterjohn> http://go-gb.googlecode.com
19:45 < s|k> hrm
19:45 < s|k> if one did not use gb
19:45 < s|k> one would have to compile all of it separately?
19:45 < skelterjohn> gb --makefiles
19:45 < skelterjohn> creates makefiles and a build script
19:46 < skelterjohn> then you can just do ./build
19:46 < skelterjohn> and it does correct incremental building
19:46 < s|k> nice
19:46 < |Craig|> s|k: its possible to make gnumake do anything (its turing
complete), but its a bit of a mess.  gb really is nice
19:46 < s|k> ok I'll give it a shot thanks
19:47 < |Craig|> I had a make file that looped over all packages and built
them.  What a horrible idea what was
19:47 < zeebo> oh we can just do like
19:47 < skelterjohn> if you have questions let me know (i'm the author)
19:47 < zeebo> oops wrong channlel (do that all the time)
19:47 < s|k> skelterjohn: ah nice, thanks
19:47 < s|k> I saw gb on the go subreddit
19:47 < skelterjohn> i put it there O:-)
19:47 < s|k> hadn't used it though
19:48 < s|k> skelterjohn: is the github mirror pretty up to date?
19:48 < skelterjohn> they are identical
19:48 < skelterjohn> i commit/push to both of them at the same time
19:48 < s|k> nice
19:48 < skelterjohn> but if you use goinstall it makes a difference which
one you use
19:49 < skelterjohn> since the github version has a "release" branch, and
the googlecode version does not
19:49 < s|k> right
19:49 < s|k> following the instructions on the github readme
19:50 < skelterjohn> though really i should put a release branch on the
googlecode version, too
19:50 < skelterjohn> but i hate messing with vcs organization
19:50 < skelterjohn> it always takes me three tries to do anything
19:50 < Sh4rK> I use goinstall for building
19:51 < skelterjohn> there are pros and cons
19:51 < Sh4rK> I set up a directory where I store go source directories
19:51 < Sh4rK> and put it in gopath
19:51 < Sh4rK> and if I want to build a library I do goinstall -make=false
dirname
19:51 < Sh4rK> and it works
19:52 < skelterjohn> with gb you just write "gb"
19:52 < skelterjohn> easier to type
19:52 < Sh4rK> actually
19:52 < Sh4rK> I just press F7
19:52 < skelterjohn> that works too
19:52 < Sh4rK> I have written a kind of ide for go
19:52 < Sh4rK> for SublimeText 2
19:52 < Sh4rK> (the best editor ever :)
19:52 < skelterjohn> oh yeah?  you figure out how to get outlines?
19:52 < skelterjohn> i use ST2 as well
19:52 < skelterjohn> but it's hard to configure
19:53 < skelterjohn> and i couldn't figure out how to get it to invoke a
command line for building either
19:53 < Sh4rK> it's easy
19:53 < skelterjohn> maybe so, but poorly documented :)
19:53 < Sh4rK> yeah
19:53 < Sh4rK> it's still beta
19:53 < skelterjohn> not complaining
19:53 < Sh4rK> but it's awesome
19:53 < s|k> heh just ran 'gb' from my home directory just to see if it
installed
19:53 < s|k> that was a mistake
19:54 < skelterjohn> heh
19:54 < skelterjohn> shouldn't break anything
19:54 < s|k> my goroot is in there
19:54 < s|k> ~/apps/go
19:54 < s|k> started doing stuff in there I think
19:54 < skelterjohn> gb can build $GOROOT just fine :)
19:55 < skelterjohn> but...yeah generally not a good idea to run gb from
just anywhere.  i haven't thought of a good way to detect that, or what to do if
it does detect it
19:56 < f2f> how fast?
19:56 < f2f> i'd like to test it
19:56 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Remote host closed
the connection]
19:56 < skelterjohn> 15 sec on my computer, with -p enabled
19:56 < f2f> but need to sync first.  goinstall is complaining about
template.MustParse
19:57 < f2f> everything in pkg?
19:57 < skelterjohn> using github or googlecode version?
19:57 < f2f> github
19:57 < skelterjohn> f2f yes - though some things it will just call the
makefile
19:57 < skelterjohn> f2f: if your GO is release, git checkout release.  if
your GO is weekly, git checkout master
19:58 -!- alehorst [~alehorst@177.40.2.212] has quit [Quit: Leaving.]
19:59 < Sh4rK> is gb better than godag?
19:59 < skelterjohn> don't ask me.
19:59 < s|k> he's biased
19:59 -!- Crnobog|Work [u1041@gateway/web/irccloud.com/x-cgztjlteoovvrmsd] has
quit [Remote host closed the connection]
19:59 -!- proppy [u1692@gateway/web/irccloud.com/x-vbugvdrtohrvvasf] has quit
[Remote host closed the connection]
19:59 -!- sahid [u3351@gateway/web/irccloud.com/x-ramdukqlbjmjwuik] has quit
[Remote host closed the connection]
19:59 -!- itsPhilip [u2979@gateway/web/irccloud.com/x-wruztsgzwwpsztjx] has quit
[Write error: Connection reset by peer]
19:59 -!- justicefries [u2891@gateway/web/irccloud.com/x-jffbgrxwhmkermay] has
quit [Read error: Connection reset by peer]
19:59 < skelterjohn> i'd like to see someone do a comparison
20:00 < Sh4rK> me too :P
20:00 < skelterjohn> a guy was talking about it in the "pimping godag"
thread on the google group
20:00 -!- proppy [u1692@gateway/web/irccloud.com/x-hsotmnpftdsvacbi] has joined
#go-nuts
20:00 -!- magn3ts [~magn3ts@colemickens.unl.edu] has joined #go-nuts
20:00 < skelterjohn> it was only a couple days ago, so the jury might still
be out
20:01 -!- alehorst [~alehorst@177.40.2.212] has joined #go-nuts
20:03 -!- proppy [u1692@gateway/web/irccloud.com/x-hsotmnpftdsvacbi] has quit
[Remote host closed the connection]
20:03 < skelterjohn> Sh4rK: i was serious about ST2 stuff, though - how do
you make it run a command line when you hit f7?
20:04 < skelterjohn> and do you know how to make a code outline?
20:04 -!- magn3ts [~magn3ts@colemickens.unl.edu] has quit [Ping timeout: 240
seconds]
20:04 < Sh4rK> what do you mean by code outline?
20:05 < skelterjohn> many IDEs will have a list of interesting code points
(functions mostly) in a little panel off to a side
20:05 < skelterjohn> usually labeled "outline"
20:05 < Sh4rK> It doesn't have that
20:05 < Sh4rK> maybe yet
20:05 < Sh4rK> maybe no
20:06 < skelterjohn> i heard ST1 had it
20:06 < skelterjohn> so i hope it will come to ST2 at some point
20:06 < Sh4rK> skelterjohn: http://pastebin.com/5SS9sTJV
20:07 -!- itsPhilip [u2979@gateway/web/irccloud.com/x-edihofqmzekbkdpz] has joined
#go-nuts
20:07 < Sh4rK> paste this code into for example GoBuild.sublime-build
20:07 < Sh4rK> and put it somewhere in sublime2root/Data/Packages
20:07 < skelterjohn> i don't understand the file_regex and selector bits
20:07 < Sh4rK> packages/User
20:07 -!- itsPhilip [u2979@gateway/web/irccloud.com/x-edihofqmzekbkdpz] has quit
[Remote host closed the connection]
20:07 < skelterjohn> does that specify which files are displayed?
20:08 < Sh4rK> the regex parses the compiler output for errors
20:08 < Sh4rK> so you can hit F4 to go to the next
20:08 < Sh4rK> and the selector makes it run this command by default for go
files
20:08 -!- huin [~huin@91.85.139.164] has quit [Quit: leaving]
20:08 -!- kergoth__ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has quit [Read
error: Connection reset by peer]
20:08 < Sh4rK> got it?
20:09 < skelterjohn> i see, thanks
20:09 < Sh4rK> skelterjohn: if you're interested, I also made a gocode
integration
20:09 < Sh4rK> but it doesn't quite work
20:09 < skelterjohn> does it work on mac?
20:09 < Sh4rK> but I'll let you know when it works correctly
20:09 < Sh4rK> if you want
20:10 -!- pothos_ [~pothos@111-240-171-221.dynamic.hinet.net] has joined #go-nuts
20:10 < Sh4rK> I don't have a mac
20:10 < Sh4rK> but you can test for me :D
20:10 < skelterjohn> hehe
20:11 -!- pothos [~pothos@111-240-176-240.dynamic.hinet.net] has quit [Ping
timeout: 252 seconds]
20:11 < Sh4rK> actually it might work on mac
20:11 < Sh4rK> I'll paste the script
20:11 < Sh4rK> do you have gocode?
20:12 < skelterjohn> nope
20:12 < Sh4rK> download and build it
20:12 < skelterjohn> in a bit
20:12 < skelterjohn> still working on making ST2 invoke gb
20:12 < Sh4rK> and put it in sublime2/Data/packages/User too
20:13 < Sh4rK> along with this script: http://pastebin.com/EHAeptZq
20:13 < Sh4rK> ok
20:14 -!- jajamana [~jcb@cm-84.209.210.27.getinternet.no] has joined #go-nuts
20:15 < Sh4rK> skelterjohn:
http://sublimetext.info/docs/en/core/build_systems.html
20:15 < Sh4rK> for reference
20:15 < Sh4rK> and
http://sublimetext.info/docs/en/reference/build_systems.html
20:16 -!- pyrhho [~pyrhho@027e80ed.bb.sky.com] has joined #go-nuts
20:16 < skelterjohn> hmm - i tried having: "cmd": ["gb"],
20:16 < skelterjohn> for the first line
20:16 -!- thomas_b [~thomasb@cm-84.215.47.51.getinternet.no] has quit [Ping
timeout: 240 seconds]
20:16 < skelterjohn> but it doesn't seem to be working - how does it know
what directory to run it in?
20:17 < skelterjohn> the error is "[Errno 2] No such file or directory"
20:17 -!- kkress [~kkress@kkress2.xen.prgmr.com] has quit [Ping timeout: 240
seconds]
20:17 < Sh4rK> check the 2 pages
20:17 < Sh4rK> you can find stuff there
20:17 -!- thomas_b [~thomasb@cm-84.215.47.51.getinternet.no] has joined #go-nuts
20:17 -!- kkress [~kkress@kkress2.xen.prgmr.com] has joined #go-nuts
20:19 < skelterjohn> ah - the issue is it's not getting any of my env vars
20:19 < skelterjohn> blah
20:19 < skelterjohn> not an ST2 issue, though
20:19 -!- justicefries [u2891@gateway/web/irccloud.com/x-mmxqbvoymqqlhdby] has
joined #go-nuts
20:21 < skelterjohn> but it looks like ST2's docs have improved since last i
checked (two months ago)
20:22 -!- sahid [u3351@gateway/web/irccloud.com/x-htyftknfknkwzwie] has joined
#go-nuts
20:22 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.5]
20:23 < Sh4rK> the pages I have given is not written by the ST2 developer
20:24 < Sh4rK> it's a separate thing
20:24 < skelterjohn> i see
20:24 < skelterjohn> thanks for the reference, then!
20:24 -!- moraes [~moraes@189.103.177.124] has quit [Remote host closed the
connection]
20:25 < s|k> skelterjohn: why does your app use --makefiles instead of
-makefiles
20:25 < s|k> the former being idiomatic with go
20:25 < s|k> er
20:25 < s|k> the latter
20:25 < skelterjohn> for gb, --xyz is one option "xyz"
20:25 < skelterjohn> -xyz is three options, x, y an dz
20:26 < s|k> you don't like flag.go eh?
20:26 < s|k> :/
20:26 < skelterjohn> not especially, no
20:27 < Sh4rK> skelterjohn: have you tried the gocode plugin?
20:27 < skelterjohn> no - i'm not super interested in getting gocode to
work, tbh
20:27 < skelterjohn> i haven't ever felt the need for it
20:27 < Sh4rK> ok
20:27 < Sh4rK> I thought you were when you asked if it worked on a mac :D
20:27 < skelterjohn> oh sorry :)
20:29 < Sh4rK> does building work now?
20:29 < skelterjohn> i haven't chased down the env var issue
20:30 -!- Kai` [u327@gateway/web/irccloud.com/x-dcmhuhclktflidnz] has joined
#go-nuts
20:30 < s|k> gb is pretty awesome
20:30 < skelterjohn> :)
20:30 < Sh4rK> skelterjohn: it should actually get the env vars
20:31 < Sh4rK> mine works that way
20:31 < Sh4rK> and didn't do anything
20:31 < skelterjohn> mine are all in ~/.profile
20:31 < skelterjohn> and the shell loads them in when it launches
20:31 < Sh4rK> oh true
20:31 < skelterjohn> i've been running ST2 by double-clicking on it
20:32 < skelterjohn> rather than launching it from shell
20:32 < Sh4rK> I forgot it's not windows
20:32 < Sh4rK> :D
20:32 < skelterjohn> i'm sure i could fix this
20:33 < Sh4rK> skelterjohn: why doesn't gb put libraries in pkg folder?
20:33 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has left
#go-nuts []
20:33 < Sh4rK> instead of _obj
20:35 -!- vmil86 [~vmil86@78.57.250.113] has quit [Read error: Connection reset by
peer]
20:35 -!- meling_ [~meling@85.252.66.250] has quit [Remote host closed the
connection]
20:36 -!- kergoth_ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has joined #go-nuts
20:39 -!- aho [~nya@fuld-590c7a4b.pool.mediaWays.net] has quit [Quit:
EXEC_over.METHOD_SUBLIMATION]
20:41 < erus`> then -i
20:41 < erus`> installes them in the pkg folder
20:42 -!- Crnobog|Work [u1041@gateway/web/irccloud.com/x-mydozkxhblrfzuyy] has
joined #go-nuts
20:42 -!- Fish- [~Fish@9fans.fr] has quit [Quit: WeeChat 0.3.5]
20:42 < Sh4rK> not in GOROOT/pkg
20:43 -!- jajamana [~jcb@cm-84.209.210.27.getinternet.no] has quit [Quit: This
computer has gone to sleep]
20:43 -!- magn3ts [~magn3ts@colemickens.unl.edu] has joined #go-nuts
20:43 < Sh4rK> but in the gb workspace/pkg
20:43 < Sh4rK> to be consistent in using directory names
20:45 -!- rsc_ [4a7d3c01@gateway/web/freenode/ip.74.125.60.1] has joined #go-nuts
20:45 -!- rsc_ [4a7d3c01@gateway/web/freenode/ip.74.125.60.1] has quit [Client
Quit]
20:46 -!- clr_ [~colin@63.68.157.172] has joined #go-nuts
20:46 -!- pharris [~Adium@rhgw.opentext.com] has quit [Quit: Leaving.]
20:52 -!- Crnobog [~crnobog@cpc3-nmal12-0-0-cust48.croy.cable.virginmedia.com] has
left #go-nuts []
20:52 -!- proppy [u1692@gateway/web/irccloud.com/x-nebswmlcbqwlirrd] has joined
#go-nuts
20:53 -!- qeed [~qeed@adsl-98-85-47-200.mco.bellsouth.net] has joined #go-nuts
20:54 < s|k> what's a good way to handle long strings in go?  I usually like
to have no more than 80char column lines and usually I cut off long strings with \
20:54 < aiju> ``?
20:54 < s|k> to split them across mutiple lines
20:54 < aiju> ah long lines
20:54 < aiju> "hello, " +
20:54 < s|k> if I use `` then I have a raw string and I can't use escape
characters
20:54 < aiju> "world"
20:55 < s|k> thanks
20:55 < qeed> doesnt """ work?
20:56 < aiju> no
20:56 < aiju> Go is not python
20:56 < qeed> oh read wrong channel
20:57 -!- miker2 [~miker2@64.55.31.190] has quit [Ping timeout: 268 seconds]
20:59 -!- Sh4rK [sh4rk@4d6f41c7.adsl.enternet.hu] has quit [Quit: I'm out]
20:59 -!- xash [~xash@d026238.adsl.hansenet.de] has joined #go-nuts
21:10 -!- zcram [~zcram@8.177.190.90.sta.estpak.ee] has quit [Quit: Leaving]
21:12 -!- dlowe [~dlowe@nat/google/x-lpddqrytfcvvmzqz] has quit [Quit: Leaving.]
21:14 -!- itsPhilip [u2979@gateway/web/irccloud.com/x-yaatcttcvxhvoqoq] has joined
#go-nuts
21:15 -!- tavis_rain [~tavisb@24-104-129.146.hfc.mediarain.com] has joined
#go-nuts
21:27 < chilts> niemeyer: there is a bug in s3i_test.go :
http://paste.dollyfish.net.nz/4b59b4.txt
21:27 < chilts> if you get a non-S3 error, it sends nothing down the channel
21:27 < chilts> so the test just sits there waiting for more
21:27 < chilts> I can fix it for you later
21:28 < niemeyer> chilts: That's awesome, thanks!
21:28 < chilts> I did the same with sdb but I've just sent everything down
the channel (nil, os.Error, sdb.Error) and then sort out the wheat from the chaff
in the loop which waits for all the responses
21:28 < chilts> no worries
21:28 < chilts> I'm glad I understand channels :)
21:29 -!- c00w [~colin@63.68.157.172] has quit [Quit: Ex-Chat]
21:29 < chilts> I have my sdb tests all running and doing what I expect,
except my unmarshalling of the XML :)
21:29 * chilts reads up some more
21:30 -!- sacho [~sacho@92-247-208-87.spectrumnet.bg] has quit [Ping timeout: 252
seconds]
21:32 < niemeyer> chilts: Hmm
21:34 < niemeyer> chilts: Yeah, it's bogus indeed
21:34 < chilts> I also get a Panic: runtime error: invalid memory address or
nil pointer dereference (PC=0x410AEE)
21:35 < chilts> I'm happy to fix it up later since I have a solution for sdb
which works
21:35 -!- pyrhho [~pyrhho@027e80ed.bb.sky.com] has quit [Ping timeout: 240
seconds]
21:35 < niemeyer> chilts: The error checking should really be done entirely
outside the goroutine
21:35 < chilts> yeah, that's what I'm doing now :)
21:35 < niemeyer> chilts: That panic could mean quite a few things ;-)
21:35 < chilts> http://paste.dollyfish.net.nz/9d8b3c.txt
21:36 < chilts> right, yeah
21:36 < chilts> anyway, I'll do it like that one
21:36 < chilts> (that the SimpleDB one)
21:41 -!- kevlar__work [~kevlar@nat/google/x-lfphowmjteyuusbb] has joined #go-nuts
21:43 -!- kevlar__work [~kevlar@nat/google/x-lfphowmjteyuusbb] has quit [Client
Quit]
21:44 -!- remy_o [~babar@archlinux/developer/remy-o] has quit [Quit: WeeChat
0.3.5]
21:44 < chilts> Wahoo!  my integration tests pass :)
21:47 -!- Slant [~scott@124-148-191-7.dyn.iinet.net.au] has joined #go-nuts
21:50 -!- awidegreen [~quassel@h-170-226.a212.priv.bahnhof.se] has quit [Ping
timeout: 268 seconds]
21:50 -!- clr_ [~colin@64.134.70.112] has joined #go-nuts
22:04 < nteon> niemeyer: I just updated to go tip, and goinstall -u seems to
fail for bson with a dependency cycle: http://fpaste.org/HwFi/
22:04 < nteon> any suggestions?
22:05 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit:
Verlassend]
22:05 < niemeyer> nteon: That looks quite weird
22:05 < niemeyer> nteon: mgo/gobson are compatible with the current go
_stable_ release, rather than tip, but this breakage is surprising even then
22:05 < niemeyer> nteon: I'll have a look, hold on
22:06 -!- TimKack [~tkack@e196069.upc-e.chello.nl] has quit [Quit: TimKack]
22:06 < nteon> niemeyer: okay, thanks.  I just rolled back to weekly to see
if thats any different
22:06 -!- Solak [~stijnw@cthia.xs4all.nl] has quit [Read error: Connection reset
by peer]
22:07 < niemeyer> nteon: "release" is the Go tag mgo/gobson track
22:07 < niemeyer> nteon: weekly may work, but no guarantees there either
22:07 -!- c00w [~colin@64.134.70.112] has quit [Ping timeout: 246 seconds]
22:07 < nteon> niemeyer: okay, if weekly fails I'll just use release
22:08 -!- squeese [~squeese@cm-84.209.17.156.getinternet.no] has quit [Remote host
closed the connection]
22:10 -!- TheSeeker [riiight@99-153-248-206.lightspeed.irvnca.sbcglobal.net] has
quit [Ping timeout: 258 seconds]
22:10 -!- TheSeeker [riiight@99-153-248-206.lightspeed.irvnca.sbcglobal.net] has
joined #go-nuts
22:18 < niemeyer> nteon: I suspect there's a bug in goinstall..
investigating
22:25 -!- itrekkie [c0373628@gateway/web/freenode/ip.192.55.54.40] has joined
#go-nuts
22:26 -!- idobi [~stan.stee@8.18.115.2] has joined #go-nuts
22:26 -!- c00w [~colin@63.68.157.172] has joined #go-nuts
22:26 < itrekkie> hi all, could someone provide some advice on how best
apply goroutines to a small program?  http://pastie.org/2430273
22:27 < itrekkie> I'm trying to read files from the disk in one goroutine,
and drain that file-filled channel in another, does that make sense to do?
22:30 < Ginto8> it makes sense
22:30 < Ginto8> but you don't necessarily need goroutines for it
22:31 < itrekkie> removing the second goroutine and draining the channel in
a simple for loop greatly improves runtime
22:31 < Ginto8> gccgo?
22:32 < itrekkie> nope, gc
22:32 < Ginto8> hm
22:32 -!- meling [~meling@85.252.66.250] has joined #go-nuts
22:32 < niemeyer> itrekkie: The second goroutine is really not necessary
22:33 < niemeyer> itrekkie: The main goroutine is blocked on <-done the
whole time
22:33 < niemeyer> itrekkie: So you may as well give it something to do
22:33 < niemeyer> itrekkie: This won't offer any speed gains if you don't
use GOMAXPROCS=2 or 4
22:34 < itrekkie> alright, I think I'm setting runtime.GOMAXPROCS at the top
of main, does that still suffice?
22:34 < itrekkie> I also updated the paste with a few more ideas I've been
trying (http://pastie.org/2430273)
22:35 < itrekkie> the version where main drains the channel filled by the
first goroutine is the fastest, but do you have any suggestions to improve it
further?
22:35 < Ginto8> itrekkie, you may actually get a little better performance
if you don't give files a buffer, and use a for file := range files {} for the
dictionary processing loop
22:35 < itrekkie> it's not really any faster than reading off the disk then
processing the input in order
22:35 < Ginto8> and close files at the end of the first goroutine
22:35 < niemeyer> itrekkie: Also, what amount of data are you processing?
22:35 < niemeyer> itrekkie: What's the total time?
22:36 -!- elephants [~elephants@66.207.210.2] has quit [Remote host closed the
connection]
22:36 < itrekkie> it's around 10MB of text files, each around 20kb, it's the
brown corpus
22:37 < zeebo> goroutines are for concurrency, not parallelization
22:37 < itrekkie> on my sytem, the uncommented version runs in real 0m1.380s
user 0m1.220s, so the goroutines don't seem to be helping much at all
22:37 < niemeyer> zeebo: You can get both if done properly
22:37 < zeebo> id just read them sequentially off the disk and skip
goroutines because thats the way files are transferred off disk
22:38 < itrekkie> but my thought process was that while one core is fetching
data from the disk, the others could be processing that data concurrently?
22:38 < zeebo> but you have to read data from the disk
22:38 < zeebo> and switching from reading the data from a file to walking
the file tree makes it seek
22:38 < niemeyer> itrekkie: There's some logic to that, but if processing is
fast, you're making things worse
22:39 < niemeyer> itrekkie: Due to locality
22:39 < nteon> niemeyer: was just at dinner.  goinstall works fine on
weekly, so its a regression between there and tip.  I can narrow it down further
22:39 < niemeyer> nteon: I found the bug..  will submit a fix soon
22:39 < itrekkie> I'm still pleased with go in this simple exercise, it's
beating the pants off my C++ version with boost, and it's just been a joy to use
:)
22:40 < niemeyer> itrekkie: Try doing what zeebo suggests..  read and
process it straight
22:40 -!- wrtp [~rog@host-92-23-125-43.as13285.net] has quit [Quit: wrtp]
22:40 < nteon> niemeyer: cool :)
22:41 < zeebo> itrekkie: if you want to try something, try globbing all the
filenames first, then having a reader goroutine throw the file data down a
channel, and a processor goroutine do the processing from the channel
22:41 < zeebo> rather than throwing filenames down, throw the actual data
22:41 < zeebo> that might perform better
22:42 < itrekkie> I'm pretty sure I am passing the file data through the
channel already, not the filenames
22:42 -!- Slant [~scott@124-148-191-7.dyn.iinet.net.au] has quit [Quit: Slant]
22:42 < niemeyer> zeebo: That's exactly what he's doing
22:42 < zeebo> oh yeah you're right haha
22:42 < zeebo> reading comprehension :)
22:42 < zeebo> no wait not exactly
22:42 < zeebo> wait, yes exactly.  nevermind
22:43 < itrekkie> sorry, the code might be a little hard to follow, I've
just been mucking around with it
22:43 -!- wrtp [~rog@host-92-23-125-43.as13285.net] has joined #go-nuts
22:43 < zeebo> no i've just been staring at the computer all day and didnt
read it right.  its easy to follow
22:45 < itrekkie> alright, so reading the data off disk blocking main, then
processing, blocking main is the tiniest bit slower I think.  it's hard to get
good numbers out of it.
22:46 < niemeyer> itrekkie: This is just splitting tasks incorrectly
22:46 < niemeyer> itrekkie: You can likely get more speed, but not like that
22:46 < itrekkie> I'm very open to suggestions, I feel like I'm doing it
wrong ;)
22:47 < niemeyer> itrekkie: This is dominated by reading files from disk..
with 20kb I suspect you have a background goroutine sitting idle most of the time
and are paying the price of synchronization
22:49 < itrekkie> I've also tried a version that loads all the file data at
once, and parallelizes the processing of the data afterwards, it's slower than my
current solution
22:50 < zeebo> id imagine the dictionary has to lock write access
22:50 < niemeyer> itrekkie: E.g.  put the whole data in a single file, read
it all at once in a list, split the list in 4 parts..  provide each part to a
different goroutine..
22:52 -!- erus` [~chatzilla@cpc2-gill2-0-0-cust701.basl.cable.virginmedia.com] has
quit [Remote host closed the connection]
22:52 < itrekkie> that's an idea worth trying :) thanks
22:54 < niemeyer> itrekkie: Don't write to a single dictionary, of course,
otherwise you kill parallelism again on syncing
22:55 -!- gzmask [~ray@corwin.cat.uregina.ca] has quit [Quit: gzmask]
22:55 -!- franciscosouza [~francisco@201.7.186.67] has quit [Quit: franciscosouza]
22:55 < itrekkie> how would you go about reading the file?  Is
ioutil.ReadFile still appropriate?
22:57 < itrekkie> it would be most convienent to have the file as a slice of
the lines of the file, I think
22:57 -!- wrtp [~rog@host-92-23-125-43.as13285.net] has quit [Quit: wrtp]
22:59 -!- Adys [~Adys@unaffiliated/adys] has quit [Quit: Quit]
23:00 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts
23:00 < itrekkie> oh yea, reading a big concatenated file helps :D
23:01 -!- r_linux [~r_linux@189.38.220.35] has quit [Quit: Lost terminal]
23:02 < niemeyer> itrekkie: Welcome to the world of disks :-)
23:02 < nteon> niemeyer: oh I think I see, its because go.build.ScanDir is
now adding the imports of _test files to the DirInfo.Imports it returns, right?
23:02 < itrekkie> what's the second argument to make for channels?
23:02 < nteon> (I know you already figured it out, just seeing if I can
follow along :)
23:02 < niemeyer> nteon: Oh, sorry..  I could have pointed out if you were
curious
23:03 < niemeyer> nteon: Yeah, that's the change affecting it
23:03 < zeebo> itrekkie: a buffer amount
23:03 < zeebo> it lets sends be async until the buffer is full
23:03 < niemeyer> nteon: Just preparing a test now
23:03 -!- vpit3833 [~user@203.111.33.203] has quit [Read error: Connection reset
by peer]
23:04 -!- Anoq [~radek@cst-prg-81-1.vodafone.cz] has joined #go-nuts
23:04 < nteon> niemeyer: I could have asked as well, but I like figuring
things out on my own if I can
23:05 < niemeyer> nteon: +1
23:05 < niemeyer> nteon: Good way to learn :)
23:06 < itrekkie> hmm, splitting up the string is turning out to be the
hardest part :/
23:06 < nteon> niemeyer: its served me pretty well so far :)
23:07 < niemeyer> nteon: Do you want to follow the fix along?
23:08 -!- vpit3833 [~user@203.111.33.203] has joined #go-nuts
23:08 < itrekkie> would anyone have some tips on partitioning this job for
parallelization?  http://pastie.org/2430468
23:14 < nteon> niemeyer: sure!
23:14 < niemeyer> nteon: Ok..  I'll send you a diff testing the current
behavior in a bit
23:16 < nteon> niemeyer: sounds good
23:17 < niemeyer> nteon: http://paste.ubuntu.com/674902/
23:17 < niemeyer> nteon: That's testing the current behavior..
23:18 < itrekkie> I'm escaping the string's bounds at some point, all the
goroutines crash and burn
23:19 < niemeyer> nteon: http://paste.ubuntu.com/674904/
23:19 < niemeyer> nteon: That changes the test to what we want..  TDD style
23:19 < niemeyer> Test is broken now
23:21 < nteon> cool, I'll take a look
23:22 < itrekkie> is there anyway to debug a goroutine?  I'd like to find
out what slice index is actually going out of bounds
23:25 < Anoq> Hi, I have hard time to underestand package management in go.
23:25 < Anoq> What make me crazy is that I do not underestand how it works.
23:25 < Anoq> For instance I downloaded gocalc to simple test it.  But
gocalc does:
23:25 < Anoq> import "gtk".  But how to get this package.  If I go to the
https://github.com/mattn/go-gtk and follow the instructions, I do not underestand
the result.  It DO NOT INSTALL PCAKAGE GTK.  But different package with different
name "github.com/mattn/go-gtk/gtk".
23:25 < Anoq> So any software depending on gtk is not compilable at all.
23:26 < niemeyer> nteon: That's the fix: http://paste.ubuntu.com/674908/
23:26 < str1ngs> Anoq: what result are you getting that you do not
understand?
23:26 < Anoq> how can I get gtk installed.
23:27 -!- franciscosouza [~francisco@187.105.21.97] has joined #go-nuts
23:27 < Anoq> I mean go-gtk.  So for instance gocalc will be compilable.
23:27 < str1ngs> Anoq: goinstall github.com/mattn/go-gtk/gtk
23:27 < Anoq> but this do not instal gtk
23:27 < str1ngs> does it give an error?
23:27 < Anoq> as I wrote it will install "github.com/mattn/go-gtk/gtk"
23:28 < str1ngs> in this case you need to fix gocalc to import
github.com/mattn/go-gtk/gtk not gtk
23:28 < str1ngs> ie import gtk "github.com/mattn/go-gtk/gtk"
23:28 -!- meling [~meling@85.252.66.250] has quit [Remote host closed the
connection]
23:28 < str1ngs> if I'm reading the issue right.
23:29 < Anoq> its strange.  because the examples on the go-gtk on the web
not these in package are also not compilable.
23:30 < Anoq> cause the need gtk and go-gtk do not install gtk but
github.com/mattn/go-gtk/gtk.
23:30 < str1ngs> what errors do you get?
23:30 < niemeyer> nteon: That's the CL:
http://codereview.appspot.com/4958046
23:30 < str1ngs> Anoq: sound like you just need to fix the import lines like
I mentioned.
23:31 < itrekkie> it is possible to slice a string, right?  I feel like I'm
slowing going insane
23:31 < Anoq> gui.go:4: can't find import: gtk
23:32 < niemeyer> nteon: now hg mail sends it to the list for review..  we
just have to wait.  ;)
23:32 < exch> itrekkie: yes
23:33 < itrekkie> okay, how about finding exactly where a goroutine is
panicing about index out of bounds?
23:33 < str1ngs> Anoq: ok so change the import to be . import gtk
"github.com/mattn/go-gtk/gtk"
23:33 < niemeyer> itrekkie: The traceback should tell you that
23:33 < str1ngs> itrekkie: if you read the back trace it will tell you .
23:34 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts
23:34 < str1ngs> niemeyer beat me, sorry for being redundant :P
23:34 < Anoq> So If I underestand it clearly.  For every
code/library/package I need to install I have to download it.  Manually check all
the source files for bad imports.  Install missing libraries by manually
downloading and checking and repairing all the source files and so on and so on.
23:35 < Anoq> I'll call it dependency source hell.
23:35 < itrekkie> I'm having a hard time interpring the traceback, any
insight?  http://pastie.org/2430560
23:35 < str1ngs> Anoq: no this is just a case of it not being imported
properly
23:35 < niemeyer> Anoq: I call it goinstall
23:35 < itrekkie> I guess I don't know which goroutine panic'd
23:35 < niemeyer> Anoq: http://golang.org/cmd/goinstall
23:36 < str1ngs> Anoq: go is far from dependency hell.
23:36 < Anoq> But how it should be imported, when the go-gtk says Coding
Style
23:36 < Anoq> package main
23:36 < Anoq> import (
23:36 < Anoq> "os"
23:36 < Anoq> "gtk"
23:36 < Anoq> "path"
23:36 < Anoq> )
23:36 < Anoq> but there is no "gtk" at all.
23:36 < niemeyer> Anoq: This is bad documentation..
23:36 < str1ngs> Anoq: that is if you installed go-gtk with make
23:37 < str1ngs> Anoq: its easy to fix
23:37 < niemeyer> str1ngs: and this is a bad Makefile :)
23:37 < niemeyer> Good documentation will include the full URL..  good
Makefiles too
23:37 -!- tncardoso [~thiago@187.114.48.53] has quit [Remote host closed the
connection]
23:37 < str1ngs> he might not be aware
23:37 < niemeyer> import "launchpad.net/mgo"
23:37 < niemeyer> in the source
23:37 < niemeyer> TARG=launchpad.net/mgo
23:37 < niemeyer> in the Makefile
23:37 < niemeyer> No pain
23:38 < str1ngs> Anoq: if you make a github issue I'm sure he'll fix it.
23:38 < str1ngs> niemeyer: but if you recall before the pkg-config addition,
it could only be installed with make.  so I'm guessing this is left over from that
23:38 < niemeyer> Anoq: With that style, you can goinstall the URL directly,
and it will recurse to solve all the dependencies without further actions
23:39 < niemeyer> str1ngs: Perhaps..  today it's still a bug that should be
fixed, though
23:39 < str1ngs> agreed provided he know's about it
23:40 < str1ngs> Anoq: please open an issue so matt know's about it.
23:40 < Anoq> so any mentioning of import "gtk" is wrong from the beginning.
And should allways be import "github.com/mattn/go-gtk/gtk"
23:40 < str1ngs> its not wrong.  only wrong if you use goinstall
23:41 < str1ngs> and it should be import gtk "github.com/mattn/go-gtk/gtk"
23:42 < itrekkie> okay, I made a bit of progress on my issue, for some
reason when launching the goroutines, i is always 4, any ideas on what could be
causing this?  http://pastie.org/2430587
23:42 < str1ngs> actually both might work but I like that latter :P
23:43 < itrekkie> I believe spawing a closure is fine, and that the local
variables from the surrounding scope are properly captured?
23:47 < itrekkie> is this perhaps a bug?
23:48 -!- tavis_rain [~tavisb@24-104-129.146.hfc.mediarain.com] has quit [Read
error: Connection reset by peer]
23:50 < nteon> niemeyer: I get this after applying your fix:
http://fpaste.org/ISHE/
23:51 < Anoq> ????  what's this: str1ngs> its not wrong.  only wrong if
you use goinstall
23:51 < niemeyer> nteon: I don't think you've applied the fix
23:52 < str1ngs> Anoq: I think I explained quite well what is happening and
how to fix it.  Please open an issue on github if you would like to see it fixed.
23:52 < str1ngs> Anoq: if plan to not open an issue let me know and I will
do it.
23:53 < itrekkie> it would be a nice feature to link to examples in the go
playground
23:53 < itrekkie> anyway, I think I'm reporducing the issue I'm seeing,
could someone take a look?  http://pastie.org/2430639
23:53 < nteon> hmm
23:54 < itrekkie> I can't figure out why i is always 4 inside the closure
23:56 -!- cco3 [~conleyo@nat/google/x-mwotrnlpslouhzey] has quit [Disconnected by
services]
23:56 -!- ccc12 [~Adium@140.109.98.187] has joined #go-nuts
23:56 -!- cco31 [~conleyo@nat/google/x-jmuralhosfxcqjei] has joined #go-nuts
23:57 < |Craig|> itrekkie: closures refer to the loop variables, not to what
they were on the iteration the closure referance was aquired
23:57 < |Craig|> pass i to the closure
23:57 < itrekkie> thank you :) I just thought of that myself, seems to work
23:57 -!- franciscosouza [~francisco@187.105.21.97] has quit [Quit:
franciscosouza]
23:58 < itrekkie> but without passing i to the closure, where's i coming
from?
23:58 < |Craig|> its just the loop's i
23:58 < |Craig|> what ever it happens to be at the time its referanced.  its
the same variable, not a copy
23:58 < |Craig|> passing it creates a copy
23:59 < nteon> niemeyer: well, I had some problems with the several patches,
but applying your CL works well :)
23:59 < itrekkie> ah, thank you :)
23:59 -!- Eataix [~Eataix@130.56.93.42] has joined #go-nuts
23:59 < itrekkie> well thank you all, this version is the fastest yet :D
--- Log closed Fri Aug 26 00:00:16 2011