--- Log opened Sun Sep 19 00:00:07 2010
00:15 -!- major_majors [~major_maj@173-10-44-57-Michigan.hfc.comcastbusiness.net]
has joined #go-nuts
00:17 -!- Sh4pe [~Sh4pe@dslb-088-066-055-077.pools.arcor-ip.net] has quit [Quit:
Sh4pe]
00:26 -!- ExtraSpice [~XtraSpice@78-57-168-219.static.zebra.lt] has quit [Ping
timeout: 240 seconds]
00:32 -!- ukai [~ukai@nat/google/x-gcectuhpiukboyfa] has quit [Ping timeout: 240
seconds]
00:33 -!- major_majors [~major_maj@173-10-44-57-Michigan.hfc.comcastbusiness.net]
has quit [Read error: Connection reset by peer]
00:34 -!- major_majors [~major_maj@173-10-44-57-Michigan.hfc.comcastbusiness.net]
has joined #go-nuts
00:35 -!- ukai [~ukai@nat/google/x-fvjzhksuwohtmvxw] has joined #go-nuts
00:35 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined
#go-nuts
00:40 -!- janm [~jmalonzo@ppp121-44-166-130.lns20.syd7.internode.on.net] has quit
[Ping timeout: 240 seconds]
00:41 -!- dacc [~Adium@c-67-171-32-251.hsd1.wa.comcast.net] has joined #go-nuts
00:43 -!- dacc [~Adium@c-67-171-32-251.hsd1.wa.comcast.net] has left #go-nuts []
00:50 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 245 seconds]
00:51 -!- cschmiedl [~alaunos@brln-4dba81c8.pool.mediaWays.net] has quit [Quit:
Leaving]
00:52 -!- mikespook1 [~mikespook@58.61.206.207] has quit [Read error: Connection
reset by peer]
00:54 -!- mikespook [~mikespook@58.61.206.207] has joined #go-nuts
00:57 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Quit:
No Ping reply in 180 seconds.]
00:57 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined
#go-nuts
00:59 -!- vomjom [~vomjom@99-162-150-88.lightspeed.sntcca.sbcglobal.net] has quit
[Ping timeout: 272 seconds]
01:00 -!- Guest54683 [~irc@209.17.191.58] has quit [Remote host closed the
connection]
01:00 -!- jcao2191 [~Jimmy_Cao@pool-173-74-61-111.dllstx.fios.verizon.net] has
joined #go-nuts
01:00 -!- jcao219 [~jcao219@pool-173-74-61-111.dllstx.fios.verizon.net] has quit
[Disconnected by services]
01:01 -!- jcao2191 [~Jimmy_Cao@pool-173-74-61-111.dllstx.fios.verizon.net] has
quit [Client Quit]
01:01 -!- jcao219 [~jcao219@pool-173-74-61-111.dllstx.fios.verizon.net] has joined
#go-nuts
01:06 -!- dublpaws [~none@207.3.149.84] has joined #go-nuts
01:06 -!- irc [~irc@209.17.191.58] has joined #go-nuts
01:07 -!- dublpaws [~none@207.3.149.84] has left #go-nuts []
01:12 -!- vomjom [~vomjom@99-162-150-88.lightspeed.sntcca.sbcglobal.net] has
joined #go-nuts
01:26 -!- risent [~risent@221.131.242.150] has joined #go-nuts
01:43 -!- risent [~risent@221.131.242.150] has quit [Remote host closed the
connection]
02:11 -!- socratees [~socratees@cpe-76-171-79-40.socal.res.rr.com] has joined
#go-nuts
02:18 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
02:22 -!- boscop [~boscop@g226228196.adsl.alicedsl.de] has quit [Ping timeout: 240
seconds]
02:22 -!- boscop_ [~boscop@g225210143.adsl.alicedsl.de] has joined #go-nuts
02:33 -!- janm [~jmalonzo@ppp121-44-166-130.lns20.syd7.internode.on.net] has
joined #go-nuts
02:39 < socratees> can somebody help me to create a package?
02:42 < cbeck> What do you need help with?
02:45 < socratees> Based on a article, i created a makefile that is supposed
to create a package.  The make file says No rule to make target.
02:45 < cbeck> Is your GOROOT set correctly?
02:46 < socratees> yes it is
02:46 < socratees> The makefile's first line tries to include
/src/Make.$(GOARCH) which isn't present in the src folder though.
02:46 < socratees> I couldn't find a /src/Make.386
02:46 < cbeck> That sounds like GOROOT is empty
02:47 < nsf> Make.$(GOARCH) is deprecated
02:47 < nsf> use Make.inc
02:47 < nsf> and build with gomake
02:48 < nsf> Probably an article is out-of-date
02:48 < socratees> now it compiles!  thank you guys
02:52 < socratees> nsf, i just used plain make and it compiled fine.
02:52 < nsf> it works if you have GOROOT env var
02:52 < socratees> nice!
02:52 < nsf> if not - use gomake
02:53 < nsf> gomake doesn't require any env vars
02:56 < enferex> nsf, so i have been investigating the gothread scheduler in
proc.c.  Its seems, frommy investigations that it doesnt explicitly loop.  Rather
calls to gogo() and gocall force it to loop.  Therefore it implicitly loops
itself.  Is my analysis correct?
02:57 < nsf> I'm not the person that can answer that question correctly :)
03:02 -!- rejb [~rejb@unaffiliated/rejb] has quit [Ping timeout: 276 seconds]
03:08 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined
#go-nuts
03:15 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has quit [Read
error: Connection reset by peer]
03:16 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has joined
#go-nuts
03:23 -!- powerje [~powerje@adsl-75-49-12-108.dsl.wotnoh.sbcglobal.net] has quit
[Quit: powerje]
03:33 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Quit:
No Ping reply in 180 seconds.]
03:34 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined
#go-nuts
03:48 -!- piyushmishra [~piyushmis@117.200.226.83] has joined #go-nuts
03:49 -!- powerje [~powerje@adsl-75-49-12-108.dsl.wotnoh.sbcglobal.net] has joined
#go-nuts
03:54 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Ping
timeout: 276 seconds]
03:58 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has quit [Read
error: Connection reset by peer]
04:01 -!- powerje [~powerje@adsl-75-49-12-108.dsl.wotnoh.sbcglobal.net] has quit
[Quit: powerje]
04:02 -!- piyushmishra [~piyushmis@117.200.226.83] has quit [Ping timeout: 272
seconds]
04:04 -!- piyushmishra [~piyushmis@117.200.224.232] has joined #go-nuts
04:10 -!- mafs [~maikeru@unaffiliated/maikeru/x-7708887] has quit [Ping timeout:
264 seconds]
04:12 -!- Boney_ [~paul@220-235-80-178.dyn.iinet.net.au] has joined #go-nuts
04:13 -!- Boney [~paul@124-148-152-30.dyn.iinet.net.au] has quit [Ping timeout:
252 seconds]
04:17 -!- zozoR [~zozoR@4705ds1-ris.0.fullrate.dk] has joined #go-nuts
04:27 -!- mafs [~maikeru@unaffiliated/maikeru/x-7708887] has joined #go-nuts
04:41 -!- cco3 [~conley@205.248.100.252] has quit [Ping timeout: 245 seconds]
04:51 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3]
05:00 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has joined
#go-nuts
05:01 -!- scm [justme@d038032.adsl.hansenet.de] has quit [Ping timeout: 272
seconds]
05:02 -!- scm [justme@d019083.adsl.hansenet.de] has joined #go-nuts
05:07 -!- jcao219 [~jcao219@pool-173-74-61-111.dllstx.fios.verizon.net] has quit
[Ping timeout: 240 seconds]
05:11 -!- socratees [~socratees@cpe-76-171-79-40.socal.res.rr.com] has quit [Ping
timeout: 272 seconds]
05:12 -!- DJCapelis [~djc@blender/coder/DJCapelis] has quit [Remote host closed
the connection]
05:21 -!- vpit3833 [~user@d110-33-197-106.mas801.nsw.optusnet.com.au] has joined
#go-nuts
05:21 -!- DJCapelis [~djc@blender/coder/DJCapelis] has joined #go-nuts
05:22 -!- cenuij [~cenuij@base/student/cenuij] has joined #go-nuts
05:24 -!- sukuri [~travis@194.10.188.72.cfl.res.rr.com] has joined #go-nuts
05:25 -!- tapankarecha [~tapankare@122.167.16.67] has joined #go-nuts
05:26 -!- tapankarecha [~tapankare@122.167.16.67] has left #go-nuts []
05:26 -!- tapankarecha [~tapankare@122.167.16.67] has joined #go-nuts
05:27 -!- vpit3833 [~user@d110-33-197-106.mas801.nsw.optusnet.com.au] has left
#go-nuts ["ERC Version 5.3 (IRC client for Emacs)"]
05:32 -!- tapankarecha [~tapankare@122.167.16.67] has quit [Ping timeout: 276
seconds]
05:38 -!- ProNihilist
[~anathema@cpc4-cani1-0-0-cust597.14-2.cable.virginmedia.com] has quit [Read
error: Connection reset by peer]
05:42 -!- ProNihilist
[~anathema@cpc4-cani1-0-0-cust597.14-2.cable.virginmedia.com] has joined #go-nuts
05:44 -!- tapankarecha [~tapankare@122.167.16.67] has joined #go-nuts
05:51 -!- sukuri [~travis@194.10.188.72.cfl.res.rr.com] has quit [Quit: Leaving.]
06:06 -!- pocket_ [~pocket_@p1196-ipbf3801hodogaya.kanagawa.ocn.ne.jp] has joined
#go-nuts
06:30 -!- ssjones [~ssjones@67-61-100-203.cpe.cableone.net] has joined #go-nuts
06:44 -!- cenuij [~cenuij@base/student/cenuij] has quit [Remote host closed the
connection]
06:44 -!- cenuij [~cenuij@93.26.149.132] has joined #go-nuts
06:44 -!- cenuij [~cenuij@93.26.149.132] has quit [Changing host]
06:44 -!- cenuij [~cenuij@base/student/cenuij] has joined #go-nuts
06:45 -!- cmpitg [~cmpitg@113.22.117.7] has joined #go-nuts
06:45 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has quit [Read
error: Connection reset by peer]
06:46 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has joined
#go-nuts
06:55 -!- mikespook1 [~mikespook@219.137.72.208] has joined #go-nuts
06:56 -!- mikespook [~mikespook@58.61.206.207] has quit [Ping timeout: 240
seconds]
07:08 -!- major_majors [~major_maj@173-10-44-57-Michigan.hfc.comcastbusiness.net]
has quit [Quit: major_majors]
07:11 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
07:15 -!- terrex [~terrex@84.122.67.111.dyn.user.ono.com] has joined #go-nuts
07:18 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit:
This computer has gone to sleep]
07:22 -!- ShadowIce
[~pyoro@HSI-KBW-109-193-120-162.hsi7.kabel-badenwuerttemberg.de] has joined
#go-nuts
07:22 -!- ShadowIce
[~pyoro@HSI-KBW-109-193-120-162.hsi7.kabel-badenwuerttemberg.de] has quit
[Changing host]
07:22 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
07:30 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
07:45 -!- mikespook1 [~mikespook@219.137.72.208] has quit [Quit: Leaving.]
07:49 -!- tapankarecha [~tapankare@122.167.16.67] has left #go-nuts []
07:51 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
07:54 -!- cmpitg [~cmpitg@113.22.117.7] has quit [Quit: Ex-Chat]
08:00 -!- Kashia [~Kashia@port-92-200-219-143.dynamic.qsc.de] has joined #go-nuts
08:08 -!- ikaros [~ikaros@dslb-084-059-076-021.pools.arcor-ip.net] has joined
#go-nuts
08:09 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3]
08:12 -!- ikaros [~ikaros@dslb-084-059-076-021.pools.arcor-ip.net] has quit
[Client Quit]
08:12 -!- ikaros [~ikaros@2001:41b8:9bf:fe04:bc95:6fff:fe12:80c6] has joined
#go-nuts
08:13 -!- femtoo [~femto@95-89-248-241-dynip.superkabel.de] has joined #go-nuts
08:19 -!- prip [~foo@host150-135-dynamic.43-79-r.retail.telecomitalia.it] has quit
[Ping timeout: 245 seconds]
08:30 -!- skejoe [~skejoe@188.114.142.231] has joined #go-nuts
08:38 -!- derferman [~derferman@c-98-207-60-44.hsd1.ca.comcast.net] has joined
#go-nuts
08:41 -!- ExtraSpice [~XtraSpice@78-57-168-219.static.zebra.lt] has joined
#go-nuts
08:41 -!- aho [~nya@fuld-4d00d71b.pool.mediaWays.net] has quit [Quit:
EXEC_over.METHOD_SUBLIMATION]
08:45 -!- derferman [~derferman@c-98-207-60-44.hsd1.ca.comcast.net] has quit
[Quit: derferman]
08:49 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Read error: Connection
reset by peer]
08:57 -!- prip [~foo@host150-135-dynamic.43-79-r.retail.telecomitalia.it] has
joined #go-nuts
09:05 -!- navigator [~navigator@p54897BAE.dip.t-dialin.net] has joined #go-nuts
09:07 -!- awidegreen [~quassel@62.176.237.78] has joined #go-nuts
09:13 -!- ikaros [~ikaros@2001:41b8:9bf:fe04:bc95:6fff:fe12:80c6] has quit [Quit:
Leave the magic to Houdini]
09:14 -!- ikaros [~ikaros@dslb-084-059-076-021.pools.arcor-ip.net] has joined
#go-nuts
09:14 -!- gnuvince [~vince@64.235.212.60] has quit [Ping timeout: 245 seconds]
09:30 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
09:37 -!- cenuij [~cenuij@base/student/cenuij] has quit [Ping timeout: 276
seconds]
09:37 -!- jiunec [~cenuij@93.26.149.132] has joined #go-nuts
09:49 -!- ikaros [~ikaros@dslb-084-059-076-021.pools.arcor-ip.net] has quit [Quit:
Leave the magic to Houdini]
09:50 -!- Kylarr [Kylarr@122-148-63-115.static.dsl.dodo.com.au] has quit [Ping
timeout: 276 seconds]
09:50 -!- janm [~jmalonzo@ppp121-44-166-130.lns20.syd7.internode.on.net] has quit
[Ping timeout: 240 seconds]
09:51 -!- Kylarr [Kylarr@122-148-63-115.static.dsl.dodo.com.au] has joined
#go-nuts
09:51 -!- Boney_ [~paul@220-235-80-178.dyn.iinet.net.au] has quit [Ping timeout:
276 seconds]
09:51 -!- felipe [~felipe@my.nada.kth.se] has quit [Ping timeout: 276 seconds]
09:51 -!- Boney [~paul@220-235-80-178.dyn.iinet.net.au] has joined #go-nuts
09:52 -!- janm [~jmalonzo@ppp121-44-2-23.lns20.syd6.internode.on.net] has joined
#go-nuts
09:55 -!- photron [~photron@port-92-201-57-106.dynamic.qsc.de] has joined #go-nuts
09:55 -!- jhh [~jhh@f049171175.adsl.alicedsl.de] has joined #go-nuts
09:55 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has quit [Ping
timeout: 276 seconds]
09:56 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has joined
#go-nuts
10:00 -!- rlab_ [~Miranda@91.200.158.34] has joined #go-nuts
10:01 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 240 seconds]
10:10 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts
10:15 -!- piyushmishra [~piyushmis@117.200.224.232] has quit [Ping timeout: 240
seconds]
10:23 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
10:23 -!- rlab_ [~Miranda@91.200.158.34] has quit [Ping timeout: 252 seconds]
10:40 -!- jesusaurus1 [jesusaur@firefly.cat.pdx.edu] has joined #go-nuts
10:40 -!- jesusaurus [jesusaur@firefly.cat.pdx.edu] has quit [Read error:
Connection reset by peer]
10:51 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-172-36.clienti.tiscali.it] has
joined #go-nuts
11:01 -!- zozoR [~zozoR@4705ds1-ris.0.fullrate.dk] has quit [Read error:
Connection reset by peer]
11:04 -!- voker57 [~voker57@kvirc/developer/Voker57] has joined #go-nuts
11:04 -!- piyushmishra [~piyushmis@117.200.228.111] has joined #go-nuts
11:08 -!- jhh [~jhh@f049171175.adsl.alicedsl.de] has quit [Quit: jhh]
11:09 -!- DerHorst [~Horst@e176109181.adsl.alicedsl.de] has joined #go-nuts
11:12 < napsy> style_parser.rules = make(map[string] map[string] string)
11:12 < napsy> is this a good way to create a map of map objects"
11:12 < napsy> ?
11:23 -!- skejoe [~skejoe@188.114.142.231] has quit [Quit: leaving]
11:23 -!- Shyde [~shyde@HSI-KBW-078-043-070-132.hsi4.kabel-badenwuerttemberg.de]
has joined #go-nuts
11:26 < voker57> can you initialize a struct on variable creation?  like wtf
:= myStruct { i = 2 }
11:29 < nsf> voker57: yes
11:29 -!- zozoR [~zozoR@4705ds1-ris.0.fullrate.dk] has joined #go-nuts
11:30 -!- Kashia [~Kashia@port-92-200-219-143.dynamic.qsc.de] has quit [Quit: This
computer has gone to sleep]
11:30 < nsf> but the syntax is: myStruct{ i: 2 }
11:31 < nsf> wtf := myStruct{ i: 2 }
11:31 < voker57> ok
11:46 < nsf> napsy: uhm..  yes :)
11:47 < napsy> oh ok but my program keeps segfaulting
11:47 < nsf> but you have to initialize each map in the map too
11:47 < nsf> like:
11:47 < nsf> m := make(map[string]map[string]string)
11:47 < napsy> yes I try to do that but got an invalid address
11:47 < nsf> m["mymap1"] = make(map[string]string)
11:47 < napsy> I do exactly that
11:48 < nsf> hm..  interesting
11:48 < napsy> just a sec
11:48 < napsy> nsf: http://pastie.org/private/djyu40xm8epudainsbx6g
11:49 < napsy> nsf: line 72
11:49 < nsf> i see
11:49 < nsf> uhm..  but where is the big make?
11:49 < nsf> that creates style_parser.rules
11:49 < napsy> line 99
11:50 < nsf> ah, ok
11:50 < napsy> oh wait
11:50 < napsy> damn it's in the wrong order
11:50 < nsf> yes :)
11:50 < napsy> ok it works now
11:50 < nsf> swap lines 98 99
11:50 < napsy> sorry to bother
11:50 < nsf> :P
11:50 < nsf> np
12:00 -!- Chryson [~Chryson@c-71-61-11-114.hsd1.pa.comcast.net] has quit [Ping
timeout: 245 seconds]
12:06 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has quit [Ping
timeout: 255 seconds]
12:21 < vsmatck> Has anyone proposed that programs should be able to start
with an optional #!/usr/bin/bla that go interprets as a comment?  D has this
ability which allows you to run a D program as if it were a script.  Seems nice.
12:22 < napsy> vsmatck: there's no go interpreter (at least no official one)
12:23 -!- pocket_ [~pocket_@p1196-ipbf3801hodogaya.kanagawa.ocn.ne.jp] has quit
[Remote host closed the connection]
12:28 < vsmatck> Could do something like python *.pyc in the mean time.
It'd be nice to do I think.
12:31 < nbjoerg> it doesn't make sense
12:31 < vsmatck> I'll elaborate.  You could compile the program each time
you run it as a script.
12:32 -!- janm [~jmalonzo@ppp121-44-2-23.lns20.syd6.internode.on.net] has quit
[Ping timeout: 272 seconds]
12:32 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has joined
#go-nuts
12:33 -!- janm [~jmalonzo@ppp121-44-2-23.lns20.syd6.internode.on.net] has joined
#go-nuts
12:33 < nbjoerg> and I could light a candle and let the wind blow it out and
light it again and let ...
12:34 < vsmatck> Unrelated to my main point.  Give programs the 'capability'
of doing it.  In the present it can be done suboptimally.  In the fiture someone
might make it optimal.
12:34 < vsmatck> s/fiture/future
12:34 < nbjoerg> python byte code isn't self-executable
12:34 < nbjoerg> go binaries are
12:35 < nbjoerg> so what's the point in pretending that?
12:35 < vsmatck> Forget that part of it then.
12:35 < vsmatck> Bad analogy.
12:35 < nbjoerg> no, it is kind of central to the request
12:36 < nbjoerg> shell code doesn't execute by itself
12:36 < nbjoerg> python scripts don't execute by themselve
12:36 < nbjoerg> C programs do
12:36 < vsmatck> Forget about the python example.
12:36 < vsmatck> This would still work.  You compile the go program and run
it.  The #!/usr/bin/bla points to a program that does that.
12:37 < nbjoerg> so what advantage do you get from pretending that a Go
program is not executable standalone
12:37 < jnwhiteh> there _are_ go 'runners' that compile and execute a script
12:37 < jnwhiteh> which I suspect is what you're proposing, only in a
backwards way
12:38 < jnwhiteh> there's no reason for a go executable to handle shebangs
12:38 < vsmatck> I want to capability of a *.go program specifying what
runner it uses.
12:38 < jnwhiteh> there IS no runner for an executable
12:38 < jnwhiteh> there can be a runner for a go SOURCE file
12:38 < jnwhiteh> but not for an executbsle.
12:39 < vsmatck> The runner would compile the go program and run it.
12:39 < jnwhiteh> yes
12:39 < jnwhiteh> so the runner is on the SOURCE not the executable
12:39 < jnwhiteh> you can do that now, congrats =)
12:39 < vsmatck> Can I type "./prog.go" to make it run?
12:39 < jnwhiteh> A C program cannot have a shebang, because this does not
make sense
12:39 < jnwhiteh> yes
12:39 < jnwhiteh> of course
12:39 < vsmatck> Hm. Where can I get info on this?
12:40 < jnwhiteh> http://github.com/malkia/go-runner
12:40 < jnwhiteh> for xample
12:40 < jnwhiteh> next time, ask us how to accomplish what you want to
accomplish, rather than proposing a specific implementation for it =)
12:41 < jnwhiteh> it makes it much easier, and less prone to
meta-discussions
12:41 < nbjoerg> jnwhiteh: exactly what I am saying.  I don't see why it
makes sense for Go either
12:41 < jnwhiteh> nbjoerg: its useful for SOURCE programs
12:41 < jnwhiteh> I've done that with C, and Go previously
12:41 < nbjoerg> jnwhiteh: not really
12:41 < jnwhiteh> its the same as running make && ./main
12:42 < jnwhiteh> just without the makefile, and without the main executable
12:42 < jnwhiteh> outside DEVELOPMENT
12:42 < jnwhiteh> it makes absolutely no sense =)
12:42 < jnwhiteh> a Go program should be compiled and run, I think we can
all agree on that :P
12:42 < nbjoerg> inside DEVELOPMENT it makes no sense either
12:42 < jnwhiteh> but during development, it can be useful
12:42 < nbjoerg> it's not easier than "run-go main.go"
12:42 < jnwhiteh> I think that's a matter of personal opinion
12:43 < jnwhiteh> well, it's the same
12:43 < vsmatck> Cost vs benefit.  It's a feature that most people wouldn't
notice, and a feature that some people would use.
12:43 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3]
12:43 < nbjoerg> or hell
12:43 < jnwhiteh> I don't see much use for it, but the runner exists for a
reason, so other people do.
12:43 < vsmatck> I think it'd be a no cost addition.
12:43 < jnwhiteh> vsmatck: what you want makes absolutely no sense
12:43 < nbjoerg> you can just make the run-go program strip the first line
before passing the input to the go compiler
12:43 < jnwhiteh> I'll say that again =)
12:44 < nbjoerg> nothing the go compiler has to support
12:44 < jnwhiteh> if you're again proposing that EXECUTABLES handle shebangs
12:44 < jnwhiteh> that's just silly
12:44 < jnwhiteh> if you want a runner, you have one =)
12:44 < vsmatck> What is a shebang?
12:45 < jnwhiteh> #!  blah
12:45 < nbjoerg> #!
12:45 -!- jhh [~jhh@f049171175.adsl.alicedsl.de] has joined #go-nuts
12:46 < vsmatck> I don't know what you mean by saying "executables handle
shebangs".  I'm not proposing that.  I'm proposing that you be able to run go
program as if it were shell script.
12:46 < jnwhiteh> yes
12:46 < jnwhiteh> I've told you how to do this
12:46 < jnwhiteh> its possible today
12:46 < jnwhiteh> why are we still talking about it?
12:46 < vsmatck> Don't I have to write "go main.go" to do it?
12:46 < jnwhiteh> jesus.
12:46 < jnwhiteh> no
12:46 < jnwhiteh> =)
12:47 < jnwhiteh> #!  /path/to/go
12:47 < jnwhiteh> at the top of your go file
12:47 < jnwhiteh> if that doesn't currently work, it's a trivial change to
make it work
12:47 < jnwhiteh> and has nothing to do with the language
12:47 < jnwhiteh> you could write your own runner, check the top line,
discard the shebang if its there, feed it into the compiler, link it and run it
12:47 < vsmatck> Will the go compiler handle a file with that at the top?  I
just tried it and the compiler gives an error.
12:48 < jnwhiteh> the compiler doesn't need to
12:48 < vsmatck> I'm saying it should treat that as a comment.
12:48 < jnwhiteh> the runner strips that line before sending it to the
compiler
12:48 < jnwhiteh> well no
12:48 < jnwhiteh> that's unnecessary
12:48 < jnwhiteh> just strip it before its sent
12:48 < vsmatck> I want the compiler to be able to ignore that.
12:48 < jnwhiteh> why>?
12:48 < jnwhiteh> you need a runner anyway
12:48 < jnwhiteh> you can do that manually
12:49 < jnwhiteh> a shebang on a natively compile program is silly
12:49 < vsmatck> I consider it to be a minor addition to the language.  With
some benefit.  I think it'd be good to add.
12:49 -!- tensorpudding [~user@99.23.122.78] has quit [Read error: Connection
reset by peer]
12:49 < jnwhiteh> plain and simple
12:49 < jnwhiteh> what benefits does it have?
12:49 < jnwhiteh> you still need to compile, link and run the program
12:49 < vsmatck> It allows me to run the go program as if it were a script,
but also compile it if I want.
12:49 < jnwhiteh> you HAVE to compile it
12:50 < jnwhiteh> that's what 'running it as a script' would do
12:50 < vsmatck> I don't have to.  My runner can compile it.
12:50 < jnwhiteh> then your runner can remove the shebang
12:50 < jnwhiteh> thanks for proving my point =)
12:50 < vsmatck> I don't want it to have to.  I want the compiler to ignore
that because it would be more flexible.
12:50 -!- thomas_b [~thomasb@cm-84.215.47.51.getinternet.no] has joined #go-nuts
12:50 < jnwhiteh> then post an issue request on the issues tracker.
12:51 < jnwhiteh> but don't be offended if someone tells you any of what
we've already said.
12:51 < napsy> vsmatck: you don't understand the problem ...  Go is a
compiled not an interpreted language ...  there's no interpreter for go so your
idea doesn't make sense
12:51 < vsmatck> This is a good idea.  I didn't know there was an issue
tracker actually.
12:51 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Remote host closed the
connection]
12:51 < jnwhiteh> many/most go programs are more than one source file.  A
runner just plain won't work with those.
12:51 < jnwhiteh> So what's the point?
12:52 < jnwhiteh> http://code.google.com/p/go/issues/list
12:52 < vsmatck> It would work with programs that are one go file.  You
answered your own question.  ;)
12:52 < jnwhiteh> no
12:52 < jnwhiteh> I'm aware of the limitations and benefits
12:52 < jnwhiteh> but your proposed runner can remove the shebang
12:52 < jnwhiteh> I fail to see why we should add support for an edge case
with a clear solution to the compiler
12:52 < vsmatck> I don't think it should have to.  Because I want to be able
to compile a single file go program with that #!  at the top.
12:53 < vsmatck> You should add it because the cost is virtually nothing and
some people would benefit from it.
12:53 < jnwhiteh> I'm not adding anything
12:53 < jnwhiteh> make your proposal on the issues tracker
12:53 < jnwhiteh> I can't imagine anything constructive will come out of
further discussion here
12:53 < vsmatck> jnwhiteh: That's a good idea.
12:53 < nbjoerg> *sigh*
12:53 < nbjoerg> write a runner that strips the first line if you want
12:54 < jnwhiteh> indeed
12:54 < nbjoerg> no need to change any existing programs
12:54 < nbjoerg> over
12:54 < nbjoerg> out
12:54 < jnwhiteh> give the runner an argument to 'compile'
12:54 < jnwhiteh> instead of 'run'
12:54 < vsmatck> nbjoerg: You don't have to change existing programs.  I
specified that #!  should be optional.
12:54 < nbjoerg> the "benefit" is pretty much non-existing
12:54 < nbjoerg> seriously
12:55 < nbjoerg> it takes what, 2min to write such a wrapper script?
12:56 < jnwhiteh> vsmatck: http://pastebin.mozilla.org/791805
12:56 < jnwhiteh> gomake sourceName.run
12:56 < jnwhiteh> that runs it
12:56 < jnwhiteh> gomake sourceName compiles it
12:56 < jnwhiteh> I fail to imagine why that is not sufficient for you
12:56 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts
12:57 < vsmatck> It's not because it's not the same as a shell script.
12:57 -!- kanru [~kanru@61-228-160-87.dynamic.hinet.net] has quit [Quit: WeeChat
0.3.2]
12:57 < jnwhiteh> neither is ANY compiled program, which is precisely the
point =)
12:57 < jnwhiteh> and pyc doesn't count, that's bytecode, not native code
12:57 < jnwhiteh> that is why we're objecting
12:57 < vsmatck> Forget about the python example.  That was wrong.
12:57 < jnwhiteh> you want to apply something from scripting languages to a
natively compiled programming language.
12:57 < vsmatck> D programs can be run in the way I'm talking about.
12:58 < vsmatck> ./prog.d
12:58 < nbjoerg> *sigh*
12:58 < jnwhiteh> using a runner
12:58 < nbjoerg> I told you already how it can be made to work.  noone
really wants to have that because it creates more issues than it solves
12:58 < vsmatck> D language ignores #!  if it's the first line of a program.
12:59 < jnwhiteh> its possible the language designers agree with you
12:59 < jnwhiteh> I just don't =)
12:59 < jnwhiteh> I think its crud that doesn't really need to happen
12:59 < vsmatck> I thought you were a language designer.  :-/
12:59 < jnwhiteh> if you have to type a command, like ./foo.go
12:59 < jnwhiteh> then you can type another command
12:59 < nbjoerg> jnwhiteh: I would be surprised if Rob doesn't give exactly
the same reply
12:59 < jnwhiteh> vsmatck: no, I am not one of the language designers
12:59 < jnwhiteh> there is no difference between you typing ./foo.go and go
foo.go
12:59 < jnwhiteh> let's be hones
12:59 < jnwhiteh> t
13:00 < jnwhiteh> so where's the actual perceived benefit?
13:00 < vsmatck> jnwiteh: run strncmp("./foo.go", "go foo.go") and see if it
returns 0.  :)
13:00 < jnwhiteh> vsmatck: so you want to be able to type one thing
specifically.
13:00 < jnwhiteh> anythign else is unacceptable for some reason?
13:01 < jnwhiteh> anyway, link the issue here when you're done.  I'm
interested in starring the request and seeing the outcome
13:01 < vsmatck> I want it to be the same as a shell script for the purpose
of regularity.  So it's the same.
13:01 < jnwhiteh> I always get insights from those sorts of discussions.
13:01 < vsmatck> kk *works on making issue*
13:02 < nbjoerg> <vsmatck> I like to build sand castle in the beach,
but the stupid sea is destryoing them all the time.  does anyone know how to stop
the sea?
13:02 -!- kanru [~kanru@61-228-160-87.dynamic.hinet.net] has joined #go-nuts
13:03 < vsmatck> I don't understand your analogy.  Are the waves the
compilation process?
13:04 < nbjoerg> (a) where does the compiled binary get stored?
13:04 < jnwhiteh> I think the issue people have is that you want something
that semantically has no definition
13:04 < nbjoerg> (b) who is supposed to clean it up?
13:04 < jnwhiteh> you can't "run" a go source file
13:04 < vsmatck> nbjoerg: You could store it in main memory.
13:04 < jnwhiteh> so enabling someone to do that makes no sense
13:05 < nbjoerg> the go compiler doesn't work that way
13:05 < nbjoerg> neither do exec
13:06 < vsmatck> It would work.
13:07 < nbjoerg> it only works with massive changes to the compiler
13:07 < nbjoerg> noone is really intersted in because you are fixing
something that isn't broken
13:07 < vsmatck> D doing it shows that some people are interested.
13:08 < nbjoerg> it just shows someone was borred
13:09 < nbjoerg> or they are cheating by doing above
13:09 < nbjoerg> did you even bother to just try what I told you to do?
13:09 < vsmatck> nbjoerg: what did you tell me?  About the wrapper script?
13:10 < nbjoerg> yes
13:10 < vsmatck> Oh. I thought I explained that I don't like that solution.
13:10 < nbjoerg> changes are very high that's excatly that D is doing in the
background
13:10 -!- janm [~jmalonzo@ppp121-44-2-23.lns20.syd6.internode.on.net] has quit
[Ping timeout: 240 seconds]
13:11 < vsmatck> I don't know what you mean when you say "changes are very
high ..".
13:11 < nbjoerg> chances
13:11 -!- DerHorst [~Horst@e176109181.adsl.alicedsl.de] has quit [Remote host
closed the connection]
13:11 < vsmatck> Doing it in the background?
13:12 < nbjoerg> wraping it in a shell script, compiling to $TMP, executing
there, removing result on exit
13:12 < vsmatck> ah.  I think that'd be ok.  I'd like go to be able to do
the same thing if that works.
13:13 -!- janm [~jmalonzo@ppp121-44-249-197.lns20.syd7.internode.on.net] has
joined #go-nuts
13:19 -!- Shyde [~shyde@HSI-KBW-078-043-070-132.hsi4.kabel-badenwuerttemberg.de]
has quit [Quit: Shyde]
13:21 < tux21b> I would like to define a type "Rule" which should be a
function like "func (lex *Lexer) doSomething() bool".  "type Rule (*Lexer) func()
bool" isn'tworking :(
13:22 < tux21b> the problem is the syntax of the receiver...
13:23 < jnwhiteh> I don't believe you can typify a function with a receiver.
13:24 < jnwhiteh> tho I'm nope, you can't.
13:24 < jnwhiteh> http://golang.org/doc/go_spec.html#Types
13:24 < jnwhiteh> FunctionType
13:24 < jnwhiteh> not MethodSpec
13:24 < jnwhiteh> hrm
13:26 < tux21b> ok, so it's not possible.  i will try to find another
solution then
13:32 < vsmatck> Got the issue submitted.
http://code.google.com/p/go/issues/detail?id=1121
13:33 -!- gnuvince [~vince@70.35.168.31] has joined #go-nuts
13:33 < vsmatck> The discussion we had in here helped me make the proposal
clear I think.
13:34 < jhh> tux21b: I think I saw it in the stdlib done like that: define
an interface having the rule function and then you have to create an object
implementing that interface
13:36 < tux21b> jhh: that would be a solution, but i simply put the receiver
into the first parameter (which is possible and a bit simpler in my actual case)
13:37 < tux21b> the only problem which might occur in my solution are
private members...
13:38 < jhh> tux21b: yeah I thought so.  You could replace the first
parameter being a function with an object implementing that interface.
13:38 < jhh> you don't actually use the object, only the method.  that's
really ugly though
13:39 < tux21b> i know.  but currently it's "more lightwight" to only create
functions, instead of objects with only one method.  (but i might change that
later)
13:44 < jhh> i see.  i was just afraid i didn't explain it properly.  :)
14:00 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
14:10 -!- jcao219 [~jcao219@pool-173-74-61-111.dllstx.fios.verizon.net] has joined
#go-nuts
14:16 -!- tapankarecha [~tapankare@122.167.16.67] has joined #go-nuts
14:16 -!- zozoR [~zozoR@4705ds1-ris.0.fullrate.dk] has quit [Ping timeout: 240
seconds]
14:21 -!- jcao219 [~jcao219@pool-173-74-61-111.dllstx.fios.verizon.net] has quit
[Remote host closed the connection]
14:25 -!- major_majors [~major_maj@c-68-40-195-246.hsd1.mi.comcast.net] has joined
#go-nuts
14:28 -!- mbohun [~mbohun@ppp115-156.static.internode.on.net] has joined #go-nuts
14:28 -!- zozoR [~zozoR@4705ds1-ris.0.fullrate.dk] has joined #go-nuts
14:38 -!- zozoR [~zozoR@4705ds1-ris.0.fullrate.dk] has quit [Ping timeout: 245
seconds]
14:38 -!- allengeorge [~allengeor@bas1-brampton37-1176134925.dsl.bell.ca] has
joined #go-nuts
14:38 -!- allengeorge [~allengeor@bas1-brampton37-1176134925.dsl.bell.ca] has quit
[Read error: Connection reset by peer]
14:39 -!- allengeorge [~allengeor@bas1-brampton37-1176134925.dsl.bell.ca] has
joined #go-nuts
14:40 -!- napsy [~luka@88.200.96.18] has quit [Quit: Lost terminal]
14:41 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
14:42 -!- janm [~jmalonzo@ppp121-44-249-197.lns20.syd7.internode.on.net] has quit
[Ping timeout: 240 seconds]
14:47 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
14:51 -!- kanru [~kanru@61-228-160-87.dynamic.hinet.net] has quit [Ping timeout:
240 seconds]
14:59 -!- mbohun [~mbohun@ppp115-156.static.internode.on.net] has quit [Quit:
Leaving]
14:59 -!- mbohun [~mbohun@ppp115-156.static.internode.on.net] has joined #go-nuts
15:01 -!- skejoe [~skejoe@188.114.142.231] has joined #go-nuts
15:05 -!- cco3 [~conley@c-69-181-138-209.hsd1.ca.comcast.net] has joined #go-nuts
15:19 -!- theshish [theshish@cpe-68-173-18-52.nyc.res.rr.com] has joined #go-nuts
15:39 -!- d3xter [~sinz@62-47-241-35.adsl.highway.telekom.at] has joined #go-nuts
15:39 -!- tapankarecha [~tapankare@122.167.16.67] has quit [Read error: Connection
reset by peer]
15:40 -!- jcao219 [~Jimmy_Cao@pool-173-74-61-111.dllstx.fios.verizon.net] has
joined #go-nuts
15:40 -!- jcao219 [~Jimmy_Cao@pool-173-74-61-111.dllstx.fios.verizon.net] has quit
[Client Quit]
15:40 -!- tapankarecha [~tapankare@122.167.16.67] has joined #go-nuts
15:40 -!- jcao219 [~jcao219@pool-173-74-61-111.dllstx.fios.verizon.net] has joined
#go-nuts
15:40 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3]
15:43 -!- Kashia [~Kashia@2001:0:53aa:64c:0:ba4:b014:d1e5] has joined #go-nuts
15:43 -!- d3xter [~sinz@62-47-241-35.adsl.highway.telekom.at] has quit [Ping
timeout: 245 seconds]
15:50 -!- boscop [~boscop@g225195161.adsl.alicedsl.de] has joined #go-nuts
15:51 -!- awidegreen [~quassel@62.176.237.78] has quit [Remote host closed the
connection]
15:52 -!- boscop_ [~boscop@g225210143.adsl.alicedsl.de] has quit [Ping timeout:
276 seconds]
15:52 -!- Fish [~Fish@9fans.fr] has joined #go-nuts
15:53 -!- awidegreen [~quassel@62.176.237.78] has joined #go-nuts
15:53 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined
#go-nuts
15:55 -!- boscop_ [~boscop@f055020005.adsl.alicedsl.de] has joined #go-nuts
15:57 -!- boscop [~boscop@g225195161.adsl.alicedsl.de] has quit [Ping timeout: 255
seconds]
16:11 -!- Kashia [~Kashia@2001:0:53aa:64c:0:ba4:b014:d1e5] has quit [Quit: This
computer has gone to sleep]
16:13 -!- allengeorge [~allengeor@bas1-brampton37-1176134925.dsl.bell.ca] has quit
[Quit: allengeorge]
16:18 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
16:21 -!- Kashia [~Kashia@p4FEB2E1A.dip.t-dialin.net] has joined #go-nuts
16:24 -!- theshish [theshish@cpe-68-173-18-52.nyc.res.rr.com] has quit [Quit:
Leaving]
16:27 -!- allengeorge [~allengeor@bas1-brampton37-1176134925.dsl.bell.ca] has
joined #go-nuts
16:27 -!- major_majors [~major_maj@c-68-40-195-246.hsd1.mi.comcast.net] has quit
[Quit: major_majors]
16:27 -!- allengeorge [~allengeor@bas1-brampton37-1176134925.dsl.bell.ca] has quit
[Read error: Connection reset by peer]
16:28 -!- allengeorge [~allengeor@bas1-brampton37-1176134925.dsl.bell.ca] has
joined #go-nuts
16:30 < mpl> heya, what am I doing wrong here please:
16:30 < mpl> demo.go:56: invalid operation: foo <- c (send to
receive-only type int)
16:31 < exch> if 'foo' is a read-only channel, you can't send data to it
16:32 < mpl> damnit, foo is an int, I was using send instead of assigning.
thx.
16:32 < exch> ah lol
16:34 -!- niemeyer [~niemeyer@201-35-72-214.pltce701.dsl.brasiltelecom.net.br] has
joined #go-nuts
16:35 < mpl> it's tricky though imho , I'm sure I'll make the mistake again.
I mean, couldn't we shorten "foo := <-c" to "foo <-c" ?
16:36 < vsmatck> Hm. := is initialize new variable and assign.  "foo <-c"
doesn't really encapsulate that meaning.
16:36 < mpl> fair enough, foo = <-c to foo <-c then.
16:37 < exch> there's also the difference between 'foo = <-c' and 'foo :=
<-c' that can't be dealth with without the assign
16:37 < mpl> yeah forget the initialization, just assimilate the assigment
to the send operation when it's suitable.
16:38 < nsf> it's good to remember that <-c is an expression
16:39 < nsf> and one should use it as a value
16:40 < nsf> there is a bit of confusion because 'c <- i' is not an
expression :)
16:40 < mpl> yeah
16:40 < nsf> actually it's interesting
16:40 < nsf> why can't we add the same statement but with channel on the
right side
16:41 < nsf> and it will be a syntax sugar for 'i = <-c'
16:41 < nsf> 'i <- c'
16:41 < mpl> yep
16:41 -!- ikaros [~ikaros@dslb-084-059-076-021.pools.arcor-ip.net] has joined
#go-nuts
16:42 < nsf> but it may add more confusion :)
16:42 < mpl> although it would be kind of non consistent, not really
symmetric with the other operation.
16:42 < exch> it's not obvious from that code what is going on if you don't
have contextual information about what c and i are
16:42 < nsf> yes yes
16:42 < nsf> more confusion
16:42 < mpl> yeah.
16:43 -!- major_majors [~major_maj@c-68-40-195-246.hsd1.mi.comcast.net] has joined
#go-nuts
16:45 -!- rullie [~rullie@bas4-toronto47-1176149432.dsl.bell.ca] has left #go-nuts
[]
16:46 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 264 seconds]
16:46 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
16:47 < napsy> Is gccgo still broken?
16:47 -!- luruke [~luruke@151.53.42.188] has joined #go-nuts
16:52 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3]
16:55 -!- ssjones [~ssjones@67-61-100-203.cpe.cableone.net] has quit [Read error:
Connection reset by peer]
17:06 -!- terrex [~terrex@84.122.67.111.dyn.user.ono.com] has quit [Quit:
Leaving.]
17:08 < mpl> is there a generic way to listen to all the goroutine's
channels, like alt() in plan9's libthread ?
17:08 < mpl> ah, select
17:15 -!- Kashia [~Kashia@p4FEB2E1A.dip.t-dialin.net] has quit [Quit: This
computer has gone to sleep]
17:23 -!- major_majors [~major_maj@c-68-40-195-246.hsd1.mi.comcast.net] has quit
[Quit: major_majors]
17:28 -!- luruke [~luruke@151.53.42.188] has quit [Quit: Leaving]
17:28 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-172-36.clienti.tiscali.it] has
quit [Quit: E se abbasso questa leva che succ...]
17:30 -!- piyushmishra [~piyushmis@117.200.228.111] has quit [Quit: Leaving.]
17:36 -!- niemeyer [~niemeyer@201-35-72-214.pltce701.dsl.brasiltelecom.net.br] has
quit [Ping timeout: 245 seconds]
17:38 -!- tvw [~tv@e176003091.adsl.alicedsl.de] has joined #go-nuts
17:59 -!- voker57 [~voker57@kvirc/developer/Voker57] has quit [Read error:
Connection reset by peer]
17:59 -!- tapankarecha [~tapankare@122.167.16.67] has quit [Read error: Connection
reset by peer]
18:00 -!- tapankarecha [~tapankare@122.167.16.67] has joined #go-nuts
18:01 -!- tasosos [~tasosos@178.128.158.237.dsl.dyn.forthnet.gr] has joined
#go-nuts
18:03 -!- major_majors [~major_maj@c-68-40-195-246.hsd1.mi.comcast.net] has joined
#go-nuts
18:04 -!- major_majors [~major_maj@c-68-40-195-246.hsd1.mi.comcast.net] has quit
[Read error: Connection reset by peer]
18:05 -!- major_majors [~major_maj@c-68-40-195-246.hsd1.mi.comcast.net] has joined
#go-nuts
18:07 -!- tvw [~tv@e176003091.adsl.alicedsl.de] has quit [Remote host closed the
connection]
18:08 -!- major_majors [~major_maj@c-68-40-195-246.hsd1.mi.comcast.net] has quit
[Client Quit]
18:09 -!- jA_cOp [~yakobu@unaffiliated/ja-cop/x-9478493] has joined #go-nuts
18:12 -!- allengeorge [~allengeor@bas1-brampton37-1176134925.dsl.bell.ca] has quit
[Quit: allengeorge]
18:13 < napsy> Is there a method like feof() to check wether there's data
available from an io.Reader?
18:16 < Tv> napsy: if there were, it'd be in bufio not pure io
18:18 < Tv> napsy: but really what you should do is just read until you get
ROF
18:18 < Tv> EOF
18:20 < napsy> ok
18:22 < napsy> hum but what if I don't want to read just check
18:42 -!- jA_cOp [~yakobu@unaffiliated/ja-cop/x-9478493] has quit [Read error:
Connection reset by peer]
18:42 -!- jA_cOp [~yakobu@unaffiliated/ja-cop/x-9478493] has joined #go-nuts
18:51 < napsy> is there a function line C assert() in go?
18:51 < napsy> like*
18:57 -!- felipe [~felipe@my.nada.kth.se] has joined #go-nuts
18:59 < KirkMcDonald> napsy: if x != y { panic() }
18:59 < KirkMcDonald> That's probably as close as you'll get.
19:00 < KirkMcDonald> Well, you can: panic("some message")
19:01 < napsy> oh I thought tere was a simpler mechanism
19:02 < napsy> but ok
19:02 < exch> I remember a discussion about assert and the Go devs being
very adament about not including it because it would encourage bad error handling
practices
19:04 < nbjoerg> exch: exactly
19:05 -!- tapankarecha [~tapankare@122.167.16.67] has left #go-nuts []
19:05 < napsy> hm it't really usefull if your'e writing test cases
19:05 < napsy> it's
19:07 < cbeck> For that you should be using the testing package
19:07 < napsy> ...  I ment unit tests
19:08 < cbeck> I stand by my earlier statement
19:08 < napsy> ok I'll check it out
19:09 -!- piyushmishra [~piyushmis@117.200.228.111] has joined #go-nuts
19:14 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit:
This computer has gone to sleep]
19:21 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Read error: Connection
reset by peer]
19:27 -!- DerHorst [~Horst@e176109181.adsl.alicedsl.de] has joined #go-nuts
19:32 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts
19:42 -!- femtoo [~femto@95-89-248-241-dynip.superkabel.de] has quit [Read error:
Connection reset by peer]
19:42 -!- femtoo [~femto@95-89-248-241-dynip.superkabel.de] has joined #go-nuts
19:45 -!- major_majors [~major_maj@adsl-99-66-69-175.dsl.sfldmi.sbcglobal.net] has
joined #go-nuts
20:01 -!- niemeyer [~niemeyer@201-35-72-214.pltce701.dsl.brasiltelecom.net.br] has
joined #go-nuts
20:03 -!- femtoo [~femto@95-89-248-241-dynip.superkabel.de] has quit [Quit:
Leaving]
20:05 -!- skelterjohn [~jasmuth@66.87.0.107] has joined #go-nuts
20:05 -!- skelterjohn [~jasmuth@66.87.0.107] has quit [Client Quit]
20:08 < jhh> what's the best way to tokenize stdin?
20:09 -!- Kashia [~Kashia@port-92-200-8-77.dynamic.qsc.de] has joined #go-nuts
20:09 < Tv> i wish there was a variant of netchan that worked over a single
ReadWriteCloser
20:20 -!- major_majors [~major_maj@adsl-99-66-69-175.dsl.sfldmi.sbcglobal.net] has
quit [Quit: major_majors]
20:31 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Read error: Connection
reset by peer]
20:33 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts
20:37 -!- napsy [~luka@88.200.96.18] has quit [Quit: Lost terminal]
20:39 < soul9> anyone know why 0.0.0.0 would resolve to [::] ?
20:39 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
20:40 < soul9> i have a listener in a program that does a resolve of 0.0.0.0
and then binds that adress, but it seems it starts listening on udp6 instead of
udp
20:42 -!- niemeyer [~niemeyer@201-35-72-214.pltce701.dsl.brasiltelecom.net.br] has
quit [Quit: Leaving]
20:42 -!- eliteSchaf [~sinz@62-47-255-61.adsl.highway.telekom.at] has joined
#go-nuts
20:42 < eliteSchaf> hey
20:43 < eliteSchaf> is it possible to send and receive simultaneous on one
netchan?
20:45 < soul9> according to this
http://golang.org/pkg/net/#UDPAddr.ResolveUDPAddr 0.0.0.0:7000 should yield an
ipv4 adress, not an ipv6 one
20:47 < Tv> eliteSchaf: i saw a comment on the mailing list that it was one
direction only, but i don't know if that has changed since
20:47 < Tv> there's a "direction" in the channels
20:47 -!- ssjones [~ssjones@67-61-100-203.cpe.cableone.net] has joined #go-nuts
20:47 < eliteSchaf> Tv, well if i use "netchan.Recv | netchan.Send" i dont
get an error but i cant send or receive any messages
20:48 < Tv> eliteSchaf: yeah the source has those as enums not as boolean
flags
20:48 < Tv> eliteSchaf: one channel is definitely one direction only
20:49 < eliteSchaf> Tv, alright, thanks
20:49 -!- atsampso1 [~ats@94-194-126-16.zone8.bethere.co.uk] has left #go-nuts []
20:50 * Tv notes the whole distributed nature of netchan seems to prevent it from
acting like a true go two-directional channel would
20:52 < eliteSchaf> thats why i asked, whether they'll implement
bi-directional netchan's any time soon ^^
20:53 < Tv> oh and just to clarify: the message i googled up a week ago said
something like "exporter must send, importer must receive", and it seems like it
only applied to an earlier version of netchan
21:01 < eliteSchaf> Tv, and its not possible for more than 1 importers to
connect to a netchan, right?
21:02 -!- DerHorst [~Horst@e176109181.adsl.alicedsl.de] has quit [Remote host
closed the connection]
21:02 < eliteSchaf> i always get "importer header; EOF" on both importers
21:04 -!- Fish [~Fish@9fans.fr] has quit [Remote host closed the connection]
21:06 < Tv> eliteSchaf: not sure
21:06 < Tv> eliteSchaf: i haven't actually used netchan, as i don't want the
plaintext tcp connections it insists on
21:07 -!- wjlroe [~will@78-86-14-131.zone2.bethere.co.uk] has joined #go-nuts
21:08 -!- wjlroe [~will@78-86-14-131.zone2.bethere.co.uk] has quit [Client Quit]
21:08 -!- wjlroe [~will@78-86-14-131.zone2.bethere.co.uk] has joined #go-nuts
21:09 -!- wjlroe [~will@78-86-14-131.zone2.bethere.co.uk] has quit [Client Quit]
21:09 -!- wjlroe [~will@78-86-14-131.zone2.bethere.co.uk] has joined #go-nuts
21:10 < wjlroe> What should I use instead of io.ReadAll(byte[]) ?
21:12 < cbeck> To do what?
21:13 < wjlroe> I want to read all the bytes from a variable so that I can
write them to a file
21:13 < wjlroe> if there's a way to stream from one to the other that would
be better
21:13 < wjlroe> it's an http request body to a file
21:13 -!- janm [~jmalonzo@ppp121-44-249-197.lns20.syd7.internode.on.net] has
joined #go-nuts
21:14 < Tv> wjlroe: the usual idiom is to write a little loop that
reads+writes until it sees EOF
21:15 < wjlroe> ok
21:15 < Tv> wjlroe: that is, if your source is something with Read etc
21:15 < wjlroe> can you pass a reader to a writer function?
21:15 < Tv> don't think so
21:15 < wjlroe> I gues that's the same thing
21:16 < cbeck> You can create a pipe, not sure if that's really what you're
looking for though
21:17 < wjlroe> I suppose I could do read := bufio.NewReader(file)
21:17 < wjlroe> with the http request body file-like object
21:17 < Tv> wjlroe: what type is file there?
21:18 < Tv> i'd expect it to already be a Reader, you don't need bufio
unless you care about reading line by line etc
21:18 < wjlroe> it's binary
21:18 < wjlroe> ok
21:18 < wjlroe> cool
21:20 -!- jA_cOp [~yakobu@unaffiliated/ja-cop/x-9478493] has quit [Read error:
Connection reset by peer]
21:20 -!- jA_cOp [~yakobu@unaffiliated/ja-cop/x-9478493] has joined #go-nuts
21:23 -!- jA_cOp [~yakobu@unaffiliated/ja-cop/x-9478493] has quit [Read error:
Connection reset by peer]
21:23 -!- rlab [~Miranda@91.200.158.34] has quit [Quit: Miranda IM! Smaller,
Faster, Easier.  http://miranda-im.org]
21:23 -!- jA_cOp [~yakobu@unaffiliated/ja-cop/x-9478493] has joined #go-nuts
21:24 -!- luruke [~luruke@151.53.42.188] has joined #go-nuts
21:24 -!- d_m [d6@SDF.ORG] has quit [Quit: Lost terminal]
21:27 -!- major_majors [~major_maj@173-10-44-57-Michigan.hfc.comcastbusiness.net]
has joined #go-nuts
21:31 -!- eikenberry [~jae@ivanova.zhar.net] has quit [Quit: End of line.]
21:33 -!- eliteSchaf [~sinz@62-47-255-61.adsl.highway.telekom.at] has quit [Quit:
Ex-Chat]
21:39 -!- skejoe [~skejoe@188.114.142.231] has quit [Quit: Lost terminal]
21:40 -!- awidegreen [~quassel@62.176.237.78] has quit [Remote host closed the
connection]
21:41 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit:
Verlassend]
21:43 -!- ikaros [~ikaros@dslb-084-059-076-021.pools.arcor-ip.net] has quit [Quit:
Leave the magic to Houdini]
21:44 -!- luruke [~luruke@151.53.42.188] has quit [Quit: Leaving]
21:51 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
21:51 < plexdev> http://is.gd/fiy0u by [Rob Pike] in go/src/pkg/gob/ -- gob:
make robust when decoding a struct with non-struct data.
21:51 < plexdev> http://is.gd/fiy0E by [Rob Pike] in go/doc/ --
doc/go_mem.html: update location of "once".
21:58 -!- wjlroe [~will@78-86-14-131.zone2.bethere.co.uk] has quit [Quit: Get
MacIrssi - http://www.sysctl.co.uk/projects/macirssi/]
22:03 -!- tash [~sf@midgard.9by6.org] has joined #go-nuts
22:07 -!- janm [~jmalonzo@ppp121-44-249-197.lns20.syd7.internode.on.net] has quit
[Ping timeout: 240 seconds]
22:09 -!- virtualsue [~chatzilla@nat/cisco/x-yqgvgreapgkqxgde] has joined #go-nuts
22:14 -!- tash [~sf@midgard.9by6.org] has quit [Quit: leaving]
22:18 -!- jhh [~jhh@f049171175.adsl.alicedsl.de] has quit [Quit: jhh]
22:21 -!- tash [~quassel@midgard.9by6.org] has joined #go-nuts
22:27 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined
#go-nuts
22:28 -!- tash [~quassel@midgard.9by6.org] has left #go-nuts []
22:39 -!- allengeorge [~allengeor@bas1-brampton37-1176134925.dsl.bell.ca] has
joined #go-nuts
22:41 -!- allengeorge [~allengeor@bas1-brampton37-1176134925.dsl.bell.ca] has quit
[Read error: Connection reset by peer]
22:42 -!- rlab [~Miranda@91.200.158.34] has quit [Quit: Miranda IM! Smaller,
Faster, Easier.  http://miranda-im.org]
23:05 -!- major_majors [~major_maj@173-10-44-57-Michigan.hfc.comcastbusiness.net]
has quit [Quit: major_majors]
23:11 -!- peterdn [~peterdn@host86-166-21-60.range86-166.btcentralplus.com] has
quit [Ping timeout: 245 seconds]
23:14 -!- peterdn [~peterdn@host81-159-106-59.range81-159.btcentralplus.com] has
joined #go-nuts
23:15 -!- allengeorge [~allengeor@bas1-brampton37-1176134925.dsl.bell.ca] has
joined #go-nuts
23:19 -!- allengeorge [~allengeor@bas1-brampton37-1176134925.dsl.bell.ca] has quit
[Client Quit]
23:19 -!- allengeorge [~allengeor@bas1-brampton37-1176134925.dsl.bell.ca] has
joined #go-nuts
23:20 < Tv> wjlroe?
23:20 -!- allengeorge [~allengeor@bas1-brampton37-1176134925.dsl.bell.ca] has quit
[Client Quit]
23:20 < Tv> bah..  i just stumbled on http://golang.org/pkg/io/#Copy and he
asked for exactly that
23:21 -!- ptolomy [~consalus@216.239.45.130] has joined #go-nuts
23:22 -!- ptolomy [~consalus@216.239.45.130] has quit [Client Quit]
23:27 -!- theshish [theshish@cpe-68-173-18-52.nyc.res.rr.com] has joined #go-nuts
23:34 -!- theshish [theshish@cpe-68-173-18-52.nyc.res.rr.com] has quit [Quit:
Leaving]
23:35 -!- theshish [theshish@cpe-68-173-18-52.nyc.res.rr.com] has joined #go-nuts
23:35 < theshish> when would I want to use "func ClassFunc(c MyClass)..." vs
"func ClassFunc(c *MyClass)..."?
23:37 < Tv> theshish: if you want to mutate c, it needs to be passed as
pointer not as value
23:38 < exch> There also seems to be a speed consideration.  With large
structs, passing a pointer may be faster.  Though I am unsure what 'large' means
exactly.
23:38 < theshish> I'm a little confused, coming from C++ background here
23:38 < Tv> sure, copying things around is a cost
23:38 < theshish> isn't this like defining a member function?
23:39 -!- plexdev [~plexdev@arthur.espians.com] has quit [Remote host closed the
connection]
23:39 < Tv> theshish: you'll understand go faster starting from fresh not
trying to apply C++ to it
23:39 < Tv> theshish: receivers are sort of like member functions, but
imagine the member function either getting a copy of the object, or a reference to
it, and you get to pick which
23:40 < theshish> I see
23:40 < Tv> theshish: except they aren't like member functions, at all --
you can add them to types defined elsewhere etc..  they're more like "pattern
match the type and call this function with it"
23:40 < cbeck> Tv: not exactly, you have to make a new type locally
23:41 < Tv> cbeck: oh sure but your new type can be just a new name for int
23:41 < theshish> yeah that seems a little confusing too to me
23:41 < Tv> i don't know..  i was never a big believer in traditional OO, it
seems fairly ok to me
23:42 < Tv> theshish: think of it more as being defined by what you can do
with a value than "what class it it"
23:42 < exch> type Foo int; is not just a new name for int.  It's a
distinctly separate type
23:42 < Tv> *is
23:44 < theshish> I get that but the requirement of defining a local type is
a little weird
23:44 -!- virtualsue [~chatzilla@nat/cisco/x-yqgvgreapgkqxgde] has quit [Ping
timeout: 240 seconds]
23:46 -!- photron [~photron@port-92-201-57-106.dynamic.qsc.de] has quit [Ping
timeout: 276 seconds]
23:47 < theshish> seems like it would lead to a lot of conversion all around
23:47 < theshish> since the new type is actually distinct
23:48 -!- plexdev [~plexdev@arthur.espians.com] has joined #go-nuts
23:48 -!- navigator [~navigator@p54897BAE.dip.t-dialin.net] has quit [Quit:
WeeChat 0.3.3]
23:53 < theshish> or am I missing something
23:54 < Tv> maybe the implementation sees they share the same memory layout
etc and doesn't actually need to do any work to "convert"
23:54 < exch> in most cases the 'new' type can be treated as the new one
without explicit conversion
23:54 < exch> *as the old one
23:54 < plexdev> http://is.gd/fiELP by [Russ Cox] in go/src/cmd/5l/ -- 5l:
avoid fixed buffers in list
23:55 < theshish> exch, is that when functions on the old one are defined
via interfaces?
23:56 < exch> not sure what you mean, but to illustrate: type Foo int; var
a, b Foo; a = 123; b = 321; sum(a, b);
23:56 < exch> where sum() takes ints as parameters
23:57 < exch> and if sum returns int, you can just assign it to a Foo var
without casting
23:57 < theshish> so when would it not work then?  in the example on the
website it claims it needs an explicit conversion
23:58 < theshish> type myInteger int; func f(i int) { }; var v myInteger; //
f(v) is invalid.
23:58 < exch> Dunno if the example is the same.  It may also have been
written a while back.  A fair bit has changed in Go in the last months
23:59 < theshish> so implicit conversions are legit now?
23:59 < exch> ah I just tested.  seems it's still illegal.  Mm the implicit
conversions only work part of the time then
--- Log closed Mon Sep 20 00:00:07 2010