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

--- Log opened Mon Nov 23 00:00:29 2009
00:02 < Amaranth> jordyd: although a Go-style API for GTK+ would be pretty
much what GTK+ looks like already
00:02 -!- engla [n=ulrik@wikipedia/Sverdrup] has quit [Read error: 110 (Connection
timed out)]
00:02 < Amaranth> Except you'd want to wrap the functions in methods and
define interfaces
00:03 -!- wubo [n=quassel@m335a36d0.tmodns.net] has joined #go-nuts
00:03 -!- gigatropolis [n=chatzill@c-24-6-103-242.hsd1.ca.comcast.net] has joined
#go-nuts
00:03 -!- FeyyazEsat [n=feyyazes@85.108.1.207] has joined #go-nuts
00:03 -!- mbarkhau [n=koloss@p54A7FFEB.dip.t-dialin.net] has quit ["Leaving."]
00:04 -!- mbarkhau [n=koloss@p54A7FFEB.dip.t-dialin.net] has joined #go-nuts
00:04 < hector> i'd much rather define and use portable-style interfaces -
gtk, qt etc.  are too specific...
00:04 -!- mbarkhau [n=koloss@p54A7FFEB.dip.t-dialin.net] has quit [Client Quit]
00:05 < shoafb> right, well, second question, does anybody care...
00:07 -!- engla [n=ulrik@90-229-231-23-no153.tbcn.telia.com] has joined #go-nuts
00:08 < Amaranth> hector: you want wxwidgets then
00:08 < exch> is it just me being dilusional or was a recursive struct
reference ok up until the last sync?
00:09 < jordyd> Amaranth: What I mean is that a binding should not resemble
the native language's binding.  It should only have the same effect.  Design a
"GoGUI" without GTK+ in mind, then give functionality via GTK+.  For example, the
Go version of GTK+ would make use of channels instead of callbacks.  It would make
it speedier and more flexible.
00:09 < Amaranth> jordyd: hrm, that's not really possible
00:09 < jordyd> Amaranth: Why not?
00:09 < hector> Amaranth: wxwidgets reminds me too much of mfc, and not in a
good way
00:09 < Amaranth> jordyd: Without just using GDK and Cairo instead of GTK+
itself
00:09 < Amaranth> hector: That's really the point of it
00:10 < Amaranth> jordyd: Because you can't use a GtkButton and a QButton
the same way and no amount of API layered on top can change that fact
00:10 < exch> > type A struct{ a A; } b := A{};
00:10 < rndbot> <Error: fatal error: dowidth any>
00:10 < Amaranth> heck, Qt and GTK+ use completely layout systems
00:10 < jordyd> Amaranth: Qt uses native calls on Windows and Mac nowadays.
00:11 < XniX23> exch: is that possible?
00:11 < exch> apparently not
00:11 < exch> I can swear I did it yesterday and it was fine
00:11 < Amaranth> jordyd: But it doesn't use native widgets, it uses the
native widget API to draw custom widgets using the native style
00:12 < exch> > type A struct{ a []A;} b := A{};
00:12 < rndbot> <Error: fatal error: dowidth any>
00:12 < exch> that is doable
00:12 < exch> probably because []A is a completely different type..  still
00:13 < XniX23> type A struct { a A; }; b:= new(A);
00:13 < exch> you can't even get that compiled
00:13 < exch> "invalid recursive type Node"
00:14 < XniX23> i guess you need to create a clone of struct and use it
inside lol
00:14 < exch> ><
00:14 < XniX23> there there
00:15 < exch> this is pretty annoying tbh.  You can't define a field
'parent' of the same type
00:15 < exch> which makes creating some parent/child tree structure a pain
in the ass.
00:15 < jordyd> Amaranth: I see what you mean.  I still argue that GoGUI
should not be designed around a binding, though a direct GTK+ binding and a
separate GoGUI binding can live in peace.
00:15 < fosho> make it a pointer
00:16 < exch> hmm.  let's see if that works
00:16 < Amaranth> That reminds me, how does wrapping a C library work
anyway?  Does your program end up linking to it dynamically?
00:16 < exch> ah good
00:16 < XniX23> type A struct { a := new(A); } b:=new(A); fmt.Println(b);
00:17 < XniX23> > type A struct { a := new(A); } b:=new(A);
fmt.Println(b);
00:17 < rndbot> <Error: syntax error near a, syntax error near b, empty
top-level declaration>
00:17 < XniX23> ehhh exch how did you do it?
00:17 < Amaranth> > type A struct { a := new(A); } b:=new(A);
00:17 < rndbot> <Error: syntax error near a, syntax error near b, empty
top-level declaration>
00:17 < Amaranth> heh
00:17 < exch> type Node struct { Parent *Node; }
00:17 < exch> that seems to work
00:17 < Amaranth> > type A struct { a *A; } b:=new(A);
00:18 < rndbot> <no output>
00:18 < Amaranth> neat
00:19 < XniX23> oh cool
00:19 < XniX23> but a *A is the same as a:=new(A)
00:19 -!- Tuller [n=Tuller@pool-72-84-246-12.rcmdva.fios.verizon.net] has joined
#go-nuts
00:19 < exch> ya
00:20 < exch> you are doing := new(A) inside the struct definition though
00:20 < Amaranth> XniX23: but you can't do that inside a struct definition,
can you?
00:20 < exch> that doesn't work :)
00:20 -!- westymatt_ [n=westymat@173-17-254-31.client.mchsi.com] has joined
#go-nuts
00:20 < XniX23> ohhh i didnt know that
00:20 < XniX23> so the ":=" doesnt work in structs?
00:21 < XniX23> or is it that it cant create A inside A?
00:21 < XniX23> probably the latter
00:21 < exch> > type A struct{ p *A; } b := new(A); b.p = b; /* recursion
ftw!  */ fmt.Printf("%v", b);
00:21 < westymatt_> lol yeah i would imagine
00:21 < rndbot> &{0xb75e03f8}
00:22 < exch> the := bit doesn't work inside struct definitions
00:22 < exch> neither does =
00:23 < exch> > type A struct{ p *A; } b := new(A); b.p = b;
fmt.Printf("%#v", *b);
00:23 < rndbot> main.A·1{p:(*main.A·1)(0xb77a53f8)}
00:23 -!- shoafb [n=The_Doct@cpe-98-150-247-183.hawaii.res.rr.com] has quit
["Leaving..."]
00:24 < clip9> How does the GC handle circular references anyway?  This
sometimes bit me in Perl.
00:25 -!- twhitbeck [n=tim@pool-74-109-232-37.pitbpa.fios.verizon.net] has quit
[Read error: 113 (No route to host)]
00:25 < Amaranth> > fmt.Println("Hello 世界");
00:25 < rndbot> Hello 世界
00:25 < Amaranth> :D
00:25 < Amaranth> poor windows users are probably seeing little blocks right
now
00:25 < exch> I don't think it does very well with circular references
00:25 -!- skyyy [n=caw@cpe-24-58-178-87.twcny.res.rr.com] has quit [Client Quit]
00:26 -!- aarapov [n=aarapov@r11mq202.net.upc.cz] has quit ["Leaving."]
00:26 < Amaranth> The current GC is apparently a simple naive mark and sweep
thing
00:26 < Amaranth> It has no knowledge of Go specifically
00:26 -!- drusepth` [n=drusepth@adsl-76-194-201-178.dsl.spfdmo.sbcglobal.net] has
joined #go-nuts
00:27 < exch> It's very good whit recursive function calls to ^^ It ate up
all 6gb of my ram in about 5 seconds flat yesterday
00:27 < exch> a new GC is in the works
00:27 < Amaranth> Yeah, that and the goroutine scheduler are going to be the
two biggest things to get right and the two things that will most affect
performance
00:28 < exch> > f:=func(f func()){ f(); }; f();
00:28 < rndbot> <Error: not enough arguments to CALL>
00:28 < exch> > f:=func(f func()){ f(f); }; f(f);
00:28 < rndbot> <Error: too many arguments to CALL, cannot use f (type
func(f func())) as type func() in function argument>
00:29 -!- alathon [n=Martin@89.236.10.201] has left #go-nuts []
00:29 < XniX23> exch: so i actually cant set a default value in struct?
00:29 < exch> > func f(f func()){ f(f); }; f(f);
00:29 < rndbot> <Error: syntax error near f, syntax error near f, empty
top-level declaration>
00:29 -!- timmcd [n=Adium@97-117-100-106.slkc.qwest.net] has joined #go-nuts
00:29 < clip9> Perl uses reference counting so it leaks if there are
circular references.  Mark and sweep should handle them.  I don't rember much from
CS101 :P
00:29 < exch> XniX23: nope
00:29 < Amaranth> clip9: It doesn't seem like it would be too much work to
make a reference counted system that handled circular dependencies though
00:29 -!- timmcd [n=Adium@97-117-100-106.slkc.qwest.net] has left #go-nuts []
00:29 -!- boscop [n=unknown@78.55.5.161] has quit ["leaving"]
00:30 < exch> > func f(){ f(); }; f();
00:30 < rndbot> <Error: syntax error near f, syntax error near f, empty
top-level declaration>
00:30 < exch> hmm
00:30 < Amaranth> weird, I would expect that to work
00:31 -!- idemal [n=idemal@penzance.fohost.net] has joined #go-nuts
00:32 < clip9> Amaranth: well yeah.  the "solution" in Perl is using weaken
:P
00:32 < _roland> hi all, I am very new t go and I'm trying to open a file
for read acces.I am using this syntax: file, err := os.File.Open(fileName,
os.O_WRONLY | os.O_CREAT, 0777); but I get the error: "type os.File is not an
expression".  Can someone explain?
00:32 < exch> it's os.Open();
00:33 < exch> WRONLY and CREAT flags are for writing thuogh.  Not reading :)
00:33 < _roland> exch: err...writ access , sorry bout that.  Thanks!
00:33 < exch> :)
00:33 -!- decriptor [n=decripto@174-23-163-211.slkc.qwest.net] has joined #go-nuts
00:34 < Amaranth> > func f(){ f(); }
00:34 < rndbot> <Error: syntax error near f, syntax error near f>
00:34 < Amaranth> huh
00:34 -!- hector [n=chatzill@client-86-0-126-58.nrth.adsl.virginmedia.com] has
quit [Read error: 113 (No route to host)]
00:35 < exch> i'm guessing it's becayse the code you type here is placed
inside a func main() {} by the bot
00:35 < exch> a func definition in there is not allowed
00:35 -!- hector [n=chatzill@client-86-0-126-58.nrth.adsl.virginmedia.com] has
joined #go-nuts
00:36 < exch> Annonymous functions should work
00:36 < _roland> exch: ah, now i see...even though
http://golang.org/pkg/os/#File.Open lists n beneath the header for the File type,
it is not declared as a method of File...I missed that
00:36 < _roland> " lists Open"
00:36 < exch> > f:=func(x int){ fmt.Printf("num: %d", x); } f(12);
00:36 < rndbot> <Error: syntax error near f>
00:36 -!- drusepth`` [n=drusepth@adsl-75-50-51-226.dsl.spfdmo.sbcglobal.net] has
joined #go-nuts
00:37 < exch> > f:=func(x int){ fmt.Printf("num: %d", x); }; f(12);
00:37 < rndbot> num: 12
00:37 < exch> yay
00:38 -!- diltsman_ [n=diltsman@64.122.18.77] has joined #go-nuts
00:38 < exch> > f:=func(x int){ fmt.Printf("num: %d", x); f(x+1) }; f(1);
00:38 < rndbot> <Error: undefined: f>
00:39 -!- ikke [n=1kk3@unaffiliated/ikkebr] has quit []
00:39 < exch> > f(1); } func f(x int){ fmt.Printf("num: %d", x); f(x+1);
}
00:39 < rndbot> <Error: syntax error near 1>
00:41 < exch> > f(); } func f(){ f();
00:41 < rndbot> <Error: Statements not contained>
00:41 -!- xjih78 [i=z0r0@90.154.213.217] has quit [Read error: 113 (No route to
host)]
00:41 -!- xjih78 [i=z0r0@90.154.213.217] has joined #go-nuts
00:46 -!- bogen [n=bogen@cpe-76-186-22-145.tx.res.rr.com] has joined #go-nuts
00:47 -!- path[l] [n=path@115.240.79.145] has quit [Read error: 110 (Connection
timed out)]
00:49 -!- diltsman_ [n=diltsman@64.122.18.77] has quit []
00:51 -!- drusepth` [n=drusepth@adsl-76-194-201-178.dsl.spfdmo.sbcglobal.net] has
quit [Read error: 110 (Connection timed out)]
00:56 -!- diltsman [n=diltsman@64.122.18.77] has joined #go-nuts
00:57 -!- TankND [n=thomaszi@EV1-DSL-74-83-9-175.fuse.net] has quit [Read error:
131 (Connection reset by peer)]
01:00 -!- decriptor [n=decripto@174-23-163-211.slkc.qwest.net] has quit
["Ex-Chat"]
01:01 -!- TankND [n=thomaszi@74.83.9.175] has joined #go-nuts
01:05 -!- hector [n=chatzill@client-86-0-126-58.nrth.adsl.virginmedia.com] has
quit [Read error: 113 (No route to host)]
01:05 -!- BMeph [n=black_me@65.103.151.24] has quit [Read error: 110 (Connection
timed out)]
01:06 -!- drusepth [n=drusepth@adsl-75-50-51-226.dsl.spfdmo.sbcglobal.net] has
joined #go-nuts
01:11 -!- travisbrady [n=tbrady@98.210.155.175] has quit []
01:12 -!- XniX23 [n=XniX23@89-212-198-49.dynamic.dsl.t-2.net] has quit [Read
error: 145 (Connection timed out)]
01:13 -!- drusepth`` [n=drusepth@adsl-75-50-51-226.dsl.spfdmo.sbcglobal.net] has
quit [Read error: 145 (Connection timed out)]
01:15 < jordyd> What does "struct size calculation error" mean?
01:17 < exch> you getting that from cgo?
01:17 < jordyd> Yes.
01:17 < exch> hmm
01:18 -!- KindOne [n=lol@h58.45.28.71.dynamic.ip.windstream.net] has quit []
01:18 -!- KindOne [n=lol@h58.45.28.71.dynamic.ip.windstream.net] has joined
#go-nuts
01:19 -!- KindOne [n=lol@h58.45.28.71.dynamic.ip.windstream.net] has quit [Remote
closed the connection]
01:21 -!- paulproteus [i=paulprot@rose.makesad.us] has joined #go-nuts
01:22 -!- drusepth` [n=drusepth@adsl-75-50-51-226.dsl.spfdmo.sbcglobal.net] has
joined #go-nuts
01:22 -!- mesenga [n=cbacelar@20150131219.user.veloxzone.com.br] has joined
#go-nuts
01:23 -!- triplez [n=triplez@cm52.sigma225.maxonline.com.sg] has quit []
01:23 -!- brrant [n=John@168-103-78-133.hlrn.qwest.net] has joined #go-nuts
01:24 -!- mesenga [n=cbacelar@20150131219.user.veloxzone.com.br] has quit [Client
Quit]
01:24 -!- skammer_ [n=skammer@79.139.142.29] has quit [Remote closed the
connection]
01:25 -!- BMeph [n=black_me@65.103.151.24] has joined #go-nuts
01:27 -!- cylix [n=frederic@occm-15.static.grp1-rng1.tnmmrl.infoave.net] has quit
["bye"]
01:31 -!- Tuller [n=Tuller@pool-72-84-246-12.rcmdva.fios.verizon.net] has quit
["apparently i'm sleepy?"]
01:32 -!- Associat0r [n=Associat@h163153.upc-h.chello.nl] has joined #go-nuts
01:34 -!- drusepth [n=drusepth@adsl-75-50-51-226.dsl.spfdmo.sbcglobal.net] has
quit [Read error: 110 (Connection timed out)]
01:37 -!- TankND [n=thomaszi@74.83.9.175] has quit [Read error: 131 (Connection
reset by peer)]
01:38 -!- mitchellh1 [n=mitchell@71.231.140.22] has joined #go-nuts
01:43 -!- mxcl [n=mxcl@94-193-125-246.zone7.bethere.co.uk] has quit [Read error:
104 (Connection reset by peer)]
01:44 -!- TankND [n=thomaszi@EV1-DSL-74-83-9-175.fuse.net] has joined #go-nuts
01:46 -!- mitchellh [n=mitchell@c-98-232-95-245.hsd1.wa.comcast.net] has quit
[Read error: 145 (Connection timed out)]
01:46 -!- ericmoritz\0 [n=ericmori@76.123.248.214] has joined #go-nuts
01:47 -!- nightmouse [n=scheiber@c-69-247-77-241.hsd1.nm.comcast.net] has quit
["Ex-Chat"]
01:50 -!- mxcl [n=mxcl@94-193-125-246.zone7.bethere.co.uk] has joined #go-nuts
01:50 -!- strick9 [n=safetytr@69.169.140.67.provo.static.broadweavenetworks.net]
has joined #go-nuts
01:52 -!- triplez [n=triplez@bb116-14-66-219.singnet.com.sg] has joined #go-nuts
01:57 -!- jorendorff [n=jorendor@c-76-22-141-17.hsd1.tn.comcast.net] has quit
[Read error: 104 (Connection reset by peer)]
01:57 -!- jorendorff [n=jorendor@c-76-22-141-17.hsd1.tn.comcast.net] has joined
#go-nuts
01:58 -!- drusepth` [n=drusepth@adsl-75-50-51-226.dsl.spfdmo.sbcglobal.net] has
quit [Read error: 110 (Connection timed out)]
02:01 -!- General1337 [n=support@71.84.247.187] has joined #go-nuts
02:04 -!- loureiro [n=loureiro@201008193018.user.veloxzone.com.br] has quit [Read
error: 60 (Operation timed out)]
02:06 -!- General13372 [n=support@71-84-247-187.dhcp.gldl.ca.charter.com] has quit
[Read error: 60 (Operation timed out)]
02:09 -!- TankND [n=thomaszi@EV1-DSL-74-83-9-175.fuse.net] has quit [Read error:
54 (Connection reset by peer)]
02:10 -!- triplez [n=triplez@bb116-14-66-219.singnet.com.sg] has quit [Remote
closed the connection]
02:10 -!- TankND [n=thomaszi@EV1-DSL-74-83-9-175.fuse.net] has joined #go-nuts
02:10 -!- triplez [n=triplez@bb116-14-66-219.singnet.com.sg] has joined #go-nuts
02:15 -!- Associat0r [n=Associat@h163153.upc-h.chello.nl] has quit []
02:16 -!- hipe [n=hipe@pool-74-108-181-155.nycmny.east.verizon.net] has quit [Read
error: 104 (Connection reset by peer)]
02:16 -!- hipe [n=hipe@pool-74-108-181-155.nycmny.east.verizon.net] has joined
#go-nuts
02:19 -!- gnibbler_ [n=duckman@124-168-32-15.dyn.iinet.net.au] has joined #go-nuts
02:21 -!- TankND [n=thomaszi@EV1-DSL-74-83-9-175.fuse.net] has quit [Remote closed
the connection]
02:21 -!- Tuller [n=Tuller@pool-72-84-246-12.rcmdva.fios.verizon.net] has joined
#go-nuts
02:22 -!- Tuller [n=Tuller@pool-72-84-246-12.rcmdva.fios.verizon.net] has quit
[Client Quit]
02:22 -!- _roland [i=52d7208e@gateway/web/freenode/x-lfznsxsvzikogicz] has quit
["Page closed"]
02:22 -!- tsuwabuki [n=tsuwabuk@60.237.112.140] has joined #go-nuts
02:27 -!- hiromtz_ [n=hiromtz@KD118152131119.ppp-bb.dion.ne.jp] has joined
#go-nuts
02:28 -!- FeyyazEsat [n=feyyazes@85.108.1.207] has left #go-nuts []
02:30 -!- gnibbler [n=duckman@203-217-89-231.dyn.iinet.net.au] has quit [Read
error: 101 (Network is unreachable)]
02:30 < spikebike> 5
02:30 < spikebike> x := new([maxsize]int);
02:30 < spikebike> bw.go:8: invalid array bound maxsize
02:30 -!- ssmall [n=stuart@cpe-76-187-182-52.tx.res.rr.com] has joined #go-nuts
02:31 -!- ssmall [n=stuart@cpe-76-187-182-52.tx.res.rr.com] has left #go-nuts []
02:31 < spikebike> ideas?
02:31 -!- engla [n=ulrik@wikipedia/Sverdrup] has left #go-nuts []
02:31 < uriel> spikebike: is maxsize a const?
02:31 < spikebike> no
02:31 < spikebike> does it need to be?
02:32 < uriel> there you have your problem
02:32 < uriel> well, but then you wouldn't have to use new() obviously
02:32 < spikebike> you can't dynamically allocate a variable sized array?
02:32 < uriel> you need to pass the size to new
02:32 < spikebike> how?
02:33 < spikebike> maxsize isn't good enough?
02:33 -!- Fraeon [n=kzer-za@e212-246-65-153.elisa-laajakaista.fi] has quit []
02:33 < uriel> er, nevermind, I'm not awayke
02:33 < uriel> er awake (can't even type)
02:33 -!- scarabx [n=scarabx@c-24-147-239-120.hsd1.ma.comcast.net] has joined
#go-nuts
02:34 < uriel> you need to use make
02:34 -!- Kniht [n=kniht@c-68-58-17-177.hsd1.in.comcast.net] has quit [Read error:
110 (Connection timed out)]
02:34 < uriel> and a slice
02:34 < uriel> or maybe I'm more confused thant you
02:34 < uriel> make([]T, length, capacity)
02:34 < uriel> that gives you a slice of a new array
02:35 < spikebike> ah, strange
02:35 < spikebike> I'm used to use new for arrays
02:35 -!- hiromtz [n=hiromtz@KD118152131119.ppp-bb.dion.ne.jp] has quit [Read
error: 145 (Connection timed out)]
02:35 < spikebike> while would I want a slide of a new array?
02:35 < exch> len(slice) gives you current length.  cap(slice) gives you
it's maximum capacity (size of underlying array).
02:35 < exch> slices are references to data structures.  they are very cheap
and easy to handle
02:36 < spikebike> I just want a new array of size maxsize of ints
02:36 < exch> also offer some funky extra functionality you don't have with
arrays
02:36 < spikebike> slices seem cool and all I just don't want them
02:36 < spikebike> (for this)
02:36 < exch> arr := [10]int{}; <- that is a real array..  note that you
can't use a variable for it's size though.
02:37 < spikebike> whats the difference between length and capacity
02:37 < exch> well.  Go doesn't really want you to use arrays :p
02:37 < spikebike> so make allows for dynamically allocated arrays?
02:37 < spikebike> ah
02:37 < uriel> spikebike: the capacity is the size of the underlying array
02:37 < exch> length is the current size of the slice.  capacity is the
maximum size of the underlying data structure..  a slice can;t grow larger than
that
02:37 -!- strick9 [n=safetytr@69.169.140.67.provo.static.broadweavenetworks.net]
has quit [Read error: 113 (No route to host)]
02:38 -!- loureiro [n=loureiro@201.8.199.240] has joined #go-nuts
02:38 < spikebike> so length can = capacity?
02:38 < uriel> yes
02:38 < exch> ya
02:38 < spikebike> works for me
02:38 < uriel> but length can't be > capacity
02:39 < spikebike> so what is new for compared to make?
02:39 < uriel> actually I think you can omit the capacity and it will be the
same as len
02:39 < uriel> spikebike: new is for your own types for the most part
02:39 < spikebike> ah, that makes sense
02:40 -!- mizai [n=mizai@rhou-164-107-213-187.resnet.ohio-state.edu] has joined
#go-nuts
02:40 -!- tor7 [n=tor@c-987a71d5.04-50-6c756e10.cust.bredbandsbolaget.se] has quit
[]
02:40 < uriel> you make chansmslices and maps
02:40 < uriel> er chans, slices and maps
02:40 * uriel really should head back to bed
02:40 < spikebike> can I say x := make(int64,1000)?
02:40 -!- JoNaZ [n=jonaz@user77.77-105-229.netatonce.net] has joined #go-nuts
02:41 < uriel> I'm not sure that makes sense...
02:41 < JoNaZ> how can i open serial?  /dev/ttyUSB0 etc...
bufio.NewReader(....) ?
02:41 < uriel> JoNaZ: I guess the same way you open any other file, or is
unix more brothen than I thought this days?
02:41 < spikebike> well make usually returns a pointer right?
02:42 < exch> new() returns a pointer
02:42 < spikebike> ch := make(chan int);
02:42 < exch> spikebike: arr := make([]int64, 1000); <- that's possible
02:42 < spikebike> that makes ch a pointer to a new channel?
02:43 < spikebike> exch is that an array of int64s?
02:43 < exch> yes
02:43 < spikebike> or an array of int64 pointers?
02:43 < exch> a slice really
02:43 < exch> but it allocates the underlying data structure for you
02:43 < uriel> spikebike: all this is covered in the tutorial for the most
part: http://golang.org/doc/go_tutorial.html
02:44 < spikebike> I'll reread it but the array vs non array, make vs new,
and related seemed less than obvious
02:44 -!- zidoh_ [n=bjornar@pyrrophlagalon.nithia.net] has joined #go-nuts
02:44 < Ycros> spikebike: think of make as a constructor function for the
built-in types
02:44 < spikebike> especially the concept of not being able to allocate a
dynamic array directly
02:44 < Ycros> spikebike: whereas new is just a plain memory allocator
02:44 < spikebike> k, it's starting to make sense, thanks
02:45 -!- zidoh [n=bjornar@pyrrophlagalon.nithia.net] has quit [Read error: 104
(Connection reset by peer)]
02:45 -!- jordyd [n=jordyd@99-177-65-75.lightspeed.wepbfl.sbcglobal.net] has quit
[Read error: 110 (Connection timed out)]
02:45 < exch> you can allocate a dynamic size list with make().  it's a
slice instead of an array, but it's use is the same.
02:47 < spikebike> basically I'm trying to port a c code I wrote that tests
1->N threads of memory sizes 1->M
02:47 < spikebike> basically graphs the performance of the various caches
and main memory
02:49 -!- jordyd [n=jordyd@99-177-65-75.lightspeed.wepbfl.sbcglobal.net] has
joined #go-nuts
02:50 < exch> when your dealing with c, the one thing to keep in mind is
that Go pointers are not really the same as C pointers.  Specifically the lack of
pointer arithmatic.  an int pointer (*int) in go is just a pointer to 1 int.  In c
that can be a pointer to a list of ints.  Go doesn't allow you to do that.
02:51 < exch> Which can be a bit of a pain when you are interfacing with c
code and yuo need to convert these lists back and forth between c and go
02:51 < spikebike> yeah got the no pointer math and the like
02:51 < spikebike> I'm relatively used to java and python
02:54 -!- jordyd [n=jordyd@99-177-65-75.lightspeed.wepbfl.sbcglobal.net] has quit
[]
02:55 -!- jordyd [n=jordyd@99-177-65-75.lightspeed.wepbfl.sbcglobal.net] has
joined #go-nuts
02:58 -!- andresambrois [n=aa@r190-135-128-68.dialup.adsl.anteldata.net.uy] has
joined #go-nuts
02:59 < woofer2> Whats Go's equivalent for C's "scanf" command?
02:59 < ehird> None.
03:02 < woofer2> Pity.
03:02 -!- scarabx [n=scarabx@c-24-147-239-120.hsd1.ma.comcast.net] has quit ["This
computer has gone to sleep"]
03:04 -!- diltsman [n=diltsman@64.122.18.77] has quit []
03:04 -!- binjunk_ [n=ron@adsl-76-212-133-89.dsl.sndg02.sbcglobal.net] has joined
#go-nuts
03:05 -!- binjunk_ [n=ron@adsl-76-212-133-89.dsl.sndg02.sbcglobal.net] has quit
["I SAID GOOD DAY!!!"]
03:05 -!- aa [n=aa@r190-135-143-14.dialup.adsl.anteldata.net.uy] has quit [Read
error: 60 (Operation timed out)]
03:07 -!- binjunk_ [n=ron@adsl-76-212-133-89.dsl.sndg02.sbcglobal.net] has joined
#go-nuts
03:10 -!- diltsman [n=diltsman@64.122.18.77] has joined #go-nuts
03:11 -!- drusepth [n=drusepth@adsl-75-50-51-226.dsl.spfdmo.sbcglobal.net] has
joined #go-nuts
03:11 -!- Amaranth [n=travis@ubuntu/member/Amaranth] has quit [Read error: 60
(Operation timed out)]
03:12 -!- diltsman [n=diltsman@64.122.18.77] has quit [Client Quit]
03:12 -!- itrekkie [n=itrekkie@72.200.106.163] has joined #go-nuts
03:19 < hstimer> how do you turn a []byte into a string?
03:19 < spikebike> if x := make([]int64,maxsize);
03:19 < spikebike> is legal does that mean in := make([]chan
in64,maxthreads)
03:19 < spikebike> is as well?
03:19 -!- itrekkie [n=itrekkie@72.200.106.163] has quit []
03:20 < spikebike> and if so is in[0] a valid channel or just a pointer of
type chan in64?
03:21 -!- diltsman [n=diltsman@64.122.18.77] has joined #go-nuts
03:21 -!- path[l] [n=path@115.240.25.44] has joined #go-nuts
03:21 -!- westymatt_ [n=westymat@173-17-254-31.client.mchsi.com] has quit
["Leaving"]
03:21 < exch> it's a valid channel
03:21 < exch> you are creating maxthreads number of channels with that
03:22 < spikebike> cool
03:22 < chrome> hstimer: http://golang.org/pkg/bytes/
03:22 < spikebike> thought I might have to run for i := 0; i < 4; i++ {
in[i] = make(chan int64);
03:22 < spikebike> or something like that
03:22 < exch> str := string(bytearray);
03:23 < hstimer> chrome: thanks
03:23 < hstimer> exch: ah...  very simple, thank you
03:23 -!- Kniht [n=kniht@c-68-58-17-177.hsd1.in.comcast.net] has joined #go-nuts
03:24 < exch> the reverse is less simple unfortunately :p bytearray :=
strings.Bytes("foobar");
03:25 < exch> hmm.  does any kind of text that gets loaded from a file into
a go string, converted to UTF8?
03:30 < hstimer> good question.  I wonder how you convert to utf8 from other
formats.
03:30 < goplexian> hmm..  something is weird here, I wrote a simple script
to calculate the prime factors of a number and now I'm refactoring the program and
now it seems to take hundreds of times longer
03:31 < goplexian> does go have a way to profile code?
03:32 < exch> not that I am aware of
03:32 -!- delsvr [n=delsvr@cpe-67-242-41-219.twcny.res.rr.com] has quit []
03:35 < directrixx> goplexian: http://golang.org/cmd/prof/
03:36 < goplexian> directrixx, thanks :)
03:37 -!- Killerkid [n=l1am9111@host81-154-218-114.range81-154.btcentralplus.com]
has quit [Read error: 110 (Connection timed out)]
03:40 -!- shoafb [n=The_Doct@cpe-98-150-247-183.hawaii.res.rr.com] has joined
#go-nuts
03:40 -!- mizai [n=mizai@rhou-164-107-213-187.resnet.ohio-state.edu] has quit
[Success]
03:41 -!- KindOne [n=lol@h58.45.28.71.dynamic.ip.windstream.net] has joined
#go-nuts
03:42 -!- path[l] [n=path@115.240.25.44] has quit [Read error: 110 (Connection
timed out)]
03:43 -!- KindOne [n=lol@h58.45.28.71.dynamic.ip.windstream.net] has quit [Client
Quit]
03:46 -!- nigwil [n=chatzill@berkner.ccamlr.org] has quit ["ChatZilla 0.9.85
[Firefox 3.5.5/20091102152451]"]
03:47 -!- twhitbeck [n=tim@pool-74-109-232-37.pitbpa.fios.verizon.net] has joined
#go-nuts
03:48 -!- dbruns [n=dbruns@173-27-224-32.client.mchsi.com] has joined #go-nuts
03:49 < dbruns> i'm trying to install Go on my mac OSX 10.6 and its been
suck on --- cd ../test for almost 5 minutes..  is this normal?
03:51 -!- mizai [n=mizai@164.107.141.200] has joined #go-nuts
03:53 -!- mitchellh1 [n=mitchell@71.231.140.22] has quit ["Leaving."]
03:53 < exch> one of the test cases may be a bit borked
03:54 -!- marciofss [n=marciofs@189.105.1.36] has joined #go-nuts
03:54 < dbruns> so
03:54 < dbruns> can i just ctrl+c on it?
03:55 < exch> probably best.  Or check a process manager to see what's
running so long.  to be sure
03:55 < exch> If it's a test, you can just abort it
03:55 < dbruns> http://www.pastie.org/710742
03:56 < exch> ah that's good
03:56 < dbruns> good?
03:57 < exch> that output
03:57 < exch> it shows the tests have finisged
03:57 < exch> that's usually the last piece of text yuo see after building
everything
03:58 -!- mycroftiv [n=drabgah@h69-128-47-245.mdsnwi.dedicated.static.tds.net] has
quit [Read error: 110 (Connection timed out)]
03:59 < dbruns> it came up after i did ctrl+c about 10 times
04:00 -!- dbruns [n=dbruns@173-27-224-32.client.mchsi.com] has quit []
04:00 -!- mycroftiv [n=infernus@h69-128-47-243.mdsnwi.dedicated.static.tds.net]
has joined #go-nuts
04:04 -!- tav [n=tav@78.147.249.190] has quit []
04:04 -!- mitchellh [n=mitchell@c-98-232-95-245.hsd1.wa.comcast.net] has joined
#go-nuts
04:04 -!- arquebus [n=sdf@201.139.156.133.cable.dyn.cableonline.com.mx] has joined
#go-nuts
04:06 -!- ehird [n=ehird@91.105.114.252] has quit []
04:07 -!- s_mosher [n=smosher@bas1-ottawa10-1279302916.dsl.bell.ca] has quit
[Remote closed the connection]
04:08 -!- timmcd [n=Adium@97-117-100-106.slkc.qwest.net] has joined #go-nuts
04:10 -!- s_mosher [n=smosher@76.64.157.4] has joined #go-nuts
04:10 -!- halfdan_ [n=halfdan@p57A94AFD.dip.t-dialin.net] has joined #go-nuts
04:10 -!- jordyd [n=jordyd@99-177-65-75.lightspeed.wepbfl.sbcglobal.net] has quit
[]
04:11 -!- jordyd [n=jordyd@99-177-65-75.lightspeed.wepbfl.sbcglobal.net] has
joined #go-nuts
04:12 -!- Amaranth [n=travis@ubuntu/member/Amaranth] has joined #go-nuts
04:13 -!- amacleod [n=amacleod@c-24-34-33-96.hsd1.ma.comcast.net] has joined
#go-nuts
04:14 -!- gnomon
[n=gnomon@CPE0022158a8221-CM000f9f776f96.cpe.net.cable.rogers.com] has quit
["graphics hardware wedged, sigh"]
04:15 < hstimer> hmmm....  xml library is kind of bare bones
04:15 -!- me___ [n=venkates@c-68-55-179-48.hsd1.md.comcast.net] has quit [Read
error: 110 (Connection timed out)]
04:15 -!- Omei [n=chatzill@99-178-130-115.lightspeed.sndgca.sbcglobal.net] has
joined #go-nuts
04:16 -!- StDan [n=danielb@124-197-59-227.callplus.net.nz] has quit [Remote closed
the connection]
04:17 < Omei> Noob question: How do I convert a string to an integer, say
int32?
04:17 < timmcd> check the strconv pkg
04:17 < Omei> ty
04:17 < timmcd> I believe it is golang.org/pkg/strconv ^_^
04:18 -!- mejja [n=user@c-49b6e555.023-82-73746f38.cust.bredbandsbolaget.se] has
quit [Remote closed the connection]
04:20 -!- zerofluid [n=zeroflui@72.208.216.68] has joined #go-nuts
04:21 -!- diltsman [n=diltsman@64.122.18.77] has quit []
04:21 < exch> I made me an xmlx package that extends the standard xnml lib
with some extra feeatures.
04:22 < exch> it creates a node tree which can be searched both ways and has
some single/multi-node search functions.  Also has some convenient load/save
functions for various sources
04:23 < exch> now if github just starts working already, I may actually be
able to share it -.-
04:23 * exch kicks it in the nads
04:23 -!- binjunk_ [n=ron@adsl-76-212-133-89.dsl.sndg02.sbcglobal.net] has quit
["I SAID GOOD DAY!!!"]
04:23 -!- StDan [n=danielb@124-197-59-227.callplus.net.nz] has joined #go-nuts
04:23 -!- drusepth` [n=drusepth@75.50.51.226] has joined #go-nuts
04:24 < exch> yay.  http://github.com/jteeuwen/go-pkg-xmlx
04:24 < jordyd> exch: Perhaps you could submit it for review.  See if it can
get into the standard libraries.
http://golang.org/doc/contribute.html#Introduction
04:25 < exch> yea I considered that, but my packages usually take a little
while to mature
04:25 -!- wubo [n=quassel@m335a36d0.tmodns.net] has quit [Read error: 110
(Connection timed out)]
04:25 -!- timmcd [n=Adium@97-117-100-106.slkc.qwest.net] has left #go-nuts []
04:25 < exch> bug fixes, extra features etc
04:25 < exch> for now, I'll settle for uriel listing it on his site
04:26 < exch> Now i can finish my Atm/rss feed package :)
04:26 < exch> *atom
04:27 < Ycros> exch: oh that's neat
04:27 -!- halfdan [n=halfdan@p57A96F77.dip.t-dialin.net] has quit [Read error: 110
(Connection timed out)]
04:28 -!- drusepth [n=drusepth@adsl-75-50-51-226.dsl.spfdmo.sbcglobal.net] has
quit [Read error: 110 (Connection timed out)]
04:31 < exch> well what do ya know..  6:30am.  for got to sleep again :s
work in 3 houts
04:32 < Ycros> exch: better than my xml library, hmm
04:32 < exch> it's really simple, but it does what I need it to do
04:32 < exch> a full xpath implementation would be nice
04:32 -!- arquebus [n=sdf@201.139.156.133.cable.dyn.cableonline.com.mx] has quit
[Read error: 104 (Connection reset by peer)]
04:34 < Ycros> exch: yeah.  I wrote one, but all mine does so far is
generate basic xml, but I might switch to yours.  I'm going to build an xmlrpc
library on top
04:35 < exch> cool :)
04:35 < exch> if you can use it, by all means
04:35 < uriel> exch: added
04:35 < uriel> xpath?  *yuck*
04:36 < exch> oh here we go :p
04:36 < exch> I know you hate xml :)
04:36 < exch> in fact you pretty much everything I love :)
04:36 < uriel> 'hate' doesn't quite say how I feel about xml
04:36 < exch> *you hate
04:36 < exch> hehe
04:36 < Ycros> exch: xpath support would be fantastic - though I personally
don't need it right now
04:37 -!- andresambrois [n=aa@r190-135-145-233.dialup.adsl.anteldata.net.uy] has
joined #go-nuts
04:37 < exch> I do agree many things are better off in JSON, but
unfotunately most of the services and businesses out there don't agree with that
sentiment yet..  Simply ignoring them isntt really an option :)
04:38 < jordyd> uriel: What's wrong with XML?
04:38 < exch> don't get him started!
04:38 < exch> :p
04:38 < uriel> jordyd: everything?
04:39 < uriel> I can't think of a single thing about xml that is right..
04:39 -!- skyyy [n=caw@cpe-24-58-178-87.twcny.res.rr.com] has joined #go-nuts
04:39 < jordyd> uriel: Well, how do you think it /should/ be?
04:39 < uriel> (and I was using xml and xslt in the late 90's, so I know a
thing or two about the pain it causes, I used to think it was quite great, god how
wrong I was)
04:39 < exch> not at all I 'm guessing :p
04:39 < jordyd> exch: I was thinking the same :)
04:40 < uriel> jordyd: there are a billion different ways it could be, that
depends on the problem you are trying to solve
04:40 < exch> xslt is a nightmare
04:40 < uriel> exch: that is quite an understatement
04:40 < jordyd> I am fairly unfamiliar with XML.
04:40 < uriel> jordyd: but if you want something that is as general as xml
(which is not usually a good thing, but...), json and sexprs are infinitely better
than xml and better in every way possible
04:41 < Ycros> xslt is special
04:41 < uriel> jordyd: try to write an standard compliant xml parser some
day, that will show you how 'great' xml is
04:41 < Ycros> "special"
04:41 < uriel> Ycros: like pretty much everything xml related, SOAP?  XML
Schema?  ....
04:42 < uriel> xml manages to merge the worst of both human and computer
unreadability
04:42 < exch> a parser that processes well formed xml is pretty easy.
Hacking in all those DTD's and namespaces takes it to another level though
04:42 < uriel> exch: you got to be kidding me
04:42 < exch> not rly
04:42 < jordyd> See, you lost me when you said "sexprs", and I was hanging
by a thread when you said "json".
04:42 < uriel> exch: a parser that processes well formed xml is not easy,
the smallest ones count in the tens of thousands of lines of code
04:42 < exch> pff
04:43 < uriel> exch: look at the expat source some day
04:43 < exch> your doing it wrong then :p
04:43 < jordyd> Oh! sexprs, what Lisp uses.
04:43 < uriel> exch: show me anyone doing it right then
04:43 < uriel> exch: writting a half assed pseudo-xml parser is trivial,
writting one that can handle any standard xml file is not
04:43 < exch> I'll try :p
04:43 < spikebike> throw: all goroutines are asleep - deadlock!
04:43 < spikebike> doh
04:44 < uriel> (and what is the point of having a standard that most people
don't implement completely?)
04:44 < jordyd> uriel: Perhaps an sexprs library is in order for go, then.
04:44 < exch> spikebike: it's late.  let em sleep
04:44 < uriel> jordyd: that would be nice, and quite easy to implement
actually, I might do it myself
04:44 < uriel> anyway, this is offtopic, so this is the last I will say
about xml: http://harmful.cat-v.org/software/xml/
04:46 < spikebike> anyone know of a go mode for vim yet?
04:46 -!- BMeph [n=black_me@65.103.151.24] has left #go-nuts []
04:46 < uriel> spikebike: misc/vim/
04:46 -!- BMeph [n=black_me@65.103.151.24] has joined #go-nuts
04:46 < jordyd> spikebike: There is syntax highlighting.
04:46 < jordyd> spikebike: $GOROOT/misc/vim
04:47 < jordyd> Oh, beat me to it.
04:47 < spikebike> ah, nice, thanks
04:47 < uriel> also see http://go-lang.cat-v.org/text-editors
04:47 -!- awishformore [n=awishfor@78.141.152.48] has joined #go-nuts
04:47 -!- mizai [n=mizai@164.107.141.200] has quit [Success]
04:48 < jordyd> uriel: How would Ward Cunningham be done in sexprs?
04:49 < Ycros> uriel:
http://stuffthathappens.com/blog/2008/10/01/dirty-soap/
04:50 -!- Wiz126 [i=Wiz126@72.20.219.49] has quit [Connection timed out]
04:50 -!- mizai [n=mizai@rhou-164-107-213-187.resnet.ohio-state.edu] has joined
#go-nuts
04:51 -!- The_Ball [n=The_Ball@123-2-12-83.static.dsl.dodo.com.au] has quit [Read
error: 110 (Connection timed out)]
04:52 -!- aa [n=aa@r190-135-128-68.dialup.adsl.anteldata.net.uy] has quit [Read
error: 110 (Connection timed out)]
04:52 -!- aa__ [n=aa@r190-135-137-100.dialup.adsl.anteldata.net.uy] has joined
#go-nuts
04:54 -!- andresambrois [n=aa@r190-135-145-233.dialup.adsl.anteldata.net.uy] has
quit [Read error: 60 (Operation timed out)]
04:56 < spikebike> is there a printf % for identifying the basics about an
object
04:56 < spikebike> somewhat like %p?
04:57 < spikebike> trying to debug a function that doesn't seem to be handed
what I expect
04:58 < exch> %v prints the object's fields.  can be extended with %+v and
%#v
04:58 < exch> dunno if that is what you need
04:58 < spikebike> cool, sounds helpful
04:58 < exch> %#v basically prints the full Go syntax representation of the
object
04:58 -!- skyyy [n=caw@cpe-24-58-178-87.twcny.res.rr.com] has quit [Client Quit]
04:58 -!- diltsman_ [n=diltsman@64.122.18.77] has joined #go-nuts
04:59 < exch> > type A struct{ a int; b string; } a:=A{123,"foo"};
fmt.Printf("%#v", a);
04:59 < rndbot> main.A·1{a:123, b:"foo"}
05:00 < spikebike> excellent, thanks
05:00 < spikebike> ah 4 goroutines are alive and making progress
05:01 -!- mow [i=curmudge@mom.nu] has quit [Read error: 104 (Connection reset by
peer)]
05:02 -!- brrant [n=John@168-103-78-133.hlrn.qwest.net] has quit ["Leaving"]
05:03 -!- hipe|dinner [n=hipe@pool-74-108-181-155.nycmny.east.verizon.net] has
quit [Read error: 54 (Connection reset by peer)]
05:03 -!- drusepth [n=drusepth@adsl-75-6-4-15.dsl.spfdmo.sbcglobal.net] has joined
#go-nuts
05:03 -!- hipe [n=hipe@pool-74-108-181-155.nycmny.east.verizon.net] has joined
#go-nuts
05:04 < spikebike> woohoo it runs...  channels are very cool
05:04 < spikebike> much nicer than playing games with static variables
05:04 < exch> channels are nice
05:04 -!- marciofss [n=marciofs@189.105.1.36] has quit []
05:04 -!- drusepth` [n=drusepth@75.50.51.226] has quit [Read error: 145
(Connection timed out)]
05:05 -!- mpurcell [n=mpurcell@vpn.michaelpurcell.info] has quit [Client Quit]
05:06 -!- drusepth` [n=drusepth@adsl-75-6-4-15.dsl.spfdmo.sbcglobal.net] has
joined #go-nuts
05:06 -!- sp0rk [n=havok@64.81.53.28] has joined #go-nuts
05:06 -!- sp0rk [n=havok@64.81.53.28] has left #go-nuts ["Leaving"]
05:06 -!- mow [i=curmudge@mom.nu] has joined #go-nuts
05:17 -!- Gracenotes [n=person@wikipedia/Gracenotes] has joined #go-nuts
05:18 < Gracenotes> whew.  now that I've submitted my project, I can finally
work on Go stuff >_<
05:18 < Gracenotes> that was intense.  ish.
05:20 < uriel> welcome back Gracenotes
05:20 < Gracenotes> :)
05:20 < exch> Ycros: I added some functions to node.go.  They allow you yo
easily get attribute values as string/int/int32/int64/float/float64/etc
05:21 < exch> also one that returns true/false depending on if an attribute
exists or not
05:22 -!- amacleod [n=amacleod@c-24-34-33-96.hsd1.ma.comcast.net] has quit ["Bye
Bye"]
05:23 < Ycros> exch: neat, I'm going to write a simple xml serialiser for my
xmlrpc stuff - so I can do things like: serverProxy.Call("methodName", x, y, z);
05:24 < exch> nice
05:24 -!- drusepth [n=drusepth@adsl-75-6-4-15.dsl.spfdmo.sbcglobal.net] has quit
[Read error: 110 (Connection timed out)]
05:26 < Ycros> I haven't thought about an xmlrpc server yet though, since
all I'm looking at doing at the moment is intefacing with a remote xmlrpc server
05:26 < Ycros> so, I'll just do a client for now which should be simple
enough
05:27 -!- djanderson [n=dja@hltncable.pioneerbroadband.net] has quit [Client Quit]
05:27 < alexsuraci> what is the purpose of having print() and println()
"built in"?  how do they function differently from fmt.Print/fmt.Println?
05:28 < exch> they don't support formatting like "%s" stuff
05:28 < exch> probably just for debugging so you don't have to import fmt
all the time
05:28 < alexsuraci> right, fmt.Print doesn't either
05:28 < alexsuraci> just found the blurb on them in the spec
05:28 < exch> rightty
05:29 < alexsuraci> http://golang.org/doc/go_spec.html#Bootstrapping
05:29 < alexsuraci> so they may go away down the line
05:29 < exch> bummer
05:29 < alexsuraci> i'm glad, they seem kind of oddball
05:29 < alexsuraci> makes sense why they're there, though
05:30 -!- jordyd [n=jordyd@99-177-65-75.lightspeed.wepbfl.sbcglobal.net] has quit
[Read error: 110 (Connection timed out)]
05:31 < exch> I use println only for quickly printing some stuff for
debugging
05:31 < alexsuraci> putting this noobish bash function here in case anyone
finds it useful when tinkering in go: http://paste.pocoo.org/show/152376/
05:31 < alexsuraci> usage: go <name of file.go, without the .go>
05:31 < alexsuraci> change 6* if needed obviously
05:32 -!- hipe [n=hipe@pool-74-108-181-155.nycmny.east.verizon.net] has quit [Read
error: 104 (Connection reset by peer)]
05:33 -!- hipe [n=hipe@pool-74-108-181-155.nycmny.east.verizon.net] has joined
#go-nuts
05:42 < General1337> hey
05:42 < General1337> the Time is updating very slow for time.LocalTime()
05:43 < quag> hi uriel
05:43 -!- scandal [n=nobody@unaffiliated/scandal] has quit ["leaving"]
05:44 < General1337> t
05:44 -!- droid001 [n=g1@p4FDCDC68.dip.t-dialin.net] has quit [Read error: 60
(Operation timed out)]
05:45 -!- droid0011 [n=g1@p4FDCD3A2.dip.t-dialin.net] has joined #go-nuts
05:45 -!- twhitbeck [n=tim@pool-74-109-232-37.pitbpa.fios.verizon.net] has quit
[Read error: 60 (Operation timed out)]
05:46 -!- Null-A [n=jason@c-76-21-4-0.hsd1.ca.comcast.net] has joined #go-nuts
05:46 -!- Null-A [n=jason@c-76-21-4-0.hsd1.ca.comcast.net] has left #go-nuts []
05:46 * spikebike digs in the docs for getop like functionality
05:51 -!- KillerX [n=anant@59.92.156.131] has joined #go-nuts
05:51 < spikebike> the golang.org search is rather pathetic
05:53 < spikebike> semrelease/semacquire say don't use them, use the
synchronization library
05:53 -!- josh [n=josh@c-67-177-6-66.hsd1.ut.comcast.net] has left #go-nuts []
05:53 < spikebike> which of course it not searchable
05:57 -!- bennabi [n=bennabi@41.104.81.201] has joined #go-nuts
05:57 < uriel> spikebike: http://go-lang.cat-v.org/go-search
05:58 < uriel> anyway, you want the flag package
05:58 < spikebike> google.com site:golang.org helps ;-)
05:58 -!- Intelliware [n=danielb@124-197-59-227.callplus.net.nz] has joined
#go-nuts
05:59 < spikebike> oh sync?  Just found http://golang.org/pkg/sync/
05:59 < spikebike> For everyone complaining that it is impossible to search
for Go docs and info.
05:59 * spikebike chuckles
05:59 < spikebike> oh for getopt, thanks.
06:00 < KirkMcDonald> I wrote a command-line option parser, too.
06:02 < KirkMcDonald> http://code.google.com/p/optparse-go/
06:02 < uriel> the custom search engine includes a few things more than
site:golang.org, but both should work most of the time
06:02 < KirkMcDonald> Though, uh, I guess I should write docs for it.
06:02 < uriel> KirkMcDonald: I think I'm missing that one from the list of
go libs, right?
06:02 * uriel checks
06:02 < spikebike> I was looking for a semaphore to sync 4 threads to the
same place before releasing
06:02 < spikebike> which seems somewhat illegal
06:02 < KirkMcDonald> uriel: What list?
06:03 < uriel> KirkMcDonald: this one http://go-lang.cat-v.org/pure-go-libs
06:03 < uriel> but it was there already :)
06:04 -!- Odemia [n=Odemia-D@207.47.143.154] has joined #go-nuts
06:05 -!- oklofok [n=oklopol@a91-153-117-208.elisa-laajakaista.fi] has joined
#go-nuts
06:08 -!- andresj [n=andresj@c-98-248-57-165.hsd1.ca.comcast.net] has quit [Remote
closed the connection]
06:08 -!- hiromtz_ [n=hiromtz@KD118152131119.ppp-bb.dion.ne.jp] has quit [Read
error: 110 (Connection timed out)]
06:09 -!- Omei [n=chatzill@99-178-130-115.lightspeed.sndgca.sbcglobal.net] has
quit [Read error: 60 (Operation timed out)]
06:09 -!- drusepth [n=drusepth@75.6.4.15] has joined #go-nuts
06:11 -!- drusepth` [n=drusepth@adsl-75-6-4-15.dsl.spfdmo.sbcglobal.net] has quit
[Read error: 110 (Connection timed out)]
06:11 -!- mkanat [n=mkanat@c-67-188-1-39.hsd1.ca.comcast.net] has joined #go-nuts
06:14 -!- Intelliware [n=danielb@124-197-59-227.callplus.net.nz] has quit [Remote
closed the connection]
06:17 -!- StDan [n=danielb@124-197-59-227.callplus.net.nz] has quit [Read error:
110 (Connection timed out)]
06:19 -!- Odemia [n=Odemia-D@207.47.143.154] has quit [Remote closed the
connection]
06:19 -!- diltsman_ [n=diltsman@64.122.18.77] has quit []
06:20 -!- Intelliware [n=danielb@124-197-59-227.callplus.net.nz] has joined
#go-nuts
06:21 -!- bennabi [n=bennabi@41.104.81.201] has left #go-nuts []
06:22 -!- maacl [n=mac@0x573526c8.virnxx17.dynamic.dsl.tele.dk] has quit []
06:23 -!- directrixx [n=aleksand@ip68-231-189-247.tc.ph.cox.net] has quit [Read
error: 110 (Connection timed out)]
06:25 -!- Odemia [n=Odemia-D@207.47.143.154] has joined #go-nuts
06:27 -!- zerofluid [n=zeroflui@72.208.216.68] has quit ["Leaving"]
06:28 -!- slashus2 [n=slashus2@74-137-26-8.dhcp.insightbb.com] has joined #go-nuts
06:35 -!- glasshead [n=chatzill@ip68-8-225-187.sd.sd.cox.net] has joined #go-nuts
06:35 -!- developer09 [n=develope@bas3-toronto02-1279400602.dsl.bell.ca] has
joined #go-nuts
06:35 -!- mizai [n=mizai@rhou-164-107-213-187.resnet.ohio-state.edu] has quit
[Remote closed the connection]
06:38 -!- snearch [n=olaf@g225048013.adsl.alicedsl.de] has joined #go-nuts
06:41 -!- The_Ball [n=The_Ball@123-2-12-83.static.dsl.dodo.com.au] has joined
#go-nuts
06:48 -!- triplez [n=triplez@bb116-14-66-219.singnet.com.sg] has quit []
06:50 -!- triplez [n=triplez@bb116-14-66-219.singnet.com.sg] has joined #go-nuts
06:52 -!- developer09 [n=develope@bas3-toronto02-1279400602.dsl.bell.ca] has left
#go-nuts []
06:59 -!- goplexian [n=acombas@d154-20-0-9.bchsia.telus.net] has quit ["Ex-Chat"]
07:00 -!- fultilt [n=steve@netblock-66-159-209-175.dslextreme.com] has joined
#go-nuts
07:00 < spikebike> hrm
07:00 < spikebike> anyone know if go has a global interpreter lock like
python
07:01 -!- Anders__ [n=Anders@c83-253-2-206.bredband.comhem.se] has joined #go-nuts
07:01 -!- drusepth` [n=drusepth@adsl-75-6-4-15.dsl.spfdmo.sbcglobal.net] has
joined #go-nuts
07:01 -!- zerofluid [n=zeroflui@ip72-208-216-68.ph.ph.cox.net] has joined #go-nuts
07:02 -!- jabb [i=475e1fa6@gateway/web/freenode/x-gyfxahspudaaeyrx] has quit [Ping
timeout: 180 seconds]
07:02 < bogen> go is not an interpreter
07:04 < spikebike> ok, umm, global runtime lock then
07:05 -!- path[l] [n=path@59.162.86.164] has joined #go-nuts
07:06 < spikebike> oh maybe all the threads are bound the the same cpu?
07:07 -!- drusepth [n=drusepth@75.6.4.15] has quit [Read error: 145 (Connection
timed out)]
07:08 < spikebike> ah
07:08 < spikebike> looks like gccgo is parallel and will use multiple CPUs
07:08 < spikebike> but 6g is if not single threaded then only runs on a
single cpu
07:09 < exch> you need to tell it to use more than 1 core/cpu
07:09 < spikebike> how?
07:09 < exch> runtime.GOMAXPROCS(2)
07:09 < exch> that'll make it use 2
07:09 < spikebike> oh, funky
07:09 < exch> put in as many as you want/have
07:09 < spikebike> gccgo must default to 4
07:09 < spikebike> 6g seems to default to 1
07:09 -!- lulzmonkey [n=lulzmonk@122.175.69.246] has quit [Read error: 104
(Connection reset by peer)]
07:09 -!- lulzmonkey [n=lulzmonk@122.175.69.246] has joined #go-nuts
07:10 < exch> that function call will likely be removed at some point
according to the docs.  i'm guessing they'll go for something more automated
07:10 -!- Guest55438 [n=aelaguiz@204.57.79.2] has quit [Remote closed the
connection]
07:10 -!- Guest55438 [n=aelaguiz@204.57.79.2] has joined #go-nuts
07:11 < spikebike> Kinda surprised it schedules/binds and doesn't just leave
it to the OS
07:11 < spikebike> then again a goroutine != thread
07:12 < sqweek> right, there may be many goroutines in a single kernel proc
07:13 -!- DotMethod [n=mike@priv.efnet.pe] has quit [Read error: 110 (Connection
timed out)]
07:14 < spikebike> Nice
07:14 < spikebike> 1 thread 4MB array = 4.3GB/sec
07:14 < spikebike> 4 threads accessing 4MB array = 16GB/sec
07:16 < spikebike> 1 thread 40MB array 3.4GB/sec
07:16 < spikebike> 4 thread 40MB array 3.7GB/sec
07:18 -!- trickie [n=trickie@94.100.112.225] has joined #go-nuts
07:21 -!- eno__ [n=eno@adsl-70-137-158-9.dsl.snfc21.sbcglobal.net] has quit [Read
error: 60 (Operation timed out)]
07:22 -!- Adys [n=Adys@unaffiliated/adys] has quit [Remote closed the connection]
07:25 -!- eno [n=eno@nslu2-linux/eno] has joined #go-nuts
07:26 -!- teedex [n=teedex@204.14.155.161] has joined #go-nuts
07:27 -!- glasshead [n=chatzill@ip68-8-225-187.sd.sd.cox.net] has quit ["ChatZilla
0.9.85 [Firefox 3.0.15/2009101601]"]
07:28 -!- slashus2 [n=slashus2@74-137-26-8.dhcp.insightbb.com] has quit []
07:29 -!- crashR [n=crasher@codextreme.pck.nerim.net] has joined #go-nuts
07:32 -!- mkanat [n=mkanat@c-67-188-1-39.hsd1.ca.comcast.net] has quit ["Bye!"]
07:39 -!- aarapov [n=aarapov@nat/redhat/x-eequbucgspdzhjaa] has joined #go-nuts
07:41 -!- oklofok [n=oklopol@a91-153-117-208.elisa-laajakaista.fi] has quit [Read
error: 104 (Connection reset by peer)]
07:42 -!- oklofok [n=oklopol@a91-153-117-208.elisa-laajakaista.fi] has joined
#go-nuts
07:44 -!- drusepth` [n=drusepth@adsl-75-6-4-15.dsl.spfdmo.sbcglobal.net] has quit
[Read error: 60 (Operation timed out)]
07:45 < spikebike> *grrr, I think I broke the go parser
07:45 < spikebike> or maybe used a reserved keyword (impossible?)
07:45 < spikebike> oh
07:45 < spikebike> oops
07:46 < spikebike> extra ":"
07:47 -!- oklokok [n=oklopol@a91-153-117-63.elisa-laajakaista.fi] has joined
#go-nuts
07:49 < uriel> heh
07:50 < spikebike> it said it wasn't used, despite several uses
07:50 < spikebike> because I had stomped on the var declaration with a :=
07:50 < spikebike> heh gccgo does not like runtime.GOMAXPROCS(4);
07:51 < spikebike> bw.go:(.text+0x6fb): undefined reference to
`runtime.GOMAXPROCS'
07:52 -!- knave [n=kn4ve@dsl-240-171-194.telkomadsl.co.za] has joined #go-nuts
07:53 < spikebike> should I file a ticket/issue that either 6g shouldn't
need it or gccgo should allow it?
07:54 < spikebike> or maybe ask for something so disgusting they fix it
07:55 < spikebike> #ifdef _runtime_6g
07:55 < spikebike> ;-)
07:55 -!- jdp [n=gu@75.97.120.11] has joined #go-nuts
07:57 < uriel> spikebike: heh
07:57 < uriel> spikebike: fill an issue about it
07:58 < spikebike> ok
07:58 < spikebike> will do
08:01 -!- snearch [n=olaf@g225048013.adsl.alicedsl.de] has quit ["Ex-Chat"]
08:02 -!- snake [n=snake@cardinal.sura.ru] has joined #go-nuts
08:03 < snake> Hello.  Is it possible to write a kind of 'generic' wrapper
for functions that return (result, err) pairs.  So that I say something like:
08:04 < snake> do_sage(fd.Read, myslice) and it just ensures that slice is
read or it panics
08:04 < snake> do_safe I meant
08:04 -!- zum [n=jsykari@xdsl-83-150-88-4.nebulazone.fi] has joined #go-nuts
08:08 < uriel> snake: probably you can do something like that using the
empty interface, but I'm not sure it is a very good idea
08:08 < uriel> if you are going to panic, better be explicit
08:08 -!- oklofok [n=oklopol@a91-153-117-208.elisa-laajakaista.fi] has quit [Read
error: 113 (No route to host)]
08:09 -!- KillerX [n=anant@gentoo/developer/KillerX] has quit ["Leaving."]
08:11 < snake> I do not really going to panic.  But coming from python I
simply lack the exceptions.  I would like operation either fail loudly or success
silently.  So I don't have to check for error value each time
08:12 < snake> So my idea is to write a 'error checker' once and then just
wrap any (_, err) returning function into it
08:15 < uriel> 'if' is your error checker
08:15 < uriel> if x, ok := bar(); ok { ....  }
08:15 -!- V1psta [i=Vipsta@unaffiliated/v1psta] has quit []
08:16 < uriel> (or if you want to panic, do !ok { panic() }
08:16 < uriel> pretty simple reaslly
08:16 -!- GeoBSD [n=geocalc@lns-bzn-22-82-249-82-89.adsl.proxad.net] has joined
#go-nuts
08:17 -!- Kniht [n=kniht@c-68-58-17-177.hsd1.in.comcast.net] has quit [Read error:
110 (Connection timed out)]
08:17 -!- path[l] [n=path@59.162.86.164] has quit []
08:19 -!- mxcl [n=mxcl@94-193-125-246.zone7.bethere.co.uk] has quit [Remote closed
the connection]
08:23 -!- jA_cOp [n=yakobu@ti0043a380-3093.bb.online.no] has joined #go-nuts
08:24 -!- Perberos [n=Perberos@190.49.53.219] has joined #go-nuts
08:27 -!- kaigan|work
[n=kaigan@c-8290e255.1411-10-64736c14.cust.bredbandsbolaget.se] has joined
#go-nuts
08:29 < spikebike> is
08:29 < spikebike> in := make([]chan int64, maxthreads);
08:29 < spikebike> equiv to
08:29 < spikebike> for i = 0; i < maxthreads ; i++ { in[i] = make(chan
int64);
08:29 < spikebike> }
08:30 -!- npe [n=npe@94-224-251-223.access.telenet.be] has joined #go-nuts
08:30 < spikebike> the scary part is I get a segfault if I don't have both
08:31 < sqweek> is the first one not allocating space for the array, then
the loop allocating each channel?
08:32 < jA_cOp> The first creates a slice of chan int64 with maxthreads
number of entries
08:32 < spikebike> ah thats why I can't skip the first
08:32 < spikebike> not sure why I can't skip the second though
08:32 < jA_cOp> you really should be able to, it does nothing (useful)
08:33 < spikebike> with both the code runs well and uses the channels a fair
bit
08:34 < spikebike> if I comment out the second I just get segmentation
faults
08:34 < spikebike> hrm, I should try 6g
08:35 < jA_cOp> when using make to create a slice, it allocates an array for
you and returns a slice of the entire array
08:35 < jA_cOp> so it should work fine with just the first as far as I can
see
08:35 < jA_cOp> strange that it segfaults...
08:36 < spikebike> ya, I'm puzzled
08:36 < spikebike> maxthreads is a const, maybe make doesn't like consts?
08:37 < spikebike> nope
08:38 < spikebike> can make make pointers to a something instead of the
actual thing?
08:38 < spikebike> i.e.  an array of chan int64 pointers
08:39 < spikebike> the goal is just a variable size array of chan int64s
08:42 -!- hipe [n=hipe@pool-74-108-181-155.nycmny.east.verizon.net] has quit [Read
error: 54 (Connection reset by peer)]
08:43 -!- hipe [n=hipe@pool-74-108-181-155.nycmny.east.verizon.net] has joined
#go-nuts
08:45 -!- asmo [n=asmo@c83-248-96-173.bredband.comhem.se] has joined #go-nuts
08:46 -!- zerofluid [n=zeroflui@ip72-208-216-68.ph.ph.cox.net] has quit
["Leaving"]
08:48 -!- p0g0 [n=pogo@unaffiliated/p0g0] has quit [Read error: 145 (Connection
timed out)]
08:53 < snake> chan must be made with make.  slice must be made with make as
well.  So I actually see it quite logical that you have to run make for each
*makeable* thing
08:53 -!- p0g0 [n=pogo@unaffiliated/p0g0] has joined #go-nuts
08:54 -!- hector [n=chatzill@client-86-0-126-58.nrth.adsl.virginmedia.com] has
joined #go-nuts
08:54 < snake> you create a slice of chans w/o actually initalising the
chans
08:54 < snake> or rather you do initialise them with the loop
08:54 < spikebike> ah, so I do need both
08:54 < spikebike> so the first creates pointers and the second initialized
them?
08:54 < snake> I'm a complete newbie in Go btw :) 2 hours in it
08:55 < snake> first creates and array and gives you slice of it
08:55 < jA_cOp> There are no uninitialized variables in Go
08:55 < snake> but array contain just nils instead of actual chans
08:55 < jA_cOp> when you initialize an array, which make for slices does,
all members are initialized
08:55 < snake> yeah, you can't get unitialised variable.
08:55 < snake> However chan w/o make will give you nil which isn't a proper
chan
08:56 < jA_cOp> ah, indeed, it's initialized to nil
08:56 < spikebike> heh, cool
08:56 < spikebike> my codes actually correct ;-)
08:58 -!- path[l] [n=path@59.162.86.164] has joined #go-nuts
09:01 -!- tav [n=tav@78.147.249.190] has joined #go-nuts
09:09 < spikebike> wow, color me impressed
09:09 < spikebike> I have a threaded program that beats the hell out of the
memory system from l1 to main memory from 1-N threads
09:10 < spikebike> my Go implementation matches C from main memory, through
L2
09:10 -!- npe [n=npe@94-224-251-223.access.telenet.be] has quit []
09:10 < spikebike> for some reason I get zero speedup in L1
09:10 -!- delsvr [n=delsvr@cpe-67-242-41-219.twcny.res.rr.com] has quit []
09:14 -!- Sylvain_ [i=d4528311@gateway/web/freenode/x-nttawxoumnvdvbsq] has joined
#go-nuts
09:14 -!- c0nfl|ct [n=tiago@83.240.182.65] has joined #go-nuts
09:23 -!- raichoo [n=raichoo@129.70.164.219] has joined #go-nuts
09:25 -!- droid0011 [n=g1@p4FDCD3A2.dip.t-dialin.net] has quit [Read error: 104
(Connection reset by peer)]
09:26 -!- droid001 [n=g1@p4FDCD3A2.dip.t-dialin.net] has joined #go-nuts
09:27 < spikebike> http://broadley.org/bill/CvsGO.png
09:28 < dagle2> But go threads are not real threads right?  They just look
like threads and work like them.
09:30 < uriel> dagle2: go has no threads
09:30 < uriel> go has goroutines
09:30 < uriel> which the current implementations happen to multiplex to
threads, as needed...
09:31 < dagle2> Oki.
09:31 < dagle2> That was what I meant.
09:31 < uriel> you can have thousands of goroutines with a single OS thread
09:31 < uriel> go will take care of moving goroutines that block on io or
whatever to new threads if needed
09:32 -!- Alkavan [n=alkavan@IGLD-84-229-217-156.inter.net.il] has joined #go-nuts
09:32 < dagle2> Cool.
09:33 < spikebike> I verified it was keeping all cores busy (on a quad core)
09:35 -!- simonz05 [n=simon@84.49.89.143] has joined #go-nuts
09:35 -!- c0nfl|ct [n=tiago@83.240.182.65] has quit [Read error: 104 (Connection
reset by peer)]
09:50 -!- hector [n=chatzill@client-86-0-126-58.nrth.adsl.virginmedia.com] has
quit ["ChatZilla 0.9.85 [Firefox 3.5.5/20091102152451]"]
09:53 -!- deyoda [n=irchon@60-242-168-196.static.tpgi.com.au] has joined #go-nuts
09:54 -!- deyoda [n=irchon@60-242-168-196.static.tpgi.com.au] has quit [Remote
closed the connection]
09:54 -!- deyoda [n=irchon@60-242-168-196.static.tpgi.com.au] has joined #go-nuts
09:57 -!- deyoda [n=irchon@60-242-168-196.static.tpgi.com.au] has quit [Client
Quit]
09:58 -!- deyoda [n=irchon@60-242-168-196.static.tpgi.com.au] has joined #go-nuts
09:59 -!- deyoda [n=irchon@60-242-168-196.static.tpgi.com.au] has quit [Remote
closed the connection]
10:01 -!- assiss [n=assiss@219.143.156.185] has joined #go-nuts
10:02 < assiss> hi all, is there a way to get all keys from a json.Json
type?
10:04 -!- Sylvain_ [i=d4528311@gateway/web/freenode/x-nttawxoumnvdvbsq] has quit
["Page closed"]
10:04 -!- srdjan [n=srdjan@84.88.50.46] has joined #go-nuts
10:04 < nickjohnson> Will taking the address of an array return a slice for
the whole array?
10:04 -!- al-maisan [n=al-maisa@f048066028.adsl.alicedsl.de] has joined #go-nuts
10:06 -!- al-maisan [n=al-maisa@f048066028.adsl.alicedsl.de] has left #go-nuts
["Parting is tough.."]
10:10 -!- lenst [n=user@81-237-244-185-no52.tbcn.telia.com] has joined #go-nuts
10:11 -!- jordyd [n=jordyd@99-177-65-75.lightspeed.wepbfl.sbcglobal.net] has
joined #go-nuts
10:11 -!- ikke [n=ikkibr@unaffiliated/ikkebr] has joined #go-nuts
10:11 -!- XniX23 [n=XniX23@89-212-198-49.dynamic.dsl.t-2.net] has joined #go-nuts
10:12 -!- hector [n=chatzill@client-86-0-126-58.nrth.adsl.virginmedia.com] has
joined #go-nuts
10:15 -!- Sylvain_ [i=d4528311@gateway/web/freenode/x-pgvkcitffqnochgb] has joined
#go-nuts
10:16 -!- mitchellh [n=mitchell@c-98-232-95-245.hsd1.wa.comcast.net] has quit
["Leaving."]
10:16 -!- ponce [n=ponce@paradisia.net] has joined #go-nuts
10:17 -!- assiss [n=assiss@219.143.156.185] has left #go-nuts []
10:18 -!- AlvaroGP [i=Alvaro@89.128.155.68] has joined #go-nuts
10:18 -!- AmirMohammad [n=amir@unaffiliated/gluegadget] has quit [Read error: 54
(Connection reset by peer)]
10:20 -!- AlvaroGP [i=Alvaro@89.128.155.68] has quit [Client Quit]
10:20 -!- shoafb [n=The_Doct@cpe-98-150-247-183.hawaii.res.rr.com] has quit
[Remote closed the connection]
10:24 -!- AmirMohammad [n=amir@213.207.243.252] has joined #go-nuts
10:24 -!- simonz05 [n=simon@84.49.89.143] has quit ["Ex-Chat"]
10:25 -!- knave [n=kn4ve@dsl-240-171-194.telkomadsl.co.za] has quit ["Leaving"]
10:27 -!- hector [n=chatzill@client-86-0-126-58.nrth.adsl.virginmedia.com] has
quit ["ChatZilla 0.9.85 [Firefox 3.5.5/20091102152451]"]
10:33 -!- afurlan [n=afurlan@scorpion.mps.com.br] has joined #go-nuts
10:34 -!- Peter` [n=peter@92.254.21.251] has joined #go-nuts
10:34 -!- Peter- [n=peter@92.254.21.251] has quit [Read error: 145 (Connection
timed out)]
10:35 -!- skammer [n=skammer@79.139.142.29] has joined #go-nuts
10:36 < tav> morning all
10:37 -!- skammer [n=skammer@79.139.142.29] has quit [Read error: 54 (Connection
reset by peer)]
10:38 -!- raichoo [n=raichoo@129.70.164.219] has quit []
10:46 -!- mxcl [n=mxcl@94.193.125.246] has joined #go-nuts
10:48 -!- srdjan [n=srdjan@84.88.50.46] has left #go-nuts []
10:52 -!- hector [n=chatzill@client-86-0-126-58.nrth.adsl.virginmedia.com] has
joined #go-nuts
10:54 -!- Hofanoff [i=hofanoff@78.46.41.143] has joined #go-nuts
10:54 -!- hector [n=chatzill@client-86-0-126-58.nrth.adsl.virginmedia.com] has
quit [Client Quit]
10:56 -!- Peter- [n=peter@92.254.21.251] has joined #go-nuts
10:56 -!- Peter` [n=peter@92.254.21.251] has quit [Read error: 110 (Connection
timed out)]
11:03 -!- AmirMohammad [n=amir@unaffiliated/gluegadget] has quit [Remote closed
the connection]
11:04 -!- AmirMohammad [n=amir@unaffiliated/gluegadget] has joined #go-nuts
11:05 -!- jdp [n=gu@75.97.120.11] has quit []
11:09 -!- fultilt [n=steve@netblock-66-159-209-175.dslextreme.com] has quit
["WeeChat 0.2.6.1"]
11:11 -!- AmirMohammad [n=amir@unaffiliated/gluegadget] has quit [Remote closed
the connection]
11:13 -!- tor7 [n=tor@213.113.122.152] has joined #go-nuts
11:15 -!- Lorthirk [n=cm0901@109.115.36.189] has joined #go-nuts
11:17 -!- AmirMohammad [n=amir@unaffiliated/gluegadget] has joined #go-nuts
11:18 -!- alexf [n=alexf@adsl-99-155-155-181.dsl.klmzmi.sbcglobal.net] has quit
[Read error: 110 (Connection timed out)]
11:19 -!- alexf [n=alexf@99.52.151.178] has joined #go-nuts
11:21 < nickjohnson>
http://blog.notdot.net/2009/11/Implementing-a-DHT-in-Go-part-1 :)
11:24 -!- tor7_ [n=tor@213.113.122.152] has joined #go-nuts
11:24 -!- tor7 [n=tor@213.113.122.152] has quit [Read error: 104 (Connection reset
by peer)]
11:24 < ikke> what's a dht?
11:24 < ikke> dynamic hash table?
11:24 < ikke> distributed :)
11:24 < ikke> almost
11:24 < XniX23> distributed
11:25 -!- triplez [n=triplez@bb116-14-66-219.singnet.com.sg] has quit [Read error:
60 (Operation timed out)]
11:26 -!- Meowtimer [n=meowtime@132.252.242.23] has joined #go-nuts
11:27 < vsmatck> Seems like it'd be easier to implement one in go.  You need
bignum support and networking.
11:28 -!- Will|work [n=wrboyce@sarge.na.nu] has joined #go-nuts
11:28 < vsmatck> I guess I'm thinking "easier" in the sense of not needing
third party libraries like in C/C++.  *shrugs* Maybe unimportant.
11:31 < nickjohnson> vsmatck: You don't really need Go.
11:32 < nickjohnson> er
11:32 < nickjohnson> You don't really need bignums
11:32 < vsmatck> You need to XOR and have <.  XOR is easy and < I'm
not sure.  I've never thought about how to do that without bignum.  :)
11:33 < nickjohnson> < is the same as lexical comparisons on a string -
just compare by byte and return when you encounter a difference
11:33 < nickjohnson> There's an example in my article :)
11:33 < vsmatck> Just figure out which has the highest bit set?  Would tha
twork?
11:33 < vsmatck> ahh!  I gotcha.
11:33 < tav> nickjohnson: hey, good work!
11:33 -!- teedex [n=teedex@204.14.155.161] has quit [Remote closed the connection]
11:33 < nickjohnson> tav: thanks :)
11:34 < nickjohnson> The next post ought to dig into some of the more
interesting details about RPCs and so forth
11:34 < tav> nickjohnson: did you also write a post on hilbert curves
recently ?
11:34 < nickjohnson> tav: yup
11:34 < tav> the design looks similar to ...  ah cool!
11:34 -!- hector [n=chatzill@client-86-0-126-58.nrth.adsl.virginmedia.com] has
joined #go-nuts
11:35 < tav> hadn't seen any references to hilbert curves in years so was
v.happy that someone was onto them!
11:35 < nickjohnson> They're pretty cool alright :)
11:35 < nickjohnson> As the article mentions, it was spawned by a discussion
of indexing at Oredev
11:36 * tav looks at oredev.org
11:37 < tav> (sorry, hadn't read the article — figured i knew what it'd say
;p)
11:37 < nickjohnson> hehe
11:37 < tav> you're a swede ?
11:37 < nickjohnson> The main thing it says that you might not have seen is
a description of a simple way to convert between hilbert coordinates and x,y
coordinates
11:37 < nickjohnson> Nope, I'm a Kiwi living in Ireland
11:37 < nickjohnson> I went to Oredev to talk about App Engine
11:38 < tav> heh, dhts, hilbert curves, app engine, go, python — a decent
set of overlapping interests
11:38 < tav> what'd you talk about ?
11:38 < nickjohnson> Just an introduction to App Engine on Java
11:39 < nickjohnson> Unfortunately, it's a rare venue where I can give
advanced App Engine talks and expect many attendees ;)
11:41 < tav> yeah, I/O is the only event i've seen (watched) any form of
advanced app engine talks
11:42 < tav> but, speaking of app engine, one of my main motivations w.r.t
Go is actually to implement something akin to app engine's datastore
11:42 < nickjohnson> I'm presenting there next year - but I'm still trying
to figure out what my talk should be on ;)
11:42 < nickjohnson> tav: Ooh, do keep us updated.  Non-relational DBs are
one of my great passions.
11:42 < nickjohnson> I was actually planning a series of posts on
log-structured storage for databases, possibly with a Go implementation of it.
11:42 < tav> that'd be cool
11:43 * nickjohnson is an ex-Bigtable-SRE, too, so if you need specific comments,
ask.  :)
11:43 -!- triplez [n=triplez@cm52.sigma225.maxonline.com.sg] has joined #go-nuts
11:44 < tav> oooh, nice — thanks!
11:44 -!- Fraeon [n=kzer-za@e212-246-65-153.elisa-laajakaista.fi] has joined
#go-nuts
11:45 -!- jordyd [n=jordyd@99-177-65-75.lightspeed.wepbfl.sbcglobal.net] has quit
[Read error: 110 (Connection timed out)]
11:45 < tav> taking a slight different approach (from what i know about app
engine's datastore), i.e.  megastore on top of bigtable on top of gfs — but the
end result should be quite similar
11:45 < nickjohnson> *nods*
11:45 < tav> aha, i see you're behind
http://arachnid.github.com/bdbdatastore/
11:46 < nickjohnson> yup
11:46 < nickjohnson> One of the closest things to Bigtable, interface-wise,
is actually BDB
11:48 -!- Fraeon [n=kzer-za@e212-246-65-153.elisa-laajakaista.fi] has quit [Read
error: 104 (Connection reset by peer)]
11:48 < uriel> nickjohnson: very nice, I added your blog to
http://planet5.cat-v.org
11:49 < nickjohnson> Were you intending to write something small-to-medium
scale like BDB, or large-scale like Bigtable?
11:49 < uriel> (re your dht blog post)
11:49 -!- Fraeon [n=kzer-za@e212-246-65-153.elisa-laajakaista.fi] has joined
#go-nuts
11:49 < nickjohnson> uriel: Thanks!  :)
11:49 < nickjohnson> I should add feeds for tags to my blog, so you could
add just the 'go' tag :)
11:51 < uriel> nickjohnson: it is fine, you fit right in with rob's random
weird photos and Renee's drawins ;)
11:52 < uriel> nickjohnson: btw, make your Google I/O talk about Go on App
Engine!  *hint* *hint*
11:52 < nickjohnson> heh
11:53 < nickjohnson> uriel: Heh.  But even if I were going to do that, I
couldn't tell you, could I? ;)
11:53 < uriel> btw, I would *LOVE* a big-table implementation in Go (I don't
have much hope left for Google opensourcing bigtable itself..  )
11:53 < nickjohnson> So even if we assume for a moment that I'm secretly
going to talk about that, then I still need an idea for something else interesting
as cover.  ;)
11:53 < uriel> nickjohnson: I don't want you to tell me, I want you to do it
;P
11:53 * nickjohnson dedicates the next 6 months to first implementing it, then
writing a talk about it, then
11:54 -!- ikke [n=ikkibr@unaffiliated/ikkebr] has quit []
11:54 < uriel> heheheh..
11:54 < nickjohnson> Though TBH, I'm not convinced of Go's applicability to
writing webapps, per-se
11:55 < uriel> well, I think it depends on the kind of web app...
11:55 < uriel> I have some web apps (mostly REST-ful JSON services and the
like) where Go would be *perfect*
11:55 < nickjohnson> Indeed
11:55 < uriel> for building some thing like a content management system,
then perhaps you want to use something else
11:56 < nickjohnson> Though I'd argue that most of those that Go is suitable
for are more a case of services that happen to have HTTP as an interface
11:56 < nickjohnson> As opposed to the sort of webapps App Engine is
designed for
11:56 < uriel> but in every big web project there are some bits of
infrastructure where IMHO would be well suited
11:56 < tav> nickjohnson: sorry, was out for a smoke break
11:56 < scoopr> nickjohnson, like..  wave robots?  :P
11:57 < tav> uriel: hey, nice one on the planet site — you're a true bastion
of the go community!
11:57 < uriel> well, that is true, but this days there are few sites that
just consist of a simple web site with a simple web interface
11:57 < tav> nickjohnson: large-scale like bigtable
11:58 -!- hipe [n=hipe@pool-74-108-181-155.nycmny.east.verizon.net] has quit [Read
error: 104 (Connection reset by peer)]
11:58 < uriel> tav: heh, thanks, just trying to do my bit while I finish to
settle down in my new home and finish some python app engine projects, wish I
could actually sit down and spend some time building a decently sized Go project
instead
11:58 < tav> the base is a p2p overlay network in the lines of chord# which
uses lexicographical ordering as opposed to consistent hashing methods used in
DHTs like kademlia
11:58 -!- ikke [n=ikkibr@unaffiliated/ikkebr] has joined #go-nuts
11:59 -!- hipe [n=hipe@74.108.181.155] has joined #go-nuts
11:59 -!- AmirMohammad [n=amir@unaffiliated/gluegadget] has quit [Read error: 110
(Connection timed out)]
12:00 < tav> the overlay network is then used for a)
appengine-datastore-esque strongly consistent and transactional datastore — using
an optimised form of the paxos commit protocol in conjunction with master leases
and "thruflo" transactions
12:00 < nickjohnson> scoopr: Heh, Wave robots might be an area of overlap,
admittedly.
12:01 < tav> b) a purely in-memory (like redis) memstore which is generated
and kept updated by way of pattern matching sensors
12:01 < nickjohnson> tav: Ambitious!
12:02 < nickjohnson> Hm. Why DHT-based?  And why global transactions as part
of the datastore?
12:02 * nickjohnson isn't familiar with "thruflow transactions", though
12:03 < tav> heh, the ambitious part comes later — getting all of this
bundled in on top of chrome with nacl with an interface to the dom which
implements "coherent reactions"
12:03 -!- Zaba [n=zaba@about/goats/billygoat/zaba] has quit [Read error: 60
(Operation timed out)]
12:04 < nickjohnson> So you want untrusted nodes as part of your network,
then?
12:06 < tav> why an overlay network?  for re-use in many ways — from
partitioning the datastore to allowing for multicast streams
12:06 -!- loureiro [n=loureiro@201.8.199.240] has quit [Remote closed the
connection]
12:07 < nickjohnson> It's just that in environments with central control
available - like your typical deployment of Bigtable - centralized control loses
you nothing, but simplifies a lot.
12:07 -!- skammer [n=skammer@79.139.142.29] has joined #go-nuts
12:07 < tav> ah, i'm interested in generically supporting two different
types of deployments — cloud *and* peer
12:07 < nickjohnson> If you're trying to implement, essentially, a DHT with
bigtable semantics, that's a different matter, of course, and a different set of
requirements
12:08 < tav> the idea being that i should be able to run a node locally, and
communicate with those of my friends as well as use any cloud-based nodes if i
want to
12:08 < uriel> nickjohnson: indeed, I see this in the bittorrent world,
where they claim that now everyone will use DHT, but it was the centralized
trackers that actually made the whole system much simpler and are responsible for
BT's success
12:08 < nickjohnson> I can't see many situations where you'd be happy moving
your database onto a set of untrusted user machines, though.
12:08 < nickjohnson> uriel: indeed.
12:08 < uriel> it is important to know what things to distribution and what
things to centralize
12:09 < uriel> er to distribute
12:09 < nickjohnson> Although trackers are perhaps a bad example now, since
DHTs actually handle their functionality fairly well.
12:09 -!- snearch [n=olaf@g225048013.adsl.alicedsl.de] has joined #go-nuts
12:09 -!- hector [n=chatzill@client-86-0-126-58.nrth.adsl.virginmedia.com] has
quit ["ChatZilla 0.9.85 [Firefox 3.5.5/20091102152451]"]
12:09 < nickjohnson> But one thing I've learned at Google is that often a
little centralized control buys you a lot of simplicity.  :)
12:09 < uriel> nickjohnson: well, perhaps, dhts for bt have been around for
years, and they have yet to take over...
12:09 < uriel> (and there are still many clients out there that don't do
dht, and there are multiple dht standards, each with its own issues...)
12:10 < nickjohnson> uriel: I don't think that's a reflection on the DHTs -
just that they're not a revolutionary improvement, but rather an incremental one.
They're also much more complex to implement.  :)
12:10 < uriel> we will see...  but simplicity is more important than purity
of distribution
12:10 -!- snake_ [n=snake@cardinal.sura.ru] has joined #go-nuts
12:10 < nickjohnson> If a simple DHT had been part of the original spec, I
don't think it would have been a problem, but they weren't very well developed
when BT came out
12:10 -!- Zaba [n=zaba@ip102.148.adsl.wplus.ru] has joined #go-nuts
12:10 < nickjohnson> But yes, I don't really disagree.  :P
12:10 -!- snake [n=snake@cardinal.sura.ru] has quit [Read error: 104 (Connection
reset by peer)]
12:11 < uriel> look at freenet ;)
12:11 < tav> nickjohnson: chord# isn't a DHT btw — it provides a structured
overlay network, but not using DHT-esque hashing
12:11 < uriel> tav: isn't chord# something russ cox worked on at MIT?
12:11 < uriel> (maybe I'm confused, or perhaps it is from the same dept
where he was working)
12:12 -!- AmirMohammad [n=amir@213.207.243.252] has joined #go-nuts
12:12 < nickjohnson> tav: chord#?
12:12 < tav> so, basically by using the overlay network, takes out the need
for having the likes of chubby + gfs
12:12 < nickjohnson> Is that different from 'chord'?
12:12 < nickjohnson> Chord is the one I'm least familiar with
12:12 < tav>
http://www.ist-selfman.org/wiki/images/9/9f/2006-schuett-gp2pc.pdf
12:12 < uriel> nickjohnson: btw, did you get your PB lib for Go?
12:12 < tav> yes, v.different to chord, kademlia, etc.
12:12 < uriel> (or you can't say ;P)
12:12 < nickjohnson> tav: You'll need to implement your own GFS in essence,
then, in order to distribute and replicate the data.  You're talking about an
extremely (ambitious|complicated) system.
12:12 < tav> uriel: it's by some german dudes afaik
12:13 < nickjohnson> tav: Ah. I wasn't talking about chord#, just chord.  :)
12:13 < uriel> tav: ah, then i'm confusing it with something else
12:13 < nickjohnson> uriel: I haven't looked into the internal
implementation.  I'll wait for it to be released externally.
12:13 < uriel> nickjohnson: aha
12:13 < tav> nickjohnson: agreed that it's ambitious — but someone has to do
it!
12:13 < nickjohnson> tav: So how does chord# distribute nodes and do
lookups?
12:14 < tav> otherwise, i just end up working on web apps like
http://www.trustmap.org
12:14 < nickjohnson> tav: I think you'd be better starting with something
simpler and building up from there
12:14 < tav> agreed =)
12:14 < nickjohnson> For example, you could implement the underlying storage
layer (BDB-like, log structured, etc), an interesting system in itself
12:15 < nickjohnson> and the overlay network
12:15 < tav> i like the approach you're taking on your blog
12:15 < nickjohnson> etc, separately, and combine them at the end (and even
that last step is probably still more complicated than all the others)
12:15 < tav> maybe i should follow in your footsteps with that approach ?
12:15 < nickjohnson> What about the approach?  The incrementality, or
something else?
12:16 -!- brunov [n=bruno@190.191.110.64] has joined #go-nuts
12:16 < tav> yup, a series of articles exploring each of the elements
12:16 < tav> thus incrementally building up the whole but as a set of useful
parts like you advice
12:17 < tav> the Nick Johnson Way!  =)
12:17 < nickjohnson> hehe
12:18 < nickjohnson> I've certainly found it to be helpful.  Straight away
when I started doing it for the blog series, I learned a couple of things:
12:18 < nickjohnson> - My code can always be simpler and easier to read.
There's always stuff I can eliminate without breaking extensibility
12:19 < nickjohnson> - I design much better systems if I have to break them
into small, post-sized chunks and make sure that what I'm writing today will work
with what I'm writing next week.  :)
12:19 -!- Fraeon [n=kzer-za@e212-246-65-153.elisa-laajakaista.fi] has quit
["Connection reset by peer."]
12:19 < nickjohnson> The first one especially.  I have this habit of making
things just a little bit more complicated than they have to be for performance or
in order to support tomorrow's feature, when I should probably leave all that
until tomorrow.  ;)
12:20 < tav> hehe
12:20 < tav> i can totally relate to that
12:22 < tav> thanks for the inspiration nickjohnson — though i guess i'm
going to have to somehow explain to people that my love-affair with python has
ended
12:23 < nickjohnson> heh
12:23 < nickjohnson> I don't think it has to be one or the other.
12:23 < nickjohnson> I'm liking Go so far, but I'm still a hard-core
Pythonista, and intend to remain so ;)
12:23 -!- perdix [n=perdix@sxemacs/devel/perdix] has joined #go-nuts
12:24 -!- triplez [n=triplez@cm52.sigma225.maxonline.com.sg] has quit []
12:25 < tav> well, until now, had been working with python and working on an
interpreter using pypy, e.g.  pypy enables this webkit bridge to work:
http://github.com/tav/plexnet/blob/master/source/client/webkit_bridge/jsobj.py
12:25 < nickjohnson> I see
12:25 < tav> but given that pypy doesn't have quite the same development
resources as go...
12:26 < nickjohnson> fair enough
12:26 < tav> it seems more prudent to switch?
12:26 < nickjohnson> Depends on what meets the need, really.  Languages are
just tools.  :)
12:27 < tav> *nod*
12:28 -!- snake_ [n=snake@cardinal.sura.ru] has quit [Read error: 110 (Connection
timed out)]
12:28 < uriel> actually, knowing that some of the pypy developers are huge
Plan 9 fans, I wouldn't be surprised if they switched to Go...
12:28 < nickjohnson> heh
12:28 -!- crashR [n=crasher@codextreme.pck.nerim.net] has quit ["Leaving."]
12:28 -!- Meowtimer [n=meowtime@132.252.242.23] has quit ["Arr"]
12:33 < tav> well, right now, their focus is on the JIT — so any go-backend
work is quite low on the priority list — but seeing as they're coding a framework
that generates a JIT framework, once they succeed Go will become immaterial ;p
12:33 < tav> but that's a few years off
12:34 < tav> nn hipe|sleep
12:34 < tav> but then again, it might take just as long for the
go-nacl-browser integration to be workable ;p
12:37 -!- toft [n=jlewis@unaffiliated/crassworm] has joined #go-nuts
12:44 -!- lux` [n=lux@151.54.240.211] has joined #go-nuts
12:45 -!- plainhao [n=plainhao@208.75.85.237] has joined #go-nuts
12:46 -!- fhs [n=fhs@pool-72-89-203-117.nycmny.east.verizon.net] has quit
["leaving"]
12:46 -!- hipe|sleep [n=hipe@74.108.181.155] has quit [Remote closed the
connection]
12:47 -!- jtza8 [n=jtza8@wbs-41-208-199-180.wbs.co.za] has joined #go-nuts
12:47 < jtza8> Hi all, any of the "Go Authors" about?
12:47 < jtza8> Liscence question...
12:48 < jtza8> Could I use a comment very simmilar to what you use in your
go files to indicate the copyright, without you guys considering it plagerism?  :P
12:48 < jtza8> *plagiarism
12:50 < exch> moar package!  http://github.com/jteeuwen/go-pkg-rss
12:50 < exch> i'm on a roll
12:51 < tav> nice one exch
12:51 < toft> exch: might want to s/hyvrid/hybrid/ on the description there
:)
12:51 < exch> oh right :)
12:51 < toft> and bams->bans?  :)
12:51 < exch> thx
12:52 < toft> no worries
12:52 < tav> jtza8: it's just a standard copyright header — thousands of
projects have it...
12:52 < jtza8> Ok, phew, thanks :)
12:52 -!- kota1111 [n=kota1111@gw2.kbmj.jp] has quit ["Leaving..."]
12:53 < tav> s/Appart/Apart/
12:53 < tav> ;p
12:53 < vsmatck> Can a copyright be copyrighted?
12:53 < tav> vsmatck: ?
12:53 < vsmatck> Like can you make a proprietary copyright?  Cannot modify
or distribute?
12:54 < tav> vsmatck: sure, by default that's the case — often permissions
to modify/distribute/etc.  is provided by the terms of the license
12:54 < vsmatck> ah, so all copyrights always cover themselves?
12:54 < kve_> I think he's meaning "This Copyright is Copyrighted" ->
infinite loop of copyrights
12:55 < tav> kve_: lol
12:55 < kve_> Lawyers heaven
12:55 < vsmatck> Make a lawyers brain explode.
12:55 -!- chid_ [n=lbmzanfo@c122-106-95-175.rivrw1.nsw.optusnet.com.au] has quit
[Read error: 60 (Operation timed out)]
12:56 -!- aarapov [n=aarapov@nat/redhat/x-eequbucgspdzhjaa] has quit ["Leaving."]
12:56 < vsmatck> I bet there's a case for that in copyright law.  In one of
those sentences with 50 commas.
12:57 < tav> I guess one could define it in recursive form?  "This work and
all references to the ownership of it's intellectual property are Copyright ..."
12:58 < tav> exch: any intentions to support
http://code.google.com/p/simpleupdateprotocol/ ?
12:59 < exch> never heard of that.  I'll have a look :)
13:00 -!- Meowtimer [n=meowtime@132.252.242.15] has joined #go-nuts
13:02 -!- hector [n=chatzill@client-86-0-126-58.nrth.adsl.virginmedia.com] has
joined #go-nuts
13:06 -!- vdrab [n=vdrab@cap012-208.kcn.ne.jp] has joined #go-nuts
13:07 -!- MigoMipo [i=3e779bfd@gateway/web/freenode/x-dlmfykwbajqeaktt] has joined
#go-nuts
13:08 -!- snake_ [n=snake@cardinal.sura.ru] has joined #go-nuts
13:09 < mikedee> is it possible to open up 2 tcp ports and listen on both of
them?  I tried running my server in a go routine but that does not listen.
13:09 < mikedee> I want to pass events between php and a javascript client
via DOM events
13:10 -!- knave [n=kn4ve@dsl-240-171-194.telkomadsl.co.za] has joined #go-nuts
13:10 < jessta> mikedee: yes you can
13:12 -!- hector [n=chatzill@client-86-0-126-58.nrth.adsl.virginmedia.com] has
quit ["ChatZilla 0.9.85 [Firefox 3.5.5/20091102152451]"]
13:12 -!- jA_cOp [n=yakobu@ti0043a380-3093.bb.online.no] has quit [Read error: 60
(Operation timed out)]
13:12 < toft> is it normal for the language tests to take more than half an
hour?
13:13 < exch> not rly
13:13 < exch> 1 or 2 minutes at most for me
13:13 < toft> yar...
13:13 -!- perdix [n=perdix@sxemacs/devel/perdix] has quit ["A cow.  A trampoline.
Together they fight crime!"]
13:14 < toft> running on an intel mac, goarch 386, goos darwin
13:14 < exch> i'm on 64 bit arch linux
13:15 -!- Lorthirk [n=cm0901@109.115.36.189] has quit [Read error: 110 (Connection
timed out)]
13:17 < mikedee> thanks jessta - any idea of a rough strategy?  I had
planned to create a function which starts a server and then just run that as a go
routine
13:17 < mikedee> then run the main http server in the main thread
13:18 < mikedee> at the moment I have the backend server running but when I
make it a go routine, it does not open up the port
13:18 -!- ziyu4huang [n=ziyu_hua@220-133-3-82.HINET-IP.hinet.net] has joined
#go-nuts
13:18 -!- hector [n=chatzill@client-86-0-126-58.nrth.adsl.virginmedia.com] has
joined #go-nuts
13:18 < tav> lol @ http://gofy.cat-v.org/
13:19 < mikedee> i added a for {} to main() to stop it exiting but still no
idce :(
13:19 < tav> uriel: can we put http://go-lang.cat-v.org/ in the topic pls ?
13:19 < mikedee> dice
13:20 < mikedee> http://gopaste.org/view/vRc7Y
13:20 < mikedee> heavily ripped from http/server.go
13:22 -!- jtza8 [n=jtza8@wbs-41-208-199-180.wbs.co.za] has left #go-nuts []
13:22 < mikedee> also how to get go to compile with an unused variable?
13:23 < exch> assign it to _ until you actually use it
13:24 < exch> either that or don't declare it (use _)
13:24 < mikedee> thanks
13:24 < exch> like: b := 1; _ = b;
13:24 < nickjohnson> for{}?  That's one way to burn a CPU doing nothing.
13:25 < mikedee> i was just trying to stop the main loop exiting while i
test the server as a go routine
13:25 < nickjohnson> A better option would be to read from a 'quit' channel
that gets signalled when you want to termintae
13:25 < nickjohnson> er, terminate
13:25 < exch> at the very least put a time.Sleep() in the loop :)
13:26 < tav> exch: heh
13:26 < mikedee> cool...  that works
13:27 < mikedee> 1 more q before i spend a lot of time...
13:27 < mikedee> I expect to be able to share 1 channel between all of my
listening clients and then send the events down that channel, is that going to
work?
13:28 < uriel> tav: I can't, and given its onofficial status I'm not sure it
would be proper...  (I personally would be cool with it, but I could understand
how others might disagree)
13:28 < exch> sure.  just create the channel in your main app and pass it to
all clients
13:30 < nickjohnson> Hm, interesting.  It didn't occur to me that you can
use a channel as a semaphore
13:31 -!- jdp [n=justin@67.82.56.192] has joined #go-nuts
13:33 < uriel> something to keep in mind that can open up some really cool
tricks: you can send channels over channels!
13:33 < nickjohnson> yup :)
13:33 < mikedee> Thats why I am liking go.  It reduces the complexity that
C++ and Java love to introduce, like removing while loops etc
13:33 < nickjohnson> Knowing Erlang helps with understanding that, I think.
13:33 < uriel> nickjohnson: can one send channels over channels in erlang?
I'm not sure...
13:34 * uriel has not used erlang as much as he should, stuck to Limbo for the
most part
13:34 < nickjohnson> uriel: In erlang, each process has a channel bound to
it - there are no channels on their own - and as such, sending a process handle to
a process is a common operation, as it's the only way you can get a reply.
13:34 < Smergo> You don't really have the channels in Erlang.
13:34 < Smergo> As long as you know the Pid you can send a message.
13:35 < Smergo> nickjohnson is right :)
13:35 < Smergo> And faster.
13:35 < uriel> nickjohnson: ah, well, but that is a different concept...
13:35 < nickjohnson> heh
13:35 < nickjohnson> uriel: Not markedly.  The idea that you can send a Pid
to a Pid is more or less the same as sending a channel over a channel.
13:36 -!- scarabx [n=scarabx@24.147.239.120] has joined #go-nuts
13:36 < uriel> nickjohnson: hmmm...  I guess /me ponders...
13:36 < uriel> but can one process listen on multiple 'channels' in such a
model?
13:36 < uriel> (ie., I guess it would mean having multiple pids)
13:37 < nickjohnson> uriel: Nope, because a process can only listen for
messages sent to it
13:37 < uriel> yea, that is what I was thinking...
13:37 < nickjohnson> Things like that would be handled by having multiple
things sending messages to you
13:37 < nickjohnson> So you only have to listen on your own handle
13:38 < Smergo> You could of course create processes that acted as
"channels" and pass them around but...
13:38 < nickjohnson> true
13:38 < Smergo> What happens if more then on go routine listen to a channel,
do both get the same data?
13:38 < uriel> yea, but it is a bit more restrictive, for example if you
have a group of writers, and another goruoutine that will send you a timeout
signal, it is easy for the first group to share a single channel, and you just alt
on both things..
13:38 < nickjohnson> Smergo: No, every message is received only once.  The
one that listened first will get the first element
13:38 < uriel> I guess one can do the same, but still, I think I like the
limbo/go CSP model better
13:38 < Smergo> Ok.
13:38 < nickjohnson> Actually, not sure it's guaranteed to be ordered, only
'fair'
13:38 < uriel> (nothing against Erlang, from what I have seen it is really
great)
13:39 < nickjohnson> uriel: Well, Erlang is CSP, too - just a slightly more
restrictive version of it.
13:39 < Smergo> Erlang is great for some stuff, less great for other stuff,
I would say.  But that goes for most languages.
13:39 < nickjohnson> indeed
13:39 < uriel> nickjohnson: actually, I'm not sure it is formally CSP,
Erlang is async everywhere...  CSP is sync (although I know one can build one on
the other but..)
13:40 < uriel> I think what is great about Erlang is the reliable
distributed nature
13:40 < nickjohnson> I haven't seen anywhere erlang is async
13:40 < nickjohnson> But I don't know it _that_ well
13:41 < exch> uriel.  somethng to add to your list:
http://github.com/jteeuwen/go-pkg-rss
13:41 < uriel> you can do similar things in Inferno and Plan 9, but erlang's
mode is less sensitive to interferences
13:41 < dpb> uriel: do you actually have any goblin code yet?
13:41 < uriel> nickjohnson: all message passing in erlang is asynchronous
AFAIK
13:41 < uriel> dpb: mostly other people has written it, I haven't even had
the time to set up a repo to get it committed ;)
13:41 < nickjohnson> uriel: Hm, true.  But that's like go with buffers.  :P
13:42 < dpb> uriel :)
13:42 < nickjohnson> I do like Erlang's pattern matching syntax for
receiving messages.
13:42 < uriel> nickjohnson: yes, but go's buffered channels are actually an
extenssion on CSP
13:42 < Ycros> except in erlang your buffers don't have limits :P
13:42 < Smergo> Ycros: Until you run out of memory.
13:42 < vegai> yes, Erlang is all async
13:42 < uriel> nickjohnson: if I got it right, in CSP proper all channels
are always synchronous
13:42 < uriel> (and again, you can build asynchronous systems over
synchronous communication and the inverse, but it is non-trivial)
13:43 < Smergo> My first go test was a deadlock because I just used the
channels as I would do passing messages in Erlang ;)
13:44 < Smergo> Then I read some documentation.
13:47 < uriel> hehe
13:48 < Ycros> Smergo: sure
13:50 < tav> Smergo: hehe
13:51 < tav> re: csp/erlang/go, it's all just pi-calculus with different
sugars on top ;p
13:51 -!- leitaox [n=leitaox@189.20.94.66] has joined #go-nuts
13:51 < tav> the real question is going to be about channel mobility across
processes — will there be native support for that or do we build that ourselves ?
13:52 -!- raichoo [n=raichoo@i577BB388.versanet.de] has joined #go-nuts
13:52 -!- Meowtimer [n=meowtime@132.252.242.15] has quit ["Arr"]
13:53 -!- asmo [n=asmo@c83-248-96-173.bredband.comhem.se] has quit [Remote closed
the connection]
13:53 < tav> has anyone looked at distributed computing on go yet?
13:55 <+danderson> not to my knowledge
13:55 -!- tor7 [n=tor@213.113.122.152] has left #go-nuts []
13:56 -!- tor7 [n=tor@213.113.122.152] has joined #go-nuts
14:00 -!- chaynie [n=cary@66-162-19-138.static.twtelecom.net] has joined #go-nuts
14:00 -!- raichoo [n=raichoo@i577BB388.versanet.de] has quit []
14:01 -!- General13372 [n=support@71-84-247-187.dhcp.gldl.ca.charter.com] has
joined #go-nuts
14:02 -!- Gracenotes [n=person@wikipedia/Gracenotes] has quit [Remote closed the
connection]
14:04 -!- snake_ [n=snake@cardinal.sura.ru] has quit [Read error: 110 (Connection
timed out)]
14:05 -!- rndbot [n=bot@wikipedia/Gracenotes] has quit [Remote closed the
connection]
14:09 -!- General1337 [n=support@71.84.247.187] has quit [Read error: 145
(Connection timed out)]
14:10 -!- aho [n=nya@g226152094.adsl.alicedsl.de] has joined #go-nuts
14:11 -!- asmo [n=asmo@c-f6c5e055.1155-1-64736c11.cust.bredbandsbolaget.se] has
joined #go-nuts
14:12 -!- diltsman_ [n=diltsman@64.122.18.77] has joined #go-nuts
14:14 -!- jamalta [n=jamalta@209.20.66.76] has left #go-nuts []
14:14 < uriel> tav: I'm quite certain rob has ;)
14:15 -!- lbrandy_ [n=lbrandy_@206.210.81.55] has joined #go-nuts
14:17 -!- nullpo [n=nullpo@221x252x46x83.ap221.ftth.ucom.ne.jp] has quit [Read
error: 110 (Connection timed out)]
14:18 -!- scarabx [n=scarabx@24.147.239.120] has quit ["This computer has gone to
sleep"]
14:18 -!- gnuvince [n=vince@64.235.203.208] has quit [Remote closed the
connection]
14:18 -!- gnuvince [n=vince@64.235.203.22] has joined #go-nuts
14:19 -!- Odemia [n=Odemia-D@207.47.143.154] has quit [Remote closed the
connection]
14:20 -!- Gracenotes [n=person@wikipedia/Gracenotes] has joined #go-nuts
14:22 -!- triplez [n=triplez@218.212.225.52] has joined #go-nuts
14:22 -!- Odemia [n=Odemia-D@207.47.143.154] has joined #go-nuts
14:24 -!- diltsman_ [n=diltsman@64.122.18.77] has quit []
14:24 -!- iant [n=iant@74.125.60.1] has joined #go-nuts
14:25 -!- mode/#go-nuts [+v iant] by ChanServ
14:25 -!- Gracenotes [n=person@wikipedia/Gracenotes] has quit ["Leaving"]
14:26 -!- knave [n=kn4ve@dsl-240-171-194.telkomadsl.co.za] has quit [Read error:
113 (No route to host)]
14:33 -!- inittab- [n=dlbeer@ip-118-90-70-68.xdsl.xnet.co.nz] has joined #go-nuts
14:33 -!- ajhager [n=ajhager@64.184.75.239] has joined #go-nuts
14:33 -!- vdrab [n=vdrab@cap012-208.kcn.ne.jp] has quit []
14:34 -!- Odemia [n=Odemia-D@207.47.143.154] has quit [Remote closed the
connection]
14:34 -!- aa [n=aa@r190-135-137-100.dialup.adsl.anteldata.net.uy] has joined
#go-nuts
14:36 < Amaranth> oh, I can use `arch` to figure out which compiler to run
14:36 < Amaranth> yay, I learned something new :)
14:36 < uriel> good morning iant!
14:37 <+iant> morning
14:38 -!- aa [n=aa@r190-135-137-100.dialup.adsl.anteldata.net.uy] has quit [Remote
closed the connection]
14:41 -!- wildem [n=abochins@64.201.165.253] has joined #go-nuts
14:42 -!- wildem [n=abochins@64.201.165.253] has left #go-nuts []
14:42 -!- diltsman [n=diltsman@128.187.155.154] has joined #go-nuts
14:42 -!- wildem [n=abochins@64.201.165.253] has joined #go-nuts
14:44 < hector> iant: hey ian!  i've put some windows binaries of go at
http://code.google.com/p/go-windows/
14:44 <+iant> hector: that is very cool
14:45 <+iant> that was fast
14:45 < exch> extra cake for hector
14:45 < hector> thank you
14:46 -!- Zaba_ [n=zaba@195.131.148.102] has joined #go-nuts
14:47 < hector> i'd like my work to be integrated into the main repository
over the next few weeks, what would be the process for doing this?
14:48 -!- trutkin [n=trutkin@64.1.25.210.ptr.us.xo.net] has joined #go-nuts
14:48 <+iant> hector: follow the contribution process at
http://golang.org/doc/contribute.html
14:48 <+iant> Probably rsc would be the best reviewer for most of the
patches, or you can always use golang-dev@googlegroups.com
14:49 -!- aa__ [n=aa@r190-135-137-100.dialup.adsl.anteldata.net.uy] has quit [Read
error: 113 (No route to host)]
14:50 -!- inittab [n=dlbeer@ip-118-90-83-232.xdsl.xnet.co.nz] has quit [Read
error: 110 (Connection timed out)]
14:52 -!- diltsman [n=diltsman@128.187.155.154] has quit []
14:53 -!- Odemia [n=Odemia-D@207.47.143.154] has joined #go-nuts
14:56 -!- sockmonk [n=user@pixout.appriss.com] has joined #go-nuts
14:57 -!- odemia_ [n=Odemia-D@207.47.143.154] has joined #go-nuts
14:57 -!- PauloAlves [i=bd343402@gateway/web/freenode/x-sqtcxujplrtzxdcw] has
joined #go-nuts
14:58 -!- Zaba [n=zaba@about/goats/billygoat/zaba] has quit [Success]
14:58 -!- r2p2 [n=billy@v32671.1blu.de] has joined #go-nuts
15:01 -!- diltsman_ [n=diltsman@128.187.155.154] has joined #go-nuts
15:03 -!- Odemia [n=Odemia-D@207.47.143.154] has quit [Read error: 145 (Connection
timed out)]
15:03 -!- odemia_ [n=Odemia-D@207.47.143.154] has quit [Remote closed the
connection]
15:06 -!- lmoura [n=lauromou@200.184.118.130] has joined #go-nuts
15:06 -!- Odemia [n=Odemia-D@207.47.143.154] has joined #go-nuts
15:06 -!- chachan [n=chachan@200.62.25.156] has joined #go-nuts
15:08 -!- nathanielk_ [n=quassel@frigga.summersault.com] has quit [Read error: 113
(No route to host)]
15:10 -!- boscop_ [n=unknown@f055212029.adsl.alicedsl.de] has joined #go-nuts
15:10 < mikedee> I want to override some methods of http.Conn, what is the
best way to do that?
15:12 -!- nathanielk_ [n=quassel@frigga.summersault.com] has joined #go-nuts
15:13 < Amaranth> mikedee: Looks like the answer is "copy the http module
into your source tree"
15:13 -!- x2cast [n=alvaro@227.126.222.87.dynamic.jazztel.es] has joined #go-nuts
15:13 -!- x2cast [n=alvaro@227.126.222.87.dynamic.jazztel.es] has left #go-nuts []
15:14 < mikedee> I thought as much...  thanks anyway
15:14 -!- inittab [n=dlbeer@ip-118-90-81-112.xdsl.xnet.co.nz] has joined #go-nuts
15:14 <+danderson> mikedee: override in what way?
15:15 <+danderson> the answers could range from "contribute a fix to the
stdlib package if it's deficient", to other stuff, it depends what you need
15:15 < mikedee> I want to change it so that I can give a channel to each
connection, then relay information from that channel out to the waiting clients
15:15 <+iant> mikedee, Amaranth: http.Conn is a struct, so you ought to be
able to use embedding to pick up its methods, and then override whatever methods
you want to change
15:15 < Amaranth> iant: But then any method wanting an http.Conn will not
get those new methods, will it?
15:15 <+iant> Amaranth: yes, that is true
15:15 < Amaranth> Because if you cast to http.Conn it drops the new ones
15:16 <+iant> right
15:16 -!- inittab- [n=dlbeer@ip-118-90-70-68.xdsl.xnet.co.nz] has quit [Read
error: 110 (Connection timed out)]
15:16 <+iant> if this seems like a generally useful feature, then parts of
the http package should be redone to use an interface
15:17 <+iant> but I don't know the package very well mysefl
15:17 -!- jA_cOp [n=yakobu@unaffiliated/ja-cop/x-9478493] has joined #go-nuts
15:17 -!- r2p2 [n=billy@v32671.1blu.de] has left #go-nuts []
15:18 < diltsman_> Can you pass a function literal to a function?
15:18 -!- NinoScript1 [n=ninoscri@pc-62-61-86-200.cm.vtr.net] has joined #go-nuts
15:18 <+iant> diltsman_: sure
15:18 < uriel> diltsman_: yes
15:18 < diltsman_> What is the type for the parameter?
15:18 < nickjohnson> the type of the function
15:18 <+iant> something like "func (int) int"
15:18 < diltsman_> Ok, thanks.
15:19 -!- castlevaniafan [n=castleva@4-141.vpn.RWTH-Aachen.DE] has joined #go-nuts
15:19 -!- castlevaniafan [n=castleva@4-141.vpn.RWTH-Aachen.DE] has quit [Client
Quit]
15:19 < NinoScript1> .
15:19 -!- NinoScript1 [n=ninoscri@pc-62-61-86-200.cm.vtr.net] has quit [Client
Quit]
15:19 -!- NinoScript [n=ninoscri@pc-62-61-86-200.cm.vtr.net] has joined #go-nuts
15:21 -!- NinoScript [n=ninoscri@pc-62-61-86-200.cm.vtr.net] has quit [Client
Quit]
15:21 -!- NinoScript [n=Adium@pc-62-61-86-200.cm.vtr.net] has joined #go-nuts
15:21 -!- NinoScript [n=Adium@pc-62-61-86-200.cm.vtr.net] has left #go-nuts []
15:22 -!- NinoScript [n=Adium@pc-62-61-86-200.cm.vtr.net] has joined #go-nuts
15:23 -!- NinoScript [n=Adium@pc-62-61-86-200.cm.vtr.net] has left #go-nuts []
15:23 -!- NinoScript [n=Adium@pc-62-61-86-200.cm.vtr.net] has joined #go-nuts
15:24 -!- _bugs_ [n=bugs@cpe-76-184-223-206.tx.res.rr.com] has joined #go-nuts
15:24 -!- NinoScript [n=Adium@pc-62-61-86-200.cm.vtr.net] has left #go-nuts []
15:25 -!- chickamade [n=chickama@222.254.2.46] has joined #go-nuts
15:25 < Amaranth> diltsman_: It's usually clearer to do type MyFunc func
(int) int; first
15:26 -!- NinoScript [n=Adium@pc-62-61-86-200.cm.vtr.net] has joined #go-nuts
15:30 -!- crashR [n=crasher@codextreme.pck.nerim.net] has joined #go-nuts
15:33 -!- aarapov [n=aarapov@r11mq202.net.upc.cz] has joined #go-nuts
15:34 < diltsman_> Amaranth: Thanks, I had figured as much.
15:34 -!- AmirMohammad [n=amir@unaffiliated/gluegadget] has quit [Read error: 131
(Connection reset by peer)]
15:34 -!- skammer [n=skammer@79.139.142.29] has quit [Client Quit]
15:34 -!- AmirMohammad [n=amir@unaffiliated/gluegadget] has joined #go-nuts
15:41 -!- AmirMohammad [n=amir@unaffiliated/gluegadget] has quit [Remote closed
the connection]
15:41 -!- hector [n=chatzill@client-86-0-126-58.nrth.adsl.virginmedia.com] has
quit [Read error: 113 (No route to host)]
15:41 -!- turon [n=turon@c-24-218-205-57.hsd1.ma.comcast.net] has joined #go-nuts
15:43 -!- Nanoo [n=Nano@95-89-196-146-dynip.superkabel.de] has joined #go-nuts
15:44 -!- raichoo [n=raichoo@i577BB388.versanet.de] has joined #go-nuts
15:45 -!- triddell [n=tim@207-191-198-64.cpe.ats.mcleodusa.net] has joined
#go-nuts
15:46 < hstimer> anyone here have any experience with the xml lib?
15:46 -!- AmirMohammad [n=amir@213.207.243.252] has joined #go-nuts
15:48 -!- brrant [n=John@168-103-78-133.hlrn.qwest.net] has joined #go-nuts
15:49 -!- amstan [n=alex@129.97.22.230] has joined #go-nuts
15:49 -!- Venom_X [n=pjacobs@66.54.185.131] has joined #go-nuts
15:49 < amstan> hello, i'm playing with go, and i got to the webserver
example from here http://golang.org/doc/effective_go.html
15:49 -!- MigoMipo [i=3e779bfd@gateway/web/freenode/x-dlmfykwbajqeaktt] has quit
["Page closed"]
15:49 < amstan> question is, how do i use it?  if i just run it nothing
happens
15:49 < amstan> does it open a port on its own or something?
15:50 < amstan> nvm, found the -addr option
15:52 -!- jspeter [n=quassel@pool-71-254-93-194.lyncva.east.verizon.net] has
joined #go-nuts
15:53 -!- jspeter [n=quassel@pool-71-254-93-194.lyncva.east.verizon.net] has quit
[Client Quit]
15:53 -!- odemia_ [n=Odemia-D@207.47.143.154] has joined #go-nuts
15:53 -!- gigatropolis [n=chatzill@c-24-6-103-242.hsd1.ca.comcast.net] has quit
[Remote closed the connection]
15:54 -!- chickamade [n=chickama@222.254.2.46] has quit ["Leaving"]
15:54 -!- odemia_ [n=Odemia-D@207.47.143.154] has quit [Remote closed the
connection]
15:54 -!- decriptor [n=decripto@137.65.132.26] has joined #go-nuts
15:55 -!- mncaudill [n=nolan@67-207-138-6.slicehost.net] has quit [Read error: 104
(Connection reset by peer)]
15:55 -!- twhitbeck [n=tim@pool-74-109-232-37.pitbpa.fios.verizon.net] has joined
#go-nuts
15:56 -!- grizzlysmit [n=grizzlys@123-243-91-241.tpgi.com.au] has joined #go-nuts
15:56 -!- Odemia [n=Odemia-D@207.47.143.154] has quit [Read error: 104 (Connection
reset by peer)]
15:56 -!- djm_ [n=djm@paludis/slacker/djm] has joined #go-nuts
15:57 -!- Odemia [n=Odemia-D@207.47.143.154] has joined #go-nuts
15:57 -!- NinoScript [n=Adium@pc-62-61-86-200.cm.vtr.net] has left #go-nuts []
15:57 -!- NinoScript [n=Adium@pc-62-61-86-200.cm.vtr.net] has joined #go-nuts
15:58 -!- diltsman_ [n=diltsman@128.187.155.154] has quit []
15:58 -!- PauloAlves [i=bd343402@gateway/web/freenode/x-sqtcxujplrtzxdcw] has left
#go-nuts []
15:58 -!- NinoScript [n=Adium@pc-62-61-86-200.cm.vtr.net] has left #go-nuts []
15:58 -!- NinoScript [n=Adium@pc-62-61-86-200.cm.vtr.net] has joined #go-nuts
16:00 -!- gigatropolis [n=chatzill@c-24-6-103-242.hsd1.ca.comcast.net] has joined
#go-nuts
16:01 -!- NinoScript [n=Adium@pc-62-61-86-200.cm.vtr.net] has left #go-nuts []
16:01 -!- djm [n=djm@paludis/slacker/djm] has quit [Read error: 110 (Connection
timed out)]
16:04 < msbranco> a question: how would you create a structure, tree-like,
where a map maps a string (key) to another map (which itself maps string to
string) ?
16:04 < msbranco> guess you'd do two steps: map[string]*SomeStruct
16:04 < msbranco> and the SomeStruct type would have another
map[string]string within?
16:04 < msbranco> any more elegant way?
16:05 < msbranco> just need these 3 levels, not more.
16:05 <+iant> msbranco: map[string]map[string]string ?
16:05 < exch> m := make(map[string]map[string]string);
16:05 < exch> :)
16:05 -!- _bugs_ [n=bugs@cpe-76-184-223-206.tx.res.rr.com] has quit ["Leaving"]
16:05 < msbranco> ah humm...  i thought i had tried that :)
16:05 < msbranco> ok forget it :)
16:05 -!- grizzlysmit [n=grizzlys@123-243-91-241.tpgi.com.au] has left #go-nuts []
16:06 -!- hstimer [n=hans@c-98-234-25-125.hsd1.ca.comcast.net] has quit
["Leaving..."]
16:06 < msbranco> yep of course; sorry, should have had some other error and
got confused
16:07 -!- geocalc [n=geocalc@lns-bzn-31-82-252-231-91.adsl.proxad.net] has joined
#go-nuts
16:08 -!- Netsplit orwell.freenode.net <-> irc.freenode.net quits: Wezz6400,
icy, zum, saati_, dD0T, felipe, dpb
16:08 -!- saati [n=bjb@marvin.harmless.hu] has joined #go-nuts
16:09 -!- Netsplit over, joins: zum
16:09 -!- dpb [i=dpb@xob.kapsi.fi] has joined #go-nuts
16:09 -!- Netsplit over, joins: Wezz6400
16:09 -!- dD0T [n=dD0T@uhweb12058.united-hoster.com] has joined #go-nuts
16:09 -!- GeoBSD [n=geocalc@lns-bzn-22-82-249-82-89.adsl.proxad.net] has quit
[Read error: 60 (Operation timed out)]
16:10 -!- Perberos [n=Perberos@190.49.53.219] has quit ["Ex-Chat"]
16:13 -!- icy [n=icy@singularity.cryosphere.de] has joined #go-nuts
16:15 -!- SRabbelier [n=SRabbeli@ip138-114-211-87.adsl2.static.versatel.nl] has
joined #go-nuts
16:16 -!- sanooj [i=jpihlaja@unaffiliated/joonas] has left #go-nuts []
16:17 < gigatropolis> there wouldn't be anyone working on a kerberos module
for Go would there?
16:17 <+iant> I haven't heard that one yet
16:18 <+danderson> likewise, haven't heard that one stream by
16:18 -!- amstan [n=alex@129.97.22.230] has quit [Read error: 145 (Connection
timed out)]
16:19 <+danderson> it'd be nice to have though.
16:19 < gigatropolis> yeah, it would give me an exuse to use go at work :)
16:20 < gigatropolis> beat way to learn the stuff
16:20 < gigatropolis> best
16:21 -!- amstan [n=alex@129-97-22-230.uwaterloo.ca] has joined #go-nuts
16:23 -!- kichik|work2 [n=kichik_w@bzq-84-108-238-52.cablep.bezeqint.net] has
joined #go-nuts
16:25 -!- rbohn [n=rbohn@192.206.100.4] has joined #go-nuts
16:25 -!- twhitbeck [n=tim@pool-74-109-232-37.pitbpa.fios.verizon.net] has quit
[Read error: 113 (No route to host)]
16:28 -!- kaigan|work
[n=kaigan@c-8290e255.1411-10-64736c14.cust.bredbandsbolaget.se] has quit []
16:28 -!- JSharpe2 [n=jamie@5ad1d7f1.bb.sky.com] has joined #go-nuts
16:28 -!- delsvr [n=delsvr@cpe-67-242-41-219.twcny.res.rr.com] has joined #go-nuts
16:28 -!- p4p4 [n=P4p4@24.106.113.82.net.de.o2.com] has joined #go-nuts
16:29 -!- jA_cOp [n=yakobu@unaffiliated/ja-cop/x-9478493] has quit ["Leaving"]
16:31 -!- qbit_ [n=qbit_@c-75-71-160-106.hsd1.co.comcast.net] has joined #go-nuts
16:33 -!- kichik|work [n=kichik_w@80.179.195.109.cable.012.net.il] has quit [Read
error: 110 (Connection timed out)]
16:33 -!- Warmal [i=89fe0407@gateway/web/freenode/x-sqvbwmecwhbxyggf] has joined
#go-nuts
16:34 -!- JSharpe2 [n=jamie@5ad1d7f1.bb.sky.com] has quit [Connection reset by
peer]
16:34 -!- JSharpe [n=jamie@90.209.215.241] has quit [Connection timed out]
16:34 < Warmal> Hi All, what is the best debugger that can be used with the
6g version (Linux/386) and do I need specific compile flags to get debug info?
16:35 -!- Rob_Russell [n=chatzill@206-248-157-156.dsl.teksavvy.com] has joined
#go-nuts
16:35 -!- amstan [n=alex@129-97-22-230.uwaterloo.ca] has quit [Read error: 54
(Connection reset by peer)]
16:36 -!- trickie [n=trickie@94.100.112.225] has quit [Read error: 148 (No route
to host)]
16:37 < halfdan_> afaik theres no debugger for 6g/8g yet
16:38 < jessta> best way to turn an int in to a []byte?
16:38 <+iant> jessta: the encoding/binary package
16:39 < uriel> halfdan_: there is pkg/exp/ogle/ but it is not clear if it
works
16:39 -!- Guest55438 [n=aelaguiz@204.57.79.2] has quit []
16:40 -!- JFD_ [n=nether@133.pool85-53-6.dynamic.orange.es] has joined #go-nuts
16:40 -!- jdp [n=justin@67.82.56.192] has quit [Remote closed the connection]
16:41 -!- murodes1 [n=James@124.169.17.241] has joined #go-nuts
16:43 -!- NinoScript [n=Adium@pc-62-61-86-200.cm.vtr.net] has joined #go-nuts
16:45 -!- JFD_ [n=nether@133.pool85-53-6.dynamic.orange.es] has quit ["Ex-Chat"]
16:45 -!- NinoScript [n=Adium@pc-62-61-86-200.cm.vtr.net] has left #go-nuts []
16:45 -!- NinoScript [n=Adium@pc-62-61-86-200.cm.vtr.net] has joined #go-nuts
16:47 -!- soul9 [n=none@unaffiliated/johnnybuoy] has quit [Remote closed the
connection]
16:47 -!- soul9 [n=none@unaffiliated/johnnybuoy] has joined #go-nuts
16:48 -!- aa [n=aa@r200-40-114-26.ae-static.anteldata.net.uy] has joined #go-nuts
16:48 -!- Omei [n=chatzill@99-178-130-115.lightspeed.sndgca.sbcglobal.net] has
joined #go-nuts
16:48 -!- chrelad [n=chrelad@76.164.12.11] has joined #go-nuts
16:48 -!- felipe [n=felipe@my.nada.kth.se] has joined #go-nuts
16:50 -!- Metaphorically [n=chatzill@206-248-157-156.dsl.teksavvy.com] has joined
#go-nuts
16:54 -!- Metaphorically_ [n=chatzill@206-248-157-156.dsl.teksavvy.com] has joined
#go-nuts
16:55 -!- NinoScript [n=Adium@pc-62-61-86-200.cm.vtr.net] has left #go-nuts []
16:55 -!- NinoScript [n=Adium@pc-62-61-86-200.cm.vtr.net] has joined #go-nuts
16:55 -!- NinoScript [n=Adium@pc-62-61-86-200.cm.vtr.net] has left #go-nuts []
16:55 -!- NinoScript [n=Adium@pc-62-61-86-200.cm.vtr.net] has joined #go-nuts
16:56 -!- NinoScript [n=Adium@pc-62-61-86-200.cm.vtr.net] has left #go-nuts []
16:56 -!- NinoScript [n=Adium@pc-62-61-86-200.cm.vtr.net] has joined #go-nuts
16:56 -!- NinoScript [n=Adium@pc-62-61-86-200.cm.vtr.net] has left #go-nuts []
16:56 -!- NinoScript [n=Adium@pc-62-61-86-200.cm.vtr.net] has joined #go-nuts
16:56 -!- NinoScript [n=Adium@pc-62-61-86-200.cm.vtr.net] has left #go-nuts []
16:56 -!- NinoScript [n=Adium@pc-62-61-86-200.cm.vtr.net] has joined #go-nuts
16:57 -!- diltsman [n=diltsman@128.187.180.106] has joined #go-nuts
16:58 -!- NinoScript [n=Adium@pc-62-61-86-200.cm.vtr.net] has left #go-nuts []
16:58 -!- NinoScript [n=Adium@pc-62-61-86-200.cm.vtr.net] has joined #go-nuts
16:58 < Amaranth> NinoScript: fix your connection
16:58 -!- murodese [n=James@124-169-17-241.dyn.iinet.net.au] has quit [Read error:
110 (Connection timed out)]
17:02 < diltsman> How do you convert string to []byte?  Can you use
[]byte(x)?
17:03 -!- mitchellh [n=mitchell@c-98-232-95-245.hsd1.wa.comcast.net] has joined
#go-nuts
17:03 < jessta> diltsman: byte package, byte.Bytes()
17:04 -!- mitchellh [n=mitchell@c-98-232-95-245.hsd1.wa.comcast.net] has quit
[Client Quit]
17:04 < diltsman> jessta: byte package or bytes package?
17:06 -!- Rob_Russell [n=chatzill@206-248-157-156.dsl.teksavvy.com] has quit [Read
error: 110 (Connection timed out)]
17:07 -!- Alkavan [n=alkavan@IGLD-84-229-217-156.inter.net.il] has quit [Read
error: 104 (Connection reset by peer)]
17:07 -!- Alkavan [n=alkavan@84.229.225.218] has joined #go-nuts
17:08 -!- NinoScript [n=Adium@pc-62-61-86-200.cm.vtr.net] has left #go-nuts []
17:08 -!- NinoScript [n=Adium@pc-62-61-86-200.cm.vtr.net] has joined #go-nuts
17:09 -!- Metaphorically [n=chatzill@206-248-157-156.dsl.teksavvy.com] has quit
[Read error: 110 (Connection timed out)]
17:10 -!- NinoScript [n=Adium@pc-62-61-86-200.cm.vtr.net] has quit ["Leaving."]
17:11 -!- yourpalal [n=alex@d75-152-177-62.abhsia.telus.net] has joined #go-nuts
17:11 -!- NinoScript [n=Adium@pc-62-61-86-200.cm.vtr.net] has joined #go-nuts
17:11 -!- ericmoritz\0 [n=ericmori@76.123.248.214] has quit ["Leaving"]
17:12 -!- Alkavan_ [n=alkavan@77.124.44.87] has joined #go-nuts
17:12 -!- NinoScript [n=Adium@pc-62-61-86-200.cm.vtr.net] has quit [Client Quit]
17:13 -!- bennabi [n=Miranda@15.203.137.73] has joined #go-nuts
17:14 -!- hagna [n=hagna@70.102.57.178] has quit ["leaving"]
17:14 -!- banthar [n=banthar@chello084010208203.chello.pl] has joined #go-nuts
17:15 -!- double [n=double@host223-223-dynamic.33-79-r.retail.telecomitalia.it]
has joined #go-nuts
17:15 < exch> arr := strings.Bytes("foo");
17:16 -!- Alkavan [n=alkavan@84.229.225.218] has quit [Read error: 145 (Connection
timed out)]
17:20 -!- Sylvain_ [i=d4528311@gateway/web/freenode/x-pgvkcitffqnochgb] has quit
["Page closed"]
17:22 -!- elmar [n=elmar@dslb-094-219-223-185.pools.arcor-ip.net] has joined
#go-nuts
17:24 -!- zeroish [n=zeroish@135.207.174.50] has joined #go-nuts
17:24 -!- Zaba [n=zaba@ip102.148.adsl.wplus.ru] has joined #go-nuts
17:26 < path[l]> hai lulzmonkey
17:26 < lulzmonkey> errr hi
17:27 -!- armence [n=armence@c-67-188-229-128.hsd1.ca.comcast.net] has joined
#go-nuts
17:27 -!- yourpalal [n=alex@d75-152-177-62.abhsia.telus.net] has quit ["WeeChat
0.3.0"]
17:28 -!- Wings [i=UPP@123.201.176.145] has joined #go-nuts
17:28 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"]
17:28 -!- raichoo [n=raichoo@i577BB388.versanet.de] has quit []
17:28 < Wings> hi lulzmonkey
17:28 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
17:29 < Wings> hi path[l]
17:29 < lulzmonkey> hi wings
17:29 < path[l]> hi weeps
17:29 -!- Zaba_ [n=zaba@about/goats/billygoat/zaba] has quit [Read error: 110
(Connection timed out)]
17:29 -!- raichoo [n=raichoo@i577BB388.versanet.de] has joined #go-nuts
17:31 -!- yourpalal [n=alex@d75-152-177-62.abhsia.telus.net] has joined #go-nuts
17:33 < yourpalal> Can anyone explain the compiler error 'implicit
assignment of ...  field ...
17:34 -!- tasklist7 [n=tasklist@c-98-208-175-116.hsd1.fl.comcast.net] has joined
#go-nuts
17:34 < alexsuraci> yourpalal: most likely you have a struct define in
another package e.g.  type Foo struct { foo int }
17:34 -!- delsvr [n=delsvr@cpe-67-242-41-219.twcny.res.rr.com] has quit []
17:34 < alexsuraci> if you try to construct that with Foo{1} externally
you'll get that error
17:34 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"]
17:34 < alexsuraci> since it modifies the private field "foo"
17:34 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
17:35 < yourpalal> okay, I'm constructing it with a function in the other
package
17:35 < alexsuraci> s/private/unexported
17:35 < alexsuraci> I believe the convention there is to have a New function
in original package
17:36 -!- Wings [i=UPP@123.201.176.145] has quit [".•«UPP»•."]
17:36 < yourpalal> like this func New( ....  ) [structType] return
[structType]{...};
17:36 < alexsuraci> yeah, that should do it
17:36 < alexsuraci> though you may want to pick a more specific function
name, unless the package is centered around that structure
17:37 < alexsuraci> e.g.  the vector package
17:37 < alexsuraci> http://golang.org/pkg/container/vector/#Vector.New
17:37 < yourpalal> yeah it only exports the one type
17:39 -!- diltsman [n=diltsman@128.187.180.106] has quit []
17:40 < yourpalal> The compiler error points to a line where I call a method
of the object, which returns the field in question
17:40 < alexsuraci> guess that'd do it too
17:41 < alexsuraci> essentially if you change that field to be exported all
those problems would go away, but I'm not sure you want to do that
17:41 < alexsuraci> hard to call without seeing the code
17:42 < yourpalal> right, I was hoping to encapsulate/abstract that stuff
17:43 < alexsuraci> perhaps you could dereference it?
17:44 < yourpalal> dereference the struct?
17:45 < yourpalal> here is a pastebin which replicates the problem:
http://pastebin.ca/1683928
17:45 -!- skammer [n=skammer@79.139.142.29] has joined #go-nuts
17:45 < alexsuraci> shameless plug: http://gopaste.org/ :P
17:46 < yourpalal> haha let me check that out...
17:46 -!- tasklist7_ [n=tasklist@166.193.6.71] has joined #go-nuts
17:46 -!- r2p2 [n=billy@v32671.1blu.de] has joined #go-nuts
17:46 < alexsuraci> only real perk is you get syntax hilighting, but only
for valid go source
17:46 * alexsuraci needs to add multi-file pastes
17:47 < alexsuraci> not sure, this looks fine.  I'll tinker with it a bit
17:47 < yourpalal> pretty cool!
17:47 < yourpalal> okay thanks!
17:47 -!- NinoScript [n=Adium@pc-62-61-86-200.cm.vtr.net] has joined #go-nuts
17:47 -!- path[l] [n=path@59.162.86.164] has quit []
17:47 -!- aaront [n=aaront@d24-141-25-171.home.cgocable.net] has joined #go-nuts
17:48 -!- bennabi [n=Miranda@15.203.137.73] has left #go-nuts []
17:48 -!- diltsman [n=diltsman@128.187.180.106] has joined #go-nuts
17:48 < alexsuraci> yourpalal: works now
17:49 < uriel> iant: btw, plans to have some Go talks at Google I/o?  /me is
trying to convince nickjohnson to give one about Go on App Engine ;P
17:49 < alexsuraci> essentially I just changed the New function to return a
reference, which is the common practice
17:49 < yourpalal> and that fixed it?
17:49 -!- ritolatu [n=ritolatu@84.251.84.201] has joined #go-nuts
17:49 < yourpalal> awesome!
17:49 < alexsuraci> yeah
17:50 < yourpalal> although that maybe seems like a bug
17:50 < yourpalal> thanks anyway!
17:50 < alexsuraci> http://gopaste.org/view/private:6zBiB
17:50 -!- NinoScript [n=Adium@pc-62-61-86-200.cm.vtr.net] has quit [Client Quit]
17:50 < alexsuraci> (a bit jumbled there to make it work with gopaste, but
yea)
17:50 < alexsuraci> yeah, not sure of the particulars as to why it didn't
work before, but that simple change (which is common practice, may be a bug
otherwise) seems to fix it
17:51 -!- monkfish [n=chatzill@pc4231.stdby.hin.no] has quit [Read error: 110
(Connection timed out)]
17:51 < yourpalal> Awesome thanks again!
17:52 < alexsuraci> np
17:52 -!- Nanooo [n=Nano@95.89.196.146] has joined #go-nuts
17:52 < yourpalal> also nice paster, I've bookmarked it
17:52 < alexsuraci> thanks :)
17:53 -!- maacl [n=mac@0x573526c8.virnxx17.dynamic.dsl.tele.dk] has joined
#go-nuts
17:54 -!- chachan [n=chachan@200.62.25.156] has quit ["KVIrc Insomnia 4.0.0,
revision: , sources date: 20090520, built on: 2009/06/06 11:44:47 UTC
http://www.kvirc.net/"]
17:55 -!- fhs [n=fhs@pool-72-89-203-117.nycmny.east.verizon.net] has joined
#go-nuts
17:55 -!- diltsman [n=diltsman@128.187.180.106] has quit []
17:56 -!- snnw [n=snnw@95.96.105.101] has joined #go-nuts
17:57 < nickjohnson> Hm. Gists + http://gofmt.com/compile.html would be win.
17:57 -!- shambler_ [i=kingrat@mm-17-196-84-93.dynamic.pppoe.mgts.by] has joined
#go-nuts
17:57 -!- rrr [i=rrr@gateway/gpg-tor/key-0x9230E18F] has quit [Remote closed the
connection]
17:57 <+iant> uriel: yes, we do want to give a talk at I/O
17:58 -!- Nanoo [n=Nano@95-89-196-146-dynip.superkabel.de] has quit [Read error:
60 (Operation timed out)]
17:58 < nickjohnson> Anyone know how gofmt's compiler works?  Is it using a
ptrace sandbox / nacl or somesuch?
17:59 <+iant> nickjohnson: gofmt just parses Go using the go/parser package
17:59 < nickjohnson> iant: I mean gofmt.com, as I linked to above
17:59 -!- snnw [n=snnw@95.96.105.101] has quit ["Leaving."]
17:59 <+iant> nickjohnson: oh, sorry
18:00 < yourpalal> It looks to me like the site just fmts/compiles/runs the
code locally
18:00 < yourpalal> That's just a guess though.
18:00 < nickjohnson> I was thinking that a meta-pastebin that takes a gist
(gist.github.com), formats it and also compiles/executes it would be fairly
awesome.
18:00 < nickjohnson> yourpalal: That's the easy bit.  The slightly tougher
bit is using something like ptrace or nacl to make sure someone can't own your
machine.
18:01 < jessta> not so tough, just prevent a few packages from being
imported
18:01 < r2p2> :/ go has no tail call optimization
18:01 < yourpalal> oh okay....  haha I see what your question was
18:01 < mikedee> I have a program which creates a http server and then
relays events from a tcp socket back to multiple connected clients...  I thought
that all the connections could read the same data but it looks like only one of
them gets it, is this expected?
18:02 < yourpalal> sorry :D
18:02 < jessta> r2p2: it's called a for loop
18:02 < nickjohnson> jessta: Well, for a start those could be useful
packages.  Also, blacklisting is a reipce for disaster when you miss something.
18:02 <+iant> mikedee: yes, if you write one value to a channel, only one
goroutine will receive it
18:02 -!- tasklist7 [n=tasklist@c-98-208-175-116.hsd1.fl.comcast.net] has quit
[Success]
18:03 -!- nathanielk_ [n=quassel@frigga.summersault.com] has quit [Read error: 60
(Operation timed out)]
18:03 < r2p2> but i love recursion from fp
18:03 -!- Nanooo [n=Nano@95.89.196.146] has quit [Read error: 145 (Connection
timed out)]
18:04 < jessta> nickjohnson: there aren't that many packages, blacklist the
io,net,unsafe package and your pretty much done
18:05 -!- Kniht [n=kniht@c-68-58-17-177.hsd1.in.comcast.net] has joined #go-nuts
18:05 -!- ShadowIce [n=pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
18:05 <+iant> jessta: also syscalls
18:05 -!- bogen [n=bogen@cpe-76-186-22-145.tx.res.rr.com] has left #go-nuts []
18:05 < exch> os.Open() could be fun
18:06 -!- Nanoo [n=Nano@95-89-197-169-dynip.superkabel.de] has joined #go-nuts
18:07 -!- nathanielk_ [n=quassel@frigga.summersault.com] has joined #go-nuts
18:07 -!- Amaranth [n=travis@ubuntu/member/Amaranth] has quit [Read error: 110
(Connection timed out)]
18:07 -!- twhitbeck [n=tim@pool-74-109-232-37.pitbpa.fios.verizon.net] has joined
#go-nuts
18:09 -!- aarapov1 [n=aarapov@r11mq202.net.upc.cz] has joined #go-nuts
18:09 -!- aarapov [n=aarapov@r11mq202.net.upc.cz] has quit [Nick collision from
services.]
18:10 -!- snicket [n=Promethe@148.227.201.174] has joined #go-nuts
18:11 -!- rrr [i=rrr@gateway/gpg-tor/key-0x9230E18F] has joined #go-nuts
18:13 < swetland> ms
18:13 -!- swetland [n=swetland@64.13.153.229] has quit ["oops"]
18:16 -!- JSharpe [n=jamie@5ad1d7f1.bb.sky.com] has joined #go-nuts
18:16 -!- nathanielk_ [n=quassel@frigga.summersault.com] has quit
["http://quassel-irc.org - Chat comfortably.  Anywhere."]
18:17 -!- Fatal_ [i=fatal@debian.as] has quit [Killed by sagan.freenode.net (Nick
collision)]
18:17 -!- Fatal_ [i=fatal@debian.as] has joined #go-nuts
18:17 -!- nathanielk_ [n=quassel@frigga.summersault.com] has joined #go-nuts
18:18 -!- p4p4__ [n=P4p4@24.106.113.82.net.de.o2.com] has joined #go-nuts
18:21 < yourpalal> does anyone have a good vim syntax file for go?
18:21 -!- sm [n=sm@cpe-76-173-194-242.socal.res.rr.com] has joined #go-nuts
18:21 <+iant> yourpalal: see misc/vim
18:22 -!- sm [n=sm@cpe-76-173-194-242.socal.res.rr.com] has left #go-nuts []
18:23 < yourpalal> sm: haha thanks!
18:24 -!- mitchellh [n=mitchell@128.208.7.84] has joined #go-nuts
18:27 -!- snearch [n=olaf@g225048013.adsl.alicedsl.de] has quit ["Ex-Chat"]
18:29 -!- Metaphorically_ [n=chatzill@206-248-157-156.dsl.teksavvy.com] has quit
["ChatZilla 0.9.85 [Firefox 3.5.5/20091102152451]"]
18:29 -!- teedex [n=teedex@204.14.155.161] has joined #go-nuts
18:29 -!- sjhor_ [n=simon@93-97-29-93.zone5.bethere.co.uk] has joined #go-nuts
18:31 -!- sjhor [n=simon@93-97-29-93.zone5.bethere.co.uk] has quit [Read error: 60
(Operation timed out)]
18:32 -!- gasreaa [n=atwong@nat/slide/x-rkqvayswoddlrejr] has joined #go-nuts
18:32 -!- twhitbeck [n=tim@pool-74-109-232-37.pitbpa.fios.verizon.net] has quit
[Read error: 110 (Connection timed out)]
18:34 -!- chachan [n=chachan@ccscliente156.ifxnetworks.net.ve] has joined #go-nuts
18:35 -!- sjhor [n=simon@93-97-29-93.zone5.bethere.co.uk] has joined #go-nuts
18:37 -!- chachan [n=chachan@ccscliente156.ifxnetworks.net.ve] has quit [Client
Quit]
18:38 -!- p4p4 [n=P4p4@24.106.113.82.net.de.o2.com] has quit [Connection timed
out]
18:38 -!- tasklist7 [n=tasklist@166.193.6.71] has quit ["Colloquy for iPhone -
http://colloquy.mobi"]
18:38 -!- sergio [n=sergio@unaffiliated/sergio] has quit [Read error: 110
(Connection timed out)]
18:38 -!- chachan [n=chachan@ccscliente156.ifxnetworks.net.ve] has joined #go-nuts
18:41 < exch> :p (*em)["middot"] = "·"; <- "cannot call non-function 1
(type int)"
18:41 <+iant> huh
18:42 < exch> em is a pinter to a map btw
18:42 < exch> *pointer
18:42 < exch> I think the compiler throws up on the dot
18:42 <+iant> does the line before that one have a semicolon?
18:43 < exch> doh
18:43 * exch goes back to sleep
18:46 -!- Amaranth [n=travis@ubuntu/member/Amaranth] has joined #go-nuts
18:46 -!- sjhor_ [n=simon@93-97-29-93.zone5.bethere.co.uk] has quit [Read error:
110 (Connection timed out)]
18:47 -!- Adys [n=Adys@unaffiliated/adys] has joined #go-nuts
18:50 -!- werdan7 [n=w7@freenode/staff/wikimedia.werdan7] has quit [SendQ
exceeded]
18:51 -!- yourpalal [n=alex@d75-152-177-62.abhsia.telus.net] has quit ["WeeChat
0.3.0"]
18:53 -!- Anders__ [n=Anders@c83-253-2-206.bredband.comhem.se] has quit ["Lämnar"]
18:57 -!- scandal [n=nobody@unaffiliated/scandal] has joined #go-nuts
18:58 -!- Odemia [n=Odemia-D@207.47.143.154] has quit [Read error: 110 (Connection
timed out)]
18:58 -!- illya77 [n=illya77@0-156-133-95.pool.ukrtel.net] has joined #go-nuts
19:03 -!- vomjom [n=vomjom@99-157-248-71.lightspeed.stlsmo.sbcglobal.net] has quit
[Read error: 104 (Connection reset by peer)]
19:03 -!- leitaox [n=leitaox@189.20.94.66] has quit [Client Quit]
19:04 -!- tsuwabuki [n=tsuwabuk@60.237.112.140] has quit [Read error: 145
(Connection timed out)]
19:04 -!- Kniht [n=kniht@c-68-58-17-177.hsd1.in.comcast.net] has quit [Success]
19:04 -!- MigoMipo [n=MigoMipo@84-217-14-221.tn.glocalnet.net] has joined #go-nuts
19:04 -!- Kniht [n=kniht@c-68-58-17-177.hsd1.in.comcast.net] has joined #go-nuts
19:05 -!- diltsman_ [n=diltsman@128.187.141.4] has joined #go-nuts
19:07 -!- sku [n=sk@217.175.15.45] has joined #go-nuts
19:09 -!- jeng [n=chatzill@75.110.231.66] has joined #go-nuts
19:10 -!- Fish [n=Fish@78.238.225.114] has joined #go-nuts
19:12 -!- nathanielk_ [n=quassel@frigga.summersault.com] has quit [Remote closed
the connection]
19:13 -!- nathanielk [n=quassel@12.161.105.138] has joined #go-nuts
19:13 -!- jvogel_ [n=jonathan@friedpancakes.com] has quit [Client Quit]
19:15 -!- mitchellh [n=mitchell@128.208.7.84] has quit ["Leaving."]
19:16 -!- clearscreen [n=clearscr@e248070.upc-e.chello.nl] has quit [Remote closed
the connection]
19:18 -!- jvogel [n=jonathan@friedpancakes.com] has joined #go-nuts
19:22 -!- moraes [n=moraes@187.39.148.176] has joined #go-nuts
19:26 -!- clearscreen [n=clearscr@e248070.upc-e.chello.nl] has joined #go-nuts
19:26 < XniX23> anyone tried SDL binding?
19:27 -!- Fraeon [n=kzer-za@e212-246-65-153.elisa-laajakaista.fi] has joined
#go-nuts
19:28 < KirkMcDonald> SDL doesn't require callbacks, so it would be doable,
I think.
19:28 -!- rndbot [n=bot@wikipedia/Gracenotes] has joined #go-nuts
19:29 -!- Gracenotes [n=person@wikipedia/Gracenotes] has joined #go-nuts
19:30 < XniX23> KirkMcDonald: its already out, im asking coz im not sure
which libs i need :\ it says i need SDL, SDL_IMAGE, OPENGL, GLEW (all in -dev
version)
19:30 < KirkMcDonald> Oh. Sure.  That all sounds right.
19:30 -!- c0nfl|ct [n=tiago@248-37.dial.nortenet.pt] has joined #go-nuts
19:31 < KirkMcDonald> Just, try compiling it, and it'll bitch if it's
missing something.
19:31 -!- stesla [n=samuel@saffron.thoughtlocker.net] has joined #go-nuts
19:31 < KirkMcDonald> Then keep adding things until it stops complaining.
19:31 < XniX23> KirkMcDonald: lol, nice one
19:31 * KirkMcDonald wasn't joking.
19:31 -!- ehird [n=ehird@91.105.114.252] has joined #go-nuts
19:32 < XniX23> no, i meant, nice method :P
19:32 < KirkMcDonald> This is computer programming!  That's the only method.
19:32 -!- clearscreen [n=clearscr@e248070.upc-e.chello.nl] has quit [Remote closed
the connection]
19:33 -!- Sajukar [n=chatzill@pa3-84-90-211-51.netvisao.pt] has joined #go-nuts
19:34 -!- skyfive [n=skyfive@173-11-110-86-SFBA.hfc.comcastbusiness.net] has
joined #go-nuts
19:35 -!- Kniht [n=kniht@c-68-58-17-177.hsd1.in.comcast.net] has quit [Connection
timed out]
19:35 -!- Kniht [n=kniht@c-68-58-17-177.hsd1.in.comcast.net] has joined #go-nuts
19:36 -!- Fish [n=Fish@78.238.225.114] has quit [Read error: 60 (Operation timed
out)]
19:36 -!- Nanoo [n=Nano@95-89-197-169-dynip.superkabel.de] has quit ["Leaving"]
19:36 -!- Fish [n=Fish@78.238.225.114] has joined #go-nuts
19:37 -!- clearscreen [n=clearscr@e248070.upc-e.chello.nl] has joined #go-nuts
19:40 -!- Zaba_ [n=zaba@about/goats/billygoat/zaba] has joined #go-nuts
19:43 -!- blackmagik [n=blackmag@unaffiliated/blackmagik] has joined #go-nuts
19:43 -!- skammer [n=skammer@79.139.142.29] has quit [Success]
19:44 -!- Borf [n=Borf@5356B30E.cable.casema.nl] has quit ["@(·_·)@"]
19:45 -!- WalterMundt [n=waltermu@twiki/developer/EtherMage] has joined #go-nuts
19:45 -!- chachan [n=chachan@ccscliente156.ifxnetworks.net.ve] has quit [Remote
closed the connection]
19:46 -!- skammer [n=skammer@79.139.142.29] has joined #go-nuts
19:46 < WalterMundt> What's the cgo idiom for C enums and #defined string
constants?  Using C.xxxx notation results in an attempt to link them dynamically,
which fails.  I can copy the values into the cgo file, but that seems to be
defeating the purpose.
19:47 -!- chachan [n=chachan@ccscliente156.ifxnetworks.net.ve] has joined #go-nuts
19:49 -!- Fish [n=Fish@78.238.225.114] has quit [Remote closed the connection]
19:49 -!- turon__ [n=turon@c-24-218-205-57.hsd1.ma.comcast.net] has joined
#go-nuts
19:49 -!- turon [n=turon@c-24-218-205-57.hsd1.ma.comcast.net] has left #go-nuts []
19:50 -!- Fl1pFl0p [n=FlipFlop@68.8.225.187] has joined #go-nuts
19:50 < banthar> WalterMundt: check out godefs: src/cmd/godefs/doc.go
19:50 < WalterMundt> banthar: will do, thanks
19:50 -!- Alkavan_ [n=alkavan@77.124.44.87] has quit ["Leaving"]
19:51 < mikedee> How do you typecast a interface{} into a *MyStruct (I am
using list.List)?
19:51 -!- Zaba [n=zaba@about/goats/billygoat/zaba] has quit [Connection timed out]
19:52 <+iant> mikedee: v.(*MyStruct)
19:52 < XniX23> was exp/draw added afterwards?  coz i cant import it :)
19:52 <+iant> XniX23: it's not built by default, you can build it yourself
by cd'ing to the directory and running "make install"
19:53 -!- ikke [n=ikkibr@unaffiliated/ikkebr] has quit []
19:54 -!- snicket [n=Promethe@148.227.201.174] has quit ["Saliendo"]
19:55 -!- diltsman_ [n=diltsman@128.187.141.4] has quit []
19:56 < XniX23> iant is the directory go/pkg/some-arch?
19:56 -!- diltsman [n=diltsman@128.187.141.4] has joined #go-nuts
19:56 <+iant> XniX23: go/src/pkg/exp/draw
19:56 -!- clearscreen1 [n=clearscr@e248070.upc-e.chello.nl] has joined #go-nuts
19:57 -!- clearscreen [n=clearscr@e248070.upc-e.chello.nl] has quit [Connection
reset by peer]
19:57 -!- diltsman [n=diltsman@128.187.141.4] has quit [Client Quit]
19:59 -!- illya77 [n=illya77@0-156-133-95.pool.ukrtel.net] has quit [Read error:
104 (Connection reset by peer)]
20:00 < XniX23> i cant get sdl binding work :\ if someone succeeded please
let me know
20:00 -!- p4p4__ [n=P4p4@24.106.113.82.net.de.o2.com] has quit [Connection timed
out]
20:01 -!- ni| [n=james@isp2-resnet-nat1.union.edu] has quit [Remote closed the
connection]
20:04 < banthar> XniX23: what's the problem ?
20:05 -!- Rob_Russell [n=chatzill@206-248-157-156.dsl.teksavvy.com] has joined
#go-nuts
20:09 -!- directrixx [n=directri@ip68-231-189-247.tc.ph.cox.net] has joined
#go-nuts
20:10 < XniX23> banthar: when i run make in sdl directory i get
"sdldraw.go:102: missing expr in var dcl; sdldraw.go:102: multiple-value c.RGBA()
in single-value context"
20:10 -!- ponce [n=ponce@paradisia.net] has left #go-nuts []
20:12 -!- afurlan [n=afurlan@scorpion.mps.com.br] has quit ["Leaving"]
20:12 -!- foipe [n=foipe@host-84-220-161-185.cust-adsl.tiscali.it] has joined
#go-nuts
20:13 < XniX23> banthar: weird, coz image.Color.RGBA() returns 4 values
20:13 -!- Anders__ [n=Anders@c83-253-2-206.bredband.comhem.se] has joined #go-nuts
20:14 < banthar> XniX23: thats strange, check if you have latest version of
go, maybe there was some api change
20:15 < banthar> XniX23: if you want quick solution, remove sdldraw.go from
Makefile
20:15 -!- Omei [n=chatzill@99-178-130-115.lightspeed.sndgca.sbcglobal.net] has
quit [Read error: 60 (Operation timed out)]
20:16 -!- shoafb [n=The_Doct@cpe-98-150-247-183.hawaii.res.rr.com] has joined
#go-nuts
20:22 -!- Anders__ [n=Anders@c83-253-2-206.bredband.comhem.se] has quit [Read
error: 60 (Operation timed out)]
20:23 -!- twhitbeck [n=tim@pool-74-109-232-37.pitbpa.fios.verizon.net] has joined
#go-nuts
20:27 < nickjohnson> Hm. Lots of global state in the RPC module :/
20:27 -!- Omei [n=chatzill@99-178-130-115.lightspeed.sndgca.sbcglobal.net] has
joined #go-nuts
20:31 -!- foipe [n=foipe@host-84-220-161-185.cust-adsl.tiscali.it] has left
#go-nuts ["Leaving"]
20:31 -!- jordyd [n=jordyd@99-177-65-75.lightspeed.wepbfl.sbcglobal.net] has
joined #go-nuts
20:32 -!- mejja [n=user@c-49b6e555.023-82-73746f38.cust.bredbandsbolaget.se] has
joined #go-nuts
20:35 -!- tsuru [n=user@c-174-50-217-160.hsd1.tn.comcast.net] has quit ["ERC
Version 5.3 (IRC client for Emacs)"]
20:36 -!- rovar [i=c7aca911@gateway/web/freenode/x-cbzuszikyukrtmxh] has joined
#go-nuts
20:36 -!- plainhao [n=plainhao@208.75.85.237] has quit []
20:37 < rovar> is there a way to compile multiple files representing
different packages in the same directory?  (for testing)
20:38 < rovar> i am using -I.  but it doesn't seem to do much
20:38 < rovar> with 8g
20:39 -!- mbarkhau [n=koloss@p54A7EC80.dip.t-dialin.net] has joined #go-nuts
20:39 -!- sepoy [n=sepoy@c-98-202-50-243.hsd1.ut.comcast.net] has joined #go-nuts
20:39 -!- gl [n=gl@coders.fr] has quit ["leaving"]
20:40 < sepoy> anyone alive/willing to help a nub with what should be a
simple application of the http package?
20:40 -!- slowriot [n=kclancy@66.211.10.10] has joined #go-nuts
20:40 < Rob_Russell> rovar: there's no reason you can't have multiple files
in different packages in the same directory
20:41 < Rob_Russell> rovar: unless you mean you want to compile them all
with one command
20:41 < alexsuraci> sepoy: perhaps I can
20:41 < Rob_Russell> sepoy: i've done some stuff with it
20:41 -!- gl [n=gl@coders.fr] has joined #go-nuts
20:42 < sepoy> I'm attempting to use http.Get to fetch google.com - I
receive a 200 OK status, but I can't seem to read anything out of the Body..
20:42 -!- swamy [n=chatzill@nat/sun/x-udxuxvndesbskzvb] has joined #go-nuts
20:43 < rovar> Rob_Russell: I can't seem to compile the one that depends on
the other.  fatal error: cant find import : btbuffer
20:43 -!- nathanielk [n=quassel@12.161.105.138] has quit [Remote closed the
connection]
20:43 < rovar> that particular item is compiled in the local dir
20:43 -!- nathanielk [n=quassel@frigga.summersault.com] has joined #go-nuts
20:44 < Rob_Russell> rovar: you used import "./btbuffer" and compiled
btbuffer before the one that depends on it?
20:44 -!- hipe [n=hipe@pool-74-108-181-155.nycmny.east.verizon.net] has joined
#go-nuts
20:44 -!- sladegen [n=nemo@unaffiliated/sladegen] has quit [Nick collision from
services.]
20:44 < rovar> i used import "btbuffer"
20:44 < rovar> and yes
20:44 -!- sladegen [n=nemo@unaffiliated/sladegen] has joined #go-nuts
20:44 < sepoy> little more specificity: response.Body.Read(info); leaves
info as a nil, and returns 0 for the number of bytes read and no error
20:45 < Rob_Russell> rovar: try import "./btbuffer"
20:45 < alexsuraci> sepoy: perhaps you need to close the body for it to
finish reading
20:45 < Rob_Russell> sepoy: i've only used the server part of the package so
far, if you want to put the code in a pastebin i'll have a look at it tho
20:45 < alexsuraci> pkg docs says under Get: "Caller should close r.Body
when done reading it."
20:45 < alexsuraci> http://golang.org/pkg/http/#Response
20:46 < sepoy> alexsuraci: sadly, no - tried that
20:46 < alexsuraci> ah
20:46 < sepoy> Rob_Russell: I'd be happy to, though I don't actually know
how to create/use a pastebin - sorry
20:46 < alexsuraci> sepoy: try http://gopaste.org/ - just paste the source
in there
20:47 < alexsuraci> sepoy: what is len(info)?
20:47 < WalterMundt> is CString/GoString the only accepted way of
interfacing strings in cgo?  I.e.  is it encouraged to use them for passing
read-only strings to C? Also, I need to put a string's data into a larger work
buffer, and would like to avoid copying it twice.
20:48 -!- directrixx [n=directri@ip68-231-189-247.tc.ph.cox.net] has left #go-nuts
["Leaving"]
20:49 -!- directrixx [n=directri@ip68-231-189-247.tc.ph.cox.net] has joined
#go-nuts
20:49 < sepoy> http://gopaste.org/view/ki8zF
20:49 < sepoy> alexsuraci: thanks!  It's 0 as well
20:50 < alexsuraci> sepoy: yea, that must be it;
http://golang.org/pkg/io/#Reader
20:50 < alexsuraci> "Read reads up to len(p) bytes into p."
20:51 < sepoy> alexsuraci: so, how do I pass it a []byte which has a set
length associated with it?
20:51 < Eridius> sepoy: make([]byte, 50), no?
20:52 < alexsuraci> yeah
20:52 -!- cpr420 [n=cpr420@67.165.199.143] has joined #go-nuts
20:52 -!- Omei [n=chatzill@99-178-130-115.lightspeed.sndgca.sbcglobal.net] has
quit [Read error: 60 (Operation timed out)]
20:52 < alexsuraci> or just use an array maybe, since the length is fixed
20:52 < sepoy> you guys own!!
20:52 < sepoy> thanks :)
20:52 < alexsuraci> np
20:53 < alexsuraci> seems inconvenient that you have to specify a maximum
length, though
20:53 < chrome> WalterMundt: sounds like premature optimisation to me :)
20:53 -!- Sungem_ [i=Sungem@118-168-232-141.dynamic.hinet.net] has quit [Read
error: 104 (Connection reset by peer)]
20:54 < sepoy> I, obviously, thought []'s lengths were determined
dynamically.  But, I guess I can deal with the inconvenience if I have to
20:54 -!- Sungem [n=Sungem@118-168-236-85.dynamic.hinet.net] has joined #go-nuts
20:58 < jordyd> rovar, what steps are you using to make the packages?
20:58 -!- mitchellh [n=mitchell@D-69-91-143-119.dhcp4.washington.edu] has joined
#go-nuts
20:59 -!- aa [n=aa@r200-40-114-26.ae-static.anteldata.net.uy] has quit [Remote
closed the connection]
21:01 < jordyd> Hm...  the topic says "please use a pastebin (like
pastebin.com), but shouldn't it say "(like gopaste.org)"?
21:02 < alexsuraci> sepoy: they are, but this one expects it to already have
a length
21:02 < chrome> gopaste.org didn't exist until recently, I would think.
21:02 -!- lilpenguina [n=penguina@adsl-71-141-127-179.dsl.snfc21.pacbell.net] has
joined #go-nuts
21:03 < jordyd> chrome, true...  but that doesn't mean it's not a better
paste site for Go code.
21:03 < chrome> sure, let the ops know when they wake up
21:03 < alexsuraci> chrome: ~nov.  15th
21:03 < rovar> jordyd: just naming the file as the package..  i think I have
it worked out now though..
21:03 < alexsuraci> they're probably waiting for it to have dark-on-white
themes :P
21:04 -!- hagna [n=hagna@70.102.57.178] has joined #go-nuts
21:05 < WalterMundt> ack, library has a struct with a member named "map";
this causes cgo to generate invalid go code because map is a keywordf
21:07 < jordyd> WalterMundt, yeah, cgo is kind of clunky.
21:08 -!- Omei [n=chatzill@99-178-130-115.lightspeed.sndgca.sbcglobal.net] has
joined #go-nuts
21:09 -!- nutsh [n=nutsh@190.136.217.147] has joined #go-nuts
21:11 -!- Anders__ [n=Anders@c83-253-2-206.bredband.comhem.se] has joined #go-nuts
21:13 -!- sku [n=sk@217.175.15.45] has quit [Remote closed the connection]
21:13 -!- twhitbeck [n=tim@pool-74-109-232-37.pitbpa.fios.verizon.net] has quit
[Read error: 113 (No route to host)]
21:15 -!- GeoBSD [n=geocalc@lns-bzn-31-82-252-193-128.adsl.proxad.net] has joined
#go-nuts
21:16 -!- _newbie_ [n=kvirc@out-pix.zucchetti.com] has joined #go-nuts
21:16 -!- qbit_ [n=qbit_@c-75-71-160-106.hsd1.co.comcast.net] has quit [Read
error: 113 (No route to host)]
21:16 -!- GeoBSD [n=geocalc@lns-bzn-31-82-252-193-128.adsl.proxad.net] has quit
[Remote closed the connection]
21:16 -!- bantha [n=banthar@chello087207235199.chello.pl] has joined #go-nuts
21:16 -!- qbit_ [n=qbit_@c-75-71-160-106.hsd1.co.comcast.net] has joined #go-nuts
21:18 < XniX23> im having problems when i try to do make with SDL bindings
in gl directory...  i get a lot of lines similar to this:
typeof(glColor4ubVertex2fvSUN) *__cgo__1881; anyone knows what that could be?
21:19 -!- banthar [n=banthar@chello084010208203.chello.pl] has quit [Read error:
110 (Connection timed out)]
21:19 -!- mitchellh [n=mitchell@D-69-91-143-119.dhcp4.washington.edu] has quit
["Leaving."]
21:19 -!- _newbie_ [n=kvirc@out-pix.zucchetti.com] has left #go-nuts []
21:19 -!- tomestla [n=tom@78.251.170.97] has joined #go-nuts
21:22 -!- mitchellh [n=mitchell@69.91.143.119] has joined #go-nuts
21:22 -!- Omei_ [n=chatzill@99-178-130-115.lightspeed.sndgca.sbcglobal.net] has
joined #go-nuts
21:23 < bantha> XniX23: try: rm gl.go; make
21:23 -!- geocalc [n=geocalc@lns-bzn-31-82-252-231-91.adsl.proxad.net] has quit
[Read error: 110 (Connection timed out)]
21:23 -!- nictuku [n=nictuku@unaffiliated/nictuku] has joined #go-nuts
21:24 < XniX23> bantha: i dont think that would make it work, since i need
to run make in the main directory after that, and it need gl package
21:25 -!- werdan7 [n=w7@freenode/staff/wikimedia.werdan7] has joined #go-nuts
21:25 -!- mitchellh [n=mitchell@69.91.143.119] has quit [Client Quit]
21:26 < bantha> XniX23: it will regenerate gl.go from your opengl headers
21:26 < jordyd> You can't make clean to do that?
21:27 < bantha> gl.go may need some hand tunning
21:28 < XniX23> maybe, i had to change the package path to compile sdl dir
:\
21:29 < XniX23> anyway i tried your solution bantha but i get errors :)
21:30 -!- wildem [n=abochins@64.201.165.253] has left #go-nuts []
21:30 -!- skyfive [n=skyfive@173-11-110-86-SFBA.hfc.comcastbusiness.net] has quit
[Read error: 104 (Connection reset by peer)]
21:30 -!- c0nfl|ct [n=tiago@248-37.dial.nortenet.pt] has quit ["Saindo"]
21:31 -!- skyfive [n=skyfive@173.11.110.86] has joined #go-nuts
21:31 -!- scandal [n=nobody@unaffiliated/scandal] has left #go-nuts []
21:33 < bantha> XniX23: how about: make test-sdl ?
21:33 -!- raichoo [n=raichoo@i577BB388.versanet.de] has quit [Remote closed the
connection]
21:34 -!- rbohn [n=rbohn@192.206.100.4] has quit ["ChatZilla 0.9.85 [Firefox
3.0.15/2009101601]"]
21:34 < XniX23> ./test-sdl: error while loading shared libraries:
/home/phyro/go/pkg/linux_amd64/sdl_sdl.so: cannot open shared object file: No such
file or directory
21:35 < XniX23> without the . at the beginning...  anyway i give up with sdl
21:36 -!- Omei [n=chatzill@99-178-130-115.lightspeed.sndgca.sbcglobal.net] has
quit [Read error: 110 (Connection timed out)]
21:37 -!- Rob_Russell [n=chatzill@206-248-157-156.dsl.teksavvy.com] has quit
["ChatZilla 0.9.85 [Firefox 3.5.5/20091102152451]"]
21:42 -!- monkfish [n=chatzill@pc4231.stdby.hin.no] has joined #go-nuts
21:43 -!- jdp [n=justin@ool-435238c0.dyn.optonline.net] has joined #go-nuts
21:45 -!- clearscreen1 [n=clearscr@e248070.upc-e.chello.nl] has quit [Read error:
104 (Connection reset by peer)]
21:48 -!- nutsh [n=nutsh@190.136.217.147] has left #go-nuts []
21:51 < alexsuraci> If a ticket has been closed and I submit an update to
it, does it make a sound?
21:51 < alexsuraci> e.g.  does the owner git pinged?
21:58 -!- jeng [n=chatzill@75.110.231.66] has quit ["ChatZilla 0.9.85 [Firefox
3.5.5/20091102152451]"]
22:01 -!- nullpo [n=nullpo@221x252x46x83.ap221.ftth.ucom.ne.jp] has joined
#go-nuts
22:01 -!- double [n=double@host223-223-dynamic.33-79-r.retail.telecomitalia.it]
has quit [Remote closed the connection]
22:03 -!- itrekkie [n=itrekkie@72.200.106.163] has joined #go-nuts
22:03 < alexsuraci> s/git/get
22:03 < rovar> heh
22:04 < alexsuraci> probably the billionth time I've done that
22:05 -!- iant [n=iant@74.125.60.1] has quit [Read error: 145 (Connection timed
out)]
22:11 -!- aarapov [n=aarapov@r11mq202.net.upc.cz] has quit ["Leaving."]
22:13 -!- drusepth [n=drusepth@ppp-70-245-187-179.dsl.spfdmo.swbell.net] has
joined #go-nuts
22:13 -!- jordyd [n=jordyd@99-177-65-75.lightspeed.wepbfl.sbcglobal.net] has quit
["Leaving"]
22:13 -!- XniX23 [n=XniX23@89-212-198-49.dynamic.dsl.t-2.net] has quit [Remote
closed the connection]
22:14 -!- jordyd [n=jordyd@99-177-65-75.lightspeed.wepbfl.sbcglobal.net] has
joined #go-nuts
22:14 -!- MigoMipo [n=MigoMipo@84-217-14-221.tn.glocalnet.net] has quit []
22:15 -!- aaront [n=aaront@unaffiliated/aaront] has quit ["And that's all he
wrote..."]
22:16 -!- Anders__ [n=Anders@c83-253-2-206.bredband.comhem.se] has quit ["Lämnar"]
22:17 -!- turon__ [n=turon@c-24-218-205-57.hsd1.ma.comcast.net] has quit
["Leaving"]
22:18 -!- elmar [n=elmar@dslb-094-219-223-185.pools.arcor-ip.net] has quit
["Leaving"]
22:19 -!- Warmal [i=89fe0407@gateway/web/freenode/x-sqvbwmecwhbxyggf] has quit
[Ping timeout: 180 seconds]
22:22 -!- diltsman_ [n=diltsman@76.8.194.226] has joined #go-nuts
22:24 -!- asmo [n=asmo@c-f6c5e055.1155-1-64736c11.cust.bredbandsbolaget.se] has
quit [Remote closed the connection]
22:29 -!- snearch_ [n=olaf@g225048013.adsl.alicedsl.de] has joined #go-nuts
22:29 -!- mitchellh [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has joined
#go-nuts
22:31 -!- hackbench [n=hackbenc@78.179.182.49] has joined #go-nuts
22:31 -!- mbarkhau [n=koloss@p54A7EC80.dip.t-dialin.net] has quit ["Leaving."]
22:33 -!- djanderson [n=dja@hltncable.pioneerbroadband.net] has joined #go-nuts
22:34 -!- r2p2 [n=billy@v32671.1blu.de] has left #go-nuts []
22:35 -!- chachan [n=chachan@ccscliente156.ifxnetworks.net.ve] has quit ["KVIrc
Insomnia 4.0.0, revision: , sources date: 20090520, built on: 2009/06/06 11:44:47
UTC http://www.kvirc.net/"]
22:36 -!- skyfive [n=skyfive@173.11.110.86] has quit [Read error: 131 (Connection
reset by peer)]
22:37 -!- skyfive [n=skyfive@173.11.110.86] has joined #go-nuts
22:37 -!- shambler_ [i=kingrat@mm-17-196-84-93.dynamic.pppoe.mgts.by] has quit
["What you have been is not on boats."]
22:38 -!- hackbench [n=hackbenc@78.179.182.49] has quit [Remote closed the
connection]
22:42 -!- diltsman_ [n=diltsman@76.8.194.226] has quit []
22:44 -!- skyfive [n=skyfive@173.11.110.86] has quit [Read error: 131 (Connection
reset by peer)]
22:45 -!- skyfive [n=skyfive@173-11-110-86-SFBA.hfc.comcastbusiness.net] has
joined #go-nuts
22:45 -!- itrekkie [n=itrekkie@72.200.106.163] has quit []
22:46 -!- shoafb [n=The_Doct@cpe-98-150-247-183.hawaii.res.rr.com] has quit []
22:47 -!- sockmonk [n=user@pixout.appriss.com] has quit [Connection timed out]
22:47 -!- rbohn [n=rbohn@192.206.100.4] has joined #go-nuts
22:50 -!- Venom_X [n=pjacobs@66.54.185.131] has quit []
22:51 -!- me___ [n=venkates@c-68-55-179-48.hsd1.md.comcast.net] has joined
#go-nuts
22:51 -!- drusepth [n=drusepth@ppp-70-245-187-179.dsl.spfdmo.swbell.net] has quit
[Read error: 110 (Connection timed out)]
22:51 -!- Amaranth_ [n=travis@ubuntu/member/Amaranth] has joined #go-nuts
22:51 -!- hackbench [n=hackbenc@78.179.182.49] has joined #go-nuts
22:52 -!- Fraeon [n=kzer-za@e212-246-65-153.elisa-laajakaista.fi] has quit []
22:52 -!- _skyfive [n=skyfive@173-11-110-86-SFBA.hfc.comcastbusiness.net] has
joined #go-nuts
22:54 -!- franksalim [n=frank@adsl-76-221-202-115.dsl.pltn13.sbcglobal.net] has
quit [Remote closed the connection]
22:58 -!- cold-penguin [n=ben@92.12.177.241] has joined #go-nuts
22:59 < nickjohnson> Hm. There's no easy way to wrap rpc.Client.Go, it seems
22:59 < nickjohnson> Since you have to return any errors from DialHTTP in
the asynchronous manner it expects
23:00 -!- chrelad [n=chrelad@76.164.12.11] has quit ["[Q] 0.2.6.3"]
23:00 -!- kfx [n=kfx@location-b.madleet.net] has left #go-nuts []
23:01 -!- ShadowIce [n=pyoro@unaffiliated/shadowice-x841044] has quit
["Verlassend"]
23:02 -!- Fraeon [n=kzer-za@e212-246-65-153.elisa-laajakaista.fi] has joined
#go-nuts
23:05 -!- Fraeon [n=kzer-za@e212-246-65-153.elisa-laajakaista.fi] has quit [Client
Quit]
23:05 -!- _skyfive [n=skyfive@173-11-110-86-SFBA.hfc.comcastbusiness.net] has quit
[Read error: 104 (Connection reset by peer)]
23:06 -!- chid_ [n=mqqlbtis@c122-106-95-175.rivrw1.nsw.optusnet.com.au] has joined
#go-nuts
23:06 -!- _skyfive [n=skyfive@173-11-110-86-SFBA.hfc.comcastbusiness.net] has
joined #go-nuts
23:06 -!- Amaranth [n=travis@ubuntu/member/Amaranth] has quit [Read error: 113 (No
route to host)]
23:07 -!- Ibw [n=isaac@cpe-67-241-42-134.twcny.res.rr.com] has joined #go-nuts
23:10 -!- Omei_ [n=chatzill@99-178-130-115.lightspeed.sndgca.sbcglobal.net] has
quit [Read error: 60 (Operation timed out)]
23:11 < fosho> is it possible to convert uintptr to *interface{}?
23:14 < Ibw> How does cgo handle pointers to pointers?
23:14 < Ibw> and pointers to pointers to pointers, such as in gtk_init?
23:14 -!- cold-penguin [n=ben@92.12.177.241] has left #go-nuts ["Ex-Chat"]
23:14 -!- hackbench [n=hackbenc@78.179.182.49] has quit [Remote closed the
connection]
23:15 -!- nigwil [n=chatzill@203.13.22.2] has joined #go-nuts
23:15 -!- zerofluid [n=zeroflui@ip72-208-216-68.ph.ph.cox.net] has joined #go-nuts
23:15 -!- djanderson [n=dja@hltncable.pioneerbroadband.net] has quit [Connection
timed out]
23:22 -!- skyfive [n=skyfive@173-11-110-86-SFBA.hfc.comcastbusiness.net] has quit
[Connection timed out]
23:22 < WalterMundt> fosho: see unsafe.Pointer
23:22 < WalterMundt> you can convert uintptr to any pointer type via that
23:23 -!- bantha [n=banthar@chello087207235199.chello.pl] has quit [Read error:
110 (Connection timed out)]
23:24 -!- clearscreen [n=clearscr@e248070.upc-e.chello.nl] has joined #go-nuts
23:26 < Ibw> Any suggestions as to how to represent C's ** (pointer-pointer)
in Go?
23:26 < Ibw> Will something like ***char work just fine do you think?
23:26 < WalterMundt> probably
23:26 < WalterMundt> though you may need ***C.char at some points
23:26 < reppie> i'm a three star programmer
23:27 < Ibw> Is there any documentation on the C library besides the info in
the gmp folder?
23:30 -!- ajhager [n=ajhager@64.184.75.239] has quit [Read error: 145 (Connection
timed out)]
23:30 -!- crashR [n=crasher@codextreme.pck.nerim.net] has quit ["Leaving."]
23:30 < Ibw> *C package
23:31 -!- lux` [n=lux@151.54.240.211] has quit [Remote closed the connection]
23:31 < WalterMundt> Ibw: it's not a real package; it's a construct used by
cgo to make C identifiers visible in go
23:32 < WalterMundt> more directly, not that I know of
23:32 < WalterMundt> you can see what it's doing behind the curtains by
looking at the .cgo{1,2}.go files
23:32 < Ibw> I understand that, but there are some special functions that
come along with C that aren't part of whatever C files you include
23:32 < Ibw> hmm
23:32 < Ibw> alright
23:32 < WalterMundt> .cgo1 is your code, but with all C.* -> _C_*
23:32 < Ibw> thanks for that
23:33 < WalterMundt> and then .cgo2 defines all the references _C_* symbols
by referencing the C code in cgo3,4
23:33 -!- hackbench [n=hackbenc@78.179.182.49] has joined #go-nuts
23:33 -!- _skyfive [n=skyfive@173-11-110-86-SFBA.hfc.comcastbusiness.net] has quit
[Remote closed the connection]
23:33 -!- sjhor [n=simon@93-97-29-93.zone5.bethere.co.uk] has quit [Read error:
113 (No route to host)]
23:34 < alexsuraci> gopaste now has multi-file capabilities :D
23:35 < alexsuraci> http://gopaste.org/view/w6L1t
23:35 < fosho> WalterMundt: thanks on the right path now at least
23:36 < WalterMundt> You're welcome; I'm just getting started with cgo
myself
23:36 < WalterMundt> ran into a bug earlier, but it's already fixed and all
I had to do was update and rebuild
23:37 < Ibw> What was the bug?
23:38 -!- lenst [n=user@81-237-244-185-no52.tbcn.telia.com] has quit [Read error:
110 (Connection timed out)]
23:39 -!- maxiepax [n=max@c-eb7be155.360-1-64736c12.cust.bredbandsbolaget.se] has
joined #go-nuts
23:39 < WalterMundt> Ibw: it produced invalid go code if a referenced C
struct had a member named after a Go keyword
23:39 < Ibw> ah
23:40 < WalterMundt> new cgo just prepends underscores until the problems go
away
23:40 < WalterMundt> it's as hacky as the rest of the tool, but it works and
I am happy I didn't have to implement it myself
23:41 < Ibw> ya
23:41 < WalterMundt> I was about to when I ran into the code to do it, and
realized I hadn't recompiled since I last did a hg pull
23:41 -!- snearch_ [n=olaf@g225048013.adsl.alicedsl.de] has quit ["Ex-Chat"]
23:42 -!- Volfram [n=mist@87.246.131.149] has joined #go-nuts
23:42 -!- Volfram [n=mist@87.246.131.149] has left #go-nuts ["Leaving"]
23:42 < Ibw> huh, the cgo source isn't really all that long
23:45 < WalterMundt> nope, it's actually pretty intelligible
23:45 < Gracenotes> I wonder why it feels like a friday
23:45 -!- bakkdoor [n=bakkdoor@s15229144.onlinehome-server.info] has joined
#go-nuts
23:45 < KirkMcDonald> Gracenotes: Three-day week?
23:45 < WalterMundt> I wasn't amazed, but I was pleasantly surprised when I
looked around in it
23:45 < Gracenotes> well, two-day week for me
23:46 < Gracenotes> but even thursdays don't feel like fridays.  hrm.
23:46 < Gracenotes> I must have gotten the laid back, few-people-in-class
vibe
23:47 < bakkdoor> i'm getting an error when trying to import a custom
package.  it tells me it cant find it.  is there any special structure/convention
I need to use?
23:47 -!- scarabx [n=scarabx@c-24-147-239-120.hsd1.ma.comcast.net] has joined
#go-nuts
23:48 -!- ssmall [n=stuart@129.110.242.7] has joined #go-nuts
23:49 < WalterMundt> backdoor: the package needs to be a .5/6/8 file
accessible by the path you import relative to either $GOROOT/pkg or a directory
you pass to 6g/8g via -I <dir>
23:50 < WalterMundt> I think .a files can work too; the build system for the
standard libraries packs its packages in them before putting them in $GOROOT/pkg
via a tool called gopack
23:51 -!- lenst [n=user@81-237-244-185-no52.tbcn.telia.com] has joined #go-nuts
23:54 < Ibw> bakkdoor, You need to compile the package
23:54 < Ibw> oh
23:54 < Ibw> hah
23:54 < Ibw> too late
23:55 < WalterMundt> nah, you're correct and I hadn't precisely mentioned
that
23:56 -!- itrekkie [n=itrekkie@ip72-200-106-163.tc.ph.cox.net] has joined #go-nuts
23:56 < bakkdoor> hm still doesnt work
23:58 -!- ssmall [n=stuart@129.110.242.7] has quit ["Leaving."]
23:59 < bakkdoor> only works, if i pass in the path to the .a file (_obj/
within directory of library)
--- Log closed Tue Nov 24 00:00:29 2009