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

--- Log opened Fri Aug 13 00:00:05 2010
00:03 -!- xash [~xash@d063105.adsl.hansenet.de] has quit [Ping timeout: 264
seconds]
00:06 -!- Byron [~Byron@cpe-98-155-138-202.hawaii.res.rr.com] has joined #go-nuts
00:07 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts
00:09 -!- decaf [~mehmet@85.102.51.172] has quit [Ping timeout: 265 seconds]
00:11 -!- decaf [~mehmet@85.96.59.27] has joined #go-nuts
00:15 -!- skelterjohn [~jasmuth@nat02-nbpwireless-ext.rutgers.edu] has joined
#go-nuts
00:21 -!- skelterjohn [~jasmuth@nat02-nbpwireless-ext.rutgers.edu] has quit [Quit:
skelterjohn]
00:21 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has joined #go-nuts
00:24 -!- raylu [raylu@adsl-75-53-103-63.dsl.hstntx.sbcglobal.net] has quit [Quit:
;)]
00:25 -!- carllerche [~carllerch@enginey-9.border1.sfo002.pnap.net] has quit
[Quit: carllerche]
00:25 -!- skelterjohn [~jasmuth@nat02-nbpwireless-ext.rutgers.edu] has joined
#go-nuts
00:26 -!- napsy [~luka@212.235.174.112] has quit [Ping timeout: 276 seconds]
00:29 -!- raylu [raylu@adsl-75-53-103-63.dsl.hstntx.sbcglobal.net] has joined
#go-nuts
00:37 -!- skelterjohn [~jasmuth@nat02-nbpwireless-ext.rutgers.edu] has quit [Quit:
skelterjohn]
00:38 -!- Byron [~Byron@cpe-98-155-138-202.hawaii.res.rr.com] has left #go-nuts []
00:40 -!- steveno [~stevenoli@pool-74-99-22-170.clrkwv.east.verizon.net] has
joined #go-nuts
00:40 -!- steveno [~stevenoli@pool-74-99-22-170.clrkwv.east.verizon.net] has quit
[Changing host]
00:40 -!- steveno [~stevenoli@paludis/cheerleader/steveno] has joined #go-nuts
00:43 -!- skelterjohn [~jasmuth@nat02-nbpwireless-ext.rutgers.edu] has joined
#go-nuts
00:48 -!- skelterjohn [~jasmuth@nat02-nbpwireless-ext.rutgers.edu] has quit [Quit:
skelterjohn]
00:49 -!- carllerche [~carllerch@208.87.61.203] has joined #go-nuts
00:54 -!- artefon [~thiago@189.107.155.106] has joined #go-nuts
00:56 -!- photron [~photron@port-92-201-163-21.dynamic.qsc.de] has quit [Read
error: Operation timed out]
00:58 -!- decaf [~mehmet@85.96.59.27] has quit [Read error: Connection reset by
peer]
01:02 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has quit [Ping timeout:
620 seconds]
01:05 -!- steveno [~stevenoli@paludis/cheerleader/steveno] has quit [Quit:
steveno]
01:05 -!- jramnani [~jramnani@adsl-75-3-116-234.dsl.chcgil.sbcglobal.net] has
joined #go-nuts
01:07 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has joined #go-nuts
01:07 -!- mattikus [~mattikus@ip24-250-73-154.br.br.cox.net] has joined #go-nuts
01:10 -!- carllerche [~carllerch@208.87.61.203] has quit [Quit: carllerche]
01:21 -!- artefon [~thiago@189.107.155.106] has quit [Quit: bye]
01:28 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts
01:37 -!- lauanana [~lauanana@212-198-248-35.rev.numericable.fr] has joined
#go-nuts
01:37 -!- lauanana [~lauanana@212-198-248-35.rev.numericable.fr] has quit [Client
Quit]
01:39 -!- nf [~nf@124-169-130-135.dyn.iinet.net.au] has quit [Remote host closed
the connection]
01:40 -!- nf [~nf@124-169-137-35.dyn.iinet.net.au] has joined #go-nuts
01:47 -!- jramnani [~jramnani@adsl-75-3-116-234.dsl.chcgil.sbcglobal.net] has quit
[Quit: jramnani]
01:47 -!- derferman [~derferman@dsl092-048-218.sfo4.dsl.speakeasy.net] has quit
[Quit: derferman]
02:00 -!- jcao219 [~Jimmy_Cao@124.126.194.114] has joined #go-nuts
02:02 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Read error: Connection
reset by peer]
02:02 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts
02:03 -!- jcao219 [~Jimmy_Cao@124.126.194.114] has left #go-nuts []
02:15 -!- jcao219 [~Jimmy_Cao@124.126.194.114] has joined #go-nuts
02:16 -!- jramnani [~jramnani@adsl-75-3-116-234.dsl.chcgil.sbcglobal.net] has
joined #go-nuts
02:17 -!- Xenith [~xenith@2001:470:0:a9:226:b0ff:fee3:3a0c] has quit [Quit:
leaving]
02:25 -!- DerHorst_ [~Horst@e176099009.adsl.alicedsl.de] has quit [Remote host
closed the connection]
02:25 -!- steveno [~stevenoli@pool-74-99-22-170.clrkwv.east.verizon.net] has
joined #go-nuts
02:25 -!- steveno [~stevenoli@pool-74-99-22-170.clrkwv.east.verizon.net] has quit
[Changing host]
02:25 -!- steveno [~stevenoli@paludis/cheerleader/steveno] has joined #go-nuts
02:27 -!- steveno [~stevenoli@paludis/cheerleader/steveno] has quit [Client Quit]
02:39 -!- skelterjohn [~jasmuth@c-76-116-182-139.hsd1.nj.comcast.net] has joined
#go-nuts
02:45 -!- skelterjohn [~jasmuth@c-76-116-182-139.hsd1.nj.comcast.net] has quit
[Quit: skelterjohn]
02:54 -!- derferman [~derferman@c-98-207-60-44.hsd1.ca.comcast.net] has joined
#go-nuts
02:56 -!- mikespook [~mikespook@219.137.254.121] has joined #go-nuts
03:02 < plexdev> http://is.gd/eflR9 by [Rob Pike] in 3 subdirs of go/ --
delete pkg/once
03:02 -!- rejb [~rejb@unaffiliated/rejb] has quit [Ping timeout: 276 seconds]
03:08 -!- skelterjohn [~jasmuth@c-76-116-182-139.hsd1.nj.comcast.net] has joined
#go-nuts
03:09 -!- skelterjohn [~jasmuth@c-76-116-182-139.hsd1.nj.comcast.net] has quit
[Client Quit]
03:16 -!- rogue780 [~rogue780@c-68-34-234-213.hsd1.md.comcast.net] has quit [Read
error: Connection reset by peer]
03:16 -!- rogue780 [~rogue780@c-68-34-234-213.hsd1.md.comcast.net] has joined
#go-nuts
03:17 -!- cco3 [~conley@c-69-181-138-209.hsd1.ca.comcast.net] has quit [Ping
timeout: 246 seconds]
03:19 -!- kingfishr [~kingfishr@c-24-130-147-77.hsd1.ca.comcast.net] has quit
[Ping timeout: 240 seconds]
03:19 -!- kingfishr [~kingfishr@c-24-130-147-77.hsd1.ca.comcast.net] has joined
#go-nuts
03:27 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has quit [Ping timeout: 264
seconds]
03:30 -!- gid [~gid@220-253-58-217.VIC.netspace.net.au] has joined #go-nuts
03:31 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has joined #go-nuts
03:33 -!- gid [~gid@220-253-58-217.VIC.netspace.net.au] has quit [Client Quit]
03:42 -!- gid [~gid@220-253-58-217.VIC.netspace.net.au] has joined #go-nuts
03:48 -!- rbraley [~rbraley@ip72-222-128-78.ph.ph.cox.net] has joined #go-nuts
04:00 -!- jA_cOp [~yakobu@unaffiliated/ja-cop/x-9478493] has quit [Quit: Leaving]
04:04 -!- jcao2191 [~Jimmy_Cao@124.126.194.114] has joined #go-nuts
04:07 -!- jcao219 [~Jimmy_Cao@124.126.194.114] has quit [Ping timeout: 248
seconds]
04:08 -!- carllerche [~carllerch@208.87.61.203] has joined #go-nuts
04:08 -!- carllerche [~carllerch@208.87.61.203] has quit [Client Quit]
04:11 -!- jramnani [~jramnani@adsl-75-3-116-234.dsl.chcgil.sbcglobal.net] has quit
[Quit: jramnani]
04:18 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
04:35 < plexdev> http://is.gd/efrv0 by [Alex Brainman] in 2 subdirs of
go/src/pkg/ -- os: implement env using native windows api.
04:54 -!- sacho [~sacho@213.91.244.15] has joined #go-nuts
05:03 -!- scm [justme@d071253.adsl.hansenet.de] has quit [Ping timeout: 240
seconds]
05:04 -!- scm [justme@d071110.adsl.hansenet.de] has joined #go-nuts
05:06 -!- RobertLJ_ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined
#go-nuts
05:16 -!- ukai [~ukai@nat/google/x-njyahxzoqwzgpoyi] has quit [Ping timeout: 240
seconds]
05:28 -!- mattikus [~mattikus@ip24-250-73-154.br.br.cox.net] has quit [Remote host
closed the connection]
05:33 -!- rogue780 [~rogue780@c-68-34-234-213.hsd1.md.comcast.net] has quit [Ping
timeout: 265 seconds]
05:37 -!- pjm0616 [~user@110.9.28.120] has quit [Ping timeout: 264 seconds]
05:38 -!- pjm0616 [~user@110.9.28.120] has joined #go-nuts
05:43 -!- ukai [~ukai@nat/google/x-adpymbpijoiqulkb] has joined #go-nuts
05:44 -!- jcao219 [~Jimmy_Cao@124.126.194.114] has quit [Quit: Leaving.]
05:55 -!- tvw [~tv@e176003004.adsl.alicedsl.de] has joined #go-nuts
06:13 -!- RobertLJ_ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit
[Remote host closed the connection]
06:17 -!- tvw [~tv@e176003004.adsl.alicedsl.de] has quit [Remote host closed the
connection]
06:17 -!- tvw [~tv@e176003004.adsl.alicedsl.de] has joined #go-nuts
06:24 -!- tvw [~tv@e176003004.adsl.alicedsl.de] has quit [Ping timeout: 265
seconds]
06:25 -!- smw [~stephen@pool-71-183-88-124.nycmny.fios.verizon.net] has joined
#go-nuts
06:31 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
06:32 -!- smw [~stephen@pool-71-183-88-124.nycmny.fios.verizon.net] has quit [Ping
timeout: 265 seconds]
06:37 < plexdev> http://is.gd/efz9F by [Russ Cox] in go/src/pkg/runtime/ --
runtime: fix another stack split bug
06:43 -!- derferman [~derferman@c-98-207-60-44.hsd1.ca.comcast.net] has quit
[Quit: derferman]
06:49 -!- wrtp [~rog@92.17.96.138] has joined #go-nuts
06:50 < nsf> hehe, Alexandrescu spotted in the Go ML :D
06:51 < rsaarelm> Yeah, noticed that.
06:53 < rsaarelm> His opinion on adding generics to Go: "not doing so is in
my opinion not an option."
06:56 < nsf> People will keep asking about generics until they w
06:56 < nsf> will be implemented
06:56 < nf> i find it ironic that he brings up that critique of mozart's
music
06:56 < nsf> because no one wants to write binary searches by hand
06:56 < nf> because i think mozart was overly ornate, and did, in a sense,
use too many notes
06:56 < nf> i would hate to read mozart's code ;)
06:57 < rsaarelm> Well I'm inclined to worry about generics a bit louder
after the devs gave the talk where they said that they seem to be doing just fine
without generics in practice.
06:57 < rsaarelm> Which kinda gives a different vibe than the original "we
see how these'd be useful and are working on the best way to implement them".
06:58 < nf> we have also said that we're still looking at ways of doing it
06:58 < nsf> I think that this is mostly a Rob Pike's opinion
06:58 < rsaarelm> Ok, right.
06:58 < rsaarelm> Well, I'll go back to worrying about the lack of generics
quietly then.
06:58 < nf> we have an idea for them that we're working on, it's just not a
feature we want to implement badly
06:58 < nf> so it needs to be explored really thoroughly
06:59 < taruti> Implementing generics well is more important than getting
generics next week.
06:59 < rsaarelm> Definitely.
06:59 < nf> don't worry - i'm also concerned that generics (in some form)
are important
06:59 < nsf> Go is new after all!  there were days when Walter Bright didn't
want to see generics in his language too
06:59 < nsf> :D
06:59 < taruti> And the lack of generics is bad mainly for library code.
07:00 < taruti> A more advanced type system on the other hand ;)
07:03 < rsaarelm> Algebraic data types!
07:04 < rsaarelm> I wonder if it was possible to actually plug those in
without messing everything up?
07:05 < taruti> just that *ML like polymorphism would be much nicer than the
Java variety
07:07 < taruti> rsaarelm: algebraic datatypes can be simulated well enough
07:10 < taruti> "data A = B | C" => type A inteterface{ IsA() }; type B
struct {}; func (*B)IsA(); type C struct {}; func (*C)IsA()
07:10 < taruti> "case x of B -> foo ; C -> bar" => "switch x.(type)
{ B: foo; C: bar }"
07:11 < taruti> and it can be closed by keeping the interface membership
method not exported
07:15 < taruti> (and the latter can be optimized quite well in practise)
07:16 < rsaarelm> Yeah, something like that will work.  Not as nice as
idiomatic Maybe and Either algebraic types for instance though.
07:17 -!- ikaros [~ikaros@dslb-188-097-010-191.pools.arcor-ip.net] has joined
#go-nuts
07:20 < taruti> rsaarelm: that comes from the lack of type parameters though
07:20 -!- vcc [~vcc@210.22.5.158] has joined #go-nuts
07:21 < taruti> given type parameters conversion to the interface style
would work
07:22 < taruti> now GADTs on the other hand :)
07:23 < taruti> hmm, or not.
07:26 -!- wrtp [~rog@92.17.96.138] has quit [Ping timeout: 276 seconds]
07:27 -!- rogue780 [~rogue780@c-68-34-234-213.hsd1.md.comcast.net] has joined
#go-nuts
07:32 -!- wrtp [~rog@92.17.96.138] has joined #go-nuts
07:33 -!- vcc [~vcc@210.22.5.158] has quit []
07:39 < plexdev> http://is.gd/efDhe by [Rob Pike] in go/src/pkg/fmt/ --
fmt/print: honor Formatter in Print, Println.
07:39 -!- mbohun [~mbohun@202.124.74.26] has quit [Ping timeout: 240 seconds]
07:45 -!- mbohun [~mbohun@202.124.75.192] has joined #go-nuts
07:49 -!- smw [~stephen@pool-71-183-88-124.nycmny.fios.verizon.net] has joined
#go-nuts
07:50 -!- saschpe [~quassel@mgdb-4d0cf1ad.pool.mediaWays.net] has joined #go-nuts
07:51 -!- viirya [~viirya@cml506-25.csie.ntu.edu.tw] has quit [Ping timeout: 276
seconds]
07:53 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3]
07:56 -!- smw [~stephen@pool-71-183-88-124.nycmny.fios.verizon.net] has quit [Ping
timeout: 265 seconds]
08:09 -!- Project_2501 [~Marvin@82.84.75.51] has joined #go-nuts
08:16 -!- Eridius [~kevin@unaffiliated/eridius] has quit [Ping timeout: 246
seconds]
08:16 -!- path[l] [UPP@120.138.102.50] has quit [Quit: path[l]]
08:17 -!- napsy [~luka@212.235.174.112] has joined #go-nuts
08:23 -!- mbohun [~mbohun@202.124.75.192] has quit [Ping timeout: 265 seconds]
08:24 -!- mbohun [~mbohun@202.124.75.60] has joined #go-nuts
08:32 -!- ExtraSpice [~XtraSpice@88.118.32.225] has joined #go-nuts
08:33 -!- jcao219 [~Jimmy_Cao@124.126.194.114] has joined #go-nuts
08:34 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
08:38 -!- path[l] [~path@122.182.0.38] has joined #go-nuts
08:40 -!- path[l]_ [~path@59.162.86.164] has joined #go-nuts
08:41 -!- derferman [~derferman@c-98-207-60-44.hsd1.ca.comcast.net] has joined
#go-nuts
08:43 -!- path[l] [~path@122.182.0.38] has quit [Ping timeout: 265 seconds]
08:44 -!- mbohun [~mbohun@202.124.75.60] has quit [Quit: Leaving]
08:58 < taruti> What was the idiom for multiple method implementations with
shared fields?
08:58 -!- napsy [~luka@212.235.174.112] has quit [Ping timeout: 276 seconds]
08:59 < taruti> type FooI interface { Bar() }; type Foo struct { FooI; ...
}; type ImplA struct{*Foo}; func (*ImplA)Bar() { ...  } ?
09:02 < rsaarelm> What does including the FooI interface name in the Foo
struct definition mean?
09:03 < taruti> rsaarelm: that the struct embeds the interface?
09:03 < rsaarelm> Structs embed other structs.  The interface just specifies
methods and methods aren't included in struct definitions...
09:04 < taruti> rsaarelm: see e.g.
http://golang.org/doc/effective_go.html#embedding <- "type Job"
09:05 < taruti> I think it could be done.
09:06 < rsaarelm> Job embeds Logger, which is a struct.
09:06 < rsaarelm> You can embed interfaces in interfaces and structs in
structs, but I'm not seeing how interface in struct makes sense.
09:07 < taruti> "package main; type I interface { IF() } ; type S struct {
I; V int }" compiles fine
09:07 < rsaarelm> Huh.
09:08 < rsaarelm> What does that mean for type S then?
09:08 < taruti> that S implements I
09:09 < rsaarelm> Isn't that done by specifying method IF with S as a
receiver?
09:09 < taruti> http://pastebin.com/rSQ5nkFw
09:09 -!- mikespook [~mikespook@219.137.254.121] has quit [Quit: Leaving.]
09:10 < rsaarelm> Ah, like that...
09:11 < rsaarelm> So it's really "something will be embedded here that
implements I"?
09:11 < taruti> yes
09:11 < rsaarelm> That's handy.
09:12 < taruti> now I want that implementation to get access to the struct
:)
09:12 < rsaarelm> Go poking around with reflection?
09:13 < taruti> basically a Go way to do: class B { public: int i; func
foo(); }; class D1 :B {}; func D1:B() { this.i*=2 }
09:13 -!- geoff_ [180638ce@gateway/web/freenode/ip.24.6.56.206] has joined
#go-nuts
09:14 -!- geoff_ [180638ce@gateway/web/freenode/ip.24.6.56.206] has quit [Client
Quit]
09:15 < rsaarelm> So you want to poke with fields in the struct you declare
as embedded using an interface type instead of the concrete struct type, when the
interface type can give no guarantee of the presence of any fields in the
instantiating type or even that it is actually a struct?
09:16 < taruti> rsaarelm: I am thinking of passing around a struct embedding
an interface referring to that struct :)
09:17 < rsaarelm> That's making my brain hurt a bit.
09:19 < taruti> the problem becomes the lack of a recursive let
09:20 < taruti> i.e.:
09:20 < taruti> type I interface { IF() int }
09:20 < taruti> type S struct { I; V int }
09:20 < taruti> type IA struct { *S }
09:20 < taruti> func (s*IA)IF() int { return 2*s.V}
09:20 < taruti> but now constructing such a value becomes problematic
09:21 -!- derferman [~derferman@c-98-207-60-44.hsd1.ca.comcast.net] has quit
[Quit: derferman]
09:22 < taruti> rsaarelm: this works http://pastebin.com/vcRD7FTc :)
09:24 < rsaarelm> What happens if you try to call s.IF() without the middle
line?
09:24 < rsaarelm> The same as trying to call it on a nil value I guess.
09:27 < rsaarelm> I can't find any clear mention of the interface in struct
embedding in the docs, but it is mentioned on the mailing list.
09:30 -!- ExtraSpice [~XtraSpice@88.118.32.225] has quit [Quit: Leaving]
09:30 < nsf> "go AST: First step towards augmenting AST with full type
information."
09:30 < nsf> that's interesting
09:31 < nsf> I wonder how it will affect my gocode project
09:32 < taruti> rsaarelm: yes
09:32 * taruti wonders whether there is a simpler way to do this
09:38 -!- Fish-Work [~Fish@86.65.182.207] has quit [Ping timeout: 252 seconds]
09:39 -!- snearch [~snearch@f053003223.adsl.alicedsl.de] has joined #go-nuts
09:45 -!- ExtraSpice [~XtraSpice@88.118.32.225] has joined #go-nuts
09:45 -!- Adys [~Adys@unaffiliated/adys] has quit [Ping timeout: 265 seconds]
09:54 -!- photron [~photron@port-92-201-237-173.dynamic.qsc.de] has joined
#go-nuts
09:57 -!- Fish-Work [~Fish@86.65.182.207] has joined #go-nuts
09:58 -!- path[l] [~path@59.162.86.164] has quit [Remote host closed the
connection]
09:58 -!- path[l] [~path@59.162.86.164] has joined #go-nuts
10:11 -!- lmoura_ [~lauromour@187.59.120.169] has joined #go-nuts
10:12 -!- lmoura [~lauromour@187.113.98.213] has quit [Ping timeout: 252 seconds]
10:16 -!- jessta [~jessta@124-168-205-174.dyn.iinet.net.au] has joined #go-nuts
10:16 -!- tvw [~tv@212.79.9.150] has joined #go-nuts
10:32 -!- General1337 [~support@71-84-50-230.dhcp.mtpk.ca.charter.com] has joined
#go-nuts
10:36 -!- General13372 [~support@71-84-50-230.dhcp.mtpk.ca.charter.com] has quit
[Ping timeout: 252 seconds]
10:36 < wrtp> rsaarelm: it's catered for in the language reference by the
bit that says any embedded type includes its method set in the outer method set
10:37 < rsaarelm> Ah, ok.
10:38 < wrtp> "If S contains an anonymous field T, the method set of S
includes the method set of T.
10:38 < wrtp> "
10:38 < rsaarelm> So it's an officially supported feature, and there's less
expectation of it going away silently.  Good.
10:38 < wrtp> yeah.  it's a nice feature.
10:42 -!- wrtp_ [~rog@92.17.96.138] has joined #go-nuts
10:42 -!- wrtp [~rog@92.17.96.138] has quit [Read error: Connection reset by peer]
11:04 -!- jcao219 [~Jimmy_Cao@124.126.194.114] has quit [Quit: dinner]
11:19 -!- jcao219 [~Jimmy_Cao@124.126.194.114] has joined #go-nuts
11:34 -!- femtoo [~femto@95-89-197-20-dynip.superkabel.de] has joined #go-nuts
11:41 -!- visof [~visof@unaffiliated/visof] has joined #go-nuts
11:42 -!- boscop [~boscop@g227114048.adsl.alicedsl.de] has joined #go-nuts
11:47 -!- wrtp [~rog@92.17.96.138] has quit [Ping timeout: 265 seconds]
11:53 -!- wrtp [~rog@92.17.47.10] has joined #go-nuts
12:03 -!- inittab- [~dlbeer@ip-118-90-103-17.xdsl.xnet.co.nz] has joined #go-nuts
12:03 -!- inittab [~dlbeer@ip-118-90-56-177.xdsl.xnet.co.nz] has quit [Ping
timeout: 240 seconds]
12:16 -!- navigator [~navigator@p54897A36.dip.t-dialin.net] has joined #go-nuts
12:26 -!- MizardX- [~MizardX@unaffiliated/mizardx] has joined #go-nuts
12:27 -!- MizardX [~MizardX@unaffiliated/mizardx] has quit [Ping timeout: 276
seconds]
12:28 -!- skelterjohn [~jasmuth@c-76-116-182-139.hsd1.nj.comcast.net] has joined
#go-nuts
12:48 < rsaarelm>
http://www.reddit.com/r/programming/comments/d093k/andrei_alexandrescu_about_the_d_programming/c0wn0a3
Alexandrescu talks about Facebook considering the adoption of D. Things may become
more interesting if Facebook gets behind D, though it isn't quite the tech giant
Google is.
12:51 < jcao219> what, facebook is considering the adoption of D?
12:51 < jcao219> what?
12:51 < rsaarelm> For some small projects at first.
12:51 < jcao219> oh
12:53 < rsaarelm> But apparently they've got an itch for a systems level
language whose name doesn't start with C.
12:54 < rsaarelm> Or J.
12:54 < rsaarelm> I'm not sure if Java is considered a systems language or
not.
12:54 < jcao219> lol
12:54 < jcao219> i don't think so
12:54 < MizardX> Go?
12:54 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Ping timeout: 276 seconds]
12:55 < jcao219> if you use the unsafe package a lot
12:55 < jcao219> Go can be, i guess
12:55 < taruti> Is there no standard way to split lines?
12:55 < rsaarelm> Go is supposed to be, yeah.  There was some debate on the
ML D thread about whether it really is.
12:55 < jcao219> oh
12:55 -!- angasule [c80571ea@gateway/web/freenode/ip.200.5.113.234] has joined
#go-nuts
12:56 * taruti thinks the "it is not" is mostly rubbish
12:56 < taruti> strings.Split does not help against optional \r:s
12:57 < rsaarelm> Ah, those.  Guess they didn't think of them since they
don't have an official Windows port either.
12:57 < taruti> seems like something that *should* be in the standard
library
12:58 < taruti> rsaarelm: web applications also
12:58 < taruti> since web browsers can submit \r\n too
12:58 < jessta> taruti: so split on '\n' and then check for '\r'
12:59 < rsaarelm> Would a SplitLines function that splits at either \n or
\r\n in the strings package be a nice enough standard solution?
12:59 < taruti> rsaarelm: yes
13:00 < rsaarelm> Having to explicitly check for the \rs is a sure way to
forget to do it at some point where it'll end up mattering months later.
13:00 < jessta> jcao219: system level stuff is always unsafe
13:00 < jcao219> yea
13:00 < taruti> thus marking it explicitely is a *good* idea
13:01 < rsaarelm> Should be quick enough to write a patch for a function
like that and submit it.
13:01 -!- macroron [~ron@c-98-242-168-49.hsd1.fl.comcast.net] has joined #go-nuts
13:01 < taruti> rsaarelm: ok, I can do that.
13:04 < hokapoka> The json package works a treat, using Go just keeps
getting better :)
13:04 < jessta> rsaarelm: java isn't a systems language, it lacks control
over memory layout
13:14 -!- skelterjohn [~jasmuth@c-76-116-182-139.hsd1.nj.comcast.net] has quit
[Quit: skelterjohn]
13:15 -!- zozoR [~zozoR@0x5da69cf2.cpe.ge-0-1-0-1105.hsnqu1.customer.tele.dk] has
joined #go-nuts
13:16 < taruti> hmm
13:17 < taruti> when thinking about the SplitLines solution is not very good
for Go
13:17 < taruti> (we really want a stream transformer)
13:23 -!- skelterjohn [~jasmuth@c-76-116-182-139.hsd1.nj.comcast.net] has joined
#go-nuts
13:31 -!- iant [~iant@216.239.45.130] has quit [Ping timeout: 240 seconds]
13:34 -!- turbinio [~tobias@141.76.6.195] has joined #go-nuts
13:34 -!- skelterjohn [~jasmuth@c-76-116-182-139.hsd1.nj.comcast.net] has quit
[Quit: skelterjohn]
13:37 -!- zaero [~eclark@valkyrie.buick455.com] has joined #go-nuts
13:42 < MizardX> Two SplitLines implementations: http://ideone.com/JvO6P
13:43 < MizardX> beh...  small bug.  Fixed: http://ideone.com/w6wol
13:44 -!- navigator [~navigator@p54897A36.dip.t-dialin.net] has quit [Quit:
Leaving]
13:48 < taruti> MizardX: yes.  but probably strings should not depend on
vector (don't know)
13:49 < MizardX> Could alway duplicate the vector-code...
13:49 < MizardX> always*
13:49 -!- turbinio [~tobias@141.76.6.195] has left #go-nuts []
13:51 -!- leimy_ [~dave@pool-71-164-13-100.sttlwa.fios.verizon.net] has joined
#go-nuts
13:57 -!- iant [~iant@66.109.103.22] has joined #go-nuts
13:57 -!- mode/#go-nuts [+v iant] by ChanServ
13:57 -!- lapinferoce [~chatzilla@162.72.64-86.rev.gaoland.net] has joined
#go-nuts
14:04 -!- plainhao [~plainhao@mail.xbiotica.com] has joined #go-nuts
14:09 -!- Xiaobo [~Xiaobo@61.48.211.178] has joined #go-nuts
14:15 -!- skelterjohn [~jasmuth@c-76-116-182-139.hsd1.nj.comcast.net] has joined
#go-nuts
14:22 -!- Xiaobo [~Xiaobo@61.48.211.178] has quit [Quit: Leaving]
14:23 -!- Xiaobo [~Xiaobo@61.48.211.178] has joined #go-nuts
14:25 -!- Xiaobo [~Xiaobo@61.48.211.178] has quit [Client Quit]
14:26 -!- skelterjohn [~jasmuth@c-76-116-182-139.hsd1.nj.comcast.net] has quit
[Quit: skelterjohn]
14:34 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts
14:35 -!- path[l]_ [~path@122.182.0.38] has joined #go-nuts
14:39 -!- path[l]_ [~path@122.182.0.38] has quit [Client Quit]
14:39 -!- path[l] [~path@59.162.86.164] has quit [Ping timeout: 265 seconds]
14:42 -!- path[l] [~path@59.162.86.164] has joined #go-nuts
14:42 -!- path[l] [~path@59.162.86.164] has quit [Client Quit]
14:51 -!- Xiaobo [~Xiaobo@61.48.211.178] has joined #go-nuts
14:54 -!- visof [~visof@unaffiliated/visof] has quit [Quit: Leaving]
14:55 -!- hstimer [~hstimer@c-76-103-155-13.hsd1.ca.comcast.net] has joined
#go-nuts
14:56 < taruti> Is there a way to recover the panic location from recover?
14:56 * taruti would like to print the backtrace and then continue
14:57 -!- iant [~iant@66.109.103.22] has quit [Quit: Leaving.]
14:57 -!- lmoura_ [~lauromour@187.59.120.169] has quit [Quit: Leaving]
14:57 -!- lmoura [~lauromour@187.59.120.169] has joined #go-nuts
14:57 < hstimer> record the locating in the type passed to panic
14:58 < nsf> taruti:
http://github.com/nsf/gocode/blob/master/gocodeserver.go#L29
14:58 < nsf> I do that
14:58 < nsf> and here is the code
14:59 < hstimer> is there a way to access private functions and types of a
package?
14:59 < jcao219> ....no
14:59 < nsf> nope
15:00 < hstimer> bummer
15:04 < taruti> nsf: thanks
15:05 -!- iant [~iant@nat/google/x-lwblfpheygyfzzve] has joined #go-nuts
15:05 -!- mode/#go-nuts [+v iant] by ChanServ
15:08 -!- Venom_X [~pjacobs@71.21.124.111] has joined #go-nuts
15:12 -!- rlab [~Miranda@91.200.158.34] has quit [Quit: Miranda IM! Smaller,
Faster, Easier.  http://miranda-im.org]
15:13 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3]
15:13 < hstimer> nsf: your vim autocomplete looks interesting -- I'll give
it a try
15:15 < str1ngs> hstimer: its really good been using it the last couple of
days
15:19 < Namegduf> Hmm.  I think I must be doing something stupid.  Whenever
I try to use 6prof, it just spits "unexpected new tid <some tid> status
0x137f" at me.
15:19 < Namegduf> The source suggests that message is indeed caused by an
unexpected tid, but isn't precisely helpful about explaining why.
15:22 -!- ronnyy [~quassel@p4FF1D85F.dip.t-dialin.net] has joined #go-nuts
15:23 -!- femtoo [~femto@95-89-197-20-dynip.superkabel.de] has quit [Quit:
Leaving]
15:26 < hokapoka> Any suggesting for the best way to pipe HTML to PHP
requests?
15:27 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has quit [Ping timeout: 276
seconds]
15:27 < hokapoka> I'm using http to serve content via Curl requests,
wondered if anyone had any better suggestions.
15:28 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has joined
#go-nuts
15:30 -!- Xiaobo [~Xiaobo@61.48.211.178] has quit [Read error: Connection reset by
peer]
15:34 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
15:34 -!- RobertLJ_ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined
#go-nuts
15:37 -!- lapinferoce [~chatzilla@162.72.64-86.rev.gaoland.net] has quit [Quit:
ChatZilla 0.9.86 [Firefox 3.6.8/20100722155716]]
15:38 -!- jcao219 [~Jimmy_Cao@124.126.194.114] has left #go-nuts []
15:42 -!- jcao219 [~Jimmy_Cao@124.126.194.114] has joined #go-nuts
15:43 -!- duncan- [~KinOfCain@rrcs-64-183-61-2.west.biz.rr.com] has joined
#go-nuts
15:45 -!- KinOfCain [~KinOfCain@rrcs-64-183-61-2.west.biz.rr.com] has quit [Read
error: Operation timed out]
15:48 -!- femtoo [~femto@95-89-197-20-dynip.superkabel.de] has joined #go-nuts
15:57 -!- Ginto8 [~ginto8@pool-173-61-45-40.cmdnnj.fios.verizon.net] has joined
#go-nuts
15:57 < Ginto8> hey guys, quick question: what's the behavior of copy(x,y)
when x is nil?
15:57 -!- femtoo [~femto@95-89-197-20-dynip.superkabel.de] has quit [Quit:
Leaving]
15:58 < exch> most likely a runtime error
15:58 < exch> me tests
15:58 < exch> hmm nope
15:58 < exch> just continues without error
15:58 < Ginto8> so it just ignores it?
15:59 < Ginto8> like
15:59 < Ginto8> so it practically has an if x != nil built in?
15:59 < Ginto8> s/so //
16:00 < exch> weird.  it initializes x to a valid slice, but keeps it empty
16:01 < exch> so since x is len(0), it doesnt copy anything and continues
without any errors
16:01 -!- Venom_X [~pjacobs@71.21.124.111] has quit [Ping timeout: 260 seconds]
16:01 < Ginto8> wait...  there's a way to have an invalid slice?
16:01 < Ginto8> nil is still a valid slice iirc
16:01 < Ginto8> just the zero value
16:02 < exch> x = nil would likely mean 'x = []int{}' then
16:02 < exch> in that case it makes sense that it doesn't error out
16:02 -!- RobertLJ_ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit
[Remote host closed the connection]
16:02 < Ginto8> ok cool
16:02 < exch> it doesnt even have to check if x is nil or not
16:04 < Ginto8> hm...  yeah
16:04 < Ginto8> that's an awesome mechanism
16:06 -!- hstimer [~hstimer@c-76-103-155-13.hsd1.ca.comcast.net] has quit [Quit:
hstimer]
16:07 -!- sladegen [~nemo@unaffiliated/sladegen] has quit [Ping timeout: 245
seconds]
16:08 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
16:09 -!- RobertLJ_ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined
#go-nuts
16:14 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
16:16 -!- snearch [~snearch@f053003223.adsl.alicedsl.de] has quit [Quit:
Verlassend]
16:19 -!- Project_2501 [~Marvin@82.84.75.51] has quit [Quit: E se abbasso questa
leva che succ...]
16:19 -!- napsy_ [~luka@212.235.174.112] has joined #go-nuts
16:19 -!- napsy__ [~luka@212.235.174.112] has joined #go-nuts
16:20 -!- napsy__ [~luka@212.235.174.112] has quit [Client Quit]
16:22 -!- tvw [~tv@212.79.9.150] has quit [Remote host closed the connection]
16:37 -!- hstimer [~hstimer@70.90.170.37] has joined #go-nuts
16:43 -!- irc_ [~irc@209.17.191.58] has quit [Ping timeout: 265 seconds]
16:47 -!- zozoR [~zozoR@0x5da69cf2.cpe.ge-0-1-0-1105.hsnqu1.customer.tele.dk] has
quit [Quit: Morten.  Desu~]
16:48 < Namegduf> Hmm.  It seems like having a goroutine block on a channel
causes 6prof to fail.
16:54 -!- korfuri [~korfuri@eth0.korfuri.fr] has quit [Ping timeout: 264 seconds]
16:54 < leimy_> I'm trying to understand some of alexandrescu's strawman
arguments about Go's channels.
16:55 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts
16:55 < Ginto8> leimy_, ?
16:55 < Ginto8> I haven't seen those
16:55 < leimy_> In the groups
16:55 < leimy_> He was talking about how sharing by convention does not
always work very well, and that it should be enforced by the compiler
16:56 < leimy_> the terrible example he gave was a channel of "int *"
16:56 < leimy_> I can't think of why anyone would even think that's a good
idea :-)
16:56 < Ginto8> I agree
16:56 < leimy_> I mean you can make a struct of stuff and want to share it
via pointer, but stick a semaphore in it.
16:57 < leimy_> Or you make your interface hold the data and have other
people poke it via it's interface which can be behind go's channels
16:57 < Ginto8> or (if you really must) you can have a runtime.RWMutex
16:57 < leimy_> I don't think Go lends itself to that kind of mistake
easily, because you're not supposed to use it that way :-).
16:57 < leimy_> Right...  you can pass a pointer to a struct around
16:57 < Ginto8> basically it's a case of PICNIC
16:57 < leimy_> and have the interface to the struct be the only publicly
available part.
16:58 < leimy_> And you can put a mutex around all the methods on that
struct
16:58 < leimy_> and you're done :-)
16:58 < Ginto8> yep
16:58 < leimy_> It's like Monitors :-)
16:58 < Ginto8> definite PICNIC/PEBKAC
16:58 < leimy_> but even then, that's an optimization you have to measure
before you do it.
16:58 < leimy_> a lot of times the perceived copying on channels may not
need to happen.
16:58 < leimy_> because of the rendezvous nature of synchronous channels
16:59 < Ginto8> yep
16:59 < nickaugust> anyone used the ncurses bindings for go?  gocurse
16:59 < Ginto8> nickaugust, I haven't, but I find go bindings of C libs to
be notoriously difficult =/
16:59 < Ginto8> I just use cgo directly and wrap it in abstraction functions
17:00 < nickaugust> hmm interesting
17:00 < leimy_> I've never tried the C interoperability of Go. Alexandrescu
claimed that it wasn't very good :-)
17:00 < leimy_> I'm not sure if he was just there promoting his book on D
though or being serious :-)
17:00 < Ginto8> leimy_, it's usable for most things
17:01 < Ginto8> callbacks don't work tho
17:01 < Ginto8> but that's because go doesn't have function pointers, it has
closures
17:02 < Ginto8> also unions are very annoying
17:02 < leimy_> unions weren't much of a good idea to begin with :-)
17:02 < leimy_> but...  we have them.
17:02 < leimy_> or have to deal with the fact that we had them.
17:02 < Ginto8> well actually, they're very useful for event-driven
programming
17:02 -!- Venom_X [~pjacobs@adsl-99-20-147-171.dsl.aus2tx.sbcglobal.net] has
joined #go-nuts
17:02 < Ginto8> though nowadays polymorphism is better suited =P
17:02 < leimy_> Yeah, but when it comes to people who shun aliasing...
unions are all about aliasing :-)
17:03 < leimy_> in fact, they should have called it "aliases" :-)
17:03 < Ginto8> define "aliasing" please, I'm horrible with programming
terms =P
17:03 < leimy_> I need a moment to find the best succinct explanation.
17:04 -!- smw [~stephen@pool-71-183-88-124.nycmny.fios.verizon.net] has joined
#go-nuts
17:04 < Ginto8> ok that's fine
17:04 < leimy_> I guess it's really about having multiple names to the same
memory
17:04 < leimy_> possibly with different types associated with it.
17:04 < Ginto8> hm ok
17:05 < leimy_> It can make it really hard to optimize your code.
17:05 < leimy_> Actually the wikipedia article is decent and fairly short
17:05 < leimy_> http://en.wikipedia.org/wiki/Aliasing_(computing)
17:06 < leimy_> I mean don't get me wrong, I thought it was neat that when I
set my "virtual" ax register in Borland's Turbo C++ that the al and ah components
were set appropriately already.
17:07 < leimy_> that was done with unions and structs
17:08 < Ginto8> yeah I understand
17:08 < Ginto8> it's just more of a headache to handle =P
17:10 -!- wrtp [~rog@92.17.47.10] has quit [Ping timeout: 276 seconds]
17:10 < nickaugust> so im compiling this readline-go wrapper and its failing
import "C" what is it looking for there?
17:11 < Namegduf> It's using cgo.
17:11 < nickaugust> ah
17:12 < Ginto8> nickaugust, are you using a makefile?
17:12 < Ginto8> if so, you have to use CGOFILES rather than just GOFILES
17:12 < nickaugust> ok ill read up on cgo
17:12 < nickaugust> any disadvantage to using cgo?
17:12 < Ginto8> not really
17:12 < Ginto8> at least, not that I know of
17:13 < Ginto8> distribution may be a little difficult cuz I think it uses a
dynamically linked so
17:13 -!- RobertLJ_ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit
[Remote host closed the connection]
17:13 < Ginto8> so you may just have to distribute the source =P
17:13 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has quit [Quit:
hcatlin]
17:13 < nickaugust> ohhh nooooooooooooooo :P
17:13 -!- Bombe [~droden@weltgehirnmaschine.de] has quit [Excess Flood]
17:14 -!- korfuri [~korfuri@eth0.korfuri.fr] has joined #go-nuts
17:14 -!- Bombe [~droden@weltgehirnmaschine.de] has joined #go-nuts
17:15 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3]
17:15 -!- wrtp [~rog@92.17.47.10] has joined #go-nuts
17:16 -!- tumdum [~tumdum@unaffiliated/tumdum] has joined #go-nuts
17:16 -!- tumdum [~tumdum@unaffiliated/tumdum] has left #go-nuts []
17:18 -!- eikenberry [~jae@ivanova.zhar.net] has joined #go-nuts
17:24 -!- Venom_X [~pjacobs@adsl-99-20-147-171.dsl.aus2tx.sbcglobal.net] has quit
[Quit: Venom_X]
17:26 -!- wrtp [~rog@92.17.47.10] has quit [Ping timeout: 240 seconds]
17:26 -!- Venom_X [~pjacobs@66.54.185.131] has joined #go-nuts
17:27 < jessta> unions are useful when want multiple representations of the
same data.  tagged unions aren't really that useful anymore.
17:29 < Ginto8> jessta, I can understand that sorta thing (like wanting to
see the bit representation of a float32 as a uint32), but (for C/++ at least),
isn't the best method for that casting pointers?
17:30 -!- wrtp [~rog@92.17.47.10] has joined #go-nuts
17:31 < cw> use unsafe
17:34 < jessta> but unions could make that operation safe
17:34 < cw> in some cases yes
17:34 < cw> but we don't have those ...  so if you know what you're doing
for now you can use unsafe with care
17:35 < cw> not something to encourage but tqbh i've done it in many places
already
17:35 -!- terrex [~terrex@84.122.67.111.dyn.user.ono.com] has joined #go-nuts
17:36 -!- Ginto8 [~ginto8@pool-173-61-45-40.cmdnnj.fios.verizon.net] has quit
[Read error: Connection reset by peer]
17:36 < jessta> one of the videos mentioned rob pike had a plan for adding
unions, no idea what became of that
17:36 -!- terrex [~terrex@84.122.67.111.dyn.user.ono.com] has quit [Remote host
closed the connection]
17:36 -!- sacho [~sacho@213.91.244.15] has quit [Remote host closed the
connection]
17:39 -!- terrex [~terrex@84.122.67.111.dyn.user.ono.com] has joined #go-nuts
17:41 < nickaugust> so i build the package and it creates these files:
_cgo_defun.c _cgo_gotypes.go _cgo_.o readline.cgo1.go readline.cgo2.c
17:41 < nickaugust> so how do i import that into my project?
17:42 < nickaugust> or is there docs on this other than golang.org/cmd/cgo
17:43 -!- derferman [~derferman@dsl092-048-218.sfo4.dsl.speakeasy.net] has joined
#go-nuts
17:44 -!- jackman [~jackman@c-24-21-216-140.hsd1.or.comcast.net] has quit [Ping
timeout: 276 seconds]
17:44 < plexdev> http://is.gd/egiwP by [Robert Griesemer] in 10 subdirs of
go/ -- go AST: First step towards augmenting AST with full type information.
17:51 -!- iant [~iant@nat/google/x-lwblfpheygyfzzve] has quit [Ping timeout: 276
seconds]
17:52 -!- carllerche [~carllerch@99.13.242.166] has joined #go-nuts
17:53 -!- iant [~iant@nat/google/x-ebjfgzfxtohnwquv] has joined #go-nuts
17:53 -!- mode/#go-nuts [+v iant] by ChanServ
17:54 -!- jcao219 [~Jimmy_Cao@124.126.194.114] has quit [Quit: Leaving.]
17:54 < jessta> nickaugust: I haven't used cgo yet, so I might be completely
wrong, but I'm pretty sure you need either an .{6,8} or a .a file to link to
17:55 < i__> nickaugust: make install should be enough
17:56 -!- ronnyy [~quassel@p4FF1D85F.dip.t-dialin.net] has quit [Remote host
closed the connection]
17:57 < exch> nickaugust: it creates a .so and .a file as well.  make
install should copy them to the appropriate place in the Go pkg repo where you can
import it as usual
18:01 -!- tvw [~tv@e176005214.adsl.alicedsl.de] has joined #go-nuts
18:02 < nickaugust> exch: readline.cgo1.go:9: undefined: _C_char maybe I
dont have one of the dependencies installed?
18:02 < nickaugust> thats on make install
18:03 < exch> is there a *gotypes.go file?
18:03 < exch> If so, have a look at it.  it should tell you the proper names
of all those types
18:03 -!- jcao219 [~Jimmy_Cao@124.126.194.114] has joined #go-nuts
18:04 < exch> They seem to change from one project to the next You could try
_C_char_t
18:05 < i__> C.char works just fine
18:05 < nickaugust> interestingly i already have a go-readline installed in
go/src/pkg/go-readline and the readme notes that its a clone of the package im
tyring to install made goinstallable
18:06 < exch> you're sorted then :p
18:10 -!- aho [~nya@fuld-4d00d05b.pool.mediaWays.net] has joined #go-nuts
18:11 -!- Xenith [~xenith@2001:470:0:a9:226:b0ff:fee3:3a0c] has joined #go-nuts
18:14 < wrtp> discriminated unions would be nice.  but interfaces are
essentially an open-ended discriminated union, which is why go hasn't got those
yet, i reckon.
18:14 < exch> is there a convenient way to unpack an interface{} slice into
arguments for a vararg function?
18:15 < wrtp> exch: i don't think so.  is the function statically known?
18:16 < exch> In this case it's the fmt functions
18:16 < exch> I could probably use reflection, but it seems terribly
expensive
18:16 < Namegduf> Hmm
18:16 < Namegduf> Can you pass it directly?
18:16 < exch> if you pass the slice, it's treated as 1 argument
18:16 < Namegduf> Ah.
18:17 < Namegduf> Hmm.
18:17 < wrtp> you don't need reflection
18:17 -!- rlab [~Miranda@91.200.158.34] has quit [Quit: Miranda IM! Smaller,
Faster, Easier.  http://miranda-im.org]
18:18 < wrtp> you can use the "assign to ...  argument" trick
18:18 < cw> i was going to suggest that
18:18 < exch> how does that work then?
18:18 < cw> there is an open issue about this, the lang probably needs
something more long-term
18:19 < cw> // wrap []T -> ...T (issue 640)
18:19 < cw> func(varargs ...interface{}) {
18:19 < cw> varargs = resp.extraargs
18:19 < cw> rs = fmt.Sprintf(resp.extrafmt, varargs)
18:19 < cw> }()
18:19 -!- sladegen [~nemo@unaffiliated/sladegen] has joined #go-nuts
18:19 < Namegduf> That's horrible
18:19 < Namegduf> XD
18:20 < exch> hmm
18:20 < cw> i do it in very few places ...  it's not pretty but acceptable
for now
18:20 < Namegduf> Although I'm sure I could make people WTF with my idiom of
using closures to assign to variables local in scope across goroutines.
18:20 < exch> It beats reflection
18:20 < exch> I wonder if I can do that with unsafe
18:21 < cw> in reality you don't do it that often
18:22 < exch> In my case it happens more often than usual.  it's a stack
based VM. You read N elements from the stack and pass them to a desired function.
With fixed argument fucntions that's easy of course, but calling a vararg function
this way is a bit of a pain
18:23 -!- napsy [~luka@212.235.174.112] has quit [Ping timeout: 240 seconds]
18:23 -!- 16SAAAEZ9 [~Miranda@91.200.158.34] has joined #go-nuts
18:23 -!- 16SAAAEZ9 [~Miranda@91.200.158.34] has quit [Client Quit]
18:24 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
18:29 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has joined #go-nuts
18:32 -!- saschpe [~quassel@mgdb-4d0cf1ad.pool.mediaWays.net] has quit [Remote
host closed the connection]
18:37 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has joined
#go-nuts
18:38 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Read error:
Connection timed out]
18:39 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts
18:41 -!- jcao219 [~Jimmy_Cao@124.126.194.114] has quit [Quit: Leaving.]
18:46 -!- zozoR [~zozoR@x1-6-00-0e-2e-a3-e0-23.k377.webspeed.dk] has joined
#go-nuts
18:47 -!- wm4 [~lu-PYTHON@p5080B142.dip.t-dialin.net] has joined #go-nuts
18:47 < wm4> I wanted to ask, how good is Go's GC
18:48 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has quit [Quit:
hcatlin]
18:49 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
18:52 < jessta> wm4: not good
18:52 < jessta> still in development
18:52 < wm4> how good is it compared to Boehm GC or D's GC?
18:53 < jessta> it's a stop-the-world, mark and sweep.
18:53 < wm4> does it, for instance, do precise heap/stack scanning?  does it
have generational features?
18:53 < nsf> I can share some user experience about Go's GC performance
18:54 < nsf> I have autocompletion daemon
18:54 < nsf> and usually it's response time is around 20-30ms
18:54 -!- tvw [~tv@e176005214.adsl.alicedsl.de] has quit [Ping timeout: 245
seconds]
18:54 < nsf> If I'm not calling GC manually after request response
18:54 < nsf> sometimes response time drops to 100-120ms
18:54 < nsf> due to running GC
18:55 -!- tvw [~tv@e176005214.adsl.alicedsl.de] has joined #go-nuts
18:55 < nsf> so it's not that fast, but works :)
18:55 < jessta> wm4: it
18:55 < wm4> nsf: how big is its heap?
18:55 < jessta> wm4: it's currently a very simple GC
18:56 < nsf> wm4: I have no idea
18:56 < nsf> never measured it
18:56 < wm4> nsf: use top
18:56 < jessta> wm4: it's conservative with no generational features
18:56 < nsf> well it also depends on data heavily
18:57 < nsf> wm4: around 10 megs
18:57 < wm4> nsf: ouch...  then it's way worse than D's GC
18:57 < nsf> it is
18:57 < jessta> it also doesn't release any memory back to the OS
18:57 < nsf> no doubts
18:57 < jessta> wm4: it's not supposed to be good
18:57 < jessta> it's supposed to be something that works for now
18:57 < wm4> jessta: having a good GC is critical for a language that relies
on GC by default
18:58 < wm4> but ok, just tells that Go is in an experimental stage
18:58 < wm4> next language please
18:58 < jessta> yes, Go is still in development
18:58 < jessta> but the GC really doesn't have anything to do with the
language
18:58 < jessta> which is why it's low priority atm
18:59 < wm4> jessta: from D I've learned that separation between
implementation and specification of a language doesn't matter much in practise
18:59 < Namegduf> Go is still in development, but if your code is not
immediately performance critical, it is functional for production use.
18:59 < Namegduf> Go is much further along in development than D, from the
impression I get.
19:00 < wm4> not if you compare it against D1
19:00 < wm4> (D2 is a completely failure)
19:01 <+iant> what is wrong with D2?
19:01 < jessta> wm4: go has only been in development for about 2 years, and
only publicly available for 10 months
19:01 < wm4> iant: lots
19:01 < wm4> jessta: you have a point
19:02 -!- mwarning [~mwarning@ip-78-94-222-65.unitymediagroup.de] has joined
#go-nuts
19:03 -!- Ginto8 [~ginto8@pool-173-61-45-40.cmdnnj.fios.verizon.net] has joined
#go-nuts
19:03 < Ginto8> accessing outside the bounds of a slice will only cause a
runtime error if it's also outside the bounds of the underlying array right?
19:04 -!- chaos95 [chaos95@mafianode.com] has quit [Ping timeout: 245 seconds]
19:07 -!- napsy [~luka@212.235.174.112] has joined #go-nuts
19:07 -!- chaos95 [chaos95@mafianode.com] has joined #go-nuts
19:08 < jessta> Ginto8: nope, you can't access outside the bounds of the
slice
19:08 < Ginto8> it'll cause a panic right?
19:08 < jessta> yep
19:08 < Ginto8> ok
19:08 < Ginto8> thanks
19:09 -!- mwarning [~mwarning@ip-78-94-222-65.unitymediagroup.de] has left
#go-nuts []
19:09 < jessta> which is really good because you can pass a slice to a
function and know it won't mess with the rest of the array
19:10 < Ginto8> yeah I understand the logic of it
19:10 < Namegduf> Couldn't the function just expand the slice upwards?
19:10 < Ginto8> I just wasn't sure if that was how it actually worked ;)
19:10 < jessta> Namegduf: oh, can it?
19:10 < Ginto8> Namegduf, yes, but on the function's part that would be just
as risky of trying to access beyond the bounds
19:10 < Namegduf> I don't believe so.
19:11 < Ginto8> owait
19:11 < Namegduf> You can check cap()
19:11 < Ginto8> yeah
19:11 < Ginto8> sorry
19:11 < Ginto8> forgot bout that =P
19:11 < Namegduf> jessta: I think so.
19:11 < Ginto8> but it would have to really be trying in order to mess with
the rest of the array
19:12 -!- gid [~gid@220-253-58-217.VIC.netspace.net.au] has quit [Ping timeout:
248 seconds]
19:12 < jessta> Namegduf: how would you do that?
19:12 < Namegduf> Reslice the slice.
19:13 < Namegduf> I think the upper bound of slicing a slice is set by
cap(), not len()
19:13 < Ginto8> Namegduf, I believe so too
19:13 < Ginto8> that's how the reslicing is done in container/vector at
least
19:14 < jessta> ah, ok then.  That's a bit disappointing.
19:16 < jessta> Go does seem to make it really easy to share memory between
goroutines
19:17 -!- Eridius [~kevin@unaffiliated/eridius] has joined #go-nuts
19:20 -!- hippondog [~user@unaffiliated/yesudeep] has joined #go-nuts
19:21 -!- hippondog [~user@unaffiliated/yesudeep] has left #go-nuts []
19:22 -!- carllerche [~carllerch@99.13.242.166] has quit [Quit: carllerche]
19:40 -!- Eridius [~kevin@unaffiliated/eridius] has quit [Quit: Lost terminal]
19:48 -!- carllerche [~carllerch@enginey-9.border1.sfo002.pnap.net] has joined
#go-nuts
19:48 -!- artefon [~thiago@189.59.206.208] has joined #go-nuts
19:57 -!- Eridius [~kevin@unaffiliated/eridius] has joined #go-nuts
19:57 -!- micahjohnston [~Adium@174-23-81-247.slkc.qwest.net] has joined #go-nuts
19:57 -!- ronnyy [~quassel@p4FF1D85F.dip.t-dialin.net] has joined #go-nuts
20:06 -!- napsy [~luka@212.235.174.112] has quit [Ping timeout: 252 seconds]
20:09 -!- Damn3d [damn3d@unaffiliated/morpheus/x-0931003] has quit [Excess Flood]
20:09 -!- Damn3d [damn3d@unaffiliated/morpheus/x-0931003] has joined #go-nuts
20:10 -!- micahjohnston [~Adium@174-23-81-247.slkc.qwest.net] has left #go-nuts []
20:12 -!- micahjohnston [~Adium@174-23-81-247.slkc.qwest.net] has joined #go-nuts
20:13 < micahjohnston> can go functions be polymorphic on more than just the
reciever?
20:13 -!- sacho [~sacho@79-100-57-33.btc-net.bg] has joined #go-nuts
20:13 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3]
20:14 < Namegduf> micahjohnston: You can use interfaces for that.
20:15 < micahjohnston> ok
20:17 < jessta> functions can't really be polymorphic, types can though
20:18 < micahjohnston> eh?
20:19 -!- derferman [~derferman@dsl092-048-218.sfo4.dsl.speakeasy.net] has quit
[Quit: derferman]
20:19 -!- tsykoduk [~tsykoduk@184.78.195.79] has joined #go-nuts
20:21 < jessta> micahjohnston: a function will always take the same types as
parameters and return the same types
20:22 < micahjohnston> I see
20:22 < jessta> but if those types are interfaces, then those interfaces may
contain different types
20:29 -!- tsykoduk [~tsykoduk@184.78.195.79] has quit [Ping timeout: 245 seconds]
20:32 -!- tsykoduk [~tsykoduk@184.78.195.79] has joined #go-nuts
20:35 < leimy_> Since an interface is a type, then yes, types are
polymorphic.  However it's a bit odd to think of a type as being polymorphic.  The
type is the morphism itself isn't it?  Maybe not to a functional programmer.
20:36 < taruti> meh, I keep wanting nicely types BSTs
20:38 < taruti> *typed
20:40 < MizardX> type <T>Tree struct { left, right <T>Tree,
value T } <--- This won't work, but would be nice if it did.
20:41 < taruti> yes
20:41 -!- angasule [c80571ea@gateway/web/freenode/ip.200.5.113.234] has quit
[Quit: Page closed]
20:41 < taruti> even having a nice syntax for looping over map keys sorted
would be nice
20:41 < taruti> seems very ugly atm
20:41 < taruti> or I am missing something fundamental
20:42 < taruti> for k,_ := range map_keys_sorted(map) { ...  }
20:43 < MizardX> A Go function can't return an interator over two values.
for k := range map_keys_sorted(map) { ...  } is doable, but would require some
reflection on the map's type.
20:45 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has quit [Quit:
slashus2]
20:45 < Namegduf> Has anyone implemented anything like a trie in Go?
20:45 < taruti> yes
20:45 < Namegduf> Source public?
20:45 < leimy_> fingertrees!
20:45 -!- mafs [~maikeru@unaffiliated/maikeru/x-7708887] has quit [Ping timeout:
264 seconds]
20:45 < taruti> http://github.com/AlanQuatermain/go-trie
20:46 < Namegduf> Interesting.
20:47 < jessta> taruti: that seems reasonable, as long as map_keys_sorted()
returned a slice of map keys
20:47 < Namegduf> Hmm, ow.
20:47 < Namegduf> It uses a map in every single node?
20:47 < Namegduf> That's not cheap.
20:48 * Namegduf will look at some C examples
20:48 < taruti> jessta: that ends up creating a reflect.Value for *each* key
which is quite expensive.  (I could limit myself to string keys)
20:49 -!- dju [dju@fsf/member/dju] has joined #go-nuts
20:50 < taruti> or is a map[string]Foo -> map[string]interface{}
conversion allowed?
20:53 -!- TR2N [email@89-180-147-167.net.novis.pt] has joined #go-nuts
20:53 < jessta> good point.
20:54 -!- dju [dju@fsf/member/dju] has quit [Max SendQ exceeded]
20:54 -!- dju_ [dju@fsf/member/dju] has joined #go-nuts
20:55 < taruti> http://pastebin.com/YUsQvVL1 is the ugly solution
20:56 -!- mafs [~maikeru@unaffiliated/maikeru/x-7708887] has joined #go-nuts
21:01 -!- ExtraSpice [~XtraSpice@88.118.32.225] has quit [Ping timeout: 240
seconds]
21:06 -!- path[l] [UPP@120.138.102.50] has joined #go-nuts
21:06 -!- zozoR [~zozoR@x1-6-00-0e-2e-a3-e0-23.k377.webspeed.dk] has quit [Quit:
Morten.  Desu~]
21:07 -!- path[l] [UPP@120.138.102.50] has quit [Read error: Connection reset by
peer]
21:07 -!- path[l] [UPP@120.138.102.50] has joined #go-nuts
21:07 -!- napsy [~luka@212.235.174.112] has joined #go-nuts
21:10 < exch> I feel kinda dirty using the vararg 'solution' :s
21:11 -!- derferman [~derferman@dsl092-048-218.sfo4.dsl.speakeasy.net] has joined
#go-nuts
21:11 -!- tsykoduk [~tsykoduk@184.78.195.79] has quit [Ping timeout: 245 seconds]
21:16 -!- tsykoduk [~tsykoduk@184.78.195.79] has joined #go-nuts
21:16 -!- skelterjohn [~jasmuth@c-76-116-182-139.hsd1.nj.comcast.net] has joined
#go-nuts
21:25 -!- rogue780 [~rogue780@c-68-34-234-213.hsd1.md.comcast.net] has quit [Read
error: Connection reset by peer]
21:28 -!- terrex [~terrex@84.122.67.111.dyn.user.ono.com] has quit [Quit:
Leaving.]
21:28 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Ping timeout: 245
seconds]
21:33 < plexdev> http://is.gd/egzd6 by [Ken Thompson] in go/src/cmd/goyacc/
-- fix bounds check in error recovery
21:38 -!- DerHorst [~Horst@e176099009.adsl.alicedsl.de] has joined #go-nuts
21:38 -!- tsykoduk [~tsykoduk@184.78.195.79] has quit [Ping timeout: 240 seconds]
21:38 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 265 seconds]
21:41 -!- smw [~stephen@pool-71-183-88-124.nycmny.fios.verizon.net] has quit
[Quit: Leaving]
21:42 -!- tsykoduk [~tsykoduk@184.78.195.79] has joined #go-nuts
21:43 -!- macroron [~ron@c-98-242-168-49.hsd1.fl.comcast.net] has left #go-nuts
["Leaving"]
21:48 -!- ronnyy [~quassel@p4FF1D85F.dip.t-dialin.net] has quit [Read error:
Connection reset by peer]
21:49 -!- tsykoduk [~tsykoduk@184.78.195.79] has quit [Ping timeout: 252 seconds]
21:49 < plexdev> http://is.gd/egAbM by [Rob Pike] in go/src/pkg/fmt/ --
fmt/print: give %p priority, analogous to %T
21:49 -!- atsampson [~ats@212.183.140.1] has quit [Ping timeout: 276 seconds]
21:51 -!- atsampson [~ats@212.183.140.22] has joined #go-nuts
21:51 -!- matt444 [4a84c939@gateway/web/freenode/ip.74.132.201.57] has joined
#go-nuts
21:52 < matt444> any example of how to loop through a map[string]string?
21:52 < Namegduf> key, value := range mapthing
21:53 < matt444> range was what i was missing
21:53 -!- micahjohnston [~Adium@174-23-81-247.slkc.qwest.net] has left #go-nuts []
21:55 < matt444> thank you
21:55 -!- tsykoduk [~tsykoduk@c-71-231-146-235.hsd1.or.comcast.net] has joined
#go-nuts
22:00 -!- SRabbelier1 [~SRabbelie@ip138-114-211-87.adsl2.static.versatel.nl] has
quit [Ping timeout: 276 seconds]
22:02 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit:
Verlassend]
22:03 -!- lmoura [~lauromour@187.59.120.169] has quit [Quit: Leaving]
22:04 -!- tumdum [~tumdum@unaffiliated/tumdum] has joined #go-nuts
22:09 -!- tumdum [~tumdum@unaffiliated/tumdum] has quit [Client Quit]
22:10 -!- ako [~nya@fuld-4d00d64d.pool.mediaWays.net] has joined #go-nuts
22:11 -!- matt444 [4a84c939@gateway/web/freenode/ip.74.132.201.57] has quit [Quit:
Page closed]
22:12 -!- aho [~nya@fuld-4d00d05b.pool.mediaWays.net] has quit [Ping timeout: 245
seconds]
22:15 -!- artefon [~thiago@189.59.206.208] has quit [Quit: bye]
22:20 -!- marsu [~marsu@133.51.202-77.rev.gaoland.net] has joined #go-nuts
22:32 -!- General13372 [~support@71-84-50-230.dhcp.mtpk.ca.charter.com] has joined
#go-nuts
22:36 -!- path[l] [UPP@120.138.102.50] has quit [Quit: path[l]]
22:36 -!- General1337 [~support@71-84-50-230.dhcp.mtpk.ca.charter.com] has quit
[Ping timeout: 264 seconds]
22:43 -!- skelterjohn [~jasmuth@c-76-116-182-139.hsd1.nj.comcast.net] has quit
[Quit: skelterjohn]
22:45 -!- Venom_X [~pjacobs@66.54.185.131] has quit [Quit: Venom_X]
22:47 -!- marsu [~marsu@133.51.202-77.rev.gaoland.net] has quit [Quit: Leaving]
22:48 -!- ikaros [~ikaros@dslb-188-097-010-191.pools.arcor-ip.net] has quit [Quit:
Leave the magic to Houdini]
23:06 -!- wrtp [~rog@92.17.47.10] has quit [Quit: wrtp]
23:07 -!- napsy [~luka@212.235.174.112] has quit [Ping timeout: 248 seconds]
23:10 -!- cco3 [~conley@c-69-181-138-209.hsd1.ca.comcast.net] has joined #go-nuts
23:10 -!- DerHorst_ [~Horst@e176109149.adsl.alicedsl.de] has joined #go-nuts
23:14 -!- DerHorst [~Horst@e176099009.adsl.alicedsl.de] has quit [Ping timeout:
245 seconds]
23:16 -!- napsy [~luka@212.235.174.112] has joined #go-nuts
23:25 -!- kanru [~kanru@118-160-160-190.dynamic.hinet.net] has joined #go-nuts
23:27 -!- carllerche [~carllerch@enginey-9.border1.sfo002.pnap.net] has quit
[Quit: carllerche]
23:37 -!- iant [~iant@nat/google/x-ebjfgzfxtohnwquv] has quit [Quit: Leaving.]
23:42 -!- duncan- [~KinOfCain@rrcs-64-183-61-2.west.biz.rr.com] has quit [Remote
host closed the connection]
23:43 -!- cco3 [~conley@c-69-181-138-209.hsd1.ca.comcast.net] has quit [Quit:
Leaving.]
--- Log closed Sat Aug 14 00:00:05 2010