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

--- Log opened Thu Aug 05 00:00:05 2010
00:00 < angasule> cheers
00:03 -!- angasule [c80571ea@gateway/web/freenode/ip.] has quit
[Quit: Page closed]
00:05 -!- photron [~photron@port-92-201-119-95.dynamic.qsc.de] has quit [Read
error: Operation timed out]
00:12 -!- artefon [~thiago@] has joined #go-nuts
00:14 -!- path[l] [UPP@] has quit [Quit: path[l]]
00:16 -!- napsy [~luka@tm.] has joined #go-nuts
00:17 -!- ineol [~ineol@mar75-9-88-171-191-168.fbx.proxad.net] has quit [Remote
host closed the connection]
00:18 -!- gabriel9 [~gabriel9@] has joined #go-nuts
00:23 < plexdev> http://is.gd/e3aKi by [Russ Cox] in go/ -- A+C: fix email
00:23 < plexdev> http://is.gd/e3aKr by [Christian Himpel] in go/src/cmd/cgo/
-- cgo: generate correct multiple return value function invocations
00:23 < plexdev> http://is.gd/e3aKJ by [Alex Brainman] in
go/src/cmd/goinstall/ -- goinstall: check for error from exec.*Cmd.Wait() before
using its result
00:23 < plexdev> http://is.gd/e3aLb by [Robert Griesemer] in 2 subdirs of
go/src/ -- gofmt/go/parser: strengthen syntax checks
00:25 -!- gabriel9 [~gabriel9@] has quit [Remote host closed the
00:25 -!- gabriel9 [~gabriel9@] has joined #go-nuts
00:27 < MaybeSo> questions for folks...  (a) does it make sense to have an
io.ReadSeeker, call it rseek, and to have inside a loop of offsets the code: _,
err := rseek.Seek(offset, 0); rbuf := bufio.NewReader(rseek); ...  some simple
stuff w/ bufio ...
00:27 < MaybeSo> is there a better way to combine the functionality of the
00:27 < MaybeSo> I could go low level of course, reimplement some of the
stuff that bufio does directly in my code while operating on rseek, but...  bleah.
00:28 < MaybeSo> (b) any better way of combining buffered reads + seek ?
00:33 < Ginto8> MaybeSo: (a) yes (b) not that I know of
00:34 < MaybeSo> thanks
00:34 < Ginto8> well actually
00:35 < Ginto8> theoretically, you could have a single bufio.Reader that
points to the same data as the io.ReadSeeker
00:35 -!- Venom_X [~pjacobs@] has quit [Ping timeout: 264 seconds]
00:35 < Ginto8> depending on how those interfaces interact, you could just
do rseek.Seek each iteration, without having to make a new buffered reader
00:35 < MaybeSo> and somehow reset (clear) the buffered data after a seek?
00:35 < Ginto8> hm
00:36 < Ginto8> probably
00:36 < Ginto8> look at the bufio.Reader docs
00:36 < MaybeSo> yeah, I am.  :)
00:36 < MaybeSo> thanks, I'll poke around a bit more
00:36 < Ginto8> there should be some BufClear function or w/e
00:37 < vrtical> you might want to check whether you're seeking within the
buffer and not actually perform a seek.
00:37 < MaybeSo> sure
00:37 < MaybeSo> but there are going to be times when I need to (re)seek
00:38 < MaybeSo> (past the point of the buffered data)
00:38 < MaybeSo> thanks guys
00:38 < MaybeSo> I'll keep hunting
00:39 < Ginto8> I mean
00:39 < Ginto8> the bufio.NewReader approach WILL work
00:39 < Ginto8> but it may not be the most efficient method
00:39 < MaybeSo> right, that was my concern
00:39 < MaybeSo> re-creating the struct over and over again
00:40 < MaybeSo> re-allocating the underlying buffer, etc.
00:40 < plexdev> http://is.gd/e3caX by [Christian Himpel] in
go/misc/vim/syntax/ -- misc/vim: highlight misspelled words only in comments
00:42 -!- mikespook [~mikespook@] has joined #go-nuts
00:46 -!- kanru [~kanru@118-168-239-91.dynamic.hinet.net] has quit [Ping timeout:
240 seconds]
00:55 -!- skelterjohn [~jasmuth@c-76-116-182-139.hsd1.nj.comcast.net] has joined
00:57 < plexdev> http://is.gd/e3dAX by [Russ Cox] in 12 subdirs of go/src/
-- amd64: use segment memory for thread-local storage
00:57 -!- skelterjohn [~jasmuth@c-76-116-182-139.hsd1.nj.comcast.net] has quit
[Client Quit]
00:59 -!- skelterjohn [~jasmuth@c-76-116-182-139.hsd1.nj.comcast.net] has joined
00:59 -!- skelterjohn [~jasmuth@c-76-116-182-139.hsd1.nj.comcast.net] has quit
[Client Quit]
01:08 -!- carllerche [~carllerch@enginey-9.border1.sfo002.pnap.net] has quit
[Quit: carllerche]
01:13 < plexdev> http://is.gd/e3fsm by [Robert Griesemer] in
go/src/pkg/go/printer/testdata/ -- fix build: literal types cannot be
parenthesized anymore
01:13 < plexdev> http://is.gd/e3fsB by [Robert Griesemer] in
go/src/pkg/go/parser/ -- go/parser.ParseFiles: don't override error (to nil) if
there is one
01:25 -!- artefon [~thiago@] has quit [Quit: bye]
01:33 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has joined #go-nuts
01:43 -!- gabriel9 [~gabriel9@] has quit [Remote host closed the
01:45 < plexdev> http://is.gd/e3ia3 by [Alex Brainman] in go/src/pkg/path/
-- path: fix comment for Split()
01:47 -!- Wiz126 [~Wiz126@] has quit []
01:48 -!- mikespook [~mikespook@] has quit [Ping timeout: 258
01:49 -!- Wiz126 [~Wiz126@] has joined #go-nuts
01:51 -!- bmizeran_ [~bmizerany@] has joined #go-nuts
01:53 -!- boscop_ [~boscop@g227154161.adsl.alicedsl.de] has joined #go-nuts
01:53 -!- bmizerany [~bmizerany@dsl081-064-072.sfo1.dsl.speakeasy.net] has quit
[Ping timeout: 265 seconds]
01:55 -!- boscop [~boscop@g227155181.adsl.alicedsl.de] has quit [Ping timeout: 265
01:57 -!- bmizeran_ [~bmizerany@] has quit [Remote host closed the
02:03 -!- mikespook [~mikespook@] has joined #go-nuts
02:03 -!- bmizerany [~bmizerany@] has joined #go-nuts
02:12 -!- carllerche [~carllerch@] has joined #go-nuts
02:15 -!- Damn3d [damn3d@unaffiliated/morpheus/x-0931003] has quit [Ping timeout:
245 seconds]
02:16 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit:
This computer has gone to sleep]
02:18 -!- Damn3d [damn3d@bimbrownia.org] has joined #go-nuts
02:18 -!- tensorpudding [~michael@] has quit [Ping timeout: 276
02:21 -!- Ginto8 [~joe@pool-173-61-45-40.cmdnnj.fios.verizon.net] has quit [Ping
timeout: 265 seconds]
02:26 -!- ivan` [~ivan@unaffiliated/ivan/x-000001] has quit [Quit: Coyote finally
caught me]
02:29 -!- ivan` [~ivan@unaffiliated/ivan/x-000001] has joined #go-nuts
02:30 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts
02:31 -!- Adys [~Adys@unaffiliated/adys] has left #go-nuts []
02:46 -!- MizardX- [~MizardX@unaffiliated/mizardx] has joined #go-nuts
02:50 -!- MizardX [~MizardX@unaffiliated/mizardx] has quit [Ping timeout: 252
02:54 -!- tensorpudding [~user@] has joined #go-nuts
03:03 -!- rejb [~rejb@unaffiliated/rejb] has quit [Ping timeout: 276 seconds]
03:13 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has quit [Ping timeout: 260
03:23 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has joined #go-nuts
03:26 -!- MizardX- [~MizardX@unaffiliated/mizardx] has joined #go-nuts
03:30 -!- hstimer [~hstimer@] has quit [Quit: hstimer]
03:30 -!- MizardX [~MizardX@unaffiliated/mizardx] has quit [Ping timeout: 252
03:33 < plexdev> http://is.gd/e3qXb by [Andrew Gerrand] in 2 subdirs of go/
-- release.2010-08-04
03:34 < plexdev> http://is.gd/e3qXg by [Andrew Gerrand] in go/ -- tag
03:34 < plexdev> http://is.gd/e3qXr by [Rob Pike] in go/src/pkg/sync/ --
sync: add sync.Once, a proposed replacement for package once.
03:34 -!- derferman [~derferman@dsl092-048-218.sfo4.dsl.speakeasy.net] has quit
[Quit: derferman]
03:39 -!- nettok [~quassel@] has joined #go-nuts
03:43 -!- ajhager [~ajhager@c-69-136-3-186.hsd1.in.comcast.net] has joined
03:54 -!- hstimer [~hstimer@2002:4c67:9b0d:0:226:bbff:fe05:dd9b] has joined
03:59 -!- jesusaurus [jesusaur@firefly.cat.pdx.edu] has quit [Quit: WeeChat 0.3.0]
04:06 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
04:06 -!- MizardX- [~MizardX@unaffiliated/mizardx] has joined #go-nuts
04:08 -!- carllerche [~carllerch@] has quit [Quit: carllerche]
04:11 -!- MizardX [~MizardX@unaffiliated/mizardx] has quit [Ping timeout: 276
04:13 -!- jesusaurus [jesusaur@firefly.cat.pdx.edu] has joined #go-nuts
04:13 -!- jesusaurus [jesusaur@firefly.cat.pdx.edu] has quit [Client Quit]
04:14 -!- jesusaurus [jesusaur@firefly.cat.pdx.edu] has joined #go-nuts
04:36 -!- bmizerany [~bmizerany@] has quit [Remote host closed the
04:44 -!- zozoR [~zozoR@x1-6-00-0e-2e-a3-e0-23.k377.webspeed.dk] has joined
04:45 -!- derferman [~derferman@c-98-207-60-44.hsd1.ca.comcast.net] has joined
04:45 -!- derferman [~derferman@c-98-207-60-44.hsd1.ca.comcast.net] has left
#go-nuts []
04:47 -!- MizardX- [~MizardX@unaffiliated/mizardx] has joined #go-nuts
04:48 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has quit [Ping timeout: 260
04:51 -!- MizardX [~MizardX@unaffiliated/mizardx] has quit [Ping timeout: 276
05:03 -!- path[l] [UPP@] has joined #go-nuts
05:03 -!- scm [justme@d165089.adsl.hansenet.de] has quit [Ping timeout: 260
05:04 -!- scm [justme@d057062.adsl.hansenet.de] has joined #go-nuts
05:15 -!- derferman_ [~derferman@c-98-207-60-44.hsd1.ca.comcast.net] has joined
05:15 -!- derferman_ [~derferman@c-98-207-60-44.hsd1.ca.comcast.net] has quit
[Client Quit]
05:27 -!- MizardX- [~MizardX@unaffiliated/mizardx] has joined #go-nuts
05:30 -!- MizardX [~MizardX@unaffiliated/mizardx] has quit [Ping timeout: 246
05:38 -!- roop [~roop@] has joined #go-nuts
05:55 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has joined #go-nuts
05:56 -!- nettok [~quassel@] has quit [Ping timeout: 276 seconds]
05:58 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has joined #go-nuts
05:58 -!- nettok [~quassel@] has joined #go-nuts
06:09 -!- Tiger_ [~chatzilla@] has joined #go-nuts
06:11 -!- MizardX [~MizardX@unaffiliated/mizardx] has quit [Quit: reboot]
06:14 -!- clip9 [~tj@12.81-166-62.customer.lyse.net] has quit [Ping timeout: 258
06:15 -!- clip9 [tj@12.81-166-62.customer.lyse.net] has joined #go-nuts
06:16 -!- MizardX [~MizardX@unaffiliated/mizardx] has joined #go-nuts
06:18 -!- clip9 [tj@12.81-166-62.customer.lyse.net] has quit [Client Quit]
06:18 -!- clip9 [tj@12.81-166-62.customer.lyse.net] has joined #go-nuts
06:19 -!- clip9 [tj@12.81-166-62.customer.lyse.net] has quit [Client Quit]
06:23 -!- clip9 [tj@12.81-166-62.customer.lyse.net] has joined #go-nuts
06:23 -!- sacho [~sacho@95-42-108-60.btc-net.bg] has quit [Ping timeout: 264
06:27 -!- jA_cOp [~yakobu@unaffiliated/ja-cop/x-9478493] has joined #go-nuts
06:33 -!- Tiger_ [~chatzilla@] has quit [Ping timeout: 265 seconds]
06:44 -!- ikaros [~ikaros@dslb-188-097-070-234.pools.arcor-ip.net] has joined
06:55 -!- nettok [~quassel@] has quit [Remote host closed the
06:56 -!- saschpe [~saschpe@mgdb-4d0cfab9.pool.mediaWays.net] has joined #go-nuts
07:03 * nsf is trying to rewrite his go mandelbrot demo to D :D
07:04 < KirkMcDonald> D, eh.
07:04 < nsf> and I'm not sure that I even want to finish it
07:04 < nsf> D is very confusing :)
07:05 < KirkMcDonald> How so?
07:05 < nsf> it has so many things in it
07:05 < nsf> for example I have a struct called 'Color'
07:06 < nsf> and now here is the question: do I really want to use struct
here, or should it be a class?
07:06 < KirkMcDonald> heh
07:06 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-180-250.clienti.tiscali.it] has
joined #go-nuts
07:06 < KirkMcDonald> Will you require virtual methods?
07:06 < nsf> etc, etc..  there are a lot of unnecessary questions
07:06 < nsf> KirkMcDonald: no
07:06 < KirkMcDonald> nsf: Then use a struct.
07:07 < nsf> that's not the point, of course I can figure out what should I
use here
07:07 < nsf> but there are two problems with that
07:07 < nsf> a) I don't want to spend time thinking about these things
07:07 < nsf> b) what is the cost of a wrong choice
07:08 < nsf> it's good if you have only one way to do something
07:08 < KirkMcDonald> If you need value semantics, you need a struct.  If
you need a vtable, you want a class.
07:08 < KirkMcDonald> Otherwise, it doesn't really matter.
07:08 < nsf> more confusion added
07:08 < KirkMcDonald> Perhaps so.
07:09 < nsf> and I tried to read some of the D code in their std lib
07:09 < nsf> it's horrible :)
07:10 < nsf> ref typeof(A[0]) front(A)(A a) if (is(typeof(A[0])) &&
07:10 < nsf> do I really want to know what is it mean
07:10 < nsf> :)
07:10 < KirkMcDonald> It's a template.
07:10 < nsf> I didn't ask what it means :)
07:11 < KirkMcDonald> heh
07:11 < KirkMcDonald> It's actually not that complicated.
07:11 < KirkMcDonald> It's a template with a contraint.
07:11 < KirkMcDonald> constraint*
07:11 < nsf> I think it is overly complicated
07:11 < nsf> yep, I know what it means (partially)
07:11 -!- sacho [~sacho@] has joined #go-nuts
07:12 < nsf> but still..  do I want to know that
07:12 < nsf> I'm not sure that this knowledge will help me solve some kind
of a problem
07:13 < KirkMcDonald> Only if you start using templates in a serious way.
07:13 < nsf> like C++'s boost?
07:13 < nsf> very _serious_
07:13 < nsf> :))
07:13 < KirkMcDonald> D's templates are somewhat better than C++'s.
07:14 < KirkMcDonald> Code equivalent to what boost does can actually be
07:15 < nsf> well, I can understand D's code..  I can understand what is I'm
looking at, but I'm not sure I can understand what is happening here
07:16 < nsf> in Go one glance at a piece of code and you're here..  know
something about what's happening
07:16 < KirkMcDonald> Go is indeed a much smaller language.
07:16 < nsf> in D I can't say the same
07:17 < KirkMcDonald> Depends on the D code.  Which is probably a mark
against D.
07:17 -!- sahid [~sahid@LNeuilly-152-21-22-10.w193-253.abo.wanadoo.fr] has joined
07:17 < jA_cOp> You can write readable code in any language, but I guess
it's easier to do in the smaller languages
07:17 < nsf> actually it doesn't matter what I can..  I can't write all the
code I need
07:18 < nsf> and if it is possible, someone will write unreadable code :)
07:18 < KirkMcDonald> nsf: One of my favorite pieces of D code is this thing
I wrote ages ago:
07:18 < KirkMcDonald> The control-flow there is a little mind-bending, and
it's mixing compile-time and runtime operations somewhat confusingly.
07:19 < KirkMcDonald> But the net result is that it allows you to call a D
function with a Python tuple containing the arguments to that function.
07:19 < nsf> I guess it's nice
07:20 < KirkMcDonald> The equivalent operation in C++ is...  longer.
07:21 < nsf> and I'm sure you can't do that in Go at all
07:21 < KirkMcDonald> You could.
07:21 < KirkMcDonald> With the reflection interface.
07:21 < KirkMcDonald> I am reasonably sure that it is sufficiently powerful.
07:22 -!- sahid [~sahid@LNeuilly-152-21-22-10.w193-253.abo.wanadoo.fr] has quit
[Client Quit]
07:22 < nsf> ok, I'll continue writing mandelbrot demo port
07:22 < nsf> I really want to compare how both languages deal with
07:22 < KirkMcDonald> I gather D2 is making some attempts at handling it.
07:22 < KirkMcDonald> D1 basically doesn't.
07:23 -!- Eridius [~kevin@unaffiliated/eridius] has quit [Read error: Operation
timed out]
07:23 < KirkMcDonald> You've got threads and locks and are on your own.
07:23 < nsf> but I'm already in a state that I don't understand fully what
I'm writing in D
07:23 < nsf> it works though :)
07:23 < KirkMcDonald> You can do worse, in D, than pretending that it is
07:23 < KirkMcDonald> The object model is fairly similar.
07:28 -!- mahemoff [~mahemoff@87-194-3-205.bethere.co.uk] has joined #go-nuts
07:30 -!- jackman_ [~jackman@c-24-21-216-140.hsd1.or.comcast.net] has joined
07:33 -!- sahid [~sahid@LNeuilly-152-21-22-10.w193-253.abo.wanadoo.fr] has joined
07:33 -!- mikespook [~mikespook@] has quit [Read error: Connection
reset by peer]
07:33 -!- mikespook [~mikespook@] has joined #go-nuts
07:37 -!- jackman_ [~jackman@c-24-21-216-140.hsd1.or.comcast.net] has quit [Quit:
07:42 -!- wrtp [~rog@] has quit [Ping timeout: 276 seconds]
07:43 -!- rlab [~Miranda@] has joined #go-nuts
07:46 -!- wrtp [~rog@] has joined #go-nuts
07:49 -!- mahemoff [~mahemoff@87-194-3-205.bethere.co.uk] has quit [Quit:
07:54 < manveru> nsf: http://ideone.com/PgSVN
07:54 < manveru> wonder if i got that right :)
07:55 < nsf> well, looks like mandelbrot
07:55 < nsf> http://github.com/nsf/gomandel
07:55 < manveru> i have no idea how to make this parallel though
07:55 < nsf> my demo is a bit more complex
07:55 < nsf> because it has interactive interface
07:55 < nsf> you can zoom-in and pan
07:55 < manveru> ah, sdl/gl
07:56 < manveru> cool
07:56 < nsf> and it uses multiple goroutines
07:56 < nsf> as drawing workers
07:56 < nsf> draws mandelbrot in software then uploads to opengl texture
07:56 < manveru> ah, so you split it into tiles
07:56 < nsf> yes
07:57 < manveru> neat
07:57 < nsf> also if you will test it, read the README
07:58 < nsf> I don't force GOMAXPROCS, so you have to set it by yourself
07:58 < manveru> yeah
07:58 < manveru> what are you using for sdl/gl?
07:58 < manveru> Go-SDL and Go-OpenGL?
07:58 < nsf> Go-SDL and Go-OpenGL, yes
07:59 < manveru> http://github.com/manveru/raptgo
07:59 < manveru> some sdl stuff i made a while ago
07:59 < nsf> I've seen this
07:59 < nsf> and played
07:59 < manveru> oh?
07:59 -!- tvw [~tv@] has joined #go-nuts
08:00 < manveru> how is it?
08:00 < manveru> never heard of anyone who actually tried it :)
08:00 < nsf> that was one of the first apps I checked when learning go
08:00 < nsf> http://go-lang.cat-v.org/go-code
08:00 < nsf> found here in games section
08:01 < manveru> heh, they got my name wrong
08:03 < manveru> man, there is a lot of stuff these days
08:03 -!- rutkowski [~adrian@078088207115.walbrzych.vectranet.pl] has joined
08:03 < rsaarelm> I know that someone has tried my Teratogen, I got a bug
report about the SDL stuff not building on OS X.
08:04 -!- gabriel9 [~gabriel9@] has joined #go-nuts
08:04 < manveru> i tried it too
08:04 < manveru> ran pretty well
08:04 < nsf> that wasn't me, I don't like rougelike games :)
08:06 < rsaarelm> I'm still trying to get the game mechanics to make some
sense, so it's not really in a phase where testing is solicited.  Still, it's nice
to have it up as a tech demo.
08:07 < manveru> yeah, i looked at some of your techniques
08:08 -!- ikaros [~ikaros@dslb-188-097-070-234.pools.arcor-ip.net] has quit [Quit:
Leave the magic to Houdini]
08:10 < manveru> http://github.com/skybrian/Gongo
08:10 < manveru> nice one...
08:30 -!- ExtraSpice [~XtraSpice@] has joined #go-nuts
08:51 -!- ako [~nya@fuld-4d00d5e2.pool.mediaWays.net] has joined #go-nuts
08:51 -!- zozoR [~zozoR@x1-6-00-0e-2e-a3-e0-23.k377.webspeed.dk] has quit [Quit:
Morten.  Desu~]
08:52 -!- aho [~nya@fuld-4d00d1d7.pool.mediaWays.net] has quit [Ping timeout: 265
08:55 -!- path[l] [UPP@] has quit [Quit: path[l]]
08:57 -!- roop [~roop@] has quit [Ping timeout: 265 seconds]
09:11 -!- Byron [~Byron@cpe-98-155-138-202.hawaii.res.rr.com] has joined #go-nuts
09:13 -!- Byron [~Byron@cpe-98-155-138-202.hawaii.res.rr.com] has quit [Read
error: Connection reset by peer]
09:16 -!- ajhager [~ajhager@c-69-136-3-186.hsd1.in.comcast.net] has quit [Ping
timeout: 265 seconds]
09:27 -!- Shyde [~shyde@HSI-KBW-078-043-070-132.hsi4.kabel-badenwuerttemberg.de]
has joined #go-nuts
09:38 -!- mikespook [~mikespook@] has quit [Quit: Leaving.]
09:41 -!- pl3 [~noam@IGLD-84-229-10-137.inter.net.il] has quit [Read error:
Connection reset by peer]
09:41 -!- pl3 [~noam@IGLD-84-229-10-137.inter.net.il] has joined #go-nuts
09:44 -!- roop [~roop@] has joined #go-nuts
09:48 -!- path[l] [~path@] has joined #go-nuts
09:50 -!- path[l] [~path@] has quit [Remote host closed the
09:50 -!- path[l] [~path@] has joined #go-nuts
09:50 -!- photron [~photron@port-92-201-17-36.dynamic.qsc.de] has joined #go-nuts
09:58 -!- Tiger_ [~chatzilla@] has joined #go-nuts
10:09 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has quit [Quit:
10:15 -!- peterdn [~peterdn@cpc1-oxfd18-2-0-cust914.4-3.cable.virginmedia.com] has
quit [Ping timeout: 265 seconds]
10:17 -!- pl3 [~noam@IGLD-84-229-10-137.inter.net.il] has quit [Read error:
Connection reset by peer]
10:18 -!- pl3 [~noam@IGLD-84-229-10-137.inter.net.il] has joined #go-nuts
10:18 < nsf> screw D, I'll better stick with Go, at least it works
10:21 -!- pl3 [~noam@IGLD-84-229-10-137.inter.net.il] has quit [Read error:
Connection reset by peer]
10:21 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has quit [Ping timeout: 245
10:22 -!- pl3 [~noam@IGLD-84-229-10-137.inter.net.il] has joined #go-nuts
10:26 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has joined #go-nuts
10:36 -!- smw [~smw@pool-71-183-88-124.nycmny.fios.verizon.net] has quit [Remote
host closed the connection]
10:39 -!- TheSaint [~thesaint@] has joined #go-nuts
10:40 -!- mahemoff [~mahemoff@] has joined #go-nuts
10:57 -!- alehorst [~alehorst@] has quit [Ping
timeout: 248 seconds]
11:03 -!- femto [~femto@95-89-188-219-dynip.superkabel.de] has joined #go-nuts
11:04 -!- pl3 [~noam@IGLD-84-229-10-137.inter.net.il] has quit [Read error:
Connection reset by peer]
11:05 -!- pl3 [~noam@IGLD-84-229-10-137.inter.net.il] has joined #go-nuts
11:07 -!- femto [~femto@95-89-188-219-dynip.superkabel.de] has left #go-nuts []
11:07 -!- femtoo [~femto@95-89-188-219-dynip.superkabel.de] has joined #go-nuts
11:09 < femtoo> hey
11:09 < femtoo> I got a problem with cgo
11:09 < femtoo> http://www.pastie.org/1077155
11:09 < femtoo> if I remove the dispose function it compiles fine
11:10 < femtoo> I pass Context by value as it is just a typedef of a pointer
11:10 < femtoo> what am I doing wrong?
11:11 -!- alehorst [~alehorst@] has joined
11:15 -!- smw [~smw@pool-71-183-88-124.nycmny.fios.verizon.net] has joined
11:20 -!- TheSaint [~thesaint@] has quit [Remote host closed the
11:21 -!- TheSaint [~thesaint@] has joined #go-nuts
11:22 -!- Netsplit *.net <-> *.split quits: saschpe, KirkMcDonald, Tiger_,
napsy, preflex
11:22 -!- Netsplit over, joins: Tiger_
11:24 -!- saschpe [~saschpe@mgdb-4d0cfab9.pool.mediaWays.net] has joined #go-nuts
11:25 -!- napsy [~luka@tm.] has joined #go-nuts
11:26 -!- KirkMcDonald [~Kirk@pysoy/developer/KirkMcDonald] has joined #go-nuts
11:31 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has joined #go-nuts
11:35 < hokapoka> Where does log.Stderrf output to?
11:36 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.2]
11:36 < vrtical> hokapoka: I think the answer is in the question :-)
11:37 < napsy> hokapoka: it goes to stderr
11:37 < vrtical> "Stderrf is a helper function for easy formatted logging to
stderr.  It is analogous to Fprintf(os.Stderr).  "
11:37 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
11:37 < hokapoka> ahem ;)
11:37 < hokapoka> thanks.
11:40 -!- rejb [~rejb@unaffiliated/rejb] has quit [Client Quit]
11:40 -!- napsy [~luka@tm.] has quit [Quit: Lost
11:41 -!- rutkowski [~adrian@078088207115.walbrzych.vectranet.pl] has quit [Quit:
WeeChat 0.3.3-dev]
11:42 -!- napsy [~luka@tm.] has joined #go-nuts
11:46 -!- artefon [~thiago@dhcp44.usuarios.dcc.ufmg.br] has joined #go-nuts
11:48 -!- mahemoff [~mahemoff@] has quit [Quit: mahemoff]
11:51 -!- roop [~roop@] has quit [Remote host closed the
11:51 -!- TheSaint [~thesaint@] has quit [Remote host closed the
11:59 -!- chickamade [~chickamad@] has joined #go-nuts
12:01 -!- sacho [~sacho@] has quit [Read error: Operation timed out]
12:10 -!- pl3 [~noam@IGLD-84-229-10-137.inter.net.il] has quit [Read error:
Connection reset by peer]
12:10 -!- pl3 [~noam@IGLD-84-229-10-137.inter.net.il] has joined #go-nuts
12:19 -!- crashR [~crasher@codextreme.pck.nerim.net] has joined #go-nuts
12:20 -!- quag [~quag@121-98-81-61.bitstream.orcon.net.nz] has quit [Ping timeout:
276 seconds]
12:21 -!- chickamade [~chickamad@] has quit [Ping timeout: 260
12:23 -!- pl3 [~noam@IGLD-84-229-10-137.inter.net.il] has quit [Read error:
Connection reset by peer]
12:23 -!- pl3 [~noam@IGLD-84-229-10-137.inter.net.il] has joined #go-nuts
12:29 -!- pl3 [~noam@IGLD-84-229-10-137.inter.net.il] has quit [Read error:
Connection reset by peer]
12:29 -!- boscop_ [~boscop@g227154161.adsl.alicedsl.de] has left #go-nuts []
12:29 -!- pl3 [~noam@IGLD-84-229-10-137.inter.net.il] has joined #go-nuts
12:29 -!- boscop [~boscop@g227154161.adsl.alicedsl.de] has joined #go-nuts
12:30 -!- pl3 [~noam@IGLD-84-229-10-137.inter.net.il] has quit [Read error:
Connection reset by peer]
12:30 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
12:31 -!- pl3 [~noam@IGLD-84-229-10-137.inter.net.il] has joined #go-nuts
12:31 -!- pl3 [~noam@IGLD-84-229-10-137.inter.net.il] has quit [Read error:
Connection reset by peer]
12:32 -!- pl3 [~noam@IGLD-84-229-10-137.inter.net.il] has joined #go-nuts
12:32 -!- pl3 [~noam@IGLD-84-229-10-137.inter.net.il] has quit [Read error:
Connection reset by peer]
12:34 -!- pl3 [~noam@IGLD-84-229-10-137.inter.net.il] has joined #go-nuts
12:34 -!- pl3 [~noam@IGLD-84-229-10-137.inter.net.il] has quit [Read error:
Connection reset by peer]
12:35 -!- pl3 [~noam@IGLD-84-229-10-137.inter.net.il] has joined #go-nuts
12:35 -!- pl3 [~noam@IGLD-84-229-10-137.inter.net.il] has quit [Read error:
Connection reset by peer]
12:39 -!- gabriel9 [~gabriel9@] has quit [Ping timeout: 260 seconds]
12:39 -!- falconindy [~noclaf@unaffiliated/falconindy] has joined #go-nuts
12:45 -!- napsy [~luka@tm.] has quit [Quit: Lost
12:45 -!- nomo [~nomo@mobile-166-137-139-177.mycingular.net] has joined #go-nuts
12:46 -!- quag [~quag@121-98-81-61.bitstream.orcon.net.nz] has joined #go-nuts
12:50 -!- Shyde [~shyde@HSI-KBW-078-043-070-132.hsi4.kabel-badenwuerttemberg.de]
has quit [Remote host closed the connection]
12:54 -!- mahemoff [~mahemoff@] has joined #go-nuts
12:56 -!- quag [~quag@121-98-81-61.bitstream.orcon.net.nz] has quit [Ping timeout:
252 seconds]
13:04 -!- nomo [~nomo@mobile-166-137-139-177.mycingular.net] has quit [Ping
timeout: 258 seconds]
13:05 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined
13:05 -!- nomo [~nomo@mobile-166-137-139-177.mycingular.net] has joined #go-nuts
13:06 -!- mahemoff [~mahemoff@] has quit [Quit: mahemoff]
13:08 -!- sacho [~sacho@90-154-149-17.btc-net.bg] has joined #go-nuts
13:09 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Remote
host closed the connection]
13:13 -!- angasule [c80571ea@gateway/web/freenode/ip.] has joined
13:17 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined
13:17 -!- quag [~quag@121-98-81-61.bitstream.orcon.net.nz] has joined #go-nuts
13:18 -!- mahemoff [~mahemoff@] has joined #go-nuts
13:18 -!- napsy [~luka@tm.] has joined #go-nuts
13:19 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Remote
host closed the connection]
13:21 -!- nomo [~nomo@mobile-166-137-139-177.mycingular.net] has quit [Remote host
closed the connection]
13:22 -!- path[l]_ [~path@] has joined #go-nuts
13:24 < plexdev> http://is.gd/e4bOz by [Christian Himpel] in 2 subdirs of
go/src/pkg/ -- bytes: add IndexRune, FieldsFunc and To*Special
13:25 -!- path[l] [~path@] has quit [Ping timeout: 265 seconds]
13:26 < uriel> anyone knows if iant is still in Stockholm?  he told me he
would still be around on thursday, but can't seem to be able to reach him...
13:27 < uriel> (and if anyone else in stockholm is interested in getting
together for a go-together
13:27 < uriel> let me know)
13:28 -!- gabriel9 [~gabriel9@] has joined #go-nuts
13:29 -!- General1337 [~support@71-84-50-230.dhcp.mtpk.ca.charter.com] has joined
13:32 -!- lmoura [~lauromour@] has quit [Ping timeout: 258 seconds]
13:34 -!- virtualsue [~chatzilla@nat/cisco/x-tmcxfxoqwphuyiir] has joined #go-nuts
13:36 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined
13:37 -!- lmoura [~lauromour@] has joined #go-nuts
13:39 -!- mahemoff [~mahemoff@] has quit [Quit: mahemoff]
13:41 -!- g0bl1n [~anonymous@a213-22-18-58.cpe.netcabo.pt] has joined #go-nuts
13:46 -!- mahemoff [~mahemoff@] has joined #go-nuts
13:46 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has quit [Ping timeout: 240
13:50 -!- carllerche [~carllerch@] has joined #go-nuts
13:55 < mpl> uriel: what happened with glenda camp btw, did it finally take
13:56 -!- Ginto8 [~joe@pool-173-61-45-40.cmdnnj.fios.verizon.net] has joined
13:57 < uriel> glenda camp is on hold, seems that trying to find a data that
suited everyone that wanted to come was an impossible task
13:57 < uriel> (this should have been obvious, oh well...)
13:58 < nsf> nice, I've finished part of the refactoring for gocode, and now
it's packages (.a) parser is parallelized with goroutines
13:58 < nsf> parses all my go packages (131) in 0.650 secs
13:58 < nsf> previously was 1 sec
13:59 < nsf> :P
13:59 -!- skelterjohn [~jasmuth@c-76-116-182-139.hsd1.nj.comcast.net] has joined
13:59 < nsf> I think it's possible to do that under 0.5 secs, but with async
13:59 < Ginto8> nsf: have you gotten the syntax completer program done?
that was looking really cool
13:59 < nsf> which is extreme :)
14:00 < nsf> Ginto8: yes
14:00 < Ginto8> schweet!
14:00 < nsf> Ginto8:
14:00 < mpl> uriel: shame.
14:00 < nsf> currently I'm working on a very big refactoring for it
14:01 -!- ajhager [~ajhager@c-69-136-3-186.hsd1.in.comcast.net] has joined
14:01 -!- mahemoff [~mahemoff@] has quit [Quit: mahemoff]
14:02 -!- rlab [~Miranda@] has quit [Read error: Connection reset by
14:02 -!- mahemoff [~mahemoff@] has joined #go-nuts
14:02 -!- mahemoff [~mahemoff@] has quit [Client Quit]
14:03 < Ginto8> nsf: well it seems really cool atm =D
14:04 < nsf> it will be even more cool
14:04 < nsf> other part of the refactoring includes honest scope handling
14:04 < nsf> it will handle correctly things like: var make uint
14:05 < nsf> or 'var int uint'
14:05 < nsf> and yes, it is legal Go code :)
14:06 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit:
This computer has gone to sleep]
14:06 -!- ikaros [~ikaros@] has joined #go-nuts
14:06 < Ginto8> rly?
14:06 < Ginto8> interesting
14:07 < nsf> Go has this notion of predeclared identifiers
14:07 < nsf> instead of keywords
14:07 < Ginto8> oic
14:07 < nsf> things like if while for of course are keywords
14:07 < Ginto8> yeah
14:07 < Ginto8> but builtin functions
14:07 < nsf> but other ones, like built-in types and built-in functions
14:07 < nsf> are predeclared idents
14:07 < Ginto8> oh
14:07 < Ginto8> cool
14:08 < Ginto8> and you can have type/var name conflicts
14:08 < Ginto8> because the usages are different
14:08 < nsf> you can't
14:08 < nsf> well, it depends :D
14:08 < Ginto8> oh...  well that little train of thought just ran off the
rails ;-)
14:08 < nsf> types and vars are in the same namespace
14:08 < Ginto8> ok
14:09 < nsf> but ident can be redeclared pretty much without pain in the
fresh new scope
14:09 -!- mahemoff [~mahemoff@] has joined #go-nuts
14:09 < Ginto8> oh
14:09 < nsf> for example you can use 'var make int'
14:09 < nsf> in function
14:09 < nsf> and it will shadow the built-in function silently
14:10 < Ginto8> so you can have shadowing of builtin types and functions
14:10 < nsf> yes
14:10 < Ginto8> but only those
14:10 < Ginto8> because I know you can't shadow vars
14:10 < nsf> you can shadow them too
14:10 -!- inittab- [~dlbeer@ip-118-90-73-33.xdsl.xnet.co.nz] has joined #go-nuts
14:11 < nsf> it actually doesn't matter type it or a variable
14:11 < nsf> all scope issues are operating on an identifier term
14:11 -!- mahemoff [~mahemoff@] has quit [Client Quit]
14:11 < nsf> type name is an identifier
14:11 -!- lmoura [~lauromour@] has quit [Ping timeout: 276 seconds]
14:11 < nsf> var name is an identifier
14:11 < nsf> etc.
14:11 < nsf> actually very interesting system
14:12 -!- inittab [~dlbeer@ip-118-90-119-42.xdsl.xnet.co.nz] has quit [Ping
timeout: 276 seconds]
14:12 < nsf> ok, enough talking, I should get back to the coding :)
14:12 < Ginto8> ok do that...  make things more complete
14:12 < Ginto8> !
14:12 -!- TheSaint [~thesaint@] has joined #go-nuts
14:12 < Ginto8> =D
14:12 < wrtp> nsf: yeah, it's good isn't it?  i did something similar to
what you're doing a while ago.  it relied on some changes i made to the parser
package though, which weren't accepted.
14:13 < wrtp> i did have a version of godoc where every identifier was
highlighted and clicking on it took you to its definition
14:14 < nsf> wrtp: nice, I hate that part of the docs too
14:14 < nsf> it should do cross referencing better
14:14 < wrtp> if you clicked on the definition, it showed you its type and
any methods on that type
14:15 < wrtp> i've been meaning to resurrect it for a while...
14:15 < wrtp> how does your autocompletion thing deal with partially written
source (i.e.  with syntax errors)?
14:15 < nsf> it does few things to handle that
14:16 < nsf> for example I parse a function where the cursor is separately
from other source code
14:16 < wrtp> how do you find the function where the cursor is?
14:16 < nsf> and when you are in the function you doesn't care about
anything that is after the cursor
14:16 < wrtp> search back from cursor for ^func ?
14:16 -!- lmoura [~lauromour@] has joined #go-nuts
14:16 < nsf> I tokenize the source code
14:17 < nsf> and using token collection search for an outermost { token
14:17 < nsf> and then for ;
14:17 < wrtp> what if you're editing an expr at global level?
14:18 < nsf> wrtp: then everything is parsed
14:18 < nsf> go/parser is actually very good at error handling
14:18 < wrtp> yeah, it's pretty good
14:18 < nsf> it recovers from most of the errors
14:18 < wrtp> i found that it worked pretty well on half-written source,
even though i didn't have any special code to deal with that
14:19 < nsf> yes, but sometimes it breaks things
14:19 < uriel> nsf: nice!
14:19 < nsf> that's why I did this separate function parsing hack
14:20 < wrtp> so how do you deal with func(x T){x.<cursor>\ntype T
struct {...} ?
14:20 < wrtp> i.e.  when the type or var defn is after the current func?
14:20 < nsf> with that kind of code you'll have problems
14:20 < nsf> :)
14:20 < wrtp> ok
14:20 < wrtp> fairy nuff
14:21 < nsf> because I expect most people close their braces
14:21 < wrtp> i should have a look at yr code sometime, see how similar it
is to mine :-)
14:21 < wrtp> close their braces before writing the body of the fn?
14:21 < nsf> you should wait for a major refactoring I'm doing right know
14:21 < nsf> yes yes
14:22 < nsf> and after all it's just autocompletion
14:22 < nsf> in the worst case it will not help you writing code
14:22 < nsf> it's not that bad :)
14:23 < wrtp> one approach could be when you've got a syntax error, to add
braces after the next line until it parses ok...
14:23 < wrtp> yeah true
14:23 < nsf> it's a bad approach
14:23 < wrtp> why's that?
14:23 < nsf> because a lot of the time I'm using broken code (parsed with an
14:24 -!- mahemoff [~mahemoff@] has joined #go-nuts
14:24 < nsf> and inserting braces won't help with that
14:24 < wrtp> true.  but you could do it only for certain classes of error.
14:24 -!- g0bl1n [~anonymous@a213-22-18-58.cpe.netcabo.pt] has quit [Quit: g0bl1n]
14:25 < nsf> sometimes it's hard to understand what compiler means by its
error message
14:25 < wrtp> alternatively you could do a naive bracket matching before
parsing and insert some if necessary
14:25 < nsf> for human
14:25 < nsf> it's even harder for a program to do so
14:25 < nsf> :)
14:25 < wrtp> true
14:25 < nsf> bracket matching sounds better
14:26 < nsf> but I'm pretty happy with current approach
14:26 < wrtp> sure
14:26 < nsf> it autocompletes a lot of the code
14:26 -!- ajhager [~ajhager@c-69-136-3-186.hsd1.in.comcast.net] has quit [Quit:
WeeChat 0.3.2]
14:26 < nsf> I mean a lot of the cases
14:26 < wrtp> does it do cross-referencing too?
14:26 < nsf> what do you mean by that?
14:27 < wrtp> i mean, if you've got a method call and you want to know where
it's defined, can your code tell you that?
14:27 < nsf> currently, no
14:27 < nsf> and I'm not sure I will implement that as a part of
14:28 < nsf> but more likely as a part of refactoring tools
14:28 < wrtp> i found that really useful.  but agreed, it's probably not
part of autocompletion.
14:28 < nsf> which have requirement for correctly parsable code
14:28 < nsf> so it will work if you're reading the code
14:28 < nsf> not writing it :)
14:29 < nsf> anyway, it's not even near yet
14:29 * nsf is back to work
14:30 -!- skelterjohn [~jasmuth@c-76-116-182-139.hsd1.nj.comcast.net] has quit
[Quit: skelterjohn]
14:38 -!- artefon [~thiago@dhcp44.usuarios.dcc.ufmg.br] has quit [Quit: bye]
14:47 -!- alehorst [~alehorst@] has quit
[Remote host closed the connection]
14:52 -!- saschpe_ [~saschpe@mgdb-4d0cf99f.pool.mediaWays.net] has joined #go-nuts
14:54 -!- saschpe [~saschpe@mgdb-4d0cfab9.pool.mediaWays.net] has quit [Ping
timeout: 276 seconds]
14:55 -!- mahemoff [~mahemoff@] has quit [Ping timeout: 276 seconds]
14:57 -!- saschpe__ [~saschpe@mgdb-4d0cfb06.pool.mediaWays.net] has joined
14:58 -!- saschpe_ [~saschpe@mgdb-4d0cf99f.pool.mediaWays.net] has quit [Ping
timeout: 276 seconds]
15:01 -!- mahemoff [~mahemoff@] has joined #go-nuts
15:06 -!- awidegreen [~quassel@] has joined #go-nuts
15:08 -!- kanru [~kanru@118-168-239-91.dynamic.hinet.net] has joined #go-nuts
15:08 -!- allengeorge [~allengeor@] has joined #go-nuts
15:09 -!- saschpe__ [~saschpe@mgdb-4d0cfb06.pool.mediaWays.net] has quit [Ping
timeout: 245 seconds]
15:09 -!- saschpe__ [~saschpe@mgdb-4d0cfffc.pool.mediaWays.net] has joined
15:13 < exch> What would be considered best-practise when doing C bindings?
Try to recreate the c api as closely as possible?  This usually makes using it a
lil cumbersome..  different naming/calling conventions than Go usually has, but it
makes writing apps with it easier, because you can refer to the original c-lib
15:13 < exch> Or write an Api that is more idiomatic from a Go perspective..
Easier to use, but difficult to translate to documentation
15:14 < exch> I find i'm a bit torn between both.  They both have merit
15:15 -!- path[l] [~path@] has quit [Quit: path[l]]
15:15 < exch> I did consider writing both api's in the same package, so one
can choose which to use, but that requires either duplicate function bodies, or an
extra abstraction layer which slows stuff down
15:15 < uriel> I think idiomatic APIs are prefered
15:15 < Namegduf> I'd prefer to use an API more idiomatic to Go.
15:15 < exch> hmm ok
15:15 < Namegduf> If necessary, it could have separate docs- if it's that
different to the C APIs that it needs them, it's likely providing substantial
15:16 < uriel> but you can always do it in two steps, have a very thin
binding that is as close to the C api as possible, and then build a proper Go api
on top
15:16 < uriel> but I guess that will depend on the api and so on
15:16 < Namegduf> One of the big differences in ease of development of some
stuff between Python and C, I think, is that the Python API is less...  how to put
it...  horribly abysmal.
15:16 < Namegduf> Because of efforts to make it idiomatic in the target
15:16 < Namegduf> No reason Go can't be similar.
15:16 < uriel> also with Go interfaces, you probably want to model your api
in some generic way, so the C bindings are just one possible implementation
15:17 < uriel> Namegduf: the problem with python apis is that their quality
differs greatly, there are some decent python apis, and tons of really hidous and
inconsistent ones
15:17 < exch> The generic approach isn't really necessary with my current
lib (libmtp).  It's a lib for a very specific target
15:17 < uriel> even in the python stdlib, there are some reallly awful
15:17 < Namegduf> uriel: I assume I got lucky and only dealt with the better
ones, then.
15:18 < exch> I'm currently doing both the c and go api for libmtp.  It'l
enlarge the size of the package, but so far it's proving to be useful.  I may just
get rid of the c bit entirely though
15:18 < uriel> exch: well, I would guess that in most cases eventually one
would hope to replace any C bindings with pure Go code, so that is another reason
to focus on a generic API using interfaces, etc
15:18 < exch> true
15:19 -!- saschpe__ [~saschpe@mgdb-4d0cfffc.pool.mediaWays.net] has quit [Ping
timeout: 246 seconds]
15:19 -!- saschpe___ [~saschpe@mgdb-4d0cf1bb.pool.mediaWays.net] has joined
15:20 -!- saschpe___ [~saschpe@mgdb-4d0cf1bb.pool.mediaWays.net] has quit [Remote
host closed the connection]
15:28 -!- nickaugust [~nick@] has joined #go-nuts
15:32 -!- rlab [~Miranda@] has joined #go-nuts
15:40 -!- skelterjohn [~jasmuth@lawn-net168-in.rutgers.edu] has joined #go-nuts
15:41 -!- angasule [c80571ea@gateway/web/freenode/ip.] has quit
[Quit: Page closed]
15:42 < rsaarelm> Did someone just change cgo to not accept C types as
method receivers?  I'm getting a bunch of "expected (unqualified) identifier" from
my code..
15:43 < exch> I hope not O_o
15:46 -!- zozoR [~zozoR@x1-6-00-0e-2e-a3-e0-23.k377.webspeed.dk] has joined
15:47 -!- zozoR [~zozoR@x1-6-00-0e-2e-a3-e0-23.k377.webspeed.dk] has quit [Client
15:47 -!- mahemoff [~mahemoff@] has quit [Quit: mahemoff]
15:49 -!- Tiger__ [~chatzilla@] has joined #go-nuts
15:49 -!- Tiger_ [~chatzilla@] has quit [Ping timeout: 240 seconds]
15:51 -!- mahemoff [~mahemoff@] has joined #go-nuts
15:51 -!- Venom_X [~pjacobs@] has joined #go-nuts
15:58 -!- hstimer [~hstimer@2002:4c67:9b0d:0:226:bbff:fe05:dd9b] has quit [Quit:
15:58 -!- deso [~deso@x0561a.wh30.tu-dresden.de] has joined #go-nuts
16:01 < rsaarelm> Looks like they did.  Filed an issue.
16:02 < rsaarelm> #998.  If I had two more bugs I could get Issue 1000.
16:05 -!- Paradox924X [~Paradox92@vaserv/irc/founder] has quit [Quit: ~]
16:05 < exch> quick, break something :p
16:05 -!- gabriel9 [~gabriel9@] has quit [Ping timeout: 258 seconds]
16:08 -!- macroron [~ron@c-98-242-168-49.hsd1.fl.comcast.net] has joined #go-nuts
16:08 -!- sladegen [~nemo@unaffiliated/sladegen] has quit [Disconnected by
16:08 -!- sladegen_ [~nemo@unaffiliated/sladegen] has joined #go-nuts
16:10 -!- Ginto8 [~joe@pool-173-61-45-40.cmdnnj.fios.verizon.net] has quit [Ping
timeout: 265 seconds]
16:13 -!- acts_as [~acts_as@] has joined #go-nuts
16:14 -!- mahemoff [~mahemoff@] has quit [Quit: mahemoff]
16:14 -!- ct529 [~quassel@envpc1758.york.ac.uk] has joined #go-nuts
16:14 < acts_as> Is there someone I can convince, to not let Go use camel
case?  It wakes me up at night with cold sweats...  Reminding me of Java.
16:15 < acts_as> In lieu of Apache's Java projects, I think they should
change their name to "Can I haz PhD?" Silly NullPointerExceptions.
16:16 < MaybeSo> acts_as: I'd guess that it's a lost cause...
16:17 * exch likes it
16:18 < rsaarelm> acts_as: Not a solution, but may help keep the nightmares
at bay: http://www.emacswiki.org/emacs/GlassesMode
16:18 < acts_as> Camel case isn't bad, so much as I like the Ruby take on
upper case letters...  use them for constants / namespace
16:19 < acts_as> class SomeClass { func main() { flag.parse ...  } }
16:19 < acts_as> or the "os.Stdout.WriteString" should be
"os.stdout.write_string" because readability++
16:20 < acts_as> I'm using wikipedia for my sharp-eyed critiques
16:21 < exch> you can't argue with taste really.  I find the camelcase
infinitely more readable
16:22 < acts_as> yeah ok, hitler.
16:22 < exch> ...
16:22 < rsaarelm> Yeah.  I don't have a strong opinion either way, but
trying to get the Go community to switch is very much a lost case.
16:22 < MaybeSo> well, *you* might not argue, but others certainly can!
I've found that formatting issues drive a huge amount of the
discussions/debate/dissent amoung programmers.  :D
16:22 < acts_as> I shall start an online petition.
16:23 < rsaarelm> These things are basically "pick one and stick with it",
and Go is taking the "stick with it" part pretty seriously, as demonstrated by
16:23 < MaybeSo> acts_as: I believe rob pike has built up a pretty strong
tolerance to online debates.
16:23 < acts_as> I should start gofys
16:23 < MaybeSo> maybe call it gofyerself?
16:24 -!- femtoo [~femto@95-89-188-219-dynip.superkabel.de] has quit [Quit:
16:24 < acts_as> so, he's highly troll-able, you say?  I'm all ears.
16:24 < MaybeSo> acts_as: I think I meant more that it's immune.  :)
16:24 < MaybeSo> s/it/he
16:24 < acts_as> oh.  lame.
16:26 -!- Venom_X [~pjacobs@] has quit [Remote host closed the
16:26 < jessta> acts_as: shouldn't that be os.std_out.write_string?
16:27 -!- Ginto8 [~joe@pool-173-61-45-40.cmdnnj.fios.verizon.net] has joined
16:27 < acts_as> jessta: stdout is a C/UNIX "thing."
16:27 < jessta> If i've learned anything from glib, it's that I don't like
16:28 < exch> perhaps prefix write_string with some extra underscores, so it
stands out more
16:28 < acts_as> that's just silly.  underscore are not skis, so let's not
slide down that slippery slope - fellas
16:29 -!- mahemoff [~mahemoff@] has joined #go-nuts
16:30 -!- Venom_X [~pjacobs@] has joined #go-nuts
16:31 -!- kanru [~kanru@118-168-239-91.dynamic.hinet.net] has quit [Ping timeout:
240 seconds]
16:32 < acts_as> I think "upper case is this" and "lower case is this" is
very healthy for syntax.  Unless you know what "os" is before-hand (pretend it's
someone's custom set of classes) you stop reading the code to figure out where it
came from.  If it were "Os" or "OS" you could easily say "Oh, that's some class'
namespace somewhere" and "OS.blah" = class method, where something like "os.blah"
= instance method.
16:32 < acts_as> Ok, time to go back to doing what I'm paid to
16:33 < acts_as> that is, trolling #linux
16:36 -!- acts_as [~acts_as@] has quit [Remote host closed the
16:36 -!- acts_as [~acts_as@] has joined #go-nuts
16:37 -!- sahid [~sahid@LNeuilly-152-21-22-10.w193-253.abo.wanadoo.fr] has quit
[Quit: Ex-Chat]
16:38 -!- virtualsue [~chatzilla@nat/cisco/x-tmcxfxoqwphuyiir] has quit [Ping
timeout: 264 seconds]
16:39 -!- virtualsue [~chatzilla@nat/cisco/x-qhijwifdfhxqajjc] has joined #go-nuts
16:43 -!- ct529 [~quassel@envpc1758.york.ac.uk] has quit [Remote host closed the
16:43 -!- Fish [~Fish@9fans.fr] has joined #go-nuts
16:44 -!- skelterjohn [~jasmuth@lawn-net168-in.rutgers.edu] has quit [Read error:
Connection reset by peer]
16:44 -!- hstimer [~hstimer@] has joined #go-nuts
16:45 -!- skelterjohn [~jasmuth@lawn-net168-in.rutgers.edu] has joined #go-nuts
16:48 -!- fission6 [~silverman@rrcs-69-193-216-26.nyc.biz.rr.com] has quit [Ping
timeout: 265 seconds]
16:49 -!- Venom_X [~pjacobs@] has quit [Remote host closed the
16:52 -!- nettok [~quassel@] has joined #go-nuts
16:52 -!- fission6 [~silverman@65-86-91-130.client.dsl.net] has joined #go-nuts
16:53 -!- skelterjohn [~jasmuth@lawn-net168-in.rutgers.edu] has quit [Quit:
16:53 -!- skelterjohn [~jasmuth@lawn-net168-in.rutgers.edu] has joined #go-nuts
16:54 < jessta> acts_as: yeah, packages are lowercase, types, methods and
functions are uppercase
16:56 -!- rlab [~Miranda@] has quit [Ping timeout: 248 seconds]
16:56 -!- skelterjohn [~jasmuth@lawn-net168-in.rutgers.edu] has quit [Read error:
Connection reset by peer]
16:56 -!- Venom_X [~pjacobs@] has joined #go-nuts
16:57 -!- Venom_X [~pjacobs@] has quit [Remote host closed the
16:58 -!- skelterjohn [~jasmuth@lawn-net168-in.rutgers.edu] has joined #go-nuts
17:01 -!- Venom_X [~pjacobs@] has joined #go-nuts
17:02 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.2]
17:03 -!- dionysiac [~dionysiac@S01060013102db8c7.cg.shawcable.net] has quit [Ping
timeout: 240 seconds]
17:05 -!- g0bl1n [~anonymous@a213-22-18-58.cpe.netcabo.pt] has joined #go-nuts
17:07 -!- nickaugust [~nick@] has quit [Ping timeout:
240 seconds]
17:08 -!- napsy [~luka@tm.] has quit [Quit: Lost
17:08 -!- napsy [~luka@tm.] has joined #go-nuts
17:12 -!- gabriel9 [~gabriel9@] has joined #go-nuts
17:13 -!- nekschot [spons@212-123-134-143.ip.telfort.nl] has joined #go-nuts
17:16 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has joined #go-nuts
17:17 -!- g0bl1n [~anonymous@a213-22-18-58.cpe.netcabo.pt] has quit [Quit: g0bl1n]
17:19 -!- gabriel9 [~gabriel9@] has quit [Read error: Connection
reset by peer]
17:20 -!- gabriel9 [~gabriel9@] has joined #go-nuts
17:22 -!- deso [~deso@x0561a.wh30.tu-dresden.de] has quit [Remote host closed the
17:24 -!- deso [~deso@x0561a.wh30.tu-dresden.de] has joined #go-nuts
17:24 -!- angasule [c80571ea@gateway/web/freenode/ip.] has joined
17:25 -!- gabriel9 [~gabriel9@] has quit [Read error: Connection
reset by peer]
17:25 -!- gabriel9 [~gabriel9@] has joined #go-nuts
17:28 -!- Venom_X [~pjacobs@] has quit [Ping timeout: 240 seconds]
17:29 -!- napsy [~luka@tm.] has quit [Ping timeout:
276 seconds]
17:29 -!- nekschot [spons@212-123-134-143.ip.telfort.nl] has quit [Quit: Leaving]
17:29 -!- Venom_X [~pjacobs@] has joined #go-nuts
17:30 -!- gabriel9 [~gabriel9@] has quit [Read error: Connection
reset by peer]
17:31 -!- gabriel9 [~gabriel9@] has joined #go-nuts
17:39 -!- Damn3d [damn3d@bimbrownia.org] has quit [Changing host]
17:39 -!- Damn3d [damn3d@unaffiliated/morpheus/x-0931003] has joined #go-nuts
17:53 -!- napsy [~luka@tm.] has joined #go-nuts
17:54 -!- virtualsue [~chatzilla@nat/cisco/x-qhijwifdfhxqajjc] has quit [Ping
timeout: 260 seconds]
17:58 < MaybeSo> public ones are uppercase
17:59 -!- mattikus [~mattikus@ip24-250-73-154.br.br.cox.net] has joined #go-nuts
18:02 -!- mahemoff [~mahemoff@] has quit [Quit: mahemoff]
18:04 -!- sacho [~sacho@90-154-149-17.btc-net.bg] has quit [Ping timeout: 264
18:05 -!- wrtp [~rog@] has quit [Quit: wrtp]
18:06 < jessta> MaybeSo: yeah, but the private ones can't be accessed
outside the package anyway
18:07 -!- nickaugust [~nick@] has joined #go-nuts
18:10 -!- nettok [~quassel@] has quit [Ping timeout: 265 seconds]
18:15 -!- rlab [~Miranda@] has joined #go-nuts
18:17 -!- gnuvince_ [~vince@] has joined #go-nuts
18:20 -!- gabriel9 [~gabriel9@] has quit [Read error: Connection
reset by peer]
18:21 -!- prip [~foo@host97-130-dynamic.36-79-r.retail.telecomitalia.it] has quit
[Ping timeout: 265 seconds]
18:23 -!- nickaugust [~nick@] has quit [Ping timeout:
248 seconds]
18:23 -!- angasule [c80571ea@gateway/web/freenode/ip.] has quit
[Quit: Page closed]
18:24 -!- gabriel9 [~gabriel9@] has joined #go-nuts
18:26 -!- gent00r [~haxOr@gw.invnetworks.com] has joined #go-nuts
18:26 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has quit [Quit:
18:30 -!- nickaugust [~nick@] has joined #go-nuts
18:31 < gent00r> hi i am wondering if Go has an ORM tools available.  Like
hibernate for Java?
18:32 < nickaugust> gent00r: dont think so
18:33 -!- mahemoff [~mahemoff@] has joined #go-nuts
18:34 -!- prip [~foo@host136-122-dynamic.47-79-r.retail.telecomitalia.it] has
joined #go-nuts
18:37 < smw> how would an ORM in Go work?
18:38 < KirkMcDonald> The question is based on the assumption that ORMs
18:39 < smw> That is true
18:39 * smw hates ORMs
18:39 -!- nickaugust [~nick@] has quit [Quit: WeeChat
18:39 < Namegduf> ORMs are for people who think SQL is scary and never
bothered to actually look at it.
18:40 -!- gabriel9 [~gabriel9@] has quit [Read error: Connection
reset by peer]
18:40 -!- gabriel9 [~gabriel9@] has joined #go-nuts
18:40 -!- nickaugust [~nick@li181-40.members.linode.com] has joined #go-nuts
18:40 < KirkMcDonald> Or people who think that abstraction is an unalloyed
18:41 < cbeck> Abstraction is like violence, the only cure for too much is
18:41 -!- dionysiac [~dionysiac@S01060013102db8c7.cg.shawcable.net] has joined
18:45 -!- sacho [~sacho@95-42-108-60.btc-net.bg] has joined #go-nuts
18:45 < smw> ORMs are too complicated for me :-\.
18:46 < saracen> How are they complicated?
18:47 < smw> I have never been able to figure them out.
18:47 < smw> On python I tried using sqlalchemy
18:47 < smw> I eventually gave up and just used a INSERT statement
18:51 -!- crashR [~crasher@codextreme.pck.nerim.net] has quit [Quit: (◣_◢)
BigBrowser is watching ⓎⓄⓊ]
18:51 < saracen> Never tried it.  But the problem with a lot of ORMs, is
that they make your objects still database dependant, so you dont really have any
abstraction as such.  The better ORM implementations leave your domain models
alone, so they can be used completely independantly - and you can construct them
without thinking in terms of how they'll be stored.  When that happens, you
develop pretty quickly, because you can just prototype everything in tem
18:53 < jessta> the problem with ORMs is that you have a relational database
and aren't using the relational features
18:53 < nickaugust> its just nice to be able to access realated tables just
like record.owner.phonenumber.extension or some shit like that rather than typing
out some god awful joins or whatever in sql
18:53 < nickaugust> i assumed the ORMs were using the relational features of
the database behind the scenes
18:54 < nickaugust> jessta: is that not true?
18:54 < nickaugust> saracen: which is just a schemaless db
18:54 < saracen> They do, they just can't usually use the full feature set.
Like, right joins dont make much sense
18:54 -!- millertimek1a2m3 [~millertim@] has joined #go-nuts
18:55 < millertimek1a2m3> hey I'm a beginner with go...  I've got a little
project that I would like to do: open a txt file and print it's contents.  would
anyone like to help me?
18:55 < millertimek1a2m3> and by the way, could someone show me around to
some google go forums?
18:55 < nickaugust> millertimek1a2m3: theres a cat example in the tutorial
on the website
18:55 < millertimek1a2m3> oh yea that's right!
18:56 < millertimek1a2m3> thanks haha
18:56 < nickaugust> millertimek1a2m3: just work throught the tutorial on
18:56 < jessta> nickaugust: yes, but not really.
18:56 < nickaugust> s/throught/through
18:56 < jessta> nickaugust: a 'schemaless db' is a lie
18:56 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts
18:57 < millertimek1a2m3> so anyone know about the go forums?  or is there
anything other than a mailing list?
18:57 < Namegduf> So the biggest benefit of an ORM is little bits of
syntactical sugar like automatic joins, and "guessing" column types for you
18:58 < saracen> They dont usually guess column types
18:58 < jessta> millertimek1a2m3: nope, just the mailing list
18:58 < millertimek1a2m3> aww
18:58 < Namegduf> Oh, that sucks.
18:59 < jessta> SQLobject used to
18:59 < Namegduf> Django does.
18:59 < saracen> The biggest benefit, is that you can just use objects like
you would usually, pretending a database doesnt really even exist - for the most
part.  It's suppose to extend past SQL, too.
18:59 < Namegduf> Had one of its developers in front of me going on about
how SQL sucked, I kinda ignroed the next hour and a half and regretted showing up.
19:00 < smw> Namegduf, you normally need to tell it every type and every
relation (which makes sense, but the way you specify relations always confused me)
19:00 < Namegduf> saracen: An Object-Relational Mapping does not.
19:01 < jessta> saracen: you could use an key-value store, which makes much
more sense for storing 'objects'
19:01 < Namegduf> saracen: You may be confusing it with a persistence layer
19:02 -!- millertimek1a2m3 [~millertim@] has left #go-nuts []
19:02 < saracen> jessta: I could use both
19:02 * Namegduf doesn't really buy "Pretending X doesn't exist" as a valid good
point of design, though
19:02 < nickaugust> Namegduf: the sugar yes, and abstracting your code from
the database makes it more portable.  albiet at the cost of abstraction
19:02 < nickaugust> of course
19:02 < Namegduf> nickaugust: [citation needed]
19:03 < Namegduf> From a specific SQL implementation, yes
19:03 < saracen> Namegduf: Its nice if you have multiple backends.  Couchdb,
Mysql.  Maybe sometimes they hydrate the same model
19:03 < Namegduf> "hydrate"?
19:04 -!- dionysiac [~dionysiac@S01060013102db8c7.cg.shawcable.net] has quit [Ping
timeout: 264 seconds]
19:04 -!- mahemoff [~mahemoff@] has quit [Quit: mahemoff]
19:04 < Namegduf> Stuff to support multiple backends can be useful,
depending on circumstances, but it generally doesn't need to be so fat.
19:04 < nickaugust> maybe not for one specific application but for a project
like django it makes sense
19:05 < Namegduf> Certainly not if it's just abstracting between different
things that speak SQL
19:05 < saracen> Hydration, it's the name usually (at least with the ORMs
I've used) given to the process of mapping values from your data source to your
models, done by the data mapper
19:06 < Namegduf> Oh.
19:06 < Namegduf> I thought that's what the word "loading" meant.
19:06 -!- ghiu [~gu@93-32-145-212.ip33.fastwebnet.it] has joined #go-nuts
19:06 < jessta> but if you abstract away the database, then you can't use
any of the features of the database, so all databases are the same.
19:06 < cbeck> All it makes me think is 'PBR: The beer that hydrates'
19:06 < skelterjohn> lol
19:07 < Namegduf> Anyways, I think you need a better argument than "it
abstracts" for why it's useful.
19:07 < Namegduf> By default, abstraction is BAD.
19:08 < Namegduf> It costs in performance, and moves you away from the way
things actually work/real API into some custom API, making it more painful to
reason with.
19:08 < ghiu> hi, how can i convert a int to int64?
19:08 < Namegduf> int64(intvalue)
19:09 < ghiu> uh ..
19:09 < ghiu> tnx
19:10 < Namegduf> "it's convenient to have certain shortcuts that any
specific set of DB bindings could implement" isn't really an argument for the
abstraction that an ORM provides, and the only real case it'd benefit portability
is when you want to use something with an SQL DB and a non-SQL DB
19:10 < Namegduf> Which seems an unusual case and far rarer than the number
of times ORMs are actually used
19:13 -!- Altercation [~Altercati@pdpc/supporter/active/altercation] has quit
[Excess Flood]
19:13 -!- Altercation [~Altercati@ogygia.ethanschoonover.com] has joined #go-nuts
19:13 -!- Altercation [~Altercati@ogygia.ethanschoonover.com] has quit [Changing
19:13 -!- Altercation [~Altercati@pdpc/supporter/active/altercation] has joined
19:14 < falconindy> I'm trying to create an io.Reader to pass on to
tar.NewReader().  Am I incorrectly assuming that I can just declare: r :=
new(io.Reader) ?
19:14 < saracen> The best example I can give, is for a crap game I'm making
at the moment.  It's a web application.  When people first visit the site, they
can just start playing.  They have health, experience, items (items are also
objects).  I did all of this without any backend.  Then I decided when they logged
in, this data should start being saved.  You have to provide the ORM with
information about how to do this, but it makes it pretty easy for you.  That
19:14 < saracen> Depends on the project, or whatever works best
19:14 < saracen> (without any backend - there was session storage :))
19:15 < jessta> falconindy: io.Reader is an interface not a value type
19:15 < falconindy> so I need to instantiate one of the types that wraps
19:16 < jessta> you need to instatiate a type that statifies the io.Reader
19:16 < skelterjohn> when you say you want to create a reader to pass to
tar, what is that reader reading, exactly?
19:16 < vrtical> in other words you need to open a file or something :-)
19:17 < skelterjohn> you can't just say "ok i'll make a reader."
19:17 < skelterjohn> it has to be reading something
19:17 < falconindy> ive read a file into a []byte with ioutil.ReadFile
19:17 < jessta> falconindy: os.File is a io.Reader
19:18 < skelterjohn> http://golang.org/pkg/bytes/#Buffer.NewBuffer that will
give you a reader on a particular byte slice
19:18 < falconindy> aha.  that makes more sense
19:18 < falconindy> it did seem like i had one too many steps
19:19 < jessta> the documentation really should have a way to find types
that statify an interface
19:19 < falconindy> indeed, it'd be helpful
19:20 < falconindy> hrmm, im not seeing where os.File implements io.Reader
19:21 < jessta> falconindy: http://golang.org/pkg/os/#File.Read
19:21 -!- millertimek1a2m3 [~millertim@] has joined #go-nuts
19:21 < falconindy> er, right.  just needs to implement Read
19:21 < falconindy> my mind has been warped by C.
19:21 -!- millertimek1a2m3 [~millertim@] has left #go-nuts []
19:22 < jessta> falconindy: that's why we tend to say 'satisfies' instead of
19:22 < falconindy> and that's why i say warped!
19:23 < falconindy> awesome.  thanks for your help
19:24 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has joined #go-nuts
19:25 -!- macroron [~ron@c-98-242-168-49.hsd1.fl.comcast.net] has quit [Quit:
19:25 < saracen> Anyway, so who's going to port quake to go?
19:30 -!- Eridius [~kevin@unaffiliated/eridius] has joined #go-nuts
19:31 < nickaugust> Namegduf: not to beat a dead horse but I also like to be
able to fetch data from the database in the language im working in, say python,
rather than having to drop into sql
19:32 < Namegduf> I like projects whose website uses a lot of the colour
19:32 < Namegduf> It doesn't make it a valid technical argument.
19:33 < Namegduf> Sorry if I'm a bit harsh, but I don't really find "I don't
like using SQL" a fair thing.
19:34 < Namegduf> I'm just wondering when we'll see someone write something
because they don't like using regular expressions.
19:35 < nickaugust> i think its better to complain about things that we need
that dont exist yet, rather than things that do exist that you just dont like
using.  i like sql, i use it all the time.  some times i use an ORM some times i
dont.  my current project im using flat files and indexing them myself.  who
19:36 < nickaugust> if somebody wrote a regex wrapper why does that matter
to you?
19:36 < nickaugust> i for one think regular expressions are a pain in the
19:36 < skelterjohn> if i was your boss, i'd care ;)
19:36 < nickaugust> i like to be able to look at code and understand it
19:36 < Namegduf> Have you tried to write out a regex in English before?
19:37 < saracen> I like SQL.  I sometimes use ORMs
19:37 -!- path[l] [UPP@] has joined #go-nuts
19:37 < Namegduf> The matching rule they represent for a non-trivial regex
is actually quite complex
19:37 < nickaugust> i agree...  way too much abstraction going on.  but
abstraction is not always bad no matter what
19:37 -!- jA_cOp [~yakobu@unaffiliated/ja-cop/x-9478493] has quit [Quit: Leaving]
19:38 < Namegduf> I think you just hit the central problem here.
19:38 < Namegduf> "regexes are a pain in the ass" is not a reason to create
an abstracted layer on regular expressions.
19:38 < Namegduf> It is a reason to *write something better*.
19:38 < drhodes> pyparsing does a great job of replacing regex for hairy
cases, I imagine ruby treetop is at least as good.  far more clear.
19:38 < saracen> Namegduf: Of course, you can still query using SQL with an
19:39 < Namegduf> saracen: At which point the whole portability argument
becomes moot.
19:39 < Namegduf> Just noting.
19:41 -!- ender2070 [~ender2070@bas22-toronto12-2925103053.dsl.bell.ca] has quit
[Remote host closed the connection]
19:41 < saracen> That's not strictly true.  Because if you're going to use
SQL, and then assign values to your models.  Your models will be used in the rest
of your application.
19:41 < Namegduf> ...it's quite strictly true.
19:41 -!- ender2070 [~ender2070@bas22-toronto12-2925103053.dsl.bell.ca] has joined
19:41 < Namegduf> If you use SQL, you're only portable to the SQL backends
that the SQL you used will run on.
19:42 < Namegduf> And not at all to non-SQL backends of theory.
19:42 < Namegduf> The rest of the program still being portable doesn't make
the whole thing portable.
19:44 < Namegduf> I dunno what the point actually is anymore, though.  The
topic moved on, then you started throwing points out again.
19:44 < saracen> Well...  yes.  But thats not the ORM, but the database
abstraction layer.  That layer you could still choose to control yourself, thus
use SQL directly
19:44 < saracen> They'd still be benefits of using the ORM if you decided to
take that route
19:44 -!- millertimek1a2m3 [~millertim@] has joined #go-nuts
19:44 < saracen> Like, if you changed the backend, you would only have to
refactor your finder methods, rather than everything
19:45 < millertimek1a2m3> hey now, when I just asked about opening a file
and reading from it, you guys said that there was a cat example on the tutorial
19:45 < nickaugust> iirc
19:45 < saracen> Namegduf: Ok. We can move past it.  I didn't realise it was
an issue that was getting to you.
19:45 < millertimek1a2m3> I just wanted to ask: I know I'm not supposed to
have to copy down the file thing, so where is that at in the package?
19:46 < Namegduf> I just think it's been a bit loud and long for a channel
which is interested in Go.
19:46 < Namegduf> :P
19:46 < millertimek1a2m3> like...  you know how it says import ("./file"
19:46 < nickaugust> Namegduf: +1
19:46 < nickaugust> :)
19:46 < saracen> Namegduf: Fair point :)
19:46 < nickaugust> millertimek1a2m3: import ("./file") just means to use
your own file
19:46 < nickaugust> millertimek1a2m3: rather than one provided by Go
19:47 < millertimek1a2m3> ...  where is the equivalent for that in the
19:47 < millertimek1a2m3> nickaugust: I know, i'm asking what the equivalent
is that is provided by go
19:47 < millertimek1a2m3> is it os.File?
19:47 < nickaugust> millertimek1a2m3: ah, i dont know if theres an exact
equivialnt..  but os has some and io
19:48 < millertimek1a2m3> well, surely there must be.  how would you use
what's provided by go to open a file?
19:49 < nickaugust> millertimek1a2m3: maybe in the doc directory theres a
copy of that exact file
19:49 < nickaugust> millertimek1a2m3: but theres methods in the os package
and the io package for reading/writing files
19:49 < millertimek1a2m3> right, well I would think that the same name was
19:49 < nickaugust> millertimek1a2m3: maybe im not understanding what you're
19:50 < millertimek1a2m3> like, file.File corresponds to os.File
19:50 < millertimek1a2m3> or perhaps its io.File
19:50 < nickaugust> millertimek1a2m3: the idea of the tutorial is for you to
work through the examples...  in actual practice you wont be using that file
package that you create.
19:50 < millertimek1a2m3> right
19:50 < millertimek1a2m3> i know.  I'm asking: if I wanted to use the
packages provided by GO
19:51 -!- path[l] [UPP@] has quit [Read error: Connection reset by
19:52 -!- path[l] [UPP@] has joined #go-nuts
19:53 < skelterjohn> if you wanted to use the packages provided by GO, then
19:54 < millertimek1a2m3> open a file and print it's contents to the
19:54 -!- ghiu [~gu@93-32-145-212.ip33.fastwebnet.it] has quit [Quit: ghiu]
19:54 < millertimek1a2m3> if you sent anything since I wrote "open a file
and print it's..." please resend it skelterjohn
19:54 < millertimek1a2m3> i have to do a web authentication because I'm a
university library
19:55 < skelterjohn> well, os.Stdout is a writer
19:55 < skelterjohn> a file is a reader
19:56 < skelterjohn> probably some easy way to write all of some reader's
contents to a writer
19:56 < saracen> io.Copy
19:56 < skelterjohn> nice.  that'll do
19:57 < nickaugust> millertimek1a2m3: the answer is theres lots of different
ways to do that.  check out the os package and the io and ioutil package.
19:57 < millertimek1a2m3> ok
19:58 < nickaugust> millertimek1a2m3: in the program im writing right now
(im new to Go also) im using ioutil.ReadFile() to read files and printing to
console with fmt.Printf()
19:59 < millertimek1a2m3> oh ok
19:59 < millertimek1a2m3> the little project that I'm doing right now is my
very first go program that i've done on my own
20:00 -!- napsy [~luka@tm.] has quit [Quit: Lost
20:00 < nickaugust> millertimek1a2m3: but i think ioutil.ReadFile uses
os.Open() (is that right guys?)...  and you can use os.Open directly too if you
need more functionality
20:01 < millertimek1a2m3> right...  i'm probably about to post to pastebin
20:01 < nickaugust> yeah it does use os.Open
20:01 -!- mattikus [~mattikus@ip24-250-73-154.br.br.cox.net] has quit [Remote host
closed the connection]
20:01 -!- Altercation [~Altercati@pdpc/supporter/active/altercation] has quit
[Excess Flood]
20:01 -!- tvw [~tv@] has quit [Remote host closed the connection]
20:02 -!- Altercation [~Altercati@pdpc/supporter/active/altercation] has joined
20:02 < nickaugust> millertimek1a2m3: the package documentation on
go-lang.org is probably the best resource.  or of course you can ask here
20:03 < millertimek1a2m3> right
20:03 < millertimek1a2m3> hey i was going to ask...
20:03 < nickaugust> as long as your not writing an abstraction layer to
anything :P nudge Namegduf
20:03 < uriel> oh dear, oh dear:
20:03 < millertimek1a2m3> in the tutorial at line
20:03 < millertimek1a2m3> ...
20:03 < millertimek1a2m3> 20 and 26 they use f.String()
20:04 < millertimek1a2m3> what can I use that is equivalent while I'm using
the go package's os.File
20:04 < millertimek1a2m3> basically, what I'm doing is replacing their
example's "./file" import with the os.File equivalent
20:04 < millertimek1a2m3> so that it will work off of the provided source
20:05 < Namegduf> "For the case where Go's behavior is desired, one could
create a scope(exit) at the beginning of the function that executes an array of
delegates, and then push lambdas into that array during execution."
20:05 < Namegduf> Sounds like an elegant and simple language.
20:05 -!- mahemoff [~mahemoff@87-194-3-205.bethere.co.uk] has joined #go-nuts
20:06 < MaybeSo> uriel: one fellow wrote "You still have to remember to
close your resource.  So it still doesn't help in terms of forgetting it."
20:06 < millertimek1a2m3> ah!
20:06 < MaybeSo> I think he wants perl...
20:06 < millertimek1a2m3> i found it
20:07 < Namegduf> I want to know what kind of programmer forgets that Open()
needs Close() entirely
20:07 < KirkMcDonald> Namegduf: D's scope(exit) permits any statement (or a
block of statements).
20:07 < millertimek1a2m3> yea, but it's easier to ask someone...  I know you
guys like to leave all questions on IRC to fundamental and high level questions,
but I'm just a freshman
20:07 < Namegduf> Forgetting to put it on all paths is one thing, but
forgetting it entire?
20:07 < KirkMcDonald> scope(exit) x++;
20:07 < millertimek1a2m3> i just find that if you can't solve something
after hours of reading documentation and stuff...  it's time to ask someone.
20:08 < KirkMcDonald> Namegduf: Walter is referring specifically to the
difference in scope semantics.
20:08 < millertimek1a2m3> sorry if I'm against the grain...
20:08 < KirkMcDonald> Namegduf: As scope(exit) fires when the current scope
ends, but defer fires when the function ends.
20:08 < nickaugust> millertimek1a2m3: whats the question?
20:09 < Namegduf> Yeah.  Seems like a pointless distinction, really, since
if you need to, you can use a closure to emulate D's behaviour.
20:09 < millertimek1a2m3> nothing now, I think i've already solved it
20:10 -!- mahemoff [~mahemoff@87-194-3-205.bethere.co.uk] has quit [Remote host
closed the connection]
20:10 -!- mahemoff_ [~mahemoff@87-194-3-205.bethere.co.uk] has joined #go-nuts
20:10 -!- derferman [~derferman@dsl092-048-218.sfo4.dsl.speakeasy.net] has joined
20:10 -!- mahemoff [~mahemoff@] has joined #go-nuts
20:11 < millertimek1a2m3> awesome!  I just completed my first GO project
Haha!  I'm pimp!
20:11 < nickaugust> "Deferred functions may read and assign to the returning
function's named return values." so a function hasnt really returned until its
defered funcitons have
20:12 -!- millertimek1a2m3 [~millertim@] has left #go-nuts []
20:12 -!- napsy [~luka@tm.] has joined #go-nuts
20:12 -!- gabriel9 [~gabriel9@] has quit [Read error: Connection
reset by peer]
20:13 -!- millertimek1a2m3 [~Adam@] has joined #go-nuts
20:13 -!- gabriel9 [~gabriel9@] has joined #go-nuts
20:14 -!- mahemoff_ [~mahemoff@87-194-3-205.bethere.co.uk] has quit [Ping timeout:
258 seconds]
20:15 < skelterjohn> "really returned" is sort of a matter of opinion
20:15 < Namegduf> That whole thread is quite terrible.
20:17 < MaybeSo> Namegduf: and yet oh so typical.  :)
20:18 < Namegduf> I'll take your word for it; I don't follow Slashdot, Digg,
or Reddit.
20:18 < MaybeSo> I bet those kinds of dicussions were occuring over the
merits of the different releases of FORTRAN
20:18 < skelterjohn> not as much internet back then
20:19 < Namegduf> I think that was before people lacking any other talent,
but who could figure out how to turn a computer on, thus astounding their fellow
apes, generally created tech blogs.
20:19 < Namegduf> Or commented on things.
20:20 < MaybeSo> skelterjohn: heh, yes but I meant the debates themselves,
not the medium
20:21 < skelterjohn> i think that without this medium, debates don't turn
out the same
20:23 -!- millertimek1a2m3 [~Adam@] has quit [Ping timeout: 258
20:27 -!- peterdn [~peterdn@cpc1-oxfd18-2-0-cust512.4-3.cable.virginmedia.com] has
joined #go-nuts
20:30 -!- g0bl1n [~anonymous@a213-22-18-58.cpe.netcabo.pt] has joined #go-nuts
20:30 < plexdev> http://is.gd/e4Lx4 by [Rob Pike] in 7 subdirs of
go/src/pkg/ -- once: replace all uses of package once with sync.Once.
20:36 -!- SRabbelier [~SRabbelie@ip138-114-211-87.adsl2.static.versatel.nl] has
quit [Read error: Connection reset by peer]
20:36 < smw> if I have a io.ReadCloser and I put that into a
gzip.Decompressor http://localhost:6060/pkg/compress/gzip/#Decompressor and then
run "close" on the decompressor, would that close the original io.ReadCloser?
20:37 -!- SRabbelier [~SRabbelie@ip138-114-211-87.adsl2.static.versatel.nl] has
joined #go-nuts
20:37 < smw> is there any way to cascade that type of close?
20:38 < smw> My idea is to replace the response.Body with a gzip
decompressor.  That way when you read the body, you are getting a decompressed
20:39 < smw> response is in the http pkg
20:40 -!- virtualsue [~chatzilla@93-97-62-8.zone5.bethere.co.uk] has joined
20:41 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has quit [Quit:
20:42 < smw> nm, it looks like there is no way to do it (without making a
middleman for the decompressor)
20:42 < jessta> smw: the gzip.Decompressor wouldn't need a ReadCloser if it
didn't intend to close it
20:45 < jessta> smw: oh, but since it only takes an io.Reader, it can't
close it
20:50 -!- gabriel9 [~gabriel9@] has quit [Read error: Connection
reset by peer]
20:50 -!- gabriel9 [~gabriel9@] has joined #go-nuts
20:58 -!- Venom_X_ [~pjacobs@] has joined #go-nuts
21:00 -!- Venom_X [~pjacobs@] has quit [Ping timeout: 260 seconds]
21:04 -!- ghiu [~gu@93-32-145-212.ip33.fastwebnet.it] has joined #go-nuts
21:04 -!- Fish [~Fish@9fans.fr] has quit [Read error: Connection reset by peer]
21:04 < ghiu> is there anything like function pointers in go?
21:05 < Namegduf> Basically.
21:05 < Namegduf> Functions are first-class and can be assigned to variables
of the appropriate type.
21:06 -!- millertimek1a2m3 [~Adam@] has joined #go-nuts
21:07 < KirkMcDonald> func types are better than plain ol' function
pointers, too.
21:07 < KirkMcDonald> They can refer to closures and "bound" methods.
21:10 -!- millertimek1a2m3 [~Adam@] has quit [Ping timeout: 260
21:15 -!- g0bl1n [~anonymous@a213-22-18-58.cpe.netcabo.pt] has quit [Quit: g0bl1n]
21:16 -!- bmizerany [~bmizerany@] has joined #go-nuts
21:18 -!- millertimek1a2m3 [~Adam@] has joined #go-nuts
21:29 -!- virtualsue [~chatzilla@93-97-62-8.zone5.bethere.co.uk] has quit [Ping
timeout: 264 seconds]
21:29 -!- deso [~deso@x0561a.wh30.tu-dresden.de] has quit [Read error: Connection
reset by peer]
21:39 -!- byerley [~sheridan@dhcp150.cs.colostate.edu] has quit [Quit: Leaving]
21:46 -!- teepark [~teepark@c-24-5-115-214.hsd1.ca.comcast.net] has joined
21:56 -!- awidegreen [~quassel@] has quit [Ping timeout: 264 seconds]
22:25 -!- gabriel9 [~gabriel9@] has quit [Read error: Connection
reset by peer]
22:25 -!- gabriel9 [~gabriel9@] has joined #go-nuts
22:26 -!- allengeorge [~allengeor@] has quit [Quit: allengeorge]
22:29 -!- skelterjohn [~jasmuth@lawn-net168-in.rutgers.edu] has quit [Quit:
22:29 -!- skelterjohn [~jasmuth@lawn-net168-in.rutgers.edu] has joined #go-nuts
22:30 -!- artefon [~thiago@] has joined #go-nuts
22:39 -!- nettok [~quassel@proxy.galileo.edu] has joined #go-nuts
22:41 -!- teepark [~teepark@c-24-5-115-214.hsd1.ca.comcast.net] has left #go-nuts
22:45 -!- kanru [~kanru@118-168-239-91.dynamic.hinet.net] has joined #go-nuts
22:52 < millertimek1a2m3> hey anyone there?
22:52 -!- hstimer [~hstimer@] has quit [Quit: hstimer]
22:53 < skelterjohn> once again, no.  no one.
22:53 < KirkMcDonald> Not I.
22:53 < millertimek1a2m3> haha
22:54 -!- nettok [~quassel@proxy.galileo.edu] has quit [Read error: Operation
timed out]
22:54 < millertimek1a2m3> ok, this time, I want to modify what I built and I
want to print what's inside a gzip file, as in ./cat "location/to/file.tar.gz"
using the import "compress/gzip"
22:55 < millertimek1a2m3> how do I create a new io.Reader?
22:55 < nickaugust> shhh be quiet millertimek1a2m3 will here you
22:55 < millertimek1a2m3> I mean, don't I have to create one that is
specific to a file?
22:55 < nickaugust> hmmmmm?
22:56 < skelterjohn> you should spend some time looking through the
22:56 < skelterjohn> instead of asking others to do it for you
22:56 < millertimek1a2m3> *sigh
22:57 < saracen> I found it quicker looking through the source code.  It's
very readable
22:57 < skelterjohn> all the questions you ask can be answered by scanning
22:59 -!- djm [~djm@paludis/slacker/djm] has quit [Quit: Lost terminal]
22:59 -!- djm [~djm@paludis/slacker/djm] has joined #go-nuts
23:05 < drhodes> anyone know if cgo is broken?
23:06 < skelterjohn> i heard it was
23:06 < exch> yarr
23:06 < drhodes> ok, good, not my machine :3
23:07 -!- Innominate [~sirrobin@cpe-076-182-074-143.nc.res.rr.com] has quit [Read
error: No route to host]
23:09 < millertimek1a2m3> skelterjohn, I just don't understand something
about the OS package.  is it ok if I ask a question about that?  it's something
that you can look up i don't think
23:09 -!- ghiu [~gu@93-32-145-212.ip33.fastwebnet.it] has quit [Quit: ghiu]
23:09 -!- Innominate [~sirrobin@cpe-076-182-074-143.nc.res.rr.com] has joined
23:09 < skelterjohn> you can ask any question you like - i'm certainly not
in charge.  i'm just encouraging you to learn how to effectively read
documentation.  it's an important skill
23:10 < millertimek1a2m3> skelterjohn, if you look at the io package, it has
all these functions that take readers and writers; but how in the world do you
initialize a reader?
23:10 < millertimek1a2m3> like...
23:10 < millertimek1a2m3> i just don't understand.  i think it has to do
with the way go uses interfaces, and I'm new to that
23:10 < skelterjohn> io.Reader is an interface
23:10 < skelterjohn> you have to create something that implements taht
23:10 < skelterjohn> what you create, exactly, depends on what you want to
read from
23:11 < millertimek1a2m3> ok, so if I want to create something that opens up
a a file to a .tar.gz file, and prints the files that are in it...
23:12 -!- wrtp [~rog@] has joined #go-nuts
23:12 < millertimek1a2m3> man I just don't understand right now.
23:12 < millertimek1a2m3> i think i'm going to leave you guys alone
23:12 < nickaugust> millertimek1a2m3: i was confused about a lot of that
stuff too
23:12 < nickaugust> but you can just call the functions in the package
23:13 < nickaugust> like for instance I do this in my program:
23:13 < nickaugust> file, err := os.Open("index/locations",
os.O_APPEND|os.O_WRONLY, 0666)
23:13 < nickaugust> then i just use file...  i didnt have to initialize any
reader or anything
23:14 < nickaugust> er rather i assume that was done for me
23:14 < millertimek1a2m3> sorry if I bothered you.  and by the way, I was
reading the docs at the same time I was asking you, I think taht I just don't
understand the interface thing...
23:14 < skelterjohn> no need to get emo - take a look at the example code at
23:14 < nickaugust> heheh
23:14 < skelterjohn> it shows how to iterate through the files in the tar
23:14 < skelterjohn> i don't see how it shows you the file structure within
23:14 < smw> millertimek1a2m3, have you re-read the interface docs in
effective go?
23:15 < millertimek1a2m3> skelterjohn, ah!
23:15 < skelterjohn> but the Next() method returns headers
23:15 < millertimek1a2m3> i didn't even see that
23:15 < millertimek1a2m3> now solves everything
23:15 < millertimek1a2m3> that*
23:15 < skelterjohn> and moves what's being read to the next file int he
23:15 < millertimek1a2m3> smw, I've read them a couple times, not enough to
get it down conceptually though
23:15 < nickaugust> i need to re-read the interface docs too...  im a little
confused about it as well
23:16 < millertimek1a2m3> skelterjohn, yea I was thinking about reading that
off the header and printing it
23:16 -!- exch [~exch@h144170.upc-h.chello.nl] has quit [Ping timeout: 258
23:16 < skelterjohn> that would probably work
23:17 < smw> If I were to add gzip support to http get/post functions, would
that be accepted?
23:17 -!- exch [~exch@h144170.upc-h.chello.nl] has joined #go-nuts
23:18 < smw> I am going to do it as an exercise, I am just curious as to
what go's position is on those types of additions
23:18 < skelterjohn> even if the team doesn't add it into the standard
library, still seems like a useful thing to have around as a 3rd party package
23:18 < skelterjohn> can list it on cat-v
23:19 < smw> skelterjohn, we also need proper cookie support :-P
23:19 < skelterjohn> <- not a web dev
23:19 < smw> skelterjohn, cookie support makes sense for a lib.  gzip
support, if not added, is not really package worthy.
23:20 < smw> skelterjohn, I am not a web dev either :-P
23:20 < skelterjohn> you seem to be doing lots of web devving :)
23:20 < smw> I am talking about client side functions
23:20 < smw> is pulling web pages web dev by your standards
23:21 < skelterjohn> doing stuff with web = web dev
23:21 < skelterjohn> for instance, i do machine learning, and don't use any
http connections to do it
23:22 < skelterjohn> so i consider myself not-web-dev
23:25 -!- millertimek1a2m3 [~Adam@] has quit [Ping timeout: 240
23:27 < saracen> I would say "web dev" is more about creating web
applications.  I wouldnt give the name to somebody, that for example, created a
download manager in Go
23:28 -!- wrtp [~rog@] has quit [Quit: wrtp]
23:28 < nickaugust> oh youre all web dev get over it :P
23:28 < skelterjohn> fields and subfields, etc
23:29 < nickaugust> i made a sweet animated gif does that count as web dev
23:30 -!- wrtp [~rog@] has joined #go-nuts
23:30 < saracen> Depends how sweet it was
23:30 -!- gabriel9 [~gabriel9@] has quit [Read error: Connection
reset by peer]
23:32 -!- gabriel9 [~gabriel9@] has joined #go-nuts
23:33 -!- wrtp [~rog@] has quit [Client Quit]
23:33 -!- tensorpudding [~user@] has quit [Remote host closed the
23:38 -!- rlab [~Miranda@] has quit [Read error: Connection reset by
23:40 -!- hstimer [~hstimer@] has joined #go-nuts
23:48 < plexdev> http://is.gd/e507p by [Alex Brainman] in 2 subdirs of
go/src/pkg/ -- fix windows build
23:49 -!- Venom_X [~pjacobs@] has quit [Quit: Venom_X]
23:54 -!- Innominate [~sirrobin@cpe-076-182-074-143.nc.res.rr.com] has quit [Read
error: No route to host]
23:54 -!- hstimer [~hstimer@] has quit [Quit: hstimer]
23:54 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has quit [Quit:
23:55 -!- hstimer [~hstimer@] has joined #go-nuts
23:55 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has joined
23:55 -!- Project_0125 [~Marvin@dynamic-adsl-94-36-180-250.clienti.tiscali.it] has
quit [Quit: E se abbasso questa leva che succ...]
--- Log closed Fri Aug 06 00:00:05 2010