--- Log opened Thu Apr 28 00:00:50 2011 00:02 -!- m4dh4tt3r1 [~Adium@c-98-210-145-213.hsd1.ca.comcast.net] has joined #go-nuts 00:03 -!- dropdrive [~dropdrive@cpe-72-227-159-70.nyc.res.rr.com] has quit [Ping timeout: 248 seconds] 00:05 -!- m4dh4tt3r [~Adium@c-98-210-145-213.hsd1.ca.comcast.net] has quit [Ping timeout: 276 seconds] 00:06 -!- kr [~Keith@204.14.152.118] has left #go-nuts ["WeeChat 0.3.2"] 00:13 -!- dropdrive [~dropdrive@cpe-72-227-159-70.nyc.res.rr.com] has joined #go-nuts 00:14 -!- nkdnstbr [~nkdnstbr@cpe-173-172-231-83.rgv.res.rr.com] has quit [Quit: Lost terminal] 00:19 -!- zeroXten [~zeroXten@0x10.co.uk] has quit [Read error: Operation timed out] 00:19 -!- nkdnstbr [~nkdnstbr@cpe-173-172-231-83.rgv.res.rr.com] has joined #go-nuts 00:20 -!- zeroXten [~zeroXten@0x10.co.uk] has joined #go-nuts 00:20 -!- grncdr [~stephen@sdo.csc.UVic.CA] has quit [Ping timeout: 248 seconds] 00:22 -!- grncdr [~stephen@sdo.csc.UVic.CA] has joined #go-nuts 00:31 -!- dfc [~dfc@eth59-167-133-99.static.internode.on.net] has joined #go-nuts 00:40 -!- l00t [~i-i3id3r_@20150129006.user.veloxzone.com.br] has joined #go-nuts 00:41 -!- imsplitbit [~imsplitbi@12.43.172.109] has joined #go-nuts 00:51 -!- artefon [~thiago@189.59.207.132] has quit [Quit: bye] 00:51 -!- artefon [~thiago@189.59.207.132] has joined #go-nuts 00:52 -!- artefon [~thiago@189.59.207.132] has quit [Client Quit] 00:54 -!- iant [~iant@66.109.105.216] has quit [Quit: Leaving.] 00:54 -!- foocraft [~dsc@dyn-86-36-41-74.wv.qatar.cmu.edu] has quit [Ping timeout: 258 seconds] 00:58 -!- imsplitbit [~imsplitbi@12.43.172.109] has quit [Quit: Leaving...] 01:01 -!- Venom_X [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has quit [Quit: Venom_X] 01:03 -!- mikespook1 [~mikespook@116.21.155.220] has joined #go-nuts 01:04 -!- boscop_ [~boscop@g230111227.adsl.alicedsl.de] has joined #go-nuts 01:05 -!- ShadowIce` [~pyoro@unaffiliated/shadowice-x841044] has quit [Ping timeout: 260 seconds] 01:05 -!- mikespook [~mikespook@183.47.230.163] has quit [Ping timeout: 276 seconds] 01:06 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts 01:06 -!- mikespook1 [~mikespook@116.21.155.220] has quit [Client Quit] 01:07 -!- boscop [~boscop@g225193090.adsl.alicedsl.de] has quit [Ping timeout: 250 seconds] 01:11 -!- mikespook [~mikespook@116.21.155.220] has joined #go-nuts 01:17 -!- foocraft [~dsc@dyn-86-36-41-74.wv.qatar.cmu.edu] has joined #go-nuts 01:37 -!- imsplitbit [~imsplitbi@12.43.172.10] has joined #go-nuts 01:40 -!- niemeyer [~niemeyer@189-10-219-9.pltce701.dsl.brasiltelecom.net.br] has joined #go-nuts 01:48 -!- gtaylor [~gtaylor@99-5-124-9.lightspeed.gnvlsc.sbcglobal.net] has joined #go-nuts 01:50 -!- angasule [~angasule@190.2.33.49] has quit [Remote host closed the connection] 01:52 -!- a2800276_ [~a2800276@xdsl-195-14-206-212.netcologne.de] has joined #go-nuts 01:55 -!- a2800276 [~a2800276@xdsl-213-196-209-176.netcologne.de] has quit [Ping timeout: 260 seconds] 01:55 -!- vsayer [~vivek@c-67-170-236-166.hsd1.ca.comcast.net] has quit [Read error: Connection reset by peer] 01:55 -!- fmoo [~Adium@66.220.144.74] has quit [Ping timeout: 260 seconds] 02:01 -!- fmoo [~Adium@66.220.144.74] has joined #go-nuts 02:05 -!- vsayer [~vivek@c-67-170-236-166.hsd1.ca.comcast.net] has joined #go-nuts 02:08 -!- drteeth [~drteeth@173.230.160.81] has joined #go-nuts 02:13 -!- m4dh4tt3r1 [~Adium@c-98-210-145-213.hsd1.ca.comcast.net] has quit [Quit: Leaving.] 02:14 -!- gregschlom [~quassel@118.68.165.201] has joined #go-nuts 02:14 -!- niemeyer [~niemeyer@189-10-219-9.pltce701.dsl.brasiltelecom.net.br] has quit [Ping timeout: 240 seconds] 02:15 -!- jarsen [~jarsen@76.8.206.217] has joined #go-nuts 02:15 -!- sjansen [~sjansen@ip65-44-231-178.z231-44-65.customer.algx.net] has quit [Quit: The lesson here is that dreams inevitably lead to hideous implosions.] 02:25 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts 02:28 -!- exch [~exch@31-151-123-254.dynamic.upc.nl] has quit [Read error: Operation timed out] 02:29 -!- jarsen [~jarsen@76.8.206.217] has quit [Remote host closed the connection] 02:29 -!- jeremy_c_ [~jeremy@cowgar.com] has joined #go-nuts 02:30 < jeremy_c_> Where can I learn about using C code in Go? 02:32 < vsmatck> jeremy_c: http://golang.org/cmd/cgo/ 02:32 < zanget> also http://blog.golang.org/2011/03/c-go-cgo.html 02:34 < jeremy_c_> vsmatck: zanget thanks for the pointers. I have got a base project running by looking at other examples I use (sqlite) but am to the point I need some more details. Will go read the URLs provided now. 02:37 -!- exch [~exch@212.187.74.149] has joined #go-nuts 02:38 < skelterjohn> in $GOROOT/misc/cgo there are some examples 02:40 -!- enferex [~enferex@users.757.org] has joined #go-nuts 02:45 -!- foocraft [~dsc@dyn-86-36-41-74.wv.qatar.cmu.edu] has quit [Quit: Leaving] 03:05 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has joined #go-nuts 03:12 -!- drteeth [~drteeth@173.230.160.81] has quit [Remote host closed the connection] 03:17 < plexdev> http://is.gd/XIXMSa by [Andrew Gerrand] in go/src/pkg/mime/multipart/ -- mime/multipart: add ReadForm and associated types 03:27 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has quit [Ping timeout: 250 seconds] 03:29 -!- JusticeFries [~JusticeFr@173-8-247-218-Colorado.hfc.comcastbusiness.net] has quit [Read error: Connection reset by peer] 03:30 -!- JusticeFries [~JusticeFr@173-8-247-218-Colorado.hfc.comcastbusiness.net] has joined #go-nuts 03:35 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Quit: Leaving] 03:35 < plexdev> http://is.gd/5pQRbs by [Russ Cox] in go/src/pkg/runtime/ -- runtime: allow use of >512 MB on 32-bit platforms 03:35 < plexdev> http://is.gd/RV61Zh by [Russ Cox] in 7 subdirs of go/src/ -- cgo: handle versioned ELF symbols 03:35 < plexdev> http://is.gd/mzXnNy by [Russ Cox] in 4 subdirs of go/src/pkg/runtime/ -- runtime: stack split + garbage collection bug 03:37 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|] 03:37 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has joined #go-nuts 03:37 -!- mode/#go-nuts [+v iant] by ChanServ 03:37 < vsmatck> Serious bug there. 03:38 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts 03:39 -!- m4dh4tt3r [~Adium@70-36-141-162.dsl.dynamic.sonic.net] has joined #go-nuts 03:40 -!- fmoo [~Adium@66.220.144.74] has quit [Quit: Leaving.] 03:41 -!- res99 [~anonymous@201.237.130.70] has quit [Quit: res99] 03:41 -!- JusticeFries [~JusticeFr@173-8-247-218-Colorado.hfc.comcastbusiness.net] has quit [Read error: Operation timed out] 03:45 -!- dj2 [~dj2@CPE001f5b35feb4-CM0014048e0344.cpe.net.cable.rogers.com] has joined #go-nuts 03:49 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has quit [Ping timeout: 240 seconds] 03:49 -!- nkdnstbr [~nkdnstbr@cpe-173-172-231-83.rgv.res.rr.com] has quit [Ping timeout: 260 seconds] 03:50 -!- iant [~iant@216.239.45.130] has joined #go-nuts 03:50 -!- mode/#go-nuts [+v iant] by ChanServ 03:53 -!- foocraft [~dsc@178.152.90.236] has joined #go-nuts 03:56 -!- ExtraSpice [XtraSpice@88.118.35.153] has joined #go-nuts 03:57 < vsmatck> Reflect sure sucks a lot less now. :) 03:58 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts 03:59 -!- fmoo [~Adium@c-76-102-41-101.hsd1.ca.comcast.net] has joined #go-nuts 04:01 < vsmatck> bah, I wish I could program go all day. 04:01 < vsmatck> I have to do BASIC programming tomorrow at work. :-/ 04:04 < scyth> :) 04:04 < scyth> yeah, go is fun :) 04:07 <+iant> really? BASIC? 04:07 < vsmatck> Industrial programming. The land the software engineering forgot. 04:08 < jeremy_c_> vb, realbasic are in high use. basic, basic I'd say is gone :-) 04:08 < scyth> the only frustrating thing I find with go is that it tells us "there it is. A near perfect language. Now it's up to you to build something and not complain about language itself.", and being creative is somewhat hard :) 04:08 -!- dj2 [~dj2@CPE001f5b35feb4-CM0014048e0344.cpe.net.cable.rogers.com] has left #go-nuts [] 04:08 < vsmatck> This one is called ArcBasic. 04:09 < vsmatck> Dunno anything about it. Gotta learn it tomorrow. 04:09 < vsmatck> scyth: hah, what a terrible problem. 04:09 < jeremy_c_> huh, ArcBasic = pvc coated raincoat :-D 04:09 < scyth> :) 04:12 -!- mbejar [~mbejar@80.174.196.32.dyn.user.ono.com] has joined #go-nuts 04:14 < vsmatck> oh AcroBasic, not ArcBasic. Knew it started with an A. 04:18 -!- rejb [~rejb@unaffiliated/rejb] has quit [Disconnected by services] 04:18 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts 04:22 < plexdev> http://is.gd/K0Ctde by [Lorenzo Stoakes] in 2 subdirs of go/ -- gc: correctly handle fields of pointer type to recursive forward references 04:22 < plexdev> http://is.gd/VhbZKJ by [Russ Cox] in go/src/pkg/runtime/ -- runtime: fix typo in gc bug fix 04:22 -!- ios_ [~ios@180.191.93.28] has joined #go-nuts 04:22 -!- ios_ [~ios@180.191.93.28] has left #go-nuts [] 04:25 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts 04:30 -!- gtaylor [~gtaylor@99-5-124-9.lightspeed.gnvlsc.sbcglobal.net] has quit [Quit: gtaylor] 04:39 < plexdev> http://is.gd/pr8drI by [Brad Fitzpatrick] in go/src/pkg/hash/adler32/ -- adler32: speed up ~40% by avoiding bounds checks 04:40 -!- matti_ [~mumboww@c-24-6-22-101.hsd1.ca.comcast.net] has joined #go-nuts 04:40 < matti_> hi guys 04:40 -!- gedevan [~gedevan@83.167.106.253] has quit [Ping timeout: 276 seconds] 04:40 < matti_> is there a way to suppress the single-value context error? 04:41 < matti_> i.e. if function has multiple return values, but i am sure that i dont want to use the 2nd return value which is typically just for errors 04:41 <+iant> a, _ = fn() 04:41 < matti_> i just want to do something like "first string" + fn() + "second string" 04:42 < matti_> but fn() throws an error since it's supposed to have 2 return values 04:42 <+iant> doesn't work like that, sorry 04:42 < matti_> oh ok 04:42 < matti_> the weird thing tho 04:42 <+iant> use a variable or "first string" + func() string { a, _ = fn(); return a }() + "second string" 04:43 < matti_> is that it sometimes works? 04:43 <+iant> it shouldn't 04:43 < matti_> but only when i am setting the value to a map 04:43 < matti_> for example if i do 04:43 < matti_> hashmap["key"] = fn() + "first string" 04:43 < matti_> no compile error is thrown 04:44 < matti_> but if i do "first string" + fn() + "second string", it fails 04:44 * vsmatck tries 04:45 <+iant> I can't recreate that, do you have a complete test case? 04:45 < matti_> hashmap["key"] = "first string" + fn() + "second string" works as well 04:45 < matti_> yep 04:46 < matti_> let me put it in a paste bin for you guys 04:46 < matti_> give me one sec 04:46 < vsmatck> I can't reproduce. 04:46 -!- benjack [~benjack@bb121-6-49-43.singnet.com.sg] has joined #go-nuts 04:53 -!- edsrzf [~edsrzf@122-61-221-144.jetstream.xtra.co.nz] has joined #go-nuts 04:54 < matti_> um doh 04:54 < matti_> i had a bug 04:54 * matti_ slaps forehead 04:54 < matti_> you guys are right 04:55 < jeremy_c_> Is it possible to pass the address of a Go function to a C library that will later call that function? 04:55 <+iant> jeremy_c_: no, at least not when using 6g 04:55 <+iant> the calling conventions are different 04:56 < jeremy_c_> 8g? 04:56 <+iant> same 04:57 < jeremy_c_> same as in the calling conventions are different? 04:57 <+iant> 8g is the same as 6g in this regard 04:57 <+iant> in neither case can you pass the address of a Go function to a C library 04:58 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts 04:58 < jeremy_c_> There has to be some way, as people have wrapped Gtk, presumably with the ability to respond to a button click with a Go function? 04:59 <+iant> you can do callbacks to specific Go functions 04:59 <+iant> what you can't do is pass a pointer 05:00 < jeremy_c_> So, I would have to setup a callback point in my app, then from that callback point call various Go functions. Hm. Is there a doc or clear example on how to give a callback to a specific Go function? 05:01 <+iant> when using cgo, see misc/cgo/life; when using swig, see misc/swig/callback 05:01 < jeremy_c_> iant: thanks. 05:05 -!- lk [5b9a092a@gateway/web/freenode/ip.91.154.9.42] has joined #go-nuts 05:07 -!- nkdnstbr [~nkdnstbr@cpe-173-172-231-83.rgv.res.rr.com] has joined #go-nuts 05:08 -!- jeremy_c_ [~jeremy@cowgar.com] has quit [Quit: bed time] 05:09 -!- mbejar [~mbejar@80.174.196.32.dyn.user.ono.com] has quit [Ping timeout: 250 seconds] 05:19 -!- fmoo [~Adium@c-76-102-41-101.hsd1.ca.comcast.net] has quit [Quit: Leaving.] 05:20 -!- gregschlom [~quassel@118.68.165.201] has quit [Ping timeout: 260 seconds] 05:21 -!- Niedar [~bleh@ip68-99-166-222.hr.hr.cox.net] has quit [Read error: Connection reset by peer] 05:23 -!- fmoo [~Adium@c-76-102-41-101.hsd1.ca.comcast.net] has joined #go-nuts 05:24 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has quit [Ping timeout: 260 seconds] 05:26 < plexdev> http://is.gd/rRVDe7 by [Andrew Gerrand] in go/src/pkg/http/ -- http: add MultipartForm, FormFile, and ParseMultipartForm to Request 05:27 -!- rlab [~Miranda@91.200.158.34] has quit [Read error: Connection reset by peer] 05:46 -!- lk [5b9a092a@gateway/web/freenode/ip.91.154.9.42] has left #go-nuts [] 05:50 -!- Kafo [~Henry@a91-154-9-42.elisa-laajakaista.fi] has joined #go-nuts 05:51 -!- m4dh4tt3r [~Adium@70-36-141-162.dsl.dynamic.sonic.net] has quit [Quit: Leaving.] 05:54 -!- eikenberry [~jae@ivanova.zhar.net] has quit [Quit: End of line.] 05:56 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Ping timeout: 252 seconds] 05:57 -!- nkdnstbr [~nkdnstbr@cpe-173-172-231-83.rgv.res.rr.com] has quit [Ping timeout: 248 seconds] 06:00 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:75cc:3bc1:916d:bd5c] has joined #go-nuts 06:01 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has joined #go-nuts 06:03 -!- aho [~nya@fuld-590c70b0.pool.mediaWays.net] has joined #go-nuts 06:05 -!- venk [~user@203.111.33.203] has joined #go-nuts 06:05 -!- vpit3833 [~user@203.111.33.203] has quit [Remote host closed the connection] 06:10 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts 06:19 -!- petrux [~petrux@host16-224-static.53-82-b.business.telecomitalia.it] has joined #go-nuts 06:19 -!- sacho [~sacho@95-42-105-75.btc-net.bg] has joined #go-nuts 06:19 -!- ab3 [~abe@83.101.90.66] has quit [Ping timeout: 240 seconds] 06:23 -!- piranha [~piranha@5ED43A0B.cm-7-5a.dynamic.ziggo.nl] has joined #go-nuts 06:24 -!- imsplitbit [~imsplitbi@12.43.172.10] has quit [Quit: Bye!] 06:24 -!- a2800276 [~a2800276@xdsl-195-14-206-212.netcologne.de] has quit [Quit: a2800276] 06:29 -!- B0rder [~B0rder@114.246.82.120] has joined #go-nuts 06:35 -!- Soultaker [~Soultaker@hell.student.utwente.nl] has quit [Ping timeout: 276 seconds] 06:36 -!- Soultaker [~Soultaker@hell.student.utwente.nl] has joined #go-nuts 06:38 < dfc> now, we find out if tav's bot will go bonkers 06:38 -!- piranha [~piranha@5ED43A0B.cm-7-5a.dynamic.ziggo.nl] has quit [Quit: Computer has gone to sleep.] 06:43 < plexdev> http://is.gd/OjUxg1 by [Andrew Gerrand] in 2 subdirs of go/ -- weekly.2011-04-27 06:43 < plexdev> http://is.gd/5dYzan by [Andrew Gerrand] in go/ -- tag weekly.2011-04-27 06:48 -!- Soultaker [~Soultaker@hell.student.utwente.nl] has quit [Ping timeout: 240 seconds] 06:49 -!- mikespook [~mikespook@116.21.155.220] has quit [Quit: Leaving.] 06:52 < fzzbt> when new stable release 06:53 < dfc> adg just tagged the weekly 06:53 < dfc> i would think that if no clangers are found in a few days 06:53 < dfc> it'll become the new 'release' (ie, stable) 06:56 -!- Soultaker [~Soultaker@hell.student.utwente.nl] has joined #go-nuts 07:05 -!- MX80 [~MX80@cust151.253.117.74.dsl.g3telecom.net] has quit [Ping timeout: 240 seconds] 07:06 -!- MX80 [~MX80@cust151.253.117.74.dsl.g3telecom.net] has joined #go-nuts 07:10 -!- gregschlom [~quassel@118.68.165.201] has joined #go-nuts 07:12 -!- virtualsue [~chatzilla@nat/cisco/x-ywbkgwvmerqkrtom] has joined #go-nuts 07:15 -!- piranha [~piranha@D57D1AB3.static.ziggozakelijk.nl] has joined #go-nuts 07:15 < plexdev> http://is.gd/WN0TZw by [Evan Shaw] in 3 subdirs of go/src/pkg/http/ -- http: add Header.Write method 07:16 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|] 07:16 -!- Soultaker [~Soultaker@hell.student.utwente.nl] has quit [Ping timeout: 260 seconds] 07:17 -!- Soultaker [~Soultaker@130.89.161.226] has joined #go-nuts 07:18 -!- gregschlom_ [~quassel@118.68.165.201] has joined #go-nuts 07:19 -!- gregschlom [~quassel@118.68.165.201] has quit [Ping timeout: 276 seconds] 07:27 -!- fzzbt [~jahman@melkinpaasi.cs.helsinki.fi] has quit [Remote host closed the connection] 07:27 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has quit [Ping timeout: 248 seconds] 07:31 -!- foocraft [~dsc@178.152.90.236] has quit [Ping timeout: 276 seconds] 07:33 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Remote host closed the connection] 07:38 -!- mbejar [~mbejar@80.174.196.32.dyn.user.ono.com] has joined #go-nuts 07:38 -!- Innominate [~sirrobin@cpe-076-182-074-143.nc.res.rr.com] has quit [Ping timeout: 276 seconds] 07:40 -!- dfc [~dfc@eth59-167-133-99.static.internode.on.net] has quit [Ping timeout: 276 seconds] 07:48 -!- Soultaker [~Soultaker@130.89.161.226] has quit [Ping timeout: 260 seconds] 07:50 -!- Innominate [~sirrobin@76.182.74.143] has joined #go-nuts 07:51 -!- gregschlom [~quassel@118.68.165.201] has joined #go-nuts 07:52 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has joined #go-nuts 07:53 -!- gregschlom_ [~quassel@118.68.165.201] has quit [Ping timeout: 260 seconds] 07:58 -!- piranha [~piranha@D57D1AB3.static.ziggozakelijk.nl] has quit [Ping timeout: 250 seconds] 07:59 -!- B0rder [~B0rder@114.246.82.120] has quit [Ping timeout: 252 seconds] 08:01 -!- anticw [~anticw@c-67-169-68-180.hsd1.ca.comcast.net] has quit [Ping timeout: 246 seconds] 08:02 -!- B0rder [~B0rder@114.246.82.120] has joined #go-nuts 08:03 -!- B0rder [~B0rder@114.246.82.120] has quit [Max SendQ exceeded] 08:03 -!- B0rder [~B0rder@114.246.101.75] has joined #go-nuts 08:05 -!- fzzbt [~jahman@melkinpaasi.cs.helsinki.fi] has joined #go-nuts 08:05 -!- piranha [~piranha@D57D1AB3.static.ziggozakelijk.nl] has joined #go-nuts 08:08 -!- leczb [~leczb@nat/google/x-dfxgrmoxwmmfgytl] has joined #go-nuts 08:08 -!- anticw [~anticw@67.169.68.180] has joined #go-nuts 08:13 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has quit [Ping timeout: 250 seconds] 08:16 -!- huin [~huin@91.84.64.19] has joined #go-nuts 08:16 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts 08:17 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has joined #go-nuts 08:18 -!- napsy [~luka@193.2.66.6] has joined #go-nuts 08:24 -!- wrtp [~rog@92.17.70.99] has joined #go-nuts 08:25 -!- GeertJohan [~Squarc@D978EC5D.cm-3-1d.dynamic.ziggo.nl] has joined #go-nuts 08:30 -!- B0rder [~B0rder@114.246.101.75] has quit [Ping timeout: 248 seconds] 08:40 -!- B0rder [~B0rder@114.246.82.120] has joined #go-nuts 08:49 -!- Innominate [~sirrobin@76.182.74.143] has quit [Ping timeout: 260 seconds] 08:50 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has quit [Ping timeout: 260 seconds] 08:50 -!- Innominate [~sirrobin@cpe-076-182-074-143.nc.res.rr.com] has joined #go-nuts 08:51 -!- Innominate [~sirrobin@cpe-076-182-074-143.nc.res.rr.com] has quit [Remote host closed the connection] 08:53 -!- Innominate [~sirrobin@cpe-076-182-074-143.nc.res.rr.com] has joined #go-nuts 08:59 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has joined #go-nuts 09:00 -!- wjlroe [~will@78-86-14-131.zone2.bethere.co.uk] has joined #go-nuts 09:03 < wjlroe> http://pastie.org/1842657 <- I'm getting "multiple-value filepath.Glob() in single-value context" for line 3 of that snippet and "too many arguments in call to os.Open" on line 6. Can anyone spot what I've done wrong there? 09:07 < vegai> Open takes two parameters 09:07 < vegai> func Open(name string) (file *File, err Error) { 09:08 < wjlroe> really? http://golang.org/pkg/os/#File.Open 09:08 < vegai> yeah, I guess they changed it recently 09:09 < vegai> OpenFile seems to do what Open did previously 09:09 < vegai> Open just calls it with a static O_RDONLY parameter 09:09 < wjlroe> ah ok, thanks 09:09 < wjlroe> Just checked the source 09:09 < vegai> yeah, I did too. Helps often in go's case 09:10 < wjlroe> so, similar story with Glob: func Glob(pattern string) (matches []string, err os.Error) { 09:10 < wjlroe> API changed 09:12 -!- femtoo [~femto@95-89-249-242-dynip.superkabel.de] has joined #go-nuts 09:12 < vegai> yeah 09:12 < vegai> now that they're doing actual releases, they oughta keep the docs up-to-date 09:13 < vegai> oh wait, they are. That change was done after the release 09:13 < wjlroe> well bear in mind, I'm using the golang.org docs, which should probably be in a "stable" state, but I'm using the "edge" of Go from the repo. I just forgot I was doing that 09:13 < vegai> yeah 09:14 < vegai> te culpa :P 09:15 < vegai> tu culpa, that is 09:15 < wjlroe> mea culpa, mea maxima culpa 09:15 < aiju> vegai: "tea culpa" 09:17 -!- edsrzf [~edsrzf@122-61-221-144.jetstream.xtra.co.nz] has quit [Remote host closed the connection] 09:18 -!- Garen [noway@69.76.18.3] has quit [Ping timeout: 250 seconds] 09:18 -!- Garen [noway@69.76.18.3] has joined #go-nuts 09:24 -!- wrtp [~rog@92.17.70.99] has quit [Quit: wrtp] 09:29 -!- foocraft [~dsc@78.101.214.91] has joined #go-nuts 09:34 -!- B0rder [~B0rder@114.246.82.120] has quit [Ping timeout: 240 seconds] 09:34 < vegai> it is? Huh 09:35 < vegai> should've listened to phoeton 09:35 < vegai> 19:42 <phoeton> vegai: Latin is mostly regular, too, doesn't make it easy ;) 09:39 -!- B0rder [~B0rder@114.246.82.120] has joined #go-nuts 09:39 < wjlroe> Does anybody here, who doesn't work for Google, use Go as their predominant language at work? Out of interest 09:41 -!- snearch [~snearch@f053001155.adsl.alicedsl.de] has joined #go-nuts 09:48 -!- aho [~nya@fuld-590c70b0.pool.mediaWays.net] has quit [Quit: EXEC_over.METHOD_SUBLIMATION] 09:52 -!- benjack [~benjack@bb121-6-49-43.singnet.com.sg] has quit [Quit: Leaving.] 09:55 -!- piranha [~piranha@D57D1AB3.static.ziggozakelijk.nl] has quit [Remote host closed the connection] 09:55 -!- fluffle [~camelid@s.pl0rt.org] has quit [Ping timeout: 240 seconds] 09:59 -!- fluffle [~camelid@s.pl0rt.org] has joined #go-nuts 10:00 -!- gregschlom [~quassel@118.68.165.201] has quit [Ping timeout: 240 seconds] 10:05 -!- leczb [~leczb@nat/google/x-dfxgrmoxwmmfgytl] has left #go-nuts ["Konversation terminated!"] 10:12 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 240 seconds] 10:15 -!- fmoo [~Adium@c-76-102-41-101.hsd1.ca.comcast.net] has quit [Quit: Leaving.] 10:16 -!- dfc [~dfc@124-149-59-161.dyn.iinet.net.au] has joined #go-nuts 10:22 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts 10:40 -!- niemeyer [~niemeyer@189-10-219-9.pltce701.dsl.brasiltelecom.net.br] has joined #go-nuts 10:47 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts 10:48 -!- ab3 [~abe@83.101.90.66] has joined #go-nuts 10:57 -!- fmoo [~Adium@c-76-102-41-101.hsd1.ca.comcast.net] has joined #go-nuts 11:07 -!- B0rder [~B0rder@114.246.82.120] has quit [Ping timeout: 276 seconds] 11:08 -!- j3parker [j3parker@artificial-flavours.csclub.uwaterloo.ca] has quit [Ping timeout: 252 seconds] 11:09 -!- j3parker [j3parker@artificial-flavours.csclub.uwaterloo.ca] has joined #go-nuts 11:10 -!- l00t [~i-i3id3r_@20150129006.user.veloxzone.com.br] has quit [Remote host closed the connection] 11:15 -!- B0rder [~B0rder@114.246.82.120] has joined #go-nuts 11:24 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has quit [Ping timeout: 260 seconds] 11:24 -!- piranha [~piranha@5ED42E59.cm-7-5a.dynamic.ziggo.nl] has joined #go-nuts 11:26 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has joined #go-nuts 11:36 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-163-152.clienti.tiscali.it] has joined #go-nuts 11:46 -!- fhs [~fhs@2001:0:4137:9e76:2cf0:56e4:b59a:bd8f] has quit [Quit: leaving] 11:59 -!- artefon [~thiago@dhcp17.usuarios.dcc.ufmg.br] has joined #go-nuts 12:01 -!- wjlroe [~will@78-86-14-131.zone2.bethere.co.uk] has quit [Quit: Get MacIrssi - http://www.sysctl.co.uk/projects/macirssi/] 12:02 -!- dfc [~dfc@124-149-59-161.dyn.iinet.net.au] has quit [Quit: dfc] 12:09 -!- tvw [~tv@212.79.9.150] has joined #go-nuts 12:23 -!- fmoo [~Adium@c-76-102-41-101.hsd1.ca.comcast.net] has quit [Quit: Leaving.] 12:31 -!- gregschlom [~quassel@118.68.165.201] has joined #go-nuts 12:31 -!- arun [~arun@unaffiliated/sindian] has quit [Read error: Operation timed out] 12:31 -!- KBme [~KBme@2001:470:cabe:666:666:666:666:666] has quit [Read error: Operation timed out] 12:32 -!- Xenith [~xenith@xenith.org] has quit [Read error: Operation timed out] 12:32 -!- arun [~arun@unaffiliated/sindian] has joined #go-nuts 12:32 -!- kanru [~kanru@kanru-1-pt.tunnel.tserv15.lax1.ipv6.he.net] has quit [Read error: Operation timed out] 12:33 -!- zozoR [~Morten@90.185.81.29] has joined #go-nuts 12:34 -!- kanru [~kanru@kanru-1-pt.tunnel.tserv15.lax1.ipv6.he.net] has joined #go-nuts 12:35 -!- KBme [~KBme@2001:470:cabe:666:666:666:666:666] has joined #go-nuts 12:41 -!- foocraft [~dsc@78.101.214.91] has quit [Read error: Connection reset by peer] 12:50 -!- ShadowIce` [~pyoro@HSI-KBW-109-193-120-162.hsi7.kabel-badenwuerttemberg.de] has joined #go-nuts 12:50 -!- ShadowIce` [~pyoro@HSI-KBW-109-193-120-162.hsi7.kabel-badenwuerttemberg.de] has quit [Changing host] 12:50 -!- ShadowIce` [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts 12:52 -!- zeroXten_ [~zeroXten@0x10.co.uk] has joined #go-nuts 12:52 -!- electro [electro@c-bef570d5.033-10-67626721.cust.bredbandsbolaget.se] has joined #go-nuts 12:52 -!- ttblrs [U2FsdGVkX1@order.stressinduktion.org] has joined #go-nuts 12:52 -!- rm445_ [rm445@pip.srcf.societies.cam.ac.uk] has joined #go-nuts 12:52 -!- clip9_ [clip9@er.en.svarteper.com] has joined #go-nuts 12:52 -!- homa_ran1 [~erice@hmsvelociraptor.csail.mit.edu] has joined #go-nuts 12:53 -!- aa____ [~ali@pida.vm.bytemark.co.uk] has joined #go-nuts 12:54 -!- ukai_ [~ukai@nat/google/x-votwzbzpxzpxgotb] has joined #go-nuts 12:54 -!- preflex_ [~preflex@unaffiliated/mauke/bot/preflex] has joined #go-nuts 12:54 -!- scyth_ [~scyth@rots.in.rs] has joined #go-nuts 12:55 -!- GoBIR_ [~gobir@70-90-168-189-SFBACalifornia.hfc.comcastbusiness.net] has joined #go-nuts 12:55 -!- Netsplit *.net <-> *.split quits: ShadowIce, Natch|, homa_rano, yebyen, preflex, clip9, aa_, pjm0616, scyth, zeroXten, (+6 more, use /NETSPLIT to show all of them) 12:55 -!- Netsplit over, joins: pjm0616 12:56 -!- zozoR [~Morten@90.185.81.29] has quit [Read error: Connection reset by peer] 12:56 -!- B0rder [~B0rder@114.246.82.120] has quit [Ping timeout: 260 seconds] 12:58 -!- yebyen [~yebyen@martyfunkhouser.csh.rit.edu] has joined #go-nuts 12:58 -!- foocraft [~dsc@78.101.141.70] has joined #go-nuts 12:59 -!- gregschlom [~quassel@118.68.165.201] has quit [Ping timeout: 260 seconds] 13:00 -!- snearch [~snearch@f053001155.adsl.alicedsl.de] has quit [Quit: Verlassend] 13:02 -!- tobier [~tobier@c-1e9de055.712-1-64736c11.cust.bredbandsbolaget.se] has joined #go-nuts 13:02 -!- Natch| [~natch@c-adcee155.25-4-64736c10.cust.bredbandsbolaget.se] has joined #go-nuts 13:02 -!- Xenith [~xenith@xenith.org] has joined #go-nuts 13:09 -!- artefon [~thiago@dhcp17.usuarios.dcc.ufmg.br] has quit [Quit: bye] 13:12 -!- zozoR [~Morten@90.185.81.29] has joined #go-nuts 13:17 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-150-151.clienti.tiscali.it] has joined #go-nuts 13:20 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-163-152.clienti.tiscali.it] has quit [Ping timeout: 240 seconds] 13:23 -!- artefon [~thiago@dhcp17.usuarios.dcc.ufmg.br] has joined #go-nuts 13:24 -!- foocraft [~dsc@78.101.141.70] has quit [Ping timeout: 250 seconds] 13:25 -!- foocraft [~dsc@78.101.78.181] has joined #go-nuts 13:33 -!- petrux [~petrux@host16-224-static.53-82-b.business.telecomitalia.it] has quit [Ping timeout: 276 seconds] 13:37 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 258 seconds] 13:40 -!- nixness [~dsc@78.101.238.156] has joined #go-nuts 13:40 -!- foocraft [~dsc@78.101.78.181] has quit [Ping timeout: 258 seconds] 13:45 < creack> I do 13:52 -!- zeroXten_ [~zeroXten@0x10.co.uk] has quit [Quit: leaving] 13:53 -!- zeroXten [~zeroXten@87.106.200.62] has joined #go-nuts 13:55 -!- a2800276 [~a2800276@80.187.158.12] has joined #go-nuts 13:56 -!- fabled [~fabled@83.145.235.194] has quit [Quit: Ex-Chat] 14:07 -!- pharris [~Adium@rhgw.opentext.com] has joined #go-nuts 14:09 -!- dreadlorde [~dreadlord@24.11.39.160] has joined #go-nuts 14:09 < xyproto> can break and continue only jump to labels that are defined before the place where the break or continue happens? 14:10 -!- Niedar [~bleh@ip68-99-166-222.hr.hr.cox.net] has joined #go-nuts 14:10 <+iant> xyproto: they can only refer to labels in loops which they are in, so the labels must have been defined already 14:11 <+iant> break doesn't jump to that label, of course, it jumps to the end of the loop 14:11 < xyproto> iant: I'm unable to make the example here work: http://gonuts.org/doc/go_spec.html#Break_statements 14:12 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-150-151.clienti.tiscali.it] has quit [Ping timeout: 240 seconds] 14:12 <+iant> what happens when you try? 14:12 < xyproto> iant: no, wait, I was a bit quick there. More testing needed, sorry. :) 14:13 < xyproto> iant: ok, it works. But, if I write fmt.Println("hi") between the label L: and the loop, it does not compile. Why is that? 14:14 < xyproto> iant: by "does not compile", I mean this: "invalid break label L" 14:14 -!- napsy [~luka@193.2.66.6] has quit [Quit: Lost terminal] 14:14 < Namegduf> xyproto: Because the label is no longer a break label. 14:15 < Namegduf> It isn't labeling a loop, it's labeling fmt.Println("hi") 14:15 < xyproto> iant: ah, I think I see now. The whole point is just to jump to outer loops, no other trickery. 14:15 < Namegduf> Yep. 14:18 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts 14:18 -!- sebastianskejoe [~sebastian@188.114.142.217] has joined #go-nuts 14:20 -!- a2800276 [~a2800276@80.187.158.12] has quit [Ping timeout: 240 seconds] 14:22 -!- a2800276 [~a2800276@80.187.158.12] has joined #go-nuts 14:33 -!- dreadlorde [~dreadlord@24.11.39.160] has quit [Ping timeout: 260 seconds] 14:37 -!- artefon [~thiago@dhcp17.usuarios.dcc.ufmg.br] has quit [Quit: bye] 14:42 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Quit: skelterjohn] 14:44 -!- r_linux [~r_linux@189.38.220.35] has joined #go-nuts 14:49 -!- PJRobins [~quassel@184.100.100.163] has joined #go-nuts 14:58 -!- iant [~iant@216.239.45.130] has quit [Ping timeout: 240 seconds] 15:02 -!- piranha [~piranha@5ED42E59.cm-7-5a.dynamic.ziggo.nl] has quit [Quit: Computer has gone to sleep.] 15:02 -!- wrtp [~rog@92.17.70.99] has joined #go-nuts 15:04 < jeremy_c> I'm having difficulty understanding how Interfaces and Types translate/apply to what I understand about Classes and Inheritance, how would the psuedo code in http://pastey.net/149464 translate to Go? Do I have to define a type of Animal, Dog and Cat w/duplicate values and define sayHello() funcs for each type that do the exact same thing and create an Interface "Animal" that defines the "sayHello" func so I can assign a Cat or Dog to a generic animal interfac 15:05 -!- sebastianskejoe [~sebastian@188.114.142.217] has quit [Quit: Lost terminal] 15:05 -!- Venom_X [~pjacobs@66.54.185.131] has joined #go-nuts 15:07 < ww> jeremy_c: you could use an embedded type that implements a default SayHello() 15:07 < ww> embedding the type in Cat and Dog works a bit like subclassing 15:08 -!- angasule [~angasule@190.2.33.49] has quit [Read error: Connection reset by peer] 15:08 < jnwhiteh> if I'm creating a struct that won't ever need to be changed, but I will be invoking the methods of, is there a benefit to making it a pointer over making it a non-pointer? 15:10 < xyproto> jnwhiteh: I think passing a point to a struct or the struct itself should be equivivalent in terms of how much data is passed to a function 15:10 < xyproto> *a pointer 15:10 < jeremy_c> ww: I'll look for docs on embedded types, I'm not sure I follow, but I can google for a bit. 15:10 < jnwhiteh> jeremy_c: you'll need to rethink the way you think about OO in Go 15:10 < jnwhiteh> its not standard class/inheritance 15:11 < jeremy_c> right, but the need continues to define 1 method that works on various types w/o having to duplicate that method? 15:12 < xyproto> jnwhiteh: I'm porting your psaudo code to Go now 15:12 < jnwhiteh> I assume you mean jeremy_c not jnwhiteh 15:12 < jnwhiteh> but thanks for telling me, I was doing the same 15:12 < jnwhiteh> but should be doing real work 15:12 * ww tries to do real work... and fails... 15:13 < jeremy_c> real work? what's that? 15:14 * ww tosses a coin: watch the wedding tomorrow or hide? 15:14 < jnwhiteh> I'll be staying in Oxford 15:14 < jnwhiteh> Not sure I'm interested in coming down for it =) 15:14 < aiju> jnwhiteh: go there 15:14 < aiju> but take a shotgun with you 15:15 < xyproto> jnwhiteh: ah, sorry for the typo :) 15:15 < jnwhiteh> sadly, gun control in the UK is fairly strong 15:15 < jnwhiteh> I'm sure I could come up with some ninja stars =) 15:15 < ww> oh i wouldn't actually *go* to london for that 15:15 < jnwhiteh> oh, well why would you hide from the TV? 15:15 < ww> it takes a pretty strong argument to get me to go there 15:15 < jnwhiteh> I'll have it on just to laugh =) 15:15 < jnwhiteh> if nothing else. 15:20 -!- petrux [~petrux@host16-224-static.53-82-b.business.telecomitalia.it] has joined #go-nuts 15:20 -!- artefon [~thiago@150.164.9.146] has joined #go-nuts 15:23 -!- virtualsue [~chatzilla@nat/cisco/x-ywbkgwvmerqkrtom] has quit [Quit: ChatZilla 0.9.86.1 [Firefox 4.0/20110318052756]] 15:25 -!- skelterjohn [~jasmuth@lawn-gw.rutgers.edu] has joined #go-nuts 15:26 -!- DerHorst [~Horst@e176097221.adsl.alicedsl.de] has joined #go-nuts 15:27 < xyproto> jeremy_c: okay, here's a literal translation http://go.pastie.org/1843703 15:28 < xyproto> jeremy_c: it feels a bit akward, it would be easier if you had goals like "X wants to bark, Y wants to meow and I don't want duplicated code in the program" 15:28 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts 15:28 < xyproto> jeremy_c: like the other said, Go has a bit different way of thinking about things (but the Go way works just as well, or better) 15:29 -!- dfff [58757226@gateway/web/freenode/ip.88.117.114.38] has joined #go-nuts 15:29 < jeremy_c> my basic need is to have sayHello() to work on multiple data types w/o having to duplicate it. Then various other functions on other types such as Dog and Cat. 15:30 < xyproto> jeremy_c: well, my code snippet should cover that 15:30 < jnwhiteh> the only way to do that sort of inheritance is to use embedded types, which are a bit of a 'kludge', in my opinion. That's what xyproto shows 15:30 < jeremy_c> xyproto: yes, it does, but is that the Go way? 15:30 < ww> now imagine a method like WalkAroundTheRoom() and another animal like Emu 15:30 < xyproto> jeremy_c: I dare say no programmer with a Go-mindset would program it that way, though 15:30 < jeremy_c> Is there a better way of thinking about this problem? 15:30 < ww> you could imagine the implementations being very different 15:30 < xyproto> jeremy_c: if you want "the Go way", you need to start out with a problem that isn't defined "the Java way" 15:30 < jnwhiteh> indeed 15:31 < ww> so you'd use an interface there, type Walker interface { WalkAroundTheRoom } 15:31 < jeremy_c> :-) ... I guess that's the hardest thing about working w/multiple languages. 15:31 < jnwhiteh> or the beauty of it =) 15:31 < jnwhiteh> I enjoy thinking functionally when working with Haskell, writing interfaces in Go and abusing tables in Lua =) 15:31 < Namegduf> jeremy_c: Make it a function. 15:32 < jeremy_c> ww: right, but then you need to define the function WalkAroundTheRoom for Animal, Cat and Dog ? 15:32 < Namegduf> If it's not dependent on a specific implementation, but just needs methods from the specific implementation, put it in a function, which is passed the implementation in an interface. 15:32 < Namegduf> If it is dependent on a specific implementation, separate methods for each one. 15:32 < Namegduf> Which are different. 15:32 < jeremy_c> It's dependent on specific fields being present in an underlying type 15:32 < jnwhiteh> i.e. func SayHello(anim Animal) { fmt.Printf("My name is %s", anim.name) } 15:32 < ww> you could put it on Animal for a default quadruped walk, and then override it on Emu 15:33 -!- gedevan [~gedevan@83.167.106.253] has joined #go-nuts 15:33 < xyproto> jeremy_c: you could have an interface "Walk", then every thing that implements Walk can WalkAroundTheRoom, be it an Animal, Cat or Dog. 15:33 < jnwhiteh> or Banana 15:33 < aiju> ah, lovely made up bullshit examples 15:33 < jeremy_c> yes, but you have to define Walk() 3 times, right? for Animal, Cat and Dog. All of which are the *exact* same implementation. 15:33 < Namegduf> Nah, nah, overcomplicated. 15:34 < Namegduf> jeremy_c: Put the implementation-specific part in a function. 15:34 < Namegduf> For SayHello... 15:34 < jnwhiteh> aiju: ah lovely made up bullshit java/c++ inheritance-based examples :P 15:34 < aiju> yeah 15:34 < jnwhiteh> jeremy_c: I just implemented SayHello 15:34 < jnwhiteh> once. 15:34 < aiju> real programming problems or gtfo 15:34 < jnwhiteh> in chat, cause it was a one-liner. 15:34 < Namegduf> func SayHello(n Namer) { fmt.Printf("My name is %s\n", n.Name()) } 15:34 < xyproto> jeremy_c: if an Animal, Cat and Dog all walk the same way, why are they different types in the first place? 15:34 < Namegduf> ^ jeremy_c See that example. 15:34 < Namegduf> That function will work on ANYTHING with a name. 15:34 < jnwhiteh> Namegduf: much better than mine, cause yours actually works =) 15:34 < jeremy_c> aiju: it's not made up, it's a real problem I am trying to solve right now with parsing EDI files w/base implementation of a Segment but additional methods for specific Segments (NM1, N3, ...) 15:35 < Namegduf> Not just animals. 15:35 < Namegduf> If there's implementation-defined stuff, put a method around it with the same name on each type. 15:35 < jeremy_c> xyproto: the type isn't different, but methods that can execute on them are different. 15:35 < Namegduf> Make the generic stuff take an interface expecting the implementation-defined stuff it needs. 15:35 < jeremy_c> For example, I don't want to ask a Dog to meow 15:35 < Namegduf> (And no more.) 15:36 < Namegduf> SayHello is an illustrative example there. 15:36 < ww> wouldn't a cat say hello by meowing? 15:36 < ww> and what does a Giraffe say, exactly? 15:37 < xyproto> jeremy_c: look. Bring us a problem that is not halfway to a solution in Java, and you'll get a great Go-solution. If you want the Java-solution, I already gave you the Go-example that can do what you ask. 15:37 < Namegduf> Just cleanly divide what is type-specific and what is generic; former goes in methods, latter goes in functions. 15:37 < Rennex> ww: öri öri öri 15:37 < Namegduf> Functions can expect interfaces providing the former to depend on it. 15:38 < Namegduf> You cannot have generic functionality refer to fields of an arbitrary type, because that restricts the ways said arbitrary type can implement that stuff. Also it's unnecessarily complex. 15:38 < Namegduf> (Namer, in my example, could generate a name on demand for a liar type.) 15:38 < Namegduf> (For a silly example.) 15:38 -!- JusticeFries [~JusticeFr@173-8-247-218-Colorado.hfc.comcastbusiness.net] has joined #go-nuts 15:38 * ww thinks Giraffe is a liar 15:39 < ww> in other news... 15:39 < jeremy_c> I'll try to rethink my Segment, SegmentNM1, SegmentN3, in a go fashion. Its hard though just learning the language after years of class inheritance. 15:40 < ww> any guesses when we'll next get a new release? 15:40 < Namegduf> Yeah. You just need to exclude inheritance from your mental set of tools for building solutions. 15:40 < Namegduf> Composition works well, though, and can do anything inheritance can do. 15:41 < jnwhiteh> jeremy_c: feel free to give us the root problem and we'll think through with you =) 15:41 < Namegduf> It's always kinda hard for people the first time out of an OO language. 15:41 < Namegduf> It's one reason I think people should be forced to learn either C or assembly. :P 15:41 < jeremy_c> jnwhiteh: hate to have you guys do my coding/thinking for me :-) 15:41 < Namegduf> It's great you're giving it a try. 15:41 < xyproto> jeremy_c: I second what jnwhiteh said :) 15:42 < jnwhiteh> but we think in Go terms already =) 15:42 < Namegduf> I secretly think in a C way 15:42 < skelterjohn> the main issue, i think, is that classic OOP ties the concepts of inheritance and polymorphism together 15:42 < Namegduf> It shows with my relatively limited use of channels and goroutines 15:42 < Namegduf> But they're otherwise close, haha. 15:43 < skelterjohn> with go, you use composition and interfacing, but they're not tied together 15:43 < jeremy_c> ok... I'll write up text to explain my real problem I am trying to solve. 15:43 < Namegduf> To be uncomplimentary about OO, it ties everything together. It's how they pretend object modeling has anything to do with abstraction and coupling. 15:43 < jnwhiteh> type BlockDevice interface { Read(interface{}, int64); Write(interface{}, int64) } 15:43 < jnwhiteh> this should be fun =) 15:43 < ww> +1 on starting with assembly on a simple architecture - that way the student gets an idea of what a computer actually does before moving on to abstractions... 15:44 < Namegduf> ww: Yeah, I like that idea. 15:44 < ww> there's a reason to learn arithmetic before calculus... 15:44 < skelterjohn> <- horrible at arithmetic 15:44 < aiju> ww: haha 15:44 < skelterjohn> <- good at calculus 15:44 < Namegduf> I think Go would make an incredibly good teaching language, really 15:44 < aiju> except that it changes weekly ;P 15:44 < skelterjohn> there is that. 15:45 < ww> aiju: hence my speculative question about a release... 15:45 < Namegduf> It's not far from C level, and can be converted to C level fairly easily to understand how it really works, but it's much, much easier to program with. 15:45 < Namegduf> Competing with, say, Python for "My First Language". 15:45 < ww> i got caught in weekly because of the closed() change... but really don't want to track weekly... 15:45 -!- unofficialmvp [~dev@94-62-164-227.b.ipv4ilink.net] has joined #go-nuts 15:46 < xyproto> ww: how about starting with something really simple, just to get the idea, then down to assembly and up to something sensible? 15:46 < Namegduf> A little harder, but a lot easier to map to how computers actually work, because there's very few things made complicated to be "intuitive". 15:47 < ww> xyproto: that's more or less how i learned. basic, then x86 assembly then pascal then C 15:47 < Namegduf> I started on "C++", but it was mostly the C subset of C++, and I was thus saved 15:47 < Namegduf> Close one, though 15:47 -!- unofficialmvp [~dev@94-62-164-227.b.ipv4ilink.net] has left #go-nuts [] 15:47 < ww> we had trs 80s and apple IIs in school, you made the turtle move around in basic 15:47 < Namegduf> I got given a "Learn C++ in 24 hours" book as a kid. 15:48 < aiju> i learned C++ with 7 15:48 < xyproto> ww: I have a similar route 15:48 < Namegduf> At a certain point I threw it out and started screwing around with just the documentation. 15:48 < skelterjohn> i learned to program from example code 15:48 < jnwhiteh> skelterjohn: for C code, same here. 15:48 < Namegduf> Only language I hadn't touched before seeing it in university was Lisp, which I only played with for a bit. 15:48 < skelterjohn> started out as copy pasta 15:48 < jnwhiteh> I actually taught myself linked lists without knowing that's what I was doing. 15:48 < skelterjohn> but i figured it out at some point 15:49 < jnwhiteh> I was editing a MUD written in C 15:49 < jnwhiteh> and had to figure out how on earth it was doing things 15:49 < xyproto> skelterjohn: I started out trying to write in an AMOS program for Amiga in QBASIC... 15:49 < xyproto> skelterjohn: copy pasta style :P 15:49 < jnwhiteh> the code was quite good, I just didn't know the terminology or concepts =) 15:49 < Namegduf> I remember BASIC 15:49 < Namegduf> I never did much with QBASIC, but I had looked at it. 15:49 < Namegduf> Not very fun when you've used C 15:49 < skelterjohn> i got all these "inside macintosh" books for the early 90s mac OS computers, and I'd make silly games 15:49 < skelterjohn> in C 15:49 < Namegduf> I remember my first multi-thousand line program in C. 15:50 < skelterjohn> i wish i could find some of that old code 15:50 < Namegduf> It was supposed to be a game. It was spaghetti code that crashed if you tried to use it on an OS with memory protection. 15:50 < skelterjohn> and see how my adolescent mind worked 15:50 < Namegduf> I had to give up on it. 15:50 < Namegduf> Was my first and probably most helpful lesson in software design. 15:50 < skelterjohn> my mom called my code spaghetti code, once, when i was like 15 15:50 < skelterjohn> that was a blow 15:50 < Namegduf> "Don't write spaghetti code" 15:51 < jeremy_c> http://pastey.net/149467 ... my problem in text. No code, no implementation suggestions. How to think about it in Go? 15:51 < Namegduf> I think I was around that age. 15:51 < Namegduf> jeremy_c: I will give you a magic cookie for linebreaks 15:51 < skelterjohn> jeremy_c: let me point you to the "return" key 15:51 < skelterjohn> it separates thoughts from each other with whitespace 15:52 < xyproto> jeremy_c: e other thing is I'd like to 15:52 < xyproto> be able to call person.Valid()" 15:52 < xyproto> jeremy_c: already, the problem describes how to create the implementation 15:53 < jeremy_c> Hm, I should have test I would like to test for segment validity. Sorry, didn't mean to include code. 15:53 < Namegduf> A Segment type, containing a Data type. 15:53 < jeremy_c> "should have said I would like to test..." 15:54 < Namegduf> Segment type has name and modifer members. 15:54 < Namegduf> Data is anything meeting an interface containing Valid() and anything else which all data should have, but whose implementation is segment type specific. 15:55 < xyproto> jeremy_c: sorry, I don't understand the problem, only the desired implementation 15:55 < Namegduf> Segment type has a Valid() method, which checks its own stuff and also invokes Data.Valid() 15:55 < Namegduf> Does that make sense? 15:55 < jeremy_c> Namegduf: yes, it does. 15:56 < Namegduf> You can use type switches or type assertions to see which Data implementation it is. 15:56 < Namegduf> And get the specific implementation type back. 15:58 < jeremy_c> I'll code down that route Namegduf and see what I come up with. 15:58 < ww> e.g switch t := seg.(type) { case NM1: ...; case N3: ... } 15:58 < jeremy_c> xyproto sorry, didn't mean to include code. 15:59 < ww> i would tend to embed segment in the specific types 15:59 < jeremy_c> ww: that would actually be on the data field, right? seg would always be type Segment I think from Namegduf's suggestion? 15:59 < Namegduf> From mine, yeah. 15:59 < ww> jeremy_c: yes, i was suggesting something very slightly different. 16:00 < ww> you still would have Segment like Namegduf says 16:00 < ww> but then you would do type NM1 Segment 16:00 < Namegduf> ww: That would not work. 16:00 < ww> and func (n *NM1) FullName() string... 16:00 < ww> Namegduf: why not? 16:00 < jeremy_c> ww: that's what I tried to begin with 16:01 < Namegduf> ww: The segment subtypes have additional data as well. 16:01 < ww> sure, i would imagine that there's a payload on Segment that they could get at 16:01 < Namegduf> Now that's just ugly 16:01 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 260 seconds] 16:01 < Namegduf> You have a segment type specific bit in Segment, then a segment - type specific bit WRAPPING Segment 16:02 < ww> well, the fact of having data/payload is not type-specific 16:02 < ww> it's only what is done with that data that is type-specific 16:02 < Namegduf> Yes, but the data is type-specific, and probably contains the type. 16:03 < Namegduf> You also have to keep the data stored in the "payload" form rather than any derived program-internal types 16:03 < Namegduf> You can't deserialise it, for example. 16:04 < Namegduf> If you wanted to split off the Segment logic, it'd be better to have a Payload interface, a Segment type, and a third type compositing the two. 16:04 < ww> that's a separate question and depends on other requirements in the program - maybe you need to keep serialised versions around for round-tripping or provenenance or whatever. maybe not 16:05 < ww> Namegduf: i agree with that last suggestion 16:06 -!- JusticeFries [~JusticeFr@173-8-247-218-Colorado.hfc.comcastbusiness.net] has quit [Remote host closed the connection] 16:06 < Namegduf> Yeah, it's a nice idea. 16:06 < Namegduf> Where you want something to be independent and it isn't dependent on anything else in the type, split it off. 16:07 < Namegduf> Reminds me of first normal form in database design, but you do it when it's architecturally nice and the data and related logic distinct, not "always". 16:07 < Namegduf> In this case (and often when possible) it's overengineering, of course. 16:08 < ww> i find myself working through these things iteratively in my first major go programs as i get used to the way things work. 16:08 < Namegduf> I composite in OO languages now. 16:09 < Namegduf> I just find it easier to reason with. 16:09 < ww> the nice thing about the compiler and the static typing is it makes this type of refactoring reasy enough 16:09 < Namegduf> Yeah. 16:09 < ww> s/reasy/easy/ 16:13 < jnwhiteh> I find myself refactoring when I don't even need to, because its so easy 16:14 < jnwhiteh> The code I just wrote will almost certainly only work with disk images, but I've just made it so it would be easy to use other types of 'devices' as well. 16:14 < Namegduf> It's really convenient when I realise that some part of my API doesn't provide for some specific special case. 16:14 < Namegduf> (Which I'm taking as a lesson in how to approach design) 16:15 -!- wrtp [~rog@92.17.70.99] has quit [Quit: wrtp] 16:17 -!- petrux [~petrux@host16-224-static.53-82-b.business.telecomitalia.it] has quit [Quit: leaving] 16:35 -!- DerHorst [~Horst@e176097221.adsl.alicedsl.de] has quit [Remote host closed the connection] 16:42 -!- a2800276 [~a2800276@80.187.158.12] has quit [Ping timeout: 250 seconds] 16:56 -!- angasule [~angasule@190.2.33.49] has quit [Read error: Connection reset by peer] 16:57 -!- saschpe [~quassel@opensuse/member/saschpe] has joined #go-nuts 16:57 -!- keithcascio [~keithcasc@nat/google/x-zfjzmrslilcwxoyl] has joined #go-nuts 16:58 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts 16:59 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-148-19.clienti.tiscali.it] has joined #go-nuts 17:06 -!- Soultaker [~Soultaker@hell.student.utwente.nl] has joined #go-nuts 17:06 -!- napsy [~luka@88.200.96.18] has joined #go-nuts 17:08 -!- Soultaker [~Soultaker@hell.student.utwente.nl] has quit [Read error: Connection reset by peer] 17:08 -!- Soultaker [~Soultaker@hell.student.utwente.nl] has joined #go-nuts 17:12 -!- Soultake1 [~Soultaker@hell.student.utwente.nl] has joined #go-nuts 17:12 -!- Soultaker [~Soultaker@hell.student.utwente.nl] has quit [Read error: Connection reset by peer] 17:17 -!- nsfx [~nsfx@pool-96-225-70-167.nwrknj.fios.verizon.net] has quit [Ping timeout: 252 seconds] 17:21 < plexdev> http://is.gd/ipr2TC by [Russ Cox] in 2 subdirs of go/ -- gc: preserve original expression for errors 17:21 < plexdev> http://is.gd/Lu4kIh by [Gustavo Niemeyer] in 2 subdirs of go/src/pkg/ -- syslog: fix skipping of net tests 17:23 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has joined #go-nuts 17:28 -!- dfff [58757226@gateway/web/freenode/ip.88.117.114.38] has quit [Quit: Page closed] 17:32 -!- sacho [~sacho@95-42-105-75.btc-net.bg] has quit [Ping timeout: 240 seconds] 17:32 < PJRobins> Hello all, was attempting to compile go-gtk and ran into this error "undefined: reflect.NewValue". 17:32 < PJRobins> and reflect doesn't define this 17:32 -!- femtooo [~femto@95-89-249-242-dynip.superkabel.de] has joined #go-nuts 17:32 < PJRobins> how would I rewrite this with the new calls 17:33 -!- sacho [~sacho@79-100-170-20.btc-net.bg] has joined #go-nuts 17:33 < PJRobins> reflect.Value().New() ? 17:35 -!- femtoo [~femto@95-89-249-242-dynip.superkabel.de] has quit [Ping timeout: 250 seconds] 17:37 -!- arun_ [~arun@unaffiliated/sindian] has quit [Ping timeout: 250 seconds] 17:37 -!- iant [~iant@216.239.45.19] has joined #go-nuts 17:37 -!- mode/#go-nuts [+v iant] by ChanServ 17:38 -!- iant [~iant@216.239.45.19] has quit [Client Quit] 17:39 < skelterjohn> PJRobins: the reflect API has been changed - and reflect.NewValue() was never something that instantiated 17:39 < skelterjohn> at least, i don't think it was 17:39 -!- Adys [~Adys@unaffiliated/adys] has quit [Read error: Connection reset by peer] 17:39 < skelterjohn> I think there is a function reflect.ValueOf which replaced NewValue 17:40 < PJRobins> ok, will give that a try. 17:40 < skelterjohn> but go-gtk is probably matched to the latest go release, rather than the latest go weekly 17:40 < PJRobins> thanks 17:40 < skelterjohn> so fixing it for the weekly might be an exercise in frustration 17:41 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts 17:44 -!- Fish- [~Fish@9fans.fr] has joined #go-nuts 17:49 < xyproto> PJRobins: there's also "gofix" that might fix the non-working version. (just might) 17:51 -!- arun_ [~arun@unaffiliated/sindian] has joined #go-nuts 17:53 -!- angasule [~angasule@190.2.33.49] has quit [Read error: Operation timed out] 17:56 -!- mbejar [~mbejar@80.174.196.32.dyn.user.ono.com] has quit [Remote host closed the connection] 17:56 -!- artefon [~thiago@150.164.9.146] has quit [Quit: bye] 17:58 < PJRobins> I'll look into that. I follow the weekly release of GO that could be useful. 18:06 -!- tvw [~tv@212.79.9.150] has quit [Remote host closed the connection] 18:07 -!- cco3 [~conleyo@nat/google/x-gsfwkjlrsehsvinc] has joined #go-nuts 18:09 -!- zozoR [~Morten@90.185.81.29] has quit [Ping timeout: 250 seconds] 18:11 -!- arun_ [~arun@unaffiliated/sindian] has quit [Ping timeout: 250 seconds] 18:14 < niemeyer> PJRobins: Yeah gofix *.go will get you through some of the pain, but this week's release presents some additional trickery which the automation may not be able to fix 18:16 < PJRobins> It seems that most of what I am working on right now has issues with the reflect changes and so far gofix is working well. 18:16 -!- m4dh4tt3r [~Adium@c-98-210-145-213.hsd1.ca.comcast.net] has joined #go-nuts 18:17 < PJRobins> go-gtk compiled, here in a minute i will see if it behaves correctly for me. 18:25 -!- arun_ [~arun@unaffiliated/sindian] has joined #go-nuts 18:30 -!- niemeyer [~niemeyer@189-10-219-9.pltce701.dsl.brasiltelecom.net.br] has quit [Read error: Connection reset by peer] 18:30 -!- zozoR [~Morten@90.185.81.29] has joined #go-nuts 18:30 -!- niemeyer [~niemeyer@189-10-219-9.pltce701.dsl.brasiltelecom.net.br] has joined #go-nuts 18:34 -!- artefon [~thiago@189.59.181.90.dynamic.adsl.gvt.net.br] has joined #go-nuts 18:39 < plexdev> http://is.gd/zIz9o7 by [Brad Fitzpatrick] in go/src/pkg/http/ -- http: update cookie doc to reference new RFC 6265 18:42 -!- Project-2501 [~Marvin@82.84.73.35] has joined #go-nuts 18:43 -!- wrtp [~rog@92.17.70.99] has joined #go-nuts 18:43 -!- skelterjohn [~jasmuth@lawn-gw.rutgers.edu] has quit [Quit: skelterjohn] 18:45 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-148-19.clienti.tiscali.it] has quit [Ping timeout: 246 seconds] 18:48 -!- arun_ [~arun@unaffiliated/sindian] has quit [Ping timeout: 250 seconds] 18:51 -!- awidegreen [~quassel@c-cfc5e555.08-2-73746f39.cust.bredbandsbolaget.se] has joined #go-nuts 18:51 -!- TheMue [~TheMue@93.223.107.15] has joined #go-nuts 18:54 -!- tvw [~tv@e176006103.adsl.alicedsl.de] has joined #go-nuts 19:00 -!- zozoR [~Morten@90.185.81.29] has quit [Read error: Connection reset by peer] 19:06 -!- sozeboson [~sozeboson@92-244-3-192.customers.ownit.se] has joined #go-nuts 19:07 -!- arun_ [~arun@unaffiliated/sindian] has joined #go-nuts 19:14 -!- zozoR [~Morten@90.185.81.29] has joined #go-nuts 19:15 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts 19:17 -!- nkdnstbr [~nkdnstbr@cpe-173-172-231-83.rgv.res.rr.com] has joined #go-nuts 19:31 -!- fmoo [~Adium@c-76-102-41-101.hsd1.ca.comcast.net] has joined #go-nuts 19:33 -!- nkdnstbr [~nkdnstbr@cpe-173-172-231-83.rgv.res.rr.com] has quit [Ping timeout: 276 seconds] 19:35 -!- gedevan [~gedevan@83.167.106.253] has quit [Ping timeout: 240 seconds] 19:38 -!- awidegreen [~quassel@c-cfc5e555.08-2-73746f39.cust.bredbandsbolaget.se] has quit [Read error: Connection reset by peer] 19:39 -!- sozeboson [~sozeboson@92-244-3-192.customers.ownit.se] has left #go-nuts [] 19:39 -!- sozeboson [~sozeboson@92-244-3-192.customers.ownit.se] has joined #go-nuts 19:42 < plexdev> http://is.gd/hkLC7D by [Russ Cox] in go/src/pkg/xml/ -- xml: fix reflect error 19:43 -!- gregschlom [~quassel@118.68.165.201] has joined #go-nuts 19:45 < sozeboson> The cool and really fast releasing of ubuntu ppa is cool but i get some weird errors 19:46 < sozeboson> http://pastie.org/1844669 19:46 -!- a2800276 [~a2800276@xdsl-87-78-49-90.netcologne.de] has joined #go-nuts 19:46 < sozeboson> Anyone knows why? 19:56 -!- gedevan [~gedevan@83.167.106.253] has joined #go-nuts 19:59 -!- nkdnstbr [~nkdnstbr@64.134.28.138] has joined #go-nuts 20:04 -!- gregschlom [~quassel@118.68.165.201] has quit [Ping timeout: 240 seconds] 20:10 -!- rlab [~Miranda@91.200.158.34] has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org] 20:11 -!- pothos [~pothos@111-240-171-181.dynamic.hinet.net] has quit [Read error: Connection reset by peer] 20:11 -!- pothos [~pothos@111-240-167-21.dynamic.hinet.net] has joined #go-nuts 20:13 -!- pothos [~pothos@111-240-167-21.dynamic.hinet.net] has quit [Read error: Connection reset by peer] 20:14 -!- pothos [~pothos@111-240-167-21.dynamic.hinet.net] has joined #go-nuts 20:14 < plexdev> http://is.gd/2itH7b by [Ross Light] in 2 subdirs of go/src/pkg/ -- http/spdy: new package 20:14 < ab3> i want to fill a slide with strings i read from stdin, can i make an empty slice (nil) and use this with append 20:15 < ab3> i am using ReadString from bufio 20:15 < ww> make([]string, 0) 20:15 < ab3> k 20:15 < ww> and then append. 20:15 < ww> ss := make([]string, 0) 20:15 < ww> ss = append(ss, astring) 20:17 < ab3> thx 20:18 < homa_rano> make([]string, 0) is pretty unnecessary 20:18 < homa_rano> as there is no memory to allocate 20:18 < homa_rano> var string ss works too 20:19 < homa_rano> er, scratch that 20:19 < homa_rano> var ss []string 20:20 < jessta_> you can do append([]string(nil), string) I think 20:22 < ab3> I have problems understanding the relation between make, arrays and slices. I understand that arrays are values and have a capacity, but why is make([]string, 10) a slice of 10 but make([]string, 10, 100) an array of 100 with 10 pointers (your slice). 20:24 < sozeboson> Isnt the reflection api being overused? 20:24 < ab3> and I definitely don't uderstand append([]string(nil), string) 20:24 < sozeboson> It is of course very powerful and kan do alot but wouldnt it be better if we didnt need it? 20:25 < ab3> is []string() the caster? 20:25 < aiju> i never used reflection so far 20:26 < jessta_> ab3: []string(nil) is a conversion, converting nil to a nil string slice 20:26 < sozeboson> Well me neither really but i looked around and loads of libs out there seems to rely heavily on it 20:27 < homa_rano> sozeboson: reflect is necessary for taking to really low level things like syscalls 20:27 < homa_rano> the libraries I've seen use it have good reason 20:27 < homa_rano> but I don't see that much of it 20:27 < sozeboson> I am just a worried that in such a young language maybe it would be better to make the type system powerful enough 20:27 < sozeboson> maybe you are right 20:27 -!- jyxent [~jyxent@129.128.191.96] has quit [Read error: Connection reset by peer] 20:27 < jessta_> ab3: make([]string,10,100) is stll a slice, with length 10 and cap 100 20:27 < aiju> i don't use libraries but the standard library, problem solved ;P 20:28 < sozeboson> :D 20:30 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:75cc:3bc1:916d:bd5c] has quit [Quit: Leaving.] 20:31 < plexdev> http://is.gd/m40JGN by [Evan Shaw] in 2 subdirs of go/src/pkg/http/ -- cgi: export RequestFromMap 20:33 -!- zozoR [~Morten@90.185.81.29] has quit [Remote host closed the connection] 20:35 -!- sacho [~sacho@79-100-170-20.btc-net.bg] has quit [Ping timeout: 264 seconds] 20:38 -!- jyxent [~jyxent@129.128.191.96] has joined #go-nuts 20:38 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has quit [Quit: Geek insinde®] 20:40 -!- pharris [~Adium@rhgw.opentext.com] has quit [Quit: Leaving.] 20:46 -!- nkdnstbr [~nkdnstbr@64.134.28.138] has quit [Ping timeout: 260 seconds] 20:47 -!- res99 [~anonymous@201.237.130.70] has joined #go-nuts 20:58 -!- femtooo [~femto@95-89-249-242-dynip.superkabel.de] has quit [Ping timeout: 250 seconds] 21:00 < ab3> I have an if-else structure in a function, that fully covers all possibilities, still it compiler complains: function ends without a return statement. 21:00 < aiju> ab3: happens 21:00 < aiju> return 0 // fuck you compiler 21:00 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined #go-nuts 21:00 < ab3> k :D 21:05 -!- Kafo [~Henry@a91-154-9-42.elisa-laajakaista.fi] has quit [Read error: Connection reset by peer] 21:05 -!- saschpe [~quassel@opensuse/member/saschpe] has quit [Remote host closed the connection] 21:14 < exch> I've noticed that the standard libs have a tendency to put a panic("unreachable") in those cases. 21:15 -!- Project-2501 [~Marvin@82.84.73.35] has quit [Quit: E se abbasso questa leva che succ...] 21:19 -!- gedevan [~gedevan@83.167.106.253] has quit [Quit: Linkinus - http://linkinus.com] 21:21 -!- Fish- [~Fish@9fans.fr] has quit [Quit: So Long, and Thanks for All the Fish] 21:23 -!- ExtraSpice [XtraSpice@88.118.35.153] has quit [Read error: Connection reset by peer] 21:31 -!- TheMue [~TheMue@93.223.107.15] has quit [Quit: TheMue] 21:38 -!- r_linux [~r_linux@189.38.220.35] has quit [Quit: Lost terminal] 21:40 -!- huin [~huin@91.84.64.19] has quit [Quit: leaving] 21:40 -!- fmoo [~Adium@c-76-102-41-101.hsd1.ca.comcast.net] has quit [Quit: Leaving.] 21:47 -!- dfc [~dfc@124-171-26-181.dyn.iinet.net.au] has joined #go-nuts 21:47 -!- vsayer [~vivek@c-67-170-236-166.hsd1.ca.comcast.net] has quit [Read error: Connection reset by peer] 21:48 -!- napsy [~luka@88.200.96.18] has quit [Quit: Lost terminal] 21:51 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts 21:55 -!- scyth_ [~scyth@rots.in.rs] has quit [Quit: Leaving] 21:55 -!- Venom_X_ [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has joined #go-nuts 21:57 -!- vsayer [~vivek@c-67-170-236-166.hsd1.ca.comcast.net] has joined #go-nuts 21:58 -!- wrtp [~rog@92.17.70.99] has quit [Quit: wrtp] 21:59 -!- Venom_X [~pjacobs@66.54.185.131] has quit [Ping timeout: 250 seconds] 22:03 < plexdev> http://is.gd/tfKAFZ by [Brad Fitzpatrick] in go/src/pkg/http/cgi/ -- cgi: set Request.TLS and Request.RemoteAddr for children 22:12 -!- sozeboson [~sozeboson@92-244-3-192.customers.ownit.se] has quit [Ping timeout: 250 seconds] 22:15 -!- fmoo [~Adium@66.220.144.74] has joined #go-nuts 22:18 -!- tvw [~tv@e176006103.adsl.alicedsl.de] has quit [Ping timeout: 248 seconds] 22:21 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts 22:21 -!- PJRobins [~quassel@184.100.100.163] has quit [Remote host closed the connection] 22:24 -!- dfc [~dfc@124-171-26-181.dyn.iinet.net.au] has quit [Quit: dfc] 22:25 -!- GeertJohan [~Squarc@D978EC5D.cm-3-1d.dynamic.ziggo.nl] has quit [Quit: Leaving.] 22:28 -!- nkdnstbr [~nkdnstbr@cpe-173-172-231-83.rgv.res.rr.com] has joined #go-nuts 22:33 -!- artefon [~thiago@189.59.181.90.dynamic.adsl.gvt.net.br] has quit [Quit: bye] 22:49 -!- nkdnstbr [~nkdnstbr@cpe-173-172-231-83.rgv.res.rr.com] has quit [Quit: Lost terminal] 22:50 -!- Venom_X [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has quit [Quit: Venom_X] 22:51 -!- angasule [~angasule@190.2.33.49] has quit [Remote host closed the connection] 23:14 -!- dju [dju@fsf/member/dju] has joined #go-nuts 23:16 -!- Soultake1 [~Soultaker@hell.student.utwente.nl] has quit [Read error: Connection reset by peer] 23:17 -!- Soultaker [~Soultaker@hell.student.utwente.nl] has joined #go-nuts 23:22 -!- boomtopper [~boomtoppe@host86-128-243-59.range86-128.btcentralplus.com] has joined #go-nuts 23:25 -!- dfc [~dfc@eth59-167-133-99.static.internode.on.net] has joined #go-nuts 23:26 -!- nkdnstbr [~nkdnstbr@cpe-173-172-231-83.rgv.res.rr.com] has joined #go-nuts 23:26 -!- nkdnstbr [~nkdnstbr@cpe-173-172-231-83.rgv.res.rr.com] has quit [Client Quit] 23:28 -!- aho [~nya@fuld-590c7cb2.pool.mediaWays.net] has joined #go-nuts 23:38 -!- boomtopper [~boomtoppe@host86-128-243-59.range86-128.btcentralplus.com] has quit [Ping timeout: 260 seconds] 23:42 < ab3> hello 23:43 < ab3> the (s int) in the func definition, is that just a named return value instead of return s? 23:44 < dfc> can you give an example ? 23:44 < dfc> there are three things you could be referring too 23:44 < dfc> func (r reciever) (a argument) (R returnValue) { 23:44 < dfc> } 23:44 < dfc> two of those three are optional 23:46 < ab3> http://dpaste.com/536989/ 23:47 < ab3> sory i forgot the example 23:48 < ab3> *sorry 23:48 < dfc> yes, s is a named return value 23:48 < dfc> I would (personally) avoid using it in this example 23:48 < dfc> I think the named return value is a tool to be used sparingly 23:49 < skelterjohn> i disagree 23:49 < skelterjohn> i use it in almost all circumstances 23:49 < skelterjohn> it gives contextual information about what you're returning 23:50 < dfc> fair enough 23:50 < skelterjohn> the only time i don't use it is for functions like "func IsSomething(x) bool" 23:50 < dfc> this is my personal opinion 23:50 < dfc> i agree that it can be invaluable for functions that have multiple return paths 23:50 < dfc> generally that deal with err 23:51 < dfc> but apart from that, I think it's a tool to be used sparingly 23:51 < skelterjohn> why? 23:52 < dfc> partly, i think you should be explicit in what you return 23:52 < dfc> so return x, y 23:52 < dfc> rather than setting x and y somewhere in the body of the function then returning 23:52 < dfc> (yes, this is functionally identical) 23:52 < skelterjohn> you can do both 23:52 < skelterjohn> naming return values will never break code 23:52 < dfc> but mainly because of variable aliasing issues 23:52 < dfc> using if's and for's 23:53 < skelterjohn> well, unless you have a return named x and you do a "x := ..." somewhere 23:53 < dfc> this is just my personal opinion 23:53 < dfc> not something i'm going on a crusade about 23:54 < dfc> there are places where named returns are great 23:54 < dfc> like adg's recent defer error handler 23:55 < skelterjohn> link? 23:55 * dfc digs 23:55 < exch> it's the defer/recover setup I imagine 23:55 < exch> it's been aruond for quite a while 23:56 < skelterjohn> func foo() (err os.Error) { defer func() { if e := recover() { err = something } } 23:56 < skelterjohn> ? 23:56 < skelterjohn> modulo making that compile 23:57 < skelterjohn> if e, ok := recover(); ok { .. } 23:57 < dfc> http://code.google.com/p/go/source/browse/src/pkg/mime/multipart/formdata.go?spec=svn638ecff87cc688afb3546d6937cc7606f5479dc2&r=638ecff87cc688afb3546d6937cc7606f5479dc2#24 23:58 < skelterjohn> no recover in there... --- Log closed Fri Apr 29 00:00:50 2011