--- Log opened Tue Aug 17 00:00:05 2010 00:29 -!- jcao219 [~Jimmy_Cao@124.126.202.17] has joined #go-nuts 00:39 -!- kdvh [~kdvh@unaffiliated/kdvh] has joined #go-nuts 00:40 -!- kdvh [~kdvh@unaffiliated/kdvh] has left #go-nuts [] 00:43 -!- tsykoduk [~tsykoduk@c-71-231-155-70.hsd1.or.comcast.net] has quit [Ping timeout: 276 seconds] 00:44 -!- tsykoduk [~tsykoduk@184.78.195.79] has joined #go-nuts 00:47 -!- photron [~photron@port-92-201-181-118.dynamic.qsc.de] has quit [Ping timeout: 276 seconds] 01:00 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined #go-nuts 01:04 -!- carllerche [~carllerch@enginey-9.border1.sfo002.pnap.net] has quit [Quit: carllerche] 01:10 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has joined #go-nuts 01:12 -!- bettiah [~me@58.35.63.110] has quit [Ping timeout: 276 seconds] 01:12 -!- bettiah [~me@64.120.55.51] has joined #go-nuts 01:14 -!- jA_cOp [~yakobu@unaffiliated/ja-cop/x-9478493] has joined #go-nuts 01:21 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Remote host closed the connection] 01:23 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined #go-nuts 01:27 -!- carllerche [~carllerch@208.87.61.203] has joined #go-nuts 01:33 -!- kkress [~kkress@c-65-49-35-49.tilenetworks.com] has quit [Ping timeout: 260 seconds] 01:33 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Ping timeout: 240 seconds] 01:35 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Remote host closed the connection] 01:37 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined #go-nuts 01:38 -!- mikespook [~mikespook@219.137.254.148] has joined #go-nuts 01:38 -!- Xenith [~xenith@173-228-72-4.dsl.static.sonic.net] has joined #go-nuts 01:39 -!- kkress [~kkress@c-65-49-35-49.tilenetworks.com] has joined #go-nuts 01:41 < plexdev> http://is.gd/ekTje by [Alex Brainman] in go/src/pkg/os/ -- os: preserve "=C:" like env variables in env block on windows and bug fix in Clearenv() 01:44 -!- qIIp [~qIIp@134.29.57.72] has quit [Ping timeout: 276 seconds] 01:46 -!- jhawk28 [~jhawk28@c-75-69-37-150.hsd1.vt.comcast.net] has joined #go-nuts 01:46 -!- napsy [~luka@212.235.174.112] has quit [Ping timeout: 276 seconds] 01:53 -!- artefon [~thiago@189.107.155.106] has quit [Quit: bye] 01:55 -!- jcao219 [~Jimmy_Cao@124.126.202.17] has quit [Quit: Leaving.] 02:09 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Quit: No Ping reply in 180 seconds.] 02:17 -!- fenicks [~christian@log77-3-82-243-254-112.fbx.proxad.net] has left #go-nuts [] 02:19 -!- bettiah [~me@64.120.55.51] has quit [Ping timeout: 260 seconds] 02:19 -!- jcao219 [~Jimmy_Cao@124.126.202.17] has joined #go-nuts 02:21 -!- bettiah [~me@64.120.55.155] has joined #go-nuts 02:22 -!- Nick_B__ [ca318819@gateway/web/freenode/ip.202.49.136.25] has joined #go-nuts 02:25 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined #go-nuts 02:29 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Read error: Connection timed out] 02:30 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts 02:32 -!- jcao219 [~Jimmy_Cao@124.126.202.17] has quit [Quit: Leaving.] 02:37 -!- jhawk28 [~jhawk28@c-75-69-37-150.hsd1.vt.comcast.net] has quit [Remote host closed the connection] 02:40 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Remote host closed the connection] 02:46 -!- bettiah [~me@64.120.55.155] has quit [Ping timeout: 240 seconds] 02:47 -!- napsy [~luka@212.235.174.112] has joined #go-nuts 02:49 -!- bettiah [~me@58.35.63.110] has joined #go-nuts 02:49 -!- wobsite [~wobsite@pool-96-237-162-24.bstnma.fios.verizon.net] has joined #go-nuts 02:57 -!- jcao219 [~Jimmy_Cao@124.126.202.17] has joined #go-nuts 02:58 < wobsite> hey everyone. I'm trying to figure out cgo, and having some trouble with getting C code to call Go code. specifically, I have a C function that expects a function pointer (no return value or arguments to the pointer) and I want to be able to pass a Go function to it. 02:58 < wobsite> has anyone had any luck with something like this? 03:02 -!- skelterjohn [~jasmuth@c-76-116-182-139.hsd1.nj.comcast.net] has joined #go-nuts 03:02 < Namegduf> wobsite: You can't. 03:02 < Namegduf> C code can't call Go code. 03:03 -!- rejb [~rejb@unaffiliated/rejb] has quit [Ping timeout: 276 seconds] 03:03 < exch> you can, but it involves a lot of black magic and not really any guarantee that it'll work as intended 03:04 < exch> prefix the Go function you want to export with //export foo 03:04 < exch> where 'foo' is the name you want it to be callable as 03:05 < wobsite> yeah, I saw something like that in the source tree somewhere. couldn't quite figure out what to make of it though 03:05 < wobsite> I'll try that. thanks 03:07 < zaero> I was able to make Go functions callable through lua doing some black magic like that 03:08 < zaero> i had a helper function in both C and Go to make it work 03:08 < exch> zaero: was the performance somewhat acceptable? 03:09 < zaero> i never profiled it, it was just a toy 03:09 < exch> k 03:15 -!- nighty^ [~nighty@210.188.173.245] has joined #go-nuts 03:23 -!- crazy2be [~crazy2be@S0106001ac401d400.cg.shawcable.net] has joined #go-nuts 03:23 < crazy2be> hello 03:24 -!- Xurix [~Luixsia@AToulouse-254-1-30-111.w81-250.abo.wanadoo.fr] has quit [Quit: Leaving] 03:24 < exch> lo 03:24 < crazy2be> I am trying to get the exit status of a script i am executing using go 03:28 < crazy2be> is there a prefered pastebin used by this channel? 03:28 < crazy2be> or does anywhere work :P? 03:28 < exch> anywhere is ok :p 03:29 < crazy2be> ok, so i have a function like this to run my bash script: http://pastebin.com/iaEyxZTt 03:29 < crazy2be> most of that is just for debugging 03:29 < crazy2be> well the ff shouldn't be there 03:29 < crazy2be> that was just to make the compile script fail 03:29 < crazy2be> but anyway 03:30 < crazy2be> uh 03:30 < crazy2be> well 03:30 < crazy2be> it's working now? 03:30 < crazy2be> wierd 03:30 < crazy2be> well thansk 03:30 < crazy2be> *thanks 03:30 < exch> np :p 03:31 < crazy2be> but uh, i have another question. 03:32 < crazy2be> this is basically a handler for part of an administration interface for my server 03:32 < crazy2be> and it recompiles the go code, and then restarts the server 03:32 < crazy2be> how can i run the server, and make sure it starts properly, before exiting? 03:34 < exch> having the program launch itself with os.Exec() should work. Just make sure the http listener is closed. It's bound to a fixed port. Launching the server again on that same port will make it fail 03:35 < crazy2be> ok, so i have to close the http listener, wait a reasonable amount of time, make sure the program is operational, and then shut down? 03:35 < crazy2be> and if it's not, i restore the listener 03:35 < exch> that could work 03:35 < crazy2be> now to see if that's possible, easily 03:35 < exch> during that time, the server will be unreachable though 03:37 < exch> os.Exec or os.ForkExec will give you the new pid or an error if things went wrong 03:38 < crazy2be> yeah, although the os package documentation is a bit confusing for someone not entirely familiar with unix system internals 03:38 < crazy2be> overall go is very well documented though 03:39 < exch> the syscall package even more so :) 03:39 < xb95> the code is remarkably self documenting too 03:39 < xb95> easy to read and follow 03:39 < exch> yup 03:46 -!- wobsite [~wobsite@pool-96-237-162-24.bstnma.fios.verizon.net] has quit [Quit: Leaving] 03:49 -!- path[l] [UPP@120.138.102.50] has joined #go-nuts 03:49 -!- tensorpuddin [~user@99.160.223.189] has joined #go-nuts 03:50 -!- tensorpudding [~user@99.70.198.165] has quit [Disconnected by services] 03:50 -!- tensorpuddin [~user@99.160.223.189] has quit [Remote host closed the connection] 03:51 -!- tensorpudding [~user@99.160.223.189] has joined #go-nuts 03:53 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit: This computer has gone to sleep] 03:53 < crazy2be> i'm just waiting for some opengl/graphical bindings 03:53 < crazy2be> that would be nice 03:53 < exch> there are sdl/opengl bindings 03:53 -!- carllerche [~carllerch@208.87.61.203] has quit [Quit: carllerche] 03:54 < exch> http://go-lang.cat-v.org/library-bindings 03:55 < crazy2be> hey! they were not there last time i checked 03:56 < crazy2be> how does it deal with multithreading and such? 03:57 < exch> it probably doesn't. Not sure tbh. I haven't tried that yet 03:58 < crazy2be> huh. Looks like it just calls the C functions 03:59 < crazy2be> don't really understand *how* 04:00 < exch> yes. it uses cgo. a 'special' compiler part of the Go toolchain that allows calling C code by linking to a shared library 04:00 < crazy2be> gccgo? 04:00 < crazy2be> or is cgo different? 04:00 < exch> nope, cgo 04:00 < exch> gccgo is just a gcc frontend for compiling regular go code 04:01 < crazy2be> yes, but it allowed linking with C programs i thought 04:01 < crazy2be> what is cgo? 04:01 < crazy2be> i didn't see it in any of the documentation 04:01 < exch> it's not very well documented 04:01 < exch> it's in $GOROOT/bin 04:02 < exch> along with the other compilers/linkers 04:02 < jessta> crazy2be: http://golang.org/cmd/cgo/ 04:03 < exch> it basically creates behind-the-scenes interop code which it auto-generates from your Go files and then makes sure both the normal go compiler and gcc get called to build everything into a single neat package 04:07 < crazy2be> cool. That makes bindings to existing C libraries fairly easy 04:07 < crazy2be> although unsafe, since i assume it doesn't make it thread safe 04:07 < crazy2be> somehow 04:08 < exch> it doesn't. There's also the issue of Go having a GC which can gobble up data that C expects to have around. I havent run into any problems with that yet, but it's worth keeping that in mind 04:09 < exch> Any data you create through C calls (malloc() etc) should also be free()'d explicitely. Go won't do that for you 04:11 < crazy2be> hmm 04:12 < crazy2be> i've having trouble figuring out how to shut down the server 04:12 < crazy2be> without writing my own server 04:12 < crazy2be> right now it's using the DefaultServerMux 04:12 < crazy2be> *DefaultServeMux 04:18 -!- crazy2be1 [~justin@S0106001ac401d400.cg.shawcable.net] has joined #go-nuts 04:18 -!- crazy2be [~crazy2be@S0106001ac401d400.cg.shawcable.net] has left #go-nuts [] 04:20 -!- crazy2be1 [~justin@S0106001ac401d400.cg.shawcable.net] has left #go-nuts [] 04:21 -!- crazy2be [~justin@S0106001ac401d400.cg.shawcable.net] has joined #go-nuts 04:39 -!- tsykoduk [~tsykoduk@184.78.195.79] has quit [Ping timeout: 276 seconds] 04:44 < plexdev> http://is.gd/el5qT by [Robert Griesemer] in 3 subdirs of go/src/pkg/ -- gofmt: do not modify multi-line string literals 04:45 -!- tsykoduk [~tsykoduk@c-71-231-155-70.hsd1.wa.comcast.net] has joined #go-nuts 04:46 -!- napsy [~luka@212.235.174.112] has quit [Ping timeout: 240 seconds] 04:48 -!- smw [~stephen@pool-71-183-88-124.nycmny.fios.verizon.net] has joined #go-nuts 05:02 -!- smw [~stephen@pool-71-183-88-124.nycmny.fios.verizon.net] has quit [Ping timeout: 265 seconds] 05:03 -!- scm [justme@c133168.adsl.hansenet.de] has quit [Ping timeout: 265 seconds] 05:04 -!- scm [justme@d070229.adsl.hansenet.de] has joined #go-nuts 05:12 -!- zozoR [~zozoR@x1-6-00-0e-2e-a3-e0-23.k377.webspeed.dk] has joined #go-nuts 05:12 -!- jcao219 [~Jimmy_Cao@124.126.202.17] has quit [Ping timeout: 255 seconds] 05:14 -!- jcao219 [~Jimmy_Cao@124.126.149.222] has joined #go-nuts 05:15 -!- jcao219 [~Jimmy_Cao@124.126.149.222] has quit [Client Quit] 05:27 -!- sacho [~sacho@95-42-124-149.btc-net.bg] has quit [Quit: Ex-Chat] 05:31 -!- smw [~stephen@pool-71-183-88-124.nycmny.fios.verizon.net] has joined #go-nuts 05:33 -!- mikespook [~mikespook@219.137.254.148] has quit [Read error: Connection reset by peer] 05:33 -!- mikespook [~mikespook@219.137.254.148] has joined #go-nuts 05:34 -!- mikespook [~mikespook@219.137.254.148] has quit [Client Quit] 05:39 < crazy2be> well, it doesn't quite work optimally, since it doesn't ensure the new program starts correctly 05:40 < crazy2be> but i can provide an emergency interface on another port 05:40 < crazy2be> by just adding http.ListenAndServer(":8081", nil) to the end of my main funciton 05:42 -!- slackstation [~eman@adsl-69-231-151-35.dsl.irvnca.pacbell.net] has joined #go-nuts 05:42 -!- mikespook [~mikespook@219.137.254.148] has joined #go-nuts 05:48 -!- napsy [~luka@212.235.174.112] has joined #go-nuts 05:50 -!- crazy2be [~justin@S0106001ac401d400.cg.shawcable.net] has left #go-nuts [] 05:52 < slackstation> Maybe it's just me but, for a language that speaks about simplicity, Go's syntax kinda makes my brain hurt. Is it just the years of C and C++ that make Go look that way? 05:53 < smw> what about go syntax is hard? 05:56 < nelson> no semicolons? 05:57 < vegai> the reversed ordering of types? 05:57 < nelson> required braces (although I'd have gone with Python's indenting scheme) 05:57 < smw> The named return variables? 05:57 < nelson> := initializing declaration? 05:57 < vegai> make & new? 05:58 < nelson> having to name imported packages inside braces AND quotes? 05:58 < slackstation> more the shape of things from reading the docs for 30 minutes. 05:58 < smw> oh, it must be the semi object like system . 05:59 < slackstation> I'm sure it'll seem natural soon enough but, it's just feels... strange. 05:59 < smw> It seems alot like C to me... 06:00 < slackstation> " s := sum(&[3]int{1,2,3})" that just seems very dense to me 06:00 < nelson> you can put spaces in there. 06:00 < smw> that is very dense... 06:01 < smw> so, don't do that lol 06:02 < smw> slackstation, I can make dense code in almost any language 06:05 < slackstation> It's a strange mix. I expect dynamic languages to be pretty dense for scripting but, I can't imagine that for staticly typed, production code of some sort; I like that c++ and java are verbose because it kinda makes a meta-narative, meta-comments on the code to give you a clue on what's going on. That line would be me looking at that code trying to make heads and tails of it for a while. 06:06 < smw> slackstation, i can make dense C code too 06:06 < smw> slackstation, what you gave could have been broken up. 06:06 < slackstation> yes, but that code snippet is from the intro docs on golang.org 06:07 < nelson> I called it! 06:07 < nelson> oh, wait, I didn't. I just thought about saying "I'll bet that example is in the tutorial". 06:07 < smw> well, that is because they don't feel like making the tutorial too long :-P 06:08 < slackstation> smw: sometimes the shortcut is the longest way there 06:08 < slackstation> Here, it's taking me longer to understand even if it's shorter to write. 06:08 < nelson> The trouble is that they're trying to simplify by giving the slice function against a constant. 06:09 < smw> slackstation, it does not take long working with go to understand that... 06:09 -!- Nick_B__ [ca318819@gateway/web/freenode/ip.202.49.136.25] has quit [Ping timeout: 252 seconds] 06:09 < nelson> but you would never EVER do that in reality. 06:09 < nelson> consequently, it's a bad example. Just set the variable and deal with it .... 06:09 -!- rickard2 [rickard@v-412-ostermalm-206.bitnet.nu] has quit [Ping timeout: 265 seconds] 06:09 -!- path[l] [UPP@120.138.102.50] has quit [Read error: Connection reset by peer] 06:10 -!- tgall_foo [~tgall@gentoo/developer/dr-who] has quit [Ping timeout: 260 seconds] 06:10 -!- slpsys_ [~marc@209-20-75-46.slicehost.net] has joined #go-nuts 06:10 -!- kevinwat1 [kevin@59-125-147-75.HINET-IP.hinet.net] has joined #go-nuts 06:10 -!- path[l] [UPP@120.138.102.50] has joined #go-nuts 06:10 -!- bettiah_ [~me@58.35.63.110] has joined #go-nuts 06:10 -!- forgey [brook@seahawk.ript.net] has quit [Ping timeout: 240 seconds] 06:11 -!- forgey [brook@seahawk.ript.net] has joined #go-nuts 06:11 -!- rotorooter [~roto@64.79.202.154] has joined #go-nuts 06:12 -!- bettiah [~me@58.35.63.110] has quit [Ping timeout: 264 seconds] 06:12 -!- slpsys [~marc@209-20-75-46.slicehost.net] has quit [Ping timeout: 264 seconds] 06:12 -!- kevinwatt [kevin@59-125-147-75.HINET-IP.hinet.net] has quit [Ping timeout: 264 seconds] 06:12 -!- roto [~roto@64.79.202.154] has quit [Ping timeout: 264 seconds] 06:13 -!- tvw [~tv@e176004102.adsl.alicedsl.de] has joined #go-nuts 06:14 < slackstation> nelson, smw: I agree. Go could learn alot from the Ruby and Rails docs in that they are simple, straight-forward and get you going on code you might actually use after the tutorial. 06:14 < nelson> RoR turned me off on Ruby. 06:15 < nelson> errrr, that would be better said: RoR turned me off Ruby. 06:16 -!- rickard2 [rickard@v-412-ostermalm-206.bitnet.nu] has joined #go-nuts 06:24 -!- bettiah_ [~me@58.35.63.110] has quit [Ping timeout: 240 seconds] 06:31 -!- sacho [~sacho@213.91.244.15] has joined #go-nuts 06:34 -!- tvw [~tv@e176004102.adsl.alicedsl.de] has quit [Remote host closed the connection] 06:34 -!- zozoR [~zozoR@x1-6-00-0e-2e-a3-e0-23.k377.webspeed.dk] has quit [Quit: Morten. Desu~] 06:43 -!- smw [~stephen@pool-71-183-88-124.nycmny.fios.verizon.net] has quit [Quit: Leaving] 06:47 -!- ikaros [~ikaros@dslb-084-059-076-150.pools.arcor-ip.net] has joined #go-nuts 07:00 -!- ronnyy [~quassel@p4FF1D4A3.dip.t-dialin.net] has joined #go-nuts 07:04 -!- saschpe [~quassel@mgdb-4d0cf834.pool.mediaWays.net] has joined #go-nuts 07:06 -!- chressie [~chressie@dreggn.in-ulm.de] has quit [Ping timeout: 276 seconds] 07:07 -!- chressie [~chressie@dreggn.in-ulm.de] has joined #go-nuts 07:12 -!- tgall_foo [~tgall@gentoo/developer/dr-who] has joined #go-nuts 07:14 -!- chressie [~chressie@dreggn.in-ulm.de] has quit [Ping timeout: 240 seconds] 07:15 -!- chressie [~chressie@dreggn.in-ulm.de] has joined #go-nuts 07:19 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts 07:27 -!- bettiah [~me@58.35.49.248] has joined #go-nuts 07:40 -!- ikaros [~ikaros@dslb-084-059-076-150.pools.arcor-ip.net] has quit [Quit: Leave the magic to Houdini] 07:48 -!- path[l] [UPP@120.138.102.50] has quit [Quit: path[l]] 07:48 -!- virtualsue [~chatzilla@nat/cisco/x-tueiybeigjcahcxf] has joined #go-nuts 07:48 -!- napsy [~luka@212.235.174.112] has quit [Ping timeout: 265 seconds] 07:50 -!- ExtraSpice [~XtraSpice@88.118.32.225] has joined #go-nuts 07:54 -!- Fish-Work [~Fish@86.65.182.207] has quit [Ping timeout: 276 seconds] 08:06 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts 08:07 -!- rinzai [~rinzai@host81-129-151-115.range81-129.btcentralplus.com] has joined #go-nuts 08:09 -!- rinzai [~rinzai@host81-129-151-115.range81-129.btcentralplus.com] has quit [Client Quit] 08:14 -!- boscop_ [~boscop@f055155183.adsl.alicedsl.de] has joined #go-nuts 08:15 -!- path[l] [~path@122.182.0.38] has joined #go-nuts 08:17 -!- path[l] [~path@122.182.0.38] has quit [Client Quit] 08:17 -!- boscop [~boscop@f055012076.adsl.alicedsl.de] has quit [Ping timeout: 265 seconds] 08:20 -!- path[l] [~path@59.162.86.164] has joined #go-nuts 08:29 -!- path[l] [~path@59.162.86.164] has quit [Read error: Connection reset by peer] 08:29 -!- path[l] [~path@122.182.0.38] has joined #go-nuts 08:31 -!- napsy [~luka@212.235.174.112] has joined #go-nuts 08:32 -!- ronnyy [~quassel@p4FF1D4A3.dip.t-dialin.net] has quit [Read error: Operation timed out] 08:35 -!- chressie [~chressie@dreggn.in-ulm.de] has quit [Ping timeout: 245 seconds] 08:41 -!- visof [~visof@unaffiliated/visof] has joined #go-nuts 08:41 -!- visof [~visof@unaffiliated/visof] has quit [Read error: Connection reset by peer] 08:42 -!- visof [~visof@unaffiliated/visof] has joined #go-nuts 08:47 -!- ronnyy [~quassel@p4FF1D4A3.dip.t-dialin.net] has joined #go-nuts 08:48 -!- slackstation_ [~eman@adsl-69-231-151-35.dsl.irvnca.pacbell.net] has joined #go-nuts 08:49 -!- chressie [~chressie@dreggn.in-ulm.de] has joined #go-nuts 08:50 -!- slackstation [~eman@adsl-69-231-151-35.dsl.irvnca.pacbell.net] has quit [Ping timeout: 246 seconds] 09:20 -!- ronnyy [~quassel@p4FF1D4A3.dip.t-dialin.net] has quit [Remote host closed the connection] 09:22 -!- path[l] [~path@122.182.0.38] has quit [Quit: path[l]] 09:24 -!- chressie [~chressie@dreggn.in-ulm.de] has left #go-nuts ["WeeChat 0.3.3"] 09:25 -!- path[l] [~path@59.162.86.164] has joined #go-nuts 09:30 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has quit [Quit: WeeChat 0.3.2] 09:33 -!- path[l] [~path@59.162.86.164] has quit [Quit: path[l]] 09:35 < nsf> ugh.. next go release will be very painful 09:35 < nsf> http://groups.google.com/group/golang-dev/browse_thread/thread/8d5342fc17584fa4 09:35 < nsf> my apps rely on these env vars :( 09:36 < rsaarelm> That's pretty big... 09:36 < rsaarelm> Ah, it's all build files. 09:37 < nsf> the problem is that GOROOT and GOOS and GOARCH will not be available for ordinary apps 09:37 < nsf> I guess I'll add config variables :( 09:37 < rsaarelm> I'd guess it would be easy enough for apps to provide some runtime way to tell GOOS and GOARCH. 09:37 < nsf> at least for GOROOT 09:38 < nsf> yes 09:38 < nsf> GOOS and GOARCH can be determined at runtime 09:38 < exch> runtime.GOROOT() should still work fine 09:40 < nsf> GOROOT returns the root of the Go tree. It uses the GOROOT environment variable, if set, or else the root used during the Go build. 09:40 < nsf> nope 09:40 < exch> may not be handy to rely on though. the machine you run the binary on masy be different 09:40 < nsf> it uses the env var! 09:40 < exch> only if set 09:40 < nsf> yes, but other part is totally useless 09:43 -!- nighty^ [~nighty@210.188.173.245] has quit [Quit: Disappears in a puff of smoke] 09:43 < nsf> I think that the compiler itself should contain valid GOROOT path 09:43 < nsf> like 8g -goroot 09:43 < nsf> and it will print it back 09:44 < rsaarelm> Yeah, but what if the binary is deployed to a machine with a different GOROOT? 09:44 < nsf> it makes sense because compiler needs to know that path anyway (in order to build things) 09:44 < exch> that still makes it useless if the machine has no compiler :) 09:44 < exch> But in that case, relying on GOROOT to begin with is useless 09:44 < nsf> but then GOROOT doesn't make sense 09:44 < nsf> it makes sense only if user has compiler installed 09:45 < nsf> yes 09:45 < rsaarelm> Ah, right, you should assume that a compiler is on the path for GOROOT to be of any use. 09:45 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts 09:45 -!- Fish-Work [~Fish@86.65.182.207] has joined #go-nuts 09:46 -!- mikespook1 [~mikespook@219.137.50.140] has joined #go-nuts 09:46 < nsf> currently they are relying on gomake to provide that info 09:46 < nsf> but I think gomake is a wrong place for that information 09:46 < nsf> it should be a compiler 09:46 < exch> ah well. none of my code relies on those vars. I do need to fix a bumload of makefiles though 09:46 -!- mikespook [~mikespook@219.137.254.148] has quit [Ping timeout: 240 seconds] 09:47 < nsf> the problem is: if you'll try to run compiler without gomake (which sets GOROOT env var) and without GOROOT env var 09:47 < nsf> it will fail 09:47 < nsf> that's why GOROOT should be compiled in 09:47 < exch> If remi'm guessing gomake can be fixed to find out for itself where it is located instead of needing GOROOT 09:48 < exch> *-the first bit 09:48 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Read error: Operation timed out] 09:48 < nsf> anyway, we'll see how it works when the release is here 09:48 * nsf is back to work 09:48 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts 09:55 -!- photron [~photron@port-92-201-203-193.dynamic.qsc.de] has joined #go-nuts 10:10 -!- path[l] [~path@122.182.0.38] has joined #go-nuts 10:22 -!- boscop_ [~boscop@f055155183.adsl.alicedsl.de] has left #go-nuts [] 10:22 -!- boscop [~boscop@f055155183.adsl.alicedsl.de] has joined #go-nuts 10:29 -!- bettiah [~me@58.35.49.248] has quit [Ping timeout: 248 seconds] 10:32 -!- path[l] [~path@122.182.0.38] has quit [Quit: path[l]] 10:33 -!- General1337 [~support@71-84-50-230.dhcp.mtpk.ca.charter.com] has joined #go-nuts 10:33 -!- Shyde [~shyde@HSI-KBW-078-043-070-132.hsi4.kabel-badenwuerttemberg.de] has joined #go-nuts 10:33 -!- path[l] [~path@59.162.86.164] has joined #go-nuts 10:35 -!- path[l] [~path@59.162.86.164] has quit [Client Quit] 10:36 -!- General13372 [~support@71-84-50-230.dhcp.mtpk.ca.charter.com] has quit [Ping timeout: 276 seconds] 10:39 -!- saschpe [~quassel@mgdb-4d0cf834.pool.mediaWays.net] has quit [Remote host closed the connection] 10:52 -!- rbraley [~rbraley@ip72-222-128-78.ph.ph.cox.net] has quit [Read error: Connection reset by peer] 10:52 -!- rbraley [~rbraley@ip72-222-128-78.ph.ph.cox.net] has joined #go-nuts 10:53 -!- nighty^ [~nighty@x122091.ppp.asahi-net.or.jp] has joined #go-nuts 11:08 -!- IRWolfie- [irwolfie@ircnoob.com] has joined #go-nuts 11:13 -!- lmoura [~lauromour@187.113.125.76] has quit [Ping timeout: 265 seconds] 11:17 -!- slackstation_ [~eman@adsl-69-231-151-35.dsl.irvnca.pacbell.net] has joined #go-nuts 11:21 -!- slackstation [~eman@adsl-69-231-151-35.dsl.irvnca.pacbell.net] has quit [Ping timeout: 265 seconds] 11:21 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3] 11:25 -!- lmoura [~lauromour@187.113.72.254] has joined #go-nuts 11:31 -!- lmoura [~lauromour@187.113.72.254] has quit [Ping timeout: 260 seconds] 11:33 -!- artefon [~thiago@189.107.155.106] has joined #go-nuts 11:51 -!- peterdn [~peterdn@host81-159-105-107.range81-159.btcentralplus.com] has joined #go-nuts 11:58 -!- path[l] [~path@59.162.86.164] has joined #go-nuts 12:02 -!- path[l] [~path@59.162.86.164] has quit [Client Quit] 12:04 -!- lmoura [~lauromour@187.113.97.79] has joined #go-nuts 12:05 -!- napsy [~luka@212.235.174.112] has quit [Quit: Lost terminal] 12:07 -!- alehorst [~alehorst@201.22.23.234.dynamic.adsl.gvt.net.br] has quit [Ping timeout: 248 seconds] 12:17 -!- Eridius [~kevin@unaffiliated/eridius] has quit [Read error: Operation timed out] 12:21 -!- alehorst [~alehorst@189.115.80.184] has joined #go-nuts 12:26 -!- viirya [~viirya@cml506-25.csie.ntu.edu.tw] has joined #go-nuts 12:28 -!- visof [~visof@unaffiliated/visof] has quit [Ping timeout: 240 seconds] 12:36 < taruti> What is that nonsense on the ML that GUI toolkits are not possible without generics? 12:39 < nbjoerg> haha 12:41 < taruti> as it would be impossible to use some kind of dynamic dispatch with "methods". we could even call those values "interfaces". ;) 12:42 -!- visof [~visof@unaffiliated/visof] has joined #go-nuts 12:44 -!- visof [~visof@unaffiliated/visof] has quit [Excess Flood] 12:44 < rsaarelm> Well, GUIs being originally programmed in the rigidly statically typed Smalltalk has obviously colored the perception of later programmers. 12:45 < taruti> rsaarelm: :D 12:45 -!- visof [~visof@unaffiliated/visof] has joined #go-nuts 12:46 < taruti> Having a control(2) like library with both ajax and X11 backends for Go would be very nice 12:53 -!- visof [~visof@unaffiliated/visof] has quit [Ping timeout: 240 seconds] 13:11 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts 13:14 -!- visof [~visof@unaffiliated/visof] has joined #go-nuts 13:15 -!- leimy_ [~dave@pool-71-164-13-100.sttlwa.fios.verizon.net] has quit [Quit: leimy_] 13:17 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined #go-nuts 13:18 -!- emmanueloga [~emmanuelo@190.244.214.122] has quit [Read error: Connection reset by peer] 13:19 -!- emmanueloga [~emmanuelo@190.244.214.122] has joined #go-nuts 13:22 -!- navigator [~navigator@p54897A22.dip.t-dialin.net] has joined #go-nuts 13:23 -!- kevinwat1 [kevin@59-125-147-75.HINET-IP.hinet.net] has left #go-nuts [] 13:23 -!- kevinwatt [kevin@59-125-147-75.HINET-IP.hinet.net] has joined #go-nuts 13:27 -!- artefon [~thiago@189.107.155.106] has quit [Ping timeout: 248 seconds] 13:30 -!- visof [~visof@unaffiliated/visof] has quit [Ping timeout: 240 seconds] 13:38 -!- artefon [~thiago@189.107.155.106] has joined #go-nuts 13:39 < str1ngs> what is the best way to monitor some channels ie after I have fired off some goroutines I need to wait and make sure they all finish. 13:40 < nsf> you can pass to each goroutine the same channel like 'done chan bool' 13:40 < nsf> and when they finish they must do 'done <- true' 13:41 < nsf> and then in main goroutine you can make a loop 13:41 < str1ngs> oh so I can use one chanel to watch them all? 13:41 < nsf> like for i := 0; i < Ngoroutines; i++ { <-done } 13:41 < nsf> yes 13:41 < str1ngs> ok thats easier then I thought thank you. 13:44 < plexdev> http://is.gd/elGfM by [Roger Peppe] in go/src/pkg/time/ -- Remove relic "once" import from time/zoneinfo.go 13:44 < plexdev> http://is.gd/elGfR by [Roger Peppe] in go/src/pkg/template/ -- Fix template package so that data items 13:46 -!- inittab- [~dlbeer@ip-118-90-22-160.xdsl.xnet.co.nz] has joined #go-nuts 13:46 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit: This computer has gone to sleep] 13:46 -!- Venom_X [~pjacobs@71.21.124.111] has joined #go-nuts 13:47 -!- inittab [~dlbeer@118.90.103.17] has quit [Ping timeout: 258 seconds] 13:56 -!- ukl [~ukl@f053127132.adsl.alicedsl.de] has joined #go-nuts 13:59 -!- bettiah [~me@58.35.58.40] has joined #go-nuts 13:59 -!- saschpe [~quassel@mgdb-4d0cf834.pool.mediaWays.net] has joined #go-nuts 14:00 < hokapoka> str1ngs: IIRC there's an example in the tutorial that doing something very similar. 14:00 < hokapoka> http://golang.org/doc/effective_go.html#parallel <- here 14:01 < str1ngs> doh I was working down to that. 14:01 < str1ngs> thank you that exactly what I need. 14:02 < hokapoka> ahem, I started to search the docs for NCPU - thinking it was some constant in go that held the number of CPUs. Then I noticed the const NCPU = 4 // number of CPU cores. 14:02 < hokapoka> np 14:03 -!- chressie [~chressie@dreggn.in-ulm.de] has joined #go-nuts 14:05 < str1ngs> umm guess it would help if I used the keyword go? 14:05 < str1ngs> NCPU = 12 ... I wish 14:05 < hokapoka> yeah always helps to add the rihgt commands :) 14:07 < str1ngs> that might even explain why time.Sleep wasnt working .. doh 14:09 -!- ukl [~ukl@f053127132.adsl.alicedsl.de] has quit [Read error: Operation timed out] 14:12 < str1ngs> ok that was way easier then I orginal made it out to be. 14:22 -!- jramnani [~jramnani@chml01.drwholdings.com] has joined #go-nuts 14:28 -!- ukl [~ukl@f053127132.adsl.alicedsl.de] has joined #go-nuts 14:30 -!- aho [~nya@fuld-4d00d4c5.pool.mediaWays.net] has joined #go-nuts 14:37 -!- artefon [~thiago@189.107.155.106] has quit [Ping timeout: 240 seconds] 14:39 -!- napsy [~luka@212.235.174.112] has joined #go-nuts 14:41 -!- femtoo [~femto@95-89-188-214-dynip.superkabel.de] has joined #go-nuts 14:42 -!- savechina [~savechina@221.222.9.204] has joined #go-nuts 14:44 -!- awidegreen [~quassel@62.176.237.78] has joined #go-nuts 14:45 -!- angasule [c80571ea@gateway/web/freenode/ip.200.5.113.234] has joined #go-nuts 14:50 -!- DerHorst [~Horst@e176101254.adsl.alicedsl.de] has joined #go-nuts 14:51 -!- artefon [~thiago@vpn-230.dcc.ufmg.br] has joined #go-nuts 14:52 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3] 14:52 -!- sacho [~sacho@213.91.244.15] has quit [Remote host closed the connection] 14:54 -!- Shyde [~shyde@HSI-KBW-078-043-070-132.hsi4.kabel-badenwuerttemberg.de] has quit [Quit: Shyde] 14:55 -!- sacho [~sacho@213.91.244.15] has joined #go-nuts 15:00 -!- bettiah [~me@58.35.58.40] has quit [Quit: leaving] 15:02 -!- artefon [~thiago@vpn-230.dcc.ufmg.br] has quit [Ping timeout: 245 seconds] 15:02 -!- napsy [~luka@212.235.174.112] has quit [Quit: Lost terminal] 15:07 -!- savechina [~savechina@221.222.9.204] has quit [Quit: Leaving] 15:08 -!- savechina [~savechina@221.222.8.17] has joined #go-nuts 15:08 -!- savechina [~savechina@221.222.8.17] has quit [Client Quit] 15:08 -!- savechina [~savechina@221.222.8.17] has joined #go-nuts 15:09 -!- poet [~poet@unaffiliated/poet] has left #go-nuts [] 15:14 -!- savechina [~savechina@221.222.8.17] has quit [Quit: Leaving] 15:15 -!- savechina [~savechina@221.222.8.17] has joined #go-nuts 15:20 -!- macroron [~ron@c-98-242-168-49.hsd1.fl.comcast.net] has joined #go-nuts 15:21 -!- zozoR [~zozoR@x1-6-00-0e-2e-a3-e0-23.k377.webspeed.dk] has joined #go-nuts 15:21 -!- ukl [~ukl@f053127132.adsl.alicedsl.de] has quit [Ping timeout: 248 seconds] 15:25 -!- savechina [~savechina@221.222.8.17] has quit [Quit: Leaving] 15:25 -!- savechina [~savechina@221.222.8.17] has joined #go-nuts 15:25 -!- ukl [~ukl@f053127132.adsl.alicedsl.de] has joined #go-nuts 15:35 -!- ikaros [~ikaros@dslb-084-059-076-150.pools.arcor-ip.net] has joined #go-nuts 15:43 -!- ukl [~ukl@f053127132.adsl.alicedsl.de] has quit [Ping timeout: 245 seconds] 15:49 -!- savechina [~savechina@221.222.8.17] has quit [Quit: Leaving] 15:50 -!- savechina [~savechina@221.222.9.204] has joined #go-nuts 15:56 -!- savechina [~savechina@221.222.9.204] has quit [Quit: Leaving] 16:04 -!- plainhao [~plainhao@mail.xbiotica.com] has joined #go-nuts 16:08 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined #go-nuts 16:11 -!- napsy [~luka@212.235.174.112] has joined #go-nuts 16:12 -!- sacho [~sacho@213.91.244.15] has quit [Read error: Connection reset by peer] 16:14 -!- aho [~nya@fuld-4d00d4c5.pool.mediaWays.net] has quit [Quit: EXEC_over.METHOD_SUBLIMATION] 16:15 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts 16:17 -!- deso [~deso@x0561a.wh30.tu-dresden.de] has joined #go-nuts 16:19 -!- jramnani [~jramnani@chml01.drwholdings.com] has quit [Quit: jramnani] 16:20 -!- jramnani [~jramnani@chml01.drwholdings.com] has joined #go-nuts 16:27 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts 16:29 -!- artefon [~thiagon@150.164.2.20] has joined #go-nuts 16:32 -!- femtoo [~femto@95-89-188-214-dynip.superkabel.de] has quit [Quit: Leaving] 16:34 -!- Fish [~Fish@9fans.fr] has joined #go-nuts 16:36 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Remote host closed the connection] 16:42 -!- Venom_X [~pjacobs@71.21.124.111] has quit [Ping timeout: 240 seconds] 16:46 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined #go-nuts 16:47 -!- alehorst [~alehorst@189.115.80.184] has quit [Quit: Leaving.] 16:49 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts 16:52 < exch> is it just me or are these two the wrong way around? http://github.com/feyeleanor/GoLightly/blob/master/vm/buffer.go#L103 16:55 < nsf> exch: nope, all ok 16:55 < nsf> << and >> expect uint on the right side 16:56 < nsf> but I don't quite understand the point of that API 16:56 < nsf> looks useless 16:56 < exch> yea, but << points to left.. it's in 'shiftright' 16:57 < nbjoerg> yeah, I think he means shifting in the wrong direction 16:57 < exch> aye 16:57 < nsf> ah.. this 16:57 < nsf> yep, probably a mistake 16:59 < exch> goodie, I was beginning to doubt myself. Though I was missing some new kind of magic :p 16:59 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Remote host closed the connection] 17:00 -!- Xenith [~xenith@173-228-72-4.dsl.static.sonic.net] has quit [Ping timeout: 260 seconds] 17:04 -!- carllerche [~carllerch@208.87.61.203] has joined #go-nuts 17:10 -!- napsy [~luka@212.235.174.112] has quit [Ping timeout: 240 seconds] 17:11 -!- Venom_X [~pjacobs@71.21.124.111] has joined #go-nuts 17:14 -!- sacho [~sacho@95-42-124-149.btc-net.bg] has joined #go-nuts 17:15 < str1ngs> nsf: do you use ^X ^O in gvim or did you re map the binding? 17:15 < nsf> I use ^X ^O 17:16 < nsf> I should say also that I'm not using it a lot 17:16 < nsf> sometimes I use just ^P or ^N 17:16 < nsf> to save typing time 17:16 < nsf> and when I really forget something, real autocompletion helps :) 17:16 < nsf> forgot* 17:17 < str1ngs> maybe I should read up on omni completetion then. before I did not user it that much but I've been having fun with gocode. 17:17 < nsf> and there are zillions of topics how you can rebind that to something like tab 17:17 < nsf> yep, I didn't use it either 17:17 < nsf> cause for C++ and C it sucks 17:18 < str1ngs> none work all that great though. I use to user supertab for simple stuff. but I need to do something else. I think I'll just read up and use the vim bindings 17:18 < str1ngs> grr hopefully some of that made sense. 17:18 < nsf> :D 17:19 < nsf> use whatever you like 17:19 < nsf> I mean different people prefer different things 17:20 < nsf> regarding vim there is a nice wiki on the web 17:20 < nsf> when you can find a lot of possible options 17:20 < nsf> to choose from 17:20 < nsf> where* 17:22 < nsf> and yes, gocode is better than other autocompletions ^_^ 17:22 < nsf> partly because the go is much simpler than other widely used languages 17:23 < nsf> can't wait when I will finish the refactoring part 17:27 < nsf> I can imagine how hard is it to make proper autocompletion for languages with templates 17:27 < nsf> I hope go's generics will be somewhat simple 17:29 -!- jA_cOp [~yakobu@unaffiliated/ja-cop/x-9478493] has quit [Quit: Leaving] 17:31 -!- Xenith [~xenith@kiwi.he.net] has joined #go-nuts 17:39 -!- virtualsue [~chatzilla@nat/cisco/x-tueiybeigjcahcxf] has quit [Ping timeout: 265 seconds] 17:43 < str1ngs> reflection really helps with autocompletion 17:44 < nsf> well it helps because type information is written to .a files 17:44 < nsf> other than that it has nothing to do with autocompletion 17:44 -!- napsy [~luka@212.235.174.112] has joined #go-nuts 17:47 < str1ngs> right but if it was not for reflection you would have to use tags or have some keyword list? 17:47 < nsf> btw, if you'll notice that something doesn't work with gocode 17:47 < nsf> let me know 17:47 < nsf> str1ngs: not really 17:47 < nsf> I will make a database format for that purposes then 17:48 < nsf> and gocode will have to preparse all the std lib 17:48 < nsf> and packages imported locally won't work 17:48 < nsf> etc. 17:48 < nsf> it's not as bad as with C 17:48 < nsf> but it's pretty bad 17:48 < str1ngs> so far the only issue was when I was using go HEAD. but I switched back to using release. 17:48 < nsf> :D 17:48 < nbjoerg> can it be that 6c doesn't support #elif ? 17:49 < nsf> nbjoerg: yes, it is possible 17:49 < nbjoerg> and it doesn't even complain which is $%#%#$% 17:49 < nsf> afaik 6c doesn't support #if at all 17:49 < nbjoerg> it does 17:49 < nbjoerg> simple ones 17:49 < navigator> nsf: I tried to install gocode on freebsd but it failed. if I change make to gomake in the Makefile everything compiles fine 17:49 < nsf> ah, maybe 17:49 < nsf> navigator: thanks, I'll make a patch for that 17:50 < nsf> done 17:51 < nsf> And that's all compilation failures 17:51 < nsf> I'm mostly interested in autocompletion failures 17:52 < str1ngs> nsf: but no so far I have not had any issues 17:52 < nsf> I've just noticed one 17:52 < str1ngs> nsf: on OSX or Linux 17:52 < nsf> and fixed it 17:52 < nsf> :D 17:52 < nsf> I'm sure there are more 17:53 -!- Project_2501 [~Marvin@82.84.92.43] has joined #go-nuts 17:54 < navigator> nsf: vim/update.sh assumes that bash is in /bin. Maybe sh would suffice? or maybe use /usr/bin/env bash like go 17:55 < navigator> some thing for test/test.bash 17:55 < nsf> yep, that's an issue too :) 17:55 < nsf> I'll make it /usr/bin/env 17:56 < nsf> because python uses that trick all the time, I hope it means that it is more or less portable 17:56 < nbjoerg> it is 17:57 < nbjoerg> (more portable) 17:57 < nbjoerg> but not depending on bash would be even better, of course :) 17:57 < nsf> Go uses it 17:57 < nsf> and my app doesn't really depend on it 17:57 < nbjoerg> I hope the former can be fixed at some point 17:57 < nsf> just uses for helper scripts 17:58 -!- femtoo [~femto@95-89-188-214-dynip.superkabel.de] has joined #go-nuts 17:58 < nsf> done 17:59 < nsf> also my testing script depends on python 2.6 17:59 < nsf> some people still use python 2.5 and lower 17:59 < nsf> and frankly I don't understand these people 18:00 < nsf> 2.6 final was released two years ago 18:00 < nsf> afair 18:01 -!- jramnani [~jramnani@chml01.drwholdings.com] has quit [Quit: jramnani] 18:01 < nbjoerg> compatibility with older programs 18:01 < nbjoerg> or they are running RHEL 18:03 -!- derferman [~derferman@dsl092-048-218.sfo4.dsl.speakeasy.net] has joined #go-nuts 18:04 -!- deso [~deso@x0561a.wh30.tu-dresden.de] has quit [Read error: Connection reset by peer] 18:05 -!- deso [~deso@x0561a.wh30.tu-dresden.de] has joined #go-nuts 18:05 < nsf> go's GC is really slow 18:05 < str1ngs> ok I think I'm doing something wrong here. do I need to make a package for every struct I use? foo.Foo seems like I'm doing this wrong. 18:06 < nsf> uhm.. 18:06 < nsf> what do you mean? 18:06 < nsf> why are you making a lot of packages? :) 18:07 < str1ngs> let me post some code. 18:08 -!- slackstation [~eman@adsl-69-231-151-35.dsl.irvnca.pacbell.net] has quit [Read error: Connection reset by peer] 18:08 < str1ngs> http://github.com/str1ngs/via/blob/master/plan/plan.go 18:08 -!- slackstation [~eman@adsl-69-231-151-35.dsl.irvnca.pacbell.net] has joined #go-nuts 18:09 -!- slackstation [~eman@adsl-69-231-151-35.dsl.irvnca.pacbell.net] has quit [Read error: Connection reset by peer] 18:09 < str1ngs> if I dont put them in packages. then things I have in package and not use them. or should I just put it all in main? 18:09 < str1ngs> cant not* 18:09 -!- slackstation [~eman@adsl-69-231-151-35.dsl.irvnca.pacbell.net] has joined #go-nuts 18:10 < nbjoerg> nsf: it hasn't been a major focus point of implementation so far, has it been? 18:10 < nsf> I think you should use "main" until your app will be reasonably large 18:10 < nsf> nbjoerg: I guess so 18:11 < nsf> but its performance impact is really noticable 18:11 < str1ngs> nsf: ok I think thats where I was going wrong. and I can still keep them organized with seperate files. 18:11 < nsf> str1ngs: sure you can 18:11 * nbjoerg is still using a lock() implementation that just yields, so don't talk about performance impact, please 18:11 < str1ngs> nsf: thanks 18:12 < nsf> str1ngs: take a look at go's math package 18:12 < nsf> it contains a lot of files 18:12 < nsf> but everything in a one package namespace 18:12 < str1ngs> ah so if I'm targeting Make.Cmd then its not much different other then its in main 18:13 -!- Venom_X [~pjacobs@71.21.124.111] has quit [Ping timeout: 245 seconds] 18:13 < nsf> if you have just one package, simply list all your .go files in GOFILES 18:13 < nsf> and you're done 18:14 -!- scm [justme@d070229.adsl.hansenet.de] has quit [Ping timeout: 276 seconds] 18:15 < nsf> makefiles are painful :( 18:15 < str1ngs> well the only issue is I use init() for dynamically adding metadata. so I thought if I put that in a package it could be independant of the binary. however I dont think that works. since all package get statically included in the exec anyways? I could be wrong on this. 18:16 < nsf> yes, everything is statically linked 18:16 < nsf> so.. everything you have is added at app's start 18:16 < str1ngs> ok so package wont help that. so I'll switch back to having everything in main scope 18:17 < nsf> yes 18:17 < nsf> currently Go doesn't have any kind of facility that will allow you to dynamically load the code 18:17 < nsf> but it is planned I guess 18:18 < nsf> it will be in some form sooner or later 18:18 < nsf> and most likely it will not be in a form of shared libararies 18:18 < nsf> libraries* 18:18 < str1ngs> init it fine for now. unless I switch to yaml or something like that. but that wont handle logic or func types I dont think 18:18 -!- ExtraSpice [~XtraSpice@88.118.32.225] has quit [Ping timeout: 240 seconds] 18:18 < nsf> str1ngs: your init is not even necessary 18:18 < str1ngs> http://github.com/str1ngs/via/blob/master/plans/lsof.go in this ? 18:19 < nsf> yes 18:19 < nsf> because you're adding the same info at each runtime over and over again 18:19 < str1ngs> ah ok 18:19 < nsf> you can simply put one big table somewhere 18:19 < nsf> that contains multiple entries 18:19 < str1ngs> I'm using a map right now 18:19 < nsf> but you're adding entries dynamically to it 18:20 < nsf> I mean something like: 18:20 < nsf> var All = map[whatever]whatever{ ... } 18:20 < nsf> well, init will work too 18:20 < nsf> but I think it's a large misuse of a feature 18:20 < str1ngs> I'll see if I can drop the init 18:21 < str1ngs> this whole thing is a misuse imo but fun 18:21 < nsf> :) 18:21 < str1ngs> basically PKGBUILD's written in go 18:21 < nsf> and I don't think it's a good idea either 18:21 < nsf> :D 18:22 < nsf> Go isn't a scripting language 18:23 < str1ngs> well there are merits to this vs bash. goroutines for concurrent builds/downloads. less dependancies on forks even though I am using them right now. 18:23 -!- ukl [~ukl@f053127132.adsl.alicedsl.de] has joined #go-nuts 18:23 < str1ngs> func hooks for redundant stuff. for example my GnuBuild. 18:23 < nsf> well, you can implement parallel downloader in Go 18:23 < nsf> but doing what you're doing is wrong (imho) 18:24 < exch> here's a puzzle for you math geeks: 0 degrees celcius + 0 degrees Celcius = ? 18:24 -!- jramnani [~jramnani@chml01.drwholdings.com] has joined #go-nuts 18:25 < str1ngs> nsf: remember they said that to the Wright brothers :P 18:26 < nsf> I don't mean that you should stop doing that, do whatever you want, but looks pointless to me :D 18:27 < str1ngs> its seems pointless. but I have some applications I would like to use it in. orginally I was going to write it in ruby. but I'm having to much fun with Go. 18:27 < nsf> I think the ruby is a better choice for that task 18:29 < str1ngs> I agree, but I'm already in the rabbits hole so I might as well see where it leads. 18:29 < nsf> :) 18:29 < str1ngs> worst case I use PKGBUILD's and basically rewrite makepkg in go 18:30 < str1ngs> but I rather not parse PKGBUILD's would not work that great or wrap bash to do it would defeat the purpose. 18:30 < nsf> PKGBUILD are shell scripts 18:30 < nsf> their biggest problem is exactly that 18:30 < nsf> PKGBUILDs* 18:31 < nsf> I remember there was some kind of discussion about it 18:31 < str1ngs> we'll see I'll just chalk it up as an exercise is Go. to justify my goals 18:31 < nsf> but apparently nothing was changed 18:32 < nsf> ok, good luck to you then :) 18:33 * nsf is gone for a movie 18:40 -!- ukl [~ukl@f053127132.adsl.alicedsl.de] has quit [Quit: bye] 18:47 -!- jramnani [~jramnani@chml01.drwholdings.com] has quit [Quit: jramnani] 18:48 -!- napsy [~luka@212.235.174.112] has quit [Ping timeout: 248 seconds] 18:56 -!- scm [justme@d070229.adsl.hansenet.de] has joined #go-nuts 19:05 -!- ronnyy [~quassel@p4FF1D4A3.dip.t-dialin.net] has joined #go-nuts 19:12 -!- peterdn [~peterdn@host81-159-105-107.range81-159.btcentralplus.com] has quit [Quit: ChatZilla 0.9.86-rdmsoft [XULRunner 1.9.2/20100222071121]] 19:14 -!- crazy2be [~justin@S0106001ac401d400.cg.shawcable.net] has joined #go-nuts 19:14 -!- peterdn [~peterdn@host81-159-105-107.range81-159.btcentralplus.com] has joined #go-nuts 19:16 -!- carllerche [~carllerch@208.87.61.203] has quit [Quit: carllerche] 19:17 < nbjoerg> wtf 19:17 * nbjoerg wants to murder to 6c authors 19:17 < crazy2be> why? 19:18 < nbjoerg> uint64 foo =1; if (foo) magic(); 19:18 < nbjoerg> gives a warning for the "if (foo)" part that the result of operation is not used 19:19 -!- ronnyy [~quassel@p4FF1D4A3.dip.t-dialin.net] has quit [Remote host closed the connection] 19:20 < nbjoerg> does that qualify as issue? 19:21 < taruti> nbjoerg: use USED(foo) 19:21 < nbjoerg> that's not that point 19:22 < nbjoerg> the point is that "if (foo)" and "if (foo != 0)" are different 19:22 < taruti> ah 19:23 -!- carllerche [~carllerch@208.87.61.203] has joined #go-nuts 19:24 -!- wobsite [~wobsite@terminus-est.gnu.org] has joined #go-nuts 19:25 -!- wobsite [~wobsite@terminus-est.gnu.org] has left #go-nuts ["Leaving"] 19:28 < nbjoerg> hm. do i want to spend a lot of time on writing lock/unlock in a way that is starvation free or not 19:28 -!- lmoura [~lauromour@187.113.97.79] has quit [Read error: Connection reset by peer] 19:29 -!- Venom_X [~pjacobs@adsl-99-20-147-171.dsl.aus2tx.sbcglobal.net] has joined #go-nuts 19:30 -!- DerHorst [~Horst@e176101254.adsl.alicedsl.de] has quit [Remote host closed the connection] 19:31 -!- plainhao [~plainhao@mail.xbiotica.com] has quit [Quit: plainhao] 19:32 -!- lmoura [~lauromour@187.113.102.215] has joined #go-nuts 19:36 -!- ronnyy [~quassel@p4FF1D4A3.dip.t-dialin.net] has joined #go-nuts 19:37 -!- lmoura_ [~lauromour@187.113.68.29] has joined #go-nuts 19:40 -!- lmoura [~lauromour@187.113.102.215] has quit [Ping timeout: 264 seconds] 19:49 -!- napsy [~luka@212.235.174.112] has joined #go-nuts 19:51 -!- virtualsue [~chatzilla@nat/cisco/x-rickqshssgxkeujs] has joined #go-nuts 19:52 -!- carllerche [~carllerch@208.87.61.203] has quit [Quit: carllerche] 19:53 -!- saschpe [~quassel@mgdb-4d0cf834.pool.mediaWays.net] has quit [Remote host closed the connection] 20:04 -!- zozoR [~zozoR@x1-6-00-0e-2e-a3-e0-23.k377.webspeed.dk] has quit [Quit: Morten. Desu~] 20:08 -!- swaj [scott@unaffiliated/swaj] has joined #go-nuts 20:09 -!- swaj [scott@unaffiliated/swaj] has left #go-nuts [] 20:12 -!- femtoo [~femto@95-89-188-214-dynip.superkabel.de] has quit [Quit: Leaving] 20:17 -!- jramnani [~jramnani@chml01.drwholdings.com] has joined #go-nuts 20:22 -!- chressie [~chressie@dreggn.in-ulm.de] has quit [Ping timeout: 240 seconds] 20:28 -!- visof [~visof@unaffiliated/visof] has joined #go-nuts 20:29 -!- visof [~visof@unaffiliated/visof] has quit [Max SendQ exceeded] 20:36 -!- chressie [~chressie@dreggn.in-ulm.de] has joined #go-nuts 20:44 -!- angasule [c80571ea@gateway/web/freenode/ip.200.5.113.234] has quit [Quit: Page closed] 20:44 -!- ibaned [~ibaned@cpe-74-67-20-150.nycap.res.rr.com] has joined #go-nuts 20:46 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit: Verlassend] 20:49 -!- visof [~visof@unaffiliated/visof] has joined #go-nuts 20:54 -!- Nick_B_ [ca318819@gateway/web/freenode/ip.202.49.136.25] has joined #go-nuts 20:57 -!- willdye [~willdye@fern.dsndata.com] has left #go-nuts [] 20:57 -!- visof [~visof@unaffiliated/visof] has quit [Ping timeout: 276 seconds] 21:06 -!- visof [~visof@unaffiliated/visof] has joined #go-nuts 21:07 -!- visof [~visof@unaffiliated/visof] has quit [Max SendQ exceeded] 21:08 -!- visof [~visof@unaffiliated/visof] has joined #go-nuts 21:11 -!- macroron [~ron@c-98-242-168-49.hsd1.fl.comcast.net] has quit [Quit: Leaving] 21:12 -!- skelterjohn [~jasmuth@c-76-116-182-139.hsd1.nj.comcast.net] has quit [Quit: skelterjohn] 21:17 -!- visof [~visof@unaffiliated/visof] has quit [Remote host closed the connection] 21:20 -!- jramnani [~jramnani@chml01.drwholdings.com] has quit [Quit: jramnani] 21:21 -!- Project_2501 [~Marvin@82.84.92.43] has quit [Quit: E se abbasso questa leva che succ...] 21:23 -!- mattikus [~mattikus@ip24-250-73-154.br.br.cox.net] has joined #go-nuts 21:29 -!- ibaned [~ibaned@cpe-74-67-20-150.nycap.res.rr.com] has quit [Ping timeout: 260 seconds] 21:33 -!- ronnyy [~quassel@p4FF1D4A3.dip.t-dialin.net] has quit [Remote host closed the connection] 21:36 -!- virtualsue [~chatzilla@nat/cisco/x-rickqshssgxkeujs] has quit [Quit: ChatZilla 0.9.86 [Firefox 3.5.11/20100701014808]] 21:40 < nickaugust> is there an example binary tree implemtation in go? 21:40 -!- TR2N [email@89.180.198.16] has joined #go-nuts 21:40 < nickaugust> implementation rather 21:40 < nbjoerg> there is a r/b tree implementation somewhere 21:40 < nbjoerg> so yes 21:40 < nsf> search ML 21:40 < nbjoerg> "at least one form of binary tree is implemented" 21:40 < nsf> it was there 21:41 < nbjoerg> is osinit always called before lock/unlock/noteclear? 21:41 < nickaugust> k thx 21:41 < nsf> http://github.com/petar/GoLLRB 21:41 < nsf> nickaugust: here it is 21:43 -!- artefon [~thiagon@150.164.2.20] has quit [Quit: Leaving] 21:43 < nickaugust> nsf: thanks man :) 21:46 -!- itrekkie [~itrekkie@ip72-200-109-106.tc.ph.cox.net] has joined #go-nuts 21:48 -!- napsy [~luka@212.235.174.112] has quit [Ping timeout: 245 seconds] 21:49 < plexdev> http://is.gd/emcyf by [Scott Lawrence] in go/src/ -- Make.common: add .PHONY rule 21:49 < plexdev> http://is.gd/emcys by [Russ Cox] in go/ -- CONTRIBUTORS: add Luuk van Dijk (Google CLA) 21:49 < MaybeSo> given a token 'tok' of xml.CharData, does one really need to convert it to a string via string([]byte(tok)) ? 21:56 < exch> yes 21:56 -!- mimustafa [~steve@92.62.125.249] has joined #go-nuts 21:58 -!- mimustafa [~steve@92.62.125.249] has left #go-nuts [] 22:00 -!- mimustafa [~steve@92.62.125.249] has joined #go-nuts 22:01 < MaybeSo> exch: it used to be one could write string(tok), did you happen to know if that changed because of a change in the spec or because of a bug fix? 22:04 < mimustafa> clear 22:06 < exch> that changed quite a while ago. Something about no longer doing certain implicit conversions 22:06 < MaybeSo> thank you 22:06 -!- d_m [~d_m@207.245.124.125] has quit [Ping timeout: 258 seconds] 22:10 -!- jramnani [~jramnani@chml01.drwholdings.com] has joined #go-nuts 22:11 -!- skelterjohn [~jasmuth@nat02-nbpwireless-ext.rutgers.edu] has joined #go-nuts 22:11 -!- skelterjohn [~jasmuth@nat02-nbpwireless-ext.rutgers.edu] has quit [Client Quit] 22:11 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined #go-nuts 22:12 -!- ahc [~ahc@c-83-233-18-157.cust.bredband2.com] has joined #go-nuts 22:12 < nsf> it was *[10]byte to []byte I guess 22:12 < nsf> but maybe I'm wrong 22:15 -!- mimustafa [~steve@92.62.125.249] has left #go-nuts [] 22:18 -!- ikaros [~ikaros@dslb-084-059-076-150.pools.arcor-ip.net] has quit [Quit: Leave the magic to Houdini] 22:19 -!- ibaned [~ibaned@cpe-74-67-20-150.nycap.res.rr.com] has joined #go-nuts 22:21 < plexdev> http://is.gd/emeWm by [Robert Griesemer] in go/src/pkg/reflect/ -- reflect: allow PtrValue.PointTo(nil) 22:21 < plexdev> http://is.gd/emeWq by [Luuk van Dijk] in go/src/pkg/runtime/ -- runtime: correct line numbers for .goc files. 22:22 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Read error: Connection reset by peer] 22:24 -!- Nick_B_ [ca318819@gateway/web/freenode/ip.202.49.136.25] has quit [Ping timeout: 252 seconds] 22:26 -!- ahc [~ahc@c-83-233-18-157.cust.bredband2.com] has left #go-nuts [] 22:27 -!- skelterjohn [~jasmuth@nat02-nbpwireless-ext.rutgers.edu] has joined #go-nuts 22:28 -!- deso [~deso@x0561a.wh30.tu-dresden.de] has quit [Remote host closed the connection] 22:28 -!- itrekkie [~itrekkie@ip72-200-109-106.tc.ph.cox.net] has quit [Quit: itrekkie] 22:28 -!- Fish [~Fish@9fans.fr] has quit [Remote host closed the connection] 22:32 -!- jramnani [~jramnani@chml01.drwholdings.com] has quit [Quit: jramnani] 22:32 -!- General13372 [~support@71-84-50-230.dhcp.mtpk.ca.charter.com] has joined #go-nuts 22:36 -!- General1337 [~support@71-84-50-230.dhcp.mtpk.ca.charter.com] has quit [Ping timeout: 258 seconds] 22:41 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3] 22:42 -!- artefon [~thiago@189.107.155.106] has joined #go-nuts 22:48 -!- MizardX- [~MizardX@unaffiliated/mizardx] has joined #go-nuts 22:49 -!- napsy [~luka@212.235.174.112] has joined #go-nuts 22:49 -!- MizardX [~MizardX@unaffiliated/mizardx] has quit [Ping timeout: 240 seconds] 22:52 -!- photron [~photron@port-92-201-203-193.dynamic.qsc.de] has quit [Ping timeout: 245 seconds] 23:01 -!- rlab [~Miranda@91.200.158.34] has quit [Read error: Connection reset by peer] 23:02 -!- Venom_X [~pjacobs@adsl-99-20-147-171.dsl.aus2tx.sbcglobal.net] has quit [Quit: Venom_X] 23:04 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has joined #go-nuts 23:07 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit: This computer has gone to sleep] 23:10 < plexdev> http://is.gd/emhVX by [Russ Cox] in go/src/pkg/rpc/jsonrpc/ -- jsonrpc: use `error: null` for success, not `error: ""` 23:12 < nbjoerg> hm. nil pointer access creates crash: check 23:12 -!- artefon [~thiago@189.107.155.106] has quit [Ping timeout: 240 seconds] 23:21 < skelterjohn> ^5 23:25 -!- artefon [~thiago@vpn-228.dcc.ufmg.br] has joined #go-nuts 23:29 -!- awidegreen [~quassel@62.176.237.78] has quit [Remote host closed the connection] 23:33 -!- carllerche [~carllerch@208.87.61.203] has joined #go-nuts 23:34 -!- jhawk28 [~jhawk28@c-75-69-37-150.hsd1.vt.comcast.net] has joined #go-nuts 23:37 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts 23:37 -!- matt444 [601c2542@gateway/web/freenode/ip.96.28.37.66] has joined #go-nuts 23:38 < matt444> what's the best way to test a string for being empty? (len(s) == 0?) 23:39 < skelterjohn> sure 23:39 < KirkMcDonald> Or: if s == "" 23:39 < skelterjohn> the most straight forward way for code readability would probably be s == "" 23:39 < skelterjohn> but len(s)==0 could conceivably be faster 23:39 < matt444> oh :_ 23:39 < matt444> of course :) 23:40 < KirkMcDonald> A sufficiently intelligent optimizer can figure it out! Heh. 23:40 < Namegduf> s == "" is good. 23:40 < Namegduf> There's other special stuff about "". 23:40 < Namegduf> "" is the zero value for a string. 23:40 < Namegduf> In terms of memory. 23:41 < Namegduf> So I assume there's already extra magic around it. 23:41 < nbjoerg> looking for testers for http://www.netbsd.org/~joerg/ipv6_v6only.diff 23:42 < nbjoerg> it is supposed to make the v6only hack obsolete 23:42 < skelterjohn> if a string's memory layout is just length then pointer, then nothing special has to be done to make "" the zero-value 23:42 < Namegduf> Aside that, presumably 23:42 < Namegduf> string1 == string2 23:42 < Namegduf> Must examine the length already 23:42 < Namegduf> And before it examines the string proper 23:42 -!- slackstation_ [~eman@adsl-69-231-151-35.dsl.irvnca.pacbell.net] has joined #go-nuts 23:42 < skelterjohn> i imagine that's how it's done, yes 23:43 < Namegduf> So len(s) == 0 is likely equivalent to s == "" already. 23:43 < skelterjohn> only if the compiler knows to not allocate memory for the "" 23:43 < skelterjohn> which it probably does 23:44 < Namegduf> It certainly wouldn't allocate anything at runtime 23:44 < Namegduf> Because it's a constant. 23:44 < crazy2be> well it's an empty string 23:44 < Namegduf> As much as 0 is. 23:44 < crazy2be> and strings are immutable 23:44 < crazy2be> right? 23:44 < crazy2be> and it's a constant 23:45 < skelterjohn> has to at least be loaded into a register to be compared 23:45 < skelterjohn> 0 takes fewer words than ""? 23:45 < skelterjohn> it's irrelevant, anyway 23:45 < skelterjohn> s=="" is clearer 23:45 < skelterjohn> and if not just as fast, so close as to not matter 23:45 -!- slackstation [~eman@adsl-69-231-151-35.dsl.irvnca.pacbell.net] has quit [Ping timeout: 240 seconds] 23:45 < Namegduf> Well, the Go team accept patches. 23:45 < skelterjohn> lol 23:46 < crazy2be> you could just add a comment: // Test if s is empty 23:46 < crazy2be> that would be clearest 23:46 < Namegduf> So if I wanted to optimise stupid stuff like that, I'd offer a patch instead of crapping all over my code. 23:46 < Namegduf> And save everyone else the time, too. 23:46 -!- matt444 [601c2542@gateway/web/freenode/ip.96.28.37.66] has quit [Ping timeout: 252 seconds] 23:46 < skelterjohn> easier to crap on your code than to patch a compiler 23:46 < exch> I think there are more pressing concerns atm :p 23:47 < Namegduf> Yes, but unless my code is going to fail TODAY unless I do that microoptimisation 23:47 < skelterjohn> like whether you can add celsius and fahrenheit or not 23:47 < Namegduf> I can leave my code alone until I feel up to, or someone else, improves the compiler. 23:48 < exch> On a similar note, what does 'case a, b, c, d:' turn into? would this be faster than 4 independant case statements or is it just syntactic sugar? 23:48 < exch> skelterjohn: exactly :p 23:48 < exch> in this case, celcius + celcius ;) 23:49 < exch> My mind is still boggled about that.. 0C + 0C = 273.15C 23:49 < Tonnerre> Kelvin++ 23:49 < skelterjohn> it does not make sense to add temperatures together 23:49 -!- ibaned [~ibaned@cpe-74-67-20-150.nycap.res.rr.com] has quit [Quit: Ex-Chat] 23:49 < Tonnerre> Well it does 23:49 < exch> yea apparently 23:49 < skelterjohn> oh, did google do it? 23:49 < exch> google had the corretc answer with that 23:49 < Tonnerre> 23°C + 5K = 28°C 23:50 < exch> wolfram|alpha yields 0C as answer 23:50 * crazy2be is confused 23:50 < crazy2be> where is that from? 23:50 < skelterjohn> 0C = 273.15K 23:50 < skelterjohn> where 0K is the coldest anything can get 23:50 < crazy2be> yeah 23:50 < crazy2be> but where did the 0C + 0C come from? 23:51 < skelterjohn> exch is just fooling around with automatic expression evaluators 23:51 < exch> 0C + 0C = 273.15K + 273.15K = 546.30K = 273.15C 23:51 < crazy2be> oh 23:51 < exch> that's basically what it's about. but wolfram gets it wrong 23:51 < KirkMcDonald> hahaha 23:51 < skelterjohn> "wrong" 23:51 < crazy2be> hmm 23:51 < skelterjohn> problem is, 0C isn't zero anything 23:52 < Tonnerre> exch, scientifically correct (the 546.3K) 23:52 < skelterjohn> if you can't rely on the basic arithmetic axioms, you can't do things like addition 23:52 < exch> I think the message is that it makes no sense to add nC to anything 23:52 < skelterjohn> yes 23:54 -!- kingdon [~kingdon@129.21.78.102] has quit [Remote host closed the connection] 23:55 < exch> it's a neat party trick though :p 23:56 < Tonnerre> «I'm adding 0°C, it's getting hot in here» 23:56 < exch> hehe --- Log closed Wed Aug 18 00:00:05 2010