--- Log opened Thu Dec 02 00:00:35 2010 00:05 -!- dju [~dju@fsf/member/dju] has quit [Ping timeout: 265 seconds] 00:07 -!- tvw [~tv@e176000166.adsl.alicedsl.de] has joined #go-nuts 00:08 -!- Scorchin [~Scorchin@host86-173-186-254.range86-173.btcentralplus.com] has quit [Quit: Scorchin] 00:08 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3] 00:15 < KirkMcDonald> rspec22: Packages are not .go files. 00:15 < KirkMcDonald> rspec22: Packages are the result of compiling .go files. 00:19 -!- iant [~iant@nat/google/x-trewwbmikbdfrnug] has quit [Quit: Leaving.] 00:22 -!- meanburrito920 [~john@unaffiliated/meanburrito920] has quit [Ping timeout: 245 seconds] 00:23 -!- bmizerany [~bmizerany@208.66.27.62] has joined #go-nuts 00:23 < bmizerany> is there a way to know how many active goroutines are running? 00:31 -!- kr [~Keith@208.66.27.62] has joined #go-nuts 00:31 -!- iant [~iant@nat/google/x-bwxdsboydpsfeubq] has joined #go-nuts 00:31 -!- mode/#go-nuts [+v iant] by ChanServ 00:31 -!- iant1 [~iant@66.109.105.230] has joined #go-nuts 00:34 -!- tvw [~tv@e176000166.adsl.alicedsl.de] has quit [Ping timeout: 245 seconds] 00:35 -!- iant [~iant@nat/google/x-bwxdsboydpsfeubq] has quit [Ping timeout: 245 seconds] 00:40 -!- foocraft [~dsc@89.211.88.3] has joined #go-nuts 00:43 -!- mode/#go-nuts [+v iant] by ChanServ 00:46 -!- jhawk28_ [~jhawk28@user-387c58d.cable.mindspring.com] has quit [Ping timeout: 245 seconds] 00:50 -!- l00t [~i-i3id3r_@20150097062.user.veloxzone.com.br] has joined #go-nuts 00:51 -!- niemeyer [~niemeyer@189.73.142.213] has quit [Ping timeout: 245 seconds] 01:11 -!- bmizerany [~bmizerany@208.66.27.62] has quit [Remote host closed the connection] 01:21 < plexdev> http://is.gd/i4r6p by [Rob Pike] in go/doc/devel/ -- roadmap: update gdb status 01:21 < plexdev> http://is.gd/i4r6y by [Rob Pike] in go/src/pkg/template/ -- template: implement multi-word variable instantation for formatters. 01:23 -!- felipe [~felipe@my.nada.kth.se] has quit [Quit: felipe] 01:23 -!- kr [~Keith@208.66.27.62] has quit [Quit: WeeChat 0.3.2] 01:23 -!- ExtraSpice [~XtraSpice@88.118.33.48] has quit [Ping timeout: 240 seconds] 01:24 -!- jhawk28 [~jhawk28@user-387c58d.cable.mindspring.com] has joined #go-nuts 01:27 < Namegduf> Is there a better way to write a string to a socket than converting it to a []byte, with the copy involved? 01:31 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has joined #go-nuts 01:33 -!- alc [~arx@222.128.140.65] has joined #go-nuts 01:35 <+iant> Namegduf: io.WriteString, but that will just do the conversion and copy for you 01:37 < Namegduf> Hmm, pity. 01:38 -!- shvntr [~shvntr@113.84.151.237] has joined #go-nuts 01:38 < exch> Couldn't you use some reflect trickery to modify the type header from string into a byte slice? 01:39 <+iant> Namegduf: you could push WriteString through the net package and add it to the syscalls package 01:39 < exch> Not sure if that would be faster than copying though.. if it works at all 01:39 <+iant> I don't know whether it would be worth it 01:42 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has quit [Ping timeout: 245 seconds] 01:46 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has joined #go-nuts 01:49 < Namegduf> Might be an idea later, right now I need to get the code done. Could post to the list and see what people think. 01:53 < DarthShrine> Is there any performance different between using io.WriteString and fmt.Fprint to write to a socket? 01:55 <+iant> io.WriteString is likely to be a wee bit faster 01:55 <+iant> probably won't matter overall, though, you'll probably be dominated by network time anyhow 01:55 -!- ymasory [~ymasory@c-76-99-55-224.hsd1.pa.comcast.net] has joined #go-nuts 01:56 -!- iant [~iant@66.109.105.230] has quit [Quit: Leaving.] 01:59 * Namegduf is writing a simple app server which takes JSON requests, checks authentication, and runs MySQL queries. 02:05 -!- jhawk28 [~jhawk28@user-387c58d.cable.mindspring.com] has quit [Ping timeout: 245 seconds] 02:07 -!- felipe [~felipe@my.nada.kth.se] has joined #go-nuts 02:09 -!- artefon [~thiago@189.59.206.57] has quit [Ping timeout: 265 seconds] 02:09 < Namegduf> Hmm. Is there an easy way to tell if an error passed up from the JSON package's Decode came from it, or the network connection? 02:13 -!- skelterjohn [~jasmuth@c-76-98-219-171.hsd1.nj.comcast.net] has joined #go-nuts 02:15 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has quit [Read error: Operation timed out] 02:22 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has joined #go-nuts 02:22 -!- artefon [~thiago@189.59.201.44] has joined #go-nuts 02:25 -!- artefon [~thiago@189.59.201.44] has quit [Client Quit] 02:34 -!- l00t [~i-i3id3r_@20150097062.user.veloxzone.com.br] has quit [Ping timeout: 240 seconds] 02:34 -!- l00t- [~i-i3id3r_@187.127.167.253] has joined #go-nuts 02:36 -!- skelterjohn [~jasmuth@c-76-98-219-171.hsd1.nj.comcast.net] has quit [Quit: skelterjohn] 02:45 -!- evilclone [~graham@dyn1065-37.hor.ic.ac.uk] has quit [Quit: Leaving] 02:48 -!- viirya [~viirya@cml506-25.csie.ntu.edu.tw] has joined #go-nuts 02:50 -!- ios_ [~ios@180.191.89.2] has joined #go-nuts 02:52 -!- Tv [~tv@gige.bur.digisynd.com] has quit [Ping timeout: 240 seconds] 03:02 -!- rbraley [~rbraley@ip72-222-135-139.ph.ph.cox.net] has quit [Ping timeout: 264 seconds] 03:05 -!- devrim [~Adium@72.225.239.227] has joined #go-nuts 03:06 -!- Davidian1024 [~Davidian1@cpe-173-88-174-84.neo.res.rr.com] has quit [Ping timeout: 260 seconds] 03:12 -!- sabalaba [~sabalaba@66.220.12.133] has quit [Ping timeout: 265 seconds] 03:19 -!- Davidian1024 [~Davidian1@cpe-173-88-174-84.neo.res.rr.com] has joined #go-nuts 03:24 -!- krutcha [~krutcha@S010600045a27676a.vs.shawcable.net] has quit [Ping timeout: 272 seconds] 03:31 -!- skelterjohn [~jasmuth@c-76-98-219-171.hsd1.nj.comcast.net] has joined #go-nuts 03:32 -!- Tv [~tv@cpe-76-168-227-45.socal.res.rr.com] has joined #go-nuts 03:33 -!- CodeWar [~CodeWar@c-24-23-206-137.hsd1.ca.comcast.net] has joined #go-nuts 03:34 -!- jhawk28 [~jhawk28@user-387c58d.cable.mindspring.com] has joined #go-nuts 03:38 -!- jhawk28 [~jhawk28@user-387c58d.cable.mindspring.com] has quit [Remote host closed the connection] 03:44 < CodeWar> are there plans for allowing manual memory management where the programmer chooses to? 03:47 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has joined #go-nuts 03:47 -!- mode/#go-nuts [+v iant] by ChanServ 03:48 -!- skelterjohn [~jasmuth@c-76-98-219-171.hsd1.nj.comcast.net] has quit [Quit: skelterjohn] 03:52 -!- foocraft [~dsc@89.211.88.3] has quit [Quit: Leaving] 03:55 -!- CodeWar [~CodeWar@c-24-23-206-137.hsd1.ca.comcast.net] has quit [Quit: Leaving] 04:09 < plexdev> http://is.gd/i4OAJ by [Brad Fitzpatrick] in go/src/pkg/http/ -- http: consume request body before next request 04:14 -!- slp9 [~sl@68-179-130-17.bsr-c9-d1.evv.dhcp.sigecom.net] has quit [Read error: Connection reset by peer] 04:20 -!- lmoura [~lauromour@187.59.118.235] has quit [Ping timeout: 245 seconds] 04:22 -!- lmoura [~lauromour@186.212.100.161] has joined #go-nuts 04:24 -!- krutcha [~krutcha@S010600045a27676a.vs.shawcable.net] has joined #go-nuts 04:30 -!- rejb [~rejb@unaffiliated/rejb] has quit [Ping timeout: 276 seconds] 04:30 -!- krutcha [~krutcha@S010600045a27676a.vs.shawcable.net] has quit [Quit: Leaving] 04:47 < Namegduf> Hmm, goodie. The default build system for cgo won't even build the cgo library before make install, making it impossible to use multiple versions of the same cgo project at once. 04:48 < Namegduf> I wish we had a usable set of default makefiles for multi-package projects. 05:31 -!- Eridius [~kevin@unaffiliated/eridius] has quit [Ping timeout: 240 seconds] 05:39 -!- slp9 [~sl@68-179-130-17.bsr-c9-d1.evv.dhcp.sigecom.net] has joined #go-nuts 05:47 -!- devrim [~Adium@72.225.239.227] has quit [Quit: Leaving.] 05:50 -!- fabled [~fabled@mail.fi.jw.org] has joined #go-nuts 05:57 -!- adu [~ajr@pool-173-66-11-168.washdc.fios.verizon.net] has joined #go-nuts 06:09 -!- alc [~arx@222.128.140.65] has quit [Ping timeout: 240 seconds] 06:23 -!- krutcha [~krutcha@S010600045a27676a.vs.shawcable.net] has joined #go-nuts 06:38 -!- Adys [~Adys@unaffiliated/adys] has quit [Quit: I ♥ Unicode] 06:38 -!- Adys [~Adys@cpc3-chap8-2-0-cust26.aztw.cable.virginmedia.com] has joined #go-nuts 06:38 -!- Adys [~Adys@cpc3-chap8-2-0-cust26.aztw.cable.virginmedia.com] has quit [Changing host] 06:38 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts 06:47 -!- cco3 [~conley@c-69-181-138-209.hsd1.ca.comcast.net] has joined #go-nuts 06:55 -!- jvolkman [~jvolkman@unaffiliated/jvolkman] has quit [Ping timeout: 245 seconds] 06:58 -!- Tv [~tv@cpe-76-168-227-45.socal.res.rr.com] has quit [Ping timeout: 260 seconds] 07:16 -!- Project_2501 [~Marvin@82.84.79.101] has joined #go-nuts 07:17 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:7d04:baea:7a63:a7f5] has joined #go-nuts 07:42 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|] 07:42 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts 07:44 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has quit [Read error: Operation timed out] 07:48 -!- alc [~arx@114.245.255.97] has joined #go-nuts 07:50 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has joined #go-nuts 07:52 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|] 08:01 -!- sabalaba [~sabalaba@119.57.31.96] has joined #go-nuts 08:12 -!- mbohun [~user@ppp115-156.static.internode.on.net] has joined #go-nuts 08:17 -!- wrtp [~rog@92.17.51.151] has joined #go-nuts 08:21 -!- sabalaba [~sabalaba@119.57.31.96] has quit [Ping timeout: 265 seconds] 08:27 -!- photron [~photron@port-92-201-120-127.dynamic.qsc.de] has joined #go-nuts 08:29 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:7d04:baea:7a63:a7f5] has quit [Read error: Operation timed out] 08:35 -!- bortzmeyer [~stephane@central.sources.org] has joined #go-nuts 08:37 -!- viirya [~viirya@cml506-25.csie.ntu.edu.tw] has quit [Ping timeout: 264 seconds] 08:39 -!- sabalaba [~sabalaba@119.57.31.97] has joined #go-nuts 08:44 -!- viirya [~viirya@cml506-25.csie.ntu.edu.tw] has joined #go-nuts 08:58 -!- ExtraSpice [~XtraSpice@88.118.33.48] has joined #go-nuts 08:58 -!- piyushmishra [~piyushmis@117.200.226.239] has joined #go-nuts 09:01 -!- jvolkman [~jvolkman@unaffiliated/jvolkman] has joined #go-nuts 09:06 -!- ronnyy [~quassel@drsd-4db3fa24.pool.mediaWays.net] has joined #go-nuts 09:17 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts 09:21 -!- path[l] [~path@120.138.102.50] has joined #go-nuts 09:23 < krutcha> hmm, I seem to be getting some non UTF8 chars in my XML datastream via net.Conn.Read() 09:31 -!- napsy [~luka@88.200.96.18] has joined #go-nuts 09:32 -!- virtualsue [~chatzilla@nat/cisco/x-ncpjsjdbixvbiang] has joined #go-nuts 09:35 -!- tvw [~tv@212.79.9.150] has joined #go-nuts 09:52 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has quit [Quit: WeeChat 0.3.2] 09:59 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has joined #go-nuts 10:00 -!- krutcha [~krutcha@S010600045a27676a.vs.shawcable.net] has quit [Quit: Leaving] 10:00 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has quit [Client Quit] 10:01 -!- kanru [~kanru@2001:c08:3700:ffff::1a:f5b7] has joined #go-nuts 10:03 -!- path[l] [~path@120.138.102.50] has quit [Quit: path[l]] 10:04 -!- kanru [~kanru@2001:c08:3700:ffff::1a:f5b7] has quit [Client Quit] 10:11 -!- kanru [~kanru@2001:c08:3700:ffff::1a:f5b7] has joined #go-nuts 10:13 -!- Paradox924X_ [~Paradox92@c-68-35-229-34.hsd1.fl.comcast.net] has joined #go-nuts 10:14 -!- Paradox924X [~Paradox92@vaserv/irc/founder] has quit [Ping timeout: 245 seconds] 10:15 -!- Paradox924X [~Paradox92@c-68-35-229-34.hsd1.fl.comcast.net] has quit [Changing host] 10:15 -!- Paradox924X [~Paradox92@vaserv/irc/founder] has joined #go-nuts 10:15 -!- piyushmishra [~piyushmis@117.200.226.239] has quit [Quit: Leaving.] 10:17 -!- Fish [~Fish@9fans.fr] has joined #go-nuts 10:20 -!- noam [noam@77.126.219.215] has quit [Ping timeout: 240 seconds] 10:25 -!- alc [~arx@114.245.255.97] has quit [Ping timeout: 245 seconds] 10:28 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts 10:29 -!- virtualsue [~chatzilla@nat/cisco/x-ncpjsjdbixvbiang] has quit [Ping timeout: 250 seconds] 10:36 -!- artefon [~thiago@189.59.201.44] has joined #go-nuts 10:36 -!- artefon [~thiago@189.59.201.44] has quit [Read error: Connection reset by peer] 10:37 -!- artefon [~thiago@189.59.201.44] has joined #go-nuts 10:41 -!- kanru [~kanru@2001:c08:3700:ffff::1a:f5b7] has quit [Quit: WeeChat 0.3.2] 10:42 -!- path[l] [~path@59.162.86.164] has joined #go-nuts 10:46 -!- path[l]_ [~path@59.162.86.164] has joined #go-nuts 10:47 -!- path[l] [~path@59.162.86.164] has quit [Ping timeout: 276 seconds] 10:52 -!- Axsuul [Axsuul@97-93-99-133.static.mtpk.ca.charter.com] has quit [Ping timeout: 250 seconds] 11:08 -!- noam [noam@77.127.168.156] has joined #go-nuts 11:09 -!- g0bl1n [~g0blin@a213-22-18-58.cpe.netcabo.pt] has joined #go-nuts 11:11 -!- serverhorror_ [~serverhor@chello080109038110.17.14.vie.surfer.at] has joined #go-nuts 11:13 -!- niemeyer [~niemeyer@189.73.142.213] has joined #go-nuts 11:13 -!- serverhorror_ [~serverhor@chello080109038110.17.14.vie.surfer.at] has quit [Client Quit] 11:28 -!- l00t- [~i-i3id3r_@187.127.167.253] has quit [Quit: Leaving] 11:37 -!- virtualsue [~chatzilla@nat/cisco/x-dhuyuolriebtmkqg] has joined #go-nuts 11:49 -!- kanru [~kanru@2001:c08:3700:ffff::1b:876f] has joined #go-nuts 11:58 -!- adu [~ajr@pool-173-66-11-168.washdc.fios.verizon.net] has quit [Quit: adu] 12:10 -!- ct529 [~quassel@77-44-78-159.xdsl.murphx.net] has joined #go-nuts 12:27 -!- alc [~arx@222.128.143.246] has joined #go-nuts 12:34 < niemeyer> wrtp: Played with the After() stuff last night.. check out the thread in the ML 12:35 < wrtp> niemeyer: i'm just about to post a response :-) 12:35 < niemeyer> wrtp: Nice :-) 12:35 < wrtp> here's the code: http://pastebin.com/CY4C0H0M 12:36 < wrtp> much better worst-case behaviour, but can be slightly slower to set up (but that might be the vagaries of benchmarking) 12:40 < niemeyer> Will wait for your response and discuss in the list 12:41 < wrtp> ok 12:41 < wrtp> the algorithm is pretty much the same, as it turns out 12:42 < niemeyer> Yeah, I wonder why.. ;-) 12:42 -!- kanru [~kanru@2001:c08:3700:ffff::1b:876f] has quit [Ping timeout: 260 seconds] 12:47 < wrtp> niemeyer: well, it wasn't because i looked at your code! 12:48 < wrtp> i only just looked, and discovered that your code was doing pretty much the same thing. 12:48 < wrtp> i just posted, BTW. 12:48 -!- tensorpudding [~user@99.148.202.191] has quit [Remote host closed the connection] 12:48 < niemeyer> wrtp: With the same variable name even (sleeping).. I guess we really think alike! :-) 12:49 < wrtp> i started off with "fired" - then realised that it wouldn't work. 12:51 < wrtp> interestingly, i tickled a GC bug when benchmarking, causing the benchmark to hang up. only happens if i nil out the event when popping it. 12:53 < wrtp> BTW, when firing off many events are random times in the future, your implementation takes 52000ns/op; mine takes 16000. but when adding to the end of the queue, yours is 30-40% faster. (no surprise there i guess) 12:55 -!- kanru [~kanru@2001:c08:3700:ffff::1b:91f3] has joined #go-nuts 12:56 < niemeyer> wrtp: Right, the detail is the realistic workloads will tend to append at the end of the queue 12:56 -!- ios_ [~ios@180.191.89.2] has quit [Quit: Leaving] 12:59 < wrtp> niemeyer: it depends - if you've got many concurrent repeating timers, all with different timeouts, then most calls will insert into the middle of the queue. 13:00 < wrtp> the overhead is small enough that i think it's worth it. 13:01 < wrtp> if you have several long-lived timers, and one fast repeating timer, then you'll get worst case (traversing all items) every time. 13:01 < niemeyer> wrtp: For that to be true it'd have to be equally distributed among the several timeouts.. any tendencies towards one value will move them towards the end 13:02 < niemeyer> wrtp: E.g. if you're *often inserting in the middle*, it means the middle is growing towards the end :-) 13:06 < wrtp> depends on the rate at which your inserting/deleting, i guess 13:07 -!- kanru [~kanru@2001:c08:3700:ffff::1b:91f3] has quit [Ping timeout: 260 seconds] 13:07 < niemeyer> wrtp: Kind of.. try to come up with a situation where most items are added at the beginning 13:08 < niemeyer> wrtp: It just doesn't make sense in this context.. 13:09 < wrtp> as i said a moment ago - say i have quite a few long-lived waiters (e.g. 1 or 2 seconds) and one fast loop that times out quickly, then the fast loop will have to traverse through all the others every time. 13:11 < wrtp> BTW, the array copying isn't a particular issue i think, as the array size will tend to stabilise. 13:11 < niemeyer> wrtp: If you have quite a few long lived waiters ever 1 or 2 seconds, it means you're *appending* quite a few long lived waiters every 1 or 2 seconds! 13:13 < wrtp> sure - it could be for a loads of independently blinking graphics, for example. blink, wait, blink, wait, etc. 13:13 < wrtp> or slow polling code. 13:13 < niemeyer> wrtp: Yes, and all of those events added one or two seconds were appended immediately, without any searching 13:14 < wrtp> sure, but they're only happening very occasionally. 13:14 < niemeyer> wrtp: Well, 1 or 2 seconds necessarily 13:14 < niemeyer> wrtp: After that the events must go away, and your fast loop goes to the edge, and become appends as well 13:14 < wrtp> the important thing is that if you've got another loop that's running every few milliseconds, that's where the overhead is felt. 13:15 < wrtp> the events only go away for good if they're not repeating 13:15 < niemeyer> wrtp: If you have to append 1000 1/2 seconds items, that's already equivalent to 1 per millisecond :) 13:16 < wrtp> 2 per millisecond :-) 13:16 < niemeyer> wrtp: Either way, we're both guessing workloads.. and won't get to any conclusion. 13:16 < niemeyer> I'm happy with either option 13:17 -!- kanru [~kanru@2001:c08:3700:ffff::1b:944f] has joined #go-nuts 13:18 < niemeyer> wrtp: Sent some unrelated private notes, btw 13:20 -!- plainhao [~plainhao@208.75.85.237] has joined #go-nuts 13:20 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has joined #go-nuts 13:22 -!- zozoR [~zozoR@5634798d.rev.stofanet.dk] has joined #go-nuts 13:22 -!- soapy_illusions [~alex@207.96.182.162] has joined #go-nuts 13:22 -!- kanru [~kanru@2001:c08:3700:ffff::1b:944f] has quit [Ping timeout: 245 seconds] 13:23 < soapy_illusions> buf := make([][]interface{}, 10, 2) is throwing makeslice: cap out of range, can anyone explain what that means 13:25 < wrtp> soapy_illusions: the first arg to make is the len, the second is the csap 13:26 < wrtp> s/csap/cap/ 13:26 < wrtp> so make([]T, 2, 10) should do what you want 13:26 -!- noam [noam@77.127.168.156] has quit [Read error: Connection reset by peer] 13:26 < soapy_illusions> wrtp: ahh I see, now how would I declare a 2d array using make? 13:26 -!- noam [noam@77.127.168.156] has joined #go-nuts 13:27 < wrtp> soapy_illusions: you'd make the outer array, then loop making an array for each inner element. 13:28 < soapy_illusions> wrtp: humm ok, then second question, what exactly is a cap, how big the slice can get and the length is how big it starts? 13:28 < wrtp> yeah, kinda 13:29 < wrtp> len(a) is always <= cap(a) 13:30 < soapy_illusions> ok thanks a lot 13:33 < wrtp> soapy_illusions: you can slice an array up to its capacity, but you can only index up to its length 13:33 < soapy_illusions> wrtp: ahh thanks that makes more sense ( I was confused why a cap was needed otherwise ) 13:35 -!- skejoe [~skejoe@188.114.142.162] has joined #go-nuts 13:38 -!- noam [noam@77.127.168.156] has quit [Ping timeout: 240 seconds] 13:40 < soapy_illusions> hey wrtp I am still getting the error when doing this buf := make([]interface{}, 10, 11) 13:41 < wrtp> soapy_illusions: i don't believe it :-) 13:42 < wrtp> it works fine for me 13:42 < soapy_illusions> "panic: runtime error: makeslice: cap out of range" ... I'll try reloading my IDE goClipse can be the cause of errors sometimes 13:43 < wrtp> soapy_illusions: i just pasted your code into the go playground and it worked. 13:43 -!- sauerbraten [~sauerbrat@p508CF964.dip.t-dialin.net] has joined #go-nuts 13:44 < soapy_illusions> wrtp: ok I will try re working it a bit, is there any better IDE than goClipse at the moment, it seems very temperamental lol 13:44 < wrtp> i don't know about goClipse 13:45 < wrtp> i use acme, but it might be considered an "acquired taste"... 13:47 < soapy_illusions> hahah I guess so because acme IDE in google turns up almost nothing 13:47 -!- noam [noam@IGLD-84-228-74-42.inter.net.il] has joined #go-nuts 13:48 -!- femtoo [~femto@95-89-197-196-dynip.superkabel.de] has joined #go-nuts 13:48 < wrtp> soapy_illusions: http://en.wikipedia.org/wiki/Acme_(text_editor) 13:49 < soapy_illusions> ohh Rob Pike wrote it 13:51 < soapy_illusions> and I can see how that might be an "acquired taste" 13:54 -!- sahid [~sahid@LNeuilly-152-21-22-10.w193-253.abo.wanadoo.fr] has joined #go-nuts 13:57 -!- DerHorst [~Horst@e176104070.adsl.alicedsl.de] has joined #go-nuts 14:01 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3] 14:05 -!- ucasano [~ucasano@host153-182-static.227-95-b.business.telecomitalia.it] has joined #go-nuts 14:08 -!- artefon [~thiago@189.59.201.44] has quit [Quit: bye] 14:10 < mpl> wrtp: some might say an acquired distaste ;) 14:10 < wrtp> just like blue cheese :-) 14:11 < mpl> heh 14:12 -!- skelterjohn [~jasmuth@c-76-98-219-171.hsd1.nj.comcast.net] has joined #go-nuts 14:17 < kimelto> blue cheese <3 14:18 -!- ExtraSpice [~XtraSpice@88.118.33.48] has quit [Quit: Leaving] 14:19 -!- sabalaba [~sabalaba@119.57.31.97] has quit [Ping timeout: 276 seconds] 14:20 -!- gnuvince [~vince@70.35.165.162] has quit [Ping timeout: 260 seconds] 14:36 -!- alc [~arx@222.128.143.246] has quit [Ping timeout: 264 seconds] 14:44 -!- qutron_xyxy [~xxx@91.187.10.179] has joined #go-nuts 14:48 -!- qutron_xyxy [~xxx@91.187.10.179] has quit [Client Quit] 14:57 -!- Adys [~Adys@unaffiliated/adys] has quit [Quit: Quit] 14:57 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts 14:58 -!- zozoR [~zozoR@5634798d.rev.stofanet.dk] has quit [Ping timeout: 240 seconds] 14:59 -!- zozoR [~zozoR@5634798d.rev.stofanet.dk] has joined #go-nuts 15:05 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts 15:12 -!- emjayess [~emjayess@pix1.i29.net] has joined #go-nuts 15:13 -!- sauerbraten [~sauerbrat@p508CF964.dip.t-dialin.net] has quit [Remote host closed the connection] 15:14 -!- artefon [~thiago@dhcp20.usuarios.dcc.ufmg.br] has joined #go-nuts 15:14 -!- sauerbraten [~sauerbrat@p508CF964.dip.t-dialin.net] has joined #go-nuts 15:16 -!- shvntr [~shvntr@113.84.151.237] has quit [Ping timeout: 265 seconds] 15:17 -!- meanburrito920 [~john@192.5.109.49] has joined #go-nuts 15:17 -!- meanburrito920 [~john@192.5.109.49] has quit [Changing host] 15:17 -!- meanburrito920 [~john@unaffiliated/meanburrito920] has joined #go-nuts 15:17 -!- DarthShrine [~angus@pdpc/supporter/student/DarthShrine] has quit [Quit: DarthShrine] 15:22 -!- ExtraSpice [~XtraSpice@88.118.33.48] has joined #go-nuts 15:29 -!- skelterjohn [~jasmuth@c-76-98-219-171.hsd1.nj.comcast.net] has quit [Quit: skelterjohn] 15:32 -!- SRabbelier [~SRabbelie@188.142.63.148] has joined #go-nuts 15:36 -!- kanru [~kanru@2001:c08:3700:ffff::1b:b349] has joined #go-nuts 15:37 -!- gnuvince [~vince@70.35.169.73] has joined #go-nuts 15:37 -!- DerHorst [~Horst@e176104070.adsl.alicedsl.de] has quit [Remote host closed the connection] 15:37 -!- shvntr [~shvntr@123.89.207.223] has joined #go-nuts 15:43 -!- meanburrito920 [~john@unaffiliated/meanburrito920] has quit [Quit: leaving] 15:44 -!- nigelkerr [~nigelkerr@jstormichfw.jstor.org] has joined #go-nuts 15:45 -!- sabalaba [~sabalaba@221.220.254.3] has joined #go-nuts 15:46 -!- ct529 [~quassel@77-44-78-159.xdsl.murphx.net] has quit [Remote host closed the connection] 15:46 -!- devrim [~Adium@160.79.7.234] has joined #go-nuts 16:00 -!- gnuvince_ [~vince@64.235.201.71] has quit [Ping timeout: 250 seconds] 16:02 -!- Tv [~tv@cpe-76-168-227-45.socal.res.rr.com] has joined #go-nuts 16:07 -!- skelterjohn [~jasmuth@lawn-gw.rutgers.edu] has joined #go-nuts 16:10 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts 16:11 -!- GoBIR [~gobir@res-128-61-89-71.res.gatech.edu] has quit [Ping timeout: 272 seconds] 16:13 -!- GoBIR [~gobir@res-128-61-89-71.res.gatech.edu] has joined #go-nuts 16:16 -!- shvntr [~shvntr@123.89.207.223] has quit [Quit: 所有的人都不知道自己在某一个核桃上。这是个病句。] 16:17 -!- devrim [~Adium@160.79.7.234] has quit [Quit: Leaving.] 16:20 -!- Venom_X [~pjacobs@66.54.185.131] has joined #go-nuts 16:29 < skelterjohn> mmm blue cheese 16:29 < skelterjohn> delish 16:30 -!- ronnyy [~quassel@drsd-4db3fa24.pool.mediaWays.net] has quit [Remote host closed the connection] 16:30 -!- sabalaba [~sabalaba@221.220.254.3] has quit [Ping timeout: 240 seconds] 16:30 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has quit [Ping timeout: 245 seconds] 16:30 -!- soapy_illusions [~alex@207.96.182.162] has quit [Remote host closed the connection] 16:31 -!- iant [~iant@216.239.45.130] has joined #go-nuts 16:31 -!- mode/#go-nuts [+v iant] by ChanServ 16:33 -!- wrtp [~rog@92.17.51.151] has quit [Ping timeout: 240 seconds] 16:36 -!- gnuvince_ [~vince@64.235.212.135] has joined #go-nuts 16:37 -!- noam [noam@IGLD-84-228-74-42.inter.net.il] has quit [Read error: Connection reset by peer] 16:37 -!- noam [noam@IGLD-84-228-74-42.inter.net.il] has joined #go-nuts 16:38 -!- wrtp [~rog@92.17.51.151] has joined #go-nuts 16:42 -!- kanru [~kanru@2001:c08:3700:ffff::1b:b349] has quit [Read error: Operation timed out] 16:43 -!- sabalaba [~sabalaba@66.220.12.133] has joined #go-nuts 16:48 -!- devrim [~Adium@160.79.7.234] has joined #go-nuts 16:53 -!- artefon [~thiago@dhcp20.usuarios.dcc.ufmg.br] has quit [Quit: bye] 17:00 -!- skejoe [~skejoe@188.114.142.162] has quit [Quit: Lost terminal] 17:01 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts 17:03 -!- enherit [~enherit@cpe-98-149-170-48.socal.res.rr.com] has joined #go-nuts 17:12 -!- meanburrito920 [~john@unaffiliated/meanburrito920] has joined #go-nuts 17:15 < plexdev> http://is.gd/i6mW2 by [Robert Griesemer] in go/ -- A+C: adding Stefan Nilsson 17:16 < plexdev> http://is.gd/i6mWu by [Stefan Nilsson] in go/src/pkg/sort/ -- Sort: reduced stack depth to lg(n) in quickSort 17:16 -!- TheSaint [~thesaint@166.205.10.111] has joined #go-nuts 17:18 -!- Oejet [~oejet@212.45.122.120] has joined #go-nuts 17:20 -!- ShadowIce [~pyoro@HSI-KBW-109-193-120-162.hsi7.kabel-badenwuerttemberg.de] has joined #go-nuts 17:20 -!- ShadowIce [~pyoro@HSI-KBW-109-193-120-162.hsi7.kabel-badenwuerttemberg.de] has quit [Changing host] 17:20 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts 17:21 -!- Fish [~Fish@9fans.fr] has quit [Quit: So Long, and Thanks for All the Fish] 17:22 -!- Tv [~tv@cpe-76-168-227-45.socal.res.rr.com] has quit [Ping timeout: 265 seconds] 17:25 -!- tvw [~tv@212.79.9.150] has quit [Remote host closed the connection] 17:32 -!- exch [~exch@h78233.upc-h.chello.nl] has quit [Ping timeout: 240 seconds] 17:33 -!- TheSaint_ [~thesaint@166.205.11.181] has joined #go-nuts 17:33 -!- exch [~exch@h78233.upc-h.chello.nl] has joined #go-nuts 17:35 -!- boscop_ [~boscop@f055031177.adsl.alicedsl.de] has joined #go-nuts 17:35 -!- boscop [~boscop@f055162139.adsl.alicedsl.de] has quit [Ping timeout: 240 seconds] 17:36 -!- TheSaint [~thesaint@166.205.10.111] has quit [Ping timeout: 255 seconds] 17:40 -!- Kashia [~Kashia@port-92-200-121-2.dynamic.qsc.de] has joined #go-nuts 17:42 -!- noam [noam@IGLD-84-228-74-42.inter.net.il] has quit [Ping timeout: 255 seconds] 17:45 -!- boscop__ [~boscop@g230081104.adsl.alicedsl.de] has joined #go-nuts 17:47 -!- boscop_ [~boscop@f055031177.adsl.alicedsl.de] has quit [Ping timeout: 240 seconds] 17:50 -!- sabalaba [~sabalaba@66.220.12.133] has quit [Ping timeout: 272 seconds] 17:52 < sauerbraten> does go provide key events? 17:53 -!- Tv [~tv@gige.bur.digisynd.com] has joined #go-nuts 17:55 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 264 seconds] 17:55 < wrtp> sauerbraten: if you use the right package, yes 17:56 < wrtp> exp/x11 is one example 17:57 -!- powerje [~powerj@adsl-75-49-3-95.dsl.wotnoh.sbcglobal.net] has joined #go-nuts 17:57 -!- boscop_ [~boscop@f055120010.adsl.alicedsl.de] has joined #go-nuts 18:00 -!- boscop [~boscop@g230081104.adsl.alicedsl.de] has quit [Ping timeout: 264 seconds] 18:01 -!- cco3 [~conley@c-69-181-138-209.hsd1.ca.comcast.net] has quit [Ping timeout: 240 seconds] 18:02 -!- cco3 [~conley@c-69-181-138-209.hsd1.ca.comcast.net] has joined #go-nuts 18:05 -!- noam [noam@77.124.83.75] has joined #go-nuts 18:06 -!- sabalaba [~sabalaba@221.220.254.3] has joined #go-nuts 18:07 -!- cco3 [~conley@c-69-181-138-209.hsd1.ca.comcast.net] has quit [Read error: Operation timed out] 18:10 -!- boscop__ [~boscop@f055130239.adsl.alicedsl.de] has joined #go-nuts 18:12 -!- boscop_ [~boscop@f055120010.adsl.alicedsl.de] has quit [Ping timeout: 240 seconds] 18:12 -!- TheSaint_ [~thesaint@166.205.11.181] has quit [Quit: Colloquy for iPhone - http://colloquy.mobi] 18:16 < exch> For a platform independant solution, I'd probably go with something like SDL 18:16 -!- Axsuul [Axsuul@97-93-99-133.static.mtpk.ca.charter.com] has joined #go-nuts 18:28 < sauerbraten> I thought about modifying scanf or so :D if i do scanf it wait's til i press enter, is there a way to make it wait for the space key? :) 18:28 < sauerbraten> *waits :( 18:30 < sauerbraten> i see, exp/spacewars is played with keys, too :) 18:33 < sauerbraten> mhm can't see any events in there :/ I'm not nerdy enough to understand the code completely :D 18:36 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts 18:36 -!- saschpe [~quassel@opensuse/member/saschpe] has joined #go-nuts 18:38 < sauerbraten> I'd really appreciate it if a skilled programmer would add key events to go, since I'm not good enough :) For example there should be onRelease and onPress and so on 18:39 -!- virtualsue [~chatzilla@nat/cisco/x-dhuyuolriebtmkqg] has quit [Ping timeout: 255 seconds] 18:39 <+iant> it's a really complex area 18:40 <+iant> go programs currently run in a number of different environments 18:42 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|] 18:43 < nsf> well, waiting for a space key isn't that hard 18:43 < nsf> just read stdin 18:43 < nsf> until ' ' byte is received 18:43 < nsf> but no one will write that for you 18:43 < nsf> google.com <- go there and learn 18:43 < nsf> write code 18:43 < nsf> it's easy 18:45 <+iant> that won't get you to the point of onRelease and onPress, though 18:45 < nsf> ah, yes 18:46 < sauerbraten> yes, I just realized I'd like to wait til space key is released :) I want to write a rubik's cube timer, that measures time from releaseing space until pressing it again, you know? I saw go-sdl now, but it seems to be complex to me, are there example codes for it? 18:46 < nsf> basically it's impossible to do it in terminals, unless you want to grab X11 or evdev or whatever events directly :) 18:46 < nsf> (I'm talking about onPress onRelease) 18:47 < nsf> sauerbraten: why do you need it to be a space key, it's just timer.. any key will work 18:47 < nsf> read from from os.Stdin, it will block 18:48 < sauerbraten> yes but with both hands on the cube the space button is easier to release then enter ;) 18:48 < nsf> until there is some kind of input 18:48 < nsf> any key includes space too 18:48 < plexdev> http://is.gd/i6zRT by [Robert Griesemer] in go/ -- A+C: added Jamie Gennis 18:48 < nsf> as far as I remember 18:48 < plexdev> http://is.gd/i6zS4 by [Jamie Gennis] in 2 subdirs of go/src/pkg/go/printer/ -- go/printer: preserve newlines in func parameter lists 18:48 < sauerbraten> is the " " read if i press or release the button? 18:48 < exch> sauerbraten: Hook up a LEGO NeXT robot to solve the cube for you. You can program it to time whatever you want :p 18:48 < nsf> there is no press and release events on the terminals 18:48 < nsf> these are just letters 18:48 < nsf> stream of byte 18:49 < nsf> bytes* 18:49 < sauerbraten> exch: thanks for that idea :D I know the cube stormer, but I don't have a NXT ;) 18:49 -!- TheSaint [~thesaint@166.205.11.181] has joined #go-nuts 18:49 < exch> http://www.botjunkie.com/2010/02/15/cubestormer-lego-mindstorms-rubiks-cube-robot/ <3 18:49 -!- gnuvince_ [~vince@64.235.212.135] has quit [Read error: Operation timed out] 18:51 -!- TheMue [~TheMue@p5DDF7C78.dip.t-dialin.net] has joined #go-nuts 18:51 -!- gnuvince [~vince@70.35.169.73] has quit [Ping timeout: 255 seconds] 18:51 < sauerbraten> I think I'll do it with SDL, i found an example for KeyDown and KeyUp and i think i'm smart enough :) 18:51 < nsf> good luck 18:55 -!- femtoo [~femto@95-89-197-196-dynip.superkabel.de] has quit [Read error: Connection reset by peer] 18:55 -!- saschpe [~quassel@opensuse/member/saschpe] has quit [Remote host closed the connection] 18:56 < nsf> ah! stupid me 18:56 < nsf> now I know why gocode fails to start its daemon on windows 18:56 < nsf> I'm trying to open /dev/null for a child process as stdin/out/err 18:58 -!- gnuvince [~vince@205.189-ppp.3menatwork.com] has joined #go-nuts 18:59 < nsf> on windows /dev/null is called NUL isn't it? 18:59 < TheSeeker> yes 19:00 < nsf> TheSeeker: have you solved that issue? 19:00 < TheSeeker> I had to do something with that to get gocode working here. 19:00 < nsf> I'm reading irc logs right now 19:00 < nsf> looks like it was opening a lot of file descriptors 19:00 < TheSeeker> I also had to comment out the check for unix signals 19:00 -!- TheSaint [~thesaint@166.205.11.181] has quit [Quit: Colloquy for iPhone - http://colloquy.mobi] 19:00 < nsf> I see 19:01 < nsf> well, it makes sense 19:01 < nsf> 00:55 < TheSeeker> goclipse is running gocode "-s" "-sock" "unix" "-addr" 19:01 < nsf> ":37373" 19:01 < nsf> hm.. it should be fixed in goclipse itself 19:01 < TheSeeker> yeah 19:01 < TheSeeker> I changed the default to use tcp instead of unix if on windows. 19:01 < nsf> goclipse should run it like: "gocode -sock tcp -addr <whatever>" 19:02 < nsf> and in that case gocode starts server with the same parameters 19:02 < TheSeeker> goclipse is actually just sending one parameter I think, the rest are defaults 19:02 -!- sauerbraten_ [~sauerbrat@p508CB5EF.dip.t-dialin.net] has joined #go-nuts 19:03 < nsf> I have no idea what goclipse does, never looked at its source code :) 19:03 < TheSeeker> it was easier for me to edit gocode and recompile than try and fix goclipse. 19:04 -!- gnuvince_ [~vince@70.35.164.242] has joined #go-nuts 19:04 < nsf> the point is, no one wants to maintain two versions of gocode 19:04 < TheSeeker> yeah 19:04 -!- sauerbraten [~sauerbrat@p508CF964.dip.t-dialin.net] has quit [Ping timeout: 250 seconds] 19:04 < nsf> I can add a check for OS then 19:04 < nsf> and on windows it will enable tcp by default 19:05 < TheSeeker> want to see my diff and tell me what horrible things I've done wrong? :) 19:05 < nsf> sure 19:06 < nsf> and I'll take a look at goclipse gocode plugin 19:06 < TheSeeker> http://dark-code.bulix.org/pbk3dp-78889 and http://dark-code.bulix.org/bz24rl-78890 19:07 < nsf> the thing is, I don't know java :D I mean at all.. never used it 19:07 < TheSeeker> the only real problem I have now is that (because of my changes?) I have to save the file first in goclipse before getting suggestions, or it won't suggest the right thing. 19:08 < nsf> again, it's not gocode's fault most likely, although it (gocode) assumes few things 19:09 < nsf> 1. it allows you to have unsaved currently editted buffer and client should send it to gocode via stdin or via tmp file 19:09 < TheSeeker> I think that without my changes, on *nix anyway, it sends the current buffer to gocode instead of using the file on disk. 19:09 < nsf> 2. it assumes that other than the currently editted file files are in sync with disk 19:10 -!- ucasano [~ucasano@host153-182-static.227-95-b.business.telecomitalia.it] has quit [Quit: ucasano] 19:10 < nsf> probably there is a misunderstanding with (1) or (2) 19:10 < TheSeeker> On unix it uses a unix socket (file? stdin?) and windows doesn't have that. 19:10 < nsf> no, client uses unix sockets for communication with server 19:10 < nsf> windows has stdin 19:10 < TheSeeker> so the lack of working as expected is almost certainly my own damn fault for not understanding how stuff works :) 19:11 < nsf> no, I'm afraid it's not your fault 19:11 < nsf> let me see the patch 19:11 < nsf> / If in= isn't specified, but a file name is, use the file name! -TheSeeker 19:11 < nsf> that's a bad idea 19:12 -!- skelterjohn [~jasmuth@lawn-gw.rutgers.edu] has quit [Quit: skelterjohn] 19:12 < nsf> because obviously file is out of sync with the buffered version 19:12 < nsf> almost always in the editor 19:12 < nsf> that's why there is separate '-in' parameter 19:12 < nsf> and an option to use stdin for that 19:12 < TheSeeker> well, I couldn't get it to work at all otherwise *shrug* 19:13 < nsf> but that's goclipse's bug 19:13 < TheSeeker> ok 19:13 < nsf> nil FDs are ok 19:13 -!- devrim [~Adium@160.79.7.234] has quit [Quit: Leaving.] 19:14 < nsf> but I don't why it starts gocode server many times 19:14 < nsf> it should do it only once 19:14 < TheSeeker> I think it did work when I used os.Open("NUL") ... but that added lots of extra lines of code for no reason. 19:14 -!- devrim [~Adium@160.79.7.234] has joined #go-nuts 19:14 < nsf> true 19:15 < TheSeeker> the server starting many times might have been due to not having siging/sigterm available on windows? 19:15 -!- devrim [~Adium@160.79.7.234] has quit [Client Quit] 19:15 < nsf> no, gocode doesn't use signals 19:16 < nsf> I've added it for being able to kill gocode through console on linux 19:16 < TheSeeker> then what's this for? 19:16 < TheSeeker> if usig == signal.SIGINT || usig == signal.SIGTERM { 19:16 < TheSeeker> - return 19:16 < TheSeeker> hmm, ok. 19:16 < nsf> well 19:17 < nsf> actually goclipse plugin sends input via stdin 19:17 < nsf> I mean the current buffer 19:17 -!- tumdum [~tumdum@unaffiliated/tumdum] has joined #go-nuts 19:18 -!- devrim [~Adium@160.79.7.234] has joined #go-nuts 19:18 < nsf> I guess I'll have to install Go on windows by myself and make sure everything works as expected 19:20 -!- tumdum [~tumdum@unaffiliated/tumdum] has quit [Client Quit] 19:21 < nsf> ok, I'll try to do it now :) brb, reboot 19:21 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3] 19:24 -!- powerje [~powerj@adsl-75-49-3-95.dsl.wotnoh.sbcglobal.net] has quit [Quit: powerje] 19:26 -!- nsf [c340cb02@gateway/web/freenode/ip.195.64.203.2] has joined #go-nuts 19:30 -!- devrim1 [~Adium@160.79.7.234] has joined #go-nuts 19:30 -!- sauerbraten_ [~sauerbrat@p508CB5EF.dip.t-dialin.net] has quit [Quit: Leaving] 19:31 < wrtp> anyone else been getting GC-related hangups recently? 19:32 -!- devrim [~Adium@160.79.7.234] has quit [Ping timeout: 245 seconds] 19:32 -!- nsf [c340cb02@gateway/web/freenode/ip.195.64.203.2] has quit [Quit: Page closed] 19:33 -!- nsf [c340cb02@gateway/web/freenode/ip.195.64.203.2] has joined #go-nuts 19:33 < wrtp> i'll try and make a test case 19:42 -!- TheSaint [~thesaint@166.205.11.181] has joined #go-nuts 19:42 -!- Project_2501 [~Marvin@82.84.79.101] has quit [Quit: E se abbasso questa leva che succ...] 19:48 < nsf> yay, eclipse works 19:48 -!- ronnyy [~quassel@drsd-4db3194f.pool.mediaWays.net] has joined #go-nuts 19:49 < nsf> now I have to compile the gocode :) 19:49 -!- enherit [~enherit@cpe-98-149-170-48.socal.res.rr.com] has quit [Quit: leaving] 19:49 -!- ronnyy [~quassel@drsd-4db3194f.pool.mediaWays.net] has quit [Remote host closed the connection] 19:51 < nsf> no bash, no make :( 19:51 < nsf> no git 19:52 < nsf> yeah, I guess I'll leave it for tomorrow, anyways.. I will make it work sooner or later, most likely tomorrow 19:53 -!- nsf [c340cb02@gateway/web/freenode/ip.195.64.203.2] has quit [Quit: Page closed] 19:53 -!- nat1192 [9595cde7@gateway/web/freenode/ip.149.149.205.231] has joined #go-nuts 19:54 < nat1192> quick question go-gods 19:54 < nat1192> are there any go books around 19:57 < niemeyer> nat1192: http://tinyurl.com/2cuznn7 19:59 -!- TheSaint [~thesaint@166.205.11.181] has quit [Quit: Colloquy for iPhone - http://colloquy.mobi] 20:03 -!- wrtp [~rog@92.17.51.151] has quit [Ping timeout: 245 seconds] 20:08 -!- powerje [~powerj@adsl-75-49-3-95.dsl.wotnoh.sbcglobal.net] has joined #go-nuts 20:08 -!- wrtp [~rog@92.17.51.151] has joined #go-nuts 20:18 -!- wrtp [~rog@92.17.51.151] has quit [Ping timeout: 272 seconds] 20:21 -!- sauerbraten [~sauerbrat@p508CB5EF.dip.t-dialin.net] has joined #go-nuts 20:23 -!- wrtp [~rog@92.17.51.151] has joined #go-nuts 20:31 -!- tensorpudding [~user@99.148.202.191] has joined #go-nuts 20:35 -!- plainhao [~plainhao@208.75.85.237] has quit [Quit: plainhao] 20:35 < plexdev> http://is.gd/i6Ngr by [Robert Griesemer] in go/doc/ -- go_spec: fixed a couple omissions/type errors 20:40 < sauerbraten> what type should I use if I want to do something like 2 dimensional arrays in java? 20:40 -!- Scorchin [~Scorchin@host109-152-112-138.range109-152.btcentralplus.com] has joined #go-nuts 20:41 -!- bortzmeyer [~stephane@central.sources.org] has quit [Quit: Leaving.] 20:46 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts 20:47 -!- virtualsue [~chatzilla@nat/cisco/x-rjcfhkaeddqsrxxm] has joined #go-nuts 20:48 < exch> Go doesnt have > 1 dimensional arrays. You'll need arrays of arrays: var arr [][]int 20:49 < exch> Initializing it requires a loop: arr = make([][]int, x); for i := range arr { arr[i] = make([]int, y) } 20:50 < wrtp> or you could make one []int array and make the outer array point to slices of it, which may take less overall space. 20:52 -!- Eridius [~kevin@unaffiliated/eridius] has joined #go-nuts 20:57 -!- vegai [vegai@archlinux/developer/vegai] has quit [Read error: Operation timed out] 20:57 < sauerbraten> like an "[10]int innerArray "and "[2]*[]int outerArray" and "outerArray[0] = [0:5]innerArray" and "outerArray[1] = [5:10]innerArray"? 20:59 -!- vegai [vegai@archlinux/developer/vegai] has joined #go-nuts 21:02 -!- bmizerany [~bmizerany@208.66.27.62] has joined #go-nuts 21:11 < sauerbraten> is it possible to create maps in maps? 21:12 < exch> yes 21:12 < niemeyer> sauerbraten: make(map[string]map[string]map[string]string) 21:13 < sauerbraten> lol ok 21:13 < sauerbraten> thanks 21:18 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has quit [Read error: Operation timed out] 21:18 -!- Cyprien_ [~Cyprien@53-190.3-85.cust.bluewin.ch] has joined #go-nuts 21:20 -!- zozoR [~zozoR@5634798d.rev.stofanet.dk] has quit [Quit: Morten. Desu~] 21:23 -!- TheSaint [~thesaint@166.205.11.181] has joined #go-nuts 21:24 -!- CodeWar [~CodeWar@c-24-23-206-137.hsd1.ca.comcast.net] has joined #go-nuts 21:25 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has joined #go-nuts 21:33 -!- g0bl1n [~g0blin@a213-22-18-58.cpe.netcabo.pt] has quit [Quit: g0bl1n] 21:34 -!- ville- [~ville@a107.ath.cx] has quit [Ping timeout: 250 seconds] 21:34 -!- ville- [~ville@a107.ath.cx] has joined #go-nuts 21:39 -!- emjayess [~emjayess@pix1.i29.net] has quit [Quit: Leaving] 21:40 -!- nat1192 [9595cde7@gateway/web/freenode/ip.149.149.205.231] has quit [Ping timeout: 265 seconds] 21:42 -!- TheSaint [~thesaint@166.205.11.181] has quit [Quit: Colloquy for iPhone - http://colloquy.mobi] 21:44 -!- nigelkerr [~nigelkerr@jstormichfw.jstor.org] has quit [Quit: nigelkerr] 21:51 < CodeWar> hmm I was hoping to bore folks with discussions about GC in Go :-) mainly is there a way to manually manage certain chunks of memory (or will there be in the future) 21:54 < |Craig|> CodeWar: you can allocate an array, and put stuff in it yourself. Thats manually managed memory right? 21:54 < |Craig|> CodeWar: if you want to get really messy, you can make a byte array, and do non type safe actions on ut using the unsafe package 21:55 < CodeWar> your first option would make the GC skip those references each time because its held in an array ? 21:56 < |Craig|> CodeWar: if you put stuff in an array by value, not by pointer, there isnt anything for the GC to do. 21:57 < CodeWar> in my dreams I would have hoped for something like this :-) varName = My.new( TypeName ) where My is a self written heap and references coming from it are ignored by GC roots 21:58 -!- skejoe [~skejoe@188.114.142.162] has joined #go-nuts 21:58 < CodeWar> |Craig|, can you elaborate on the array by value part ... what would the allocation sequence look like 21:59 < |Craig|> CodeWar: if you have an array of structs, they will not get garbage collected, theres nothing for the GC to do to them. 21:59 < |Craig|> its just a big block of memory you can put stuff in 22:00 < CodeWar> I dont follow .. you ll allocate an object then copy by value to add to the array? or allocate a chunk out of the array and cast it ? 22:01 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Ping timeout: 250 seconds] 22:01 < |Craig|> CodeWar: unless you use unsafe, you can't cast untyped chunks of memory 22:02 < CodeWar> |Craig|, and I would much rather not do that either .. anyways this is trying to beat the language .. has this ever come up or folks are prefectly happy letting GC manage everything for them 22:02 < |Craig|> CodeWar: Why are you trying to do this? 22:03 < CodeWar> |Craig|, long argument but in a nutshell I know the allocation / free patterns of certain objects and I would love to take the pressure off the GC scanning objects try this 22:04 < |Craig|> CodeWar: but whats your usecase? Specifically why are you trying to do where manual memory management would be better that you can't do? 22:04 < CodeWar> in a different language currently I queue some objects and they get processed asynchronously .. now this particular queue can fill up quite fast if the consumer is slow .. I dont want this heap to pollute the main heap meaning 22:04 < CodeWar> if this heap takes up 2G and another producer says thisheap.new(1K) make him sleep not provide more memory or OOME 22:05 < |Craig|> CodeWar: you can write your queue items by value into some something like a unrolled linked list 22:05 -!- araujo [~araujo@190.38.50.25] has joined #go-nuts 22:05 -!- araujo [~araujo@190.38.50.25] has quit [Changing host] 22:05 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts 22:05 < CodeWar> am I reading correctly theres an allocate step and an explicit copy by value step? 22:05 < |Craig|> then the garbage collector only deals with the arrays of items, not the items themselves 22:06 < |Craig|> CodeWar: perhaps, or maybe the optimizer is smart enough to just create the object on place, or you can just update the previous/zero value thats already inplace 22:06 < CodeWar> |Craig|, good this is worth exploring for me then ... I would have hoped to take this a bit further with language support .. certain types of objects that the language is aware of such that 22:07 < |Craig|> CodeWar: lets use the simple example of an array of ints, ints are like a nice simple struct. Is it a big GC load? no. If there a huge copy overhead? no 22:07 < CodeWar> GC scanners simply dont look for child references in that object but that object itself can be GCed much like you said here 22:07 < plexdev> http://is.gd/i6Ziy by [Andrew Gerrand] in go/doc/ -- doc: add Practical Go Programming to front page and docs.html 22:09 < CodeWar> |Craig|, I understand the example you re citing just that for real life usage you would much rather want more complicated and perhaps large types and doing an explicit copy is a worry .. 22:09 -!- skejoe [~skejoe@188.114.142.162] has quit [Quit: Lost terminal] 22:09 < CodeWar> you mentioned something about the optimizer knowing things and that gives me hope 22:10 < |Craig|> CodeWar: here is a generic by value storage system that does something like you would want (it does stacks and iteration, and some removes, but not queuing, so its not totally what you want): https://github.com/Craig-Macomber/Grains--Vegetarian-Zombie-Rising/blob/master/Server/iterBag.got 22:10 < |Craig|> I wrote it, and I won't say its great, but it does work 22:11 < |Craig|> Its designed to store structs by value, and return pointers to them 22:12 < |Craig|> it explicitly keeps track of what portion of its arrays have data vs unused (which is kinda the manual memory magement you wanted) 22:12 < CodeWar> how are the structs allocated to begin with 22:13 < |Craig|> CodeWar: I create an array of them, which is implicitly filled with zero values structs 22:13 < |Craig|> potentially you could modify those rather than copy new ones over them 22:13 < CodeWar> interesting so thats your heap so to speak 22:14 < |Craig|> no, its an unrolled linked list 22:14 < |Craig|> any time you make an array its filled with zero values. It just so happens that the zero value for a pointer is null 22:14 < CodeWar> my go skills are pre elementary at best ... remind me struct_type_a [] is a single reference? 22:14 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 265 seconds] 22:15 -!- sauerbraten [~sauerbrat@p508CB5EF.dip.t-dialin.net] has quit [Remote host closed the connection] 22:16 < |Craig|> CodeWar: I'm not sure what you mean by that 22:16 < CodeWar> never mind I get the hang of things I think its worth exploring thanks for the headstart 22:17 -!- powerje [~powerj@adsl-75-49-3-95.dsl.wotnoh.sbcglobal.net] has quit [Quit: powerje] 22:32 -!- photron [~photron@port-92-201-120-127.dynamic.qsc.de] has quit [Ping timeout: 264 seconds] 22:35 -!- powerje [~powerj@75.49.3.95] has joined #go-nuts 22:37 -!- rlab [~Miranda@91.200.158.34] has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org] 22:37 -!- DarthShrine [~angus@60-242-109-62.tpgi.com.au] has joined #go-nuts 22:37 -!- DarthShrine [~angus@60-242-109-62.tpgi.com.au] has quit [Changing host] 22:37 -!- DarthShrine [~angus@pdpc/supporter/student/DarthShrine] has joined #go-nuts 22:39 -!- Mutt765 [4b635d3a@gateway/web/freenode/ip.75.99.93.58] has joined #go-nuts 22:43 -!- krutcha [~krutcha@remote.icron.com] has joined #go-nuts 22:45 -!- Mutt765 [4b635d3a@gateway/web/freenode/ip.75.99.93.58] has left #go-nuts [] 22:47 -!- soapy_illusions [~alex@vpn128031.Wireless.McGill.CA] has joined #go-nuts 22:48 < soapy_illusions> Was wondering if anyone had a minute to give me a hand parsing JSON in my code I have included all the important parts here: http://pastebin.com/5tAAn91D 22:50 -!- CodeWar [~CodeWar@c-24-23-206-137.hsd1.ca.comcast.net] has quit [Quit: Leaving] 22:52 -!- TheMue [~TheMue@p5DDF7C78.dip.t-dialin.net] has quit [Quit: TheMue] 22:54 -!- Wiz126 [Wiz@h62.126.232.68.ip.windstream.net] has quit [Ping timeout: 245 seconds] 22:58 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has quit [Ping timeout: 265 seconds] 22:59 -!- Cyprien_ [~Cyprien@53-190.3-85.cust.bluewin.ch] has quit [Ping timeout: 240 seconds] 23:04 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has joined #go-nuts 23:07 -!- virtualsue [~chatzilla@nat/cisco/x-rjcfhkaeddqsrxxm] has quit [Quit: ChatZilla 0.9.86 [Firefox 3.5.15/20101026200251]] 23:09 -!- Oejet [~oejet@212.45.122.120] has quit [Ping timeout: 250 seconds] 23:15 -!- skelterjohn [~jasmuth@c-76-98-219-171.hsd1.pa.comcast.net] has joined #go-nuts 23:20 -!- TheSaint [~thesaint@166.205.11.181] has joined #go-nuts 23:22 -!- akavel [4dff73bb@gateway/web/freenode/ip.77.255.115.187] has joined #go-nuts 23:22 -!- Cyprien_ [~Cyprien@53-190.3-85.cust.bluewin.ch] has joined #go-nuts 23:34 -!- TheSaint [~thesaint@166.205.11.181] has quit [Quit: Colloquy for iPhone - http://colloquy.mobi] 23:39 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit: Verlassend] 23:45 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts 23:49 < krutcha> yay, got my go-jabber client pulling vcard photos properly, stupid base64 newline/xml issues were the problem 23:51 -!- rodpar07 [~rodpar07@host-9-57.a9.cmm.com.py] has joined #go-nuts 23:52 < rodpar07> Hi everyone. I'm using go in a college project and I'm having some issues. Is this the right place to ask for help? 23:52 < nictuku> yes 23:53 -!- path[l] [~path@59.162.86.164] has quit [Quit: path[l]] 23:53 < rodpar07> Thanks nictuku. I'm using the WriteFile function from the iuotil package. 23:54 -!- wrtp [~rog@92.17.51.151] has quit [Quit: wrtp] 23:54 < rodpar07> Its second argument is an uint32 that's used as permissions to create a new file in case it doesn't exist 23:55 < rodpar07> what are the numbers that represent each permission? 23:55 < rodpar07> all i can get is a read permission using 0 23:55 < rodpar07> and a no read no write permission using 1 or 2 23:55 < nsf> bits are the same as unix file permissions bits 23:55 < DarthShrine> I believe they're here: http://golang.org/pkg/os/#Constants 23:56 < nsf> http://www.zzee.com/solutions/unix-permissions.shtml 23:56 < nsf> typical one: 0644 - owner rw, group r, others r 23:56 < nictuku> rodpar07, listen to what the guys said. Try 0640 as an example 23:57 < nsf> note that octal number literal starts with zero 23:58 < skelterjohn> you would use: os.O_WRONLY | os.O_CREATE 23:58 < skelterjohn> for instance 23:58 < nsf> skelterjohn: it's not mode 23:58 < nsf> it's permissions 23:58 < skelterjohn> oh 23:58 < skelterjohn> i should read more 23:59 -!- DarthShrine [~angus@pdpc/supporter/student/DarthShrine] has left #go-nuts [] 23:59 -!- kanru [~kanru@2001:c08:3700:ffff::1c:bc25] has joined #go-nuts --- Log closed Fri Dec 03 00:00:06 2010