--- Log opened Wed Apr 13 00:00:43 2011 --- Day changed Wed Apr 13 2011 00:00 < foolusion> is using channels the go way to do this? or should I have brute forced the array or slice like C/C++ 00:01 < krutcha> since you're only doing one calculation in a goroutine then waiting for it to finish.. there's really no reason making it look concurrent IMHO 00:02 < krutcha> might as well just make your multiples function tally up result as it goes, then return it 00:03 < krutcha> if you wanted you could split the range up into ranges, then fire each range to an instance of multiples working on that chunk, to parallelize the % checks 00:05 -!- TheSeeker [~n@99-153-250-110.lightspeed.irvnca.sbcglobal.net] has joined #go-nuts 00:05 < foolusion> yeah, i read something about gc not optimizing parallelism yet is that still true or has it been added in already? 00:06 < foolusion> like 4 routines on 1 core instead of 4 00:06 < plexdev> http://is.gd/KOJoi3 by [Fazlul Shahriar] in go/src/pkg/os/ -- os: fix Readdir in Plan 9 00:06 < krutcha> beats me, not sure what the various compilers do with threads, hyperthreading, multi cores exactly 00:07 < krutcha> you should experiment with setting this: http://golang.org/pkg/runtime/#GOMAXPROCS 00:08 < krutcha> as well (I think it defaults to 1?) 00:11 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined #go-nuts 00:11 < foolusion> is printing more efficient in go than c it seems like i can print to the console without significant speed loss 00:12 < krutcha> shouldn't be no 00:12 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts 00:13 < foolusion> maybe my console flush is different on this computer.. 00:13 < skelterjohn> i'd imagine that fmt.Printf is a bit slower than C's printf 00:15 < foolusion> thats what i would have thought but I edited sieve1.go to add a bunch of print calls and it doesnt seem to hamper performance the same way it would when i output in C/C++ 00:15 < skelterjohn> if you are invoking C code from go, there is a performance hit there 00:16 < skelterjohn> sorry, didn't read carefully 00:16 < skelterjohn> it's possible that go's concurrency mechanism is giving some advantages 00:18 < exch> mm fallthrough doesnt seem to be valid inside anything but a case statement 00:18 < exch> bit odd, since break and continue are 00:19 < foolusion> can you break to labels like in C++ 00:19 < exch> yes 00:20 < foolusion> is that the best way of getting out of nested loops? 00:20 < skelterjohn> yes 00:20 < exch> probably 00:20 < foolusion> I don't know why but I always feel wrong using labels 00:21 -!- ampleyfly [ampleyfly@gateway/shell/blinkenshell.org/x-kiswfgnkqsvycysi] has quit [Ping timeout: 248 seconds] 00:21 -!- ampleyfly [ampleyfly@gateway/shell/blinkenshell.org/x-gftbmvgodsqfcouv] has joined #go-nuts 00:27 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Ping timeout: 246 seconds] 00:27 < foolusion> when you use ch := make(chan int) it returns a value but is ch a reference or some datastructure or something? 00:30 < foolusion> printing ch looks like it gives an address 00:30 < krutcha> it's a channel, considered a first class value type in the language 00:32 < foolusion> but when i pass it as a argument in a function i shouldn't use (ch *chan int) because its already an address 00:32 -!- m4dh4tt3r [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has quit [Quit: Leaving.] 00:33 < krutcha> right you can think of it as a reference to a channel in that sense, ie passing by value won't create a new channel 00:33 < foolusion> so if i made a buffered channel it won't copy itself 00:34 < krutcha> nope, they're intended to be passed around like that 00:34 < krutcha> and shared as sync mechanisms between goroutines etc 00:35 < krutcha> the buffered/unbuffered thing just affects the amount of data that fits in the channel, and whether it is blocking or not 00:35 < krutcha> with an unbuffered channel, your write to a channel blocks until a reader consumes it, so parallel goes out the window, but sync is ensured 00:35 -!- joelkronander [~joelkrona@c-bf2fe253.617-1-64736c22.cust.bredbandsbolaget.se] has quit [Quit: joelkronander] 00:36 < foolusion> can you resize them? 00:37 < krutcha> hmm dunno, don't think so, I think the initial make() sets the fifo size and thats it 00:37 -!- simply_b__ [~simply_b@66-189-220-223.dhcp.knwc.wa.charter.com] has quit [Read error: Connection reset by peer] 00:38 -!- simply_b__ [~simply_b@66-189-220-223.dhcp.knwc.wa.charter.com] has joined #go-nuts 00:38 < foolusion> what about clearing a channel? should i just make a new one 00:38 < plexdev> http://is.gd/SjWXfi by [Gustavo Niemeyer] in go/misc/dashboard/godashboard/ -- godashboard: Show packages at launchpad.net 00:38 -!- cw_ [~anticw@parsec.stupidest.org] has quit [Read error: Operation timed out] 00:39 < krutcha> I _think_ the only way to remove data from a channel is consume it by reading, or close the channel 00:40 -!- exch [~exch@31-151-123-254.dynamic.upc.nl] has quit [Ping timeout: 252 seconds] 00:41 -!- djbrown [~djbrown@unaffiliated/djbrown] has quit [Ping timeout: 252 seconds] 00:41 -!- djbrown [~djbrown@h236n2-g-va-a12.ias.bredband.telia.com] has joined #go-nuts 00:41 < foolusion> hmm, so I'm not sure how this would work but, lets say you were doing some sort of LOD algorithm ona time constraint and you have excess data in a channel should you just close it and hope its gc'ed or is there a read til empty? 00:41 -!- cw [~anticw@parsec.stupidest.org] has joined #go-nuts 00:42 -!- exch [~exch@31-151-123-254.dynamic.upc.nl] has joined #go-nuts 00:42 < foolusion> excess data would be totally useless next frame so you don't want it 00:43 < krutcha> I think you can call len() on a channel to see how many data items are in it 00:44 < krutcha> or you could use select{} to either receive more data, or if none is available break out of a loop? 00:44 < krutcha> some of these go idioms I haven't really grokked fully yet, so grain of salt 00:46 < krutcha> look here: http://golang.org/doc/effective_go.html#leaky_buffer 00:46 < foolusion> is it ch.len() or len(ch). the latter returns 0 always for me 00:47 < krutcha> if you look at the select control structure, the 'default' case could be used to detect an empty channel 00:47 < krutcha> but I thought len(ch) worked as well 00:48 < krutcha> try commenting out your reader 00:48 < foolusion> the reader is in a range statement 00:48 < foolusion> i might have to write a different test 00:49 < krutcha> len(s) chan T number of elements queued in channel buffer 00:49 < krutcha> so len should work 00:49 < foolusion> my reader is probably not letting them queue at all 00:51 < foolusion> hmm still getting 0's 00:53 -!- iant [~iant@67.218.107.170] has quit [Quit: Leaving.] 00:54 < krutcha> http://pastebin.com/AmYqFBJW 00:54 < krutcha> that printed 100 for me 00:59 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts 01:02 < foolusion> i'm probably doing something wrong i just added it into the for loop with my sender so I would expect at least a 1 when it puts it on the channel but i guess its blocking until the reciever pulls it off before printing 01:03 -!- boscop [~boscop@g227128090.adsl.alicedsl.de] has joined #go-nuts 01:07 -!- mikespook [~mikespook@219.137.253.123] has joined #go-nuts 01:09 -!- saturnfive [~saturnfiv@210.74.155.131] has joined #go-nuts 01:09 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined #go-nuts 01:10 < plexdev> http://is.gd/H5DWlF by [David Symonds] in go/src/pkg/archive/tar/ -- archive/tar: fix example's handling of os.EOF. 01:10 < foolusion> when is a value considered received when its pulled off of the channel or when its copied to the channel? 01:11 -!- jgonzalez [~jgonzalez@173-14-137-134-NewEngland.hfc.comcastbusiness.net] has quit [Ping timeout: 240 seconds] 01:11 < skelterjohn> who are you asking? 01:12 < skelterjohn> i mean, that's not a programming question - just a question of opinion 01:12 < skelterjohn> do you have a more specific question about what happens in some case? 01:12 < foolusion> well i think i can't call len on an unbuffered chan because its blocking until the reciever pulls it off 01:13 < skelterjohn> there is no way to test if someone is trying to send to an unbuffered chan without receiving the value 01:14 < skelterjohn> if you want that knowledge, you'll have to build additional infrastructure 01:14 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Quit: Leaving] 01:15 < foolusion> so unbuffered actually means no data is stored not an unknown amount? 01:15 < foolusion> i mean arbitrary 01:16 < skelterjohn> yes 01:16 < skelterjohn> that's right 01:16 < skelterjohn> "there is no buffer" 01:17 < foolusion> i thought it was acting like a vector or something 01:18 < skelterjohn> vectors are buffered 01:20 < foolusion> yeah i thought it was just hiding it like calling vector without an initial size 01:23 < skelterjohn> ah. nope. 01:27 -!- JusticeFries [~JusticeFr@173-8-247-218-Colorado.hfc.comcastbusiness.net] has quit [Ping timeout: 260 seconds] 01:30 < foolusion> any good reading recommendations for parallel programming(book or online). I took an OS class a couple years ago but we just went over locks, mutex, and semaphore. 01:31 < skelterjohn> dunno 01:31 < skelterjohn> i'm not much on books 01:31 < skelterjohn> except as entertainment 01:32 < skelterjohn> the collective concurrency knowledge of the people in this channel is probably great enough to answer most questions 01:32 < vsmatck> skelterjohn: Short story for you (if you haven't already read). http://www-formal.stanford.edu/jmc/robotandbaby/robotandbaby.html I read it yesterday and it was enjoyable. 01:33 < foolusion> i'm a textbook collector 01:35 < skelterjohn> thanks vsmatck 01:35 < skelterjohn> foolusion: me too, i just don't read them first 01:38 -!- nixness [~dsc@78.100.166.168] has quit [Quit: Leaving] 01:39 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has joined #go-nuts 01:41 -!- krutcha [~krutcha@remote.icron.com] has quit [Quit: Leaving] 01:47 -!- kpumuk [~kpumuk@69-165-246-181.cable.teksavvy.com] has joined #go-nuts 01:51 < foolusion> anyone have experience setting up vim to allow ":make filename" for go 01:53 < dfc> this is really embarising 01:53 < dfc> but how do I tell vim to use the misc/vim stuff ? 01:54 < dfc> what is the incantatino in .vimrc I need ? 01:54 < foolusion> do you have the files in .vim/ftplugin and .vim/ftdetect? 01:54 < foolusion> or links to them 01:55 < dfc> no, but I can set that up 01:55 < skelterjohn> <insert inflammatory comment about vim here> 01:56 * dfc ignores skelterjohns comment 01:57 < plexdev> http://is.gd/4j2Kgm by [Dmitry Chestnykh] in go/misc/vim/ftplugin/go/ -- misc/vim: add plugin with Fmt command. 01:57 < foolusion> yay dmitry 01:58 < foolusion> dfc: did linking those files make it work? 01:59 < dfc> no 01:59 < dfc> lucky(~/devel/afp) % find ~/.vim -type l 01:59 < dfc> \ 01:59 < dfc> /Users/dave/.vim/ftdetect/gofiletype.vim 01:59 < dfc> /Users/dave/.vim/ftplugin/go 01:59 < dfc> are symlinks to the right business 01:59 < dfc> do I neet anything in a .vimrc to tell it to look there ? 02:01 < foolusion> try adding "filetype on" "filetype plugin on" 02:01 -!- nettok [~quassel@200.119.190.80] has joined #go-nuts 02:01 < dfc> nup 02:01 < dfc> probably the weaksauce vim that comes with os x 02:02 < foolusion> hmmnot sure if its windows but you might need to store it in _vimfile 02:02 < foolusion> oops _vimfiles/ 02:05 < foolusion> it looks like .vim/ is the right place on mac 02:07 < foolusion> I'd try just copying the files. and use smartindent instead of auto if thats the problem 02:09 < dfc> k 02:17 -!- m4dh4tt3r [~Adium@70-36-245-216.dsl.static.sonic.net] has joined #go-nuts 02:17 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read error: Connection reset by peer] 02:19 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined #go-nuts 02:21 -!- m4dh4tt3r [~Adium@70-36-245-216.dsl.static.sonic.net] has quit [Client Quit] 02:21 -!- nettok [~quassel@200.119.190.80] has quit [Remote host closed the connection] 02:22 -!- nettok [~quassel@200.119.190.80] has joined #go-nuts 02:22 -!- m4dh4tt3r [~Adium@70-36-245-216.dsl.static.sonic.net] has joined #go-nuts 02:23 -!- kaichenxyz [~kaichenxy@115.199.100.167] has joined #go-nuts 02:23 -!- m4dh4tt3r [~Adium@70-36-245-216.dsl.static.sonic.net] has quit [Client Quit] 02:23 -!- JusticeFries [~JusticeFr@168.sub-75-220-147.myvzw.com] has joined #go-nuts 02:25 -!- nettok [~quassel@200.119.190.80] has quit [Client Quit] 02:26 -!- nettok_ [~quassel@200.119.190.80] has joined #go-nuts 02:33 -!- kaichenxyz [~kaichenxy@115.199.100.167] has quit [Remote host closed the connection] 02:33 -!- kaichenxyz [~kaichenxy@li261-87.members.linode.com] has joined #go-nuts 02:33 -!- benjack [~benjack@bb220-255-241-76.singnet.com.sg] has joined #go-nuts 02:37 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read error: Connection reset by peer] 02:39 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined #go-nuts 02:43 -!- gregschlom [~quassel@118.68.142.103] has joined #go-nuts 02:45 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts 02:51 -!- genbattle [~nick@203-114-137-9.wir.sta.inspire.net.nz] has joined #go-nuts 02:53 -!- genbattle [~nick@203-114-137-9.wir.sta.inspire.net.nz] has quit [Client Quit] 02:53 -!- genbattle [~nick@203-114-137-9.wir.sta.inspire.net.nz] has joined #go-nuts 02:56 -!- genbattle [~nick@203-114-137-9.wir.sta.inspire.net.nz] has quit [Client Quit] 03:01 -!- JusticeFries [~JusticeFr@168.sub-75-220-147.myvzw.com] has quit [Ping timeout: 240 seconds] 03:01 -!- foolusion [43fcbebc@gateway/web/freenode/ip.67.252.190.188] has quit [] 03:08 -!- itrekkie [~itrekkie@ip72-200-105-157.tc.ph.cox.net] has quit [Quit: itrekkie] 03:10 -!- drteeth [~drteeth@173-230-160-81.cable.teksavvy.com] has joined #go-nuts 03:11 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read error: Connection reset by peer] 03:13 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined #go-nuts 03:16 -!- drteeth [~drteeth@173-230-160-81.cable.teksavvy.com] has quit [Remote host closed the connection] 03:17 -!- tensai_cirno [~cirno@77.232.15.216] has quit [Ping timeout: 258 seconds] 03:23 -!- foocraft [~dsc@78.100.166.168] has quit [Remote host closed the connection] 03:25 -!- vinisterx [~ryan@74-129-201-27.dhcp.insightbb.com] has joined #go-nuts 03:27 -!- skelterjohn_ [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined #go-nuts 03:28 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read error: Connection reset by peer] 03:32 -!- Viriix [~joseph@c-67-169-172-251.hsd1.ca.comcast.net] has joined #go-nuts 03:36 -!- cafesofie [~cafesofie@ool-4a5a6ee5.dyn.optonline.net] has quit [Remote host closed the connection] 03:45 -!- ampleyfly [ampleyfly@gateway/shell/blinkenshell.org/x-gftbmvgodsqfcouv] has quit [Read error: Operation timed out] 03:45 -!- ampleyfly [ampleyfly@gateway/shell/blinkenshell.org/x-ryhheouafcaumlxc] has joined #go-nuts 03:49 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has joined #go-nuts 03:49 -!- mode/#go-nuts [+v iant] by ChanServ 03:57 -!- gregschlom [~quassel@118.68.142.103] has quit [Ping timeout: 252 seconds] 04:00 -!- benjack [~benjack@bb220-255-241-76.singnet.com.sg] has quit [Quit: Leaving.] 04:00 -!- jbooth1 [~jay@209.249.216.2] has quit [Quit: Leaving.] 04:01 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read error: Connection reset by peer] 04:02 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined #go-nuts 04:06 -!- JusticeFries [~JusticeFr@c-24-9-171-36.hsd1.co.comcast.net] has joined #go-nuts 04:20 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read error: Connection reset by peer] 04:22 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined #go-nuts 04:23 -!- rejb [~rejb@unaffiliated/rejb] has quit [Ping timeout: 246 seconds] 04:26 -!- zozoR [~Morten@56344b27.rev.stofanet.dk] has joined #go-nuts 04:40 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read error: Connection reset by peer] 04:40 -!- krutcha1 [~krutcha@S010600045a27676a.vs.shawcable.net] has joined #go-nuts 04:42 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined #go-nuts 04:45 -!- benjack [~benjack@bb220-255-241-76.singnet.com.sg] has joined #go-nuts 04:54 -!- nettok_ [~quassel@200.119.190.80] has quit [Ping timeout: 248 seconds] 04:55 -!- djbrown [~djbrown@h236n2-g-va-a12.ias.bredband.telia.com] has quit [Changing host] 04:55 -!- djbrown [~djbrown@unaffiliated/djbrown] has joined #go-nuts 04:57 -!- mikespook [~mikespook@219.137.253.123] has quit [Ping timeout: 258 seconds] 04:57 -!- mikespook [~mikespook@219.137.75.141] has joined #go-nuts 04:59 -!- niemeyer [~niemeyer@189-10-155-52.pltce701.dsl.brasiltelecom.net.br] has quit [Ping timeout: 240 seconds] 05:00 < plexdev> http://is.gd/wU9cy1 by [Andrew Gerrand] in go/misc/dashboard/builder/ -- builder: fix documentation s/\.gobuilder/.gobuildkey/ 05:00 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read error: Connection reset by peer] 05:01 -!- edsrzf [~chickench@122-61-221-144.jetstream.xtra.co.nz] has joined #go-nuts 05:02 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined #go-nuts 05:03 -!- keithcascio [~keithcasc@nat/google/x-jjatbbcqsqeeynwg] has quit [Quit: Leaving] 05:06 -!- foocraft [~dsc@dyn-86-36-43-184.wv.qatar.cmu.edu] has joined #go-nuts 05:08 -!- fabled [~fabled@83.145.235.194] has quit [Quit: Ex-Chat] 05:14 -!- fabled [~fabled@83.145.235.194] has joined #go-nuts 05:15 -!- JusticeFries [~JusticeFr@c-24-9-171-36.hsd1.co.comcast.net] has quit [Quit: JusticeFries] 05:15 -!- zozoR [~Morten@56344b27.rev.stofanet.dk] has quit [Remote host closed the connection] 05:20 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read error: Connection reset by peer] 05:22 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined #go-nuts 05:31 < krutcha1> why does http.Get return a reader interface that you must read and close as a body, instead of just the body itself? 05:32 < dfc> krutcha1: what if the body never ended ? 05:32 < krutcha1> hasn't it already been read when you called Get()? 05:32 < dfc> nope 05:32 < dfc> the reader will take over once the header processing has happened 05:32 < krutcha1> ooohhhh 05:33 < krutcha1> I'm glad we had this little chat 05:33 < krutcha1> :P 05:40 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read error: Connection reset by peer] 05:41 < wchicken> I have an instance where setting GOMAXPROCS to 3 gives much higher performance than 4 (I have a 4-core system) 05:41 < wchicken> what's the best way to investigate what bottlenecks are in my code to cause this? 05:42 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined #go-nuts 05:52 -!- espeed [~espeed@63.246.231.57] has joined #go-nuts 05:56 -!- kaichenxyz_ [~kaichenxy@115.199.100.167] has joined #go-nuts 05:59 -!- kaichenxyz [~kaichenxy@li261-87.members.linode.com] has quit [Ping timeout: 246 seconds] 06:00 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read error: Connection reset by peer] 06:02 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined #go-nuts 06:04 -!- kpumuk [~kpumuk@69-165-246-181.cable.teksavvy.com] has quit [Quit: kpumuk] 06:12 -!- krolaw [~krolaw@203.100.208.229] has joined #go-nuts 06:20 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read error: Connection reset by peer] 06:22 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined #go-nuts 06:26 -!- skejoe [~skejoe@188.114.142.217] has joined #go-nuts 06:32 -!- chressie [~chressie@dreggn.in-ulm.de] has quit [Quit: WeeChat 0.3.4] 06:32 -!- chressie [~chressie@dreggn.in-ulm.de] has joined #go-nuts 06:33 -!- ako [~nya@fuld-590c6a73.pool.mediaWays.net] has joined #go-nuts 06:36 -!- aho [~nya@fuld-590c7133.pool.mediaWays.net] has quit [Ping timeout: 240 seconds] 06:40 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read error: Connection reset by peer] 06:42 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined #go-nuts 06:51 -!- ExtraSpice [XtraSpice@88.118.35.153] has joined #go-nuts 07:00 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read error: Connection reset by peer] 07:02 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined #go-nuts 07:03 -!- piranha [~piranha@D57D1AB3.static.ziggozakelijk.nl] has joined #go-nuts 07:06 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|] 07:06 < krutcha1> hmm in go, if I have a slice of bytes, how do I take 2 bytes and convert them to a large int? 07:08 < krutcha1> fmt.Printf("%d", slice[0]) seems to have no problem with a single byte, but what about taking 2 bytes as a uint16 from that slice of uint8's? 07:10 < cbeck> What are you trying to do with it? 07:11 < krutcha1> parse a binary encoded series of port numbers from an http response 07:14 < cbeck> Easiest would probably be to just use unsafe to convert the []byte to an []int16. Needs a bit of twiddling for the len and cap stuff obviously 07:14 < edsrzf> The safer way would be to use the package encoding/binary 07:14 < cbeck> Derp, right 07:15 < krutcha1> oh, hmm didn't know that existed 07:15 < cbeck> Forget I said anything 07:15 < edsrzf> Or just do something like uint16(b[1]) | uint16(b[0]) << 8 07:15 < krutcha1> does go support shift operators? 07:15 < edsrzf> Yes 07:16 < krutcha1> noice 07:17 -!- Fish [~Fish@exo3753.pck.nerim.net] has quit [Quit: So Long, and Thanks for All the Fish] 07:17 < Namegduf> Using encoding/binary automagically handles endianness. 07:17 < Namegduf> By having you specify it. 07:18 < krutcha1> it looks tricky to use? 07:18 < krutcha1> func Read(r io.Reader, order ByteOrder, data interface{}) os.Error 07:18 -!- krolaw [~krolaw@203.100.208.229] has quit [Quit: krolaw] 07:19 < edsrzf> It can be a little clunky, yeah. 07:19 -!- Fish [~Fish@exo3753.pck.nerim.net] has joined #go-nuts 07:19 < edsrzf> When you already have a byte slice, I think it's easier to use the ByteOrder variable's Uint16 method directly. 07:20 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read error: Connection reset by peer] 07:21 < krutcha1> I have a hard time grokking go interfaces most days.. when I look at the byteorder variable it looks to be 'something that implements the byteorder interface' 07:22 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined #go-nuts 07:22 < edsrzf> Yeah, it's implemented by BigEndian and LittleEndian, which are variables in the package. 07:23 -!- dfc [~dfc@eth59-167-133-99.static.internode.on.net] has quit [Ping timeout: 246 seconds] 07:25 < krutcha1> hmm that makes sense once you piece it together 07:26 < krutcha1> but parsing the docs on golang to get from ??? to binary.BigEndian.Uint16([]byte(val.raw[i*6+4:]))) seems to require foreknowledge that isn't IN the docs 07:27 < edsrzf> Yeah, it's tough because the types of BigEndian and LittleEndian aren't exported, so they're not documented. 07:27 < edsrzf> They used to be exported, but that changed somewhere along the line. 07:28 < krutcha1> a few simple examples of useage to connect the dots would go a long way 07:28 < edsrzf> Probably godoc should be a little smarter and document unexported types when variables of that type are exported. 07:28 < edsrzf> Yeah, examples would also be good. 07:29 < krutcha1> seems to have worked though, I see sane port numbers 07:32 -!- krolaw [~krolaw@203.100.208.229] has joined #go-nuts 07:40 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read error: Connection reset by peer] 07:42 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined #go-nuts 07:45 -!- wrtp [~rog@92.17.67.64] has joined #go-nuts 07:46 -!- virtualsue [~chatzilla@nat/cisco/x-mxmoshbvbhwgdusw] has joined #go-nuts 07:50 -!- autotron [~autotron@cpe-98-155-92-67.san.res.rr.com] has joined #go-nuts 07:50 -!- kaichenxyz [~kaichenxy@115.199.100.167] has quit [Remote host closed the connection] 07:50 -!- kaichenxyz [~kaichenxy@li261-87.members.linode.com] has joined #go-nuts 07:56 -!- kaichenxyz [~kaichenxy@li261-87.members.linode.com] has quit [Remote host closed the connection] 07:56 -!- kaichenxyz [~kaichenxy@115.199.100.167] has joined #go-nuts 07:56 -!- virtualsue [~chatzilla@nat/cisco/x-mxmoshbvbhwgdusw] has quit [Ping timeout: 276 seconds] 07:58 < autotron> could go's concurrency a similar approch to erlang's (many lightweight processes)? 07:59 < autotron> could it be compaired ? 07:59 < autotron> compared 08:00 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read error: Connection reset by peer] 08:01 < krutcha1> I'd say it's very comparable 08:01 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-160-157.clienti.tiscali.it] has joined #go-nuts 08:02 -!- hachiya [~hachiya@encyclical.net] has quit [Remote host closed the connection] 08:02 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined #go-nuts 08:02 -!- hachiya [~hachiya@encyclical.net] has joined #go-nuts 08:14 -!- kaichenxyz [~kaichenxy@115.199.100.167] has quit [Remote host closed the connection] 08:14 -!- kaichenxyz [~kaichenxy@li261-87.members.linode.com] has joined #go-nuts 08:19 -!- matti__ [~mumboww@c-24-6-22-101.hsd1.ca.comcast.net] has quit [Ping timeout: 248 seconds] 08:20 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read error: Connection reset by peer] 08:22 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined #go-nuts 08:23 -!- dfc [~dfc@124-149-97-178.dyn.iinet.net.au] has joined #go-nuts 08:36 -!- crodjer [~rohanjain@203.110.240.205] has quit [Quit: Leaving] 08:36 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts 08:40 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read error: Connection reset by peer] 08:42 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined #go-nuts 08:43 < mpl> if I have an os.Pipe, and I use it to link os.Stdin and os.Stdout of two os.StartProcess, is there anything more I should do? I'm basically trying to do a find | grep and I'm getting an odd behaviour. it seems to be working only if the output of find is large enough. 08:44 < mpl> and yet, I think the Pipe is synchronous, so I thought the find would wait for the grep process to finish reading before ending, no? 08:51 -!- crodjer [~rohanjain@203.110.240.205] has joined #go-nuts 08:52 -!- dfc [~dfc@124-149-97-178.dyn.iinet.net.au] has quit [Quit: dfc] 08:54 -!- zimsim [~simon@87.72.77.195] has joined #go-nuts 08:55 -!- aho [~nya@fuld-590c6a73.pool.mediaWays.net] has quit [Quit: EXEC_over.METHOD_SUBLIMATION] 08:58 < nsf> http://blog.talawah.net/2011/04/gavin-king-unviels-red-hats-top-secret.html 08:58 < nsf> one Java wasn't enough 08:58 < nsf> how about "variable Natural count := 0;" 08:58 < nsf> lol 09:00 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read error: Connection reset by peer] 09:02 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined #go-nuts 09:09 -!- virtualsue [~chatzilla@nat/cisco/x-vmzygzbpndybpicw] has joined #go-nuts 09:15 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-148-178.clienti.tiscali.it] has joined #go-nuts 09:18 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-160-157.clienti.tiscali.it] has quit [Ping timeout: 258 seconds] 09:18 -!- kaichenxyz [~kaichenxy@li261-87.members.linode.com] has quit [Ping timeout: 240 seconds] 09:20 -!- kaichenxyz [~kaichenxy@115.199.100.167] has joined #go-nuts 09:21 -!- cenuij [~cenuij@109.8.21.241] has joined #go-nuts 09:21 -!- cenuij [~cenuij@109.8.21.241] has quit [Changing host] 09:21 -!- cenuij [~cenuij@base/student/cenuij] has joined #go-nuts 09:26 -!- krutcha1 [~krutcha@S010600045a27676a.vs.shawcable.net] has quit [Quit: Leaving] 09:27 -!- kaichenxyz [~kaichenxy@115.199.100.167] has quit [Remote host closed the connection] 09:27 -!- kaichenxyz [~kaichenxy@li261-87.members.linode.com] has joined #go-nuts 09:34 -!- mikespook [~mikespook@219.137.75.141] has quit [Quit: Leaving.] 09:42 -!- tvw [~tv@212.79.9.150] has joined #go-nuts 09:44 -!- marten [~marten@82-170-80-86.ip.telfort.nl] has joined #go-nuts 09:50 -!- zimsim [~simon@87.72.77.195] has quit [Ping timeout: 260 seconds] 09:53 -!- benjack [~benjack@bb220-255-241-76.singnet.com.sg] has quit [Quit: Leaving.] 09:57 < ww> anyone know where the proposed changes to get goinstall to do commands are at? 09:58 -!- shvntr [~shvntr@116.26.133.145] has joined #go-nuts 10:03 -!- Kunkka [~kristian@mivacukor.lha.sgsnet.se] has joined #go-nuts 10:04 -!- edsrzf [~chickench@122-61-221-144.jetstream.xtra.co.nz] has quit [Read error: Connection reset by peer] 10:04 -!- zimsim [~simon@87.72.77.195] has joined #go-nuts 10:10 < Kunkka> Hi do anyone know how to listen for a bufio.read and at the same time listen to a channel, in the same function? 10:17 < Namegduf> You can't. 10:17 < Namegduf> Spawn a new goroutine doing the read, have it communicate with the first using a channel. 10:17 < Namegduf> Select on the two channels. 10:19 -!- GeertJohan [~Squarc@D978EC5D.cm-3-1d.dynamic.ziggo.nl] has joined #go-nuts 10:21 < Kunkka> Yeah we guessd so, dont want to send our data over a channel though, beacuse of the overhead. 10:21 < Kunkka> thanks anyway. 10:21 < Namegduf> Kunkka: Send a pointer. 10:21 < Namegduf> That said, sending a slice over a channel does *not* copy it. 10:21 < Namegduf> Slices are reference types, and behave like pointers to an array holding the data which know the length and capacity of the data and array. 10:22 < Namegduf> (In fact, that's what they are) 10:22 < Namegduf> So sending the result of a read won't normally copy that data. 10:24 -!- arun_ [~arun@unaffiliated/sindian] has quit [Ping timeout: 246 seconds] 10:25 < skelterjohn> ww: buried in adg's unsubmitted updates to gomake, i imagine 10:25 -!- katakuna [~pie@kjal.demon.co.uk] has joined #go-nuts 10:26 < ww> skelterjohn: :( well i hope it gets sorted relatively soon 10:26 < skelterjohn> he said a couple of weeks, in the golang-dev thread 10:26 < wrtp> Kunkka: as Namegduf says, there's little inherent overhead in using a channel to send data. 10:26 < ww> i really want an install process that says, "run this command" and results in a program in bin 10:27 < skelterjohn> http://go-gb.googlecode.com 10:27 < wrtp> Kunkka: the net package uses channels extensively, for example 10:27 < wrtp> mpl: have you got some example code? 10:28 -!- saturnfive [~saturnfiv@210.74.155.131] has quit [Read error: Connection reset by peer] 10:28 < skelterjohn> ww: oh - you want it do download stuff and build a cmd 10:29 < skelterjohn> my mistake - gb won't do that (except via goinstall for pkgs) 10:29 < ww> right. gb looks nice though... 10:30 < ww> yes, i just want to do "goinstall bitbucket.org/ww/foo" and end up with foo in ${GOBIN} 10:30 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-148-178.clienti.tiscali.it] has quit [Read error: Connection reset by peer] 10:30 < Kunkka> Namegduf: wrtp Thanks for the help! 10:30 < Namegduf> No problem. 10:30 < skelterjohn> i don't know why goinstall didn't work for cmds from the beginning 10:31 < skelterjohn> i guess because you need to analyze source to see which makefile to include? 10:31 < ww> i think it's simple - is package main? then cmd, else pkg 10:32 < ww> i guess people could make a library called main, but that would be silly, wouldn't it? 10:33 < skelterjohn> that's how gb decides 10:34 < skelterjohn> only recently (a few months ago) was main allowed as the name of a package 10:34 < skelterjohn> can use that to test cmds 10:34 < skelterjohn> gb will test cmds :) 10:34 < skelterjohn> but so will the new gotest, i believe 10:35 < wrtp> ww: some packages have main as well as a package 10:35 < ww> then there's the question of how to install gb - i'm thinking of third party deployments by people who don't know go, may or may not know how to use mercurial, or build things, but i use cgo to talk to some shared libraries... 10:36 < skelterjohn> gb will generate makefiles if you don't want your project to have it as a dependence 10:36 < ww> so the process, "install necessary shared libraries uising your os package manager", "install go from website", "run goinstall", done. 10:36 < skelterjohn> it's all moot - gomake is replacing it 10:36 < ww> that's about as complicated as it could stand to be 10:37 < skelterjohn> i no longer develop gb (though I still use it myself, and if someone complains about a bug i'll fix it) 10:37 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-161-26.clienti.tiscali.it] has joined #go-nuts 10:37 -!- itrekkie [~itrekkie@ip72-200-105-157.tc.ph.cox.net] has joined #go-nuts 10:38 -!- genbattle [~nick@203.173.203.215] has joined #go-nuts 10:39 < ww> well... i anxiously await the new gomake 10:41 -!- itrekkie [~itrekkie@ip72-200-105-157.tc.ph.cox.net] has quit [Client Quit] 10:46 -!- rbraley [~rbraley@114.250.85.28] has quit [Ping timeout: 248 seconds] 10:47 -!- rbraley [~rbraley@114.250.83.112] has joined #go-nuts 10:58 -!- matti__ [~mumboww@c-24-6-22-101.hsd1.ca.comcast.net] has joined #go-nuts 11:13 -!- arun_ [~arun@unaffiliated/sindian] has joined #go-nuts 11:15 -!- boomtopper [~boomtoppe@cpc12-nrte22-2-0-cust249.8-4.cable.virginmedia.com] has joined #go-nuts 11:16 -!- saturnfive [~saturnfiv@219.144.254.216] has joined #go-nuts 11:16 -!- saturnfive [~saturnfiv@219.144.254.216] has left #go-nuts [] 11:17 < boomtopper> Hi I'm just playing around with compiling go. I've run the ./all.bash script and it doesn't look to have done any errors I think. I check the $GOBIN directory and it does not have all the binaries in there. Seems there is only 6cov, 6l, godefs, gomake, and quietgcc. It doesn't seem to have made 6g? 11:21 < zimsim> Do you have bison installed? 11:24 < zimsim> boomtopper, look at the http://golang.org/doc/install.html page and check that you have all the dependencies installed. 11:24 < boomtopper> cheers I'll check that now 11:27 < boomtopper> Yep that was it. Bison was missing. Thanks for that 11:27 < zimsim> np 11:31 < wrtp> Kunkka: here's an example of using bufio.Read with a select http://pastebin.com/f8TJUtAX 11:32 < Kunkka> wrtp: Thanks! 11:32 < wrtp> Kunkka: it uses two channels to avoid allocating a buffer for every read 11:42 -!- randfur [~androirc@58.145.148.26] has joined #go-nuts 11:48 -!- zerosanity [~josh@8.20.178.82] has joined #go-nuts 11:55 -!- krolaw [~krolaw@203.100.208.229] has quit [Quit: krolaw] 11:58 < wrtp> Kunkka: on my machine, when the IO is nothing (reading /dev/zero) and doing nothing with the data, the overhead is about 20% (575MB/s vs 680MB/s) 11:59 < wrtp> that overhead would be lost in the noise if you were doing something with the data, i think 11:59 -!- tvw [~tv@212.79.9.150] has quit [Remote host closed the connection] 12:00 -!- tvw [~tv@212.79.9.150] has joined #go-nuts 12:00 -!- autotron [~autotron@cpe-98-155-92-67.san.res.rr.com] has quit [Ping timeout: 248 seconds] 12:03 < mpl> wrtp: yea, here it is: http://pastebin.com/L1Pw7aM1 12:07 < xyproto> is it hard to find an example where log.Println works, but fmt.Println fails? Is having a go routine enough? 12:09 < xyproto> I heard that the advantage of log.Print over fmt.Print would be in cases of concurrency 12:10 -!- randfur [~androirc@58.145.148.26] has quit [Ping timeout: 260 seconds] 12:10 < wrtp> xyproto: depends on the platform 12:11 < wrtp> if you've got two parallel instances of fmt.Println, they might not write atomically 12:14 < xyproto> wrtp: So, letters can be outputted intermingled? 12:15 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts 12:20 < wrtp> xyproto: yes 12:20 < wrtp> i've seen it happen (on OS X) 12:22 -!- scyth_ [~scyth@194.247.195.133] has joined #go-nuts 12:22 -!- tvw [~tv@212.79.9.150] has quit [Read error: Connection reset by peer] 12:22 -!- tvw [~tv@212.79.9.150] has joined #go-nuts 12:22 -!- niemeyer [~niemeyer@189-10-155-52.pltce701.dsl.brasiltelecom.net.br] has joined #go-nuts 12:26 < wrtp> mpl: pipes are buffered, not synchronous. the code looks ok at first glance. what isn't it doing that you want it to do? 12:28 -!- boomtopper [~boomtoppe@cpc12-nrte22-2-0-cust249.8-4.cable.virginmedia.com] has quit [Ping timeout: 240 seconds] 12:30 < mpl> wrtp: ah good to know. that's the tricky part: sometimes it does, and sometimes it doesn't (depending on the input), ie it doesn't output anything (while it should, as I can see if I test with the same input by other means). 12:31 -!- genbattle [~nick@203.173.203.215] has quit [Quit: Leaving] 12:32 < mpl> it drives me crazy, I can't figure out what's the problem... 12:34 < angasule> I see that there are many bindings for OpenGL and other libraries, are those only for 6g/8g? I'm only interested in working with gccgo at this point, and if I got it correctly from my sleuthing, those bindings are in cgo, and cgo is a 6g/8g thing only 12:34 < mpl> bbiaw 12:36 < exch> all of them require Cgo afaik 12:37 < angasule> how does one get around to making bindings for gccgo? :) I haven't found any references to that 12:38 < exch> No idea really. I never use gccgo 12:40 < angasule> aah, ok, thanks :) 12:40 -!- cenuij [~cenuij@base/student/cenuij] has quit [Remote host closed the connection] 12:40 -!- zimsim [~simon@87.72.77.195] has quit [Remote host closed the connection] 12:44 < aiju> gccgo is evil ;P 12:45 < angasule> heh why? 12:45 < aiju> i don't see the point of having two compilers 12:45 < kimelto> having more than one? 12:45 * kimelto hides 12:46 < nsf> aiju: some say it's a good way to test the spec 12:46 < aiju> i say it's a waste of time 12:46 < nsf> I don't share that opinion though 12:46 < nsf> yeah 12:46 < nsf> writing more tests is a better idea 12:46 < angasule> I believe 6g/8g don't have plans for dynamic linking? 12:47 < aiju> hopefully not 12:47 < angasule> are you on windows or OS X? 12:47 < nsf> having shared objects in a language that does not specify its ABI 12:47 < nsf> is a waste of time 12:47 < aiju> angasule: no, Linux 12:48 -!- jyxent [~jyxent@129.128.191.96] has quit [Ping timeout: 276 seconds] 12:49 < angasule> aiju: and you don't think fixing bugs in libraries just once is a good idea? 12:49 < aiju> oh please 12:49 < aiju> not that crap 12:49 -!- jyxent [~jyxent@129.128.191.96] has joined #go-nuts 12:49 < aiju> linux has versioned symbols to preven this ;P 12:50 < angasule> aiju: prevent what? 12:50 < aiju> fixing bugs 12:50 < exch> updating a library once 12:50 < exch> you have 900 different versions of the same lib 12:52 -!- JusticeFries [~JusticeFr@c-24-9-171-36.hsd1.co.comcast.net] has joined #go-nuts 12:52 < nsf> angasule: but what about _introducing_ bugs just once? 12:52 < angasule> exch: not really, you end up with just one copy of the library per major version 12:52 < nsf> like it was with glibc 12:52 < nsf> and flash suddenly stopped working 12:52 < angasule> nsf: are you saying glibc is a bug? :D but yeah, that's a possible drawback as well 12:53 < angasule> nsf: flash on linux (and OS X, I'm told) is a piece of crap, really. 12:53 < nsf> no, I'm more interesting about consequences 12:53 < nsf> angasule: I don't care 12:53 < nsf> the problem is that having shared libraries hurts more 12:53 < angasule> well, it's relevant, brittle software breaks easily, I don't want windows-style crap 12:54 < kimelto> you dont have a libc.so on your system? 12:54 < nsf> but that was a bad example, glibc allowed more that it should 12:54 < nsf> there are other problems though 12:54 < angasule> there are many advantages 12:54 < nsf> I do receive bug reports some times 12:54 < nsf> when the right answer is "update library X" 12:54 < nsf> and as simple as that 12:54 < exch> It should prolly be noted that I am personally on the fence about the whole static/dynamic linking thing. I still haven't heard any argument to persuade me either way. They both of pros and cons 12:55 < nsf> angasule: name one 12:55 < angasule> if a problem is found in glibc, then you have to rebuild glibc and relink everything, upload everything, and everyone has to download everything 12:55 < angasule> or a base library, not glibc 12:56 < nsf> you've described shared objects hell 12:56 < nsf> and you're saying they are good 12:56 < nsf> wtf 12:56 < angasule> it really sucks for distributions, and without distributions you end up with the windows system, lots of unupdated apps and 100 different updaters, some of which are rather untrustworthy 12:57 < nsf> anyways, it's a very good thing that Go doesn't support shared libraries 12:57 < aiju> deploying dynamically linked software is real fun 12:57 < angasule> nsf: actually, if you use dynamic libraries, if a problem is found in a base lib, you have to rebuild the base library, upload only that library, and everyone has to download only that library 12:57 < angasule> nsf: how about providing arguments? unless you are not interested in a technical discussion, tha'ts fine too 12:57 * kimelto breaks the ABI 12:57 < aiju> angasule: if you use dynamic libraries, if a bug is introduced into a base lib, your whole system breaks 12:57 < nsf> angasule: yes, but if you instead of fixing it, introduces a bug 12:57 < kimelto> ka-boom! 12:57 < nsf> introduced* 12:57 < aiju> it works both ways 12:58 -!- hopso [~hopso@a91-152-176-165.elisa-laajakaista.fi] has joined #go-nuts 12:58 < aiju> and holy fucking crap are there daily major security updates of glibc or what? 12:58 -!- boscop_ [~boscop@g227128090.adsl.alicedsl.de] has joined #go-nuts 12:58 < nsf> angasule: I'm just saying that I've seen a lot of bug reports, where updating to a fresh version of some crappy library, breaks others' people code 12:58 < str1ngs> glibc is just a minor part of the issue 12:58 < angasule> aiju, nsf: that's possible, yes, that's why there is plenty of testing, the point is that with dynamic libraries, you can fix bugs down the road, with static, you can't 12:59 < str1ngs> rebuild static? 12:59 < aiju> sure i can, i just ship a new binary if a new bug is discouvered 12:59 < nsf> it's fucking horrible to test things with dynamic library 12:59 < nsf> because you can't 12:59 < nsf> users do that for you 12:59 < str1ngs> not much different then what you are suggesting 12:59 < nsf> you have no idea what version of that library end user has 12:59 < angasule> str1ngs: then everyone has to download every single program using that library 13:00 < str1ngs> angasule: huh? 13:00 < nsf> ask firefox developers what do they think about shared libraries 13:00 < aiju> angasule: i have a package managers for that 13:00 < nsf> and why their project has local copies for most of the libraries 13:00 < kimelto> does the actual linked do link time optimization? I mean if you import a lib and use only 20% of the code, will 100% of the code lib be in the final binary or 20%? 13:00 < kimelto> linker 13:00 < aiju> kimelto: 25% ;P 13:01 -!- boscop [~boscop@g227128090.adsl.alicedsl.de] has quit [Ping timeout: 246 seconds] 13:01 < angasule> aiju: do you want your package manager to download 10MB or 2GB each time they fix a bug in a base library? 13:01 -!- boomtopper [~boomtoppe@cpc12-nrte22-2-0-cust249.8-4.cable.virginmedia.com] has joined #go-nuts 13:02 < nsf> angasule: why do you think every package should be relinked with base library again? 13:02 < xyproto> just downloading the binary diff, like Chromium/Chrome would be nice 13:02 < nsf> they will if they have to 13:02 < nsf> bug simply cannot affect all apps at once 13:02 < kimelto> agreed, there is something ridiculous if you start to write somall utilities like cat et all, and the binary are 2M size :> 13:03 < nsf> that kind of bugs get fixed quickly 13:03 < angasule> xyproto: they would have to keep binary diffs between all versions, kind of a pain in the butt 13:03 < xyproto> angasule: at least it's not the user's butt, but yeah :P 13:03 < angasule> bbl, doctor is here 13:03 < str1ngs> kimelto: if you are talking about go, you can build with gcc-go 13:03 < angasule> xyproto: hmm, go eat cookies :P 13:03 < aiju> angasule: it's not like we hear that kind of argument every time there is such a discussion 13:03 < xyproto> angasule: ? 13:04 < nsf> frankly I don't understand how any developer may like shared libraries 13:04 < kimelto> str1ngs: yup, we started there. "-why 2 compilers? - for so support! - what the hell?" 13:04 < nsf> I have a very small project, yet shared libraries gave me some trouble even there 13:04 < str1ngs> kimelto: for this very reason 13:04 < str1ngs> if you want small binaries use gcc-go 13:05 < str1ngs> if you want easy to maintain go distrobution use gc 13:05 < aiju> hell, static binaries can be small too 13:05 < str1ngs> not really not with go. unless you can strip 13:05 < nsf> personally I think something is wrong with the gc 13:05 < aiju> that was hypothetically 13:05 < nsf> its binaries are too huge 13:05 < str1ngs> but really who cares 13:05 < kimelto> and if you have symbols collision, welcome to the fun world of -static :( 13:06 < aiju> kimelto: wtf are you talking about? 13:06 < aiju> that GNU tools have broken static linking? 13:06 < kamaji> Is it possible to put if conditions on multiple lines? 13:06 < nsf> kimelto: in Go symbol collisions are impossible 13:06 < nsf> at least in gc 13:06 < aiju> kamaji: yeah 13:06 < nsf> linker renames symbols at link time 13:06 < kimelto> nsf: I was refering to C 13:06 < skelterjohn> kamaji: yes - you have to end each line with something interesting though 13:06 < skelterjohn> like a || 13:06 < nsf> according to their import path 13:07 < skelterjohn> to not trick the semi-colon inserter 13:07 < nsf> kimelto: uhm, now we're talking about C? 13:07 < kamaji> ah ok 13:07 < kamaji> cheers 13:07 * nsf is in troll mode 13:07 < kimelto> nsf: we were talking about static linking in general 13:07 < kamaji> I figured putting () everything would force it to work 13:07 < kamaji> but it doesn't 13:07 < nsf> kimelto: what's wrong with it? I think it's awesome 13:07 < str1ngs> kamaji: but I am making a gcc-go-snapshot and putting it on aur if you want gcc-go :P 13:08 < nsf> because it has no interface 13:08 < aiju> one of the reason i like Go is that i don't have to put up with gcc 13:08 < str1ngs> why there is gc 13:09 < aiju> calling the go compiler gc was one of the greatest design failures of go 13:09 < skelterjohn> wher babby come from 13:09 < str1ngs> and thats why they have 2 compilers so you can pick what suits you best 13:09 < kimelto> aiju: symbols collision in libcrypto and libmd which make the program quit with a signal. was fun to narrow it down to the real problem. 13:09 < aiju> str1ngs: yeah let's have two of everything to have people pick between 13:09 < aiju> fmt1 and fmt2 13:09 < nsf> aiju: how about gompiler? ) 13:09 < aiju> nsf: haha 13:09 < skelterjohn> lol 13:10 < str1ngs> aiju: that's not even the case here. but if people want dynamic linking stand to reason a gcc front end would be better suited. don't you think? 13:10 < xyproto> I don't know of any successful language that has only had one compiler. I think it's a good sign that Go have several alternative compilers. 13:11 < skelterjohn> kinda wish ergo wasn't closed-source/windows-only 13:11 < skelterjohn> i mean, it's written in go, right? 13:11 < aiju> xyproto: correlation does not mean causation 13:11 < aiju> skelterjohn: yeah but it suck 13:11 < aiju> +s 13:11 < skelterjohn> it might suck less if people could help 13:11 < xyproto> aiju: "a good sign" does not imply causation 13:12 < skelterjohn> aiju: he didn't say "quick write some more compilers - that way go will be more successful!" :) 13:12 < skelterjohn> *that* would be abusing the causation/correlation idea 13:12 < aiju> skelterjohn: sorry it actually sounded like that to me 13:13 < aiju> i'm sleep deprived and try to compensate with lots of caffeine 13:13 < xyproto> aiju: how? do you have specially crafted ears that hear what you want them to? ;) 13:14 < skelterjohn> aiju: you could just go to sleep 13:14 < skelterjohn> you're in germany, right? 13:14 < aiju> yeah, it's 15:17 13:14 < skelterjohn> it's what, 2pm there? 13:14 < skelterjohn> 3 13:14 < aiju> not exactly sleeping time 13:14 < xyproto> aiju: same time here :) 13:17 < skelterjohn> you guys are twins 13:17 < skelterjohn> now you have to be best buds 13:17 < aiju> haha 13:19 -!- jgonzalez [~jgonzalez@173-14-137-134-NewEngland.hfc.comcastbusiness.net] has joined #go-nuts 13:20 < xyproto> yes, I will only call you aiju-bud from now. 13:20 < xyproto> brothers in timezones 13:20 < skelterjohn> well played 13:21 < aiju> hahahahaha 13:27 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has quit [Quit: Leaving.] 13:28 -!- boomtopper [~boomtoppe@cpc12-nrte22-2-0-cust249.8-4.cable.virginmedia.com] has quit [Remote host closed the connection] 13:29 < wrtp> mpl: you're using an old version of go - StartProcess has a different number of arguments now 13:29 -!- boscop_ [~boscop@g227128090.adsl.alicedsl.de] has quit [Ping timeout: 246 seconds] 13:30 -!- virtualsue [~chatzilla@nat/cisco/x-vmzygzbpndybpicw] has quit [Remote host closed the connection] 13:30 < skelterjohn> http://developers.slashdot.org/story/11/04/13/0136229/Red-Hat-Uncloaks-Java-Killer-the-Ceylon-Project 13:30 -!- femtoo [~femto@95-89-249-242-dynip.superkabel.de] has joined #go-nuts 13:30 < skelterjohn> while it's true that java should die, i predict that this will not be the way to do it 13:32 < skelterjohn> a gem from the comments: "Despite how humongous the JDK is, the java compiler itself is relatively lean (only 140KLOC)." 13:32 < mpl> wrtp: fair enough, but that wouldn't have any influence on my problem, would it? 13:33 < aiju> skelterjohn: HAHAHAHAHAHAHA 13:33 < wrtp> mpl: maybe not, but it means i have to translate your code in order to try it out... 13:33 < aiju> skelterjohn: but actually, GCC is 2 MLOC 13:33 < skelterjohn> no one calls gcc lean 13:34 < skelterjohn> how big is the go compiler? 13:34 < aiju> 30K or something 13:34 < mpl> wrtp: ok. no problem, I'll update in a bit and repost. 13:34 < skelterjohn> and doesn't gcc compile like 19 different languages? 13:35 < aiju> skelterjohn: oh, 76 KLOC 13:35 < aiju> oh wait, that's the c compiler 13:36 < aiju> 60 KLOC 13:36 -!- boscop_ [~boscop@g227128090.adsl.alicedsl.de] has joined #go-nuts 13:37 < hopso> I feel like writing a web app 13:40 < mpl> blimey, the tests are indeed freaking faster now that it's in go... 13:40 -!- boscop_ [~boscop@g227128090.adsl.alicedsl.de] has quit [Ping timeout: 240 seconds] 13:41 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Quit: skelterjohn] 13:41 < wrtp> mpl: it's ok, i've done it. it works fine for me 13:42 -!- virtualsue [~chatzilla@nat/cisco/x-ptvcmlhcndlknjmy] has joined #go-nuts 13:42 -!- iant [~iant@67.218.107.170] has joined #go-nuts 13:42 -!- mode/#go-nuts [+v iant] by ChanServ 13:42 < xyproto> hopso: here's my first little web-app in Go, for inspiration (?). It's a canvas/javascript drawing app. http://go.pastie.org/1791110 13:43 < wrtp> obviously the main prog exits before the sub-processes do 13:43 < wrtp> you might want to wait for the xargs proc to end 13:43 < mpl> yes, I've tried that 13:44 < mpl> wrtp: hmm, I've just updated to the latest release and my code still compiles fine. has startprocess changed again in the latest commits? 13:45 < wrtp> no, it changed a while ago 13:45 < wrtp> it has a ProcAttr argument now 13:45 < mpl> hg pull -r release ; hg update and rebuild is all I needed, right? 13:46 < mpl> (as in rebuil the go tree) 13:50 < wrtp> mpl: this works fine for me: http://pastebin.com/478yrTny 13:50 < wrtp> mpl: i usually do: cd $GOROOT/src; hg sync; all.bash 13:50 < angasule> http://golang.org/doc/gccgo_install.html#C_Interoperability <-- useful! 13:50 < wrtp> ah, except you want to update to release tag 13:52 < wrtp> oh, you're right it hasn't been released yet 13:52 < mpl> aah 13:52 < mpl> fine then. 13:52 < wrtp> i thought it happened a while ago 13:52 < mpl> well, it has changed several times in the past 13:52 < wrtp> anyway, it seemed to work fine for me 13:52 < wrtp> i changed the code a bit to make it more straightforward 13:52 < mpl> yeah readding the wait didn't change anything 13:53 < mpl> don't get me wrong, it does work in some cases for me. 13:53 < mpl> but not always and that's killing me. 13:53 < xyproto> netchan.NewImporter wants a io.ReadWriter. However, after browsing the documentation, I don't know what would be suitable to use (ok, something that can read and write, but I don't want to use a file). Any hints? 13:54 < mpl> wrtp: uhm, why are you cloning the pipes? 13:54 < mpl> *closing 13:54 < xyproto> Is there a list of everything that implements io.ReadWriter somewhere? 13:54 < wrtp> because you need to 13:54 < mpl> xyproto: nope, if you want to do a doc client that can find that I'd be very happy. 13:54 < wrtp> otherwise xargs never gets eog 13:54 < wrtp> eof 13:54 < mpl> wrtp: well, I'm not doing it as you can see, so that might be it. 13:55 < wrtp> because the go process has kept the pipe open 13:55 < mpl> yep, I had some defuncts xargs, that explains. 13:55 -!- wrtp [~rog@92.17.67.64] has quit [Quit: wrtp] 13:55 < xyproto> mpl: glad to hear I'm not alone in this quest :) 13:56 < mpl> xyproto: and I'm not the only one, afair. 13:56 < mpl> although now that I know the packages better I usually know where to look most of the time. 13:57 < mpl> but I really think that's an aspect of the doc that is lacking. 13:57 -!- wrtp [~rog@92.17.67.64] has joined #go-nuts 13:57 -!- virtualsue [~chatzilla@nat/cisco/x-ptvcmlhcndlknjmy] has quit [Quit: ChatZilla 0.9.86.1 [Firefox 4.0/20110318052756]] 13:58 < xyproto> mpl: yeah, it would be nice. I just tried googling "site:gonuts.org io.Reader", but got no results. That's strange. 13:59 < mpl> wrtp: yep, the Close() are exactly what was missing. works fine in all cases now, thx. 14:00 -!- Fish [~Fish@exo3753.pck.nerim.net] has quit [Quit: So Long, and Thanks for All the Fish] 14:00 < mpl> wrtp: except I get some defunct find as well, so I may need to wait for it too. 14:02 -!- Fish [~Fish@exo3753.pck.nerim.net] has joined #go-nuts 14:06 -!- skejoe [~skejoe@188.114.142.217] has quit [Quit: Lost terminal] 14:09 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts 14:17 -!- skelterjohn [~jasmuth@lawn-gw.rutgers.edu] has joined #go-nuts 14:18 -!- zozoR [~Morten@56344b27.rev.stofanet.dk] has joined #go-nuts 14:20 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts 14:21 < xyproto> how come this code produces a runtime error? http://go.pastie.org/1791289 14:21 < xyproto> I don't understand why. 14:22 -!- skelterjohn [~jasmuth@lawn-gw.rutgers.edu] has quit [Client Quit] 14:23 -!- skelterjohn [~jasmuth@lawn-gw.rutgers.edu] has joined #go-nuts 14:24 -!- JusticeFries [~JusticeFr@c-24-9-171-36.hsd1.co.comcast.net] has quit [Quit: JusticeFries] 14:25 < exch> what kind of an error? 14:28 < exch> nvm. just tried running it 14:31 < xyproto> panic: runtime error: invalid memory address or nil pointer dereference 14:32 -!- willdye [~willdye@198.183.6.23] has joined #go-nuts 14:32 < xyproto> and several errors including "gob", and various panics 14:32 < exch> yes I see 14:35 < exch> Ive never worked with netchans, so I dont know what it's supposed to do, but shouldn't that importer connect to an exported netchan? 14:36 < xyproto> exch: yes, I have a server-app as well, that can export a netchan 14:36 < xyproto> exch: I still think the behavior is surprising, though 14:36 < exch> I get the same errors you mentioned when I run only the client code here 14:36 < exch> not sure whats going on 14:36 < xyproto> exch: but, first and foremost, I don't understand the error messages or what part of the code they refer to 14:37 < hopso> It errors in netchan.ImportNValues() but the code seems correct. 14:38 < exch> the app works if I rename MyData.Writer to MyData.Write 14:38 < exch> I think something, somewhere expects your type to implement io.Writer 14:39 < hopso> Ah, it's the interface io.ReadWriter 14:39 < xyproto> exch: that's strange, as the ioReadWriter functions are called Reader and Writer: http://gonuts.org/pkg/io/#ReadWriter 14:40 < xyproto> hopso: yes 14:40 < exch> xyproto: no, those are embedded interfaces 14:40 < hopso> Interfaces Reader and Writer, which mean Read and Write methods 14:40 < exch> ReadWriter embeds interface io.Reader and io.Writer 14:40 < hopso> Just below ReadWriter are the Reader and Writer interfaces 14:41 < xyproto> aha! And io.Reader requires Read() and io.Writer requires Write()? 14:41 < exch> yup 14:41 < hopso> Yes 14:41 < xyproto> I see now the error of my ways. Thanks! :) 14:41 -!- zimsim [~simon@87.72.77.195] has joined #go-nuts 14:42 < hopso> I wish go had a bit more clear error messages. 14:42 < xyproto> suprisingly long and hard to interpret error message for one letter too much 14:42 < xyproto> woo, the code actually does stuff now. :) 14:42 < hopso> :) 14:43 < xyproto> <3 14:46 -!- RobertLJ1 [~Robert@68.37.119.54] has joined #go-nuts 14:47 < Glasswalker> Just to confirm because it doesn't seem to say it anywhere in a spec... But can the destination in a Copy() be a slice? (we touched on this yesterday, but I'll be using it a bunch more in my code and wanted to confirm so I don't need to backtrack) 14:47 < Glasswalker> eg: Copy(dest[100:200],src); 14:48 < exch> yes 14:48 -!- shvntr [~shvntr@116.26.133.145] has quit [Quit: leaving] 14:48 < Glasswalker> ok :) 14:48 < Glasswalker> just wanted to be sure lol 14:48 -!- Viriix [~joseph@c-67-169-172-251.hsd1.ca.comcast.net] has quit [Quit: This computer has gone to sleep] 14:48 -!- RobertLJ1 [~Robert@68.37.119.54] has left #go-nuts [] 14:49 -!- RobertLJ1 [~RobertLJ@c-68-37-119-54.hsd1.nj.comcast.net] has joined #go-nuts 14:51 < xyproto> Glasswalker: it's only lowercase copy() though, isn't it? 14:52 < exch> it is 14:52 < xyproto> Glasswalker: not to nitpick, I just want to learn about Copy if there are two 14:52 < xyproto> exch: thx 14:52 < exch> io.Copy() takes only io.Reader/io.Writer as parameters 14:53 < xyproto> exch: nice, I see 14:58 < hopso> I just realized most of the jobs I could get for summer are stuff like web design/updating and that's not my thing. :( 14:58 -!- iant [~iant@67.218.107.170] has quit [Quit: Leaving.] 15:05 -!- virtualsue [~chatzilla@64.103.89.150] has joined #go-nuts 15:05 -!- kaichenxyz [~kaichenxy@li261-87.members.linode.com] has quit [Quit: kaichenxyz] 15:05 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:7ca6:acc:1dac:a4e] has joined #go-nuts 15:05 -!- pharris [~Adium@rhgw.opentext.com] has joined #go-nuts 15:08 -!- iant [~iant@nat/google/x-vfogusrcnczmpkdq] has joined #go-nuts 15:08 -!- mode/#go-nuts [+v iant] by ChanServ 15:12 < kamaji> hopso: why only web design? 15:14 < hopso> No clue 15:15 < hopso> All other jobs seem to require knowledge more than I have and/or previous job experience 15:16 < hopso> And I'm kinda scared of what they would expect from me if I get a job. :O 15:17 < exch> My job hunting experiences have taught me that being able to show you are passionate about the work, and are a quick and eager learner, there is a good chance any previous experience will not matter 15:17 < exch> nor will lack of any degrees/certificates 15:19 < hopso> I know, I just lack a bit of self confidence because I have no previous work experience. 15:19 < exch> Even if the job requirements seem way 'out there', it never hurts to try. Just be entusiastic, show them some of your work and make sure you have at least some basic understanding of what the company does 15:19 < exch> hopso: so did I at the time. At some point, you just have to take a leap of faith 15:20 < exch> the worst that can happen is that they deny you the job. Just move on to the next one 15:20 < exch> since you dont have the job now, you really have not lost anything 15:20 -!- angasule [~angasule@190.2.33.49] has quit [Ping timeout: 276 seconds] 15:20 < hopso> True that 15:21 -!- tvw [~tv@212.79.9.150] has quit [Read error: Connection reset by peer] 15:21 < hopso> I should just gather all my small projects and choose the ones worth mentioning. I haven't got many though. 15:23 < exch> It doesnt have to be many. If they show various different programming areas, that's all they will need 15:23 < exch> Put em on github or something, so they can read through it in their own time 15:23 < hopso> Okays :) 15:24 < exch> The sad truth is that, if you can write a program (regardless of what it is), you are already way ahead of the curve as far as the majority of CS graduates go 15:25 < exch> pitiful really 15:25 < hopso> I know I'm in a good position because I already know programming. 15:25 < exch> Many of em couldn't program their way out of a paper bag if the universe depended on it 15:25 < aiju> exch: haha 15:26 < aiju> academic education sucks. 15:26 < hopso> Most of the second year students are simply wtfing around when they should do something in Java. 15:27 < hopso> I'm so excited about those classes... not. :D 15:27 -!- Venom_X [~pjacobs@66.54.185.133] has joined #go-nuts 15:27 < aiju> universities should stop being company training grounds 15:28 < exch> unlikely 15:28 < aiju> or rather weird crossbreeds between research and company training grounds 15:28 < skelterjohn> it's what students want 15:28 < aiju> so you can't do neither properly 15:28 < zimsim> Well, Java is better than nothing. 15:28 < skelterjohn> the *want* job training 15:28 < skelterjohn> they 15:28 < aiju> skelterjohn: yeah, at the fucking taxpayers' expense, my ass 15:28 < skelterjohn> many of them, anyway 15:28 < skelterjohn> they want a meal ticket 15:29 < skelterjohn> i don't see what the tax payer has to do with this 15:29 < aiju> don't they have public universities where you live? 15:29 < skelterjohn> sure 15:29 < skelterjohn> oh tax money definitely goes in 15:29 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 240 seconds] 15:29 < skelterjohn> but our society decided that higher education is worth subsidizing 15:29 < skelterjohn> so there you go 15:30 < aiju> society decided much bullshit ;P 15:30 < skelterjohn> i thought this was a discussion on the appropriate target for CS programs 15:30 < aiju> Go? 15:30 < skelterjohn> that'd be neat, but a little too novel 15:30 -!- aho [~nya@fuld-590c6375.pool.mediaWays.net] has joined #go-nuts 15:31 < exch> University of Hellsinki thinks it's ok 15:31 < skelterjohn> it also doesn't address the job training / "real CS" trade-off 15:31 < exch> s/hell/hel/ 15:31 < skelterjohn> exch: a whole course? 15:31 < skelterjohn> 3 credits? (or whatever the equiv is) 15:31 < exch> http://go-lang.cat-v.org/university-courses 15:32 < skelterjohn> one week course 15:32 < exch> aww only a single week 15:32 < aiju> skelterjohn: hell, universities teach Haskell 15:32 < aiju> has nothing to do with real CS either 15:32 < hopso> I'm applying to Univerrsity of Helsinki after my military service. :) 15:32 < skelterjohn> aiju: you have strange and wrong-seeming opinions, sometimes 15:33 < skelterjohn> i also think that haskell is a disgusting looking language 15:33 < aiju> wtf? 15:33 < skelterjohn> but that doesn't mean it has nothing to do with CS 15:33 < aiju> oh sorry 15:33 < aiju> that wasn't opinion 15:33 < aiju> that was a typo 15:33 < aiju> i meant to say "real job training" or something 15:33 < skelterjohn> ah 15:33 < skelterjohn> then we agree 15:34 < aiju> Haskell is a very CS-y language 15:34 < skelterjohn> the programming academics in this department like it 15:37 < skelterjohn> a lot of students just want to learn whatever the latest tech trend is 15:37 < skelterjohn> and be done with it 15:38 < skelterjohn> i mean, sure, have a course or two on different fun programming languages 15:38 < skelterjohn> but don't have a course on java beans 15:38 < skelterjohn> or ruby-on-rails 15:38 < skelterjohn> or any of these other things that i know nothing about beyond their names 15:39 < exch> there should really be more coverage of all the different programming paradigms out there. They all have their own areas where they really shine 15:40 < skelterjohn> at Rutgers we've got a course, "principles of programming languages" that addresses that 15:40 < hopso> I'd love to see functional programming thaught in my school. 15:41 < skelterjohn> includes java (for OOP), scheme (for FP), prolog (for whatever you call that garbage) 15:41 < aiju> skelterjohn: declarative and fuck you 15:41 < skelterjohn> haha 15:42 < skelterjohn> i ran a light seminar (reading group) on probabilistic programming languages last semester 15:42 < skelterjohn> that was pretty interesting 15:42 < exch> there's dataflow-driven and concatenative to 15:42 < skelterjohn> i have no idea what concatenative might be 15:42 < aiju> exch: there are JILLIONS of paradigms 15:42 < aiju> skelterjohn: FORTH 15:42 < aiju> don't forget array languages (APL etc) 15:42 < exch> FORTH, Factor, Postscript, Joy 15:42 < Namegduf> My university has two programming units 15:43 < Namegduf> The first covers "what programming is" and uses two high level languages 15:43 < skelterjohn> there is visual - if anyone has ever used scratch 15:43 < skelterjohn> though you could call it flow-based 15:43 < Namegduf> The second covers the various paradigms and uses Lisp and C 15:43 < Namegduf> With mentions of things like Haskell 15:43 < hopso> Yay, my favorite project still builds fine. It's totally experimental and badly structured though. D: 15:48 -!- zimsim [~simon@87.72.77.195] has quit [Remote host closed the connection] 15:49 -!- zimsim [~simon@87.72.77.195] has joined #go-nuts 15:54 -!- rurban [~demo@178-190-146-154.adsl.highway.telekom.at] has joined #go-nuts 15:55 -!- matsur [~matsur@76-250-39-57.lightspeed.mdsnwi.sbcglobal.net] has joined #go-nuts 15:56 < matsur> are errors like "unexpected fault address 0x875e4000" caused by mixing the GC with C/unsafe? 15:57 < matsur> using Russ Cox's gosqlite bindings causes these to show up pretty consistently 16:02 -!- jbooth1 [~jay@209.249.216.2] has joined #go-nuts 16:04 -!- boscop [~boscop@g227128090.adsl.alicedsl.de] has joined #go-nuts 16:07 -!- piranha [~piranha@D57D1AB3.static.ziggozakelijk.nl] has quit [Quit: Computer has gone to sleep.] 16:07 -!- boscop_ [~boscop@g227128090.adsl.alicedsl.de] has joined #go-nuts 16:08 -!- boscop [~boscop@g227128090.adsl.alicedsl.de] has quit [Read error: Connection reset by peer] 16:08 -!- creack [~charme_g@163.5.84.203] has quit [Read error: Connection reset by peer] 16:12 -!- jyxent [~jyxent@129.128.191.96] has quit [Quit: leaving] 16:12 -!- boscop_ [~boscop@g227128090.adsl.alicedsl.de] has quit [Ping timeout: 240 seconds] 16:12 -!- jyxent [~jyxent@129.128.191.96] has joined #go-nuts 16:14 -!- jyxent [~jyxent@129.128.191.96] has quit [Client Quit] 16:14 -!- jyxent [~jyxent@129.128.191.96] has joined #go-nuts 16:16 < scyth_> http://pastie.org/1791693 16:17 < scyth_> does anyone have any idea why my Balancer() is not getting anything at donechan ? 16:23 -!- joelkronander [~joelkrona@c-bf2fe253.617-1-64736c22.cust.bredbandsbolaget.se] has joined #go-nuts 16:26 -!- ShadowIce [~pyoro@HSI-KBW-109-193-120-162.hsi7.kabel-badenwuerttemberg.de] has joined #go-nuts 16:26 -!- ShadowIce [~pyoro@HSI-KBW-109-193-120-162.hsi7.kabel-badenwuerttemberg.de] has quit [Changing host] 16:26 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts 16:27 -!- piranha [~piranha@5ED43A0B.cm-7-5a.dynamic.ziggo.nl] has joined #go-nuts 16:29 < skelterjohn> matsur: can you make a small example that triggers it? 16:30 < matsur> @skelterjohn yes soon, trying to reproduce on amd64 now (was on 386 previously) 16:30 -!- joelkronander [~joelkrona@c-bf2fe253.617-1-64736c22.cust.bredbandsbolaget.se] has quit [Quit: joelkronander] 16:31 < skelterjohn> scyth: I don't see anyone reading your client's retchan 16:31 -!- archevan [~archevan@67.69.227.99] has quit [Quit: WeeChat 0.3.3] 16:31 < skelterjohn> so the worker might be blocking on r.client.retchan<-, and never getting to the donechan send 16:31 < scyth_> client is reading it 16:31 < skelterjohn> oh nevermind found it 16:31 < skelterjohn> it's a lot of code to scan 16:32 < scyth_> skelterjohn, yeah... 16:32 < skelterjohn> i suggest you put a log statement before/after every chan read/write, then you can see which ones are blocking 16:32 < scyth_> skelterjohn, sending *Worker from Worker.Run() to *WorkFactory.donechan is blocking 16:33 < scyth_> and I can't figure out why 16:33 < scyth_> everything else works properly 16:33 < skelterjohn> so it's definitely trying to make that send? 16:33 < scyth_> yes 16:33 < scyth_> that's where it stops... like there's no one to read it 16:35 < scyth_> I'm not confident that Balance() is catching it with select {} 16:35 < skelterjohn> is Balance() getting received from the reqchan every time? 16:35 < scyth_> yes 16:35 < scyth_> if I remove donechan <- w // in Worker.Run() 16:36 < scyth_> everything passes until all requests have been served 16:36 < skelterjohn> i am not certain about this, but it might be that when it tests, if both the reqchan and the donechan have values ready, it will always take the reqchan 16:36 < skelterjohn> i don't think it does anything nice like alternating 16:36 < skelterjohn> it's a race condition 16:36 < scyth_> that could makes sense 16:36 < skelterjohn> i'm almost certain the spec doesn't specify any order 16:36 < scyth_> since it all happens very fast 16:36 < skelterjohn> so the implementation can choose whatever order it likes 16:36 < scyth_> I'll try adding sleep() to clients 16:37 < skelterjohn> the easiest one would be top to bottom 16:37 < skelterjohn> try putting the donechan case first 16:37 < plexdev> http://is.gd/6YDFwY by [Robert Griesemer] in go/src/pkg/go/ast/ -- go/ast: fixed bug in NotNilFilter, added test 16:37 < plexdev> http://is.gd/JzciVE by [Robert Griesemer] in go/src/cmd/gofmt/ -- gofmt: avoid endless loops 16:38 -!- jyxent [~jyxent@129.128.191.96] has quit [Quit: leaving] 16:38 -!- jyxent [~jyxent@129.128.191.96] has joined #go-nuts 16:38 < skelterjohn> but your code is a bit too involved for me to grok the exact flow 16:39 < skelterjohn> without me paying more attention that i really feel like giving 16:39 -!- rurban [~demo@178-190-146-154.adsl.highway.telekom.at] has quit [Quit: Verlassend] 16:39 < scyth_> skelterjohn, putting done in front of req didn't help 16:39 < skelterjohn> i didn't think it would 16:41 < scyth_> I guess I'll need to figure out another route for the two 16:41 < scyth_> but this one seemed really nice :) 16:42 < matsur> @skelterjohn unable to reproduce w/ 6g... i'll put together a bug report shortly. looks vaguely similar to https://code.google.com/p/go/issues/detail?id=1620 is the 386 GC less stable than amd64? 16:42 < skelterjohn> no idea 16:44 -!- firwen [~firwen@gex01-1-78-234-55-225.fbx.proxad.net] has joined #go-nuts 16:54 < hopso> I think it says amd64 is more mature in getting started or somewhere. 16:55 < skelterjohn> scyth_: when i run your code, the select isn't getting invoked after a while 16:56 < skelterjohn> and if i don't run your stats function, there is a deadlock 16:56 -!- keithcascio [~keithcasc@nat/google/x-jggoiynzoyfovrez] has joined #go-nuts 16:56 < hopso> "amd64 (64-bit x86, the most mature port)" @ http://golang.org/doc/install.html#environment 16:57 -!- artefon [~thiago@187.59.185.156] has joined #go-nuts 16:57 -!- dahankzter [~henrik@92-244-3-192.customers.ownit.se] has joined #go-nuts 16:58 < skelterjohn> scyth_: I believe its a gomaxprocs issue 16:58 < scyth_> hm 16:59 < skelterjohn> i no longer believe it's a gomaxprocs issue 17:00 < skelterjohn> the line with "worker.requests <- req" is blocking 17:01 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts 17:01 < skelterjohn> yes, i see the issue 17:01 < scyth_> gomaxprocs fixed the donechan issue 17:01 < skelterjohn> er 17:01 < skelterjohn> not for me it didn't 17:01 < skelterjohn> i tried it at 10 17:01 < skelterjohn> but the issue is in Worker.Run() 17:02 < scyth_> I tried it with 2000 :) 17:02 < skelterjohn> you try to send something on donechan 17:02 < skelterjohn> but in the select in Balance, it's busy trying to write something to the request chan 17:02 < skelterjohn> which is received from only once the donechan has been sent to 17:03 < skelterjohn> 2000 doesn't fix it for me. perhaps you made another change 17:04 < scyth_> I mean, it fixes it in a way that first 10 or so requests are properly delivered back to donechan, and then it stops 17:04 < skelterjohn> sure 17:04 < skelterjohn> those first 10 or so always worked for me 17:04 < skelterjohn> but then, i had gomaxprocs=2 at the beginning 17:05 < scyth_> so if I got it right, select is blocking on send to worker.requests because all 10 workers are waiting on donechan 17:06 < skelterjohn> if you run this it might be more clear http://pastebin.com/mZvNkaK1 17:06 < skelterjohn> but i think you said it right 17:07 < skelterjohn> (i just changed what got printed and when) 17:07 < skelterjohn> basically, two goroutines are trying to send to each other 17:07 < skelterjohn> ie deadlock 17:08 < Glasswalker> if I initialize an empty string, and check len(mystring) will it return > 0 (ie does it count the string terminator character) 17:08 < skelterjohn> there is no string terminator character 17:08 < skelterjohn> in go 17:08 < Glasswalker> ok 17:08 < Glasswalker> so then it will be zero 17:08 < skelterjohn> yes 17:08 < Glasswalker> until I put a value in the string 17:09 < skelterjohn> strings are immutable 17:09 < skelterjohn> you can just create new ones 17:09 < Glasswalker> right but if I have a type with a string field... And I create a new "mytype", then I do mytype.s = "Something" 17:09 < skelterjohn> right 17:10 < Glasswalker> the end result is that before I do the assignment, len(mytype.s) == 0 but after assignment len(mytype.s) == len("Something") 17:10 < Glasswalker> right? 17:10 < skelterjohn> the underlying data structure for a string is something like struct {length int, data []byte} 17:10 < skelterjohn> yes 17:11 < Glasswalker> ok :) thanks! 17:11 < skelterjohn> actually, not []byte 17:11 < skelterjohn> but *byte 17:11 < scyth_> skelterjohn, so I basically need to split 'receive new request' and 'work' in my workers in separate goroutines 17:11 < scyth_> or introduce a mutex 17:11 < skelterjohn> scyth_: I haven't thought about a solution, but you certainly need to eliminate the deadlock somehow 17:11 < scyth_> k, thanks 17:14 -!- krutcha [~krutcha@remote.icron.com] has joined #go-nuts 17:16 < scyth_> yeah, it did the trick 17:16 < hopso> What kind of source code license should I use when I host a project on Google code for my portfolio? 17:17 < skelterjohn> i like bsd 17:17 < skelterjohn> see http://github.com/skelterjohn/gorf 17:17 < nickbp> hopso: i like gpl3 for my stuff but its really up to you 17:18 < nickbp> random sidenote here's a good licence reference http://www.gnu.org/licenses/license-list.html 17:19 < krutcha> there's like 4 million licenses all with the subtle nuance of 'doesn't really matter unless you want to sue over it' :P 17:19 < skelterjohn> doesn't list the poetic license :\ 17:19 < nickbp> also keep in mind that if youre using external code that'll affect your choices 17:19 < nickbp> or if you want to in the future 17:20 < nickbp> unless its lgpl and youre willing to jump through hoops etc 17:20 < krutcha> so hire a lawyer now so that you can successfully host 100 lines of free code on a free site for fun/learning 17:20 -!- virtualsue [~chatzilla@64.103.89.150] has quit [Ping timeout: 258 seconds] 17:20 < nickbp> wut this is good stuff to know about 17:20 < hopso> krutcha: I sure will do that! 17:20 < krutcha> hehe :P 17:21 < krutcha> I agree it's good stuff to learn about, I just think the whole thing's stupid 17:21 < hopso> Isn't MIT LIcense like "do whatever you want as long as this license note remains"? 17:22 < krutcha> 2.3 million of the 4 million licenses are subtle variations of just that 17:23 -!- prip [~foo@host188-121-dynamic.42-79-r.retail.telecomitalia.it] has quit [Ping timeout: 258 seconds] 17:24 < krutcha> it really boils down to whether you want to copyright or copyleft your work, and whether you want people to be able to read, compile, build with, link to or simply be aware of your code's existance 17:24 < krutcha> to help clear it up 17:25 < krutcha> vatican warlock assassins will spring forth from oracle and delete you if you get it wrong, then claim to own your house 17:25 -!- prip [~foo@host188-121-dynamic.42-79-r.retail.telecomitalia.it] has joined #go-nuts 17:27 < hopso> Why isn't there a simple "Public domain" option in that drop down menu? :D 17:27 < krutcha> GNU has several variants of GPL, LGPL, and AGPL licenses, some backward and some forward compatible, some sideways but not necessarily compatible through interdementional legal loopholes 17:27 < krutcha> so it's good they help to simplify it for the masses 17:27 < skelterjohn> hopso: You could probably put that as "other" 17:28 -!- fabled [~fabled@83.145.235.194] has quit [Quit: Ex-Chat] 17:29 -!- RobertLJ1 [~RobertLJ@c-68-37-119-54.hsd1.nj.comcast.net] has quit [Quit: Leaving.] 17:29 < pharris> hopso: Some countries (eg Germany, IIRC) don't recognize dedication to the Public Domain. If you try to do that, it reverts back to default copyright (nobody can do anything with it, more or less). 17:30 < skelterjohn> so as long as you don't care about germans (and who does?), don't worry about it 17:30 < krutcha> then david hasslehoff will sue you though 17:31 < hopso> skelterjohn: Is the bsd license you mentioned same as "New BSD license"? 17:31 < skelterjohn> no idea 17:31 < skelterjohn> i stole the license that go uses 17:32 < skelterjohn> i figure they probably thought about it 17:32 < skelterjohn> and i don't care to 17:32 -!- Fish- [~Fish@88.162.170.133] has joined #go-nuts 17:32 < skelterjohn> at the very least it makes my work compatible with the go distribution 17:32 < krutcha> I cut pasted the license from the only other go project I linked against 17:33 < Glasswalker> Several examples use strings.Bytes() to convert a string into a byte array... What do I use in placeo f that now (since that no longer appears to exist) 17:33 < hopso> Quick Wikipedia lookup tells me it is. 17:33 < skelterjohn> Glasswalker: []byte(thestring) 17:33 < Glasswalker> oh lol 17:33 < Glasswalker> didn't think of that 17:33 -!- fabled [~fabled@83.145.235.194] has joined #go-nuts 17:33 -!- RobertLJ [~RobertLJ@c-68-37-119-54.hsd1.nj.comcast.net] has joined #go-nuts 17:33 < skelterjohn> can go the other way too 17:34 < krutcha> re: licenses, I think gnu.org needs a wizard to ask you 10 questions then suggest the licenses that satisfy your needs 17:35 < Glasswalker> Hmm... Think I made a bit of a mistake last night in our discussion about interfaces 17:35 < krutcha> then to do away with the licenses, and make all licenses multiple choice DNA encoded forms of your answers to those questions 17:35 < Glasswalker> So I have my Packet type, and I now want to cast it into a ConnectPacket 17:35 < Glasswalker> I don't appear to be able to do that unless Packet is an interface (Packet is a struct) 17:36 < Glasswalker> so I guess I do need to setup an interface 17:36 -!- crodjer [~rohanjain@203.110.240.205] has quit [Quit: Leaving] 17:36 < skelterjohn> Glasswalker: that was last night for you? don't sleep much, do you :) 17:36 < skelterjohn> oh wait 17:36 < skelterjohn> i got that crossed up with a forum post i replied to 17:36 < skelterjohn> sorry 17:36 < Glasswalker> lmao 17:36 < Glasswalker> I am pretty sure it was last night 17:36 < Glasswalker> might have been 2 nights ago though 17:36 < Glasswalker> lol 17:37 < Glasswalker> been sick last few days so spending my time off work coding :) it's all kind of a blur 17:37 < Glasswalker> So yeah... Think I need to define an interface then? 17:38 < skelterjohn> probably 17:38 < Glasswalker> So I have a value of type Packet, and I need it to become type ConnectPacket... How do I do that? :) Can I just make Packet an interface type (even though it has fields) 17:38 < krutcha> is your PacketType an interface? 17:38 < Glasswalker> it's a struct 17:38 < skelterjohn> you can't have an interface with fields 17:39 < skelterjohn> you can have a PacketBasics struct that all other packet types embed 17:39 < Glasswalker> Hmm 17:39 < skelterjohn> and you can have this PacketBasics have methods to satisfy the Packet interface, giving the other packet types default implementations 17:39 < skelterjohn> then they'll all satisfy the Packet interface, and all have the PacketBasics data 17:39 < skelterjohn> and behaviro 17:40 < Glasswalker> Hmm 17:40 < Glasswalker> ok packet has several methods (like 20-30) but each of the packet types only have an Encode and Decode method 17:40 < skelterjohn> then this approach makes sense to me 17:40 < Glasswalker> oh 17:40 < skelterjohn> you'd only redefine the Encode/Decode methods 17:40 < Glasswalker> I thought to satisfy the interface all of them needed to implement the methods 17:40 < skelterjohn> type A struct { B } 17:40 < skelterjohn> A has all of B's methods 17:41 < skelterjohn> which is different than "type A B" 17:41 < skelterjohn> where A only has B's data, and none of its methods 17:41 < skelterjohn> but the latter A can be converted to a B 17:41 < skelterjohn> where the former can not. 17:41 < krutcha> and also different than type A struct { x B } which has a member of type B 17:41 < skelterjohn> right 17:42 < Glasswalker> ok right now I have: 17:42 < Glasswalker> type Packet struct { fields } 17:42 < Glasswalker> and: 17:42 < krutcha> but the wiggy part is visualizing what that means if A and B have data 17:42 < Glasswalker> type ConnectPacket struct { Packet; fields } 17:43 < Glasswalker> so if I make Packet an interface... and create a BasicPacket which has all the fields and methods... 17:43 < Glasswalker> how do I define the interface "Packet" 17:43 < Glasswalker> (having a bit of a hard time getting my head around the interface concept) 17:45 < krutcha> there's probably a concise and useful example of embedding and GO's idiom for inheritance in that manner 17:45 < krutcha> but if it's on the newsgroup it would have devolved into 400 pages of bickering about what orthogonal means 17:45 < hopso> type Packet interface { Bytes() []byte; String() string; /* etc */ } 17:46 < hopso> That's from memory, might be totally wrong :D 17:46 < Glasswalker> ok... 17:46 < hopso> Then you just actually implement the methods in BasicPacket and it automagically implements Packet interface 17:47 -!- imsplitbit [~imsplitbi@sccc-66-78-236-243.smartcity.com] has joined #go-nuts 17:47 < Glasswalker> but does the interface specify ALL the methods in BasicPacket (like all 20 of them) and then if I make ConnectPacket only have 2 of those methods, that works? 17:48 < krutcha> if you don't implement ALL of the methods of an interface on a data type, it can't be passed as that type because it _won't_ automagically satisfy that interface anymore 17:48 < Glasswalker> ok... 17:49 < skelterjohn> the interface doesn't know about its implementations 17:49 < skelterjohn> the rule is: if you want to assign something to a value with an interface type 17:49 < skelterjohn> that something must have all the interface's methods 17:49 < Glasswalker> ok 17:49 < skelterjohn> so you take all the methods that a packet *must* have 17:49 < Glasswalker> so I only define the encode and decode in the interface 17:49 < skelterjohn> and put them in the interface 17:50 < Glasswalker> hrm 17:50 < Glasswalker> this is making my head hurt lol 17:50 < krutcha> but I think embedding can help you here (correct me if I'm wrong) but if you have embedded an unnamed member that does satisfy an interface, you do too, but only on it's data? 17:50 -!- dahankzter [~henrik@92-244-3-192.customers.ownit.se] has quit [Quit: Leaving.] 17:50 < skelterjohn> krutcha: if you embed something in a struct, the new struct gets all the embedded methods 17:50 < hopso> http://pastie.org/1792106 Like this, I guess. 17:50 < skelterjohn> so both the thing and the new struct satisfy the interface 17:51 < krutcha> right, but not with customized implementations unless you re-implement them on the new parent type right? 17:51 < skelterjohn> Glasswalker: think of the interface like an API 17:51 < krutcha> ie if you add data and want those methods to do something different, you have to clobber them 17:51 < krutcha> ? 17:51 < skelterjohn> krutcha: if you have type A struct { B } 17:51 < skelterjohn> then if B satisfies interface X, so does A 17:51 < skelterjohn> not necessarily the other way around 17:51 < krutcha> right 17:52 < Glasswalker> ok, so basically... I think I'm misunderstanding (or I hope) but if I understand correctly, I'm going to have to do a HUGE amount of refactoring in my code to account for this... 17:52 < skelterjohn> one gotcha: if you have type A struct { B; C } 17:52 < skelterjohn> and B and C both implement the interface 17:52 < skelterjohn> you need to disambiguate those methods in A for it to also implement the interface 17:52 < krutcha> but if B knows how to convert itself to a byte array, then A knows how to convert the B part of itself to a byte array.. but if you added data members to A, you have to re-implement the interface, for example? 17:53 < Glasswalker> Because I have a Packet Type (which has 5-10 fields, and about 20 methods). And several WhateverPacket types (such as ConnectPacket) which each have Encode() Decode() and more fields... 17:53 < skelterjohn> Glasswalker: I have no idea how much you have to do - it changes how your data types are used by other code though 17:53 < Glasswalker> I need to be able to freely convert from a packet to a WhateverPacket 17:53 < Glasswalker> and the other way around 17:53 < Glasswalker> but I only care about maintaining the fields in Packet when converting. 17:53 < Glasswalker> because encode/decode deals with that 17:53 < skelterjohn> krutcha: sure, the behavior of those composited methods might be wrong, but they still exist and satisfy the interface 17:54 < krutcha> I have the feeling this is all very simple, all that's missing is a concise example on go-lang to use for shared understanding/conversation 17:54 < krutcha> a concise, useful, real-world example 17:55 < skelterjohn> concise and real-world don't always mix 17:56 < Glasswalker> Ok, might be easier if I have my real code to reference 17:56 < Glasswalker> http://www.pastie.org/1792121 17:56 < Glasswalker> line 52 17:56 < Glasswalker> is the Packet definition (DAMBSPacket) 17:56 < skelterjohn> so long 17:56 < Glasswalker> immediately below that are all the other WhateverPacket types 17:56 < Glasswalker> (DAMBSConnectPacket and so on) 17:57 < Glasswalker> then beginning at 283 is the methods for DAMBSPacket 17:57 < Glasswalker> so a packet comes in with a bunch of binary data in the Payload field... 17:57 < skelterjohn> i'm making an easier to read version of that 17:57 < skelterjohn> one min 17:58 < Glasswalker> I then need to convert it to the appropriate other packet type depending on the value of the Command field 17:58 < Glasswalker> once it's the appropriate type, I then run Decode() on it 17:58 < Glasswalker> which populates the new fields in that type from the binary data in the Payload field 17:58 < Glasswalker> I can then work with those fields in various logic... 17:58 < Glasswalker> later when I want to send a packet, I create the appropriate packet type 17:58 < Glasswalker> populate it's fields 17:58 < Glasswalker> then run Encode() on it 17:59 < Glasswalker> which builds the binary data in Payload 17:59 < Glasswalker> then I need to convert pack to a Packet type 17:59 < Glasswalker> to send it out over the wire (because all my transmission and reciever commands expect a "DAMBSPacket") 17:59 -!- foocraft [~dsc@dyn-86-36-43-184.wv.qatar.cmu.edu] has quit [Quit: Leaving] 18:02 < Glasswalker> I guess I built this with the assumption that I could derive a type, and it could be interchangable with it's "parent" type. 18:02 < Glasswalker> but that's OO thinking, and I know Go has a completely different way of doing that... 18:02 < Glasswalker> Just a bit worried now that I'm going to have to hugely refactor this to make it work... 18:03 -!- aho [~nya@fuld-590c6375.pool.mediaWays.net] has quit [Quit: EXEC_over.METHOD_SUBLIMATION] 18:03 -!- niemeyer [~niemeyer@189-10-155-52.pltce701.dsl.brasiltelecom.net.br] has quit [Remote host closed the connection] 18:03 -!- niemeyer [~niemeyer@189-10-155-52.pltce701.dsl.brasiltelecom.net.br] has joined #go-nuts 18:04 < skelterjohn> an easier to read version: http://pastebin.com/JWYAAxkj 18:04 < krutcha> go definitely has solutions around it.. but in that area I find it difficult to unmuddle the documentation 18:04 -!- gregschlom [~quassel@118.68.142.103] has joined #go-nuts 18:04 -!- reds [~reds@pool-74-101-147-57.nycmny.fios.verizon.net] has quit [Remote host closed the connection] 18:04 < krutcha> it's actually a good thought to cover that in the 'go for C/C++ programmers' document a little better, might help unconfuddle us all :P 18:05 -!- joelkronander [~joelkrona@c-bf2fe253.617-1-64736c22.cust.bredbandsbolaget.se] has joined #go-nuts 18:05 < skelterjohn> it was sort of an evolution that got stuck 18:05 < skelterjohn> originally we just had data and we had behavior 18:05 < skelterjohn> then we said "hey we can mix data and behavior!" and lo, OOP 18:05 < skelterjohn> then java said "data and behavior are the same thing!" 18:06 < skelterjohn> and lo, the OOO (object oriented orthodoxy) 18:06 -!- rutkowski [~adrian@178235048012.walbrzych.vectranet.pl] has joined #go-nuts 18:06 < skelterjohn> go says "we have data, and we have behavior, and we can tie some data to some behavior, but they're not the same thing" 18:07 < krutcha> when it comes to C++ the example of packets is well trodden, and the is-a relationship of inheritence, and the implicit calling of the most derived type's implementation make it very easy to do 18:07 < hopso> Did I miss something or could this be somewhere near what you want? http://pastie.org/1792153 18:07 < krutcha> *not wanting to get into a religious debate about how C++ is all wrong.. just sayin', it's easy to code what Glasswalker wants in that language* 18:09 < Glasswalker> right 18:09 < Glasswalker> and coming from a C++ programming background you can see why I made the mistake ;) 18:09 < Glasswalker> (I'm an oldschool C++ Programmer who is interested in converting to Go, but hitting a few conceptual hurdles along the way) :) 18:09 < krutcha> definitely, I am still making that mistake in go code and working on solving these problems in a more 'go way' also 18:10 -!- zimsim [~simon@87.72.77.195] has quit [Ping timeout: 260 seconds] 18:11 < Glasswalker> hopso: But in that example, ConnectPacket wouldn't impliment the Packet interface 18:11 < Glasswalker> or am I wrong? 18:12 * nsf smells a lot of C++ words on this channel 18:12 < hopso> ConnectPacket has all the same methods and field as BasicPacket so yes it does implement Packet 18:12 < nsf> C++ is crap 18:12 * nsf said it all 18:12 < nsf> :D 18:12 < nsf> back to movie 18:13 < krutcha> I still think in 'is a' terms a lot. So a myPacket 'is a' Packet, therefore it contains a 'struct Header' Packet.Header, and a []byte Packet.Payload. It also inherits Packet.toBytes(), however it can override that for its own data payload. 18:13 -!- boscop [~boscop@g227128090.adsl.alicedsl.de] has joined #go-nuts 18:14 < krutcha> in go, I've yet to see anybody as simply and concisely describe this sort of relationship 'the go way' without it looking like a giant unrelated list of foo bar foo bar(foo) bar's 18:14 < krutcha> yet, I think it can be done, just isn't generally documented/explained well 18:14 -!- TheMue [~TheMue@p5DDF6678.dip.t-dialin.net] has joined #go-nuts 18:16 -!- boscop [~boscop@g227128090.adsl.alicedsl.de] has quit [Read error: Connection reset by peer] 18:16 < hopso> How should I structure a code repository with two main applications and three utilities related to the project? 18:17 < hopso> "src/cmd/application-name" like seen on few other go projects? :o 18:19 -!- boscop [~boscop@g227128090.adsl.alicedsl.de] has joined #go-nuts 18:19 < Glasswalker> Actually with further looking, it does look like hopso's solution will work for me 18:20 < Glasswalker> I need to rename Packet to BasicPacket, and then put the Packet interface in, which has all the methods in BasicPacket. then it should just work 18:20 * Glasswalker might have a bit of wishful thinking going on 18:20 -!- Wiz126 [Wiz@h187.120.232.68.ip.windstream.net] has quit [Quit: EOF()] 18:20 < Glasswalker> Off to try it :) 18:21 < hopso> Glasswalker: I hope it works :) 18:22 -!- scyth_ [~scyth@194.247.195.133] has quit [Quit: Leaving] 18:22 -!- gregschlom [~quassel@118.68.142.103] has quit [Read error: Connection reset by peer] 18:22 < krutcha> thats a nice clean example, I like it too 18:25 < skelterjohn> does anything ever need to know more than Encode()/Decode() while not knowing the underlying type? 18:25 < plexdev> http://is.gd/VkUgiq by [Brad Fitzpatrick] in go/src/pkg/io/ -- io: clarify that ReadAt shouldn't move the seek offset 18:25 < skelterjohn> if not, you'd only put Encode()/Decode() in the interface 18:29 -!- tensai_cirno [~user@77.232.15.216] has joined #go-nuts 18:30 -!- boscop [~boscop@g227128090.adsl.alicedsl.de] has quit [Ping timeout: 246 seconds] 18:30 -!- boscop [~boscop@g227128090.adsl.alicedsl.de] has joined #go-nuts 18:31 -!- zimsim [~simon@87.72.77.195] has joined #go-nuts 18:31 < Glasswalker> skelterjohn: Ok, first, didn't work... Now everywhere I'm referring to the Packet type (which is now an interface) I'm accessing fields... which the interface doesn't have... 18:31 < skelterjohn> that is not the fault of the design pattern 18:31 < skelterjohn> that's just you not refactoring properly :) 18:32 -!- m4dh4tt3r [~Adium@69.181.223.245] has joined #go-nuts 18:32 < skelterjohn> if you had used http://github.com/skelterjohn/gorf you could have done "gorf rename . Packet BasicPacket" 18:32 < skelterjohn> and then made your Packet interface with no worries of collisions :) 18:32 < skelterjohn> </plug> 18:32 < Glasswalker> To answer your question, if I'm referring to a (lets call it subtype) of packet, (such as ConnectPacket) it only references ALL the fields (including those from Packet) but only the methods Encode and Decode... the other methods are only ever run on a Packet 18:32 < Glasswalker> lmao 18:33 < Glasswalker> good to know :) I take it gorf is a refactoring tool 18:33 < Glasswalker> I misunderstood... 18:33 < skelterjohn> GO ReFactoring tool 18:33 < Glasswalker> lol 18:33 < Glasswalker> should have got that ;) 18:33 < skelterjohn> it's beta 18:33 < Glasswalker> anyway, I misunderstood the pattern 18:33 < Glasswalker> or I'm missing some key detail 18:33 < skelterjohn> presumably the packet subtypes call some of the original packet methods, right? 18:34 < skelterjohn> in their encode/decode procedures 18:34 < Glasswalker> no they don't 18:34 -!- tensai_cirno [~user@77.232.15.216] has quit [Remote host closed the connection] 18:34 < Glasswalker> the methods for the original packet are only used to prepare for transmission, or do pre-processing on reciept 18:34 < skelterjohn> what invokes the other packet methods? 18:34 < Glasswalker> there is a connection type 18:34 < Glasswalker> which handles the TCP Connection 18:34 < skelterjohn> what code calls these other methods 18:34 < Glasswalker> there is a RecievePacket method in that 18:35 < Glasswalker> it calls the other methods 18:35 < skelterjohn> don't tell me all about your protocol and design - it's too much to internalize 18:35 < Glasswalker> sorry trying to keep it short lol 18:35 < Glasswalker> so the Connection calls all those methods 18:35 -!- boscop [~boscop@g227128090.adsl.alicedsl.de] has quit [Ping timeout: 240 seconds] 18:35 < Glasswalker> the methods are like CheckHash, and GenerateHash, and stuff like that 18:35 < skelterjohn> and the connection can deal with the various sorts of packets? 18:35 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts 18:35 < Glasswalker> no the connection only ever deals with a Packet 18:35 < Glasswalker> well 18:35 < Glasswalker> untrue 18:36 -!- boscop [~boscop@g227128090.adsl.alicedsl.de] has joined #go-nuts 18:36 < Glasswalker> the part which is calling the Packet methods only deals with Packet 18:36 < Glasswalker> there is a goroutine in there which deals with the subtypes 18:36 < skelterjohn> if there is some code that isn't a method for a packet subtype, or doesn't know the exact kind of packet it is dealing with, and it calls a packet method 18:36 < skelterjohn> that method needs to be in the packet interface 18:37 < Glasswalker> hmm 18:37 < krutcha> skelterjohn: this variation summarizes some of my questions I think http://pastie.org/1792297 18:37 < skelterjohn> and that is the *only* time 18:37 < Glasswalker> I think I'm missing something critical here 18:38 < Glasswalker> Encode and Decode are only ever called on their individual subtype 18:38 < skelterjohn> not what i'm asking 18:38 < Glasswalker> the other Packet methods are only ever called on the Packet type (never a subtype) 18:38 < skelterjohn> i'm asking about the code that calls GenerateHash(), for instance 18:38 < skelterjohn> what code does this 18:38 -!- boscop [~boscop@g227128090.adsl.alicedsl.de] has quit [Read error: Connection reset by peer] 18:39 < Glasswalker> http://www.pastie.org/1792311 18:39 -!- firwen [~firwen@gex01-1-78-234-55-225.fbx.proxad.net] has quit [Remote host closed the connection] 18:39 < Glasswalker> err 18:39 < Glasswalker> doh 18:39 < Glasswalker> lol 18:40 -!- boscop [~boscop@g227128090.adsl.alicedsl.de] has joined #go-nuts 18:40 < Glasswalker> it appears that's done from PacketFromBytes 18:40 < Glasswalker> lol 18:40 < skelterjohn> heh 18:40 < Glasswalker> yeah 18:40 < Glasswalker> PacketFromBytes does CheckHash() 18:41 < Glasswalker> GenerateHash is called from PacketFromPayload 18:41 < skelterjohn> but PacketFromBytes also creates the packet in the first place, I imagine 18:41 < Glasswalker> yes 18:41 < skelterjohn> so they know the true type of the packet they're dealing with 18:41 -!- firwen [~firwen@gex01-1-78-234-55-225.fbx.proxad.net] has joined #go-nuts 18:41 < skelterjohn> therefore they do not need to hold it in an interface 18:41 < Glasswalker> ok 18:42 < Glasswalker> but then how does PacketFromBytes return a random type of packet 18:42 < skelterjohn> though it might still be convenient, if the function can create one of several packet types, and operate the same way on any of them 18:42 < skelterjohn> its return value should be the packet interface 18:42 < skelterjohn> which I'll call PI for short, since Packet is overloaded at the moment 18:42 < Glasswalker> ok 18:42 -!- imsplitbit [~imsplitbi@sccc-66-78-236-243.smartcity.com] has quit [Quit: Leaving...] 18:42 < skelterjohn> can i see PacketFromBytes? 18:43 -!- hypertux [~hypertux@vps1.joelegasse.com] has quit [Ping timeout: 276 seconds] 18:43 < Glasswalker> It's in the code you cleaned up 18:43 < skelterjohn> i cleaned that code up 18:43 < skelterjohn> it has no actual code in it anymore :) 18:43 < skelterjohn> i need the link to yours again 18:43 < Glasswalker> lol 18:43 -!- hypertux [~hypertux@vps1.joelegasse.com] has joined #go-nuts 18:43 < Glasswalker> then it's in the original pastie 18:43 < Glasswalker> http://www.pastie.org/1792121 18:44 < Glasswalker> line 243 18:44 < Glasswalker> and PacketFromPAyload is 271 18:44 < skelterjohn> it appears that your PacketFromBytes doesn't deal with any of your specialized packet types 18:44 < skelterjohn> just the basic one 18:44 < Glasswalker> right 18:44 < Glasswalker> the reason this problem is coming up 18:44 < skelterjohn> is there code somewhere that needs to deal with a specialized packet type, *and* call something other than encode/decode? 18:44 < Glasswalker> is that I only JUST wrote the first bit of code that deals with a specialized type 18:44 < Glasswalker> everything else in the code deals with generalized packets 18:45 -!- boscop [~boscop@g227128090.adsl.alicedsl.de] has quit [Ping timeout: 250 seconds] 18:45 < Glasswalker> skelterjohn: no 18:45 < Glasswalker> hold on 18:45 < skelterjohn> then encode/decode are the only things that go in the interface, until that changes 18:45 < Glasswalker> let me get the code that's throwing the error :) 18:46 < Glasswalker> http://pastie.org/1792342 18:46 < Glasswalker> Line 24 18:46 < Glasswalker> is throwing the error 18:48 -!- boscop [~boscop@g227128090.adsl.alicedsl.de] has joined #go-nuts 18:48 < Glasswalker> And HandleConnect only cares about the fields within the ConnectPacket type, it doesn't use any methods 18:48 < skelterjohn> ah 18:48 < Glasswalker> but the error of course is on the conversion between types 18:48 < skelterjohn> that's because you can't convert one packet type to another 18:48 < Glasswalker> right 18:48 < Glasswalker> but that's what I need to do ;) 18:48 < skelterjohn> that conversion would create new data 18:49 < skelterjohn> you have to write a function to do that conversion - can't happen automatically 18:49 < Glasswalker> ok 18:49 < Glasswalker> so I don't need an interface 18:49 < Glasswalker> :) 18:49 < Glasswalker> just need to write a conversion method ;) 18:49 < skelterjohn> or your GetPacketFromX can identify the packet type and create the appropriate kind of object 18:49 < skelterjohn> and return it in an interface 18:50 < Glasswalker> ok that's where you loose me again lol 18:50 < skelterjohn> sec 18:51 < Glasswalker> oh wait 18:51 < Glasswalker> lighbulbs going off... 18:51 < Glasswalker> one second while this train of thought completes lol 18:51 < Glasswalker> Ok... so if I return an interface 18:51 < Glasswalker> I can't access any DATA on that. (no fields) 18:51 < Glasswalker> but I can access it's methods? 18:52 < Glasswalker> because my problem was, when I was using the interface, I couldn't access the data in the Packet 18:52 -!- boscop [~boscop@g227128090.adsl.alicedsl.de] has quit [Ping timeout: 246 seconds] 18:52 < Glasswalker> which meant I couldn't determine which type it was to cast it into the right subtype 18:52 -!- imsplitbit [~imsplitbi@66.78.236.243] has joined #go-nuts 18:53 < Glasswalker> but if I wrote a "GetType" method which the interface implements 18:53 < Glasswalker> I could use that to get the type out, and then cast the returned interface type, into the right packet subtype 18:53 < Glasswalker> or did I get that all wrong? 18:54 -!- virtualsue [~chatzilla@cpc3-haye15-0-0-cust450.haye.cable.virginmedia.com] has joined #go-nuts 18:54 < Glasswalker> the other option would be to write a pile of "converter" functions 18:54 < skelterjohn> http://pastebin.com/uvnqPysg 18:55 < Glasswalker> for PacketToConnectPacket() and ConnectPacketToPacket() to get 2 way conversion 18:55 < skelterjohn> as expected, by the time i get back to this screen you've written a book ^_^ 18:55 < Glasswalker> lmao 18:55 < Glasswalker> As I said before... you can't turn off my -V flag ;) 18:55 < Glasswalker> (well you could, by devoicing me in the channel, but that wouldn't be nice) 18:59 < skelterjohn> one note, you probably want to be passing around pointers to your data types 18:59 < skelterjohn> rather than value 18:59 < skelterjohn> s 18:59 < skelterjohn> otherwise you're copying the entire struct each time 19:08 -!- powerman-asdf [~powerman-@powerman.name] has joined #go-nuts 19:09 < Glasswalker> Ok, so in your example... your returning a PI interface type... so how do I access the data from that on the other end 19:10 < Glasswalker> so when I call GetPacketFromSource() and get a value out of it... it's an interface type. How do I access the fields? 19:10 -!- Project-2501 [~Marvin@82.84.87.220] has joined #go-nuts 19:12 < plexdev> http://is.gd/bHqlrN by [Adam Langley] in 3 subdirs of go/src/pkg/ -- bufio: add ReadLine 19:12 < Glasswalker> can I simply cast from an interface type into any of the types which implement the interface? 19:12 < hopso> Finally created my first code repository ever :D 19:13 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-161-26.clienti.tiscali.it] has quit [Ping timeout: 240 seconds] 19:14 -!- joelkronander [~joelkrona@c-bf2fe253.617-1-64736c22.cust.bredbandsbolaget.se] has quit [Quit: joelkronander] 19:17 < hopso> Sadly I can't continue with the project much until I get a 64-bit computer. 19:18 < hopso> I only have 64-bit Windows and the client application wont run through wine or in virtual machine. :/ 19:19 -!- imsplitbit [~imsplitbi@66.78.236.243] has quit [Quit: Bye!] 19:23 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has quit [Ping timeout: 252 seconds] 19:30 -!- huin [~huin@91.85.185.181] has joined #go-nuts 19:35 -!- crodjer [~rohanjain@203.110.240.205] has joined #go-nuts 19:42 -!- boscop [~boscop@g225225255.adsl.alicedsl.de] has joined #go-nuts 19:42 -!- RobertLJ [~RobertLJ@c-68-37-119-54.hsd1.nj.comcast.net] has left #go-nuts [] 19:59 < skelterjohn> Glasswalker: yes 19:59 < skelterjohn> with a type assertion 19:59 < skelterjohn> thePI.(*Packet1) 20:00 < angasule> hmm 20:00 < angasule> this is a bit weird 20:02 < angasule> so... I have main.go, package main, with a function Bye, that calls a C function called hello, that calls the go function main.Bye 20:02 < angasule> now, that works just fine 20:04 < angasule> but, if I have meh.go, package meh, with a function Bye, and I try to call that from a C function called hello (which is called from main), I get a panic 20:05 < angasule> panic: runtime error: invalid memory address or nil pointer dereference 20:08 -!- marten [~marten@82-170-80-86.ip.telfort.nl] has quit [Quit: marten] 20:09 < hopso> Weird. 20:10 -!- femtooo [~femto@95-89-249-242-dynip.superkabel.de] has joined #go-nuts 20:10 < angasule> yeah, I'm sending an email to the list, I guess :-) 20:11 -!- femtooo [~femto@95-89-249-242-dynip.superkabel.de] has quit [Read error: Connection reset by peer] 20:12 -!- femtoo [~femto@95-89-249-242-dynip.superkabel.de] has quit [Ping timeout: 246 seconds] 20:18 -!- coolaj86 [~coolaj86@208.97.56.73] has joined #go-nuts 20:19 < coolaj86> I'm trying to compile go on ARM and I'm getting an error in y.tab.h 20:20 < coolaj86> m4 --version 1.4.14 20:20 < coolaj86> bison --version 2.4.3 20:20 -!- crodjer [~rohanjain@203.110.240.205] has quit [Quit: Leaving] 20:20 -!- virtualsue [~chatzilla@cpc3-haye15-0-0-cust450.haye.cable.virginmedia.com] has quit [Ping timeout: 246 seconds] 20:22 -!- JusticeFries [~JusticeFr@c-24-9-171-36.hsd1.co.comcast.net] has joined #go-nuts 20:22 -!- matsur [~matsur@76-250-39-57.lightspeed.mdsnwi.sbcglobal.net] has quit [Quit: matsur] 20:27 -!- virtualsue [~chatzilla@nat/cisco/x-fkjxztcdijrdhrxq] has joined #go-nuts 20:27 -!- Fish- [~Fish@88.162.170.133] has quit [Quit: So Long, and Thanks for All the Fish] 20:28 -!- Fish- [~Fish@9fans.fr] has joined #go-nuts 20:29 < plexdev> http://is.gd/LzYEz0 by [Russ Cox] in go/src/pkg/os/inotify/ -- os/inotify: use _test for test files, not _obj 20:29 < plexdev> http://is.gd/MSxn9z by [Russ Cox] in 4 subdirs of go/src/ -- build: use gcc -Werror 20:29 < plexdev> http://is.gd/gJMqOF by [Russ Cox] in 3 subdirs of go/ -- build: tidy intermediate files during build 20:29 < plexdev> http://is.gd/OiBzDh by [Russ Cox] in go/src/libmach/ -- libmach: fix freebsd compiler errors 20:32 -!- huin [~huin@91.85.185.181] has quit [Quit: leaving] 20:33 -!- itrekkie [~itrekkie@ip72-200-105-157.tc.ph.cox.net] has joined #go-nuts 20:40 -!- itrekkie [~itrekkie@ip72-200-105-157.tc.ph.cox.net] has quit [Quit: itrekkie] 20:45 < piranha> eh, I want map(func, iterable) so much... :\ 20:47 < aiju> there are for loops 20:49 < piranha> yes, but often they are much longer than what you could have with map/reduce... 20:49 -!- zerosanity [~josh@8.20.178.82] has quit [Read error: Connection reset by peer] 20:50 < kamaji> skelterjohn: how did you set up your keyboard to do greek characters? 20:53 < coolaj86> piranha: do you know who I should ask about errors when compiling on ARM? 20:53 < piranha> heh, no 20:54 < coolaj86> it seems like every time I run ./make.bash it starts from the beginning. Any idea how to not do that? 20:55 -!- arun_ [~arun@unaffiliated/sindian] has quit [Ping timeout: 246 seconds] 20:55 -!- zozoR [~Morten@56344b27.rev.stofanet.dk] has quit [Remote host closed the connection] 20:55 < piranha> well, I'm not an expert; maybe someone other has an idea 20:56 < aiju> piranha: i honestly don't think so (about map being shorter) 20:58 < piranha> times := map(func(r result) int64 { return r.time }, results) 20:58 < piranha> for loop is 4 lines for this example 20:58 < aiju> well because you stuff everything into one line with map ... 20:58 -!- Project-2501 [~Marvin@82.84.87.220] has quit [Quit: E se abbasso questa leva che succ...] 20:59 -!- sebastian [~sebastian@89.249.0.154] has joined #go-nuts 20:59 < piranha> aiju: well, it's because it's small and simple 21:01 < plexdev> http://is.gd/tALb3s by [Rob Pike] in go/src/cmd/gofix/ -- gofix: fix embarrassing typo in osopen.go 21:01 < plexdev> http://is.gd/5JdiFb by [Russ Cox] in go/src/pkg/reflect/ -- reflect: inline method implementations 21:01 < plexdev> http://is.gd/YOjnYm by [Robert Griesemer] in go/src/cmd/gofmt/ -- gofmt: minor refactor to permit easy testing 21:02 < plexdev> http://is.gd/HorB82 by [Robert Griesemer] in 2 subdirs of go/src/cmd/gofmt/ -- gofmt: add test framework in Go 21:02 < skelterjohn> kamaji: i made a shortcut that changes it to all greek letters 21:02 < skelterjohn> via sweet apple stuff 21:03 < piranha> you can also just install greek layout and switch between layouts with cmd+space :) 21:03 < aiju> i use xmodmap 21:03 < skelterjohn> that's what i do 21:03 < aiju> to type greek letters 21:03 < skelterjohn> except cmd+shift+space 21:03 < skelterjohn> cmd+opt+space i mean 21:03 < piranha> ah, ok then :) 21:03 < aiju> there is also SCIM 21:04 < aiju> and the other thing, i think it's called ibus or something 21:04 -!- powerman-asdf [~powerman-@powerman.name] has left #go-nuts ["Leaving."] 21:05 -!- Fish- [~Fish@9fans.fr] has quit [Quit: So Long, and Thanks for All the Fish] 21:09 -!- rutkowski [~adrian@178235048012.walbrzych.vectranet.pl] has quit [Quit: WeeChat 0.3.3-dev] 21:11 -!- skelterjohn [~jasmuth@lawn-gw.rutgers.edu] has quit [Quit: skelterjohn] 21:11 < angasule> so, it turns out the package fmt was not being initialised, as packages are initialised by being used (directly or indirectly) by main, but Bye() was being called from C 21:11 < angasule> so, I now know how to call C from go and go from C, neat! 21:13 < exch> is that built with cgo or Go's c compiler? 21:15 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:7ca6:acc:1dac:a4e] has quit [Quit: Leaving.] 21:15 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit: Verlassend] 21:16 -!- angasule [~angasule@190.2.33.49] has quit [Ping timeout: 260 seconds] 21:18 -!- Scorchin [~Scorchin@host109-156-218-26.range109-156.btcentralplus.com] has joined #go-nuts 21:18 < plexdev> http://is.gd/xseX59 by [Brad Fitzpatrick] in go/src/pkg/http/ -- http: flesh out server Expect handling + tests 21:22 -!- cafesofie [~cafesofie@ool-4a5a6ee5.dyn.optonline.net] has joined #go-nuts 21:25 -!- Wiz126 [Wiz@h187.120.232.68.ip.windstream.net] has joined #go-nuts 21:29 -!- sebastian [~sebastian@89.249.0.154] has quit [Quit: leaving] 21:29 -!- sebastian [~sebastian@89.249.0.154] has joined #go-nuts 21:30 -!- Venom_X [~pjacobs@66.54.185.133] has quit [Quit: Venom_X] 21:34 -!- TheMue [~TheMue@p5DDF6678.dip.t-dialin.net] has quit [Quit: TheMue] 21:35 < plexdev> http://is.gd/JL8phD by [Robert Griesemer] in 3 subdirs of go/src/ -- fix build: disable gofmt test script, enable gotest testing instead 21:37 -!- rlab [~Miranda@91.200.158.34] has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org] 21:41 -!- piranha [~piranha@5ED43A0B.cm-7-5a.dynamic.ziggo.nl] has quit [Quit: Computer has gone to sleep.] 21:42 -!- pharris [~Adium@rhgw.opentext.com] has quit [Quit: Leaving.] 21:45 < hopso> I just realised how many little functions my older code has that are already in standard library. 21:46 < hopso> I should just base my packet class on bytes.Buffer and I can reduce the code to half. 21:49 < krutcha> there's also the newish gob package, and encoding.binary etc that can be useful 21:51 -!- aconran_ [~aconran-o@38.104.129.126] has joined #go-nuts 21:53 -!- pothos_ [~pothos@111-240-172-98.dynamic.hinet.net] has joined #go-nuts 21:53 -!- sebastian [~sebastian@89.249.0.154] has quit [Quit: Lost terminal] 21:54 -!- KirkMcDo1ald [~Kirk@24.143.227.33] has joined #go-nuts 21:54 -!- rejb [~rejb@unaffiliated/rejb] has quit [Read error: Connection reset by peer] 21:54 -!- pothos [~pothos@111-240-172-98.dynamic.hinet.net] has quit [Read error: Connection reset by peer] 21:54 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts 21:54 -!- KirkMcDonald [~Kirk@python/site-packages/KirkMcDonald] has quit [Ping timeout: 246 seconds] 21:54 -!- rejb [~rejb@unaffiliated/rejb] has quit [Client Quit] 21:54 -!- jgonzalez [~jgonzalez@173-14-137-134-NewEngland.hfc.comcastbusiness.net] has quit [Ping timeout: 246 seconds] 21:54 -!- xyproto [~alexander@77.40.159.131] has quit [Ping timeout: 246 seconds] 21:54 -!- aconran [~aconran-o@38.104.129.126] has quit [Read error: Connection reset by peer] 21:54 -!- xyproto1 [~alexander@77.40.159.131] has joined #go-nuts 21:55 -!- KirkMcDonald [~Kirk@24.143.227.33] has quit [Changing host] 21:55 -!- KirkMcDonald [~Kirk@python/site-packages/KirkMcDonald] has joined #go-nuts 21:55 -!- jgonzalez [~jgonzalez@173-14-137-134-NewEngland.hfc.comcastbusiness.net] has joined #go-nuts 21:56 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.4] 21:59 < hopso> Already using encoding/binary :) 22:00 -!- piranha [~piranha@5ED43A0B.cm-7-5a.dynamic.ziggo.nl] has joined #go-nuts 22:01 -!- meanburrito920 [~john@woozy.STUDENT.CWRU.Edu] has joined #go-nuts 22:01 -!- meanburrito920 [~john@woozy.STUDENT.CWRU.Edu] has quit [Changing host] 22:01 -!- meanburrito920 [~john@unaffiliated/meanburrito920] has joined #go-nuts 22:02 < hopso> Also I should separate my two servers. Currently both are in the same executable. 22:03 -!- meanburrito920 [~john@unaffiliated/meanburrito920] has quit [Client Quit] 22:07 < plexdev> http://is.gd/XGJCpE by [Rob Pike] in go/src/libmach/ -- libmach: fix the windows build. 22:15 -!- GeertJohan [~Squarc@D978EC5D.cm-3-1d.dynamic.ziggo.nl] has quit [Quit: Leaving.] 22:19 -!- hopso [~hopso@a91-152-176-165.elisa-laajakaista.fi] has quit [Remote host closed the connection] 22:20 -!- virtualsue [~chatzilla@nat/cisco/x-fkjxztcdijrdhrxq] has quit [Ping timeout: 240 seconds] 22:22 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined #go-nuts 22:24 < plexdev> http://is.gd/yWecqG by [Robert Griesemer] in 8 subdirs of go/src/ -- gofmt: gofmt -s -w src misc 22:31 < kamaji> whaaaaat, there's a Tron remix album :D 22:31 < kamaji> /offtopic 22:32 -!- firwen [~firwen@gex01-1-78-234-55-225.fbx.proxad.net] has quit [Remote host closed the connection] 22:33 < skelterjohn> i liked that movie 22:33 < skelterjohn> <3 olivia wilde 22:33 < skelterjohn> too bad the main character was played by an awful actor 22:34 < kamaji> It takes a really bad actor for me to notice, so it didn't really bother me :p 22:35 < kamaji> but grooveshark has the remix album, listen to The Glitch Mob remix of Derezzed if you liked the soundtrack 22:35 < kamaji> and let's face it, the soundtrack was the best part of that whole film 22:36 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read error: Connection reset by peer] 22:36 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined #go-nuts 22:36 -!- ivan` [~ivan@unaffiliated/ivan/x-000001] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 22:37 -!- ivan` [~ivan@unaffiliated/ivan/x-000001] has joined #go-nuts 22:38 -!- wrtp [~rog@92.17.67.64] has quit [Quit: wrtp] 22:44 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts 22:58 -!- niemeyer [~niemeyer@189-10-155-52.pltce701.dsl.brasiltelecom.net.br] has quit [Ping timeout: 240 seconds] 23:04 -!- matti__ [~mumboww@c-24-6-22-101.hsd1.ca.comcast.net] has quit [Ping timeout: 240 seconds] 23:14 -!- ampleyfly [ampleyfly@gateway/shell/blinkenshell.org/x-ryhheouafcaumlxc] has quit [Ping timeout: 276 seconds] 23:14 -!- ampleyfly [ampleyfly@gateway/shell/blinkenshell.org/x-pelrswglirupwpwd] has joined #go-nuts 23:19 -!- jgonzalez [~jgonzalez@173-14-137-134-NewEngland.hfc.comcastbusiness.net] has quit [Ping timeout: 260 seconds] 23:26 -!- iant [~iant@nat/google/x-vfogusrcnczmpkdq] has quit [Ping timeout: 248 seconds] 23:28 -!- zimsim [~simon@87.72.77.195] has quit [Ping timeout: 276 seconds] 23:30 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read error: Connection reset by peer] 23:31 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined #go-nuts 23:32 -!- iant [~iant@67.218.107.170] has joined #go-nuts 23:32 -!- mode/#go-nuts [+v iant] by ChanServ 23:33 -!- artefon [~thiago@187.59.185.156] has quit [Quit: bye] 23:33 -!- franksalim [~franksali@99-123-6-19.lightspeed.sntcca.sbcglobal.net] has joined #go-nuts 23:38 -!- autotron [~autotron@cpe-98-155-92-67.san.res.rr.com] has joined #go-nuts 23:40 -!- dfc [~dfc@eth59-167-133-99.static.internode.on.net] has joined #go-nuts 23:41 -!- jgonzalez [~jgonzalez@173-14-137-134-NewEngland.hfc.comcastbusiness.net] has joined #go-nuts 23:45 -!- autotron [~autotron@cpe-98-155-92-67.san.res.rr.com] has quit [Read error: Operation timed out] 23:47 -!- ExtraSpice [XtraSpice@88.118.35.153] has quit [Ping timeout: 276 seconds] 23:48 -!- katakuna [~pie@kjal.demon.co.uk] has quit [Ping timeout: 260 seconds] 23:50 -!- JusticeFries [~JusticeFr@c-24-9-171-36.hsd1.co.comcast.net] has quit [Quit: JusticeFries] 23:56 < plexdev> http://is.gd/RmeyE1 by [Nigel Tao] in go/src/pkg/image/ -- image: allow "?" wildcards when registering image formats. 23:56 < plexdev> http://is.gd/0cRzSA by [Rob Pike] in 3 subdirs of go/src/cmd/ -- govet: make name-matching for printf etc. case-insensitive. --- Log closed Thu Apr 14 00:00:50 2011