--- Log opened Thu Sep 16 00:00:07 2010
00:03 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Ping timeout: 240
00:05 -!- Altercation [~Altercati@pdpc/supporter/active/altercation] has quit
[Excess Flood]
00:05 -!- Altercation [~Altercati@pdpc/supporter/active/altercation] has joined
00:11 -!- napsy [~luka@] has quit [Ping timeout: 245 seconds]
00:11 < plexdev> http://is.gd/fcyAU by [Robert Griesemer] in 3 subdirs of
go/test/ -- fix build
00:14 -!- dj2 [~dj2@CPE001f5b35feb4-CM0014048e0344.cpe.net.cable.rogers.com] has
joined #go-nuts
00:16 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3]
00:18 -!- acts_as [~acts_as@] has joined #go-nuts
00:18 -!- Tv [~tv@gige.bur.digisynd.com] has quit [Ping timeout: 245 seconds]
00:19 -!- artefon [~thiago@] has joined #go-nuts
00:22 -!- ExtraSpice [~XtraSpice@78-57-168-219.static.zebra.lt] has quit [Ping
timeout: 240 seconds]
00:23 -!- thiago__ [~thiago@] has joined #go-nuts
00:23 -!- artefon [~thiago@] has quit [Ping timeout: 240 seconds]
00:25 -!- jcao219 [~jcao219@pool-173-74-61-111.dllstx.fios.verizon.net] has quit
[Ping timeout: 245 seconds]
00:27 -!- bookses [~John@] has quit [Quit: Leaving.]
00:32 -!- steveno [~stevenoli@c-24-131-221-195.hsd1.pa.comcast.net] has joined
00:32 -!- steveno [~stevenoli@c-24-131-221-195.hsd1.pa.comcast.net] has quit
[Changing host]
00:32 -!- steveno [~stevenoli@paludis/cheerleader/steveno] has joined #go-nuts
00:32 -!- bmizerany [~bmizerany@] has joined #go-nuts
00:34 -!- mprorock [~mprorock@cpe-024-211-179-212.nc.res.rr.com] has joined
00:35 -!- jcao219 [~jcao219@pool-173-74-61-111.dllstx.fios.verizon.net] has joined
00:37 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has quit [Ping
timeout: 264 seconds]
00:38 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has joined
00:40 -!- mikespook [~mikespook@] has joined #go-nuts
00:44 -!- jrslepak [~jrslepak@71-13-223-16.dhcp.mrqt.mi.charter.com] has joined
00:56 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has joined #go-nuts
00:58 -!- Tv [~tv@cpe-76-168-227-45.socal.res.rr.com] has joined #go-nuts
00:58 -!- allengeorge_ [~allengeor@bas1-brampton37-1176134925.dsl.bell.ca] has
joined #go-nuts
00:58 -!- allengeorge [~allengeor@bas1-brampton37-1176134925.dsl.bell.ca] has quit
[Read error: Connection reset by peer]
00:59 -!- iant1 [~iant@] has quit [Quit: Leaving.]
01:00 -!- Zoopee [alsbergt@zoopee.org] has quit [Quit: Ejected]
01:00 -!- Zoopee [alsbergt@zoopee.org] has joined #go-nuts
01:03 -!- bmizerany [~bmizerany@] has quit [Remote host closed the
01:05 -!- bmizerany [~bmizerany@] has joined #go-nuts
01:09 -!- mattikus [~mattikus@ip24-250-73-154.br.br.cox.net] has quit [Remote host
closed the connection]
01:13 -!- liunian [~liunian@] has joined #go-nuts
01:23 -!- mattikus [~mattikus@ip24-250-73-154.br.br.cox.net] has joined #go-nuts
01:23 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
01:25 -!- mattikus [~mattikus@ip24-250-73-154.br.br.cox.net] has quit [Remote host
closed the connection]
01:25 -!- mattikus [~mattikus@ip24-250-73-154.br.br.cox.net] has joined #go-nuts
01:26 -!- Bombe [~droden@freenet/developer/Bombe] has quit [Excess Flood]
01:26 -!- Bombe [~droden@weltgehirnmaschine.de] has joined #go-nuts
01:31 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has quit [Read
error: Operation timed out]
01:32 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has joined
01:33 -!- clip9 [tj@12.81-166-62.customer.lyse.net] has joined #go-nuts
01:35 -!- felipe [~felipe@my.nada.kth.se] has quit [Quit: felipe]
01:35 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has joined #go-nuts
01:36 -!- mode/#go-nuts [+v iant] by ChanServ
01:40 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has quit [Ping
timeout: 245 seconds]
01:45 -!- Venom_X [~pjacobs@] has quit [Quit: Venom_X]
01:52 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts
01:53 -!- powerje [~powerje@adsl-75-60-229-136.dsl.wotnoh.sbcglobal.net] has
joined #go-nuts
01:54 -!- iant [~iant@] has joined #go-nuts
01:54 -!- mode/#go-nuts [+v iant] by ChanServ
01:54 -!- mprorock_ [~mprorock@cpe-024-211-179-212.nc.res.rr.com] has joined
01:57 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has quit [Ping
timeout: 276 seconds]
01:58 -!- mprorock [~mprorock@cpe-024-211-179-212.nc.res.rr.com] has quit [Ping
timeout: 252 seconds]
01:58 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has joined
02:06 -!- bmizerany [~bmizerany@] has quit [Remote host closed the
02:08 -!- SRabbelier [~SRabbelie@ip138-114-211-87.adsl2.static.versatel.nl] has
quit [Ping timeout: 245 seconds]
02:10 -!- gnuvince [~vince@] has quit [Ping timeout: 276 seconds]
02:11 -!- thiago__ [~thiago@] has quit [Quit: bye]
02:11 -!- gnuvince [~vince@] has joined #go-nuts
02:13 -!- steveno [~stevenoli@paludis/cheerleader/steveno] has quit [Quit:
02:14 -!- boscop_ [~boscop@g227133098.adsl.alicedsl.de] has joined #go-nuts
02:14 -!- boscop [~boscop@g227014253.adsl.alicedsl.de] has quit [Ping timeout: 252
02:18 -!- mattikus [~mattikus@ip24-250-73-154.br.br.cox.net] has quit [Remote host
closed the connection]
02:19 -!- tensorpudding [~user@] has quit [Remote host closed the
02:20 -!- tensorpudding [~user@] has joined #go-nuts
02:23 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has quit [Read
error: Operation timed out]
02:25 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has joined
02:32 -!- rullie [~rullie@bas4-toronto47-1176149432.dsl.bell.ca] has joined
02:33 -!- mrb_bk [~mrb@cpe-24-90-154-40.nyc.res.rr.com] has joined #go-nuts
02:33 -!- mrb_bk [~mrb@cpe-24-90-154-40.nyc.res.rr.com] has left #go-nuts []
02:46 -!- skelterjohn [~jasmuth@c-76-124-23-156.hsd1.nj.comcast.net] has joined
02:46 -!- mattikus [~mattikus@ip24-250-73-154.br.br.cox.net] has joined #go-nuts
02:46 -!- mattikus [~mattikus@ip24-250-73-154.br.br.cox.net] has quit [Remote host
closed the connection]
02:49 -!- gid [~gid@220-253-147-183.VIC.netspace.net.au] has quit [Quit: Leaving.]
02:50 -!- ericvh [~ericvh@2002:467b:802c:0:223:6cff:fe93:c616] has joined #go-nuts
02:52 < rullie> i imagined this place to be more chatty
02:52 < nsf> it's pretty silent
02:52 < nsf> for a chatty go to #D
02:52 < nsf> they are _very_ chatty :)
02:52 < jesusaurus> not a whole lot of offtopic in here
02:57 < jcao219> which makes it so boring
02:57 < jcao219> sometimes
02:57 < nsf> :D
02:57 < nsf> Go programmers actually do their work
02:57 < nsf> instead of chatting :)
02:58 < jcao219> true
02:58 < nsf> while it compiles..
02:58 < jcao219> except for that andreialexandres guy, who never talks
02:58 < jesusaurus> but it compiles so quickly...
02:58 < jcao219> apparently he's very busy
02:58 < nsf> :D
02:58 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit:
This computer has gone to sleep]
02:58 * nsf just closed 2 more issues for gocode, 2 more left
02:59 < jesusaurus> awesome!
02:59 -!- skelterjohn [~jasmuth@c-76-124-23-156.hsd1.nj.comcast.net] has quit
[Quit: skelterjohn]
02:59 < nsf> I'm still not sure about import _ "..." packages
03:00 < nsf> oops
03:00 < nsf> I mean import . "..."
03:00 < nsf> it's such a useless feature
03:00 < nsf> of the language
03:01 -!- rejb [~rejb@unaffiliated/rejb] has quit [Ping timeout: 276 seconds]
03:08 -!- ericvh [~ericvh@2002:467b:802c:0:223:6cff:fe93:c616] has quit [Quit:
03:10 -!- jcao219 [~jcao219@pool-173-74-61-111.dllstx.fios.verizon.net] has quit
[Ping timeout: 245 seconds]
03:10 -!- steveno [~stevenoli@paludis/cheerleader/steveno] has joined #go-nuts
03:14 -!- mattikus [~mattikus@ip24-250-73-154.br.br.cox.net] has joined #go-nuts
03:18 -!- steveno [~stevenoli@paludis/cheerleader/steveno] has quit [Ping timeout:
245 seconds]
03:25 -!- jrslepak [~jrslepak@71-13-223-16.dhcp.mrqt.mi.charter.com] has quit
[Quit: jrslepak]
03:26 -!- allengeorge [~allengeor@bas1-brampton37-1176134925.dsl.bell.ca] has quit
[Quit: allengeorge]
03:31 -!- jcao219 [~jcao219@pool-173-74-61-111.dllstx.fios.verizon.net] has joined
03:33 -!- liunian [~liunian@] has quit [Remote host closed the
03:40 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Remote
host closed the connection]
03:41 -!- Eridius [~kevin@unaffiliated/eridius] has quit [Ping timeout: 240
03:45 -!- jcao219 [~jcao219@pool-173-74-61-111.dllstx.fios.verizon.net] has quit
[Ping timeout: 245 seconds]
03:55 -!- mattikus [~mattikus@ip24-250-73-154.br.br.cox.net] has quit [Remote host
closed the connection]
03:56 -!- dj2 [~dj2@CPE001f5b35feb4-CM0014048e0344.cpe.net.cable.rogers.com] has
quit [Quit: dj2]
04:00 < plexdev> http://is.gd/fcMQH by [Rob Pike] in go/src/pkg/netchan/ --
netchan: fix bug for imported send.
04:03 -!- dionysiac [~dionysiac@S01060013102db8c7.cg.shawcable.net] has quit [Read
error: Connection reset by peer]
04:03 -!- dionysiac_ [~dionysiac@S01060013102db8c7.cg.shawcable.net] has joined
04:07 -!- tasosos [~tasosos@] has quit [Remote
host closed the connection]
04:08 -!- enherit [~enherit@71-83-188-75.dhcp.lnbh.ca.charter.com] has joined
04:11 -!- skelterjohn [~jasmuth@c-76-124-23-156.hsd1.nj.comcast.net] has joined
04:17 < plexdev> http://is.gd/fcNPm by [Andrew Gerrand] in 2 subdirs of go/
-- golang.org redesign
04:17 < plexdev> http://is.gd/fcNPq by [Andrew Gerrand] in 2 subdirs of go/
-- release.2010-09-15
04:17 < plexdev> http://is.gd/fcNPy by [Andrew Gerrand] in go/ -- tag
04:23 < enferex> SO im looking for a gc implementation of escape analysis.
I know some tests utilize this, however, im unsure where in the codebase of the gc
compiler this is implemented.  I suppose gc does not implement this?
04:27 < nbjoerg> the escape analysis is currently "is pointer taken?  if
yes, it escapes"
04:28 -!- zozoR [~zozoR@4705ds1-ris.0.fullrate.dk] has joined #go-nuts
04:29 < enferex> so nbjoerg its just primitive then
04:31 < nbjoerg> yes
04:33 < cbeck> Hmmph "branch release not found" when I try to hg update
04:33 < cbeck> I'm an hg noob, any advice?
04:33 < nsf> I've just pulled and updated successfully
04:34 < nsf> have no idea what is wron
04:34 < nsf> wrong*
04:34 < cbeck> I did as well on my other box
04:36 < nbjoerg> you selected a non-existing brnach?
04:36 < cbeck> hg heads shows only the most current, hg branch shows
04:39 < cbeck> Hmm, mercurial version is back a few, 1.1.2
04:42 -!- Davidian1024 [~Davidian1@cpe-98-27-192-193.neo.res.rr.com] has quit
[Ping timeout: 272 seconds]
04:43 -!- Davidian1024 [~Davidian1@cpe-98-27-192-193.neo.res.rr.com] has joined
04:44 -!- Project_2501 [~Marvin@] has joined #go-nuts
04:45 < cbeck> Looks like it was something wonky with version, found a newer
one, worked fine.
04:51 -!- bmizerany [~bmizerany@c-24-6-37-113.hsd1.ca.comcast.net] has joined
04:51 < nsf> check out the golang.org redesign
04:52 < nbjoerg> nice
04:52 < cbeck> Nice
04:53 < nsf> I'm not a designer, but there are few quirks with sizes of
04:53 < vsmatck> wtf I refreshed and it turned ugly.
04:53 < nsf> vsmatck: refresh it again
04:54 < vsmatck> ooh!  Now it looks nice but different yet again.
04:54 < vsmatck> wow, compile and run on web page.  That's very nice.
04:55 < nbjoerg> I'm waiting for the Javascript compiler :)
04:58 -!- Tv [~tv@cpe-76-168-227-45.socal.res.rr.com] has quit [Ping timeout: 264
05:00 < vsmatck> yes.  I like this better.
05:00 * vsmatck throws in his 2 cents.
05:00 -!- Tv [~tv@cpe-76-168-227-45.socal.res.rr.com] has joined #go-nuts
05:01 -!- scm [justme@d071056.adsl.hansenet.de] has quit [Ping timeout: 252
05:03 -!- scm [justme@d070233.adsl.hansenet.de] has joined #go-nuts
05:06 < jackman> omg.  that is awesome
05:22 < nsf> oh no!  they've removed a link to the ML from the front page
05:22 < nsf> I was using it all the time :)
05:24 < nbjoerg> nsf: do you ask google for facebook too?  :)
05:25 < nsf> uhm..  I don't use facebook
05:25 < nbjoerg> phising 101: build a login page for facebook/...  that has
a higher page rank than the real site
05:25 < nbjoerg> you'd be surprised...
05:26 < nsf> :)
05:29 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has quit [Ping
timeout: 240 seconds]
05:30 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has joined
05:32 -!- awidegreen [~quassel@] has joined #go-nuts
05:37 -!- tvw [~tv@e176003005.adsl.alicedsl.de] has joined #go-nuts
05:40 -!- Bombe [~droden@weltgehirnmaschine.de] has quit [Changing host]
05:40 -!- Bombe [~droden@freenet/developer/Bombe] has joined #go-nuts
05:55 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3]
06:02 -!- bmizerany [~bmizerany@c-24-6-37-113.hsd1.ca.comcast.net] has quit
[Remote host closed the connection]
06:09 -!- felipe [~felipe@my.nada.kth.se] has joined #go-nuts
06:09 -!- mumbow [~mumboww@c-98-207-108-218.hsd1.ca.comcast.net] has joined
06:38 -!- ExtraSpice [~XtraSpice@78-57-168-219.static.zebra.lt] has joined
06:39 -!- iant [~iant@] has quit [Ping timeout: 276 seconds]
06:44 -!- Kashia [~Kashia@port-92-200-219-143.dynamic.qsc.de] has joined #go-nuts
06:54 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has joined #go-nuts
06:54 -!- mode/#go-nuts [+v iant] by ChanServ
07:03 -!- tsdh [~user@tsdh.uni-koblenz.de] has joined #go-nuts
07:06 -!- zozoR [~zozoR@4705ds1-ris.0.fullrate.dk] has quit [Quit: Morten.  Desu~]
07:15 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
07:15 -!- wrtp [~rog@] has joined #go-nuts
07:18 -!- synth [~cb@obfuscated.us] has quit []
07:18 -!- boscop_ [~boscop@g227133098.adsl.alicedsl.de] has quit [Ping timeout:
240 seconds]
07:21 -!- ikaros [~ikaros@dslb-084-059-076-021.pools.arcor-ip.net] has joined
07:21 -!- wrtp [~rog@] has quit [Quit: wrtp]
07:25 -!- ucasano [~ucasano@] has joined #go-nuts
07:25 -!- ikaros [~ikaros@dslb-084-059-076-021.pools.arcor-ip.net] has quit
[Client Quit]
07:25 -!- ikaros [~ikaros@2001:41b8:9bf:fe04:6c5d:d5ff:fe13:1af] has joined
07:27 -!- piyushmishra [~piyushmis@] has joined #go-nuts
07:28 -!- clip9_ [~tj@gambit.tj.no] has joined #go-nuts
07:29 -!- clip9_ [~tj@gambit.tj.no] has quit [Client Quit]
07:30 -!- tj [~tj@gambit.tj.no] has joined #go-nuts
07:31 -!- Guest72623 [~tj@gambit.tj.no] has quit [Client Quit]
07:33 -!- clip9_ [~tj@] has joined #go-nuts
07:34 -!- ikaros_ [~ikaros@dslb-084-059-076-021.pools.arcor-ip.net] has joined
07:39 -!- ikaros [~ikaros@2001:41b8:9bf:fe04:6c5d:d5ff:fe13:1af] has quit [Ping
timeout: 276 seconds]
07:40 -!- tvw [~tv@e176003005.adsl.alicedsl.de] has quit [Remote host closed the
07:42 -!- clip9_ [~tj@] has quit [Quit: leaving]
07:43 -!- clip9_ [clip9@] has joined #go-nuts
07:47 -!- clip9 [tj@12.81-166-62.customer.lyse.net] has quit [Quit: leaving]
07:48 -!- napsy [~luka@] has joined #go-nuts
07:50 -!- wrtp [~rog@] has joined #go-nuts
07:51 -!- tav [~tav@2001:0:53aa:64c:0:3ffa:a3f8:a693] has quit [Quit: tav]
07:53 -!- wrtp [~rog@] has quit [Client Quit]
07:56 -!- sacho [~sacho@79-100-58-95.btc-net.bg] has joined #go-nuts
08:00 -!- wrtp [~rog@] has joined #go-nuts
08:06 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has quit [Remote
host closed the connection]
08:06 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has joined
08:15 -!- mbohun [~mbohun@ppp115-156.static.internode.on.net] has joined #go-nuts
08:15 -!- synth [~cb@obfuscated.us] has joined #go-nuts
08:22 < vsmatck> Is there something like memset that will let me create a
slice where each element is initialized to some non-zero value?  Seems like
bytes.Repeat is close.
08:23 < nsf> probably not, because it is considered unsafe
08:24 < vsmatck> What I'm doing now is, s := make([]int, 20); for x := 0; x
< 20; x++ { s[x] = 1 }
08:25 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:7d2a:fae7:cd2c:4640] has joined
08:25 < vsmatck> Seems like there should be a function in the libraries or a
language feature to do that for me.
08:25 < nsf> well, I don't think so
08:26 < nsf> and what's wrong with that loop, it's a one liner
08:26 -!- emmanueloga [~emmanuelo@host52.190-30-10.telecom.net.ar] has quit [Ping
timeout: 265 seconds]
08:26 < nsf> you spend more time complaining about it than writing it
08:26 < vsmatck> It's too long.
08:26 < nsf> :)
08:27 < vsmatck> I'm not joking.
08:27 < nsf> me too
08:27 < nsf> we're talking about that 5 minutes
08:27 < nsf> how many loops you can write in that time
08:27 < nsf> ?
08:27 < nsf> :)
08:28 < nsf> ok, you can do a memset function using package unsafe
08:29 < nsf> something like: func memset(ptr unsafe.Pointer, int length,
byte value)
08:30 < nsf> var x struct {...}; memset(unsafe.Pointer(&x),
unsafe.Sizeof(x), 1)
08:30 < nsf> oh wait, let's compare
08:30 < nsf> memset(unsafe.Pointer(&x), unsafe.Sizeof(x), 1)
08:30 < nsf> for x := 0; x < 20; x++ { s[x] = 1 }
08:30 < nsf> ugh..  it's even longer
08:30 < nsf> :D
08:31 < vsmatck> I sort of see the problem here.  What I want may require a
language feature and not a library feature.
08:31 < nsf> I think no one will do that feature for you
08:31 < nsf> because it has no use
08:31 < vsmatck> Like all memory gets initialized to 0.  No way to change
that in library.  You can just initialize the memory twice.  Once to 0 and then
once to whatever value you want by loop.
08:32 < nsf> vsmatck: you may want that if you really care about speed
08:32 < nsf> Go isn't about speed
08:32 < nsf> it's more about safety
08:32 < nsf> if you need speed you can always write something in C or asm
08:33 < nsf> and link that to Go
08:34 < nsf> I guess D had an issue like that
08:34 < nsf> they have a zero-initialized vars too
08:34 < nsf> but there is a way to override that behaviour
08:34 < nsf> something like: int v = void;
08:34 < nsf> and it will not be zero-initialized
08:35 < nsf> but as far as I can tell, Go authors will not add that feature
08:35 < vsmatck> I don't want to leave it uninitialized.  I just want it
initialized to something other than 0.  *shrug*
08:35 < nsf> ugh
08:35 < nsf> nevermind
08:35 < nsf> I can't help you anyway :)
08:35 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3]
08:36 < vsmatck> I'd like something like bytes.SetAll(mySlice, 1), where
mySlice is a slice of ints.
08:42 -!- tvw [~tv@] has joined #go-nuts
08:44 < vsmatck> ok, I'm quite happy with this.  s :=
bytes.Repeat([]byte{255}, 20)
08:46 -!- sahid [~sahid@LNeuilly-152-21-22-10.w193-253.abo.wanadoo.fr] has joined
08:53 -!- napsy [~luka@] has quit [Ping timeout: 272 seconds]
08:54 -!- dju [dju@fsf/member/dju] has quit [Ping timeout: 272 seconds]
08:58 -!- napsy [~luka@] has joined #go-nuts
09:04 -!- ikaros_ [~ikaros@dslb-084-059-076-021.pools.arcor-ip.net] has quit
[Quit: Leave the magic to Houdini]
09:09 < wrtp> vsmatck: when (if...) we get generics, then it'd be simple to
make a function func[T](n int, value T) []T
09:09 < wrtp> until then, doing it by hand isn't too hard
09:10 < wrtp> to be honest, it'd be quite nice if they supported some syntax
like: [100]int{default: 999}
09:10 < wrtp> limbo allowed something similar
09:12 -!- saschpe [~quassel@mgdb-4d0cfb1d.pool.mediaWays.net] has joined #go-nuts
09:13 -!- ucasano [~ucasano@] has quit [Quit: ucasano]
09:21 < cbeck> That would be handy, considering they must be doing something
similar to memset under the hood anyway.
09:30 -!- jmettraux [~jmettraux@] has quit [Remote host closed the
09:30 -!- jessta_ [~jessta@124-148-160-141.dyn.iinet.net.au] has joined #go-nuts
09:30 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has quit [Quit:
09:31 -!- jessta [~jessta@203-214-38-160.dyn.iinet.net.au] has quit [Ping timeout:
276 seconds]
09:32 -!- mikespook [~mikespook@] has quit [Quit: Leaving.]
09:39 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
09:41 -!- Kashia [~Kashia@port-92-200-219-143.dynamic.qsc.de] has quit [Quit: This
computer has gone to sleep]
09:47 -!- cenuij [~cenuij@] has joined #go-nuts
09:47 -!- cenuij [~cenuij@] has quit [Changing host]
09:47 -!- cenuij [~cenuij@base/student/cenuij] has joined #go-nuts
09:49 -!- saschpe [~quassel@mgdb-4d0cfb1d.pool.mediaWays.net] has quit [Read
error: Connection reset by peer]
09:58 -!- crashR [~crasher@codextreme.pck.nerim.net] has joined #go-nuts
10:03 < wrtp> cbeck: they're doing something easier than memset - all memory
is zeroed by default, so no special action has to happen for any given type
10:16 -!- cenuij [~cenuij@base/student/cenuij] has quit [Remote host closed the
10:23 -!- mumbow [~mumboww@c-98-207-108-218.hsd1.ca.comcast.net] has quit [Quit:
10:35 -!- Grauniad_ [~lah@bylands.dur.ac.uk] has quit [Ping timeout: 272 seconds]
10:42 -!- Kylarr [Kylarr@122-148-63-115.static.dsl.dodo.com.au] has quit []
10:43 -!- tav [~tav@2001:0:53aa:64c:0:3ffa:a3f8:a693] has joined #go-nuts
10:48 -!- prip [~foo@host83-121-dynamic.42-79-r.retail.telecomitalia.it] has quit
[Ping timeout: 264 seconds]
10:51 -!- crashR [~crasher@codextreme.pck.nerim.net] has quit [Quit: (◣_◢)
BigBrowser is watching ⓎⓄⓊ]
10:51 -!- luruke [~luruke@] has joined #go-nuts
10:54 < wrtp> in limbo, the expression in the default clause was evaluated
for each member of the array, so you could do something like [100]int{default:
make(chan int)} to make 100 initialised channels
10:54 < wrtp> that was useful
10:55 -!- prip [~foo@host150-135-dynamic.43-79-r.retail.telecomitalia.it] has
joined #go-nuts
11:01 -!- napsy [~luka@] has quit [Ping timeout: 240 seconds]
11:04 -!- napsy [~luka@] has joined #go-nuts
11:06 -!- cenuij [~cenuij@] has joined #go-nuts
11:06 -!- cenuij [~cenuij@] has quit [Changing host]
11:06 -!- cenuij [~cenuij@base/student/cenuij] has joined #go-nuts
11:09 -!- skejoe [~skejoe@] has joined #go-nuts
11:14 -!- luruke [~luruke@] has quit [Quit: Leaving]
11:17 < nsf> wrtp: indeed
11:18 < wrtp> the semantics became a bit more dodgy for something like:
[100]int{4: nil, 5: nil, default: someFunction()}
11:18 < wrtp> does someFunction get called 100 times or 98 times?
11:18 < nsf> 98 of course
11:19 < nsf> it is default
11:19 < nsf> means "unless specified, use this"
11:19 < wrtp> in the limbo case, it was always 100 - and then the specific
cases were filled in.  a bug really, but it needed specifying.
11:19 -!- rlab [~Miranda@] has joined #go-nuts
11:19 < wrtp> and it never caused a bug that i knew of
11:19 < nsf> well it can be useful too
11:20 < nsf> if someFunction is: func someFunction() int { i++; return i }
11:20 < wrtp> yeah
11:20 < wrtp> not good calling functions with side effects
11:20 < nsf> i guess
11:21 < wrtp> problem is, once you've got that functionality, you want to
call the function with the index.  e.g.  [100]int{default: makeSomething(iota)}
11:21 < wrtp> ...  which would work ok.
11:21 < wrtp> except
11:21 < wrtp> that what happens when you start having nested array
11:21 < wrtp> ?
11:22 < nsf> hm..
11:22 < nsf> looks like this is the reason why they haven't implemented it
in Go
11:22 < wrtp> BTW, once nice use case for the syntax was to create a slice
of slices: [20][20]int{default: make([]int, 20
11:22 < wrtp> oops
11:22 < nsf> it's nice, but it makes a mess in composite literals section :)
11:23 < wrtp> [20][]int{default: make[int], 20}
11:23 < nsf> also composite literals are mostly for static initialization
11:23 < wrtp> not reallyt
11:23 < wrtp> s/t//
11:23 < nsf> and this feature makes them too dynamic
11:23 < wrtp> they're totally dynamic anyway
11:23 < nsf> yes, they are
11:23 < nsf> but people use them mostly for static init
11:24 < nsf> I do :)
11:24 < wrtp> i quite often do: for _, x := range []foo{a, b, c) { ....  }
11:25 < nsf> it's kinda pythonish
11:25 < nsf> never did that
11:25 < wrtp> it's useful sometimes
11:25 < nsf> easier to maintain, yes
11:25 < nsf> in some cases
11:26 < nsf> hehe, I've recently checked out blender 2.5
11:26 < wrtp> what's that?
11:26 < nsf> it's an open source free 3d modeling app
11:26 < nsf> that's not the point, the point is..  they had a giant menu and
now it's a list with a search field
11:26 < nsf> and it searches using exact match :(
11:26 < nsf> I'm so get used to fuzzy matching
11:27 < wrtp> oops
11:27 < wrtp> me too
11:27 < nsf> for example
11:27 < nsf> operation add <something>
11:27 < nsf> requires you to type "add ..."
11:27 < nsf> instead of "acube" for example for "add cube"
11:27 < nsf> so..
11:27 < wrtp> problem is that fuzzy search is difficult to do well
11:27 < nsf> I decided to implement a fuzzy matching lib in Go :)
11:27 -!- zozoR [~zozoR@0x5da69cf2.cpe.ge-0-1-0-1105.hsnqu1.customer.tele.dk] has
joined #go-nuts
11:27 < wrtp> that would be useful
11:27 < nsf> true :)
11:28 < wrtp> do you know what you want the API to look like?
11:28 < nsf> nope
11:28 < nsf> firstly I need to do an algo
11:28 < wrtp> good to start there, perhaps
11:28 < wrtp> i usually start with the API design, then do the alg, and then
change the API to fit...
11:28 < nsf> :)
11:28 < nsf> I do the opposite
11:29 < nsf> making sure it works and then doing the beauty
11:29 < wrtp> but it's good to know how your fantasy best API would look
before getting submerged in the nitty gritty
11:29 < wrtp> then at least you know where you're aiming for, even if you
can't get there
11:30 < nsf> i guess you're right, of course an API is important
11:30 < nsf> and I will try to make sure that it's good
11:31 < wrtp> thing is, you can do a beautiful algorithm but if it falls
short of being able to provide a beautiful API, then it's not good enough...
11:31 < nsf> yes
11:31 < wrtp> difficulty with fuzzy matching is the db linking...
11:31 < nsf> but beautiful API without an algorithm doesn't even work
11:31 < wrtp> that's very true too
11:32 < wrtp> but designing the API only takes 30 mins!
11:32 < wrtp> if that
11:32 < wrtp> whereas designing the alg can take a while
11:32 < nsf> I think for Go I will take a path of the 'sort' package API
11:33 < wrtp> you mean the way it uses interfaces?
11:33 < nsf> yes
11:34 < nsf> basically all I need: a "needle" string, and an interface to an
array that will have two methods: GetString(int) string and ApplyIndex(int, float)
11:34 < nsf> something like that
11:34 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has quit [Ping
timeout: 265 seconds]
11:34 < wrtp> a "needle" string?
11:34 < nsf> but of course I will provide a function to score a single pair
of strings too
11:34 < nsf> yes
11:35 < nsf> it's a searching algo mostly
11:35 < nsf> you're indexing strings
11:35 < nsf> based on a pattern
11:35 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has joined
11:35 < nsf> I called it "needle"
11:35 < nsf> maybe a bad term
11:35 < nsf> anyway, I'm bad at discussing things before they have
implemented :)
11:35 < wrtp> so the int given to GetString is an index into some underlying
data structure?
11:35 < nsf> yes
11:36 < nsf> I forgot 'Len() int'
11:36 < nsf> ok, I'll do it first and then we will discuss :)
11:36 < wrtp> go for it...
11:47 -!- boscop [~boscop@g227133098.adsl.alicedsl.de] has joined #go-nuts
11:49 -!- gabriel9 [~gabriel9@] has quit [Read error: Connection
reset by peer]
11:51 -!- gabriel9 [~gabriel9@] has joined #go-nuts
12:06 -!- mattikus [~mattikus@ip24-250-73-154.br.br.cox.net] has joined #go-nuts
12:33 -!- jdpo [~joe@66-169-176-49.dhcp.ftwo.tx.charter.com] has joined #go-nuts
12:36 -!- jdpo [~joe@66-169-176-49.dhcp.ftwo.tx.charter.com] has quit [Remote host
closed the connection]
12:38 -!- mattikus [~mattikus@ip24-250-73-154.br.br.cox.net] has quit [Remote host
closed the connection]
12:50 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3]
12:50 -!- artefon [~thiago@] has joined #go-nuts
12:55 -!- emmanueloga [~emmanuelo@host52.190-30-10.telecom.net.ar] has joined
12:59 -!- vdrab [~vdrab@EM114-51-104-56.pool.e-mobile.ne.jp] has joined #go-nuts
13:04 -!- ericvh [~ericvh@] has joined #go-nuts
13:04 -!- ucasano [~ucasano@] has joined #go-nuts
13:13 -!- Tv [~tv@cpe-76-168-227-45.socal.res.rr.com] has quit [Ping timeout: 240
13:14 -!- Tv [~tv@cpe-76-168-227-45.socal.res.rr.com] has joined #go-nuts
13:21 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined
13:25 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has quit [Ping
timeout: 252 seconds]
13:26 -!- skelterjohn [~jasmuth@c-76-124-23-156.hsd1.nj.comcast.net] has quit
[Quit: skelterjohn]
13:26 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has joined
13:33 -!- zozoR [~zozoR@0x5da69cf2.cpe.ge-0-1-0-1105.hsnqu1.customer.tele.dk] has
quit [Quit: Morten.  Desu~]
13:40 -!- norepinephrine [debian-tor@gateway/tor-sasl/norepinephrine] has quit
[Remote host closed the connection]
13:44 -!- norepinephrine [debian-tor@gateway/tor-sasl/norepinephrine] has joined
13:45 < vsmatck> You know what I just noticed about go..  I don't think I've
written a statement >= 80 characters yet.  In C++ I have type names longer than
80 characters.
13:48 < vsmatck> C++ will be a lot nicer when they add simple type inference
in C++0x.  But I'm off topic.  heh
13:48 < vsmatck> Anyways.  I just notice how having any type inference at
all is nice.
13:50 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has quit [Ping
timeout: 276 seconds]
13:51 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has joined
13:54 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit:
This computer has gone to sleep]
13:56 -!- dj2 [~dj2@] has joined #go-nuts
13:56 -!- zerd [~quassel@2a01:608:ffff:3644:2e0:4dff:fe83:76ed] has quit [Quit: No
Ping reply in 180 seconds.]
13:56 -!- zerd [~quassel@2a01:608:ffff:3644:2e0:4dff:fe83:76ed] has joined
14:00 -!- norepinephrine [debian-tor@gateway/tor-sasl/norepinephrine] has quit
[Quit: leaving]
14:04 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has joined #go-nuts
14:04 -!- artefon [~thiago@] has quit [Quit: bye]
14:09 -!- rlab [~Miranda@] has quit [Ping timeout: 272 seconds]
14:11 -!- rbetts_ [~rbetts@pool-96-233-100-241.bstnma.fios.verizon.net] has joined
14:22 -!- jcs [~jcs@c-68-58-155-17.hsd1.il.comcast.net] has joined #go-nuts
14:25 -!- skelterjohn [~jasmuth@lawn-net168-in.rutgers.edu] has joined #go-nuts
14:27 -!- skelterjohn [~jasmuth@lawn-net168-in.rutgers.edu] has quit [Client Quit]
14:32 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
14:35 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has quit [Quit:
14:35 -!- luruke [~luruke@] has joined #go-nuts
14:37 -!- shawn__ [~shawn@208-78-98-92.slicehost.net] has quit [Ping timeout: 276
14:38 -!- shawn [~shawn@208-78-98-92.slicehost.net] has joined #go-nuts
14:45 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined
14:50 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has quit [Ping timeout: 245
14:51 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3]
14:54 -!- Davidian1024 [~Davidian1@cpe-98-27-192-193.neo.res.rr.com] has quit
[Ping timeout: 272 seconds]
14:54 -!- Davidian1024 [~Davidian1@cpe-98-27-192-193.neo.res.rr.com] has joined
14:55 -!- skejoe [~skejoe@] has quit [Quit: leaving]
14:56 -!- Shyde [~shyde@HSI-KBW-078-043-070-132.hsi4.kabel-badenwuerttemberg.de]
has joined #go-nuts
14:56 -!- zerd [~quassel@2a01:608:ffff:3644:2e0:4dff:fe83:76ed] has quit [Read
error: Operation timed out]
14:56 -!- zerd [~quassel@tor.zerd.net] has joined #go-nuts
15:01 -!- Venom_X_ [~pjacobs@] has joined #go-nuts
15:05 -!- nvictor [~nvictor@pool-71-179-218-98.bltmmd.east.verizon.net] has joined
15:06 < nvictor> hi all
15:07 -!- Wiz126 [Wiz126@h62.126.232.68.ip.windstream.net] has quit [Ping timeout:
245 seconds]
15:07 < nvictor> i want to get a lightweight virtual machine so i can start
learning go
15:07 < nvictor> (i'm on a windows machine)
15:07 < nvictor> which one is better?
15:08 -!- vdrab_ [~vdrab@EM114-51-32-3.pool.e-mobile.ne.jp] has joined #go-nuts
15:08 -!- vdrab_ [~vdrab@EM114-51-32-3.pool.e-mobile.ne.jp] has quit [Client Quit]
15:09 < ProNihilist> nvictor: VirtualBox is probably your best bet
15:09 < nvictor> i mean in terms of os
15:09 < nvictor> freebsd?
15:10 < nvictor> seems light enough
15:10 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Remote
host closed the connection]
15:10 -!- major_majors [~major_maj@c-68-40-195-246.hsd1.mi.comcast.net] has joined
15:11 < ProNihilist> shouldn't really have an issue with any *nix
15:11 -!- vdrab [~vdrab@EM114-51-104-56.pool.e-mobile.ne.jp] has quit [Ping
timeout: 264 seconds]
15:12 -!- Wiz126 [Wiz126@h62.126.232.68.ip.windstream.net] has joined #go-nuts
15:12 < nvictor> ok thanks :)
15:12 < exch> arch linux is pretty tiny to, but requires a bit of manual
15:12 < nvictor> oh ok
15:12 < nvictor> arch linux
15:13 < nvictor> i was asking in #python the tiniest linux distro
15:13 < IRWolfie-> you have a low spec machine?
15:14 < nvictor> IRWolfie-: i do :)
15:15 -!- mprorock_ [~mprorock@cpe-024-211-179-212.nc.res.rr.com] has quit [Quit:
~ Trillian Astra - www.trillian.im ~]
15:15 < IRWolfie-> for first timer using *nix I would have though Ubuntu
would be easiest
15:15 < nvictor> i'm not quite a first timer
15:15 < exch> it comes with a metric ton of stuff preinstalled though.  it's
huge :<
15:15 < nvictor> ubuntu is quite big
15:15 < exch> most of which you'll never need
15:15 < nvictor> exch: it is
15:16 < IRWolfie-> ah, fair enough
15:16 < ProNihilist> isn't the minimal CD pretty tiny?  (in comparison)
15:16 < exch> Incidentally, Arch linux comes with no software installed
except that needed to run the bare bones linux OS. After install you get droppe
din a root shell and you have to add everything you need yourself.  Including
15:17 -!- deso [~deso@x0561a.wh30.tu-dresden.de] has joined #go-nuts
15:17 < exch> It does have a package manager and repositories from which you
can get stuff though
15:17 < IRWolfie-> I just installed the ubuntu server previously when I
needed small then installed fluxbox
15:18 -!- Fish9 [~Fish@] has quit [Remote host closed the connection]
15:19 -!- mprorock [~mprorock@cpe-024-211-179-212.nc.res.rr.com] has joined
15:19 -!- nf [~nf@] has quit [Ping timeout: 265 seconds]
15:20 -!- nf [~nf@] has joined #go-nuts
15:23 -!- ikaros [~ikaros@2001:41b8:9bf:fe04:e072:43ff:fe1f:3d8] has joined
15:27 -!- skejoe [~skejoe@] has joined #go-nuts
15:27 -!- rlab [~Miranda@] has joined #go-nuts
15:31 -!- rejb [~rejb@p54B65B7C.dip.t-dialin.net] has joined #go-nuts
15:31 -!- rejb [~rejb@p54B65B7C.dip.t-dialin.net] has quit [Changing host]
15:31 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
15:31 -!- nvictor [~nvictor@pool-71-179-218-98.bltmmd.east.verizon.net] has quit
15:32 -!- Davidian1024 [~Davidian1@cpe-98-27-192-193.neo.res.rr.com] has quit
[Ping timeout: 272 seconds]
15:32 -!- mrb_bk [~mbernstei@] has joined #go-nuts
15:32 -!- Davidian1024 [~Davidian1@cpe-98-27-192-193.neo.res.rr.com] has joined
15:40 -!- powerje [~powerje@adsl-75-60-229-136.dsl.wotnoh.sbcglobal.net] has quit
[Quit: powerje]
15:46 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined
15:47 -!- Tv [~tv@cpe-76-168-227-45.socal.res.rr.com] has quit [Quit: Leaving.]
15:47 -!- kanru [~kanru@118-160-162-37.dynamic.hinet.net] has joined #go-nuts
15:54 -!- tsdh [~user@tsdh.uni-koblenz.de] has quit [Quit: Goodbye guys!]
15:56 -!- dj2_ [~dj2@] has joined #go-nuts
15:58 -!- artefon [~thiagon@] has joined #go-nuts
15:58 -!- mafs [~maikeru@unaffiliated/maikeru/x-7708887] has quit [Ping timeout:
276 seconds]
15:58 -!- dj2 [~dj2@] has quit [Ping timeout: 240 seconds]
16:02 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has quit [Ping
timeout: 276 seconds]
16:02 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has quit [Ping
timeout: 276 seconds]
16:02 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has joined
16:05 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
16:06 -!- mumbow [~mumboww@c-98-207-108-218.hsd1.ca.comcast.net] has joined
16:07 -!- mafs [~maikeru@unaffiliated/maikeru/x-7708887] has joined #go-nuts
16:07 -!- skejoe [~skejoe@] has quit [Quit: leaving]
16:09 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Ping timeout: 264
16:11 -!- napsy [~luka@] has quit [Ping timeout: 265 seconds]
16:14 -!- napsy [~luka@] has joined #go-nuts
16:14 -!- mbohun [~mbohun@ppp115-156.static.internode.on.net] has quit [Quit:
16:15 -!- ucasano [~ucasano@] has quit [Quit: ucasano]
16:16 -!- iant [~iant@] has joined #go-nuts
16:16 -!- mode/#go-nuts [+v iant] by ChanServ
16:18 -!- Fish9 [~Fish@] has joined #go-nuts
16:23 -!- kanru [~kanru@118-160-162-37.dynamic.hinet.net] has quit [Ping timeout:
245 seconds]
16:27 -!- mrb_bk [~mbernstei@] has left #go-nuts []
16:27 -!- femtoo [~femto@95-89-196-226-dynip.superkabel.de] has joined #go-nuts
16:30 -!- luruke [~luruke@] has quit [Quit: Leaving]
16:31 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Remote
host closed the connection]
16:35 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined
16:40 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Remote
host closed the connection]
16:40 -!- jcs [~jcs@c-68-58-155-17.hsd1.il.comcast.net] has quit [Quit: Leaving.]
16:41 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined
16:42 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has joined #go-nuts
16:45 -!- sahid [~sahid@LNeuilly-152-21-22-10.w193-253.abo.wanadoo.fr] has quit
[Quit: Ex-Chat]
16:45 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Read
error: Connection reset by peer]
16:45 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined
16:46 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Remote
host closed the connection]
16:47 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined
16:51 -!- Shyde [~shyde@HSI-KBW-078-043-070-132.hsi4.kabel-badenwuerttemberg.de]
has quit [Remote host closed the connection]
16:52 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Remote
host closed the connection]
16:54 -!- powerje [~powerje@2002:4b3c:e588:0:5ab0:35ff:fe80:7cd2] has joined
16:54 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined
16:56 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:7d2a:fae7:cd2c:4640] has quit
[Ping timeout: 240 seconds]
16:56 -!- powerje [~powerje@2002:4b3c:e588:0:5ab0:35ff:fe80:7cd2] has quit [Remote
host closed the connection]
16:57 -!- powerje [~powerje@2002:4b3c:e588:0:5ab0:35ff:fe80:7cd2] has joined
16:58 -!- powerje [~powerje@2002:4b3c:e588:0:5ab0:35ff:fe80:7cd2] has quit [Remote
host closed the connection]
16:58 -!- powerje [~powerje@2002:4b3c:e588:0:5ab0:35ff:fe80:7cd2] has joined
16:59 -!- powerje [~powerje@2002:4b3c:e588:0:5ab0:35ff:fe80:7cd2] has quit [Read
error: Connection reset by peer]
17:00 -!- powerje [~powerje@2002:4b3c:e588:0:5ab0:35ff:fe80:7cd2] has joined
17:00 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Read
error: Connection reset by peer]
17:00 -!- powerje [~powerje@2002:4b3c:e588:0:5ab0:35ff:fe80:7cd2] has quit [Read
error: Connection reset by peer]
17:00 -!- sacho [~sacho@79-100-58-95.btc-net.bg] has quit [Ping timeout: 276
17:01 -!- powerje [~powerje@2002:4b3c:e588:0:5ab0:35ff:fe80:7cd2] has joined
17:01 -!- powerje [~powerje@2002:4b3c:e588:0:5ab0:35ff:fe80:7cd2] has quit [Remote
host closed the connection]
17:02 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined
17:02 -!- Fish [~Fish@9fans.fr] has joined #go-nuts
17:05 -!- tvw [~tv@] has quit [Remote host closed the connection]
17:07 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Ping
timeout: 240 seconds]
17:08 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined
17:10 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Remote
host closed the connection]
17:10 -!- bfrank [~brad@cpe-098-026-123-011.nc.res.rr.com] has joined #go-nuts
17:10 < bfrank> is the play stuff in the repo?
17:10 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:e931:4cc2:9bce:de4f] has joined
17:12 -!- piyushmishra [~piyushmis@] has quit [Ping timeout: 272
17:13 -!- enherit_ [~enherit@cpe-98-149-170-48.socal.res.rr.com] has joined
17:17 -!- napsy [~luka@] has quit [Ping timeout: 245 seconds]
17:19 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has quit [Ping
timeout: 272 seconds]
17:19 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has joined
17:20 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined
17:20 -!- tux21b [~tux21b@] has joined #go-nuts
17:21 < tux21b> hiho!  is it possible to write a static method
(=classmethod) in go?
17:22 < cbeck> statuc in the java sense?
17:22 < cbeck> *static
17:23 < taruti> tux21b: just write a function
17:23 < tux21b> yes.  so that i can call the method without an instance of
the class
17:23 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Remote
host closed the connection]
17:23 < taruti> func MyTypeFooBar(...) { ...  }
17:23 < tux21b> taruti: i would like it to be part of the class to avoid
name conflicts etc
17:23 < tux21b> (and btw, i am new to go *g*)
17:24 < cbeck> It will be part of the package, and thus there will be no
17:24 < taruti> tux21b: since the function namespace by modules conflicts
are not an issue
17:24 < cbeck> so to call it you'd say mypackage.Foo()
17:24 < cbeck> Unless of course you're inside mypackage, in which case you
just say Foo()
17:25 < tux21b> actually i have a class "type Vector struct {x, y, z
float}".  Now I would like to implement functions like Vector.Add(a, b),
Vector.Cross(a, b) and so on
17:25 < taruti> why not a.Add(b) ?
17:26 < tux21b> just preference.  i think it's more readable
17:26 < taruti> you can write func Add(a, b Vector) {...} in package vector
and call it like vector.Add(a,b) also
17:27 < tux21b> hmm, ok.  that would be a solution.  but then i would have
to create a separate package for it.  what's the best-practice solution for go?
17:28 < taruti> you can also do a func vectorAdd(a, b Vector) if you want it
to be intrapackage
17:28 < taruti> but go packages are quite small in practice
17:29 < tux21b> what's would you do?  i would like to follow the go naming
scheme etc ;)
17:30 < tux21b> *what would ...
17:30 < taruti> look at http://golang.org/pkg/big/ for an example
17:31 -!- rlab [~Miranda@] has quit [Read error: Connection reset by
17:31 < taruti> func (a *Vector)Add(b *Vector) { ...  } is probably the most
idiomatic solution
17:31 -!- napsy [~luka@] has joined #go-nuts
17:32 < tux21b> func (z *Int) Add(x, y *Int) *Int
17:32 < tux21b> Add sets z to the sum x+y and returns z.
17:33 < tux21b> (from the bigint package).  looks a bit odd imho...
17:34 < wrtp> taruti: +1
17:34 < taruti> not really, that returns a new int containing the result
17:34 -!- aho [~nya@fuld-4d00d5d9.pool.mediaWays.net] has joined #go-nuts
17:35 < wrtp> for user convenience, it's the best.  big ints are designed to
go as fast as possible, at the possible expense of a little inconvenience.
17:36 < tux21b> taruti: the problem with your most idiomatic solution is
imho, that it's not exactly clear, if a is changed in-situ or not.  I would prefer
to just return the sum (which allows better chaining)
17:36 < taruti> you can but that will be expensive if it is a new copy of
large vectors
17:36 < wrtp> tux21b: the benefit of the bigint approach is that the user
chooses its own allocations, because the compiler isn't currently clever enough.
17:38 < tux21b> return Normalize(Plus(forward, Plus(Times(right, dx),
Times(up, dy))) <-- I would like to write a lot of such equations, which is a
bit hard if those functions change the value insitu imho
17:38 < wrtp> if the compiler is changed so that it detect that a function
does a simple allocate and no global store of a returned value, then the compiler
can dispense with the heap allocation altogether.  i bet that would apply in
many/most cases.
17:39 < tux21b> which means that i should avoid such lines of codes
completely (at least at the moment...)
17:39 < wrtp> tux21b: any time you want a simple two arg one return
operation, you do: e.g.  new(*Vector).Add(a, b)
17:40 < tux21b> ah, ok
17:40 < tux21b> and can i do a.Add(a, b) too, to add a to b (in-situ)?
17:41 < wrtp> ZV().(ZV().Plus(forward, ZV().Plus(ZV().Times(right, dx),
ZV().Times(up, dy)))
17:42 < wrtp> or something like that.  assuming func ZV()*Value {return
17:42 < wrtp> a.Add(a, b) is like a += b
17:42 < tux21b> ah, looks a bit wired, but might be a good solution
17:43 < tux21b> i think i like the approach :)
17:43 < wrtp> actually, the way to go is to allow a nil receiver.
17:43 < wrtp> then you can just have a global, say ZV
17:43 < wrtp> which is just nil
17:43 < tux21b> but i didn't figured that out alone.  such a api might be
cool, but is surely unusual if you haven't seen go code before
17:44 < wrtp> then it's ZV.Plus(forward, ZV.Plus(ZV.Times(right, dx),
ZV.Times(up, dy)))
17:44 < wrtp> then it looks just like Plus etc are part of the ZV namespace
17:44 < plexdev> http://is.gd/fdG46 by [Fazlul Shahriar] in
go/src/pkg/net/dict/ -- net/dict: parse response correctly + typo
17:44 < plexdev> http://is.gd/fdG4b by [Eric Clark] in go/src/cmd/cgo/ --
cgo: show preamble gcc errors
17:44 < wrtp> even though ZV is just a nil variable used only for its type
17:44 < plexdev> http://is.gd/fdG4r by [Robert Griesemer] in
go/src/cmd/godoc/ -- godoc: don't use quadratic algorithm to filter paths
17:44 < wrtp> i bet Big allows it
17:44 < wrtp> or it should!
17:45 < tux21b> wrtp: i think that's not necessary, because even when i pass
a nil receiver, the Add() method would have to allocate a new Vector() anyway
17:45 -!- tvw [~tv@e176003005.adsl.alicedsl.de] has joined #go-nuts
17:45 < wrtp> exactly.
17:46 < tux21b> hehe, i really like the solution of those binary operators
taking 3 arguments.  wired but effective *g*
17:46 < wrtp> if there's no receiver (the caller can't be bothered to
allocate) then the called function allocates and returns
17:46 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has quit [Read
error: Operation timed out]
17:47 < wrtp> so (*Vector)(nil).Add(a, b) is valid code
17:47 < wrtp> and returns a new vector holding the sum of a and b
17:48 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has joined
17:49 < tux21b> yes, but the result would be exactly the same like "(new
Vector).Add(a, b)", with the only difference that the Add() method must check for
null values which complicates things a bit
17:49 < wrtp> i like the fact that it uses nil as a kind of "type root"
17:49 < wrtp> i agree that the called function must check for null
17:50 < wrtp> but often that's covenient to do.  for Vector a nil could be a
empty vector, with all the appropriate properties.
17:51 < wrtp> so you can still operate on it without special cases if you
use standard entry points
17:51 < tux21b> might make sense, but i think that's not a requirement at
the moment.  nil values aren't allowed, but i will take the 3 arguments approach
17:51 -!- rlab [~Miranda@] has joined #go-nuts
17:51 < tux21b> (like the big package)
17:52 < tux21b> so, thanks for your help and good explanation wrtp :)
17:53 < wrtp> i think my point is that from an API point of view, the three
arg approach can be exactly as notationally simple as the two arg approach, with
small cost of checking for nil on entry points.
17:53 < wrtp> so there's almost no reason not to use it.
17:53 < wrtp> tux21b: no problem.  it was a good question.
17:55 < tux21b> hehe, thanks.  the question looked a bit stupid at the
beginning, but it wasn't that easy at the end *g*
17:56 < wrtp> and i really like the idea of nil as an object factory for
"numeric" types.
17:57 < tux21b> and i really like the fact that binary operators get 3
arguments and unary get two.  before (in an older c++ api) i had a const function
"v.Normalized()" for returning the normalized vector and "v.Normalize()" for
normalizing a vector in-situ
17:58 < tux21b> now i can write "(new Vector).Normalize(v)" or
"v.Normalize(v)" :)
18:00 -!- piyushmishra [~piyushmis@] has joined #go-nuts
18:00 < gmilleramilar> how do you flush stdout?
18:03 -!- skelterjohn [~jasmuth@lawn-net168-in.rutgers.edu] has joined #go-nuts
18:03 -!- luruke [~luruke@] has joined #go-nuts
18:03 -!- luruke [~luruke@] has quit [Remote host closed the
18:04 -!- zozoR [~zozoR@4705ds1-ris.0.fullrate.dk] has joined #go-nuts
18:06 < wrtp> gmilleramilar: unless you're using bufio, it flushes
18:07 < wrtp> i.e.  writes are synchronous
18:07 < wrtp> tux21b: or, if you have ZV defined as var ZV Vector; then you
can just write ZV.Normalize(v)
18:08 < gmilleramilar> wrtp: I'm seeing behavior where an out of memory
error (mmap: errno=0xb) appears to truncate output that has "completed" before the
error occurs...
18:09 < wrtp> so it just looks like a simple function call of Normalize from
the namespace ZV (just like a package really)
18:09 < wrtp> gmilleramilar: how are you generating your output?
18:09 < gmilleramilar> fmt.Println
18:10 < wrtp> what platform's this on?
18:10 -!- Xenith [~xenith@cyclone.xenith.org] has quit [Ping timeout: 264 seconds]
18:10 < gmilleramilar> linux,386.  trying to put together a minimal test
18:10 -!- slashus2_ [~slashus2@74-137-24-74.dhcp.insightbb.com] has joined
18:11 < wrtp> i'm pretty sure that by the time the println returns, the
write syscall will have completed
18:11 < wrtp> so it might be some kind of system interaction
18:13 -!- mprorock [~mprorock@cpe-024-211-179-212.nc.res.rr.com] has left #go-nuts
18:13 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has quit [Ping
timeout: 264 seconds]
18:13 < gmilleramilar> ok, I'll play with it some more...  thx
18:14 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has quit [Ping
timeout: 276 seconds]
18:15 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has joined
18:16 < plexdev> http://is.gd/fdIjv by [Robert Griesemer] in
go/src/cmd/gofmt/ -- gofmt: add another exception to test cases
18:18 < tux21b> and another problem in the line: "var dx float64 = (x -
(width / 2.)) / (2.  * width)".  (x an width are ints).  even when writing "2." i
still get the error "cannot use (x - width / 2) / (2 * width) (type int) as type
float64 in assignment"
18:18 <+iant> Go does not have implicit type conversion the way that C does
18:18 <+iant> you need to write an explicit conversion to float64 at
whatever point you want it in the assignment
18:18 -!- cenuij [~cenuij@base/student/cenuij] has quit [Remote host closed the
18:19 < tux21b> i will try that
18:21 < tux21b> ok, thank you.  but it's interesting that 2.0 is converted
to 2 implicitly :D
18:21 <+iant> there are special rules for constant expressions
18:22 <+iant> it lets you do things like use 1e9 as an int64
18:22 <+iant> constants have no types
18:22 < tux21b> btw, should i use float64 or float?
18:22 <+iant> up to you I guess
18:23 <+iant> there has been occasional discussion of eliminating float
18:23 <+iant> and only keeping float32 and float64
18:23 < skelterjohn> +1 eliminate float
18:23 < tux21b> ok, so i will continue using float64 :D
18:24 -!- zozoR [~zozoR@4705ds1-ris.0.fullrate.dk] has quit [Ping timeout: 272
18:24 -!- Adys [~Adys@unaffiliated/adys] has quit [Read error: Connection reset by
18:25 -!- Kashia [~Kashia@port-92-200-219-143.dynamic.qsc.de] has joined #go-nuts
18:27 -!- alkavan [~alkavan@IGLD-84-228-162-5.inter.net.il] has joined #go-nuts
18:27 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts
18:27 -!- erje [~erje@port-92-201-94-170.dynamic.qsc.de] has joined #go-nuts
18:28 -!- SRabbelier [~SRabbelie@ip138-114-211-87.adsl2.static.versatel.nl] has
joined #go-nuts
18:29 < nickaugust> is there a good example project using template?
preferably for html generation?
18:29 -!- sacho [~sacho@95-42-125-183.btc-net.bg] has joined #go-nuts
18:29 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has quit [Ping
timeout: 242 seconds]
18:30 -!- dj2_ [~dj2@] has joined #go-nuts
18:30 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has quit [Quit:
18:30 -!- dj2 [~dj2@] has quit [Ping timeout: 240 seconds]
18:33 -!- napsy [~luka@] has quit [Ping timeout: 255 seconds]
18:36 -!- zozoR [~zozoR@4705ds1-ris.0.fullrate.dk] has joined #go-nuts
18:40 -!- zozoR [~zozoR@4705ds1-ris.0.fullrate.dk] has quit [Read error:
Connection reset by peer]
18:42 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has joined
18:49 -!- enherit_ [~enherit@cpe-98-149-170-48.socal.res.rr.com] has quit [Quit:
18:51 < wrtp> float should be a synonym for float64, just like byte for
18:51 -!- napsy [~luka@] has joined #go-nuts
18:52 < wrtp> iant: perhaps that should be "numeric literals and many
operations on them have no types" ? :-)
18:53 <+iant> well, the exact rules are in the spec....
18:53 < wrtp> as "hello" is still a constant, as is uint(56), but they are
of different types.
18:55 -!- zozoR [~zozoR@4705ds1-ris.0.fullrate.dk] has joined #go-nuts
18:56 -!- ikaros [~ikaros@2001:41b8:9bf:fe04:e072:43ff:fe1f:3d8] has quit [Quit:
Leave the magic to Houdini]
18:56 -!- mduft [~mduft@gentoo/developer/mduft] has quit [Ping timeout: 265
18:58 -!- gnuvince_ [~vince@] has quit [Quit: Lost terminal]
19:00 < gmilleramilar> wrtp: fwiw, if I add a Fsync to the Write function in
file.go, the output comes through...  http://pastie.org/1163390
19:00 -!- gnuvince_ [~vince@] has joined #go-nuts
19:01 < nbjoerg> well, constant != literal
19:02 < nbjoerg> wrtp: there are good reasons why you might want to have
float==float32 for some platforms
19:02 < nbjoerg> wrtp: via a single compiler switch
19:02 < nbjoerg> wrtp: many DSP like systems only have 32bit FPU support
19:04 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:e931:4cc2:9bce:de4f] has quit
[Ping timeout: 272 seconds]
19:05 < skelterjohn> float is float32 on most platforms, for the moment
19:05 < skelterjohn> i think
19:05 < skelterjohn> it certainly is on darwin/amd64
19:08 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has quit [Remote
host closed the connection]
19:08 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has joined
19:08 < nbjoerg> for i386 there are good reasons for not wanting float ==
19:08 < wrtp> i think float64 is a better default precision
19:09 < nbjoerg> (and in fact wanting to have float == float80)
19:09 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:e931:4cc2:9bce:de4f] has joined
19:09 -!- mrb_bk [~mbernstei@] has joined #go-nuts
19:09 < wrtp> awkward loading and storing those...
19:10 < wrtp> would you actually go for 96 bit float and ignoring 16
19:12 < Tonnerre> Good thing Intel didn't give us float40
19:13 -!- Eridius [~kevin@unaffiliated/eridius] has joined #go-nuts
19:17 -!- Sh4pe [~Sh4pe@dslb-088-066-048-085.pools.arcor-ip.net] has joined
19:19 -!- Xenith [~xenith@2001:470:1:9:8002::1] has joined #go-nuts
19:20 -!- Xenith [~xenith@2001:470:1:9:8002::1] has quit [Client Quit]
19:21 -!- Xenith [~xenith@2001:470:1:9:8002::1] has joined #go-nuts
19:25 < nickaugust> does anyone know of a project making use of the template
19:27 -!- skejoe [~skejoe@] has joined #go-nuts
19:34 -!- virtualsue [~chatzilla@93-97-62-8.zone5.bethere.co.uk] has joined
19:38 < wrtp> nickaugust: godoc
19:41 < nickaugust> wrtp: ah, thx :)
19:41 -!- skelterjohn [~jasmuth@lawn-net168-in.rutgers.edu] has quit [Quit:
19:45 < nickaugust> wrtp: where do i find the source for godoc?
19:45 < nickaugust> wrtp: nm
19:48 < tux21b> how does a interface look like, which defines a method with
a pointer receiver?
19:48 < plexdev> http://is.gd/fdPwG by [Russ Cox] in go/src/cmd/gc/ -- gc:
make sure path names are canonical
19:49 -!- slashus2 [~slashus2@74-137-77-71.dhcp.insightbb.com] has joined #go-nuts
19:50 -!- napsy [~luka@] has quit [Ping timeout: 252 seconds]
19:51 <+iant> tux21b: func (p *T) Name() { }
19:52 < tux21b> iant: yes, thats on the Object side, but how does the
interface declaration look like?
19:53 < tux21b> i am getting the following error: Sphere does not implement
Object (CalcNormal method requires pointer receiver)
19:53 <+iant> interface types have methods; whether the receiver is a
pointer or not doesn't matter to the interface
19:53 <+iant> that message means that Sphere's CalcNormal method requires a
pointer receiver
19:54 <+iant> presumably Object has a CalcNormal method
19:54 <+iant> this means that Sphere does not implement Object but *Sphere
19:54 < tux21b> that's what i have:
19:54 < tux21b> func (sphere *Sphere) CalcNormal(pos *Vector) *Vector { ...
19:54 <+iant> right, but the error is coming when you try to convert a
Sphere to an Object
19:55 < tux21b> type Object interface { CalcNormal(pos *Vector) *Vector }
19:55 <+iant> you can (presumably) convert a *Sphere to an Object, but you
can't convert a Sphere to an Object
19:57 < tux21b> ah, ok.  thank you - problem solved
19:57 < wrtp> tux21b: you're passing a complete Sphere value as an
arguement, but you actually want to pass a pointer to it.  either allocate it
explicitly or take the address of a variable of type Sphere
19:58 < tux21b> yes, the problem is now a bit different...  "cannot use
&sphere (type *Sphere) as type *Object in array index".  i think i will need some
kind of collection which supports different types
20:00 -!- femtoo [~femto@95-89-196-226-dynip.superkabel.de] has quit [Quit:
20:01 < tux21b> goray.go:145: cannot use objects (type [1]Sphere) as type
[]Object in function argument
20:02 -!- rbetts_ [~rbetts@pool-96-233-100-241.bstnma.fios.verizon.net] has quit
[Quit: rbetts_]
20:02 <+iant> you need to take a slice of the array
20:02 < tux21b> the possible conversations are extremely restricted, aren't
20:02 <+iant> arrays and slices are different types
20:02 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined
20:02 <+iant> there are relatively few implicit conversions, yes
20:02 <+iant> because experience with C suggests that implicit conversions
are confusing
20:03 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has quit [Ping
timeout: 276 seconds]
20:03 -!- Paradox924X [~Paradox92@vaserv/irc/founder] has quit [Ping timeout: 265
20:03 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has joined
20:03 -!- artefon [~thiagon@] has quit [Quit: Leaving]
20:03 < KirkMcDonald> Go has implicit conversions to interface types, and
that's bout it.
20:04 < KirkMcDonald> s/bout/about/
20:04 < tux21b> goray.go:145: cannot use (node SLICEARR) (type []Sphere) as
type []Object in function argument
20:04 < tux21b> this line seems to be a bit tricky :D
20:05 < plexdev> http://is.gd/fdQJx by [Russ Cox] in go/src/cmd/gc/ -- gc:
spell debug['u'] correctly
20:05 < tux21b> if Sphere (object) is a valid Object (interface), does it
mean, that []Sphere isn't a valid []Object automatically?
20:05 <+iant> oh, I missed that bit; no, it isn't
20:06 <+iant> a value of interface type is not the same as a value of
non-interface type
20:06 <+iant> I agree that that can be a tricky
20:06 <+iant> a bit tricky
20:06 <+iant> you can assign a Sphere to an Object, but you can't assign a
[]Sphere to a []Object
20:06 < tux21b> it's very confusing if you aren't used to go's type system
20:07 <+iant> I agree that interface types are not intuitive for most
20:07 < KirkMcDonald> This sort of covariance is fairly peculiar to C# and
Java, isn't it?
20:08 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Remote
host closed the connection]
20:08 < tux21b> the thing is i am trying to write a function which takes a
slice of objects ([]Object), and i want to call it with an array of Object
([...]Object) which contains a Sphere :D
20:09 < tux21b> unfortunately this tasks seems to be a bit tricky :/
20:09 -!- Paradox924X [~Paradox92@c-68-35-229-34.hsd1.fl.comcast.net] has joined
20:09 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined
20:09 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts
20:10 < tux21b> goray.go:144: cannot use struct literal (type Sphere) as
type Object in array index:
20:10 < KirkMcDonald> tux21b: Show us code.
20:10 < tux21b> Sphere does not implement Object (CalcNormal method requires
pointer receiver)
20:10 < tux21b> ok, one moment
20:11 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Client
20:11 < tux21b> here it is: http://paste.pocoo.org/show/262900/ (i marked
the line with XXX)
20:12 < tux21b> (on the bottom of the file)
20:12 < KirkMcDonald> paste.pocoo.org supports Go highlighting, you know.
20:13 < tux21b> if i remember correctly, i have even selected it...  no idea
why it's not working
20:13 < KirkMcDonald> Hmm.
20:13 < vsmatck> Somone with ops needs to add that to topic.  pastie.org
supports go too.
20:13 < KirkMcDonald> tux21b: It is the type *Sphere which implements the
20:14 < KirkMcDonald> tux21b: You what to use &Sphere{...}
20:14 < KirkMcDonald> s/what/want/
20:17 -!- ukai [~ukai@nat/google/x-adbspvozjslabnca] has quit [Ping timeout: 272
20:17 -!- ukai [~ukai@nat/google/x-udnodpmsmvammaff] has joined #go-nuts
20:18 < tux21b> ok, many thanks KirkMcDonald :)
20:19 < tux21b> here is the final result (not amazing, i know *g*):
20:20 < exch> Why use '[...]Object' at all?  You could just do []Object{ ...
} and pass 'objects' to renderImage() as-is
20:21 < tux21b> oh, didn't know that.  i thought about slices about some
kind of references only, without any storage :D
20:21 < exch> They are references technically, but when initialized, the
underlying storage they point to is created as well
20:22 < exch> Initialization is done wither with: 'slice := make([]Object,
123)' or the literal approach: 'slice := []Object{ &Sphere{} }'
20:23 < exch> s/wither/either/
20:23 < tux21b> yes, i've already changed it.  many thanks for the tip
20:26 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:e931:4cc2:9bce:de4f] has quit
[Quit: Leaving.]
20:28 -!- napsy [~luka@] has joined #go-nuts
20:35 < tux21b> i've enjoyed my first trip into the go world...  there are
many things which are a bit wired (e.g.  that &Sphere implements Object and not
&Object etc), but most of it makes sense after thinking a bit.  most of it is just
unusual if you have a C++ background
20:35 < KirkMcDonald> tux21b: As a rule, pointers to interface types do not
make sense.
20:36 -!- zozoR [~zozoR@4705ds1-ris.0.fullrate.dk] has quit [Quit: Morten.  Desu~]
20:37 -!- mrb_bk [~mbernstei@] has left #go-nuts []
20:41 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Ping timeout: 255
20:41 -!- skejoe [~skejoe@] has quit [Quit: leaving]
20:47 -!- kunwon1 [~kunwon1@unaffiliated/kunwon1] has quit [Quit: Leaving]
20:52 -!- Davidian1024 [~Davidian1@cpe-98-27-192-193.neo.res.rr.com] has quit
[Ping timeout: 240 seconds]
20:52 < plexdev> http://is.gd/fdUvM by [Robert Griesemer] in
go/src/cmd/godoc/ -- godoc: show "Last update" info for directory listings.
20:52 -!- Davidian1024 [~Davidian1@cpe-98-27-192-193.neo.res.rr.com] has joined
20:57 -!- dacc [~Adium@D-128-95-10-177.dhcp4.washington.edu] has joined #go-nuts
21:00 < tux21b> another (theoretical) question.  Assuming I am having a big
struct S. Is calling a function passing a pointer to S faster than S in Go?
(copy-by.-value vs.  copy-by-reference?)
21:00 <+iant> yes, for a big struct, passing a pointer will be faster than
passing the whole struct
21:00 < cbeck> Yes
21:01 < tux21b> ok, and are there some C++ like references available in Go,
so that i don't have to write & and check for nil all the time?
21:01 -!- mafs [~maikeru@unaffiliated/maikeru/x-7708887] has quit [Ping timeout:
240 seconds]
21:01 <+iant> no
21:01 < cbeck> Not exactly, but having a nil receiver can be ok
21:02 < exch> provided you dont try to access any fields in the receiver
21:02 < cbeck> so var a *MyObject = nil; a.DoSomething() can check if the
object it was called on was nil
21:02 < tux21b> ah, ok
21:03 < tux21b> but one of the advantages of references in C++ are that a
reference can never be null...  (instead of pointers, which are likely to be null)
21:04 < tux21b> hmm, anyway i would like to see some kind of references in
go too :)
21:04 < cbeck> Once you've worked with the language more I think you'll find
you don't need them
21:05 < tux21b> and is it possible to use const pointer arguments?
21:05 < Namegduf> No, Go does not have const.
21:05 < tux21b> i want that too :p
21:05 < cbeck> God forbid
21:07 < tux21b> in C++ am using pointers in very rare cases, but nearly all
arguments of my methods and functions are const references.  so i am used to it
and i like the advantages
21:07 < vsmatck> I think references were originally added to C++ to make
operator overloading work.
21:07 < vsmatck> So says stroustrup in 'design and evolution of C++'
21:08 < vsmatck> One thing I don't like about references is that they force
you to keep more context in your head.  You have to know what parameters are going
to get passed by reference when you call a function.  As opposed to pointer where
it's obvious from the callers point of view.
21:09 < willdye> agreed.  i don't know if the call "one(two, three, four)"
will modify "four" unless i look up the relevant defintion of "one()".
21:10 < tux21b> yes, that's a point but i am not interested at all how a
constant value is passed.  for non primitive types a const references is a good
idea and for others not
21:11 -!- mafs [~maikeru@unaffiliated/maikeru/x-7708887] has joined #go-nuts
21:11 < vsmatck> You're just concerned about the added error potential of
being able to use a null pointer right?
21:11 < tux21b> the point is, in my small raytracer example, i pass nearly
all parameters as pointers (for performance reasons), but am not using any output
21:12 < tux21b> No it might be problematic if I change a value by mistake
and i hate it to write always a & in front of each parameter...
21:13 < cbeck> tux21b: So just use pointers, there's none of the direct vs
indirect access operator business like in C++
21:13 < tux21b> and I am forced to check every parameter for null pointers
(i am not doing it right now, but i should *g*)
21:14 < willdye> are you certain that there's a performance boost in that
small raytracer?  with modern cpu's i've learned to assume less and profile more.
21:14 < tux21b> cbeck: that only solves one problem, but i am concerned
about 3 others :D
21:15 < willdye> pointer deref is not free, for example.
21:15 < cbeck> That's certainly true
21:15 -!- jhawk28 [~jhawk28@user-142gfte.cable.mindspring.com] has joined #go-nuts
21:16 < tux21b> willdye: there isn't probably any performance boost at all
in the small raytracer, but i've also implemented a bigger raytracer in C++ a
while ago, and there references were very important.  so i am now used to it :)
21:17 < tux21b> willdye: that's an argument for references, isn't it?  :D
21:17 < willdye> did that big raytracer use threads & lots of cores?
21:18 < tux21b> willdye: yes, i used OpenMP for that one
21:21 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has quit [Ping
timeout: 240 seconds]
21:21 -!- skelterjohn [~jasmuth@c-76-124-23-156.hsd1.nj.comcast.net] has joined
21:22 < vsmatck> I'm still suspicious about the idea that there's a
performance difference between using a pointer vs using a reference.  It's too bad
I don't care enough to find out for sure.  :-/
21:22 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has joined
21:22 < willdye> how did you measure the performance boost from using
pointers?  in our case (a 3d CAD program), we've found that the most important
thing to optimize for is readability of the code.
21:23 < willdye> i've seen interpreted scripts that eventually ran faster
than their low-level-c counterparts, because the programmer could easily
understand what was going on and quickly fix the biggest problems in the script,
whereas the low-level code was so subtle that people were afraid to touch it.
21:23 < willdye> (often with good reason)
21:23 -!- Project_2501 [~Marvin@] has quit [Read error: Connection
reset by peer]
21:23 < tux21b> i am not saying that there will be a performance difference
between pointers and references (except of the pointer deref which will be
optimized by the compiler and some ifs for checking for nil values when using
21:24 -!- Project_2501 [~Marvin@] has joined #go-nuts
21:24 < plexdev> http://is.gd/fdWPl by [Rob Pike] in go/src/pkg/netchan/ --
netchan: add a cross-connect test.
21:25 < tux21b> but pointers are always risky (null pointers, unwanted
changes and so on) and they are complicated to handle (you have to write a lot of
21:25 < vsmatck> Ah, I thought that was implied when you were saying
references made the performance of your ray tracer a lot better.  You were just
saying that using references is faster than passing by value?
21:25 < tux21b> so, i would like to have const references available :)
21:26 < dacc> complexity--
21:26 < tux21b> there was a big performance improvement when i switched to
const references instead of passing-by-value
21:27 -!- virtualsue [~chatzilla@93-97-62-8.zone5.bethere.co.uk] has quit [Ping
timeout: 265 seconds]
21:27 < tux21b> (and i never used pointers, because i don't like them very
much, because of the reasons i just enumerated *g*) :D
21:27 -!- napsy [~luka@] has quit [Ping timeout: 240 seconds]
21:27 < willdye> hmm.  here's what might be a controversial proposal: go
programs are blissfully consistent in their formatting, so it's (relatively) easy
to write a program that takes ugly-but-consistent go code and translates it to
some beautiful form that you'd rather see, and vice versa.  you can guess the rest
of the proposal.
21:28 < Namegduf> gofmt already translates Go code into the consistent
21:28 < exch> that's why we love gofmt :)
21:28 < willdye> right, i'm saying use that consistency in cases where
people simply want something to be easier to type or look a bit prettier.
21:28 < Namegduf> I don't think I've ever really encountered this.
21:29 < willdye> type it in however you want, so long as a program can
translate what you want into correct go code.
21:29 < willdye> then display it however you want, so long as it's a purely
automatic translation from the go program to whatever-you-wish-you-could-see.
21:29 < skelterjohn> this is certainly a strange conversation to try to pick
up in the middle
21:30 < willdye> for example, i hate long var names, so i've been known to
write filters that took someone else's long vars and displayed them as short ones
just for me.
21:30 < skelterjohn> you want a willdye-code compiler that compiles to go
21:30 < tux21b> it's not just about formatting, it's about passing by
reference and enforcing const (by using the same formatting as you would
21:30 < willdye> not compiles, just presents.
21:30 < dacc> willdye: like a macro language?
21:31 < willdye> actually this is a part of a larger idea i call 'redtape',
but i don't have time to write it all out here.  for now just imagine a
"presentation layer" in which indentation is shown to you, and can be entered by
you, in the way that you prefer.
21:31 < dacc> i'm looking at writing a parser for a binary file format.
probably need a scanner that understands context.  maybe could use the utf8
scanner as a template of sorts to get it right?
21:32 < dacc> willdye: that's one nice thing about using tabs for
indentation — people can choose whether to see two or four spaces
21:32 < dacc> like that?
21:33 < willdye> yes, but taken to a larger scale.  for example, i like to
snug up my ending curly braces on the last line of code, not separate them onto
their own line.  thanks to gofmt, i can more easily write a program that shows me
braces the way i like them.
21:34 < willdye> i can even enter braces the way i like, and let gofmt "fix"
them for me.
21:34 < willdye> (by putting them on their own line as per the standard)
21:34 < dacc> would make pair programming annoying =)
21:35 -!- major_majors [~major_maj@c-68-40-195-246.hsd1.mi.comcast.net] has quit
[Quit: major_majors]
21:36 < willdye> only in extreme cases of formatting changes, and only if
you shared the same display instead of giving the second person their own display
which shows the code as they prefer to see it.
21:36 < dacc> ah indeed
21:36 -!- artefon [~thiago@] has joined #go-nuts
21:37 < dacc> autoformatting in eclipse is nice.  of course it doesn't work
as a "view" as you're describing
21:37 < dacc> ..  but you can load different profiles and switch between
21:37 < dacc> use yours to edit and a canonical one before commit
21:38 < willdye> think of how many compromises are made in a language
because they want it to be easy to type.  space as a delimiter, for example.  if
every var was {var name with spaces} to the compiler, it would be easier for the
language designer.  it's hard to enter and ugly to display, of course, but that's
the job of the presentation/data-entry layer.
21:38 < willdye> and indentation is just a presentation-layer switch, not an
ongoing argument.  :)
21:39 < KirkMcDonald> This plays hell with version control annotation.
21:39 < willdye> no, it *helps* version control.
21:40 < willdye> version control diffs are done with the lower-level code as
the compiler sees it.  then the diffs are sent to the presentation layer.
21:40 < KirkMcDonald> Oh I've got to hear this one.
21:40 < KirkMcDonald> I'm not talking about diffs.
21:40 < willdye> no more diffs due to "whitespace and formatting changes".
21:40 < KirkMcDonald> I'm talking about "blame".
21:41 < willdye> i don't follow.  the tool blame which tells you who changed
what function and when?
21:41 < KirkMcDonald> Which source lines.  Yes.
21:43 -!- dj2 [~dj2@] has quit [Quit: dj2]
21:43 < willdye> how would adding a presentation layer hurt?  the
common-language code is the same for everyone.  only the presentation changes.
think of syntax highlighting.  it's a personal preference, right?  it's not
checked in.
21:43 < KirkMcDonald> I see.
21:44 < KirkMcDonald> So you have a standard format, which gofmt outputs.
21:44 < KirkMcDonald> Then an individual user has their preferred format.
21:44 < KirkMcDonald> Which implies having a second tool to convert from the
standard format into that format.
21:45 -!- XenoPhoenix [xenophoeni@silenceisdefeat.com] has quit [Ping timeout: 240
21:45 < willdye> exactly.  you could think of it as extending syntax
highligthing (a user pref) to other things like how the indentation is done.
21:45 < KirkMcDonald> What happens when the user writes code which does not
precisely comply with their own preferred format?
21:45 < KirkMcDonald> I guess it gets translated into the standard format,
then re-translated back into their ideal format.
21:45 -!- Fish [~Fish@9fans.fr] has quit [Remote host closed the connection]
21:46 < KirkMcDonald> But at what point does that happen>
21:46 < KirkMcDonald> s/>/?
21:46 < willdye> or how a var is displayed.  i like em short, others like em
long, and in some cases i want to hit a button that displays "foo" as
"every::thing::foo" so i know exactly were foo came from.
21:47 < willdye> well, as with syntax highlighting, there will be bugs, but
you have a core language that you can drop down into.  in the case of
highlighting, i just pretend that it isn't colored.  in the case of go, i'd have
to know how to read normal go that's gone through gofmt.
21:48 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has quit [Read
error: Operation timed out]
21:48 < KirkMcDonald> Syntax highlighting is not necessarily a good
21:48 < willdye> so everybody would still have normal go, but i'd have my
braces snugged up, and with a little programming maybe we could allow people to
have an implicit "&" infront of pointers without having to type it.
21:49 < willdye> just to be clear, what's checked into version control is
*always* canonical go.
21:50 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has joined
21:50 -!- ericvh [~ericvh@] has quit [Quit: ericvh]
21:51 < KirkMcDonald> willdye: Personally, this sounds like madness to me.
21:51 < willdye> heheh.
21:51 < KirkMcDonald> willdye: There is value, when many developers are
working on code, to having everyone actually work on the same code.
21:52 < willdye> i have a program which takes go code and snugs the braces.
when i check it in, gofmt translates the braces back to the standard form.
where's the harm?
21:52 < willdye> you don't force everyone to use the same syntax colors, why
force them to use the same brace indentation?
21:52 < dacc> sounds like a bit like everyone using a compiler to a target
language where they can change the behavior of the parser
21:53 < willdye> i think of it more as changing the editor.
21:53 < willdye> to sum up the larger idea (redtape) : put the smarts into
the development environment, not into the language.
21:53 < willdye> i want a smart editor, not some clever syntax that tries to
make me do the right thing.
21:54 < dacc> any pointers on my binary file format parsing adventures?  i
want to make sure i do things goishly, heh =)
21:54 < dacc> pythonic : python as goish : go?
21:54 < willdye> heh.  "goishly" sounds kind of Yiddish.
21:54 -!- deso [~deso@x0561a.wh30.tu-dresden.de] has quit [Remote host closed the
21:55 < dacc> oh yeah, oops =P
21:55 -!- slashus2 [~slashus2@74-137-77-71.dhcp.insightbb.com] has quit [Quit:
21:55 < willdye> ugh.  goishly isn't known to google, but "goish" has an
unpleasant definition in the urban dictionary.
21:56 * willdye turns his attention from irc to work-related matters...
21:59 -!- wrtp [~rog@] has quit [Quit: wrtp]
22:00 -!- Xurix [~Luixsia@AToulouse-254-1-4-96.w83-203.abo.wanadoo.fr] has joined
22:03 <+iant> tux21b: to be clear, passing a pointer is only faster for a
*large* struct
22:03 <+iant> how big are your structs
22:03 <+iant> ?
22:03 <+iant> because taking the address of a variable pushes that variable
onto the heap
22:04 < tux21b> most of the struct are rays containing 2 vectors = 3 * 2 *
22:05 <+iant> then it's going to depend on how many times the value get
passed, I think
22:05 <+iant> and of course you don't *have* to do a nil pointer check; the
program will reliably crash with a stack trace if you dereference a nil pointer
22:05 < tux21b> quite often, because i have a lot of small methods which are
called recursively...
22:06 -!- artefon [~thiago@] has quit [Remote host closed the
22:06 < tux21b> yes, actually I haven't done it, but that's not passive
programming.  it would be better to do it...
22:06 -!- Xurix [~Luixsia@AToulouse-254-1-4-96.w83-203.abo.wanadoo.fr] has quit
[Quit: Leaving]
22:08 < Namegduf> I would suggest just assuming that except where said
otherwise, you can't pass/use a nil object
22:08 < vsmatck> What would you do with the information that someone wrongly
passed your function a nil pointer?  Print an error and exit the program?  It does
that anyways.
22:08 < tux21b> iant: maybe i am going to extend the raytracer a bit to
include a lot of cpu expensive calculations (soft shadows, field of depth, glossy
reflections and so on) and then measure the difference
22:09 -!- jdpo [~joe@66-169-176-49.dhcp.ftwo.tx.charter.com] has joined #go-nuts
22:09 < tux21b> after that we will know for sure :D
22:10 -!- wrtp [~rog@] has joined #go-nuts
22:10 -!- Sh4pe [~Sh4pe@dslb-088-066-048-085.pools.arcor-ip.net] has quit [Quit:
22:11 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit:
22:13 -!- wrtp [~rog@] has quit [Client Quit]
22:14 -!- jdpo [~joe@66-169-176-49.dhcp.ftwo.tx.charter.com] has quit [Remote host
closed the connection]
22:15 -!- jcao219 [~jcao219@pool-173-74-61-111.dllstx.fios.verizon.net] has joined
22:15 -!- km0r3 [~km0r3@sunjammer.sugarlabs.org] has joined #go-nuts
22:16 -!- rlab [~Miranda@] has quit [Read error: Connection reset by
22:19 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has quit [Ping
timeout: 240 seconds]
22:20 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has joined
22:24 * Project_2501 quittete!  o.o
22:28 -!- Project_2501 [~Marvin@] has quit [Quit: E se abbasso questa
leva che succ...]
22:28 -!- napsy [~luka@] has joined #go-nuts
22:36 -!- tux21b [~tux21b@] has left #go-nuts []
22:42 -!- acts_as [~acts_as@] has quit [Quit: acts_as]
23:19 -!- jcao219 [~jcao219@pool-173-74-61-111.dllstx.fios.verizon.net] has quit
[Ping timeout: 245 seconds]
23:23 -!- kanru [~kanru@118-160-162-37.dynamic.hinet.net] has joined #go-nuts
23:25 -!- araujo [~araujo@] has joined #go-nuts
23:25 -!- araujo [~araujo@] has quit [Changing host]
23:25 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts
23:27 -!- mumbow [~mumboww@c-98-207-108-218.hsd1.ca.comcast.net] has quit [Quit:
23:27 < bfrank> is the play stuff going to be in the repo?
23:27 -!- dj2 [~dj2@CPE001f5b35feb4-CM0014048e0344.cpe.net.cable.rogers.com] has
joined #go-nuts
23:33 -!- dho [~devon@onager.omniti.com] has joined #go-nuts
23:34 -!- mumbow [~mumboww@c-98-207-108-218.hsd1.ca.comcast.net] has joined
23:34 < dho> So can 5g produce something useful for android phones?  (yet?)
I haven't really followed the ARM compiler
23:36 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
23:40 -!- jcao219 [~jcao219@pool-173-74-61-111.dllstx.fios.verizon.net] has joined
23:40 -!- jmettraux [~jmettraux@] has joined #go-nuts
23:42 < plexdev> http://is.gd/fe6eZ by [Ken Thompson] in go/src/cmd/gc/ --
add readonly flag to static initialization
23:42 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined
23:44 -!- tvw [~tv@e176003005.adsl.alicedsl.de] has quit [Remote host closed the
23:46 <+iant> dho: 5g can produce a program that can run on an Android
phone, but I think you have to download it over USB using the adb debugger
23:46 <+iant> so I'm not sure whether that counts as useful
--- Log closed Fri Sep 17 00:00:07 2010