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

--- Log opened Wed Aug 04 00:00:05 2010
00:05 < plexdev> http://is.gd/e1cLV by [Russ Cox] in go/ -- A+C: Anthony
Martin, Christian Himpel (individual CLA)
00:07 -!- ExtraSpice [~XtraSpice@88.118.32.225] has quit [Ping timeout: 240
seconds]
00:08 -!- nettok [~quassel@proxy.galileo.edu] has joined #go-nuts
00:10 -!- cco3 [~conley@c-69-181-138-209.hsd1.ca.comcast.net] has joined #go-nuts
00:17 -!- napsy [~luka@212.235.174.112] has quit [Ping timeout: 265 seconds]
00:19 -!- napsy [~luka@212.235.174.112] has joined #go-nuts
00:20 -!- nettok [~quassel@proxy.galileo.edu] has quit [Ping timeout: 265 seconds]
00:22 < plexdev> http://is.gd/e1e7Q by [Anthony Martin] in go/src/pkg/json/
-- json: object members must have a value
00:35 -!- nettok [~quassel@proxy.galileo.edu] has joined #go-nuts
00:38 -!- kanru [~kanru@118-168-239-91.dynamic.hinet.net] has quit [Ping timeout:
276 seconds]
00:41 -!- cco3 [~conley@c-69-181-138-209.hsd1.ca.comcast.net] has quit [Quit:
Leaving.]
00:42 -!- cco3 [~conley@c-69-181-138-209.hsd1.ca.comcast.net] has joined #go-nuts
00:52 -!- mikespook [~mikespook@219.137.75.87] has joined #go-nuts
01:16 -!- artefon [~thiago@189.107.227.111] has quit [Quit: bye]
01:19 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has joined #go-nuts
01:21 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit:
This computer has gone to sleep]
01:27 -!- Bombe [~droden@freenet/developer/Bombe] has quit [Excess Flood]
01:28 -!- Bombe [~droden@weltgehirnmaschine.de] has joined #go-nuts
01:32 -!- nettok [~quassel@proxy.galileo.edu] has quit [Write error: Broken pipe]
01:32 -!- nettok [~quassel@proxy.galileo.edu] has joined #go-nuts
01:35 -!- Arrow55 [~Arrow@bas1-stlambert20-1178034671.dsl.bell.ca] has joined
#go-nuts
01:36 -!- hstimer [~hstimer@70.90.170.37] has quit [Quit: hstimer]
01:37 -!- smw [~smw@pool-71-183-88-124.nycmny.fios.verizon.net] has quit [Ping
timeout: 265 seconds]
01:41 -!- jesusaur [jesusaur@firefly.cat.pdx.edu] has quit [Ping timeout: 260
seconds]
01:44 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts
01:44 -!- Adys [~Adys@unaffiliated/adys] has quit [Client Quit]
01:45 -!- napsy [~luka@212.235.174.112] has quit [Quit: Lost terminal]
01:53 -!- boscop_ [~boscop@g227155181.adsl.alicedsl.de] has joined #go-nuts
01:55 -!- boscop [~boscop@g225198028.adsl.alicedsl.de] has quit [Ping timeout: 245
seconds]
01:56 -!- smw [~smw@pool-71-183-88-124.nycmny.fios.verizon.net] has joined
#go-nuts
02:01 -!- nettok [~quassel@proxy.galileo.edu] has quit [Ping timeout: 245 seconds]
02:03 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined
#go-nuts
02:04 -!- bmizerany [~bmizerany@208.66.27.62] has quit [Remote host closed the
connection]
02:08 -!- jesusaurus [jesusaur@firefly.cat.pdx.edu] has joined #go-nuts
02:09 -!- carllerche [~carllerch@208.87.61.203] has joined #go-nuts
02:15 -!- carllerche [~carllerch@208.87.61.203] has quit [Quit: carllerche]
02:16 -!- Venom_X [~pjacobs@71.21.124.111] has joined #go-nuts
02:17 -!- Venom_X [~pjacobs@71.21.124.111] has quit [Client Quit]
02:24 -!- bmizerany [~bmizerany@c-24-6-37-113.hsd1.ca.comcast.net] has joined
#go-nuts
02:32 -!- allengeorge [~allengeor@74.12.150.7] has joined #go-nuts
02:33 -!- derferman [~derferman@dsl092-048-218.sfo4.dsl.speakeasy.net] has quit
[Quit: derferman]
02:33 -!- skelterjohn [~jasmuth@c-76-116-182-139.hsd1.nj.comcast.net] has joined
#go-nuts
02:57 -!- ronnyyy [~quassel@p4FF1D66B.dip.t-dialin.net] has joined #go-nuts
03:02 -!- ronnyy [~quassel@p4FF1D948.dip.t-dialin.net] has quit [Ping timeout: 276
seconds]
03:04 -!- rejb [~rejb@unaffiliated/rejb] has quit [Ping timeout: 276 seconds]
03:11 -!- nekschot [nekschot@212-123-134-143.ip.telfort.nl] has quit []
03:16 -!- nettok [~quassel@200.119.158.230] has joined #go-nuts
03:21 -!- allengeorge [~allengeor@74.12.150.7] has quit [Read error: Connection
reset by peer]
03:21 -!- allengeorge [~allengeor@74.12.150.7] has joined #go-nuts
03:22 -!- skelterjohn [~jasmuth@c-76-116-182-139.hsd1.nj.comcast.net] has quit
[Ping timeout: 265 seconds]
03:23 -!- hstimer [~hstimer@2002:4c67:9b0d:0:226:bbff:fe05:dd9b] has joined
#go-nuts
03:25 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Remote
host closed the connection]
03:40 -!- derferman [~derferman@c-98-207-60-44.hsd1.ca.comcast.net] has joined
#go-nuts
03:40 < plexdev> http://is.gd/e1tYq by [Scott Lawrence] in go/src/pkg/bytes/
-- bytes: added test case for explode with blank string.
04:00 -!- allengeorge [~allengeor@74.12.150.7] has quit [Quit: allengeorge]
04:07 -!- timmcd [~Timothy@174-23-142-201.slkc.qwest.net] has joined #go-nuts
04:08 < timmcd> So uh
04:08 < timmcd> What would this error generally mean?
04:08 < timmcd> implicit assignment of unexported field 'conn' of
networking.Socket in assignment
04:09 -!- derferman [~derferman@c-98-207-60-44.hsd1.ca.comcast.net] has quit
[Quit: derferman]
04:11 < cw> timmcd: exported things start with uppercase
04:11 < timmcd> Oh xD
04:11 -!- jackman [~jackman@c-24-21-216-140.hsd1.or.comcast.net] has quit [Quit:
leaving]
04:11 < timmcd> taht would be the problem
04:11 < timmcd> thanks, cw.
04:15 < timmcd> Is there a way, when defining an interface, to say that thsi
new interface, needs to implement another interface?
04:15 < timmcd> type Actor interface {
04:15 < timmcd> ...
04:15 < timmcd> }
04:15 < timmcd> type OtherThing interface { MustFulfil Actor?  }
04:16 < cw> sorta yeah ...  rob pike posted an example of using a dummy var
decl
04:16 < cw> if i understand you
04:17 < timmcd> where did he post this?
04:20 < cw> on the list
04:21 -!- captn_ [~captn@p4FDCB63B.dip.t-dialin.net] has joined #go-nuts
04:21 < timmcd> the list...?  LIke, the google group?
04:25 -!- captn [~captn@p4FDCB056.dip.t-dialin.net] has quit [Ping timeout: 246
seconds]
04:31 < cw> yeah sorry
04:31 < cw> im terribly slow to respond right now
04:31 < timmcd> hehe no worries
04:31 < timmcd> having trouble finding it
04:32 -!- cco3 [~conley@c-69-181-138-209.hsd1.ca.comcast.net] has quit [Ping
timeout: 258 seconds]
04:34 -!- aho [~nya@fuld-4d00d1b8.pool.mediaWays.net] has quit [Quit:
EXEC_over.METHOD_SUBLIMATION]
04:35 < cw> timmcd: create a function that passes it to something that
expected the interface
04:35 < cw> var _ some.Interface = (*myType)(nil)
04:36 < cw> Re: Problems with lack of mentioning of interfaces implemented
by a concrete type
04:36 < timmcd> Yeah
04:36 < timmcd> Ok, thanks cw.
04:40 < timmcd> This might be silly but
04:40 < timmcd> is there a way to do inheritance for structs?
04:40 < timmcd> ie, struct1 has variables x and y
04:40 < timmcd> y
04:40 < timmcd> ou define struct2 to be a copy of struct1 basically, but
with variable z as well
04:40 < cw> not in the c++/java sense
04:41 < cw> you can put struct1 in struct2
04:41 < timmcd> Yeah
04:41 < timmcd> hrm thanks
04:43 < cw> if the names are unique there is a syntax to make it easier
04:43 < cw> let me quickly make an example, sec
04:45 < timmcd> ok cool
04:45 < cw> http://stupidest.org/go/timmcd.txt
04:45 < cw> does that help?
04:46 < timmcd> oh nice yeah
04:46 < timmcd> But that doesn't work with interfaces?  Thats a shame.
04:46 < timmcd> But it'll still be helpful for structs =D
04:50 < cw> for interfaces you can do something similar
04:51 < cw> look at the source, consider ;
04:51 < cw> type ReadWriter struct { *Reader *Writer
04:51 < cw> }
04:51 < cw> http://golang.org/src/pkg/bufio/bufio.go?h=ReadWriter#L488
04:53 < timmcd> copol thanks
04:53 < timmcd> *cool
04:55 < cw> did you look at effective go and the other stuff?
04:55 < cw> it's well worth the time
04:57 < timmcd> Ok, thanks.
04:57 -!- timmcd [~Timothy@174-23-142-201.slkc.qwest.net] has quit [Quit: timmcd]
04:58 < cw> actually, he's gone and no i realize that was a bad example
04:59 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts
05:03 -!- scm [justme@d070077.adsl.hansenet.de] has quit [Ping timeout: 260
seconds]
05:05 -!- scm [justme@d056075.adsl.hansenet.de] has joined #go-nuts
05:05 -!- jackman [~jackman@c-24-21-216-140.hsd1.or.comcast.net] has joined
#go-nuts
05:11 -!- Arrow55 [~Arrow@bas1-stlambert20-1178034671.dsl.bell.ca] has quit [Quit:
Leaving]
05:14 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
05:24 -!- Eridius [~kevin@unaffiliated/eridius] has quit [Read error: Operation
timed out]
05:36 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has quit [Ping
timeout: 258 seconds]
05:45 -!- zozoR [~zozoR@x1-6-00-0e-2e-a3-e0-23.k377.webspeed.dk] has joined
#go-nuts
05:46 -!- Makoryu [~vt920@pool-71-174-191-10.bstnma.fios.verizon.net] has joined
#go-nuts
05:48 -!- tvw [~tv@212.79.9.150] has joined #go-nuts
05:52 -!- derferman [~derferman@c-98-207-60-44.hsd1.ca.comcast.net] has joined
#go-nuts
05:52 -!- jefferai [~quassel@kde/amarok/mitchell] has quit [Ping timeout: 240
seconds]
05:54 -!- jefferai [~quassel@kde/amarok/mitchell] has joined #go-nuts
05:56 -!- derferman [~derferman@c-98-207-60-44.hsd1.ca.comcast.net] has quit
[Client Quit]
06:14 -!- Makoryu [~vt920@pool-71-174-191-10.bstnma.fios.verizon.net] has quit
[Remote host closed the connection]
06:20 -!- Sacho [~sacho@95-42-108-60.btc-net.bg] has quit [Read error: Connection
reset by peer]
06:21 -!- captn_ [~captn@p4FDCB63B.dip.t-dialin.net] has quit [Quit: bye]
06:21 -!- roop [~roop@122.167.236.193] has joined #go-nuts
06:22 -!- ghiu [~gu@93-32-145-212.ip33.fastwebnet.it] has joined #go-nuts
06:23 -!- ghiu [~gu@93-32-145-212.ip33.fastwebnet.it] has left #go-nuts []
06:23 -!- ghiu [~gu@93-32-145-212.ip33.fastwebnet.it] has joined #go-nuts
06:24 < ghiu> hi, i have a map of structs like "Sessions map[string]Session"
and Session is a simple struct
06:24 < ghiu> if i try to check for a null item like this "Sessions[key] ==
nil" it says that i cannot use Session as nil
06:25 < ghiu> how can i check for a null struct?  thanks
06:27 -!- roop [~roop@122.167.236.193] has quit [Ping timeout: 246 seconds]
06:27 -!- mikespook [~mikespook@219.137.75.87] has quit [Read error: Connection
reset by peer]
06:28 < cw> ghiu: what is a nil struct?
06:28 < chressie> ghiu: the session structs in the map are not pointers...
you might want to have a map of pointers then..  (Sessions map[string]*Session)
06:28 -!- vegai [vegai@archlinux/developer/vegai] has left #go-nuts []
06:28 < cw> it makes more sense for a pointer, for a struct everything will
be zero ...  so you can check fr that
06:28 < ghiu> a null object of type struct?
06:29 < chressie> you can not use == on struct types, there's no operator
overloading
06:29 < jessta> ghiu: structs can't be nil
06:30 < jessta> pointers to structs can be nil
06:30 < ghiu> oh
06:30 < jessta> are you wanting to see if a key actually has a value in the
map?
06:30 < ghiu> so i have to use map[string]*Session instead of
map[string]Session
06:30 < ghiu> thanks
06:30 < ghiu> that works
06:30 < Namegduf> ghiu: No
06:30 < Namegduf> ghiu: Use v, ok = map["somestring"]
06:30 < Namegduf> And check "ok"
06:31 < Namegduf> Using a pointer is often a better idea, because otherwise
the struct is stored by value, which can be expensive or even undesirable if you
want to be able to make changes to it.
06:32 < Namegduf> But testing for nil is not the right way to check
existence in a map.
06:32 -!- snearch [~snearch@f053010173.adsl.alicedsl.de] has joined #go-nuts
06:34 < ghiu> ok, i'll do like this
06:34 < ghiu> thanks
06:35 -!- saschpe [~saschpe@mgdb-4d0cfab9.pool.mediaWays.net] has joined #go-nuts
06:39 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Ping
timeout: 246 seconds]
06:43 < plexdev> http://is.gd/e1Hf6 by [Robert Griesemer] in
go/src/cmd/gofmt/ -- gofmt: make code more readable by avoiding redeclaration
07:01 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has quit [Remote host
closed the connection]
07:02 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has joined #go-nuts
07:02 -!- roop [~roop@122.167.236.193] has joined #go-nuts
07:06 -!- snearch [~snearch@f053010173.adsl.alicedsl.de] has quit [Quit:
Verlassend]
07:10 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
07:20 -!- nettok [~quassel@200.119.158.230] has quit [Remote host closed the
connection]
07:22 -!- mxweas [~max@166.137.10.148] has joined #go-nuts
07:34 -!- ZincSaucier [~quassel@c-76-126-34-217.hsd1.ca.comcast.net] has quit
[Ping timeout: 240 seconds]
07:59 -!- ExtraSpice [~XtraSpice@88.118.32.225] has joined #go-nuts
08:03 -!- mxweas [~max@166.137.10.148] has quit [Quit: mxweas]
08:07 < ghiu> can anybody explain what is wrong with this code?
http://pastebin.com/d8T2cRa0 it gives me this compilation error: 22: invalid
operation: (As["test"]).B["testKey"] (index of type *B)
08:09 < nsf> new(B) looks wrong
08:09 < KirkMcDonald> ghiu: What if you have A contain just a B (instead of
*B), and use make(B) instead of new(B)?
08:09 < nsf> you need to use make(B)
08:10 < nsf> and you can't get an index of pointer type
08:10 < nsf> you need to dereference B
08:10 < KirkMcDonald> ghiu: The issue is that you're trying to use the index
operator on a pointer.
08:10 < KirkMcDonald> heh
08:10 < nsf> or follow KirkMcDonald's advice
08:10 < nsf> :)
08:10 -!- hstimer [~hstimer@2002:4c67:9b0d:0:226:bbff:fe05:dd9b] has quit [Quit:
hstimer]
08:11 < KirkMcDonald> ghiu: maps are already reference types, in effect.
You don't need to use a pointer to one.
08:13 < ghiu> you mean this?  type A struct { *B ; otherData int64 } TO type
A struct { B ; otherData int64 } ?
08:13 < KirkMcDonald> Yes.
08:13 < ghiu> drop the asterisk?
08:13 < KirkMcDonald> Yes.
08:15 -!- Adys [~Adys@unaffiliated/adys] has quit [Quit: I ♥ Unicode]
08:15 < ghiu> http://ideone.com/Cr1Gf this works, thanks :)
08:19 -!- iant [~iant@62-20-124-50.customer.telia.com] has joined #go-nuts
08:19 -!- mode/#go-nuts [+v iant] by ChanServ
08:33 -!- saracen [~saracen@81-5-140-201.dsl.eclipse.net.uk] has joined #go-nuts
08:35 < saracen> Is it possible to pass a type name (or even a type's name
string) to a function, and then have that function create an instance of it?
08:36 <+iant> saracen: there is reflect.MakeZero
08:36 <+iant> but there is no way to go from a type name to a type
08:37 < araujo> yeah, whatever you are doing, probably the reflect package
can help
08:40 < saracen> To get a reflection "Type", I need to have already have
created an instance of that struct though, right?
08:47 < araujo> you create with Typeof() , yeah
08:51 < saracen> ok, thanks guys :)
09:02 -!- peterdn [~peterdn@cpc1-oxfd18-2-0-cust914.4-3.cable.virginmedia.com] has
joined #go-nuts
09:09 -!- wrtp [~rog@92.16.115.185] has joined #go-nuts
09:17 < wrtp> ghiu: x.(string)
09:27 -!- MizardX- [~MizardX@unaffiliated/mizardx] has joined #go-nuts
09:27 -!- Netsplit *.net <-> *.split quits: wrtp, MizardX, scoeri, gnuvince
09:32 -!- scoeri [~jdekoste@soft.vub.ac.be] has joined #go-nuts
09:32 -!- Netsplit over, joins: gnuvince
09:35 -!- zozoR [~zozoR@x1-6-00-0e-2e-a3-e0-23.k377.webspeed.dk] has quit [Quit:
Morten.  Desu~]
09:36 -!- wrtp [~rog@92.16.115.185] has joined #go-nuts
09:39 -!- photron [~photron@port-92-201-119-95.dynamic.qsc.de] has joined #go-nuts
09:46 -!- bmizerany [~bmizerany@c-24-6-37-113.hsd1.ca.comcast.net] has quit
[Remote host closed the connection]
09:51 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has quit [Quit:
slashus2]
09:53 -!- MizardX [~MizardX@unaffiliated/mizardx] has quit [Ping timeout: 276
seconds]
10:00 -!- sahid [~sahid@LNeuilly-152-21-22-10.w193-253.abo.wanadoo.fr] has joined
#go-nuts
10:05 -!- willzyx [~josh_z@pitr.miechow.com] has joined #go-nuts
10:07 -!- willzyx [~josh_z@pitr.miechow.com] has left #go-nuts []
10:12 -!- napsy [~luka@212.235.174.112] has joined #go-nuts
10:14 -!- ghiu_ [~gu@93-32-145-212.ip33.fastwebnet.it] has joined #go-nuts
10:14 -!- ghiu [~gu@93-32-145-212.ip33.fastwebnet.it] has quit [Read error:
Connection reset by peer]
10:34 -!- pl3 [~noam@IGLD-84-229-10-137.inter.net.il] has joined #go-nuts
10:36 -!- pl3 [~noam@IGLD-84-229-10-137.inter.net.il] has quit [Read error:
Connection reset by peer]
10:37 -!- pl3 [~noam@IGLD-84-229-10-137.inter.net.il] has joined #go-nuts
10:51 -!- ronnyyy [~quassel@p4FF1D66B.dip.t-dialin.net] has quit [Remote host
closed the connection]
10:55 -!- pl3 [~noam@IGLD-84-229-10-137.inter.net.il] has quit [Read error:
Connection timed out]
10:56 -!- pl3 [~noam@IGLD-84-229-10-137.inter.net.il] has joined #go-nuts
10:57 -!- pl3 [~noam@IGLD-84-229-10-137.inter.net.il] has quit [Read error:
Connection reset by peer]
10:57 -!- pl3 [~noam@IGLD-84-229-10-137.inter.net.il] has joined #go-nuts
11:08 -!- napsy [~luka@212.235.174.112] has quit [Quit: Lost terminal]
11:25 -!- bjarneh [~bjarneh@1x-193-157-192-221.uio.no] has joined #go-nuts
11:33 -!- alehorst [~alehorst@189.58.132.65.dynamic.adsl.gvt.net.br] has quit
[Quit: Leaving.]
11:37 -!- alehorst [~alehorst@189.58.132.65.dynamic.adsl.gvt.net.br] has joined
#go-nuts
11:38 -!- saschpe [~saschpe@mgdb-4d0cfab9.pool.mediaWays.net] has quit [Remote
host closed the connection]
11:39 -!- crashR [~crasher@codextreme.pck.nerim.net] has joined #go-nuts
11:43 -!- KirkMcDonald [~Kirk@pysoy/developer/KirkMcDonald] has quit [Ping
timeout: 265 seconds]
11:45 -!- alehorst [~alehorst@189.58.132.65.dynamic.adsl.gvt.net.br] has quit
[Quit: Leaving.]
11:46 -!- artefon [~thiago@dhcp39.usuarios.dcc.ufmg.br] has joined #go-nuts
11:51 -!- alehorst [~alehorst@189.58.132.65.dynamic.adsl.gvt.net.br] has joined
#go-nuts
11:58 -!- rlab [~Miranda@91.200.158.34] has quit [Read error: Connection reset by
peer]
12:01 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
12:04 -!- peterdn [~peterdn@cpc1-oxfd18-2-0-cust914.4-3.cable.virginmedia.com] has
quit [Ping timeout: 240 seconds]
12:10 -!- ronnyy [~quassel@p4FF1D66B.dip.t-dialin.net] has joined #go-nuts
12:18 -!- alehorst [~alehorst@189.58.132.65.dynamic.adsl.gvt.net.br] has quit
[Ping timeout: 248 seconds]
12:19 -!- macroron [~macroron@c-98-242-168-49.hsd1.fl.comcast.net] has joined
#go-nuts
12:22 -!- boscop_ [~boscop@g227155181.adsl.alicedsl.de] has left #go-nuts []
12:22 -!- boscop [~boscop@g227155181.adsl.alicedsl.de] has joined #go-nuts
12:23 -!- alehorst [~alehorst@201.22.25.53.dynamic.adsl.gvt.net.br] has joined
#go-nuts
12:24 -!- pl3 [~noam@IGLD-84-229-10-137.inter.net.il] has quit [Read error:
Connection reset by peer]
12:28 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has quit [Ping
timeout: 276 seconds]
12:37 -!- kw- [~user@d91-128-74-102.cust.tele2.at] has joined #go-nuts
12:37 < mpl> hi, how do I add another file to a patchset of an already
existing issue?
12:38 < mpl> I tried adding the file path in the change description but it
didn't work
12:38 <+iant> mpl: run hg change and edit the list of files
12:38 <+iant> there is a list of files at the bottom of the file you edit
when using "hg change"
12:38 <+iant> then "hg pending" should show the files
12:38 <+iant> in the right changelist
12:39 < mpl> iant: that's what I did :/
12:40 <+iant> you edited the list after "Files:"?  Using a tab and listing
the file just like the other files in the list?
12:40 < mpl> yeah
12:40 <+iant> what happens when you run "hg change NNN" again?
12:40 < mpl> oh yes it shows up in hp pending now, but I guess I haven't
submitted it
12:40 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 260 seconds]
12:40 < araujo> strings can be sliced too right?
12:40 <+iant> araujo: yes
12:41 < mpl> iant: should I hg mail for the new patchset to show up in the
web interface?
12:41 <+iant> mpl: yes, "hg mail" will upload it and send another mail
message
12:41 < araujo> thanks iant ...  since I have mainly read examples with byte
slices instead of string, I was wondering if I had to convert string to byte or if
that would be more convenient ...
12:41 < mpl> iant: thanks
12:42 <+iant> mpl: or you can "hg upload" to upload without sending mail if
you want to do that for some reason
12:44 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
12:45 < mpl> iant: ah good to know, thanks.
12:47 < mpl> iant: one last thing.  when I did my initial "hg change" which
created the issue, did it automatically mail the reviewers?  if no, do ppl assume
that as long as the mail hasn't been sent the issue is not yet ready to be looked
at?
12:48 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has joined
#go-nuts
12:50 -!- roop [~roop@122.167.236.193] has quit [Remote host closed the
connection]
12:51 <+iant> mpl: no, an "hg change" doesn't send mail; only an "hg mail"
does that, I think
12:57 < nsf> hehe, recent Alexandrescu's talk on google tech talks, he says
that D compiles 4 times faster than Go :)
12:59 < nsf> although last time I tried to learn D 2.0, they had an outdated
spec, which is the most horrible thing you can do with a language (having an
outdated spec, making language implementation defined)
12:59 < nsf> :(
13:00 < mpl> iant: ok.  I guess that's why I had no news on my commit then,
heh.
13:05 -!- alehorst [~alehorst@201.22.25.53.dynamic.adsl.gvt.net.br] has quit
[Quit: Leaving.]
13:06 < hokapoka> Is it better to use my own slice's over map's if I'm going
to be appending and removing items regularly?
13:07 < hokapoka> When I say my own slices, I mean a slice of structs that
contains key:value pair.
13:08 <+iant> maps work well with regular insertions and removals
13:08 < hokapoka> Oh great.  I coun't see how to append / remove with a map.
13:08 -!- alehorst [~alehorst@201.22.25.53.dynamic.adsl.gvt.net.br] has joined
#go-nuts
13:09 < hokapoka> I'll read up on the again.
13:09 < araujo> nsf, I don't see how that is something better over Go ,
considering how long they have been working on D and the spec of such a language
is confusing
13:10 < nsf> araujo: I didn't say that D is better than Go
13:10 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined
#go-nuts
13:10 < nsf> in fact I'm actually amazed how bad project management can ruin
technologically good product :)
13:11 < Namegduf> Hmm, maybe someone will know.
13:11 < nsf> and I think Go can be 4x times faster than it's now at
compilation
13:11 < Namegduf> What kinda size in memory will a map typically be?
13:12 < Namegduf> Initially, and with perhaps <10 entries?
13:12 <+iant> is D really that much faster at compilation?
13:12 -!- jstorimer [~jesse@66-78-108-133.access.ripnet.com] has joined #go-nuts
13:12 < nsf> iant: Alexandrescu says it's because D uses async I/O and read
all files in parallel, etc.  And it has clear grammar too in fact
13:12 < nsf> reads*
13:13 <+iant> huh
13:13 < nsf> maybe isn't faster than Go, but it is fast, I'm sure :)
13:13 < nsf> it was one of the goals for Walter always
13:13 <+iant> Namegduf: see struct hash at the top of
src/pkg/runtime/hashmap.c
13:13 < Namegduf> iant: Thanks.
13:14 < nsf> http://www.youtube.com/watch?v=RlVpPstLPEc M- alexandrescu's
talk if anyone interested
13:14 < nsf> s/M-/<-/ :)
13:15 < buffi> D is kindof nice, but I don't really see the comparison to Go
13:16 < buffi> i haven't touched it in years though, but when I used it a
bit it was more close to c++ (but less ugly)
13:16 < nsf> I tried learning D, but compared even to C++ it has a very big
feature load
13:17 < nsf> and it was constantly terrifying me
13:18 < nsf> I think they underestimate the importance of feature
composition for a language
13:19 < araujo> nsf, ooh, no, I mean, not you, but what he was trying to
imply saying that
13:19 < araujo> in the talk
13:20 < nsf> araujo: hehe, well I don't know what he's thinking about Go
13:20 < araujo> yeah, tried to get to it some years ago
13:20 < araujo> felt the same
13:22 < nsf> but maybe I'm wrong, since having a big feature load doesn't
necessarily mean that all these features are composed badly
13:22 < nsf> I'll learn it someday :) when they have a correct spec on the
web
13:26 < nsf> hehe, I'm finishing watching the talk, and at the end some guy
asks about Go vs.  D, Alexandrescu actually says nothing to that, explaining that
he is just to biased to answer that honestly
13:26 < nsf> :)
13:26 -!- wrtp [~rog@92.16.115.185] has quit [Ping timeout: 276 seconds]
13:28 -!- angasule [c80571ea@gateway/web/freenode/ip.200.5.113.234] has joined
#go-nuts
13:28 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit:
This computer has gone to sleep]
13:29 -!- macroron [~macroron@c-98-242-168-49.hsd1.fl.comcast.net] has quit
[Remote host closed the connection]
13:31 -!- wrtp [~rog@92.16.115.185] has joined #go-nuts
13:32 -!- nickaugust [~nick@rrcs-97-79-25-103.se.biz.rr.com] has joined #go-nuts
13:37 -!- iant [~iant@62-20-124-50.customer.telia.com] has quit [Ping timeout: 240
seconds]
13:38 -!- peterdn [~peterdn@cpc1-oxfd18-2-0-cust914.4-3.cable.virginmedia.com] has
joined #go-nuts
13:41 -!- bjarneh [~bjarneh@1x-193-157-192-221.uio.no] has quit [Quit: bjarneh]
13:41 -!- alehorst [~alehorst@201.22.25.53.dynamic.adsl.gvt.net.br] has quit [Ping
timeout: 248 seconds]
13:42 -!- iant [~iant@62-20-124-50.customer.telia.com] has joined #go-nuts
13:42 -!- mode/#go-nuts [+v iant] by ChanServ
13:54 -!- iant [~iant@62-20-124-50.customer.telia.com] has quit [Ping timeout: 240
seconds]
13:55 -!- path[l] [~path@122.182.0.38] has joined #go-nuts
13:56 -!- roop [~roop@122.172.184.195] has joined #go-nuts
13:58 -!- alehorst [~alehorst@189.114.190.21] has joined #go-nuts
14:05 -!- fission6 [~silverman@65-86-91-130.client.dsl.net] has joined #go-nuts
14:06 < fission6> is there a web application framework for go?  i am coming
from django but want something that could potential promise better performance?
can anyone speak to this.
14:08 -!- tvw [~tv@212.79.9.150] has quit [Read error: Connection reset by peer]
14:08 < jessta> fission6: what do you want in a web application framework?
14:09 < jessta> the standard library has a http server and a template
package
14:09 < fission6> basically just url mapping to views which can work easily
with http resonpse and requests, POST params etc...  if there is an ORM or a just
a nice means of modeling that would be great
14:10 < nickaugust> fission6: theres web.go but if your looking for stuff
like the django admin i dont think anything like that exist yet
14:10 < jessta> ORM is such a crazy idea
14:11 < fission6> dont really care about anything more than just mvc in
general
14:11 < nickaugust> hehe you dont like ORMs?
14:11 < fission6> ORM is something i am not to fond of
14:11 -!- hstimer [~hstimer@2002:4c67:9b0d:0:226:bbff:fe05:dd9b] has joined
#go-nuts
14:12 -!- gid [~gid@220-253-29-69.VIC.netspace.net.au] has quit [Quit: Leaving.]
14:12 -!- chressie [~chressie@dreggn.in-ulm.de] has quit [Quit: WeeChat 0.3.2]
14:12 -!- chressie [~chressie@dreggn.in-ulm.de] has joined #go-nuts
14:12 < jessta> why use a relational database if you don't want to use the
relational features
14:13 < exch> Go is more of a 'do it yourself' deal.  All the buildingblocks
for something django-like are there.  You'll just have to roll your own :)
14:13 < jessta> fission6: there are a bindings for a few databases, sqlite,
mysql
14:13 < fission6> im excited about go but i think it just needs more time
perhaps before i can vest a solution in it
14:13 < fission6> let me read up on its standard types
14:13 < fission6> where can i do this
14:14 < fission6> im on golang.org
14:14 < jessta> read the language spec
14:14 -!- chickamade [~chickamad@115.74.102.172] has joined #go-nuts
14:15 < jessta> fission6: http://golang.org/pkg/template/
14:15 < fission6> i basically love python because of its data types
14:15 < mpl> hoisie's web.go is a start as well for doing some mvc stuff
14:16 < nickaugust> fission6: i'm coming from python as well.  Go will seem
a little unflexible for a bit..  it kinda forces you to do stuff the right way.
14:16 < fission6> what do you mean the right way
14:17 < smw> fission6, read the tutorial and effective go.  That should give
you most of the information you need.
14:17 < fission6> ok.
14:18 -!- ronnyy [~quassel@p4FF1D66B.dip.t-dialin.net] has quit [Remote host
closed the connection]
14:18 -!- rutkowski [~adrian@078088207115.walbrzych.vectranet.pl] has joined
#go-nuts
14:18 < fission6> the data types look a little primitive
14:18 < smw> fission6, yep.  What did you expect/want?
14:18 < fission6> i like python's list, dict types
14:19 < jessta> fission6: we have slice and maps
14:19 < smw> fission6, look at maps and vectors
14:19 < smw> vectors are slices that have many of the "list" functions.
14:19 < fission6> what about comprehensions, sort, filter, etc...  thats
whta gets me wet with python
14:20 < fission6> ok i should read
14:20 < jessta> no comprehensions
14:20 < jessta> for sorting see: http://golang.org/pkg/sort/
14:21 < smw> fission6, vectors are in the lib but not builtin like python.
http://golang.org/pkg/container/vector/
14:21 < fission6> any plan to make them native?
14:21 < smw> no
14:22 < smw> go is really closer to C than python
14:22 < fission6> how does the last statment justify "no", just curious
14:23 < smw> vectors are too high level to be added.
14:23 < fission6> whats the trade off of adding vs not adding
14:24 < smw> they can be inefficient.
14:24 -!- jA_cOp [~yakobu@unaffiliated/ja-cop/x-9478493] has quit [Ping timeout:
245 seconds]
14:24 < fission6> right but if you want to use them why do i need to import
explicitly
14:24 < fission6> if i dont use it, i dont use it
14:24 < smw> the trade off is Pro: awesome addition Con: adds another thing
to the spec.
14:25 < fission6> hmm
14:25 < jessta> fission6: there is no reason to make them built-ins because
they can be implemented with the built-in types
14:25 -!- Project_2501 [~Marvin@82.84.72.65] has joined #go-nuts
14:25 < Namegduf> You should be looking at it the other way.
14:25 < fission6> hmm ok
14:25 < Namegduf> What's the pro of building it in?
14:25 < Namegduf> The answer is basically that there isn't.
14:25 < fission6> dont have to build it from scratch and its a popular data
type
14:26 < Namegduf> You don't have to build it from scratch.
14:26 < Namegduf> You can use the damn package containing it.
14:26 * exch never used a vector
14:26 < Namegduf> Which is included with the language.
14:26 < smw> fission6, it is still in the std libs.
14:26 < Namegduf> So I ask again, what's the pro?
14:26 < fission6> dont have to explicitly include it since 80% (yes thats
just a lame guess) of code likely uses vectors in some fashion
14:26 < Namegduf> It's a very wrong guess.
14:26 < fission6> cool, any books you'd recommend on learning go
14:27 < fission6> or are there none yet
14:27 < smw> fission6, most people use slices and arrays (mostly slices)
14:27 -!- wrtp [~rog@92.16.115.185] has quit [Ping timeout: 265 seconds]
14:27 < Namegduf> I would suggest reading the website
14:27 < exch> there are no Go books yet
14:27 < Namegduf> No books yet at all, let alone any good ones.
14:27 < exch> There was mention of one being released, but that'll take a
while
14:27 < fission6> any drivers for cassandra or nosql persistence?
14:27 < nickaugust> fission6: lots of things youd think you would need a
vector for you can just do with an array
14:28 < saracen> fission6: Somebody has written a library for mongodb I
believe
14:28 < fission6> interesting, c wrappers?
14:28 < Namegduf> The use of slices instead of vectors is one of the kind of
things that makes Go faster than Python.
14:28 < Namegduf> If you want Python's features, you need to use Python.
It's just that Python's features cause Python's performance.
14:29 < nickaugust> yeah so with Go its nice because you dont have to use
that stuff unless you need it
14:29 < nickaugust> but if you need it its there, just import it
14:29 < Namegduf> Vectors are slower, and only using them when you
explicitly need the things they have and slices don't, along with every other
instance of not using slower structures and such unless you need their features,
makes faster implementations possible.
14:29 < fission6> nickaugust: i remeber you in python channels, why did you
move to go?  again, just gathering opinions
14:30 < nickaugust> and i suspect lots more interesting packages will be
built as time goes on
14:30 < fission6> i like array.sort() vs sort(array)
14:30 -!- awidegreen [~quassel@62.176.237.78] has joined #go-nuts
14:31 < fission6> whatever, i need to read more documentation to see whats
going on, nickaugust what sort of dev work are you doing that made yo move from
python to go
14:32 < fission6> ...and do you still use python for things
14:32 -!- jA_cOp [~yakobu@unaffiliated/ja-cop/x-9478493] has joined #go-nuts
14:32 -!- wrtp [~rog@92.16.115.185] has joined #go-nuts
14:32 < nickaugust> fission6: i like python..  it was a good language for me
to use at the time and django go my project up and running quickly and all that.
but ive been learning a little bit about lots of differnent programming languages.
haskell, erlang, and a few others which are all interesting right but the basic
concepts are really rooted in C. In order to have a good understanding about what
the computer is
14:32 < nickaugust> actually doing you should learn some basic concepts from
C.
14:32 -!- kw- [~user@d91-128-74-102.cust.tele2.at] has quit [Ping timeout: 276
seconds]
14:33 < nickaugust> but as it turns out C is an old language...  and some
stuff is just a PITA to do in C
14:33 < nickaugust> but knowing about things like memory allocation is going
to be good for you long term
14:33 < nickaugust> so Go is kinda a C'ish language that tries to address
some new issues like concurrency
14:34 < fission6> right i mean i know all that i used c++ before anything
else 12 yrs ago
14:34 < fission6> brb
14:34 < nickaugust> wel c++ is a different story
14:34 < Namegduf> Go is a language which implements low-level operations on
types in memory and bindings to APIs via a simple and elegant syntax, simpler than
C's, then adds abstactions on top only where they're helpful.
14:35 < smw> fission6, I thought of a great way of explaining it.  C is an
awesome language because it is simple (design-wise).  You can do almost anything
in it and make it as efficient or inefficient as you like.  Python is an awesome
language because it is very simple (programming-wise).  It is automatically going
to be less efficient because of what is built on top of it, but it works.
14:35 -!- jA_cOp_ [~yakobu@unaffiliated/ja-cop/x-9478493] has joined #go-nuts
14:35 < smw> fission6, go aims to be the first type ;-)
14:37 -!- rlab_ [~Miranda@91.200.158.34] has joined #go-nuts
14:38 < fission6> alrighty
14:38 < fission6> how much has google themselves adopted go
14:38 < nickaugust> also c++ != C
14:38 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 264 seconds]
14:38 -!- jA_cOp [~yakobu@unaffiliated/ja-cop/x-9478493] has quit [Ping timeout:
245 seconds]
14:38 < nickaugust> well I know Rob Pike uses it :P
14:39 < smw> fission6, my guess is that google is not using it much.
14:39 < jessta> fission6: apparently there are a few projects using Go in
production
14:39 < jessta> at google
14:39 < fission6> fascinating
14:39 < smw> I want to see go in app engine :-D
14:39 < jessta> fission6: golang.org runs on
14:39 < fission6> well yea id say thats the de facto of adoption for them
14:39 < jessta> Go
14:41 < fission6> im thinking go would be a nice complement to a djano
application for web services for certain things, i have to thing this through
more, i mean the other thing is i feel web apps are totally moving much more stuff
to the client side
14:41 < fission6> i love template systems in all js with just web service
calls
14:41 < fission6> so light
14:41 < smw> this has nothing to do with go, but more client side is not
always a good thing
14:42 < fission6> true, i think in web apps it is though
14:42 < fission6> well again i guess it considers what your doing
14:42 < wrtp> i was just looking at the go websocket stuff: is it ok to
write abitrary data to websocket.Conn or is it restricted to utf-8 text?
14:43 < nickaugust> fission6: i was doing some stuff with couchdb which was
basicly and API that took and returned JSON documents and the whole thing was
written in javascript with a templating funciton like..  what his name..  the
jquery guy..  he talks about it in the book secrets of a javascript ninja...  so
that was kinda neto.  but honestly the javascript/DOM stuff really sucks
14:44 < nickaugust> javascript itself is not a bad language but programming
for the browser just sucks right now
14:44 < nickaugust> and I dont think the html5 stuff is going to make it any
better
14:45 < nickaugust> <off topic>
14:48 < smw> offtopic is ok as long as no one wants to talk about Go
14:51 -!- artefon [~thiago@dhcp39.usuarios.dcc.ufmg.br] has quit [Quit: bye]
14:52 -!- rlab_ [~Miranda@91.200.158.34] has quit [Ping timeout: 276 seconds]
14:54 < nickaugust> well in that case...  ;) the other day i heard someone
say the web exists in spite of http/javscript/html/ect and not because of it.  i
thought that was interesting.  also crockford has some interesting videos on the
history of javascript if youre intrested in that stuff
14:55 -!- chickamade [~chickamad@115.74.102.172] has quit [Quit: Leaving]
14:56 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
14:57 -!- chickamade [~chickamad@115.74.102.172] has joined #go-nuts
14:58 < fission6> i always wonder if js would be replaced by something else
14:58 < fission6> i feel it could / will be
14:58 < nickaugust> javascript is really the problem
14:58 < nickaugust> s/is/isnt
14:58 < fission6> what is
14:58 < nickaugust> sorry..  its the browser..  and specificly the dom.
14:58 < fission6> browser will go away
14:59 < fission6> what do you mean by the dom
14:59 < nickaugust> the DOM..  document object something or other..
14:59 < fission6> applications iwll just be web service calls with simple
markup language laying out the ui on the client side
15:00 < fission6> the concept of a "browser" will fade, cause people wont be
browsing the web, they will be "using it"
15:00 < nickaugust> its the object your writing (under the javscript and
html) to make website look the way it does
15:00 < fission6> i know what dom is, i am saying how is this what you see
as the problem?
15:00 < nickaugust> yeah thats a popular theory i guess
15:00 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
15:00 -!- rutkowski [~adrian@078088207115.walbrzych.vectranet.pl] has quit [Quit:
WeeChat 0.3.3-dev]
15:01 < fission6> but yeah tell me hwy you see dom as the issue
15:01 < fission6> i find that an interesting take
15:01 < jessta> the problem is that the 'web' is for documents and somewhere
along the line people forgot that the internet exists without the web.
15:02 < jessta> so instead of writing network applications they starting
trying to turn documents in to applications
15:02 -!- falconindy [~noclaf@unaffiliated/falconindy] has joined #go-nuts
15:02 < exch> the web is becoming like C++..  slapping one hack ontop of the
other to make it do stuff it was never intended to do :p
15:03 < jessta> it's only advantage is deployment
15:03 < fission6> right, i think its shifting though perhaps subconsiously
to really its not about documents but just the exchange of content to a front end,
a revert to just using it to exchange information , not end to end document as the
end all to user experience
15:03 < nickaugust> it just sucks programming for it..  the differences in
the different browsers, and different versions of browsers...  ok so to understand
the issue here you should watch douglas crockford videos about how our current
tehcnology has evolved.  once a standard is in place and has a certain amount of
market acceptance it becomes really difficult to replace it.  so we get a lot of
standards, HTTP for
15:03 < nickaugust> instance, which seemed good at the time turn out to be
not really that good.
15:04 < nickaugust> with hindsight.  but its hard to get everybody to
change...  you know?
15:04 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined
#go-nuts
15:04 < jessta> nickaugust: HTTP is great for documents
15:05 < jessta> the stateless nature scales really well
15:05 < fission6> i dont mind http
15:05 < jessta> but it's messy went you hack on state(ie.  cookies)
15:05 < fission6> im sold on the nature of people glued to web being
complete documents with tons of over head vs just using it for what its intended
for, exchanging information
15:07 < chressie> wrtp: looking at websocket Conn implementation, it does
not seem to be restricted to utf8.  the read and write methods just have some
magic for frame detection, but i think that does not mess with utf8 and non-utf8
payload
15:08 -!- napsy [~luka@212.235.174.112] has joined #go-nuts
15:08 < nickaugust> jessta: its funny because i was arguing that http was
fine for what we need it for the other day.  i dont really think its that bad but
theres some funky stuff witht he headers and methods and stuff.  the point is how
hard it is to change the http spec
15:09 < nickaugust> theres even a typo in the spec..  the referrer header is
spelled referer or somethign like that
15:11 < wrtp> chressie: but what happens if your arbitrary data contains a
frame termination byte (0xff)?  i've only glanced at the websocket standard, but
it looks as if it's designed to work for utf-8 text only.
15:14 < chressie> wrtp: oh yeah you're right, that will mess up the read
process..  okay, so it's possible to send arbitrary data excluding 0xff ?
15:17 -!- scm [justme@d056075.adsl.hansenet.de] has quit [Ping timeout: 264
seconds]
15:17 < mpl> nickaugust: there's an explanation for that referer typo in the
code iirc
15:17 < wrtp> chessie: that's not great if you want to send gob-encoded
data, for example
15:20 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has quit [Ping timeout: 240
seconds]
15:22 -!- impl [impl@atheme/member/impl] has quit [Ping timeout: 240 seconds]
15:24 -!- KirkMcDonald [~Kirk@pysoy/developer/KirkMcDonald] has joined #go-nuts
15:25 -!- impl [impl@atheme/member/impl] has joined #go-nuts
15:26 < nickaugust> mpl: "The misspelling referer originated in the original
proposal by computer scientist Phillip Hallam-Baker to incorporate the field
15:26 < nickaugust> into the HTTP specification.[1] The misspelling was set
in stone by the time of its incorporation into the standards document RFC 1945;
document co-author Roy Fielding has remarked that neither "referrer" nor the
misspelling "referer" were recognized by the standard Unix spell checker of the
period."
15:27 < nickaugust> according to wikipeida
15:29 < mpl> nickaugust: http://golang.org/pkg/http/#Request
15:29 -!- sacho [~sacho@90-154-149-17.btc-net.bg] has joined #go-nuts
15:30 -!- MizardX [~MizardX@unaffiliated/mizardx] has joined #go-nuts
15:32 -!- sacho [~sacho@90-154-149-17.btc-net.bg] has quit [Client Quit]
15:34 -!- Venom_X [~pjacobs@71.21.124.111] has joined #go-nuts
15:35 < nickaugust> yep there it is.  tough to fix mistakes once they become
a standard :)
15:40 -!- sacho [~sacho@213.91.244.15] has joined #go-nuts
15:40 -!- Nexoro [~nexo@c-71-192-75-183.hsd1.ma.comcast.net] has joined #go-nuts
15:42 -!- roop [~roop@122.172.184.195] has quit [Ping timeout: 260 seconds]
15:45 -!- tokuhiro_ [~tokuhirom@s230.GtokyoFL21.vectant.ne.jp] has joined #go-nuts
15:46 -!- ghiu_ [~gu@93-32-145-212.ip33.fastwebnet.it] has joined #go-nuts
15:46 -!- ghiu [~gu@93-32-145-212.ip33.fastwebnet.it] has quit [Read error:
Connection reset by peer]
15:49 < mpl> ffs.  I got so accustomed to the automatic break in go's switch
statements that I forgot it everywhere in my java code.  been wondering where was
the mistake for the last 10 mins :(
15:49 -!- artefon [~thiagon@150.164.2.20] has joined #go-nuts
15:53 -!- ikaros [~ikaros@dslb-188-097-070-234.pools.arcor-ip.net] has joined
#go-nuts
15:54 < nickaugust> so len() doesnt do length of arrays?  how do I do that?
15:54 < exch> it does
15:55 < nickaugust> hm
15:55 -!- iant [~iant@81-233-149-58-no82.tbcn.telia.com] has joined #go-nuts
15:55 -!- mode/#go-nuts [+v iant] by ChanServ
15:55 < exch> 'arr := [3]int{1,2,3}; println(len(arr))' prints 3 as it
should
15:56 -!- Xurix [~Luixsia@AToulouse-254-1-3-177.w83-203.abo.wanadoo.fr] has joined
#go-nuts
15:56 < hokapoka> On that, how do I add to a slice that has sufficent
capcaity?
15:57 < nickaugust> hokapoka: thats what im dealing with right now :) when
you make() a slice it makes an underlying array...  so you have to know the length
ahead of time
15:57 < nickaugust> if you need something dynamic you need to use a vector
15:57 -!- hstimer [~hstimer@2002:4c67:9b0d:0:226:bbff:fe05:dd9b] has quit [Quit:
hstimer]
15:58 < hokapoka> var foo []bar; foo = make([]bar, 0, 100); l = len(foo);
foo[l] = &bar{};
15:58 < hokapoka> ^^ This doesn't work
16:00 < nickaugust> im not sure what youre trying to do there sorry
16:00 < hokapoka> http://golang.org/doc/effective_go.html#slices <- this
is the only details I can find on it atm
16:01 < hokapoka> I _thought_, and must be wrong.  That it declares a var
foo that's []bar.  And then make creates an instance, capacity = 100 and length =
0.
16:01 < nickaugust> make(T, n, m) slice slice of type T with length n and
capacity m
16:02 < hokapoka> Then len(foo) would be 0 (the first itteration) so foo[0]
= some new instance
16:02 < nickaugust> so you created a slice with length of 0 and capacity of
100
16:02 < hokapoka> yeah
16:02 < nickaugust> so len(foo) is 0
16:02 < hokapoka> yep
16:02 < exch> you can't index a slice beyond its length.  and it's length
can never exceed the capacity
16:02 < exch> if you want any space in the slice, make() it with len > 0
16:03 < hokapoka> Then how would I add an item to the slice?
16:03 < exch> the capacity is intended for the maximum size of the
underlying array.  This allows you to create a slice which only refers to a subset
of the underlying array
16:03 < exch> You have to create a new slice with increased slice and copy()
data from the first slice to the new one
16:03 < nickaugust> so if make([]bar, 1, 100 you access the first spot as
[0]bar?
16:03 < exch> yes
16:04 < hokapoka> Oh.
16:04 < nickaugust> hokapoka: get that?
16:04 < nsf> bar[0]
16:04 < exch> you can't dynamically resize a slice or array
16:04 < nsf> !
16:04 < nickaugust> nsf: howdy!  do you have that keyboard demo ported to Go
by any chance?
16:04 < nsf> nickaugust: no
16:04 < nickaugust> exch: yes..  now we're back to yesterdays conversation
:)
16:04 < nsf> take a look at its code
16:04 < nsf> it was written in a very hardcoded style
16:05 < nsf> each button here and it's position, etc..  all hardcoded
16:05 < nsf> I won't port that to anything :)
16:05 < nickaugust> i looked at the go example code..  i'll look at the C
stuff today
16:05 < nickaugust> nsf: understandable :)
16:06 -!- iant [~iant@81-233-149-58-no82.tbcn.telia.com] has quit [Quit: Leaving.]
16:07 < nickaugust> oh yes bar[0] not [0]bar of course
16:07 < nsf> hokapoka: I have a code example for slices I use
16:07 < nsf> for you
16:07 < hokapoka> Oh sweet, please.
16:07 < nsf> sec
16:08 < nsf> http://pastie.org/1075300
16:09 < nsf> basically you can replace self.tokens with any other slice
16:09 < nsf> it's like "append" function
16:09 < nsf> reallocates slice if it is required
16:10 < nsf> and if you have any questions regarding slices I'll answer :)
16:11 < hokapoka> nsf: That's GREAT.  THe penny has dropped!
16:12 < nsf> self.tokens = self.tokens[0:i+1]
16:12 < nsf> that's the most tricky line
16:12 < nickaugust> so does defining a variable with := affect its scope?
16:12 < nsf> it changes slice's length
16:12 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has joined #go-nuts
16:12 < nsf> nickaugust: what do you mean?
16:13 < nsf> defining a var with := behaves the same as "var" declaration
16:13 < nickaugust> just that is var n int the same as n := 1
16:13 -!- kanru [~kanru@118-168-239-91.dynamic.hinet.net] has joined #go-nuts
16:13 < nsf> not it's not
16:13 -!- napsy [~luka@212.235.174.112] has quit [Quit: Lost terminal]
16:13 < nickaugust> er
16:13 < nsf> n := 1
16:13 < nickaugust> no wait
16:13 < nsf> var n int = 1
16:13 < nickaugust> thats not what i mean
16:13 < nsf> are the same
16:13 < nickaugust> yeah
16:13 -!- pl3 [~noam@IGLD-84-229-10-137.inter.net.il] has joined #go-nuts
16:15 -!- pl3 [~noam@IGLD-84-229-10-137.inter.net.il] has quit [Read error:
Connection reset by peer]
16:15 -!- pl3 [~noam@IGLD-84-229-10-137.inter.net.il] has joined #go-nuts
16:16 < hokapoka> nsf: yeah it's was that I was originally missing, [0:l+1]
16:17 -!- scm [justme@d165089.adsl.hansenet.de] has joined #go-nuts
16:18 < nickaugust> ok so I count my files (l := len(files)) then create my
slice (out_data := make([]Location, 0, l)) and loop over the files (for index, val
:= range files {) but I still get index out of range (out_data[index] = location)
what am I missing here
16:18 < nsf> the point here is that when you're taking a slice of a slice A,
you're actually taking a slice of an array that lies under slice A
16:18 < nsf> nickaugust: you're making a slice with 0 length
16:18 < nsf> and l capacity
16:18 < nsf> that form of make is rarely used actually
16:19 < nsf> use make([]Location, l)
16:19 < nickaugust> ooooh yeah ...  shoot thats what we just talked about
16:19 < nickaugust> sorry..  yeah i got it
16:19 < nickaugust> why would you want to create a 0 length slice anyway?
16:20 < nsf> if you want to preallocate some space and use its length
somehow
16:21 < nickaugust> so if you cant change its length by just writing to the
next index like foo[1] how do you change the length?
16:21 < nsf> no
16:21 < nsf> you need to assign slice to itself kind of
16:21 < nsf> s := make([]int, 0, 10)
16:21 < nsf> s = s[0:5]
16:21 < nsf> changes length of a slice s to 5
16:23 < nickaugust> gotcha..  but youd only want to do that if you needed to
keep track of the exact length
16:24 < nsf> well, length is used when you're iterating over slice using
"for range" statement for example
16:24 < nsf> so you can use it that way
16:24 < nsf> or any other way you can imagine
16:24 < nickaugust> interesting
16:25 < nsf> I don't find it interesting, actually I don't understand why we
can have map type which can reallocate itself
16:25 < nsf> and still don't have an array that grows automatically
16:26 < nsf> vector.Vector is just an illusion of that
16:26 < nickaugust> i thought it was more efficent this way
16:26 < nsf> that's not the point
16:27 < nsf> of course preallocating size if you know it is more efficient
16:27 < nickaugust> it would be simple enough to write the reallocation
abstraction on top
16:27 < nsf> but things like vectors are _very_ common in all languages
nowadays
16:27 < nickaugust> you dont like the vector package?
16:27 < nsf> nickaugust: yes, like the function I've mentioned
16:28 < nsf> no, I don't
16:28 < nsf> and I don't use it
16:28 < nickaugust> yeah they could make that reallocation a little prettier
16:28 < nsf> I copy&paste function like above for any type I need a growing
array
16:29 < nickaugust> you mean you predifine more capacity than you'll need
and extend the length as needed?
16:29 -!- MaybeSo [~jimr@lions.Stanford.EDU] has left #go-nuts []
16:29 < nsf> yes, and if there is not enough capacity, I do reallocation and
copy
16:29 < nsf> this is what std::vector does
16:29 < nsf> or any other vector implementation
16:30 < nsf> including vector.Vector
16:30 < Namegduf> And container/vector
16:30 < nsf> which is in that module, yes :)
16:34 -!- MaybeSo [~jimr@lions.Stanford.EDU] has joined #go-nuts
16:34 < nickaugust> which id imagine is what the other languages are doing
behind the scenes
16:36 < nsf> in fact I think that's what you need for almost any kind of
task
16:36 < nsf> a vector and a hash map
16:36 < Namegduf> I don't understand the point of discussion here
16:36 < nsf> me neither
16:36 < nsf> we're just chatting :D
16:36 < Namegduf> You were complaining that a map is reallocated, but an
array does not?
16:36 < nsf> no
16:36 < nsf> I'm complaining that Go doesn't have 'vector' built-in type
16:36 < MaybeSo> I was curious why the Go people decided to very explicitly
call out slices and arrays as different things
16:36 < nsf> but it has map and slices
16:37 < nsf> MaybeSo: that's easy
16:37 < nsf> arrays are for structs
16:37 -!- ShadowIce [pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
16:37 < nsf> because you need them to be able to design memory layouts
16:37 < Namegduf> nsf: That's easy.
16:37 < nsf> for example java has problems with that as far as I know
16:37 < Namegduf> nsf: Map is built-in because you can't easily write it in
Go.
16:37 < Namegduf> Due to lack of generics.
16:38 < Namegduf> And other issues.
16:38 < nsf> Namegduf: and you can't write a vector in go
16:38 < nsf> due to lack of generics :)
16:38 < nsf> and operator overloading
16:38 < nsf> "and other issues"
16:38 < nsf> :)
16:38 < Namegduf> Don't add that ":)"
16:38 < MaybeSo> I'm beginning to think all design issues lead back to
generics or lack thereof.  :D
16:38 -!- hstimer [~hstimer@70.90.170.37] has joined #go-nuts
16:38 < Namegduf> It makes you look/sound like a asshat.
16:38 < Namegduf> Thanks.
16:39 -!- roop [~roop@122.172.184.195] has joined #go-nuts
16:39 < Namegduf> Anyways.
16:39 < nsf> it's a stupid habit
16:39 < nsf> that's why my nick name sound "no smile face" it's a sarcasm
16:39 < Namegduf> The difference is that maps are incredibly useful and
vectors aren't, I believe.
16:39 < nsf> sounds*
16:39 < Namegduf> In their judgement.
16:39 < nsf> this is not true
16:39 < Namegduf> And if you DO need a vector of a type, it's just a single
function added to a slice.
16:39 < nsf> well, or maybe it is
16:39 < nsf> arrays are useful yes
16:40 < Namegduf> While you have no similar easy option if you do need a map
of a type
16:40 < Namegduf> Slices
16:40 < nsf> vectors are just a hack for "unknown sized" arrays
16:40 < Namegduf> Arrays aren't analogous, they're fixed-size
16:40 < MaybeSo> nsf: it is nice not to have to reimplement the logic behind
Expand() every time one writes a new program
16:40 < Namegduf> A vector seems to emulate a slice with an unlimited cap.
16:40 < nsf> MaybeSo: agreed
16:40 < Namegduf> Effectively.
16:41 < nsf> Namegduf: are we talking about hypothetical vector or about
container/vector?
16:41 < nickaugust> nsf: i thought it was Not Safe For
16:41 < Namegduf> Both.
16:41 < nsf> container/vector takes Java's approach minus type safety
16:42 < nsf> I think it's a bad solution
16:42 < nsf> but hypothetical vector is ok :)
16:42 < nsf> and ":)" again
16:42 < nsf> sorry :)
16:42 < nsf> oops
16:42 < Namegduf> At any rate, the reason not to build it in is that it adds
very little over what slices can do, and that very little is easy to do manually
when you need it, even if it's a fairly common need.
16:42 < nsf> can't do anything with that
16:42 < Namegduf> I believe.
16:43 < Namegduf> You must be able to appreciate that adding a total of
three types for handling continuous blocks of data- array, slice, and vector
16:43 < nsf> Namegduf: I don't know, maybe you're right
16:43 < Namegduf> Would be ugly
16:43 < nickaugust> its not really that hard to import container/vector
either when you want it
16:43 < nsf> I mean it's not that hard writing those functions
16:43 < Namegduf> And having slices autoexpand would also be ugly
16:44 < nsf> and three types is too much
16:44 < Namegduf> And interfere with slicing on a static array
16:44 < Namegduf> Yeah.
16:44 < nsf> good point
16:44 < nsf> then it means that sometimes I just miss generics
16:45 < Namegduf> Yeah.
16:45 < Namegduf> It's all a matter of tradeoffs.
16:45 < nsf> it's actually an interesting thing, because it shows how
language actually affects your code
16:45 < nsf> if I would have this std::vector<T>
16:45 < Namegduf> Which is good.  The only time I've not observed a language
be a matter of compromise
16:45 < Namegduf> Is where languages ignored performance as a concern entire
16:45 < nsf> I would just use it everywhere
16:45 < Namegduf> Yeah.
16:46 < nsf> and without it I'll think twice
16:46 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Ping
timeout: 264 seconds]
16:46 < Namegduf> I think the fact that Go encourages people to default to
more restrictive, faster to implement structures
16:46 < Namegduf> And use slower ones where necessary
16:46 < Namegduf> Is one reason Go code can get faster performance than,
say, Python by nature.
16:46 -!- sahid [~sahid@LNeuilly-152-21-22-10.w193-253.abo.wanadoo.fr] has quit
[Quit: Ex-Chat]
16:47 -!- path[l] [~path@122.182.0.38] has quit [Quit: path[l]]
16:48 < nsf> and with that thing in mind (that languages affects a lot how
you're coding stuff) it's quite hard to imagine generics implementation that will
not make a mess out of this
16:49 -!- Fish [~Fish@9fans.fr] has joined #go-nuts
16:49 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined
#go-nuts
16:49 < nsf> I mean each "generic" library that is available can potentially
affect your coding style
16:49 < nickaugust> being new to Go I agree with that ^ I keep thinking man
I need a StringVector here...  oh wait I can do that with an array
16:51 < nsf> conclusion: templates are dangerous
16:51 < nsf> :)
16:51 < nsf> (now my ":)" was intentional)
16:51 < nsf> :)
16:51 < Namegduf> I would love a fast generics implementation
16:51 < Namegduf> Just for generic containers.
16:52 < Namegduf> interface{} isn't too bad, though.
16:52 < Namegduf> I mean, I think unboxing is just a dereference or two.
16:52 < nsf> it's not an accessing speed problem
16:52 < nickaugust> ive been reading this article but I dont understand what
generics are.  types that the compiler understands?
16:52 < Namegduf> interface{} is close to how you'd do it in C, too.
16:52 < nsf> it's more about memory management
16:52 < Namegduf> (void*)
16:53 -!- path[l] [~path@122.182.0.38] has joined #go-nuts
16:53 < nsf> interface{} makes you unable to do an array of fairly large
structs
16:53 < nsf> with container/vector
16:53 < nsf> because it becomes an array of pointers
16:53 < Namegduf> That is true, but that's how you'd have to do it in C
anyway.
16:53 < nsf> and especially with current GC you don't want that :)
16:54 < nsf> in C I have preprocessor :)
16:54 < nsf> http://github.com/nsf/bmpanel2/blob/master/array.h
16:54 < nsf> :D
16:54 < Namegduf> nickaugust: Generics are basically types defined in terms
of other types.
16:54 < nsf> and it works..
16:54 -!- sacho [~sacho@213.91.244.15] has quit [Remote host closed the
connection]
16:55 < Namegduf> nickaugust: So, for example, a vector defined in terms of
type T would have methods expecting type T.
16:55 -!- kanru [~kanru@118-168-239-91.dynamic.hinet.net] has quit [Ping timeout:
276 seconds]
16:55 < nickaugust> ok so genarics are types that the compiler doesnt know
about then?  but understands them in terms of a type that it does know
16:56 < Namegduf> No
16:56 < Namegduf> The compiler fully knows about all types
16:56 < Namegduf> This is a statically compiled language
16:56 < nsf> generics are a mechanism to generate code based on specified
types
16:56 < Namegduf> Not quite true
16:56 < Namegduf> That's more templates
16:56 < nsf> well, yes
16:56 < nsf> :)
16:56 < Namegduf> But that's one way to implement them.
16:57 < nsf> the other one is type-safe boxing/unboxing
16:57 < nsf> and I don't know any other
16:57 < Namegduf> Given that all interface{} types in Go are the same size
16:57 < Namegduf> Anything wrapped in an interface value could be stored at
runtime in the same array as another without an extra boxing.
16:58 -!- artefon [~thiagon@150.164.2.20] has quit [Quit: Leaving]
16:58 < nsf> Namegduf: actually having generics that will allow you to
create only custom containers is an interesting idea
16:58 < Namegduf> The problem comes with arrays, and types of variable size.
16:58 < nsf> because containers also need an overloaded indexing operator
16:58 < Namegduf> Hmm.
16:59 < nsf> and in that case we can simply implement both type-based code
generation and partial operator overloading
16:59 < nsf> as a special case for custom containers specification
16:59 < Namegduf> nickaugust: Practically, generics permits typesafe
containers for arbitrary types, by letting you specify the type when you create
the container, then have type errors happen if you try to insert/lookup values of
the wrong type.
17:00 < Namegduf> nickaugust: With the ability to create arrays of the
arbitrary type, you could also use them to implement containers containing arrays
of their contained type
17:00 < Namegduf> Which boxing/unboxing prevents.
17:00 < nickaugust> container being the block of memory allocated?
17:00 < Namegduf> "container" being the type.
17:01 < Namegduf> i.e.  Vector.
17:01 < nickaugust> ok
17:01 < nsf> it's an abstraction
17:01 < nickaugust> right
17:01 < nsf> thing that holds other things
17:01 -!- artefon [~thiago@dhcp44.usuarios.dcc.ufmg.br] has joined #go-nuts
17:02 < Namegduf> With Java-like containers, you'd go
new(vector.Vector<String>()) and then have a value of type
Vector<String>
17:02 < nickaugust> so what languages have generics?
17:02 < nickaugust> ah
17:02 < Namegduf> Very roughly, I've never used vector.Vector.
17:02 < Namegduf> C++ does- it does it by templating.
17:03 < Namegduf> That is, generating a separate set of all code for the
generic type for every subtype.
17:03 < Namegduf> Downside, it gets slow to compile, and potentially large.
17:03 < nickaugust> because it has to go through templating for all the
types used?
17:03 < nsf> Namegduf: it's not really true for "slow" part
17:03 < nsf> it can be fast
17:04 < nsf> C++ just implements templates in a wrong way
17:04 < nsf> but it can blow an amount of generated code, yes
17:04 < Namegduf> Java does, but only for Objects, which are basically
stored as a pointer to the actual object, so all things are of the same size.
17:04 < Namegduf> So one copy of the code can handle any type, and it's only
a compiler issue.
17:05 < Namegduf> This has similar issues to interface{} and void*; you're
restricted to storing pointers.
17:05 < nickaugust> so interface{} is the container in Go?
17:05 < Namegduf> No.
17:05 < Namegduf> The container is vector.Vector or similar
17:06 < Namegduf> http://en.wikipedia.org/wiki/Container_(data_structure)
17:06 < Namegduf> ^ May help.
17:06 < Namegduf> Java's are like Go as it is, but with type safety, at
least.
17:06 < nickaugust> ah, like a class
17:06 < nsf> actually interface{} is a container in Go imho..  because it
stores a value and it's type information
17:07 < nsf> its*
17:07 < Namegduf> nsf: It only stores one value.
17:07 < nsf> yes, but it contains it, right?  :)
17:07 < Namegduf> I wouldn't really consider that a "container", and if it
is one, it doesn't seem relevant for discussion.
17:07 < Namegduf> As it does not have the problems or features or operations
of any other container.
17:08 < jessta> nsf: that would make a slice also a container
17:08 < nsf> for example in GTK there is a class called "bin" which is a
container, but can store only one object :)
17:08 < Namegduf> Sounds to me like GTK is stupid
17:08 < nsf> :D
17:08 < jessta> nsf: and all structs would be containers
17:08 < nickaugust> so I understand what containers are.  so generics are
custom defined containers?
17:08 < Namegduf> No
17:08 < nsf> jessta: ok, ok, I was wrong about interface{} being container
17:09 < Namegduf> "Generics" is the name of a language feature to let you
define types based on other types
17:09 < Namegduf> Which is useful for writing containers.
17:09 < nickaugust> Namegduf: could you give me an example of defining a
type based on other types?
17:09 < nickaugust> i dont really get that
17:09 < Namegduf> I think "generic types" would ba reasonable expansion of
"generics", but I could be incorrect.
17:10 < Namegduf> nickaugust: You've used C++?
17:10 < nickaugust> Namegduf: no
17:10 < Namegduf> What languages have you used?
17:10 < Namegduf> If any?
17:10 < nickaugust> python, javascript more than anything...  learning some
erlang and haskell
17:10 < Namegduf> Hmm.
17:11 < nickaugust> a little Go :)
17:11 < jessta> nickaugust: imagine a function that takes a []int and
appends an int to it
17:12 < nickaugust> ok
17:12 -!- path[l] [~path@122.182.0.38] has quit [Quit: path[l]]
17:12 < jessta> that same code would also work just fine if you changed the
types to []float and have it append a float to it
17:13 -!- ckennelly [~ckennelly@beryllium.caltech.edu] has left #go-nuts []
17:13 < nickaugust> yes
17:13 < jessta> so it would be nice to have a 'generic' version of this
function that could take any slice and a value of the same type and append it
17:14 < nickaugust> int.append() float.append()?
17:14 < jessta> append([]int, int)
17:15 < nickaugust> yeah...  ok got it
17:15 < jessta> append([]mystruct, mystruct)
17:15 < nickaugust> so append() can take any reasonable data type
17:16 < nickaugust> sounds like a good idea so far...  :)
17:16 < jessta> it's a good idea, but it can get messy
17:17 < jessta> see: c++
17:17 -!- chickamade [~chickamad@115.74.102.172] has quit [Quit: Leaving]
17:19 < Namegduf> It's hard to design good syntax and implementation for.
17:19 < nickaugust> yeah i guess if you try to make the genaric applicable
to too many different data types its hard to make the syntax simple
17:19 < nsf> it's not about syntax imho
17:19 < nickaugust> but on the other had would you want append_string()
append_byte() ...
17:20 < nsf> more like that generics affect a lot code writing style
17:20 < nsf> I'm sure people will do metaprogramming with it if it would be
possible
17:20 < nsf> which is very bad for language community :)
17:22 -!- angasule [c80571ea@gateway/web/freenode/ip.200.5.113.234] has quit
[Quit: Page closed]
17:22 < nsf> my current abstract vision: we have generics as a separate
tool, not included in the language spec at all..  or..  we have very restricted
variant of generics (like only custom container specification is allowed)
17:23 < jessta> a separate tool that is used by lots of code becames part of
the language
17:24 < nsf> well it can become a part of the language dev pack, like gofmt
17:24 < nsf> but the thing is
17:24 < nsf> uglier it looks, less often it will be used
17:24 < jessta> you don't want to do generics by generating code
17:25 < nsf> jessta: that's what people want
17:25 < nsf> efficient generics implementation does that anyway
17:25 < nsf> it generates code :)
17:25 < jessta> then you end up with 50 functions that do the same thing
with different types
17:25 < nsf> maybe it's not a source code, but code
17:25 < nsf> jessta: that's good
17:26 < nsf> then I would actually know what costs me to use generics
17:26 < nsf> and I'll think twice
17:26 < exch> as long as it generates only those function copies that are
actually used, it should be no different than writing it yourself
17:26 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 240 seconds]
17:26 < Namegduf> For many functions
17:26 < jessta> exch: but if you're going to go to the effort of generics
you'd want them to be better than writing it yourself
17:26 < exch> the problem with that is distributing precompiled packages
17:27 < Namegduf> You could generate code for only those type sizes which
were used.
17:27 < Namegduf> Not essentially much better.
17:28 < exch> basing 'generics' on simply preprocessing is really nothing
more than saving you some typing.  Not sure that's worth it.  There's nothing
preventing you from writing your own preprocessor for it though
17:28 < nsf> exch: don't know about others, but I won't use precompiled
packages
17:28 < nsf> with or without generics :)
17:28 < araujo> string[4:7] = "new substr"
17:28 -!- zozoR [~zozoR@x1-6-00-0e-2e-a3-e0-23.k377.webspeed.dk] has joined
#go-nuts
17:28 < araujo> is there a recommended way to do that?
17:28 < exch> araujo: you can't do that :)
17:28 < exch> strings are immutable
17:28 < araujo> exch, yeah ^^
17:28 < araujo> well, was wondering if there exist something in the packages
to do it
17:28 < araujo> or a recommended way
17:29 < jessta> araujo: copy()
17:29 < araujo> I checked pkg/strings but couldn't find anything there
17:29 < araujo> jessta, copy?  ..  mm
17:29 < exch> Not sure about recommended way, but if you're going to do a
lot of string manipulation like that, you may want to consider byte buffers or
simply Split()/Join() byte slices
17:29 < jessta> araujo: http://golang.org/doc/go_spec.html#Copying_slices
17:31 < araujo> exch, byte slices are a much better way to go with this?
17:31 < araujo> jessta, thanks, i check
17:31 < nsf> exch: for me generics are a type-safe preprocessor and nothing
more
17:31 -!- willdye [~willdye@fern.dsndata.com] has joined #go-nuts
17:31 -!- derferman [~derferman@dsl092-048-218.sfo4.dsl.speakeasy.net] has joined
#go-nuts
17:32 < drhodes> building custom preprocessors implenting generics will lead
to partitioned noncompatible libraries
17:32 < nsf> probably
17:32 -!- angasule [c80571ea@gateway/web/freenode/ip.200.5.113.234] has joined
#go-nuts
17:33 < jessta> nsf: you really need to do the code generation at link time
for generics in precompiled packages
17:34 < nsf> yes, this is one of the problems
17:35 -!- path[l] [UPP@120.138.102.50] has joined #go-nuts
17:36 < nsf> it is hard..  truly
17:41 -!- path[l] [UPP@120.138.102.50] has quit [Read error: Connection reset by
peer]
17:42 -!- path[l] [UPP@120.138.102.50] has joined #go-nuts
17:45 -!- skelterjohn [~jasmuth@lawn-net168-in.rutgers.edu] has joined #go-nuts
17:45 -!- millertimek1a2m3 [~millertim@174.33.196.44] has joined #go-nuts
17:46 -!- millertimek1a2m3 [~millertim@174.33.196.44] has left #go-nuts []
17:46 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.2]
17:46 -!- millertimek1a2m3 [~millertim@174.33.196.44] has joined #go-nuts
17:47 < millertimek1a2m3> hey are you guys getting my messages?
17:47 < taruti> yes
17:47 < jA_cOp> no millertimek1a2m3, can you say that again, a bit louder?
:D
17:49 < skelterjohn> i'm not getting any messages at all
17:49 < millertimek1a2m3> haha :) thanks guys!
17:49 -!- millertimek1a2m3 [~millertim@174.33.196.44] has left #go-nuts []
17:50 -!- millertimek1a2m3 [~millertim@174.33.196.44] has joined #go-nuts
17:50 -!- millertimek1a2m3 [~millertim@174.33.196.44] has left #go-nuts []
17:50 -!- millertimek1a2m3 [~millertim@174.33.196.44] has joined #go-nuts
17:50 -!- millertimek1a2m3 [~millertim@174.33.196.44] has left #go-nuts []
17:50 -!- millertimek1a2m3 [~millertim@174.33.196.44] has joined #go-nuts
17:50 -!- millertimek1a2m3 [~millertim@174.33.196.44] has left #go-nuts []
17:51 < MaybeSo> millertimek1a2m3: freenode is a bit of a pain in that every
once in a while it forgets who is registered and you have to reauthenticate
yourself
17:51 < MaybeSo> I spent about 15 minutes saying stuff here this morning
before I understood why nobody was responding to comments I was making...  at
first thought maybe I just smelled bad.
17:52 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
17:52 < nickaugust> MaybeSo: doesnt your irc client give you 'cannot send to
channel' messages?
17:53 < MaybeSo> yes, but it's subtle about indicating that particular pane
has new data in it
17:53 < MaybeSo> so I'm not likely to notice unless I go looking
17:54 < nickaugust> ah, weechat puts them in the actual channel buffer.  i
get it somewhat regularly
18:00 -!- g0bl1n [~anonymous@a213-22-18-58.cpe.netcabo.pt] has joined #go-nuts
18:06 -!- crashR [~crasher@codextreme.pck.nerim.net] has quit [Quit: (◣_◢)
BigBrowser is watching ⓎⓄⓊ]
18:08 -!- rutkowski [~adrian@078088207115.walbrzych.vectranet.pl] has joined
#go-nuts
18:20 < nickaugust> io.ioutil.WriteFile() truncates the output file if it
exists is there function to append to a file?  cant seem to find it
18:23 < MaybeSo> well, if you go back to using os.Open() and os.Write()
functions, you can indicate on os.Open() that you want to O_APPEND
18:24 < nickaugust> ah ok i'll check that out.  thanks MaybeSo
18:25 < MaybeSo> On that note, I'm kind of curious: the Go io functions
mirror a lot of how POSIX works, do Windows APIs tend to follow the same
conventions or is Go i/o radically different for those used to windows apis?
18:25 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
18:26 < ghiu> hi, i have this error: "cannot use new(MemorySessionHandler)
(type *MemorySessionHandler) as type *sessionHandler in assignment" but, as
MemorySessionHandler is of type sessionHandler (that is an interface), does it
make sense?
18:26 < exch> Go was never intended for use on Windows.  I doubt conforming
to windows API standards was on their priority list :)
18:27 < MaybeSo> exch: fair enough
18:27 < skelterjohn> ghiu: *sessionHandler is a pointer to your interface
18:27 < skelterjohn> I'm assuming *MemorySessionHandler implements your
sessionHandler interface?  then you would need to assign it to something of type
sessionHandler rather than type *sessionHandler
18:27 -!- iant [~iant@81-233-149-58-no82.tbcn.telia.com] has joined #go-nuts
18:27 -!- mode/#go-nuts [+v iant] by ChanServ
18:29 -!- Altercation [~Altercati@pdpc/supporter/active/altercation] has quit
[Excess Flood]
18:29 < ghiu> skelterjohn: hmmm, fair enough, but how can i then make a
pointer to a structure that implements an interface?
18:29 -!- Altercation [~Altercati@pdpc/supporter/active/altercation] has joined
#go-nuts
18:30 < skelterjohn> well, be careful here.
18:30 < skelterjohn> is it the structure that implements the interface, or
teh pointer to that structure?
18:31 < skelterjohn> ie, do you have "func (m *MemorySessionHandler) Foo()"
or "func (m MemorySessionHandler) Foo()"?
18:32 < ghiu> the structure: type sessionHandler interface
{ParseSession(*Context) (os.Error) } || type MemorySessionHandler struct {
Sessions map[string]Session} ||func (s *MemorySessionHandler)
ParseSession(*Context) (os.Error) { return nil } || var SessionHandler
*sessionHandler || SessionHandler = new(MemorySessionHandler)
18:32 < skelterjohn> eek too much for an IRC message
18:32 < skelterjohn> if you want to paste anything non trivial please use
pastebin.com :)
18:33 < skelterjohn> but I see that ParseSession has *MemorySessionHandler
as its receiver type
18:33 < skelterjohn> which means it's not the structure, but a pointer to
the structure, that implements the interface
18:34 < ghiu> http://pastebin.com/wxaLzEEd
18:34 < skelterjohn> what exactly do you want to do?  i didn't really
understand your question before
18:34 < skelterjohn> in that paste, you have a pointer to an interface
18:35 < ghiu> yes
18:35 < skelterjohn> "var SessionHandler *sessionHandler"
18:35 < skelterjohn> you probably don't mean that - you probably just want
the interface
18:35 < skelterjohn> "var SessionHandler sessionHandler"
18:35 < skelterjohn> without the *
18:35 < skelterjohn> an interface only stores a pointer in the first place
18:35 < ghiu> this works
18:39 < ghiu> i'm not sure i get it fully
18:39 < ghiu> Session sessionHandler
18:39 < ghiu> is that a pointer?
18:40 < ghiu> cause sessionHandler itself is a pointer?
18:40 < nickaugust> how are optional function arguments denoted in the docs?
in particular im using func Open(name string, flag int, perm int) but it says in
the description flag if applicable.
18:40 < nickaugust> ghiu: * means pointer
18:40 < ghiu> yes
18:40 < skelterjohn> but type sessionHandler is an interface
18:41 < skelterjohn>
http://golang.org/doc/effective_go.html#interfaces_and_types
18:41 < ghiu> and is an interface a pointer?
18:41 < jA_cOp> an interface is a reference type
18:41 < skelterjohn> it's a super-pointer
18:41 < ghiu> i mean, if new return a pointer and i declare Session
sessionHandler and not Session *sessionHandler
18:42 < ghiu> that means that sessionHandler, being an interface
18:42 -!- ineol [~ineol@mar75-9-88-171-191-168.fbx.proxad.net] has joined #go-nuts
18:42 < ghiu> is a pointer itself
18:42 < ghiu> or it wouldnt work
18:42 < ghiu> right?
18:42 < skelterjohn> right - assigning something to an interface does not
make a copy
18:42 < skelterjohn> it makes a reference
18:42 < ghiu> ok then
18:42 < ghiu> thanks
18:43 < Namegduf> Interfaces are "pointers on steroids"
18:43 < Namegduf> Basically, a pointer to a vtable, and a pointer to the
type, unless the type is small enough to fit inside the interface.
18:43 -!- Project_2501 [~Marvin@82.84.72.65] has quit [Read error: Connection
reset by peer]
18:43 < ghiu> i see
18:44 < skelterjohn> i imagine it has a pointer to the type in any case.
18:44 < Namegduf> Yes, only the second clause was conditional on the third,
not both the first two.
18:46 -!- roop [~roop@122.172.184.195] has quit [Remote host closed the
connection]
18:49 -!- jA_cOp [~yakobu@unaffiliated/ja-cop/x-9478493] has quit [Quit: Leaving]
18:50 < ineol> hi, what does that mean if I get "v.String() used as value" ?
18:51 < cbeck> ineol paste the line of code where it appears?
18:51 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has joined #go-nuts
18:52 < ineol> str := v.String()
18:54 < cbeck> what is the type of v?
18:54 < nickaugust> you probably want String(v)
18:55 < cbeck> nickaugust: unless v is a []bytem that could do unpleasant
things
18:55 < cbeck> s/m//
18:56 < nickaugust> ineol: more info please
18:57 -!- Project_2501 [~Marvin@82.84.72.65] has joined #go-nuts
18:57 < skelterjohn> I think there is something I don't understand about how
interfaces work under the hood - I thought they were always a reference, but this
code prints "5" twice
18:57 < skelterjohn> http://pastebin.com/cpftQswf
18:58 < ineol> the code is here http://pastebin.com/ZPkvnurw
18:58 < skelterjohn> on line 25, i figured i was copying directly into s,
but the interface is looking at something else
18:59 < skelterjohn> and this (http://pastebin.com/WWeTCFYL) prints out
5,5,10
18:59 < skelterjohn> so there is something wrong with my understanding of
what interfaces do
19:00 < skelterjohn> it seems like the assignment to the interface copies
the entire S struct, rather than a reference to an existing one
19:00 -!- napsy [~luka@tm.213.143.73.175.lc.telemach.net] has joined #go-nuts
19:01 < nickaugust> ineol: hm idk.  whats k.(Expr)?
19:01 < cbeck> nickaugust: a type assertion
19:01 < skelterjohn> k.(Expr) is a type assertion - a runtime check that k
can be an Expr and a conversion to one
19:01 < nickaugust> ah cool
19:03 < nickaugust> so does that return a bool value or what?
19:03 < skelterjohn> it returned something of type Expr, and a bool that
tells you if the conversion was successful
19:03 < skelterjohn> you can either to e := k.(Expr) and a panic will happen
if it's not allowed
19:04 < skelterjohn> or e, ok := k.(Expr) and ok will be true if it's
allowed
19:04 < skelterjohn> and e will be zeroed
19:04 < skelterjohn> if it isn't
19:05 < nickaugust> ah gotcha.  thats cool i'll have to try that.
19:05 < skelterjohn> useful stuff, especially for working with generic
container classes
19:05 < skelterjohn> since they usually use type interface{}
19:05 < nickaugust> ineol: so whats the error message that the String(v)
throws?
19:06 < ineol> yes, "v.String() used as value"
19:06 < nickaugust> yeah i can see where it would be useful..  havent needed
it yet
19:06 < nickaugust> what about when you change it to String(v)?
19:07 < exch> Is there any reason why array sizes are limited to 1<<30
?
19:07 < exch> anything larger yields a compiler error about non-negative
array size
19:08 < cbeck> exch: Limitations of 32 bit hardware, methinks
19:08 < exch> i'm on 64 bit
19:08 < ineol> nickaugust: I get "undefined String"
19:09 -!- Eridius [~kevin@unaffiliated/eridius] has joined #go-nuts
19:09 < cbeck> ineol: String(v) is undefined, and string(v) should fail (I
think)
19:09 < cbeck> try v.(string)
19:09 < cbeck> durr
19:10 < cbeck> I mean..  I dunno
19:10 * cbeck finishes coffee and goes back to reddit
19:11 < ineol> I get "impossible type assertion: v (type Expr) cannot have
dynamic type string (missing String method)", and yet It has that method ...
19:12 < cbeck> Gahh, I see it
19:12 <+iant> ineol: you may have a value when you need a pointer
19:12 <+iant>
http://golang.org/doc/go_programming_faq.html#different_method_sets
19:12 < cbeck> In your interface def, your String() method doesn't return
anything
19:13 < ineol> yes, indeed.  Thanks
19:20 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has quit [Ping
timeout: 246 seconds]
19:21 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has quit [Ping
timeout: 246 seconds]
19:22 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has joined
#go-nuts
19:25 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has joined #go-nuts
19:27 -!- artefon [~thiago@dhcp44.usuarios.dcc.ufmg.br] has quit [Quit: bye]
19:29 < exch> iant: Perhaps you are aware of this; Why can the size of an
array not exceed 1<<30?
19:30 < Namegduf> Sizes are stored as int32s.
19:30 <+iant> Go limits the size of a single object to a size that can be
represented in the type int
19:30 < exch> hmm ok
19:31 < skelterjohn> related question - why are int and float not int64 and
float64 on 64 bit arch?
19:31 <+iant> I think it's just history, since that's what C does
19:31 <+iant> I don't think there is any special reason
19:32 < exch> It's a bit problematic when dealing with large chunks of byte
data from C. With byte data <= 1<<30, you can convert the C data directly
to a byte slice without copying.  'return
(*(*[1<<30]byte)(unsafe.Pointer(&this.data)))[0:size]' But this won't work
with anything larger than larger than that.  Which means you can only get it
through manual copying
19:32 <+iant> yes
19:32 < skelterjohn> am i correct in thinking that tossing around 64 bit
ints won't be any slower than 32 bit ints on 64-bit arch?
19:32 <+iant> in registers that is true, but in memory it isn't necessarily
19:32 <+iant> e.g., a slice is one pointer plus two ints
19:33 <+iant> on a 64-bit system the fact that int is 32-bits means that
that fits in two 64-bit works in memory
19:33 < skelterjohn> ah
19:33 < skelterjohn> good enough reason for me.
19:38 -!- gnuvince_ [~vince@64.235.202.218] has joined #go-nuts
19:42 < cbeck> Has anyone used the goirc package?  know of any alternatives?
19:42 -!- iant [~iant@81-233-149-58-no82.tbcn.telia.com] has quit [Quit: Leaving.]
19:44 -!- bmizerany [~bmizerany@dsl081-064-072.sfo1.dsl.speakeasy.net] has joined
#go-nuts
19:44 < exch> there's a bunch of irc libs available.  Not sure if they
really differ all that much in the places where it matters
19:44 < exch> I haven't seen goirc yet though
19:44 -!- iant [~iant@81-233-149-58-no82.tbcn.telia.com] has joined #go-nuts
19:44 -!- mode/#go-nuts [+v iant] by ChanServ
19:44 -!- g0bl1n [~anonymous@a213-22-18-58.cpe.netcabo.pt] has quit [Quit: g0bl1n]
19:45 -!- Xurix [~Luixsia@AToulouse-254-1-3-177.w83-203.abo.wanadoo.fr] has quit
[Quit: Leaving]
19:45 < cbeck> it's the only one I'm seeing in the external packages list,
but maybe I'm just not looking hard enough
19:46 -!- Altercation [~Altercati@pdpc/supporter/active/altercation] has quit
[Excess Flood]
19:46 -!- Altercation [~Altercati@pdpc/supporter/active/altercation] has joined
#go-nuts
19:46 < cbeck> derp, found em
19:46 < exch> http://go-lang.cat-v.org/pure-go-libs here's a few
19:48 -!- iant [~iant@81-233-149-58-no82.tbcn.telia.com] has quit [Ping timeout:
260 seconds]
19:50 -!- ronnyy [~quassel@p4FF1D66B.dip.t-dialin.net] has joined #go-nuts
19:51 -!- skelterjohn [~jasmuth@lawn-net168-in.rutgers.edu] has quit [Quit:
skelterjohn]
19:52 -!- zozoR [~zozoR@x1-6-00-0e-2e-a3-e0-23.k377.webspeed.dk] has quit [Quit:
Morten.  Desu~]
20:01 < cbeck> Now if only any of them would compile...
20:01 -!- bmizerany [~bmizerany@dsl081-064-072.sfo1.dsl.speakeasy.net] has quit
[Read error: Connection reset by peer]
20:02 < exch> :P that's the price we pay for fast development pace of Go
20:03 < exch> i've updated calculon relatively recently.  it should build
20:03 < exch> It does here anyways
20:04 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has quit [Ping timeout:
615 seconds]
20:05 -!- willdye [~willdye@fern.dsndata.com] has quit [Ping timeout: 258 seconds]
20:05 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has joined #go-nuts
20:06 -!- saschpe [~saschpe@mgdb-4d0cfab9.pool.mediaWays.net] has joined #go-nuts
20:06 -!- bmizeran_ [~bmizerany@208.66.27.62] has joined #go-nuts
20:08 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.2]
20:11 -!- mahemoff [~mahemoff@74.125.57.52] has joined #go-nuts
20:12 < nickaugust> Hmm im getting bad file descriptor error here: if
length, err := out_file.Write(record_data); err != nil { where i setup out_file
like this: out_file, err_out_file := os.Open("index/locations", os.O_APPEND, 0666)
20:12 < nickaugust> anything look obviously wrong with that?
20:12 -!- mahemoff [~mahemoff@74.125.57.52] has quit [Client Quit]
20:13 < nickaugust> "write index/locations: bad file descriptor"
20:13 < vrtical> presumably you checked err_out_file
20:14 -!- gnuvince [~vince@64.235.202.218] has quit [Ping timeout: 264 seconds]
20:14 -!- gnuvince_ [~vince@64.235.202.218] has quit [Ping timeout: 276 seconds]
20:14 < nickaugust> well if it wasnt nil it would exit there
20:16 -!- willdye [~willdye@fern.dsndata.com] has joined #go-nuts
20:17 < nickaugust> oh wait whats the permission 0666...  thats not right is
it
20:18 < vrtical> rw-rw-rw-
20:18 < nickaugust> hm
20:19 < nickaugust> i get the three sixes what the first 0 mean?
20:19 < vrtical> still, just looking at what you posted here, have you
checked err_out_file?  Not err, checked that the file opened ok in the first
place?
20:20 < vrtical> (0 for 0ctal btw)
20:20 < nickaugust> well right after I open the file I say if err_out_file
!= nil{ print the error and os.Exit }
20:22 < nickaugust> heres the code if you want to look at it its only like
50 lines curl http://sprunge.us/VdJN
20:22 < nickaugust> feel free to point out anything else dumb and/or ugly
that im doing there
20:24 * willdye has long included "prevent the 'leading zero means octal'
convention" on his list of things to do if he ever gets a time travel machine
20:26 < cbeck> exch: Can I steal your calculon config.js for an example?
20:26 < exch> sure
20:29 < vrtical> I do wonder why leading 0 is kept.  Why not go for 0c in
analogy with 0x?  (or 0t if you want something that can't be a typo of a hex
number)
20:29 < exch> nickaugust: does the index_locations file exist?  I' not sure
if it's absebce will yield an error.  Try it with o_APPEND|o_CREATE
20:30 < exch> *without all the typo's
20:30 < nickaugust> yeah it exists but im using O_APPEND does it need to be
lowercase?
20:30 < nickaugust> ah
20:30 < nickaugust> and its os.O_APPEND right...  gets the const from the
package
20:30 < exch> yea it is
20:30 < exch> hmm.  the code looks ok as far as I can see.  Not sure why it
wouldn't work
20:31 < nickaugust> ok cool thanks
20:32 < nickaugust> thanks for the append|create tip thats probably a best
practice
20:32 < nickaugust> but still: write index_locations: bad file descriptor
20:34 -!- mahemoff [~mahemoff@74.125.57.60] has joined #go-nuts
20:40 -!- sacho [~sacho@95-42-108-60.btc-net.bg] has joined #go-nuts
20:44 -!- alehorst [~alehorst@189.114.190.21] has quit [Ping timeout: 248 seconds]
20:46 < willdye> vrtical: if it isn't too late, i'd strongly lobby for go to
remove the leading-0-octal convention.  my argument is that the convention
produces almost no benefit (saves a keystroke?  looks familiar?), but hard
experience tell us that numerous bugs will be introduced -- many of them very
expensive to find.
20:46 < willdye> i'm guessing that far more keystrokes will be needed to
avoid octal bugs than will be saved by the convention.
20:47 < hokapoka> When you have 2 return values, say *Foo & os.Error, I want
to assign *Foo to a var that's already declared.  Is my only option if I want to
test os.Error to declare it too?  as I can't use :=
20:47 < willdye> (remove it from 'go', I mean.  it's too late for C)
20:50 < nickaugust> hokapoka: ive wondered about that as well...  as far as
I can tell you have to define both of them prior to the call or neither..  not
sure though
20:52 < hokapoka> Yeah, no biggy, just kinda wondering what the standard
concensus is atm.
20:53 -!- rutkowski [~adrian@078088207115.walbrzych.vectranet.pl] has quit [Quit:
WeeChat 0.3.3-dev]
20:53 < hokapoka> With my example os.Error as the return value you have to
import "os" so you can declare an instance to be assigned.
20:53 < vrtical> willdye: I'll sign your petition if you like :-)
20:54 < willdye> vrtical: i looked it up, and the go team has decided to
stick with the old convention.  i strongly disagree, but here's their reasoning
(see the post near the end by r@golang) :
http://code.google.com/p/go/issues/detail?id=151
20:54 < vrtical> nickaugust: man 2 open says open *must* include O_RDONLY,
O_WRONLY or O_RDWR.  When I add |os.O_WRONLY to your code, it works.
20:55 < nickaugust> vrtical: you bloody genious :)
20:55 < nickaugust> let me try that
20:55 < vrtical> out_file, err_out_file := os.Open("index_locations",
os.O_APPEND|os.O_WRONLY, 0666)
20:56 < vrtical> :-) hope it works, happy to be of some use.
20:57 -!- mahemoff [~mahemoff@74.125.57.60] has quit [Quit: mahemoff]
20:59 -!- carllerche [~carllerch@enginey-9.border1.sfo002.pnap.net] has joined
#go-nuts
20:59 -!- saschpe [~saschpe@mgdb-4d0cfab9.pool.mediaWays.net] has quit [Remote
host closed the connection]
21:00 -!- alehorst [~alehorst@189.58.5.140.dynamic.adsl.gvt.net.br] has joined
#go-nuts
21:02 < nickaugust> hey its working :) that makes me happy.
21:02 < nickaugust> thanks vrtical !!!
21:04 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Remote
host closed the connection]
21:14 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts
21:16 -!- Adys [~Adys@unaffiliated/adys] has left #go-nuts []
21:17 -!- bytbox [~scott@static-173-210-76-195.ngn.onecommunications.net] has
joined #go-nuts
21:20 < bytbox> I remember seeing this somewhere, can't find it - what
function can I use to find an executable of a certain name in the path?
21:22 * Project_2501 squitta!  o.o
21:23 -!- Project_2501 [~Marvin@82.84.72.65] has quit [Quit: E se abbasso questa
leva che succ...]
21:25 -!- aho [~nya@fuld-4d00d1d7.pool.mediaWays.net] has joined #go-nuts
21:26 -!- franksalim [~frank@adsl-76-221-200-239.dsl.pltn13.sbcglobal.net] has
quit [Quit: Ex-Chat]
21:26 -!- crashR [~crasher@LPuteaux-156-16-8-184.w80-14.abo.wanadoo.fr] has joined
#go-nuts
21:26 -!- bytbox [~scott@static-173-210-76-195.ngn.onecommunications.net] has quit
[Quit: Lost terminal]
21:28 -!- ronnyy [~quassel@p4FF1D66B.dip.t-dialin.net] has quit [Remote host
closed the connection]
21:28 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has quit [Ping timeout:
619 seconds]
21:36 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has joined #go-nuts
21:37 -!- crashR [~crasher@LPuteaux-156-16-8-184.w80-14.abo.wanadoo.fr] has quit
[Quit: (◣_◢) BigBrowser is watching ⓎⓄⓊ]
21:38 -!- napsy [~luka@tm.213.143.73.175.lc.telemach.net] has quit [Read error:
Operation timed out]
21:45 -!- Fish [~Fish@9fans.fr] has quit [Remote host closed the connection]
21:46 -!- napsy [~luka@tm.213.143.73.175.lc.telemach.net] has joined #go-nuts
21:49 -!- jstorimer [~jesse@66-78-108-133.access.ripnet.com] has quit [Quit:
jstorimer]
21:49 -!- mahemoff [~mahemoff@87-194-3-205.bethere.co.uk] has joined #go-nuts
21:51 -!- AshishG [13lackhat@117.254.25.69] has joined #go-nuts
21:52 -!- AshishG [13lackhat@117.254.25.69] has quit [Client Quit]
22:05 < angasule> what's the largest go program (as in single binary) these
days?  I'm wondering about compilation + linking speed
22:05 < angasule> I *hate* these builds I'm doing, 15 even though it's
distributed (or it'd be like 40 or so minutes)
22:12 < exch> angasule: not sure what the largest app is, but to achieve 40
minute build times with go, you would probably be compiling a billion lines of
code :p
22:12 < exch> the math package in the go repo seems relatively sizable,
compared to the rest.  It builds in 0.625 seconds
22:12 -!- rlab [~Miranda@91.200.158.34] has quit [Quit: Miranda IM! Smaller,
Faster, Easier.  http://miranda-im.org]
22:17 -!- napsy [~luka@tm.213.143.73.175.lc.telemach.net] has quit [Ping timeout:
264 seconds]
22:17 -!- nickaugust [~nick@rrcs-97-79-25-103.se.biz.rr.com] has quit [Quit:
WeeChat 0.3.2]
22:20 < angasule> the linking takes ~7 minutes
22:21 -!- awidegreen [~quassel@62.176.237.78] has quit [Remote host closed the
connection]
22:25 -!- mattikus [~mattikus@ip24-250-73-154.br.br.cox.net] has joined #go-nuts
22:28 -!- ikaros [~ikaros@dslb-188-097-070-234.pools.arcor-ip.net] has quit [Quit:
Leave the magic to Houdini]
22:33 -!- mahemoff [~mahemoff@87-194-3-205.bethere.co.uk] has quit [Quit:
mahemoff]
22:35 -!- sioraiocht [~tomh@unaffiliated/sioraiocht] has joined #go-nuts
22:37 -!- gnuvince [~vince@70.35.170.41] has joined #go-nuts
22:43 -!- kanru [~kanru@118-168-239-91.dynamic.hinet.net] has joined #go-nuts
22:52 -!- Ginto8 [~joe@pool-173-61-45-40.cmdnnj.fios.verizon.net] has joined
#go-nuts
22:59 -!- ghiu [~gu@93-32-145-212.ip33.fastwebnet.it] has quit [Quit: ghiu]
23:01 -!- MariusKarthaus [~quassel@s5593c029.adsl.wanadoo.nl] has joined #go-nuts
23:10 -!- bmizeran_ [~bmizerany@208.66.27.62] has quit [Remote host closed the
connection]
23:13 -!- ExtraSpice [~XtraSpice@88.118.32.225] has quit [Quit: Leaving]
23:14 -!- sioraiocht [~tomh@unaffiliated/sioraiocht] has quit [Remote host closed
the connection]
23:14 -!- bmizerany [~bmizerany@dsl081-064-072.sfo1.dsl.speakeasy.net] has joined
#go-nuts
23:17 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined
#go-nuts
23:19 < MaybeSo> that shut everyone up
23:20 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has quit [Quit:
slashus2]
23:25 -!- MariusKarthaus [~quassel@s5593c029.adsl.wanadoo.nl] has quit [Remote
host closed the connection]
23:27 -!- fission6 [~silverman@65-86-91-130.client.dsl.net] has quit [Ping
timeout: 276 seconds]
23:29 < Ginto8> MaybeSo: what?
23:31 < MaybeSo> after "the linking takes ~7 minutes" the channel went dead.
23:31 -!- fission6 [~silverman@rrcs-69-193-216-26.nyc.biz.rr.com] has joined
#go-nuts
23:32 < Ginto8> well I came in after that =/
23:32 < Ginto8> is that a cgo issue?
23:32 < MaybeSo> I was guessing angasule was talking about some horrid C++
project
23:32 < MaybeSo> not sure
23:32 -!- sioraiocht [~tomh@unaffiliated/sioraiocht] has joined #go-nuts
23:33 < MaybeSo> (vs.  what might be possible using Go)
23:34 -!- Nexoro [~nexo@c-71-192-75-183.hsd1.ma.comcast.net] has quit [Quit:
Leaving.]
23:35 < Ginto8> oic
23:38 < angasule> I doubt it :P
23:38 < Ginto8> yeah
23:38 < angasule> C++ project, very very large one
23:38 -!- mattikus [~mattikus@ip24-250-73-154.br.br.cox.net] has quit [Remote host
closed the connection]
23:38 < Ginto8> ok\
23:38 < MaybeSo> I supposed "horrid" was redundant
23:39 < MaybeSo> s/ed/d/
23:39 < MaybeSo> gah
23:39 * MaybeSo go gets some coffee
23:39 < angasule> MaybeSo: FIFA 11, large and old C++ code :-)
23:40 < MaybeSo> the developers in my dept were so very pleased to move from
C++ to Java way back when, they despised debugging nasty linking problems which
kept cropping up w/re to the STL and RDBMS libraries
23:40 < MaybeSo> It'd be kind of cool to get people here interested in Go
23:41 < angasule> MaybeSo: without shared linking, even I won't recommed it
much, linux has package managers, so...
23:47 < saracen> angasule: You're compiling FIFA 11?
23:47 -!- sioraiocht [~tomh@unaffiliated/sioraiocht] has quit [Read error:
Connection reset by peer]
23:48 -!- sioraioc_ [~tomh@85-220-92-205.dsl.dynamic.simnet.is] has joined
#go-nuts
23:48 < angasule> saracen: yeap
23:48 < saracen> Who is it you work for?  :)
23:48 < angasule> saracen: well, a good chunk of it
23:49 < angasule> saracen: heh I work for a consulting company hired by EA
:-)
23:49 < angasule> sorry, not sure if consulting is the right word, I'm
sleepy!
23:49 -!- sioraioc_ [~tomh@85-220-92-205.dsl.dynamic.simnet.is] has left #go-nuts
[]
23:51 < saracen> I see:)
23:51 -!- falconindy [~noclaf@unaffiliated/falconindy] has quit [Quit: Lost
terminal]
--- Log closed Thu Aug 05 00:00:05 2010