--- Log opened Tue Oct 05 00:00:09 2010
00:06 -!- acts_as [~acts_as@208.236.105.27] has quit [Quit: acts_as]
00:07 < plexdev> http://is.gd/fL1n4 by [Alex Brainman] in go/src/pkg/ --
websocket: enable tests on windows
00:09 -!- acts_as [~acts_as@208.236.105.27] has joined #go-nuts
00:10 -!- acts_as [~acts_as@208.236.105.27] has quit [Client Quit]
00:16 -!- acts_as [~acts_as@208.236.105.27] has joined #go-nuts
00:53 -!- skelterjohn [~jasmuth@c-76-124-135-199.hsd1.nj.comcast.net] has joined
#go-nuts
00:57 -!- tav [~tav@2001:0:53aa:64c:0:3ffa:a3f8:9f72] has quit [Quit: Hakuna
Matata]
01:03 -!- kanru [~kanru@118-168-236-242.dynamic.hinet.net] has quit [Ping timeout:
252 seconds]
01:10 -!- clip9 [clip9@er.en.svarteper.com] has quit [Ping timeout: 240 seconds]
01:10 -!- clip9 [clip9@er.en.svarteper.com] has joined #go-nuts
01:25 -!- Bombe [~droden@freenet/developer/Bombe] has quit [Excess Flood]
01:26 -!- Bombe [~droden@weltgehirnmaschine.de] has joined #go-nuts
01:27 -!- Tv [~tv@gige.bur.digisynd.com] has quit [Ping timeout: 265 seconds]
01:30 -!- artefon [~thiago@189.59.162.141] has quit [Quit: bye]
01:34 < soul9> hello
01:40 < cbeck> Howdy
01:41 < exch> Swig's go support looks like it was one hell of mindf*ck to
implement
01:46 < soul9> can anyone enlighten me as to the third parameter to os.Open
please?
01:46 < soul9> if i say i want readonly access, i don't get what that int
does at third pos.
01:47 < exch> You can leave it 0
01:47 < cbeck> soul9: Look at http://golang.org/pkg/os/#Constants
01:48 < exch> it defaults to 0666 afaik
01:49 < soul9> I know these
01:49 < soul9> these are the second argument
01:49 < soul9> i don't get the third
01:49 < exch> The third one is the file permission set
01:49 < exch> 0666,0777, etc
01:50 < soul9> but isn't that on the filesystem?
01:50 < soul9> does it change the permissions of the file on the filesystem?
01:50 < exch> not that I know of.  Possibly only required when you actually
create a new file
01:53 < soul9> also, anyone familiar with the json package?  i need to
decode a json file.  i'm trying with NewDecoder and .Decode but it doesn't seem to
be working
01:54 < cbeck> For one-off decodes, json.Unmarshal should do it
01:54 < exch> Isn't json.Unmarshal() a more suitable option?
01:55 < soul9> i don't understand, i thought with the decoder i could get my
file key:value by key:value?
01:55 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has joined #go-nuts
01:57 < soul9> unmarshal needs []byte's while the decoder works on an
io.Reader which an open file can do
01:57 < exch> you can do that with unmarshal() as well
01:57 < soul9> so..that's undocumented?
01:58 < exch> data, err = ioutil.ReadFile("myfile"); ...
json.Unmarshal(data, &mymap)
01:58 < soul9> doesn't that put the whole file in memory?
01:59 < exch> it unmarshals the entire file.  But internally doesn't do
anything different than creating a json encoder manually
01:59 < soul9> oh?  that's cool.
01:59 < soul9> ok lemme see
01:59 < exch> well, except that you do pass the whole file in a slice
01:59 < soul9> ah, so it is in memory.
02:00 < soul9> mh, not really what I'd like
02:00 < exch> ioutil.ReadFile() reads it entirely into data
02:00 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 276 seconds]
02:01 -!- st__ [~chatzilla@chello084112080118.2.11.vie.surfer.at] has joined
#go-nuts
02:01 < soul9> so..anyone know how to use json.Decoder?  :P
02:02 -!- steveno [~stevenoli@paludis/cheerleader/steveno] has joined #go-nuts
02:02 < exch> http://pastebin.com/85QsLKCq
02:03 < exch> 'buf' should be a file handle in your case
02:09 < soul9> thanks
02:10 < soul9> i think i got that interface definition wrong lemme see
02:12 < soul9> yep
02:12 < soul9> thanks
02:12 < soul9> the make(map[string]interface{}) did it
02:12 < soul9> @exch++
02:12 -!- noktoborus [~noktoboru@host-208-107.hosts.vtc.ru] has quit [Ping
timeout: 255 seconds]
02:15 < exch> cool
02:26 -!- jcao219 [~jcao219@pool-173-74-61-111.dllstx.fios.verizon.net] has quit
[Ping timeout: 276 seconds]
02:50 -!- jcao219 [~jcao219@pool-173-74-61-111.dllstx.fios.verizon.net] has joined
#go-nuts
03:00 -!- rejb [~rejb@unaffiliated/rejb] has quit [Ping timeout: 276 seconds]
03:02 -!- jcao219 [~jcao219@pool-173-74-61-111.dllstx.fios.verizon.net] has quit
[Ping timeout: 265 seconds]
03:06 -!- st__ [~chatzilla@chello084112080118.2.11.vie.surfer.at] has quit [Quit:
ChatZilla 0.9.86 [Firefox 3.6.10/20100914125854]]
03:07 -!- res99 [~anonymous@201.237.130.70] has quit [Read error: Connection reset
by peer]
03:07 -!- res99 [~anonymous@201.237.130.70] has joined #go-nuts
03:20 < exch> wahey..  $ swig -go lua.i ...  -> 23kb of Go code, ~80kb of
C glue code O.o
03:28 -!- adu [~ajr@pool-173-79-52-52.washdc.fios.verizon.net] has joined #go-nuts
03:30 -!- skelterjohn [~jasmuth@c-76-124-135-199.hsd1.nj.comcast.net] has quit
[Quit: skelterjohn]
03:33 -!- scyth [~scyth@rots.in.rs] has quit [Quit: Leaving]
03:36 -!- yihuang [~yihuang@183.17.151.190] has joined #go-nuts
03:36 -!- yihuang [~yihuang@183.17.151.190] has left #go-nuts []
03:42 < adg> wow
03:46 < adg> impressive
03:46 < adg> not unpredictable
03:49 -!- Bombe [~droden@weltgehirnmaschine.de] has quit [Changing host]
03:49 -!- Bombe [~droden@freenet/developer/Bombe] has joined #go-nuts
03:56 -!- steveno [~stevenoli@paludis/cheerleader/steveno] has quit [Quit:
steveno]
04:09 -!- dju [dju@fsf/member/dju] has joined #go-nuts
04:13 -!- dju [dju@fsf/member/dju] has quit [Max SendQ exceeded]
04:14 -!- dju [dju@fsf/member/dju] has joined #go-nuts
04:18 -!- wjlroe [~will@78-86-14-131.zone2.bethere.co.uk] has quit [Quit: Computer
has gone to sleep]
04:24 -!- noktoborus [~noktoboru@host-208-107.hosts.vtc.ru] has joined #go-nuts
04:26 -!- msponer [~user@cpe-66-75-33-237.san.res.rr.com] has joined #go-nuts
04:29 -!- Adys [~Adys@unaffiliated/adys] has quit [Quit: I ♥ Unicode]
04:30 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit:
This computer has gone to sleep]
04:31 -!- adu_ [~ajr@pool-173-66-2-136.washdc.fios.verizon.net] has joined
#go-nuts
04:35 -!- adu [~ajr@pool-173-79-52-52.washdc.fios.verizon.net] has quit [Ping
timeout: 245 seconds]
04:37 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts
04:40 -!- wjlroe [~will@78-86-14-131.zone2.bethere.co.uk] has joined #go-nuts
04:43 -!- adu_ [~ajr@pool-173-66-2-136.washdc.fios.verizon.net] has quit [Quit:
adu_]
04:51 -!- Eridius [~kevin@unaffiliated/eridius] has quit [Ping timeout: 240
seconds]
04:55 -!- iant [~iant@216.239.45.130] has quit [Ping timeout: 245 seconds]
04:55 -!- jhh [~jhh@e179099248.adsl.alicedsl.de] has joined #go-nuts
04:59 -!- etherealmachine [~jpettit@c-98-210-242-112.hsd1.ca.comcast.net] has
joined #go-nuts
05:00 < etherealmachine> I'm getting errors compiling gccgo on linux 64, is
there a specific version that's marked stable/release?
05:01 -!- scm [scm@d071195.adsl.hansenet.de] has quit [Ping timeout: 276 seconds]
05:01 < anticw> etherealmachine: dont think so
05:01 < anticw> etherealmachine: can you show the errors
05:02 < etherealmachine> go-go.c:352:1: error: bp cannot be used in asm here
05:02 < anticw> oh
05:02 -!- scm [scm@d070166.adsl.hansenet.de] has joined #go-nuts
05:02 < anticw> hmm, from svn just now?
05:02 < anticw> let me update
05:02 < etherealmachine> I'm on 164966
05:02 < anticw> give me a cuple of mins, won't take long to do a complete
bulid
05:02 -!- Adys [~Adys@unaffiliated/adys] has quit [Quit: I ♥ Unicode]
05:02 < anticw> build even
05:03 < etherealmachine> it took me 64 minutes to get to the error
05:03 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts
05:03 < anticw> 64 mins?
05:03 < etherealmachine> compile time
05:03 < anticw> i think cold-cache it's only 3 mins here
05:03 < anticw> let me check
05:04 < etherealmachine> I'm on a laptop, but that's still a pretty large
difference
05:04 < anticw> well ...  my desktop is faster than my laptop too
05:04 < anticw> to i wouldn't expect a latop to be that close to that
05:07 < anticw> etherealmachine: what's your configure line?
05:07 < etherealmachine> oh, I had to use CFLAGS=-m64
05:08 < etherealmachine> and --disable-multi-lib
05:08 < etherealmachine> also using the gold ld
05:08 < anticw> CFLAGS=-m64 ?
05:08 < anticw> what distro?
05:08 -!- ikaros [~ikaros@188.107.214.200] has joined #go-nuts
05:08 < etherealmachine> ubuntu 64 bit, 10.04
05:10 < anticw> etherealmachine: on a similar distro (debian squeeze) i just
built it w/o errors
05:10 < anticw> Revision: 164966
05:10 < anticw> no gold htough
05:10 < anticw> though
05:10 -!- ikaros [~ikaros@188.107.214.200] has quit [Client Quit]
05:11 < etherealmachine> I has an error with stubs-32.h that was resolved
with disabling multilib and setting cflags
05:11 < etherealmachine> I can try without gold
05:11 < anticw> i disable multilib too
05:11 < etherealmachine> will that take a distclean to make things right?
05:12 < anticw> im not sure
05:12 < anticw> what is the build system?
05:12 < anticw> cpu/ram ?
05:12 < etherealmachine> no, I didn't set up anything special
05:13 < anticw> i know
05:13 < anticw> im trying to help make 64 mins less
05:13 < etherealmachine> you just mean specs?
05:13 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has joined #go-nuts
05:13 -!- mode/#go-nuts [+v iant] by ChanServ
05:13 < anticw> roughly
05:13 < anticw> iant: is htat you?
05:13 <+iant> it's me
05:13 < anticw> 22:05 < etherealmachine> go-go.c:352:1: error: bp
cannot be used in asm here
05:13 < etherealmachine> 4x2.7ghz core i7, 4 gigs ram
05:13 -!- ikaros [~ikaros@studpool-vpn115.fbi.h-da.de] has joined #go-nuts
05:13 < etherealmachine> non-solid state hd
05:14 < anticw> etherealmachine: make -j5 should help if you're not
05:14 * exch wrestles with swig
05:14 < etherealmachine> will that make it use all the cores?
05:14 < anticw> yes
05:14 < etherealmachine> why isn't that a default!?
05:14 < anticw> doesn't always works
05:14 < anticw> on avg i would say it breaks more than not
05:14 <+iant> etherealmachine: what machine type?  how did you run
configure?
05:14 < etherealmachine> I was wondering why it was only using 1 cpu
05:14 < anticw> makefiles are hard to make robust
05:15 < etherealmachine> @iant disable-multilib and CFLAGS=-m64, also using
gold
05:15 < etherealmachine> @iant trying to recompile not using gold now
05:15 <+iant> that won't make a difference for that error
05:15 < etherealmachine> it was suggested
05:15 < etherealmachine> any ideas?
05:16 <+iant> it's certainly odd
05:16 < anticw> i dont see from the src that error making sense
05:16 <+iant> I think it must have to do with the CFLAGS setting although I
would not expect that to matter
05:17 <+iant> ah, I bet that setting CFLAGS that way is causing the library
to be compiled without optimization
05:17 < anticw> etherealmachine: ill set CFLAGS here the same way and retest
...  what gcc/gas do you have?
05:17 <+iant> that could cause that error
05:18 < etherealmachine> I also tried explicitly #defining the line in case
the ifdef wasn't getting through, and it didn't work
05:18 < etherealmachine> 4.4.3
05:18 < anticw> iant: oh, you rely on -O2 or better?
05:18 <+iant> I guess I do, although I didn't exactly realize it
05:18 < anticw> gah ...  i hate that :-)
05:18 <+iant> at least for compiling that specific file
05:18 <+iant> you could just remove "rbp" from the x86_64 SAVE_REGS line
05:18 < anticw> because sometimes i want -O0 to make gdb work
05:19 <+iant> you don't have to use -O2 in general with gccgo
05:19 <+iant> I'm thinking that go-go.c expects it, though
05:19 < anticw> iant: i know when using gccgo you dont need it ...  i use
gccgo + gdb to debug things because 6g/6c lack the tools
05:19 <+iant> the problem is that I have to force the function to save all
the registers
05:20 <+iant> so I say that the function uses the rbp register
05:20 <+iant> but when not optimizing gcc wants to use that register as the
frame pointer
05:20 <+iant> and so you get that error
05:20 <+iant> at least that is my hypothesis at the moment
05:21 < anticw> giving CFLAGS seems to make things much slower
05:21 < anticw> to build
05:22 <+iant> well, in conjunction with --disable-bootstrap it will mean
that gcc itself is built without optimization
05:22 <+iant> and so it will run much slower when building the libraries
05:22 < anticw> configure --enable-languages=go --disable-bootstrap
--disable-multilib --prefix=/usr/local/gccgo CLFAGS=-m64
05:22 < anticw> built here
05:22 <+iant> hmm
05:23 < etherealmachine> what does disable-bootstrap (not) do?
05:23 < anticw> debian though ...  not ubuntu
05:23 <+iant> etherealmachine: it avoids bootstrapping gcc itself
05:23 <+iant> by default gcc is built using a three stage bootstrap
05:24 < anticw> iant: is the bootstrap really needed these days?
05:24 < anticw> iant: it used to be because other compilers had bugs i
thought
05:24 < etherealmachine> I'm sorry to pester, but I'm recompiling and don't
have anything else to do, I have gcc installed...  what's it bootstrapping?
05:24 < anticw> or is it just build-self sanity checking ?
05:24 <+iant> even gcc itself has bugs....
05:24 < anticw> most sw has bugs :-) it's how many can you deal with
05:25 <+iant> etherealmachine: bootstrapping means that gcc is used to build
itself
05:25 <+iant> stage 1: build gcc with host compiler, whatever it is
(typically an older version of gcc)
05:25 -!- wjlroe [~will@78-86-14-131.zone2.bethere.co.uk] has quit [Quit: Computer
has gone to sleep]
05:25 <+iant> stage 2: build gcc again with the newly built gcc
05:25 <+iant> stage 3: build gcc again with the gcc built in stage 2
05:25 <+iant> then compare the results of stage 2 and 3, they had better be
identical
05:25 < etherealmachine> I guess that makes sense
05:25 <+iant> if you disable bootstrap, then you just get stage 1, gcc built
by the host compiler
05:26 < etherealmachine> yeah, that would be what I expected it to do
05:26 < anticw> sigh ...  the varadic changes makes all my code printfs
broken now
05:27 < anticw> well, some ...  not all
05:27 -!- babusri [~Babu@122.166.173.101] has quit [Ping timeout: 240 seconds]
05:28 < anticw> iant: ah..  you didn't implemment "foo..." yet
05:28 <+iant> no, sorry
05:28 < anticw> no it's good
05:28 < anticw> i can use gccgo to avoid updating my code tonight
05:28 < anticw> :)
05:30 < etherealmachine> I need to step out for 40 minutes, thanks for the
help so far
05:34 < anticw> iant: the speed of reflection in gccgo really impresses me
05:34 <+iant> reflection looks hard but it's really simple
05:34 <+iant> it's all done with mirrors
05:35 <+iant> the data structures are built at compile time
05:35 < anticw> long story short, i have this weird ass xml crap i had to
deal with ...  and xml.Unmarshal happens to be easy to use to i didn't even bother
with python
05:35 < anticw> (in this case the src is small in Go that python) ...
anyhow ...  runtime is very fast
05:36 -!- tav [~tav@92.7.68.158] has joined #go-nuts
05:36 -!- tav [~tav@92.7.68.158] has quit [Excess Flood]
05:39 -!- ikaros [~ikaros@studpool-vpn115.fbi.h-da.de] has quit [Quit: Leave the
magic to Houdini]
05:39 -!- ikaros [~ikaros@188.107.214.200] has joined #go-nuts
05:39 -!- tav [~tav@92.7.68.158] has joined #go-nuts
05:40 < exch> aww.  one of the swig generated c files seems to have some
issues which prevent it from being compiled.  I'm not sure if this is a problem in
the Lua code or a swig/go issue though.  Where should I go to discuss the Go part
of Swig?  (as in, who maintains it?)
05:40 <+iant> I guess I maintain the Go port of SWIG
05:40 <+iant> not sure what Lua has to do with it, though
05:42 < exch> ok.  I've ran some Lua headers through swig to see what kind
of Go code it generates.  The compiler (gcc) consistently failes on 'arg3 =
(va_list)*argp3;' in lua_wrap.c with the error 'error: cast specifies array type'
05:42 -!- zozoR [~zozoR@4705ds1-ris.0.fullrate.dk] has joined #go-nuts
05:43 <+iant> does SWIG work with stdarg functions?
05:43 < exch> I have no idea
05:44 <+iant> Read this: http://swig.org/Doc2.0/Varargs.html#Varargs
05:44 * exch reads
05:45 < anticw> iant: should -static work?
05:45 <+iant> anticw: yes but you probably need to add an explicit -lpthread
05:45 < anticw> yeah, i did
05:45 < anticw> i was sure that worked
05:46 < anticw> because in the past i used -static bins to make deployments
easier
05:46 <+iant> I'm off
05:46 < anticw> nn, thanks!
05:53 -!- slashus2 [~slashus2@74-141-107-118.dhcp.insightbb.com] has joined
#go-nuts
05:59 -!- ikaros [~ikaros@188.107.214.200] has quit [Quit: Leave the magic to
Houdini]
05:59 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
06:10 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts
06:33 -!- msponer [~user@cpe-66-75-33-237.san.res.rr.com] has quit [Ping timeout:
265 seconds]
06:34 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has joined #go-nuts
06:39 -!- gnuvince [~vince@205.175-ppp.3menatwork.com] has quit [Ping timeout: 272
seconds]
06:43 -!- jhh [~jhh@e179099248.adsl.alicedsl.de] has quit [Quit: jhh]
06:45 -!- Tv [~tv@cpe-76-168-227-45.socal.res.rr.com] has joined #go-nuts
07:10 -!- Stiletto [7f000001@dr.kleiner.lambdacomplex.org] has quit [Ping timeout:
252 seconds]
07:10 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Ping timeout: 276
seconds]
07:21 -!- zozoR [~zozoR@4705ds1-ris.0.fullrate.dk] has quit [Quit: Morten.  Desu~]
07:26 -!- slashus2 [~slashus2@74-141-107-118.dhcp.insightbb.com] has quit [Quit:
slashus2]
07:36 -!- Fish9 [~Fish@86.65.182.207] has quit [Remote host closed the connection]
07:36 -!- Fish [~Fish@86.65.182.207] has joined #go-nuts
07:38 -!- MaksimBurnin [~max@44.188-224-87.telenet.ru] has quit [Ping timeout: 252
seconds]
07:38 -!- MaksimBurnin [~max@44.188-224-87.telenet.ru] has joined #go-nuts
07:40 -!- photron [~photron@port-92-201-91-38.dynamic.qsc.de] has joined #go-nuts
07:42 -!- etherealmachine [~jpettit@c-98-210-242-112.hsd1.ca.comcast.net] has left
#go-nuts []
08:00 -!- tvw [~tv@212.79.9.150] has joined #go-nuts
08:07 -!- sahid [~sahid@LNeuilly-152-21-22-10.w193-253.abo.wanadoo.fr] has quit
[Quit: Ex-Chat]
08:11 < nsf> http://ompldr.org/vNXE5Nw/ancient-errors.png
08:11 < nsf> ыы
08:12 < nsf> замутил четкие error messages для своего toy языка
08:13 < nsf> щас бы такие же еще сделать и для семантического анализа
08:13 < nsf> вообще было бы замечательно :)
08:13 < nsf> но это AST слегка переделать нада
08:14 -!- wrtp [~rog@92.17.67.123] has joined #go-nuts
08:14 < nsf> oops
08:14 < nsf> wrong window :(
08:14 < nsf> sorry
08:14 < Tonnerre> Представляется вполне нормальным для меня, что «if»
является ключевым словом
08:16 < nsf> Tonnerre: true, but it just shows nice error messages for the
parser
08:16 < nsf> sort of clang style
08:16 < nsf> or i guess they were somewhere even before clang
08:17 < Tonnerre> Indeed they were
08:20 -!- jmettraux [~jmettraux@211.19.55.177] has quit [Remote host closed the
connection]
08:22 -!- ronnyy [~quassel@p4FF1CEAE.dip.t-dialin.net] has joined #go-nuts
08:23 -!- derferman_ [~derferman@c-98-207-60-44.hsd1.ca.comcast.net] has joined
#go-nuts
08:24 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-177-190.clienti.tiscali.it] has
joined #go-nuts
08:24 -!- lmoura_ [~lauromour@186.212.114.106] has joined #go-nuts
08:26 < nsf> i guess clang is the first compiler that did it nicely for a
language with a preprocessor
08:26 < nsf> or not
08:27 < nsf> i don't know :)
08:27 -!- res99 [~anonymous@201.237.130.70] has quit [Read error: Connection reset
by peer]
08:27 -!- lmoura__ [~lauromour@187.59.117.90] has quit [Ping timeout: 245 seconds]
08:29 -!- derferman_ [~derferman@c-98-207-60-44.hsd1.ca.comcast.net] has quit
[Quit: derferman_]
08:32 -!- tasosos [~tasosos@79.103.7.89.dsl.dyn.forthnet.gr] has joined #go-nuts
08:48 -!- wjlroe [~will@78-86-14-131.zone2.bethere.co.uk] has joined #go-nuts
09:00 -!- BlaSux [7f000001@dr.kleiner.lambdacomplex.org] has joined #go-nuts
09:03 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Read error: Connection
reset by peer]
09:12 -!- plexdev [~plexdev@arthur.espians.com] has quit [Remote host closed the
connection]
09:14 -!- plexdev [~plexdev@arthur.espians.com] has joined #go-nuts
09:18 -!- wjlroe [~will@78-86-14-131.zone2.bethere.co.uk] has quit [Quit: Computer
has gone to sleep]
09:32 < wrtp> i'm sure i'm being very stupid, but what does the Go
Playground chrome extension actually do?
09:39 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts
09:43 < nsf> it's just a shortcut to the go playground thing
09:44 < nsf> useless imho, but it's just my opinion
09:44 < nsf> :)
09:50 -!- stalled [~stalled@unaffiliated/stalled] has quit [Quit: ...]
09:52 -!- sacho [~sacho@95-42-78-66.btc-net.bg] has quit [Ping timeout: 264
seconds]
09:58 -!- felicity [~felicity@41.205.146.22] has joined #go-nuts
10:00 -!- felicity [~felicity@41.205.146.22] has quit [Remote host closed the
connection]
10:02 -!- felicity [~felicity@41.205.146.22] has joined #go-nuts
10:03 < felicity> I wrote a pkg and i cald it get,it has a file called
getch.go and get_test.go.  I typed make and the _obj folder was made.i even tested
it and it Passed.the getch.go has a function called Getchar.when i try to import
the package,im getting an error: can't find import: get
10:03 -!- stalled [~stalled@unaffiliated/stalled] has joined #go-nuts
10:03 < felicity> What am i doing wrong?
10:05 -!- felicity [~felicity@41.205.146.22] has quit [Remote host closed the
connection]
10:05 < exch> felicity: you need to 'install' the package to the Go package
repository with 'make install'
10:08 < exch> or not
10:11 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has quit [Ping timeout: 240
seconds]
10:15 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has joined #go-nuts
10:30 -!- wjlroe [~will@212.169.34.114] has joined #go-nuts
10:35 < adg> wrtp: it saves you opening a new tab
10:36 < adg> kinda handy, but has the annoying property that the content
vanishes if you switch to another tab
10:38 -!- ronnyy [~quassel@p4FF1CEAE.dip.t-dialin.net] has quit [Remote host
closed the connection]
10:41 -!- ronnyy [~quassel@p4FF1CEAE.dip.t-dialin.net] has joined #go-nuts
10:48 -!- scyth [~scyth@rots.in.rs] has joined #go-nuts
10:59 -!- peterdn [~peterdn@dhcp-110-228.new.ox.ac.uk] has quit [Quit: ChatZilla
0.9.86-rdmsoft [XULRunner 1.9.2/20100222071121]]
11:10 -!- peterdn [~peterdn@dhcp-110-228.new.ox.ac.uk] has joined #go-nuts
11:10 -!- tvw [~tv@212.79.9.150] has quit [Remote host closed the connection]
11:29 -!- ronnyy [~quassel@p4FF1CEAE.dip.t-dialin.net] has quit [Remote host
closed the connection]
11:32 < uriel> nsf: ok, i'm not the only one baffled at what was the point
for the chrome extenssion, good to know
11:34 < uriel> adg: btw, the roadmap is well overdue for an update, about
half of the items in implementation section are done
11:34 < uriel> http://go.googlecode.com/hg/doc/devel/roadmap.html
11:35 < uriel> (NaCL, cgo callbacks, and now SWIG)
11:35 < uriel> the garbage collector is also now enabled in gccgo (AFIK)
11:35 < adg> uriel: yeah we intend to update it
11:35 < adg> i will create a CL now
11:36 < uriel> I was thinking of doing it myself, but then I thought you
would know better what to do and would be less hassle :)
11:37 < uriel> adg: also, this is just my opinion, but I think it would be
nice to have some clarity regarding the intended path towards a "1.0" release
11:37 < adg> there is no clarity to provide
11:37 < uriel> hehehe
11:38 < uriel> well, then I would suggest creating a bit of clarity would
help, but that is just me :)
11:38 < nsf> i'm very interested in a status of a GC design process
11:39 < nsf> or these are just words..  like "we're in the design stage"
means "we haven't thought about it yet"
11:39 < adg> the team is working hard and getting stuff done, but as to when
we reach a certain point where we can say "1.0" seems a bit arbitrary to me.  i'd
just be making stuff up
11:39 < uriel> nsf: from what I have heard, they have thought about it quite
a lot
11:39 < nsf> uriel: good to know :)
11:40 < uriel> nsf: but also from what I have heard, they have not settled
yet on any design they are quite happy with
11:40 < nsf> it is expected
11:40 < uriel> adg: well, I would think that things like AppEngine support
would not be a 1.0 show-stopper, on the other hand, major language changes would
be
11:41 < adg> sure
11:41 < adg> but some languages changes come out of nowhere, while others we
can see from a distance (like generics)
11:41 < uriel> true...
11:41 < adg> so it's hard to quantify what is actually ahead
11:42 < uriel> I understand
11:44 -!- skejoe [~skejoe@188.114.142.231] has joined #go-nuts
11:45 < uriel> it is probably obvious, but I just wanted to note that the
uncertainty can put people off from building around the ecosystem, either projects
that depend on Go, or development tools for go, but I understand it is still very
early on in the life of the language
11:45 < uriel> on the other hand, I seem to remember somebody from Google
saying they were hoping to have the language itself pretty much settled down
before the end of the year..
11:45 < uriel> but this was a while ago
11:46 < nsf> hehe, I have an idea for call expr syntax sugar, what do you
think: withFile("data.txt", func(f *File) { ...  }); --> withFile("data.txt") {
|f| ...  };
11:46 < adg> sure
11:46 < nsf> comes from ruby
11:46 < adg> make no mistake: go is great for production work now, it just
depends what you're doing
11:46 < nsf> :\
11:46 < adg> we use it at google; it's increasingly widespread
11:46 < uriel> adg: yea, I know, I'm using it ;P
11:47 < adg> nsf: i don't understand it
11:47 < nsf> it's like ruby's blocks
11:47 < uriel> but still, when one makes strategic decissions, some more
clarity regarding its medium term would be nice, but anyway, you know what I mean,
and I understand that there are good reasons that make this hard :)
11:48 < nbjoerg> slow and eats memory like other eats cerials?
11:48 < nbjoerg> oh wait, that's rails
11:48 < uriel> nsf: is that idiom really used often enough to make the extra
sugar worth it?
11:48 < nsf> if function has 'func' type as a last argument you can call it
using that block form
11:48 < nsf> uriel: it can be :)
11:49 < uriel> nsf: also, where will the type of f be taken from?
11:49 < nsf> it is derived from the function signature
11:49 < nsf> that's the main point
11:49 < uriel> from the signature of withFile()?
11:49 < nsf> wait a sec I'll give you an example of a code I have
11:49 < nsf> uriel: yes
11:49 * uriel ponders
11:50 < uriel> oh, I think I get it
11:50 < uriel> I can kind of see how it might be useful...
11:50 < nsf> foreachDecl(decls, func(decl ast.Decl, name *ast.Ident, value
ast.Expr, valueindex int) { ...  }
11:50 < uriel> but doesn't feel quite right, certainly doesn't seem to fit
the style of the rest of the language
11:50 < nsf> here it is
11:50 < nsf> it can be written as:
11:50 < nsf> foreachDecl(decls) { |decl, name, value, valueindex| ...  }
11:51 < nsf> with my syntax sugar impl
11:51 -!- wrtp [~rog@92.17.67.123] has quit [Ping timeout: 276 seconds]
11:51 < nsf> well it looks like a function definition
11:51 < nsf> but 'func' keyword is missing
11:51 < nsf> so it's call expr
11:52 < nsf> yep, the style can be an issue
11:52 < nsf> anyway, just an idea :)
11:52 < nsf> oops
11:52 < nsf> the first one should be:
11:52 < nsf> foreachDecl(decls) { |decl, name, value, valueindex| ...  });
11:52 < nsf> oops :)
11:52 < nsf> not this
11:52 < nsf> foreachDecl(decls, func(decl ast.Decl, name *ast.Ident, value
ast.Expr, valueindex int) { ...  });
11:52 < nsf> :)
11:54 < nsf> actually maybe I will implement that in my toy language
11:54 < nsf> but it doesn't even have a type system yet
11:55 < nsf> and it's far from having closures :)
11:55 -!- artefon [~thiago@189.59.187.66] has joined #go-nuts
11:56 -!- wrtp [~rog@92.17.67.123] has joined #go-nuts
12:17 -!- fenicks [~christian@log77-3-82-243-254-112.fbx.proxad.net] has joined
#go-nuts
12:18 < fenicks> hello
12:22 -!- ronnyy [~quassel@p4FF1CEAE.dip.t-dialin.net] has joined #go-nuts
12:24 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has quit [Quit: Leaving.]
12:25 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has joined #go-nuts
12:25 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has quit [Client Quit]
12:25 -!- skelterjohn [~jasmuth@c-76-124-135-199.hsd1.nj.comcast.net] has joined
#go-nuts
12:27 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has joined #go-nuts
12:29 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has quit [Client Quit]
12:34 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has joined #go-nuts
12:43 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has quit [Quit: Leaving.]
12:46 -!- bfrank [~brad@cpe-098-026-123-011.nc.res.rr.com] has quit [Read error:
Operation timed out]
12:46 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has joined #go-nuts
12:46 < Gertm> Has anyone got experience with emacs+golang+flymake?  I
googled this, but the only article on it gives me a service temporary unavailable.
12:47 < taruti> Gertm: yes
12:47 < Gertm> oh hey, that's your page I found :)
12:48 < taruti> http://aoi.yi.org/~taruti/go-fly.txt
12:48 < Gertm> thanks!
12:50 < Gertm> strange formatting..  so I just put that in my emacs config?
Do I need to add a hook for it to start up with go-mode?
12:50 -!- zozoR [~zozoR@4705ds1-ris.0.fullrate.dk] has joined #go-nuts
12:51 < soul9> anyone know why a dial to an ipv6 adress wouldn't work?
12:51 < soul9> seems like a DNS error:
12:51 < soul9> dial tcp ipv6.chat.freenode.net:6667: lookup
ipv6.chat.freenode.net.  on [8.8.8.8]:53: no such host
12:52 < soul9> all i have is net.Dial("tcp", "", server)
12:52 -!- skelterjohn [~jasmuth@c-76-124-135-199.hsd1.nj.comcast.net] has quit
[Quit: skelterjohn]
12:52 < bortzmeyer> soul9: strange.  Google DNS does have a AAAA for
ipv6.chat.freenode.net
12:52 < soul9> yeah
12:52 < soul9> it doesn't work with my ipv6 dns server either
12:53 < soul9> it also looks like it's trying to use the google dns as an
ipv6 address?
12:53 < soul9> ( [8.8.8.8]:53 )?
12:54 < taruti> Gertm: that code goes into .emacs
12:57 < Gertm> taruti: there's no other initialisation necessary?  Because I
didn't get it to work yet, maybe I forgot something.
12:58 -!- nbjoerg [~joerg@netbsd/developer/joerg] has quit [Ping timeout: 240
seconds]
13:00 < taruti> Gertm: you have to enable flymake-mode in the go-buffers you
want it
13:01 < taruti> either M-x flymake-mode in the buffer, or in .emacs
(add-hook 'go-mode-hook (lambda () (flymake-mode)))
13:02 < Gertm> taruti: thank you, lemme try that
13:06 -!- nbjoerg [~joerg@netbsd/developer/joerg] has joined #go-nuts
13:09 < Gertm> taruti: thanks, it works!
13:17 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
13:26 -!- skelterjohn [~jasmuth@c-76-124-135-199.hsd1.nj.comcast.net] has joined
#go-nuts
13:27 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has quit [Quit:
Leaving.]
13:39 -!- DerHorst [~Horst@e176104252.adsl.alicedsl.de] has joined #go-nuts
13:39 -!- res99 [~anonymous@201.237.130.70] has joined #go-nuts
13:39 -!- iant [~iant@67.218.106.122] has joined #go-nuts
13:40 -!- mode/#go-nuts [+v iant] by ChanServ
13:46 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined
#go-nuts
13:47 -!- skelterjohn [~jasmuth@c-76-124-135-199.hsd1.nj.comcast.net] has quit
[Quit: skelterjohn]
13:51 -!- plainhao [~plainhao@mail.xbiotica.com] has joined #go-nuts
13:51 -!- ucasano [~ucasano@95.231.79.71] has joined #go-nuts
13:52 -!- fenicks [~christian@log77-3-82-243-254-112.fbx.proxad.net] has quit
[Quit: Leaving.]
13:54 < wrtp> adg: ahh, i see.  i hadn't spotted the go symbol to the right
of the URL entry box.
13:54 < wrtp> time to uninstall it!
13:56 -!- skejoe [~skejoe@188.114.142.231] has quit [Quit: leaving]
13:59 -!- serverhorror [~serverhor@chello080109038110.17.14.vie.surfer.at] has
joined #go-nuts
14:00 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit:
This computer has gone to sleep]
14:03 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
14:03 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts
14:09 < nsf> unordered_map<string, llvm::Value*>::iterator it =
values.find(name);
14:10 < nsf> god..  what am I doing :(
14:11 < nsf> after Go it seems very wrong for some reason
14:13 -!- _Horst_ [~Horst@e176125236.adsl.alicedsl.de] has joined #go-nuts
14:16 -!- DerHorst [~Horst@e176104252.adsl.alicedsl.de] has quit [Ping timeout:
245 seconds]
14:18 < nsf> LLVM's C API is simpler than C++ one
14:18 < nsf> :\
14:19 -!- _Horst_ [~Horst@e176125236.adsl.alicedsl.de] has quit [Ping timeout: 252
seconds]
14:21 < taruti> nsf: in new C++ it becomes "auto it = values.find(name)",
although that might spew a dozen pages of errors if the templates and the moon do
not align :)
14:22 < nsf> taruti: yep, I've already turned on -std=c++0x but it doesn't
really help a lot
14:22 < nsf> llvm's c++ api is still awful :)
14:23 < nsf> something like: llvm::ConstantFP::get(llvm::getGlobalContext(),
llvm::APFloat(num))
14:23 < nsf> ugh..
14:23 -!- skelterjohn [~jasmuth@lawn-net168-in.rutgers.edu] has joined #go-nuts
14:23 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
14:23 < nsf> in C: LLVMConstReal(LLVMDoubleType(), num)
14:23 < nsf> :P
14:24 < nsf> of course C++ API is more featureful, because it uses context
and it can work with different contexts in multithreaded environment
14:24 < nsf> but imho the design of an API is awful
14:25 * nsf is looking at libjit
14:26 < nsf> looks like libjit can write elf binaries
14:26 < nsf> ugh..
14:27 < nsf> tough choice
14:27 -!- ronnyy [~quassel@p4FF1CEAE.dip.t-dialin.net] has quit [Remote host
closed the connection]
14:29 -!- ikaros [~ikaros@188.107.214.200] has joined #go-nuts
14:30 -!- serverhorror [~serverhor@chello080109038110.17.14.vie.surfer.at] has
quit [Quit: Connection reset by beer!]
14:40 < soul9> anyone know how i can typeswith on an interface{} that's
supposed to be an array?
14:44 < soul9> printing it with fmt.Printf("%V" gives me an error:
[%!V(string=mystring1) %!V(string=mystring2)]
14:54 < Gertm> does anyone have an example of how to use unidirectional
channels?
15:01 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has quit [Ping timeout: 245
seconds]
15:05 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 240 seconds]
15:06 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
15:08 -!- gzmask [~ray@corwin.cat.uregina.ca] has left #go-nuts []
15:09 -!- slashus2 [~slashus2@74-141-107-118.dhcp.insightbb.com] has joined
#go-nuts
15:11 -!- Fish [~Fish@86.65.182.207] has quit [Remote host closed the connection]
15:16 -!- Venom_X [~pjacobs@74.61.90.217] has joined #go-nuts
15:17 -!- iant [~iant@67.218.106.122] has quit [Ping timeout: 264 seconds]
15:21 -!- Venom_X [~pjacobs@74.61.90.217] has quit [Ping timeout: 272 seconds]
15:23 -!- skelterjohn [~jasmuth@lawn-net168-in.rutgers.edu] has quit [Read error:
No route to host]
15:24 -!- artefon [~thiago@189.59.187.66] has quit [Quit: bye]
15:24 -!- skelterjohn [~jasmuth@lawn-net168-in.rutgers.edu] has joined #go-nuts
15:25 -!- fabled [~fabled@xdsl-83-150-94-237.nebulazone.fi] has quit [Ping
timeout: 240 seconds]
15:25 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has quit [Quit: Leaving.]
15:26 -!- Venom_X [~pjacobs@66.54.185.131] has joined #go-nuts
15:38 < nickaugust> soul9: switch t:= interfaceValue.(type) { case bool: ...
case int: ...  }
15:38 < nickaugust> soul9: switch t := interfaceValue.(type) { case bool:
...  case int: ...  }
15:39 < nickaugust> hmmm....
15:39 < soul9> nickaugust: nope
15:39 -!- fabled [~fabled@xdsl-83-150-94-238.nebulazone.fi] has joined #go-nuts
15:39 < soul9> doesn't do it :(
15:39 < soul9> i do: if v, ok := val.(*reflect.ArrayValue); ok == true { ...
15:40 < soul9> but the block isn't exec'd
15:40 < soul9> (SliceValue does the same)
15:40 < soul9> it's a json decoded array
15:40 < nickaugust> what are you passing?
15:41 < soul9> i.e.  val in json is ["mystring1", "mystring2"]
15:41 < nickaugust> is it a return value from json.Unmarshal?  might be a
struct
15:41 < soul9> and i did a Decode on it, so it should be interface{}
15:41 < soul9> i don't think it's unmarshalled
15:42 < nickaugust> ah, why not use Unmarshal?
15:42 < soul9> ah, maube i could avoid all this pain, might be doing what
unmarshal is doing :)
15:42 < soul9> ehe, why indeed
15:43 < nickaugust> i've never used json.Decode directly..  i always
Unmarshal into a known struct type.  do you have a corrisponding struct type?
15:43 < nickaugust> :)
15:44 < soul9> hehe
15:44 < soul9> i think those two sentences just made my job easier ;)
15:44 < soul9> by 10-100x
15:44 -!- skelterjohn [~jasmuth@lawn-net168-in.rutgers.edu] has quit [Quit:
skelterjohn]
15:45 < soul9> so in a struct declare the structure i'm expecting and then
unmarshall into that
15:45 < soul9> okey doc'
15:47 < exch> Does anyone know what's going on when a cgo package keeps
throwing up "nesting too deep" errors followed by a lenghty list of all the
generated cgo files?
15:48 < exch> For the record, this happens when linking it into a app which
uses the package
15:49 -!- skelterjohn [~jasmuth@lawn-net168-in.rutgers.edu] has joined #go-nuts
15:50 -!- fenicks [~christian@log77-3-82-243-254-112.fbx.proxad.net] has joined
#go-nuts
15:55 -!- SRabbelier [~SRabbelie@ip138-114-211-87.adsl2.static.versatel.nl] has
quit [Ping timeout: 245 seconds]
15:55 -!- artefon [~thiagon@150.164.2.20] has joined #go-nuts
15:58 < soul9> nickaugust: Decode unmarshals the stream, so i have an
unmarshalled struct
15:58 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3]
15:58 -!- kanru [~kanru@118-168-236-242.dynamic.hinet.net] has joined #go-nuts
15:58 < soul9> but it's all interface{} types, so i need to typeswitch on it
15:59 < soul9> (http://golang.org/src/pkg/json/stream.go#L32)
16:07 -!- ucasano [~ucasano@95.231.79.71] has quit [Read error: Connection reset
by peer]
16:07 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 240 seconds]
16:08 -!- ucasano [~ucasano@95.231.79.71] has joined #go-nuts
16:09 -!- tasosos [~tasosos@79.103.7.89.dsl.dyn.forthnet.gr] has quit [Remote host
closed the connection]
16:11 < nickaugust> soul9: do a type assertion myStructValue.(MyStruct) or
assert it to reflect.StructValue if you dont know the type
16:13 < nickaugust> or you can do a typeswitch on it if you want.  switch t
:= value.(type) { case MyStruct1: ..  case MyStruct2:..  }
16:15 < nickaugust> but value.(type) can only be used in a type switch not
elsewhere afaik
16:15 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
16:16 -!- cenuij [~cenuij@base/student/cenuij] has quit [Remote host closed the
connection]
16:16 < soul9> man i feel dumb.
16:16 -!- iant [~iant@nat/google/x-dgklwyjtxqpvyvmm] has joined #go-nuts
16:16 -!- mode/#go-nuts [+v iant] by ChanServ
16:16 < soul9> if v, ok := val.(*reflect.StructValue); ok == true {
16:16 < soul9> still not good
16:17 < soul9> ? paste
16:17 < soul9> ..
16:18 -!- awidegreen [~quassel@62.176.237.78] has joined #go-nuts
16:18 < soul9> code: http://dpaste.com/253452/ ; json file:
http://dpaste.com/253453/ ; output: http://dpaste.com/253454/
16:19 < soul9> i know the typeswitch shouldn't be there, since everything is
an interface{}, i'll remove it as soon as i understand this thing.
16:19 < soul9> oops, forgot to change the chans in the output ;)
16:19 < nickaugust> heheh idk man should work..  can you paste more of the
code?
16:20 < soul9> this is all
16:20 < nickaugust> ah :)
16:20 -!- hokapoka [~hokapoka@hoka.hokapoka.com] has joined #go-nuts
16:20 -!- jhh [~jhh@e179099248.adsl.alicedsl.de] has joined #go-nuts
16:21 < hokapoka> Hey all, at last managed to get back to some of my go dev.
16:25 -!- Fish [~Fish@9fans.fr] has joined #go-nuts
16:28 -!- kanru [~kanru@118-168-236-242.dynamic.hinet.net] has quit [Read error:
Operation timed out]
16:29 -!- ucasano [~ucasano@95.231.79.71] has quit [Quit: ucasano]
16:30 -!- jhh [~jhh@e179099248.adsl.alicedsl.de] has quit [Quit: jhh]
16:36 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
16:36 -!- dahankzter [~henrik@92-244-3-192.customers.ownit.se] has joined #go-nuts
16:37 -!- dahankzter [~henrik@92-244-3-192.customers.ownit.se] has quit [Client
Quit]
16:38 -!- SRabbelier [~SRabbelie@ip138-114-211-87.adsl2.static.versatel.nl] has
joined #go-nuts
16:40 < soul9> well, the typeswitch does work, but not for the array
16:42 < nickaugust> soul9: what array are you passing?
16:42 < hokapoka> Are there any docs on using the upstream packages?
16:45 < hokapoka> In particular, apparently there's an update that allows
HTTP Headers to be modified before POST/GET.
16:45 < soul9> nickaugust: array?
16:45 < soul9> where?
16:46 < hokapoka> Atm I've had to duplicate a bunch of the http package to
Add Headers.
16:47 < nickaugust> 2010-10-05 16:43 <soul9> well, the typeswitch does
work, but not for the array
16:48 < soul9> oh
16:48 < soul9> well
16:48 -!- cenuij [~cenuij@93.26.136.97] has joined #go-nuts
16:48 -!- cenuij [~cenuij@93.26.136.97] has quit [Changing host]
16:48 -!- cenuij [~cenuij@base/student/cenuij] has joined #go-nuts
16:49 < soul9> val would be an array I guess if it's a json array
16:49 < soul9> on line 17
16:52 -!- XenoPhoenix [xenophoeni@silenceisdefeat.com] has quit [Quit: "Wait...
what?!"]
16:55 -!- Tv [~tv@cpe-76-168-227-45.socal.res.rr.com] has quit [Ping timeout: 240
seconds]
16:55 < nickaugust> soul9: line 17 is a type assertion for a map of
interfaces with string keys
16:56 < nickaugust> why dont you use a struct instead of a map of
interfaces?
16:56 < soul9> like define a type that has the structure i need and cast
into that?
16:56 < soul9> ok i'll try that
16:56 < nickaugust> then you can just specify the field as []string...  a
slice of strigns.  this interface map stuff..  i dont know why youre doing this.
17:01 < anticw> iant: awake?
17:01 <+iant> anticw: yes
17:02 < anticw> iant: are you likely to drop pthreads anytime soon?
17:02 <+iant> it may happen before the end of the year; not sure
17:02 <+iant> not really soon
17:02 -!- DerHorst [~Horst@e176121018.adsl.alicedsl.de] has joined #go-nuts
17:02 < nickaugust> soul9: type Conf struct { Networks []string; Name
string; } or whatever..  then after it comes out of Decode do the type assertion
c.(Conf)
17:03 < nickaugust> if you know the type theres no reason to do
reflect.StructValue
17:03 < anticw> iant: discontig stacks aside, is there any other benefit to
gold?
17:03 <+iant> it runs faster
17:03 <+iant> nothing other than that
17:06 -!- jhh [~jhh@e179099248.adsl.alicedsl.de] has joined #go-nuts
17:08 < nickaugust> uriel: right.  typically len=cap but that does come in
handy sometimes.
17:12 -!- EthanG [~none@sourcemage/guru/eekee] has joined #go-nuts
17:13 < anticw> iant: faster?  how so?
17:13 <+iant> gold runs faster than GNU ld
17:13 <+iant> I don't mean that the generated code is faster, just that the
link itself is faster
17:13 < anticw> yeah, i dont feel that
17:14 < anticw> gccgo + gnuld is faster than 6g + 6l
17:14 < anticw> 6g is very fast, 6l is kinda doggy
17:14 < uriel> iant: really cool to see you pushing support for kenc into
gcc, have you spoken about it with russ?  that could make keeping p9p and Plan 9
codebases in sync a bit easier
17:14 <+iant> uriel: I haven't talked about it with Russ, no
17:15 <+iant> I don't know what p9p is
17:15 < uriel> anticw: uhu?  6l is pretty fast here
17:15 < uriel> iant: http://plan9.us
17:15 < uriel> russ' port of Plan 9 user space to *nix
17:15 <+iant> ah
17:15 < anticw> uriel: sure, just gnuld is faster most of the time
17:15 < uriel> (also known as plan9port, and Plan 9 from User Space,
complain to russ about the plethora of confusing names ;P)
17:16 < EthanG> 5l isn't quick.  5c + 5l seems quicker than gcc building &
linking on the same arm machine, although I can't test with the same code,
obviously
17:16 <+iant> 6l does more than gold/gnu ld
17:16 <+iant> with 6g/8g/5g some of the code generation is postponed until
link time
17:16 < uriel> yea, ken's linkers do quite a bit more work that in most
toolchains is done by the compilers
17:17 < uriel> it is mentioned in the paper(s):
http://doc.cat-v.org/bell_labs/new_c_compilers/
17:18 < anticw> iant: yeah, when adding new insn i had to go poke 6l code as
well
17:19 -!- jhh [~jhh@e179099248.adsl.alicedsl.de] has quit [Quit: jhh]
17:22 -!- tvw [~tv@82.113.106.144] has joined #go-nuts
17:24 < uriel> iant: btw, is it known yet if the kenc extenssions are going
into gcc?  or they are still thinking about it?
17:24 <+iant> the extensions went in, under -fplan9-extensions
17:24 < uriel> iant: awesome!
17:27 -!- Tv [~tv@gige.bur.digisynd.com] has joined #go-nuts
17:29 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Read error: Connection
reset by peer]
17:32 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts
17:44 < nickaugust> __20h__: can you suggest a 'practical' alternative?  are
we still talking OS design or the whole proejct?
17:45 < nickaugust> sorry..  wrong chan.  frickin irc srcipts/
17:46 < EthanG> GUI FTW *hides*
17:46 -!- tvw [~tv@82.113.106.144] has quit [Remote host closed the connection]
17:47 < nickaugust> heh
17:49 -!- DerHorst [~Horst@e176121018.adsl.alicedsl.de] has quit [Ping timeout:
252 seconds]
17:52 -!- dahankzter [~henrik@92-244-3-192.customers.ownit.se] has joined #go-nuts
17:52 -!- jhh [~jhh@e179099248.adsl.alicedsl.de] has joined #go-nuts
17:58 -!- aho [~nya@fuld-4d00d442.pool.mediaWays.net] has joined #go-nuts
18:06 -!- jhh [~jhh@e179099248.adsl.alicedsl.de] has quit [Quit: jhh]
18:08 -!- slashus2 [~slashus2@74-141-107-118.dhcp.insightbb.com] has quit [Quit:
slashus2]
18:17 -!- rlab [~Miranda@91.200.158.34] has quit [Read error: Connection reset by
peer]
18:29 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Read error: Connection
reset by peer]
18:33 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts
18:33 -!- wjlroe [~will@212.169.34.114] has quit [Ping timeout: 252 seconds]
18:38 -!- Adys [~Adys@unaffiliated/adys] has quit [Remote host closed the
connection]
18:40 -!- Adys [~Adys@cpc1-chap8-2-0-cust237.aztw.cable.virginmedia.com] has
joined #go-nuts
18:40 -!- Adys [~Adys@cpc1-chap8-2-0-cust237.aztw.cable.virginmedia.com] has quit
[Changing host]
18:40 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts
18:46 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
18:47 -!- cenuij [~cenuij@base/student/cenuij] has quit [Remote host closed the
connection]
18:49 -!- cenuij [~cenuij@93.26.136.97] has joined #go-nuts
18:49 -!- cenuij [~cenuij@93.26.136.97] has quit [Changing host]
18:49 -!- cenuij [~cenuij@base/student/cenuij] has joined #go-nuts
18:50 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
18:52 -!- d_m [d6@SDF.ORG] has quit [Read error: Connection reset by peer]
19:06 -!- wrtp [~rog@92.17.67.123] has quit [Quit: wrtp]
19:16 -!- wjlroe [~will@78-86-14-131.zone2.bethere.co.uk] has joined #go-nuts
19:24 -!- mrw [~mrw@166.205.136.176] has joined #go-nuts
19:31 < plexdev> http://is.gd/fMzSy by [Luuk van Dijk] in go/src/cmd/gc/ --
6g: set kind to KindUnsafePointer where appropriate in reflect structures.
19:34 -!- Adys [~Adys@unaffiliated/adys] has quit [Remote host closed the
connection]
19:35 -!- adg [~nf@124.169.158.192] has quit [Ping timeout: 276 seconds]
19:36 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts
19:39 -!- droon [~droon@69-113.106-92.cust.bluewin.ch] has joined #go-nuts
19:40 -!- mrw [~mrw@166.205.136.176] has quit [Quit: Colloquy for iPhone -
http://colloquy.mobi]
19:44 -!- adg [~nf@124.169.158.192] has joined #go-nuts
19:44 -!- plainhao [~plainhao@mail.xbiotica.com] has quit [Quit: plainhao]
19:48 -!- zozoR [~zozoR@4705ds1-ris.0.fullrate.dk] has quit [Quit: Morten.  Desu~]
19:53 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:6523:6955:9b01:46d4] has joined
#go-nuts
19:54 -!- adg [~nf@124.169.158.192] has quit [Ping timeout: 240 seconds]
19:55 < bortzmeyer> Is there a way to use the dns* modules in pkg/net
without copying them and modifying them?  They seem very tighly coupled with net
and do not export routines such as dnsReadConfig
19:55 -!- droon [~droon@69-113.106-92.cust.bluewin.ch] has quit [Remote host
closed the connection]
20:00 -!- artefon [~thiagon@150.164.2.20] has quit [Quit: Leaving]
20:01 -!- adg [~nf@124.169.158.192] has joined #go-nuts
20:06 -!- HollyRain [~HollyRain@87.223.116.212] has joined #go-nuts
20:09 < HollyRain> to pass a vector by reference I do `func foo(v
*vector.StringVector)` and then to access to the range I've to use (for _,v :=
range *v)
20:09 < HollyRain> is right?
20:10 < HollyRain> I thought that I'd to use &v
20:11 < HollyRain> let's go to see, it's correct because it compiles right
20:12 -!- Eridius [~kevin@unaffiliated/eridius] has joined #go-nuts
20:13 -!- MaksimBurnin [~max@44.188-224-87.telenet.ru] has quit [Ping timeout: 265
seconds]
20:16 -!- Xurix [~Luixsia@AToulouse-254-1-14-60.w83-203.abo.wanadoo.fr] has joined
#go-nuts
20:16 -!- Xurix [~Luixsia@AToulouse-254-1-14-60.w83-203.abo.wanadoo.fr] has left
#go-nuts []
20:22 < Soultaker> HollyRain: that's right.  & and * complement each other.
20:22 < KirkMcDonald> StringVector should already be a reference.
20:22 < KirkMcDonald> (Since it's a type defined from a slice type.)
20:23 < KirkMcDonald> Ahh, but the methods are defined in terms of
*StringVector.
20:23 < KirkMcDonald> So, yes, dereferencing it should work.
20:23 < Soultaker> that's probably the only reason why range works (right?)
20:23 < KirkMcDonald> Yes.
20:24 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 265 seconds]
20:24 < Gertm> is there an absolute value function in go?
20:25 < HollyRain> KirkMcDonald: then, is not necessary to pass it by
reference?
20:26 < Gertm> ah, Fabs..  didn't see it there.
20:27 < soul9> so i'm still trying to parse this json, now into a struct,
but it's not going well.  if anyone could take a look..code:
http://dpaste.com/253594/ and example json: http://dpaste.com/253593/
20:27 < soul9> i get the error "invalid type assertion: c.(Conf)
(non-interface type map[string] interface { } on left)"
20:28 < KirkMcDonald> HollyRain: I would say that, since the receiver type
for the methods is *StringVector, you should probably use *StringVector.
20:29 < HollyRain> ok, thanks
20:29 < nickaugust> soul9: still not using Unmarshal?
20:30 < soul9> nickaugust: lol i still thought Decode would do the same just
on a stream..
20:31 < nickaugust> and youre still trying to put the data in a map instead
of a struct...  hold on let me look at this...
20:33 < nickaugust> soul9: yeah youre still setting c := to a map of
interfaces with string keys..  instead do 'var c Conf'
20:34 < soul9> aaaah
20:34 < soul9> that's it!
20:34 < soul9> var c Conf; d.Decode(&c) seems to work!
20:34 < nickaugust> and decode the data into that...  although im still not
sure why you dont use Unmarshal..  how big are the files?  ive never used decode
directly so im not sure this will work, but i can be sure that the type assertion
(Conf) will not work on the var c with type map[string]interface{} :)
20:35 < nickaugust> ah, nice :)
20:35 -!- lmoura_ [~lauromour@186.212.114.106] has quit [Quit: Leaving]
20:35 -!- lmoura [~lauromour@186.212.114.106] has joined #go-nuts
20:37 < soul9> nickaugust: well, thanks for all the attention.  that's
awesome.
20:37 < soul9> i'm still confused by the interface{} in the function
signatures, somehow makes me think i need to pass it an interface{}..
20:40 < nickaugust> no problem man.  :) ive spend many hours in #go-nuts
asking questions myself.  read more about interfaces..  theyre an interesting
aspect of go.  the 'effective go' article is quite good.  by using interface{} in
a function definition youre basicly saying you'll take any argument of any type
and deal with it yourself.
20:40 < nickaugust> so its nice for abstraction but can be a pain to deal
with...
20:41 < soul9> yeah, i can see
20:42 -!- dahankzter [~henrik@92-244-3-192.customers.ownit.se] has quit [Quit:
Leaving.]
20:43 < nickaugust> soul9: typically youd use an interface that had some
required fields or methods.  saying that if an object has these fields/methods it
satisfies this interface...  for example the io.Writer interface
20:44 < nickaugust> so interface{} is just an empty interface definition,
which everything satisfies.  thats my understanding...
20:44 -!- d_m [d6@SDF.ORG] has joined #go-nuts
20:50 < soul9> yeah
20:51 < soul9> but what was getting me is that interfaces define methods
that things have to export, while structs are datatypes
20:51 < soul9> oh well
20:52 -!- Fish [~Fish@9fans.fr] has quit [Remote host closed the connection]
20:55 -!- tvw [~tv@e176003227.adsl.alicedsl.de] has joined #go-nuts
20:58 < uriel> soul9: all types have some 'interface'
20:58 < uriel> soul9: interface{} is the empty interface, which *all* types
fulfill
20:58 < uriel> it is pretty simple really
20:59 < uriel> a function that takes an 'interface{}' can take any type
21:00 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:6523:6955:9b01:46d4] has quit
[Quit: Leaving.]
21:01 < nickaugust> right...  for example io.Writer is an interface which
requires one method, Write().  So any object that has a Write method can be passed
to a function that recieves an io.Writer.
21:04 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3]
21:06 -!- skelterjohn [~jasmuth@lawn-net168-in.rutgers.edu] has quit [Quit:
skelterjohn]
21:22 -!- nickaugust [~nickaugus@li181-40.members.linode.com] has quit [Quit:
nickaugust]
21:22 -!- nickaugust [~nickaugus@li181-40.members.linode.com] has joined #go-nuts
21:25 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
21:27 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit:
Verlassend]
21:34 -!- enferex [~enferex@users.757.org] has quit [Quit: leaving]
21:35 -!- photron [~photron@port-92-201-91-38.dynamic.qsc.de] has quit [Ping
timeout: 276 seconds]
21:50 < uriel> nickaugust: Go has no 'objects', lets not confuse the
terminology even more than it is already ;)
21:51 < uriel> (or maybe I'm wrong, ignore me, not sure if the term 'object'
is ever used in the official docs)
21:51 < nbjoerg> avoid it
21:51 < scyth> :))
21:51 < nbjoerg> talk about types
21:51 < nbjoerg> any type with a corresponding Write method ...
21:52 < nbjoerg> or matching Write method
21:52 < nbjoerg> whatever you prefer :)
21:53 < scyth> I think it would be nice if doc writers used phrase like
"interface{} as an argument, is like void *" :)
21:53 < nbjoerg> scyth: but it isn't
21:53 < nbjoerg> scyth: the point is that void * is not type safe
21:54 < scyth> nbjoerg, I know, and I said "like" not "is" :)
21:55 < scyth> or better even, "is like void *, only type safe..  and what
else" :)
21:57 < nickaugust> uriel: good point.  i'm still getting used to the
terminology.
22:02 -!- skelterjohn [~jasmuth@c-76-124-135-199.hsd1.nj.comcast.net] has joined
#go-nuts
22:06 -!- enferex [~enferex@users.757.org] has joined #go-nuts
22:06 -!- rlab [~Miranda@91.200.158.34] has quit [Read error: Connection reset by
peer]
22:08 -!- ikaros [~ikaros@188.107.214.200] has quit [Quit: Leave the magic to
Houdini]
22:10 -!- segy [~segfault@pdpc/supporter/active/segy] has quit [Ping timeout: 272
seconds]
22:11 -!- jacekm [jacekm@parrot.dobremiasto.net] has quit [Read error: Operation
timed out]
22:11 -!- segy [~segfault@mail.hasno.info] has joined #go-nuts
22:11 -!- segy [~segfault@mail.hasno.info] has quit [Changing host]
22:11 -!- segy [~segfault@pdpc/supporter/active/segy] has joined #go-nuts
22:11 -!- HollyRain [~HollyRain@87.223.116.212] has left #go-nuts []
22:12 -!- jacekm [jacekm@parrot.dobremiasto.net] has joined #go-nuts
22:15 -!- jcao219 [~jcao219@pool-173-74-61-111.dllstx.fios.verizon.net] has joined
#go-nuts
22:21 -!- jcao219 [~jcao219@pool-173-74-61-111.dllstx.fios.verizon.net] has quit
[Ping timeout: 245 seconds]
22:30 -!- awidegreen [~quassel@62.176.237.78] has quit [Remote host closed the
connection]
22:37 -!- napsy [~luka@88.200.96.18] has quit [Quit: Lost terminal]
22:49 -!- kingless [~kingless@adsl-242-215-95.rmo.bellsouth.net] has joined
#go-nuts
22:51 -!- kingless [~kingless@adsl-242-215-95.rmo.bellsouth.net] has quit [Remote
host closed the connection]
22:52 -!- skelterjohn [~jasmuth@c-76-124-135-199.hsd1.nj.comcast.net] has quit
[Quit: skelterjohn]
23:02 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Read error: Connection
reset by peer]
23:06 -!- slashus2 [~slashus2@74-141-107-118.dhcp.insightbb.com] has joined
#go-nuts
23:07 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-177-190.clienti.tiscali.it] has
quit [Quit: E se abbasso questa leva che succ...]
23:15 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts
23:18 -!- jmettraux [~jmettraux@211.19.55.177] has joined #go-nuts
23:21 -!- jcao219 [~jcao219@pool-173-74-61-111.dllstx.fios.verizon.net] has joined
#go-nuts
23:23 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Remote host closed the
connection]
23:24 -!- iant [~iant@nat/google/x-dgklwyjtxqpvyvmm] has quit [Read error:
Operation timed out]
23:32 -!- slashus2 [~slashus2@74-141-107-118.dhcp.insightbb.com] has quit [Quit:
slashus2]
23:32 -!- iant [~iant@67.218.106.122] has joined #go-nuts
23:32 -!- mode/#go-nuts [+v iant] by ChanServ
23:38 -!- jnwhiteh [~jnwhiteh@WoWUIDev/WoWI/Featured/Dongle/cladhaire] has quit
[Ping timeout: 240 seconds]
23:39 -!- jnwhiteh [~jnwhiteh@WoWUIDev/WoWI/Featured/Dongle/cladhaire] has joined
#go-nuts
23:43 -!- wjlroe [~will@78-86-14-131.zone2.bethere.co.uk] has quit [Quit: Computer
has gone to sleep]
23:43 -!- BlaSux [7f000001@dr.kleiner.lambdacomplex.org] has quit [Ping timeout:
264 seconds]
23:46 -!- skelterjohn [~jasmuth@c-76-124-135-199.hsd1.nj.comcast.net] has joined
#go-nuts
23:46 -!- skelterjohn [~jasmuth@c-76-124-135-199.hsd1.nj.comcast.net] has quit
[Client Quit]
--- Log closed Wed Oct 06 00:00:09 2010