--- Log opened Sat Nov 28 00:00:26 2009 --- Day changed Sat Nov 28 2009 00:00 < Gracenotes> oh, Parsec based! Parsec is one awesome library :) 00:00 < alexsuraci> indeed :D 00:00 < alexsuraci> hoping I can get this to be as flexible 00:01 < alexsuraci> very easy to build a parser so far 00:01 < alexsuraci> granted it's limited at the moment but they're easy to tack on 00:02 < gnuvince> are there plans to make gotest work outside of $GOROOT? 00:04 -!- Adys [n=Adys@unaffiliated/adys] has quit ["I ♥ Unicode"] 00:04 < uriel> Gracenotes: ? 00:04 < Gracenotes> search:golang.org gordon 00:05 < hstimer> Is there a magic print command for dumping the contents of a data structure? array, map, struct 00:06 < Whtiger> hstimer: try the normal print commands. 00:06 < alexsuraci> hstimer: fmt.Printf("%#v", foo); 00:06 < uriel> Gracenotes: damn, I thought it used to be in the faq 00:06 < alexsuraci> probably pop a \n at the end there too 00:06 < slashus2> gnuvince: Did you end up rewriting your starcraft game parser in Go? 00:07 < uriel> Gracenotes: anyway, in the go source, go to: go/doc/gordon/ 00:07 < uriel> (of course you could consider http://glenda.cat-v.org/friends/ documentation, but that is not official ;) 00:08 < Gracenotes> > foo := struct{int;float}{3,4}; fmt.Printf("%v | %#v |%+v", foo, foo, foo) 00:08 < rndbot> {3 4} | struct { ? int; ? float }{int:3, float:4} |{int:3 float:4} 00:08 -!- jdp [n=gu@75.97.120.11.res-cmts.senj.ptd.net] has quit [] 00:08 < Gracenotes> > foo := struct{x int;y, z float}{3,4,5}; fmt.Printf("%v | %#v | %+v", foo, foo, foo) 00:08 < rndbot> {3 4 5} | struct { x int; y float; z float }{x:3, y:4, z:5} | {x:3 y:4 z:5} 00:09 < Gracenotes> uriel: heh, Plan 9's French logo is a Frog 00:09 < uriel> heh, that was the Apr 1st idea from a german friend of mine 00:10 < uriel> when Alcatel bought Lucent 00:10 -!- mbarkhau [n=koloss@p54A7EA49.dip.t-dialin.net] has quit ["Leaving."] 00:10 < gnuvince> slashus2: no; I'm finishing up on math classes to be able to go to university this winter. Although it would be a sweet project idea 00:10 -!- melba [n=blee@unaffiliated/lazz0] has quit ["MICROSOFT WORD IS A FUN GAME"] 00:10 -!- Anders_ [n=Anders@c83-253-2-206.bredband.comhem.se] has quit ["Leaving"] 00:11 < slashus2> gnuvince: Still doing some clojure stuff? 00:11 -!- Anders__ [n=Anders@c83-253-2-206.bredband.comhem.se] has quit [Read error: 110 (Connection timed out)] 00:12 < gnuvince> slashus2: not lately; I haven't actually coded since I quit my job to go back to school. 00:13 < gnuvince> slashus2: coded anything of note that is. Still fiddle around here and there, trying go and Scala and whatnot. 00:13 -!- XniX23 [n=vegy@we.will.never-be.afraid.org] has quit [] 00:14 -!- jordyd [n=jordyd@99-177-65-75.lightspeed.wepbfl.sbcglobal.net] has joined #go-nuts 00:18 -!- Makavel [n=eddw@hoasb-ff08dd00-36.dhcp.inet.fi] has joined #go-nuts 00:18 < uriel> interesting: http://www.airs.com/blog/archives/277 00:18 < uriel> (specially the second half) 00:21 -!- jordyd [n=jordyd@99-177-65-75.lightspeed.wepbfl.sbcglobal.net] has quit ["Leaving"] 00:21 -!- jordyd [n=jordyd@99-177-65-75.lightspeed.wepbfl.sbcglobal.net] has joined #go-nuts 00:21 -!- Adys [n=Adys@unaffiliated/adys] has joined #go-nuts 00:23 -!- teedex [n=teedex@204.14.155.161] has joined #go-nuts 00:24 -!- aa [n=aa@r190-135-238-5.dialup.adsl.anteldata.net.uy] has quit [Read error: 104 (Connection reset by peer)] 00:25 -!- aa [n=aa@r190-135-238-5.dialup.adsl.anteldata.net.uy] has joined #go-nuts 00:25 -!- railbait[blowme] [n=railbait@ip68-97-34-79.ok.ok.cox.net] has quit [] 00:26 -!- cpr420 [n=cpr420@67.165.199.143] has quit ["Vision[0.9.7-H-090423]: i've been blurred!"] 00:27 -!- Guest14498 [n=irc@209.17.191.58] has quit ["leaving"] 00:27 -!- lux` [n=lux@151.54.240.211] has quit [Read error: 104 (Connection reset by peer)] 00:27 -!- hstimer [n=hans@70.90.170.37] has quit ["Leaving..."] 00:37 -!- codedread [i=180dd699@gateway/web/freenode/x-jgmqgbgjqkvmcews] has joined #go-nuts 00:38 -!- Rob_Russell [n=chatzill@206-248-157-156.dsl.teksavvy.com] has joined #go-nuts 00:46 < Method> anyone know why does go require an executable stack? 00:50 -!- codedread [i=180dd699@gateway/web/freenode/x-jgmqgbgjqkvmcews] has quit ["Page closed"] 00:51 < alexsuraci> Gracenotes: http://gopaste.org/view/sqzKw A bit more robust now. :D 00:52 < Gracenotes> nice and high-level 00:52 < alexsuraci> yep 00:53 < Whtiger> Is there a Go hilighting thing for Vim yet? 00:54 < rbancroft> Whtiger: yes, check the misc directory 00:55 -!- mertimor [n=mertimor@p4FE75141.dip.t-dialin.net] has quit [] 00:56 -!- masa [n=wyan@adsl-99-169-135-210.dsl.pltn13.sbcglobal.net] has joined #go-nuts 00:57 -!- chid [n=ikhtj@c122-106-95-175.rivrw1.nsw.optusnet.com.au] has joined #go-nuts 00:57 < alexsuraci> Gracenotes: too bad I can't do "parser := Many(Any(ltgt, Parens(parser))" though. guess that's one thing Haskell's parsec gets to keep. 00:58 -!- skelterjohn [n=jasmuth@c-71-58-123-111.hsd1.nj.comcast.net] has joined #go-nuts 01:02 < Whtiger> rbancroft: oh hey, didn't notice that. thanks. 01:03 -!- skelterjohn [n=jasmuth@c-71-58-123-111.hsd1.nj.comcast.net] has quit [Client Quit] 01:03 -!- mythz [n=mythz@5ac47b17.bb.sky.com] has joined #go-nuts 01:08 < Ycros> alexsuraci: oh fantastic, I was hoping someone would write one of those 01:09 -!- clearscreen [n=clearscr@e248070.upc-e.chello.nl] has joined #go-nuts 01:09 < Gracenotes> > fmt.Print("%b", 1 | 4) 01:09 < rndbot> %b5 01:09 < Gracenotes> oh. 'f' 01:10 < Gracenotes> anyhow, 101 01:13 -!- Wiz126 [n=Wiz126@24.102.254.150.res-cmts.sm.ptd.net] has joined #go-nuts 01:14 -!- clearscreen [n=clearscr@e248070.upc-e.chello.nl] has quit [Remote closed the connection] 01:14 -!- Ryan__ [n=ryan@cpe-98-27-182-206.neo.res.rr.com] has joined #go-nuts 01:15 -!- mitchellh [n=mitchell@12.33.1.80] has joined #go-nuts 01:15 -!- lolsuper_ [n=super_@pool-173-65-48-13.tampfl.fios.verizon.net] has quit [Client Quit] 01:16 -!- clearscreen [n=clearscr@e248070.upc-e.chello.nl] has joined #go-nuts 01:16 -!- Adys [n=Adys@unaffiliated/adys] has quit [Read error: 110 (Connection timed out)] 01:16 -!- triplez [n=triplez@cm52.sigma225.maxonline.com.sg] has quit [] 01:20 -!- SRabbelier [n=SRabbeli@ip138-114-211-87.adsl2.static.versatel.nl] has quit ["Leaving."] 01:22 -!- Fl1pFl0p [i=flipflop@unaffiliated/fl1pfl0p] has joined #go-nuts 01:22 -!- Ryan__ [n=ryan@cpe-98-27-182-206.neo.res.rr.com] has quit ["Colloquy for iPhone - http://colloquy.mobi"] 01:22 -!- Ryan__ [n=ryan@cpe-98-27-182-206.neo.res.rr.com] has joined #go-nuts 01:24 -!- Ryan__ [n=ryan@cpe-98-27-182-206.neo.res.rr.com] has quit [Client Quit] 01:29 -!- mitchellh [n=mitchell@12.33.1.80] has quit ["Leaving."] 01:36 -!- mitchellh [n=mitchell@12.33.1.80] has joined #go-nuts 01:39 < anticw> anyone here get golang-dev email? 01:39 < anticw> and if so, can you tell me if you got something about archive/tar in the last few minutes? 01:40 -!- clearscreen [n=clearscr@e248070.upc-e.chello.nl] has quit ["Leaving."] 01:42 -!- Venom_X [n=pjacobs@cpe-67-9-131-167.austin.res.rr.com] has joined #go-nuts 01:44 -!- mythz [n=mythz@5ac47b17.bb.sky.com] has quit [] 01:44 -!- erus` [n=tom@92.29.1.64] has quit [Read error: 104 (Connection reset by peer)] 01:45 -!- snicket [n=Promethe@148.227.201.174] has joined #go-nuts 01:46 -!- jordyd [n=jordyd@99-177-65-75.lightspeed.wepbfl.sbcglobal.net] has quit [Read error: 60 (Operation timed out)] 01:46 -!- mitchellh [n=mitchell@12.33.1.80] has quit ["Leaving."] 01:49 -!- armence [n=armence@c-67-188-229-128.hsd1.ca.comcast.net] has quit [Nick collision from services.] 01:49 -!- armence_ [n=armence@c-67-188-229-128.hsd1.ca.comcast.net] has joined #go-nuts 01:50 -!- jda2000 [n=jda2000@host-208-117-123-72.beyondbb.com] has joined #go-nuts 01:51 -!- crc [n=charlesc@68.80.139.0] has joined #go-nuts 02:00 < fhs> anticw: no 02:01 -!- General13372 [n=support@71-84-247-187.dhcp.gldl.ca.charter.com] has joined #go-nuts 02:01 -!- slashus2 [n=slashus2@74-137-26-8.dhcp.insightbb.com] has quit [] 02:01 < anticw> yeah, i think maybe it's just slow 02:02 -!- mythz [n=mythz@5ac47b17.bb.sky.com] has joined #go-nuts 02:03 -!- aa [n=aa@r190-135-238-5.dialup.adsl.anteldata.net.uy] has left #go-nuts ["Konversation terminated!"] 02:06 -!- hstimer [n=hans@c-98-234-25-125.hsd1.ca.comcast.net] has joined #go-nuts 02:07 < alexsuraci> hrm. why do the various unicode.* functions take an int rather than a byte? 02:07 < hstimer> is there a better way to get the pwd other than exec.Run("pwd",.... 02:07 < KirkMcDonald> alexsuraci: They operate on code points. 02:08 < KirkMcDonald> alexsuraci: Also, you can turn an int containing a code point into a UTF-8-encoded string via string(x). 02:09 -!- General1337 [n=support@71.84.247.187] has quit [Read error: 145 (Connection timed out)] 02:11 -!- ejb [n=ejb@unaffiliated/ejb] has joined #go-nuts 02:13 -!- xuser [n=xuser@unaffiliated/xuser] has left #go-nuts [] 02:13 < Zeffrin> > fmt.Printf("%s", os.Getenv("PWD")) 02:13 < rndbot> /home/mgruen 02:13 < alexsuraci> KirkMcDonald: ah, ok. it just seems odd not to be able to do e.g. unicode.IsSpace(foo[0]) where foo is a string 02:13 < Zeffrin> hstimer: like that kind of pWD? 02:14 < hstimer> Zeffrin: present working directory 02:14 < alexsuraci> try cwd? 02:15 < Zeffrin> hstimer yah then os.Getenv("PWD") 02:15 < hstimer> Zeffrin: ah! much easier, thanks 02:15 < KirkMcDonald> alexsuraci: In the context of UTF-8, it doesn't make sense to ask if an arbitrary code unit is a space. 02:15 -!- clearscreen [n=clearscr@e248070.upc-e.chello.nl] has joined #go-nuts 02:16 -!- clearscreen [n=clearscr@e248070.upc-e.chello.nl] has quit [Client Quit] 02:16 -!- clearscreen [n=clearscr@e248070.upc-e.chello.nl] has joined #go-nuts 02:16 < KirkMcDonald> alexsuraci: Note that iterating over a string with for .. range gives the code points, not the bytes. 02:17 < alexsuraci> KirkMcDonald: so how would I go about getting the code point at X offset? is range the only way? 02:17 < KirkMcDonald> alexsuraci: There is also strings.Split(s, "", 0). 02:17 * alexsuraci should probably read up on his utf-8 02:18 < KirkMcDonald> alexsuraci: Which returns a []string containing the individual code sequences. 02:18 < alexsuraci> ah, alright 02:18 < tor7> hstimer: os.Getwd() 02:19 < hstimer> tor7: even better. thanks 02:19 -!- olegfink [n=olegfink@snupt.com] has quit [Read error: 104 (Connection reset by peer)] 02:20 -!- olegfink [n=olegfink@snupt.com] has joined #go-nuts 02:20 < Gracenotes> someone can modify PWD in the environment 02:20 < Gracenotes> well, they won't modify the environment, but rather Go's copy of it that's accessed in Getenv 02:20 < Gracenotes> but I think Getwd does actually use a syscall 02:21 < tor7> some non-bash shells use $CWD instead, and $PWD doesn't exist on windows 02:21 -!- Rob_Russell [n=chatzill@206-248-157-156.dsl.teksavvy.com] has quit [Read error: 104 (Connection reset by peer)] 02:21 -!- Rob_Russell [n=chatzill@206-248-157-156.dsl.teksavvy.com] has joined #go-nuts 02:22 -!- cjuner_ [n=cjuner@frnk-5f744ae4.pool.mediaWays.net] has joined #go-nuts 02:24 -!- triplez [n=triplez@116.197.205.204] has joined #go-nuts 02:27 < Gracenotes> hm. it looks like the convention for connection-type objects is to have a DialXXX function that yields them and connects at the same time. I think I need a separate method for each 02:27 -!- Rob_Russell [n=chatzill@206-248-157-156.dsl.teksavvy.com] has quit [Read error: 104 (Connection reset by peer)] 02:27 -!- Rob_Russell [n=chatzill@206-248-157-156.dsl.teksavvy.com] has joined #go-nuts 02:28 -!- masa [n=wyan@adsl-99-169-135-210.dsl.pltn13.sbcglobal.net] has left #go-nuts [] 02:28 < Amaranth> Gracenotes: Why? 02:29 -!- ikkebr [n=1kk3@unaffiliated/ikkebr] has quit [] 02:30 < Gracenotes> Amaranth: this is not a connection that interfaces directly with the OS: it does contain its own TCPConn, but also several pointers to functions that users can define, essentially as callbacks 02:30 < Gracenotes> I think I might want to have several callbacks from the beginning 02:31 < Gracenotes> not only those defined for the struct specifically, which need to exist to ensure the connection fully goes through (and doesn't exit prematurely with an error), but also perhaps by the user 02:31 < Gracenotes> to hook up these callbacks, instances of the connection object are required 02:32 -!- Popog [n=Adium@pool-71-121-200-233.sttlwa.dsl-w.verizon.net] has quit ["Leaving."] 02:32 -!- amuck [n=amuck@h124.153.190.173.ip.windstream.net] has joined #go-nuts 02:32 < Gracenotes> perhaps I can still have a Dial function, but which calls an also-accessible NewConnection function and Connect method 02:33 -!- getisboy [n=Family@71.174.56.27] has joined #go-nuts 02:33 -!- ziyu [n=ziyuhuan@114-137-113-222.dynamic.hinet.net] has joined #go-nuts 02:34 < alexsuraci> Parsec-esque library has a github repo now if anyone's interested in following: http://github.com/vito/go-parse 02:35 -!- ziyu [n=ziyuhuan@114-137-113-222.dynamic.hinet.net] has quit [Client Quit] 02:39 -!- cjuner [n=cjuner@frnk-590dfb04.pool.mediaWays.net] has quit [Read error: 110 (Connection timed out)] 02:42 -!- gislan [n=gislan@host-81-190-16-19.torun.mm.pl] has quit [Read error: 113 (No route to host)] 02:43 -!- getisboy [n=Family@71.174.56.27] has left #go-nuts [] 02:54 -!- teedex [n=teedex@204.14.155.161] has quit [Remote closed the connection] 02:59 -!- snicket [n=Promethe@148.227.201.174] has quit ["Saliendo"] 03:01 -!- Venom_X [n=pjacobs@cpe-67-9-131-167.austin.res.rr.com] has quit [] 03:02 -!- teedex [n=teedex@204.14.155.161] has joined #go-nuts 03:06 -!- mjard [n=k@70.114.138.168] has joined #go-nuts 03:07 -!- goplexian [n=goplexia@d154-20-0-9.bchsia.telus.net] has left #go-nuts [] 03:08 -!- goplexian [n=goplexia@d154-20-0-9.bchsia.telus.net] has joined #go-nuts 03:08 -!- hd_ [n=hd_@253.176.233.220.static.exetel.com.au] has joined #go-nuts 03:09 -!- aho [n=nya@e183149150.adsl.alicedsl.de] has quit ["EXEC_over.METHOD_SUBLIMATION"] 03:13 -!- goplexian [n=goplexia@d154-20-0-9.bchsia.telus.net] has left #go-nuts [] 03:13 -!- goplexian [n=goplexia@d154-20-0-9.bchsia.telus.net] has joined #go-nuts 03:18 -!- aho [n=nya@e183149150.adsl.alicedsl.de] has joined #go-nuts 03:23 -!- Ibw [n=isaac@cpe-67-241-42-134.twcny.res.rr.com] has joined #go-nuts 03:23 < Ibw> the regexp package needs some work 03:23 < KirkMcDonald> It does. 03:24 < KirkMcDonald> I miss the lack of \s and so forth. 03:24 < KirkMcDonald> For starters. 03:24 < Ibw> and no lazy qaulifiers 03:24 < Ibw> *qualifiers 03:24 < Ibw> *quantifiers 03:31 -!- Wiz126 [n=Wiz126@24.102.254.150.res-cmts.sm.ptd.net] has quit [Connection timed out] 03:32 < Whtiger> urg, yeah, I'd love PCRE. 03:33 -!- path[l] [n=path@115.240.68.226] has joined #go-nuts 03:37 -!- strick9_ [n=safetytr@VDSL-151-118-128-29.DNVR.QWEST.NET] has joined #go-nuts 03:38 -!- Wiz126 [n=Wiz126@24.102.254.150.res-cmts.sm.ptd.net] has joined #go-nuts 03:38 < Gracenotes> just nothing context-sensitive, please 03:38 < Gracenotes> er. or context-free 03:39 < Gracenotes> cough backreferences 03:43 -!- Ryan__ [n=ryan@cpe-98-27-182-206.neo.res.rr.com] has joined #go-nuts 03:43 -!- AndreSTC [n=Mandrac@20151099023.user.veloxzone.com.br] has quit ["Fui embora"] 03:44 -!- Ibw [n=isaac@cpe-67-241-42-134.twcny.res.rr.com] has quit [Remote closed the connection] 03:46 -!- amuck [n=amuck@h124.153.190.173.ip.windstream.net] has quit [] 03:47 < hstimer> Quick clarification on Vectors and Arrays: array fixed max size, vector can grow without specifing max size up front. Correct? 03:47 -!- mjard [n=k@70.114.138.168] has quit [Nick collision from services.] 03:47 < KirkMcDonald> hstimer: That sounds reasonable, sure. 03:48 < hstimer> KirkMcDonald: thx 03:48 -!- mjard [n=k@70.114.138.168] has joined #go-nuts 03:48 < dagle2> hstimer: "The vector package implements an efficient container for managing linear arrays of elements. Unlike arrays, vectors can change size dynamically." 03:48 < dagle2> Docs are great. :) 03:50 -!- Ryan__ [n=ryan@cpe-98-27-182-206.neo.res.rr.com] has quit ["Colloquy for iPhone - http://colloquy.mobi"] 03:57 -!- trutkin [n=trutkin@24.42.93.107] has joined #go-nuts 03:57 -!- mizai [n=mizai@rhou-164-107-213-187.resnet.ohio-state.edu] has quit [Success] 03:57 -!- tor7 [n=tor@c-987a71d5.04-50-6c756e10.cust.bredbandsbolaget.se] has quit [] 03:59 < hstimer> is absolutely everything set 0 on allocation - locals, structs, named error return values 04:00 < hstimer> delete 'error' from above 04:00 -!- amuck [n=amuck@h124.153.190.173.ip.windstream.net] has joined #go-nuts 04:01 -!- Ibw [n=isaac@cpe-67-241-42-134.twcny.res.rr.com] has joined #go-nuts 04:01 -!- trutkin [n=trutkin@24.42.93.107] has quit [Client Quit] 04:01 < Ibw> It's stupid that os.File isn't an io.reader 04:02 < anticw> you can make one with bufio 04:03 < Ibw> how so? 04:03 -!- mythz [n=mythz@5ac47b17.bb.sky.com] has quit [] 04:04 < Ibw> wait 04:04 < anticw> does bufio.NewReader not work? 04:04 < Ibw> It doesn't even matter 04:04 -!- halfdan [n=halfdan@p57A94268.dip.t-dialin.net] has joined #go-nuts 04:04 < Ibw> (bufio.Reader has the same issue as os.File, read doesn't match the io.Reader Read() template 04:04 -!- mizai [n=mizai@164.107.141.200] has joined #go-nuts 04:07 < Ibw> actually, maybe not 04:09 < Gracenotes> matches it to a T, afaik 04:09 < dagle2> io.Reader is an interface that has Read(p []byte) (n int, err os.Error); 04:09 < dagle2> seems like os.File has that. 04:21 -!- halfdan_ [n=halfdan@p57A94468.dip.t-dialin.net] has quit [Read error: 110 (Connection timed out)] 04:22 -!- strick9_ [n=safetytr@VDSL-151-118-128-29.DNVR.QWEST.NET] has quit ["Leaving"] 04:28 -!- brrant [n=John@168-103-78-133.hlrn.qwest.net] has quit ["Leaving"] 04:29 -!- sladegen [n=nemo@unaffiliated/sladegen] has quit [Nick collision from services.] 04:29 -!- sladegen [n=nemo@unaffiliated/sladegen] has joined #go-nuts 04:32 -!- decriptor [n=decripto@174-27-134-202.slkc.qwest.net] has quit [Read error: 110 (Connection timed out)] 04:32 < hstimer> has anyone sucessfully called vector.NewStringVector? I get an undefined error even though I've imported "container/vector" 04:35 -!- jordyd [n=jordyd@99-177-65-75.lightspeed.wepbfl.sbcglobal.net] has joined #go-nuts 04:36 -!- sepoy [n=sepoy@98.202.50.243] has quit [Read error: 148 (No route to host)] 04:39 -!- Kibiz0r [n=Adium@99-48-204-31.lightspeed.brhmmi.sbcglobal.net] has joined #go-nuts 04:44 -!- jchico [n=jchico@user-387hok4.cable.mindspring.com] has joined #go-nuts 04:48 < anticw> hstimer: it was removed 04:48 < hstimer> oh? 04:50 < anticw> you want something like: sv := new(vector.StringVector).Resize(10, 20); 04:50 < anticw> now 04:50 < hstimer> ah 04:51 < hstimer> is vector.New gone too? 04:55 < anticw> http://code.google.com/p/go/source/detail?r=d52c4400bd9cae74a6374c4036b4b79ff41a7c29 04:56 < hstimer> ah 04:56 -!- hipe [n=hipe@pool-74-108-173-203.nycmny.east.verizon.net] has joined #go-nuts 04:57 < hstimer> I'm sure there is a very good reason to remove a descriptive easy method with an obscure one 04:58 -!- mwoods79 [n=mwoods79@c-98-239-44-209.hsd1.la.comcast.net] has quit [] 04:58 < anticw> it's more idiomatic :) 04:59 -!- sepoy [n=sepoy@c-98-202-50-243.hsd1.ut.comcast.net] has joined #go-nuts 05:01 -!- slashus2 [n=slashus2@74-137-26-8.dhcp.insightbb.com] has joined #go-nuts 05:02 < hstimer> given that go isn't quite consistent, I think the proper reasoning is that it follows the idiom go wants to have 05:02 < hstimer> which is fine 05:02 < hstimer> just irritating the web site docs are not in sync 05:04 < hstimer> anyway, thank you very much anticw, I thought I was going insane 05:04 < hstimer> it didn't occur to me that they had change the lib.... should of though 05:07 -!- mikejs [n=me@mikej.st] has quit [Remote closed the connection] 05:11 < h4xOr> hi, is there any NetBSD port for Golang available already? 05:12 -!- hipe_ [n=hipe@pool-74-108-173-203.nycmny.east.verizon.net] has joined #go-nuts 05:14 -!- tokuhiro_______2 [n=tokuhiro@s230.GtokyoFL21.vectant.ne.jp] has quit [Read error: 104 (Connection reset by peer)] 05:15 -!- tokuhiro_______2 [n=tokuhiro@s230.GtokyoFL21.vectant.ne.jp] has joined #go-nuts 05:21 -!- raichoo [n=raichoo@i577BB402.versanet.de] has quit [Read error: 104 (Connection reset by peer)] 05:21 -!- raichoo [n=raichoo@i577BB402.versanet.de] has joined #go-nuts 05:27 < anticw> h4xOr: no, but there is a freebsd port, that might be a good starting point for a new effort 05:27 -!- hipe [n=hipe@pool-74-108-173-203.nycmny.east.verizon.net] has quit [Read error: 110 (Connection timed out)] 05:28 -!- hipe [n=hipe@pool-74-101-72-105.nycmny.east.verizon.net] has joined #go-nuts 05:28 -!- hipe_ [n=hipe@pool-74-108-173-203.nycmny.east.verizon.net] has quit [Read error: 104 (Connection reset by peer)] 05:31 -!- mwoods79 [n=mwoods79@c-98-239-44-209.hsd1.la.comcast.net] has joined #go-nuts 05:33 < Ibw> why on earth was vector.New removed 05:33 < anticw> ask on the list, unless it was already discussed 05:34 -!- Kibiz0r [n=Adium@99-48-204-31.lightspeed.brhmmi.sbcglobal.net] has quit ["Leaving."] 05:35 < Ibw> Nope, I've been following the list. 05:36 < Ibw> No discussion of useless function removing 05:38 -!- droid0011 [n=g1@p4FDCF9B6.dip.t-dialin.net] has joined #go-nuts 05:40 < anticw> http://code.google.com/p/go/issues/detail?can=1&q=294&colspec=ID%20Type%20Status%20Owner%20Summary&id=294 05:40 < sahazel> how can I get the ASCII code for a character in go? 05:41 < Gracenotes> characters *are* bytes 05:41 < Gracenotes> so if it's in the ASCII range, it will be a numerical value by default 05:41 < Gracenotes> (if it's not in the ASCII range, it may be spread across bytes, and you'll need a bit more to deal with that) 05:42 < sahazel> well, I have a one-character string 05:43 < Gracenotes> if it's from 0 to 255, str[0] will get its byte/ASCII value 05:43 < anticw> not 255 05:43 < Gracenotes> oh, right, UTF-8 does need some signalling 05:43 < anticw> 127 05:44 < Gracenotes> there is precious little else it can use to know about multi-byte characters 05:44 < anticw> if the upper bit is set you need to look at bits 5&6 too 05:44 < sahazel> aw 05:44 < sahazel> what I really want is a []byte with mystring[0:1] in it 05:44 < Gracenotes> you did say ASCII, though 05:45 < sahazel> but that seems to make another string 05:45 < anticw> sahazel: you want a byte or Rune? 05:45 < sahazel> good idea most of the time, but sad for me 05:45 < sahazel> I want a byte 05:45 < sahazel> I have data that I know is ascii, and I'm trying to get the ascii representation 05:46 -!- path[l] [n=path@115.240.68.226] has quit [Read error: 60 (Operation timed out)] 05:46 < Ibw> ooh 05:46 < anticw> sahazel: foo[0] then 05:46 < Ibw> no no no, here's how: 05:46 < Ibw> wait, what do you want to do? 05:46 < sahazel> I have mystring, a string 05:47 < Gracenotes> get the ASCII value of an ASCII, not superascii unicode, character 05:47 < sahazel> I want a []byte with mystring[0] in it 05:47 < sahazel> (and I know that mystring[0] is an ascii character) 05:47 -!- sliceofpi1 [n=Adium@c-98-194-205-176.hsd1.tx.comcast.net] has joined #go-nuts 05:48 < Ibw> alrighty, um, why though? 05:48 < Ibw> is an int ok? 05:48 < Ibw> well, nvm 05:48 < sahazel> it's complicated 05:48 < Ibw> You can do that too 05:48 -!- sliceofpi [n=Adium@c-98-194-205-176.hsd1.tx.comcast.net] has quit [Read error: 104 (Connection reset by peer)] 05:48 < sahazel> if I had an int, I'd want to convert to a byte anyway 05:48 < Whtiger> strings.Bytes(mystring)? 05:49 < Gracenotes> > fmt.Println(strings.Bytes("界")); for i, c := range "界" { fmt.Println(c) } 05:49 < rndbot> [231 149 140] 30028 05:49 < sahazel> Whtiger wins! 05:49 < sahazel> thanks 05:49 < Whtiger> woo 05:49 < Gracenotes> > "abcde"[4] - 'a' 05:49 < rndbot> <Error: ("abcde"[4]) - 97 not used> 05:49 < Gracenotes> @eval "abcde"[4] - 'a' 05:49 < rndbot> 4 05:49 < Ibw> hold on, typing something up 05:50 < Gracenotes> sahazel: note, str[0] is the same as string.Bytes(str)[0]. exact same thing :) 05:50 < sahazel> yeah, that makes sense 05:50 < Gracenotes> a string is backed directly by a byte array, and it makes no attempts to hide that (except when you're iterating over it, in which case it'll give you proper encoding) 05:51 < Ibw> http://gopaste.org/view/icCPD 05:51 < Ibw> that might work 05:51 < Ibw> Haven't tested it 05:51 < Gracenotes> well, actually, it's not the exact same thing, since string.Bytes copies the whole thing. 05:51 -!- cpr420 [n=cpr@67.165.199.143] has joined #go-nuts 05:51 < Ibw> ppst 05:51 < Ibw> psst 05:51 < Ibw> lookie at my pastie 05:51 < Whtiger> I'm assuming sahazel doesn't care about encoding >_> 05:52 < Gracenotes> it's so simple though.. str[0].. which is what I said 10 minutes ago. uggh. 05:52 < Ibw> that's not what I did though 05:53 < Gracenotes> uriel: are you there? 05:53 -!- droid001 [n=g1@79.220.228.216] has quit [Success] 05:53 < Ibw> Gracenotes: What you said would work if all the characters were guranteed ascii 05:53 < Ibw> plus, I already pasted a solution! 05:53 < Ibw> argh 05:53 < Ibw> sahazel: Did you see my paste? 05:53 < Gracenotes> Ibw: sahazel knows that 05:54 < Ibw> ok 05:54 < Gracenotes> "I have data that I know is ascii, and I'm trying to get the ascii representation".. *-* 05:55 -!- raichoo [n=raichoo@i577BB402.versanet.de] has quit ["http://raichoo.blogspot.com"] 05:55 < Ibw> oh 05:55 < Ibw> alright... 05:55 < Ibw> how disappointing. I was so excited. 05:56 < Ibw> Then I think str[0] would work just fine... 05:56 -!- KillerX [n=anant@59.92.128.97] has joined #go-nuts 05:57 -!- pshahmumbai [n=prashant@59.164.24.56] has joined #go-nuts 05:57 < Gracenotes> Ibw: awww. yours does work... maybe an even simpler way would be strings.Split("", 0) 05:57 < Gracenotes> since, I have read :o, it also obeys UTF-8ness 05:58 < Ibw> woah 05:58 < Gracenotes> which, actually, *does* call utf8.DecodeRuneInString :) 06:00 < Gracenotes> okay there, keanu? 06:01 < Gracenotes> well, I finally have rndbot's source hosted :) http://code.google.com/p/go-bot/ 06:01 < Gracenotes> feel free to take a look.. I just need to contact uriel about changing the pure Go projects link for it 06:05 -!- codedread [i=180dd699@gateway/web/freenode/x-xscbrrlziifcamxa] has joined #go-nuts 06:05 < codedread> i'm trying to understand how structs implement interfaces 06:06 < codedread> i have an interface Foo, and a struct foo that implements the methods in Foo 06:06 < codedread> if i have another method that returns (*Foo) - can i return new(foo) ? 06:06 < codedread> (the compiler complains) 06:07 < Gracenotes> hm.. you might want to keep them different names :) 06:07 < Gracenotes> *give 06:07 < Gracenotes> but that doesn't explain the compiler error 06:08 < codedread> they actually are different names 06:08 < codedread> cannot use d (type *fooImpl) as type *Foo 06:09 < codedread> oh, is it that it's a pointer? 06:09 < Gracenotes> codedread: the method names that you implement for Foo, are they pointer or non-pointer? 06:10 < codedread> pointer: func (n *fooImpl) blah() string { return ""; } 06:10 < Gracenotes> try returning Foo instead of *Foo 06:10 < codedread> (if I understand you) 06:10 < codedread> Gracenotes: that works 06:10 < codedread> changing the return type 06:10 < codedread> so *fooImpl can be interpreted as a Foo ? 06:11 < Gracenotes> I'm not quite sure. it's what worked for me in my experiments, but I'm having a hard time finding where the specification says it's so 06:13 < Gracenotes> I should probably add it as a potential bug 06:16 < Gracenotes> codedread: incidentally, what is the interface? 06:16 -!- jchico [n=jchico@user-387hok4.cable.mindspring.com] has quit ["Leaving"] 06:16 < codedread> it's my own one (not one already defined by Go) 06:17 < Gracenotes> *nod* what is it? 06:17 < Gracenotes> type-wise 06:18 < codedread> ah, it's Node (as in a DOM node) 06:18 < codedread> maybe i don't understand your quesiton 06:19 < Gracenotes> I mean, the type of an interface is its method set 06:19 < codedread> ok - so you want me to paste the methods here? :) 06:19 < Gracenotes> oh. if it's too extensive, you don't have to. I'm just trying to resolve all this with the specification 06:20 < Gracenotes> "A variable of interface type can store a value of any type with a method set that is any superset of the interface." "The method set of the corresponding pointer type *T is the set of all methods with receiver *T or T." 06:20 < codedread> ok, well there's only one method in my starter code: NodeName() string; 06:24 -!- chachan [n=chachan@ccscliente156.ifxnetworks.net.ve] has joined #go-nuts 06:26 -!- timmcd [n=Adium@97-117-100-106.slkc.qwest.net] has joined #go-nuts 06:27 -!- rrr [i=rrr@gateway/gpg-tor/key-0x9230E18F] has quit [Remote closed the connection] 06:27 -!- lambo4jos [n=chatzill@c-76-126-250-10.hsd1.ca.comcast.net] has joined #go-nuts 06:30 -!- GuilhermeCunha [n=guilherm@unaffiliated/guilhermecunha] has joined #go-nuts 06:31 -!- mitchellh [n=mitchell@12.33.1.80] has joined #go-nuts 06:33 -!- outrageousness [n=andrewz@c-76-25-166-1.hsd1.co.comcast.net] has joined #go-nuts 06:34 -!- rrr [i=rrr@gateway/gpg-tor/key-0x9230E18F] has joined #go-nuts 06:34 -!- codedread [i=180dd699@gateway/web/freenode/x-xscbrrlziifcamxa] has quit ["Page closed"] 06:35 -!- hipe [n=hipe@pool-74-101-72-105.nycmny.east.verizon.net] has quit [Read error: 104 (Connection reset by peer)] 06:36 -!- alexsuraci [n=Alex@pool-71-188-133-67.aubnin.fios.verizon.net] has quit [Remote closed the connection] 06:37 -!- Ibw [n=isaac@cpe-67-241-42-134.twcny.res.rr.com] has quit [Remote closed the connection] 06:38 < Gracenotes> digging through the compiler source about interface checks. I think I'm finally at the checking method, but I think I yet have more WTFs to utter 06:45 -!- hipe [n=hipe@pool-74-101-72-105.nycmny.east.verizon.net] has joined #go-nuts 06:46 < hstimer> Is this how you declare a map from string to vector of strings? map[string][2]string 06:46 -!- idm [n=i3dmaste@216.239.45.130] has quit [Client Quit] 06:47 < KirkMcDonald> [2]string isn't really a "vector" of strings. 06:47 < hstimer> sorry, not vector. array 06:48 < KirkMcDonald> Then yes, that's correct. 06:48 < hstimer> is this how you statically assign? "amd64":{"6g", "6l"}, 06:49 -!- mitchellh [n=mitchell@12.33.1.80] has quit ["Leaving."] 06:49 -!- jordyd [n=jordyd@99-177-65-75.lightspeed.wepbfl.sbcglobal.net] has quit ["Leaving"] 06:50 < Gracenotes> hstimer: you need types 06:50 < Gracenotes> codemac: okay.. I've considered the specs. haven't looked to closely at the source. Now the thing is, what does a pointer to an interface mean? 06:50 -!- mitchellh [n=mitchell@12.33.1.80] has joined #go-nuts 06:50 < Gracenotes> an interface is itself a reference 06:50 < KirkMcDonald> Gracenotes: An interface might contain a value. 06:50 < Gracenotes> what you've have to do is make the variable declared as the interface, and then take a pointer from that 06:51 < Gracenotes> *take the variable 06:51 < Gracenotes> the type *Foo is itself not an interface, even if Foo is 06:51 -!- timmcd [n=Adium@97-117-100-106.slkc.qwest.net] has left #go-nuts [] 06:51 < Gracenotes> if Bar is a struct that implements Foo, then ******Bar implements Foo. But *Foo cannot be implemented 06:53 < hstimer> KirkMcDonald: I get an error with this: var m = map[string][2]string{ "a":{"b", "c"} } 06:53 < Gracenotes> it seems unusual, but if you have an interface, what you're saying is "I have an object that has some subset of this method set". That method set is accessible from any number of pointer indirections 06:53 < KirkMcDonald> hstimer: map[string][2]string{"a": [2]string{"b", "c"}} 06:53 < hstimer> KirkMcDonald: ah... thank you 06:54 < Gracenotes> that might be an object of concern, of course, if you're casting from an interface 06:55 -!- mkanat [n=mkanat@c-67-188-1-39.hsd1.ca.comcast.net] has quit ["Bye!"] 06:55 -!- mizai [n=mizai@164.107.141.200] has quit [Read error: 110 (Connection timed out)] 06:56 -!- mizai [n=mizai@rhou-164-107-213-187.resnet.ohio-state.edu] has joined #go-nuts 06:57 -!- illya77 [n=illya77@136-174-113-92.pool.ukrtel.net] has joined #go-nuts 06:57 < Gracenotes> although... 06:57 < Gracenotes> > var w io.Writer = &os.Stdout 06:57 < rndbot> <Error: **os.File is not io.Writer, Write(p []uint8) (n int, err os.Error)> 06:57 -!- Popog [n=Adium@pool-71-121-200-233.sttlwa.dsl-w.verizon.net] has joined #go-nuts 06:57 -!- mitchellh [n=mitchell@12.33.1.80] has quit ["Leaving."] 06:59 < Gracenotes> I don't think that should happen, according to the specs 06:59 -!- Zeffrin [n=zeffrin@203.141.132.221.static.zoot.jp] has quit ["home time yay"] 07:00 < anticw> sure it should 07:01 < Gracenotes> eh? you might be thinking of the rule of only following one level of dereferencing... but this is about type-checking and method sets, not selectors 07:01 < Gracenotes> oh, perhaps not. "The method set of the corresponding pointer type *T is the set of all methods with receiver *T or T." 07:02 < Gracenotes> shame. scratch everything else, then. it is orthogonal to the selector rule anyway 07:04 -!- chachan [n=chachan@ccscliente156.ifxnetworks.net.ve] has quit [Read error: 113 (No route to host)] 07:05 < Gracenotes> I'm not quite sure whether to think the type system is seriously effed up, or an ingenious work of post-modern art. or both. 07:06 -!- mejja [n=user@c-49b6e555.023-82-73746f38.cust.bredbandsbolaget.se] has quit [Remote closed the connection] 07:07 -!- Rob_Russell [n=chatzill@206-248-157-156.dsl.teksavvy.com] has quit [Read error: 113 (No route to host)] 07:09 -!- tricky [i=___@dsl-241-156-177.telkomadsl.co.za] has joined #go-nuts 07:13 -!- Popog [n=Adium@pool-71-121-200-233.sttlwa.dsl-w.verizon.net] has quit ["Leaving."] 07:19 -!- mizai [n=mizai@rhou-164-107-213-187.resnet.ohio-state.edu] has quit [Read error: 104 (Connection reset by peer)] 07:20 -!- armence_ [n=armence@c-67-188-229-128.hsd1.ca.comcast.net] has quit [Client Quit] 07:24 -!- The_Doctor [n=The_Doct@cpe-98-150-247-183.hawaii.res.rr.com] has joined #go-nuts 07:27 -!- triplez [n=triplez@116.197.205.204] has quit [Read error: 110 (Connection timed out)] 07:31 -!- Perberos [n=Perberos@190.49.60.203] has joined #go-nuts 07:32 -!- BMeph [n=black_me@65.103.151.24] has joined #go-nuts 07:32 -!- pshahmumbai [n=prashant@59.164.24.56] has quit ["Ex-Chat"] 07:34 -!- BleSS [n=quassel@87.223.179.242] has joined #go-nuts 07:35 < BleSS> what advantage could have the go concurrency model vs to using epoll() for asynchronous network programming? 07:36 < hstimer> easier to manage state 07:36 < hstimer> in go you can just block but still let a jillion other things happen in other go routines 07:37 < BleSS> that's cool 07:43 -!- BMeph [n=black_me@65.103.151.24] has quit [Read error: 104 (Connection reset by peer)] 07:48 < sahazel> how do I make assertions in go? 07:51 -!- triplez [n=triplez@116.197.205.204] has joined #go-nuts 07:53 -!- lambo4jos [n=chatzill@c-76-126-250-10.hsd1.ca.comcast.net] has quit ["ChatZilla 0.9.85 [Firefox 3.5.5/20091102152451]"] 07:54 < KirkMcDonald> sahazel: Manually. 07:55 -!- aho [n=nya@e183149150.adsl.alicedsl.de] has quit ["EXEC_over.METHOD_SUBLIMATION"] 07:59 -!- shoafb [n=The_Doct@cpe-98-150-247-183.hawaii.res.rr.com] has joined #go-nuts 08:01 -!- werdan7 [n=w7@freenode/staff/wikimedia.werdan7] has quit [SendQ exceeded] 08:02 -!- tricky [i=___@dsl-241-156-177.telkomadsl.co.za] has quit [Read error: 104 (Connection reset by peer)] 08:02 -!- tricky [i=___@dsl-241-156-177.telkomadsl.co.za] has joined #go-nuts 08:02 -!- JSharpe2 [n=jamie@5adaea9f.bb.sky.com] has joined #go-nuts 08:17 -!- The_Doctor [n=The_Doct@cpe-98-150-247-183.hawaii.res.rr.com] has quit [Read error: 113 (No route to host)] 08:18 -!- roo [n=w7@freenode/staff/wikimedia.werdan7] has quit [SendQ exceeded] 08:19 -!- JSharpe [n=jamie@5adaeaa9.bb.sky.com] has quit [Read error: 110 (Connection timed out)] 08:19 -!- mikejs [n=me@mikej.st] has joined #go-nuts 08:20 -!- malkomalko [n=malkomal@66-234-41-82.nyc.cable.nyct.net] has joined #go-nuts 08:21 -!- Zeffrin [n=no@110-175-179-56.tpgi.com.au] has joined #go-nuts 08:21 -!- niekie [i=quasselc@dreamworld.bergnetworks.com] has joined #go-nuts 08:25 -!- melba [n=blee@unaffiliated/lazz0] has joined #go-nuts 08:25 < uriel> Gracenotes: now yes 08:28 < sahazel> hm 08:29 < sahazel> so I've written a package, and I'm trying to import it from my main program 08:29 -!- BleSS [n=quassel@87.223.179.242] has left #go-nuts ["http://quassel-irc.org - Chat comfortably. Anywhere."] 08:29 < sahazel> which says "can't find import" 08:29 < sahazel> how do I tell it where to find the package? (it's in the same directory...) 08:32 < KirkMcDonald> sahazel: Pass -I. to the compiler. 08:32 < sahazel> I tried that, it didn't work 08:32 < KirkMcDonald> The options must go before the filenames. 08:32 < sahazel> ah 08:32 < sahazel> there we go 08:33 < sahazel> thanks KirkMcDonald 08:34 < uriel> shoafb: if the package is in the same directory, you can do import "./foo" 08:34 < shoafb> ? 08:34 < uriel> (and then you don't need to pass -I to the compiler AFAIK) 08:34 -!- djanderson [n=dja@hltncable.pioneerbroadband.net] has quit [Read error: 110 (Connection timed out)] 08:34 < uriel> sorry, that was for sahazel 08:34 < shoafb> uriel: I think you mean sahazel 08:34 < shoafb> lol 08:34 < shoafb> but that is good to know 08:34 * uriel just woke up, and my little broken brain is not even fully on 08:35 * shoafb is possibly a little pissed on cheap wine coolers after a friends birthday and thus does not blame uriel for anything :-) 08:36 < uriel> anyone tried this: http://github.com/mattn/go-gtk ? 08:37 -!- temme [n=kcollins@pool-173-71-105-240.cmdnnj.fios.verizon.net] has joined #go-nuts 08:38 < shoafb> wow.. that.. might be the fastest port i've ever seen... though i suppose go is close enough to C / C++ you could automate most of the translation 08:39 -!- triplez_ [n=triplez@124.197.75.170] has joined #go-nuts 08:40 -!- mwoods79 [n=mwoods79@c-98-239-44-209.hsd1.la.comcast.net] has quit [] 08:40 < shoafb> oh.. haha.. nvm 08:41 -!- p0g0__ [n=pogo@unaffiliated/p0g0] has quit [Read error: 60 (Operation timed out)] 08:41 < GuilhermeCunha> have package of IDE in Debian 5.0 ? 08:41 < shoafb> I thought it was done or nearly so... source reveals otherwise 08:41 -!- temme [n=kcollins@pool-173-71-105-240.cmdnnj.fios.verizon.net] has quit [Remote closed the connection] 08:43 -!- nomism [n=nomism@e179243127.adsl.alicedsl.de] has joined #go-nuts 08:43 -!- nomism [n=nomism@e179243127.adsl.alicedsl.de] has left #go-nuts ["Verlassend"] 08:44 -!- cpr420 [n=cpr@67.165.199.143] has quit ["Ex-Chat"] 08:44 < KirkMcDonald> uriel: It is my experience with other languages that it is best for the code to be completely ignorant of the details of your build environment. 08:44 < KirkMcDonald> So something like import "./foo" seems like a bad idea. 08:46 -!- triplez [n=triplez@116.197.205.204] has quit [Read error: 60 (Operation timed out)] 08:46 < KirkMcDonald> See also this issue I submitted: http://code.google.com/p/go/issues/detail?id=347 08:47 -!- elmar [n=elmar@dslb-188-097-069-083.pools.arcor-ip.net] has joined #go-nuts 08:54 -!- p0g0__ [n=pogo@206.28.52.212] has joined #go-nuts 08:54 -!- wollw [n=wollw4@75-101-22-68.dsl.dynamic.sonic.net] has quit [Read error: 104 (Connection reset by peer)] 08:54 -!- wollw [n=wollw4@75-101-22-68.dsl.dynamic.sonic.net] has joined #go-nuts 08:55 < uriel> KirkMcDonald: to me it seems like a good idea, anything that removes information from your build environment is IMHO 08:57 < uriel> (one thing I love about the plan9 build system is that I don't need to pass any -l flags to the compiler 08:58 < KirkMcDonald> You should be able to use the same code in an alternative build environment without alteration. 08:59 < uriel> sure, and as long as the files stay together, it will work 09:00 < KirkMcDonald> As long as the compiled packages stay next to the source, you mean. 09:00 -!- Raziel2p [n=Raziel2p@88.89.66.63] has quit [Read error: 110 (Connection timed out)] 09:04 -!- cpr420 [n=cpr420@67.165.199.143] has joined #go-nuts 09:13 -!- peter-k [n=petergre@117.136.19.5] has joined #go-nuts 09:14 < peter-k> hi 09:16 -!- shoafb [n=The_Doct@cpe-98-150-247-183.hawaii.res.rr.com] has quit ["Leaving..."] 09:18 -!- The_Doctor [n=The_Doct@cpe-98-150-247-183.hawaii.res.rr.com] has joined #go-nuts 09:25 < uriel> hi peter-k 09:25 < peter-k> hi uriel 09:26 < peter-k> where are you from 09:31 < uriel> does it matter? 09:32 -!- hipe_ [n=hipe@pool-74-101-72-105.nycmny.east.verizon.net] has joined #go-nuts 09:32 < peter-k> it doesn't matter nuts 09:32 < peter-k> :) 09:32 -!- hipe [n=hipe@pool-74-101-72-105.nycmny.east.verizon.net] has quit [Read error: 104 (Connection reset by peer)] 09:33 < peter-k> let's be crazy 09:33 -!- jda2000 [n=jda2000@host-208-117-123-72.beyondbb.com] has quit ["Leaving"] 09:37 < halfdan> peter-k obviously is chinese 09:40 < peter-k> why? 09:40 < peter-k> why you say so halfdan? 09:41 < peter-k> hi hallsa 09:42 < peter-k> hi halfdan,you saw my address? 09:43 -!- ukl [n=ukl@f053122017.adsl.alicedsl.de] has joined #go-nuts 09:44 -!- Popog [n=Adium@pool-71-121-200-233.sttlwa.dsl-w.verizon.net] has joined #go-nuts 09:48 -!- peter-k [n=petergre@117.136.19.5] has left #go-nuts [] 09:48 -!- binaryjohn [n=binaryjo@cpe-24-30-132-50.san.res.rr.com] has joined #go-nuts 09:53 -!- nomism [n=nomism@e179254190.adsl.alicedsl.de] has joined #go-nuts 09:54 -!- cpr420 [n=cpr420@67.165.199.143] has quit ["Vision[0.9.7-H-090423]: i've been blurred!"] 09:57 -!- cmatei [n=cmatei@95.76.26.166] has joined #go-nuts 10:04 -!- Anders_ [n=Anders@c83-253-2-206.bredband.comhem.se] has joined #go-nuts 10:07 -!- Popog [n=Adium@pool-71-121-200-233.sttlwa.dsl-w.verizon.net] has quit ["Leaving."] 10:07 -!- Anders__ [n=Anders@c83-253-2-206.bredband.comhem.se] has joined #go-nuts 10:09 -!- triplez [n=triplez@124.197.75.170] has quit [] 10:17 -!- ukl [n=ukl@f053122017.adsl.alicedsl.de] has quit ["leaving"] 10:18 -!- slashus2 [n=slashus2@74-137-26-8.dhcp.insightbb.com] has quit [] 10:19 -!- Fl1pFl0p [i=flipflop@unaffiliated/fl1pfl0p] has quit [Read error: 60 (Operation timed out)] 10:24 -!- Nanoo [n=Nano@95-89-198-45-dynip.superkabel.de] has joined #go-nuts 10:26 -!- Anders_ [n=Anders@c83-253-2-206.bredband.comhem.se] has quit [Read error: 110 (Connection timed out)] 10:29 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"] 10:29 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 10:32 -!- KillerX [n=anant@gentoo/developer/KillerX] has quit ["Leaving."] 10:32 -!- KillerX [n=anant@59.92.128.97] has joined #go-nuts 10:35 -!- maacl_ [n=mac@0x573526c8.virnxx17.dynamic.dsl.tele.dk] has joined #go-nuts 10:43 -!- Spaghettini [n=Spaghett@vaxjo6.150.cust.blixtvik.net] has quit [Read error: 60 (Operation timed out)] 10:45 -!- outrageousness [n=andrewz@c-76-25-166-1.hsd1.co.comcast.net] has quit [Remote closed the connection] 10:53 -!- KillerX [n=anant@gentoo/developer/KillerX] has quit ["Leaving."] 10:54 -!- Anders_ [n=Anders@c83-253-2-206.bredband.comhem.se] has joined #go-nuts 10:54 -!- Anders_ [n=Anders@c83-253-2-206.bredband.comhem.se] has quit [Client Quit] 10:59 -!- maacl [n=mac@0x573526c8.virnxx17.dynamic.dsl.tele.dk] has quit [Read error: 110 (Connection timed out)] 11:05 -!- Adys [n=Adys@unaffiliated/adys] has joined #go-nuts 11:09 -!- KillerX [n=anant@59.92.128.97] has joined #go-nuts 11:09 -!- malkomalko [n=malkomal@66-234-41-82.nyc.cable.nyct.net] has quit [] 11:11 -!- The_Doctor [n=The_Doct@cpe-98-150-247-183.hawaii.res.rr.com] has quit ["Leaving..."] 11:12 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"] 11:12 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 11:21 -!- maacl [n=mac@0x573526c8.virnxx17.dynamic.dsl.tele.dk] has quit [] 11:22 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"] 11:23 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 11:25 -!- geocalc [n=geocalc@lns-bzn-22-82-249-111-165.adsl.proxad.net] has quit [Remote closed the connection] 11:27 -!- murodes1 [n=James@124-169-42-199.dyn.iinet.net.au] has left #go-nuts [] 11:29 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"] 11:29 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 11:29 -!- GeoBSD [n=geocalc@lns-bzn-22-82-249-111-165.adsl.proxad.net] has joined #go-nuts 11:35 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"] 11:35 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 11:37 -!- hipe_ [n=hipe@pool-74-101-72-105.nycmny.east.verizon.net] has quit [Remote closed the connection] 11:38 -!- ivan` [n=ivan@unaffiliated/ivan/x-000001] has quit ["Coyote finally caught me"] 11:38 -!- ivan` [n=ivan@unaffiliated/ivan/x-000001] has joined #go-nuts 11:40 -!- __ed [i=bitch@anal-co.it] has quit [Read error: 60 (Operation timed out)] 11:40 -!- maacl [n=mac@0x573526c8.virnxx17.dynamic.dsl.tele.dk] has joined #go-nuts 11:40 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 11:41 -!- simonz05 [n=simon@143.84-49-89.nextgentel.com] has joined #go-nuts 11:43 -!- teedex [n=teedex@204.14.155.161] has quit [Remote closed the connection] 11:44 -!- XniX23 [n=XniX23@we.will.never-be.afraid.org] has joined #go-nuts 11:44 -!- pennywise913 [n=gary@71-220-183-214.bois.qwest.net] has joined #go-nuts 11:46 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"] 11:46 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 11:47 -!- pennywise913 [n=gary@71-220-183-214.bois.qwest.net] has quit [Client Quit] 11:49 -!- mono_ [n=mono@173.69.138.47] has joined #go-nuts 11:49 -!- pennywise1968 [n=gary@71-220-183-214.bois.qwest.net] has joined #go-nuts 11:49 -!- Rob_Russell [n=chatzill@206-248-157-156.dsl.teksavvy.com] has joined #go-nuts 11:52 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"] 11:52 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 11:54 -!- Xavier [i=kintoen@bitchx/dev/eth0] has joined #go-nuts 11:57 -!- tomestla [n=tom@78.251.132.63] has joined #go-nuts 11:57 -!- mythz [n=mythz@5ac47b17.bb.sky.com] has joined #go-nuts 11:58 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"] 11:59 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 12:00 < mythz> does anyone know how fast or scalable the http server is? is it competitive with nginx for serving static files? does it scale well i.e. handle a lot of concurrent connections? 12:01 < uriel> mythz: I doubt it can currently compare with nginx, but given that golang.org runs it, it seems fairly good given how new it is... 12:02 < uriel> still, like the rest of Go, there is still much low hanging fruit regarding both performance and functionality 12:03 -!- maacl [n=mac@0x573526c8.virnxx17.dynamic.dsl.tele.dk] has quit [] 12:04 -!- tomestla1 [n=tom@78.251.132.63] has joined #go-nuts 12:05 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"] 12:05 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 12:05 -!- tomestla [n=tom@78.251.132.63] has quit [Read error: 104 (Connection reset by peer)] 12:05 -!- Guest45631 [n=irc@209.17.191.58] has joined #go-nuts 12:06 -!- msbranco [n=msbranco@64-172.61-188.cust.bluewin.ch] has joined #go-nuts 12:08 -!- ryniek [n=Adrian-A@host-89-231-98-162.warszawa.mm.pl] has joined #go-nuts 12:08 < ryniek> hi evrbdy 12:09 < uriel> hi ryniek 12:11 < exch> lo 12:11 -!- jophish [n=jophish@hermi.gotadsl.co.uk] has joined #go-nuts 12:12 < uriel> hullo exch! 12:12 < exch> hey 12:13 < exch> gotta love learning a new code library. I keep finding new functions in the standard Go lib for all sorts of small tasks 12:14 < uriel> yea, it is quite impressive the amount of stuff hidden on the Go libs... 12:14 -!- path[l] [n=path@115.240.107.42] has joined #go-nuts 12:15 -!- Makavel [n=eddw@hoasb-ff08dd00-36.dhcp.inet.fi] has quit ["Leaving"] 12:15 -!- __ed [i=bitch@anal-co.it] has quit [Read error: 60 (Operation timed out)] 12:15 -!- triplez [n=triplez@cm52.sigma225.maxonline.com.sg] has joined #go-nuts 12:16 < exch> should I be worried about this? http://gopaste.org/view/oK9JB specifically the ToFloat() and FromFloat() bits in the end. FromFloat() seems to create some minor floating point rounding errors. 12:16 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 12:16 < exch> it's only the red component that goes from 254 to 253 in this case 12:17 -!- brunov [n=bruno@190.191.110.64] has joined #go-nuts 12:17 < uriel> hmmm... not sure really, sorry 12:20 -!- tomestla1 [n=tom@78.251.132.63] has quit [Read error: 104 (Connection reset by peer)] 12:21 -!- tomestla [n=tom@78.251.132.63] has joined #go-nuts 12:21 -!- pennywise1968 [n=gary@71-220-183-214.bois.qwest.net] has quit [Client Quit] 12:22 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"] 12:22 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 12:24 < s_mosher> exch, you're doing multiply then truncate, right? 12:24 < exch> indeed 12:25 < s_mosher> I think you can get away with multiply, add .5 and then truncate 12:25 < exch> the type conversion requires me to do: r = byte(floatred * 255); 12:25 < exch> mm could try that 12:26 < s_mosher> in practice add .1 will probably do it 12:26 < exch> nice. .1 did the trick 12:27 -!- maacl [n=mac@0x573526c8.virnxx17.dynamic.dsl.tele.dk] has joined #go-nuts 12:28 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"] 12:29 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 12:30 -!- XniX23 [n=XniX23@we.will.never-be.afraid.org] has quit [Remote closed the connection] 12:40 -!- wigbold [n=wigbold@dslb-088-073-237-215.pools.arcor-ip.net] has joined #go-nuts 12:41 -!- andrebq [n=andre@bhe201062224176.res-com.wayinternet.com.br] has joined #go-nuts 12:44 -!- r2p2 [n=billy@v32671.1blu.de] has joined #go-nuts 12:44 < andrebq> is there any project to make go talk to other languages, like Java or python? 12:45 < uriel> andrebq: deffine 'talk' 12:45 < huf> json. we done here? :))) 12:46 < andrebq> fine, but json is the data format 12:46 < uriel> andrebq: again, define what you mean by 'talk' 12:47 < TenOfTen> "xml solves everything" ;p (sarcasm) 12:47 < andrebq> i mean something like sopa (but more lightweight) 12:47 < andrebq> *soap 12:47 < uriel> holy fucking christ! 12:47 < uriel> ugh 12:47 < andrebq> a thing that handle function calls 12:47 < uriel> andrebq: so, what problem does soap solve that json doesn't? other than unemployment 12:48 < andrebq> hehehehe 12:48 < andrebq> soap was just an example 12:48 < uriel> soap doesn't handle function calls, it is really no different from json-rpc 12:48 < uriel> andrebq: well, it is not a very good example 12:48 < andrebq> i know 12:48 < andrebq> well, something like java RMI 12:48 < uriel> anyway, there are protocolbuffers for Go, they will come out together with the next public PB release 12:49 < uriel> andrebq: isn't Java RMI pretty much java specific? that would be like gob 12:49 < andrebq> yeah, again just an example 12:49 < uriel> (probably gob is more portable than RMI actually) 12:49 -!- tomestla [n=tom@78.251.132.63] has quit [Read error: 110 (Connection timed out)] 12:49 < andrebq> i already worked with rmi, i just cited 12:49 < uriel> well, if all your examples happen to not really match what you ask for, it is difficult to answer your question 12:50 < andrebq> i see 12:50 < andrebq> corba like functionality 12:50 < uriel> oh dear... 12:50 < andrebq> man, CORBA is a good example 12:50 < uriel> is anyone still insane enough to use corba in this day and age? 12:50 < andrebq> old, but good 12:51 < andrebq> i don't mean to make corba for go 12:51 < uriel> good? is there *anything* good about corba? if so, this is the first time I have ever heard such claim 12:51 < andrebq> i mean make something like corba to go 12:51 < uriel> andrebq: again, do you know what protocolbuffers are? 12:51 -!- wigbold [n=wigbold@dslb-088-073-237-215.pools.arcor-ip.net] has quit [Remote closed the connection] 12:51 < andrebq> no 12:51 < andrebq> never heard about it on go 12:51 * uriel sighs 12:52 < andrebq> i will take a look at it 12:52 < uriel> http://code.google.com/p/protobuf/ 12:55 < andrebq> uriel, protocolbuf is what i tried to get 12:55 < andrebq> thanks 12:55 < andrebq> a sorry for my bad examples 12:56 -!- bubbles [i=heh@89.136.7.211] has joined #go-nuts 12:56 -!- ati [n=ati@88-117-18-229.adsl.highway.telekom.at] has joined #go-nuts 12:59 -!- bubbles [i=heh@89.136.7.211] has left #go-nuts [] 13:00 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"] 13:00 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 13:02 -!- StDan [n=danielb@124-197-59-227.callplus.net.nz] has quit [Connection timed out] 13:05 < dagle> uriel: There was a good thing with cobra, the name. Truely stated that it was poison. 13:06 -!- chachan [n=chachan@ccscliente156.ifxnetworks.net.ve] has joined #go-nuts 13:06 < uriel> dagle: hehe, indeed 13:09 -!- bennabi [n=bennabi@41.104.102.111] has joined #go-nuts 13:14 < uriel> btw, anyone knows if one can see all submited patches to the go repo pending for review? 13:16 < exch> is there a way to make my types work with len()? As in, I have to implement some interface or something? 13:16 < uriel> exch: afaik, no 13:16 < exch> would be nice if I can make my custom collection type work that way instead of list.Count() 13:16 < exch> bummer 13:17 < uriel> I don't think you can use len() for example on vectors... 13:17 < uriel> but I could be wrong... 13:17 < exch> havn't tried that. Probably correct though 13:17 -!- ati [n=ati@88-117-18-229.adsl.highway.telekom.at] has quit [] 13:18 < uriel> len(), like cap() seems to be specific to builtin types, and IMHO that is fine 13:18 < exch> would be nice if len() just accepts anything that implements a Length() int or Count() int method 13:18 -!- JPascal [n=jpascal@95-27-163-164.broadband.corbina.ru] has joined #go-nuts 13:18 < JPascal> How to create a file of any size? 13:18 < exch> suppose that makes it faster, but still. Go is all about convenience :p 13:18 < JPascal> How to create a array of any size? 13:19 < uriel> exch: I'm not sure, then what would be the point? why not just do foo.len() instead of len(foo)? 13:19 < exch> because being able to call len(foo) creates consistency 13:19 < exch> which is something go is lacking in some areas atm 13:20 < uriel> consistence should never come at the expense of simplicity 13:20 < uriel> I think the current way is quite simple 13:20 < uriel> and not really all that inconsistent 13:21 < dagle> I tink it better this way. len(foo) is the length of foo. foo.len() is the length of what is inside foo. 13:21 < uriel> len() is not some abstract thing with arbitrary meaning, is something that tells you the size, for example, len of a string is the number of bytes 13:21 < uriel> dagle: that sounds quite confusing to me 13:21 < exch> that means len() becomes an alias for sizeof() really 13:22 < exch> which is not entirely accurate either.. string is a collection of bytes 13:22 < exch> so in that regard not much different from a collection of Foo's 13:22 < uriel> exch: if you have an array of Foo's you can use len() on the array just fine 13:22 < uriel> (an array, or a slice, etc) 13:22 < exch> yup 13:23 < andrebq> JPascal, you could use a array of any size by using slices 13:23 < uriel> andrebq: I'm not sure of that 13:23 < uriel> all slices refer to an underlying array 13:23 < andrebq> yeah 13:23 < andrebq> so he can use a slice in a func signature 13:24 < uriel> ah, you mean that 13:24 < andrebq> but not to allocate the memory for the array 13:24 < exch> array can only have a constant size.. slices have arbitrary sizes 13:24 < andrebq> yeah, i will explain this for him later 13:24 < uriel> I thought it was a theoreticla question regarding what limit there was on the size of arrays, in which case the same limit will apply to slices.. 13:24 < exch> not considering the cap of the underlying array that is 13:24 < andrebq> yeah 13:25 < andrebq> so he can built or use a list 13:25 < andrebq> and pass inner array of the list to the function 13:25 < andrebq> something like that 13:27 -!- ukl [n=ukl@f053122017.adsl.alicedsl.de] has joined #go-nuts 13:28 -!- noeleon [n=nonr@dsl-58-6-1-160.wa.westnet.com.au] has joined #go-nuts 13:31 -!- bennabi [n=bennabi@41.104.102.111] has left #go-nuts [] 13:39 -!- Anders__ [n=Anders@c83-253-2-206.bredband.comhem.se] has quit [Read error: 110 (Connection timed out)] 13:46 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"] 13:46 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 13:47 -!- JPascal [n=jpascal@95-27-163-164.broadband.corbina.ru] has left #go-nuts [] 13:48 -!- malkomalko [n=malkomal@66-234-41-82.nyc.cable.nyct.net] has joined #go-nuts 13:52 -!- tomestla [n=tom@78.251.247.176] has joined #go-nuts 13:52 -!- ryniek [n=Adrian-A@host-89-231-98-162.warszawa.mm.pl] has left #go-nuts [] 13:57 -!- lesha [n=chatzill@95-28-54-194.broadband.corbina.ru] has joined #go-nuts 14:01 -!- General1337 [n=support@71-84-247-187.dhcp.gldl.ca.charter.com] has joined #go-nuts 14:02 -!- lesha [n=chatzill@95-28-54-194.broadband.corbina.ru] has left #go-nuts [] 14:03 -!- cat-alex [n=chatzill@95-28-54-194.broadband.corbina.ru] has joined #go-nuts 14:03 -!- rickardm [n=dat99rmo@proxy.se.axis.com] has quit ["Leaving."] 14:05 -!- General13372 [n=support@71-84-247-187.dhcp.gldl.ca.charter.com] has quit [Read error: 60 (Operation timed out)] 14:06 -!- brunov [n=bruno@190.191.110.64] has quit [Read error: 110 (Connection timed out)] 14:07 -!- cat-alex [n=chatzill@95-28-54-194.broadband.corbina.ru] has left #go-nuts [] 14:07 -!- cat-alex [n=chatzill@95-28-54-194.broadband.corbina.ru] has joined #go-nuts 14:08 -!- cat-alex [n=chatzill@95-28-54-194.broadband.corbina.ru] has quit ["ChatZilla 0.9.85 [Firefox 3.0.4/2008102920]"] 14:09 -!- cat-alex [n=chatzill@95-28-54-194.broadband.corbina.ru] has joined #go-nuts 14:11 -!- tor7 [n=tor@c-987a71d5.04-50-6c756e10.cust.bredbandsbolaget.se] has joined #go-nuts 14:13 -!- nomism [n=nomism@e179254190.adsl.alicedsl.de] has quit [Remote closed the connection] 14:14 -!- coax [n=dark@unaffiliated/coax] has quit ["( www.nnscript.com :: NoNameScript 4.21 :: www.esnation.com )"] 14:15 < yiyus> I got tired of writing the braces for one-line if/else's: http://gopaste.org/view/0IqFP 14:16 < exch> :p 14:17 < exch> the beginnings of a preprocessor. Add some #define and generics to it ;) 14:17 < yiyus> nah, i hope to get rid of it as soon as possible 14:17 < yiyus> just got tired of syntax errors 14:18 < yiyus> in fact, i try to write right go code, but i cannot help it 14:23 -!- nomism [n=nomism@e179250169.adsl.alicedsl.de] has joined #go-nuts 14:28 -!- ikke [n=1kk3@unaffiliated/ikkebr] has joined #go-nuts 14:37 < exch> shame. generics would be nice right about now.. recti.go, recti64.go, rectf.go, rectf64.go, point2i.go, point2i64.go, ... -.- zZZ 14:38 < exch> I'm inclined to try my hand at a preprocessor for this myself. How hard can it be? :p 14:39 -!- path[l] [n=path@115.240.107.42] has quit [Read error: 110 (Connection timed out)] 14:42 -!- Am|Work [i=0c81f604@ubuntu/member/Amaranth] has joined #go-nuts 14:44 -!- gislan [n=gislan@host-81-190-16-19.torun.mm.pl] has joined #go-nuts 14:46 < mono_> does anyone know of a simple echo server example 14:46 < mono_> like http://www.python.org/doc/2.5.2/lib/socket-example.html 14:46 < mono_> but for go 14:47 -!- sm [n=sm@cpe-76-173-194-242.socal.res.rr.com] has joined #go-nuts 14:48 -!- thebolt [n=thebolt@217.115.131.45] has joined #go-nuts 14:51 -!- zhaozhou [n=zhaozhou@linfast76.bitnet.nu] has quit [Read error: 113 (No route to host)] 14:52 < uriel> exch: why do you need all those? 14:52 -!- tomestla [n=tom@78.251.247.176] has quit [Read error: 110 (Connection timed out)] 14:53 < exch> I don't /need/ em all at the moment, but it's just an example scenario of some situations i've run across in other projects 14:53 -!- path[l] [n=path@115.240.107.42] has joined #go-nuts 14:53 < uriel> what other projects? 14:53 -!- Zaba [n=zaba@about/goats/billygoat/zaba] has quit [Read error: 110 (Connection timed out)] 14:54 < exch> some work related stuff 14:54 < uriel> i quit using java before they added generics, but of all the things I *reall* hated about java, lack of generics was not oe 14:54 < uriel> one of them 14:54 < exch> generics is one of the things I absolutely love about C#. I really don't understand what you have against em :p 14:55 < uriel> they seem to make languages much more complicated, for a gain I have trouble seeing 14:55 < exch> they make for better, safer and faster binaries. Less code to be written. 14:55 < exch> there simply is no downside 14:55 < uriel> specially in a language with Go's interfaces which are a work of art 14:55 < JBeshir> That's a kinda dubious claim. 14:55 < JBeshir> "better" and "safer" and "faster" in what ways? 14:55 < exch> no type casting leading to potential crashes 14:56 < exch> lack of required type casting to a more general Rect class needs constant (un)boxing 14:56 < uriel> exch: that is silly, I never had any crash from putting the wrong type into a container 14:56 < exch> *-lack 14:56 < uriel> if you have a container, it is rarely ambiguous what kind of stuff goes in it 14:57 < uriel> and if it is, Go's reflection and interface tricks makes it even less of a problem 14:57 < exch> the type assertions required in Go make it highly unpractical to have a generalized container 14:58 < uriel> there is no special magic to make Printf handle all kinds of stuff, and again this cases are quite damned rare 14:58 < exch> not always 14:58 < exch> but in the case of rect/point stuff where you need to perform calculations on the components, Go's system is not ideal 14:58 < uriel> Go already has a few containers in the standard lib, and I see zero problems with them 14:58 < exch> you can't just add an int and an int64 without type assertions 14:59 < uriel> exch: then use one of the other, mixing box is just dumb 14:59 < exch> because those containers don't perform any operations on the actual values contained in them 14:59 -!- ukl [n=ukl@f053122017.adsl.alicedsl.de] has quit ["..."] 14:59 < exch> exactly. you prevent the boxing, you need explicit implementations for each type. 14:59 < exch> which is what generics are for 14:59 < exch> *you=to 15:00 < uriel> if you have a container that performs operations on the values contained, then build them to hold a certain interface which supplies the required functionality to do those manipulations 15:00 < uriel> exch: again, give me a non hypotheticial example 15:00 < exch> right. So write me one that does that on numeric types. I dare you :p 15:00 < uriel> one that does what? 15:01 < exch> the rect or point examples 15:01 -!- nbaum [n=nathan@84.45.115.9] has left #go-nuts [] 15:01 < exch> point.add(otherpoint); point.sub(otherpoint); rect.IntersectsWith(otherrect); etc 15:04 < uriel> so, what is the problem? 15:05 < exch> the problem is that one has to write different versions of the class for every type of value a point or rect can contain. You can't go around that, but you can have the process automated. 15:05 < uriel> but *why* would anyone want that? 15:05 < uriel> it is just silly 15:05 < uriel> pick a type, and use it 15:06 < exch> By automating it using generics, you will also end up with only those versions you actually use in the code, instead of having all versions included by default 15:06 < uriel> excesive gratuitous flexibility seems to be the root of most, if not all evil this days 15:06 < uriel> exch: why do you need more than one version? 15:06 < exch> It just seems you are not completely understanding what generics mean 15:06 < exch> that's not the fault of generics 15:07 < exch> because a general purpose graphics library can operate on more than just ints. it can require rects made of floats, or doubles, or longs. or bytes 15:08 < uriel> there are plenty of general purpose graphics libraries in C, which do *just fine* without this silliness 15:08 < exch> fair enough. I give up :p 15:09 < exch> Perhaps someone who can actually explain things better than I can give it a go :p 15:09 -!- Anusko_ [n=anusko@a83-132-19-244.cpe.netcabo.pt] has joined #go-nuts 15:11 < andrebq> exch, in the given example one could use float for every rect 15:11 < andrebq> since float can hold ints 15:11 < s_mosher> exch, I think interfaces can take care of all that with the right set of access methods. Though I'm not ready to say bad things about generics. 15:11 < exch> that's a bit of a waste 15:11 < andrebq> more or less 15:11 < andrebq> since float and int uses the same space in memory there are no memory waste 15:11 -!- mono_ [n=mono@173.69.138.47] has quit ["Leaving"] 15:12 < thebolt> andrebq: that last part is the important thing though.. ;) you cannot exactly represent every int as a float :P 15:12 < thebolt> (the part about more or less) 15:12 < huf> yep 15:12 < andrebq> this is a point 15:12 < andrebq> really you cannot make all int as float 15:12 < thebolt> uriel: there are many c libs using only floats (or having multiple copies of code, usually using macros to write common parts) 15:13 < thebolt> uriel: but templates in c++ or generics in other langs is useful to avoid having to sacrifice precision and/or rewrite code 15:13 < andrebq> but we are talking about graphics, so probably floats is what we want 15:13 < andrebq> no floats 15:13 < andrebq> *no ints 15:13 < thebolt> not always :P 15:13 < andrebq> but most of the time 15:14 * thebolt is also a graphics and game-physics coder.. ;) 15:14 < andrebq> when we need some int it's more specific 15:14 -!- Anusko [n=anusko@a83-132-19-244.cpe.netcabo.pt] has quit [Nick collision from services.] 15:14 < andrebq> so we can write the operations to int 15:14 -!- Zaba [n=zaba@ip102.148.adsl.wplus.ru] has joined #go-nuts 15:15 < andrebq> thebolt, usually the floats and ints are mixed in the same "collection" 15:15 < uriel> if you want to handle every possible requirement imaginable, you will always end up with a mess, no matter what 15:15 < andrebq> ? 15:15 -!- mbarkhau [n=koloss@p54A7BFD4.dip.t-dialin.net] has joined #go-nuts 15:16 < thebolt> uriel: agree in principle, but somtimes some generality is nice ,) 15:16 < andrebq> i am a big fan of the inheritance of the oo model (both in modeling and programming) 15:16 < andrebq> but go has point 15:16 < andrebq> no long types hierarchy 15:17 < exDM69> but the problem is that most things by nature can't be put into an inheritance hierarchy 15:17 < andrebq> so generality cannot be archived without types hierarchy 15:17 < exDM69> must of the time it's just to work around limitations from the type system 15:17 < Am|Work> The API should use floats but the internal work should be done using ints unless you absolutely need floats 15:18 < Am|Work> That's how cairo works 15:18 < andrebq> exDM69, more or less, in fact it's a problem of how to see things 15:18 < Am|Work> Otherwise you're going to have crappy performance on most ARM 15:18 < thebolt> Am|Work: then you loose both dynamic range and precision at the same time.. great :P 15:18 < uriel> thebolt: sometimes perhaps, but you don't want to make everyone that doesn't need it pay the price for it, again, where you want generality, Go's reflection and interfaces are really powerful 15:19 -!- noeleon [n=nonr@dsl-58-6-1-160.wa.westnet.com.au] has quit [] 15:19 -!- crcx [i=d8012b82@gateway/web/freenode/x-jfuorsmtfnitjosp] has joined #go-nuts 15:19 < thebolt> uriel: yea, i am not arguing for generics in go (yet).. cannot say i have learned the lang well enough yet to have any oppinion on that 15:19 < Am|Work> thebolt: Well the idea is to make the API future proof but optimize the implementation 15:19 -!- noeleon [n=nonr@dsl-58-6-1-160.wa.westnet.com.au] has joined #go-nuts 15:19 < uriel> thebolt: agreed 15:20 -!- Ibw [n=isaac@cpe-67-241-42-134.twcny.res.rr.com] has joined #go-nuts 15:20 < uriel> thebolt: I might even be convinced at some point that they make sense, but all the people making it sound as if it is an obvious required feature are IMHO not thinking very hard about what problem they are trying to solve 15:20 < uriel> Am|Work: nothing is ever 'future proof' 15:20 < Ibw> If I originally pulled released from the repo, does that mean that every time I run hg pull -u, I'm only pulling the latest release, and NOT the bleading edge tip? 15:20 < tor7> floats in graphics work tend to end up with numeric precision issues, deep down in the rasteriser all the code I've seen work with fixed precision ints 15:21 < uriel> (and Go interfaces get you damned close to being 'future proof', compared to pretty much any other language I know) 15:21 < uriel> Ibw: no, I think you are updating to the tip if you do pull -u 15:21 < thebolt> tor7: that is usually for performance (software performance, and chip-space when doing hw implementations), not numeric precision 15:22 < Am|Work> tor7: That too 15:25 < tor7> thebolt: depends if you talk 2d or 3d graphics 15:26 < tor7> stroking bezier paths for instance 15:26 -!- melba [n=blee@unaffiliated/lazz0] has quit ["MICROSOFT WORD IS A FUN GAME"] 15:27 -!- Cyanure [n=cyanure@212-198-164-142.rev.numericable.fr] has quit [Read error: 104 (Connection reset by peer)] 15:28 < tor7> and you don't want leaks when scan converting a general polygon 15:29 < thebolt> sure 15:29 < tor7> performance is also a big reason though, just not the only one :) 15:31 < thebolt> you can do non-leaky fp rasterizing also though, just that you have to be careful with rounding modes etc 15:32 -!- sliceofpi1 [n=Adium@c-98-194-205-176.hsd1.tx.comcast.net] has quit [SendQ exceeded] 15:33 -!- Anders_ [n=Anders@c83-253-2-206.bredband.comhem.se] has joined #go-nuts 15:33 -!- sliceofpi [n=Adium@c-98-194-205-176.hsd1.tx.comcast.net] has joined #go-nuts 15:34 -!- crashR [n=crasher@codextreme.pck.nerim.net] has quit ["Leaving."] 15:36 -!- malkomalko [n=malkomal@66-234-41-82.nyc.cable.nyct.net] has quit [Read error: 104 (Connection reset by peer)] 15:37 -!- malkomalko [n=malkomal@66-234-41-82.nyc.cable.nyct.net] has joined #go-nuts 15:39 -!- karpar [n=karpar@58.253.169.20] has joined #go-nuts 15:44 -!- cat-alex [n=chatzill@95-28-54-194.broadband.corbina.ru] has quit [Remote closed the connection] 15:45 -!- msbranco [n=msbranco@64-172.61-188.cust.bluewin.ch] has quit [Read error: 60 (Operation timed out)] 15:45 < uriel> tor7: any chance to get Xrender working with xgb? 15:47 -!- msbranco [n=msbranco@64-172.61-188.cust.bluewin.ch] has joined #go-nuts 15:48 < tor7> uriel: yeah, it compiles if you run the gengo.py script on render.xml but the requests don't send the right opcode for extensions. it needs a bit of work but shouldn't be too hard. 15:50 < uriel> ah, cool 15:58 -!- sm_ [n=sm@cpe-76-173-194-242.socal.res.rr.com] has joined #go-nuts 16:06 -!- hipe [n=hipe@pool-74-101-72-105.nycmny.east.verizon.net] has joined #go-nuts 16:09 -!- maacl [n=mac@0x573526c8.virnxx17.dynamic.dsl.tele.dk] has quit [] 16:11 -!- djanderson [n=dja@hltncable.pioneerbroadband.net] has joined #go-nuts 16:11 -!- fgb_ [i=bef6552d@gateway/web/freenode/x-tecokrvjiaijjytf] has joined #go-nuts 16:14 -!- sm__ [n=sm@cpe-76-173-194-242.socal.res.rr.com] has joined #go-nuts 16:14 -!- sm [n=sm@cpe-76-173-194-242.socal.res.rr.com] has quit [Read error: 110 (Connection timed out)] 16:15 -!- sm_ [n=sm@cpe-76-173-194-242.socal.res.rr.com] has quit [Read error: 110 (Connection timed out)] 16:17 -!- triplez_ [n=triplez@cm52.sigma225.maxonline.com.sg] has joined #go-nuts 16:18 -!- hipe [n=hipe@pool-74-101-72-105.nycmny.east.verizon.net] has quit [Read error: 104 (Connection reset by peer)] 16:18 -!- hipe [n=hipe@pool-74-101-72-105.nycmny.east.verizon.net] has joined #go-nuts 16:19 -!- nomism [n=nomism@e179250169.adsl.alicedsl.de] has quit [Remote closed the connection] 16:21 -!- triplez [n=triplez@cm52.sigma225.maxonline.com.sg] has quit [Read error: 60 (Operation timed out)] 16:21 -!- KillerX [n=anant@gentoo/developer/KillerX] has quit ["Leaving."] 16:22 -!- fgb_ [i=bef6552d@gateway/web/freenode/x-tecokrvjiaijjytf] has quit ["Page closed"] 16:25 -!- GeoBSD [n=geocalc@lns-bzn-22-82-249-111-165.adsl.proxad.net] has quit [Remote closed the connection] 16:27 -!- skelterjohn [n=jasmuth@c-71-58-123-111.hsd1.nj.comcast.net] has joined #go-nuts 16:28 -!- Nanoo [n=Nano@95-89-198-45-dynip.superkabel.de] has quit ["Leaving"] 16:28 -!- seymour [i=mike@dsl-244-104-31.telkomadsl.co.za] has joined #go-nuts 16:29 -!- seymour [i=mike@dsl-244-104-31.telkomadsl.co.za] has quit [Client Quit] 16:29 -!- path[l]_ [n=path@115.240.110.19] has joined #go-nuts 16:34 -!- maacl [n=mac@0x573526c8.virnxx17.dynamic.dsl.tele.dk] has joined #go-nuts 16:35 -!- directrixx [n=aleksand@ip68-231-189-247.tc.ph.cox.net] has joined #go-nuts 16:38 < Whtiger> I'm thinking of making a simple bot in Go, and I'd like to be able to recompile a command Go file, and then reload it without restarting the entire bot? (if that makes sense) 16:39 < exch> gio doesn't support runtime compilation the way you want it 16:39 < exch> *go 16:39 < exch> you can call the external compiler, but there is no way to link the resulting binary into your program 16:39 < Whtiger> hm. 16:40 < exch> your best bet is to use a scripting language wrapper. I think there's a LUA wrapper floating around 16:40 < exch> hardly ideal, but the only solution i'm afraid 16:40 < Whtiger> hm hm. okay. 16:42 < exch> if you have a nice plugin interface setup for your LUA scripts, it'll do the job equally well, although I'm not sure how stable the wrapper is atm 16:42 < exch> last I checked it was missing some parts of the API 16:43 < Whtiger> okay, thank you. 16:43 -!- Nanoo [n=Nano@95-89-198-45-dynip.superkabel.de] has joined #go-nuts 16:44 < exch> CFunctions seem to work though, so interacting with lua scripts is possible 16:44 < uriel> Whtiger: why not just exec yourself into the new version of the bot? 16:45 < exch> that would only be nice if you could transfer the existing connecting along with it 16:45 < exch> *connection 16:46 < Whtiger> yeah. I don't want to restart the entire bot (connection, etc) 16:46 -!- thebolt [n=thebolt@217.115.131.45] has left #go-nuts [] 16:46 < uriel> hmmm... don't fds stay open across exec? 16:47 -!- Am|Work [i=0c81f604@ubuntu/member/Amaranth] has quit [Ping timeout: 180 seconds] 16:47 < exDM69> uriel: aren't fd's process-specific? 16:47 < exch> dunno. May be worth investigating 16:47 -!- qbit_ [n=qbit_@c-75-71-160-106.hsd1.co.comcast.net] has joined #go-nuts 16:48 < Whtiger> I'm not really sure how to investigate that 16:49 < uriel> exDM69: ?? when you exec() you don't end any process 16:50 -!- path[l] [n=path@115.240.107.42] has quit [Read error: 110 (Connection timed out)] 16:50 < Whtiger> but you start a process which don't have the new fds? 16:50 < Innominate> i can't say I remember how it worked, but some muds do/did just that 16:51 < uriel> Whtiger: the only way to start a new process in Unix is to fork() 16:52 -!- cat-alex [n=chatzill@95-28-54-194.broadband.corbina.ru] has joined #go-nuts 16:53 < Innominate> But it's essentially exec() and then reusing the old fds 16:53 < Whtiger> I have no idea how to see if I can do that 16:57 < Innominate> The basic idea is, create a tempfile which contains the file descriptors and any state info for them, then exec() your program with some flag to it knows it's being hotbooted so it can load the tempfile and restore it's state 16:58 < Innominate> Whether not it's doable in go i have no clue 16:59 < Whtiger> I guess I don't know enough about file descriptors and state infos in order to save them to a file >_< 16:59 < exch> that's what we have google for :p 17:00 < Whtiger> to ze google then! 17:00 -!- hstimer [n=hans@c-98-234-25-125.hsd1.ca.comcast.net] has quit ["Leaving..."] 17:01 < Innominate> file descriptors are just integers, and state info is just whatever you need to know about that connection 17:02 -!- alexsuraci` [n=alex@pool-71-188-133-67.aubnin.fios.verizon.net] has joined #go-nuts 17:02 -!- dextro_ [n=dex@94.75.205.177] has joined #go-nuts 17:03 < exch> I suppose it makes sense. There is a reason why you always need to explicitely close any FD's, Just closing your process won't do that for you 17:03 < Gracenotes> uriel: oh, hi 17:04 < Gracenotes> rndbot's source → http://code.google.com/p/go-bot/ 17:04 < Innominate> closing the process will close the fd's, but what exec does is replace the current process with whatever you're running 17:04 -!- dextro_ [n=dex@94.75.205.177] has left #go-nuts [] 17:04 < exch> hmm 17:04 < exch> neat 17:04 -!- pdusen [n=pdusen@crob4-55.flint.umich.edu] has joined #go-nuts 17:05 < Innominate> creating a new process is done using fork() then exec() 17:05 < Whtiger> Gracenotes: oo, thank you. 17:05 -!- karpar [n=karpar@58.253.169.20] has quit [] 17:06 -!- lolsuper_ [n=super_@unaffiliated/lolsuper-/x-9881387] has joined #go-nuts 17:07 -!- lolsuper_ [n=super_@unaffiliated/lolsuper-/x-9881387] has quit [Read error: 104 (Connection reset by peer)] 17:07 < Clooth> http://www.youtube.com/watch?v=Qnx5hbb0vQI 17:07 < uriel> Gracenotes: cool, added a link to it 17:08 < uriel> Clooth: spam? 17:09 -!- cat-alex [n=chatzill@95-28-54-194.broadband.corbina.ru] has quit [Remote closed the connection] 17:10 < Clooth> ? 17:10 < Clooth> no 17:10 < Clooth> just showing it 17:11 < Clooth> I apologize though 17:11 < Clooth> I didn't know amsg went cross-network 17:13 -!- triplez [n=triplez@cm52.sigma225.maxonline.com.sg] has quit [] 17:13 -!- lolsuper_ [n=super_@unaffiliated/lolsuper-/x-9881387] has joined #go-nuts 17:14 -!- triplez [n=triplez@cm52.sigma225.maxonline.com.sg] has joined #go-nuts 17:14 < Gracenotes> uriel: I'm trying to submit some minor fixes, but mercurial gives me "abort: HTTP Error 502: Bad Gateway". grrrrr 17:14 < uriel> ugh 17:15 -!- mitchellh [n=mitchell@12.33.1.80] has joined #go-nuts 17:15 < Gracenotes> okay, now it says Success \o/ 17:17 < uriel> congrats :) 17:17 -!- mitchellh [n=mitchell@12.33.1.80] has quit [Client Quit] 17:18 -!- prip [n=_prip@host163-122-dynamic.32-79-r.retail.telecomitalia.it] has quit [Read error: 110 (Connection timed out)] 17:19 -!- maacl [n=mac@0x573526c8.virnxx17.dynamic.dsl.tele.dk] has quit [] 17:19 -!- prip [n=_prip@host62-134-dynamic.42-79-r.retail.telecomitalia.it] has joined #go-nuts 17:20 -!- binaryjohn [n=binaryjo@cpe-24-30-132-50.san.res.rr.com] has quit [] 17:20 < Gracenotes> uriel: if you like, you can also update the link from the pastebin in Pure Go Code.. the IRC library is still viable by itself, although it's compiled straight into the main package :) 17:20 -!- bennabi [n=bennabi@41.104.102.111] has joined #go-nuts 17:20 < uriel> ah, where should I link it to? 17:21 -!- binaryjohn [n=binaryjo@cpe-24-30-132-50.san.res.rr.com] has joined #go-nuts 17:21 < Gracenotes> hm.. it will likely stay at http://code.google.com/p/go-bot/source/browse/irc.go 17:22 < Gracenotes> every part of the bot has its own sort of module (or, I guess, will have).. some of which might make sense to offshoot. 17:23 < uriel> sounds good 17:26 < Gracenotes> I have one right now that prints an AST in Haskell-ADT-like format 17:27 -!- Perberos [n=Perberos@190.49.60.203] has quit [Remote closed the connection] 17:27 < Gracenotes> > t, ok := parser.ParseFile("", "package rawr\n" "type Foo interface { Bar; Func() int }\n" "type Bar interface { String() string }\n" "type Baz struct { A; bar B; string }\n", 0); fmt.Printf("%#v", t) 17:27 < rndbot> &ast.File{Doc:(*ast.CommentGroup)(nil), Position:token.Position{Filename:"", Offset:0, Line:1, Column:1}, Name:(*ast.Ident)(0xb7... 17:28 < Gracenotes> which isn't so useful 17:29 < Gracenotes> so what I produce is slightly more readable, depending on your experience with Haskell ADTs 17:29 -!- JPascal [n=jpascal@195.239.8.22] has joined #go-nuts 17:29 < Gracenotes> -> File {Name = "rawr", Decls = [GenDecl {Tok = type, Specs = [TypeSpec {Name = "Foo", Type = InterfaceType [Field {Names = nil, Type = Ident "Bar"}, Field {Names = ["Func"], Type = FuncType {Params = nil, Results = [Field {Names = nil, Type = Ident "int"}]}}]}]}, [...] 17:30 -!- Zaba_ [n=zaba@about/goats/billygoat/zaba] has joined #go-nuts 17:30 < uriel> neat 17:30 -!- teedex [n=teedex@204.14.155.161] has joined #go-nuts 17:30 < Gracenotes> which is just parroting, ignoring positioning information, the AST, to see its structure better 17:31 < Gracenotes> I'm considering not including 'nil' field names, though 17:31 -!- cat-alex [n=chatzill@95-28-54-194.broadband.corbina.ru] has joined #go-nuts 17:31 -!- binaryjohn [n=binaryjo@cpe-24-30-132-50.san.res.rr.com] has quit [] 17:32 -!- brunov [n=bruno@190.191.110.64] has joined #go-nuts 17:33 -!- sm [n=sm@cpe-76-173-194-242.socal.res.rr.com] has quit [] 17:33 -!- bennabi [n=bennabi@41.104.102.111] has left #go-nuts [] 17:35 -!- binaryjohn [n=binaryjo@cpe-24-30-132-50.san.res.rr.com] has joined #go-nuts 17:36 -!- crcx [i=d8012b82@gateway/web/freenode/x-jfuorsmtfnitjosp] has quit ["Page closed"] 17:37 -!- binaryjohn [n=binaryjo@cpe-24-30-132-50.san.res.rr.com] has quit [Client Quit] 17:38 < JPascal> When I parse template by package template and template contain javascript I take a error.... (unmatched opening delimiter). How fix it? 17:38 -!- armence [n=armence@c-67-188-229-128.hsd1.ca.comcast.net] has joined #go-nuts 17:41 < alexsuraci`> JPascal: it's because the template lib uses braces as delimeters. either change that (I believe there's a config for it) or bring in your JS with a script tag 17:42 -!- Zaba [n=zaba@about/goats/billygoat/zaba] has quit [Read error: 110 (Connection timed out)] 17:42 -!- chachan [n=chachan@ccscliente156.ifxnetworks.net.ve] has quit ["KVIrc Insomnia 4.0.0, revision: , sources date: 20090520, built on: 2009/06/06 11:44:47 UTC http://www.kvirc.net/"] 17:45 -!- teedex [n=teedex@204.14.155.161] has quit [Remote closed the connection] 17:46 -!- maacl [n=mac@0x573526c8.virnxx17.dynamic.dsl.tele.dk] has joined #go-nuts 17:47 -!- Xavi [n=Xavi@66-191-181-152.dhcp.gnvl.sc.charter.com] has joined #go-nuts 17:49 -!- jordyd [n=jordyd@99-177-65-75.lightspeed.wepbfl.sbcglobal.net] has joined #go-nuts 17:49 -!- slashus2 [n=slashus2@74-137-26-8.dhcp.insightbb.com] has joined #go-nuts 17:49 -!- hipe_ [n=hipe@pool-74-101-72-105.nycmny.east.verizon.net] has joined #go-nuts 17:50 -!- beneth` [n=beneth`@beneth.fr] has quit ["leaving"] 17:52 -!- teedex [n=teedex@204.14.155.161] has joined #go-nuts 17:52 -!- hipe [n=hipe@pool-74-101-72-105.nycmny.east.verizon.net] has quit [Read error: 104 (Connection reset by peer)] 17:53 -!- maacl [n=mac@0x573526c8.virnxx17.dynamic.dsl.tele.dk] has quit [] 17:55 -!- brunov [n=bruno@190.191.110.64] has quit [Read error: 110 (Connection timed out)] 17:56 < Ibw> vector.NewIntVector still work? 18:01 -!- codehai [n=codehai@xdsl-78-34-33-104.netcologne.de] has joined #go-nuts 18:03 < Gracenotes> does Vector still have that frustrating capacity-must-be-entirely-filled bug? 18:04 < uriel> Gracenotes: is there an issue for it? 18:04 < Ibw> no, it doesn't work... There was some discussion on this before. How do I make a vector now? 18:04 < Gracenotes> uh. I meant to fill one out.. preferably with a patch :) 18:06 -!- mjard [n=k@70.114.138.168] has quit [Read error: 113 (No route to host)] 18:07 < Gracenotes> hm, is there still the bug where you can check arrays for nil-equality? 18:07 < Gracenotes> > var blah [2]string; fmt.Print(blah == nil) 18:07 < rndbot> <Error: use of untyped nil> 18:07 < alexsuraci`> Ibw: new(vector.IntVector) I believe 18:08 < Gracenotes> > var foo, bar [2]string; fmt.Print(foo == bar) 18:08 < rndbot> <Error: invalid operation: foo == bar (type [2]string == [2]string)> 18:08 < Ibw> alexsuraci`: Then do I need to give it a size? 18:08 < alexsuraci`> they axed the New[...] functions, just use new(vector.Foo).Resize(a, b) 18:08 < alexsuraci`> Ibw: yep 18:08 < Ibw> alright, thanks 18:09 < Ibw> what are the arguments in resize? 18:09 < Ibw> interface and size? 18:09 < Ibw> no 18:09 < Gracenotes> there is no size. only capacity. 18:10 < Gracenotes> or you could say they're conflated 18:10 < Ibw> there is length and capacity. Does capacity really matter though? 18:11 -!- BleSS [n=quassel@87.223.179.242] has joined #go-nuts 18:12 -!- cankoy [n=cankoy@94.54.22.84] has joined #go-nuts 18:12 < alexsuraci`> Ibw: actually, not sure you even need to call Resize 18:12 < Gracenotes> the length may or may not be where the "last" element is. the capacity is always greater than the length 18:12 < exch> oh man. I feel dirty. I just came up with a way to hack on templates with type constraints using Go's interface system. It is an absolute abomination though and I suspect Uriel will blow a fuse. Rightfully so in this case ;) 18:12 -!- andrebq [n=andre@bhe201062224176.res-com.wayinternet.com.br] has quit ["Ex-Chat"] 18:13 < alexsuraci`> don't thiknk you do 18:13 -!- BleSS [n=quassel@87.223.179.242] has left #go-nuts ["http://quassel-irc.org - Chat comfortably. Anywhere."] 18:14 < Gracenotes> although.. looking at the source, perhaps it is somewhat fixed. :/ let me see 18:14 < exch> "type Point<T:INumber> struct { X, Y T }" does have something magical though :p 18:17 -!- bennabi [n=bennabi@41.104.102.111] has joined #go-nuts 18:17 -!- hstimer [n=hans@70.90.170.37] has joined #go-nuts 18:19 -!- malkomalko [n=malkomal@66-234-41-82.nyc.cable.nyct.net] has quit [] 18:20 -!- rares [n=rares@c-69-143-38-77.hsd1.va.comcast.net] has joined #go-nuts 18:24 -!- rares [n=rares@c-69-143-38-77.hsd1.va.comcast.net] has quit [Client Quit] 18:26 -!- cat-alex [n=chatzill@95-28-54-194.broadband.corbina.ru] has quit [Read error: 110 (Connection timed out)] 18:27 -!- maacl [n=mac@0x573526c8.virnxx17.dynamic.dsl.tele.dk] has joined #go-nuts 18:28 -!- Fl1pFl0p [i=flipflop@unaffiliated/fl1pfl0p] has joined #go-nuts 18:28 -!- cat-alex [n=chatzill@95-28-54-194.broadband.corbina.ru] has joined #go-nuts 18:28 -!- clearscreen [n=clearscr@e248070.upc-e.chello.nl] has quit [Remote closed the connection] 18:29 -!- sm [n=sm@pool-71-104-89-96.lsanca.dsl-w.verizon.net] has joined #go-nuts 18:29 -!- hipe_ [n=hipe@pool-74-101-72-105.nycmny.east.verizon.net] has quit [Read error: 104 (Connection reset by peer)] 18:30 -!- hipe [n=hipe@pool-74-101-72-105.nycmny.east.verizon.net] has joined #go-nuts 18:30 < Ibw> @eval make([]int, 10) 18:30 -!- aho [n=nya@g227083183.adsl.alicedsl.de] has joined #go-nuts 18:30 < rndbot> [0 0 0 0 0 0 0 0 0 0] 18:32 < Ibw> exch: Why would uriel care? 18:33 < exch> he's vehemently opposed to anything template or generics related :) 18:39 < Gracenotes> even if generics compiles down to interface{}s and casts, the only difference being that the safety of the latter is ensued, I'd be fine with it 18:39 -!- illya77 [n=illya77@136-174-113-92.pool.ukrtel.net] has quit [Read error: 60 (Operation timed out)] 18:40 -!- codehai [n=codehai@xdsl-78-34-33-104.netcologne.de] has quit [Client Quit] 18:40 < Gracenotes> a more performant (is that a word?) generics system might be nice, but.. well.. I suppose that should get done somewhat soon if it's to be done at all. 18:40 < exch> templates are easy and clean to implement. The type constraints require a measure of extra code work to make them work. Which does mean making sure any types passed as T implement the interface specified as constraint 18:43 < exch> it's all preprocessor work though. The resulting code would be no different than when written manually. The point of the constraints is to supply a compile-time mechanism to catch invalid type usage. The problem with that is that it becomes useless after compilation and will just be bloat 18:43 < drhodes> performant is a word, I've heard it spoken by more than one person! 18:44 -!- alexsuraci [n=Alex@pool-71-188-133-67.aubnin.fios.verizon.net] has joined #go-nuts 18:45 -!- lotrpy [n=lotrpy@202.38.97.230] has joined #go-nuts 18:45 < uriel> ah, C++ template errors are so wondeful! 18:45 < drhodes> speaking of generics, I found a paper detailing the breakdown of between 6 language (importantly java and haskell) here: http://www.osl.iu.edu/publications/prints/2003/comparing_generic_programming03.pdf 18:46 < drhodes> *of generics^^ 18:47 < Gracenotes> uriel: C++ templates are performant, though :) 18:47 < exch> ah yes. the errors are abysmal 18:47 < Zaba> so you want things to be zomg fasta fasta and programmers to suffer? 18:47 < uriel> they are performant, yes, they perform masochistic rites 18:47 < Gracenotes> at the cost of binary size, and any sane attempt at comprehensibility 18:47 -!- hcatlin [n=hcatlin@host81-154-246-241.range81-154.btcentralplus.com] has joined #go-nuts 18:48 -!- ikke [n=1kk3@unaffiliated/ikkebr] has quit [Read error: 60 (Operation timed out)] 18:49 -!- maacl [n=mac@0x573526c8.virnxx17.dynamic.dsl.tele.dk] has quit [] 18:49 < Gracenotes> the operational semantics of generics, whatever they are, should not negatively affect the denotational aspects. In such an ad-hoc type system like Go's, who knows if the latter is worth preserving, but, anyway :) 18:49 -!- qbit_ [n=qbit_@c-75-71-160-106.hsd1.co.comcast.net] has quit ["WinPants!"] 18:50 < Gracenotes> there is so much you can get done without generics. the main exception being containers. 18:51 < vsmatck1> The template errors could be very nice in C++. But concepts were deferred until standard after next. 18:51 -!- maacl [n=mac@0x573526c8.virnxx17.dynamic.dsl.tele.dk] has joined #go-nuts 18:51 < vsmatck1> Bad errors are not inherent to templates in other words. 18:52 < exch> it will all work fine without templates/generics. The point is just to reduce the amount of boilerplate on behalf of the programmer. If done properly, it can also reduce the binary size because instead of different implementations of a class for any and all possible types, it will only include those actually being used. 18:52 < vsmatck1> Also, you don't increase binary size with templates automatically. The programmer fully controls it. 18:52 < vsmatck1> Actually, I need to think about that last thing I said. 18:53 < vsmatck1> I suppose if you implement a generic container, for example, in C in an untypesafe way you could use different types in a container without the extra binary size. 18:53 -!- hcatlin [n=hcatlin@host81-154-246-241.range81-154.btcentralplus.com] has quit [] 18:53 < Gracenotes> vsmatck1: I was talking about C++ templates 18:53 < vsmatck1> I don't know! 18:54 < exch> I think the bloat comes in with things like type constraints 18:54 < Gracenotes> when I said "cost of binary size". As for confusing errors, so much of that could have been alleviated by keeping typedefs around for just a bit longer after compilation :/ 18:54 -!- alexsuraci [n=Alex@pool-71-188-133-67.aubnin.fios.verizon.net] has quit [Remote closed the connection] 18:54 < Gracenotes> even if only for the sake of errors 18:55 -!- alexsuraci` [n=alex@pool-71-188-133-67.aubnin.fios.verizon.net] has quit [Read error: 113 (No route to host)] 18:55 -!- blindmatrix [n=sven@193.11.112.141] has joined #go-nuts 18:55 -!- lotrpy [n=lotrpy@202.38.97.230] has quit [] 18:56 < blindmatrix> I have a fix for a problem regarding using maps in templates, I've read the contrib documentation but I don't understand how to get a reviewer, can I leave that empty or what should I specify there? 18:56 < vsmatck1> Are you familiar with the c++ concepts proposal? It'd be nice to have something like concepts but automatic. So the compiler could give an error like, "my_obj requires named function print() to be used with template" or something. 18:57 < vsmatck1> And then it could also give you the line number of where the specialization failed. 18:57 < Gracenotes> will concepts end up using a data structure for each instance? 18:57 < Gracenotes> along the lines of the record implementation of typeclasses in Haskell? 18:57 < Gracenotes> because that is a good solution, I think 18:57 -!- facemelter [n=facemelt@87.61.163.3] has quit [Read error: 60 (Operation timed out)] 18:58 < Gracenotes> I am familiar with concepts as they compare to typeclasses. the syntax, not /as/ much 18:58 < vsmatck1> Naw, I think it will be only at compile time. Concepts let you specify what operators and named functions a class has to have to be used with a template. 18:58 -!- facemelter [n=facemelt@87.61.163.3] has joined #go-nuts 18:59 < vsmatck1> I'm not very familiar with haskell type classes. 18:59 < Gracenotes> yes, the record implementation does use true dynamic dispatch. however, these dispatches are resolved if the types are definitely known at compile time 19:00 < Gracenotes> on the behalf of the callers, that is; it's transparent to the instance itself. 19:00 < vsmatck1> *reads up on it* 19:01 < blindmatrix> vsmatck1: Was the comment on concepts related to what I wrote? 19:01 < vsmatck1> Naw, I was thinking about the binary size thing. :) 19:02 < blindmatrix> Okay, that was before I joined then ^^ 19:03 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"] 19:03 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 19:03 -!- cat-alex [n=chatzill@95-28-54-194.broadband.corbina.ru] has quit [Read error: 104 (Connection reset by peer)] 19:03 -!- drusepth [n=drusepth@75.50.50.104] has joined #go-nuts 19:04 < Gracenotes> vsmatck1: here is an example. If you have a typeclass AddSub, parameterizing on 'a', and functions that look like (in C-based syntax) a Add(fst a, snd a), a Sub(fst a, snd a) plus a field Zero a. Then, if Int is an instance of AddSub, and you need Zero (Int) - 4 (Int), then you look up the subtract function from a struct and the Zero value from a struct that contains the three elements Add,... 19:04 < Gracenotes> ...Sub, and Zero 19:05 -!- snearch_ [n=olaf@g225055069.adsl.alicedsl.de] has joined #go-nuts 19:05 < vsmatck1> ah, and that happens at run time? 19:05 < Gracenotes> if you know the operations will be applied to Int specifically, you can include a reference to the global Int table. However, if you're not sure (it's just *some* AddSub a), you expect to have such a table passed to you 19:05 < vsmatck1> In C++ I can't imagine a situation where it would need to happen at run time. 19:05 < Gracenotes> the user doesn't have to deal with the tables at all 19:06 < Gracenotes> it's what typeclasses more-or-less compile to. You'll need runtime resolution if you're working with an arbitrary AddSum, not specific one 19:06 < Gracenotes> which, as you know, is impossible to do with templates: if it's not compiled for a specific type, it doesn't get compiled at all 19:07 < vsmatck1> In C++ you just end up getting a bunch of different AddSum functions in your binary. So I see what you're saying about binary size now. 19:08 < vsmatck1> In C++ it is compiled for specific types. Hmm. 19:08 < vsmatck1> Those types may be polymorphic though. 19:09 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"] 19:09 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 19:10 < Gracenotes> interface implementation it is effectively duck-typed in C++. You don't know if a type Int implements AddSub until you copy and paste Int wherever 'a' appears. The compiler might complain "Int doesn't have field Zero" as part of 'normal' compilation 19:10 -!- ikke [n=1kk3@unaffiliated/ikkebr] has joined #go-nuts 19:10 < vsmatck1> Yeah, then you get the wonderful 70 pages of error messages when your type doesn't support subtract. :-/ 19:11 < shambler> Gracenotes, yeah, thats why there is type classes in haskell and they're almost got to the new C++ standard 19:11 < vsmatck1> Seems like run time checking would be a lot more flexible and nicer for the programmer. At the expense of some performance. 19:11 < Gracenotes> although the template analogy doesn't entirely hold.. for templates, you are accessing fields and methods that belong to a class/struct 19:11 -!- alexf [n=alexf@adsl-99-24-248-96.dsl.klmzmi.sbcglobal.net] has quit [Read error: 110 (Connection timed out)] 19:12 < Gracenotes> for concepts and typeclasses, you have functions associated with some generic type, providing a more general structure 19:12 < vsmatck1> Run time checking would also increase compile time performance it seems like. 19:12 -!- alexf [n=alexf@adsl-99-35-9-200.dsl.klmzmi.sbcglobal.net] has joined #go-nuts 19:13 < mythz> is there a future language features roadmap or survey for go we can vote on somewhere? cause I think a lot more people would feel more comfortable if they knew that generics and exceptions were on its way as I think they are the only 2 major features lacking atm 19:13 -!- Spaghettini [n=Spaghett@vaxjo6.150.cust.blixtvik.net] has joined #go-nuts 19:13 < Gracenotes> you just need a table lookup, since that is what actually contains the functions. Lower-level transformations may just reference functions directly, so long as you know the type (no runtime resolution needed). I'm not *too* sure about this Haskell-wise 19:14 < Gracenotes> and, it goes without saying, everything needs to be typechecked, because you are applying functions to values blindly.. they need to have the same type, which you ensure earlier :) 19:15 < shambler> ye 19:15 < Gracenotes> mythz: personally, I don't miss exceptions at all, but I am somewhat interested on the generics front. love to see what they think is best for Go's idiosyncratic type system 19:15 -!- path[l] [n=path@115.240.110.19] has quit [Connection timed out] 19:15 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"] 19:16 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 19:18 < mythz> well exceptions would make for cleaner code as it would lead to a cleaner api and you wouldn't need the boilerplate error handling code everytime 19:19 < mythz> but agreed that I would prefer generics over exceptions 19:19 < Gracenotes> try/catch is not much more boilerplate than if err != nil { ... } 19:20 < mythz> you only need try/catch if you wanted to handle the error, otherwise let it throw and catch/log it in the main loop 19:22 < Gracenotes> ah. I do like having control over the call stack, personally 19:23 < kimelto> morning! 19:23 < uriel> mythz: wrong, exceptions would be a mess 19:23 -!- Anders_ [n=Anders@c83-253-2-206.bredband.comhem.se] has quit [Read error: 110 (Connection timed out)] 19:24 < mythz> ?? 19:24 < uriel> exceptions are like doing camefrom, control jumps around randomly 19:24 < mythz> thats the first time i've heard that. Exceptions cater for the error path 19:24 < exch> I'm not missing exceptions really. The only thing I was looking for was a finally{} type thing, but 'defer' seems to handle that nicely 19:24 < uriel> plus apis become much more complex because not only they have to declare their arguments and returns, but also what they might and might not throw 19:25 < uriel> exch: I really like defer 19:25 < exch> ya me to 19:25 < uriel> simple, clean, effective 19:25 < Gracenotes> mythz: hm.. not quite all error paths 19:25 < uriel> wonder if there are any other languages with something like defer 19:25 < Gracenotes> uriel: there are, but they occur in blocks 19:25 < mythz> when do they need to declare what they throw? the return value would not include an error code everytime. 19:26 < exch> it;'s the first time i've seen it.. Though it's a finally{} block without the mess 19:26 < uriel> explicit error handling is the only sane error handling 19:26 < Gracenotes> like python's with. which needs predefined defers for the objects it operates on 19:27 < uriel> exch: yea, I often don't use finally in languages that have it because it is such a hideous mess 19:27 < exch> :p 19:27 < uriel> Gracenotes: ugh, python's with is a mess 19:27 < exch> I do, but it could have been done cleaner 19:27 -!- drusepth [n=drusepth@75.50.50.104] has quit [Read error: 104 (Connection reset by peer)] 19:28 < mythz> almost all go code i've seen requires the subsequent call to check for an error code, log it than exit. it would be a lot cleaner if you didn't have to do that and with exceptions you don't 19:28 < Gracenotes> oh, try/finally came in handy the other day in Java. it was a reasonably clean solution, for the set of solutions likely available 19:29 < mythz> i think c# using/IDisposable is a much cleaner method of cleaning up resources 19:30 -!- jbauer [n=jbauer@adsl-99-176-8-19.dsl.lsan03.sbcglobal.net] has joined #go-nuts 19:30 < exch> it is nice to have, but as you say. it requires the class implements IDisposable 19:30 < Ibw> mythz: You can mix the function call and error check into an if statement, which is a bit cleaner 19:30 < exch> Just syntactical sugar for a a try/finally block though 19:31 < Gracenotes> well, the usage pattern around it. the interface by itself doesn't promote good practices. 19:31 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"] 19:31 < Ibw> i.e. if err := functionCall() ; err != nil { //bad } 19:31 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 19:31 < mythz> which increases code readability and because its effortless would make sure lazy programmers always use it 19:33 < mythz> lbw: yeah a little nicer 19:33 -!- cmatei [n=cmatei@95.76.26.166] has quit [Remote closed the connection] 19:33 < mythz> can u still deal with the return value in the above code? 19:33 -!- alexsuraci` [n=alex@pool-71-188-133-67.aubnin.fios.verizon.net] has joined #go-nuts 19:34 -!- loureiro [n=loureiro@201008194213.user.veloxzone.com.br] has joined #go-nuts 19:35 < Gracenotes> Disposable would be trivial to implement with Go's interfaces. But anyway, the idea of the runtime system taking over the call stack seems bit unnecessary, and very often out of control. How does the python mantra go, explicit is better than implicit? 19:35 < Gracenotes> not to mention, "Errors should never pass silently" :) 19:35 < mythz> exactly, using/IDisposables still throw 19:36 < Gracenotes> explicit silencing in Go would be equivalent to giving err an _ 19:36 < mythz> but you want the program to quit 19:36 < Gracenotes> then panic 19:36 < mythz> and output exactly where the error was most of the time 19:37 < Gracenotes> > panic("omfg") 19:37 < rndbot> omfg 19:37 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"] 19:37 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 19:38 -!- JPascal [n=jpascal@195.239.8.22] has left #go-nuts [] 19:38 < Gracenotes> or just os.Exit :) Anyway, if you get used to it, you might find it's not such an odd way to do things at all. I mostly work in languages that doesn't widely use throw/catch mechanisms, and it's fine by me 19:38 < Gracenotes> anyway, shower -.- brb 19:41 < mythz> yeah so it requires a little more boiler plate. anyways i can live with error codes. lack of Generics OTOH... go collections help a bit but when you need generics and don't have it the only real alternative is to code for every required type yourself. 19:42 -!- qbit_ [n=qbit_@c-75-71-160-106.hsd1.co.comcast.net] has joined #go-nuts 19:44 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"] 19:44 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 19:45 -!- path[l] [n=path@115.240.40.187] has joined #go-nuts 19:45 < Ibw> It's so funny to see all the people around the internets flaming Go, when they obviously haven't even looked at golang.org or written a hello world program. 19:46 -!- rlee [n=richard@c-24-16-196-84.hsd1.wa.comcast.net] has joined #go-nuts 19:46 < Ibw> They just say, oh this is stupid because there are already programming languages out there, and they don't stop to think that maybe people at Google know what they're doing... 19:48 < exch> the argument 'there are already plenty of languages out there' really pisses me off. I got that a few days ago. Seriously, with an attitude like that I expect them to still use assembly code, cos it gets the job done just as fine as c/jave/python/whatever else 19:48 < exch> hell, punch cards will prolly be their cup of tea I suspect 19:48 < mythz> i actually go actually fills a niche quite nicely. simple native language with garbage collection and other nicities like support for strings/collections/threading already the go programs are a lot nicer than their C/C++ equivalents. 19:49 < shambler> those people don't like to learn 19:49 < uriel> Ibw: many people at google don't know what they are doing, look at wave for example, on the other hand, to say that ken doens't know what he is doing is a quite funny thing for anyone to say.. 19:49 -!- teedex [n=teedex@204.14.155.161] has quit [Remote closed the connection] 19:50 < exch> the fact that Go has builtin support for unicode strings raises it head and shoulders above any other systems program language 19:50 < Ibw> uriel: You're not a fan of Wave? 19:50 < exch> I love the concept of wave, but it needs a little work :p 19:51 < uriel> Ibw: I think just a few things are wrong with it: the idea, the concept, the design, the implementation, the protocol, the user interface, ... and probably a few other things I'm forgetting about 19:51 < Ibw> mm, I haven't taken a close enough look to have an opinion 19:51 < mythz> yeah i think wave is technically brilliant but have found little use for it in day-to-day activities 19:51 < uriel> each of those things are in wave some of the worst examples you can find in the whole software industry 19:51 < exch> example? 19:52 < uriel> anyway, sorry, offtopic again, and I get carried away by this 19:53 -!- teedex [n=teedex@204.14.155.161] has joined #go-nuts 19:56 -!- nonet [n=nonet@c-69-181-203-73.hsd1.ca.comcast.net] has joined #go-nuts 19:56 -!- nonet [n=nonet@c-69-181-203-73.hsd1.ca.comcast.net] has quit ["Leaving."] 19:57 -!- rlee [n=richard@c-24-16-196-84.hsd1.wa.comcast.net] has quit ["do people chat in irc when i'm not there????"] 20:03 -!- zimbatm [i=zimbatm@stan.oree.ch] has joined #go-nuts 20:04 -!- TankND [n=thomaszi@EV1-DSL-74-83-9-175.fuse.net] has joined #go-nuts 20:05 -!- zuser [n=nonet@c-69-181-203-73.hsd1.ca.comcast.net] has joined #go-nuts 20:06 -!- zuser [n=nonet@c-69-181-203-73.hsd1.ca.comcast.net] has left #go-nuts [] 20:08 < Ibw> man, I just forgot what my function did, and I wrote it half an hour ago... and it's really long... 20:10 -!- blindmatrix [n=sven@193.11.112.141] has quit ["leaving"] 20:10 -!- Fl1pFl0p [i=flipflop@unaffiliated/fl1pfl0p] has quit [] 20:11 -!- Anders_ [n=Anders@c83-253-2-206.bredband.comhem.se] has joined #go-nuts 20:12 -!- bennabi [n=bennabi@41.104.102.111] has quit [Read error: 110 (Connection timed out)] 20:17 -!- jbauer [n=jbauer@adsl-99-176-8-19.dsl.lsan03.sbcglobal.net] has quit [Remote closed the connection] 20:23 -!- lux` [n=lux@151.54.240.211] has joined #go-nuts 20:24 -!- maacl_ [n=mac@0x573526c8.virnxx17.dynamic.dsl.tele.dk] has joined #go-nuts 20:24 -!- mikedee_ [n=quassel@91.111.24.173] has quit [Read error: 60 (Operation timed out)] 20:25 -!- mikedee [n=quassel@91.108.72.57] has joined #go-nuts 20:29 -!- directrixx [n=aleksand@ip68-231-189-247.tc.ph.cox.net] has quit [Read error: 110 (Connection timed out)] 20:31 < exch> yay. templates are working 20:32 -!- brunov [n=bruno@190.191.110.64] has joined #go-nuts 20:33 -!- Raziel2p [n=Raziel2p@ti0032a380-dhcp0316.bb.online.no] has joined #go-nuts 20:34 -!- hector [n=chatzill@client-86-0-126-58.nrth.adsl.virginmedia.com] has joined #go-nuts 20:36 -!- hcatlin [n=hcatlin@host81-154-246-241.range81-154.btcentralplus.com] has joined #go-nuts 20:36 < alexsuraci`> exch: neat! any samples? 20:37 < exch> I'll post some when I clean it up a bit 20:37 < alexsuraci`> alright 20:37 -!- maacl_ [n=mac@0x573526c8.virnxx17.dynamic.dsl.tele.dk] has quit [] 20:37 < exch> it's not particularly 'best practise' proof though and has quite a few limitations 20:37 < exch> I think this might even raise the term 'hack' to a new level. 20:38 < alexsuraci`> haha, at least it's something functional 20:40 -!- cankoy [n=cankoy@94.54.22.84] has quit ["ChatZilla 0.9.85 [Firefox 3.5.4/20091016092926]"] 20:42 -!- kitallis [n=kitallis@122.162.5.168] has joined #go-nuts 20:43 -!- iwikiwi [n=iwikiwi@121.247.120.153] has joined #go-nuts 20:44 -!- path[l] [n=path@115.240.40.187] has quit [Read error: 110 (Connection timed out)] 20:46 -!- hcatlin [n=hcatlin@host81-154-246-241.range81-154.btcentralplus.com] has quit [] 20:46 -!- alexsuraci [n=Alex@pool-71-188-133-67.aubnin.fios.verizon.net] has joined #go-nuts 20:46 < iwikiwi> hi, im having trouble installing Go on osx. At the end of the building, the process seems to have hanged after --- cd ../test. I don't "see N known bugs; 0 unexpected bugs" 20:47 -!- codedread [i=180dd699@gateway/web/freenode/x-swpjrkpfnsmdrfvv] has joined #go-nuts 20:47 -!- maacl [n=mac@0x573526c8.virnxx17.dynamic.dsl.tele.dk] has quit [Read error: 110 (Connection timed out)] 20:48 < iwikiwi> the problem seems to be with top result: "34866- 8.out 51.9 17:50.87 1 0 21 17 176K 240K 400K" 20:48 < iwikiwi> which is in test/ 20:49 -!- kitallis [n=kitallis@122.162.5.168] has quit ["Lost terminal"] 20:49 -!- slashus2 [n=slashus2@74-137-26-8.dhcp.insightbb.com] has quit [] 20:50 < Gracenotes> iwikiwi: if you can get ./make.bash working, the tests don't matter so much 20:53 < iwikiwi> Gracenotes: alright, let me see 20:54 < iwikiwi> Gracenotes: thanks, my echo $? returns a 0. :) 20:57 -!- bennabi [n=bennabi@41.104.68.217] has joined #go-nuts 20:57 < bennabi> hello, how do you read from stdin ? 20:57 < bennabi> equivalent of scanf in C ? 20:57 < bennabi> syscall.Read(0, s) ? 20:58 -!- Cyanure [n=cyanure@212-198-164-142.rev.numericable.fr] has joined #go-nuts 21:00 < jordyd> Is there a way to run a command via exec.Run() in the background? 21:01 -!- iwikiwi_ [n=iwikiwi@121.247.120.153] has joined #go-nuts 21:01 -!- iwikiwi_ [n=iwikiwi@121.247.120.153] has quit [Client Quit] 21:02 -!- codedread [i=180dd699@gateway/web/freenode/x-swpjrkpfnsmdrfvv] has quit ["Page closed"] 21:03 -!- bennabi [n=bennabi@41.104.68.217] has left #go-nuts [] 21:04 -!- iwikiwi [n=iwikiwi@121.247.120.153] has quit [Read error: 60 (Operation timed out)] 21:06 < anticw> jordyd: go func() { ... } (); 21:06 < KirkMcDonald> Starting a command with exec.Run doesn't block. 21:06 < KirkMcDonald> Unless you p.Wait() on it. 21:08 -!- ako [n=nya@f051147015.adsl.alicedsl.de] has joined #go-nuts 21:09 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"] 21:09 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts 21:14 -!- mjard [n=k@70.114.138.168] has joined #go-nuts 21:14 -!- aho [n=nya@g227083183.adsl.alicedsl.de] has quit [Read error: 60 (Operation timed out)] 21:16 -!- Popog [n=Adium@pool-71-121-200-233.sttlwa.dsl-w.verizon.net] has joined #go-nuts 21:18 < Ibw> can slices be compared with = ? if so, what does it really compare? 21:19 < KirkMcDonald> "A slice value may only be compared explicitly against nil." http://golang.org/doc/go_spec.html#Comparison_compatibility 21:28 -!- simonz05 [n=simon@143.84-49-89.nextgentel.com] has quit ["Ex-Chat"] 21:30 -!- Xavi [n=Xavi@66-191-181-152.dhcp.gnvl.sc.charter.com] has quit [Remote closed the connection] 21:31 -!- HeavensRevenge [n=quassel@CPE001d0fe73b7d-CM00111ae5c642.cpe.net.cable.rogers.com] has joined #go-nuts 21:31 -!- Nanooo [n=Nano@95-89-198-45-dynip.superkabel.de] has joined #go-nuts 21:31 -!- Xavi [n=Xavi@66-191-181-152.dhcp.gnvl.sc.charter.com] has joined #go-nuts 21:32 -!- Xavi [n=Xavi@66-191-181-152.dhcp.gnvl.sc.charter.com] has quit [Client Quit] 21:34 -!- Nanoo [n=Nano@95-89-198-45-dynip.superkabel.de] has quit [Nick collision from services.] 21:35 -!- Nanooo [n=Nano@95-89-198-45-dynip.superkabel.de] has quit [Client Quit] 21:35 -!- Nanoo [n=Nano@95-89-198-45-dynip.superkabel.de] has joined #go-nuts 21:37 -!- nether [n=user@1.pool85-53-25.dynamic.orange.es] has joined #go-nuts 21:37 -!- nether [n=user@1.pool85-53-25.dynamic.orange.es] has quit [Client Quit] 21:39 -!- path[l] [n=path@115.240.75.242] has joined #go-nuts 21:44 -!- cpr420 [n=cpr420@67.165.199.143] has joined #go-nuts 21:46 -!- Makavel [n=eddw@hoasb-ff08dd00-36.dhcp.inet.fi] has joined #go-nuts 21:51 -!- Haxar [n=ia64@force.dreamhost.com] has joined #go-nuts 21:51 -!- amuck [n=amuck@h124.153.190.173.ip.windstream.net] has quit [] 21:52 -!- Zeffrin [n=no@110-175-179-56.tpgi.com.au] has quit [] 21:56 -!- Anders_ [n=Anders@c83-253-2-206.bredband.comhem.se] has quit [Read error: 110 (Connection timed out)] 21:57 -!- Kibiz0r1 [n=Adium@99-48-204-31.lightspeed.brhmmi.sbcglobal.net] has joined #go-nuts 22:00 < uriel> wow, just counted them, and there are now at least 27 libraries written in Go: http://go-lang.cat-v.org/pure-go-libs 22:01 -!- nuggien [n=Adium@c-71-198-205-240.hsd1.ca.comcast.net] has joined #go-nuts 22:01 < exch> going well 22:01 < drhodes> here's a "generic" btree using type assertions, fwiw: http://www.gopaste.org/view/Lo6sr 22:02 -!- Nanoo [n=Nano@95-89-198-45-dynip.superkabel.de] has quit ["Leaving"] 22:06 -!- ni| [n=ni|@cpe-72-191-33-69.satx.res.rr.com] has joined #go-nuts 22:06 -!- hector [n=chatzill@client-86-0-126-58.nrth.adsl.virginmedia.com] has quit ["ChatZilla 0.9.85 [Firefox 3.5.5/20091102152451]"] 22:06 -!- rajeshsr [n=rajeshsr@59.92.27.133] has joined #go-nuts 22:07 < rajeshsr> hi 22:07 < rajeshsr> does go have an smtp lib? 22:07 -!- timmcd [n=Adium@97-117-100-106.slkc.qwest.net] has joined #go-nuts 22:07 < timmcd> Hello! 22:08 < timmcd> I am wondering about two things: A) is there any parser/lexxer libraries for Go yet? and B) are Go's regexps decently speedy? 22:08 -!- Xavi [n=Xavi@66-191-181-152.dhcp.gnvl.sc.charter.com] has joined #go-nuts 22:09 < qbit_> http://code.google.com/p/go/source/detail?r=b42108ef8a0b6b302221e245b22d417341b9c51c 22:09 < qbit_> :D 22:09 -!- Xavi [n=Xavi@66-191-181-152.dhcp.gnvl.sc.charter.com] has quit [Remote closed the connection] 22:09 < timmcd> So, yes, fast? xD 22:09 < timmcd> ugh I should probably d/l the latest versions of Go 22:09 < qbit_> I can't really say .. I just found that earlier today :P 22:10 -!- Xavi [n=Xavi@66-191-181-152.dhcp.gnvl.sc.charter.com] has joined #go-nuts 22:11 -!- strick9 [n=safetytr@VDSL-151-118-128-29.DNVR.QWEST.NET] has quit [Read error: 110 (Connection timed out)] 22:12 -!- JPascal [n=jpascal@78-106-107-39.broadband.corbina.ru] has joined #go-nuts 22:14 -!- frenkel [n=frank@dev.ivaldi.nl] has joined #go-nuts 22:14 < JPascal> The Go have a SubString(start_pos,end_pos) function? 22:14 < tor7> str[startpos:startend] 22:15 < tor7> s/startend/endpos/ 22:23 < KirkMcDonald> Note that the endpos refers to the index which is one past the end of the substring. 22:28 < Gracenotes> and that getting the indices wrong will cause Go to blow up 22:30 -!- decriptor [n=decripto@174-27-134-202.slkc.qwest.net] has joined #go-nuts 22:31 -!- elmar [n=elmar@dslb-188-097-069-083.pools.arcor-ip.net] has quit ["Leaving"] 22:32 -!- qbit_ [n=qbit_@c-75-71-160-106.hsd1.co.comcast.net] has quit ["Computer has gone to sleep"] 22:32 -!- frenkel [n=frank@dev.ivaldi.nl] has quit ["leaving"] 22:38 -!- ni| [n=ni|@cpe-72-191-33-69.satx.res.rr.com] has quit ["Leaving..."] 22:41 -!- Kibiz0r1 [n=Adium@99-48-204-31.lightspeed.brhmmi.sbcglobal.net] has quit ["Leaving."] 22:42 -!- snearch_ [n=olaf@g225055069.adsl.alicedsl.de] has quit ["Ex-Chat"] 22:45 -!- qbit_ [n=qbit_@c-75-71-160-106.hsd1.co.comcast.net] has joined #go-nuts 22:46 -!- Haxar [n=ia64@force.dreamhost.com] has left #go-nuts [] 22:46 -!- qbit_ [n=qbit_@c-75-71-160-106.hsd1.co.comcast.net] has quit [Client Quit] 22:46 -!- The_Doctor [n=Dalek@cpe-98-150-247-183.hawaii.res.rr.com] has joined #go-nuts 22:47 < exch> Any sed guru's around? 22:47 -!- clearscreen [n=clearscr@e248070.upc-e.chello.nl] has joined #go-nuts 22:47 -!- clearscreen [n=clearscr@e248070.upc-e.chello.nl] has quit [Remote closed the connection] 22:47 -!- clearscreen [n=clearscr@e248070.upc-e.chello.nl] has joined #go-nuts 22:47 -!- strick9 [n=safetytr@c-174-52-130-51.hsd1.ut.comcast.net] has joined #go-nuts 22:50 -!- hipe_ [n=hipe@pool-74-101-72-105.nycmny.east.verizon.net] has joined #go-nuts 22:50 -!- hipe [n=hipe@pool-74-101-72-105.nycmny.east.verizon.net] has quit [Read error: 113 (No route to host)] 22:50 < yiyus> exch: just ask, there is ##sed too 22:50 < uriel> exch: I know a bit of sed, but I can't use my powers for evil 22:51 < uriel> and something tells me you are up to nothing good ;P 22:51 < exch> im tryin to make it replace stuff over multiple lines. I've figured out how to buffer multiple lines, but the actual matching/replacing stuff doesn't seem to do much 22:52 < uriel> you should use awk or even better: sam -d 22:52 < uriel> structural regexps for the win! 22:53 < exch> probably yea 22:53 -!- Ryan___ [n=ryan@cpe-98-27-182-206.neo.res.rr.com] has joined #go-nuts 22:55 < yiyus> exch: with sed/awk problems some example lines of i/o use to help 22:56 < yiyus> it is not like if there was a command to replace stuff over multiple lines (well, gnu sed probably has it...) 22:56 < exch> sed -r '1h;1!H;${s|/\*.+?\*/||g}' <- brain melts. Basically the idea is to remove blocks of multiline comments. so anything between /* and */ 22:57 -!- Zeffrin [n=zeffrin@203.141.132.221.static.zoot.jp] has joined #go-nuts 22:57 < poe> what if /* is inside a string? "!$/*@#" 22:57 -!- Xavi [n=Xavi@66-191-181-152.dhcp.gnvl.sc.charter.com] has quit [Remote closed the connection] 22:57 < timmcd> Which would you people prefer? 22:57 < timmcd> http://gist.github.com/244689 22:57 < timmcd> or 22:57 < timmcd> http://gist.github.com/244692 22:57 < Zeffrin> > fmt.Printf("!$/*@#"); 22:58 < rndbot> !$/*@# 22:58 < exch> In that case you're out of luck :p 22:59 < exch> sweet. thius seems to work. 1h;1!H;${g;s|/\*.+?\*/||g} 22:59 < exch> *this 23:00 < exch> mm or not 23:01 < exch> weird. It actually outputs both the unreplaced and the replaced versions 23:01 < timmcd> are there any parser/lexxer/interpreter libs for Go yet? 23:02 < timmcd> Basically, language writing tools? 23:02 < Ycros> timmcd: what is that? 23:03 -!- Kibiz0r1 [n=Adium@99-48-204-31.lightspeed.brhmmi.sbcglobal.net] has joined #go-nuts 23:04 -!- hstimer [n=hans@70.90.170.37] has quit ["Leaving..."] 23:06 < Zeffrin> http://github.com/vito/go-parse 23:07 < timmcd> Ycros tyvm 23:07 < Ycros> timmcd: eh? 23:07 < timmcd> rr, that was meant for Zeffrin 23:07 < timmcd> Zeffrin: tyvm 23:08 < Ycros> timmcd: I prefer the first url - but what is it? 23:09 < Ycros> timmcd: seems like too much stuttering going on in the first one though. 23:11 < timmcd> Ycros: A regexp-based language me and a friend are thinking of writing 23:11 < timmcd> even better than lisp for making your own languages/DSL's xD 23:12 < Ycros> timmcd: looking at the syntax - I doubt that already :P 23:12 < timmcd> Psh 23:12 < timmcd> Well, better for ME ^_^ 23:12 < timmcd> We are still deciding on syntax 23:12 < timmcd> that's why I asked ^_^ 23:13 < Ycros> timmcd: lisp excels so well at it precisely because of it's basic (and prefix) syntax 23:14 < timmcd> Well, with this we want you to be able to define things any way you like. Thus: 23:14 < timmcd> (+ _ _) = |int a, int b| { return a + b } 23:14 < timmcd> or whatever 23:14 < timmcd> (+ 5 5) -> 10 23:14 < Ycros> aha 23:14 < timmcd> you can make lisp-like syntax if you like 23:14 < Ycros> how can you use return a + b if you've just defined something using + 23:14 < timmcd> No, the funciton you just defined is (+ _ _) 23:14 < timmcd> no _ + _ 23:14 < timmcd> *not _ + _ 23:15 -!- Ryan___ [n=ryan@cpe-98-27-182-206.neo.res.rr.com] has quit [Remote closed the connection] 23:15 < Ycros> and what does "1 + + 1 3" parse as then? 23:15 < Ycros> hmm 23:15 < sladegen> syntax error 23:15 < Ycros> it could /maybe/ work, but I can see you running into some issues 23:16 < timmcd> 1 + (+ 1 3) would work, it would simplify down to 1 + 4, 5 23:16 -!- Anders_ [n=Anders@c83-253-2-206.bredband.comhem.se] has joined #go-nuts 23:16 < hd_> + 1 + 1 3 ?? 23:16 < sladegen> 14 23:17 < timmcd> I was thinking maybe just straight up regexp patterns. 23:17 < timmcd> "\(\+ \d \d\)" or "\d d \d" for matching (+ anint anint) or 5 d 6 23:18 < Ycros> timmcd: have you ever looked at meta-lua? 23:18 < timmcd> nope 23:18 -!- clearscreen [n=clearscr@e248070.upc-e.chello.nl] has quit [Read error: 104 (Connection reset by peer)] 23:19 -!- clearscreen [n=clearscr@e248070.upc-e.chello.nl] has joined #go-nuts 23:19 < Ycros> timmcd: it's lua, but it has support for compiletime macros - so you can extend the language 23:20 < exch> gah O_o sed -rn '1h;1!{/\/\*.+?\*\//!H;g;/\/\*.+?\*\//{s/\/\*.+?\*\///g;p;n;h};h};$p' 23:20 < exch> it actually works 23:22 -!- Wezz6400 [n=Wezz6400@145-118-111-123.fttx.bbned.nl] has quit ["Good bye."] 23:22 -!- The_Doctor [n=Dalek@cpe-98-150-247-183.hawaii.res.rr.com] has quit ["Leaving..."] 23:23 < timmcd> Ycros: Interesting, looking at it now. Thanks! 23:24 -!- ikke [n=1kk3@unaffiliated/ikkebr] has quit [Connection reset by peer] 23:24 -!- jurg [i=jurg@94.229.66.117] has quit [Remote closed the connection] 23:25 < Ycros> timmcd: I've started playing around with REBOL yesterday too - it's based around DSLs and building them, it feels lispish but without all the parens (due to its eval rules) - but I haven't gotten very far into it 23:26 < poe> exch another idea is to feed th ego file to gofmt -comment=false 23:27 * exch sighs. And you tell me this now? ;p 23:28 < timmcd> lol 23:28 < timmcd> xD 23:28 * sladegen foofles '1h;1!{/\/\*.+?\*\//!H;g;/\/\*.+?\*\//{s/\/\*.+?\*\///g;p;n;h};h};$p' 23:28 -!- ras0ir [n=ras0ir@fsf/member/nonx] has joined #go-nuts 23:28 -!- _paco_ [n=cem@unaffiliated/paco/x-456320] has joined #go-nuts 23:28 < _paco_> disco 23:29 -!- gkmngrgn [n=gkmngrgn@unaffiliated/gkmngrgn] has joined #go-nuts 23:29 -!- vesgel [n=4eb2e474@gateway/web/cgi-irc/archlinux.org.tr/x-wlgawjlvetjlxsvw] has joined #go-nuts 23:30 -!- ras0ir [n=ras0ir@fsf/member/nonx] has left #go-nuts ["Konversation terminated!"] 23:30 -!- Anders_ [n=Anders@c83-253-2-206.bredband.comhem.se] has quit ["Leaving"] 23:31 -!- strick9 [n=safetytr@c-174-52-130-51.hsd1.ut.comcast.net] has quit [Read error: 54 (Connection reset by peer)] 23:31 -!- Kibiz0r1 [n=Adium@99-48-204-31.lightspeed.brhmmi.sbcglobal.net] has quit ["Leaving."] 23:33 -!- sm [n=sm@pool-71-104-89-96.lsanca.dsl-w.verizon.net] has quit [Read error: 110 (Connection timed out)] 23:33 -!- timmcd [n=Adium@97-117-100-106.slkc.qwest.net] has quit ["Leaving."] 23:33 < poe> exch sorry :) 23:36 -!- vesgel [n=4eb2e474@gateway/web/cgi-irc/archlinux.org.tr/x-wlgawjlvetjlxsvw] has left #go-nuts [] 23:36 -!- vianaweb [n=vianaweb@189.26.150.54.dynamic.adsl.gvt.net.br] has joined #go-nuts 23:42 -!- rajeshsr [n=rajeshsr@59.92.27.133] has quit [Read error: 110 (Connection timed out)] 23:42 -!- vianaweb [n=vianaweb@189.26.150.54.dynamic.adsl.gvt.net.br] has quit ["Computer has gone to sleep"] 23:43 -!- msbranco [n=msbranco@64-172.61-188.cust.bluewin.ch] has quit [Read error: 60 (Operation timed out)] 23:46 -!- vianaweb [n=vianaweb@189.26.150.54.dynamic.adsl.gvt.net.br] has joined #go-nuts 23:47 -!- _paco_ [n=cem@unaffiliated/paco/x-456320] has left #go-nuts ["Leaving"] 23:48 -!- vianaweb [n=vianaweb@189.26.150.54.dynamic.adsl.gvt.net.br] has left #go-nuts [] 23:53 -!- eferuzi [n=eferuzi@213.236.150.122] has joined #go-nuts 23:53 < eferuzi> hi everyone 23:54 -!- Kibiz0r1 [n=Adium@99-48-204-31.lightspeed.brhmmi.sbcglobal.net] has joined #go-nuts 23:55 -!- kmc [n=keegan@206-71-236-70.c3-0.nyw-ubr5.nyr-nyw.ny.cable.rcn.com] has quit [Read error: 104 (Connection reset by peer)] 23:56 -!- jurg [i=jurg@94.229.66.117] has joined #go-nuts 23:56 < eferuzi> i am trying to get go running on Ubuntu 9.10 but on running all.bash it get an error $GOBIN is not a directory or does not exist 23:57 -!- chexov [n=chexov@c-67-169-24-85.hsd1.ca.comcast.net] has joined #go-nuts 23:57 -!- chexov [n=chexov@c-67-169-24-85.hsd1.ca.comcast.net] has quit [SendQ exceeded] 23:57 < kfx> eferuzi: what is the output of echo $GOBIN on the command line 23:57 -!- chexov [n=chexov@c-67-169-24-85.hsd1.ca.comcast.net] has joined #go-nuts 23:57 -!- bogen [n=bogen@cpe-76-186-22-145.tx.res.rr.com] has joined #go-nuts 23:58 -!- keeto [n=keeto@121.54.92.149] has quit [Remote closed the connection] 23:59 -!- keeto [n=keeto@121.54.92.149] has joined #go-nuts --- Log closed Sun Nov 29 00:00:15 2009