--- Log opened Sat Jul 23 00:00:01 2011 00:00 -!- dsal [~Adium@adsl-69-230-8-158.dsl.pltn13.pacbell.net] has joined #go-nuts 00:01 -!- dsal [~Adium@adsl-69-230-8-158.dsl.pltn13.pacbell.net] has quit [Client Quit] 00:14 -!- jamesmiller5 [~jamesmill@184.17.121.123] has joined #go-nuts 00:15 -!- vmil86 [~vmil86@78.57.227.12] has quit [Ping timeout: 276 seconds] 00:16 -!- telexicon [~telexicon@unaffiliated/chowmeined] has joined #go-nuts 00:17 -!- nutate [~rseymour@cacsag4.usc.edu] has quit [Quit: I'm outta heee-eere] 00:17 -!- Nisstyre [~nisstyre@infocalypse-net.info] has quit [Remote host closed the connection] 00:19 -!- robteix [~robteix@host107.200-43-249.telecom.net.ar] has joined #go-nuts 00:20 -!- jamesmiller5 [~jamesmill@184.17.121.123] has quit [Quit: Leaving] 00:36 -!- pvarga [~pvarga@pool-71-187-202-33.nwrknj.fios.verizon.net] has quit [Quit: pvarga] 00:36 < crazy2be> quiet tonight 00:37 -!- tvw [~tv@e176005223.adsl.alicedsl.de] has quit [Remote host closed the connection] 00:38 -!- Nisstyre [~nisstyre@infocalypse-net.info] has joined #go-nuts 00:40 -!- pvarga [~pvarga@pool-71-187-202-33.nwrknj.fios.verizon.net] has joined #go-nuts 00:40 -!- kergoth_ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has joined #go-nuts 00:45 -!- ijknacho [~goofy@71.123.134.24] has quit [Ping timeout: 250 seconds] 00:45 < skelterjohn> too quiet... 00:50 < brandini> yup 00:50 < brandini> time to hack! 00:50 < crazy2be> yay! 00:51 < crazy2be> although it's hard to hack on go code 00:51 < crazy2be> most of what you do is hardly hacking :P 00:51 < crazy2be> compared to say C 00:51 < crazy2be> heh 00:52 -!- qeed [~qeed@adsl-98-85-43-51.mco.bellsouth.net] has joined #go-nuts 00:56 -!- Bigbear11 [~Cody@d75-158-129-33.abhsia.telus.net] has quit [Read error: Connection reset by peer] 00:56 < brandini> writing code is hacking :) 00:56 -!- iant [~iant@66.109.104.217] has quit [Quit: Leaving.] 00:57 -!- moraes [~moraes@189.103.188.201] has quit [Read error: Operation timed out] 00:58 -!- Bigbear1 [~Cody@d75-158-129-33.abhsia.telus.net] has joined #go-nuts 00:58 -!- Bigbear1 [~Cody@d75-158-129-33.abhsia.telus.net] has quit [Read error: Connection reset by peer] 01:04 -!- pvarga [~pvarga@pool-71-187-202-33.nwrknj.fios.verizon.net] has quit [Ping timeout: 255 seconds] 01:05 -!- keithcascio [~keithcasc@nat/google/x-zwyggweeeajifiht] has quit [Quit: Leaving] 01:06 -!- Bigbear1 [~Cody@d75-158-129-33.abhsia.telus.net] has joined #go-nuts 01:08 -!- Bigbear1 [~Cody@d75-158-129-33.abhsia.telus.net] has quit [Read error: Connection reset by peer] 01:09 -!- Bigbear1 [~Cody@d75-158-129-33.abhsia.telus.net] has joined #go-nuts 01:09 < brandini> anyone written a threaded app that hits a web page in go? 01:11 -!- pvarga [~pvarga@pool-71-187-202-33.nwrknj.fios.verizon.net] has joined #go-nuts 01:14 -!- jamesmiller5 [b811797b@gateway/web/freenode/ip.184.17.121.123] has joined #go-nuts 01:17 -!- jamesmiller5_ [b811797b@gateway/web/freenode/ip.184.17.121.123] has joined #go-nuts 01:18 -!- jamesmiller5 [b811797b@gateway/web/freenode/ip.184.17.121.123] has quit [Ping timeout: 252 seconds] 01:18 -!- lucian [~lucian@78-86-217-168.zone2.bethere.co.uk] has quit [Remote host closed the connection] 01:19 -!- Nisstyre [~nisstyre@infocalypse-net.info] has quit [Quit: Leaving] 01:20 < kevlar_work> brandini, yeah 01:21 < brandini> kevlar_work: would you mind sharing that up? 01:22 < brandini> I'm interested in making another useless benchmark tool :) 01:22 < brandini> right now I'm using python and the test tool is killing my cpu before my website even gets warmed up 01:24 < str1ngs> brandini: client := new(http.Client); _,err := client.Get("http://golang.org") 01:25 < str1ngs> adds some for loops and goroutines should be pretty easy. 01:25 < brandini> I do need to write more code don't I :) 01:25 < str1ngs> not much really 01:25 < str1ngs> read what I said 01:31 < kevlar_work> wrap the client.Get in a for loop, wrap that for loop in a goroutine, wrap that goroutine in a for loop, and set the for loop ranges to be flags and you're pretty much done. 01:32 < brandini> :) 01:32 < brandini> I've got that almost done 01:32 < crazy2be> you could just use seige :P 01:32 < brandini> is that in go? 01:33 < crazy2be> no, but it's useful for benchmarking webservers and testing under load 01:34 < jamesmiller5_> apache has a basic benchmark tool 01:34 < kevlar_work> here's one I wrote a long time ago: https://gist.github.com/1100833 01:35 < kevlar_work> it doesn't do multiple requests per goroutine, but it does a pretty good job of hammering tomcat, which was its target. 01:35 < brandini> sweet 01:35 < brandini> just to clarify, this won't be multiple requests at once? 01:35 < kevlar_work> lol, it does EVERY request in parallel 01:36 < kevlar_work> all 1000 of them if you don't change the arguments. 01:36 < brandini> sweet 01:36 < brandini> perfect! 01:36 < brandini> I wanna make IIS+.NET look like limp dick compared to my go app 01:36 < crazy2be> brandini: What does your app do? 01:37 < brandini> same thing the .NET one does, a call into a backend service, render a page from the result 01:37 < crazy2be> nice 01:37 < brandini> think xsl+xml messages+java 01:37 < crazy2be> eww 01:37 < brandini> yeah 01:39 < brandini> at the defaults I'm getting 11.90% error rate hitting an nginx proxy in front of my go app 01:39 < brandini> lets start two go apps 01:40 < crazy2be> brandini: What's your setup? 01:40 < brandini> my cr-48 netbook is already outperforming our production setup :) 01:41 < kevlar_work> 11.9% error rate is pretty bad... 01:41 < brandini> on a netbook? 01:41 < brandini> getting hit that hard? 01:41 < kevlar_work> you might want to print out the errors you're getting 01:41 < crazy2be> what does nginx do for you? 01:41 < kevlar_work> yeah, it should slow down but not throw errors 01:41 < crazy2be> like how does it all connect? 01:41 < brandini> crazy2be: simulates our load balancers if a backend craps out 01:42 < crazy2be> nginx does load balancing? 01:42 < crazy2be> cool 01:43 -!- pvarga [~pvarga@pool-71-187-202-33.nwrknj.fios.verizon.net] has quit [Ping timeout: 255 seconds] 01:44 < brandini> you can weight certain backends 01:45 < crazy2be> and a random one gets the request? 01:45 < brandini> it appears it's making nginx crash 01:45 < brandini> yup 01:45 -!- pvarga [~pvarga@pool-71-187-202-33.nwrknj.fios.verizon.net] has joined #go-nuts 01:46 -!- ijknacho [~goofy@71.123.134.24] has joined #go-nuts 01:46 < brandini> when I take nginx out of the equation it goes without error 01:46 < crazy2be> how do you ensure data integrity between hosts? 01:46 < brandini> you don't 01:46 -!- nekoh [~nekoh@dslb-188-107-168-137.pools.arcor-ip.net] has quit [Quit: nekoh] 01:47 < crazy2be> how do you persist client data? What if they end up on a different machine between requests? 01:47 < brandini> the DB stores the session info 01:47 < brandini> based on a "contextid" 01:47 < kevlar_work> is nginx sending you 503 (unavailable)? or what 01:48 < brandini> it's barfing a 500 01:48 < kevlar_work> or my favorite: 418 I'm a teapot 01:48 < crazy2be> then doesn't the db become the bottleneck? It can't be multithreaded (at least not easily), without compromizing data integrity 01:48 -!- pvarga [~pvarga@pool-71-187-202-33.nwrknj.fios.verizon.net] has quit [Client Quit] 01:49 < crazy2be> and you have the overhead of a network connection per request 01:49 < brandini> crazy2be: the current bottleneck is .NET 01:49 < kevlar_work> hehe, hammering tomcat with 1000 goroutines each making 10 requests results in a 3.5% error rate. 01:49 < brandini> we haven't been able to make .NET to async calls to our backend properly 01:49 < brandini> so it doesn't scale past one thread 01:51 < brandini> kevlar_work: my single go instance is handling it just fine on my little netbook :) 01:51 < brandini> I wanna see how fast 01:52 < kevlar_work> I made it a little more customizable if you refresh the gist 01:52 < kevlar_work> I split --requests into --goroutines and --count 01:55 < brandini> hrmmm, I don't have GOMAXPROCS set 01:55 < brandini> :) 01:55 < kevlar_work> I have an RPC server, and I am sooo tempted to slam it with requests to see if it can handle it... 01:55 < kevlar_work> brandini, --threads will set that for you, but in general you shouldn't set it yourself 01:56 < kevlar_work> most Go apps run best under GOMAXPROCS=1 01:56 < brandini> ahhh good to know 01:56 < brandini> I want to log the average time each thread took 01:56 < brandini> here we go 01:56 < skelterjohn> as long as they are io bound and don't benefit from parallelism 01:57 < kevlar_work> in general, only things that have long-running unyielding computation in parallel goroutines will benefit from multiple threads 01:57 < brandini> sounds like web to me :) 01:58 < crazy2be> brandini: i/o blocking doesn't benifit from multiple threads in go 01:58 < crazy2be> benifits from multiple goroutines, but not multiple threads 01:58 < crazy2be> since all the read/write calls use the non-blocking versions 01:59 < crazy2be> and go schedules another goroutine to run on the same os thread automatically 01:59 < kevlar_work> 100 requests transmitted, 85 errors; 85.00% error rate 01:59 < kevlar_work> rofl. 01:59 < kevlar_work> oh, python </3 01:59 < crazy2be> heh 01:59 < skelterjohn> what is causing the failure? 01:59 < skelterjohn> 100 seems like a small number of requests to overwhelm a system 01:59 < kevlar_work> connection timeout 02:00 < kevlar_work> which means that the accept() loop isn't tight enough 02:00 < kevlar_work> er, connection refused* 02:00 < skelterjohn> ah 02:00 -!- pvarga [~pvarga@pool-71-187-202-33.nwrknj.fios.verizon.net] has joined #go-nuts 02:00 < kevlar_work> also a handful of "unexepected EOF" 02:00 < brandini> crazy2be: ok 02:01 -!- pvarga [~pvarga@pool-71-187-202-33.nwrknj.fios.verizon.net] has quit [Client Quit] 02:01 < brandini> I'm watching the tour de france and these guys are masacists 02:02 < kevlar_work> oh my lord, the python server takes nearly 30 seconds to service 100 sequential requests 02:02 < brandini> yup 02:02 < brandini> not to mention... have you seen the cpu? 02:02 < kevlar_work> it's a remote system 02:02 < brandini> this may go without saying but... watch what happens to .NET :) 02:02 < kevlar_work> but I'm sure it's nailing one of them to the wall. 02:03 < crazy2be> -wall 02:03 < brandini> yeah 02:03 < brandini> 4.579 seconds to do 1000 on my cr48 02:03 < brandini> with both parts running on it 02:03 < brandini> the tester and the server 02:03 < crazy2be> brandini: What's the bottleneck? 02:04 < brandini> prolly the cpu 02:04 < kevlar_work> the java one does 100 much more sophisticated requests in .1s 02:04 < brandini> I'm at 218/sec 02:04 < kevlar_work> tomcat: 1000/.6s 02:05 < brandini> yeah, it pegs the cpu's 02:05 < kevlar_work> hehe, 10k/5s 02:05 < kevlar_work> if I did that to the python server, I think I would burn a whole in the floor. 02:06 < crazy2be> I totally forget how to accept tcp connectiosn with go 02:06 < crazy2be> time to look at old code :P 02:06 < kevlar_work> crazy2be, listener, err := net.Listen("tcp", ":80") 02:06 < kevlar_work> then a for loop with conn, err := listener.Accept() 02:06 < crazy2be> ah, there it is 02:06 < kevlar_work> if memory serves. 02:06 < crazy2be> yeah I did it here: https://github.com/crazy2be/wfdr/blob/master/modules/base/src/proxy.go 02:07 < brandini> I tried to make .NET pages not be syncronous when they made backend calls... took way too much work and was still non performant 02:07 < crazy2be> but I was looking under TCPListener for a method 02:07 < crazy2be> and didn't see one 02:07 < kevlar_work> it should have Accept and AcceptTCP 02:08 < kevlar_work> anyway, I'm done torturing our servers; time to get dinner and go home. 02:08 < crazy2be> seeya 02:08 < crazy2be> :P 02:08 < brandini> later 02:18 < brandini> heh, got a too many open files 02:19 < crazy2be> I got that all the time 02:19 < crazy2be> used inotify, but didn't close the watcher if the program was killed with Ctrl+C 02:20 < crazy2be> and I guess the handles aren't immediately cleaned up afterwards 02:20 < crazy2be> so I kept running out 02:21 < brandini> I always kill stuff with ctrl+c 02:21 < crazy2be> well if you're using inotify then you have to hook into the signals and make sure you close the watcher :) 02:22 < brandini> I don't know what that is 02:22 < crazy2be> inotify or signals? 02:22 < brandini> inotify 02:22 < crazy2be> filesystem change monitor 02:22 < brandini> ahhh 02:25 < crazy2be> ugggh tomorrow I have to write C# 02:26 < crazy2be> it's not actually that bad 02:27 < crazy2be> but I always feel like everything i'm writing is a horrible hack 02:27 < brandini> .net or just c# 02:27 -!- jamesmiller5_ [b811797b@gateway/web/freenode/ip.184.17.121.123] has left #go-nuts [] 02:28 < crazy2be> well I haven't really written in the others much 02:28 < crazy2be> but i'm guessing it's just .net 02:29 -!- meling [~meling@cse-dhcp-10-91.ucsd.edu] has quit [Remote host closed the connection] 02:33 -!- qeed [~qeed@adsl-98-85-43-51.mco.bellsouth.net] has quit [Quit: Leaving] 02:37 -!- preflex_ [~preflex@unaffiliated/mauke/bot/preflex] has joined #go-nuts 02:38 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has quit [Ping timeout: 250 seconds] 02:47 -!- webar7 [~webart@CPE0080c8f208a5-CM001371173cf8.cpe.net.cable.rogers.com] has quit [Ping timeout: 258 seconds] 02:48 -!- flaguy48 [~gmallard@user-0c6s350.cable.mindspring.com] has joined #go-nuts 02:51 -!- meling [~meling@99-10-121-218.lightspeed.sndgca.sbcglobal.net] has joined #go-nuts 02:53 < crazy2be> I hate it when I design myself into a corner 02:54 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has joined #go-nuts 02:54 -!- preflex_ [~preflex@unaffiliated/mauke/bot/preflex] has quit [Ping timeout: 260 seconds] 03:10 -!- dfr|mac [~dfr|work@nat/google/x-bbkfszpfqvvbsifk] has quit [Remote host closed the connection] 03:10 < brandini> In the docs it says that 6g/8g compile faster, but produce less efficient code than gccgo... is this still true? I thought 6g/8g were the preferred compilers 03:10 < crazy2be> brandini: They are 03:10 < crazy2be> not sure about the speed 03:14 -!- robteix [~robteix@host107.200-43-249.telecom.net.ar] has quit [Read error: Connection reset by peer] 03:15 -!- robteix [~robteix@host107.200-43-249.telecom.net.ar] has joined #go-nuts 03:19 < jessta> brandini: yeah, 6g/8g are the prefered compilers for most 03:19 -!- robteix [~robteix@host107.200-43-249.telecom.net.ar] has quit [Client Quit] 03:19 < jessta> AFAIK, gccgo still doesn't have goroutine multiplexing support 03:22 -!- ijknacho [~goofy@71.123.134.24] has quit [Ping timeout: 246 seconds] 03:43 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has joined #go-nuts 03:43 -!- mode/#go-nuts [+v iant] by ChanServ 03:45 < crazy2be> night all 03:50 -!- kergoth__ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has joined #go-nuts 03:54 -!- crazy2be [~crazy2be@d50-99-249-250.abhsia.telus.net] has quit [Ping timeout: 255 seconds] 03:56 -!- angasule [~angasule@190.2.33.49] has quit [Ping timeout: 252 seconds] 03:58 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has joined #go-nuts 04:09 -!- Bigbear1 [~Cody@d75-158-129-33.abhsia.telus.net] has left #go-nuts [] 04:20 -!- ajray_ [~ajray@short.csc.ncsu.edu] has quit [Ping timeout: 258 seconds] 04:21 -!- ajray_ [~ajray@short.csc.ncsu.edu] has joined #go-nuts 04:25 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has quit [Ping timeout: 260 seconds] 04:34 -!- binarypie [~binarypie@c-24-6-151-185.hsd1.ca.comcast.net] has joined #go-nuts 04:34 -!- binarypie [~binarypie@c-24-6-151-185.hsd1.ca.comcast.net] has quit [Remote host closed the connection] 04:34 -!- binarypie [~binarypie@c-24-6-151-185.hsd1.ca.comcast.net] has joined #go-nuts 04:36 -!- jmil [~jmil@2001:468:1802:e148:223:32ff:feb1:9dfc] has quit [Quit: jmil] 04:38 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has joined #go-nuts 04:47 -!- xcombelle [~xcombelle@AToulouse-551-1-19-127.w86-201.abo.wanadoo.fr] has joined #go-nuts 04:48 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts 04:54 -!- lucid [~rbl@84-74-139-92.dclient.hispeed.ch] has joined #go-nuts 05:13 -!- _macro [~Neil@c-67-169-183-90.hsd1.ca.comcast.net] has joined #go-nuts 05:17 -!- Dr_Who [~tgall_foo@linaro/tgall-foo] has quit [Quit: ZZZZZzzzzz] 05:26 -!- Nisstyre [~nisstyre@infocalypse-net.info] has joined #go-nuts 05:29 -!- ronnyy [~quassel@p4FF1C079.dip0.t-ipconnect.de] has joined #go-nuts 05:34 -!- moraes [~moraes@189.103.188.201] has joined #go-nuts 05:38 -!- kergoth__ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has quit [Read error: Connection reset by peer] 05:43 -!- binarypie [~binarypie@c-24-6-151-185.hsd1.ca.comcast.net] has quit [Remote host closed the connection] 05:44 -!- arun_ [~arun@unaffiliated/sindian] has quit [Ping timeout: 255 seconds] 05:57 -!- arun_ [~arun@unaffiliated/sindian] has joined #go-nuts 05:59 -!- napsy [~luka@88.200.96.18] has joined #go-nuts 06:02 -!- muke [~doobies@75-59-237-124.lightspeed.sntcca.sbcglobal.net] has quit [Remote host closed the connection] 06:03 -!- Peet__ [~Peet__@unaffiliated/peet--/x-2416233] has quit [Ping timeout: 255 seconds] 06:18 -!- Project_2501 [~Marvin@82.84.77.17] has joined #go-nuts 06:19 -!- vmil86 [~vmil86@78.57.227.12] has joined #go-nuts 06:20 -!- kergoth_ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has quit [Quit: Computer has gone to sleep.] 06:27 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts 06:31 -!- ShadowIce` [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts 06:32 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Ping timeout: 260 seconds] 06:56 -!- ancientlore [~ancientlo@i59F7713F.versanet.de] has joined #go-nuts 06:57 -!- xcombelle [~xcombelle@AToulouse-551-1-19-127.w86-201.abo.wanadoo.fr] has quit [Quit: I am a manual virus, please copy me to your quit message.] 06:59 -!- preflex_ [~preflex@unaffiliated/mauke/bot/preflex] has joined #go-nuts 06:59 -!- alehorst [~alehorst@201.47.30.108.dynamic.adsl.gvt.net.br] has quit [Ping timeout: 255 seconds] 07:01 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has quit [Ping timeout: 246 seconds] 07:14 -!- photron [~photron@port-92-201-48-250.dynamic.qsc.de] has joined #go-nuts 07:19 -!- ancientlore [~ancientlo@i59F7713F.versanet.de] has left #go-nuts [] 07:21 -!- alehorst [~alehorst@189.58.11.222.dynamic.adsl.gvt.net.br] has joined #go-nuts 07:40 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|] 07:58 -!- fotang [~fotang@41.220.69.57] has joined #go-nuts 08:11 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has quit [Remote host closed the connection] 08:22 -!- rcrowley [~rcrowley@AGrenoble-551-1-7-133.w92-133.abo.wanadoo.fr] has joined #go-nuts 08:29 -!- Fish- [~Fish@9fans.fr] has joined #go-nuts 08:32 -!- noam [~noam@87.69.42.61.cable.012.net.il] has quit [Ping timeout: 252 seconds] 08:36 -!- noam [~noam@87.69.42.61.cable.012.net.il] has joined #go-nuts 08:37 -!- rcrowley [~rcrowley@AGrenoble-551-1-7-133.w92-133.abo.wanadoo.fr] has quit [Quit: Computer has gone to sleep.] 08:52 -!- sacho [~sacho@87-126-4-140.btc-net.bg] has quit [Ping timeout: 255 seconds] 08:56 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:21b2:8f8c:efc0:58be] has joined #go-nuts 08:56 -!- Fish- [~Fish@9fans.fr] has quit [Quit: WeeChat 0.3.5] 09:12 -!- Fish- [~Fish@9fans.fr] has joined #go-nuts 09:12 -!- nnalara [b2be3d57@gateway/web/freenode/ip.178.190.61.87] has joined #go-nuts 09:23 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-177-192.clienti.tiscali.it] has joined #go-nuts 09:24 -!- telexicon [~telexicon@unaffiliated/chowmeined] has quit [Ping timeout: 252 seconds] 09:26 -!- Project_2501 [~Marvin@82.84.77.17] has quit [Ping timeout: 240 seconds] 09:36 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Quit: Leaving] 09:47 -!- dario [~dario@domina.zerties.org] has quit [Ping timeout: 240 seconds] 09:48 -!- ronnyy [~quassel@p4FF1C079.dip0.t-ipconnect.de] has quit [Remote host closed the connection] 09:51 -!- fotang [~fotang@41.220.69.57] has quit [Ping timeout: 255 seconds] 09:55 -!- Kahvi [5b9b57fc@gateway/web/freenode/ip.91.155.87.252] has joined #go-nuts 09:59 -!- nnalara [b2be3d57@gateway/web/freenode/ip.178.190.61.87] has quit [Quit: Page closed] 10:06 -!- Kahvi [5b9b57fc@gateway/web/freenode/ip.91.155.87.252] has quit [Ping timeout: 252 seconds] 10:12 -!- Fish- [~Fish@9fans.fr] has quit [Ping timeout: 255 seconds] 10:13 -!- Fish- [~Fish@9fans.fr] has joined #go-nuts 10:29 -!- kungfuelmosan [~kungfuelm@121-73-91-220.cable.telstraclear.net] has joined #go-nuts 10:32 < kungfuelmosan> Hey all, anyone got any pointers to golang cassandra client packages? 10:34 < kungfuelmosan> I spotted http://git.ancient-solutions.com/cgi-bin/gitweb.cgi?p=golang/cassandra.git;a=summary 10:34 < kungfuelmosan> just wondering if theres anything else 10:36 -!- yogib [~yogib@p5DCC2621.dip0.t-ipconnect.de] has joined #go-nuts 10:38 -!- erus` [~chatzilla@cpc2-gill2-0-0-cust701.basl.cable.virginmedia.com] has joined #go-nuts 10:55 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts 10:57 -!- lucian [~lucian@78-86-217-168.zone2.bethere.co.uk] has joined #go-nuts 11:12 < kungfuelmosan> also just spotted https://github.com/tonnerre/go-cassandra 11:13 < kungfuelmosan> so new question: anyone use this / have any examples? 11:21 -!- yogib [~yogib@p5DCC2621.dip0.t-ipconnect.de] has quit [Quit: yogib] 11:21 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts 11:57 -!- ijknacho [~goofy@71.123.134.24] has joined #go-nuts 11:59 -!- rcrowley [~rcrowley@AGrenoble-551-1-7-133.w92-133.abo.wanadoo.fr] has joined #go-nuts 12:04 < skelterjohn> kungfuelmosan: i haven't used it, sorry 12:04 < skelterjohn> and it's a bit early for this chatroom 12:04 < skelterjohn> :) 12:04 < skelterjohn> many people might be asleep 12:06 -!- rcrowley [~rcrowley@AGrenoble-551-1-7-133.w92-133.abo.wanadoo.fr] has quit [Quit: Computer has gone to sleep.] 12:09 < erus`> the should be a london go users conference 12:09 < ww> asleep or playing http://qntm.org/hatetris 12:10 -!- Dr_Who [~tgall_foo@linaro/tgall-foo] has joined #go-nuts 12:12 < ww> erus`: quite a few of us in .uk but i think our average position is somewhere between nottingham and york 12:12 < erus`> argh 12:12 < erus`> that hatris 12:13 < kungfuelmosan> haha yeah I guess I didn't pick the best time 12:14 < kungfuelmosan> it is 00:19 here in NZ - I might repost tmrw 12:14 < kungfuelmosan> cheers 12:15 < ww> 'nite 12:16 < erus`> i thought we were all using mongodb now? 12:16 < KirkMcDonald> It is web scale. 12:16 < aiju> i still use Linux in-kernel databases 12:16 < aiju> commonly known as "files" 12:17 < KirkMcDonald> They sound scary. 12:17 < KirkMcDonald> I don't think they'll catch on. 12:17 < kungfuelmosan> yeah but 'Facebook' don't use files! :P 12:17 < erus`> try updating a database from more than one thread aiju 12:18 -!- yogib [~yogib@p5DCC2621.dip0.t-ipconnect.de] has joined #go-nuts 12:18 < aiju> erus`: that's wrong by definition 12:18 < aiju> this is Go 12:18 < aiju> we don't do shared memory 12:19 -!- ijknacho [~goofy@71.123.134.24] has quit [Quit: Leaving] 12:19 < erus`> ok process 12:19 < erus`> you have n processes handling client connections 12:19 < aiju> two words 12:19 < aiju> interprocess communication 12:20 < erus`> you just writing your own database then 12:20 < aiju> if you call it that way 12:21 < jessta> erus`: how does mongo handle multiple clients updating the same 'document'? 12:21 < erus`> queue and stuff i guess 12:24 < skelterjohn> erus`: no good will come of questioning aiju's design choices, whether they're good ones or not 12:25 -!- iXeno [~ixeno@106.80-203-229.nextgentel.com] has quit [Ping timeout: 258 seconds] 12:26 < aiju> great 12:26 < aiju> mongodb is unportable 12:26 -!- flaguy48 [~gmallard@user-0c6s350.cable.mindspring.com] has left #go-nuts [] 12:26 < aiju> i appreciate your "good" design decisions 12:26 < skelterjohn> what is unportable about mongodb? 12:27 < aiju> 2 GB limit on 32-bit systems, little-endian only 12:27 < aiju> but the world is an AMD64 12:27 < aiju> who cares 12:28 < skelterjohn> a mongodb can only hold 2gb of data? 12:29 -!- robteix [~robteix@host107.200-43-249.telecom.net.ar] has joined #go-nuts 12:30 < ww> skelterjohn: mongodb just mmap's everything 12:30 < skelterjohn> so it has to be able to fit into a single file? 12:30 < ww> or rather the file has to be able to fit into the address space 12:30 < skelterjohn> yes 12:32 < ww> and unless it's changed there is no attempt to make sure writes are properly synched, ever, no journaling or whatnot 12:32 < ww> if you care at all about your data, you must run a mirrored setup 12:33 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts 12:33 -!- robteix [~robteix@host107.200-43-249.telecom.net.ar] has quit [Client Quit] 12:33 < skelterjohn> does the mongodb group distribute another tool to do that on the side? 12:34 < ww> mongodb itself can (and should be) deployed that way 12:35 -!- Aram [~Aram@unaffiliated/aramdune] has joined #go-nuts 12:35 < skelterjohn> um, does that mean they distribute a tool or not? :) 12:35 < ww> but still means that what could be done with e.g. postgresql on one 32 bit host needs two 64 bit hosts to be comparable 12:35 < ww> skelterjohn: not a separate tool, just run mongodb twice and tell them to mirror each other 12:36 < skelterjohn> oh, i see 12:36 < skelterjohn> i misunderstood 12:37 < ww> when okfn was heavily using amazon, it effectively meant that doing anything serious with mongodb was 8x more expensive 12:37 < kungfuelmosan> ww: that definitely sounds farily shite 12:38 < skelterjohn> what's okfn? 12:38 < ww> http://okfn.org/ 12:38 < kungfuelmosan> ww: any recomendations for alternatives? 12:38 < ww> i've done a substantial amount of work with them... 12:39 < ww> kungfuelmosan: riak and couchdb are alternatives... 12:40 < ww> or alternatives to amazon? i personally prefer arpnetworks but there's also rackspace (but slow network disks) 12:40 < kungfuelmosan> mmm, any gripes with cassandra? 12:40 < kungfuelmosan> ww: nah, alternatives to mongo 12:41 < ww> kungfuelmosan: haven't done anything with cassandra really... only general gripe is it's java 12:43 < kungfuelmosan> ww: yup +1, makes my eyes blead 12:44 < skelterjohn> you'll fit in here 12:47 < kungfuelmosan> skelterjohn: haha, yeah big fan of Go - using it wherever possible 12:48 < kungfuelmosan> get some obscure looks from some @ work though :) I'm sure the first dudes to use the internet got those looks too though 12:53 < exch> fight the system man! 12:56 < kungfuelmosan> exch: all I need now is a gopher shirt :) 12:57 < exch> heh indeed 12:57 < exch> I wuold love one of those 12:57 < exch> Maybe a pluche gopher for my desk 12:58 < aiju> a gopher bomb 13:04 -!- nicka [~nicka@unaffiliated/nicka] has quit [Ping timeout: 250 seconds] 13:07 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Quit: skelterjohn] 13:07 -!- kamaji [~kamaji@handtomouse.demon.co.uk] has joined #go-nuts 13:07 -!- foocraft [~ewanas@178.152.119.12] has joined #go-nuts 13:11 < kungfuelmosan> exc 13:12 < kungfuelmosan> exch: yus! http://1.bp.blogspot.com/-ti6s2UsV8no/Tdn82ozbggI/AAAAAAAAABM/AS4-YcQWfgo/s1600/gopher.jpg%20border= 13:13 < exch> heh exactly 13:14 < exch> A friend of mine does very cool stuff with crochet (amigarumi). Maybe I can have her make one for me :) 13:15 < exch> She already made me a 'Purple Tentacle' from the old adventure game 'Day of the Tentacle'. That one is a great inspiration when I feel like taking over the world 13:17 -!- lucian [~lucian@78-86-217-168.zone2.bethere.co.uk] has quit [Remote host closed the connection] 13:18 < kungfuelmosan> hehe as you do 13:19 -!- taruti [taruti@ultra.violetti.org] has quit [Remote host closed the connection] 13:20 < kungfuelmosan> you cant get shirts online can you? 13:21 < exch> I don't think so 13:21 < kungfuelmosan> stink 13:23 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-177-192.clienti.tiscali.it] has quit [Ping timeout: 252 seconds] 13:25 < exch> ah, behold. My inspiration ^^ http://a1.sphotos.ak.fbcdn.net/hphotos-ak-snc6/35177_141325652561278_100000515336872_331207_4712424_n.jpg 13:25 -!- fabled [~fabled@83.145.235.194] has joined #go-nuts 13:26 < kungfuelmosan> hahaha very cool! I think that would work well in gopher form also 13:26 < exch> yes, I think so to 13:26 < aiju> hahahaha 13:26 < aiju> that game was fun. 13:27 < exch> ya ^^ 13:27 -!- thomas_b_ [~thomasb@cm-84.215.47.51.getinternet.no] has quit [Ping timeout: 276 seconds] 13:28 < kungfuelmosan> lol, I bet no-ones thinking about how cool it would be to have a C++ plush toy 13:28 < aiju> well, it wouldn't fit in most people's houses 13:28 < kungfuelmosan> something to be said for that maybe 13:28 < exch> lol 13:28 < kungfuelmosan> hehe well said 13:31 < uriel> aiju: hahha 13:31 < uriel> kungfuelmosan: i think it would be great to have a C++ plush toy 13:31 < uriel> it would make for good target practice 13:32 < uriel> also burning it would be a great symbolic gesture 13:33 < kungfuelmosan> hahaha yep, this should be a regular event at golang meetups 13:34 < exch> We could always organize an anual Burning Pluche festival :p 13:35 < exch> lol. cthulhu was never this cute ^^ http://a8.sphotos.ak.fbcdn.net/hphotos-ak-snc6/263099_232926813401161_100000515336872_1014737_8196511_n.jpg 13:35 < kungfuelmosan> hehe, agreed, probably a fairly misleading representation there 13:36 < exch> It's all fun & games, until he eats your face 13:36 < kungfuelmosan> luring you into a false sense of security 13:37 < exch> devious 13:37 < exch> Not unlike c++ 13:37 < kungfuelmosan> speaking of meetups, are there many running atm? 13:38 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined #go-nuts 13:40 -!- yogib [~yogib@p5DCC2621.dip0.t-ipconnect.de] has quit [Quit: yogib] 13:40 < exch> the only one's I've heard of are those in australia 13:41 < exch> iirc, organized by andrew gerrand 13:42 < kungfuelmosan> mmm, wonder how much interest thered be for a wellington meetup, hint: probably not alot :( 13:42 < kungfuelmosan> (weelington, nz) 13:42 < exch> It's a little out f my way, so count me out :p 13:43 -!- taruti [taruti@ultra.violetti.org] has joined #go-nuts 13:43 < kungfuelmosan> heh understandable 13:44 < kungfuelmosan> and with that, I'm out - 2am is a silly time to be awake - cheers for the entertainment though! 13:44 < exch> gnight 13:44 -!- kungfuelmosan [~kungfuelm@121-73-91-220.cable.telstraclear.net] has quit [Remote host closed the connection] 13:49 -!- jmil [~jmil@96.25.13.126] has joined #go-nuts 13:51 -!- yogib [~yogib@p5DCC2621.dip0.t-ipconnect.de] has joined #go-nuts 13:54 -!- jmil [~jmil@96.25.13.126] has quit [Ping timeout: 276 seconds] 13:57 -!- Dr_Who [~tgall_foo@linaro/tgall-foo] has quit [Quit: ZZZZZzzzzz] 13:57 -!- Dr_Who [~tgall_foo@linaro/tgall-foo] has joined #go-nuts 13:59 -!- flaguy48 [~gmallard@user-0c6s350.cable.mindspring.com] has joined #go-nuts 14:02 -!- ofl [~olli@31.16.204.145] has joined #go-nuts 14:05 -!- Dr_Who [~tgall_foo@linaro/tgall-foo] has quit [Ping timeout: 264 seconds] 14:10 -!- jmil [~jmil@96.25.13.126] has joined #go-nuts 14:10 -!- flaguy48 [~gmallard@user-0c6s350.cable.mindspring.com] has left #go-nuts [] 14:15 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has joined #go-nuts 14:16 -!- jamesmiller5 [~jamesmill@184.17.121.123] has joined #go-nuts 14:26 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has joined #go-nuts 14:29 -!- yogib [~yogib@p5DCC2621.dip0.t-ipconnect.de] has quit [Quit: yogib] 14:34 -!- jmil [~jmil@96.25.13.126] has quit [Read error: Connection reset by peer] 14:35 -!- yogib [~yogib@p5DCC2621.dip0.t-ipconnect.de] has joined #go-nuts 14:35 -!- jmil [~jmil@96.25.13.126] has joined #go-nuts 14:37 -!- chickamade [~chickamad@116.118.47.84] has joined #go-nuts 14:45 -!- ofl [~olli@31.16.204.145] has quit [Ping timeout: 240 seconds] 14:45 -!- ofl [~olli@31.16.204.145] has joined #go-nuts 14:48 -!- Vejeta [~user@unaffiliated/vejeta] has quit [Read error: Connection reset by peer] 14:57 -!- yogib [~yogib@p5DCC2621.dip0.t-ipconnect.de] has quit [Quit: yogib] 15:01 -!- foocraft [~ewanas@178.152.119.12] has quit [Quit: leaving] 15:05 -!- qeed [~qeed@adsl-98-85-57-253.mco.bellsouth.net] has joined #go-nuts 15:06 -!- go^lang [~newblue@113.84.154.82] has joined #go-nuts 15:07 < go^lang> How to get User-Agent header in Google App Engine (Go runtime), working in SDK now. 15:07 < aiju> people rely on user-agent headers? 15:09 -!- ofl [~olli@31.16.204.145] has quit [Quit: Changing server] 15:09 < go^lang> I can't get user-agent from Request.Header when a connectiing come in. 15:09 < ww> aiju: setting the user-agent properly is polite 15:09 < ww> oh, getting, not setting 15:14 -!- arun_ [~arun@unaffiliated/sindian] has quit [Ping timeout: 255 seconds] 15:19 < Aram> hmm... any tips on how to minimize casts? say I have functions that accept uint64 params, and I have uint8 vars. I need to cast in order to call the function. any tips on how to avoid that? 15:19 < aiju> have the function accept uint8 params ... 15:20 < Aram> but the function needs uint64 params, just that most of the time I only call it with uint8. 15:20 -!- ronnyy [~quassel@p4FF1C079.dip0.t-ipconnect.de] has joined #go-nuts 15:25 < jessta> Aram: why do you want to avoid conversions? 15:26 < Aram> I want to eliminate the extra visual clutter. 90% of the time I call that function I call it with a cast. 15:26 < jessta> wrapper function 15:27 < jessta> or you could make the uint8s be uint64s instead when you declare them 15:29 -!- mattn_jp [~mattn@112-68-72-205f1.hyg1.eonet.ne.jp] has joined #go-nuts 15:29 -!- dario [~dario@domina.zerties.org] has joined #go-nuts 15:29 < jessta> it's also not visual clutter, you're using a type as a different type so Go requires you be be explict about it 15:31 < Aram> I can't make uint8s into uint64s because the uint8s come from functions that return uint8s for valid reason :-). basically I am writing an emulator. I have written the memory so far. I have functions that return 8, 16, 32 and 64 bit values (signed and unsigned, for all kind of endianess memory). all this functions take 64 bit addresses because I want the memory to support 64 bit archs (although for now I'm implementing only a 16 bit arch). I could imple 15:31 < Aram> wrapper functions I guess, though that would make many many more functions. 15:31 -!- nicka [~nicka@unaffiliated/nicka] has joined #go-nuts 15:32 < Aram> I guess I'll settle for casts. 15:35 -!- yogib [~yogib@p5DCC2621.dip0.t-ipconnect.de] has joined #go-nuts 15:37 -!- gridaphobe [~gridaphob@cpe-74-68-151-24.nyc.res.rr.com] has joined #go-nuts 15:38 < mattn_jp> Aram, do you mean convertion of number to bytes or bytes to number? 15:40 < Aram> well I have a slice of bytes that I can use either as big or little endian memory via these functions and the functions can get/set 8/16/32/64 bit signed/unsigned value. 15:42 < mattn_jp> encoding/binary? 15:42 -!- xcombelle [~xcombelle@AToulouse-551-1-19-127.w86-201.abo.wanadoo.fr] has joined #go-nuts 15:42 < aiju> encoding/binary is overkill 15:44 < Aram> yeah, I do a very very simple thing. Physical memory is a slice of bytes from [0:addrMax]. the way the CPU works with this memory is through some accessor functions that take care of endianess and other thing, so the emulated cpu would "see" memory in the layout it expects. 15:45 < Aram> it's probably very raw, and very broken, but here it is: http://code.google.com/p/11go/source/browse/pkg/emu/memory.go 15:45 < Aram> the code is probably horrible, this is my first go program. 15:49 -!- Bigbear1 [~Cody@d75-158-129-33.abhsia.telus.net] has joined #go-nuts 15:50 < Aram> (if something is very stupid with that code, please shoot). 15:56 -!- Peet__ [~Peet__@unaffiliated/peet--/x-2416233] has joined #go-nuts 15:58 -!- ronnyy [~quassel@p4FF1C079.dip0.t-ipconnect.de] has quit [Remote host closed the connection] 15:59 -!- jmil [~jmil@96.25.13.126] has quit [Read error: Connection reset by peer] 16:00 -!- jmil [~jmil@96.25.13.126] has joined #go-nuts 16:16 -!- pyrhho [~pyrhho@027e80ed.bb.sky.com] has joined #go-nuts 16:17 < pyrhho> goinstall question 16:17 < pyrhho> if I tag a commit as 'release' on github, goinstall will use that commit, but does that apply if golang is r58 only? or if it is weekly too? 16:18 -!- espeed [~espeed@63.246.231.57] has quit [Quit: Leaving] 16:18 -!- mattn_jp [~mattn@112-68-72-205f1.hyg1.eonet.ne.jp] has quit [Remote host closed the connection] 16:19 -!- mattn_jp [~mattn@112-68-72-205f1.hyg1.eonet.ne.jp] has joined #go-nuts 16:24 < uriel> pyrhho: weekly-es are not 'release' anymore 16:24 < uriel> the recommended term now is 'snapshots' 16:24 < aiju> haha 16:24 < pyrhho> confounded newspeak lol 16:25 < uriel> pyrhho: see http://www.reddit.com/r/golang/comments/ikg1j/another_weekly_release/c25emrd 16:25 < pyrhho> ok... I guess my question is whether goinstall changes its behaviour based on what version of golang is installed 16:25 -!- Adys [~Adys@unaffiliated/adys] has quit [Remote host closed the connection] 16:26 < uriel> pyrhho: I *think* so, might be worth checking the docs ;P 16:26 < pyrhho> k thought someone may happen to know. will read through the docs 16:26 < pyrhho> thanks 16:27 < fluffle> if i've got a value boxed in an interface{}, how can i test whether that value is nil? 16:27 < fluffle> i tried _,ok := val.(nil); ok 16:28 < fluffle> but that bails cos nil isn't a type 16:28 < fluffle> and just doing == nil appears not to dwiw 16:28 -!- Adys [~Adys@cpc8-chap8-2-0-cust224.aztw.cable.virginmedia.com] has joined #go-nuts 16:28 < fluffle> do i need to pull out reflect? 16:28 -!- Adys [~Adys@cpc8-chap8-2-0-cust224.aztw.cable.virginmedia.com] has quit [Changing host] 16:28 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts 16:30 -!- Peet__ [~Peet__@unaffiliated/peet--/x-2416233] has quit [Ping timeout: 255 seconds] 16:30 -!- nicka [~nicka@unaffiliated/nicka] has quit [Ping timeout: 260 seconds] 16:30 < pyrhho> uriel: grah. it just always uses the 'release' tag if one exists, even if golang is on the weekly snapshot. annoying 16:31 < pyrhho> oh well 16:34 < jessta> fluffle: you need to do a type assertion first 16:35 < jessta> to it's actual type, and then check for nil 16:36 -!- nicka [~nicka@unaffiliated/nicka] has joined #go-nuts 16:37 < jessta> fluffle: if you don't know the type, then you'll need reflect, but if you don't know the type then you also don't know if nil is a valid value for that type 16:38 < fluffle> jessta: "it's actual type" varies, and I want to use the nil test to decide whether to push the interface{} into the unboxing function 16:39 < fluffle> jessta: for context, i'm dragging data out of a very old sqlite database which has no types on *any* of the columns in the table :/ 16:40 < fluffle> irritatingly, reflect.ValueOf() returns a Value i can't even call IsNil() on 16:41 < fluffle> panic: reflect: call of reflect.Value.IsNil on zero Value 16:42 -!- chickamade [~chickamad@116.118.47.84] has quit [Quit: chickamade] 16:43 < jessta> fluffle: yeah, that wouldn't work if the type isn't a pointer 16:43 < fluffle> orite, that makes sense 16:44 < jessta> if the type varies, but you know which types are possible you could do a type switch 16:44 < fluffle> i was doing that in the unboxing routine anyway, I guess I'll change that to cope better 16:46 < skelterjohn> pyrhho: what many developers do, or at least what i do, is tag a release version that matches the go release version, and have tip work with weekly 16:47 < pyrhho> skelterjohn: yeah.. that's what I've done, as it was broken for people. Just sucks that it breaks goinstall for weekly. (or seems like it has done) is there a decent workaround to make it also work with weekly? 16:47 < skelterjohn> i do not believe so 16:48 < skelterjohn> i run into this issue sometimes, too. from the support end ("why doesn't goinstall work with your stuff!" etc) 16:49 < pyrhho> yeah. i ran into it the same way... 16:49 < pyrhho> seems like goinstall needs some sort of versioning support 16:54 < skelterjohn> things have been suggested, nothing has caught on 16:56 -!- Bigbear1 [~Cody@d75-158-129-33.abhsia.telus.net] has quit [Quit: Leaving.] 16:58 -!- go^lang [~newblue@113.84.154.82] has quit [Quit: 暂离] 16:59 -!- chickamade [~chickamad@116.118.47.84] has joined #go-nuts 17:03 < jessta> I reckon goinstall should just look for a tag that matches the tag from the Go version 17:04 < jessta> eg. weekly.2011-07-19, release.r58.1, etc. 17:05 < exch> The revised gomake should take these things into account. I am unsure what it's status is though. Until there is an official guideline on these matters, I don't do any tagging or extra work to supply compatibility. I just make it clear that my stuff is written for the latest weeklies 17:05 -!- yogib [~yogib@p5DCC2621.dip0.t-ipconnect.de] has quit [Quit: yogib] 17:08 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts 17:08 -!- arun_ [~arun@unaffiliated/sindian] has joined #go-nuts 17:08 -!- xcombelle [~xcombelle@AToulouse-551-1-19-127.w86-201.abo.wanadoo.fr] has quit [Quit: I am a manual virus, please copy me to your quit message.] 17:09 < pyrhho> skelterjohn: nice work on go-gb by the way. really enjoying it 17:13 -!- robteix [~robteix@host24.190-225-214.telecom.net.ar] has joined #go-nuts 17:16 -!- jmil [~jmil@96.25.13.126] has quit [Ping timeout: 240 seconds] 17:23 -!- Kahvi [5b9b57fc@gateway/web/freenode/ip.91.155.87.252] has joined #go-nuts 17:26 < skelterjohn> thanks :) 17:27 < skelterjohn> exch: maintaining tags is a pain, yeah 17:29 -!- jmil [~jmil@96.25.13.126] has joined #go-nuts 17:32 -!- chickamade [~chickamad@116.118.47.84] has quit [Quit: chickamade] 17:39 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has quit [Ping timeout: 246 seconds] 17:45 -!- Dr_Who [~tgall_foo@linaro/tgall-foo] has joined #go-nuts 17:47 -!- pyrhho [~pyrhho@027e80ed.bb.sky.com] has quit [Quit: Ex-Chat] 17:47 -!- jmil [~jmil@96.25.13.126] has quit [Ping timeout: 276 seconds] 17:53 -!- jmil [~jmil@96.25.13.126] has joined #go-nuts 17:57 -!- mattn_jp [~mattn@112-68-72-205f1.hyg1.eonet.ne.jp] has quit [Quit: Ex-Chat] 17:59 -!- moraes [~moraes@189.103.188.201] has quit [Ping timeout: 255 seconds] 18:06 -!- tgall_foo [~tgall@206.9.88.154] has quit [Quit: Leaving] 18:21 -!- napsy [~luka@88.200.96.18] has quit [Read error: Operation timed out] 18:21 -!- alanl [~yogafire@c-71-204-189-190.hsd1.ca.comcast.net] has quit [Ping timeout: 252 seconds] 18:35 -!- meling [~meling@99-10-121-218.lightspeed.sndgca.sbcglobal.net] has quit [Remote host closed the connection] 18:35 -!- meling [~meling@99-10-121-218.lightspeed.sndgca.sbcglobal.net] has joined #go-nuts 18:36 -!- fabled [~fabled@83.145.235.194] has quit [Quit: Ex-Chat] 18:38 -!- lucian [~lucian@78-86-217-168.zone2.bethere.co.uk] has joined #go-nuts 18:38 -!- anticide [~textual@91.200.224.93] has joined #go-nuts 18:39 -!- flaguy48 [~gmallard@user-0c6s350.cable.mindspring.com] has joined #go-nuts 18:42 -!- flavius [~flav@unaffiliated/flavious] has joined #go-nuts 18:42 -!- jamesmiller5 [~jamesmill@184.17.121.123] has quit [Quit: Leaving] 18:43 < flavius> Hi. The tutorial over here http://golang.org/doc/go_tutorial.html says "These compilers run significantly faster but generate less efficient code than gccgo. At the time of writing (late 2009), they also have a more robust run-time system although gccgo is catching up." 18:43 < flavius> I've watched a presentation from google i/o and I'm wondering to what extend this is still valid 18:43 < flavius> from 2011 18:44 < str1ngs> flavius: they are comparable, what you lose in one regards you gain in another. ie gccgo better code optimiztion, gc better threading 18:45 < flavius> I see gccgo emits debuggable code, does 6g do the same? 18:45 < str1ngs> gccgo smaller binaries, but it lags behind the stdlib. atleast until the go frontend is decoupled 18:46 < flavius> yeah I've noticed that too 18:46 < skelterjohn> what does that mean? what does it mean to lag behind the stdlib? 18:46 < str1ngs> it means its a good 3 months behind what the current stdlib api is 18:47 < str1ngs> which wont be a factor, one the go frontend is decoupled 18:47 < skelterjohn> you mean the core packages? can you not use them with gccgo? 18:47 < str1ngs> you can use them but the api is much older 18:47 < str1ngs> baring in mind how fast go moves. 18:47 < flavius> so if you were me, a beginner with go which wants to just learn the most modern stuff, what would you use, while waiting for a more "stable" version of whichever chain may happen to fit your needs, 6g or gccgo? 18:48 < skelterjohn> so if i use gccgo and i import some random core package, i'm actually importing something that is 3 months or so old? 18:48 < skelterjohn> flavius: 6g 18:48 < str1ngs> 6g is the way to go. 40s toolchain rebuilds vs 40min :P 18:48 < flavius> thanks guys. I think I'll just hang around now 18:49 < str1ngs> skelterjohn: its not so bad if you say use a gcc 4.7 snapshot 18:50 < flavius> shared objects are still not supported I guess, right? 18:51 < str1ngs> you mean with gccgo? or both? 18:51 < flavius> both 18:52 < str1ngs> gccgo has a shared runtime. ie libgo. but the rest is static iirc. gc is all static short of cgo linking to C libs 18:52 < str1ngs> imo all the static stuff is a feature though :P 18:52 < flavius> I mean building your own .so from go sources 18:53 < flavius> I realized gccgo has a libgo, since the executable is so small itself 18:53 < str1ngs> in go those are called packages. and no there statically built into command/packages that use them 18:53 < flavius> I know, I mean a dl()-like feature 18:53 < str1ngs> dl() no. 18:54 < str1ngs> thought I was clear about that .. guess not 18:56 -!- anticide [~textual@91.200.224.93] has quit [Read error: Connection reset by peer] 18:57 < ww> go for xml processing hooray! 18:57 < ww> churning through gigablobs of xml using no more than 6Mb of RAM per process ftw! 18:58 < aiju> haha 18:58 < aiju> goroutines + channels are great for staying low on memory 18:58 < tav> if anyone fancies support for denial of service protection in go web servers, please feel free to star/comment this issue: http://code.google.com/p/go/issues/detail?id=2093 =) 18:58 < aiju> just don't let evil people on your internet 18:58 < aiju> problem solved 18:58 < tav> hehe 18:59 < ww> aiju: no fancy stuff like that, just chunk + xslt + write 18:59 < tav> if only life was that easy =) 18:59 < aiju> wow 18:59 < aiju> that's quite a long issue request 18:59 < tav> well, i try to be thorough 18:59 < aiju> your average 9front issue is just one sentence 19:00 < aiju> if anything ;P 19:00 < skelterjohn> sounds like the kind of thing you should start a discussion for on the mailing list, and then submit a patch 19:00 < exch> probably 19:00 < tav> well, i emailed the list about it ages ago — bradfitz responded that he's working on it and asked to make an issue 19:01 < skelterjohn> there you go then 19:01 < ww> tav: not sure about the content-length business... 19:01 < tav> i saw some commits from him along those lines, so i just left it, but seeing as it still hadn't been sorted, i decided to create an issue after all 19:01 < tav> ww: oh? 19:01 < ww> request can be big, and why not? read them buffered and don't suck it all into ram 19:01 < exch> file uploads 19:01 < ww> that's what the http library is expecting you to do 19:02 < tav> ww: sure, i'm not arguing against file uploads — that would have been silly =) 19:02 -!- Kahvi [5b9b57fc@gateway/web/freenode/ip.91.155.87.252] has quit [Ping timeout: 252 seconds] 19:03 < tav> but, if an attacker uploads 10GB files, that's just an easy way to use up my disk space 19:03 < tav> not to mention cpu cycles and exhaust memory 19:03 < aiju> get more disk space 19:03 < aiju> ;P 19:03 < tav> heh 19:03 < exch> Your code should have checks on that sort of stuff. Limit file sizes, etc 19:04 < ww> tav: sure, but as exch says, that's not the business of the http library 19:04 < aiju> the problem with DOS is that a dedicated attacker will always find a way 19:04 < tav> hmz, have you guys looked at the http library for this? 19:04 < tav> it makes lot of implicit decisions, e.g 10meg limit on form uploads 19:04 -!- lucian [~lucian@78-86-217-168.zone2.bethere.co.uk] has quit [Remote host closed the connection] 19:05 < tav> and you can't control the size of any file upload 19:05 -!- lucian [~lucian@78-86-217-168.zone2.bethere.co.uk] has joined #go-nuts 19:05 < ww> tav: well 10Mb limits would be silly.... 19:05 < ww> but for controlling the size of the body, you just check that when you loop around the reader/buffer 19:06 < tav> heh, well it's in there and you can't do anything about it — except to use your own patched version of the http package 19:06 < aiju> the ".c stands for config" joke doesn't work with go 19:06 < aiju> there should be an issue for THAT 19:07 < tav> ww: yes, you could write your own multipart file reader, but that's what the multipart package is for 19:07 < ww> that's broekn then... 19:07 < tav> and it doesn't provide the necessary protection 19:07 < tav> well, the easiest thing to do would be to limit the request body at source 19:07 < ww> (and i don't usually use form encoding at all, just rest-like post-document-with-the-right-content-type-damnit) 19:07 < tav> and thus my proposal 19:07 < ww> nonono. that's not the right fix 19:08 < ww> i believe you that form handling is broken 19:08 < ww> but please don't try to fix it that way 19:08 < tav> why not? 19:08 < ww> because the way it works now is simple and clear, just read from a buffer and stop reading if you want to 19:08 < tav> when a request is Close()'d, it copies the request body to ioutil.Discard 19:09 < tav> so, i can upload a gazillion 10gb files and waste your cpu cycles easily 19:09 < ww> that *should* be just a little bit of excess, what has actually been read from the socket 19:09 < ww> i would be very surprised if it drained the socket 19:09 < tav> it drains the socket 19:10 < tav> well, upto the length of the body's content-length 19:10 < flavius> nm 6.out | grep main shows me several "main's", which one is the one of my program? It lists main.init main.initdone· main.main runtime.mainstart 19:10 < tav> thus my proposal to solve it like this 19:10 < ww> ... content-length is not always there, cf. chunked encoding 19:11 * ww goes and actually looks at the source 19:11 < tav> with chunked encoding the current protection seems adequate 19:13 < ww> so http/server.go:148 19:13 < tav> actually, you are right, there is only protection against >= 4096 lines in chunked encoding 19:14 < tav> c = new(conn) ? 19:14 -!- NiteRain [~kvirc@c-98-254-236-21.hsd1.fl.comcast.net] has joined #go-nuts 19:14 < ww> oh, maybe we're looking at different versions. i'm looking at this: 19:14 < ww> func (ecr *expectContinueReader) Read(p []byte) (n int, err os.Error) { 19:15 < ww> which seems to do what i would expect 19:15 < flavius> in the tutorial http://golang.org/doc/go_tutorial.html, the echo example, when is flag.Bool called, which is outside of main()? 19:16 < flavius> does it "remember" the flags initialized, and does so upon flag.Parse()? 19:17 < tav> not sure, why you are pointing to that expectContinueReader{req.Body} is only called when the request expects a 100 Continue? 19:17 < ww> but you're right, old HTTP 1.0 behaviour drains 19:17 < ww> but apparently has to drain according to the comment talking about RFC2616 19:17 < tav> sure, and i think that generally that is great behaviour, leaves clients in a good state 19:17 < tav> draining that is 19:18 < tav> but, when facing 10gb uploads, i'd rather enforce a limit 19:20 < ww> i wonder if that belongs in a custom transport then 19:21 < ww> since this is a problem with http 1.0 which will tend to only do one request per connection anyways? 19:22 < ww> but i guess you'd have to tell the transport which version of http which would muddy things... 19:23 < skelterjohn> flavius: flag.Bool is called before main 19:23 < tav> ww: most of the http-version related aspects are already handled in http/server.go and http/transfer.go 19:23 < tav> they just need to handle this existing comment (imo): // TODO: limit the Content-Length. This is an easy DoS vector. 19:23 < skelterjohn> but you don't get any guarantees about the order of things that are called in the init phase, except if package A imports package B, package B's inits go first 19:25 < flavius> when I try to print a variable in gdb (compiled it with gccgo), I get "Attempt to extract a component of a value that is not a structure." I am using gccgo (GCC) 4.6.1 19:25 < skelterjohn> can't help you there - never used gdb + go 19:25 < flavius> How to print it? It is about the main.omitNewLine 19:26 < flavius> skelterjohn: are there other debugging tools? 19:26 < skelterjohn> fmt.Println 19:26 < flavius> doh 19:26 < skelterjohn> *shrug* it works fine 19:26 < skelterjohn> i have an easier time debugging go code with prints than i did C, C++ or java with a fancy debugger 19:29 < skelterjohn> man, it is seriously hot out today 19:29 < ww> tav: so if you were to do that, there would need to be a way to pass that configurable content-length limit down the stack... 19:29 < skelterjohn> hadn't gone outside this afternoon yet, but just took out the garbage 19:29 < skelterjohn> and i about melted 19:29 < ww> right now ReadRequest just gets called with a reader... 19:29 < flavius> are there any __LINE__ and other similar things in go? 19:29 < aiju> no 19:29 < ww> flavius: i do most debugging with log.Printf 19:29 < skelterjohn> sure there is 19:29 < skelterjohn> runtime.Caller 19:30 < aiju> there is? 19:30 < ww> you can set up log to put the file and line in log messages 19:30 < skelterjohn> gets you dynamic information about the call stack, including the line number of jumps 19:30 < flavius> introspection, cool 19:30 < ww> simplest thing is just do: log.SetFlags(log.LstdFlags | log.Lshortfile) 19:30 < ww> and then use log.Print 19:30 < skelterjohn> gonicetrace.googlecode.com is an example using it, though for a different purpose 19:30 < tav> also, runtime/debug.Stack() if you want to capture and output stack traces 19:31 < skelterjohn> huh - that's what nicetrace does, without runtime/debug 19:32 < skelterjohn> but nicetrace does its own formatting and skips the low level .c files 19:34 < tav> ww: sure, agreed about the question of how to pass along the configuration 19:34 < tav> skelterjohn: cool, thx, didn't know about nicetrace 19:35 < skelterjohn> i don't really advertise it 19:35 -!- robteix [~robteix@host24.190-225-214.telecom.net.ar] has quit [Ping timeout: 250 seconds] 19:35 < skelterjohn> but it makes it easier for me to read the stack trace when something panics 19:35 < skelterjohn> just "defer nicetrace.Print()" 19:35 < tav> skelterjohn: a comparative example on the homepage would be nice btw 19:35 < skelterjohn> for nicetrace? 19:36 < tav> aye 19:36 < skelterjohn> not worth the effort. take a look at the _test.go for an example 19:36 -!- smw [~stephen@unaffiliated/smw] has quit [Read error: Operation timed out] 19:36 < tav> yes, but that requires running it though =) 19:36 < skelterjohn> looking at a source file? 19:36 < tav> hmz? 19:36 < skelterjohn> oh you mean seeing what it prints 19:36 < tav> yes 19:36 < skelterjohn> meh :) 19:38 < flavius> So what is the right term for "initializers" outside main()? initializer? (just like flag.Bool in the echo example) 19:38 < skelterjohn> dunno. initializer seems fien 19:38 < skelterjohn> fine 19:39 < skelterjohn> var X = foo happens before main, and a func init() { ... } is called before main 19:39 < skelterjohn> that's all 19:39 < flavius> can any package have them? 19:39 < skelterjohn> might say something in the spec 19:39 < skelterjohn> yes 19:39 -!- nicka [~nicka@unaffiliated/nicka] has quit [Ping timeout: 252 seconds] 19:40 < skelterjohn> http://golang.org/doc/go_spec.html#Program_initialization_and_execution 19:40 < skelterjohn> the "program execution" bit 19:42 < tav> skelterjohn: here ya go: https://gist.github.com/1101805 19:47 < flavius> I have added a func init() { fmt.Println("init") } in the main package, but nothing is displayed 19:48 < flavius> oh sorry, it worked 20:05 < flavius> How can I concatenate strings? Something like fmt.Println(i + ": " + v) won't work 20:05 < aiju> it wokrs 20:05 < aiju> *works 20:05 < aiju> is i an integer? 20:05 < flavius> oh, yes 20:05 < flavius> how would I do it? 20:05 < aiju> fmt.Println(i, ": ", v) 20:15 -!- exch [~blbl@ip34-181-209-87.adsl2.static.versatel.nl] has quit [Quit: Lost terminal] 20:16 < skelterjohn> fmt.Printf("%d: %d\n", i, v) 20:19 -!- vsayer [~vsayer@c-67-170-236-166.hsd1.ca.comcast.net] has quit [Quit: Leaving] 20:22 -!- Dr_Who [~tgall_foo@linaro/tgall-foo] has quit [Quit: ZZZZZzzzzz] 20:22 -!- Dr_Who [~tgall_foo@linaro/tgall-foo] has joined #go-nuts 20:26 -!- moraes [~moraes@189.103.188.201] has joined #go-nuts 20:27 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has quit [Remote host closed the connection] 20:27 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has joined #go-nuts 20:29 -!- Dr_Who [~tgall_foo@linaro/tgall-foo] has quit [Ping timeout: 250 seconds] 20:34 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:21b2:8f8c:efc0:58be] has quit [Quit: Leaving.] 20:48 < flavius> So, a package must be compiled before being imported. Now I could imagine if I were to write a makefile, I would have to write a "lot" of ".6: .go". Are there any tools to automatically look which packages a package depends on, recursively? 20:48 < flavius> and compile them, of course 20:49 -!- Bigbear1 [~Cody@d75-158-129-33.abhsia.telus.net] has joined #go-nuts 20:50 < ww> flavius: goinstall does that 20:50 < ww> i think go-gb may do that as well 20:51 < flavius> goinstall sounds like it would install things. I only need to compile the "main" package (and its dependencies) 20:52 < ww> your dependencies need to be installed (unless you do things like mess with your GOPATH or use relative imports) 20:53 < ww> otherwise the linker won't know where to find them 20:53 < flavius> I am talking about my own packages, the "./main" package depends on the "./file" package, for instance 20:54 < ww> flavius: in that case you could do something like the build: target in this makefile: https://bitbucket.org/ww/gold/src/118a368a72d0/Makefile 20:55 < ww> mind that's really only intended for the development environment, goinstall is used for deployment 20:56 < ww> ... and goinstall doesn't use the makefiles at all 20:56 < aiju> 22:54 < flavius> So, a package must be compiled before being imported. Now I could imagine if I were to write a makefile, I would have to write a "lot" of ".6: .go". Are there any tools to automatically look which packages a package depends on, recursively? 20:56 < aiju> or just learn how to write makefiles? 20:56 < aiju> makefiles have patterns 20:59 < ww> aiju: right, but the more interesting part of his question was the dependency tree bit... 20:59 < rm445> but in general you have to write in a makefile what source files make up a package, right? 20:59 -!- robteix [~robteix@host63.190-136-56.telecom.net.ar] has joined #go-nuts 21:00 < ww> rm445: yes, 21:00 < ww> i think goinstall assumes all *.go that are not _test.go or _bench.go make up the package 21:00 < flavius> yes, I was refering to the dependency tree, not the patterns 21:01 < ww> goinstall then, i believe, parses the source and builds a dependency tree from the imports 21:01 < flavius> but I don't need it to install anything, it's a development machine 21:02 < ww> i'm not sure how it works with local imports though... 21:02 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has quit [Quit: ZNC - http://znc.sourceforge.net] 21:02 < ww> flavius: i understand, which is why i suggested something like the build target for that - not automatic but unless you have a really complicated forest of your own code it should suffice (it does for me) 21:04 < flavius> Anyway I see there are packages to build the AST, so I guess I will just write a tool for that 21:04 < flavius> For now it was just a question, I don't need it yet 21:04 < ww> i suspect you'll end up reimplementing a good portion of goinstall that way, but it might be fun 21:06 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has joined #go-nuts 21:11 -!- robteix [~robteix@host63.190-136-56.telecom.net.ar] has quit [Remote host closed the connection] 21:12 -!- jmil [~jmil@96.25.13.126] has quit [Quit: jmil] 21:14 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Remote host closed the connection] 21:17 -!- Dr_Who [~tgall_foo@linaro/tgall-foo] has joined #go-nuts 21:17 -!- gridaphobe [~gridaphob@cpe-74-68-151-24.nyc.res.rr.com] has quit [Quit: Leaving] 21:26 < flavius> haha I've managed to crash my executable which has been successfully built by 6g without a single warning 21:27 < flavius> switch nr, er := f.Read(buf[:]); false { } <-- the false there makes it crash 21:32 -!- pothos_ [~pothos@111-240-164-228.dynamic.hinet.net] has joined #go-nuts 21:34 -!- pothos [~pothos@111-240-171-216.dynamic.hinet.net] has quit [Ping timeout: 260 seconds] 21:41 < angasule> flavius: what's the backtrace? how do you know it's the false and not the Read? 21:41 < angasule> flavius: btw, all programs that crash have first managed to be compilable... 21:42 -!- photron [~photron@port-92-201-48-250.dynamic.qsc.de] has quit [Ping timeout: 252 seconds] 21:44 < flavius> yes, it is compiled by 6g and linked by 6l, as I said. The backtrace is this: https://gist.github.com/1101922 21:44 < angasule> yay, my IRC daemon is now "functional", private messaging works. 21:44 < flavius> I know it because when I change it to true or I leave it out, it doesn't crash 21:48 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has quit [Remote host closed the connection] 21:49 < ww> flavius: what happens if you run gofmt on that source file? 21:50 -!- lucian [~lucian@78-86-217-168.zone2.bethere.co.uk] has quit [Read error: Operation timed out] 21:50 -!- lucian [~lucian@78-86-217-168.zone2.bethere.co.uk] has joined #go-nuts 21:52 -!- lucian [~lucian@78-86-217-168.zone2.bethere.co.uk] has quit [Remote host closed the connection] 21:55 -!- Fish- [~Fish@9fans.fr] has quit [Quit: WeeChat 0.3.5] 21:58 < flavius> ww: nothing 21:59 -!- rlab [~Miranda@91.200.158.34] has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org] 22:08 -!- moraes [~moraes@189.103.188.201] has quit [Read error: Operation timed out] 22:16 -!- nicka [~nicka@unaffiliated/nicka] has joined #go-nuts 22:17 -!- kergoth_ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has joined #go-nuts 22:29 -!- Aram [~Aram@unaffiliated/aramdune] has quit [Quit: .] 22:40 -!- vmil86 [~vmil86@78.57.227.12] has quit [Read error: Connection reset by peer] 22:53 -!- Dr_Who [~tgall_foo@linaro/tgall-foo] has quit [Quit: ZZZZZzzzzz] 22:54 -!- _macro [~Neil@c-67-169-183-90.hsd1.ca.comcast.net] has quit [Ping timeout: 246 seconds] 22:57 -!- Transformer [~Transform@ool-4a59e397.dyn.optonline.net] has joined #go-nuts 22:59 -!- Transformer [~Transform@ool-4a59e397.dyn.optonline.net] has quit [Excess Flood] 23:08 -!- ShadowIce` [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit: Verlassend] 23:09 -!- Bigbear1 [~Cody@d75-158-129-33.abhsia.telus.net] has quit [Read error: Connection reset by peer] 23:11 -!- telexicon [~telexicon@unaffiliated/chowmeined] has joined #go-nuts 23:16 -!- Transformer [~Transform@ool-4a59e397.dyn.optonline.net] has joined #go-nuts 23:19 -!- Bigbear1 [~Cody@d75-158-129-33.abhsia.telus.net] has joined #go-nuts 23:19 -!- Transformer [~Transform@ool-4a59e397.dyn.optonline.net] has left #go-nuts [] 23:22 -!- vsayer [~vsayer@c-67-170-236-166.hsd1.ca.comcast.net] has joined #go-nuts 23:34 -!- Bigbear1 [~Cody@d75-158-129-33.abhsia.telus.net] has quit [Read error: Connection reset by peer] 23:49 -!- Bigbear1 [~Cody@d75-158-129-33.abhsia.telus.net] has joined #go-nuts 23:52 -!- Dr_Who [~tgall_foo@linaro/tgall-foo] has joined #go-nuts 23:55 -!- exch [~blbl@ip34-181-209-87.adsl2.static.versatel.nl] has joined #go-nuts 23:59 -!- napsy [~luka@88.200.96.18] has joined #go-nuts --- Log closed Sun Jul 24 00:00:01 2011