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

--- Log opened Wed May 25 00:00:51 2011
00:01 -!- dfc [~dfc@eth59-167-133-99.static.internode.on.net] has joined #go-nuts
00:06 -!- wallerdev [~wallerdev@c-68-60-43-43.hsd1.mi.comcast.net] has joined
#go-nuts
00:08 -!- hargettp [~hargettp@pool-71-184-185-93.bstnma.east.verizon.net] has
joined #go-nuts
00:09 -!- binarypie [~binarypie@adsl-76-254-24-124.dsl.pltn13.sbcglobal.net] has
quit [Remote host closed the connection]
00:18 -!- serverhorror_ [~martin@krlh-4d021284.pool.mediaWays.net] has quit [Quit:
This computer has gone to sleep]
00:21 -!- chomp_ [~chomp@c-67-186-35-69.hsd1.pa.comcast.net] has quit [Quit:
Leaving]
00:22 -!- gtaylor [~gtaylor@99-126-136-139.lightspeed.gnvlsc.sbcglobal.net] has
quit [Quit: gtaylor]
00:35 -!- jarsen [~jarsen@76.8.206.34] has joined #go-nuts
00:48 -!- iant [~iant@66.109.103.84] has quit [Ping timeout: 252 seconds]
00:49 -!- iant [~iant@216.239.45.130] has joined #go-nuts
00:49 -!- mode/#go-nuts [+v iant] by ChanServ
00:50 -!- jarsen [~jarsen@76.8.206.34] has quit [Remote host closed the
connection]
00:51 -!- wallerdev [~wallerdev@c-68-60-43-43.hsd1.mi.comcast.net] has quit [Quit:
wallerdev]
00:52 -!- wallerdev [~wallerdev@c-68-60-43-43.hsd1.mi.comcast.net] has joined
#go-nuts
00:55 -!- iant [~iant@216.239.45.130] has quit [Ping timeout: 252 seconds]
00:56 -!- wallerdev [~wallerdev@c-68-60-43-43.hsd1.mi.comcast.net] has quit [Ping
timeout: 246 seconds]
00:58 -!- jarsen [~jarsen@76.8.206.34] has joined #go-nuts
01:01 -!- jarsen [~jarsen@76.8.206.34] has quit [Remote host closed the
connection]
01:04 -!- jarsen [~jarsen@76.8.206.34] has joined #go-nuts
01:05 -!- tncardoso [~thiago@189.59.202.188] has quit [Read error: Connection
reset by peer]
01:06 -!- freetz [~fritz@bc-proxy-2.sandia.gov] has quit [Remote host closed the
connection]
01:06 -!- freetz [~fritz@bc-proxy-2.sandia.gov] has joined #go-nuts
01:14 -!- jarsen [~jarsen@76.8.206.34] has quit [Remote host closed the
connection]
01:17 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has quit
[Ping timeout: 276 seconds]
01:23 -!- gtaylor [~gtaylor@99-5-124-9.lightspeed.gnvlsc.sbcglobal.net] has joined
#go-nuts
01:23 < manveru> damn, i'm leaking goroutines
01:28 -!- Kissaki [~Kissaki@tango076.server4you.de] has quit [Ping timeout: 276
seconds]
01:30 -!- Kissaki [~Kissaki@tango076.server4you.de] has joined #go-nuts
01:45 -!- bugQ [~bug@c-67-186-255-54.hsd1.ut.comcast.net] has quit [Read error:
Operation timed out]
01:55 -!- hargettp [~hargettp@pool-71-184-185-93.bstnma.east.verizon.net] has quit
[Quit: Leaving...]
02:07 -!- jarsen [~jarsen@76.8.206.34] has joined #go-nuts
02:10 -!- alexMocanu [~alexandru@customers.elgar.uob.ask4.co.uk] has joined
#go-nuts
02:10 -!- vpit3833 [~user@203.111.33.203] has quit [Ping timeout: 248 seconds]
02:12 -!- addos [621a7075@gateway/web/freenode/ip.98.26.112.117] has joined
#go-nuts
02:13 < addos> is golang.org running a modified version of godoc?  Or what
exactly is serving it?  With playground and search?
02:14 -!- hpvincent [~zig@nap13-11-83-156-121-34.fbx.proxad.net] has quit [Ping
timeout: 276 seconds]
02:16 -!- jarsen [~jarsen@76.8.206.34] has quit [Remote host closed the
connection]
02:18 < exch> I believe it's just godoc
02:22 -!- hpvincent [~zig@nap13-11-83-156-121-34.fbx.proxad.net] has joined
#go-nuts
02:22 < addos> ahh, I do see code for search in godoc.go
02:23 < addos> I guess maybe I am just not enabling it or something
02:23 -!- vpit3833 [~user@203.111.33.203] has joined #go-nuts
02:24 < fzzbt> can go programs leak memory
02:25 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
02:25 -!- Transformer [~Transform@ool-4a59e397.dyn.optonline.net] has joined
#go-nuts
02:26 < exch> If you just keep accumulating stuff without allowing it to be
GC'd, then yes
02:27 < exch> Not sure if that qualifies as a leak though
02:29 -!- Transformer [~Transform@ool-4a59e397.dyn.optonline.net] has quit [Excess
Flood]
02:30 -!- Nitro [~Nitro@unaffiliated/nitro] has quit [Quit: This computer has gone
to sleep]
02:32 < addos> ahh, I needed -index=true
02:33 < str1ngs> addos: I just use # godoc os File
02:33 < str1ngs> or godoc os
02:34 < addos> that is pretty cool too
02:34 < str1ngs> or godoc os | grep func
02:38 -!- [dmp] [~dennis@unaffiliated/dmp/x-546784] has quit [Remote host closed
the connection]
02:38 -!- hallas [~hallas@x1-6-30-46-9a-b2-c5-1f.k891.webspeed.dk] has quit [Ping
timeout: 240 seconds]
02:39 -!- niemeyer [~niemeyer@200-102-196-125.pltce701.dsl.brasiltelecom.net.br]
has quit [Ping timeout: 240 seconds]
02:44 -!- niemeyer [~niemeyer@200-102-196-125.pltce701.dsl.brasiltelecom.net.br]
has joined #go-nuts
02:45 -!- keithcascio [~keithcasc@nat/google/x-lajwnvthiksggjna] has quit [Quit:
Leaving]
02:47 -!- alexMocanu [~alexandru@customers.elgar.uob.ask4.co.uk] has quit [Quit:
Leaving]
03:00 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has quit [Remote
host closed the connection]
03:05 -!- fvbommel [~fvbommel_@86.86.15.250] has quit [Ping timeout: 276 seconds]
03:13 < uriel> addos: I godoc doesn't enable search by default now, most
people don't need and that way it doesn't have to build an index
03:15 -!- mbohun [~mbohun@ppp115-156.static.internode.on.net] has joined #go-nuts
03:22 -!- mbohun [~mbohun@ppp115-156.static.internode.on.net] has quit [Quit:
Leaving]
03:22 -!- pphalen [~pphalen@66.92.11.149] has left #go-nuts []
03:27 -!- wallerdev [~wallerdev@c-68-60-43-43.hsd1.mi.comcast.net] has joined
#go-nuts
03:29 -!- niemeyer [~niemeyer@200-102-196-125.pltce701.dsl.brasiltelecom.net.br]
has quit [Ping timeout: 263 seconds]
03:40 -!- bthomson [~bthomson@c-68-33-5-232.hsd1.va.comcast.net] has quit [Read
error: Operation timed out]
03:41 -!- bthomson [~bthomson@c-68-33-5-232.hsd1.va.comcast.net] has joined
#go-nuts
03:43 -!- fvbommel [~fvbommel_@86.86.15.250] has joined #go-nuts
04:01 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has joined #go-nuts
04:01 -!- mode/#go-nuts [+v iant] by ChanServ
04:02 -!- mikespook [~mikespook@183.47.225.210] has joined #go-nuts
04:09 -!- ctimmerm [~ctimmerm@cs181050011.pp.htv.fi] has joined #go-nuts
04:13 -!- rejb [~rejb@unaffiliated/rejb] has quit [Disconnected by services]
04:13 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
04:16 -!- wallerdev [~wallerdev@c-68-60-43-43.hsd1.mi.comcast.net] has quit [Quit:
wallerdev]
04:19 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
04:24 -!- dooder [~nate@c-24-21-241-81.hsd1.or.comcast.net] has quit [Remote host
closed the connection]
04:27 -!- [muttox] [~dheppell@93.135.70.115.static.exetel.com.au] has joined
#go-nuts
04:27 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
04:28 -!- aho [~nya@fuld-590c6783.pool.mediaWays.net] has quit [Quit:
EXEC_over.METHOD_SUBLIMATION]
04:32 < [muttox]> what would be the easiest way to capture the output of a
template in a var instead of dumping it straight into an io.Writer?
04:35 -!- ExtraSpice [XtraSpice@78-57-204-104.static.zebra.lt] has joined #go-nuts
04:39 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has quit [Ping
timeout: 246 seconds]
04:40 -!- iant [~iant@216.239.45.130] has joined #go-nuts
04:40 -!- mode/#go-nuts [+v iant] by ChanServ
04:40 -!- kaichenxyz [~kaichenxy@li261-87.members.linode.com] has joined #go-nuts
04:47 < skelterjohn> [muttox]: templates write to Writers
04:47 < skelterjohn> you can make a writer that will just store it in a
[]byte
04:48 < skelterjohn> using byes.Buffer
04:49 -!- wallerdev [~wallerdev@c-68-60-43-43.hsd1.mi.comcast.net] has joined
#go-nuts
04:49 < [muttox]> skelterjohn: yeah i was hoping i wouldn't have to throw
together another writer just to catch and convert it, guess thats going to be the
only way, thanks thoug
04:49 < [muttox]> *though
04:50 < skelterjohn> what kind of thing were you hoping for?
04:50 < skelterjohn> you could easily extend it to return a []byte or a
strin
04:50 < skelterjohn> g
04:51 < [muttox]> an existing writer i could just pull the []byte out of to
a local var, but nothing seems to match that
04:51 < [muttox]> yeah i might just do that
04:51 -!- jarsen [~jarsen@76.8.206.34] has joined #go-nuts
04:52 < skelterjohn> a bytes.Buffer is just such a writer
04:55 < [muttox]> actually yes it is, not that straightforward to track down
what supports an interface in the package documentation i guess
04:55 -!- s0900453 [576c168c@gateway/web/freenode/ip.87.108.22.140] has joined
#go-nuts
04:56 < skelterjohn> that is true.
04:57 < [muttox]> well thanks for the help, much appreciated :)
04:58 -!- edsrzf [~edsrzf@122-61-221-144.jetstream.xtra.co.nz] has joined #go-nuts
04:59 < skelterjohn> my pleasure
05:14 -!- allengeorge_ [~allengeor@c-24-7-17-50.hsd1.ca.comcast.net] has joined
#go-nuts
05:16 -!- allengeorge [~allengeor@c-24-7-17-50.hsd1.ca.comcast.net] has quit [Ping
timeout: 248 seconds]
05:21 -!- photron [~photron@port-92-201-145-93.dynamic.qsc.de] has joined #go-nuts
05:27 -!- ctimmerm [~ctimmerm@cs181050011.pp.htv.fi] has quit [Ping timeout: 255
seconds]
05:37 -!- jarsen [~jarsen@76.8.206.34] has quit [Remote host closed the
connection]
05:43 -!- mikespook [~mikespook@183.47.225.210] has quit [Read error: Connection
reset by peer]
05:43 -!- Fish [~Fish@9fans.fr] has joined #go-nuts
05:43 -!- mikespook [~mikespook@183.47.225.210] has joined #go-nuts
05:43 -!- abra [~abra@178.47.225.120] has quit [Read error: Operation timed out]
05:43 -!- mikespook [~mikespook@183.47.225.210] has quit [Client Quit]
05:47 -!- Fish [~Fish@9fans.fr] has quit [Client Quit]
05:47 -!- gtaylor [~gtaylor@99-5-124-9.lightspeed.gnvlsc.sbcglobal.net] has quit
[Quit: gtaylor]
05:47 -!- Fish [~Fish@9fans.fr] has joined #go-nuts
05:50 -!- freetz [~fritz@bc-proxy-2.sandia.gov] has quit [Remote host closed the
connection]
05:50 -!- freetz [~fritz@bc-proxy-2.sandia.gov] has joined #go-nuts
05:55 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Ping timeout: 246
seconds]
05:56 -!- abra [~abra@178.47.229.218] has joined #go-nuts
06:08 -!- krutcha [~krutcha@S010600045a27676a.vs.shawcable.net] has joined
#go-nuts
06:09 -!- a2800276 [~a2800276@xdsl-87-78-49-151.netcologne.de] has joined #go-nuts
06:12 < exch> Anyone know what this is about?
http://pastie.org/private/zuaghnluqs8cpuodyunwsg
06:12 < exch> "go-mtp.Test: nesting too deep"
06:12 < exch> the package ran fine in the tests until I added a println()
statement to one of the test cases.  and this appeared.  Now I can't get rid of it
06:13 < exch> the error that is.  even with the same code as before
06:17 < exch> the error goes away if I exclude one of the files from the
build.  doesn't matter which file O_o
06:22 < exch> http://pastie.org/private/la9yd7gnr7ifnd4hiul0hq
06:22 < exch> it really seems to be about the number of source files I
specify for CGOFILES
06:24 -!- ctimmerm [~ctimmerm@83.150.80.193] has joined #go-nuts
06:25 -!- noodles775 [~michael@f053075145.adsl.alicedsl.de] has joined #go-nuts
06:25 -!- noodles775 [~michael@f053075145.adsl.alicedsl.de] has quit [Changing
host]
06:25 -!- noodles775 [~michael@canonical/launchpad/noodles775] has joined #go-nuts
06:35 < krutcha> mm did package binary undergo an overhaul?
06:35 < krutcha> er encoding/binary?
06:35 < dfc> krutcha: what is the issue you are having ?
06:36 < krutcha> just looking at the online docs I don't see the endian
conversions I used in my app
06:36 < dfc> krutcha: i think it is ther
06:36 < dfc> LittleEndian and BigEndian
06:36 < dfc> but the godoc for it is a little obtuse because of the way it's
done
06:36 < krutcha> ahhhh, yeah I see them now they're vars not functions
06:37 < dfc> http://golang.org/src/pkg/encoding/binary/binary.go
06:37 < dfc> i had that wtf a while ago
06:37 < dfc> the godoc looks like there are no functinos
06:37 < krutcha> I think I had the same wtf a while ago also
06:37 < dfc> but its because Little and Big are instances of a ByteOrder
interface
06:38 < dfc> which is implemented by a non exported type
06:38 < dfc> there are a few nice tricks in that pkg
06:38 < krutcha> I think for a standard package that stuff has to be exposed
a bit better by the godoc
06:38 < dfc> 29 // This is byte instead of struct{} so that it can be
compared,
06:38 < dfc> 30 // allowing, e.g., order == binary.LittleEndian.
06:38 < dfc> 31 type unused byte
06:38 -!- fvbommel [~fvbommel_@86.86.15.250] has quit [Ping timeout: 240 seconds]
06:39 -!- foocraft [~ewanas@78.101.90.123] has quit [Ping timeout: 250 seconds]
06:41 -!- foocraft [~ewanas@78.101.171.51] has joined #go-nuts
06:44 -!- photron [~photron@port-92-201-145-93.dynamic.qsc.de] has quit [Read
error: Operation timed out]
06:45 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has joined #go-nuts
06:49 < addos> Does anyone know more about thread.c and when this condition
in the code ever gets hit?
06:49 < addos> if((ret = runtime·clone(flags, stk, m, g, fn)) < 0) {
runtime·printf("runtime: failed to create new OS thread (have %d already;
errno=%d)\n", runtime·mcount(), -ret); runtime·throw("runtime.newosproc"); }
06:54 -!- photron [~photron@port-92-201-118-189.dynamic.qsc.de] has joined
#go-nuts
06:59 -!- ExsysHost [~ExsysTech@50-46-213-60.evrt.wa.frontiernet.net] has quit
[Read error: Connection reset by peer]
07:01 -!- ExsysTech [~ExsysTech@50-46-213-60.evrt.wa.frontiernet.net] has joined
#go-nuts
07:01 -!- gedevan [~gedevan@83.167.106.253] has quit [Ping timeout: 246 seconds]
07:05 -!- piranha [~piranha@D57D1AB3.static.ziggozakelijk.nl] has joined #go-nuts
07:05 -!- piranha [~piranha@D57D1AB3.static.ziggozakelijk.nl] has quit [Remote
host closed the connection]
07:06 -!- gregschlom [~quassel@187.118.210.62.te-dns.org] has joined #go-nuts
07:06 -!- a2800276 [~a2800276@xdsl-87-78-49-151.netcologne.de] has quit [Ping
timeout: 250 seconds]
07:06 -!- piranha [~piranha@D57D1AB3.static.ziggozakelijk.nl] has joined #go-nuts
07:08 -!- gedevan [~gedevan@83.167.106.253] has joined #go-nuts
07:14 < s0900453> Is there much difference in using binary.Read() to read
from net.Conn instead of reading the data in bigger chunks?
07:15 -!- GeertJohan [~geertjoha@s51478c91.adsl.wanadoo.nl] has joined #go-nuts
07:16 -!- Project_2501 [~Marvin@82.84.83.42] has joined #go-nuts
07:18 -!- dfc [~dfc@eth59-167-133-99.static.internode.on.net] has quit [Ping
timeout: 252 seconds]
07:20 < KBme> seems binary.Read does some conversion
07:24 -!- Belg [~kim@2a01:2b0:301d:100:e2cb:4eff:fecd:72d2] has quit [Ping
timeout: 248 seconds]
07:38 -!- fvbommel [~fvbommel_@dyn068072.nbw.tue.nl] has joined #go-nuts
07:47 -!- alanliang [~yogafire@c-71-204-189-190.hsd1.ca.comcast.net] has quit
[Ping timeout: 244 seconds]
07:48 -!- alanliang [~yogafire@c-71-204-189-190.hsd1.ca.comcast.net] has joined
#go-nuts
08:02 < krutcha> / Ceil returns the least integer value greater than or
equal to x.
08:02 < krutcha> func Ceil(x float64) float64
08:03 < krutcha> isn't a float64 by definition not an integer value?
08:09 < |Craig|> you can put integers in floats
08:10 < krutcha> but you can't compare the two :(..  and what happens to
your int precision?
08:10 < |Craig|> krutcha: suppose your int is larger than an int64 holds?
08:10 < krutcha> if I int(float(uint8)) do I get a uint8?
08:10 < |Craig|> and a float 64 has 52 bit precision, so if your int is
smaller than 2^52, its exact (I think)
08:11 < |Craig|> no you get an int
08:14 -!- ExsysTech [~ExsysTech@50-46-213-60.evrt.wa.frontiernet.net] has quit
[Read error: Connection reset by peer]
08:15 -!- ExsysTech [~ExsysTech@50-46-213-60.evrt.wa.frontiernet.net] has joined
#go-nuts
08:16 -!- ctimmerm [~ctimmerm@83.150.80.193] has quit [Quit: Lost terminal]
08:18 -!- alanliang [~yogafire@c-71-204-189-190.hsd1.ca.comcast.net] has quit
[Read error: Operation timed out]
08:18 -!- alanlian1 [~yogafire@c-71-204-189-190.hsd1.ca.comcast.net] has joined
#go-nuts
08:19 -!- virtualsue [~chatzilla@nat/cisco/x-yxuljxazrenytbze] has joined #go-nuts
08:22 -!- a2800276 [~a2800276@80.187.146.56] has joined #go-nuts
08:24 -!- wallerdev [~wallerdev@c-68-60-43-43.hsd1.mi.comcast.net] has quit [Read
error: Connection reset by peer]
08:25 -!- wallerdev [~wallerdev@c-68-60-43-43.hsd1.mi.comcast.net] has joined
#go-nuts
08:25 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
08:27 -!- mikespook [~mikespook@183.47.225.210] has joined #go-nuts
08:28 -!- Niedar [~bleh@ip68-99-166-222.hr.hr.cox.net] has joined #go-nuts
08:34 -!- mikespook [~mikespook@183.47.225.210] has quit [Ping timeout: 240
seconds]
08:42 -!- foocraft_ [~ewanas@78.100.215.128] has joined #go-nuts
08:45 -!- foocraft [~ewanas@78.101.171.51] has quit [Ping timeout: 246 seconds]
08:46 -!- edsrzf [~edsrzf@122-61-221-144.jetstream.xtra.co.nz] has quit [Remote
host closed the connection]
08:49 -!- mikespook [~mikespook@183.47.227.11] has joined #go-nuts
08:56 -!- _foocraft [~ewanas@78.101.228.214] has joined #go-nuts
08:58 -!- wrtp [~rog@92.23.135.231] has joined #go-nuts
08:59 -!- foocraft_ [~ewanas@78.100.215.128] has quit [Ping timeout: 276 seconds]
09:04 -!- ExsysHost [~ExsysTech@50-46-213-60.evrt.wa.frontiernet.net] has joined
#go-nuts
09:05 -!- tvw [~tv@212.79.9.150] has joined #go-nuts
09:06 -!- ExsysTech [~ExsysTech@50-46-213-60.evrt.wa.frontiernet.net] has quit
[Ping timeout: 250 seconds]
09:18 -!- [muttox] [~dheppell@93.135.70.115.static.exetel.com.au] has quit [Quit:
leaving]
09:38 -!- heatxsink [u956@gateway/web/irccloud.com/x-pxgutprpcqlqtimi] has quit
[Remote host closed the connection]
09:44 -!- krutcha [~krutcha@S010600045a27676a.vs.shawcable.net] has quit [Quit:
Leaving]
09:47 -!- hpvincent [~zig@nap13-11-83-156-121-34.fbx.proxad.net] has quit [Ping
timeout: 246 seconds]
09:49 -!- hpvincent [~zig@nap13-11-83-156-121-34.fbx.proxad.net] has joined
#go-nuts
09:50 -!- Ekspluati [576c168c@gateway/web/freenode/ip.87.108.22.140] has quit
[Quit: Page closed]
09:51 -!- ExsysHost [~ExsysTech@50-46-213-60.evrt.wa.frontiernet.net] has quit
[Read error: Connection reset by peer]
09:51 -!- _foocraft [~ewanas@78.101.228.214] has quit [Quit: Leaving]
09:52 -!- ExsysTech [~ExsysTech@50-46-213-60.evrt.wa.frontiernet.net] has joined
#go-nuts
09:55 -!- hpvincent [~zig@nap13-11-83-156-121-34.fbx.proxad.net] has quit [Ping
timeout: 276 seconds]
09:57 -!- virtualsue [~chatzilla@nat/cisco/x-yxuljxazrenytbze] has quit [Ping
timeout: 240 seconds]
09:58 -!- virtualsue [~chatzilla@nat/cisco/x-wegcyquzsqzklwdc] has joined #go-nuts
10:00 -!- shvntr [~shvntr@113.84.148.146] has joined #go-nuts
10:00 -!- hpvincent [~zig@nap13-11-83-156-121-34.fbx.proxad.net] has joined
#go-nuts
10:01 -!- hargettp [~hargettp@pool-71-184-185-93.bstnma.east.verizon.net] has
joined #go-nuts
10:07 -!- shvntr [~shvntr@113.84.148.146] has quit [Ping timeout: 260 seconds]
10:09 -!- shvntr [~shvntr@116.26.135.66] has joined #go-nuts
10:17 -!- gedevan [~gedevan@83.167.106.253] has quit [Quit: Leaving...]
10:24 -!- zcram [~zcram@78-28-72-29.cdma.dyn.kou.ee] has joined #go-nuts
10:25 -!- snearch [~snearch@f053003204.adsl.alicedsl.de] has joined #go-nuts
10:27 -!- kaichenxyz [~kaichenxy@li261-87.members.linode.com] has quit [Quit:
kaichenxyz]
10:35 -!- shvntr [~shvntr@116.26.135.66] has quit [Quit: leaving]
10:38 -!- alehorst [~alehorst@189.58.22.195.dynamic.adsl.gvt.net.br] has joined
#go-nuts
10:52 < str1ngs> skelterjohn: ping
10:53 -!- GilJ [~GilJ@zeus.ugent.be] has joined #go-nuts
10:55 -!- freetz [~fritz@bc-proxy-2.sandia.gov] has quit [Remote host closed the
connection]
10:55 -!- freetz [~fritz@bc-proxy-2.sandia.gov] has joined #go-nuts
10:57 -!- ucasano [~ucasano@151.12.47.139] has joined #go-nuts
11:02 -!- GeertJohan [~geertjoha@s51478c91.adsl.wanadoo.nl] has quit [Quit:
Leaving.]
11:03 -!- gregschlom [~quassel@187.118.210.62.te-dns.org] has quit [Read error:
Connection reset by peer]
11:03 < str1ngs> skelterjohn: I found the issue we were discussing.  sorry
to bother :P
11:08 -!- snearch [~snearch@f053003204.adsl.alicedsl.de] has quit [Quit:
Verlassend]
11:10 -!- mikespook [~mikespook@183.47.227.11] has quit [Quit: Leaving.]
11:19 -!- alexc [~alexc@unaffiliated/alexc] has joined #go-nuts
11:21 -!- niemeyer [~niemeyer@200-102-196-125.pltce701.dsl.brasiltelecom.net.br]
has joined #go-nuts
11:41 -!- tncardoso [~thiago@150.164.2.20] has joined #go-nuts
11:42 -!- ExsysTech [~ExsysTech@50-46-213-60.evrt.wa.frontiernet.net] has quit
[Read error: Connection reset by peer]
11:44 -!- ExsysTech [~ExsysTech@50-46-213-60.evrt.wa.frontiernet.net] has joined
#go-nuts
11:46 -!- ucasano_
[~ucasano@host150-147-static.225-95-b.business.telecomitalia.it] has joined
#go-nuts
11:47 -!- GeertJohan [~geertjoha@s51478c91.adsl.wanadoo.nl] has joined #go-nuts
11:48 -!- hargettp [~hargettp@pool-71-184-185-93.bstnma.east.verizon.net] has quit
[Quit: Leaving...]
11:50 -!- ucasano [~ucasano@151.12.47.139] has quit [Ping timeout: 246 seconds]
11:52 -!- Ekspluati [5b9a0491@gateway/web/freenode/ip.91.154.4.145] has joined
#go-nuts
12:10 -!- hargettp [~hargettp@pool-71-184-185-93.bstnma.east.verizon.net] has
joined #go-nuts
12:11 < scoeri> hi guys, quick question, is there a way to recover from a
deadlock?
12:12 < Namegduf> No, by definition of a deadlock.
12:12 < Namegduf> They happen when all goroutines are asleep.
12:12 < Namegduf> Don't make goroutines get deadlocked.
12:13 -!- ucasano [~ucasano@host150-147-static.225-95-b.business.telecomitalia.it]
has quit [Ping timeout: 252 seconds]
12:13 < scoeri> yeah, I figured as much :)
12:13 < scoeri> just thought all goroutines would panic in case of a
deadlock
12:14 -!- hargettp [~hargettp@pool-71-184-185-93.bstnma.east.verizon.net] has quit
[Client Quit]
12:17 -!- alexc [~alexc@unaffiliated/alexc] has quit [Quit: WeeChat 0.3.4]
12:17 -!- alexc [~alexc@unaffiliated/alexc] has joined #go-nuts
12:19 -!- hallas [~hallas@x1-6-30-46-9a-b2-c5-1f.k891.webspeed.dk] has joined
#go-nuts
12:28 -!- Nitro [~Nitro@unaffiliated/nitro] has joined #go-nuts
12:29 < wrtp> scoeri: i think the whole runtime panics in that case
12:36 < jnwhiteh> indeed, its a runtime panic
12:38 -!- tokuhiro_ [~tokuhirom@s230.GtokyoFL21.vectant.ne.jp] has quit [Remote
host closed the connection]
12:39 -!- moraes [~moraes@189.103.188.201] has quit [Ping timeout: 255 seconds]
12:46 < scoeri> and is there a way to recover from a runtime panic?
12:46 < scoeri> (i guess not)
12:47 -!- pharris [~Adium@rhgw.opentext.com] has joined #go-nuts
12:48 < xyproto> x++ is only a statement and not an expression, and ++x does
not exist.  I think this is great, but what is the reason for this change,
compared to C? Clarity of code?  Are any particular bugs avoided?
12:50 -!- cenuij [~cenuij@105.116.26.93.rev.sfr.net] has joined #go-nuts
12:50 -!- cenuij [~cenuij@105.116.26.93.rev.sfr.net] has quit [Changing host]
12:50 -!- cenuij [~cenuij@base/student/cenuij] has joined #go-nuts
12:51 < taruti> xyproto: x[i++] = i
12:51 < taruti> xyproto: clarity of code
12:51 * aiju doesn't like it
12:51 < aiju> but it's less fun without pointer arithmetic anyway
12:52 < scoeri> xyproto: http://golang.org/doc/go_faq.html#inc_dec
12:53 < str1ngs> scoeri: with recover() I have not use it myself
12:54 < scoeri> str1ngs: tried that already
12:54 < scoeri> doesn't work
12:54 < str1ngs> scoeri: in a defer closer?
12:55 < str1ngs> closure
12:55 < scoeri> of course
12:55 < aiju> if it doesn't work, you're doing it wrong
12:56 < aiju> oh wait, you're trying to recover from DEADLOCK?
12:56 < scoeri> yes :)
12:56 < wrtp> scoeri: you can recover from most runtime panics, but not
deadlock
12:56 -!- moraes [~moraes@189.103.188.201] has joined #go-nuts
12:56 < aiju> it is BY DEFINITION impossible to recover from deadlock
12:57 < wrtp> xyproto: if ++x were a statement, how would it differ from x++
?
12:57 < aiju> wrtp: not at all
12:57 < aiju> or was that a rhetoric question?  :)
12:57 < wrtp> it was
12:57 < aiju> heh
12:57 < aiju> i think he was asking about statement vs expr
12:57 < wrtp> ah
12:57 < wrtp> you're right
12:57 < wrtp> it's for clarity of code
12:58 < aiju> to make code less readable ;P
12:58 < wrtp> an expression is just an expression.  i think the main reason
was to disallow the common if (x = 5){ } bugs
12:58 < aiju> that's another (bad) story
12:59 * aiju finds these two things + removal of the comma operator pretty
limiting
12:59 < wrtp> aiju: i'm not sure about it being impossible by definition to
recover from deadlock.  depends whether you're speaking of deadlock of the entire
system or just a subset
12:59 < aiju> i can't write e.g.  while(x = getchar(), x >= 0) {
12:59 < aiju> which is common in C code
12:59 < wrtp> that's my only gripe actually
12:59 < aiju> but i have to write for { x, err := getchar(); if err != nil {
break } ...  in Go
13:00 < wrtp> if a while statement was added to go, you could do while x :=
getchar(); x >= 0 { }
13:00 < Namegduf> for x, err := getchar(); err == nil; x, err = getchar() {
...  {
13:01 < wrtp> yeah, but that needlessly duplicates the expression
13:01 < Namegduf> That's true.
13:01 < wrtp> so the for { ...  break } tends to be idiomatic
13:02 < wrtp> aiju: how else do you find it limiting?
13:02 < aiju> it just limits expressiveness
13:02 < wrtp> it also limits obfuscation :-)
13:02 < aiju> i'm sure you can obfuscate Go code as well
13:03 < Namegduf> wrtp: I'm not sure why
13:03 < Namegduf> wrtp: What would that do?
13:03 < wrtp> Namegduf: what would what do?
13:03 < Namegduf> Run the x := getchar(); bit repeatedly?
13:03 < wrtp> Namegduf: yeah
13:03 < Namegduf> Hmm.
13:03 < Namegduf> So the same as
13:04 < Namegduf> for ; err == nil; x, err = getchar() {
13:04 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
13:04 < Namegduf> But defining x and err and running it the first time
around
13:04 < wrtp> Namegduf: almost
13:04 < wrtp> yes
13:04 < Namegduf> I don't like how mismatched it is with any of the for
syntax, all the parts of it don't match up.  :(
13:04 < Namegduf> It doesn't match C, either
13:05 < Namegduf> I think the break is the least evil here.
13:05 < wrtp> it's exactly like this in C: while ((n = read(fd, buf,
buflen)) > 0) { }
13:05 < wrtp> except that you can declare n too
13:06 < Namegduf> That does it by including it in the condition, not having
the condition preceded by a "run for every loop, including the first" thing
13:06 -!- r_linux [~r_linux@smtp.mandique.com.br] has joined #go-nuts
13:06 < Namegduf> Which is a construct which doesn't match any loop
construct in C or Go
13:06 < wrtp> i meant semantically
13:06 -!- ucasano [~ucasano@151.12.47.139] has joined #go-nuts
13:07 < wrtp> the C first assigns the result of read, then tests it
13:07 < Namegduf> I mean syntactically
13:07 < wrtp> that's what would happen in the Go version
13:07 < Namegduf> Because it's the syntax I think doesn't seem so nice,
unfortunately
13:07 -!- KingPhilroy [~kingphilr@68-116-192-86.dhcp.oxfr.ma.charter.com] has
joined #go-nuts
13:07 < wrtp> sure, and i think that's why go doesn't have it.
13:08 * Namegduf would just repeat the damn expression, it's not that long
13:08 < wrtp> but i think it would work ok, except that while cond { } would
be identical to for cond { }
13:08 < Namegduf> I don't like that what looks like an optional initialiser
13:08 < wrtp> Namegduf: i think you'll find that given that choice, almost
no Go code repeats the expression
13:08 < Namegduf> Being optional in the same way for and if's is
13:08 -!- tobym [~tobym@cpe-72-229-2-6.nyc.res.rr.com] has quit [Ping timeout: 240
seconds]
13:08 < Namegduf> Isn't an optional initialiser
13:08 < Namegduf> But is something entirely new
13:09 -!- Project_2501 [~Marvin@82.84.83.42] has quit [Quit: E se abbasso questa
leva che succ...]
13:09 < wrtp> Namegduf: not really.  it's like the optional third item in
the for statement
13:09 < Namegduf> I get what you're saying, and it even seems like an
elegant and consistent looping construct.
13:09 < Namegduf> wrtp: I think maybe you could just make the first bit of
for actually optional
13:09 < wrtp> it just happens to be first
13:09 < Namegduf> for at the moment is either three or one
13:10 < wrtp> no, you can have two
13:10 < Namegduf> wrtp: An optional first bit is everywhere I can think of
an optional initialiser in Go.
13:10 < wrtp> it just doesn't work the way you'd want
13:10 -!- sunfmin [~sunfmin@115.206.253.191] has joined #go-nuts
13:10 < Namegduf> wrtp: I thought you had to include a semicolon to make all
three be present, but one empty?
13:10 < wrtp> you would have to include a semicolon
13:11 < exch> http://code.google.com/p/go/issues/detail?id=1853 I think this
needs a petition :p
13:11 < Namegduf> I think this would be a great idea if it weren't for go
having optional initialisers in many places already, because it LOOKS like one.
13:11 < Namegduf> It just happens to be run every loop, not just the first.
13:11 < Namegduf> Hmm.
13:11 < wrtp> exch: what do you want to petition?
13:11 < Namegduf> Maybe repeat instead of while?
13:11 < wrtp> Namegduf: ?
13:11 < exch> wrtp: the inclusion of pkg-config output in the #cgo flag
comments
13:11 < Namegduf> repeat <initialiser>; <cond> { }
13:12 < wrtp> repeat by convention runs the body at least once
13:12 < Namegduf> Is slighter more intuitive that the initialiser reruns
each time
13:12 < Namegduf> Damnit it's already used
13:12 < wrtp> exch: backquotes in #cgo would be a very bad idea
13:12 -!- markcol [~markcol@74.125.59.1] has joined #go-nuts
13:13 < exch> I am unconvinced of the security concerns, but a better
solution is having dedicated flags for pkg-config --cflags and --libs
13:13 < exch> no need for shell code
13:14 < exch> as far as the security goes, you are downloading/compiling and
running sourcecode from the internet.  whats to stop the pkg author from adding
the proverbial rm -rf / in the Go code itself?
13:14 < wrtp> exch: nothing, but i want to be able to download and build go
code just to test whether it builds ok, without actually running it
13:15 < exch> fair enough.  In that case, having the dedicated flags should
relieve yuor concerns
13:15 < wrtp> and without granting the package author or some intermediary
the capability to access my account
13:15 < wrtp> exch: i'm not sure i understand what you mean be having
dedicated flags
13:15 < wrtp> s/be/by
13:16 < wrtp> some special syntax in #cgo ?
13:16 -!- ampleyfly [ampleyfly@gateway/shell/blinkenshell.org/x-imzuhzgdedpoqjvh]
has quit [Read error: Operation timed out]
13:17 < exch> yes.  placeholders for the output of pkg-config.  gomake can
sort the actual resolution out for itself.  and provide the existing
CFLAGS/LDFLAGS as a fallback incase there is no pkg-config (like on windows)
13:17 < sunfmin> Hi, any idea what this error mean?
https://gist.github.com/990959
13:18 < wrtp> sunfmin: i think it might mean that you've got code that is
blocking within an init function
13:18 < wrtp> although the error is different from the one i've seen before
13:19 < sunfmin> ohh, I find this:
http://code.google.com/p/go/issues/detail?id=1776
13:19 < wrtp> sunfmin: yes, that seems right
13:19 < wrtp> exch: so what would those placeholders look like?
13:20 < wrtp> (i agree that we want some way of making it work)
13:22 < sunfmin> So where I should make the mysql database connection in a
package?
13:22 < exch> that's entirely up to whomever implements them.  Just two
constants will be enough.  PKG-CFLAGS / PKG-LIBS perhaps.  It doesn't really
matter, as long as the cgo build process knows to look for it just as it does with
the current #cgo flags
13:24 < wrtp> exch: how would cgo know what args to pass to pkg-config ?
13:25 -!- Lareth [~corelon@dencoae.ath.forthnet.gr] has joined #go-nuts
13:25 < exch> good question.
13:25 -!- iant [~iant@216.239.45.130] has quit [Ping timeout: 252 seconds]
13:26 < wrtp> maybe it could be phrased the other way around
13:26 < wrtp> so you could specify PKG-CONFIG-ARGS or whatever, and cgo
would automatically call pkg-config and update CFLAGS and LDFLAGS accordingly
13:27 < uriel> pkg-config...  is there anything the lunix folks have not
totally fucked up?
13:27 < uriel> why does such a thing even exist?
13:27 < wrtp> thank's for the helpful comment urial
13:27 < Lareth> hello I am trying to compile the simple program mentioned in
the install page and I get an error mentioning syntax error: unexpected literal,
expecting name
13:27 < Lareth> http://pastie.org/1971239
13:27 < uriel> wrtp: you are welcome
13:27 < uriel> sorry, it just pisses me off to see so many problems created
out of nowhere
13:27 < Lareth> and the problem is in line 3
13:28 < aiju> linux developers can never have enough problems
13:28 < exch> problems keep the mind sharp
13:28 < wrtp> Lareth: what editor did you create the file in?
13:28 < exch> life would be boring without them
13:29 < Namegduf> uriel: The existing system didn't work well, being a
massive pile of hacks
13:29 < Namegduf> So they added a new thing on top to monkey patch it
13:30 < wrtp> Lareth: it looks fine to me
13:30 < wrtp> and copying and pasting into the go playground works
13:31 < exch> wrtp: I just found that the cgo flags already allow ``
execution
13:31 < wrtp> oops
13:31 < exch> // #cgo CFLAGS : -L`date`
13:31 < exch> that gets passed to gcc as-is
13:31 < wrtp> they should not.  that's the usual horrible makefile thing
13:31 < wrtp> make gets it so wrong
13:31 < wrtp> (i'm sounding like uriel now :-])
13:31 -!- Lareth_ [~corelon@193.92.136.240] has joined #go-nuts
13:32 < wrtp> i did some sanitising work on cgo before - it's obviously been
broken now.
13:32 -!- Lareth [~corelon@dencoae.ath.forthnet.gr] has quit [Ping timeout: 250
seconds]
13:32 < exch> should probably file a bug for that then
13:32 < wrtp> yeah
13:33 < mpl> wrtp: heh, ppl change.  even uriel seems to have calmed down
for a while :)
13:33 < uriel> I'm surprised pkg-config doesn't use xml
13:33 < aiju> fontconfig does
13:33 < aiju> mpl: he was busy.
13:33 < uriel> mpl: I just have been busy
13:33 < aiju> hah
13:33 < uriel> aiju: haha
13:33 -!- fabled [~fabled@83.145.235.194] has quit [Quit: Ex-Chat]
13:33 < aiju> uriel: fontconfig was once broken for me
13:33 < aiju> THIS was horror
13:34 < Namegduf> Stop gradually turning me into a Plan 9 person
13:34 < uriel> fontconfig *is* the horror
13:34 < mpl> uriel: still.  you don't sound so angry and not yelling at
every excuse.
13:34 < aiju> instead of trying to understand how it works, i just deleted
fonts until it worked again
13:34 < wrtp> Namegduf: plan 9 people aren't all like uriel and aiju
13:34 < uriel> aiju: you are lucky you managed to make it work
13:34 < wrtp> luckily :-)
13:34 < aiju> some of them are even worse!
13:35 < Namegduf> wrtp: I already have the incredible contempt for Java
13:35 < mpl> most of them are actually pretty nice.
13:35 < uriel> at least just as bitter
13:35 < lareth> Any ideas?  I am using 8g on linux
13:35 -!- iant [~iant@67.218.109.241] has joined #go-nuts
13:35 -!- mode/#go-nuts [+v iant] by ChanServ
13:36 < wrtp> lareth: in a terminal window, do: cat hello.go; 8g hello.go
13:36 < lareth> in http://pastie.org/1971239
13:36 < mpl> sadly it seems like there's always someone to take the place of
the "angry and rude one" on 9fans :(
13:36 < wrtp> and copy and paste the whole session to us
13:36 -!- fabled [~fabled@83.145.235.194] has joined #go-nuts
13:36 < wrtp> i think maybe you're invoking the compiler on the wrong file
or something
13:36 < wrtp> mpl: yeah :-(
13:37 < lareth> http://pastie.org/1971292
13:37 < wrtp> it's so counter-productive
13:37 < wrtp> lareth: could you paste the command you're running too?
13:37 * uriel has not posted to 9fans in years
13:37 < mpl> sorry, I meant on #plan9
13:37 < lareth> cat hello.go; 8g hello.go
13:38 < mpl> uriel: yes, and you're not being that rude anymore on #plan9,
and I thank you for that.
13:39 < wrtp> lareth: what happens if you try this: echo package main >
tst.go; 8g tst.go
13:39 -!- alexc [~alexc@unaffiliated/alexc] has quit [Quit: WeeChat 0.3.4]
13:40 < xyproto> why is this not allowed?  var x, y int = 1, 2
13:40 < uriel> mpl: I barely read #plan9 either
13:40 < lareth> wrtp: it compiles ok and creates tst.8
13:40 < mpl> uriel: that's because go cured you ;)
13:41 < uriel> mpl: also might be because all the swearing and cursing goes
in to #cat-v ;)
13:41 -!- poba [~poba@116.197.5.67] has joined #go-nuts
13:41 < uriel> (and I'm not even the one doing most of it)
13:41 < aiju> Capso is haha
13:41 < wrtp> lareth: now try: echo 'import "fmt"' >> tst.go; 8g
tst.go
13:42 < xyproto> lareth: I think I encountered the same problem as you once,
if the problem is that you can't import "fmt".  I upgraded the compiler.
13:42 < xyproto> lareth: also, check GOROOT
13:42 < wrtp> xyproto: it's strange that it's a syntax error
13:43 < xyproto> wrtp: yes, it might be a syntax error instead of what I
encountered
13:43 < xyproto> wrtp: I find it strange too
13:43 < lareth> wrtp: indeed I get tst.go:2: syntax error: unexpected
literal, expecting name
13:43 < wrtp> hmm
13:43 < lareth> but I just compiled go from hg about an hour ago
13:44 < wrtp> lareth: which version?  weekly?  release?  tip?
13:44 < xyproto> lareth: and your $GOROOT is correctly set?
13:44 < wrtp> if tip, it might have just been broken, i guess
13:44 < lareth> the weird thing is that I tried to compile this from gogo
and it compiled correctly
13:44 < lareth> wrtp: release
13:45 -!- poba [~poba@116.197.5.67] has left #go-nuts []
13:45 < wrtp> lareth: that is odd.  did all.bash build everything ok?
13:46 < lareth> yes
13:46 < wrtp> presumably it did.
13:46 < wrtp> in which case the go compiler is working
13:46 < lareth> it also returned all tests passed as the install.html says
13:46 < wrtp> so you're probably using an old version
13:46 < wrtp> what does this produce: echo $GOROOT; which 8g
13:47 < lareth> hmm
13:48 < lareth> I see that 8g is from another directory
13:48 < wrtp> what does this do: echo $GOBIN ?\
13:48 < uriel> adg: shouldn't Go be listed here:
http://code.google.com/more/ ?
13:49 < lareth> I build go in $HOME/go
13:49 < lareth> while for some reason (long ago) I also copied compiler etc
in $HOME/bin
13:49 < wrtp> lareth: there's your problem
13:49 < lareth> but I do not remember when.
13:49 < lareth> wrtp: yup !!
13:49 < lareth> silly me
13:50 < wrtp> :-)
13:50 < exch> another satisfied customer
13:50 < wrtp> we've all done that
13:51 < xyproto> well solved :)
13:51 < sunfmin> Hi, is there an database connection pool package exist?  Or
easy to build?
13:54 < wrtp> sunfmin: if i understand what you mean, that kind of thing is
trivial to build in go.  just use a buffered channel holding database connections.
13:55 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
13:55 < sunfmin> wrtp: I got this Command out of sync error for only using
one connection: http://dev.mysql.com/doc/refman/5.0/en/commands-out-of-sync.html
13:56 -!- GeertJohan [~geertjoha@s51478c91.adsl.wanadoo.nl] has quit [Quit:
Leaving.]
13:56 < wrtp> sunfmin: are you using commands from different goroutines?
13:57 < sunfmin> wrtp: just using web.go, and using ab -n 1000 -c 200
http://localhost:9999/video/1
13:57 -!- ampleyfly [ampleyfly@gateway/shell/blinkenshell.org/x-sgjbmekmlkipfbmf]
has joined #go-nuts
13:57 < sunfmin> wrtp: not sure web.go using different goroutine or not
13:57 < sunfmin> wrtp: probaby did.
13:57 < wrtp> sunfmin: yes
13:57 < wrtp> and you're using only one db connection, right?
13:58 < sunfmin> yes
13:58 < wrtp> sunfmin: have you read "effective go"?
13:59 < sunfmin> not carefully read
13:59 < wrtp> sunfmin: see, in particular, the section entitled "A leaky
buffer"
13:59 < wrtp> i think you'll find that something similar could work for you
14:00 < sunfmin> thanks, I'll read it carefully now.  :-)
14:02 -!- Venom_X [~pjacobs@66.54.185.131] has joined #go-nuts
14:03 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has joined #go-nuts
14:06 -!- th0re [~thre@p5B3B515B.dip.t-dialin.net] has joined #go-nuts
14:08 < lareth> I know that this question has probably been asked a million
times but is there any suggested go ide?
14:08 < lareth> goclipse failed to install for me
14:08 < Namegduf> Your choice of text editor, plus as many terminal windows
as you desire
14:12 < str1ngs> lareth: what editor do you currently use?
14:12 < lareth> str1ngs: hmm I have not yet settled.  I am currently using
emacs or vi for go
14:13 < lareth> as they had official support
14:13 < str1ngs> ok there are files in $GOROOT/misc for both those
14:13 < lareth> I know
14:13 < str1ngs> kk
14:13 < lareth> I am already setup
14:14 < lareth> but I wondered if there was an ide that actually worlks
(liteide does not do it yet, gogo is still young and goclipse will not install)
14:14 < fzzbt> lareth: no
14:15 -!- tobym [~tobym@cpe-72-229-2-6.nyc.res.rr.com] has joined #go-nuts
14:15 < exch> Not much call for it yet, I guess.  Most people are already
well entrenched in their standard editors and have adapted Go to work with it,
instead of the other way aruond
14:20 < sunfmin> wrtp: I wrote this: https://gist.github.com/991067
14:20 < lareth> exch: I see
14:20 < sunfmin> wrtp: sounds about right?
14:21 < lareth> wrtp: for the previous problem with compiler error, did the
older compiler versions demand for the import to have a name (like import fmt
"fmt")?
14:22 -!- Bigbear1 [~Cody@d173-181-43-12.abhsia.telus.net] has joined #go-nuts
14:23 -!- gtaylor [~gtaylor@99-5-124-9.lightspeed.gnvlsc.sbcglobal.net] has joined
#go-nuts
14:27 -!- a2800276 [~a2800276@80.187.146.56] has quit [Ping timeout: 260 seconds]
14:27 < skelterjohn> import never required a name
14:27 < skelterjohn> not since the language was officially launched, anyway
14:28 -!- adlan [~adlan@175.138.31.223] has joined #go-nuts
14:29 -!- jarsen [~jarsen@76.8.206.34] has joined #go-nuts
14:29 -!- jarsen [~jarsen@76.8.206.34] has quit [Remote host closed the
connection]
14:29 -!- chomp [~chomp@dap-209-166-184-50.pri.tnt-3.pgh.pa.stargate.net] has
joined #go-nuts
14:30 < wrtp> lareth: i don't remember a version that would have failed on
your example
14:31 < wrtp> sunfmin: yeah, that looks along the right lines.
14:31 < wrtp> except you should never ignore the return from DialTCP
14:31 < sunfmin> wrtp: normally we should log the error?
14:34 < wrtp> sunfmin: you should return it from Connection, or re-try a few
times, then panic, or something, but making external connections should not fail
silently
14:35 < sunfmin> wrtp: thanks, understand.
14:35 < wrtp> maybe Subtitles should return an error
14:35 -!- fvbommel [~fvbommel_@dyn068072.nbw.tue.nl] has quit [Ping timeout: 276
seconds]
14:36 < sunfmin> wrtp: It's used in templates
14:36 < sunfmin> wrtp: in that case, should redirect to a 505 page or
something.
14:36 < sunfmin> wrtp: 500 page
14:37 < wrtp> yeah - and you could do that by making it panic with a known
type
14:37 < wrtp> then you could recover and send the 500
14:37 < sunfmin> cool, thanks.
14:37 < sunfmin> does panic work like exceptions?
14:37 < wrtp> yeah
14:38 < exch> if you catch them with recover(), otherwise they bring the
program down
14:38 < exch> I'm not sure if all panic()s can be recovered
14:38 < wrtp> sunfmin: see the section on Panic and Recover in Effective Go
14:39 < sunfmin> some day ago I heard Exception doesn't work well with
parallels programes
14:39 < wrtp> also see adg's recent talk at Google IO, "Writeing Web Apps in
Go"
14:39 < wrtp> sunfmin: it's ok if used in restricted conditions
14:40 < sunfmin> wrtp: ok, will check those sections, thanks
14:40 < wrtp> although i think it would be nice if template made it possible
to use functions that returned an os.Error too
14:40 < wrtp> s/"Writeing/"Writing/
14:40 < wrtp> :-)
14:40 < th0re> This room rulez
14:41 * th0re hört Boiler von Limp Bizkit auf Chocolate Starfish And The Hot Dog
Flavored Water.
14:41 * th0re hört Rollin' (Urban Assault Vehicle) von Limp Bizkit auf Chocolate
Starfish And The Hot Dog Flavored Water.
14:42 < wrtp> that's bizarre spam
14:42 -!- tobym [~tobym@cpe-72-229-2-6.nyc.res.rr.com] has quit [Ping timeout: 240
seconds]
14:42 -!- a2800276 [~a2800276@80.187.146.56] has joined #go-nuts
14:47 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has joined
#go-nuts
14:47 -!- hargettp_ [~hargettp_@dhcp-162.mirrorimage.net] has joined #go-nuts
14:51 -!- th0re [~thre@p5B3B515B.dip.t-dialin.net] has quit [Remote host closed
the connection]
14:53 -!- dlowe [~dlowe@ita4fw1.itasoftware.com] has joined #go-nuts
14:54 -!- th0re [~thre@p5B3B515B.dip.t-dialin.net] has joined #go-nuts
14:55 -!- tobym [~tobym@cpe-72-229-2-6.nyc.res.rr.com] has joined #go-nuts
14:59 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts
15:01 -!- adlan [~adlan@175.138.31.223] has quit [Remote host closed the
connection]
15:05 -!- iant [~iant@67.218.109.241] has quit [Quit: Leaving.]
15:06 -!- GilJ_ [~GilJ@zeus.ugent.be] has joined #go-nuts
15:06 -!- GilJ [~GilJ@zeus.ugent.be] has quit [Quit: leaving]
15:06 -!- noam [noam@87.69.42.61.cable.012.net.il] has quit [Ping timeout: 246
seconds]
15:07 -!- adlan [~adlan@175.138.31.223] has joined #go-nuts
15:07 -!- iant [~iant@67.218.109.241] has joined #go-nuts
15:07 -!- mode/#go-nuts [+v iant] by ChanServ
15:12 -!- GeertJohan [~Squarc@D978EC5D.cm-3-1d.dynamic.ziggo.nl] has joined
#go-nuts
15:15 -!- dario [~dario@domina.zerties.org] has quit [Quit: leaving]
15:21 -!- GilJ_ [~GilJ@zeus.ugent.be] has quit [Quit: leaving]
15:21 -!- sunfmin [~sunfmin@115.206.253.191] has quit [Quit: sunfmin]
15:22 -!- GilJ [~GilJ@zeus.ugent.be] has joined #go-nuts
15:24 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has quit [Quit: Leaving.]
15:25 -!- virtualsue [~chatzilla@nat/cisco/x-wegcyquzsqzklwdc] has quit [Ping
timeout: 255 seconds]
15:26 -!- noam [noam@87.69.42.61.cable.012.net.il] has joined #go-nuts
15:29 -!- piranha [~piranha@D57D1AB3.static.ziggozakelijk.nl] has quit [Quit:
Computer has gone to sleep.]
15:35 -!- saschpe [~quassel@opensuse/member/saschpe] has joined #go-nuts
15:35 -!- noodles775 [~michael@canonical/launchpad/noodles775] has quit [Quit:
leaving]
15:36 -!- Venom_X_ [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has
joined #go-nuts
15:38 -!- Venom_X [~pjacobs@66.54.185.131] has quit [Ping timeout: 246 seconds]
15:40 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has quit
[Ping timeout: 240 seconds]
15:42 -!- ucasano [~ucasano@151.12.47.139] has quit [Quit: ucasano]
15:44 -!- dario [~dario@domina.zerties.org] has joined #go-nuts
15:44 -!- tvw [~tv@212.79.9.150] has quit [Remote host closed the connection]
15:44 -!- iant [~iant@67.218.109.241] has quit [Quit: Leaving.]
15:44 -!- th0re [~thre@p5B3B515B.dip.t-dialin.net] has quit [Quit: Der weg zur
erkenntniss ist der richtige.]
15:45 -!- ithkuil [~marko@2a00:1620:c0:50:66b9:e8ff:feca:1812] has joined #go-nuts
15:46 < ithkuil> hi
15:46 < ithkuil> trying to follow install instructions on
http://golang.org/doc/install.html#install
15:46 < ithkuil> on a debian 6 64bit
15:47 < prudhvi> Hi, for gccgo what version of stdlib is included?
15:48 < ithkuil> the build doesn't seem to throw any error but I end up only
with these in bin/ : 6cov 6l godefs gomake quietgcc
15:50 < ithkuil> ah ok, sorry, I found the missing dep buried in build
output
15:52 -!- ucasano [~ucasano@151.12.47.139] has joined #go-nuts
15:55 -!- awidegreen [~quassel@h-170-226.A212.priv.bahnhof.se] has joined #go-nuts
15:57 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has quit [Remote host
closed the connection]
15:57 -!- markcol [~markcol@74.125.59.1] has quit [Quit: markcol]
15:58 -!- stest [~tester@66.180.123.47] has joined #go-nuts
15:59 < stest> hi, I'm trying to convert a php application to go, and I've
run across a piece of code which uses the PHP pack function to pack a series of
hex values into a string.  how would I do the same thing in go?
15:59 -!- markcol [~markcol@74.125.59.1] has joined #go-nuts
15:59 < stest> as I understand it the PHP pack function is derived from
Perl, maybe someone is familiar with either of those
16:02 < wrtp> stest: what do the hex values look like as a string?
16:02 < wrtp> you can do, for example fmt.Sprintf("%x", []byte{3,5,6,7})
16:02 < wrtp> to get the value 03050607
16:03 < wrtp> (i think - checking)
16:03 < wrtp> yeah, that works
16:03 < stest> wrtp: okay, I'm going to try that out.  thanks
16:08 -!- chowmeined [~chow@unaffiliated/chowmeined] has quit [Quit: Leaving]
16:08 -!- Venom_X [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has quit
[Quit: Venom_X]
16:08 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
16:10 -!- binarypie [~binarypie@c-24-6-151-185.hsd1.ca.comcast.net] has joined
#go-nuts
16:13 -!- eimantas [~eimantas@ip-212-52-52-163.kava.lt] has joined #go-nuts
16:15 -!- virtualsue [~chatzilla@nat/cisco/x-ddhcgbghedtciilx] has joined #go-nuts
16:20 -!- binarypie [~binarypie@c-24-6-151-185.hsd1.ca.comcast.net] has quit
[Remote host closed the connection]
16:22 -!- boscop_ [~boscop@g227006223.adsl.alicedsl.de] has joined #go-nuts
16:23 -!- boscop [~boscop@unaffiliated/boscop] has quit [Ping timeout: 246
seconds]
16:25 -!- krutcha [~krutcha@remote.icron.com] has joined #go-nuts
16:25 < str1ngs> prudhvi: gcc 4.6 release?
16:26 < str1ngs> prudhvi: if so libgo/MERGE says 559f12e8fcd5
16:28 -!- gedevan [~gedevan@83.167.106.253] has joined #go-nuts
16:28 < prudhvi> str1ngs: thanks
16:28 -!- HQRaja [Venomous@119.154.115.234] has joined #go-nuts
16:28 -!- gedevan [~gedevan@83.167.106.253] has quit [Client Quit]
16:29 < str1ngs> prudhvi: forgive my hg skills are bad but that looks to be
around elease.2011-01-20
16:29 < str1ngs> release*
16:29 -!- chowmeined [~chow@unaffiliated/chowmeined] has joined #go-nuts
16:29 < str1ngs> prudhvi: however if you need something newer you can use
the gcc snapshots
16:30 < str1ngs> 4.7 is fairly upto date with the stdlib
16:30 < prudhvi> str1ngs: i am testing gccgo with the gold linker.  I wanted
to know what's included.
16:30 < prudhvi> But, yes.  Sure am going to try it.
16:31 < str1ngs> so stdlib is not an issues?
16:31 < str1ngs> also what os/arch distro?
16:31 -!- HQRaja [Venomous@119.154.115.234] has left #go-nuts []
16:31 < prudhvi> str1ngs: Linux/Gentoo
16:31 < str1ngs> hmm is gccgo not in portage?
16:31 < str1ngs> or that is what you are uesing I guess
16:31 < prudhvi> it is.  But, not with gold linker
16:32 -!- ucasano [~ucasano@151.12.47.139] has quit [Quit: ucasano]
16:32 < prudhvi> i mean, binutils doesnt come with gold linker.
16:32 < str1ngs> ah, so I guess you are following the gccgo page?
16:32 < prudhvi> str1ngs: yes.
16:32 < str1ngs> ok
16:33 < prudhvi> str1ngs: i wanted to see how goroutine performance differs
from 6g to gccgo
16:34 -!- cenuij [~cenuij@base/student/cenuij] has quit [Remote host closed the
connection]
16:34 < prudhvi> that's the motivation
16:34 < str1ngs> I found the snapshot easier to work with then say svn.  but
upto you
16:35 -!- wallerdev [~wallerdev@c-68-60-43-43.hsd1.mi.comcast.net] has quit [Quit:
wallerdev]
16:35 -!- a2800276 [~a2800276@80.187.146.56] has quit [Ping timeout: 248 seconds]
16:36 < prudhvi> i`ll try both 4.6 and 4.7.  Should be fun benchmarking both
16:36 < str1ngs> I like using 4.7 just for the updated stlibs
16:37 < str1ngs> but for the most part I use gc
16:39 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:84d9:d84:92e7:3aae] has joined
#go-nuts
16:40 -!- wallerdev [~wallerdev@c-68-60-43-43.hsd1.mi.comcast.net] has joined
#go-nuts
16:41 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has joined
#go-nuts
16:43 -!- saschpe [~quassel@opensuse/member/saschpe] has quit [Remote host closed
the connection]
16:43 -!- fvbommel [~fvbommel_@86.86.15.250] has joined #go-nuts
16:46 -!- freetz [~fritz@bc-proxy-2.sandia.gov] has quit [Remote host closed the
connection]
16:46 -!- freetz [~fritz@bc-proxy-2.sandia.gov] has joined #go-nuts
16:57 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
16:58 -!- foocraft [~ewanas@78.101.84.219] has joined #go-nuts
17:04 -!- binarypie [~binarypie@adsl-76-254-24-124.dsl.pltn13.sbcglobal.net] has
joined #go-nuts
17:10 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-182-93.clienti.tiscali.it] has
joined #go-nuts
17:15 -!- noam [noam@87.69.42.61.cable.012.net.il] has quit [Ping timeout: 240
seconds]
17:15 -!- zcram [~zcram@78-28-72-29.cdma.dyn.kou.ee] has quit [Quit: Leaving]
17:19 -!- tobym [~tobym@cpe-72-229-2-6.nyc.res.rr.com] has quit [Ping timeout: 244
seconds]
17:20 -!- iant [~iant@nat/google/x-irayamtasakyoqit] has joined #go-nuts
17:20 -!- mode/#go-nuts [+v iant] by ChanServ
17:20 -!- piranha [~piranha@5ED43A0B.cm-7-5a.dynamic.ziggo.nl] has joined #go-nuts
17:24 -!- ithkuil [~marko@2a00:1620:c0:50:66b9:e8ff:feca:1812] has quit [Ping
timeout: 255 seconds]
17:27 < stest> so I've got two arrays of bytes that are different sizes.
What is the best way to compare different parts of them?
17:28 < wrtp> stest: slice operations and bytes.Compare
17:28 -!- markcol [~markcol@74.125.59.1] has quit [Quit: markcol]
17:29 -!- noam [noam@87.69.42.61.cable.012.net.il] has joined #go-nuts
17:29 < stest> wrtp: I figure I could use slices, but go keeps throwing an
error about how "slice an only be compared to nil"
17:29 < stest> I don't understand how to get around that
17:29 < wrtp> stest: use bytes.Compare to do the comparison, as i said
17:29 -!- bugQ [~bug@c-67-186-255-54.hsd1.ut.comcast.net] has joined #go-nuts
17:29 < wrtp> (as in, the function Compare from the "bytes" package)
17:30 < stest> wrtp: okay, thanks again
17:30 < wrtp> try godoc bytes Compare
17:30 -!- markcol [~markcol@74.125.59.1] has joined #go-nuts
17:35 < aiju> ha
17:35 -!- a2800276 [~a2800276@xdsl-84-44-228-230.netcologne.de] has joined
#go-nuts
17:35 < aiju> go is coming up in /b/
17:35 < aiju> ehm /g/
17:36 < mpl> aiju: why am I not surprised that you're browsing 4chan...  ?
17:36 < aiju> i'm not browsing it
17:37 < aiju> someone else pointed me to this Plan 9 thread
17:37 < aiju> and now Go came up
17:37 < mpl> hah
17:37 < aiju> http://boards.4chan.org/g/res/17722446
17:37 < aiju> and no, that's not me who mentioned 9front
17:40 * wrtp has never heard of 4chan before.
17:40 < mpl> lol
17:40 < aiju> wow
17:40 < aiju> 4chan even appeared in mortal news
17:41 < mpl> aiju: wrtp is trolling you in go-nuts like a boss.
17:41 < aiju> Yeah I've heard tons of good things about Go. I really should
try it out sometime.  From what I understand it's basically a compiled version of
Python right?
17:41 < aiju> hahahah
17:41 < wrtp> actually it's true
17:41 < wrtp> (that i'd not heard of 4chan)
17:42 < mpl> wrtp: oh well, I guess it's possible.  you're not missing out
on much anyway :)
17:43 < wrtp> doesn't seem so
17:43 < aiju> true that
17:43 < aiju> unless you enjoy idiotic behaviour way beyond average IRC
idiocy
17:43 < mpl> it's just another way to waste hours on the internet.
17:43 < mpl> like so many of them.
17:44 -!- adlan [~adlan@175.138.31.223] has quit [Quit: Leaving]
17:44 < mpl> anyways, gotta go, ttyl.
17:45 -!- huin [~huin@91.85.171.238] has joined #go-nuts
17:52 -!- krutcha [~krutcha@remote.icron.com] has quit [Remote host closed the
connection]
17:52 < vegai> anyone else have to deal with a thing called BPEL?
17:54 < aiju> BCPL?  ;P
17:56 -!- markcol [~markcol@74.125.59.1] has quit [Quit: markcol]
17:57 -!- aho [~nya@fuld-590c7b6b.pool.mediaWays.net] has joined #go-nuts
17:58 -!- markcol [~markcol@74.125.59.1] has joined #go-nuts
18:03 < stest> aiju: it is more different from Python than might be
suggested
18:04 < stest> aiju: I'm finding that the strictness of Go's typing makes a
big difference in how you write the program
18:05 -!- rutkowski [~adrian@078088205090.walbrzych.vectranet.pl] has joined
#go-nuts
18:10 < wrtp> stest: aiju was trolling
18:10 -!- tncardoso [~thiago@150.164.2.20] has quit [Quit: bye]
18:11 < aiju> i wasn't trolling
18:11 < aiju> i was quoting
18:15 < wrtp> from where
18:15 < wrtp> ?
18:15 < wrtp> 4chan?
18:15 < aiju> yeah
18:16 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Read error:
Connection reset by peer]
18:18 < dlowe> isn't that pretty much the same thing?  :D
18:27 -!- alehorst [~alehorst@189.58.22.195.dynamic.adsl.gvt.net.br] has quit
[Ping timeout: 246 seconds]
18:30 -!- Ekspluati [5b9a0491@gateway/web/freenode/ip.91.154.4.145] has quit [Ping
timeout: 252 seconds]
18:32 -!- TheMue [~TheMue@p5DDF5068.dip.t-dialin.net] has joined #go-nuts
18:36 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts
18:38 -!- tylerl [~tylerl@ip24-251-232-171.ph.ph.cox.net] has joined #go-nuts
18:38 -!- Ekspluati [5b9a0491@gateway/web/freenode/ip.91.154.4.145] has joined
#go-nuts
18:40 -!- Venom_X [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has
joined #go-nuts
18:42 -!- tncardoso [~thiago@189.59.202.188] has joined #go-nuts
18:42 -!- alehorst [~alehorst@201.47.10.119.dynamic.adsl.gvt.net.br] has joined
#go-nuts
18:49 -!- foocraft [~ewanas@78.101.84.219] has quit [Quit: if you're going....to
san.  fran.  cisco!!!]
18:52 -!- tncardoso [~thiago@189.59.202.188] has quit [Ping timeout: 250 seconds]
18:54 -!- Fish [~Fish@9fans.fr] has quit [Quit: So Long, and Thanks for All the
Fish]
18:54 -!- Fish [~Fish@9fans.fr] has joined #go-nuts
18:55 < allengeorge> BPEL as in Business Process Execution Language?
18:55 -!- tvw [~tv@e176002024.adsl.alicedsl.de] has joined #go-nuts
18:56 -!- Ekspluati [5b9a0491@gateway/web/freenode/ip.91.154.4.145] has quit [Ping
timeout: 252 seconds]
18:56 -!- markcol [~markcol@74.125.59.1] has quit [Quit: markcol]
18:58 -!- markcol [~markcol@74.125.59.1] has joined #go-nuts
19:00 -!- markcol [~markcol@74.125.59.1] has quit [Client Quit]
19:02 -!- eimantas [~eimantas@ip-212-52-52-163.kava.lt] has quit [Quit: eimantas]
19:03 < wrtp> anyone know of a nice simple algorithm for detecting that
there's not more than one shortest path of the same length between two nodes in a
directed graph?  O((n^2) * log(n)) is the best i've come up with
19:04 -!- tncardoso [~thiago@189.59.128.199.dynamic.adsl.gvt.net.br] has joined
#go-nuts
19:05 -!- ExsysTech [~ExsysTech@50-46-213-60.evrt.wa.frontiernet.net] has quit
[Read error: Connection reset by peer]
19:05 < wrtp> i.e.  actually that might be n^3 log(n) (i.e.  for each pair
of nodes in the network, run Dijkstra's algorithm)
19:05 < wrtp> s/i.e.//
19:06 -!- ExsysTech [~ExsysTech@50-46-213-60.evrt.wa.frontiernet.net] has joined
#go-nuts
19:08 -!- Venom_X [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has quit
[Read error: Operation timed out]
19:08 -!- markcol [~markcol@74.125.59.1] has joined #go-nuts
19:08 -!- Venom_X [~pjacobs@66.54.185.131] has joined #go-nuts
19:09 -!- tvw [~tv@e176002024.adsl.alicedsl.de] has quit [Read error: Connection
reset by peer]
19:10 -!- Ekspluati [5b9a0491@gateway/web/freenode/ip.91.154.4.145] has joined
#go-nuts
19:11 -!- nictuku [~nict@84-72-7-79.dclient.hispeed.ch] has joined #go-nuts
19:11 -!- nictuku [~nict@84-72-7-79.dclient.hispeed.ch] has quit [Changing host]
19:11 -!- nictuku [~nict@unaffiliated/nictuku] has joined #go-nuts
19:13 -!- zcram [~zcram@78-28-72-29.cdma.dyn.kou.ee] has joined #go-nuts
19:18 -!- iant [~iant@nat/google/x-irayamtasakyoqit] has quit [Quit: Leaving.]
19:22 -!- rutkowski [~adrian@078088205090.walbrzych.vectranet.pl] has quit [Quit:
WeeChat 0.3.3-dev]
19:27 -!- incluye [~inclooye@74.215.210.198] has joined #go-nuts
19:34 < chomp> wrtp, do you want to establish whether, for all pairs of
nodes, there's exactly one shortest path between them?
19:34 < chomp> or between two specific nodes
19:43 -!- wjlroe_ [~will@212.169.34.114] has joined #go-nuts
19:44 < wrtp> chomp: the former
19:44 < wjlroe_> How can I loop x times?  I can't do for _,_ :=
range(an_array) { }
19:45 < uriel> for i := 0; i < 3; i++ ...
19:45 < wjlroe_> oh ok
19:45 < wrtp> chomp: given the latter, i can implement it by checking for
all pairs of nodes, but that's not very efficient
19:46 < chomp> right
19:46 < chomp> out of curiosity, what's the application?
19:49 < wrtp> chomp: it's a hybrid scripting language, with types
19:49 -!- a2800276 [~a2800276@xdsl-84-44-228-230.netcologne.de] has quit [Ping
timeout: 260 seconds]
19:49 < wrtp> the user is allowed to specify a conversion between two types,
but it must not be ambiguous
19:49 < wrtp> i.e.  there must be at most one shortest path between any two
types
19:50 < chomp> floyd-warshall is n^3 and might be sufficient
19:51 < chomp> instead of only minimizing, also look for duplicate minimums
when updating edge costs
19:51 -!- tvw [~tv@e176002024.adsl.alicedsl.de] has joined #go-nuts
19:52 < wrtp> chomp: thanks
19:52 < wrtp> for the time being i think i'll stick with Dijkstra's for each
pair of nodes...
19:52 < chomp> it's really not that terrible to be n^3 logn :)
19:53 -!- a2800276 [~a2800276@xdsl-84-44-228-230.netcologne.de] has joined
#go-nuts
19:53 < wrtp> exactly
19:53 < wrtp> and there are unlikely to be that many types...  a factor of
log(n) won't make much difference
19:54 < wrtp> i was just wondering if there was a known algorithm that
directly addresses this issue
19:54 < chomp> yeah
19:54 < stest> okay, have a question which is probably rather basic.  In
something like Python, you can modify a list on the fly, aka: lst = []; lst[0]
='a'; lst[55] = 'b'
19:55 < stest> I need a container that I can dynamically add elements to
like that
19:55 < stest> I though I could do that with a vector via Set but even it
seems to need some kind of predefined size (it doesn't automatically resize
itself)
19:55 < stest> what am I looking for?
19:55 < chomp> a map?
19:56 -!- markcol [~markcol@74.125.59.1] has quit [Quit: markcol]
19:56 < chomp> or do you need ordering?
19:56 < stest> hmm.  I guess a map would work.  I'm not used to using it
like that in Python but that makes sense
19:56 < wrtp> stest: you can use append
19:56 < stest> chomp: I guess ordering isn't important, the map should work.
Thanks
19:56 < chomp> he's talking about sparse assignment though
19:56 < wrtp> oh yes, missed the 55
19:56 < chomp> hehe
19:57 -!- markcol [~markcol@74.125.59.1] has joined #go-nuts
20:02 -!- iant [~iant@nat/google/x-wkivtctsvdzikqfz] has joined #go-nuts
20:02 -!- mode/#go-nuts [+v iant] by ChanServ
20:04 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-182-93.clienti.tiscali.it] has
quit [Ping timeout: 276 seconds]
20:05 -!- Crnobog [~crnobog@cpc3-nmal12-0-0-cust48.croy.cable.virginmedia.com] has
joined #go-nuts
20:05 -!- sav [~lsd@peirce.xored.org] has joined #go-nuts
20:07 -!- tobym [~tobym@cpe-72-229-2-6.nyc.res.rr.com] has joined #go-nuts
20:08 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
20:12 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-151-91.clienti.tiscali.it] has
joined #go-nuts
20:13 -!- markcol [~markcol@74.125.59.1] has quit [Read error: Connection reset by
peer]
20:13 -!- markcol [~markcol@74.125.59.1] has joined #go-nuts
20:15 -!- wjlroe_ [~will@212.169.34.114] has quit [Quit: Computer has gone to
sleep]
20:16 -!- iant [~iant@nat/google/x-wkivtctsvdzikqfz] has quit [Quit: Leaving.]
20:26 -!- freetz [~fritz@bc-proxy-2.sandia.gov] has quit [Remote host closed the
connection]
20:26 -!- freetz [~fritz@bc-proxy-2.sandia.gov] has joined #go-nuts
20:27 < nictuku> so, my "Item" type contains the "Entity" type and therefore
also contains its methods.  Because interfaces are all about methods, Entity has
to have an Entity() method to make itself and other attributes available higher
up.
20:28 -!- willdye [~willdye@fern.dsndata.com] has joined #go-nuts
20:28 < nictuku> that creates a naming conflict between Entity type and
Entity() - a method that Item needs to provide.
20:29 < nictuku> the obvious solution is to make that method named
GetEntity() instead.
20:29 -!- tvw [~tv@e176002024.adsl.alicedsl.de] has quit [Ping timeout: 246
seconds]
20:29 < nictuku> which isn't very go-like, and frowned upon by the effective
Go doc.
20:29 -!- iant [~iant@nat/google/x-pmdsnjizukomdlgc] has joined #go-nuts
20:29 < nictuku> do you have any other suggestions?
20:29 -!- mode/#go-nuts [+v iant] by ChanServ
20:30 -!- kr [~Keith@204.14.152.118] has joined #go-nuts
20:30 < Crnobog> I'm very new to Go but I don't quite understand the purpose
of your Entity method
20:30 -!- willdye [~willdye@fern.dsndata.com] has left #go-nuts []
20:30 -!- bugQ [~bug@c-67-186-255-54.hsd1.ut.comcast.net] has quit [Ping timeout:
240 seconds]
20:31 < nictuku> Crnobog, one of the reasons is to make type Item implement
an interface that requires Entity()
20:31 -!- snearch [~snearch@f053003204.adsl.alicedsl.de] has joined #go-nuts
20:32 < nictuku> that is my interface so I have full control over it.  I'm
just unsure how to resolve the naming conflict without calling it GetEntity()
20:33 -!- iant [~iant@nat/google/x-pmdsnjizukomdlgc] has quit [Client Quit]
20:33 -!- alehorst [~alehorst@201.47.10.119.dynamic.adsl.gvt.net.br] has quit
[Quit: Leaving.]
20:35 -!- freetz [~fritz@bc-proxy-2.sandia.gov] has quit [Remote host closed the
connection]
20:35 -!- freetz [~fritz@bc-proxy-2.sandia.gov] has joined #go-nuts
20:38 -!- incluye [~inclooye@74.215.210.198] has left #go-nuts []
20:40 -!- snearch [~snearch@f053003204.adsl.alicedsl.de] has quit [Quit:
Verlassend]
20:41 < chomp> nictuku, do you have a test case you could paste somewhere?
20:41 < chomp> there's no reason why you should have a naming conflict
between an interface name and a function name
20:41 < chomp> so maybe i'm misunderstanding you
20:42 < nictuku> not the interface, but between a type and methods it
exposes
20:42 < chomp> again, do you have a test case
20:42 < chomp> what is an interface but a set of methods
20:43 < nictuku> set of methods != method ;-)
20:43 < chomp> i understand that, but that does not resolve the ambiguity
regarding your problem statement
20:43 < chomp> code would be awfully helpful
20:43 < nictuku> I can point you at the code, sure, but I'd like to simplify
this for your own sake.
20:45 < nictuku> the code in question is spread around
https://github.com/huin/chunkymonkey/blob/master/src/chunkymonkey/entity.go and
item.go and other files.
20:45 < nictuku> but I can try to summarize in pastie.org
20:49 -!- dlowe [~dlowe@ita4fw1.itasoftware.com] has quit [Quit: Leaving.]
20:50 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:84d9:d84:92e7:3aae] has quit
[Quit: Leaving.]
20:51 < nictuku> as I was writing a summary to pastie.org, I realized a way
to rewrite this.
20:51 < chomp> this doesnt look right anyway
20:53 -!- keithcascio [~keithcasc@nat/google/x-bpfbaompgnwqghof] has joined
#go-nuts
20:54 -!- TheMue [~TheMue@p5DDF5068.dip.t-dialin.net] has quit [Quit: TheMue]
20:56 -!- kevlar_work [~kevlar@unaffiliated/eko] has quit [Remote host closed the
connection]
21:00 -!- piranha [~piranha@5ED43A0B.cm-7-5a.dynamic.ziggo.nl] has quit [Quit:
Computer has gone to sleep.]
21:01 < wrtp> nictuku: you can do it by embedding another type which embeds
Entity
21:01 < wrtp> then there's no conflict as the method and the field are at
two different levels
21:02 < wrtp> i've used that technique before
21:02 < nictuku> wrtp, very good point!
21:02 < nictuku> I'll certainly need this later.  thanks wrtp
21:02 < wrtp> initialisation is a bit more awkward
21:02 < nictuku> in this case, the Entity type is useless
21:03 < nictuku> if it has only EntityId, we'll get rid of it.  thanks huin
for noticing ;-)
21:03 -!- wrtp [~rog@92.23.135.231] has quit [Quit: wrtp]
21:05 -!- Pathin [~root@gladsheim.nullbytestudios.net] has joined #go-nuts
21:06 -!- Pathin [~root@gladsheim.nullbytestudios.net] has quit [Read error:
Connection reset by peer]
21:07 -!- danilo04 [~danilo04@66.44.228.140] has joined #go-nuts
21:08 -!- Nitro [~Nitro@unaffiliated/nitro] has quit [Ping timeout: 248 seconds]
21:08 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-151-91.clienti.tiscali.it] has
quit [Quit: E se abbasso questa leva che succ...]
21:08 -!- Pathin [~root@gladsheim.nullbytestudios.net] has joined #go-nuts
21:09 < huin> i must say that expvar package produces much more readable
output now that it doesn't double-JSON encode the memstats
21:09 -!- Pathin [~root@gladsheim.nullbytestudios.net] has quit [Read error:
Connection reset by peer]
21:10 -!- noam [noam@87.69.42.61.cable.012.net.il] has quit [Ping timeout: 244
seconds]
21:11 -!- Pathin [~root@gladsheim.nullbytestudios.net] has joined #go-nuts
21:12 -!- Pathin [~root@gladsheim.nullbytestudios.net] has quit [Read error:
Connection reset by peer]
21:13 -!- Pathin [~root@gladsheim.nullbytestudios.net] has joined #go-nuts
21:13 -!- Pathin [~root@gladsheim.nullbytestudios.net] has quit [Read error:
Connection reset by peer]
21:14 -!- Pathin [~root@gladsheim.nullbytestudios.net] has joined #go-nuts
21:16 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has quit [Quit:
Geek insinde®]
21:16 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Ping timeout: 248
seconds]
21:16 -!- noam [noam@87.69.42.61.cable.012.net.il] has joined #go-nuts
21:20 -!- DeedleFake [~Deedles@c-98-251-36-162.hsd1.ga.comcast.net] has joined
#go-nuts
21:20 -!- virtualsue [~chatzilla@nat/cisco/x-ddhcgbghedtciilx] has quit [Quit:
ChatZilla 0.9.86.1 [Firefox 4.0.1/20110413222027]]
21:24 -!- ExtraSpice [XtraSpice@78-57-204-104.static.zebra.lt] has quit [Read
error: Connection reset by peer]
21:24 -!- Fish [~Fish@9fans.fr] has quit [Quit: So Long, and Thanks for All the
Fish]
21:26 -!- DeedleFake [~Deedles@c-98-251-36-162.hsd1.ga.comcast.net] has quit
[Quit: Ex-Chat]
21:27 -!- tylerl [~tylerl@ip24-251-232-171.ph.ph.cox.net] has quit [Quit: leaving]
21:32 -!- pharris [~Adium@rhgw.opentext.com] has quit [Quit: Leaving.]
21:34 -!- hargettp [~hargettp@pool-71-184-185-93.bstnma.east.verizon.net] has
joined #go-nuts
21:34 -!- rlab [~Miranda@91.200.158.34] has quit [Quit: Miranda IM! Smaller,
Faster, Easier.  http://miranda-im.org]
21:40 -!- awidegreen [~quassel@h-170-226.A212.priv.bahnhof.se] has quit [Remote
host closed the connection]
21:46 -!- goer [60e23002@gateway/web/freenode/ip.96.226.48.2] has joined #go-nuts
21:46 -!- Ekspluati [5b9a0491@gateway/web/freenode/ip.91.154.4.145] has quit [Ping
timeout: 252 seconds]
21:47 < goer> Hi, i could get this one working.
http://pastebin.com/d5SyWk8p can someone help me out
21:47 < goer> i don't understand why it isn't printing out the output
21:47 < str1ngs> goer: it never blocks
21:48 < str1ngs> basically it exits before it can do anything
21:48 < goer> is that being optimized away by the compiler?
21:48 < str1ngs> no
21:48 < str1ngs> see above
21:48 < chomp> no, it will spawn 10 goroutines and then main will end and
terminate the process before the goroutines begin executing
21:49 < chomp> the process will not automatically wait on goroutines to
finish
21:49 < goer> do i have to make a channel and wait for it until all
goroutines are completed?
21:50 < str1ngs> that is the normal way.  but wait group is probably more
effective here
21:50 < str1ngs> goer: is this an exercise in learning go?
21:51 < goer> str1ngs: i am learning goroutines and channels.
21:51 < str1ngs> goer: ok do not use a waitgroup for now
21:52 < goer> waitgroups are interesting.  Where can i find more information
about them?
21:52 < str1ngs> sync package
21:52 < goer> ok thanks str1ngs
21:53 -!- huin [~huin@91.85.171.238] has quit [Quit: bedtimes]
21:53 < str1ngs> the reason a waitgroup is good here is because you just add
to the group ever loop.  then Done() in the goroutine and outside you block with
Wait()
21:53 < str1ngs> will not help with you learning goroutines though
21:53 < goer> yes, looks much simpler in this case.
21:55 < str1ngs> for channles in this regard you make one channel outside
the loop.  change the value of the loop when the goroutine is done . the read the
chanel for the loop count to block
21:55 -!- tncardoso [~thiago@189.59.128.199.dynamic.adsl.gvt.net.br] has quit
[Quit: bye]
21:55 < str1ngs> I'll rework your example
21:57 < goer> thanks str1ngs
21:57 < goer> also i noticed that while using the loop variable inside a
goroutine.  The value is always the max value.
21:57 -!- tncardoso [~thiago@189.59.128.199.dynamic.adsl.gvt.net.br] has joined
#go-nuts
21:57 < str1ngs> https://gist.github.com/992096
21:57 < goer> unless i assign a new variable with the loop index value
inside the loop
21:58 < str1ngs> goer: thats a common gotcha with closures
21:58 < str1ngs> what you want to do is pass the value to the closure
21:59 -!- GeertJohan [~Squarc@D978EC5D.cm-3-1d.dynamic.ziggo.nl] has quit [Quit:
Leaving.]
21:59 < goer> yes.
22:00 < goer> The order of groutiness seems to me consistent no matter how
many times i run the program.  Is this how they are supposed to be?
22:00 < str1ngs> goer: http://popalg.org/go-variable-binding-inline-func
22:01 < goer> Ex: the output is always constant.
22:01 < str1ngs> should explain the closure issue for you
22:01 < chomp> goer, goroutines that do more complex things will typically
not exhibit such consistent behavior.  it has to do with how and when goroutines
yield the cpu afaik
22:02 < goer> makes sense.  Thanks chomp
22:02 < chomp> something like on syscalls, allocation, or an explicit yield
22:02 -!- boscop_ [~boscop@g227006223.adsl.alicedsl.de] has joined #go-nuts
22:02 < chomp> so for example go func() { for{} }() will never yield the cpu
22:03 < goer> yes
22:03 -!- boscop [~boscop@g227006223.adsl.alicedsl.de] has quit [Ping timeout: 250
seconds]
22:03 -!- iant [~iant@nat/google/x-obkszntyezawmnfr] has joined #go-nuts
22:03 -!- mode/#go-nuts [+v iant] by ChanServ
22:04 -!- photron [~photron@port-92-201-118-189.dynamic.qsc.de] has quit [Ping
timeout: 250 seconds]
22:05 -!- freetz [~fritz@bc-proxy-2.sandia.gov] has quit [Ping timeout: 260
seconds]
22:06 -!- hargettp [~hargettp@pool-71-184-185-93.bstnma.east.verizon.net] has quit
[Quit: Leaving...]
22:06 <@adg> uriel: it is, http://code.google.com/more/#google-opensource
22:08 -!- hargettp [~hargettp@pool-71-184-185-93.bstnma.east.verizon.net] has
joined #go-nuts
22:09 -!- stest [~tester@66.180.123.47] has quit [Quit: ChatZilla 0.9.86.1
[Firefox 3.6.15/20110303024726]]
22:10 -!- hargettp [~hargettp@pool-71-184-185-93.bstnma.east.verizon.net] has quit
[Client Quit]
22:12 -!- hargettp [~hargettp@pool-71-184-185-93.bstnma.east.verizon.net] has
joined #go-nuts
22:12 -!- a2800276 [~a2800276@xdsl-84-44-228-230.netcologne.de] has quit [Ping
timeout: 244 seconds]
22:14 -!- chomp [~chomp@dap-209-166-184-50.pri.tnt-3.pgh.pa.stargate.net] has quit
[Quit: Leaving]
22:15 < ebering> why does 6g output complier errors to standard out instead
of standard error
22:15 < ebering> this makes it not play nice with redo by default
22:16 -!- r_linux [~r_linux@smtp.mandique.com.br] has quit [Ping timeout: 276
seconds]
22:17 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit:
Verlassend]
22:23 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has quit [Ping
timeout: 246 seconds]
22:24 -!- ptolomy [~consalus@nat/google/x-akcmexgihlcxbhyc] has joined #go-nuts
22:25 -!- ptolomy [~consalus@nat/google/x-akcmexgihlcxbhyc] has quit [Client Quit]
22:28 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has joined #go-nuts
22:29 -!- Venom_X_ [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has
joined #go-nuts
22:30 -!- Nitro [~Nitro@unaffiliated/nitro] has joined #go-nuts
22:31 -!- markcol [~markcol@74.125.59.1] has quit [Quit: markcol]
22:31 -!- Venom_X [~pjacobs@66.54.185.131] has quit [Ping timeout: 246 seconds]
22:32 -!- hargettp [~hargettp@pool-71-184-185-93.bstnma.east.verizon.net] has quit
[Quit: Leaving...]
22:34 -!- markcol [~markcol@74.125.59.1] has joined #go-nuts
22:35 -!- wallerdev [~wallerdev@c-68-60-43-43.hsd1.mi.comcast.net] has quit [Quit:
wallerdev]
22:36 -!- bugQ [~bug@c-67-186-255-54.hsd1.ut.comcast.net] has joined #go-nuts
22:37 -!- angasule [~angasule@190.2.33.49] has quit [Read error: Connection reset
by peer]
22:37 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts
22:40 -!- danilo04 [~danilo04@66.44.228.140] has quit [Ping timeout: 240 seconds]
22:41 -!- angasule [~angasule@190.2.33.49] has quit [Client Quit]
22:42 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts
22:43 -!- Ekspluati [5b9a0491@gateway/web/freenode/ip.91.154.4.145] has joined
#go-nuts
22:48 -!- jfalcon [~jfalcon@c-67-189-144-224.hsd1.ma.comcast.net] has joined
#go-nuts
22:48 < jfalcon> what is the difference between go anonymous functions and
scheme's lambda?
22:51 -!- tobym [~tobym@cpe-72-229-2-6.nyc.res.rr.com] has quit [Ping timeout: 252
seconds]
22:55 -!- markcol [~markcol@74.125.59.1] has quit [Quit: markcol]
22:55 -!- markcol [~markcol@74.125.59.1] has joined #go-nuts
23:05 < ebering> jfalcon: lambdas have no type information attached to them
23:05 < jfalcon> ebering: is that the only difference?
23:08 < ebering> that I have noticed.  there may be implementation details
under the hood, but they are both lexically scoped and first-class types
23:09 < jfalcon> cool.  thanks, ebering.
23:09 -!- foocraft [~ewanas@78.101.84.219] has joined #go-nuts
23:13 -!- Ekspluati [5b9a0491@gateway/web/freenode/ip.91.154.4.145] has quit [Ping
timeout: 252 seconds]
23:16 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
23:17 -!- dfc [~dfc@eth59-167-133-99.static.internode.on.net] has joined #go-nuts
23:17 -!- iant [~iant@nat/google/x-obkszntyezawmnfr] has quit [Quit: Leaving.]
23:22 -!- wallerdev [~wallerdev@c-68-60-43-43.hsd1.mi.comcast.net] has joined
#go-nuts
23:23 -!- wallerdev [~wallerdev@c-68-60-43-43.hsd1.mi.comcast.net] has quit
[Client Quit]
23:24 -!- addos [621a7075@gateway/web/freenode/ip.98.26.112.117] has quit [Ping
timeout: 252 seconds]
23:27 -!- allengeorge [~allengeor@c-24-7-17-50.hsd1.ca.comcast.net] has quit
[Quit: allengeorge]
23:32 -!- iant [~iant@66.109.103.84] has joined #go-nuts
23:32 -!- mode/#go-nuts [+v iant] by ChanServ
23:46 -!- tncardoso [~thiago@189.59.128.199.dynamic.adsl.gvt.net.br] has quit
[Quit: bye]
23:48 -!- Venom_X [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has quit
[Quit: Venom_X]
23:48 -!- jarsen [~jarsen@76.8.206.34] has joined #go-nuts
23:57 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has joined
#go-nuts
--- Log closed Thu May 26 00:00:51 2011