--- Log opened Thu May 05 00:00:50 2011 00:02 -!- PJRobins [~kvirc@184-100-100-163.mpls.qwest.net] has quit [Quit: KVIrc 4.1.1 Equilibrium http://www.kvirc.net/] 00:07 -!- Kafo [5b98b365@gateway/web/freenode/ip.91.152.179.101] has quit [Ping timeout: 252 seconds] 00:11 -!- Venom_X [~pjacobs@66.54.185.131] has quit [Quit: Venom_X] 00:12 -!- pharris [~Adium@rhgw.opentext.com] has quit [Quit: Leaving.] 00:13 -!- hcatlin [~hcatlin@206.111.142.135.ptr.us.xo.net] has joined #go-nuts 00:13 -!- hcatlin [~hcatlin@206.111.142.135.ptr.us.xo.net] has quit [Changing host] 00:13 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has joined #go-nuts 00:15 -!- PJRobins [~kvirc@184-100-100-163.mpls.qwest.net] has joined #go-nuts 00:20 -!- ab3_ [~abe@ip-213-49-109-137.dsl.scarlet.be] has joined #go-nuts 00:23 -!- ab3 [~abe@ip-83-134-160-54.dsl.scarlet.be] has quit [Ping timeout: 240 seconds] 00:28 -!- venk [~user@203.111.33.203] has quit [Remote host closed the connection] 00:32 -!- nkdnstbr [~nkdnstbr@nkdnstbr.com] has joined #go-nuts 00:33 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has quit [Ping timeout: 260 seconds] 00:38 -!- cco3 [~conleyo@nat/google/x-srcennqevhqvtwjf] has quit [Quit: Leaving.] 00:38 < jeremy_c> I am getting out of memory errors, my program consumes about 1.8g then terminates. I am reading/writing thousands of 4mb files in a loop. I tried adding runtime.GC() but no difference. Each time through the loop I am { content := ioutils.ReadFile()... iouilts.WriteFile(...). } ... shouldn't GC take care of that? 00:39 < skelterjohn> try io.Copy 00:39 < jeremy_c> it crashes in ioutil.ReadAll. 00:40 -!- kr [~Keith@c-24-5-193-165.hsd1.ca.comcast.net] has joined #go-nuts 00:40 < jeremy_c> to a string writer then analyze the content of the string? I am not copying files, but reading, analyzing, writing an altered output. 00:40 < skelterjohn> ah 00:40 < skelterjohn> try writing to the same buffer each time 00:41 < jeremy_c> ok 00:41 -!- vpit3833 [~user@203.111.33.203] has joined #go-nuts 00:49 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has joined #go-nuts 00:50 < skelterjohn> but don't make a string out of that buffer - if you can manage it, do analysis on the []byte 00:50 < jeremy_c> skelterjohn: much better, my program now consumes 19mb. 00:50 < skelterjohn> oh good 00:51 < dfc> jeremy_c: 8g or 6g 00:51 < dfc> ? 00:51 < jeremy_c> dfc: 8g 00:51 < dfc> right, that is why it crashes at 1.8gb 00:51 < skelterjohn> he wanted to know why it bothered consuming tha tmuch in the first place 00:51 < jeremy_c> I still don't understand why why it ta..... right. what skelterjohn said 00:51 < skelterjohn> a perfect garbage collector would have thrown out the old data immediately 00:52 < skelterjohn> garbage collection is hard 00:55 < tylerl> remember that if there's any function or mechanism that can use a variable later on, even it it isn't actually used, it won't get GCed 00:56 < jeremy_c> tylerl: for { abc := ioutil.ReadFile("abc") } ? 00:56 < jeremy_c> I have not tried it, but I think that's the root of my problem. 01:01 -!- iant [~iant@67.218.107.213] has quit [Ping timeout: 252 seconds] 01:04 -!- niemeyer [~niemeyer@200-102-196-125.pltce701.dsl.brasiltelecom.net.br] has joined #go-nuts 01:06 < tylerl> jeremy_c: you just read the file, and then discard the contents? That's it? 01:13 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has quit [Quit: hcatlin] 01:15 < jeremy_c> tyler1, no, I do some analysis/changes and write out a new file but it's ReadFile being assigned to abc that never gets garbage collected. 01:15 < jeremy_c> yet each time around it is assigning to a new variable, the old variable contents is no longer accessible, thus I would have thought it would have been cleaned up. 01:17 < nictuku> jeremy_c, did you maybe forget to Close() the file descriptor? 01:17 < nictuku> it won't be closed for you. 01:18 < jeremy_c> In the original I only used ioutil.ReadFile() and ioutil.WriteFile() so I was not dealing with file descriptors. 01:21 -!- angasule [~angasule@190.2.33.49] has quit [Read error: Connection reset by peer] 01:24 < tylerl> jeremy_c: my point is this: look at where you're doing the analysis, changes, etc., and see if it's getting leaked there. Any closures or similar structures that have access to the var will keep it alive 01:26 -!- nkdnstbr [~nkdnstbr@nkdnstbr.com] has quit [Read error: Connection reset by peer] 01:26 -!- gaxxx [~woo@219.143.166.16] has joined #go-nuts 01:28 < jeremy_c> I'll look again but the program at this point is simple enough to be contained in 1 function :-) No types, nothing. Just really processing flags, looping, reading/testing/writing. 01:34 -!- foocraft [~ewanas@78.100.172.205] has joined #go-nuts 01:36 -!- kr [~Keith@c-24-5-193-165.hsd1.ca.comcast.net] has quit [Quit: WeeChat 0.3.4] 01:36 -!- krutcha [~krutcha@S010600045a27676a.vs.shawcable.net] has joined #go-nuts 01:38 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts 01:38 -!- niekie [~niek@CAcert/Assurer/niekie] has quit [Quit: No Ping reply in 180 seconds.] 01:39 -!- niekie [~niek@CAcert/Assurer/niekie] has joined #go-nuts 01:39 -!- KBme [~KBme@2001:470:cabe:666:666:666:666:666] has quit [Quit: KBme kthxbye] 01:39 -!- nictuku [~yvesj@unaffiliated/nictuku] has quit [Quit: .] 01:41 -!- KBme [~KBme@2001:470:cabe:666:666:666:666:666] has joined #go-nuts 01:46 -!- meanburrito920 [~john@76-217-6-100.lightspeed.irvnca.sbcglobal.net] has joined #go-nuts 01:46 -!- meanburrito920 [~john@76-217-6-100.lightspeed.irvnca.sbcglobal.net] has quit [Changing host] 01:46 -!- meanburrito920 [~john@unaffiliated/meanburrito920] has joined #go-nuts 02:33 -!- tylerl_ [~tylerl@ip24-251-232-171.ph.ph.cox.net] has left #go-nuts [] 02:45 -!- Transformer [~Transform@68-28-105-227.pools.spcsdns.net] has joined #go-nuts 02:47 -!- Transformer [~Transform@68-28-105-227.pools.spcsdns.net] has quit [Excess Flood] 02:55 -!- tylerl [~tylerl@ip24-251-232-171.ph.ph.cox.net] has joined #go-nuts 02:57 -!- meanburrito920 [~john@unaffiliated/meanburrito920] has quit [Ping timeout: 248 seconds] 03:01 -!- Nitro [~Nitro@unaffiliated/nitro] has quit [Quit: This computer has gone to sleep] 03:21 -!- tylerl [~tylerl@ip24-251-232-171.ph.ph.cox.net] has quit [Quit: leaving] 03:32 -!- foocraft [~ewanas@78.100.172.205] has quit [Ping timeout: 252 seconds] 03:33 -!- foocraft [~ewanas@78.100.216.24] has joined #go-nuts 03:36 -!- tyha2 [48be4003@gateway/web/freenode/ip.72.190.64.3] has joined #go-nuts 03:40 -!- vsayer [~vivek@c-67-170-236-166.hsd1.ca.comcast.net] has joined #go-nuts 03:43 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has joined #go-nuts 03:44 -!- mode/#go-nuts [+v iant] by ChanServ 03:52 -!- telexicon [~telexicon@unaffiliated/chowmeined] has joined #go-nuts 03:59 -!- meanburrito920 [~john@76-217-6-100.lightspeed.irvnca.sbcglobal.net] has joined #go-nuts 03:59 -!- meanburrito920 [~john@76-217-6-100.lightspeed.irvnca.sbcglobal.net] has quit [Changing host] 03:59 -!- meanburrito920 [~john@unaffiliated/meanburrito920] has joined #go-nuts 04:02 -!- niemeyer [~niemeyer@200-102-196-125.pltce701.dsl.brasiltelecom.net.br] has quit [Ping timeout: 240 seconds] 04:12 -!- meanburrito920 [~john@unaffiliated/meanburrito920] has quit [Ping timeout: 240 seconds] 04:15 -!- keithgcascio [~keithcasc@nat/google/x-wauebsfgsqjwykty] has quit [Quit: Leaving] 04:16 -!- aho [~nya@fuld-590c65e6.pool.mediaWays.net] has quit [Quit: EXEC_over.METHOD_SUBLIMATION] 04:17 -!- rejb [~rejb@unaffiliated/rejb] has quit [Disconnected by services] 04:17 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts 04:18 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts 04:18 -!- pingveno [~pingveno@c-98-246-133-8.hsd1.or.comcast.net] has quit [Ping timeout: 240 seconds] 04:21 -!- pingveno [~pingveno@c-98-246-133-8.hsd1.or.comcast.net] has joined #go-nuts 04:23 -!- foocraft [~ewanas@78.100.216.24] has quit [Quit: Leaving] 04:34 -!- meanburrito920 [~john@76-217-6-100.lightspeed.irvnca.sbcglobal.net] has joined #go-nuts 04:34 -!- meanburrito920 [~john@76-217-6-100.lightspeed.irvnca.sbcglobal.net] has quit [Changing host] 04:34 -!- meanburrito920 [~john@unaffiliated/meanburrito920] has joined #go-nuts 04:38 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has quit [Ping timeout: 240 seconds] 04:43 -!- tylerl [~tylerl@ip24-251-232-171.ph.ph.cox.net] has joined #go-nuts 04:43 < tylerl> is there a Go version of access(2)? 04:44 -!- vpit3833 [~user@203.111.33.203] has quit [Remote host closed the connection] 04:53 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has quit [Ping timeout: 276 seconds] 04:54 -!- edsrzf [~edsrzf@122-61-221-144.jetstream.xtra.co.nz] has joined #go-nuts 04:55 -!- boscop_ [~boscop@f055253036.adsl.alicedsl.de] has joined #go-nuts 04:57 -!- boscop [~boscop@g227007087.adsl.alicedsl.de] has quit [Ping timeout: 240 seconds] 04:59 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has joined #go-nuts 04:59 -!- mode/#go-nuts [+v iant] by ChanServ 05:00 -!- meanburrito920 [~john@unaffiliated/meanburrito920] has quit [Ping timeout: 240 seconds] 05:00 -!- ww [~ww@2.98.88.157] has quit [Ping timeout: 240 seconds] 05:01 -!- ww [~ww@2.98.88.157] has joined #go-nuts 05:01 -!- krutcha [~krutcha@S010600045a27676a.vs.shawcable.net] has quit [Quit: Leaving] 05:11 -!- ww [~ww@2.98.88.157] has quit [Ping timeout: 252 seconds] 05:19 -!- foocraft [~ewanas@78.100.216.24] has joined #go-nuts 05:24 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Ping timeout: 252 seconds] 05:26 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has quit [Ping timeout: 248 seconds] 05:26 -!- iant [~iant@216.239.45.130] has joined #go-nuts 05:26 -!- mode/#go-nuts [+v iant] by ChanServ 05:27 -!- ExtraSpice [XtraSpice@88.118.35.153] has joined #go-nuts 05:33 -!- Kafo [5b9a07e9@gateway/web/freenode/ip.91.154.7.233] has joined #go-nuts 05:35 -!- arun_ [~arun@i172010.upc-i.chello.nl] has joined #go-nuts 05:35 -!- arun_ [~arun@i172010.upc-i.chello.nl] has quit [Changing host] 05:35 -!- arun_ [~arun@unaffiliated/sindian] has joined #go-nuts 05:37 -!- tyha2 [48be4003@gateway/web/freenode/ip.72.190.64.3] has quit [Quit: Page closed] 05:50 -!- Adys [~Adys@unaffiliated/adys] has quit [Read error: Connection reset by peer] 05:52 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts 05:58 -!- sebastianskejoe [~sebastian@188.114.142.217] has joined #go-nuts 06:02 -!- Kafo [5b9a07e9@gateway/web/freenode/ip.91.154.7.233] has quit [Ping timeout: 252 seconds] 06:06 -!- boomtopper [~boomtoppe@cpc12-nrte22-2-0-cust249.8-4.cable.virginmedia.com] has joined #go-nuts 06:10 -!- Kafo [5b98b365@gateway/web/freenode/ip.91.152.179.101] has joined #go-nuts 06:14 -!- tvw [~tv@e176006181.adsl.alicedsl.de] has joined #go-nuts 06:20 -!- mikespook [~mikespook@119.131.233.224] has joined #go-nuts 06:23 -!- boomtopper [~boomtoppe@cpc12-nrte22-2-0-cust249.8-4.cable.virginmedia.com] has quit [Ping timeout: 260 seconds] 06:25 -!- ab3_ [~abe@ip-213-49-109-137.dsl.scarlet.be] has quit [Ping timeout: 276 seconds] 06:27 -!- fmoo [~Adium@66.220.144.74] has quit [Quit: Leaving.] 06:29 -!- wrtp [~rog@92.17.111.113] has joined #go-nuts 06:31 -!- Project_2501 [~Marvin@82.84.97.65] has joined #go-nuts 06:31 -!- tvw [~tv@e176006181.adsl.alicedsl.de] has quit [Ping timeout: 240 seconds] 06:34 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:dd0d:f100:1a4a:1f84] has joined #go-nuts 06:53 -!- fmoo [~Adium@c-76-102-41-101.hsd1.ca.comcast.net] has joined #go-nuts 06:58 -!- vsayer [~vivek@c-67-170-236-166.hsd1.ca.comcast.net] has quit [Ping timeout: 258 seconds] 06:59 -!- benjack [~benjack@bb121-6-49-43.singnet.com.sg] has joined #go-nuts 07:03 -!- piranha [~piranha@5ED42E59.cm-7-5a.dynamic.ziggo.nl] has joined #go-nuts 07:04 -!- mtrichardson [~mtrichard@li22-133.members.linode.com] has quit [Quit: ZNC - http://znc.sourceforge.net] 07:05 -!- mtrichardson [~mtrichard@li22-133.members.linode.com] has joined #go-nuts 07:07 -!- djcapelis [~djc@blender/coder/DJCapelis] has quit [Ping timeout: 276 seconds] 07:08 -!- djcapelis [~djc@capelis.dj] has joined #go-nuts 07:08 -!- djcapelis [~djc@capelis.dj] has quit [Changing host] 07:08 -!- djcapelis [~djc@blender/coder/DJCapelis] has joined #go-nuts 07:08 -!- vsayer [~vivek@c-67-170-236-166.hsd1.ca.comcast.net] has joined #go-nuts 07:10 < tylerl> how would you use a channel that can only send or only receive? Don't you need two endpoints to use it? 07:11 < tylerl> http://golang.org/doc/go_spec.html#Channel_types 07:11 < Namegduf> You'd take a channel and pass a send-only or receive-only channel into something. 07:12 < tylerl> Namegduf: so a function would take a send-only channel, which woudl be converted implicitly when you call it? 07:12 < tylerl> for example? 07:14 -!- GeertJohan [~geertjoha@s51478c91.adsl.wanadoo.nl] has joined #go-nuts 07:15 -!- fmoo [~Adium@c-76-102-41-101.hsd1.ca.comcast.net] has quit [Ping timeout: 260 seconds] 07:15 < dfc> func f(c <- chan int) { } 07:15 < dfc> then call 07:15 -!- fmoo [~Adium@32.153.224.253] has joined #go-nuts 07:15 < dfc> f(make(chan int)) 07:16 < tylerl> cool, thanks 07:16 < dfc> obviously, in real code you'd retain a reference to the chan you pass to f() 07:16 < dfc> but you get the idea 07:18 -!- tvw [~tv@212.79.9.150] has joined #go-nuts 07:22 -!- vpit3833 [~user@203.111.33.203] has joined #go-nuts 07:26 -!- telexicon [~telexicon@unaffiliated/chowmeined] has quit [Ping timeout: 252 seconds] 07:33 -!- Fish-- [~Fish@coss6.exosec.net] has quit [Quit: So Long, and Thanks for All the Fish] 07:33 -!- Fish [~Fish@exo3753.pck.nerim.net] has joined #go-nuts 07:36 -!- dfc [~dfc@eth59-167-133-99.static.internode.on.net] has quit [Ping timeout: 240 seconds] 07:37 -!- ww [~ww@78.148.85.176] has joined #go-nuts 07:46 -!- ab3 [~abe@83.101.72.80] has joined #go-nuts 07:50 -!- foocraft [~ewanas@78.100.216.24] has quit [Quit: Leaving] 07:55 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|] 08:06 -!- genbattle [~nick@203-173-210-96.dialup.ihug.co.nz] has joined #go-nuts 08:08 < genbattle> hi, i'm having some cgo problems 08:09 < genbattle> building with a makefile, but i keep getting a "undefined reference to `clGetPlatformIDs'" error 08:09 < Kafo> Have you set the compiler flags correctly? 08:10 < Kafo> As in "// #cgo LDFLAGS: -lthe_library_with_clGetPlatformIDs" or something 08:10 < genbattle> yes, "#cgo CFLAGS:-lOpenCL" 08:11 < genbattle> i'll try LDFLAGS 08:11 -!- piranha [~piranha@5ED42E59.cm-7-5a.dynamic.ziggo.nl] has quit [Ping timeout: 248 seconds] 08:12 < genbattle> sweet, it compiled without errors, thanks :-) 08:16 -!- ios_ [~ios@180.191.133.44] has joined #go-nuts 08:16 -!- ios_ [~ios@180.191.133.44] has left #go-nuts [] 08:17 < ww> oh very interesting. i've been meaning in a very back-burner kind of way to play with opencl 08:18 < ww> i proposed it for a project, doing the prune part of sweep and prune with geographical indexes 08:18 < ww> but it was decided that consumer gpus generate too much heat and server ones are too expensive so it got shelved 08:19 -!- piranha [~piranha@5ED42E59.cm-7-5a.dynamic.ziggo.nl] has joined #go-nuts 08:20 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts 08:25 -!- napsy [~luka@193.2.66.6] has joined #go-nuts 08:27 < genbattle> ww: i think opencl really is the way of the future :) 08:27 * uriel doubts it 08:28 < genbattle> at the moment computers are moving strongly to on-chip GPUs 08:28 < genbattle> from mobile to desktop 08:29 < genbattle> so when you combine that with a UMA system you have a massively parallel processing system with similar memory latency to the main CPU 08:29 -!- snearch [~snearch@f053011166.adsl.alicedsl.de] has joined #go-nuts 08:30 < genbattle> but i guess it'll always be a bit of a niche; prettymuch all parallel work can be done sequentially, but not all sequential work can be done in parallel 08:33 < ww> the programming model of opencl is a bit weird though, where you give the library a string of c-like code that it compiles for you 08:33 < genbattle> yea 08:33 < genbattle> that's true 08:33 < Kafo> Having no project ideas is depressing. 08:33 < genbattle> i should have said GPGPU is the way of the future 08:34 < genbattle> OpenCL is fairly clumsy because it's designed to support all dorts of hardware like DSPs and FPGAs 08:35 < genbattle> but i prefer a vendor and OS agnostic API over a better but closed API any day 08:35 < genbattle> Kafo: make a game? 08:35 < mpl> Kafo: how is that possible? 08:36 * uriel doesn't understand how it is possible that somebody has a lack of project ideas... 08:37 * uriel is drowning on ideas 08:37 * ww is running out of back burners 08:38 < uriel> all my backburners overheated from overload and burned down long ago :( 08:39 < Kafo> mpl: Probably because I'm not confident enough about my skills and the ideas die before I even begin with them or something. 08:39 < uriel> Kafo: that is not the same as not having ideas 08:39 < uriel> most of my ideas are probably retarded, or I'm too incompetent to make them succeed, but wont find out until I try 08:40 < genbattle> uriel: same situation here 08:40 -!- nkdnstbr [~nkdnstbr@nkdnstbr.com] has joined #go-nuts 08:40 < Kafo> uriel: That sounds like me. Should just slightly force myself to try. 08:41 < genbattle> Kafo: even if you're not confident about your skills, attack problems anyway, even if you don't get very far, i guarantee you will learn something :) 08:41 < uriel> Kafo: or look at an existing project and try to contribute something small 08:41 < uriel> that is always a good way to gain confidence 08:41 < genbattle> i'm attacking this opecl thing with total disregard for the fact the API is hard and no one will probably use it :P 08:42 < genbattle> but i'll learn about using cgo, and a little more about using openCL 08:43 < Kafo> Maybe I force myself to even partly implement the next idea I feel like doing. :D 08:44 < ww> Kefo, here's an idea - this would help me a lot if you're interested in this sort of thing. 08:44 < ww> suppose you have a list of books, with titles and authors and places of publication and such 08:45 < ww> something to say, the author of book1 is (probably) the same person as the author of book2 08:46 < ww> or, more straightforward but maybe a bit tedious, a MARC21 parser for Go 08:51 < mpl> Kafo: my problem is the contrary. I often start projects, underestimating their difficulty and I end up stalling on them because they take too long to finalize and I have too many on them to work on at the same time :/ 08:52 < genbattle> the trick is to keep chipping away at them 08:53 < mpl> yeah, but the context switch is high, it takes me more time to remember where I was than I have to spare on each of them 08:53 < genbattle> yea 08:53 < genbattle> i tend to do the same thing :) 08:53 < genbattle> these days i try and focus on one project 08:53 < genbattle> and just put the rest on an ideas list, rather than attacking them as i think of them 08:54 < genbattle> but i still haven't made much progress on this OpenCL one, so i can't talk 08:54 -!- gaxxx [~woo@219.143.166.16] has quit [Ping timeout: 276 seconds] 08:55 -!- hcatlin [~hcatlin@206.111.142.135.ptr.us.xo.net] has joined #go-nuts 08:55 -!- hcatlin [~hcatlin@206.111.142.135.ptr.us.xo.net] has quit [Changing host] 08:55 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has joined #go-nuts 08:55 < Kafo> I was happily working on a server emulator few months ago. 08:55 < Kafo> But they changed the packet encryption and I can't be bothered to try cracking it. 08:55 -!- gaxxx [~woo@219.143.166.16] has joined #go-nuts 08:56 -!- virtualsue [~chatzilla@nat/cisco/x-jtnpnnbndkiayynz] has joined #go-nuts 08:57 < ww> there's another interesting one - discovering network topology... 08:57 -!- nkdnstbr [~nkdnstbr@nkdnstbr.com] has quit [Quit: leaving] 08:57 < ww> to make pretty maps of other people's networks... 08:57 < ww> or what used to be called network audits (not sure if thye still call them that) 08:57 < ww> or for the first stages of pen-testing 08:58 -!- phanter [~chatzilla@ip71-75-212-87.adsl2.static.versatel.nl] has joined #go-nuts 08:59 < genbattle> anyone know a better reference for cgo than http://golang.org/cmd/cgo/ ? 08:59 < ww> anything that involves reverse engineering non-standard things is likely to become a non-interesting arms race, i can see why you got bored 08:59 < ww> genbattle: the code to the sqlite package is what i used as documentation 09:00 -!- gaxxx [~woo@219.143.166.16] has quit [Ping timeout: 252 seconds] 09:00 < genbattle> the code is have no problem with 09:00 < genbattle> i'm not much of a C programmer though 09:00 < genbattle> so build environments tend to get me 09:00 < phanter> In C++ one programs a class, then instantiate it. There can be more then 1 instance from a class (with their own internal variables). How do I create a Go class and instantiate it in the same way? 09:00 < genbattle> i can write C code, but compiling it, damn near impossible outside of anythign simple :P 09:01 < ww> what problem are you having? 09:01 < genbattle> phanter: use a go struct just as you would a class in C++ 09:02 < phanter> genbattle: I saw this indeed in some examples, but I cannot get my head around it. Are there any simple examples about this? 09:02 < genbattle> ww: i managed to compile a small test interface for opencl, but i don't know how to import it into another go program 09:03 < ww> CGO things are always packages - or at least I've never been able to do a command directly that uses CGO 09:03 < phanter> I mean, is it like plain old C; passing the struct to all functions so the functions know the 'internal' state? 09:04 < Kafo> Some kind of (de)compiler/debugger project would be interesting but it is too far from my programming skills. 09:04 < ww> so if you make a separate thing, using Make.cmd, for your actual main program, that imports your cgo package like you would any other go package 09:04 < genbattle> i've compiled my cgo code into a .a package 09:05 < ww> i'm guessing you're trying to do that in one 09:05 < ww> are you using gccgo or 6g? 09:05 < genbattle> i just keep getting errors when i try and build code which imports it, path problems 09:05 < genbattle> 6g 09:05 < genbattle> phanter: it's not like c 09:06 < ww> do you have two separate directories, one for your main program, one for your cgo package and are you using the Make.cmd and Make.pkg respectively? 09:07 < mpl> any idea how I can get an "unexpected EOF" when using bytes.ReadFrom() ? 09:07 < genbattle> phanter: if your struct it called mystruct then your function declaration would be "func (mystruct*) mymethod()" 09:07 < ww> you should gomake install the package (or fiddle with your GOPATH, but probably easiest to install it) 09:07 < genbattle> ww: yea i've got the lib in a subdir 09:08 < ww> do you have it on bitbucket or github or something? probably easiest to look at that way 09:08 < genbattle> nah i don't, but i can stick it up 09:09 < genbattle> it's just a bit of a mess atm :P 09:09 < genbattle> i've been playing with stuff every which way to try and get it to work 09:09 < phanter> oke; and how do I then instantiate it. Something like var myisnt := mypackage()? 09:09 -!- snearch [~snearch@f053011166.adsl.alicedsl.de] has quit [Quit: Verlassend] 09:09 < phanter> todo myinst.mymethod() 09:10 -!- gaxxx [~woo@li119-190.members.linode.com] has joined #go-nuts 09:11 < Kafo> phanter: "instance := new(MyType); instance.MyMethod()" ? 09:11 -!- nkdnstbr [~nkdnstbr@nkdnstbr.com] has joined #go-nuts 09:12 < phanter> So I have to define a type as well... have to look that up 09:13 < phanter> aah wait, the type is the struct? 09:13 < genbattle> phanter: yes 09:13 < phanter> like: type mystruct{} 09:13 < Kafo> "type MyType struct { field1 string; field2 uint32; }" 09:13 < phanter> I have to play with that a bit i think. 09:13 -!- nkdnstbr [~nkdnstbr@nkdnstbr.com] has quit [Client Quit] 09:14 < Kafo> Then methods are declared like "func (m MyType) GetField1() { return m.field1; }" 09:14 -!- nkdnstbr [~nkdnstbr@nkdnstbr.com] has joined #go-nuts 09:14 -!- fmoo [~Adium@32.153.224.253] has quit [Quit: Leaving.] 09:17 -!- fmoo [~Adium@32.153.224.253] has joined #go-nuts 09:21 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 264 seconds] 09:21 -!- fmoo [~Adium@32.153.224.253] has quit [Client Quit] 09:24 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts 09:33 < phanter> so. I am not yet there. I build something small and pasted it here (http://pastebin.com/PR1wyYPq). What do I do wrong in testclass.go? 09:33 -!- mikespook [~mikespook@119.131.233.224] has quit [Quit: Leaving.] 09:34 < Kafo> phanter: "m Mystruct*" should be "m *Mystruct" 09:34 < kamaji> damnit, I was just typing that! 09:35 < kamaji> :P 09:35 < kamaji> I don't 'spose anyone knows why time.Time.Weekday only seems to ever be 0? 09:35 < wrtp> phanter: you don't need the "var" keyword in parameter lists 09:36 < phanter> imported and not used: /home/patrick/Projects/Go/testclass 09:36 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts 09:36 < phanter> so compiling the testclass.go is a GO :) 09:36 < kamaji> groan :D 09:36 < wrtp> phanter: you don't need the semicolons either 09:37 < Kafo> Changing "instance := new(Mystruct);" to "instance := new(testclass.Mystruct)" should work. 09:37 < phanter> wrtp: yes I know.. but I am so attached to them ;) 09:37 < wrtp> same for "bla := instance.GetSurface()" 09:37 -!- fmoo [~Adium@66.220.144.74] has joined #go-nuts 09:37 < wrtp> phanter: run the code through gofmt! 09:37 < phanter> wrtp: what is gofmt 09:38 < Kafo> Source formatting utility 09:38 < Kafo> Run "gofmt ." in the project directory :) 09:38 < phanter> is my formatting incorrect? 09:39 < genbattle> ww: if you still wanted to look at my code https://bitbucket.org/genbattle/go-opencl 09:39 < jnwhiteh> gofmt will answer that question for us 09:39 < jnwhiteh> and you 09:39 < wrtp> phanter: try "godoc gofmt" 09:40 -!- tylerl [~tylerl@ip24-251-232-171.ph.ph.cox.net] has quit [Quit: leaving] 09:40 < ww> genbattle: ok, so do you "gomake install" in the cl directory? 09:41 < ww> otherwise (and without fiddling with GOPATH) the linker won't know where to look for it 09:42 < ww> I would also tend to put the test program in its own subdirectory, and use a makefile that's just the same except it includes Make.cmd instead of Make.pkg 09:42 < kamaji> Does Time.Weekday get set if you call Parse with a format string lacking "MONDAY"? 09:43 < genbattle> ww: i think my weakest link is definitely the build system 09:43 < phanter> gofmt is nice :) 09:43 < genbattle> my lack of c experience translates to a lack of make experience :P 09:43 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Read error: Operation timed out] 09:44 < ww> go is helpful that way - if you set up the directory structure right, you can more or less just use the included makefiles and don't need anything elaborate 09:44 < ww> with the bonus that it will work with goinstall (which doesn't use the makefiles you provide at all) 09:47 < wrtp> kamaji: "Only those elements present in the value will be set in the returned time structure." 09:47 < wrtp> worth reading the manual 09:48 < wrtp> if you want the weekday, you could convert to seconds and then back to *Time 09:48 < phanter> Yes, I got my head around it :) thanks to ya all 09:49 < genbattle> ww: i figured out my problem was the directory i was copying the package to 09:49 < genbattle> ww: i have my /usr/lib/ dir set up as the home for go 09:50 < genbattle> but i was copying it to another svn checkout of go i have floating around on my hdd 09:50 < genbattle> i'll set up the build system properly and i should be ok 09:50 < genbattle> hopefully i can get goinstall working 09:50 < genbattle> i've tried to use other repositories like the go-gtk interface and had endless problems goinstalling 09:51 < Kafo> I hated how gofmt once expanded like 30 lines of "for blahblah { a.method(0); }" to three lines each. 09:53 < ww> genbattle: if you want a working example, https://bitbucket.org/ww/gold 09:53 -!- gaxxx [~woo@li119-190.members.linode.com] has quit [Ping timeout: 252 seconds] 09:53 < ww> which has some subdirectories for supporting packages, two commands (harvest and deref) 09:53 < ww> and depends on two cgo packages goraptor and libxml 09:54 < ww> in the end you can (or should be able to) just goinstall bitbucket.org/ww/gold/harvest and it will do all the dependencies and install the harvest command 09:54 -!- gaxxx [~woo@li119-190.members.linode.com] has joined #go-nuts 09:54 < ww> but it's obviously not a minimal example :) 09:55 < genbattle> heh, it sounds perfect though 09:56 < genbattle> i should be able to break it down to my level, thanks :) 09:57 < ww> the top-level makefile has some special targets, build, tidy, that i use in the development process, so i just do "gomake build", but for actuall installations they're ignored 09:59 -!- benjack [~benjack@bb121-6-49-43.singnet.com.sg] has quit [Quit: Leaving.] 09:59 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts 10:00 -!- apexo [~apexo@2a01:238:436b:8301:5054:ff:fe87:82fb] has quit [Ping timeout: 260 seconds] 10:01 -!- cbeck1 [cbeck@gateway/shell/pdx.edu/x-nueiyazzrxsytazh] has joined #go-nuts 10:01 < ww> one important thing is now that you have it on bitbucket, you should use import "bitbucket.org/genbattle/go-opencl/cl" 10:01 < ww> that will make goinstall happy 10:01 -!- cbeck [cbeck@gateway/shell/pdx.edu/x-xktjdbwjinwukzzo] has quit [Ping timeout: 260 seconds] 10:02 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Read error: Operation timed out] 10:02 -!- apexo [~apexo@2a01:238:436b:8301:5054:ff:fe87:82fb] has joined #go-nuts 10:03 < genbattle> once i have the build system up and running i'll make sure i reconfigure it 10:03 < genbattle> thanks for all your help ww, made more progress in one night than the last 2 weeks :) 10:04 < ww> a pleasure, genbattle 10:06 < Kafo> Bye people, school time. :) 10:09 < kamaji> wrtp: oh... thanks 10:10 < ww> "present" is a slippery concept there though 10:11 -!- Kafo [5b98b365@gateway/web/freenode/ip.91.152.179.101] has quit [Ping timeout: 252 seconds] 10:11 < kamaji> ww: how so? 10:11 < kamaji> also, how can I then get the weekday?? 10:13 < ww> well the week day isn't "present" in the seconds representation, for example... it's inferred 10:14 < ww> if something is implied like that, is it "present" in the original data? 10:14 < kamaji> oh right, I think it means present in the format string 10:14 < ww> cue existentialist discussion 10:14 < kamaji> lol 10:15 < wrtp> ww: that documentation is on Parse, not Time 10:16 < ww> if i had the energy, i'd argue that weekday is "present" in "2011-05-05T00:00:00Z" in the same way it is present in the seconds... 10:16 < ww> hey, happy cinqo de maio 10:17 < wrtp> ww: the time string doesn't have to contain a timezone 10:17 < wrtp> so the present rule is simpler 10:18 < kamaji> So pkg time has no way to find weekday from a date? 10:18 < wrtp> it does 10:18 < wrtp> as i said earlier 10:18 < wrtp> convert to Seconds and then back to *Time 10:18 < kamaji> oh, must've missed that, sorry 10:24 -!- edsrzf [~edsrzf@122-61-221-144.jetstream.xtra.co.nz] has quit [Remote host closed the connection] 10:25 -!- ab3 [~abe@83.101.72.80] has quit [Ping timeout: 240 seconds] 10:26 -!- sebastianskejoe [~sebastian@188.114.142.217] has quit [Ping timeout: 260 seconds] 10:27 -!- sebastianskejoe [~sebastian@188.114.142.217] has joined #go-nuts 10:28 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts 10:31 < genbattle> thanks again for all the help, i'm off to bed, night 10:33 -!- genbattle [~nick@203-173-210-96.dialup.ihug.co.nz] has quit [Quit: Leaving] 10:34 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has quit [Quit: hcatlin] 10:36 -!- phanter [~chatzilla@ip71-75-212-87.adsl2.static.versatel.nl] has quit [Quit: ChatZilla 0.9.86.1 [Firefox 4.0.1/20110429131801]] 10:41 -!- Nitro [~Nitro@unaffiliated/nitro] has joined #go-nuts 10:45 -!- Nitro [~Nitro@unaffiliated/nitro] has quit [Read error: Operation timed out] 10:49 -!- gaxxx [~woo@li119-190.members.linode.com] has quit [Ping timeout: 260 seconds] 10:49 -!- shvntr [~shvntr@116.26.131.205] has joined #go-nuts 11:09 -!- ab3 [~abe@83.101.72.80] has joined #go-nuts 11:14 -!- virtualsue [~chatzilla@nat/cisco/x-jtnpnnbndkiayynz] has quit [Ping timeout: 248 seconds] 11:31 < xyproto> If I write a webpage in Go (self-serving), where can I host it? 11:35 -!- artefon [~thiago@189.59.133.187] has joined #go-nuts 11:35 < wrtp> xyproto: any place you can serve any compiled web server :-) 11:35 < wrtp> it'd be nice if google app engine supported Go... 12:02 -!- sebastianskejoe [~sebastian@188.114.142.217] has quit [Ping timeout: 260 seconds] 12:06 < xyproto> wrtp: yes, app engine support would be nice 12:11 -!- virtualsue [~chatzilla@nat/cisco/x-uxkadnojjyxefoor] has joined #go-nuts 12:22 -!- fmoo [~Adium@66.220.144.74] has quit [Quit: Leaving.] 12:30 -!- niemeyer [~niemeyer@200-102-196-125.pltce701.dsl.brasiltelecom.net.br] has joined #go-nuts 12:43 -!- GeertJohan [~geertjoha@s51478c91.adsl.wanadoo.nl] has quit [Remote host closed the connection] 12:43 -!- GeertJohan [~geertjoha@s51478c91.adsl.wanadoo.nl] has joined #go-nuts 12:45 -!- zerosanity [~josh@8.20.178.82] has joined #go-nuts 12:45 -!- Niedar [~bleh@ip68-99-166-222.hr.hr.cox.net] has quit [Read error: Connection reset by peer] 12:47 -!- Niedar [~bleh@ip68-99-166-222.hr.hr.cox.net] has joined #go-nuts 12:48 -!- Nitro [~Nitro@unaffiliated/nitro] has joined #go-nuts 12:49 -!- Nitro [~Nitro@unaffiliated/nitro] has left #go-nuts [] 12:49 -!- phanter [~chatzilla@ip71-75-212-87.adsl2.static.versatel.nl] has joined #go-nuts 12:49 -!- Nitro [~Nitro@unaffiliated/nitro] has joined #go-nuts 12:49 -!- sebastianskejoe [~sebastian@188.114.142.217] has joined #go-nuts 12:49 < phanter> hmm, how would this work: type Board struct { var board [6][6]int } 12:50 < phanter> I get this error: unexpected var, expecting name or * or ( or } 12:52 < vegai> "unexpected var" would suggest that you want to drop the 'var' keyword :) 12:52 < vegai> http://golang.org/doc/go_spec.html#Struct_types 12:55 -!- snearch [~snearch@f053011166.adsl.alicedsl.de] has joined #go-nuts 12:57 < phanter> i see... i keep on making mistakes like this. Still a way to go before I grasp it all 12:58 < skelterjohn> keep asking in here - we're happy to helpo 12:58 < skelterjohn> help 13:00 < xyproto> phanter: another comment/explanation could be that types and variables differ. Structs are types. Ints are types. Variables can be a type, and that's where the "var" keyword enters the picture, not when defining a type. 13:02 -!- Nitro [~Nitro@unaffiliated/nitro] has quit [Ping timeout: 276 seconds] 13:03 -!- KirkMcDonald [~Kirk@python/site-packages/KirkMcDonald] has quit [Ping timeout: 252 seconds] 13:06 < phanter> I was also wondering how I can ask and wait for user input (keyboard) 13:06 -!- Nitro [~Nitro@unaffiliated/nitro] has joined #go-nuts 13:07 < phanter> (the name of this language makes it almost impossible to search anything on the web :() 13:07 < xyproto> phanter: one way is using SDL, if you had a game in mind 13:07 < xyproto> phanter: if you use the keyword "golang" it gets easier 13:08 < phanter> golang... good pointer 13:08 < phanter> no, it is not for a game 13:09 -!- petrux [~petrux@host16-224-static.53-82-b.business.telecomitalia.it] has joined #go-nuts 13:14 < xyproto> phanter: here's a simple way for the commandline: http://go.pastie.org/1867911 13:14 < skelterjohn> do you mean just reading from standard input? 13:14 < skelterjohn> os.Stdin is a file which you can read from 13:14 < skelterjohn> a nice way is to use the bufio package 13:15 < xyproto> I think Go should be renamed to Golang 13:15 < xyproto> Just to make it easier to search for 13:17 < tux21b> C and C++ isn't searchable either 13:18 < skelterjohn> C is quite searchable 13:18 < tux21b> i think it's just popular, but not really searchable 13:18 < skelterjohn> search for "C example" 13:19 < skelterjohn> the problem with go is that go means something else 13:19 < xyproto> skelterjohn: agree 13:19 < wrtp> "go language" works ok for me 13:19 < skelterjohn> C can refer to answer choice C, I guess, but that's hardly worth a web page 13:19 < aiju> why do you even search on google for something? 13:19 < aiju> it's all on golang.org or golang.cat-v.org 13:19 < skelterjohn> aiju: and 21kb is enough memory for anyone 13:19 < xyproto> aiju: you're right. Now we have... Duck Duck Go: http://duckduckgo.com/ 13:19 < tux21b> searching for "go example" here yields the go tutorial on first place followed by a couple of stackoverflow questions 13:20 < tux21b> maybe you just have to search for it quite often ;) 13:20 < aiju> skelterjohn: i mean .. for something about go 13:20 < xyproto> (duck duck go is quite capable of separating different meanings of the same term) 13:20 < skelterjohn> tux21b: showing that go is searchable doesn't show that C isn't 13:21 < aiju> c++ used to be totally unsearchable 13:21 < aiju> the ++ made google barf 13:21 < skelterjohn> aiju: why would you need to? it's all in (insert some website about C++) 13:22 < aiju> C++ has no official homepage 13:22 < xyproto> we could make one 13:22 < aiju> http://goatse.cx is close 13:22 < skelterjohn> no we couldn't 13:22 < skelterjohn> we could make a homepage 13:22 < xyproto> :P 13:22 < skelterjohn> we couldn't make an official homepage 13:23 < xyproto> skelterjohn: pft, you just don't have the official spirit over you 13:23 < skelterjohn> i don't get it 13:23 < xyproto> skelterjohn: just making fun of officialdom. Sorry. Bad pun. 13:24 < skelterjohn> my wife told me that i couldn't deadpan anyone to shame over a joke on the internet 13:24 < skelterjohn> she was *wrong*! 13:24 < xyproto> skelterjohn: :D 13:25 < xyproto> skelterjohn: +1 to wife 13:27 -!- meanburrito920 [~john@76-217-6-100.lightspeed.irvnca.sbcglobal.net] has joined #go-nuts 13:27 -!- meanburrito920 [~john@76-217-6-100.lightspeed.irvnca.sbcglobal.net] has quit [Changing host] 13:27 -!- meanburrito920 [~john@unaffiliated/meanburrito920] has joined #go-nuts 13:28 < xyproto> meanburrito920: smooth entry. We'll never know about 76-217-6-100.lightspeed.irvnca.sbcglobal.net now :P 13:29 -!- Stiletto [7f000001@69.195.144.4] has quit [Ping timeout: 240 seconds] 13:30 < skelterjohn> i'm pretty sure the irc server did that 13:32 -!- GeertJohan [~geertjoha@s51478c91.adsl.wanadoo.nl] has quit [Remote host closed the connection] 13:32 -!- GeertJohan [~geertjoha@s51478c91.adsl.wanadoo.nl] has joined #go-nuts 13:33 -!- pharris [~Adium@rhgw.opentext.com] has joined #go-nuts 13:34 -!- Stiletto [7f000001@69.195.144.4] has joined #go-nuts 13:35 -!- Project_2501 [~Marvin@82.84.97.65] has quit [Read error: Operation timed out] 13:37 < xyproto> skelterjohn: gah, +2, I feel humiliated ;) 13:37 < aiju> all DNS names should be like that 13:37 < aiju> simplifies lookup 13:37 -!- arun__ [~arun@i172010.upc-i.chello.nl] has joined #go-nuts 13:38 < aiju> 105-149-85-209.google.com 13:39 < xyproto> aiju: just wait until IPv6 catches on... :P 13:39 -!- arun_ [~arun@unaffiliated/sindian] has quit [Ping timeout: 240 seconds] 13:39 < xyproto> 2001:0db8:85a3:08d3:1319:8a2e:0370:7344 13:39 < xyproto> .google.com 13:41 < xyproto> I've never visted an IPv6 url in my browser. I wonder where I can find one. http://[...]/ for the above adr did not work. 13:41 < xyproto> brackets are required 13:44 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-163-72.clienti.tiscali.it] has joined #go-nuts 13:44 -!- meanburrito920 [~john@unaffiliated/meanburrito920] has quit [Ping timeout: 276 seconds] 13:47 -!- Niedar [~bleh@ip68-99-166-222.hr.hr.cox.net] has quit [Read error: Connection reset by peer] 13:48 -!- ExtraSpice [XtraSpice@88.118.35.153] has quit [Ping timeout: 276 seconds] 13:49 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has joined #go-nuts 13:50 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Ping timeout: 252 seconds] 13:52 -!- petrux [~petrux@host16-224-static.53-82-b.business.telecomitalia.it] has quit [Quit: leaving] 13:57 -!- napsy [~luka@193.2.66.6] has quit [Quit: Lost terminal] 14:00 -!- KirkMcDonald [~Kirk@python/site-packages/KirkMcDonald] has joined #go-nuts 14:07 -!- Venom_X [~pjacobs@66.54.185.131] has joined #go-nuts 14:07 -!- viirya [~viirya@cml506-25.csie.ntu.edu.tw] has quit [Read error: Connection reset by peer] 14:07 -!- viirya [~viirya@cml506-25.csie.ntu.edu.tw] has joined #go-nuts 14:07 -!- viirya [~viirya@cml506-25.csie.ntu.edu.tw] has quit [Read error: Connection reset by peer] 14:07 -!- GeertJohan [~geertjoha@s51478c91.adsl.wanadoo.nl] has quit [Quit: Leaving.] 14:09 -!- rlab [~Miranda@91.200.158.34] has quit [Read error: Connection reset by peer] 14:12 -!- viirya [~viirya@cml506-25.csie.ntu.edu.tw] has joined #go-nuts 14:15 -!- imsplitbit [~imsplitbi@64.39.4.132] has joined #go-nuts 14:17 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Quit: skelterjohn] 14:18 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts 14:19 -!- jbooth1 [~jay@209.249.216.2] has joined #go-nuts 14:20 -!- shvntr [~shvntr@116.26.131.205] has quit [Ping timeout: 248 seconds] 14:25 < xyproto> Has someone yet written a C-compiler in Go? 14:29 -!- artefon [~thiago@189.59.133.187] has quit [Remote host closed the connection] 14:29 -!- artefon [~thiago@189.59.133.187] has joined #go-nuts 14:31 -!- hazmat [~hazmat@204-232-198-49.static.cloud-ips.com] has quit [Changing host] 14:31 -!- hazmat [~hazmat@plone/hazmat] has joined #go-nuts 14:31 -!- artefon [~thiago@189.59.133.187] has quit [Remote host closed the connection] 14:31 -!- artefon [~thiago@189.59.133.187] has joined #go-nuts 14:36 -!- plainhao [~plainhao@208.75.85.237] has joined #go-nuts 14:38 -!- exch [~exch@c74149.upc-c.chello.nl] has quit [Quit: leaving] 14:39 -!- phanter [~chatzilla@ip71-75-212-87.adsl2.static.versatel.nl] has quit [Ping timeout: 240 seconds] 14:42 < uriel> xyproto: not AFAIK, Go might be a good language to do this, but I'm not sure anyone is particularly motivated, why not just use Go? 14:44 -!- sacho [~sacho@95-42-64-32.btc-net.bg] has joined #go-nuts 14:44 -!- napsy [~luka@88.200.96.18] has joined #go-nuts 14:45 -!- meanburrito920 [~john@unaffiliated/meanburrito920] has joined #go-nuts 14:46 < xyproto> uriel: I can imagine at least one reason, which would be to see if Go was any good at this type of task. 14:46 -!- exch [~exch@c74149.upc-c.chello.nl] has joined #go-nuts 14:48 < uriel> xyproto: there are plenty of projects to write compilers and VMs in go: http://go-lang.cat-v.org/go-code 14:48 < uriel> see virtual machines and languages section. 14:54 < mpl> how wrong is it that I find comfort that at least "cout <<" is easy to type when having to write c++? :) 14:56 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 252 seconds] 14:57 < xyproto> mpl: very, you should wrap cout in a bunch of "::"'s to repent ;) 14:59 < mpl> yes. what were they thinking, providing something easy to use and type in c++... 15:00 -!- virtualsue [~chatzilla@nat/cisco/x-uxkadnojjyxefoor] has quit [Quit: ChatZilla 0.9.86.1 [Firefox 4.0/20110318052756]] 15:01 < xyproto> mpl: I think they were experiencing the dirty joys of operator overloading 15:06 -!- skelterjohn [~jasmuth@lawn-gw.rutgers.edu] has joined #go-nuts 15:11 < skelterjohn> any mac devs in here? 15:12 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-163-72.clienti.tiscali.it] has quit [Ping timeout: 240 seconds] 15:14 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-163-72.clienti.tiscali.it] has joined #go-nuts 15:15 -!- Niedar [~bleh@ip68-99-166-222.hr.hr.cox.net] has joined #go-nuts 15:16 -!- unofficialmvp [~dev@94-62-164-227.b.ipv4ilink.net] has joined #go-nuts 15:16 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has quit [Ping timeout: 612 seconds] 15:16 -!- unofficialmvp [~dev@94-62-164-227.b.ipv4ilink.net] has left #go-nuts [] 15:20 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-179-221.clienti.tiscali.it] has joined #go-nuts 15:22 -!- piranha [~piranha@5ED42E59.cm-7-5a.dynamic.ziggo.nl] has quit [Quit: Computer has gone to sleep.] 15:22 -!- petrux [~petrux@host16-224-static.53-82-b.business.telecomitalia.it] has joined #go-nuts 15:24 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-163-72.clienti.tiscali.it] has quit [Ping timeout: 252 seconds] 15:24 -!- flaguy48 [~gmallard@user-0c6s350.cable.mindspring.com] has joined #go-nuts 15:29 -!- cco3 [~conleyo@nat/google/x-uuazxkvhehwxykur] has joined #go-nuts 15:36 < wrtp> skelterjohn: i develop on macs 15:37 < _nil> wrtp: cool 15:37 < _nil> i'm debating getting a macbook pro but can't decide to get matte or glossy 15:39 < uriel> grrrr... the fucking spam is getting in my god damned nerves 15:39 < uriel> adg: *please* enable moderation for new posters *PLEASE* 15:39 < uriel> gogole group's spam filtering is a joke 15:40 -!- meanburrito920 [~john@unaffiliated/meanburrito920] has quit [Ping timeout: 252 seconds] 15:43 -!- piranha [~piranha@5ED43A0B.cm-7-5a.dynamic.ziggo.nl] has joined #go-nuts 15:45 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has quit [Read error: Connection reset by peer] 15:47 -!- artefon [~thiago@189.59.133.187] has quit [Read error: Connection reset by peer] 15:50 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts 15:52 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has joined #go-nuts 15:52 -!- gmilleramilar [~gmiller@pool-74-101-133-165.nycmny.fios.verizon.net] has quit [Quit: Leaving.] 15:53 -!- piranha [~piranha@5ED43A0B.cm-7-5a.dynamic.ziggo.nl] has quit [Remote host closed the connection] 16:02 < Venom_X> hello, so I'm trying to compile the latest from the go repository. I get as far as : fail: fixedbugs/bug324.go. Then is stops.. It's been there for 5 or so minutes. I don't think it's going to continue. What gives? 16:16 < skelterjohn> wrtp: UI stuff? 16:17 -!- sebastianskejoe [~sebastian@188.114.142.217] has quit [Quit: Lost terminal] 16:20 -!- petrux [~petrux@host16-224-static.53-82-b.business.telecomitalia.it] has quit [Quit: leaving] 16:22 -!- Kafo [3e4ed8ee@gateway/web/freenode/ip.62.78.216.238] has joined #go-nuts 16:24 -!- boomtopper [~boomtoppe@cpc12-nrte22-2-0-cust249.8-4.cable.virginmedia.com] has joined #go-nuts 16:25 -!- foocraft [~ewanas@78.101.69.106] has joined #go-nuts 16:27 -!- artefon [~thiago@dhcp17.usuarios.dcc.ufmg.br] has joined #go-nuts 16:27 -!- vsayer [~vivek@c-67-170-236-166.hsd1.ca.comcast.net] has quit [Ping timeout: 248 seconds] 16:32 < wrtp> skelterjohn: no, backend stuff - although i have done UI stuff under a predecessor of mac os 16:32 < skelterjohn> me too - in my room back where i grew up i have a shelf full of "inside macintosh" books! 16:32 -!- DerHorst [~Horst@e176102149.adsl.alicedsl.de] has joined #go-nuts 16:32 < skelterjohn> system 7! 16:33 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts 16:36 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts 16:37 -!- tvw [~tv@212.79.9.150] has quit [Read error: Connection reset by peer] 16:40 < wrtp> nextstep & openstep for me, more of a direct predecessor :-) 16:40 < wrtp> a lot of stuff in mac os API is still prefixed "NS"... 16:41 < wrtp> (they don't have gofix :-]) 16:43 -!- Bigbear1 [~Cody@d75-158-140-53.abhsia.telus.net] has joined #go-nuts 16:43 < Kafo> Heavily off-topic but what is that fancy verb I can use when I say I'm able to learn something new and start using them without problems like software and development environment? 16:45 < wrtp> sounds like an adjective not a verb... 16:47 < mpl> Kafo: a quick learner? 16:47 -!- keithcascio [~keithcasc@nat/google/x-nzhgnvoymsprqcbx] has joined #go-nuts 16:47 < mpl> which is indeed neither a verb, nor fancy. 16:47 < Kafo> I'm looking for a verb like in "I'm able to easily _verb_ new software if needed." 16:48 < mdxi> syncretize 16:48 <+iant> "use" 16:48 < jnwhiteh> 'grok' clearly, but I'm not sure if that'll work outside the interwebs =) 16:48 < Kafo> I've been wondering about that for ages now and I'm 100% sure I saw it somewhere a while ago. 16:49 <+iant> Oh, wait, you wanted a fancy word: "utilize" 16:50 <@adg> Kafo: "I'm a fast learner and can quickly become productive with new technlogies." 16:50 < mdxi> "I excel at rapid syncresis and utilization of novel programming methodologies" 16:50 -!- jyxent [~jyxent@129.128.191.96] has quit [Ping timeout: 258 seconds] 16:50 < uriel> adg: if you don't trust me, listen to brad: https://groups.google.com/forum/#!topic/perl-appengine/KvnNwntDFTI 16:51 < skelterjohn> how about "hire me" 16:51 < ww> o'er on this side o' the pond, "utilize" isn't fancy at all 16:51 < Kafo> It's adapt! 16:51 < ww> (but it still sounds funny to my ears) 16:51 <@adg> uriel: ehhh 16:51 < mdxi> (i'm trying to sound like a horribly buzzwordy resume, sine you said you wanted fancy. i really do love the word "syncretic", however) 16:51 < Kafo> At least I think it is 16:52 <@adg> uriel: it's not that bad, is it? 16:52 < Kafo> Is adapt correct in "I'm able to easily adapt new software if needed."? 16:52 <@adg> "adapt to" 16:53 <@adg> "adapt software" implies changing the software 16:53 < skelterjohn> adopt 16:53 < skelterjohn> or adapt to 16:53 < PJRobins> sounds like you are adapable 16:53 < Kafo> Adapt to that is then. 16:53 <@adg> "I can cope with change, man." 16:53 < uriel> it is worse than in any other list I'm on, and every time I hit the spam button Gmail promptly suggests I unsubscribe from golang-nuts (or go-dev) 16:53 < ww> assimilate 16:54 < uriel> i wonder how many people just take the suggestion 16:54 < skelterjohn> uriel: do you have it email you all the postings? 16:54 < skelterjohn> i just use the google groups interface page 16:54 < uriel> skelterjohn: ? it is a mailing list 16:54 < skelterjohn> i see a spam message maybe once a week 16:54 <+iant> uriel: I'm marking all the spam postings as spam in the google groups discussion list 16:54 <+iant> uriel: I hope they will be able to adapt 16:54 < uriel> iant: it doesn't help 16:54 <+iant> it's a learning system 16:54 < uriel> maybe some day they will, it doesn't so far 16:55 <+iant> believe me, they block a lot of spam which you aren't seeing 16:55 <+iant> I see them on the list of messages waiting to be moderated 16:55 < uriel> I believe you, it is not enough, as I said, the go lists are the only ones I get spam from this days, and it is not getting better (or admitedly worse) 16:57 < skelterjohn> i think a nice system would be that pre-whitelisted users messages would appear on the google groups page, and when people read it there they can vote to let the person in. sort of like, everyone is a moderator 16:57 < skelterjohn> wouldn't work on every list 16:57 < skelterjohn> but for go-nuts or go-dev it would 16:57 < mdxi> i'm thinking of passing a (reference to a) map of interfaces as the single argument to a func, in order to mock named arguments. is this good form/bad form/meh? 16:58 < skelterjohn> mdxi: a map type is a reference type, btw 16:58 < skelterjohn> mdxi: and when i want to do that i usually make a parameter struct type 16:58 < skelterjohn> then they're both named and typed 16:58 < aiju> i simply overthink my design 16:58 -!- jyxent [~jyxent@129.128.191.96] has joined #go-nuts 16:59 < mdxi> skelterjohn: thanks 16:59 <@adg> uriel: i'll think about it some more when i have time 16:59 < uriel> skelterjohn: google groups (as brad point sout) has a fairly good solution: require moderation for the first message of every new poster 16:59 < ww> i often use goconfig for that - particularly when the values come from a config file 16:59 < skelterjohn> something i regularly do in my code is make a "type Config struct { stuff }" and a "func ConfigDefault() Config" method for a package that needs it 16:59 -!- ShadowIce [~pyoro@HSI-KBW-109-193-120-162.hsi7.kabel-badenwuerttemberg.de] has joined #go-nuts 16:59 -!- ShadowIce [~pyoro@HSI-KBW-109-193-120-162.hsi7.kabel-badenwuerttemberg.de] has quit [Changing host] 16:59 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts 16:59 <@adg> uriel: i think that's what we'll end up doing 16:59 <+iant> uriel: that is how we configured it originally, but rsc argued against it 16:59 < skelterjohn> uriel: right - i'm essentially suggesting a method where it wouldn't fall to a small group to moderate it 17:00 < uriel> adg: that would be great, I run a few (admitedly smaller) google groups, and is the only system to keep spam away that actually works 17:00 -!- jyxent [~jyxent@129.128.191.96] has quit [Client Quit] 17:00 < uriel> adg: and it is not much work really, less work than flagging the spam that gets through (which wastes the time of everyone in the list) 17:00 -!- jyxent [~jyxent@129.128.191.96] has joined #go-nuts 17:01 < ww> you'd think, google with its massive graph of who emails who, would use that to seed the reputation of new posters 17:01 < aiju> who emails whom! 17:01 * aiju hides 17:01 < ww> aiju: you're not wrong 17:01 < uriel> ww: in fairnes google also is targetted much more than most other people 17:01 < skelterjohn> whom emails whome /pet peeve 17:02 < uriel> ww: still, their spam filter for gmail is infinitely better than for google groups 17:02 < ww> and the two are not joined up? shocking... 17:02 <+iant> yeah, that is weird 17:02 <+iant> I don't understand that either 17:03 -!- Bigbear1 [~Cody@d75-158-140-53.abhsia.telus.net] has quit [Read error: Connection reset by peer] 17:03 < ww> technically i think it's "who emails to whom" 17:05 -!- Bigbear1 [~Cody@d75-158-140-53.abhsia.telus.net] has joined #go-nuts 17:06 < aiju> i email people 17:06 < aiju> and not to people 17:06 < homa_rano> you send email to people, but you email people 17:06 < uriel> in more on-topic news: http://news.ycombinator.com/item?id=2517338 17:06 < ww> anybody else here run go on freebsd? 17:07 < aiju> ycombinator and reddit should be more like 4chan 17:07 < ww> i think but am not sure that 1778 might be related to the MAP_FIXED thing 17:07 * niemeyer imagines aiju crunching someone and putting in the wire bit by bit 17:08 < aiju> niemeyer: hahahahaha 17:08 < ww> aiju: if you use a pen and paper do you write people or do you write to people? 17:09 < aiju> i write people a letter 17:09 < aiju> or i write a letter to people 17:09 < aiju> i'm no native, though 17:09 < ww> so you write to people, which is correct. so why don't you email to people? 17:09 < aiju> no clue 17:10 < skelterjohn> not aiju's fault that english has no consistency 17:10 < skelterjohn> he certainly isn't getting anything wrong 17:10 < aiju> i'm german 17:10 < aiju> if any, i should make the language more inconsistent 17:11 < ww> well... i wasn't trying to troll for pedanticness when i wrote email who 17:11 < ww> :P 17:12 < ww> back on topic - any guesses re: #1778 perhaps iant who has forgotten more about linkers than i will ever know? 17:12 -!- nitro__ [~Nitro@dsl-173-248-242-211.acanac.net] has joined #go-nuts 17:13 -!- artefon [~thiago@dhcp17.usuarios.dcc.ufmg.br] has quit [Ping timeout: 258 seconds] 17:14 -!- Nitro [~Nitro@unaffiliated/nitro] has quit [Read error: Connection reset by peer] 17:14 < skelterjohn> that channel sucks 17:15 < aiju> which one? 17:16 < skelterjohn> #1778 17:16 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has joined #go-nuts 17:16 * ww groans 17:17 -!- hcatlin [~hcatlin@206.111.142.135.ptr.us.xo.net] has joined #go-nuts 17:17 -!- hcatlin [~hcatlin@206.111.142.135.ptr.us.xo.net] has quit [Changing host] 17:17 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has joined #go-nuts 17:17 -!- nitro__ [~Nitro@dsl-173-248-242-211.acanac.net] has quit [Ping timeout: 252 seconds] 17:18 -!- nitro__ [~Nitro@modemcable086.138-70-69.static.videotron.ca] has joined #go-nuts 17:19 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has quit [Ping timeout: 260 seconds] 17:19 <+iant> ww: Sorry, I don't know what that means; I posted a request for readelf -dl output in case it indicates anything 17:22 < ww> iant: attached 17:23 -!- dlowe [~dlowe@ita4fw1.itasoftware.com] has joined #go-nuts 17:24 -!- Kafo [3e4ed8ee@gateway/web/freenode/ip.62.78.216.238] has quit [Ping timeout: 252 seconds] 17:24 < ww> is line 54 suspicious? 17:25 < ww> 0x0000000000000001 (NEEDED) Shared library: [] 17:29 -!- Fish- [~Fish@9fans.fr] has joined #go-nuts 17:30 -!- Nitro [~Nitro@modemcable086.138-70-69.static.videotron.ca] has quit [Changing host] 17:30 -!- Nitro [~Nitro@unaffiliated/nitro] has joined #go-nuts 17:31 -!- artefon [~thiago@dhcp26.usuarios.dcc.ufmg.br] has joined #go-nuts 17:42 -!- foocraft [~ewanas@78.101.69.106] has quit [Quit: Leaving] 17:48 -!- ribo [~ribo@pfsense/mirrors/ribo] has joined #go-nuts 17:49 < ribo> just starting to look at go, does the http client package support SSL? 17:50 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has quit [Remote host closed the connection] 17:53 -!- meanburrito920 [~john@76-217-6-100.lightspeed.irvnca.sbcglobal.net] has joined #go-nuts 17:53 -!- meanburrito920 [~john@76-217-6-100.lightspeed.irvnca.sbcglobal.net] has quit [Changing host] 17:53 -!- meanburrito920 [~john@unaffiliated/meanburrito920] has joined #go-nuts 17:53 < skelterjohn> ribo: here is a gonuts thread about it https://groups.google.com/d/topic/golang-nuts/zustZZox2D4/discussion 17:53 < skelterjohn> i don't do anything with webservers, so i can't help you directly 17:55 < ribo> hmm, thanks, it's a starting point 17:55 < skelterjohn> you might consider making another post to go-nuts 17:55 < skelterjohn> progress may have been made 17:57 < meanburrito920> xyproto: sorry, i didn't catch your post 'til now. I thought I had put a delay so my cloak has enough time to kick in, but I guess not... I better take a look at that :) 17:57 < ribo> yeah 17:59 < meanburrito920> xyproto: meh, I had it at two second delay, now changed to 5. I'm assuming that was the issue. 18:00 < ribo> http://codereview.appspot.com/1729052/show 18:00 < ribo> hmm 18:01 < meanburrito920> meh, it may also be that when I bring my computer out of sleep it attempts to auto-connect before my nick gets validated with freenode :( 18:07 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has quit [Quit: hcatlin] 18:09 < skelterjohn> apple cocoa is so freaking complicated 18:09 < skelterjohn> so much build up for such simple things 18:09 < skelterjohn> so, sure it would make building whatzamahoozits easier 18:09 < skelterjohn> but i just want to draw an image into a window 18:09 < skelterjohn> there is no reason this should require so much effort 18:11 < pharris> skelterjohn: XMapWindow(XCreateSimpleWindow()); XPutImage(); done. 18:11 < ww> iant: i wonder if the mysterious empty library comes from the cgo step or the final linking 18:11 < skelterjohn> that doesn't look like cocoa 18:11 < pharris> Yeah, X11 apps don't "feel" right on MacOSX, but if you just need simple. 18:11 < pharris> … and X11.app is installed by default these days. 18:11 < skelterjohn> i'm trying to come up with exp/draw/mac 18:12 <+iant> ww: cgo generates #pragmas which 6c turns into commands which tell 6l to include a library 18:12 <+iant> so if you are definitely using an up-to-date 6l, then most likely cgo has generated an invalid #pragma 18:12 < skelterjohn> i just want to make a library that can open a window, draw a specified bitmap, and send back some UI events 18:12 <+iant> just a guess, though 18:15 < ww> _cgo_import.c:#pragma dynimport exsltRegisterAll exsltRegisterAll "" 18:16 < ww> and in fact, in the goraptor one, almost all #pragma are like that 18:19 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has quit [Ping timeout: 260 seconds] 18:20 < wrtp> skelterjohn: take a look at p9p 18:20 < wrtp> or inferno 18:20 < wrtp> both of which do just that 18:21 < skelterjohn> for mac? 18:21 < wrtp> yes 18:21 <+iant> ww: that is normal 18:21 <+iant> ww: which is why I wonder if you could possibly be invoking a 6l 18:21 -!- rlab_ [~Miranda@91.200.158.34] has joined #go-nuts 18:21 <+iant> ww: as support for the final "" was added a month or two ago 18:21 <+iant> ww: previously that was required to be a library name 18:21 <+iant> sorry, I mean why I wonder if you could possibly be invoking an old 6l 18:22 <+iant> ah, but now I see your reply 18:22 < skelterjohn> wrtp: p9p = plan 9 port? 18:23 -!- snearch [~snearch@f053011166.adsl.alicedsl.de] has quit [Quit: Verlassend] 18:23 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 240 seconds] 18:23 < ribo> I thought the Go mascot looked scarily similar to Glenda 18:24 < skelterjohn> and do i understand you correctly when you say that p9p and inferno both have, buried in their code somewhere, an example of what i want to do for go? 18:24 < skelterjohn> rather than i should just invoke some p9p or inferno library to do it 18:24 < ww> iant: just triple-checked :) 18:25 < ww> i'm going to narrow down exactly which changeset breaks it 18:27 -!- [Pete_27] [~noname@110-174-103-31.static.tpgi.com.au] has joined #go-nuts 18:27 < wrtp> skelterjohn: yes 18:27 < ww> will take log2(172) builds of go worst case :P 18:27 < wrtp> they have a similar image model 18:28 < wrtp> skelterjohn: try http://code.google.com/p/inferno-os/source/browse/emu/MacOSX/win.c 18:29 -!- photron_ [~photron@port-92-201-218-113.dynamic.qsc.de] has joined #go-nuts 18:30 -!- meanburrito920 [~john@unaffiliated/meanburrito920] has quit [Ping timeout: 248 seconds] 18:30 < wrtp> that holds most of the macos-dependent graphics code 18:30 < wrtp> (all, probably) 18:31 -!- foocraft [~ewanas@78.101.69.106] has joined #go-nuts 18:35 -!- ribo [~ribo@pfsense/mirrors/ribo] has left #go-nuts [] 18:42 -!- ExtraSpice [XtraSpice@88.118.35.153] has joined #go-nuts 18:44 -!- soapy_illusions [~alex@modemcable005.105-177-173.mc.videotron.ca] has joined #go-nuts 18:44 < soapy_illusions> Anyone here familiar with web.go 18:46 < ww> iant: found it 18:49 -!- meanburrito920 [~john@76-217-6-100.lightspeed.irvnca.sbcglobal.net] has joined #go-nuts 18:49 -!- meanburrito920 [~john@76-217-6-100.lightspeed.irvnca.sbcglobal.net] has quit [Changing host] 18:49 -!- meanburrito920 [~john@unaffiliated/meanburrito920] has joined #go-nuts 18:49 -!- hcatlin [~hcatlin@108-83-16-197.lightspeed.sntcca.sbcglobal.net] has joined #go-nuts 18:49 -!- hcatlin [~hcatlin@108-83-16-197.lightspeed.sntcca.sbcglobal.net] has quit [Changing host] 18:49 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has joined #go-nuts 18:50 -!- boomtopper [~boomtoppe@cpc12-nrte22-2-0-cust249.8-4.cable.virginmedia.com] has quit [Ping timeout: 260 seconds] 18:51 -!- boomtopper [~boomtoppe@cpc12-nrte22-2-0-cust249.8-4.cable.virginmedia.com] has joined #go-nuts 18:55 -!- Intel_iX [~chatzilla@adsl-72-152-34-98.asm.bellsouth.net] has joined #go-nuts 18:55 < skelterjohn> soapy_illusions: i've used it 18:56 -!- nictuku [~yvesj@84-72-7-79.dclient.hispeed.ch] has joined #go-nuts 18:56 -!- nictuku [~yvesj@84-72-7-79.dclient.hispeed.ch] has quit [Changing host] 18:56 -!- nictuku [~yvesj@unaffiliated/nictuku] has joined #go-nuts 18:56 < soapy_illusions> skelterjohn, do you know the best way to serve static files, (the http pkg has a serveFile function) and so does web.go but the function was not exported 18:57 < skelterjohn> if you use web.go, you can set a data directory 18:57 < skelterjohn> and anything in that data directory is accessible if you give its path in the url 18:58 < Intel_iX> I'm just looking into Go, but can someone explain to me why a function variable is " f func(func(int,int) int, int) int" according to the Go blog? (and not something like "f func(int) int") 18:58 < ww> that's a function which takes a function and two ints 18:58 < ww> as i read it... 18:59 < skelterjohn> well, "func(int) int" and "func(func(int,int) int, int) int" are two different types 18:59 < skelterjohn> ww a function and one int 18:59 < ww> you could just as easily write, 18:59 < ww> skelterjohn: right, my eyes inserted an extra comma 18:59 < ww> type g func(int, int) int 18:59 < skelterjohn> Intel_iX: "func(int) int" is a perfectly valid type for a go variable 18:59 < soapy_illusions> skelterjohn, how exactly do you set this data directory , I am looking through the docs and don't see anything about that 18:59 < ww> type f func(g, int) 19:00 < Intel_iX> So what's the difference between the two? 19:00 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has joined #go-nuts 19:00 < Intel_iX> Or wait, nevermind 19:00 < skelterjohn> soapy_illusions: ServerConfig.StaticDir 19:01 < Intel_iX> I think the blog is just written confusingly >_> 19:03 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|] 19:04 < soapy_illusions> skelterjohn, I just searched all the source for that and found nothing... 19:06 -!- huin [~huin@91.85.171.238] has joined #go-nuts 19:08 < Intel_iX> Can someone tell me why this doesn't work? http://pastebin.com/2Mn5M4Jv I still don't get it .... 19:08 < skelterjohn> soapy_illusions: it's in web.go 19:09 < skelterjohn> https://github.com/hoisie/web.go/blob/master/web.go#L551 19:09 < skelterjohn> Intel_iX: you need to begin line 6 with "var" 19:10 < skelterjohn> either that or remove line 6 an begin line 7 with "f :=" instead of "f =" 19:10 < Intel_iX> Seems it was the var statement, what's the difference between := and = though/ 19:11 < soapy_illusions> skelterjohn, thanks a lot seemed to have missed it 19:11 < skelterjohn> := is a "declare and assign" operator 19:12 < skelterjohn> saying "x := a" is equiv to saying "var x Type; x = a" 19:12 < skelterjohn> where Type is a's Type 19:12 < skelterjohn> whatever it happens to be 19:13 -!- Kafo [5b9a04ad@gateway/web/freenode/ip.91.154.4.173] has joined #go-nuts 19:16 < wrtp> skelterjohn: as chance would have it, i've just been looking at some old Go graphics code i've got and being a bit frustrated by exp/draw/x11 (it really needs to be double-buffered). i'd quite like to do something towards graphics on the mac - how far have you got? 19:17 < skelterjohn> frustration, futility, etc 19:17 < skelterjohn> i've even done some real iphone dev, too 19:18 < skelterjohn> so i'm not completely unfamiliar with the tools 19:18 < skelterjohn> but all this interface builder stuff that xcode uses is so bizarre 19:21 < wrtp> yeah, i remember interface builder 19:21 < wrtp> you don't have to use it 19:21 < wrtp> in general 19:22 < skelterjohn> you do if you want the tutorials and documentation provided by apple to make any sense 19:23 < wrtp> yeah, but for what you want to do, you need almost nothing of that stuff 19:24 < wrtp> as i said, take a look at that source file - it has everything you need to get started, i think 19:24 < wrtp> i might have a bash myself 19:24 < skelterjohn> i'd prefer to use the more recent API, if i can 19:24 < skelterjohn> carbon has been deprecated for years 19:25 < wrtp> ah... 19:25 < wrtp> problem is, they really make it hard to just write bits... 19:26 -!- soapy_illusions [~alex@modemcable005.105-177-173.mc.videotron.ca] has quit [Ping timeout: 240 seconds] 19:27 < skelterjohn> yes 19:27 < skelterjohn> it's very frustrating 19:27 < skelterjohn> they have no interest in cross-platformability whatsoever 19:27 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has quit [Quit: hcatlin] 19:28 < huin> i doubt they see it in their interest, no 19:30 < wrtp> the main thing is they want you to draw in a resolution-independent manner, which pixel pushing definitely is not 19:33 < skelterjohn> I'd just like to draw an image 19:34 < wrtp> i think this link might help: http://developer.apple.com/library/mac/#documentation/cocoa/conceptual/CocoaDrawingGuide/Images/Images.html 19:34 < wrtp> (search for Drawing Directly to a Bitmap) 19:35 < skelterjohn> i stumbled upon that webpage, yeah 19:35 < wrtp> of course, that doesn't help with creating the window & getting events 19:35 < skelterjohn> i can create a window - xcode will auto-gen a project that creates an empty window 19:37 < wrtp> i'm not sure you want to do that, as you want to create the window from Go, and the auto-generated project will start off in C 19:37 -!- foocraft [~ewanas@78.101.69.106] has quit [Quit: Leaving] 19:38 < skelterjohn> right - i figured a good first step would be to just do it *somehow* 19:38 < skelterjohn> and then figure out how to turn it into a library 19:45 -!- rlab_ [~Miranda@91.200.158.34] has quit [Ping timeout: 252 seconds] 19:50 -!- artefon [~thiago@dhcp26.usuarios.dcc.ufmg.br] has quit [Quit: bye] 19:52 < skelterjohn> wrtp: made some progress now 19:52 < skelterjohn> the interface builder is coming back to me, bit by bit 19:52 < skelterjohn> but i'm drawing an image in a window 19:54 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has quit [Quit: Geek insinde®] 19:58 -!- meanburrito920 [~john@unaffiliated/meanburrito920] has quit [Ping timeout: 260 seconds] 20:01 < wrtp> skelterjohn: i've created a window without xcode, but... it isn't actually showing 20:02 < skelterjohn> "[thewindow show];"? 20:02 -!- nkdnstbr [~nkdnstbr@nkdnstbr.com] has quit [Read error: Connection reset by peer] 20:08 < wrtp> no, show isn't a method. i've tried "display" and "makeKeyAndOrderFront" 20:08 < wrtp> neither work 20:09 < wrtp> i might be because i'm not handling events 20:09 < skelterjohn> display tells it to redraw everything inside 20:09 < skelterjohn> do you have xcode and its reference browser? 20:11 < wrtp> yeah, but i don't think that will help in this case 20:13 < wrtp> oh, actually it's working... ish (it should be blue but it's grey, and it's not coming to the front, hence it was being hidden) 20:13 -!- xash [~xash@d046237.adsl.hansenet.de] has joined #go-nuts 20:14 < wrtp> now it's blue cool 20:16 < wrtp> skelterjohn: http://pastebin.com/7YtA5Uc0 20:18 -!- fmoo [~Adium@66.220.144.74] has joined #go-nuts 20:18 < wrtp> right, that works, now to push some bits 20:20 -!- photron_ [~photron@port-92-201-218-113.dynamic.qsc.de] has quit [Ping timeout: 248 seconds] 20:22 < skelterjohn> how do you compile that code? 20:27 -!- vinisterx [~ryan@74-129-201-27.dhcp.insightbb.com] has quit [Quit: WeeChat 0.3.4] 20:27 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Ping timeout: 240 seconds] 20:28 -!- jokoon [zonax@78.251.249.0] has joined #go-nuts 20:28 -!- Project_2501 [~Marvin@82.84.96.197] has joined #go-nuts 20:31 -!- tobik [~tobik@p549FEE59.dip.t-dialin.net] has joined #go-nuts 20:31 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-179-221.clienti.tiscali.it] has quit [Ping timeout: 240 seconds] 20:31 -!- imsplitbit [~imsplitbi@64.39.4.132] has quit [Quit: Bye!] 20:34 < wrtp> gcc tst.m -framework Cocoa 20:42 < Kafo> Is it safe to increase/decrease a value from multiple goroutines? 20:43 < Kafo> No reading or checking of the value needed in the code 20:43 -!- Intel_iX [~chatzilla@adsl-72-152-34-98.asm.bellsouth.net] has quit [Read error: Connection reset by peer] 20:43 < skelterjohn> x++ is not atomic 20:43 < xash> Kafo: No .. as increasing means for the CPU: read the value, inc value, then save it again 20:43 < skelterjohn> if two goroutines both do x++ at the same time it will either increment by one or by two 20:44 -!- keidaa [~keidaa@cm-84.210.56.138.getinternet.no] has joined #go-nuts 20:44 < Namegduf> In general, concurrent writing to anything is not defined as safe in Go. 20:45 < Kafo> Okies 20:45 < Namegduf> On x86/x86_64, writes to a given word are always atomically observed, but they are not guaranteed to be observed before another writes, unless goroutines communicate. 20:46 < keidaa> how do I initialize a map defined in a struct? 20:46 < wrtp> keidaa: s.m = make(map[string]int) 20:47 < wrtp> Kafo: you can use a sync.Mutex 20:47 < Namegduf> A sync.Mutex counts as a kind of communication, yeah. 20:47 < Namegduf> (I'm not sure if the docs explicitly say so, but much of the usage of it in the stdlib wouldn't work otherwise) 20:48 < Namegduf> (I think, at least) 20:48 < Kafo> Got 0.01 sec off the runtime by using a channel yay 20:48 < skelterjohn> if you have many many goroutines incrementing this thing, you might spawn one more goroutine whose job it is to update that variable, and have it listen to a channel 20:48 < keidaa> wrtp: and I can assign s.m["foo"] = 3 ? 20:49 < Namegduf> Yes. 20:49 < keidaa> it blows up on execution when I try 20:49 < Namegduf> Are you sure you're running the make command first? 20:49 < keidaa> "invalid memory address..." 20:49 < keidaa> sure 20:50 < wrtp> keidaa: paste some code 20:50 < Namegduf> Hmm. 20:50 < Namegduf> Is s actually initialised? 20:50 < Namegduf> If s is a pointer to the struct, not the struct, and it's not been set to point to a new struct... 20:50 -!- boomtopper [~boomtoppe@cpc12-nrte22-2-0-cust249.8-4.cable.virginmedia.com] has quit [Quit: Lost terminal] 20:50 < skelterjohn> the "blow up" should say what line it blows up on 20:50 -!- zerosanity [~josh@8.20.178.82] has quit [Remote host closed the connection] 20:51 < skelterjohn> i bet it isn't the s.m["foo"] = 3 line 20:51 < Namegduf> I think it could be the s.m lookup rather than the m["foo"] bit 20:51 < Namegduf> Let's find out. 20:52 < keidaa> type s struct {m map[string]string} ---- s.m = make(map[string]string) ---- s.m["foo"] = "bar" 20:52 -!- pharris [~Adium@rhgw.opentext.com] has quit [Quit: Leaving.] 20:52 < Namegduf> You need to instantiate that type. 20:53 < Namegduf> Types are templates for structures in memory, not an instance of the structure you can assign to. 20:53 < keidaa> how do I assign a value to it? 20:54 -!- hq1 [~hq@ns1.insant.pl] has joined #go-nuts 20:54 < Namegduf> You can't assign a value to a type. 20:54 < Namegduf> Types don't have values. 20:54 < Namegduf> They're definitions of the forms a variable can take, nothing more. 20:55 < keidaa> the type variable 20:55 < Namegduf> There's no type variable. 20:56 < keidaa> what ever s.m is 20:57 -!- tobik [~tobik@p549FEE59.dip.t-dialin.net] has quit [Quit: WeeChat 0.3.4] 20:57 < Namegduf> s.m shouldn't be anything. 20:57 < Namegduf> s is a type. 20:58 < Kafo> Wheee, project euler's first problem solved 20:58 < keidaa> why can I return a value s.s (string) and not s.m 20:59 < skelterjohn> keidaa: s is not a value, period 20:59 < Namegduf> I don't know why you can do anything with s. 20:59 < skelterjohn> it's like saying "why can't i just return int?" 20:59 < Namegduf> Like that. 20:59 < Kafo> Is this Go-ish enough? http://pastie.org/1869405 21:00 < keidaa> I understand, but my function returns a variable of (type s struct), how can I assign values to that variable? 21:01 < keidaa> I can with strings but not maps 21:01 < Namegduf> You're making some mistake not in the few lines you've shown. 21:01 < Namegduf> Pastebin it all. 21:02 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts 21:03 < keidaa> think I found the problem; template pkg doesn't accept maps 21:04 < skelterjohn> yes it does 21:04 < skelterjohn> doesn't it? 21:05 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:dd0d:f100:1a4a:1f84] has quit [Quit: Leaving.] 21:06 < keidaa> appears not 21:07 < keidaa> println(page.templateData["Body"]) 21:07 < keidaa> t, _ := template.ParseFile(page.templateName, nil) 21:08 < keidaa> prints fine but template shows error 21:08 < keidaa> "name not found ..." 21:08 < skelterjohn> that has nothing to do with template accepting maps 21:09 < skelterjohn> ParseFile reads in the actual template 21:09 -!- alexandere [~alexander@eijg.xs4all.nl] has joined #go-nuts 21:09 < skelterjohn> then you execute the template by giving it a map 21:10 < keidaa> nice 21:10 < keidaa> worked now 21:12 -!- huin [~huin@91.85.171.238] has quit [Quit: bedtiems] 21:14 -!- Fish- [~Fish@9fans.fr] has quit [Quit: So Long, and Thanks for All the Fish] 21:14 < keidaa> just so I understand this better: what is stored in memory when I define a type with a string field? 21:14 < keidaa> I mean since I don't have to allocate it to use it 21:15 < skelterjohn> defining a type doesn't store anything in memory 21:15 < skelterjohn> it just tells the compiler how to treat bits of data 21:15 < skelterjohn> "var x s" allocates. 21:15 < Namegduf> When you instantiate a type with a string field, said field is basically a small two-word struct 21:15 < keidaa> yes 21:15 -!- Makoryu [~bloodgog@pool-71-174-191-10.bstnma.fios.verizon.net] has joined #go-nuts 21:16 < keidaa> so when I define a variable on that type, as a return var, then it gets initialized and the string field gets allocated? 21:16 -!- DerHorst [~Horst@e176102149.adsl.alicedsl.de] has quit [Remote host closed the connection] 21:16 -!- ZombieFeynman [~ZombieFey@ip98-177-244-77.ph.ph.cox.net] has joined #go-nuts 21:25 < keidaa> I just don't see why you must allocate a map for the variable but not a string, both have dynamic size 21:25 -!- l00t [~i-i3id3r_@189.105.102.222] has joined #go-nuts 21:34 < yebyen> can someone tell me the changeset number of tip for -u release? 21:34 < yebyen> oi, wait 21:34 < yebyen> r57 is new, isn't it 21:34 < skelterjohn> keidaa: not so - strings are immutable 21:34 < skelterjohn> you cannot resize them 21:34 < skelterjohn> different than []byte - you do have to allocate those explicitly 21:34 < keidaa> I see 21:35 < skelterjohn> for strings, when you say thestring = "something", the compiler allocates the data to store "something" and points thestring at it 21:37 < keidaa> can I store a already defined function in a map? :P 21:37 < skelterjohn> yes 21:37 < skelterjohn> a map with type map[keytype] func (someparams) somereturns 21:39 -!- wrtp [~rog@92.17.111.113] has quit [Quit: wrtp] 21:40 < keidaa> can I do it inline: var m = map[string]func{"index":func(type) (ret1, ret2)} 21:40 < keidaa> compiler wants a { 21:40 < skelterjohn> for instance http://pastebin.com/PUyz52WW 21:40 < keidaa> spelling error should be ( after func 21:40 -!- ZombieFeynman [~ZombieFey@ip98-177-244-77.ph.ph.cox.net] has quit [Read error: Operation timed out] 21:40 <+iant> keidaa: you have to give it an actual function 21:41 -!- Nitro [~Nitro@unaffiliated/nitro] has quit [Ping timeout: 240 seconds] 21:41 < keidaa> of course .. 21:42 < skelterjohn> does my example make sense to you? 21:44 < keidaa> yes, trying it out on my code now.. 21:46 < keidaa> wow, that actually works 21:46 < keidaa> I'm beginning to enjoy this language 21:47 < Makoryu> Has there been any official announcement about abandoning plans for generics? 21:47 < Makoryu> I don't really want to go poking around the mailing list 21:49 -!- keidaa [~keidaa@cm-84.210.56.138.getinternet.no] has quit [Quit: Leaving] 21:49 -!- ExtraSpice [XtraSpice@88.118.35.153] has quit [Ping timeout: 276 seconds] 21:51 -!- fmoo [~Adium@66.220.144.74] has quit [Quit: Leaving.] 21:53 < mpl> Makoryu: no. they're still a possibility. 21:53 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit: Verlassend] 21:54 < mpl> Makoryu: no one has come up yet with anything satisfactory for the go core team, that's all. 21:54 -!- jokoon [zonax@78.251.249.0] has quit [Quit: Leaving] 21:54 < Makoryu> Oh okay 21:54 < Makoryu> I heard wrong then 21:55 < mpl> well, that's afaik. 21:55 < nictuku> Makoryu, what kind of usage did you have in mind for generics? 21:55 < Makoryu> I don't use Go actually 21:56 < nictuku> right, but you seem to use this feature in other languages. 21:56 -!- foocraft [~ewanas@78.101.69.106] has joined #go-nuts 21:56 < nictuku> Go has "interfaces" which do a lot of what people used to employ C++ templates for example. 21:57 < Makoryu> I'm aware 21:57 < yebyen> does anyone work on gosqlite? 21:57 < Makoryu> Go also has a few built-in types with rudimentary parametric polymorphism (arrays, maps, functions) 21:57 < Makoryu> You just can't define your own 21:57 < Makoryu> Or use type variables 21:57 < yebyen> i just submitted issue#11 on google code, it doesn't compile anymore on tip or release 21:57 < nictuku> yeah 21:57 < yebyen> since reflect.Typeof seems to have gone 21:59 <+iant> yebyen: it's called reflect.TypeOf now 22:01 -!- fmoo [~Adium@66.220.144.74] has joined #go-nuts 22:01 -!- ww [~ww@78.148.85.176] has quit [Ping timeout: 276 seconds] 22:01 -!- Project_2501 [~Marvin@82.84.96.197] has quit [Quit: E se abbasso questa leva che succ...] 22:03 < Makoryu> nictuku: Anyway I am concerned about this mainly from a social standpoint rather than a technical standpoint. Go has Google's backing so it has the opportunity to introduce saner development models to the software industry 22:03 < Makoryu> And with regards to a few things it's already showing positive influences (eg. interface polymorphism instead of inheritance) 22:08 -!- foocraft [~ewanas@78.101.69.106] has quit [Quit: Leaving] 22:14 -!- xash [~xash@d046237.adsl.hansenet.de] has quit [Ping timeout: 258 seconds] 22:15 -!- skelterjohn [~jasmuth@lawn-gw.rutgers.edu] has quit [Read error: Connection reset by peer] 22:15 -!- skelterjohn [~jasmuth@lawn-gw.rutgers.edu] has joined #go-nuts 22:19 -!- artefon [~thiago@189.59.133.187] has joined #go-nuts 22:21 -!- skelterjohn [~jasmuth@lawn-gw.rutgers.edu] has quit [Quit: skelterjohn] 22:23 -!- thiago__ [~thiago@189.59.134.193] has joined #go-nuts 22:25 -!- artefon [~thiago@189.59.133.187] has quit [Ping timeout: 240 seconds] 22:30 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has quit [Read error: Operation timed out] 22:31 -!- ab3 [~abe@83.101.72.80] has quit [Ping timeout: 246 seconds] 22:34 < Namegduf> Hmm. 22:35 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has joined #go-nuts 22:37 < Namegduf> I have some code for which parallelisation is fairly important. On an event, various things need to happen. In order to allow these things to be specified and compiled in/out separately from the thing generating the events, I need to "hook" on events, either by registering a channel or providing a callback. 22:38 -!- Venom_X [~pjacobs@66.54.185.131] has quit [Quit: Venom_X] 22:39 < Namegduf> Registering a channel is slightly nicer, and means there's only a single instance of the on-event behaviour happening at once, simplifying use of shared variables and such. 22:40 < Namegduf> But providing a callback means the event generation stuff can automatically distribute the callbacks over an arbitrary number of goroutines in whatever way meets the (fairly loose but existing) ordering requirements of the events. 22:40 < Namegduf> What do people here think? 22:42 -!- fmoo [~Adium@66.220.144.74] has quit [Quit: Leaving.] 22:43 < Namegduf> The other reasons for needing a "code reacting to events is not referenced by the things generating events" is that everything can generate and hook on events, including their own events; the central event source is really more of a way for these things to trigger each other without having interdependencies on each other (because they don't) 22:46 < Kafo> Is division slower than multiplication on common processors nowadays? 22:49 -!- fmoo [~Adium@66.220.144.74] has joined #go-nuts 22:54 -!- fmoo [~Adium@66.220.144.74] has quit [Quit: Leaving.] 22:56 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has joined #go-nuts 22:57 -!- rlab [~Miranda@91.200.158.34] has quit [Read error: Connection reset by peer] 22:59 -!- fmoo [~Adium@66.220.144.74] has joined #go-nuts 22:59 -!- plainhao [~plainhao@208.75.85.237] has quit [Quit: plainhao] 23:00 < Makoryu> Kafo: Not for floats, IIRC 23:00 -!- niemeyer [~niemeyer@200-102-196-125.pltce701.dsl.brasiltelecom.net.br] has quit [Ping timeout: 240 seconds] 23:00 < Makoryu> But for ints, yes, I think it's slightly slower 23:23 -!- jbooth1 [~jay@209.249.216.2] has left #go-nuts [] 23:28 -!- jhawk28 [~jhawk28@user-387c58d.cable.mindspring.com] has joined #go-nuts 23:29 -!- ab3 [~abe@ip-83-134-140-45.dsl.scarlet.be] has joined #go-nuts 23:34 < davisp> Is there a good example project to look at for a basic go package layout? 23:40 < Kafo> davisp: Any of the packages in Go's standard library. 23:41 < davisp> Kafo: Well I'm also trying to figure out how to create a build system that's roughly idiomatic as well so I was looking for something external 23:42 -!- dfc [~dfc@eth59-167-133-99.static.internode.on.net] has joined #go-nuts 23:44 < davisp> Near as I can tell, this sort of pattern is what's common: https://github.com/fluffle/goirc/blob/master/client/Makefile 23:45 -!- chimes [~chimes@24.104.130.118] has joined #go-nuts 23:47 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined #go-nuts 23:48 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Client Quit] 23:49 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined #go-nuts 23:49 -!- fmoo [~Adium@66.220.144.74] has quit [Quit: Leaving.] 23:49 -!- Bigbear1 [~Cody@d75-158-140-53.abhsia.telus.net] has quit [Quit: Leaving.] 23:52 -!- fmoo [~Adium@66.220.144.74] has joined #go-nuts 23:55 -!- boscop [~boscop@f055253036.adsl.alicedsl.de] has quit [Read error: Connection reset by peer] 23:55 -!- boscop_ [~boscop@f055253036.adsl.alicedsl.de] has joined #go-nuts --- Log closed Fri May 06 00:00:50 2011