--- Log opened Thu Nov 25 00:00:19 2010
00:07 -!- rbraley_ [~rbraley@ip72-222-129-34.ph.ph.cox.net] has joined #go-nuts
00:07 -!- rbraley [~rbraley@ip72-222-129-34.ph.ph.cox.net] has quit [Ping timeout:
245 seconds]
00:07 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts
00:08 -!- SRabbelier [~SRabbelie@188.142.63.148] has joined #go-nuts
00:09 -!- Wiz126 [~Wiz126@24.229.245.72.res-cmts.sm.ptd.net] has joined #go-nuts
00:17 -!- cmarcelo_ [~cmarcelo@187.112.10.101] has quit [Quit: Leaving]
00:21 -!- rlab [~Miranda@91.200.158.34] has quit [Read error: Connection reset by
peer]
00:22 -!- SirPsychoS [~sp@cpe-174-103-151-189.cinci.res.rr.com] has quit [Ping
timeout: 250 seconds]
00:25 -!- rhencke [~rhencke@ppp-70-247-243-221.dsl.ltrkar.swbell.net] has quit
[Quit: rhencke]
00:36 -!- Tuller [~tuller@c-69-143-52-174.hsd1.va.comcast.net] has quit [Quit:
Computer has gone to sleep.]
00:39 -!- DrHennessy [~alex@c-24-10-221-165.hsd1.ut.comcast.net] has joined
#go-nuts
00:47 -!- cco3 [~conley@c-69-181-138-209.hsd1.ca.comcast.net] has joined #go-nuts
00:56 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3]
01:02 -!- kanru [~kanru@114-45-232-142.dynamic.hinet.net] has quit [Ping timeout:
240 seconds]
01:03 -!- enherit [~enherit@cpe-98-149-170-48.socal.res.rr.com] has quit [Quit:
Lost terminal]
01:03 -!- Venom_X [~pjacobs@66.54.185.131] has quit [Quit: Venom_X]
01:06 -!- powerje [~powerj@adsl-75-60-240-164.dsl.wotnoh.sbcglobal.net] has joined
#go-nuts
01:11 -!- jdp [PHUNK@24.238.32.162.res-cmts.segr.ptd.net] has quit []
01:17 -!- gnuvince_ [~vince@72.0.215.119] has quit [Ping timeout: 264 seconds]
01:17 -!- gnuvince [~vince@64.235.201.71] has quit [Ping timeout: 240 seconds]
01:18 -!- gnuvince [~vince@64.235.201.71] has joined #go-nuts
01:18 -!- gnuvince_ [~vince@72.0.215.119] has joined #go-nuts
01:19 -!- krutcha [~krutcha@remote.icron.com] has quit [Quit: Leaving]
01:24 -!- scandium [~rainer@95-90-126-141-dynip.superkabel.de] has joined #go-nuts
01:24 < thiago__> is there Raw Sockets suport in GO?
01:25 -!- niemeyer [~niemeyer@189-10-175-46.pltce701.dsl.brasiltelecom.net.br] has
quit [Ping timeout: 245 seconds]
01:25 -!- gnuvince_ [~vince@72.0.215.119] has quit [Ping timeout: 276 seconds]
01:25 -!- shvntr [~shvntr@113.84.146.186] has joined #go-nuts
01:25 -!- gnuvince [~vince@64.235.201.71] has quit [Ping timeout: 240 seconds]
01:26 < papna> thiago__: rawer than the net module?
01:26 < thiago__> i didnt find how to read raw packets
01:27 < papna> TCP doesn't have packets.
01:27 < uriel> why do you need to do that?
01:27 -!- gnuvince [~vince@64.235.201.71] has joined #go-nuts
01:28 < thiago__> uriel: i want to write a lib for network debug
01:28 < thiago__> uriel: like wireshark
01:29 < uriel> aha
01:29 < thiago__> papna: yes they have
01:29 -!- powerje [~powerj@adsl-75-60-240-164.dsl.wotnoh.sbcglobal.net] has quit
[Read error: Connection reset by peer]
01:29 < uriel> I think there were some bindings you might find useful for
that, check http://go-lang.cat-v.org/library-bindings
01:29 < papna> thiago__: Nope.
01:29 < uriel> papna: ip obviously does have packets
01:29 < papna> thiago__: IP has packets.
01:30 < papna> uriel: IP doesn't have sockets.
01:30 < uriel> well, obviously, and Go has no sockets either
01:30 < uriel> but that is just playing around with terminology
01:30 < papna> Using sockets and looking at packets are two very different
things.
01:31 < thiago__> uriel: i dont want to bind, i thought about a lib just
work a ĺittle more with go
01:31 < thiago__> uriel: they have a pcap binding
01:32 -!- gnuvince_ [~vince@70.35.161.24] has joined #go-nuts
01:32 < uriel> I have no clue what you mean, but at the end of the day,
whatever you want to do, should be possible using the syscall package
01:33 < thiago__> humm
01:33 < thiago__> uriel: yes..  seems like this is what i want
01:33 < thiago__> uriel: thanks
01:36 -!- rhencke [~rhencke@ppp-70-247-243-221.dsl.ltrkar.swbell.net] has joined
#go-nuts
01:38 -!- rhencke_ [~rhencke@ppp-70-247-243-221.dsl.ltrkar.swbell.net] has joined
#go-nuts
01:38 -!- rhencke [~rhencke@ppp-70-247-243-221.dsl.ltrkar.swbell.net] has quit
[Read error: Connection reset by peer]
01:44 -!- thiago__ [~thiago@189.59.133.191] has quit [Read error: Connection reset
by peer]
01:50 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has joined #go-nuts
01:56 -!- tvw [~tv@e176005109.adsl.alicedsl.de] has quit [Ping timeout: 252
seconds]
01:59 -!- evilclone [~graham@dyn1065-37.hor.ic.ac.uk] has joined #go-nuts
01:59 < evilclone> anyone know of a decent twitter client lib for go?  I'm
just looking for something that will let me push a status update...
02:07 -!- tav [~tav@92.7.139.37] has quit [Quit: Hakuna Matata]
02:07 -!- tav [~tav@92.7.139.37] has joined #go-nuts
02:11 -!- sauerbraten [~sauerbrat@p508CCFB2.dip.t-dialin.net] has quit [Remote
host closed the connection]
02:15 -!- felipe [~felipe@my.nada.kth.se] has quit [Quit: felipe]
02:21 -!- evilclone [~graham@dyn1065-37.hor.ic.ac.uk] has quit [Quit: Leaving]
02:25 -!- Tuller [~tuller@c-69-143-52-174.hsd1.va.comcast.net] has joined #go-nuts
02:29 -!- Tuller [~tuller@c-69-143-52-174.hsd1.va.comcast.net] has quit [Client
Quit]
02:32 -!- DrHennessy [~alex@c-24-10-221-165.hsd1.ut.comcast.net] has quit [Quit:
DrHennessy]
02:33 -!- cco3 [~conley@c-69-181-138-209.hsd1.ca.comcast.net] has quit [Read
error: Connection reset by peer]
02:33 -!- cco3 [~conley@c-69-181-138-209.hsd1.ca.comcast.net] has joined #go-nuts
02:35 -!- DrHennessy [~alex@c-24-10-221-165.hsd1.ut.comcast.net] has joined
#go-nuts
02:47 -!- Eridius [~kevin@unaffiliated/eridius] has quit [Ping timeout: 265
seconds]
02:52 -!- gnuvince1 [~vince@70.35.173.236] has joined #go-nuts
02:54 -!- gnuvince_ [~vince@70.35.161.24] has quit [Ping timeout: 252 seconds]
03:03 -!- falconindy [~noclaf@unaffiliated/falconindy] has quit [Quit: Lost
terminal]
03:20 -!- felipe [~felipe@my.nada.kth.se] has joined #go-nuts
03:24 -!- Guest54911 [~mcot@pool-71-171-113-161.clppva.fios.verizon.net] has quit
[Ping timeout: 260 seconds]
03:35 -!- mikespook [~mikespook@58.61.203.74] has joined #go-nuts
04:01 -!- scandium [~rainer@95-90-126-141-dynip.superkabel.de] has quit [Quit:
Leaving]
04:04 -!- gnuvince_ [~vince@205.170-ppp.3menatwork.com] has joined #go-nuts
04:06 -!- gnuvince1 [~vince@70.35.173.236] has quit [Ping timeout: 250 seconds]
04:08 -!- noktoborus [~noxless@gateway/tor-sasl/noktoborus] has quit [Quit:
noktoborus]
04:12 -!- gnuvince_ [~vince@205.170-ppp.3menatwork.com] has quit [Ping timeout:
265 seconds]
04:19 -!- gnuvince_ [~vince@72.0.221.33] has joined #go-nuts
04:27 -!- gnuvince_ [~vince@72.0.221.33] has quit [Ping timeout: 255 seconds]
04:30 -!- rejb [~rejb@unaffiliated/rejb] has quit [Ping timeout: 276 seconds]
04:32 -!- jcao219 [~jcao219@pool-96-226-238-248.dllstx.fios.verizon.net] has
joined #go-nuts
04:33 -!- jcao219 [~jcao219@pool-96-226-238-248.dllstx.fios.verizon.net] has left
#go-nuts []
05:09 -!- krutcha [~krutcha@S010600045a27676a.vs.shawcable.net] has joined
#go-nuts
05:14 -!- SirPsychoS [~sp@cpe-174-103-151-189.cinci.res.rr.com] has joined
#go-nuts
05:17 -!- DrHennessy [~alex@c-24-10-221-165.hsd1.ut.comcast.net] has quit [Ping
timeout: 265 seconds]
05:18 -!- DrHennessy [~alex@c-24-10-221-165.hsd1.ut.comcast.net] has joined
#go-nuts
05:31 -!- rhencke [~rhencke@ppp-70-247-243-221.dsl.ltrkar.swbell.net] has quit
[Quit: rhencke]
05:38 -!- krutcha [~krutcha@S010600045a27676a.vs.shawcable.net] has quit [Quit:
Leaving]
05:40 -!- matti____ [~mumboww@c-98-207-108-218.hsd1.ca.comcast.net] has left
#go-nuts []
05:40 -!- stalled [~stalled@unaffiliated/stalled] has quit [Ping timeout: 265
seconds]
05:53 -!- stalled [~stalled@unaffiliated/stalled] has joined #go-nuts
06:10 -!- zozoR [~zozoR@5634798d.rev.stofanet.dk] has joined #go-nuts
07:16 -!- photron_ [~photron@port-92-201-1-56.dynamic.qsc.de] has joined #go-nuts
07:25 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
07:27 -!- Tv [~tv@cpe-76-168-227-45.socal.res.rr.com] has quit [Ping timeout: 252
seconds]
07:37 -!- krutcha [~krutcha@S010600045a27676a.vs.shawcable.net] has joined
#go-nuts
07:37 -!- fenicks [~christian@log77-3-82-243-254-112.fbx.proxad.net] has quit
[Quit: Leaving.]
07:39 -!- wrtp [~rog@92.17.25.224] has joined #go-nuts
07:43 -!- tensorpudding [~user@99.148.202.191] has quit [Read error: Connection
reset by peer]
07:45 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
07:52 -!- skejoe [~skejoe@188.114.142.231] has joined #go-nuts
07:56 -!- ShadowIce
[~pyoro@HSI-KBW-109-193-120-162.hsi7.kabel-badenwuerttemberg.de] has joined
#go-nuts
07:56 -!- ShadowIce
[~pyoro@HSI-KBW-109-193-120-162.hsi7.kabel-badenwuerttemberg.de] has quit
[Changing host]
07:56 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
07:57 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has quit [Ping
timeout: 276 seconds]
07:58 -!- IRWolfie- [irwolfie@ircnoob.com] has quit [Read error: Connection reset
by peer]
07:58 -!- IRWolfie- [irwolfie@ircnoob.com] has joined #go-nuts
07:59 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has joined #go-nuts
08:08 -!- MaksimBurnin [~max@44.188-224-87.telenet.ru] has quit [Ping timeout: 245
seconds]
08:12 -!- DrHennessy [~alex@c-24-10-221-165.hsd1.ut.comcast.net] has quit [Quit:
DrHennessy]
08:19 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Quit: Leaving]
08:24 -!- welterde [welterde@thinkbase.srv.welterde.de] has quit [Ping timeout:
245 seconds]
08:26 -!- zozoR [~zozoR@5634798d.rev.stofanet.dk] has quit [Quit: Morten.  Desu~]
08:27 -!- ShadowIce`
[~pyoro@HSI-KBW-109-193-120-162.hsi7.kabel-badenwuerttemberg.de] has joined
#go-nuts
08:27 -!- ShadowIce`
[~pyoro@HSI-KBW-109-193-120-162.hsi7.kabel-badenwuerttemberg.de] has quit
[Changing host]
08:27 -!- ShadowIce` [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
08:27 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
08:28 -!- skejoe [~skejoe@188.114.142.231] has quit [Quit: leaving]
08:31 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Ping
timeout: 250 seconds]
08:37 -!- thomas_b [~thomasb@cm-84.215.47.51.getinternet.no] has quit [Ping
timeout: 272 seconds]
08:38 -!- thomas_b [~thomasb@cm-84.215.47.51.getinternet.no] has joined #go-nuts
08:44 -!- sxs [~sxs@HSI-KBW-078-042-201-030.hsi3.kabel-badenwuerttemberg.de] has
joined #go-nuts
08:50 -!- shvntr [~shvntr@113.84.146.186] has quit [Quit: leaving]
09:11 -!- niekie [~niek@CAcert/Assurer/niekie] has joined #go-nuts
09:12 -!- krutcha [~krutcha@S010600045a27676a.vs.shawcable.net] has quit [Quit:
Leaving]
09:15 -!- niekie [~niek@CAcert/Assurer/niekie] has quit [Ping timeout: 245
seconds]
09:21 -!- mikespook [~mikespook@58.61.203.74] has quit [Quit: Leaving.]
09:28 -!- niekie [~niek@CAcert/Assurer/niekie] has joined #go-nuts
09:38 -!- niekie [~niek@CAcert/Assurer/niekie] has quit [Ping timeout: 245
seconds]
09:46 -!- RCua [~cua@unaffiliated/coconutcrab] has joined #go-nuts
09:46 -!- Fish [~Fish@9fans.fr] has joined #go-nuts
10:04 -!- nictuku [~nictuku@cetico.org] has quit [Ping timeout: 240 seconds]
10:09 -!- nictuku [~nictuku@cetico.org] has joined #go-nuts
10:12 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 250 seconds]
10:33 -!- welterde [welterde@thinkbase.srv.welterde.de] has joined #go-nuts
10:40 -!- crashR [~crasher@codextreme.pck.nerim.net] has quit [Read error: No
route to host]
10:40 -!- crashR [~crasher@codextreme.pck.nerim.net] has joined #go-nuts
10:47 -!- saschpe_ [~quassel@opensuse/member/saschpe] has joined #go-nuts
10:50 -!- artefon [~thiago@187.58.197.115] has joined #go-nuts
10:51 -!- ExtraSpice [~XtraSpice@88.118.33.48] has joined #go-nuts
10:52 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts
10:54 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
10:54 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has quit [Ping timeout:
612 seconds]
10:59 -!- RCua [~cua@unaffiliated/coconutcrab] has quit [Quit: duh]
11:03 -!- saschpe_ [~quassel@opensuse/member/saschpe] has quit [Remote host closed
the connection]
11:10 -!- noktoborus_ [~noxless@gateway/tor-sasl/noktoborus] has joined #go-nuts
11:22 -!- almaisan-away [~al-maisan@static.124.133.47.78.clients.your-server.de]
has quit [Remote host closed the connection]
11:28 -!- skejoe [~skejoe@188.114.142.231] has joined #go-nuts
11:37 -!- Fish [~Fish@9fans.fr] has quit [Quit: So Long, and Thanks for All the
Fish]
11:44 -!- niemeyer [~niemeyer@189-10-175-46.pltce701.dsl.brasiltelecom.net.br] has
joined #go-nuts
11:54 -!- eikenberry [~jae@ivanova.zhar.net] has quit [Quit: End of line.]
11:56 -!- tvw [~tv@212.79.9.150] has joined #go-nuts
11:56 -!- tvw [~tv@212.79.9.150] has quit [Remote host closed the connection]
11:57 -!- tvw [~tv@212.79.9.150] has joined #go-nuts
12:12 -!- gr0gmint [~quassel@87.60.23.38] has joined #go-nuts
12:19 -!- photron_ [~photron@port-92-201-1-56.dynamic.qsc.de] has quit [Ping
timeout: 260 seconds]
12:27 -!- noktoborus_ [~noxless@gateway/tor-sasl/noktoborus] has quit [Quit:
noktoborus_]
12:41 -!- cco3 [~conley@c-69-181-138-209.hsd1.ca.comcast.net] has quit [Ping
timeout: 240 seconds]
12:47 -!- XenoPhoenix [~Xeno@cpc5-aztw24-2-0-cust39.aztw.cable.virginmedia.com]
has quit [Ping timeout: 245 seconds]
12:48 -!- XenoPhoenix [~Xeno@cpc5-aztw24-2-0-cust39.aztw.cable.virginmedia.com]
has joined #go-nuts
12:48 -!- saschpe_ [~quassel@opensuse/member/saschpe] has joined #go-nuts
12:48 -!- noktoborus_ [~noxless@gateway/tor-sasl/noktoborus] has joined #go-nuts
12:49 -!- saschpe_ [~quassel@opensuse/member/saschpe] has quit [Remote host closed
the connection]
12:50 -!- noktoborus_ [~noxless@gateway/tor-sasl/noktoborus] has quit [Remote host
closed the connection]
12:53 -!- noktoborus_ [~noxless@gateway/tor-sasl/noktoborus] has joined #go-nuts
12:55 -!- sauerbraten [~sauerbrat@p508CFA59.dip.t-dialin.net] has joined #go-nuts
13:11 -!- saschpe_ [~quassel@opensuse/member/saschpe] has joined #go-nuts
13:14 -!- noktoborus_ [~noxless@gateway/tor-sasl/noktoborus] has quit [Ping
timeout: 245 seconds]
13:19 -!- noktoborus_ [~noxless@gateway/tor-sasl/noktoborus] has joined #go-nuts
13:20 -!- noktoborus_ [~noxless@gateway/tor-sasl/noktoborus] has quit [Read error:
Connection reset by peer]
13:21 -!- noktoborus_ [~noxless@gateway/tor-sasl/noktoborus] has joined #go-nuts
13:43 -!- gr0gmint [~quassel@87.60.23.38] has quit [Remote host closed the
connection]
13:47 -!- Rezzie [561b1b1e@gateway/web/freenode/ip.86.27.27.30] has joined
#go-nuts
13:47 -!- alc [~arx@222.128.147.38] has joined #go-nuts
13:48 < Rezzie> How can I convert a single character (digit) from a string
into a integer?  e.g.  demo := "123"; myInt := demo[0] -- myInt should equal
int(1).  Thanks.
13:48 < TheSeeker> atoi?
13:49 -!- zozoR [~zozoR@5634798d.rev.stofanet.dk] has joined #go-nuts
13:49 < TheSeeker> http://golang.org/pkg/strconv/
13:50 < Rezzie> TheSeeker: Running that I get: "cannot use demo[0] (type
uint8) as type string in function argument"
13:51 < TheSeeker> myInt, err := AtoI(string(demo[0])) ?
13:53 < Rezzie> Ah, thanks.
13:55 < wrtp> Rezzie: demo[0] - '0'
13:56 -!- artefon [~thiago@187.58.197.115] has quit [Quit: bye]
13:59 -!- DerHorst [~Horst@e176101002.adsl.alicedsl.de] has joined #go-nuts
14:01 -!- saschpe_ [~quassel@opensuse/member/saschpe] has quit [Remote host closed
the connection]
14:01 < Rezzie> Thanks wrtp.
14:02 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has quit [Ping timeout: 272
seconds]
14:05 < wrtp> Rezzie: of course it won't work if it's not a digit...
14:09 -!- RCua [~cua@unaffiliated/coconutcrab] has joined #go-nuts
14:10 < Rezzie> It's guaranteed to be a digit :)
14:12 -!- saschpe_ [~quassel@opensuse/member/saschpe] has joined #go-nuts
14:12 -!- noam [noam@77.126.175.215] has quit [Ping timeout: 240 seconds]
14:12 < TheSeeker> demo[0] = int 49 here.
14:15 -!- sauerbraten_ [~sauerbrat@p508CD251.dip.t-dialin.net] has joined #go-nuts
14:15 -!- sauerbraten [~sauerbrat@p508CFA59.dip.t-dialin.net] has quit [Ping
timeout: 264 seconds]
14:16 < Rainburst> func Sscan(str string, a ...interface{}) (n int, err
os.Error) You can use this, i think
14:19 -!- noam [noam@77.126.175.215] has joined #go-nuts
14:19 < wrtp> TheSeeker: ...  and you'll find that '0' = int 48
14:20 < wrtp> Rainburst: that's a very heavyweight way of doing it
14:20 < TheSeeker> demo := "123" not "0123" ...
14:21 < Rezzie> demo := "123"; myInt := int(demo[0] - '0') -- myInt equals
int(1) for me.  Seems to be lighter than using strconv?
14:21 < Rezzie> (and expected result)
14:22 < TheSeeker> ah
14:22 < Rezzie> Thank you both though.  Still learning the language :)
14:22 < TheSeeker> I was seeing "demo[0] - '0'" and reading "demo[0] = '0'"
14:27 -!- Rezzie [561b1b1e@gateway/web/freenode/ip.86.27.27.30] has quit []
14:30 -!- sauerbraten_ [~sauerbrat@p508CD251.dip.t-dialin.net] has quit [Quit:
Leaving]
14:31 -!- anacrolix [~matt@ppp121-45-198-116.lns20.cbr1.internode.on.net] has
joined #go-nuts
14:31 < anacrolix> hello
14:31 < anacrolix> i'm confused about why this statement fails to compile:
14:32 < anacrolix> for _, arg string = range flag.Args() {
14:32 < anacrolix> since i don't care what the type of _ is
14:33 < TheSeeker> hmm, use := ?
14:33 < anacrolix> i could, but shouldn't i be able to restrict the type to
_ int, arg string by using =?
14:34 < anacrolix> i'm curious as to what for ...  = range means
14:35 < wrtp> you can't put the type in there
14:36 < wrtp> anacrolix: you could do: var arg string; for _, arg = range
flag.Args()
14:36 < anacrolix> ohhh
14:36 < anacrolix> by doing var string; have i created an uninitialized
string?
14:36 < anacrolix> "nil" so to speak?
14:36 < wrtp> no, it's initialised to ""
14:37 < wrtp> (that's the zero value for a string)
14:38 < TheSeeker> hmm http://golang.org/doc/effective_go.html#for
14:44 < anacrolix> how do i return 1 from main?  (google skills fail)
14:45 < napsy> you don't have to
14:45 -!- zzz [3a72cb23@gateway/web/freenode/ip.58.114.203.35] has joined #go-nuts
14:46 < wrtp> anacrolix: os.Exit(1)
14:47 -!- saschpe_ [~quassel@opensuse/member/saschpe] has quit [Ping timeout: 265
seconds]
14:47 < RCua> hello everyone, SELinux complain about mmap_zero whenever I
run any go programs, even the simplest ones like hello world, google tells me that
mmap zero page is bad, so I wonder why every go programs have to do so?
14:48 < anacrolix> i call os.Exit(2) and my return code is 130
14:48 < anacrolix> like something was calling raise() internally
14:48 -!- kanru [~kanru@114-45-232-142.dynamic.hinet.net] has joined #go-nuts
14:50 < wrtp> RCua: void
14:50 < wrtp> runtime·SysMemInit(void)
14:50 < wrtp> {
14:50 < wrtp> // Code generators assume that references to addresses
14:50 < wrtp> // on the first page will fault.  Map the page explicitly with
14:50 < wrtp> // no permissions, to head off possible bugs like the system
14:50 < wrtp> // allocating that page as the virtual address space fills.
14:50 < wrtp> // Ignore any error, since other systems might be smart
14:50 < wrtp> // enough to never allow anything there.
14:50 < wrtp> runtime·mmap(nil, 4096, PROT_NONE,
MAP_FIXED|MAP_ANON|MAP_PRIVATE, -1, 0);
14:50 < wrtp> }
14:51 < RCua> wrtp: thank you :)
14:51 < wrtp> anacrolix: it works ok for me under macos
14:53 < anacrolix> it was my bad, i was wrapping the process invocation with
bash stuff
14:55 -!- noam [noam@77.126.175.215] has quit [Read error: Connection reset by
peer]
14:55 -!- noam [noam@77.126.175.215] has joined #go-nuts
15:08 -!- zozoR [~zozoR@5634798d.rev.stofanet.dk] has quit [Quit: Morten.  Desu~]
15:08 -!- zozoR [~zozoR@5634798d.rev.stofanet.dk] has joined #go-nuts
15:20 -!- artefon [~thiago@dhcp3.usuarios.dcc.ufmg.br] has joined #go-nuts
15:28 -!- skejoe [~skejoe@188.114.142.231] has quit [Quit: leaving]
15:28 -!- femtoo [~femto@95-89-197-196-dynip.superkabel.de] has joined #go-nuts
15:29 -!- cmarcelo [~cmarcelo@enlightenment/developer/cmarcelo] has joined
#go-nuts
15:42 -!- DrHennessy [~alex@c-24-10-221-165.hsd1.ut.comcast.net] has joined
#go-nuts
15:42 -!- anacrolix [~matt@ppp121-45-198-116.lns20.cbr1.internode.on.net] has quit
[Quit: Ex-Chat]
15:43 -!- Tuller [~tuller@c-69-143-52-174.hsd1.va.comcast.net] has joined #go-nuts
15:46 -!- kanru [~kanru@114-45-232-142.dynamic.hinet.net] has quit [Ping timeout:
245 seconds]
15:48 -!- noam [noam@77.126.175.215] has quit [Read error: Connection reset by
peer]
15:50 -!- DrHennessy [~alex@c-24-10-221-165.hsd1.ut.comcast.net] has quit [Ping
timeout: 240 seconds]
15:51 -!- tensorpudding [~user@99.148.202.191] has joined #go-nuts
15:52 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
15:53 -!- DrHennessy [~alex@2002:180a:dda5:1234:223:6cff:fe7f:7ef2] has joined
#go-nuts
15:54 -!- Tuller [~tuller@c-69-143-52-174.hsd1.va.comcast.net] has quit [Remote
host closed the connection]
15:55 -!- lmoura [~lauromour@187.112.10.101] has quit [Read error: Connection
reset by peer]
15:55 -!- cmarcelo [~cmarcelo@enlightenment/developer/cmarcelo] has quit [Read
error: Connection reset by peer]
16:00 -!- noam [noam@77.126.175.215] has joined #go-nuts
16:00 -!- cmarcelo [~cmarcelo@enlightenment/developer/cmarcelo] has joined
#go-nuts
16:01 -!- lmoura [~lauromour@187.113.125.89] has joined #go-nuts
16:02 -!- tvw [~tv@212.79.9.150] has quit [Read error: Connection reset by peer]
16:10 -!- TheSaint [~thesaint@166.205.10.111] has joined #go-nuts
16:19 -!- zzz [3a72cb23@gateway/web/freenode/ip.58.114.203.35] has left #go-nuts
[]
16:26 -!- bjarneh [~bjarneh@1x-193-157-198-174.uio.no] has joined #go-nuts
16:39 < alexis> hi
16:39 -!- TheSaint [~thesaint@166.205.10.111] has quit [Quit: Colloquy for iPhone
- http://colloquy.mobi]
16:40 < alexis> in this example, line 25, why file.Stdout.Write is used?
(15:49 < wrtp> I// on the first page will fault.  Map the page explicitly
with
16:40 < alexis> 15:49 < wrtp> I// no permissions, to head off possible
bugs like the system
16:40 < alexis> oops.
16:40 < alexis> I'll do it again
16:40 < alexis> in this example, line 25, why file.Stdout.Write is used?
(http://golang.org/doc/go_tutorial.html#tmp_231)
16:41 < alexis> isnt it os.Stdout ?
16:42 -!- Tv [~tv@cpe-76-168-227-45.socal.res.rr.com] has joined #go-nuts
16:43 < RCua> alexis: erm...  to demonstrate the 'file' package above?
16:43 < alexis> but file does not have any Stdout function, IIUC
16:44 < wrtp> alexis: it does in that example
16:44 < RCua> alexis: it is an exported var
16:44 < alexis> hmm, ah, okay, got it I guess.
16:44 < wrtp> file is the name of the package
16:44 < wrtp> that's being written as part of the example
16:46 < alexis> okay, thanks, I'd missed the export variable section with
StdIn/Out/Err
16:49 -!- sxs [~sxs@HSI-KBW-078-042-201-030.hsi3.kabel-badenwuerttemberg.de] has
quit [Quit: sxs]
16:49 -!- femtoo [~femto@95-89-197-196-dynip.superkabel.de] has quit [Quit:
Leaving]
16:54 -!- RCua [~cua@unaffiliated/coconutcrab] has quit [Quit: chào ngày mới]
17:09 -!- saschpe [~quassel@opensuse/member/saschpe] has joined #go-nuts
17:13 -!- awidegreen [~quassel@p5DF1EFA2.dip.t-dialin.net] has joined #go-nuts
17:16 -!- sacho [~sacho@46.10.23.29] has quit [Read error: Connection reset by
peer]
17:16 -!- alc [~arx@222.128.147.38] has quit [Remote host closed the connection]
17:21 -!- Fish [~Fish@bus77-2-82-244-150-190.fbx.proxad.net] has joined #go-nuts
17:22 -!- DrHennessy [~alex@2002:180a:dda5:1234:223:6cff:fe7f:7ef2] has quit
[Quit: DrHennessy]
17:29 -!- caffeineborg
[~caffeineb@75-145-116-116-Colorado.hfc.comcastbusiness.net] has joined #go-nuts
17:36 -!- awidegreen_ [~quassel@p5DF1B45E.dip.t-dialin.net] has joined #go-nuts
17:36 -!- awidegreen [~quassel@p5DF1EFA2.dip.t-dialin.net] has quit [Read error:
Operation timed out]
17:42 -!- leczb [~leczb@nat/google/x-ypttzbvqpxxtubjf] has quit [Read error:
Connection reset by peer]
17:45 -!- leczb [~leczb@nat/google/x-crflxxpaujlmkktm] has joined #go-nuts
18:14 -!- krutcha [~krutcha@remote.icron.com] has joined #go-nuts
18:16 -!- SirPsychoS [~sp@cpe-174-103-151-189.cinci.res.rr.com] has quit [Ping
timeout: 265 seconds]
18:21 -!- anticw [~anticw@c-67-169-68-180.hsd1.ca.comcast.net] has quit [Read
error: Connection reset by peer]
18:25 -!- photron_ [~photron@port-92-201-1-56.dynamic.qsc.de] has joined #go-nuts
18:27 -!- anticw [~anticw@c-67-169-68-180.hsd1.ca.comcast.net] has joined #go-nuts
18:27 -!- Chopinnn [~Chopin@ti0018a380-dhcp1590.bb.online.no] has joined #go-nuts
18:28 -!- Chopinn [~Chopin@ti0018a380-dhcp1590.bb.online.no] has quit [Read error:
Connection reset by peer]
18:30 < exch> When comparing inteface{} with int, does that do a pointer
comparison, or is the interface{} implicitely converted to an int before
comparing?
18:31 -!- sauerbraten [~sauerbrat@p508CD251.dip.t-dialin.net] has joined #go-nuts
18:31 < exch> nvm.  seems the interface{} is implicitely converted.
18:32 < exch> mm or not
18:36 -!- DerHorst [~Horst@e176101002.adsl.alicedsl.de] has quit [Remote host
closed the connection]
18:37 < nsf> imho it should be an error
18:38 < exch> it isn't
18:38 < nsf> :\
18:38 < exch> least not when doing a == b or a!=b
18:38 < exch> it's an interface{}-interface{} comparison
18:38 < exch> which means by pointer value
18:38 < nsf> very strange
18:39 < exch> Seems it's just coincidence that the comparison returns the
correct result, as if it's actually comparing the int values
18:40 < exch> var a interface{}; var b int; a = 123; b = 123; println(a ==
b); <- true.  Possibly because the constant 123 is stored in the binary only
once
18:40 < exch> that check fails if either one of the vars is assigned
something that can only be resolved at runtime
18:42 < nsf> The operands must be comparable; that is, the first operand
must be assignable to the type of the second operand, or vice versa.
18:42 < nsf> I think it's a bug
18:42 < nsf> ah..  no
18:42 < nsf> "OR vice versa"
18:42 < nsf> hm..
18:42 < exch> a = 123; b = 122+1; also yields true.  I'm assuming the
compiler is smart enough to precalculate 122+1 and then assign constant 123 to b
18:42 < nsf> integers are stored directly in interface{}
18:43 < exch> ah
18:43 < nsf> in the place where it usually stores pointers
18:43 < nsf> so..  it works because of that I guess
18:43 < exch> ok, that could work I guess
18:43 < nsf> "An interface value x is equal to a non-interface value y if
the dynamic type of x is identical to the static type of y and the dynamic value
of x is equal to y."
18:43 < nsf> also spec describes that kind of case
18:43 -!- artefon [~thiago@dhcp3.usuarios.dcc.ufmg.br] has quit [Quit: bye]
18:44 < nsf> so..  it will work even if it's an int64
18:44 < exch> goodie.  that saves me another type assertion then
18:48 < wrtp> yeah, it's fine - you can compare two interfaces, so they
allowed comparison of interface with non-interface (it converts the non-interface
to interface implicitly)
18:49 < wrtp> it's particularly useful for maps
19:05 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
19:17 -!- wrtp [~rog@92.17.25.224] has quit [Quit: wrtp]
19:18 < nsf> does anyone know a reason why x go bindings does not contain
code for X11 extensions?
19:19 < nsf> it makes it totally useless, because these days zero X11 apps
work without extensions :)
19:19 < nsf> of course I can generate them myself, but..  I don't understand
19:20 -!- gr0gmint [~quassel@87.60.23.38] has joined #go-nuts
19:24 -!- awidegreen [~quassel@p5DF1B45E.dip.t-dialin.net] has joined #go-nuts
19:25 -!- awidegreen_ [~quassel@p5DF1B45E.dip.t-dialin.net] has quit [Ping
timeout: 245 seconds]
19:25 -!- IRWolfie- [irwolfie@ircnoob.com] has quit [Ping timeout: 245 seconds]
19:25 -!- rlab_ [~Miranda@91.200.158.34] has joined #go-nuts
19:27 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 245 seconds]
19:29 -!- IRWolfie- [irwolfie@ircnoob.com] has joined #go-nuts
19:33 -!- munificent [~rnystrom@c-67-170-73-235.hsd1.wa.comcast.net] has joined
#go-nuts
19:34 < munificent> simple question: i have a character (an int from doing
'range' on a string).  how do i convert it to a string?
19:34 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3]
19:37 < munificent> ah, never mind, found it.
19:41 -!- wrtp [~rog@92.17.25.224] has joined #go-nuts
19:42 -!- TheMue [~TheMue@p5DDF61A2.dip.t-dialin.net] has joined #go-nuts
19:43 -!- Tuller [~tuller@pool-98-117-92-241.rcmdva.fios.verizon.net] has joined
#go-nuts
19:43 < alexis> munificent: so ? what's the answer :)
19:44 < munificent> fmt.Sprintf("%c", theCharacter)
19:44 < alexis> simple :)
19:44 < munificent> well, a real logical character type that implemented
Stringer would be simple, but i guess that works.
19:45 -!- ct529 [~quassel@envpc1758.york.ac.uk] has joined #go-nuts
19:49 -!- Rainburst [~Rainburst@46.0.47.67] has quit [Read error: Connection reset
by peer]
19:50 -!- wrtp [~rog@92.17.25.224] has quit [Quit: wrtp]
19:50 -!- caffeineborg
[~caffeineb@75-145-116-116-Colorado.hfc.comcastbusiness.net] has quit [Quit:
(quit)]
19:52 -!- caffeineborg
[~caffeineb@75-145-116-116-Colorado.hfc.comcastbusiness.net] has joined #go-nuts
19:57 -!- zozoR [~zozoR@5634798d.rev.stofanet.dk] has quit [Ping timeout: 240
seconds]
19:58 < Tv> munificent: if you wanted characters from a string, you probably
wanted bytes.Split with an empty separator
19:58 < munificent> i was going the other direction, but that's helpful too.
thanks.
20:01 -!- saschpe [~quassel@opensuse/member/saschpe] has quit [Remote host closed
the connection]
20:04 -!- ct529 [~quassel@envpc1758.york.ac.uk] has quit [Remote host closed the
connection]
20:06 -!- zozoR [~zozoR@5634798d.rev.stofanet.dk] has joined #go-nuts
20:08 -!- ct529 [~quassel@envpc1758.york.ac.uk] has joined #go-nuts
20:11 -!- ct529 [~quassel@envpc1758.york.ac.uk] has quit [Read error: Connection
reset by peer]
20:12 -!- ct529 [~quassel@envpc1758.york.ac.uk] has joined #go-nuts
20:13 -!- ct529 [~quassel@envpc1758.york.ac.uk] has quit [Read error: Connection
reset by peer]
20:21 < kimelto> How can I get a Writer for stdout?  :)
20:22 < Tv> kimelto: os.Stdout
20:22 < alexis> os.Stdout.WriteString ?
20:22 < munificent> so bytes.Split gives me byte arrays for each codepoint.
is there an easy way to convert one of those to a single int like you get from
iterating over a string directly?
20:23 < kimelto> Tv: thanks!  dont know why I was looking into io
20:24 < Tv> munificent: but if you wanted the ints, then you could just
iterate the string...
20:24 < Tv> munificent: maybe you should explain what you're doing
20:24 < munificent> hand-rolling a lexer.
20:24 < munificent> i don't want to just iterate directly because i may need
to reprocess certain characters or rollback.
20:25 < munificent> am i missing something, or are strings completely insane
in go?
20:25 < munificent> i suppose i could iterate through the string just to
then build an []int of the codepoints.  maybe i'll do that.
20:25 < Tv> only as insane as utf8..
20:25 -!- ShadowIce` [~pyoro@unaffiliated/shadowice-x841044] has quit [Ping
timeout: 240 seconds]
20:26 < munificent> the insane part is that i have to care about the
encoding at all.
20:26 < munificent> surely the common case is that users want to deal in
logical characters and not bytes which may or may not represent a piece of a
single utf-8 code sequence?
20:26 < Tv> munificent: because all the world is not a VAX^H^H^HASCII
20:26 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has joined
#go-nuts
20:27 < munificent> who's advocating ascii?
20:27 < Tv> munificent: so deal with what go calls Runes
20:27 < munificent> is that a unicode codepoint?
20:27 < Tv> yeah
20:27 < munificent> hmm.  ok.  thanks.
20:28 -!- ShadowIce
[~pyoro@HSI-KBW-109-193-120-162.hsi7.kabel-badenwuerttemberg.de] has joined
#go-nuts
20:28 -!- ShadowIce
[~pyoro@HSI-KBW-109-193-120-162.hsi7.kabel-badenwuerttemberg.de] has quit
[Changing host]
20:28 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
20:32 -!- SirPsychoS [~sp@cpe-174-103-151-189.cinci.res.rr.com] has joined
#go-nuts
20:34 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has quit [Remote
host closed the connection]
20:35 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has joined
#go-nuts
20:40 -!- gnuvince_ [~vince@70.35.166.8] has joined #go-nuts
20:40 -!- virtualsue [~chatzilla@nat/cisco/x-hbawiylfkuskynpp] has joined #go-nuts
20:44 -!- SirPsychoS [~sp@cpe-174-103-151-189.cinci.res.rr.com] has quit [Ping
timeout: 264 seconds]
20:45 -!- matche [~co^gudel@187.112.30.65] has joined #go-nuts
20:45 -!- matche [~co^gudel@187.112.30.65] has left #go-nuts []
20:48 -!- munificent [~rnystrom@c-67-170-73-235.hsd1.wa.comcast.net] has quit
[Quit: munificent]
20:52 -!- tvw [~tv@e176006087.adsl.alicedsl.de] has joined #go-nuts
20:56 -!- bjarneh [~bjarneh@1x-193-157-198-174.uio.no] has quit [Quit: Lost
terminal]
20:59 -!- caffeineborg
[~caffeineb@75-145-116-116-Colorado.hfc.comcastbusiness.net] has quit [Quit:
(quit)]
21:03 -!- Tuller [~tuller@pool-98-117-92-241.rcmdva.fios.verizon.net] has quit
[Remote host closed the connection]
21:08 -!- SRabbelier [~SRabbelie@188.142.63.148] has quit [Quit: Leaving.]
21:09 -!- SRabbelier [~SRabbelie@188.142.63.148] has joined #go-nuts
21:11 -!- zozoR [~zozoR@5634798d.rev.stofanet.dk] has quit [Quit: Morten.  Desu~]
21:12 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
21:16 -!- artefon [~thiago@187.58.197.115] has joined #go-nuts
21:22 < TheSeeker> Hardest part about starting a project: what to name it?
:|
21:25 < TheSeeker> I'm aiming at a go representation of the Freenet
REference Daemon (fred) so my first instinct is to use go-fred ...  which is very
dull and unimaginative (just like me!)
21:25 < kimelto> :-)
21:28 < TheSeeker> I suppose I could try to come up with a clever backronym
21:28 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
21:30 < Gertm> go-fred-go?  :)
21:32 < TheSeeker> goto:8888 ?
21:37 -!- munificent [~rnystrom@c-67-170-73-235.hsd1.wa.comcast.net] has joined
#go-nuts
21:39 -!- TheMue [~TheMue@p5DDF61A2.dip.t-dialin.net] has quit [Quit: TheMue]
21:42 -!- photron_ [~photron@port-92-201-1-56.dynamic.qsc.de] has quit [Ping
timeout: 240 seconds]
21:45 -!- boscop [~boscop@f055104121.adsl.alicedsl.de] has quit [Ping timeout: 240
seconds]
21:48 -!- noam [noam@77.126.175.215] has quit [Ping timeout: 255 seconds]
21:49 -!- munificent [~rnystrom@c-67-170-73-235.hsd1.wa.comcast.net] has quit
[Quit: munificent]
21:53 -!- boscop [~boscop@g226229099.adsl.alicedsl.de] has joined #go-nuts
21:53 -!- sauerbraten [~sauerbrat@p508CD251.dip.t-dialin.net] has quit [Remote
host closed the connection]
21:53 -!- noam [noam@77.126.175.215] has joined #go-nuts
21:59 -!- munificent [~rnystrom@c-67-170-73-235.hsd1.wa.comcast.net] has joined
#go-nuts
21:59 -!- gr0gmint [~quassel@87.60.23.38] has quit [Read error: Connection reset
by peer]
22:02 -!- tonlap [~sekistner@dslb-094-216-215-123.pools.arcor-ip.net] has joined
#go-nuts
22:04 -!- Project_2501 [~Marvin@82.84.79.101] has joined #go-nuts
22:09 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit:
Verlassend]
22:21 -!- Tv [~tv@cpe-76-168-227-45.socal.res.rr.com] has quit [Disconnected by
services]
22:21 -!- Tv1 [~tv@cpe-76-168-227-45.socal.res.rr.com] has joined #go-nuts
22:34 -!- cmarcelo [~cmarcelo@enlightenment/developer/cmarcelo] has quit [Quit:
Leaving]
22:44 -!- MatToufoutu [~MatToufou@unaffiliated/mattoufoutu] has joined #go-nuts
22:46 -!- munificent [~rnystrom@c-67-170-73-235.hsd1.wa.comcast.net] has quit
[Quit: munificent]
22:49 -!- Fish [~Fish@bus77-2-82-244-150-190.fbx.proxad.net] has quit [Quit: So
Long, and Thanks for All the Fish]
22:52 -!- awidegreen [~quassel@p5DF1B45E.dip.t-dialin.net] has quit [Remote host
closed the connection]
22:54 -!- sxs [~sxs@e180008124.adsl.alicedsl.de] has joined #go-nuts
22:54 < sxs> hello
22:55 < sxs> how can i check if a *os.PathError is of the kind os.EISDIR
23:00 -!- Chopinnn [~Chopin@ti0018a380-dhcp1590.bb.online.no] has quit [Read
error: Connection reset by peer]
23:00 < Tv> if you have p *os.PathError, p.Error == os.EISDIR should do it
23:00 -!- Chopinnn [~Chopin@ti0018a380-dhcp1590.bb.online.no] has joined #go-nuts
23:00 < sxs> i try err.Error == os.EISDIR but says it has no field Error,
but says it has no field Error
23:00 < Tv> sxs: can you pastebin your code?
23:01 < sxs> mompl
23:01 < sxs> is ok without highlighting?  pastebin doesn't have go :/
23:01 < Tv> sure
23:02 < sxs> http://pastebin.com/jdxueGKE
23:02 < nsf> sxs: pastie.org has
23:03 < sxs> erm, sorry.  forgotten the ioutil.ReadFile(fileName) i do
before that
23:03 < Tv> sxs: you want t.Error
23:04 < sxs> why?  i thougt t is only the 'type', isn't this .(type) switch
like the instanceof in java or such?
23:05 < Tv> no
23:05 < Tv> t is the new variable of the type you requested
23:05 < sxs> pastie.org does not respond :(
23:05 < Tv> consider what t := err.(type) does, outside of the switch
23:05 < Tv> the switch just says "either that, or something else"
23:05 < sxs> i dont know what it does
23:06 < Tv> the switch doesn't change it
23:06 < sxs> what is t?
23:06 < Tv> t is not a type, it's the value as re-interpreted to be "type"
23:06 < Tv> err
23:06 < Tv> sorry
23:06 < sxs> i thought its somethink like 'type o.PathError'
23:06 < Tv> i'm confused and confusing you
23:06 < Tv> you're using a non-typical go idiom that looked like a typical
go idiom ;)
23:06 < sxs> is it like a typecast to PathError?
23:06 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 250 seconds]
23:06 < Tv> you're extracting the type and switching based on it
23:07 < Tv> what you probably want is ...
23:07 < Tv> a type switch:
http://golang.org/doc/go_spec.html#Switch_statements
23:07 < Tv> err
23:07 < Tv> no
23:07 < Tv> that's what you're doing ;)
23:08 < Tv> ok i need more caffeine to make sense ;)
23:08 < exch> t is the value of type *os.PathError when you're inside that
case statement.  It's the same as doing a manualy type assertion on err, like so:
t := err.(*os.PathError)
23:08 < Tv> yeah
23:08 < Tv> so
23:08 < exch> t the n gives you direct acces to all methods and fields of
*os.PathError
23:08 < Tv> t is not the type; t is a variable according to that type
23:09 -!- tvw [~tv@e176006087.adsl.alicedsl.de] has quit [Remote host closed the
connection]
23:09 < Tv> so access t.Error instead of err.Error
23:09 < sxs> then its similiar to down casting
23:10 < Tv> though i'm still unclear why you need to deal with os.PathError
directly
23:10 < Tv> ioutil.ReadFile returns os.Error
23:10 < sxs> i downcast the generic Error to a PathError and so i can aces
the methods and fields
23:10 < kimelto> when you read from a closed channel, it instantly returns,
rigth?  so if one read from a channel in a for loop, one must check if
closed(chan) break ? what happen if one of the channel in a select is closed?
23:10 < sxs> i want o implement a simple webserver for exercise
23:11 < mpl> sxs: http://golang.org/doc/codelab/wiki/
23:11 < sxs> i wnat to check the error 'is a directory' and tehn search for
an inde.html to server, in case the http.RequestURL is /
23:11 < Tv> kimelto: iirc selec ignores closed channels, it's said in the
spec
23:11 < sxs> mpl: just finished this :)
23:12 < Tv> sxs: usually you just do direct err == os.EISDIR; i'm a bit
confused why that doesn't work here
23:12 < sxs> let my try
23:12 < kimelto> Tv: oki.  will check the spec.
23:14 < sxs> http://pastebin.com/pnWT94Se it evaluates to false
23:14 < Tv> kimelto: i can't find it..  nil channels are ignored, but
perhaps you need to handle the zero reads..  should be easy to test
23:15 < sxs> put when i print err as string it says read foo/bar: is a
directory
23:15 < Tv> sxs: yeahi'm not familiar with ioutil.ReadFile at all, the lower
level stuff just returns usable errors
23:17 < Tv> kimelto: it seems you get zero values.
23:17 < sxs> t.Error == osEISDIR works
23:17 < Tv> kimelto: so you'll need to do if closed(ch) ch = nil yourself
23:17 < kimelto> oki doki.  thanks!
23:18 < Tv> zero values are so fugly :(
23:18 < Tv> mostly because they make using chans of ints etc painful
23:19 < kimelto> you have to use closed() to really know what you got, I
guess
23:21 < Tv> yup
23:22 < Tv> but to consume multiple channels in a select, you end up with
something like http://pastebin.com/eNnn8bEE
23:22 < Tv> (ignore the messed up indents, that was typed in a browser)
23:23 < Tv> loop until all channels are closed
23:23 < Tv> in this case with just one
23:23 < Tv> but it adds a lot of noise
23:24 < Tv> some times i wish the zero receive just wouldn't come through
that case
23:24 < Tv> you could match it with a separate "case closed(ch):"
23:24 < Tv> oooh i like that
23:25 < kimelto> but your code will hang forever if you attempt to read from
a closed channel
23:25 < kimelto> so the channel has to "return"
23:25 < Tv> yeah that's one place where i wish exceptions were used
23:25 < Tv> because i don't want every receive to do ", err"
23:26 < Tv> but the above case closed() suggestion doesn't conflict with
zero values in any way
23:26 < Tv> it'd just prefer that branch over "case x <- ch" if ch is
closed
23:26 < kimelto> makes sense
23:26 < Tv> and could even avoid the need to do "ch = nil" manually by
knowing that can only ever trigger once
23:27 -!- rlab_ [~Miranda@91.200.158.34] has quit [Quit: Miranda IM! Smaller,
Faster, Easier.  http://miranda-im.org]
23:27 < kimelto> maybe select could be nice and nil the channels for us :p
23:27 < Tv> that might be surprising
23:28 < kimelto> but a closed channel is of no utility anyway :-)
23:28 -!- SirPsychoS [~sp@cpe-174-103-151-189.cinci.res.rr.com] has joined
#go-nuts
23:30 -!- sxs [~sxs@e180008124.adsl.alicedsl.de] has quit [Quit: sxs]
23:53 < Tv>
http://groups.google.com/group/golang-nuts/browse_thread/thread/cb850793e41de60a
23:55 -!- tonlap [~sekistner@dslb-094-216-215-123.pools.arcor-ip.net] has quit
[Quit: tonlap]
23:57 -!- kroog [~kroog@remote.icron.com] has joined #go-nuts
23:58 < exch> I'd support that even if its only because 'case closed(a)'
just sounds funky
23:58 < Tv> exch: "my argument is valid.  case closed." ;)
23:59 < Tv> (cage's hair is still a bird, though)
23:59 < exch> hehe
23:59 -!- kroog [~kroog@remote.icron.com] has quit [Client Quit]
--- Log closed Fri Nov 26 00:00:19 2010