--- Log opened Wed Mar 30 00:00:50 2011
00:05 -!- jgonzalez [~jgonzalez@173-14-137-134-NewEngland.hfc.comcastbusiness.net]
has quit [Ping timeout: 246 seconds]
00:06 -!- quietdev [~chatzilla@unaffiliated/quietdev] has left #go-nuts []
00:12 < skelterjohn> make sure you break it
00:13 < skelterjohn> so i can fix it
00:13 < skelterjohn> whoah - i got the rob pike seal of approval for the
name
00:14 -!- bugQ [~bug@c-67-171-127-76.hsd1.ut.comcast.net] has joined #go-nuts
00:17 -!- evanx [~evanx@modemcable145.223-22-96.mc.videotron.ca] has joined
#go-nuts
00:19 < dforsyth> i think there needs to be some vimscript to plug this into
vim
00:21 < skelterjohn> I know nothing about vim, so I'm not the guy to make it
00:23 < skelterjohn> but if it made sense, i'd certainly add the capability
to the repos
00:25 < dforsyth> ive never written a line of vimscript in my life, but if
no one else does it in like 4 or 5 days ill take a look
00:25 < dforsyth> would be pretty handy
00:26 * exch angers himself some more on haskell
00:27 < exch> The more I learn about the language, the angrier I get.  But
it's become a matter of principle now.  I refuse to be beaten by it >:@
00:27 < dforsyth> ha
00:27 < skelterjohn> i chose wisely and swore off haskell before i ever
began
00:27 < exch> skelterjohn: I tried that many times.  But it keeps nagging at
me
00:28 < skelterjohn> i looked at some source once and decided it was ugly
00:28 < exch> "Why oh why do people swear by it?  Am I really that gullible
for not understanding?"
00:28 < skelterjohn> that was all i needed
00:28 < dforsyth> yeah its pretty gross looking to me
00:28 < dforsyth> i generally cant force myself to learn something unless i
can think of something i want to make in it, and i cant think of anything to make
in haskell
00:30 < exch> I generally try to build a working IRC bot in any new language
I encounter.  So far that has worked out nicely for all languages.  But here I
just find myself wrestling for an hour just to create function that converts a
string to lower case -.-
00:30 < exch> I was victorious though!  http://pastie.org/1733331
00:30 < exch> me: 1, haskell: 0
00:30 < skelterjohn> oh gross
00:30 < dforsyth> it sounds like haskell has a much higher score than 0
00:30 < exch> dforsyth: shh.  dont depress me any further
00:30 < skelterjohn> if i can't look at some code, without knowing the
language, and understand it
00:31 < skelterjohn> then it's not a language i want to learn
00:32 < exch> It has some seemingly bizarre code indentation rules to
00:32 < exch> No idea why it needs those to begin with
00:34 -!- matsur [~matsur@dyn-207-111.vpn.wisc.edu] has quit [Quit: matsur]
00:43 < skelterjohn> how can i check if something satisfies
http://golang.org/doc/go_spec.html#unicode_letter
00:45 -!- st-17217 [~st-17217@a89-154-147-132.cpe.netcabo.pt] has quit [Ping
timeout: 264 seconds]
00:47 < plexdev> http://is.gd/cpoD3b by [Andrew Gerrand] in go/src/pkg/time/
-- time: make TestAfterQueuing retry 3 times before declaring failure.
00:47 < skelterjohn> aha, the "unicode" package
00:47 < skelterjohn> i'm a genius
00:50 -!- nettok [~quassel@200.119.157.9] has joined #go-nuts
00:58 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Read error: Connection
reset by peer]
00:59 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
01:00 -!- mikespook [~mikespook@219.137.73.42] has joined #go-nuts
01:03 -!- iant [~iant@67.218.107.170] has quit [Quit: Leaving.]
01:08 -!- pphalen [~pphalen@66.92.11.149] has left #go-nuts []
01:14 < steven> <3
01:18 -!- saturnfive [~saturnfiv@210.74.155.131] has joined #go-nuts
01:26 < skelterjohn> hi stalled
01:26 < skelterjohn> err
01:26 < skelterjohn> steven:
01:27 < steven> <3
01:30 -!- m4dh4tt3r [~Adium@157.sub-75-210-120.myvzw.com] has joined #go-nuts
01:34 < bugQ> skelterjohn: I've mostly forgotten how to haskell but the
lcase thing mostly makes sense to me
01:34 < plexdev> http://is.gd/aPdJ4W by [Robert Griesemer] in 4 subdirs of
go/src/ -- go/printer/gofmt: remove special case for multi-line raw strings
01:34 < bugQ> inferring that !!  is array indexing
01:34 < skelterjohn> if you once knew haskell, and a simple to-lower
function "mostly" makes sense....
01:35 < bugQ> and yeah I guess it also requires knowing what Maybe is
01:35 < bugQ> lol nvm.
01:36 < skelterjohn> if the semantics are simple, the syntax should be too
01:37 < bugQ> but doesn't "simple" really just mean "C-like" for a lot of
languages?
01:37 < bugQ> or whatever you're familiar with
01:37 < bugQ> hard to be objective about it
01:41 < bugQ> I mean that's why they changed all the keywords from Limbo
when they made Go
01:44 < exch> the !!  is indeed array indexing
01:47 -!- bugQ [~bug@c-67-171-127-76.hsd1.ut.comcast.net] has quit [Ping timeout:
250 seconds]
01:57 -!- pphalen [~pphalen@66.92.11.149] has joined #go-nuts
02:08 -!- aconran__ [~aconran-o@38.104.129.126] has quit [Read error: Connection
reset by peer]
02:11 < crazy1be> import Maybe?
02:12 < crazy1be> does that *maybe* import something?
02:14 < exch> 'Maybe' seems to be a construct that allow expression return
values to be undetermined.  haskell wants everything to be explicit, so if a
function can possibly have a null or -1 or whatever as return vvalue..  you must
use a 'Maybe x' datatype as return value
02:15 < exch> in that code the indexof thing returns 'Maybe int'
02:16 < exch> Not sure why it can't just return -1
02:17 < exch> fromMaybe should then be used to cast it an actual int.  If
the return value is not an int, the first argument is (0) is used instead
02:19 < exch> Something else I noticed is that importing the Maybe module
also links in filesystem, syscall, Time, and other IO related modules -.-
02:20 < skelterjohn> seems a bit like the unsafe package
02:30 -!- vpit3833 [~user@203.111.33.203] has quit [Ping timeout: 246 seconds]
02:33 -!- vpit3833 [~user@203.111.33.203] has joined #go-nuts
02:33 -!- m4dh4tt3r [~Adium@157.sub-75-210-120.myvzw.com] has quit [Ping timeout:
250 seconds]
02:34 -!- randfur [~AndChat@58.145.148.89] has joined #go-nuts
02:34 -!- aconran [~aconran-o@38.104.129.126] has joined #go-nuts
02:51 -!- thebarberian [~Master_Co@222-74-252-216.dsl.colba.net] has left #go-nuts
[]
03:02 -!- randfur [~AndChat@58.145.148.89] has quit [Quit: Bye]
03:02 -!- shvntr [~shvntr@113.84.145.193] has joined #go-nuts
03:14 -!- tensai_cirno [~cirno@77.232.15.216] has quit [Ping timeout: 252 seconds]
03:21 -!- pilgrum [~pilgrum@cpe-67-49-71-222.socal.res.rr.com] has joined #go-nuts
03:39 -!- aho [~nya@fuld-590c72d8.pool.mediaWays.net] has quit [Quit:
EXEC_over.METHOD_SUBLIMATION]
03:41 -!- nettok [~quassel@200.119.157.9] has quit [Ping timeout: 260 seconds]
03:54 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has joined #go-nuts
03:54 -!- mode/#go-nuts [+v iant] by ChanServ
03:56 -!- clip9 [clip9@er.en.svarteper.com] has quit [Ping timeout: 240 seconds]
03:58 -!- clip9 [clip9@er.en.svarteper.com] has joined #go-nuts
04:10 -!- globber [~globber@c-98-243-88-34.hsd1.mi.comcast.net] has joined
#go-nuts
04:11 -!- rejb [~rejb@unaffiliated/rejb] has quit [Ping timeout: 246 seconds]
04:17 -!- zozoR [~Morten@56344e3e.rev.stofanet.dk] has joined #go-nuts
04:18 -!- keithcascio [~keithcasc@nat/google/x-fxivpsbrjihvcbsh] has quit [Quit:
Leaving]
04:51 -!- edsrzf [~chickench@122-61-221-144.jetstream.xtra.co.nz] has joined
#go-nuts
05:16 -!- zozoR [~Morten@56344e3e.rev.stofanet.dk] has quit [Remote host closed
the connection]
05:28 -!- Viriix [~joseph@c-67-169-172-251.hsd1.ca.comcast.net] has joined
#go-nuts
05:30 -!- pphalen [~pphalen@66.92.11.149] has left #go-nuts []
05:41 -!- madari [madari@AM.irc.fi] has quit [Quit: leaving]
05:41 -!- madari [madari@idm.irc-galleria.net] has joined #go-nuts
05:48 -!- crazy1be [~crazy2be@d209-89-248-73.abhsia.telus.net] has quit [Ping
timeout: 276 seconds]
05:50 -!- ivan` [~ivan@unaffiliated/ivan/x-000001] has quit [Ping timeout: 252
seconds]
05:52 < plexdev> http://is.gd/cwXdZx by [Andrew Gerrand] in
go/src/cmd/godoc/ -- godoc: remove errant space in HTML tag
06:03 -!- ivan` [~ivan@unaffiliated/ivan/x-000001] has joined #go-nuts
06:08 -!- dfc [~dfc@eth59-167-133-99.static.internode.on.net] has quit [Ping
timeout: 252 seconds]
06:11 -!- unofficialmvp [~dev@94-62-164-227.b.ipv4ilink.net] has joined #go-nuts
06:11 -!- unofficialmvp [~dev@94-62-164-227.b.ipv4ilink.net] has left #go-nuts []
06:12 -!- [dmp] [~dennis@unaffiliated/dmp/x-546784] has joined #go-nuts
06:18 -!- chin_up [~chatzilla@115.200.52.211] has joined #go-nuts
06:30 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has joined #go-nuts
06:42 -!- zimsim [~simon@87.72.77.195] has joined #go-nuts
06:48 -!- skejoe [~skejoe@188.114.142.162] has joined #go-nuts
06:53 -!- mikespook [~mikespook@219.137.73.42] has quit [Ping timeout: 260
seconds]
06:55 -!- piranha [~piranha@5ED42E59.cm-7-5a.dynamic.ziggo.nl] has joined #go-nuts
06:56 -!- mikespook [~mikespook@183.47.228.78] has joined #go-nuts
06:57 -!- Viriix [~joseph@c-67-169-172-251.hsd1.ca.comcast.net] has quit [Quit:
Leaving]
07:00 -!- tvw [~tv@212.79.9.150] has joined #go-nuts
07:01 -!- Maxdamantus [~Maxdamant@203-97-238-106.cable.telstraclear.net] has quit
[Ping timeout: 246 seconds]
07:02 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
07:03 -!- ExtraSpice [XtraSpice@88.118.35.153] has joined #go-nuts
07:24 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
07:36 -!- wrtp [~rog@92.17.50.183] has joined #go-nuts
07:41 -!- skejoe [~skejoe@188.114.142.162] has quit [Quit: Lost terminal]
07:48 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
08:05 -!- venk [~user@CPE-124-189-81-145.azsz1.cht.bigpond.net.au] has joined
#go-nuts
08:19 -!- chin_up [~chatzilla@115.200.52.211] has quit [Quit: ChatZilla 0.9.86.1
[Firefox 4.0/20110318052756]]
08:20 -!- napsy [~luka@193.2.66.6] has joined #go-nuts
08:22 -!- pilgrum [~pilgrum@cpe-67-49-71-222.socal.res.rr.com] has quit [Quit:
Leaving]
08:28 -!- cbeck1 [cbeck@gateway/shell/pdx.edu/x-emtftxlbzkcnhkbs] has joined
#go-nuts
08:29 -!- niekie [~niek@CAcert/Assurer/niekie] has quit [Read error: Operation
timed out]
08:29 -!- cbeck [cbeck@gateway/shell/pdx.edu/x-tvxvhslxdodevrjf] has quit [Read
error: Connection reset by peer]
08:30 -!- serbaut1 [~joakims@88.80.182.68] has quit [Ping timeout: 260 seconds]
08:30 -!- niekie [~niek@CAcert/Assurer/niekie] has joined #go-nuts
08:30 -!- serbaut [~joakims@88.80.182.68] has joined #go-nuts
08:32 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Quit: Leaving]
08:34 -!- petrux [~petrux@host16-224-static.53-82-b.business.telecomitalia.it] has
joined #go-nuts
08:35 -!- petrux_ [~petrux@host16-224-static.53-82-b.business.telecomitalia.it]
has joined #go-nuts
08:40 -!- femtoo [~femto@95-89-249-242-dynip.superkabel.de] has joined #go-nuts
08:46 -!- Project_2501 [~Marvin@82.84.81.241] has joined #go-nuts
08:46 -!- snearch [~snearch@f053000130.adsl.alicedsl.de] has joined #go-nuts
08:46 -!- edsrzf [~chickench@122-61-221-144.jetstream.xtra.co.nz] has quit [Remote
host closed the connection]
08:56 -!- unofficialmvp [~dev@94-62-164-227.b.ipv4ilink.net] has joined #go-nuts
08:57 -!- unofficialmvp [~dev@94-62-164-227.b.ipv4ilink.net] has left #go-nuts []
08:57 -!- femtoo [~femto@95-89-249-242-dynip.superkabel.de] has quit [Read error:
Connection reset by peer]
08:59 -!- kanru_ [~kanru@kanru-1-pt.tunnel.tserv15.lax1.ipv6.he.net] has joined
#go-nuts
09:06 -!- kanru [~kanru@kanru-1-pt.tunnel.tserv15.lax1.ipv6.he.net] has quit
[Quit: WeeChat 0.3.2]
09:11 -!- arvindht [7c7cdbfa@gateway/web/freenode/ip.124.124.219.250] has joined
#go-nuts
09:23 -!- bXi [bluepunk@irssi.co.uk] has quit [Ping timeout: 248 seconds]
09:23 -!- bXi [bluepunk@irssi.co.uk] has joined #go-nuts
09:31 -!- venk [~user@CPE-124-189-81-145.azsz1.cht.bigpond.net.au] has quit [Quit:
ERC Version 5.3 (IRC client for Emacs)]
09:33 -!- mikespook [~mikespook@183.47.228.78] has quit [Quit: Leaving.]
10:05 -!- sabayonuser3
[~sabayonus@cpc2-lewi14-2-0-cust407.2-4.cable.virginmedia.com] has joined #go-nuts
10:17 -!- randfur [~AndChat@58.145.148.59] has joined #go-nuts
10:18 < dellaxim> Hi, I have a package "gohdf5" and export a function 'func
H5open() __asm__ ("H5open")'.  Could anybody let me know how to compile&link this
package with libhdf5 using gccgo?
10:24 -!- hallas [~hallas@x1-6-30-46-9a-b2-c5-1f.k891.webspeed.dk] has joined
#go-nuts
10:24 < hallas> Does anyone know whats wrong with ResponseWriter?  Its
supposed to implement a SetHeader function, but doesnt.  Just checked with the
documentation.  :-(
10:26 < hallas> Ah right.  It uses the Header thing now.  Documentation just
doesnt say so.
10:26 -!- randfur [~AndChat@58.145.148.59] has quit [Ping timeout: 240 seconds]
10:26 < hallas> http://golang.org/src/pkg/http/server.go?s=1245:2528#L41
10:32 -!- Fish- [~Fish@exo3753.pck.nerim.net] has joined #go-nuts
10:35 -!- Fish [~Fish@exo3753.pck.nerim.net] has quit [Ping timeout: 255 seconds]
10:39 -!- randfur [~AndChat@58.145.148.69] has joined #go-nuts
10:42 < jnwhiteh> hallas: http://goneat.org/pkg/http/#ResponseWriter
10:42 < jnwhiteh> golang.org is on an older version of the code
10:42 < jnwhiteh> goneat.org stays more current
10:42 < jnwhiteh> or you can always use godoc =)
10:43 < hallas> Well, I just went to the src folder and found it my self.
Think I am gonna godoc the stuff from now on, keep the documentation close by :)
Thanks.
10:47 -!- randfur [~AndChat@58.145.148.69] has quit [Quit: Bye]
10:51 -!- randfur [~AndChat@58.145.148.69] has joined #go-nuts
10:54 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-154-101.clienti.tiscali.it] has
joined #go-nuts
10:57 -!- Project_2501 [~Marvin@82.84.81.241] has quit [Ping timeout: 252 seconds]
11:10 -!- randfur [~AndChat@58.145.148.69] has quit [Quit: Bye]
11:26 -!- Netsplit *.net <-> *.split quits: l00t, Soultaker, [dmp]
11:27 -!- hallas [~hallas@x1-6-30-46-9a-b2-c5-1f.k891.webspeed.dk] has left
#go-nuts []
11:27 -!- Netsplit over, joins: Soultaker
11:29 -!- l00t [~i-i3id3r_@189.105.7.59] has joined #go-nuts
11:31 -!- [dmp] [~dennis@unaffiliated/dmp/x-546784] has joined #go-nuts
11:35 -!- nesusvet [~nesusvet@195.218.191.171] has joined #go-nuts
11:47 -!- boscop__ [~boscop@f055168103.adsl.alicedsl.de] has joined #go-nuts
11:50 -!- artefon [~thiago@dhcp37.usuarios.dcc.ufmg.br] has joined #go-nuts
11:50 -!- zozoR [~Morten@56344e3e.rev.stofanet.dk] has joined #go-nuts
11:50 < xyproto> gonuts.org is quicker than goneat.org here, and also
updated
11:59 < wrtp> xyproto: i thought goneat.org was updated every hour
12:07 -!- napsy [~luka@193.2.66.6] has quit [Quit: Lost terminal]
12:14 -!- jgonzalez [~jgonzalez@173-14-137-134-NewEngland.hfc.comcastbusiness.net]
has joined #go-nuts
12:27 < mpl> adg: hello.  jsyk, when trying to run the gob example from the
end of your blog post in the go playground, I get a "processe took too long" as
output.
12:28 -!- snearch [~snearch@f053000130.adsl.alicedsl.de] has quit [Quit:
Verlassend]
12:32 < xyproto> wrtp: that may be, I was thinking about the retrieval of
the webpages from the server
12:42 < wrtp> mpl: have you tried changing the code slightly (add a space)
and trying again?
12:42 -!- arvindht [7c7cdbfa@gateway/web/freenode/ip.124.124.219.250] has left
#go-nuts []
12:44 -!- PortatoreSanoDiI [~Marvin@dynamic-adsl-94-36-176-182.clienti.tiscali.it]
has joined #go-nuts
12:47 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-154-101.clienti.tiscali.it] has
quit [Ping timeout: 250 seconds]
12:51 < mpl> wrtp: no.  why?
12:54 < wrtp> mpl: because the go playground hashes by source code content -
if an instance happens to time out, then all subsequent instances will be marked
as timing out
12:54 < wrtp> it's worth trying
12:54 < mpl> ah
12:55 < wrtp> yup, works for me
12:55 < wrtp> (try adding a new line at the end)
12:56 -!- skejoe [~skejoe@188.114.142.162] has joined #go-nuts
12:59 -!- Project_2501 [~Marvin@82.84.82.99] has joined #go-nuts
13:00 < mpl> wrtp: indeed, works too with a newline.
13:02 < mpl> adg: maybe that "trick" should be added there
http://golang.org/doc/playground.html ?
13:02 -!- PortatoreSanoDiI [~Marvin@dynamic-adsl-94-36-176-182.clienti.tiscali.it]
has quit [Ping timeout: 250 seconds]
13:02 -!- saturnfive [~saturnfiv@210.74.155.131] has quit [Read error: Connection
reset by peer]
13:22 -!- rlab_ [~Miranda@91.200.158.34] has joined #go-nuts
13:23 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 246 seconds]
13:26 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has quit [Quit:
Leaving.]
13:36 -!- Venom_X [~pjacobs@75.92.43.21] has joined #go-nuts
13:37 < xyproto> what really happens when a number is assigned to an
interface{}?  Like var i interface{} = 123
13:38 < xyproto> is an .(int) method created that returns the number, is the
number stored in some sort of struct?
13:38 < nsf> xyproto: interface{} is usually a pair of two pointers
13:38 < nsf> but in case if value fits in sizeof(*void) (aka pointer size)
13:38 < nsf> it's written directly to the pointer
13:38 < nsf> so
13:38 < xyproto> nsf: aha, that explains a lot
13:38 < nsf> var i interface{} = 123
13:38 < nsf> will end up as a structure
13:39 < nsf> {123, <pointer to type information for int>}
13:39 < nsf> which will take 8 bytes on x86
13:39 -!- foocraft [~dsc@178.152.44.249] has joined #go-nuts
13:39 < nsf> and 16 bytes on x86_64
13:41 < xyproto> nsf: great, thanks for the enlightening explanation!
13:41 < nsf> yeah, I'm trying to figure out how one would make interfaces
without garbage collector
13:42 < nsf> because if the value is greater than sizeof(*void)
13:42 < nsf> you need to allocate a memory for it
13:42 < nsf> and then maintain value semantics
13:42 < ww> 'afternoon...  some go stuff for you:
http://eris.okfn.org/ww/2011/03/gockan
13:42 < nsf> e.g.  when interface is assigned to another interface, value
got copied
13:43 -!- iant [~iant@67.218.107.170] has joined #go-nuts
13:43 -!- mode/#go-nuts [+v iant] by ChanServ
13:43 < nsf> hm, I guess I will have to provide that semantics
13:44 < nsf> but it will do automatic memory management :(
13:44 < wrtp> xyproto: this is a useful reference:
http://research.swtch.com/2009/12/go-data-structures-interfaces.html
13:45 < nsf> hm..  but there is another case
13:45 < nsf> global interface variables
13:46 -!- rejb [~rejb@p4FD74086.dip.t-dialin.net] has joined #go-nuts
13:46 -!- rejb [~rejb@p4FD74086.dip.t-dialin.net] has quit [Changing host]
13:46 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
13:46 < nsf> currently I started to understand that GC is a big part of Go
and you can't easily kick it out
13:46 < wrtp> ww: cool
13:47 < wrtp> nsf: indeed :-)
13:47 < nsf> for example allowing dynamic initialization for global
variables
13:47 < nsf> doesn't make a lot of sense
13:48 < nsf> because you need to clean them out at some point
13:48 < nsf> unless it doesn't matter of course
13:49 < wrtp> what?  why do you ever need to clean out global variables?
13:49 < nsf> who knows :)
13:49 < nsf> personally I don't like them at all
13:49 < wrtp> that's the least of your worries :-)
13:49 < nsf> (like weird implicit caches, etc)
13:50 < nsf> and I must say 'net' library in Go
13:50 < nsf> has some
13:50 < wrtp> i don't see how dynamic global variables are any different
from any other global variable
13:50 < nsf> wrtp: yeah, that's true
13:50 < nsf> I won't remove that feature
13:50 < nsf> (code execution before 'main')
13:50 < nsf> but it's nature is changed
13:50 < nsf> to me
13:51 < wrtp> i think that the dependency tree approach to global variable
initialisation is briliant
13:51 < nsf> as for interfaces, I think it's possible to keep interface
values on the stack :)
13:51 < nsf> even if they are bigger than sizeof(*void)
13:51 < wrtp> you can't
13:51 < nsf> I think I can :)
13:51 < exch> ww: interesting read.  You should submit this to HackerNews.
It mark spark some interesting discussion and at least help to get Go 'out there'
a bit more :)
13:51 < exch> s/mark/may/
13:52 < wrtp> what about x := []interface{}{5, 4+5i}
13:52 < wrtp> what size is the array element of x?
13:52 < nsf> I don't have slices first of all
13:52 < ww> exch: sure, why not?
13:52 < nsf> wrtp: 8 bytes on x86
13:53 < nsf> wrtp: but it will reserve a space on stack for that complex
number
13:53 < nsf> and the pointer will point to that space
13:53 < wrtp> nsf: ok, what about func f(a, b interface{}) { ...  };
f(struct{a, b, c float64}{}, 5)
13:53 < nsf> the tricky part is passing between functions, yeah
13:53 < nsf> there must be a convention
13:54 < nsf> when function receives an interface
13:54 -!- dahankzter [~henrik@92-244-3-192.customers.ownit.se] has joined #go-nuts
13:54 < nsf> it allocates (hello 'alloca') place for its value on the stack
13:54 < nsf> and does the actual copy
13:54 < wrtp> but you have pointer arithmetic, right?  how do you know how
much to increment a pointer to interface{} ?
13:54 < nsf> uhm, interface{} is always 8 bytes
13:54 < skelterjohn> not if its entirely on the stack...
13:55 < wrtp> exactly
13:55 < skelterjohn> unless you just use another part of the stack as the
heap
13:55 < nsf> it's always 8 bytes
13:55 < nsf> the question is
13:55 < exch> ww: want me to do it?
13:55 < wrtp> nsf: do you have arrays?
13:55 < nsf> interface contains data pointer, where it points to?
13:55 < nsf> wrtp: yes
13:55 < ww> exch: i dust did...  had to make an account first
13:55 < exch> ok :)
13:55 < ww> none of these web sites like my username...  what's wrong with
two character names?
13:55 < wrtp> nsf: so how do you deal with arrays of interface?
13:56 < exch> probably raises spambot flags all over :p
13:56 < wrtp> if all the interfaces are on the stack?
13:56 < nsf> wrtp: what array changes?  it's like multiple interfaces on the
stack
13:56 < nsf> you're not listening..  let me draw a picture for you
13:56 < nsf> I think I'm bad at explaining things
13:57 < skelterjohn> nsf - he is wondering where the variable-sized data
will go
13:57 < wrtp> i think i know what you're talking about - you just want to
use the stack as a heap
13:58 < skelterjohn> since you say the interface itself is always 8 bytes
13:58 < nsf> skelterjohn: yeah, I got it
13:58 < nsf> wrtp: yes!  :)
13:58 < skelterjohn> the whole thing about stacks is that you know how big a
stack frame will be at compile time
13:58 < skelterjohn> otherwise, you just have a whole bunch of heap
13:58 < nsf> skelterjohn: then what 'alloca' does?
13:58 < skelterjohn> and there is no reason to distinguish between heap and
stack
13:58 < nsf> shifts stack pointer?
13:58 < Namegduf> I would assume assigning something into an interface
copies it onto the heap
13:58 < skelterjohn> i don't know what alloca does, but it sounds gross
13:58 < nsf> it's faster than heap alloc anyway
13:59 < Namegduf> As the interface stores an address
13:59 < skelterjohn> Namegduf: he's talking about his language
13:59 < Namegduf> Oh, I see.
13:59 < nsf> Namegduf: interface is tricky
13:59 < Namegduf> Are you actually looking at variably-sized interfaces?
13:59 < wrtp> i understand about alloca, but you can never return an
alloca'd pointer
13:59 < nsf> if the value fits to 4-8 bytes, then it's stored directly
13:59 < wrtp> so you won't be able to return an interface bigger than a
pointer
13:59 < skelterjohn> bbl
13:59 -!- skelterjohn [~jasmuth@c-68-46-33-145.hsd1.nj.comcast.net] has quit
[Quit: skelterjohn]
13:59 < nsf> wrtp: hm..  returning interface values, another issue
13:59 < Namegduf> If not, then just treat sticking something in an interface
as taking the address of it
14:00 < wrtp> nsf: same issue as storing them anywhere
14:00 < Namegduf> Which is unsafe if it is on the heap and you return it
14:00 < Namegduf> Er, stack
14:00 < nsf> Namegduf: the problem with interfaces - they maintain value
semantics
14:00 < nsf> e.g.:
14:00 < nsf> var x MyBigStruct
14:00 < nsf> var i interface{} = x
14:00 < wrtp> Namegduf: yeah, but nsf doesn't care about that.  he'll have a
free operator presumably
14:01 < nsf> now 'i' contains the copy of 'x'
14:01 < Namegduf> Right.
14:01 < ww> meh.  these crawlers...
14:01 < nsf> var j interface{} = i
14:01 < nsf> now 'j' contains the copy of 'x' as well
14:01 < Namegduf> Oh, I see.
14:01 < Namegduf> Use a reference counted item on the heap?
14:01 < nsf> and I can't just use interfaces as pointers
14:01 < wrtp> Namegduf: no, because they can be cyclic
14:01 < nsf> Namegduf: bad idea
14:01 < nsf> I can provide that value semantics using heap
14:01 < Namegduf> wrtp: Interfaces can contain themselves?
14:02 < nsf> no problem
14:02 < Namegduf> Ick
14:02 < ww> i just published that thing, it's on a non-standard port where
normally things aren't listening...  and already google and the netEstate FOAF
crawler are indexing my index
14:02 < nsf> but it causes allocs
14:02 < wrtp> Namegduf: var x interface{}; x = &x
14:02 < nsf> I'd like to avoid them
14:02 < exch> ww: lol I've had similar experiences in the past.  It's
slightly creepy just how fast Google bots are all over your stuff.
14:02 < nsf> well and I will issue warning for very big interface values
anyway
14:02 < xyproto> wrtp: thanks for the link, I will read it
14:03 < nsf> because using pointers sometimes makes more sense
14:03 < wrtp> nsf: i think you'll have to ditch interfaces
14:03 < nsf> wrtp: we'll see
14:04 < wrtp> (or make them heap-allocate)
14:04 < wrtp> i think that's fine though - when you've done with an
interface, you free it
14:04 < nsf> persoanlly I think you can return a pointer to an 'alloca'ed
value
14:04 < nsf> but the problem is
14:04 < nsf> you need to copy it somewhere
14:04 < nsf> and to do that you allocate stack space and boom
14:04 < nsf> it's overwritten
14:05 < nsf> :(
14:05 < wrtp> if you copy it somewhere, then you might as well heap allocate
it in the first place
14:05 < nsf> heap allocation is an option, yes
14:05 < wrtp> x := functionReturningInterface(); y :=
functionUsingLotsOfStack(); return x
14:06 < nsf> you see, the problem here:
14:06 < ww> oh and uriel, if you're listening, a part of that project that
should be generally useful and reusable: https://bitbucket.org/okfn/goautoneg
14:06 < nsf> first function allocates a place for a value on its stack
14:06 < ww> does Accept header auto negotiation
14:06 < nsf> then when it returns it
14:06 < nsf> you need a place for it immediately
14:06 < nsf> and you can't use stack
14:06 < nsf> because it will overwrite that value
14:06 < wrtp> you can copy things around without using stack, no problem
14:06 < nsf> no way to save the value :)
14:06 < wrtp> (unless you're targetting C of course :-])
14:06 < nsf> but where?
14:07 < nsf> heap is the only choice that will work
14:07 < wrtp> indeed - that's what the heap is for
14:07 -!- saturnfive [~saturnfiv@219.144.163.55] has joined #go-nuts
14:07 < nsf> another option: restricting interfaces to pointer values
14:08 < nsf> but that's the whole different story
14:08 -!- emjayess [~emjayess@pix1.i29.net] has joined #go-nuts
14:08 < nsf> although in Go using 'int' or 'float' as an interface
14:09 < nsf> isn't that useful
14:09 < nsf> what's useful is built-in types
14:09 < wrtp> nsf: you've got the same problem then - if you want to put a
larger value in an interface, you need to malloc it
14:09 < nsf> []string as interface{} for example
14:09 < wrtp> so you can store a pointer in the interface
14:09 < nsf> wrtp: yeah
14:09 < wrtp> but then there's no way to free it
14:09 < nsf> there is
14:09 < wrtp> because the interface is opaque
14:09 < nsf> I can provide access to that pointer
14:09 < nsf> and I will :)
14:10 < nsf> I'm not Go :)
14:10 < nsf> (e.g.  unsafe)
14:10 < wrtp> ok, but if something returns an interface, how do i know if
it's appropriate to free its pointer or not?
14:10 < wrtp> it might be pointing to some static strucutre
14:10 < wrtp> *structure
14:10 < nsf> the same way if it would return an ordinary pointer
14:11 < wrtp> yeah, but an ordinary pointer usually means only one thing
14:11 < wrtp> and has attached semantics
14:11 < wrtp> (i.e.  free this, or don't free this)
14:11 < wrtp> but with an interface, the whole point is that it may be any
number of things underneath
14:11 < nsf> I can make a "Free" function as a part of interface
14:12 < nsf> that should be called when you're done
14:12 < nsf> noop for values for example
14:12 < nsf> in fact it's the only way to do that
14:12 < nsf> for a lot of cases
14:13 < nsf> because value may contain a structure with a pointer which
points to an allocated space
14:13 < wrtp> sure
14:13 < nsf> in manual memory management "type Freeer interface { Free() }"
will be as common as Go's Stringer :)
14:13 < nsf> ("Freeer" is a bad name though)
14:14 < wrtp> so does that mean you can't put a string in an interface
without it leaking?
14:14 < nsf> I don't have a string type
14:14 < nsf> *byte
14:14 < nsf> :)
14:14 < nsf> wrtp will not use my language
14:14 < nsf> :)
14:14 < wrtp> yeah, but it's interesting to see where you're trying to go...
14:15 < nsf> it's interesting for me too
14:15 < wrtp> so your strings are zero terminated?
14:15 < nsf> yes, of course
14:15 < wrtp> bad move
14:15 < wrtp> it's a C design flaw
14:15 < nsf> one of the top priorities is C compatibility
14:15 < nsf> but again
14:15 < nsf> I don't have a string type
14:15 < nsf> it's just memory as in C
14:15 < wrtp> you can be C compatible and still have length-counted strings
14:16 < nsf> and I will have them in a library
14:16 < nsf> I'm sure
14:16 < wrtp> better to have them built in
14:16 < nsf> not to me
14:17 < nsf> also the case where length-based strings are important is
slicing
14:17 < nsf> e.g.  you can reuse the memory of a larger string
14:18 < nsf> it can be provided easily without built-in strings
14:18 < nsf> for example LLVM and clang use that
14:18 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
14:18 < nsf> I don't see a big point in Go's strings
14:18 < wrtp> nsf: sure, but it's awkward
14:19 -!- femtoo [~femto@95-89-249-242-dynip.superkabel.de] has joined #go-nuts
14:20 < wrtp> if you don't have strings built in, then will everything in
the standard library take null terminated strings?
14:20 < nsf> I have no idea at the moment
14:21 < nsf> but string literals will return a pointer to a null terminated
string
14:21 < wrtp> so converting to a length-based string will be O(n)
14:22 < nsf> not necessary
14:22 < nsf> especially when templates will arive
14:22 < nsf> uhm
14:23 < wrtp> uhm...
14:23 < Namegduf> Null-terminated strings.  :(
14:23 < nsf> arrive*
14:23 < Namegduf> I figure you need it for C compatibility.
14:23 < nsf> Namegduf: yes
14:23 < Namegduf> But still, :(
14:23 < nsf> e.g.:
14:23 < nsf> import "sdl.h" as sdl;
14:24 < nsf> sdl.SDL_WM_SetWindowCaption("123", "123");
14:24 < nsf> or something
14:24 < nsf> without any kind of bindings
14:27 -!- saturnfive [~saturnfiv@219.144.163.55] has left #go-nuts []
14:28 < nsf> hehe, it will a really different language
14:28 < nsf> which is good
14:28 < nsf> more languages more fun
14:29 < nsf> :)
14:29 < wrtp> seems like it'll just be a C front end to me :-)
14:29 < Namegduf> I'm wondering if it will end up too hampered by C
compatibility.  :(
14:30 < nsf> Namegduf: maybe, but I'm taking a different path than C++, but
close to D actually, although D can't use C headers directly (which is kind of
surprising, because it has even tools which convert .h to .d)
14:31 < nsf> although it should be much simpler than D
14:31 < wrtp> i just got my type resolver working on every symbol in the go
source tree, yay!
14:31 < nsf> wrtp: what are you working on?  :)
14:32 < nsf> tool or compiler?
14:32 < wrtp> tool - i did it ages back but i've resurrected it
14:32 -!- chin_up [~chatzilla@115.200.50.1] has joined #go-nuts
14:32 < nsf> I see
14:33 < wrtp> for any symbol it tells you where it was defined and its type
and members
14:33 < nsf> I can tweak gocode for that function in a day
14:33 < nsf> :)
14:33 < wrtp> so it can be used to jump straight from, say, a method name in
source code to its definition
14:34 < wrtp> nsf: really?  i thought gocode parsed .a files.
14:34 < nsf> wrtp: it does semicomplete type inference as well
14:34 < nsf> in the source code
14:35 < nsf> so it knows about types, their members
14:35 < nsf> it doesn't track definition locations though
14:35 < wrtp> yeah, that's the main thing that this tool does
14:36 < wrtp> and the type inference works completely which is satisfying
14:36 -!- chin_up [~chatzilla@115.200.50.1] has quit [Read error: Connection reset
by peer]
14:36 < wrtp> there are quite a few special cases around :-)
14:38 < nsf> the only problem so far with gocode
14:38 < nsf> is method expressions
14:38 < nsf> something like:
14:38 < nsf> x := bytes.Buffer.Len
14:38 < nsf> it doesn't know the exact type of 'x'
14:38 < wrtp> what's hard about that?
14:38 < nsf> nothing
14:39 < nsf> it just wasn't implemented :)
14:39 < nsf> because it doesn't affect the correctness of autocompletion
14:39 < wrtp> method expressions are harder than some bits.  you've got to
do the shallow-first rule.
14:39 < nsf> 'x' doesn't have members
14:39 < wrtp> nsf: yes it does
14:39 < wrtp> well, it could
14:40 < nsf> well I don't care about corner cases
14:40 < wrtp> it's quite common to do: x := Foo.Bar; y := x.Something()
14:40 < nsf> I haven't seen anyone using method expressions
14:40 < wrtp> oh, sorry, of course
14:40 < wrtp> Len is a method
14:41 < nsf> it's type is: func(*bytes.Buffer)
14:41 < nsf> ah
14:41 < nsf> it's type is: func(*bytes.Buffer) int
14:41 < nsf> gocode thinks it's: func() int
14:43 < nsf> because in gocode methods are like func fields of the struct :)
14:43 < nsf> or any other type
14:43 < nsf> works for autocompletion
14:43 -!- pharris [~Adium@rhgw.opentext.com] has joined #go-nuts
14:48 < wrtp> anyway, the package is available at
rog-go.googlecode.com/hg/exp/go/types
14:48 < wrtp> and the command (godef) is availalable at
rog-go.googlecode.com/hg/exp/cmd/godef
14:49 < jnwhiteh> wrtp: I ended up with what you suggested yesterday once I
got done refactoring things =)
14:49 < jnwhiteh> not surprisingly :P
14:50 < wrtp> jnwhiteh: i can't remember the context..
14:50 < wrtp> .
14:50 -!- cbeck1 [cbeck@gateway/shell/pdx.edu/x-emtftxlbzkcnhkbs] has quit [Read
error: Connection reset by peer]
14:50 < wrtp> (i can't remember what i suggested :-])
14:51 -!- cbeck1 [cbeck@gateway/shell/pdx.edu/x-injwiikyeianenxm] has joined
#go-nuts
14:51 < jnwhiteh> wrtp: http://paste.pocoo.org/show/362668/
14:51 < jnwhiteh> just the dummy method to satisfy the interface
14:52 < jnwhiteh> its ugly in a whole new way now =)
14:52 < nsf> jnwhiteh: that's what go/ast does
14:52 < jnwhiteh> *nod*
14:52 < jnwhiteh> you both suggested it
14:53 < nsf> and I was first who suggested to look at it to you :)
14:53 < jnwhiteh> and I got to that point after refactoring, just goes to
show you =)
14:53 < wrtp> jnwhiteh: i think that looks a bit better.  BTW, you could get
away without defining isBlockType on all the types if you just embedded Buf (or
another type) which implemented isBlockType
14:53 < jnwhiteh> interesting, that's a good point
14:53 < wrtp> BTW var _ Block = &InodeBlock{nil, nil} could be var _ Block =
&InodeBlock{}
14:53 < jnwhiteh> I'll keep that in mind when I actually implement the
buffer cache
14:54 < wrtp> and even then i think you probably want (*InodeBlock)(nil)
14:54 < wrtp> which avoids the allocation
14:55 -!- elimisteve [~elimistev@pool-71-102-138-52.snloca.dsl-w.verizon.net] has
joined #go-nuts
14:55 -!- chin_up [~chatzilla@115.200.50.1] has joined #go-nuts
14:55 < steven> if it werent for tdd, i would be implementing my git clone
in Go :(
14:55 < steven> but Go isnt great for tdd or bdd sadly
14:55 < wrtp> also, i wonder if you might want to just embed Buf by value
rather than calling new(Buf) for each allocation.  depends if Bufs can be shared
etc though.
14:56 -!- pphalen [~pphalen@66.92.11.149] has joined #go-nuts
14:56 < kamaji> what's tdd/bdd ?
14:56 < wrtp> steven: AFAICS the reason for tdd is dynamic languages
14:57 < wrtp> much less important with statically typed languages
14:57 < kamaji> test driven development
14:57 < kamaji> ?
14:58 < Namegduf> BDD?
14:58 < wrtp> behaviour-driven design
14:58 < Namegduf> Ah.
14:58 < wrtp> http://en.wikipedia.org/wiki/Behavior_Driven_Development
14:59 < Namegduf> TDD plus tying the tests to natural language use cases
14:59 < Namegduf> Got it.
15:00 -!- iant [~iant@67.218.107.170] has quit [Quit: Leaving.]
15:00 < Namegduf> Or, rather, using natural language use cases to define the
tests and thus behaviours.
15:01 < nsf> usually english language :)
15:01 < wrtp> steven: are you doing the git clone for someone else?  or
yourself?
15:01 < wrtp> it seems like BDD is focused on client-developer relations,
but maybe i'm wrong
15:01 < Namegduf> Well, yes
15:02 -!- shvntr [~shvntr@113.84.145.193] has quit [Read error: Connection reset
by peer]
15:02 < Namegduf> He didn't say he was using it, he just mentioned Go wasn't
good for TDD or it in his opinion, I mostly asked because I wasn't familiar with
it.
15:02 -!- plainhao [~plainhao@208.75.85.237] has joined #go-nuts
15:06 -!- awidegreen [~quassel@c-66c9e555.08-2-73746f39.cust.bredbandsbolaget.se]
has joined #go-nuts
15:09 -!- iant [~iant@nat/google/x-cmnpzkwyvspjymyo] has joined #go-nuts
15:09 -!- mode/#go-nuts [+v iant] by ChanServ
15:10 -!- skelterjohn [~jasmuth@lawn-gw.rutgers.edu] has joined #go-nuts
15:15 -!- iant [~iant@nat/google/x-cmnpzkwyvspjymyo] has quit [Ping timeout: 246
seconds]
15:18 < taruti> Is there a simple way to apply some changes from codereview
to the local tree?
15:19 -!- piranha [~piranha@5ED42E59.cm-7-5a.dynamic.ziggo.nl] has quit [Quit:
Computer has gone to sleep.]
15:21 < wrtp> taruti: hg clpatch 9999
15:21 < wrtp> and hg revert @9999 to undo
15:24 -!- nesusvet [~nesusvet@195.218.191.171] has quit [Quit: Ухожу я от вас]
15:24 < kamaji> can I put composite literals in a loop and expect it to be a
new object each time?
15:24 < taruti> wrtp: thanks
15:24 < wrtp> nsf: in case you find it useful, the file at
http://code.google.com/p/rog-go/source/browse/exp/go/types/types_test.go has a
source file at the end which enumerates all the interesting type derivation cases
i could think of.
15:24 < wrtp> kamaji: what do you mean?
15:25 < wrtp> if you do for { c <- &SomeType{} } then it'll send a new
object down the channel each time
15:25 < nsf> wrtp: looks complete to me
15:25 < kamaji> wrtp: for { list = append(list, &SomeObject{value1, value2}
}
15:25 < kamaji> oh ok I guess it's the same thing
15:25 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has quit [Quit: Leaving.]
15:26 < wrtp> nsf: there were some cases that i only added today when
running it on the entire go source tree...
15:26 < nsf> I haven't tried that for gocode
15:26 < nsf> and my tests are less complete for sure
15:27 < nsf> but whatever :)
15:27 < nsf> no serious bug reports so far
15:27 < wrtp> it's worth doing - i thought i had reasonably complete
coverage, but when i automated the tests i found quite a few errors
15:27 < aiju> copy with one argument to create a copy of a slice would be
nice
15:28 < aiju> (or some other syntax for this)
15:28 < nsf> wrtp: I have 30 tests as well
15:28 < wrtp> aiju: append([]int(nil), slice)
15:28 < nsf> and hours of gocode usage
15:28 < aiju> you mean ...slice?  ;P
15:28 -!- iant [~iant@nat/google/x-nenwqdhlbglqvszr] has joined #go-nuts
15:28 -!- mode/#go-nuts [+v iant] by ChanServ
15:28 < nsf> wrtp: https://github.com/nsf/gocode/tree/master/testing
15:28 < nsf> but tests are not user friendly :)
15:29 < nsf> or well, I don't know
15:29 < wrtp> not user friendly why?
15:29 < wrtp> surely the user never sees them, unless they fail
15:29 < nsf> many dirs, cursor position in a separate file :)
15:30 < nsf> I mean they were created as an automatic test suite
15:30 < nsf> I meant browsing by "user friendliness"
15:30 < wrtp> ah yes
15:31 < nsf> wrtp: does you code handles cycles?
15:31 < nsf> type A B
15:31 < nsf> type B A
15:32 < nsf> because gocode isn't :)
15:32 < wrtp> good point.  it probably infinite recurses
15:32 < nsf> your*
15:33 < wrtp> yup, it does
15:33 < steven> wrtp: for myself
15:33 < nsf> nice
15:34 < wrtp> nsf: there's also this: type A struct {A}
15:34 < nsf> yeah
15:35 -!- chin_up [~chatzilla@115.200.50.1] has quit [Quit: ChatZilla 0.9.86.1
[Firefox 4.0/20110318052756]]
15:38 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has quit [Quit: ZNC -
http://znc.sourceforge.net]
15:38 < wrtp> heh, this is even legal: type A struct {*A}; func (a *A) Foo()
15:38 < nsf> yes
15:38 < nsf> type A *A
15:38 < wrtp> an infinite number of Foos at ever increasing depths
15:38 < nsf> is legal too
15:38 < nsf> type cycle is illegal only when size matters
15:38 < wrtp> sure, but that doesn't have the problem of an infinite number
of members :-)
15:39 < nsf> *A is the one member
15:39 < nsf> pointer to A
15:39 < aiju> type A struct {a, b A}
15:39 < aiju> way cool
15:39 < aiju> exponential growth fuck yeah :)
15:39 < nsf> wrtp: method will use the A itself, not an embedded field
15:40 < nsf> uhm
15:40 < nsf> I gues
15:40 < nsf> guess*
15:40 < wrtp> yes, but what if you try to enumerate all the methods?
15:40 < kamaji> aiju: awwwww I tried that :(
15:40 < kamaji> aiju: invalid recursive type
15:40 < kamaji> sucks
15:40 < nsf> :)
15:40 < kamaji> I am severely disappointed :D
15:41 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has joined #go-nuts
15:45 -!- [dmp] [~dennis@unaffiliated/dmp/x-546784] has quit [Read error:
Operation timed out]
15:45 -!- [dmp] [~dennis@users.d75.net] has joined #go-nuts
15:45 -!- [dmp] [~dennis@users.d75.net] has quit [Changing host]
15:45 -!- [dmp] [~dennis@unaffiliated/dmp/x-546784] has joined #go-nuts
15:49 -!- foocraft [~dsc@178.152.44.249] has quit [Quit: Leaving]
15:54 -!- piranha [~piranha@5ED43A0B.cm-7-5a.dynamic.ziggo.nl] has joined #go-nuts
15:56 -!- pphalen_ [~patrick@66.92.11.149] has joined #go-nuts
16:00 -!- piranha [~piranha@5ED43A0B.cm-7-5a.dynamic.ziggo.nl] has quit [Quit:
Computer has gone to sleep.]
16:00 -!- femtoo [~femto@95-89-249-242-dynip.superkabel.de] has quit [Read error:
Connection reset by peer]
16:02 -!- foocraft [~dsc@89.211.224.68] has joined #go-nuts
16:24 < skelterjohn> nsf: when you had gocode do refactoring stuff, did you
have struct field renaming?
16:25 -!- pphalen_ [~patrick@66.92.11.149] has left #go-nuts []
16:27 -!- aho [~nya@fuld-590c69c5.pool.mediaWays.net] has joined #go-nuts
16:27 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
16:28 -!- Project-2501 [~Marvin@82.84.87.106] has joined #go-nuts
16:32 -!- Project_2501 [~Marvin@82.84.82.99] has quit [Ping timeout: 240 seconds]
16:32 < wrtp> skelterjohn: you could use rog-go.googlecode.com/exp/go/types
for struct field renaming if you wanted
16:33 < wrtp> i had been planning to use it for some kind of renaming tool
myself (although i hadn't come up with a good name :-) )
16:33 -!- dellaxim [~sabayonus@cpc2-lewi14-2-0-cust407.2-4.cable.virginmedia.com]
has quit [Quit: Leaving]
16:35 -!- petrux [~petrux@host16-224-static.53-82-b.business.telecomitalia.it] has
quit [Quit: leaving]
16:37 -!- archevan [~archevan@67.69.227.99] has joined #go-nuts
16:37 -!- zimsim [~simon@87.72.77.195] has quit [Quit: /dev/null]
16:37 < skelterjohn> hmm - does it do type identification?
16:38 < skelterjohn> the issue is, when renaming struct X { a int } to
struct X { b int } and seeing "something.a", can you identify if something is an X
or not?
16:38 < skelterjohn> this is what it appears that go/typechecker wants to
do, when it's done
16:42 < wrtp> skelterjohn: yes
16:42 < skelterjohn> sweet - i'll take a more detailed look at it in a
little bit
16:43 < wrtp> skelterjohn: parse a file, find an identifier or selector
expression, call ExprType on it
16:43 < skelterjohn> wow great - perfect
16:43 < wrtp> it returns an object that uniquely identifies the identifier
or selector
16:43 < wrtp> works correctly on embedded types etc
16:44 < nsf> skelterjohn: yes I had
16:44 < nsf> but there were some bugs (not sure where exactly)
16:45 < skelterjohn> man - i do *not* want to finish reviewing this article
16:45 < skelterjohn> i would much rather work on gorf
16:46 < nsf> and gocode is the only app so far that knows how to get type
information from .a
16:46 < nsf> (aside from gc of course)
16:46 < nsf> :)
16:46 < skelterjohn> interesting
16:47 < skelterjohn> i don't think it makes sense for gorf to do that,
instead of analyzing all the source
16:47 < nsf> it does it very tricky though
16:50 < wrtp> it's true that if you don't want source location info, parsing
the source is a bit overkill.  but it seems fast enough in practice.
16:52 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.4]
16:52 < skelterjohn> wrtp: any major difference between what you've done and
what go/typechecker will be?  aside from yours being finished
16:53 < wrtp> skelterjohn: the major difference is that my stuff only looks
at types on demand.  it doesn't try to typecheck the whole program.
16:53 < skelterjohn> what if your source tree is not in $GOROOT/src/pkg -
will that cause any hiccups?
16:53 < wrtp> that works well for me, because i want it to work on partially
written source code in my editor, where types might not be completely specified.
16:54 < wrtp> yes - it needs to be able to find the source for a given
package
16:54 < wrtp> but you can provide a custom importer for that
16:54 < skelterjohn> right
16:54 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
16:55 < skelterjohn> does the fact that go/typechecker does all of them give
it a better amortized time cost per type?
16:55 < wrtp> probably
16:55 < wrtp> almost certainly in fact
16:55 < wrtp> but go/typechecker isn't done yet, although gri does seem to
be moving on it
16:55 < skelterjohn> could probably rig your typechecker to annotate the
nodes in the same way, and save that time
16:56 < wrtp> yeah, that would be trivial
16:56 < wrtp> i thought about doing that anyway
16:56 < wrtp> objects have a Type field as it is
16:58 < wrtp> which could be set when ExprType returns a type for the object
16:58 < plexdev> http://is.gd/kPU45p by [Roger Peppe] in
go/src/pkg/go/parser/ -- go/parser: fix scoping for local type declarations
16:58 < plexdev> http://is.gd/GqpDWp by [Robert Griesemer] in
go/src/cmd/gotest/ -- gotest: exclude . files when parsing directories (per r's
suggestion)
16:59 < skelterjohn> and any other types it had to infer to get its answer
17:02 < wrtp> skelterjohn: yes
17:02 < wrtp> skelterjohn: BTW, could you just check that you can goinstall
it, because i've got to go soon.
17:03 < wrtp> i might have got something wrong
17:03 < skelterjohn> ok
17:03 -!- femtoo [~femto@95-89-249-242-dynip.superkabel.de] has joined #go-nuts
17:04 < skelterjohn> universe.go:17: syntax error: unexpected semicolon or
newline, expecting := or = or comma
17:04 < skelterjohn> from your go/parser
17:05 < skelterjohn> that seems bizarre
17:05 < skelterjohn> maybe i should -clean -u :)
17:05 < wrtp> skelterjohn: yeah.
17:06 < wrtp> i think i've pushed that file and it seems fine
17:06 < skelterjohn> http://pastebin.com/mj8NwFKv
17:07 < wrtp> weird
17:07 < skelterjohn> updating to tip, i'll try again
17:07 < wrtp> ah, that's probably the reason
17:07 < wrtp> recent changes made to go/ast
17:08 < skelterjohn> i'm only a few days old, but i saw you had a go/parser
commit :)
17:08 -!- keithcascio [~keithcasc@nat/google/x-fzkgmlqaxrotlnkq] has joined
#go-nuts
17:08 < skelterjohn> goinstalled fine, now
17:08 < wrtp> that wasn't it
17:08 < skelterjohn> thanks :)
17:08 < wrtp> cool
17:08 -!- zimsim [~zimsim@87.72.77.195] has joined #go-nuts
17:08 < wrtp> i hope it's useful for you
17:08 < skelterjohn> seems likely
17:08 < wrtp> let me know if the docs don't make sense :-)
17:08 < skelterjohn> i'm horrible at reading docs
17:09 < skelterjohn> i tend to stop reading past function signatures
17:10 < wrtp> skelterjohn: well, if you want to see an example of it being
used, look at $GOROOT/src/pkg/rog-go.googlecode.com/hg/exp/cmd/godef
17:11 < skelterjohn> cool - that should be sufficient context
17:17 -!- tensai_cirno [~cirno@77.232.15.216] has joined #go-nuts
17:21 < wrtp> have fun
17:21 -!- wrtp [~rog@92.17.50.183] has quit [Quit: wrtp]
17:24 -!- Project-2501 [~Marvin@82.84.87.106] has quit [Quit: E se abbasso questa
leva che succ...]
17:31 -!- ako [~nya@fuld-590c623e.pool.mediaWays.net] has joined #go-nuts
17:32 -!- simon__ [~simon@87.72.77.195] has joined #go-nuts
17:32 -!- TheMue [~TheMue@p5DDF5008.dip.t-dialin.net] has joined #go-nuts
17:34 -!- aho [~nya@fuld-590c69c5.pool.mediaWays.net] has quit [Ping timeout: 246
seconds]
17:39 -!- petrux_ [~petrux@host16-224-static.53-82-b.business.telecomitalia.it]
has quit [Read error: Connection reset by peer]
17:40 -!- zimsim [~zimsim@87.72.77.195] has quit [Quit: Leaving]
17:42 -!- zimsim [~simon@87.72.77.195] has joined #go-nuts
17:50 -!- tensai_cirno [~cirno@77.232.15.216] has quit [Quit: Leaving]
17:54 -!- littlebobby [~bob@unaffiliated/littlebobby] has joined #go-nuts
17:58 -!- tvw [~tv@212.79.9.150] has quit [Remote host closed the connection]
17:59 -!- huin [~huin@91.85.185.181] has joined #go-nuts
18:07 -!- boscop_ [~boscop@f055027214.adsl.alicedsl.de] has joined #go-nuts
18:07 < gmilleramilar> can goinstall handle private github projects?
18:08 -!- wrtp [~rog@92.17.50.183] has joined #go-nuts
18:08 -!- tensai_cirno [~cirno@77.232.15.216] has joined #go-nuts
18:09 -!- boscop__ [~boscop@f055168103.adsl.alicedsl.de] has quit [Ping timeout:
246 seconds]
18:10 < skelterjohn> no
18:13 < gmilleramilar> same answer for bitbucket?
18:15 -!- d_m [d6@SDF.ORG] has quit [Quit: Lost terminal]
18:18 < skelterjohn> it can only use what's publicly available
18:18 < skelterjohn> it infers a checkout url from the path name
18:19 < gmilleramilar> that's what I thought, I just wanted to make sure I
wasn't missing anything.
18:19 < gmilleramilar> thx
18:20 -!- artefon [~thiago@dhcp37.usuarios.dcc.ufmg.br] has quit [Ping timeout:
246 seconds]
18:24 -!- sacho [~sacho@90.154.197.48] has joined #go-nuts
18:30 < skelterjohn> wrtp: I'm getting panics from calling ExprType
18:31 -!- Fish [~Fish@9fans.fr] has joined #go-nuts
18:32 < skelterjohn> err, and now i'm not
18:32 < skelterjohn> strange.  ignore me.
18:33 -!- m4dh4tt3r [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has joined
#go-nuts
18:34 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:cb5:7cff:9f6c:e3a3] has joined
#go-nuts
18:45 -!- arun_ [~arun@unaffiliated/sindian] has quit [Ping timeout: 240 seconds]
18:48 -!- jeffreymcmanus [~jeffreymc@70-36-141-150.dsl.dynamic.sonic.net] has
joined #go-nuts
18:48 -!- d_m [~d_m@64.186.128.169] has joined #go-nuts
18:52 < ww> is there some magic you need to do to have goinstall install
commands?  or does it just work for packages?
19:00 -!- jokoon [~eio@feu30-1-82-242-58-229.fbx.proxad.net] has joined #go-nuts
19:01 < wrtp> skelterjohn: if you get a panic i wanna know.  i've tested it
on all the identifiers in the Go source tree, but that might not be enough :-)
19:02 < wrtp> ww: it doesn't install commands...  yet
19:02 < wrtp> gomake will replace goinstall, and then it should work.  it's
probably a month away though (wild estimate)
19:09 < skelterjohn> wrtp: http://pastebin.com/TxQRyUMK
19:09 < skelterjohn> i run it on every visited node that can be asserted to
ast.Expr
19:10 < skelterjohn> and is not nil
19:10 < skelterjohn> crash is from types.go:821, and happens when I pass in
the CallExpr for foo
19:12 < wrtp> ah i see the problem
19:13 -!- archevan [~archevan@67.69.227.99] has quit [Ping timeout: 252 seconds]
19:14 < wrtp> if you want to fix it, assert on ast.Ident and
ast.SelectorExpr instead of ast.Expr
19:14 < wrtp> but i'll fix the problem in the code too and update my tests
19:16 < skelterjohn> hum.  what if i have something like bar().x and I want
to know what type bar() is?  or will your fix allow that
19:16 < skelterjohn> and the assert change is so i can still use it for
idents and selectors
19:17 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
19:18 < wrtp> that should be fine.
19:18 < wrtp> but if you're just changing identifiers, Ident and
SelectorExpr is ok
19:19 < wrtp> i'm just changing the test to check all nodes that can be
asserted to ast.Expr
19:19 < steven> wrtp: gomake?  wha?
19:19 < skelterjohn> if foo() returns an A, and type A struct { b int }, and
I want to change b to c, I want to change foo().b to foo().c
19:19 < wrtp> steven: goinstall is gonna be renamed to gomake
19:19 < skelterjohn> to do this, i have to know that foo() is an A
19:20 < steven> wrtp: oh, is it gonna be better too?
19:20 < wrtp> steven: check out the thread on golang-dev
19:20 < steven> oh,
http://groups.google.com/group/golang-dev/browse_thread/thread/c1cf1dcb35ab3f81/dc6990d9a78a5554?#dc6990d9a78a5554
19:23 < skelterjohn> wrtp: http://pastebin.com/XfAZwywj <- if i only do
idents and selectors, i can't see what type the first half of that selector is,
directly
19:23 < skelterjohn> in this small example i can figure it out, since it's
just a CallExpr whose return type is A, but it could be something more complicated
19:24 < skelterjohn> so for renaming fields, i really need to know the type
of whatever arbitrary Expr is in the selector's X
19:24 < wrtp> skelterjohn: you don't need to
19:24 < wrtp> the field name itself has an object
19:24 < skelterjohn> oh...
19:25 < skelterjohn> in that example, the b in foo().b has a nil object and
a "bad" type
19:25 < wrtp> yeah, but "foo().b" will have an object
19:25 < wrtp> i.e.  the SelectorExpr
19:26 < skelterjohn> right, i think i see
19:27 -!- artefon [~thiago@187.59.208.9] has joined #go-nuts
19:27 < wrtp> so if you want to change all instances of Foo.X to Foo.Y,
parse Foo.X, get its expr type, then look for all selector exprs with the same
object
19:27 < wrtp> BTW i've pushed again - the panic should be fixed.  it now
works with all expr nodes in the source tree
19:28 < skelterjohn> cool
19:31 < skelterjohn> why is go/ast's Field.Names a []*Ident instead of an
*Ident?
19:31 < skelterjohn> how could it have multiple names?
19:32 < wrtp> x, y: int
19:32 < wrtp> s/://
19:33 < skelterjohn> surprised that doesn't just get two fields
19:33 < wrtp> it needs to be able to print without losing info
19:33 < skelterjohn> ah
19:34 < wrtp> quite a few things could be simplified otherwise
19:54 -!- simon__ [~simon@87.72.77.195] has quit [Quit: /dev/null]
19:57 < steven> <3
20:03 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
20:06 -!- crazy1be [~crazy2be@d209-89-248-73.abhsia.telus.net] has joined #go-nuts
20:19 -!- tensai_cirno [~cirno@77.232.15.216] has quit [Ping timeout: 276 seconds]
20:19 -!- skejoe [~skejoe@188.114.142.162] has quit [Quit: Lost terminal]
20:22 -!- zozoR [~Morten@56344e3e.rev.stofanet.dk] has quit [Remote host closed
the connection]
20:28 < crazy2be> man
20:28 < crazy2be> they moved cookies
20:28 -!- aconran_ [~aconran-o@38.104.129.126] has joined #go-nuts
20:28 < crazy2be> i mean
20:28 -!- aconran [~aconran-o@38.104.129.126] has quit [Remote host closed the
connection]
20:28 < crazy2be> finally
20:28 < crazy2be> but i just spent like ages trying to figure out why things
broke
20:30 < crazy2be> hmm and still no easy way to get a specific cookie...  :/
20:32 < Urmel|> is anyone here able to compile the latest source for
windows?  using mingw
20:32 < Urmel|> i used to be able to do it but now i get errors like: make:
pwd: Command not found
20:33 < crazy2be> Urmel: Does your mingw install have a pwd command?
20:35 < Urmel|> yeah it does
20:35 < Urmel|> when i use pwd it works
20:47 -!- Mr_Dark [~dk@poviko.demon.nl] has joined #go-nuts
20:48 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.4]
20:53 < Mr_Dark> Anyone else having problems compiling Go (latest rev) on
windows (mingw)
20:59 < crazy2be> yeah
20:59 < crazy2be> Urmel is
21:01 -!- artefon [~thiago@187.59.208.9] has quit [Read error: Connection reset by
peer]
21:01 -!- artefon [~thiago@187.59.208.9] has joined #go-nuts
21:02 < Urmel|> :(
21:02 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts
21:02 < Urmel|> what are your errors Mr_Dark?
21:02 < Mr_Dark> when I try ./make.bash I get command not found
21:03 < Mr_Dark> $ ./make.bash
21:03 < Mr_Dark> make: pwd: Command not found
21:03 < Mr_Dark> make: echo: Command not found
21:03 < Mr_Dark> make: *** [go-env] Error 127
21:03 < Mr_Dark> Did not find Go environment variables.
21:03 < Mr_Dark> that ^
21:03 < Urmel|> yeah same here
21:03 -!- jokoon [~eio@feu30-1-82-242-58-229.fbx.proxad.net] has quit [Quit:
Leaving]
21:03 -!- awidegreen [~quassel@c-66c9e555.08-2-73746f39.cust.bredbandsbolaget.se]
has quit [Remote host closed the connection]
21:04 -!- femtoo [~femto@95-89-249-242-dynip.superkabel.de] has quit [Ping
timeout: 246 seconds]
21:07 < Mr_Dark> same error occurs when I try to compile the release branch
21:07 -!- plainhao [~plainhao@208.75.85.237] has quit [Quit: plainhao]
21:08 -!- archevan [~archevan@67.69.227.99] has joined #go-nuts
21:10 -!- Fish [~Fish@9fans.fr] has quit [Quit: So Long, and Thanks for All the
Fish]
21:22 -!- TheMue [~TheMue@p5DDF5008.dip.t-dialin.net] has quit [Quit: TheMue]
21:24 -!- tvw [~tv@e176001246.adsl.alicedsl.de] has joined #go-nuts
21:30 < str1ngs> Mr_Dark: do you have a working mingw ?
21:32 < plexdev> http://is.gd/b9W5O5 by [Ian Lance Taylor] in go/test/ --
test: don't require specific GOARCH values.
21:33 -!- dahankzter [~henrik@92-244-3-192.customers.ownit.se] has quit [Ping
timeout: 240 seconds]
21:36 -!- Natch [~natch@c-6dcde155.25-4-64736c10.cust.bredbandsbolaget.se] has
joined #go-nuts
21:37 -!- Natch| [~natch@c-6dcde155.25-4-64736c10.cust.bredbandsbolaget.se] has
quit [Read error: Operation timed out]
21:39 -!- thiago__ [~thiago@187.59.208.9] has joined #go-nuts
21:39 -!- artefon [~thiago@187.59.208.9] has quit [Ping timeout: 250 seconds]
21:41 -!- zimsim [~simon@87.72.77.195] has quit [Remote host closed the
connection]
21:42 -!- emjayess [~emjayess@pix1.i29.net] has quit [Ping timeout: 250 seconds]
21:43 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit:
Verlassend]
21:43 -!- kevmoo__ [~bojibob@199.27.176.33] has joined #go-nuts
21:45 -!- huin [~huin@91.85.185.181] has quit [Quit: leaving]
21:49 -!- dwilliamii [~w@72.214.103.209] has quit [Ping timeout: 246 seconds]
21:58 -!- vsayer [~vivek@2001:470:1f04:1a6b:21a:6bff:fe35:d2a5] has quit [Ping
timeout: 260 seconds]
21:58 -!- vsayer [~vivek@2001:470:1f04:1a6b:21a:6bff:fe35:d2a5] has joined
#go-nuts
22:01 -!- wrtp [~rog@92.17.50.183] has quit [Quit: wrtp]
22:04 -!- kevmoo__ [~bojibob@199.27.176.33] has quit [Quit: kevmoo__]
22:05 -!- ExtraSpice [XtraSpice@88.118.35.153] has quit [Read error: Connection
reset by peer]
22:06 -!- boscop__ [~boscop@f055027214.adsl.alicedsl.de] has joined #go-nuts
22:06 -!- boscop_ [~boscop@f055027214.adsl.alicedsl.de] has quit [Ping timeout:
246 seconds]
22:12 -!- boscop_ [~boscop@f055027214.adsl.alicedsl.de] has joined #go-nuts
22:13 -!- littlebobby [~bob@unaffiliated/littlebobby] has quit [Quit: Ex-Chat]
22:15 -!- boscop__ [~boscop@f055027214.adsl.alicedsl.de] has quit [Ping timeout:
240 seconds]
22:24 -!- rlab_ [~Miranda@91.200.158.34] has quit [Quit: Miranda IM! Smaller,
Faster, Easier.  http://miranda-im.org]
22:35 < plexdev> http://is.gd/g5mSYd by [Robert Griesemer] in
go/src/pkg/scanner/ -- scanner: treat line comments like in Go
22:35 < plexdev> http://is.gd/YjdPhL by [Robert Griesemer] in 3 subdirs of
go/src/ -- gotype: support for more tests, added one new test
22:37 -!- boscop_ [~boscop@f055027214.adsl.alicedsl.de] has quit [Ping timeout:
246 seconds]
22:38 -!- boscop_ [~boscop@f055027214.adsl.alicedsl.de] has joined #go-nuts
22:48 -!- skelterjohn [~jasmuth@lawn-gw.rutgers.edu] has quit [Quit: skelterjohn]
22:59 -!- boscop_ [~boscop@f055027214.adsl.alicedsl.de] has quit [Ping timeout:
246 seconds]
23:06 -!- Kezz [~kezz@92.29.129.220] has joined #go-nuts
23:08 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
23:12 < Kezz> hi
23:12 < Kezz> hello
23:12 < Kezz> yello
23:12 < Kezz> boo
23:13 < Kezz> ogga booga
23:13 < Kezz> someone speak
23:13 < Kezz> anyone?
23:13 < Kezz> hello?
23:13 < Kezz> bye?
23:13 -!- Kezz [~kezz@92.29.129.220] has left #go-nuts []
23:14 -!- pharris [~Adium@rhgw.opentext.com] has quit [Quit: Leaving.]
23:22 -!- tvw [~tv@e176001246.adsl.alicedsl.de] has quit [Remote host closed the
connection]
23:26 -!- iant [~iant@nat/google/x-nenwqdhlbglqvszr] has quit [Ping timeout: 260
seconds]
23:30 -!- DerHorst [~Horst@e176113232.adsl.alicedsl.de] has joined #go-nuts
23:33 -!- _DerHorst_ [~Horst@e176099094.adsl.alicedsl.de] has joined #go-nuts
23:34 -!- iant [~iant@67.218.107.170] has joined #go-nuts
23:34 -!- mode/#go-nuts [+v iant] by ChanServ
23:35 -!- tvw [~tv@e176001246.adsl.alicedsl.de] has joined #go-nuts
23:36 -!- DerHorst [~Horst@e176113232.adsl.alicedsl.de] has quit [Ping timeout:
240 seconds]
23:37 -!- dfc [~dfc@eth59-167-133-99.static.internode.on.net] has joined #go-nuts
23:37 -!- prudhvi [~prudhvi@look.ma.i.am.on.ipv6.at.prudhvi.de] has quit [Ping
timeout: 248 seconds]
23:37 -!- prudhvi [~prudhvi@look.ma.i.am.on.ipv6.at.prudhvi.de] has joined
#go-nuts
23:41 -!- tvw [~tv@e176001246.adsl.alicedsl.de] has quit [Ping timeout: 246
seconds]
23:41 -!- jgonzalez [~jgonzalez@173-14-137-134-NewEngland.hfc.comcastbusiness.net]
has quit [Ping timeout: 240 seconds]
23:48 -!- pphalen [~pphalen@66.92.11.149] has left #go-nuts []
--- Log closed Thu Mar 31 00:00:50 2011