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

--- Log opened Sun Nov 14 00:00:15 2010
00:08 -!- tobik [~tobik@p54895C5D.dip.t-dialin.net] has quit [Quit: WeeChat 0.3.3]
00:16 -!- Nitro [~Nitro@modemcable189.58-82-70.mc.videotron.ca] has joined
#go-nuts
00:28 -!- yihuang [~yihuang@183.17.153.216] has joined #go-nuts
00:28 -!- yihuang [~yihuang@183.17.153.216] has left #go-nuts []
00:32 -!- Nitro [~Nitro@modemcable189.58-82-70.mc.videotron.ca] has quit [Ping
timeout: 272 seconds]
00:36 -!- Nitro [~Nitro@modemcable189.58-82-70.mc.videotron.ca] has joined
#go-nuts
00:51 -!- devrim [~Adium@cpe-72-225-239-227.nyc.res.rr.com] has quit [Quit:
Leaving.]
00:53 -!- Scorchin [~Scorchin@host86-144-50-243.range86-144.btcentralplus.com] has
quit [Quit: Scorchin]
00:55 -!- Nitro [~Nitro@modemcable189.58-82-70.mc.videotron.ca] has quit [Quit:
This computer has gone to sleep]
01:14 -!- devrim [~Adium@cpe-72-225-239-227.nyc.res.rr.com] has joined #go-nuts
01:17 -!- devrim [~Adium@cpe-72-225-239-227.nyc.res.rr.com] has quit [Client Quit]
01:29 -!- fenicks [~christian@log77-3-82-243-254-112.fbx.proxad.net] has left
#go-nuts []
01:34 -!- ExtraSpice [~XtraSpice@88.118.33.48] has quit [Ping timeout: 240
seconds]
01:45 -!- kanru [~kanru@61-228-155-230.dynamic.hinet.net] has quit [Ping timeout:
264 seconds]
01:45 -!- dj2 [~dj2@mail.ihhotel.com] has joined #go-nuts
01:50 -!- billca42 [~billca42@pool-98-118-36-123.bstnma.fios.verizon.net] has
joined #go-nuts
01:52 -!- billca42 [~billca42@pool-98-118-36-123.bstnma.fios.verizon.net] has quit
[Client Quit]
01:52 -!- billca42 [~billca42@pool-98-118-36-123.bstnma.fios.verizon.net] has
joined #go-nuts
01:53 -!- genbattle [~nick@125-239-210-94.jetstream.xtra.co.nz] has quit [Quit:
Leaving]
02:10 -!- micrypt [~micrypt@138.40.66.80] has joined #go-nuts
02:36 -!- Nitro [~Nitro@modemcable189.58-82-70.mc.videotron.ca] has joined
#go-nuts
02:46 -!- billca42 [~billca42@pool-98-118-36-123.bstnma.fios.verizon.net] has quit
[Ping timeout: 265 seconds]
03:02 -!- Chryson [~Chryson@c-71-61-11-114.hsd1.pa.comcast.net] has joined
#go-nuts
03:04 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
03:16 -!- donp [~donp@184-100-206-241.ptld.qwest.net] has joined #go-nuts
03:22 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
03:32 -!- slp9 [~sl@68-179-130-17.bsr-c9-d1.evv.dhcp.sigecom.net] has joined
#go-nuts
04:05 -!- binarypie [~binarypie@c-24-6-151-185.hsd1.ca.comcast.net] has joined
#go-nuts
04:08 -!- jdp [~justin@24.238.32.162.res-cmts.segr.ptd.net] has quit [Remote host
closed the connection]
04:19 -!- foocraft [~dsc@78.101.110.7] has quit [Quit: Leaving]
04:23 -!- sacho [~sacho@83.228.17.51] has quit [Ping timeout: 245 seconds]
04:28 -!- Nitro [~Nitro@modemcable189.58-82-70.mc.videotron.ca] has quit [Quit:
This computer has gone to sleep]
04:33 -!- aho [~nya@fuld-4d00d02f.pool.mediaWays.net] has joined #go-nuts
04:37 -!- adu [~ajr@pool-173-66-11-168.washdc.fios.verizon.net] has joined
#go-nuts
04:40 -!- belizeangirl [syfrpg@69.41.179.202] has joined #go-nuts
04:41 -!- belizeangirl [syfrpg@69.41.179.202] has quit [Remote host closed the
connection]
04:49 -!- mnoel [~mnoel@c-75-65-250-60.hsd1.la.comcast.net] has quit [Quit: mnoel]
04:53 -!- devrim [~Adium@cpe-72-225-239-227.nyc.res.rr.com] has joined #go-nuts
04:57 -!- crazy2be [~justin@d205-206-130-118.abhsia.telus.net] has joined #go-nuts
04:57 < crazy2be> how can i have a literal { in a file parsed by the
template package?
04:58 -!- gnuvince [~vince@70.35.170.156] has quit [Ping timeout: 245 seconds]
04:59 -!- gnuvince_ [~vince@70.35.170.156] has quit [Ping timeout: 276 seconds]
05:00 -!- gnuvince [~vince@70.35.165.33] has joined #go-nuts
05:02 -!- pjm0616 [~user@110.9.28.120] has quit [Quit: pjm0616]
05:04 -!- impl [impl@atheme/member/impl] has quit [Quit: leaving]
05:05 -!- gnuvince_ [~vince@70.35.165.33] has joined #go-nuts
05:05 -!- pjm0616 [~user@110.9.28.120] has joined #go-nuts
05:05 -!- pjm0616 [~user@110.9.28.120] has quit [Read error: Connection reset by
peer]
05:07 -!- pjm0616 [~user@110.9.28.120] has joined #go-nuts
05:36 -!- gnuvince [~vince@70.35.165.33] has quit [Ping timeout: 265 seconds]
05:37 -!- gnuvince_ [~vince@70.35.165.33] has quit [Ping timeout: 265 seconds]
05:38 -!- sacho [~sacho@83.228.17.51] has joined #go-nuts
05:43 -!- tumdum [~tumdum@unaffiliated/tumdum] has joined #go-nuts
05:44 -!- binarypie [~binarypie@c-24-6-151-185.hsd1.ca.comcast.net] has quit
[Remote host closed the connection]
05:44 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
05:52 -!- dj2 [~dj2@mail.ihhotel.com] has left #go-nuts []
05:56 -!- kanru [~kanru@61-228-155-230.dynamic.hinet.net] has joined #go-nuts
06:02 -!- tumdum [~tumdum@unaffiliated/tumdum] has quit [Quit: tumdum]
06:20 -!- tumdum [~tumdum@aur125.neoplus.adsl.tpnet.pl] has joined #go-nuts
06:20 -!- tumdum [~tumdum@aur125.neoplus.adsl.tpnet.pl] has quit [Changing host]
06:20 -!- tumdum [~tumdum@unaffiliated/tumdum] has joined #go-nuts
06:22 -!- Chryson [~Chryson@c-71-61-11-114.hsd1.pa.comcast.net] has quit [Quit:
Leaving]
06:23 < micrypt> Hi, I can't seem to remember the syntax for dynamically
building a Map from a channel.  Any help?
06:27 -!- donp [~donp@184-100-206-241.ptld.qwest.net] has quit [Quit: Leaving]
06:27 < cbeck> I'm not sure what you mean
06:28 -!- Nitro [~Nitro@modemcable189.58-82-70.mc.videotron.ca] has joined
#go-nuts
06:28 < micrypt> cbeck: Just a second.  I'll put what I have up in a paste
bin.
06:30 < cbeck> I'm on a phone atm, afraid I may not be much help
06:30 < micrypt> cbeck: That's okay.  http://pastie.org/1296468
06:30 < micrypt> cbeck: I'm trying to build a map instead of just printing
out items...
06:39 -!- gnuvince [~vince@64.235.201.71] has joined #go-nuts
06:40 -!- gnuvince_ [~vince@64.235.201.71] has joined #go-nuts
06:41 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
06:43 -!- crazy2be [~justin@d205-206-130-118.abhsia.telus.net] has quit [Remote
host closed the connection]
07:01 < micrypt> Syntax help...  an array of maps?
07:05 < KirkMcDonald> Array?  Or slice?
07:05 < KirkMcDonald> []map[key_t]value_t
07:06 < KirkMcDonald> (If you meant a slice.)
07:11 -!- devrim [~Adium@cpe-72-225-239-227.nyc.res.rr.com] has quit [Quit:
Leaving.]
07:51 -!- itrekkie [~itrekkie@ip72-211-155-194.tc.ph.cox.net] has joined #go-nuts
08:04 -!- itrekkie [~itrekkie@ip72-211-155-194.tc.ph.cox.net] has quit [Quit:
itrekkie]
08:13 < TheSeeker> hmm, godag, and gobuild are all giving me the same access
denied error, after successfully generating a .8 file.  I'm starting to think
there's a bug somewhere.
08:21 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
08:23 < TheSeeker> hmm, 8g is exiting with status 1 in cmd shell, and status
0 in cygwin shell.
08:28 < TheSeeker> argh, no, it's gobuild exiting with status 1, 8g is fine.
%_o
08:30 -!- photron [~photron@port-92-201-253-186.dynamic.qsc.de] has joined
#go-nuts
08:41 -!- photron [~photron@port-92-201-253-186.dynamic.qsc.de] has quit [Ping
timeout: 250 seconds]
08:42 -!- ios [~ios@180.191.92.156] has joined #go-nuts
08:43 -!- ios [~ios@180.191.92.156] has quit [Client Quit]
09:01 -!- foocraft [~dsc@dyn-86-36-41-54.wv.qatar.cmu.edu] has joined #go-nuts
09:06 -!- iomox [~ios@180.191.92.156] has joined #go-nuts
09:07 -!- iomox [~ios@180.191.92.156] has quit [Client Quit]
09:12 -!- tumdum [~tumdum@unaffiliated/tumdum] has quit [Quit: tumdum]
09:17 -!- Tv [~tv@cpe-76-168-227-45.socal.res.rr.com] has joined #go-nuts
09:19 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
09:31 -!- sauerbraten [~sauerbrat@p508CB18E.dip.t-dialin.net] has joined #go-nuts
09:52 -!- Chopinnn [~Chopin@ti0018a380-dhcp2647.bb.online.no] has joined #go-nuts
09:53 -!- Chopinn [~Chopin@ti0018a380-dhcp2647.bb.online.no] has quit [Read error:
Connection reset by peer]
09:56 -!- femtoo [~femto@95-89-197-196-dynip.superkabel.de] has joined #go-nuts
09:57 -!- ExtraSpice [~XtraSpice@88.118.33.48] has joined #go-nuts
10:03 -!- kanru [~kanru@61-228-155-230.dynamic.hinet.net] has quit [Ping timeout:
240 seconds]
10:04 -!- femtooo [~femto@95-89-197-196-dynip.superkabel.de] has joined #go-nuts
10:07 -!- femtoo [~femto@95-89-197-196-dynip.superkabel.de] has quit [Ping
timeout: 255 seconds]
10:07 -!- roto [~roto@64.79.202.154] has quit [Ping timeout: 265 seconds]
10:08 -!- Tv [~tv@cpe-76-168-227-45.socal.res.rr.com] has quit [Ping timeout: 240
seconds]
10:23 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
10:26 -!- kanru [~kanru@61-228-155-230.dynamic.hinet.net] has joined #go-nuts
10:26 -!- roto [~roto@64.79.202.154] has joined #go-nuts
10:30 -!- stalled [~stalled@unaffiliated/stalled] has quit [Ping timeout: 265
seconds]
10:41 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 260 seconds]
10:43 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
10:43 -!- WimC [~WimC@b88055.upc-b.chello.nl] has joined #go-nuts
10:52 -!- terrex [~terrex@84.122.72.127.dyn.user.ono.com] has joined #go-nuts
10:56 -!- WimC [~WimC@b88055.upc-b.chello.nl] has quit [Quit: Colloquy for iPad -
http://colloquy.mobi]
11:10 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 240 seconds]
11:12 < al-maisan> Hello there!  How does one "open" a directory?  os.Open()
only seems to work with files..  I would like to use
http://golang.org/pkg/os/#File.Readdirnames
11:13 < al-maisan> ..  but cannot figure out how to construct a (*File) for
a directory..?
11:27 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
11:32 -!- rlab_ [~Miranda@91.200.158.34] has joined #go-nuts
11:34 < adu> sounds about right
11:34 < adu> usually directory openers are called something different, like
OpenDir
11:35 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 276 seconds]
11:38 < KBme> no
11:39 < KBme> it's as simple as http://pastie.org/1296749
11:39 < KBme> almaisan-away: check that code ^
11:40 -!- adu [~ajr@pool-173-66-11-168.washdc.fios.verizon.net] has quit [Quit:
adu]
11:41 < KBme> you have FileInfo.IsDirectory to check whether the file is a
directory
12:05 -!- DerHorst [~Horst@e176103136.adsl.alicedsl.de] has joined #go-nuts
12:09 -!- lars9 [~lars@dy088-242.ust.hk] has joined #go-nuts
12:09 < lars9> is anyone using GO outside of google?
12:11 -!- tensorpudding [~user@99.148.202.191] has quit [Remote host closed the
connection]
12:18 -!- saschpe [~quassel@77-23-177-40-dynip.superkabel.de] has joined #go-nuts
12:19 -!- lars9 [~lars@dy088-242.ust.hk] has left #go-nuts []
12:22 < exch> I presume most people in here do, and they don't all work for
google
12:23 -!- noktoborus [debian-tor@gateway/tor-sasl/noktoborus] has joined #go-nuts
12:23 -!- saschpe [~quassel@77-23-177-40-dynip.superkabel.de] has quit [Remote
host closed the connection]
12:45 -!- femtoo [~femto@95-89-197-196-dynip.superkabel.de] has joined #go-nuts
12:45 -!- femtooo [~femto@95-89-197-196-dynip.superkabel.de] has quit [Ping
timeout: 250 seconds]
12:48 -!- DerHorst [~Horst@e176103136.adsl.alicedsl.de] has quit [Remote host
closed the connection]
12:51 -!- TheMue [~TheMue@p5DDF5D13.dip.t-dialin.net] has joined #go-nuts
12:52 -!- thomas_b [~thomasb@cm-84.215.47.51.getinternet.no] has joined #go-nuts
13:06 -!- noktoborus [debian-tor@gateway/tor-sasl/noktoborus] has quit [Ping
timeout: 245 seconds]
13:07 < KBme> what is a CL?
13:07 < KBme> i'm guessing it's a codereview, so why is it not CR?
13:07 -!- noktoborus [debian-tor@gateway/tor-sasl/noktoborus] has joined #go-nuts
13:30 -!- noktoborus [debian-tor@gateway/tor-sasl/noktoborus] has quit [Remote
host closed the connection]
13:32 -!- tumdum [~tumdum@unaffiliated/tumdum] has joined #go-nuts
13:41 -!- kaosteori [~kaosteori@41.141.239.216] has joined #go-nuts
13:42 -!- mbohun` [~user@ppp115-156.static.internode.on.net] has joined #go-nuts
13:44 -!- mbohun [~user@ppp115-156.static.internode.on.net] has quit [Ping
timeout: 276 seconds]
13:44 -!- kaosteori [~kaosteori@41.141.239.216] has left #go-nuts ["Leaving"]
13:46 -!- napsy [~luka@88.200.96.18] has quit [Read error: Connection reset by
peer]
13:46 -!- napsy_ [~luka@88.200.96.18] has joined #go-nuts
13:47 -!- noktoborus [debian-tor@gateway/tor-sasl/noktoborus] has joined #go-nuts
13:48 -!- mbohun` [~user@ppp115-156.static.internode.on.net] has quit [Ping
timeout: 265 seconds]
13:49 -!- mbohun`` [~user@ppp115-156.static.internode.on.net] has joined #go-nuts
13:58 -!- tumdum [~tumdum@unaffiliated/tumdum] has quit [Quit: tumdum]
14:11 -!- mbohun`` [~user@ppp115-156.static.internode.on.net] has quit [Remote
host closed the connection]
14:23 -!- ako [~nya@fuld-4d00d3e8.pool.mediaWays.net] has joined #go-nuts
14:25 -!- aho [~nya@fuld-4d00d02f.pool.mediaWays.net] has quit [Disconnected by
services]
14:35 < madari> KBme: change list
14:36 < KBme> sorry?
14:36 < KBme> ah ok
14:36 < KBme> weird, why change list?
14:40 < madari> that's just what they are called...  you do code reviews on
a list of changes
14:41 < nsf> another name: "patch set" and its abbrev (PS) looks not exactly
right
14:41 -!- sauerbraten [~sauerbrat@p508CB18E.dip.t-dialin.net] has quit [Ping
timeout: 255 seconds]
14:42 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
14:43 < madari> from wikipedia: "On many version control systems with atomic
multi-change commits, a changelist, change set, or patch identifies the set of
changes made in a single commit.  This can also represent a sequential view of the
source code, allowing the examination of source "as of" any particular changelist
ID."
14:43 -!- siyb [~siyb@83.216.216.131] has joined #go-nuts
14:44 < siyb> so if i create a package p and want to use methods / functions
in other packages (files?) i have to provide the full reference p.foo() ?
14:45 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3]
14:49 < madari> siyb: you don't have to, but usually it is a good practice
to do so.  when importing packages, you can define the target "namespace" like:
import _ "mypackage" or import analias "formygreatpackage"
14:49 -!- jiunec [~cenuij@93.26.118.217] has joined #go-nuts
14:49 < siyb> madari: i know that packages can be aliased, but then i would
have to use alias.function() right?
14:50 < siyb> perhaps you know some _quality_ tutorial for go, the official
one sucks imho ;)
14:50 < madari> siyb: if you use the first syntax (import _ "...") then the
package would be imported to the current namespace so you could just use
function() directly
14:50 -!- cenuij- [~cenuij@base/student/cenuij] has joined #go-nuts
14:51 -!- cenuij [~cenuij@base/student/cenuij] has quit [Quit: Konversation
terminated!]
14:51 -!- cenuij- [~cenuij@base/student/cenuij] has quit [Remote host closed the
connection]
14:53 < madari> or was it import . "p" ...  i don't remember :(
14:53 < siyb> madari: perhaps i am doing something wrong: i created a
package server with a type Server and imported that in my mainfile using import
"./server", when i try to create a new instance with: var myServer *Server =
new(Server) i get: undefined: Server
14:53 < madari> http://golang.org/doc/go_spec.html#Import_declarations
14:53 < siyb> thanks
14:53 -!- terrex [~terrex@84.122.72.127.dyn.user.ono.com] has quit [Quit:
Leaving.]
14:54 < siyb> ahh ok
14:54 < madari> i hope that explained it =)
14:55 < siyb> it sure does, coming from java i was under the impression,
that a normal import should grant access to the types in question ;)
14:55 -!- jiunec [~cenuij@93.26.118.217] has quit [Ping timeout: 276 seconds]
15:09 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
15:12 -!- Nitro [~Nitro@modemcable189.58-82-70.mc.videotron.ca] has quit [Quit:
This computer has gone to sleep]
15:14 -!- GoBIR [~gobir@res-128-61-89-71.res.gatech.edu] has quit [Ping timeout:
245 seconds]
15:17 -!- GoBIR [~gobir@res-128-61-89-71.res.gatech.edu] has joined #go-nuts
15:18 -!- femtoo [~femto@95-89-197-196-dynip.superkabel.de] has quit [Ping
timeout: 265 seconds]
15:21 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit:
Verlassend]
15:22 -!- femtoo [~femto@95-89-197-196-dynip.superkabel.de] has joined #go-nuts
15:23 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
15:36 -!- sauerbraten [~sauerbrat@p508CB18E.dip.t-dialin.net] has joined #go-nuts
15:36 -!- artefon [~thiago@187.59.208.54] has joined #go-nuts
15:42 -!- mssm [~mssm@ip-95-221-64-37.bb.netbynet.ru] has joined #go-nuts
15:44 -!- micrypt [~micrypt@138.40.66.80] has quit [Quit: Leaving.]
15:58 -!- stalled [~stalled@unaffiliated/stalled] has joined #go-nuts
16:00 -!- Scorchin [~Scorchin@host109-154-144-113.range109-154.btcentralplus.com]
has joined #go-nuts
16:15 -!- meanburrito920 [~john@tmp6c626d05a70e.STUDENT.CWRU.Edu] has joined
#go-nuts
16:15 -!- meanburrito920 [~john@tmp6c626d05a70e.STUDENT.CWRU.Edu] has quit
[Changing host]
16:15 -!- meanburrito920 [~john@unaffiliated/meanburrito920] has joined #go-nuts
16:17 -!- Fish [~Fish@9fans.fr] has joined #go-nuts
16:18 -!- sxs [~sxs@e180001209.adsl.alicedsl.de] has joined #go-nuts
16:18 < sxs> hello
16:23 < TheMue> moo
16:28 -!- photron [~photron@port-92-201-253-186.dynamic.qsc.de] has joined
#go-nuts
16:31 -!- ibiwan [~ibiwan@cpe-72-130-168-122.san.res.rr.com] has joined #go-nuts
16:33 -!- ako [~nya@fuld-4d00d64c.pool.mediaWays.net] has joined #go-nuts
16:33 -!- awidegreen [~quassel@p5DF1E389.dip.t-dialin.net] has joined #go-nuts
16:36 -!- aho [~nya@fuld-4d00d3e8.pool.mediaWays.net] has quit [Ping timeout: 255
seconds]
16:46 -!- kanru [~kanru@61-228-155-230.dynamic.hinet.net] has quit [Ping timeout:
272 seconds]
17:00 -!- Tv [~tv@cpe-76-168-227-45.socal.res.rr.com] has joined #go-nuts
17:02 -!- sxs [~sxs@e180001209.adsl.alicedsl.de] has quit [Quit: sxs]
17:04 -!- sxs [~sxs@e180001209.adsl.alicedsl.de] has joined #go-nuts
17:07 -!- skejoe [~skejoe@188.114.142.231] has joined #go-nuts
17:13 -!- devrim [~Adium@cpe-72-225-239-227.nyc.res.rr.com] has joined #go-nuts
17:22 -!- danslo [~daniel@s5593965d.adsl.wanadoo.nl] has quit [Quit: Leaving.]
17:22 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
17:27 -!- awidegreen_ [~quassel@p5DF1C7D1.dip.t-dialin.net] has joined #go-nuts
17:28 -!- awidegreen [~quassel@p5DF1E389.dip.t-dialin.net] has quit [Ping timeout:
255 seconds]
17:29 -!- Davidian1024 [~Davidian1@cpe-98-27-192-193.neo.res.rr.com] has quit
[Quit: leaving]
17:31 < sxs> I try something like: return foo.bar == nil The compiler
failes, because cannot convert nil to type MyStruct
17:32 < KBme> sxs: check how os.Error does it, it can be compared to nil
17:32 < sxs> i want to check in a function IsNil() if bar has a struct
MyStruct or nothing.
17:32 < sxs> KBme: ok thx
17:32 < KBme> yeah, i was actually wondering about how it did that myself
17:33 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3]
17:33 < Tv> only pointers can be nil
17:33 < KBme> ah!
17:33 < KBme> there you go
17:33 < sxs> TV: How can i check non-pointers if they are setted?
17:34 < KBme> they have to be
17:34 < Tv> sxs: as yourself, what's the "non-set" value..
17:34 < KBme> they can be empty though
17:34 < Tv> you mean "zero value" not "empty"
17:34 < KBme> oh, right
17:34 < KBme> yep
17:34 < Tv> *ask yourself
17:35 < Tv> e.g.  var foo int; // foo is now 0
17:35 < sxs> Tv: Good questin.  I'm absolutely new with Go and come from OOP
with Java.  There i have members.  Some of them can be 'null'
17:35 < sxs> so, now i try to figure out how does this wors in Go
17:35 < Tv> sxs: http://golang.org/doc/go_spec.html#The_zero_value
17:35 < KBme> for a string it would be "", for an int 0, for a struct{int,
string} it would be MyType{0, ""} is that correct Tv?
17:36 < Tv> KBme: yeah
17:36 < sxs> ahhh
17:36 < sxs> thx a lot
17:36 < sxs> type T struct { i int; f float; next *T }
17:36 < sxs> thats it
17:36 < sxs> but what about type T struct { i int; f float; next T }
17:36 < sxs> what will T be?
17:36 < Tv> sxs: impossible?-)
17:37 < Tv> think about it, it's a struct that contains itself that contains
itself
17:37 < Tv> that'd definitely need to be a pointer
17:37 < sxs> ah, sorry, too fast copy paste
17:37 < sxs> lets say type T1 struct { i int; f float; next T2 } what will
T2 be?
17:38 < Tv> sxs: zero value for structs is the zero value of all its members
17:38 < Tv> sxs: if you want all off next to be able to be null, make it a
pointer
17:38 < sxs> ah, ok.  an 'empty' T2 and not nil
17:38 < KBme> sxs: T1{0, 0.0, T2{..}} i would guess
17:38 < Tv> sxs: or have a boolean that tells you whether it's set
17:38 < sxs> Tv: thx a lot
17:39 < sxs> thats totlay different to java ;)
17:39 < sxs> theres everything null
17:39 < Tv> in java, everything is a pointer
17:39 < ibiwan> hey all...  I'm trying to figure out how to make use of
interfaces, but almost all sample code I can find avoids it like the plague...  do
you know of a project that makes integral use of interfaces?
17:39 < KBme> golang ;)
17:39 < ibiwan> for reference, my own attempts lie in making simple data
structures, linked lists and the like
17:39 < sxs> yes, but if you do not assign something to a mmeber the pointer
is nul
17:39 < Tv> ibiwan: have you read
http://golang.org/doc/effective_go.html#interfaces_and_types ?
17:40 < sxs> you helped me a lot :)
17:40 < ibiwan> I have
17:41 < ibiwan> I'm trying to implement a "node" type that I can use at will
for SLLs, DLLs, trees, etc...  so for my "snode" (singly-linked-list node)
interface, I only need one function:
17:41 < Tv> ibiwan: the packages that come with go use a lot of interfaces
like Reader, Writer etc
17:41 < ibiwan> type snode interface { Next() *snode; }
17:42 < sxs> semicolon?
17:42 < ibiwan> still trying to figure out when I need those, too :)
17:43 < sxs> i thought almost never
17:43 < ibiwan> cool
17:43 < ibiwan> so my sticking point is...  how do I make a function that
both requires an snode as input and promises one as output...  then use a less
specific "node" type for both?
17:43 < KBme> yeah, the for clauses are one exception
17:43 < ibiwan> it seems to work for the parameter, just not the return
17:44 < ibiwan> I think when I originally wrote this file I was under the
impression all lines within a block except the last one had to have semicolons...
then I never went back and corrected the file later
17:45 < Tv> ibiwan: func foo(in snode) snode {return in.Next()} // should
just work
17:45 < ibiwan> k
17:45 < ibiwan> brb :)
17:46 < Tv> oh and you probably don't mean *snode in the interface above
17:46 < ibiwan> ok
17:46 < Tv> usually what you do with structs like that is, you make a
pointer to the struct fulfill the interface
17:47 < ibiwan> the examples I was reading seem to be pretty inconsistent in
their use of pointers....  or rather, I can't tell when they use them and when
they just assume a reference type
17:47 < Tv> ^ that was the key insight for me
17:47 < ibiwan> hmmm, ok
17:47 < ibiwan> lemme see what I can do with that
17:48 < Tv> so func (n *LinkedListNode) Next() {return n.next} or something
like that
17:48 < Tv> type LinkedListNode struct {value interface{}, next
*LinkedListNode}
17:49 < ibiwan> aha!  what's that?  I saw it in one place, but not
explained...  "value interface{}"
17:53 < ibiwan> oh, empty interface...  the generic type
17:53 < Tv> it's like C's void*
17:53 < Tv> except typesafe
17:54 < ibiwan> so when I eventually want my nodes to store something, I can
add that field
17:54 < ibiwan> for now I was just trying to get the connections to work in
the first place :)
17:57 -!- sxs [~sxs@e180001209.adsl.alicedsl.de] has quit [Quit: sxs]
17:57 < ibiwan> so the reason that's not "just working" for me...  I have
multiple things; node (struct), pnode, dnode, tnode (interfaces)
17:57 < ibiwan> I'm trying to define node in such a way as to satisfy
multiple interfaces
17:58 -!- mssm [~mssm@ip-95-221-64-37.bb.netbynet.ru] has quit [Ping timeout: 245
seconds]
17:58 < ibiwan> pasting...
18:08 -!- tvw [~tv@e176007121.adsl.alicedsl.de] has joined #go-nuts
18:10 < ibiwan> sorry, got lost in trying to clean it up for public
consumption
18:14 < ibiwan> http://www.copypastecode.com/51310/
18:15 < ibiwan> I'm still trying to figure out how to apply your "pointers
fulfill interfaces", as you can tell
18:16 < Tv> ibiwan: maybe you're chasing that goal for no good reason?
18:16 < Tv> your operation seem really tied to the data structure
18:16 < Tv> interfaces are only useful when there's more than one way of
doing it
18:17 < KBme> like reading, you can read from a file, from a stream, from a
compressed file/stream, from an encrypted file/stream
18:17 < ibiwan> well there's no problem I'm trying to solve here...  except
possibly "not understanding go" :)
18:18 < ibiwan> do yo think what I'm trying to do is not possible?
18:18 < Tv> not sure what you want to do
18:18 < ibiwan> use one node type in several roles for different data
structures
18:19 < ibiwan> "more than one way of doing it" here could be "arranging
nodes for efficient access"
18:20 < Tv> sure but if you e.g.  and ordered tree, you can't .insert()
arbitrary things into just any of the node
18:20 < Tv> s
18:20 < Tv> so it seems like your "i implement this interface" thinking
belongs on the top level of the data structure
18:20 < Tv> .insert() etc
18:21 < Tv> oh wow that's garbled..  i may not have woken up yet ;)
18:22 < ibiwan> heh
18:22 < ibiwan> I wasn't gonna say anything...  assumed ESL :P
18:24 < ibiwan> so assuming my overall goal is stupid, I'd still like to see
it through :)
18:24 -!- glsubri [~glsubri@144.85.121.224] has joined #go-nuts
18:25 < Tv> ibiwan: well, are tree nodes really gonna look like linked list
nodes?
18:25 < Tv> ibiwan: what are the shared operations?
18:25 < Tv> ibiwan: single/doubly linked lists you can do easily
18:25 < ibiwan> at the moment, I'm getting an error that this: type snode
interface { Next() snode; SetNext(snode) } is not implemented by this: func (n
*node) Next() *node { return n.rt; }
18:25 < ibiwan> "(wrong type for Next method)"
18:26 < ibiwan> the nodes?  have left, right, up pointers to other nodes
18:26 < ibiwan> SLL just uses right, DLL uses right and left, TREE uses all
three
18:26 < Tv> your SetNext takes nodes instead of snodes
18:28 < Tv> your Next returns *node instead of snode
18:28 < Tv> you really need to make those match
18:30 < Tv> go doesn't implicitly cast for you
18:30 < ibiwan> processing...
18:32 < ibiwan> I guess I'm having a hard time seeing when I'm "fulfilling
an interface" vs when I'm "type casting"
18:33 < Tv> var foo interface something; var bar MyStruct;
18:33 < Tv> two completely different types
18:33 < Tv> stop thinking java ;)
18:33 < ibiwan> never used java
18:33 < ibiwan> insert takes a parameter of type snode
18:34 < ibiwan> I call it with the address of a node
18:34 < Tv> if your interface says Next() snode, then the Next receivers
that try to fulfill that interface really need to say func (...) Next() snode
18:34 < ibiwan> why is the implicit translation from *node to snode not a
cast?
18:44 -!- DerHorst [~Horst@e176103136.adsl.alicedsl.de] has joined #go-nuts
18:44 -!- belkiss [~kvirc@drn13-1-78-235-168-105.fbx.proxad.net] has joined
#go-nuts
18:45 < glsubri> hello: what should i write for the type "a" with this (i
want "a" as an array): func code (a ???, dec int) {...
18:46 < ibiwan> what do you want an array of?  and do you know about slices?
18:46 < Tv> glsubri: sounds like you want a slice..  foo []bar
18:46 < ibiwan> Tv: here's my working stuff (still pointless, still don't
get the aforementioned distinction) http://www.copypastecode.com/51317/
18:47 < glsubri> i don't know about slices...
18:48 < ibiwan> http://golang.org/doc/effective_go.html#slices
18:48 < ibiwan> http://golang.org/doc/go_for_cpp_programmers.html#Slices
18:48 < glsubri> ibiwan: i don't know C++ nor C...
18:49 < ibiwan> the first link should be good, then :)
18:50 * ibiwan wanders off for a while
18:51 < glsubri> i don't understand what do they "do" ? Why do we use slices
?
18:53 < glsubri> http://pastebin.com/pkrz21XY
18:57 -!- WimC [~WimC@b88055.upc-b.chello.nl] has joined #go-nuts
18:58 -!- WimC [~WimC@b88055.upc-b.chello.nl] has left #go-nuts []
18:59 -!- femtooo [~femto@95-89-197-196-dynip.superkabel.de] has joined #go-nuts
19:00 -!- TMKCodes [~TMKCodes@85-156-154-78.elisa-mobile.fi] has joined #go-nuts
19:01 -!- femtoo [~femto@95-89-197-196-dynip.superkabel.de] has quit [Ping
timeout: 240 seconds]
19:03 -!- glsubri [~glsubri@144.85.121.224] has quit [Quit: Quitte]
19:05 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
19:14 -!- almaisan-away [~al-maisan@static.124.133.47.78.clients.your-server.de]
has quit [Ping timeout: 250 seconds]
19:14 -!- Scorchin [~Scorchin@host109-154-144-113.range109-154.btcentralplus.com]
has quit [Quit: Scorchin]
19:17 -!- jeff2 [~sername@c-98-210-113-215.hsd1.ca.comcast.net] has joined
#go-nuts
19:18 -!- almaisan-away [~al-maisan@static.124.133.47.78.clients.your-server.de]
has joined #go-nuts
19:20 -!- sxs [~sxs@e180001209.adsl.alicedsl.de] has joined #go-nuts
19:31 -!- danslo [~daniel@s5593965d.adsl.wanadoo.nl] has joined #go-nuts
19:32 -!- skejoe_ [~skejoe@188.114.142.231] has joined #go-nuts
19:35 -!- skejoe [~skejoe@188.114.142.231] has quit [Ping timeout: 255 seconds]
19:38 -!- almaisan-away [~al-maisan@static.124.133.47.78.clients.your-server.de]
has quit [Ping timeout: 260 seconds]
19:39 < sxs> is it not possable to pass nil to a constructor function: t :=
NewTre(nil)
19:40 < sxs> is it the objective-c way like with multiple initializers:
NewTree() and NewTreeWithStruct(s MyStruct)?
19:41 -!- almaisan-away [~al-maisan@static.124.133.47.78.clients.your-server.de]
has joined #go-nuts
19:44 -!- femtooo [~femto@95-89-197-196-dynip.superkabel.de] has quit [Quit:
Leaving]
19:45 -!- sxs [~sxs@e180001209.adsl.alicedsl.de] has quit [Quit: sxs]
19:47 -!- laurent__ [~laurent@bro29-2-88-164-251-126.fbx.proxad.net] has joined
#go-nuts
19:47 -!- sacho [~sacho@83.228.17.51] has quit [Ping timeout: 255 seconds]
19:47 < laurent__> help
19:51 -!- Surma [~surma@91-64-183-10-dynip.superkabel.de] has joined #go-nuts
19:52 < Surma> Hey guys.  Anyone ever had prof fail with "could not attach
to child process: mach: failure" (darwin 386)
19:55 < Surma> Nevermind, figured it out.  It's missing sudo right, even
though I ran sudo.bash
19:55 < Surma> I'll take a look into it and maybe file an issue
20:00 < al-maisan> Hello there, I am trying to build the gotags tool
(http://bitbucket.org/sigpipe/gotags) but am getting compile errors
(http://pastebin.ubuntu.com/531919/) ..  did anybody manage to get this compiled?
20:00 < al-maisan> ..  or is the a better way to generate exuberant-ctags
like tags?
20:00 < al-maisan> there even
20:02 < laurent__> Hi all, I use freetype-go it works well but I try to
stroke a simple polyline with path, lines are not joined very well
20:02 -!- sacho [~sacho@83.228.17.51] has joined #go-nuts
20:03 < laurent__> ...  I use path.Start(p1); path.Add1(p2); path.Add1(p3)
then rasteriser.AddStroke :-(
20:07 -!- museun1 [~what@c-76-122-126-43.hsd1.ga.comcast.net] has quit [Ping
timeout: 276 seconds]
20:09 < al-maisan> hmm ..  any idea what the 'mode' parameter to
http://golang.org/pkg/go/parser/#ParseFile should be set to?
20:09 < al-maisan> "The mode parameter controls the amount of source text
parsed and other optional parser functionality."
20:09 < al-maisan> ???
20:12 -!- sxs [~sxs@e180001209.adsl.alicedsl.de] has joined #go-nuts
20:16 -!- MaksimBurnin [~max@44.188-224-87.telenet.ru] has joined #go-nuts
20:16 -!- Scorchin [~Scorchin@host109-154-144-113.range109-154.btcentralplus.com]
has joined #go-nuts
20:17 -!- Scorchin [~Scorchin@host109-154-144-113.range109-154.btcentralplus.com]
has quit [Client Quit]
20:17 < al-maisan> fwiw, the following changes fix the gotags tool:
http://pastebin.ubuntu.com/531932/
20:17 -!- Scorchin [~Scorchin@host109-154-144-113.range109-154.btcentralplus.com]
has joined #go-nuts
20:20 -!- sxs [~sxs@e180001209.adsl.alicedsl.de] has quit [Quit: sxs]
20:25 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has quit [Ping
timeout: 240 seconds]
20:26 -!- museun1 [~what@c-76-122-126-43.hsd1.ga.comcast.net] has joined #go-nuts
20:28 < MaksimBurnin> This is offtopic but does anyone know a good GUI for
GDB with ability to trace a binary without debug symbols and sources (disassamble
it)
20:29 < MaksimBurnin> i tryed some, but they reqiring debug symbols
20:31 < MaksimBurnin> and i hate console version of gdb for this purpose.  i
like OllyDBG and IDA more, but they for windows...
20:32 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has joined
#go-nuts
20:33 < Tv> MaksimBurnin: maybe try ddd, it's built on top of gdb but has a
decent ui
20:33 < Tv> it's been years since i used it, though
20:33 < MaksimBurnin> Thanks, ill try it)
20:36 -!- b00m_chef [~watr@66.183.108.186] has joined #go-nuts
20:38 -!- DerHorst [~Horst@e176103136.adsl.alicedsl.de] has quit [Remote host
closed the connection]
20:38 -!- laurent__ [~laurent@bro29-2-88-164-251-126.fbx.proxad.net] has left
#go-nuts []
20:40 -!- laurent__ [~laurent@2a01:e35:8a4f:b7e0:3615:9eff:fe2f:6a70] has joined
#go-nuts
20:42 -!- laurent__ [~laurent@2a01:e35:8a4f:b7e0:3615:9eff:fe2f:6a70] has left
#go-nuts []
20:45 < MaksimBurnin> Tv: ive put a break at entrypoint, then clicked 'run',
gdb worked well, but i got "A syntax error in expression, near
0x...................." in a Machine code window
20:50 -!- adu [~ajr@64.134.242.23] has joined #go-nuts
20:57 -!- b00m_chef [~watr@66.183.108.186] has quit [Quit: Leaving]
20:57 -!- b00m_chef [~watr@66.183.108.186] has joined #go-nuts
21:02 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3]
21:05 * MaksimBurnin LOL at KDB's not todo list "A graphical display like DDD
has."
21:08 -!- Tv [~tv@cpe-76-168-227-45.socal.res.rr.com] has quit [Ping timeout: 245
seconds]
21:08 -!- adu [~ajr@64.134.242.23] has quit [Quit: adu]
21:09 -!- unhygienix [~unhygieni@host81-151-88-236.range81-151.btcentralplus.com]
has joined #go-nuts
21:09 -!- unhygienix [~unhygieni@host81-151-88-236.range81-151.btcentralplus.com]
has quit [Client Quit]
21:12 -!- tensorpudding [~user@99.148.202.191] has joined #go-nuts
21:21 -!- boscop_ [~boscop@g226225156.adsl.alicedsl.de] has joined #go-nuts
21:23 -!- boscop [~boscop@g227014227.adsl.alicedsl.de] has quit [Ping timeout: 245
seconds]
21:23 -!- belkiss [~kvirc@drn13-1-78-235-168-105.fbx.proxad.net] has quit [Quit:
KVIrc 4.0.2 Insomnia http://www.kvirc.net/]
21:24 -!- Surma [~surma@91-64-183-10-dynip.superkabel.de] has quit [Quit:
Leaving.]
21:25 -!- b00m_chef [~watr@66.183.108.186] has quit [Quit: Leaving]
21:26 -!- brebre31 [onykgd@69.41.179.202] has joined #go-nuts
21:27 -!- watr [~watr@66.183.108.186] has joined #go-nuts
21:27 < brebre31> hi
21:28 -!- watr [~watr@66.183.108.186] has quit [Client Quit]
21:28 -!- sauerbraten [~sauerbrat@p508CB18E.dip.t-dialin.net] has quit [Remote
host closed the connection]
21:28 * ibiwan wanders back
21:28 -!- b00m_chef [~watr@66.183.108.186] has joined #go-nuts
21:28 < brebre31> it bored
21:29 < ibiwan> Tv, any further commentary on my type confusion?
21:30 < brebre31> lol ok
21:33 < brebre31> bye room
21:34 < brebre31> go nuts
21:35 -!- Makoryu [~bloodgog@pool-71-174-191-10.bstnma.fios.verizon.net] has
joined #go-nuts
21:44 * MaksimBurnin founds out there is no way to trace a linux binay without
symbols, using GUI, and starts to write over 9000 aliases for gdb
21:44 -!- brebre31 [onykgd@69.41.179.202] has left #go-nuts ["Chatmosphere"]
21:45 -!- ibiwan [~ibiwan@cpe-72-130-168-122.san.res.rr.com] has left #go-nuts []
21:53 -!- snearch [~snearch@f053002207.adsl.alicedsl.de] has joined #go-nuts
22:01 -!- snearch [~snearch@f053002207.adsl.alicedsl.de] has quit [Quit:
Verlassend]
22:11 -!- TheMue [~TheMue@p5DDF5D13.dip.t-dialin.net] has quit [Quit: TheMue]
22:16 -!- ymasory [~ymasory@c-76-99-55-224.hsd1.pa.comcast.net] has joined
#go-nuts
22:34 -!- skejoe_ [~skejoe@188.114.142.231] has quit [Quit: Lost terminal]
22:34 -!- Fish [~Fish@9fans.fr] has quit [Quit: So Long, and Thanks for All the
Fish]
22:35 -!- Scorchin [~Scorchin@host109-154-144-113.range109-154.btcentralplus.com]
has quit [Quit: Scorchin]
23:08 -!- rlab_ [~Miranda@91.200.158.34] has quit [Quit: Miranda IM! Smaller,
Faster, Easier.  http://miranda-im.org]
23:09 -!- photron [~photron@port-92-201-253-186.dynamic.qsc.de] has quit [Ping
timeout: 276 seconds]
23:13 -!- fenicks [~christian@log77-3-82-243-254-112.fbx.proxad.net] has joined
#go-nuts
23:13 -!- awidegreen_ [~quassel@p5DF1C7D1.dip.t-dialin.net] has quit [Remote host
closed the connection]
23:14 -!- brebre31 [qsmcqs@69.41.179.202] has joined #go-nuts
23:15 < brebre31> hi
23:18 -!- brebre31 [qsmcqs@69.41.179.202] has left #go-nuts ["Chatmosphere"]
23:27 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit:
Verlassend]
23:32 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
23:33 < fenicks> hello
23:46 -!- napsy [~luka@88.200.96.18] has quit [Quit: Lost terminal]
23:55 < KBme> is it possible to define values a type can have, or one has to
check that in runtime?
--- Log closed Mon Nov 15 00:00:15 2010