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

--- Log opened Sun Nov 21 00:00:17 2010
00:03 < |Craig|> i'm confused.  I used to have to import my packages as
/packagename but with my new build system, I have to use just packagename, and
thats what got me stuck this whole time I think
00:14 -!- wrtp [~rog@] has quit [Quit: wrtp]
00:15 -!- watr_ [~watr@] has joined #go-nuts
00:21 -!- Project_2501 [~Marvin@] has quit [Quit: E se abbasso questa
leva che succ...]
00:24 -!- jramnani [~jramnani@adsl-75-3-140-12.dsl.chcgil.sbcglobal.net] has
joined #go-nuts
00:33 -!- noktoborus_ [~noxless@gateway/tor-sasl/noktoborus] has quit [Remote host
closed the connection]
00:34 -!- sauerbraten [~sauerbrat@p508CC67A.dip.t-dialin.net] has joined #go-nuts
00:46 -!- littlebobby [~bob@unaffiliated/littlebobby] has quit [Quit: Ex-Chat]
00:56 -!- Adys [~Adys@unaffiliated/adys] has quit [Quit: I ♥ Unicode]
00:57 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts
00:59 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3]
01:06 -!- skelterjohn [~jasmuth@c-76-98-219-171.hsd1.pa.comcast.net] has joined
01:11 -!- kanru [~kanru@61-228-153-104.dynamic.hinet.net] has quit [Ping timeout:
255 seconds]
01:11 -!- skelterjohn [~jasmuth@c-76-98-219-171.hsd1.pa.comcast.net] has quit
[Client Quit]
01:24 -!- ExtraSpice [~XtraSpice@] has quit [Ping timeout: 240
01:25 -!- skelterjohn [~jasmuth@c-76-98-219-171.hsd1.nj.comcast.net] has joined
01:37 -!- skelterjohn [~jasmuth@c-76-98-219-171.hsd1.nj.comcast.net] has quit
[Quit: skelterjohn]
01:38 -!- bmizerany [~bmizerany@c-76-21-40-207.hsd1.ca.comcast.net] has joined
01:40 -!- sauerbraten [~sauerbrat@p508CC67A.dip.t-dialin.net] has quit [Remote
host closed the connection]
01:40 < bmizerany> can anyone help me with gofmt -r?  I'm trying to run a
simple replacement but am getting an error.
01:40 < bmizerany> :!gofmt -r 'ch := s.Watch(p) -> ch := make(chan
Event); s.WatchOn(p, ch)' store_test.go
01:40 < bmizerany> parsing pattern ch := s.Watch(p) : input:1:4: expected
'EOF', found ':='
01:40 < bmizerany> I'm confused as to why it's expecting EOF
01:44 < SirPsychoS> is go's goroutine scheduling smart enough to switch
goroutines if a cgo function call blocks?  It seems like I'm getting into a
deadlock involving C mutexes
01:45 < SirPsychoS> I guess I'm not sure it'd even be _possible_ to get
around that
01:54 <+iant> SirPsychoS: If one goroutine is calling a C function via cgo,
then if there is another goroutine ready to run, it should be run in a different
OS thread
01:54 <+iant> that is, blocking in a cgo call should not block the program
01:54 -!- papna [~mike@python/site-packages/papna] has joined #go-nuts
01:58 -!- tdnrad [~tdnrad@D6290.WPA.Dal.Ca] has joined #go-nuts
01:58 < SirPsychoS> hmmm...  well, what I think is happening is that one
goroutine calls a c function that locks a mutex and then blocks on some form of
input; meanwhile, the other goroutine calls another cgo function that locks the
same mutex, and it can't progress
01:58 <+iant> that can certainly happen
01:58 < SirPsychoS> and neither (possibly) can anything else, since there's
only one OS thread (as by default)
01:59 <+iant> no, functions calling cgo code don't count against the maximum
number of threads
01:59 <+iant> blocking in a cgo thread won't stop other goroutines
01:59 < SirPsychoS> cgo calls functions in their own threads?
01:59 <+iant> no, it just doesn't count those threads against the maximum
01:59 <+iant> so if it finds something else to run, it will start up a new
02:00 <+iant> and when the cgo call returns, and the thread starts counting
again, the extra threads will no longer be used
02:00 <+iant> at least, that is how it is supposed to work
02:00 -!- tav [~tav@] has quit [Ping timeout: 264 seconds]
02:00 < SirPsychoS> so then when a cgo call is started, a new OS thread is
made if there are any other goroutines waiting?
02:01 <+iant> yes
02:01 * SirPsychoS goes to check whether that's actually happening with pstree
02:02 < SirPsychoS> looks like I do have 2 OS threads running
02:03 < SirPsychoS> ah alright, I figured it out...  it's still ugly though
02:03 < SirPsychoS> it's not an absolute deadlock - it just can't progress
until the first thing unlocks the mutex
02:05 -!- tav [~tav@] has joined #go-nuts
02:06 -!- skelterjohn [~jasmuth@c-76-98-219-171.hsd1.pa.comcast.net] has joined
02:35 -!- skelterjohn [~jasmuth@c-76-98-219-171.hsd1.pa.comcast.net] has quit
[Quit: skelterjohn]
02:40 -!- skelterjohn [~jasmuth@c-76-98-219-171.hsd1.pa.comcast.net] has joined
02:41 -!- enherit [~enherit@71-83-188-75.dhcp.lnbh.ca.charter.com] has joined
02:50 -!- forrest [~forrest@c-66-41-24-25.hsd1.mn.comcast.net] has joined #go-nuts
02:52 < forrest> ok, i'm a little confused -- looking at "A Tutorial", they
develop an I/O package -- this is just an example right?  Is there a standard
package for reading and writing files?
02:52 < Tv> there is a standard package
02:52 < forrest> i just want to do a little file manipulation to get my feet
02:52 < Tv> it looks a lot like the example
02:53 < forrest> is that the "io" package?
02:53 -!- devrim [~Adium@cpe-72-225-239-227.nyc.res.rr.com] has quit [Quit:
02:54 < tdnrad> forrest, you'll want to look at io, as well as os and bufio
02:55 < tdnrad> I was where you were about 4 days ago ;)
02:55 < tdnrad> where you are*
02:55 < forrest> ah, so os has the file
02:55 < tdnrad> err
02:55 < tdnrad> wow I need sleep
02:55 < forrest> or a time machine
02:55 < tdnrad> you know what I meant :)
02:55 < forrest> yeah, even read it right when you said it
02:56 < tdnrad> excellent then, lets pretend this never happened
02:56 < forrest> i know i'm getting ahead of myself, but is there a regex
02:58 < tdnrad> regexp
02:58 < tdnrad> http://golang.org/pkg/regexp/
02:59 < forrest> cool
03:38 < tdnrad> off to bed, until next time, night night all
03:38 -!- tdnrad [~tdnrad@D6290.WPA.Dal.Ca] has quit [Quit: Leaving]
03:42 -!- htoothrot [~mux@66-169-185-121.dhcp.ftwo.tx.charter.com] has joined
03:59 -!- enherit [~enherit@71-83-188-75.dhcp.lnbh.ca.charter.com] has quit [Read
error: Operation timed out]
04:03 -!- enherit [~enherit@71-83-188-75.dhcp.lnbh.ca.charter.com] has joined
04:05 -!- jramnani [~jramnani@adsl-75-3-140-12.dsl.chcgil.sbcglobal.net] has quit
[Ping timeout: 260 seconds]
04:20 -!- skelterjohn [~jasmuth@c-76-98-219-171.hsd1.pa.comcast.net] has quit
[Quit: skelterjohn]
04:23 -!- jramnani [~jramnani@adsl-75-3-140-12.dsl.chcgil.sbcglobal.net] has
joined #go-nuts
04:28 -!- jramnani [~jramnani@adsl-75-3-140-12.dsl.chcgil.sbcglobal.net] has left
#go-nuts []
04:30 -!- ivan` [~ivan@unaffiliated/ivan/x-000001] has quit [Ping timeout: 265
04:30 -!- prudhvi [~nobody@nullpointer.in] has quit [Ping timeout: 245 seconds]
04:30 -!- rphillips [~rphillips@unaffiliated/rphillips] has quit [Ping timeout:
265 seconds]
04:31 -!- kkress [~kkress@] has quit [Ping timeout: 276 seconds]
04:31 -!- prudhvi [~nobody@nullpointer.in] has joined #go-nuts
04:32 -!- rejb [~rejb@unaffiliated/rejb] has quit [Ping timeout: 276 seconds]
04:34 -!- rphillips [~rphillips@unaffiliated/rphillips] has joined #go-nuts
04:34 < nictuku> spent hours trying to make mongo.Unmarshal() work.  no
luck.  it won't populate the []int64 field inside my struct.
04:37 -!- skelterjohn [~jasmuth@c-76-98-219-171.hsd1.pa.comcast.net] has joined
04:51 -!- skelterjohn [~jasmuth@c-76-98-219-171.hsd1.pa.comcast.net] has quit
[Quit: skelterjohn]
04:52 < nictuku> ok I got closer now, using got.Get("arrayname") then doing
05:02 -!- rhencke [~rhencke@ppp-70-247-243-221.dsl.ltrkar.swbell.net] has joined
05:02 < rhencke> anyone here on os x 10.6 that'd mind double-checking
something for me?
05:03 < rhencke> i've either got a bizarre cgo bug, or a broken computer
05:06 -!- bmizerany [~bmizerany@c-76-21-40-207.hsd1.ca.comcast.net] has quit
[Remote host closed the connection]
05:09 < |Craig|> rhencke: I have a 10.6 machine, so if its really quick and
easy to test, I can do it for you
05:09 < rhencke> thanks, craig
05:09 < rhencke> do you know where the cgo life sample is?
05:09 < |Craig|> Ive never done any cgo stuff I don't thing
05:09 < rhencke> it's under GO_ROOT/misc/cgo/life
05:10 < rhencke> try doing 'make life && ./life'..  that should work
05:11 < |Craig|> rhencke: I used gomake instead of make, but it made a
little ascii picture thing
05:12 < rhencke> ok good
05:12 < rhencke> ok, go into life.go
05:12 < rhencke> where it says //export GoStart
05:13 < rhencke> make it //export Aaa
05:13 < rhencke> and change //export GoWait to //export Bb
05:13 < rhencke> then in c-life.c
05:14 < rhencke> on line 15, change GoStart_return to Aaa_return
05:14 < rhencke> then the rest of them, change GoLife to Aaa, and GoWait to
Bb...  there should be 4 of each
05:14 < |Craig|> rhencke: you mean just change the comments, not the method
names in life.go?
05:14 < rhencke> Yes
05:15 < rhencke> on my box, after making those changes...  i get dyld:
Symbol not found: __cgoexp_Bb
05:15 < rhencke> what's weird though...  if you change Aaa to Aa...  it
starts working
05:16 < rhencke> thanks craig
05:17 < |Craig|> rhencke: i get dyld: Symbol not found: __cgoexp_Bb too
05:17 < rhencke> how about if you change Aaa to Aa?
05:17 < |Craig|> and Aa works
05:17 < rhencke> ok,..  i'm not crazy
05:17 < rhencke> thanks, craig
05:17 < rhencke> that helps a lot
05:17 < |Craig|> yes, something else is crazy
05:18 < rhencke> now i'm just confused..
05:18 < |Craig|> and I got a free show of cgo, looks kinda cool
05:18 < rhencke> it's pretty nice
05:18 < rhencke> its not without its limits, but it's pretty darn good at
talking to the c world
05:18 < rhencke> you can even call go -> c->go ->c->etc
05:23 < |Craig|> only C project I use much at the moment is Panda3D, and
while I managed to link to it with Cython, I don't think I want to try and do so
from go, as I don't think that would be very easy
05:28 -!- rbraley [~rbraley@ip72-222-128-78.ph.ph.cox.net] has quit [Ping timeout:
255 seconds]
05:28 -!- adu [~ajr@pool-173-66-11-168.washdc.fios.verizon.net] has joined
05:29 -!- rbraley [~rbraley@ip72-222-128-78.ph.ph.cox.net] has joined #go-nuts
05:31 < rhencke> What is Panda3d?
05:33 < plexdev> http://is.gd/hvXgd by [Robert Griesemer] in
go/src/pkg/go/token/ -- position.go: more flexible AddFile method
05:38 < |Craig|> rhencke: 3D game engine
05:40 -!- MorningSon [~MorningSo@cpe-70-114-5-180.satx.res.rr.com] has joined
05:40 < rhencke> ah, cool :)
05:40 < |Craig|> BSD licensed, written in C++, cross paltform, used for a
couple commercial mmos.  I have a feeling somewhere in the directX support, openGL
support, or the fact that it won't even build with GCC on windows, it would fail
05:41 < |Craig|> my current Go project is a server for it as the scaleable
commercial ones are not opensourced
05:41 < |Craig|> and writing a game server in go looked rather fun
05:44 < rhencke> Oh, awesome.  :)
05:45 < rhencke> That sounds like a pretty fun project
05:45 -!- forrest [~forrest@c-66-41-24-25.hsd1.mn.comcast.net] has quit [Ping
timeout: 245 seconds]
06:00 -!- rhencke [~rhencke@ppp-70-247-243-221.dsl.ltrkar.swbell.net] has quit
[Ping timeout: 276 seconds]
06:01 -!- devrim [~Adium@cpe-72-225-239-227.nyc.res.rr.com] has joined #go-nuts
06:02 -!- zozoR [~zozoR@5634798d.rev.stofanet.dk] has joined #go-nuts
06:14 -!- ejsherry [~ejsherry@dhcp-0-16-b6-e6-93-4e.cpe.quickclic.net] has joined
06:20 -!- ejsherry [~ejsherry@dhcp-0-16-b6-e6-93-4e.cpe.quickclic.net] has quit
[Quit: ejsherry]
06:24 -!- bmizerany [~bmizerany@c-76-21-40-207.hsd1.ca.comcast.net] has joined
06:27 -!- krutcha [~krutcha@S010600045a27676a.vs.shawcable.net] has joined
06:28 -!- ejsherry [~ejsherry@dhcp-0-16-b6-e6-93-4e.cpe.quickclic.net] has joined
06:29 -!- ejsherry [~ejsherry@dhcp-0-16-b6-e6-93-4e.cpe.quickclic.net] has left
#go-nuts []
06:29 -!- ejsherry [~ejsherry@dhcp-0-16-b6-e6-93-4e.cpe.quickclic.net] has joined
06:35 -!- tensorpudding [~user@] has quit [Remote host closed the
06:38 < araujo> hello , I have been a bit out of the loop with Go , just a
question ...  Does Go already implement C-like unions?
06:38 < araujo> last time I checked it didn't
06:39 < krutcha> don't think so
06:40 -!- pingveno [~pingveno@c-98-246-133-8.hsd1.or.comcast.net] has quit [Ping
timeout: 240 seconds]
06:40 < cbeck> No, it doesn't, I believe it's on the roadmap though
06:42 -!- pingveno [~pingveno@c-98-246-133-8.hsd1.or.comcast.net] has joined
06:44 -!- noam [noam@IGLD-84-229-71-149.inter.net.il] has quit [Read error:
Connection reset by peer]
06:44 -!- noam [~noam@IGLD-84-229-71-149.inter.net.il] has joined #go-nuts
06:51 -!- ejsherry [~ejsherry@dhcp-0-16-b6-e6-93-4e.cpe.quickclic.net] has quit
[Quit: ejsherry]
06:56 -!- watr_ [~watr@] has quit [Ping timeout: 255 seconds]
06:56 -!- krutcha [~krutcha@S010600045a27676a.vs.shawcable.net] has quit [Quit:
07:02 -!- fabled [~fabled@] has joined #go-nuts
07:04 -!- Tv [~tv@cpe-76-168-227-45.socal.res.rr.com] has quit [Read error:
Operation timed out]
07:56 -!- zozoR [~zozoR@5634798d.rev.stofanet.dk] has quit [Quit: Morten.  Desu~]
08:01 -!- ivan` [~ivan@unaffiliated/ivan/x-000001] has joined #go-nuts
08:10 -!- fabled [~fabled@] has quit [Quit: Ex-Chat]
08:18 -!- photron_ [~photron@port-92-201-99-231.dynamic.qsc.de] has joined
08:20 -!- kanru [~kanru@61-228-153-104.dynamic.hinet.net] has joined #go-nuts
08:23 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
08:31 -!- ExtraSpice [~XtraSpice@] has joined #go-nuts
08:35 -!- awidegreen [~quassel@p5DF1E44E.dip.t-dialin.net] has joined #go-nuts
08:38 -!- krutcha [~krutcha@S010600045a27676a.vs.shawcable.net] has joined
08:39 -!- photron_ [~photron@port-92-201-99-231.dynamic.qsc.de] has quit [Ping
timeout: 264 seconds]
08:47 -!- genbattle [~nick@125-239-210-94.jetstream.xtra.co.nz] has joined
09:03 -!- krutcha [~krutcha@S010600045a27676a.vs.shawcable.net] has quit [Read
error: Connection reset by peer]
09:10 -!- krutcha [~krutcha@S010600045a27676a.vs.shawcable.net] has joined
09:18 -!- adu [~ajr@pool-173-66-11-168.washdc.fios.verizon.net] has quit [Quit:
09:18 -!- genbattle [~nick@125-239-210-94.jetstream.xtra.co.nz] has quit [Remote
host closed the connection]
09:45 -!- skejoe [~skejoe@] has joined #go-nuts
09:50 -!- virtualsue_ [~chatzilla@nat/cisco/x-onyljcakngevmxpr] has quit [Ping
timeout: 240 seconds]
09:54 -!- Tv [~tv@cpe-76-168-227-45.socal.res.rr.com] has joined #go-nuts
10:10 -!- snearch [~snearch@f053008049.adsl.alicedsl.de] has joined #go-nuts
10:14 -!- femtoo [~femto@95-89-197-196-dynip.superkabel.de] has joined #go-nuts
10:14 -!- rlab [~Miranda@] has joined #go-nuts
10:18 -!- Tv [~tv@cpe-76-168-227-45.socal.res.rr.com] has quit [Ping timeout: 245
10:30 -!- MaksimBurnin [~max@44.188-224-87.telenet.ru] has quit [Ping timeout: 255
10:56 -!- wrtp [~rog@] has joined #go-nuts
11:06 -!- prip [~foo@host140-120-dynamic.52-79-r.retail.telecomitalia.it] has quit
[Ping timeout: 265 seconds]
11:19 -!- prip [~foo@host214-83-dynamic.11-87-r.retail.telecomitalia.it] has
joined #go-nuts
11:23 -!- terrex [~terrex@] has joined #go-nuts
11:24 -!- sauerbraten [~sauerbrat@p508CAE9E.dip.t-dialin.net] has joined #go-nuts
11:31 -!- piyushmishra [~piyushmis@] has joined #go-nuts
11:48 -!- skejoe [~skejoe@] has quit [Quit: Lost terminal]
12:59 -!- risent [~risent@] has joined #go-nuts
13:00 -!- risent [~risent@] has left #go-nuts []
13:15 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
13:18 -!- terrex [~terrex@] has quit [Read error:
Operation timed out]
13:32 -!- XenoPhoenix [~Xeno@cpc5-aztw24-2-0-cust39.aztw.cable.virginmedia.com]
has quit [Remote host closed the connection]
13:42 -!- co_crcw [~Hellovers@] has joined #go-nuts
13:42 -!- co_crcw [~Hellovers@] has left #go-nuts
14:20 -!- mssm [~mssm@ip-95-221-86-196.bb.netbynet.ru] has joined #go-nuts
14:20 -!- femtoo [~femto@95-89-197-196-dynip.superkabel.de] has quit [Ping
timeout: 255 seconds]
14:28 -!- cenuij [~cenuij@base/student/cenuij] has quit [Remote host closed the
14:48 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
14:55 -!- jochang [3a72cb23@gateway/web/freenode/ip.] has joined
14:57 -!- piyushmishra [~piyushmis@] has quit [Ping timeout: 245
15:11 -!- piyushmishra [~piyushmis@] has joined #go-nuts
15:11 -!- skelterjohn [~jasmuth@c-76-98-219-171.hsd1.nj.comcast.net] has joined
15:14 -!- zozoR [~zozoR@5634798d.rev.stofanet.dk] has joined #go-nuts
15:14 -!- DerHorst [~Horst@e176107115.adsl.alicedsl.de] has joined #go-nuts
15:26 -!- DerHorst [~Horst@e176107115.adsl.alicedsl.de] has quit [Remote host
closed the connection]
15:26 -!- tvw [~tv@e176002069.adsl.alicedsl.de] has joined #go-nuts
15:33 -!- aho [~nya@fuld-4d00d53f.pool.mediaWays.net] has quit [Ping timeout: 245
15:34 -!- napsy [~luka@] has quit [Read error: Operation timed out]
15:37 -!- napsy [~luka@] has joined #go-nuts
15:38 -!- femtoo [~femto@95-89-197-196-dynip.superkabel.de] has joined #go-nuts
15:45 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has quit [Ping
timeout: 265 seconds]
15:51 -!- aho [~nya@fuld-4d00d298.pool.mediaWays.net] has joined #go-nuts
15:51 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has joined #go-nuts
16:02 -!- fabled [~fabled@mail.fi.jw.org] has joined #go-nuts
16:17 -!- ExtraSpice [~XtraSpice@] has quit [Quit: Leaving]
16:25 -!- meanburrito920 [~john@unaffiliated/meanburrito920] has joined #go-nuts
16:25 -!- skelterjohn [~jasmuth@c-76-98-219-171.hsd1.nj.comcast.net] has quit
[Quit: skelterjohn]
16:40 -!- forrest [~forrest@c-66-41-24-25.hsd1.mn.comcast.net] has joined #go-nuts
16:46 -!- deso [~deso@x0561a.wh30.tu-dresden.de] has joined #go-nuts
16:53 -!- skelterjohn [~jasmuth@c-76-98-219-171.hsd1.nj.comcast.net] has joined
17:01 -!- skelterjohn [~jasmuth@c-76-98-219-171.hsd1.nj.comcast.net] has quit
[Quit: skelterjohn]
17:07 -!- XenoPhoenix [~Xeno@cpc5-aztw24-2-0-cust39.aztw.cable.virginmedia.com]
has joined #go-nuts
17:20 -!- skejoe [~skejoe@] has joined #go-nuts
17:32 -!- awidegreen_ [~quassel@p5DF1FBF7.dip.t-dialin.net] has joined #go-nuts
17:33 -!- XenoPhoenix [~Xeno@cpc5-aztw24-2-0-cust39.aztw.cable.virginmedia.com]
has quit [Remote host closed the connection]
17:34 -!- awidegreen [~quassel@p5DF1E44E.dip.t-dialin.net] has quit [Ping timeout:
245 seconds]
17:35 -!- rejb [~rejb@unaffiliated/rejb] has quit [Quit: .]
17:36 -!- mssm [~mssm@ip-95-221-86-196.bb.netbynet.ru] has quit [Ping timeout: 250
17:39 -!- SoniaKeys [~soniakeys@c-76-118-178-209.hsd1.ma.comcast.net] has joined
17:40 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
17:41 -!- ymasory [~ymasory@c-76-99-55-224.hsd1.pa.comcast.net] has quit [Quit:
17:41 -!- fabled [~fabled@mail.fi.jw.org] has quit [Quit: Ex-Chat]
17:43 -!- sacho [~sacho@90-154-151-43.btc-net.bg] has quit [Ping timeout: 245
17:45 -!- Fish [~Fish@9fans.fr] has joined #go-nuts
17:49 -!- Tv [~tv@cpe-76-168-227-45.socal.res.rr.com] has joined #go-nuts
17:54 -!- sacho [~sacho@] has joined #go-nuts
17:55 -!- tensorpudding [~user@] has joined #go-nuts
17:58 -!- femtoo [~femto@95-89-197-196-dynip.superkabel.de] has quit [Quit:
18:03 < nictuku> for the record, I found edsrzf's mongo driver (mongogo)
more usable than gomongo.  In case any of you want to write mongo stuff, try it
first.  https://github.com/edsrzf/mongogo
18:08 < Gertm> good to know
18:15 -!- DrHennessy [~alex@c-24-10-221-165.hsd1.ut.comcast.net] has joined
18:16 -!- skejoe [~skejoe@] has quit [Quit: leaving]
18:18 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3]
18:19 -!- jochang [3a72cb23@gateway/web/freenode/ip.] has quit [Quit:
Page closed]
18:27 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
18:27 -!- MaksimBurnin [~max@44.188-224-87.telenet.ru] has joined #go-nuts
18:43 -!- forrest [~forrest@c-66-41-24-25.hsd1.mn.comcast.net] has quit [Quit:
18:44 -!- binarypie [~binarypie@c-24-6-151-185.hsd1.ca.comcast.net] has joined
18:52 -!- aconran_ [~aaron@c-76-21-4-69.hsd1.ca.comcast.net] has quit [Ping
timeout: 240 seconds]
18:55 -!- watr_ [~watr@] has joined #go-nuts
19:02 -!- jochang [~identd@58-114-203-35.cable.dynamic.giga.net.tw] has joined
19:02 -!- watr__ [~watr@] has joined #go-nuts
19:02 -!- drako [~watr@] has joined #go-nuts
19:02 -!- watr__ [~watr@] has quit [Read error: Connection reset by
19:04 -!- drako [~watr@] has quit [Client Quit]
19:04 -!- watr_ [~watr@] has quit [Ping timeout: 240 seconds]
19:05 < vsmatck> ya for sure.  The gomongo driver is broken.  mongogo is a
lot better.
19:05 < vsmatck> The gomongo driver doesn't understand responses to
getlasterror for example.  Making is pretty broken.  The gomongo driver is pretty
much abandoned.
19:06 -!- tvw [~tv@e176002069.adsl.alicedsl.de] has quit [Ping timeout: 245
19:06 < vsmatck> The main problem with the gomongo driver is that it's bson
implementation is incomplete.  The edsrzf bson library is really nice.
19:13 -!- jochang [~identd@58-114-203-35.cable.dynamic.giga.net.tw] has quit [Ping
timeout: 276 seconds]
19:14 -!- scandium [~rainer@95-90-126-141-dynip.superkabel.de] has joined #go-nuts
19:14 -!- scandium [~rainer@95-90-126-141-dynip.superkabel.de] has left #go-nuts
19:14 -!- scandium [~rainer@95-90-126-141-dynip.superkabel.de] has joined #go-nuts
19:18 -!- noam [~noam@IGLD-84-229-71-149.inter.net.il] has quit [Read error:
Connection reset by peer]
19:18 -!- noam [noam@IGLD-84-229-71-149.inter.net.il] has joined #go-nuts
19:21 -!- jochang [~identd@] has joined #go-nuts
19:23 -!- aconran [~aaron@c-76-21-4-69.hsd1.ca.comcast.net] has joined #go-nuts
19:26 < zozoR> is there an ide with auto-completion out there yet?
19:26 < zozoR> for go that is :D
19:28 -!- bookses [~John@] has joined #go-nuts
19:28 < MaksimBurnin> zozoR: http://go-lang.cat-v.org/text-editors/
19:28 < Tv> some dirty hippie wrote this thing called emacs...
19:29 < exch> zozoR: Not an ide, but someone here wrote an auto-completion
daemon which you can plug into various existing IDE's.  There's an example of how
to plug it into VIM I believe
19:29 < exch> https://github.com/nsf/gocode
19:31 -!- bookses [~John@] has left #go-nuts []
19:31 < aconran> exch, interesting approach to write a daemon for
19:32 < MaksimBurnin> :-D
19:32 < aconran> anyone aware of any ID3 tag lib readers in go?
19:39 < MaksimBurnin> dont know any of them but i think its easy to write
one ;)
19:39 -!- TheMue [~TheMue@p5DDF77F4.dip.t-dialin.net] has joined #go-nuts
19:39 < |Craig|> goclipse has autocomplete, but last I checked it was
missing some other basics
19:40 -!- DrHennessy [~alex@c-24-10-221-165.hsd1.ut.comcast.net] has quit [Quit:
19:41 -!- piyushmishra [~piyushmis@] has quit [Quit: Leaving.]
19:41 < exch> I started work on a more general tag library which included
support for ID3 v1 and 2x tags, but I havent gotten round to finishing it.  ID3v2
is a rather pisspoor protocol
19:45 < zozoR> cool
19:47 < MaksimBurnin> this week i was thinking about a large hex-editor with
embedded scriptinng language and c struct parseing.  you drag-and-drop a binary
file, pasting struct definition from .h and you got highliting...
19:47 < exch> I can upload what I have to github if you want.  Perhaps you
can do something useful with it
19:48 < zozoR> im playing around with vector package, with the interface{}
type, but apparently you just cant convert with int() or string(), so how do you
do type assertion, like the compiler asks me to do?
19:48 -!- DrHennessy [~alex@c-24-10-221-165.hsd1.ut.comcast.net] has joined
19:49 < exch> it reads/writes id3v1.  and reads id3v2 so far.  writing of
all frame types is partially added.
19:49 < exch> zozoR: myinterface.(int)
19:49 < exch> You can check if the interface is a string like this: if ok :=
myval.(int); ok { ...  }
19:49 < exch> s/string/int
19:50 < vsmatck> Anyone seen/heard of the universal server that Joe
Armstrong made?  A server that doesn't know how to do anything but receive code
and execute it?  Seems like something like that would be nice with Go.
19:51 < vsmatck> Same idea as sawzall, and how mongodb uses javascript.
19:51 < Namegduf> I used to use that with owning goroutines.
19:51 < Namegduf> The owning goroutine for something did nothing but receive
functions and run them.
19:51 -!- stalled [~stalled@unaffiliated/stalled] has quit [Ping timeout: 265
19:52 < vsmatck> To do this requires that you can send go code somewhere and
then eval it.
19:52 < vsmatck> I'm talking about over a network though.
19:52 < vsmatck> Like if I have a sharded database.  I want to be able to
send code to evaluate possible results on the remote servers.
19:52 < zozoR> exch: i cant seem to get "myinterface.(int)" to work with an
empty interface : |
19:53 < vsmatck> I think a nice addition to the go standard library (way out
in the future) would be a go compiler.
19:53 < exch> zozoR: how is 'myinterface' defined?
19:53 < zozoR> why not just make go run the 6g command through the cmd
19:53 < zozoR> interface{} :D
19:54 < vsmatck> A intermediate language for Go could help with that.  Like
if you had "var mySuperLongVariableNameOMG string" it wouldn't be good to send
that variable name over the wire.  Something like microsoft CIL.
19:54 < vsmatck> You also wouldn't want to have to have each remote server
do full compile and apply all optimizations.
19:54 -!- Scorchin [~Scorchin@host86-163-124-29.range86-163.btcentralplus.com] has
joined #go-nuts
19:55 < vsmatck> I mean, seems like google might want to do it.  Sawzall is
good but Go is far richer.
19:55 < zozoR> also "if ok := k[i].(int); ok {" gives me an error, it thinks
that ok is an int :/
19:55 < exch> var a interface{}; a = 123; var b int; b = a.(int);
19:55 < exch> that should work
19:56 < vsmatck> I'm not sure if this is inherently easier to do with a
functional language (like Erlang).  I'm no expert the subject.  I've just recently
started to appreciate how moving calculation to be as close to the data as
possible is very useful (as the sawzall paper put it).
19:56 < exch> oh duh.  sorry.  it should be: if v, ok := myval.(int); ok { }
19:56 < exch> v then contains the actual int
19:57 < zozoR> ah :D
19:57 -!- tg [irc@tgbit.net] has joined #go-nuts
19:58 < exch> Here's the tag library for anyone who feels adventurous :p
https://github.com/jteeuwen/go-pkg-taggy I'm not sure if I will work on it anytime
soon, so knock yourself out
19:58 < aconran> exch, thx :) will take a look
19:58 < exch>
https://github.com/jteeuwen/go-pkg-taggy/blob/master/music/music_test.go this file
has some test cases using the ID3 readers
19:59 < exch> You'll have to put some MP3 files in the testdata/ folder for
it to work though
19:59 -!- htoothrot [~mux@66-169-185-121.dhcp.ftwo.tx.charter.com] has quit [Ping
timeout: 240 seconds]
20:01 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
20:08 -!- binarypie [~binarypie@c-24-6-151-185.hsd1.ca.comcast.net] has quit
[Remote host closed the connection]
20:08 < aconran> ah exch I was reading somewhere recently...  (maybe a
blog?) that you had a IRC bot framework built in go?
20:11 < exch> I did write some irc bot stuff, but I wouldn't go so far as to
call it a framework :) There have been some other people doing similar work
thuogh.  Perhaps you are referring to one of them
20:11 < exch> http://go-lang.cat-v.org/pure-go-libs check out the "IRC and
IM" section
20:19 -!- aconran [~aaron@c-76-21-4-69.hsd1.ca.comcast.net] has quit [Remote host
closed the connection]
20:21 -!- stalled [~stalled@unaffiliated/stalled] has joined #go-nuts
20:25 -!- deso [~deso@x0561a.wh30.tu-dresden.de] has quit [Remote host closed the
20:26 -!- TheSaint [~thesaint@] has joined #go-nuts
20:27 < |Craig|> I don't know if my generic container interests anyone, but
I find it rather useful.  It adds items (in constant time) faster than Append (on
average), constant time remove and iterates about 3 time slower than a slice from
my testing.
20:36 -!- TheSaint [~thesaint@] has quit [Quit: Colloquy for iPhone
- http://colloquy.mobi]
20:36 -!- DrHennessy [~alex@c-24-10-221-165.hsd1.ut.comcast.net] has quit [Quit:
20:36 -!- TheSaint [~thesaint@] has joined #go-nuts
20:37 < vsmatck> What's the advantage of that over a container/list?
20:38 < vsmatck> Ah. Something to do with the BlockChan function?  *thinks*
20:45 -!- ikaros_ [~ikaros@dslb-094-219-219-241.pools.arcor-ip.net] has joined
20:47 < |Craig|> vsmatck: constant time remove, and faster append
20:48 < |Craig|> its easy to write a loop for it that iterates through and
adds and removes elements like a linked list in some respects, but its faster than
one because of how its stored
20:49 < |Craig|> The BlockChan is not very special, its just equivalent to
sending slices of a list out a channel
20:52 < |Craig|> wastes less space than Append for large lists too.
20:52 -!- TheSaint [~thesaint@] has quit [Quit: Colloquy for iPhone
- http://colloquy.mobi]
20:57 -!- gnuvince_ [~vince@] has joined #go-nuts
21:03 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3]
21:04 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
21:05 -!- tvw [~tv@e176002069.adsl.alicedsl.de] has joined #go-nuts
21:06 -!- bmizerany [~bmizerany@c-76-21-40-207.hsd1.ca.comcast.net] has quit
[Remote host closed the connection]
21:23 -!- snearch [~snearch@f053008049.adsl.alicedsl.de] has quit [Quit:
21:26 < krutcha> anybody seen an example of using crypto.tls?  Trying to see
how hard its going to be to get my jabber client talking to talk.google.com
21:27 -!- pothos_ [~pothos@111-240-219-43.dynamic.hinet.net] has joined #go-nuts
21:29 < exch> krutcha: have a look at the http package.  it implements a
secure connection using TLS
21:29 -!- pothos [~pothos@111-240-204-211.dynamic.hinet.net] has quit [Ping
timeout: 260 seconds]
21:29 < krutcha> ty, will do
21:29 -!- pothos_ [~pothos@111-240-219-43.dynamic.hinet.net] has quit [Read error:
Connection reset by peer]
21:30 -!- pothos [~pothos@111-240-219-43.dynamic.hinet.net] has joined #go-nuts
21:38 -!- skejoe [~skejoe@] has joined #go-nuts
21:40 -!- DrHennessy [~alex@2002:180a:dda5:1234:223:6cff:fe7f:7ef2] has joined
21:44 -!- Fish [~Fish@9fans.fr] has quit [Quit: So Long, and Thanks for All the
21:45 -!- Fish [~Fish@9fans.fr] has joined #go-nuts
21:48 -!- sauerbraten [~sauerbrat@p508CAE9E.dip.t-dialin.net] has quit [Remote
host closed the connection]
21:48 -!- zozoR [~zozoR@5634798d.rev.stofanet.dk] has quit [Quit: Morten.  Desu~]
21:49 -!- Fish [~Fish@9fans.fr] has quit [Client Quit]
21:53 < madari> krutcha: also worth mentioning:
21:53 < madari> Russ Cox has pasted sources of a rough xmpp client (talking
to google talk)
21:53 < madari> it seems to have tls features too
21:55 < madari> heh ok it says: "The code below refers to an openssl
wrapping package,
21:55 < madari> not included.  It should be easy to convert it to use
21:55 < madari> crypto/tls, which didn't exist when I wrote the code.  "
21:55 < madari> =)
21:56 -!- TheMue [~TheMue@p5DDF77F4.dip.t-dialin.net] has quit [Quit: TheMue]
22:05 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3]
22:06 -!- fenicks [~christian@log77-3-82-243-254-112.fbx.proxad.net] has joined
22:11 < fenicks> hello
22:11 < madari> hi
22:17 -!- scandium [~rainer@95-90-126-141-dynip.superkabel.de] has quit [Quit:
22:28 -!- tdnrad [~tdnrad@D6236.WPA.Dal.Ca] has joined #go-nuts
22:37 < SirPsychoS> is there a way to use poll() or equivalent functionality
in Go? (it does need to be on a file descriptor and/or os.File, not on a channel)
I can't find anything in package os or syscall
22:38 -!- Tuller [~tuller@c-69-143-52-174.hsd1.va.comcast.net] has joined #go-nuts
22:38 -!- ikaros_ [~ikaros@dslb-094-219-219-241.pools.arcor-ip.net] has quit
[Quit: Leave the magic to Houdini]
22:38 -!- Tuller [~tuller@c-69-143-52-174.hsd1.va.comcast.net] has quit [Remote
host closed the connection]
22:39 < SirPsychoS> I guess that's kind of a bad question - cgo is _a_ way
to do it.  the real question is what's the optimal way to wait for input on an fd
without reading any
22:42 < Tv> SirPsychoS: have you tried just having a goroutine read from
every fd you need?
22:42 < Tv> you might be surprised by what happens automatically for you..
22:42 < SirPsychoS> unfortunately it's only one fd, managed _mostly_ by Xlib
22:42 -!- siyb [~siyb@] has quit [Read error: Connection reset by
22:43 -!- siyb [~siyb@] has joined #go-nuts
22:43 < SirPsychoS> the problem in a nutshell is: XNextEvent (via cgo) locks
a mutex and then blocks on reading from the X fd.  Meanwhile, another goroutine
wants to call to Xlib, and that call also tries to lock the same mutex, so it gets
stuck until X gets an event
22:44 < SirPsychoS> one solution is to have the event-reading goroutine sit
in a tight loop involving XPending (ewww)
22:45 < Tv> maybe you want xcb instead of Xlib
22:45 < SirPsychoS> I need the composite extension :(
22:45 < SirPsychoS> xgb doesn't have it yet
22:46 < Tv> SirPsychoS: how would you solve the problem in a multi-threaded
C app?
22:46 < Tv> if one thread does blocking read while holding the lock, you're
kinda screwed even there
22:47 < SirPsychoS> but if I can block on Xlib's fd outside the
mutex-protected region, I ensure that XNextEvent doesn't block other Xlib calls
from proceeding, while also not sitting in a tight loop - it does check for events
more often than necessary, but not, I think, any more often than XNextEvent itself
22:47 < Tv> you're thinking of only calling XNextEvent when there's data to
be read?
22:47 < SirPsychoS> exactly
22:47 < Tv> but that doesn't say it can read the whole message..
22:48 < SirPsychoS> well, I'm not concerned about microsecond delays of
network latency
22:48 < SirPsychoS> I'm concerned about what happens when no X events are
happening, tens of seconds can pass before XNextEvent returns, meanwhile no other
xlib calls work
22:49 -!- SoniaKeys [~soniakeys@c-76-118-178-209.hsd1.ma.comcast.net] has quit []
22:49 < SirPsychoS> basically I'm thinking, for ;; { poll(); for XPending()
{XNextEvent} }
22:50 < SirPsychoS> the XPending() solves the issue of there being only a
partially-received event or something received that's not an event (a reply or an
22:51 < SirPsychoS> all it wastes is a single call to XPending and then back
to blocking on i/o
22:52 < Tv> sounds like you'll have to go for
http://golang.org/pkg/syscall/#Select direct
22:52 < Tv> there's no poll wrapper, but there is an epoll wrapping
22:52 < Tv> epoll is just overkill for a single fd
22:55 < SirPsychoS> hmm, what's the difference between poll and select?
looking at the manpage they seem to fulfill exactly the same role, if in a
slightly different way
22:55 < tdnrad> When I put my struct in a list, how do I take it out later
and use that struct?  I guess I'm missing how Go deals without generics, I'm
assuming something with interfaces but I can't find much documentation using
22:55 < Tv> SirPsychoS: poll is newer & faster in some circumstances; epoll
is even newer and even faster under some circumstances
22:55 < SirPsychoS> tdnrad:
whtever_variable_name_you_assigned_from_the_list_into.(struct_type_name) type
22:56 -!- siyb [~siyb@] has quit [Ping timeout: 255 seconds]
22:56 < Tv> tdnrad: it := take_it_out_of_the_list(); real_it :=
22:57 < Tv> tdnrad: if you're a C programmer, you can think of "it" as void*
and real_it as struct yourthing*
22:57 < SirPsychoS> Tv: ah, makes sense.  select it is, then
22:58 -!- siyb [~siyb@] has joined #go-nuts
22:59 < SirPsychoS> or I could use syscall.Syscall(syscall.POLL, args) ...
22:59 < SirPsychoS> syscall.SYS_POLL *
22:59 < Tv> SirPsychoS: not worth the effort
22:59 < SirPsychoS> heh, alright
23:00 < Tv> poll = select for lots of fds; epoll = poll for dynamic sets of
23:00 < tdnrad> SirPsychoS, Tv, ok.  Is there any way to say that a list
will only contain a certain interface?  and that way I wont need to do a type
23:01 < tdnrad> effectively mimicking templates/generics
23:01 < Tv> tdnrad: go has no generics currently; being able to mimic them
would mean having them
23:02 < Tv> sprinkle the .(RealType) magic in your code a bit, it's totally
23:02 < exch> tdnrad: declare the list to have only that specific type or
interface you need
23:02 < SirPsychoS> the only other option is to translate it to
YourStructList with something like sed 's/interface{}/YourStruct/g'
23:03 < SirPsychoS> but that's not really...  worth it
23:03 -!- awidegreen_ [~quassel@p5DF1FBF7.dip.t-dialin.net] has quit [Remote host
closed the connection]
23:03 < tdnrad> exch, how would I do that?
23:04 < tdnrad> Tv, the .(RealType) will definately work, I'm just curious
about other ways
23:04 < Tv> tdnrad: this is go your talking about, the language is
explicitly and intentionally simple ;)
23:05 -!- XenoPhoenix [~Xeno@cpc5-aztw24-2-0-cust39.aztw.cable.virginmedia.com]
has joined #go-nuts
23:05 < tdnrad> I'm only a few days into Go, and I'm used to programing in
Perl or C/C++.  It's taking me a bit to learn the "best" way of doing everything
in Go.
23:06 < SirPsychoS> as far as I can see, the only reason for generics is to
have the compiler's type-checking extend to things that would otherwise be
unchecked interface{} values
23:07 < tdnrad> SirPsychoS, you caught me.  That's just what I'm used to.
23:07 -!- siyb [~siyb@] has quit [Read error: No route to host]
23:07 < SirPsychoS> aka in c++ you could use an stl::list<void*> for
everything if you really wanted
23:08 < SirPsychoS> all you'd lose is type-safety
23:08 -!- siyb [~siyb@] has joined #go-nuts
23:08 < tdnrad> SirPsychoS, yes, and I would never do that
23:08 < tdnrad> I guess that's why I feel a little weird doing it in Go
23:08 < SirPsychoS> but considering that Go, if I recall correctly, has a
stated goal of type-safety, it seems like generics are kind of necessary
23:09 < tdnrad> SirPsychoS, I agree, which is why I thought there would be
some trick with interfaces
23:09 < SirPsychoS> well yeah, stl::list<void*> would be horrifyingly
bad c++
23:10 -!- wrtp [~rog@] has quit [Quit: wrtp]
23:11 < Tv> SirPsychoS: well yeah, c++ compilation times would be
horrifyingly bad for go ;)
23:12 -!- aho [~nya@fuld-4d00d298.pool.mediaWays.net] has quit [Ping timeout: 245
23:12 < Tv> also, .(NewType) does runtime type checking, which casting void*
explicitly does not do
23:12 < SirPsychoS> yeah, I'm just talking about compile-time checking
23:12 < Tv> if there was a simple way to do it, it would have been done
23:12 < SirPsychoS> I'm not saying it's simple :P
23:13 < Tv> we'll see if someone figures out a way that's good enough to
pass muster
23:13 < SirPsychoS> I know they're still thinking it over
23:13 < SirPsychoS> yeah
23:13 -!- skejoe [~skejoe@] has quit [Quit: Lost terminal]
23:14 -!- rlab [~Miranda@] has quit [Ping timeout: 245 seconds]
23:14 < tdnrad> Nothing about designing a programming language is simple
23:15 < SirPsychoS> lol...  type FdSet struct { Bits [16]int64 }
23:16 < SirPsychoS> that's real helpful
23:17 < SirPsychoS> oh, that's how it's defined in select.h too
23:20 < SirPsychoS> sooo is an fd_set just OR((1<<fd) for fd in set) ?
23:20 < Tv> SirPsychoS: for select, yeah, but use the abstractions
23:20 < SirPsychoS> they don't seem to exist in Go?
23:21 < Tv> hmm i think they do
23:22 < SirPsychoS> FdSet has no methods and the only function that takes
FdSets in the syscall package is Select :/
23:22 < Tv> hrmmh maybe they don't
23:22 < Tv> it's syscall pkg after all
23:22 < Tv> that's low low level
23:23 < SirPsychoS> yeah...  maybe I'll write the abstractions into my own
23:23 < Tv> *shrug* "man 2 select" for the hideousness
23:23 < SirPsychoS> lol, even that just says "use the macros" - I'm reading
select.h :O
23:24 < Tv> yup
23:24 < Tv> but if anyone changed the representation of the select args, i
expect the crater would be fairly sizable
23:25 -!- mbohun [~user@ppp115-156.static.internode.on.net] has joined #go-nuts
23:25 < SirPsychoS> heh, there was a pretty big crater when glibc's memcpy
started conforming to its spec
23:25 < SirPsychoS> if they actually _changed_ the spec for a syscall...
23:32 -!- enherit [~enherit@71-83-188-75.dhcp.lnbh.ca.charter.com] has quit [Quit:
23:32 < SirPsychoS> set.Bits[d/64] |= 1 << (d % 64)
23:35 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has quit [Ping timeout:
265 seconds]
23:37 -!- LaPingvino [~LaPingvin@] has joined #go-nuts
23:40 -!- rlab [~Miranda@] has joined #go-nuts
23:45 -!- LaPingvino [~LaPingvin@] has left #go-nuts []
23:45 -!- jdp [~justin@] has joined #go-nuts
23:49 -!- tdnrad [~tdnrad@D6236.WPA.Dal.Ca] has quit [Quit: Leaving]
23:52 -!- aconran [~aaron@c-76-21-4-69.hsd1.ca.comcast.net] has joined #go-nuts
23:53 -!- DrHennessy [~alex@2002:180a:dda5:1234:223:6cff:fe7f:7ef2] has quit
[Quit: DrHennessy]
23:59 < creack> hello
--- Log closed Mon Nov 22 00:00:18 2010