Go Language Resources Go, golang, go... NOTE: This page ceased updating in October, 2012

--- Log opened Wed May 11 00:00:50 2011
00:14 < jeremy_c> uriel: skelterjohn: thanks.  I've posted to the ML to see
if anyone knows what my problem is.
00:21 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
quit [Quit: whitespacechar]
00:21 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
00:22 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
joined #go-nuts
00:23 -!- l00t [~i-i3id3r_@] has joined #go-nuts
00:37 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has quit
[Ping timeout: 240 seconds]
00:43 -!- m4dh4tt3r [~Adium@52.sub-75-210-83.myvzw.com] has quit [Ping timeout:
252 seconds]
00:44 -!- KingPhilroy [~kingphilr@shc-nat-newhall.stonehill.edu] has joined
00:44 < whitespacechar> hmm.  Does anyone know how to write a test using the
testing package to assert that a panic should occur ?
00:44 < skelterjohn> you can recover from it
00:45 < skelterjohn> call the function that should panic, and then
t.Fail("should panic before we get here")
00:45 < skelterjohn> but be sure to recover from the panic in a deferred
function, otherwise the test will have other problems
00:48 -!- KBme [~KBme@2001:470:cabe:666:666:666:666:666] has quit [Ping timeout:
264 seconds]
00:49 -!- iant [~iant@] has quit [Quit: Leaving.]
00:49 < skelterjohn> http://pastebin.com/8pLKV4cD
00:52 -!- jbooth1 [~jay@] has quit [Quit: Leaving.]
00:57 -!- telexicon [~telexicon@unaffiliated/chowmeined] has joined #go-nuts
00:57 -!- KBme [~KBme@2001:470:cabe:666:666:666:666:666] has joined #go-nuts
00:57 -!- TMKCodes [~TMKCodes@unaffiliated/tmkcodes] has quit [Ping timeout: 264
00:57 < whitespacechar> Thanks!  This is what I wrote:
00:59 < whitespacechar> oh, yours is much simpler.
01:01 -!- mikespook [~mikespook@] has joined #go-nuts
01:05 < skelterjohn> looks identical...
01:05 < skelterjohn> functionally
01:11 < whitespacechar> yes.  Although when I rewrote to use your version,
it didn't seem to recover from a real error.
01:14 < whitespacechar> ie https://gist.github.com/965733
01:15 < whitespacechar> but the anon function version does the right thing.
01:17 < skelterjohn> i was worried that defer recover() might not do it
01:19 -!- flaguy48 [~gmallard@user-0c6s350.cable.mindspring.com] has left #go-nuts
01:20 -!- _DerHorst_ [~Horst@e176103040.adsl.alicedsl.de] has quit [Remote host
closed the connection]
01:55 -!- kr [~Keith@] has quit [Ping timeout: 252 seconds]
02:03 -!- fmoo [~Adium@2620:0:1cfe:72:5ab0:35ff:fefd:feeb] has quit [Read error:
Operation timed out]
02:20 -!- gaxxx [~woo@] has joined #go-nuts
02:25 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
quit [Quit: whitespacechar]
02:26 -!- l00t [~i-i3id3r_@] has quit [Quit: Leaving]
02:26 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
joined #go-nuts
02:31 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
quit [Ping timeout: 264 seconds]
02:32 -!- fmoo [~Adium@c-76-102-41-101.hsd1.ca.comcast.net] has joined #go-nuts
02:36 -!- KBme [~KBme@2001:470:cabe:666:666:666:666:666] has quit [Read error:
Operation timed out]
02:42 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has joined
02:44 -!- krutcha [~krutcha@S010600045a27676a.vs.shawcable.net] has joined
02:46 -!- Nitro [~Nitro@unaffiliated/nitro] has quit [Ping timeout: 240 seconds]
02:55 -!- l00t [~i-i3id3r_@] has joined #go-nuts
03:09 -!- KBme [~KBme@2001:470:cabe:666:666:666:666:666] has joined #go-nuts
03:10 -!- richardus [~richardus@2001:470:21:31::4444:63dc] has left #go-nuts []
03:11 < nteon> I'm having a hard time understanding when I should use
pointers to structs (or types in general) and structs
03:12 < nteon> In C, structs are allocated on the stack so they're cheaper.
but I can return a reference to a struct and it stays in scope, so there doesn't
seem to be the same distinction here
03:14 < skelterjohn> if you ever take the address of something, the compiler
allocates it on the heap
03:15 < skelterjohn> or if that something is ever referenced in a closure
03:15 < nteon> skelterjohn: but otherwise its on the stack?
03:15 < skelterjohn> it's possible i missed a case when it gets moved to the
03:16 < skelterjohn> it is moved to the heap unless the compiler can prove
that it can stay on the stack
03:16 < skelterjohn> at the moment, the compiler has a lot of false
positives - it's conservative
03:16 < nteon> sure
03:16 < nteon> still, thats smart
03:17 < skelterjohn> it's possible one day it will get clever about it
03:17 -!- vsmatck [~smack@64-142-40-6.dsl.static.sonic.net] has joined #go-nuts
03:17 < skelterjohn> that would be premature right now
03:17 < nteon> I am continually impressed by go :)
03:17 < skelterjohn> :)
03:18 < skelterjohn> go is memory safe - as long as you don't do stuff with
the unsafe package or interface to another language
03:18 < skelterjohn> you are guaranteed to never access garbage memory -
either it will be nil or it will be valid
03:21 < nteon> nice
03:22 < telexicon> any plans to try making a vm for go?  so it could have an
advanced compacting garbage collector and consistent microthreads sort of like
erlang's 200 byte processes
03:22 -!- nteon [~nteon@c-98-210-195-105.hsd1.ca.comcast.net] has quit [Remote
host closed the connection]
03:23 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
joined #go-nuts
03:24 < skelterjohn> the fact that go doesn't use a VM doesn't stop it from
having an advanced garbage collector
03:24 < skelterjohn> i don't know what "consistent microthreads" means
03:25 < telexicon> skelterjohn, oh, i thought it couldnt do precise garbage
collection and compaction without a vm
03:25 < skelterjohn> why?
03:26 < telexicon> by consistent i mean, goroutines seem to sometimes go on
different os threads depending on the runtime instead of being lightweight
03:26 < telexicon> whereas, erlang consistently maps its lightweight
processes (each has only 200 bytes of overhead) to a pool of threads but can
always intercept blocking
03:27 < skelterjohn> go also maps its goroutines to a pool of threads
03:27 < skelterjohn> limited in number by GOMAXPROCS, at the moment
03:27 < skelterjohn> what do you mean by "can always intercept blocking"?
03:28 < telexicon> but from what i understood, you can still block the os
threads and starve the other goroutines on that thread
03:29 < telexicon> the erlang vm always has scheduling control, you cant
block a whole os thread
03:29 < vsmatck> There was a bug like that.  I don't know if that bug is
still alive.  Go shouldn't tie up an OS thread.
03:29 < vsmatck> But I'm referring to is that sleep bug where it'd tie up a
OS thread.
03:30 < skelterjohn> i know time.Sleep() had this issue
03:30 < skelterjohn> yeah
03:30 < skelterjohn> ok, since go doesn't run on a VM, when a thread does a
syscall, there is no way to do anything with that thread until it returns
03:31 < skelterjohn> it's out of go's hands, as it were
03:32 < telexicon> also, dont goroutines have 4k in overhead
03:33 < vsmatck> yeah
03:33 < telexicon> granted, go is significantly faster than erlang
03:33 < skelterjohn> 4k?
03:34 < telexicon> 4k memory per goroutine for its stack
03:34 < skelterjohn> that seems very high
03:34 < skelterjohn> i thought it was very low per goroutine
03:36 -!- keithcascio [~keithcasc@nat/google/x-jidnpezwklvyvjin] has quit [Quit:
03:41 -!- niemeyer [~niemeyer@conference/ubuntudevelopersummit/x-vccppinpjrspxdoa]
has joined #go-nuts
03:47 -!- l00t [~i-i3id3r_@] has quit [Quit: Leaving]
03:50 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Quit:
03:54 -!- niekie [~niek@CAcert/Assurer/niekie] has quit [Ping timeout: 260
03:55 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
quit [Quit: whitespacechar]
03:58 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
03:58 -!- niekie [~niek@CAcert/Assurer/niekie] has joined #go-nuts
04:06 -!- foocraft [~ewanas@] has joined #go-nuts
04:08 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has joined #go-nuts
04:08 -!- mode/#go-nuts [+v iant] by ChanServ
04:12 -!- goraes [~moraes@] has quit [Ping timeout: 240 seconds]
04:13 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has quit [Ping
timeout: 240 seconds]
04:14 < taruti> any more announcements at googleio?
04:14 -!- iant [~iant@] has joined #go-nuts
04:14 -!- mode/#go-nuts [+v iant] by ChanServ
04:15 -!- rejb [~rejb@unaffiliated/rejb] has quit [Disconnected by services]
04:16 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
04:16 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
04:31 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Quit:
04:39 -!- hallas [~hallas@x1-6-30-46-9a-b2-c5-1f.k891.webspeed.dk] has joined
04:40 < hallas> greetings all
04:44 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has quit
[Ping timeout: 241 seconds]
05:00 -!- edsrzf [~edsrzf@122-61-221-144.jetstream.xtra.co.nz] has joined #go-nuts
05:02 -!- bubb [~AndChat@S01065cd9985ba2e7.va.shawcable.net] has joined #go-nuts
05:13 -!- vsayer [~vivek@c-67-170-236-166.hsd1.ca.comcast.net] has joined #go-nuts
05:14 -!- krutcha [~krutcha@S010600045a27676a.vs.shawcable.net] has quit [Quit:
05:17 -!- brtk [~brtk@c83-248-35-158.bredband.comhem.se] has quit [Ping timeout:
240 seconds]
05:38 -!- comex [comex@c-67-188-10-190.hsd1.ca.comcast.net] has quit [Ping
timeout: 240 seconds]
05:43 -!- comex [comex@c-67-188-10-190.hsd1.ca.comcast.net] has joined #go-nuts
05:44 -!- nteon [~nteon@c-98-210-195-105.hsd1.ca.comcast.net] has joined #go-nuts
05:53 -!- boscop [~boscop@g230098129.adsl.alicedsl.de] has quit [Ping timeout: 240
06:01 -!- dfc [~dfc@eth59-167-133-99.static.internode.on.net] has quit [Ping
timeout: 260 seconds]
06:09 -!- niemeyer [~niemeyer@conference/ubuntudevelopersummit/x-vccppinpjrspxdoa]
has quit [Ping timeout: 240 seconds]
06:11 -!- gmilleramilar [~gmiller@pool-74-101-133-165.nycmny.fios.verizon.net] has
quit [Ping timeout: 240 seconds]
06:13 -!- Paradox924X [~Paradox92@vaserv/irc/founder] has quit [Read error:
Operation timed out]
06:14 -!- Paradox924X [~Paradox92@c-68-35-229-34.hsd1.fl.comcast.net] has joined
06:15 -!- gmilleramilar [~gmiller@pool-74-101-133-165.nycmny.fios.verizon.net] has
joined #go-nuts
06:17 -!- chressie [~chressie@] has quit [Quit: WeeChat 0.3.4]
06:24 -!- Paradox924X [~Paradox92@c-68-35-229-34.hsd1.fl.comcast.net] has quit
[Changing host]
06:24 -!- Paradox924X [~Paradox92@vaserv/irc/founder] has joined #go-nuts
06:25 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has joined #go-nuts
06:26 -!- chressie [~chressie@dreggn.in-ulm.de] has joined #go-nuts
06:29 -!- Project_2501 [~Marvin@] has joined #go-nuts
06:31 -!- chressie [~chressie@dreggn.in-ulm.de] has quit [Client Quit]
06:31 -!- chressie [~chressie@dreggn.in-ulm.de] has joined #go-nuts
06:51 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-173-219.clienti.tiscali.it] has
joined #go-nuts
06:53 -!- brtk [~brtk@c83-248-35-158.bredband.comhem.se] has joined #go-nuts
06:54 -!- Project_2501 [~Marvin@] has quit [Ping timeout: 240 seconds]
06:56 -!- gaxxx [~woo@] has quit [Ping timeout: 252 seconds]
06:57 -!- gaxxx [~woo@] has joined #go-nuts
07:01 -!- viirya [~viirya@cml506-25.csie.ntu.edu.tw] has quit [Ping timeout: 258
07:04 -!- piranha [~piranha@5ED42E59.cm-7-5a.dynamic.ziggo.nl] has joined #go-nuts
07:16 -!- piranha [~piranha@5ED42E59.cm-7-5a.dynamic.ziggo.nl] has quit [Ping
timeout: 240 seconds]
07:17 -!- tvw [~tv@] has joined #go-nuts
07:21 -!- piranha [~piranha@5ED42E59.cm-7-5a.dynamic.ziggo.nl] has joined #go-nuts
07:27 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has quit [Ping
timeout: 260 seconds]
07:27 -!- wrtp [~rog@] has joined #go-nuts
07:28 -!- GeertJohan [~geertjoha@s51478c91.adsl.wanadoo.nl] has joined #go-nuts
07:29 -!- edsrzf [~edsrzf@122-61-221-144.jetstream.xtra.co.nz] has quit [Ping
timeout: 240 seconds]
07:30 -!- edsrzf [~edsrzf@122-61-221-144.jetstream.xtra.co.nz] has joined #go-nuts
07:34 -!- erus` [~chatzilla@mailgate.ips-international.com] has joined #go-nuts
07:34 < erus`> I owe someone $10
07:34 < erus`> I can't remember who said go would be on app engine
07:36 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has joined #go-nuts
07:37 -!- boscop [~boscop@g226242129.adsl.alicedsl.de] has joined #go-nuts
07:37 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Ping timeout: 240
07:40 < str1ngs> C.git_index_add(v.git_index, C.CString(file)) should I
worry about freeing the CString in this case?
07:41 < edsrzf> str1ngs: Only if you want to avoid memory leaks.  :)
07:42 < str1ngs> I think I just might thank you
07:43 < str1ngs> also is there some way I can test for leaks then?  my C is
not that very good so might be best if I check for this stuff
07:44 -!- piranha [~piranha@5ED42E59.cm-7-5a.dynamic.ziggo.nl] has quit [Quit:
Computer has gone to sleep.]
07:45 < vegai> str1ngs: does valgrind work?
07:45 < str1ngs> hmm good idea I'll check
07:45 < vegai> actually looks like no:
07:45 < edsrzf> Yeah, pretty sure it doesn't.
07:45 < vegai> then again, perhaps it would work against gcc compiled go
07:46 < edsrzf> There's a better chance, but I've heard that valgrind is
fairly C-centric.
07:46 < edsrzf> I haven't used it much myself
07:46 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-152-55.clienti.tiscali.it] has
joined #go-nuts
07:47 -!- brtk [~brtk@c83-248-35-158.bredband.comhem.se] has quit [Ping timeout:
276 seconds]
07:49 < str1ngs> ya gc does not work..
07:49 -!- tav [~tav@] has quit [Quit: Hakuna Matata]
07:49 < str1ngs> err cgo*
07:50 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-173-219.clienti.tiscali.it] has
quit [Ping timeout: 260 seconds]
07:50 -!- tav [~tav@] has joined #go-nuts
07:50 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has quit [Ping
timeout: 248 seconds]
07:51 < edsrzf> str1ngs: It looks like the only cgo function that allocates
is CString.  So as long as each call to that frees its memory, you should be fine.
07:52 < edsrzf> And of course you need to free any memory explicitly
allocated by malloc or any that the library you're wrapping requires you to free.
07:52 < str1ngs> ah so I should check if the that function free the string?
07:53 < str1ngs> the library seems pretty good at haveing free methods that
I can use.  mainly the conversions I'm worried about
07:53 < edsrzf> Most C libraries won't have functions that return strings
07:53 < edsrzf> It's usually something more like get_string(char* s, int
length) where it lets you allocate and free the memory.
07:54 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has joined #go-nuts
07:54 < str1ngs> ya I'll just have to free CStrings which is fine
07:54 < str1ngs> well anything I convert really
07:58 -!- foocraft [~ewanas@] has quit [Quit: if you're going....to
san.  fran.  cisco!!!]
07:58 < str1ngs> edsrzf: ok thanks for the help
08:05 -!- piranha [~piranha@5ED42E59.cm-7-5a.dynamic.ziggo.nl] has joined #go-nuts
08:10 -!- piranha [~piranha@5ED42E59.cm-7-5a.dynamic.ziggo.nl] has quit [Read
error: Connection reset by peer]
08:11 -!- piranha [~piranha@5ED42E59.cm-7-5a.dynamic.ziggo.nl] has joined #go-nuts
08:13 -!- piranha [~piranha@5ED42E59.cm-7-5a.dynamic.ziggo.nl] has quit [Client
08:13 -!- TMKCodes [~TMKCodes@unaffiliated/tmkcodes] has joined #go-nuts
08:17 < wrtp> oh why is python versioning such an endless nightmare?!
08:18 < vegai> versioning is always a nightmare
08:19 -!- piranha [~piranha@5ED42E59.cm-7-5a.dynamic.ziggo.nl] has joined #go-nuts
08:19 -!- piranha [~piranha@5ED42E59.cm-7-5a.dynamic.ziggo.nl] has quit [Remote
host closed the connection]
08:20 -!- piranha [~piranha@5ED42E59.cm-7-5a.dynamic.ziggo.nl] has joined #go-nuts
08:21 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has quit [Remote
host closed the connection]
08:21 < wrtp> sometimes it's worse than others
08:22 < wrtp> the fact that everyone keeps using different mutually
incompatible versions of python is frustrating
08:22 < wrtp> like, i'm trying to try out the go app engine stuff, but it
insists on python 2.5
08:22 < wrtp> and i've got 2.6 installed
08:23 < wrtp> i can run 2.5 but it complains there's no ssl module, but i
haven't worked out yet how to install stuff in a different python version
08:23 < wrtp> i'll get there, but it's annoying
08:28 -!- mikespook [~mikespook@] has quit [Ping timeout: 240
08:29 -!- mikespook [~mikespook@] has joined #go-nuts
08:29 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
08:30 -!- petrux [~petrux@host16-224-static.53-82-b.business.telecomitalia.it] has
joined #go-nuts
08:30 < uriel> python versioning is a mess :(
08:31 -!- dforsyth [~dforsyth@ec2-50-18-22-230.us-west-1.compute.amazonaws.com]
has quit [Read error: Operation timed out]
08:31 -!- erus` [~chatzilla@mailgate.ips-international.com] has quit [Quit:
ChatZilla [Firefox 4.0.1/20110413222027]]
08:32 -!- tsp [~tsp@unaffiliated/tsp] has joined #go-nuts
08:32 < vegai> I wonder if they'll find a neat way to do versioning in go
08:33 < tsp> A cupple quesions.  is go producion-read, and does it have an
irc library/eas sockets
08:35 < uriel> tsp: http://go-lang.cat-v.org/organizations-using-go and
http://go-lang.cat-v.org/pure-go-libs should answer your questions
08:35 < tsp> Can interface with exising C code/libs
08:35 < uriel> see cgo
08:35 < tsp> sorry for my typing, this keyboard needs replacing asap
08:36 < uriel> haha:
08:36 * uriel loves clueless people
08:36 < str1ngs> I love that id does that
08:36 < str1ngs> it*
08:38 < mpl> everytime I get that kind of error I'm like "come on compiler,
give me a break.  ok, ok, you're right, thanks for not letting me code too much
like a pig.".
08:41 < uriel> mpl: hahaha
08:42 * ww isn't sure it's cool to put #!  in a URI like that
08:43 < str1ngs> grr there was a picture from googleio with a plush gofer I
cant find it now
08:43 -!- Pathin [~root@gladsheim.nullbytestudios.net] has joined #go-nuts
08:43 < wrtp> ww: means you can have a relative URL #!/bin/sh which is kinda
08:43 < xyproto> wrtp: python 2.7 should be fine as well.  If you have the
openssl development packages installed somehow, Python should pick it up
automatically during configure/make.
08:43 < mpl> str1ngs:
08:43 < ww> wrtp: i know what it means...  just not sure i like it
08:44 < str1ngs> ah thats it thanks
08:44 < str1ngs> anyone know if these are available anywhere or was this a
one off for googleio?
08:44 < wrtp> ww: what does the ! mean?
08:45 < ww> well the ! doens't "mean", but does evoke...
08:45 < xyproto> wrtp: ./configure --enable-readline --with-wide-unicode
--prefix=/usr; make have worked here, when building a version of Python manually,
including ssl
08:45 < uriel> wasn't python supposed to have 'batteries included'?  Go has
SSL out of the box ;P
08:45 < tsp> I've heard that I need to put braces on the same line as their
expression.  Can I violate that for functions, or will that cause problems later?
I do this in C so I can do /^{ in ed, and be guaranteed to find a function.
08:46 < uriel> (and written in Go, no need to steal from other languages
like python's bindings for OpenSSL ;P)
08:46 < xyproto> uriel: python will be built with ssl out of the box, but it
will manage to build (and complain about it) if it's missing :)
08:46 < ww> they're cheap alkaline batteries that will run down in 10 mins
08:46 < wrtp> xyproto: it actually seems that it should work with python2.6
(i was conflating the version warning and the exception that happened because it
couldn't find the directory)
08:46 < uriel> ww: haha
08:46 < wrtp> so i get further, but get an exception later on
08:46 < wrtp> (when i try to fetch the web page)
08:47 < xyproto> wrtp: in which connection are you trying to fetch a web
page with python and/or the python build process?  To use the app enginge?
08:48 < xyproto> *engine
08:48 < uriel> oh, the amount of FUD here hurts my eyes:
08:48 < wrtp> xyproto: i'm playing with the app engine go demo code
08:54 < xyproto> wrtp: I see
08:55 < Namegduf> "The collective response to Google Go on reddit has been a
decisive "meh"." <- Whereby Reddit considers itself the centre of the universe.
08:56 -!- moraes [~moraes@] has joined #go-nuts
08:56 < Namegduf> This is why I don't visit very often.  It's like a version
of Digg with a really really high opinion of itself.
08:56 < hallas> http://twitter.com/#!/myfreeweb/status/68233010889244672 is
just plain stupid
08:57 -!- randfur [~androirc@] has joined #go-nuts
08:57 < Namegduf> Yes, it is.
08:58 < ww> well...  whenever i write in C i always use -Wall -Werror
08:58 < Namegduf> Me too.
08:58 < randfur> Google Apps.
08:58 < Namegduf> I would hardly call making that decision a "WTF" option.
08:59 < randfur> This us different to Android Apps?
08:59 < Namegduf> *a "WTF" decision
08:59 < randfur> *is
08:59 < Namegduf> randfur: This is the Go programming language IRC channel
09:00 < xyproto> randfur: there are chrome/chromium plugins that are just
called apps as well, and there's apps for android.  I also think google
categorizes some of their web-apps as "google apps".  So, yes.
09:00 < hallas> Same guy who wrote that tweet, says that its insane to type
convert in Go. Javascript is just '' + 123 but Go is strconv.Itoa(123).
09:00 < randfur> I mean in relation to the recent news about Go.
09:01 < Namegduf> hallas: If he's incapable of considering static typing as
having advantages as a deliberate design choice then he's really not worth
thinking about
09:01 < xyproto> hallas: from a js point of view, I understand why, but of
course, he's totally missed the point.
09:01 < randfur> I had my hopes up about using Go for Android dev.
09:01 < hallas> Twitter is dangerous, you really risk putting your self out
09:01 < Namegduf> No recent announcements connect to that.
09:02 < ww> randfur: you can do it together with ASE
09:02 < ww> but no java bridge so nothing too elaborate
09:02 < xyproto> ww: so, you can use Go directly for android programming
now, without going via java?
09:03 < ww> xyproto: the ASE gives a JSON -> java bridge via a little
server...  most pessimal
09:03 < ww> but the best that can be done
09:03 < randfur> I thought ASE only did scripting languages.
09:04 < ww> randfur: https://bitbucket.org/ww/godroid
09:04 < ww> you make a one-line shell script wrapper to get ASE to start up
its server, and then your go program talks to that
09:05 < ww> it's not very elegant, but it works
09:06 < moraes> randfur, Google Apps are webapps
09:06 < moraes> it's marginally related to App Engine
09:14 < randfur> Huh, so that gives you access to the phone's functionality?
09:15 -!- boomtopper
[~boomtoppe@cpc12-nrte22-2-0-cust249.8-4.cable.virginmedia.com] has joined
09:16 < randfur> @ww
09:17 -!- mikespook [~mikespook@] has quit [Quit: Leaving.]
09:21 < ww> randfur: not all of it, just what ASE gives you, but yes
09:23 < tsp> What's the go equivalen to the select function on sockets?
Been looking everwhere
09:24 < mpl> not that I care so much about it, but I hardcoded like a
bastard some /usr/bin/find and /bin/grep calls in a code and I suppose that
wouldn't work on Mac for example.  where are those located (if at all) on a mac
09:26 < taruti> tsp: just use goroutines
09:26 < str1ngs> mpl: use exec.LookPath
09:26 < str1ngs> mpl: also you dont need find
09:26 < str1ngs> mpl: assuming this is go code?
09:26 < ww> in /usr/bin fwiw
09:27 < hallas> tsp: no need to select the sockets, the goroutines are
concurrent and very safe, i dont even think there is a equivalent
09:27 < mpl> str1ngs: ah I didn't know LookPath worked for macs as well.
09:27 < mpl> str1ngs: and yes, I do need find.  it's faster than what I
would write myself ;P
09:28 -!- edsrzf [~edsrzf@122-61-221-144.jetstream.xtra.co.nz] has quit [Remote
host closed the connection]
09:28 < str1ngs> mpl: instead of find either use filepath.Globe or the
09:28 < str1ngs> err Glob
09:29 < str1ngs> my guess is glob is all you need
09:30 < tsp> hallas: This is all confusing right now
09:30 < mpl> str1ngs: still, it's more work for a probably less efficient
result so I'll stick to calling find for now.  but thx for the tip.
09:31 < str1ngs> mpl: I doubt its faster.  and besides you might as well
just write it in bash :P
09:31 < str1ngs> or sh
09:31 < mpl> str1ngs: yes, the initial version was written in rc :)
09:31 -!- gmrph [~gmurphy@203-214-86-6.dyn.iinet.net.au] has joined #go-nuts
09:31 < mpl> but it got more complex and I wanted to generalize a few
09:32 < str1ngs> give glob a shot its pretty amazing I abuse it all the time
09:32 < xyproto> mpl: "which" should be available on all unix-like systems,
if you just want a quickfix
09:32 < hallas> tsp: Hey.  Check out
http://golang.org/src/pkg/http/server.go?s=24770:24828#L842 start at the
highlighted ListenAndServe func.  Once you read that source, youll understand how
to do networking in Go
09:32 < mpl> xyproto: isn't LookPath doing everything which would do?
09:34 < xyproto> mpl: I haven't looked at LookPath before, but yes, it looks
like it.
09:35 < xyproto> mpl: I once wrote a memoized LookPath-like function, btw.
The caching makes it really fast, there's usually not that much to cache and
programs that use "which"/"LookPath" usually call the function more than once.
Recommended.  :)
09:36 < mpl> I had forgotten I had used LookPath in another program, should
have thought of it...
09:37 < str1ngs> use glob or I'm going to send the gopher after you!
09:38 < mpl> str1ngs: :P
09:39 < mpl> str1ngs: I'll have a look at it.  someday...  I have this
tendency that when a program works for me and I don't get requests from users, I
don't touch it much anymore afterwards hehe.
09:39 < wrtp> xyproto: memoizing LookPath is a bad idea
09:39 < str1ngs> mpl: no worries.  but glob I would think is less work.
forked calls take alot more boiler plate.
09:40 < wrtp> it means if you add a new binary to the path, it won't be
picked up
09:40 < wrtp> anyway, the os will do the caching for you
09:41 -!- matt2909 [d98c6015@gateway/web/freenode/ip.] has joined
09:43 < matt2909> before I file a bug, does anyone know of any issues with
xml.Unmarshal and elements that contain underscore characters?
09:44 < wrtp> matt2909: elements that start with underscore characters?
09:45 < matt2909> the case in point is trying to unmarshal an element with
an underscore in the element name e.g.  <under_score
09:46 < hallas> I've created a type called Buffer which esentially is a
[]byte.  Then I made a function "func (b Buffer) Write(p []byte) (n int, err
os.Error)" etc.  How do I copy the "p" into my "b" when calling Write?  b = p
doesnt seem to work :-(
09:48 < wrtp> hallas: i think you want func (b *Buffer) ...
09:48 < wrtp> otherwise you can't change the receiver
09:48 -!- genbattle [~nick@203-173-207-1.dialup.ihug.co.nz] has joined #go-nuts
09:48 < wrtp> hallas: have you looked at bytes.Buffer ?
09:48 < str1ngs> hallas: also there is bytes.Buffer already.  which you
might want to use instead
09:49 < str1ngs> opps redundant sorry
09:49 < mpl> str1ngs: looks like Glob uses patterns and I need regexes for
now.  I might be able to change them into a pattern though.  I'll see.
09:49 < str1ngs> mpl: no worries just something to keep in mind
09:49 < mpl> str1ngs: yep, thx.
09:49 < str1ngs> mpl: the walker is probably better for this but takes abit
to get use to
09:50 < genbattle> hiyas, i've got a problem accessing C arrays from Go;
what's the best way to convert a C pointer to a Go array?
09:50 < matt2909> ignore my xml query above (no bug yay!), the struct name
is used for pattern matching so it must also contain the underscore
09:50 < hallas> str1ngs / wrtp: Thanks.  Stupid me.  Need to learn that if
theres something I think is clever, the Go team already made it .
09:50 < genbattle> at the moment i'm using "device_ids_go :=
(*[]C.cl_device_id)(device_ids)", but it doesn't give me anything after the fist
09:51 < wrtp> genbattle: do you know the number of items in the array?
09:52 < genbattle> yea i've got a length
09:52 < genbattle> the C function i'm passing the array pointer into return
a len
09:53 < wrtp> devids :=
09:53 < wrtp> domething like that
09:54 < wrtp> essentially you cast it to a pointer to a sufficiently large
(statically sized) array, then slice that to the right size
09:54 < genbattle> that seems like a bit of a hack
09:55 < wrtp> it's only as much of a hack as C using pointers to represent
arrays is a hack :-)
09:55 < genbattle> :P
09:55 -!- randfur [~androirc@] has quit [Ping timeout: 246 seconds]
09:59 < Namegduf> genbattle: The basic problem is that array types have a
fixed known size at compiletime in Go. Making it huge as far as the type system is
concerned just makes it C-like.
10:00 < Namegduf> You could use unsafe and evil unportable magic to
construct a slice out of the pointer directly
10:00 < Namegduf> But really that would be worse.
10:01 -!- rlab [~Miranda@] has joined #go-nuts
10:01 < genbattle> what is a slice if not a bounded array pointer
10:02 < Namegduf> That's pretty much what it is, yes.
10:02 < Namegduf> The internal representation is allowed to change, though
10:02 < Namegduf> So building one yourself is very unsafe
10:02 < Namegduf> And allowed to break with new Go
10:03 < Namegduf> At the moment it's just the pointer, followed by len,
followed by cap
10:03 < wrtp> devids :=
count, count}))
10:03 -!- virtualsue [~chatzilla@nat/cisco/x-tztowjjmjedlheyz] has joined #go-nuts
10:03 < wrtp> or something like that
10:03 -!- rlab_ [~Miranda@] has joined #go-nuts
10:03 < wrtp> for the unsafe magic
10:04 < wrtp> s/SliceHeader/reflect.SliceHeader
10:04 < Namegduf> http://golang.org/pkg/reflect/#Value.MakeSlice
10:04 < wrtp> Namegduf: that doesn't do the job
10:04 < wrtp> it allocates the storage for you
10:05 < Namegduf> Oh, I see.
10:05 < genbattle> yea
10:05 < Namegduf> In that case, reflect.New(), followed by
reflect.SetLen()...  still trying to find a way to set the pointer and cap.
10:05 < wrtp> you can't do it without casting to SliceHeader
10:05 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-174-26.clienti.tiscali.it] has
joined #go-nuts
10:06 < wrtp> reflect is not unsafe, but that is an unsafe operation
10:06 -!- rlab [~Miranda@] has quit [Ping timeout: 276 seconds]
10:06 < wrtp> it's inherently unsafe because C is inherently unsafe
10:07 < Namegduf> Hmm, pity.
10:08 < Namegduf> Constructing an arbitrary slice on something is inherently
unsafe in that you're relying on the programmer being right in doing so
10:08 < Namegduf> But it could be portable.
10:08 < Namegduf> The array trick works well, at any rate.
10:09 < wrtp> it is portable - my unsafe code above was portable
10:09 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-152-55.clienti.tiscali.it] has
quit [Ping timeout: 276 seconds]
10:09 -!- rlab_ [~Miranda@] has quit [Ping timeout: 260 seconds]
10:09 < Namegduf> The sliceheader stuff isn't.
10:09 < wrtp> it is
10:09 < Namegduf> "SliceHeader is the runtime representation of a slice.  It
cannot be used safely or portably."
10:10 < wrtp> oh, ok
10:10 < Namegduf> ~ http://golang.org/pkg/reflect/#SliceHeader
10:10 < Namegduf> I guess they could alternatively just declare that header
10:11 < wrtp> well, at least it will work portably across all platforms,
because gob uses it, for example
10:11 < wrtp> it just might break in the future
10:11 < Namegduf> Yeah.
10:12 < wrtp> the main problem with the array trick is that if you want to
pass the slice out into the wider go world, the capacity remains huge.
10:12 < wrtp> which means that any caller can break things
10:12 < Namegduf> Ah, yeah.
10:12 < wrtp> see also http://code.google.com/p/go/issues/detail?id=1642
10:16 -!- fhs [~fhs@pool-74-101-66-112.nycmny.east.verizon.net] has quit [Quit:
10:16 -!- telexicon [~telexicon@unaffiliated/chowmeined] has quit [Ping timeout:
252 seconds]
10:19 -!- rlab [~Miranda@] has joined #go-nuts
10:23 < xyproto> wrtp: I agree that memoizing LookPath is a bad idea.
However, there are cases where a memoized version can be useful, for instance if a
windowmanager starts up and wishes to populate the menues based on which binaries
are in the path.
10:29 < wrtp> xyproto: i'm not sure that memoizing is the answer there -
surely the window manager can simply store the resulting paths itself if it
10:30 < wrtp> then it would only call LookPath once and there would be no
need to maintain a cache
10:32 < xyproto> wrtp: I'm sure there are several ways to do it.
Memoization may not be the answer.
10:32 < xyproto> in any case, I wonder what the Go equivalent to the Python
"Memoize" decorator is: http://wiki.python.org/moin/PythonDecoratorLibrary#Memoize
10:32 -!- fhs [~fhs@2001:0:4137:9e76:87f:54ac:b59a:bd8f] has joined #go-nuts
10:34 < Namegduf> You could make a function which took a function and
returned a memoized version of it, which had a structure keeping cached results
closed over by a closure, which is returned.
10:35 < Namegduf> Using reflection.
10:36 < Namegduf> I *think* so, anyway.
10:36 < Namegduf> It might suffer from lack of generics.
10:38 < Namegduf> Easily doable for a given signature, I'm just not sure how
easy it'd be to make it work for any.
10:38 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
joined #go-nuts
10:39 < wrtp> Namegduf: i don't think you can do it, because there's no way
of creating new functions of arbitrary type using reflection
10:41 < Namegduf> Hmm.
10:41 < wrtp> Namegduf: i'm not sure you'd be able to do it even with
10:42 < Namegduf> You could do it by wrapping it in a closure taking ...
10:42 < Namegduf> *{}
10:42 < Namegduf> And memoizing that
10:42 < Namegduf> But it's getting nasty.
10:43 < wrtp> yeah, the resulting function would be func(...interface{})
interface{}, yuk
10:43 < wrtp> and even then it wouldn't work on functions returning more
than one result
10:44 < Namegduf> You could put multiple results into an interface{} by
putting a []interface{} into it
10:44 < Namegduf> Or returning a []interface{}
10:44 < Namegduf> Very yuck, though.
10:48 -!- gmrph [~gmurphy@203-214-86-6.dyn.iinet.net.au] has left #go-nuts []
10:55 -!- boscop [~boscop@g226242129.adsl.alicedsl.de] has quit [Ping timeout: 248
10:56 < Namegduf> The true equivalent to a decorator is to just put the
"decorator" function in place of the decorated function, with it calling the
original function.
10:58 -!- genbattle [~nick@203-173-207-1.dialup.ihug.co.nz] has quit [Quit:
10:58 -!- rlab [~Miranda@] has quit [Ping timeout: 276 seconds]
10:58 -!- boscop [~boscop@f050134104.adsl.alicedsl.de] has joined #go-nuts
11:02 -!- Kafo [~Kafo@a91-152-189-15.elisa-laajakaista.fi] has joined #go-nuts
11:03 -!- rlab [~Miranda@] has joined #go-nuts
11:05 < wrtp> Namegduf: yeah.  otherwise known as a wrapper.
11:07 -!- flaguy48 [~gmallard@user-0c6s350.cable.mindspring.com] has joined
11:12 < wrtp> genbattle: just saw a post on golang-nuts that looks like it
might be yours
11:12 < wrtp> didn't we just answer your question?
11:13 -!- foocraft [~ewanas@] has joined #go-nuts
11:14 -!- rlab_ [~Miranda@] has joined #go-nuts
11:15 < wrtp> oh yeah, i see you acknowledged it
11:17 -!- rlab [~Miranda@] has quit [Ping timeout: 252 seconds]
11:18 < wrtp> oh, you've gone
11:18 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
quit [Quit: whitespacechar]
11:19 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
joined #go-nuts
11:23 -!- jlaffaye [~jlaffaye@] has joined #go-nuts
11:23 -!- matt2909 [d98c6015@gateway/web/freenode/ip.] has quit
[Quit: Page closed]
11:24 < jlaffaye> you guys know what is arch specific in the go appengine
11:24 -!- ExtraSpice [~XtraSpice@] has joined #go-nuts
11:24 < str1ngs> just the testing locally
11:25 < ww> genbattle's in .nz iirc, so bed time i suppose
11:25 < str1ngs> ultimately it runs on 64bit hardware
11:27 -!- fmoo [~Adium@c-76-102-41-101.hsd1.ca.comcast.net] has quit [Quit:
11:27 < jlaffaye> because there are two zip files (386 and amd64) so there
is no difference?  in fact I want to run it on FreeBSD amd64 but if there are some
11:29 < ww> jlaffaye: you can compile to either architecture with one
compiler, the difference is the host OS
11:29 < str1ngs> jlaffaye: all of goroot is OS arch specific
11:29 < ww> also, be careful if you want to use CGO on FreeBSD - it's broken
in the most recent release
11:32 < jlaffaye> str1ngs: I see...  are you refering to Exception: ('cannot
call go-app-builder', OSError(8, 'Exec format error')) ? :)
11:33 < str1ngs> jlaffaye: in your case yes
11:33 < str1ngs> what you probably need to do is find out where the source
is hosted and build for bsd/arch
11:33 -!- monsieur_max [~monsieur_@] has joined #go-nuts
11:34 < monsieur_max> hi everyone
11:38 -!- foocraft [~ewanas@] has quit [Quit: if you're going....to
san.  fran.  cisco!!!]
11:40 -!- jlaffaye [~jlaffaye@] has quit [Remote host closed the
11:40 -!- jlaffaye [~jlaffaye@] has joined #go-nuts
11:43 -!- zerosanity [~josh@] has joined #go-nuts
11:56 -!- artefon [~thiago@] has joined
11:59 -!- niemeyer [~niemeyer@conference/ubuntudevelopersummit/x-mergcazpfaqgwsqi]
has joined #go-nuts
12:06 -!- boomtopper
[~boomtoppe@cpc12-nrte22-2-0-cust249.8-4.cable.virginmedia.com] has quit [Ping
timeout: 258 seconds]
12:08 -!- rlab_ [~Miranda@] has quit [Ping timeout: 240 seconds]
12:12 < jeremy_c> uriel: skelterjohn: Wei G. on the mailing list gave me the
clue necessary to make my iup.go work on Windows...  CGo does not support linking
to static libraries, which I was doing.  Linking to the dynamic libraries caused
everything to work.
12:14 -!- Nitro [~Nitro@unaffiliated/nitro] has joined #go-nuts
12:16 -!- cenuij [~cenuij@] has joined #go-nuts
12:16 -!- cenuij [~cenuij@] has quit [Changing host]
12:16 -!- cenuij [~cenuij@base/student/cenuij] has joined #go-nuts
12:21 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
quit [Quit: whitespacechar]
12:22 -!- brtk [~brtk@c83-248-35-158.bredband.comhem.se] has joined #go-nuts
12:22 -!- rlab [~Miranda@] has joined #go-nuts
12:28 -!- marten_ [~marten@] has joined #go-nuts
12:29 -!- Tanner_ [~tanner@h96-60-249-44.cncrtn.dsl.dynamic.tds.net] has quit
[Ping timeout: 258 seconds]
12:31 -!- matt2909 [d98c6015@gateway/web/freenode/ip.] has joined
12:32 -!- yebyen [~yebyen@martyfunkhouser.csh.rit.edu] has quit [Ping timeout: 240
12:32 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has quit [Ping
timeout: 240 seconds]
12:36 -!- Sep102__ [~Sep102@c-71-231-176-153.hsd1.wa.comcast.net] has quit [Read
error: Connection reset by peer]
12:36 -!- Sep102__ [~Sep102@c-71-231-176-153.hsd1.wa.comcast.net] has joined
12:37 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has joined #go-nuts
12:38 < matt2909> is it possible to generate go code routines at runtime and
then compile/execute them?
12:39 -!- bubb [~AndChat@S01065cd9985ba2e7.va.shawcable.net] has quit [Ping
timeout: 260 seconds]
12:40 -!- knownow [~Adium@] has joined #go-nuts
12:43 < niemeyer> matt2909: No, there's no support for generating code at
12:45 -!- knownow [~Adium@] has quit [Ping timeout: 240 seconds]
12:45 < wrtp> matt2909: closures can sometimes give you similar
functionality, depending on what you need
12:45 -!- knownow [~Adium@] has joined #go-nuts
12:48 < GeertJohan> wouldn't it be possible to just write the generated go
code to a file and then compile that using a syscall ?
12:48 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
joined #go-nuts
12:49 < matt2909> GeertJohan: thats the path I'm following right now, but it
has the disadvantage of not being able to dynamically load the code, so I'd have
to use remote procedure calls and have that associated hit
12:54 < GeertJohan> ah yes :) and how about a wrapper of some sort?  say a
library file that is empty (call does nothing) when you compile the main program,
and then you replace that with a at runtime compiled library that has the same
header/signatures, but actually contains stuff to do
12:54 < GeertJohan> *just thinking out loud here, not an expert*
12:55 < matt2909> GeertJohan: its the "replace" part that I think is the
12:59 < GeertJohan> hmmyeah
12:59 < GeertJohan> maybe yes, I have no clue how and at what time go loads
its executable code...
13:00 < Namegduf> When the program is started, never after.
13:00 < xyproto> matt2909: just an idea, but what happens if you write a c
module that calls code from Go, then compile the Go code and then the c .so every
13:00 < Namegduf> Go programs do not embed a Go compiler.
13:01 < jeremy_c> On the go package page there are some dynamic scripting
languages you can use, it will not be dynamic go, but may do the trick.
13:02 < GeertJohan> Namegduf: uhu, but it is posible to execute commands
right?  so if `go` is in the PATH env var where the program is executed, it should
be posible to create/write a file containing go code, and then compile that using
a syscall..  right?
13:02 < Namegduf> GeertJohan: Sure.  Then what?
13:02 < Namegduf> Go does not have dynamic loading,
13:02 < GeertJohan> yeah thats what we're trying to figure out now :P
13:02 < Namegduf> s/trying to figure out/trying to ask over and over until
the answer changes/
13:03 < matt2909> jeremy_c: to what package are you refering?
13:03 < matt2909> xyproto: I'm evaluating Go, so ideally I want to just use
Go not go back to C, I already know how in C
13:04 -!- zerosanity [~josh@] has quit [Read error: Connection reset by
13:04 < Namegduf> There are two potential answers:
13:04 < jeremy_c> matt2909: http://godashboard.appspot.com/project ...
scroll toward the bottom, "Virtual Machines and Languages" ...  Possibly Gelo,
GoForth, GoLightly, go-scheme, go-python, go-lua, go-tcl, ...
13:04 < Namegduf> Multiprocess, and "restart while preserving state"
13:08 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
13:09 < skelterjohn> morning
13:09 < jeremy_c> uriel: skelterjohn: Wei G. on the mailing list gave me the
clue necessary to make my iup.go work on Windows...  CGo does not support linking
to static libraries, which I was doing.  Linking to the dynamic libraries caused
everything to work.
13:09 < uriel> jeremy_c: yes, saw that
13:09 < uriel> thanks
13:09 < skelterjohn> hey great
13:09 < skelterjohn> good to know
13:09 < xyproto> matt2909: I see.  Well, I guess that lack of .so-support is
a showstopper for maximum efficiency for that particular user case, right now.
13:09 < jeremy_c> uriel: opps.  Just used UP/Arrow to let skelterjohn sorry
about including you twice.
13:13 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-174-26.clienti.tiscali.it] has
quit [Quit: E se abbasso questa leva che succ...]
13:14 < uriel> matt2909: just curious, but why do you need runtime code
13:15 < skelterjohn> wrtp: with the mac draw stuff you're working on - do
you 1) have to run the event loop in the main thread and 2) have trouble making
the window mesh well with the terminal windows?  command-` to switch, can't pop to
front etc?
13:16 < skelterjohn> i've got sizable windows that are being drawn on from
go, now
13:16 < matt2909> uriel: suppose I want to write a VM? or an emulator
13:16 < uriel> matt2909: a few people have written such things without much
13:17 -!- knownow [~Adium@] has quit [Ping timeout: 240 seconds]
13:17 < matt2909> uriel: I've noticed that now, and I'll be sure to take a
look at their projects
13:17 < uriel> matt2909: see the "virtual machines and languages" section
of: http://go-lang.cat-v.org/go-code
13:21 < wrtp> skelterjohn: cool.
13:21 < wrtp> yes, i have to run the event loop in the main thread, but
that's not visible from go
13:21 < wrtp> currently the window doesn't mesh with anything!
13:22 < exch> Does the appengine bit of Go handle Cgo packages?
13:22 < wrtp> exch: i would very much doubt it
13:22 < wrtp> you can't import unsafe
13:23 < skelterjohn> not visible from go?  how do you manage that?
13:23 < skelterjohn> i have to have gmdgo.Run() at the end of main()
13:23 < exch> good point
13:24 < skelterjohn> gmdgo -> go mac draw...  go...  maybe i should
change the name
13:24 < wrtp> skelterjohn: the event interface is a channel.  (see
Window.EventChan in http://golang.org/pkg/exp/draw/)
13:24 < skelterjohn> aha - so you put it inside EventChan
13:24 < skelterjohn> that can be a good idea - but other draw impls don't
require you to call that from the main thread
13:25 < skelterjohn> also, each window will want its own, but they don't
want to run the event loop twice
13:25 -!- iant [~iant@] has quit [Read error: Connection reset by
13:26 < wrtp> skelterjohn: i've got one event loop that multiplexes out to
an event chan for each window
13:27 < wrtp> skelterjohn: what primitives are you using to draw the
13:27 < skelterjohn> :s probably the worst way possible
13:27 < skelterjohn> i draw lots of 1x1 rects
13:27 < wrtp> omg
13:28 < skelterjohn> using CGContext calls
13:28 < skelterjohn> haha
13:28 < skelterjohn> just wanted to get something working :)
13:28 < skelterjohn> also, i haven't yet been able to find some kind of
raster-backed image class in the doc
13:29 < wrtp> skelterjohn: this is what i do: http://pastebin.com/S81TD2hY
13:29 < wrtp> it still involves an allocation per render, but it's better
than drawing many rectangles!
13:30 < skelterjohn> makes sense
13:31 < skelterjohn> also - when i invoke the library by running a .app the
menu bar pops up
13:31 < skelterjohn> but when i run it from go, no such luck
13:31 < skelterjohn> and if i double-click a go program, it brings up a
terminal.  ithink there is something fundamental about how go programs are built
that prevents it
13:32 -!- TMKCodes [~TMKCodes@unaffiliated/tmkcodes] has quit [Ping timeout: 240
13:38 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has joined
13:38 -!- jbooth1 [~jay@] has joined #go-nuts
13:40 -!- iant [~iant@] has joined #go-nuts
13:40 -!- mode/#go-nuts [+v iant] by ChanServ
13:40 < exch> these google I/O announcements for Go certainly cause a lot of
github PMs and messages O_o It's been quiet on my account for weeks and now I got
6 in a day
13:42 < skelterjohn> i haven't got any :\
13:42 -!- pharris [~Adium@rhgw.opentext.com] has joined #go-nuts
13:42 < skelterjohn> of course, i didn't even know that github provided such
13:43 < exch> you'll see notifications in the lil menu at the top-right of
the page
13:43 < exch> or in the activity stream
13:44 -!- boomtopper
[~boomtoppe@cpc12-nrte22-2-0-cust249.8-4.cable.virginmedia.com] has joined
13:44 < exch> One of em brings up a good point though.  My xmlx package (and
consequently the rss package) relies on a cgo package called go-iconv.  It allows
me to ensure the Go xml tokenizer receives proper UTF-8 data.  This cgo dependency
will prevent the packages from being useful on Appengine though
13:45 < exch> Either I roll a native Go version of iconv..  which is frankly
not something I am looking forward to doing
13:45 -!- res99 [~anonymous@] has joined #go-nuts
13:45 < wrtp> exch: use go-charset :-)
13:45 < exch> Or I take the dependency out and make it abundantly clear in
the docs that the user is responsible for proper conversion
13:45 < exch> mm haven't heard of that
13:46 -!- TMKCodes [~TMKCodes@unaffiliated/tmkcodes] has joined #go-nuts
13:49 < exch> ah that looks like it might just be what the doctor ordered
13:50 < exch> it needs some fixes for a recent go release though
13:53 < wrtp> ah, i thought i'd done that.  i'll have a look
13:53 < exch> os.Open signatures need some tweaking
13:53 < exch> gofix should take care of that
13:54 < wrtp> exch: oh, i did that, but didn't apply the CL. doh.
13:55 < uriel> 13:22 < exch> Does the appengine bit of Go handle Cgo
13:56 < uriel> exch: it would be quite damned hard to sandbox if you could
use cgo
13:56 < mpl> I'm still thinking of the WTF-language tweet.  this worthy of
becoming a meme imho :)
13:56 < exch> uriel: yes
13:57 -!- boomtopper
[~boomtoppe@cpc12-nrte22-2-0-cust249.8-4.cable.virginmedia.com] has quit [Quit:
Lost terminal]
14:02 < skelterjohn> ugh - why is the mac API so convoluted
14:02 < skelterjohn> it should always be simple to do simple things
14:04 < wrtp> skelterjohn: it's dreadful, isn't it?
14:05 < xyproto> mpl: the strconv.Itoa one?
14:05 -!- Venom_X [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has
joined #go-nuts
14:07 < delinka> Go's tools don't (can't?) output dynamic libs, Go
executables are not linked dynamically at runtime.  Correct?
14:07 < skelterjohn> correct
14:08 <+iant> 6g/8g do not output shared libraries, yes; but they can
generated executables which are linked dynamically to other (non-Go) shared
14:08 < delinka> can I link directly to C static libs?
14:08 < delinka> ah.
14:08 < skelterjohn> oh - yeah you can do dynamic linking via cgo
14:08 < delinka> so, I can link to a .so and it'll be loaded at runtime
14:09 <+iant> you have to do it in the way that cgo does it, which is
somewhat awkward when not using cgo
14:09 < skelterjohn> in your go file, before import "C", you can put a
comment like
14:09 < skelterjohn> // #cgo LDFLAGS: -lm
14:10 -!- dolch [~ftw@CPE002584096773-CM78cd8e5c9ddd.cpe.net.cable.rogers.com] has
joined #go-nuts
14:10 -!- Vigud [u1143@gateway/web/irccloud.com/x-mfsgmatrbsolzzmg] has left
#go-nuts []
14:10 < delinka> I'm not actually doing this at the moment.  Just clarifying
my thoughts on the subject.  and now that skelterjohn has reminded me, I recall
reading that.  thanks, folks :)
14:12 -!- elephants [~elephants@] has joined #go-nuts
14:13 < mpl> xyproto: no, that one
14:14 -!- niemeyer [~niemeyer@conference/ubuntudevelopersummit/x-mergcazpfaqgwsqi]
has quit [Ping timeout: 240 seconds]
14:18 < wrtp> exch: i *will* submit the CL after i've worked out what my
password should be :-)
14:19 < exch> hehe alright.  thanks :)
14:22 < wrtp> exch: done - try updating.
14:22 < exch> alright
14:23 < exch> alrightyup, seems to work now.  thanks
14:23 < wrtp> cool
14:25 -!- GeertJohan [~geertjoha@s51478c91.adsl.wanadoo.nl] has quit [Quit:
14:26 < xyproto> mpl: That is incredibly funny.  :D I have not seen that
tweet before.  Do you think he's trolling?
14:26 < Namegduf> I think they're just stupid.
14:27 < Namegduf> I wish I could deny that there would be someone who thinks
that programming languages should be designed to let programmers vomit on a page,
and have it make sense of it as best it can
14:28 < Namegduf> But "dynamic" languages like that idea, and JavaScript is
probably best described that way.
14:28 < Namegduf> Also "giant google androids"
14:29 < Namegduf> Not sure what that has to do with anything
14:31 < mpl> xyproto: no I think he's being honest.
14:32 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has quit
[Ping timeout: 260 seconds]
14:32 < mpl> as stupid as this tweet may be, I still like a lot the
WTF-language idiom.  :)
14:32 < jeremy_c> When starting with Go, importing "fmt" for debugging then
not using it and getting a compiler error was irritating, as well as unused vars.
I'm use to it now, but was a stumbling block for a bit.
14:32 -!- TMKCodes [~TMKCodes@unaffiliated/tmkcodes] has quit [Ping timeout: 252
14:33 < hallas> its alot worse when he tweets that its stupid to have
strconv.Itoa when you in Javascript can just do "hallo" + 123 when concatenating a
string with an int
14:33 < hallas> Oh well
14:33 < hallas> He doesnt say stupid, he says its insane
14:34 < jbooth1> jeremy_c agreed, although once tooling catches up it'll be
a lot less annoying
14:34 < xyproto> I don't think it's insane, of course you want "hallo" + 123
to become "hallo{" ;)
14:34 < hallas> hehe
14:34 < hallas> did you look that up :P ?
14:35 < xyproto> chr(123) in this handy Python interpreter :P
14:36 < hallas> ascii
14:36 -!- TMKCodes [~TMKCodes@unaffiliated/tmkcodes] has joined #go-nuts
14:44 < skelterjohn> with go's strict typing, you wouldn't interpret 123 as
a char :)
14:45 < skelterjohn> there is only one reasonable way to interpret
14:45 < skelterjohn> and that is as a compile error
14:45 < skelterjohn> since there is only string+string
14:45 < jeremy_c> http://pastie.org/1889225 isn't a very helpful error
14:46 < skelterjohn> jeremy_c: someone is probably using variadics (...)
14:46 < jeremy_c> skelterjohn: yeah, but how about a file and line num?  :-)
...  someone would be me but I'm not finding anything wrong yet.
14:47 < skelterjohn> fair enough
14:47 < skelterjohn> maybe worth reporting an issue
14:47 < wrtp> in limbo, string(123) gave "123", but there was no way of
getting a string with a single integer char in it...  on balance i think go is
14:49 < wrtp> although it was very convenient to do decimal conversions
trivially.  i rarely use strconv.Itoa - formatted prints are more general
14:49 < skelterjohn> fmt.Sprintf("%c", 123)?
14:49 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
14:49 < uriel> i think he feel right at home with VBScript
14:49 < uriel> +would
14:50 < wrtp> string(123)
14:50 < wrtp> works fine
14:50 < wrtp> fmt.Sprintf("%d", 123)
14:51 < wrtp> for decimal-formatted number
14:52 < jeremy_c> skelterjohn: I went to make a bug report but cannot
reproduce the problem in a simple test case.  http://pastie.org/1889248 is the
code causing the problem.  If I comment out line 8 (yes line 8) then my app
compiles fine.  Uncomment it and I get the error message stated above.
14:54 -!- imsplitbit [~imsplitbi@] has joined #go-nuts
14:55 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has joined #go-nuts
14:55 -!- iant [~iant@] has quit [Quit: Leaving.]
15:01 < jeremy_c> skelterjohn: oh, I see.  The C function is a variadic
function, I must be calling the C func wrong from Go.
15:01 < skelterjohn> ah
15:02 < skelterjohn> i recommend wrapping it in a C function that isn't
15:02 < jeremy_c> skelterjohn: sounds good, thanks for the tip
15:03 < skelterjohn> also that should help you file an issue - it should
definitely say *where* the error is happening
15:03 < hallas> Makes absolutely no sense this.  My app engine app goes into
loop when serving a file with http.ServeFile, but only when an actual file is
request.  Its just a simple css file.  :O
15:04 -!- gtaylor [~gtaylor@99-5-124-9.lightspeed.gnvlsc.sbcglobal.net] has joined
15:04 < skelterjohn> can css files refer to other css files?  is this one
referring to itself?
15:04 < hallas> Nope :O
15:05 < hallas> Besides, that should be a browser issue then
15:05 < skelterjohn> you didn't say where the loop was :)
15:05 < hallas> Well, I dunno really if it is a loops, I just know the
servers doesnt reply, until it times out
15:05 < Namegduf> Ah.
15:05 < Namegduf> That guy who was complaining about Go is a Ruby user
15:05 < hallas> But it can return the directory of the css file just fine.
15:05 < skelterjohn> haha
15:05 < Namegduf> As well as JS
15:05 < Namegduf> That explains everywhere
15:05 < Namegduf> *everything
15:06 < skelterjohn> hallas: i can't help you, sorry
15:06 < skelterjohn> i know little about web serving, and nothing about app
15:07 -!- iant [~iant@nat/google/x-rwtszkmviiuleaqi] has joined #go-nuts
15:07 -!- mode/#go-nuts [+v iant] by ChanServ
15:08 < jeremy_c> skelterjohn: submitted.
15:09 -!- Urmel| [~11087Urme@82-136-196-44.ip.telfort.nl] has quit [Ping timeout:
240 seconds]
15:10 -!- Urmel| [~11087Urme@82-136-196-44.ip.telfort.nl] has joined #go-nuts
15:13 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Quit:
15:13 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has quit [Quit: Leaving.]
15:16 -!- virtualsue [~chatzilla@nat/cisco/x-tztowjjmjedlheyz] has quit [Ping
timeout: 276 seconds]
15:19 -!- artefon [~thiago@] has quit [Quit:
15:21 -!- kamaji [~kamaji@cpc2-aztw22-2-0-cust775.aztw.cable.virginmedia.com] has
quit [Quit: leaving]
15:22 -!- piranha [~piranha@5ED42E59.cm-7-5a.dynamic.ziggo.nl] has quit [Quit:
Computer has gone to sleep.]
15:24 -!- niemeyer [~niemeyer@conference/ubuntudevelopersummit/x-whcpkyamepaifffg]
has joined #go-nuts
15:24 < jeremy_c> How can I cast an unsafe.Pointer to a char* in a
C.FunCall() ?
15:25 < wrtp> (*C.char)(myUnsafePointer)
15:25 -!- jnwhiteh [~jnwhiteh@WoWUIDev/WoWI/Featured/Dongle/cladhaire] has quit
[Quit: ZNC - http://znc.sourceforge.net]
15:27 -!- agonopol [~Adium@adfbd06.cst.lightpath.net] has joined #go-nuts
15:27 < jeremy_c> wrtp: hm, I thought I had tried that before w/an error.  I
guess not cause it's working.  Thanks.
15:28 -!- marten_ [~marten@] has quit [Quit: marten_]
15:28 -!- jnwhiteh [~jnwhiteh@WoWUIDev/WoWI/Featured/Dongle/cladhaire] has joined
15:28 < wrtp> np
15:29 < agonopol> I want to use a *bufio.Writer, but open and close the
underlying *os.File as many times as I can for the same io.Writer object.  For
some reason we are getting bad file descriptor after file.Clos() and OpenFile is
15:30 < agonopol> has anyone seen this before?
15:31 -!- kamaji [~kamaji@cpc2-aztw22-2-0-cust775.aztw.cable.virginmedia.com] has
joined #go-nuts
15:32 -!- kamaji [~kamaji@cpc2-aztw22-2-0-cust775.aztw.cable.virginmedia.com] has
left #go-nuts []
15:33 < wrtp> agonopol: could you paste some code?
15:33 < wrtp> i don't really understand your question, btw
15:35 < hallas> I believe that he wants to used a buffered writer, which
will enable him to open and close the underlying stream without the buffer
screwing up
15:35 < hallas> He just wants to Open(), Flush(), Close() ?
15:37 -!- marino0 [~marino0@] has joined #go-nuts
15:38 < marino0> Hi all !
15:38 -!- GeertJohan [~Squarc@D978EC5D.cm-3-1d.dynamic.ziggo.nl] has joined
15:39 < marino0> I have a question.  With GO, can we do polymorphism with
functions ?
15:39 < hallas> Nope
15:40 < hallas> marino0: ^^
15:41 < agonopol> thats correct hallas, im writing up a simple example and
ill put it up in a sec
15:46 -!- kamaji [~kamaji@cpc2-aztw22-2-0-cust775.aztw.cable.virginmedia.com] has
joined #go-nuts
15:47 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has quit [Remote host
closed the connection]
15:50 -!- skelterjohn [~jasmuth@] has joined #go-nuts
15:51 -!- piranha [~piranha@5ED43A0B.cm-7-5a.dynamic.ziggo.nl] has joined #go-nuts
15:52 -!- ako [~nya@fuld-590c7f75.pool.mediaWays.net] has joined #go-nuts
15:53 -!- niemeyer [~niemeyer@conference/ubuntudevelopersummit/x-whcpkyamepaifffg]
has quit [Ping timeout: 240 seconds]
15:53 -!- matt2909 [d98c6015@gateway/web/freenode/ip.] has quit
[Quit: Page closed]
15:54 -!- aho [~nya@fuld-590c7f59.pool.mediaWays.net] has quit [Ping timeout: 240
15:55 -!- ako [~nya@fuld-590c7f75.pool.mediaWays.net] has quit [Client Quit]
15:55 -!- kamaji [~kamaji@cpc2-aztw22-2-0-cust775.aztw.cable.virginmedia.com] has
quit [Quit: leaving]
15:55 -!- kamaji [~kamaji@cpc2-aztw22-2-0-cust775.aztw.cable.virginmedia.com] has
joined #go-nuts
15:58 -!- virtualsue [~chatzilla@nat/cisco/x-kxohtmkujlbikkcd] has joined #go-nuts
15:59 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has joined #go-nuts
15:59 -!- unofficialmvp [~dev@94-62-164-227.b.ipv4ilink.net] has joined #go-nuts
15:59 -!- unofficialmvp [~dev@94-62-164-227.b.ipv4ilink.net] has left #go-nuts []
15:59 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
16:04 -!- artefon [~thiago@] has joined #go-nuts
16:07 -!- fhs [~fhs@2001:0:4137:9e76:87f:54ac:b59a:bd8f] has quit [Quit: leaving]
16:08 < Kafo> Does Google Code or github have a feature similar to CodePlex'
"Help Wanted"?
16:08 < dfr|mac> Kafo: what do you mean?
16:09 < Kafo> http://www.codeplex.com/site/search/openings
16:09 < dfr|mac> Kafo: i don't think so..  but that sounds like a great idea
for github
16:09 < Kafo> A list where you can submit your project with more detailed
information on what you need help on
16:12 -!- merijn [~merijn@inconsistent.nl] has joined #go-nuts
16:17 -!- krutcha [~krutcha@remote.icron.com] has joined #go-nuts
16:18 -!- peapicker [~peapicker@unaffiliated/peapicker] has joined #go-nuts
16:18 -!- awidegreen [~quassel@h-170-226.A212.priv.bahnhof.se] has joined #go-nuts
16:18 -!- moraes [~moraes@] has quit [Remote host closed the
16:19 -!- Venom_X [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has quit
[Read error: Operation timed out]
16:19 -!- Venom_X [~pjacobs@] has joined #go-nuts
16:19 < merijn> Is there a more in-depth/direct overview of Go then the
tutorial or is my choice limited to reading that or the language spec?
16:20 < Namegduf> "Effective Go"
16:20 < Namegduf> Is a nice document.
16:20 < str1ngs> http://golang.org/doc/effective_go.html
16:20 < gmilleramilar> does anyone here use transient netchan sockets.  That
is where a process starts up, opens a netchan, writes some stuff and shuts down?
16:21 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has quit [Remote host
closed the connection]
16:22 < wrtp> gmilleramilar: yes, and you can make it crash with that
16:22 < wrtp> it's on my "to do" list to look at
16:22 < wrtp> (and to get a small piece of code to reproduce it...)
16:23 < gmilleramilar> SIGPIPE crash?
16:23 < merijn> Namegduf: Yeah, effective Go looked nice, but when I was
reading it I missed some of the basics.  Like variables in for loops/switch
statements and new/make before I could find the details about variable
declaration.  I found those in the tutorial, but that meant skimming through the
prose (which isn't to bad if there's no alternative yet, but never hurts to ask
16:23 < Namegduf> Not really, then.
16:23 -!- dirthead [~chatzilla@] has joined #go-nuts
16:25 < gmilleramilar> wrtp: what I'm seeing is the "server" app that
remains running is doing some CPU intensive stuff and doesn't get around to
sending an ack until after the pipe has been closed (see stack trace here:
http://pastie.org/private/ek0off9ytrg84jveyvfqcw )
16:25 < dirthead> I'm trying to build go-gb, but keep getting the error:
Command not found.  The make system can't find 6g, which is in the path.  Anybody
else run into this issue?
16:26 -!- Bigbear1 [~Cody@d173-181-43-12.abhsia.telus.net] has joined #go-nuts
16:28 < wrtp> merijn: the language spec is really quite readable
16:28 < wrtp> gmilleramilar: no, close of already closed channel
16:29 -!- moraes [~moraes@] has joined #go-nuts
16:29 < str1ngs> dirthead: you sure its in the path.  # which 6g
16:30 < wrtp> gmilleramilar: i haven't seen that
16:31 < dirthead> str1ngs: yes, I verified it was in the path using 'which
6g'.  I ran the build command manually and it failed with: build.go:21: can't find
import: fmt
16:32 < str1ngs> dirthead: env | grep GO
16:32 -!- monsieur_max [~monsieur_@] has quit [Quit: Leaving.]
16:35 < skelterjohn> dirthead: i'm the go-gb author - let me take a look at
the source to remember what reports that
16:36 -!- cenuij [~cenuij@base/student/cenuij] has quit [Remote host closed the
16:37 < dirthead> skelterjohn: thanks!
16:38 < skelterjohn> oh wait - you're *building* gb?  as it not running it?
16:38 < dirthead> str1ngs: GOBIN=/home/tom/src/go/bin GOARCH=amd64
GOROOT=/home/tom/src/go GOOS=linux
16:38 < skelterjohn> then make sure $GOROOT is set
16:38 < dirthead> skelterjohn: yep, and GOROOT is set
16:38 < skelterjohn> hrm
16:38 < skelterjohn> try gomake instead of make
16:38 < skelterjohn> (gomake sets some envs and then runs make)
16:39 < dirthead> skelterjohn: gomake reports the same error
16:39 < skelterjohn> also, if you defined these in your terminal, you need
to export them to make them stick
16:39 < dirthead> I used export
16:39 < skelterjohn> and /home/tom/src/go/bin/6g exists?
16:39 < dirthead> yep
16:39 < skelterjohn> bizarre....
16:39 < skelterjohn> can you build other go programs?
16:39 < skelterjohn> with make
16:40 < dirthead> tom@ug ~/src/go-gb/gb $ which 6g
16:40 < dirthead> /home/tom/src/go/bin/6g
16:40 < dirthead> I haven't tried with make, but I was able to yesterday
using 6g
16:40 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Ping timeout: 240
16:40 < str1ngs> dirthead: ls $GOROOT/pkg
16:41 < skelterjohn> what happens if you do > 6g *.go
16:41 < skelterjohn> oh, can't find fmt
16:41 < skelterjohn> i feel like the problem is definitely with the env vars
16:42 < skelterjohn> because if $GOROOT/pkg/linux_amd64/fmt exists, it
should find it
16:42 < str1ngs> right but if you mix arch up..  you get the idea
16:42 -!- agonopol [~Adium@adfbd06.cst.lightpath.net] has left #go-nuts []
16:42 < dirthead> yeah, I must have something effed up
16:42 < str1ngs> dirthead: whats in $GOROOT/pkg ?
16:42 < dirthead> output from 6g *.go: doc.go:159: package documentation;
expected main
16:42 < str1ngs> and what OS ARCH do you have
16:43 -!- vsmatck [~smack@64-142-40-6.dsl.static.sonic.net] has quit [Ping
timeout: 240 seconds]
16:43 < skelterjohn> oh - everything except doc.go :)
16:43 < dirthead> GOARCH is amd64
16:43 < skelterjohn> dirthead: does $GOROOT/pkg/linux_amd64 exist?
16:44 < dirthead> ls ${GOROOT}/pkg gives linux_amd64
16:44 < str1ngs> find $GOROOT/pkg | grep fmt
16:44 -!- Venom_X [~pjacobs@] has quit [Quit: Venom_X]
16:44 < str1ngs> sorry didnt know you are linux so I made find some what
16:45 < dirthead> oops
16:45 < dirthead> that's supposed to be just the output
16:45 < dirthead> so find did find fmt.a
16:45 < dirthead> home/tom/src/go/pkg/linux_amd64/fmt.a
16:45 < dirthead> there
16:45 < str1ngs> hmm that looks right
16:46 < hallas> dirthead:
16:46 < dirthead> I must have my current term screwed up somehow
16:46 < skelterjohn> did you define the GO env vars in ~/.bashrc or did you
enter them manually?
16:46 < hallas> Are you cross compiling?
16:50 -!- Bigbear1 [~Cody@d173-181-43-12.abhsia.telus.net] has quit [Read error:
Connection reset by peer]
16:50 < dirthead> no
16:51 < str1ngs> purge your vars.  run ./clean.bash in src
16:51 -!- Bigbear1 [~Cody@d173-181-43-12.abhsia.telus.net] has joined #go-nuts
16:51 < hallas> dirthead: seems weird your errors.  try to remove the go
dir, and all the environment stuff, re install and only add the path to the go/bin
16:51 < hallas> dirthead: or purge as the awesone str1ngs says
16:52 < hallas> You do not need the goarch and stuff unless you're cross
compiling as Go can detect those things it self
16:52 < str1ngs> dirthead: then reset you vars and ./all.bash
16:52 < hallas> Once ./all.bash is done it will tell you which compiler to
use as well
16:53 < str1ngs> if you are lazy like me use ./make.bash :P
16:53 -!- merijn [~merijn@inconsistent.nl] has left #go-nuts []
16:53 -!- peapicker [~peapicker@unaffiliated/peapicker] has left #go-nuts
16:55 < hallas> That pizza better soon arrive!  Got some lame comedy movie
ready @ the couch!
16:56 < skelterjohn> in europe?
16:56 < hallas> Yes :-)
16:56 < skelterjohn> they have pizza over there?
16:56 < hallas> For us lazy computer guys they do
16:56 < hallas> And my usual means of food is out of town for two days
16:56 < skelterjohn> haha aw
16:57 < hallas> speaking of the devil
16:58 < Bigbear1> microsoft buys skype how long till skype is ruined
16:58 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:5e9:7e17:7ee4:5254] has joined
16:59 * delinka guesses less than 5 years
17:02 < skelterjohn> dirthead: any luck?
17:02 < dirthead> sorry, I got distracted by work.  :P
17:02 < dirthead> I'm going to reset my vars in my .bashrc and open a new
17:03 < skelterjohn> "work"
17:05 -!- TheMue [~TheMue@p5DDF7617.dip.t-dialin.net] has joined #go-nuts
17:05 < str1ngs> dirthead: no need just unset each GO var.  edit .bashrc
make sure its right . the source ~/.bashrc
17:06 < dirthead> well, ummm, it works now.  I think I had my vars all effed
up between my .bashrc and export commands.
17:06 < skelterjohn> cool - glad it's resolved
17:06 < str1ngs> I think so to
17:06 < dirthead> Thanks guys!
17:06 < skelterjohn> let me know if you have any gb questions
17:07 < dirthead> skelterjohn: cool!  Another dev here started using gb last
week.  He thinks it's the best thing since go!  :D
17:07 < skelterjohn> hah, thanks :)
17:07 < skelterjohn> you guys use go for work?  or just a common hobby
between coworkers?
17:08 < Bigbear1> gb?
17:08 < skelterjohn> http://go-gb.googlecode.com
17:08 < skelterjohn> it's a build tool i made for go projects
17:09 -!- prip [~foo@host33-131-dynamic.47-79-r.retail.telecomitalia.it] has quit
[Read error: Operation timed out]
17:10 -!- tvw [~tv@] has quit [Read error: Connection reset by peer]
17:10 -!- TMKCodes [~TMKCodes@unaffiliated/tmkcodes] has quit [Ping timeout: 248
17:11 < Bigbear1> cool
17:13 < dirthead> skelterjohn: We are adopting go for a commercial product
we are just starting to develop.
17:13 < skelterjohn> nice
17:14 < jeremy_c> dirthead: why go (just for learning)?  I may be using Go
for a new project (tool) at my work.
17:15 < skelterjohn> go is starting to pop up in more and more workplaces
17:15 < dirthead> jeremy_c: we have used Python in the past, however we find
it too slow for certain applications we have.  We speed AND a nice language.
17:16 < jeremy_c> my reasoning is it's pretty simple, interfaces with C
easily, fast, compiled, good std lib, community is building fast.
17:16 < jeremy_c> compiled = easy distribution.
17:17 < dirthead> We were thinking about going to C++ for speed until one of
our devs championed go.
17:17 < skelterjohn> good - C++ is more trouble than it's worth
17:17 < skelterjohn> too easy to get lost in the features
17:17 -!- keithcascio [~keithcasc@nat/google/x-hqwsfmqsuumvtwjt] has joined
17:17 < dirthead> agreed!
17:17 < skelterjohn> and start overloading operators to make things "easier"
17:18 < Bigbear1> can Go overload operators?
17:18 < dirthead> no
17:18 < exch> thank god for that
17:18 < Bigbear1> why
17:18 < Bigbear1> I like overloaded operators
17:18 < Bigbear1> can you use + to concatenate strings?
17:18 < dirthead> yes
17:19 < jeremy_c> I also like overloaded operators for many things.
17:19 < jeremy_c> but can't have everything I guess :-/
17:19 < dirthead> the + operator is overloaded, but you can't additionally
overload operators
17:19 < skelterjohn> overloading operators, when done properly, is great
17:19 < skelterjohn> but C++ makes no restrictions on "proper"
17:19 < skelterjohn> if you have two matrices and you want to add them, then
overloading + makes sense
17:20 < dirthead> yep, did that in C++ years ago
17:20 < skelterjohn> if you define + to be something bizarre, then it breaks
17:20 < jeremy_c> skelterjohn: but go doesn't prevent that...  func
sayHello() { fmt.Printf("Goodbye") }
17:20 < pharris> If you have a string that you want to output, overloading
the bitshift operator is just silly.
17:20 < skelterjohn> jeremy_c: but you can't overload sayHello either :)
17:20 < gmilleramilar> pharris: I was going to give the same example
17:20 < gmilleramilar> I feel like those operators are the most abused for
some reason
17:21 < skelterjohn> there is only one sayHello
17:21 < jeremy_c> but it does somethign silly because of a silly programmer.
No language can prevent dumb programmers.
17:21 < jeremy_c> from doing dumb things that is.
17:21 < skelterjohn> right, but with operator overloading you don't even
know it's happening
17:21 < skelterjohn> if someone overloads operator+(int a, int b)
17:22 < skelterjohn> i don't know if that is actually possible, but with C++
i assume everything is possible
17:22 -!- vsayer [~vivek@c-67-170-236-166.hsd1.ca.comcast.net] has quit [Ping
timeout: 240 seconds]
17:24 < Bigbear1> how would you regulate how you can use an operator?
17:24 < skelterjohn> also it's nice to escape from class hierarchies
17:24 < Bigbear1> is there a cms written in Go?
17:24 < skelterjohn> Bigbear1: I have no idea.  I'm not saying that there is
a "right" way to do operator overloading
17:25 < skelterjohn> or even that operator overloading is "wrong".  i'm just
saying it's easy to abuse and create subtle errors
17:25 < Namegduf> Bigbear1: A function can do something non-obvious, but it
is obvious that there is a function call there, mapping to an implementation
17:25 < wrtp> Bigbear1: one nice thing about Go is that you can look at some
code created by a total moron (possibly me) and have strong *guarantees* about
what's going on, without having to use any tools
17:26 < Namegduf> If you're in Go and not an insane hyperoverloaded
function, you can even find the source and know you're not having it overloaded
17:26 < Namegduf> Operator overloading is bad because it is non-obvious that
there is a function call there to some arbitrary code
17:26 < wrtp> with C++, anything could be happening...
17:27 < skelterjohn> hidden in header files filled with macros
17:27 < skelterjohn> another thing i like about go - no macros
17:27 < wrtp> yeah
17:27 < Namegduf> And what's more, you're not *supposed* to be thinking
about that.
17:27 -!- petrux [~petrux@host16-224-static.53-82-b.business.telecomitalia.it] has
quit [Quit: leaving]
17:27 < Namegduf> + is not supposed to be thought about, it's supposed to
"just work".
17:27 < wrtp> you know, one of the things that i continue to really enjoy in
go is...  you declare everything only once.
17:27 < wrtp> no header files to keep in sync
17:28 < skelterjohn> i was jsut getting irritated by that when writing ObjC
17:28 < skelterjohn> perhaps that's what made you think of it, too
17:28 < wrtp> skelterjohn: yeah
17:28 < wrtp> but also writing C too
17:28 < Kafo> Speking of macros; I almost got a heart attack from this
earlier today: http://code.google.com/p/scanmem/source/browse/trunk/scanroutines.c
17:28 < wrtp> Kafo: lol
17:28 < skelterjohn> omg
17:29 < wrtp> i've seen worse
17:29 < Kafo> That looks horrible enough.
17:30 < wrtp> there was a classic in some mail handler code i saw years ago
17:31 < wrtp> it had a 160 line macro with all kinds of unportable shit,
comparing strings against hex constants, etc...  but at heart the algorithm was
17:31 < wrtp> i deleted it, changed it to use strstr, and it went from
taking 60s to process a 1MB mailbox to 0.5s...
17:32 -!- monsieur_max [~monsieurm@ip-78.net-89-2-171.rev.numericable.fr] has
joined #go-nuts
17:32 -!- gtaylor [~gtaylor@99-5-124-9.lightspeed.gnvlsc.sbcglobal.net] has quit
[Quit: gtaylor]
17:32 < exch> I'm guessing it was an entry for a contest on how to do shit
as horrible and inefficiently as possible
17:32 < skelterjohn> the problem is that people who write such code feel
very clever afterwards
17:32 < skelterjohn> when it all works
17:32 < Kafo> wrtp: Sounds great.
17:33 -!- res99 [~anonymous@] has quit [Remote host closed the
17:33 < wrtp> exch: it was from the imap code
17:34 < wrtp> i will never have anything to do with imap after that
17:34 < exch> hehe can't blame you for that I guess
17:34 < exch> oh btw.  the xmlx package now uses go-charset instead of
17:34 < exch> Should be able to use it on AppEngine now
17:35 < wrtp> here it is:
17:35 < wrtp> except it's better than it was - no hex constants now :-)
17:36 < uriel> Kafo: that is nothing, see
17:36 < uriel> (there is a reason why ken expelled most of the preprocessor
from his Plan 9 C compiler collection)
17:37 < Kafo> A good reason that is
17:38 < wrtp> uriel: actually i don't that's too bad really.  at least it's
17:41 -!- Fish- [~Fish@9fans.fr] has joined #go-nuts
17:44 -!- keidaa [~keidaa@cm-] has joined #go-nuts
17:46 -!- tobym [~tobym@75-139-118-127.dhcp.mant.nc.charter.com] has joined
17:46 < monsieur_max> hi people, i'm in need of advice from you.  I'm a
total go newbie, i never coded anything in C, but i'm rather good at Java and
using openGL ES ( through Java on Android).  I'm thinking since a while about
learning a new language for desktop games using open gl.  I was thinking about
learning go rather than good old C to achieve my evil plan of world domination.
Do you think it's a good choice ? ( please note that as the topic s
17:47 < wrtp> monsieur_max: your text finished at "as the topic s"
17:48 < wrtp> but in general, you're asking in the right place for us to
answer "yes!"
17:48 < monsieur_max> oh no :(
17:48 < Namegduf> XD
17:48 < Namegduf> Go would be an excellent language for writing games.  High
performance, safe, maintainable, and simple- plus it's an area that concurrency
and parallelism being essentially free helps a lot.
17:49 < Namegduf> The primary sticking point would be the quality of the
OpenGL bindings and support for the desired target OSes
17:49 < wrtp> monsieur_max: depends a bit on what you want to dominate the
world with, mind
17:49 < Namegduf> I'm not sure of those myself.
17:49 < Kafo> Someone mentioned the garbage collector might cause problems
but otherwise it should be great.
17:50 < monsieur_max> good good :)
17:51 < monsieur_max> Namegduf: yeah i stumbled upon a project that seems
quite advanced on the open gl bindings
17:51 < monsieur_max> of course windows will be probably be a bit tricky
17:52 < gmilleramilar> is valgrind at all useful in analyzing cgo programs?
17:52 < Namegduf> I'm not sure
17:52 < Namegduf> Probably best to link the C parts into a separate test app
in pure C to valgrind them
17:52 < Namegduf> Valgrind does not particularly like Go, I think
17:52 < gmilleramilar> yeah, that's kinda what I'm wondering
17:52 < Namegduf> Not designed for GCed things
17:52 < jeremy_c> I've not had any luck with Valgrind and Go.
17:53 < Kafo> I just realised my gpu supports only OpenGL 1.4.  :D
17:56 -!- pphalen [~pphalen@] has joined #go-nuts
17:56 < skelterjohn> XNA is garbage collected - people write games using it
17:56 < skelterjohn> they just have to be careful with allocation, which
isn't a bad idea overall
17:57 < skelterjohn> i had fun writing BSP stuff with C#/XNA and garbage
17:58 -!- TMKCodes [~TMKCodes@unaffiliated/tmkcodes] has joined #go-nuts
17:58 < Namegduf> XNA: Because MS didn't have enough of a grip over gaming.
17:58 < skelterjohn> i don't fault them for this
17:59 < skelterjohn> i do fault them for not including a serviceable
geometry library in there somewhere, though
17:59 < jeremy_c> Any C and Go expert want to help with wrapping a complex
function that is part of Iup?
http://www.tecgraf.puc-rio.br/iup/en/dlg/iupgetparam.html (iup project:
18:00 < Kafo> Is the garbage collector still stop-the-world type?
18:02 <+iant> Kafo: yes
18:03 < wrtp> jeremy_c: which function?
18:03 < jeremy_c> wrtp:
18:03 < wrtp> oh yeah, that's only one function, sorry
18:04 < jeremy_c> wrtp: np.  Look at the example towards the bottom, that'll
give a clearer picture than the docs I think.
18:04 < jeremy_c> I don't even know if it's possible to wrap.
18:05 < wrtp> jeremy_c: i think it is, but you might have problems with the
18:05 < wrtp> there's an outstanding issue
18:05 < skelterjohn> is there some doc on the helper functions available in
C? C.CString, C.GoString, etc?
18:05 < monsieur_max> Writing games on android ( in Java ) helps a lot about
avoiding allocations
18:05 < jeremy_c> I'd take it w/o callback support over not having it at
all.  It's a *super* handy function.
18:05 < wrtp> skelterjohn: no, but they're not too tricky
18:06 < wrtp> jeremy_c: i haven't tried cgo with variable argument functions
18:06 < skelterjohn> well, if i can't remember how to free something created
by C.CString, it'd be nice to have a list :)
18:06 -!- vsmatck [~smack@64-142-40-6.dsl.static.sonic.net] has joined #go-nuts
18:06 < jeremy_c> skelterjohn: defer C.free(unsafe.Pointer(theCString))
18:06 < str1ngs> C.free(unsafe.Pointer(s))
18:06 < skelterjohn> there isn't a C.FreeCString?
18:07 * jeremy_c shrugs his sholders
18:07 < skelterjohn> i don't like using unsafe if I can avoid it
18:07 < str1ngs> meh you are making C calls anyways
18:07 < wrtp> skelterjohn: if you're using cgo you're unsafe
18:07 < skelterjohn> i understand that, but that doesn't mean i have to
import it
18:07 < wrtp> skelterjohn: you can't call much C code without it
18:08 < skelterjohn> not without C.FreeCString, anyway!
18:08 < str1ngs> you can make one :P
18:09 < wrtp> jeremy_c: just try experimenting with small C functions.
you'll soon work out what's possible with cgo.
18:09 < skelterjohn> anyone know where C.CString is implemented?
18:09 < str1ngs> jeremy_c: if you figure out how to pass ...  let me know
18:09 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has joined
18:09 < jeremy_c> wrtp: I've wrapped a large portion of Iup so far.
18:10 < jeremy_c> str1ngs: I'd like to know, but I left those ones to do
last.  Luckly Iup doesn't *require* them for 99% of programs.
18:11 < str1ngs> jeremy_c: I have the same problem here
18:11 < wrtp> jeremy_c: are all the ...  params of the same type?
18:12 < jeremy_c> wrtp: nope, not in this function.
18:13 < wrtp> jeremy_c: all with the same sizeof?  (he says, hopefully)
18:13 < jeremy_c> wrtp: and to make matters worse, they are two way....
i.e.  int age = 10; IupGetParam("Age: %i", &age); ...  presents a dialog with a
spinner containing 10 and label of "Age".  When clicking OK, age will now be
whatever the user entered.
18:13 < wrtp> they're all pointers?
18:13 < jeremy_c> wrtp: all pointers.
18:13 < wrtp> that makes things easier
18:13 < wrtp> much easier
18:13 < jeremy_c> so I guess they could be void*
18:13 < wrtp> yeah
18:13 < wrtp> strictly speaking it's unportable, but noone's looking
18:13 < jeremy_c> wrtp: scroll to the bottom of that page, there is a good
18:15 < wrtp> looks like a security hole waiting to happen, to me.
18:15 < wrtp> no way for it to know how big those string buffers are
18:15 -!- GeertJohan [~Squarc@D978EC5D.cm-3-1d.dynamic.ziggo.nl] has quit [Quit:
18:15 < str1ngs> Any C function that returns a value may be called in a
multiple assignment context to retrieve both the return value and the C errno
variable as an os.Error.  For example:
18:16 < str1ngs> I didnt know this
18:16 < str1ngs> n, err := C.atoi("abc")
18:16 < wrtp> to call with varargs, just create a wrapper function with as
many extra void* arguments as you ever might need (say 50)
18:16 < jeremy_c> wrtp: I think there is a format param to tell it how large
the buffer is.
18:17 < wrtp> jeremy_c: they're not using it though...
18:17 < jeremy_c> true.
18:17 < str1ngs> wrtp: in my case all the ...  are the same type
18:17 < str1ngs> wtf is that even called again I forget
18:18 < wrtp> str1ngs: it doesn't really matter - it's easy to create a
slice of unsafe.Pointers
18:18 < jeremy_c> variadic
18:18 < wrtp> each pointing to a different type
18:19 < str1ngs> wrtp: so something like []unsafe.Pointers{foo,bar} ?
18:19 < str1ngs> with & of course
18:19 < wrtp> yeah
18:19 < str1ngs> an the pass up...  ?
18:19 < wrtp> actually probably more like *[30]unsafe.Pointers{&foo, &bar}
18:20 < wrtp> erm
18:20 < str1ngs> ok how do I pass that though
18:20 < str1ngs> pointers...  iirc
18:20 < wrtp> maybe &[30]unsafe.Pointers{...}
18:20 < wrtp> i dunno if you can do that
18:21 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has quit [Ping
timeout: 264 seconds]
18:21 < wrtp> yeah you can, cool
18:22 < wrtp> str1ngs: you'd pass the pointer and its size to C; then the C
would call the function with 30 parameters, each tediously picked from the array
18:22 < str1ngs> oh really
18:23 < str1ngs> I'll try this
18:24 -!- vinisterx [~ryan@74-129-201-27.dhcp.insightbb.com] has quit [Read error:
Operation timed out]
18:25 -!- vinisterx [~ryan@74-129-201-27.dhcp.insightbb.com] has joined #go-nuts
18:25 < str1ngs> hmm nope I still get unexpected type: ...
18:27 < jeremy_c> str1ngs: I just filed a bug report on better error
handling for that message.  It was accepted.
18:27 < str1ngs> jeremy_c: whats the bug?
18:27 < jeremy_c> An easy test is: C.printf(C.CString("hello")) that'll fail
18:28 < str1ngs> oh nice test
18:28 -!- artefon [~thiago@] has quit [Quit: bye]
18:28 < str1ngs> so how does ...  get handled should it be?
18:28 -!- photron_ [~photron@port-92-201-54-223.dynamic.qsc.de] has joined
18:28 < jeremy_c> str1ngs: have not figured that out and my bug report
doesn't handle that, just proper reporting of the error.
18:29 < jeremy_c> http://code.google.com/p/go/issues/detail?id=1800
18:31 < wrtp> jeremy_c: something along the lines of this:
18:32 < str1ngs> wrtp: ah thats a good idea
18:32 < wrtp> not wildly efficient, but something like that should work
(assuming IupGetParam doesn't fill in args after it's returned
18:33 -!- huin [~huin@] has joined #go-nuts
18:33 < jeremy_c> wrtp: thanks, I'll give it a go and see how much damage I
can do :-)
18:39 -!- stalled [~stalled@unaffiliated/stalled] has quit [Quit: ...]
18:39 -!- Sake [~Sake@] has joined #go-nuts
18:40 < Sake> Hi everybody
18:40 -!- tobym [~tobym@75-139-118-127.dhcp.mant.nc.charter.com] has quit [Ping
timeout: 258 seconds]
18:40 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has joined #go-nuts
18:41 < skelterjohn> hi
18:41 -!- tobym [~tobym@75-139-118-127.dhcp.mant.nc.charter.com] has joined
18:42 < Sake> I have a question : int, string or float are special type in
go or they inherited from an initial object ?
18:43 < str1ngs> Sake: go is not like say ruby.  they are defined types
18:44 < Namegduf> Go has no base Object thing.
18:44 < Namegduf> Go doesn't even have a hierarchy.
18:44 < Namegduf> Or inheritance.
18:44 < Namegduf> So, yeah, nothing is inherited from anything.
18:44 < Sake> Hum ok, thanks ;)
18:44 < iTonnerre> Unless explicitly
18:45 < skelterjohn> there is no "float" type
18:45 < Namegduf> You can explicitly do things that may do some of the same
things inheritance does in other languages
18:45 < Namegduf> There is no "inheritance" in the language itself, explicit
or otherwise, though
18:45 -!- NBGuest [~adium@unaffiliated/nbguest] has joined #go-nuts
18:46 < Sake> ok
18:46 < wrtp> break away from the tyranny of hierarchy!  :-)
18:46 < skelterjohn> int, string and float64 are primitives.  if you come
from java, it's like the lower case int and float
18:46 < skelterjohn> though java has no string primitive
18:46 < aiju> skelterjohn: also, they don't suck
18:46 < aiju> unlike java primitives
18:46 < Namegduf> If you come from Ruby, forget everything and relearn
programming from scratch.  :P
18:46 < skelterjohn> i don't know what about java primitives sucks,
specifically, but i won't argue the point
18:47 < Sake> I come from Java and c++
18:47 < aiju> skelterjohn: they are limited in all kinds of ways
18:47 < Namegduf> Go's a lot more lightweight and simple than a lot of
"dynamic" languages, and focused on directly solving stuffs
18:47 < aiju> Go is actively hostile to huge bloated libraries
18:47 -!- stalled [~stalled@unaffiliated/stalled] has joined #go-nuts
18:48 < NBGuest> rob 'go' pike speaking at Twitter tomorrow
18:48 < aiju> since when is he called rob 'go' pike?
18:48 -!- oki__ [58985233@gateway/web/freenode/ip.] has joined
18:48 < skelterjohn> is twitter a place?
18:48 -!- bthomson [~bthomson@pool-71-114-64-197.washdc.dsl-w.verizon.net] has
joined #go-nuts
18:48 < aiju> i call him rob 'mux' pike
18:48 < NBGuest> twitter is in your mind
18:48 < skelterjohn> his google groups alias is rob "commander" pike
18:49 < Namegduf> He's Commander Rob.
18:49 < aiju> Reichspropagandaminister Rob
18:49 < aiju> an alliteration!
18:49 < Namegduf> Supreme Leader of the Go Battle Fleets.
18:49 < jeremy_c> wrtp: I'm having two problems, 1: *p = C.int(*a) results
in an error: invalid indirect of a (type interface{ })
18:49 -!- pharris1 [~Adium@rhgw.opentext.com] has joined #go-nuts
18:50 < jeremy_c> i.e.  line 20 of your example:
18:50 -!- pharris [~Adium@rhgw.opentext.com] has quit [Read error: Connection
reset by peer]
18:50 < aiju> using cgo makes baby jesus cry
18:50 < gmilleramilar> aiju: agreed
18:51 < skelterjohn> jeremy_c: well, you can't dereference an interface
18:51 < skelterjohn> maybe "switch x := a.(type)"
18:51 < oki__> hi go'ers(?) ...  are there any go benchmark comparisons?
python / go maybe ....  motivation is app engine obviously
18:51 < skelterjohn> and "x" instead of "*a"
18:52 < skelterjohn> oki__: app engine specific benchmarks or in general?
18:52 < Namegduf>
18:52 < oki__> general
18:52 < skelterjohn> there is some code shootout benchmark collection that
does it in general
18:52 < Namegduf> For Go vs Python 3
18:52 < aiju> benchmarks are meaningless
18:52 < aiju> well, almost
18:52 < skelterjohn> meaning is meaningless
18:52 < jeremy_c> skelterjohn: great, that fixed the first problem.
18:52 < Namegduf> The high results are due to a slow regex implementation
18:52 < Namegduf> And do not reflect upon Go as a language
18:53 < wrtp> jeremy_c: oops, yes, should be switch a := a.(type) {
18:53 < wrtp> skelterjohn: no need to invent a new name
18:54 < skelterjohn> no need to use the same one?  :)
18:54 < aiju> shadowing names is worse than goto
18:54 < jeremy_c> wrtp: skelterjohn: second problem is: C.callIt(cFormat,
cargs) ...  complains about cargs, "cannot use cargs (type *[3]unsafe.Pointer) as
type *unsafe.Pointer) in function argument"
18:54 < skelterjohn> oh your case is *int
18:54 < wrtp> skelterjohn: better to use the same one, then you can't
accidentally use the original
18:54 < skelterjohn> so you do want to dereference whatever is in the
18:54 < wrtp> aiju: bollocks
18:54 < skelterjohn> wrtp: he didn't say goto was bad
18:55 < skelterjohn> perhaps he thinks it's the best think since println
18:55 < aiju> haha
18:55 -!- bthomson [~bthomson@pool-71-114-64-197.washdc.dsl-w.verizon.net] has
left #go-nuts ["WeeChat 0.3.3-dev"]
18:55 < skelterjohn> &unsafe.Pointer(*cargs)
18:55 < wrtp> i don't think that'll work
18:56 < jeremy_c> nope, doesn't work.
18:56 < skelterjohn> &unsafe.Pointer(**cargs)
18:56 < wrtp> the converted expression isn't addressable
18:56 < skelterjohn> ah
18:56 < skelterjohn> well, easy to get around that.
18:56 < jeremy_c> cannot convert *cargs (type [3]unsafe.Pointer) to type
18:56 < jeremy_c> ** doesn't work either.
18:57 < skelterjohn> ** was wrong for a number of reasons
18:57 < skelterjohn> forget i said it
18:57 < wrtp> i wonder if declaring callIt as void callIt(char *fmt, void
18:57 < wrtp> would work
18:57 < jeremy_c> invalid indirect of *cargs (type [3]unsafe.Pointer)
18:57 < skelterjohn> x := unsafe.Pointer(*cargs); &x
18:58 < skelterjohn> oh - thought cargs was a *[3]unsafe.Pointer
18:58 < str1ngs> jeremy_c: hehe when you get this figure out let me know
18:58 < jeremy_c> str1ngs: it'll be on github as soon as I do, I'll let you
know the url.
18:58 < wrtp> skelterjohn: no need to make a new pointer.  callIt(fmt,
(*unsafe.Pointer)(unsafe.Pointer(cargs))) will probably work
18:59 < jeremy_c> wrtp: nope, same error when using void *args[3] in the C
func signature.
18:59 < str1ngs> jeremy_c: ok thanks.  I'm kind busy now but I can look at
it later atleast
18:59 < wrtp> cgo could do better there
19:00 < skelterjohn> what is cargs's type, and what is the type in the C
19:01 < jeremy_c> skelterjohn: http://pastebin.com/3EdSRnt8
19:02 -!- gedevan [~gedevan@] has joined #go-nuts
19:02 -!- oki__ [58985233@gateway/web/freenode/ip.] has left #go-nuts
19:02 < jeremy_c> skelterjohn: the ultimate goal is to wrap:
19:03 < wrtp> jeremy_c: did my last suggestion work?  callIt(fmt,
19:03 < jeremy_c> hm, missed that, trying now.
19:03 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has quit [Ping
timeout: 276 seconds]
19:05 -!- snearch [~snearch@f053002142.adsl.alicedsl.de] has joined #go-nuts
19:05 < jeremy_c> wrtp: it compiled, the dialog appears but it contains no
data...  Looking at my C code now making sure I am calling it right.
19:06 -!- artefon [~thiago@] has joined
19:06 -!- artefon [~thiago@] has left
#go-nuts []
19:07 -!- Mr_Dark [~dk@poviko.demon.nl] has quit [Quit: Pokemon Universe MMORPG -
#pokemon-universe - http://pokemon-universe.com]
19:09 < jeremy_c> wrtp: ah...  forgot, format has to be terminated with
\n...  "Age: %i" will not work, "Age: %i\n" does work.  So...  the first part is
working (only with integers).  Now to make the second part (reading back from the
array to the Go values).
19:09 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has joined #go-nuts
19:10 -!- TheSeeker2 [~n@99-153-250-110.lightspeed.irvnca.sbcglobal.net] has
joined #go-nuts
19:10 -!- TheSeeker [~n@99-153-250-110.lightspeed.irvnca.sbcglobal.net] has quit
[Disconnected by services]
19:10 < skelterjohn> wrtp: did you have any issues with the image you try to
draw being just black?
19:11 < skelterjohn> seems to happen independent of what i put in the data
19:12 -!- nictuku [~yvesj@unaffiliated/nictuku] has quit [Quit: Leaving]
19:12 < jeremy_c> wrtp: skelterjohn: it's working!  (with Integers), now the
other types...
19:13 < skelterjohn> what does this library do, anyway?
19:13 < jeremy_c> skelterjohn: iup is a cross platform gui library that uses
native widgets.
19:13 < skelterjohn> ah
19:13 < skelterjohn> get it working for mac :)
19:14 < jeremy_c> http://www.tecgraf.puc-rio.br/iup/
19:14 < jeremy_c> Initial work is done for mac, but not yet officially
19:14 -!- m4dh4tt3r [~Adium@c-98-210-145-213.hsd1.ca.comcast.net] has joined
19:14 -!- tobym [~tobym@75-139-118-127.dhcp.mant.nc.charter.com] has quit [Ping
timeout: 240 seconds]
19:15 -!- tobym [~tobym@75-139-118-127.dhcp.mant.nc.charter.com] has joined
19:15 -!- Venom_X [~pjacobs@216-188-225-44.dyn.grandenetworks.net] has joined
19:17 < wrtp> jeremy_c: cool
19:19 -!- lyddonb [~beaulyddo@205-237-115-38.web-filings.isupark.org] has joined
19:19 < keidaa> how to get http.ResponseWriter to work with gorutines?
19:19 -!- lyddonb [~beaulyddo@205-237-115-38.web-filings.isupark.org] has left
#go-nuts []
19:19 < skelterjohn> keidaa: not sure what you mean
19:19 < keidaa> I'm trying to create a noneblocking server
19:20 < keidaa> I create a dummy handlerfunc witch starts the actual
handlerfunc in a gorutine
19:21 -!- tncardoso [~thiago@] has joined #go-nuts
19:21 < skelterjohn> if you give it the response writer, and no other
goroutines write to it, there should be no problem
19:21 < jeremy_c>
https://github.com/jcowgar/iup.go/blob/master/iup/dialog.go and usage
19:22 < jeremy_c> wrtp: skelterjohn: thanks for your help with this.  This
is the most complex C function I have to wrap, so everything else should be cake.
19:22 * jeremy_c is crossing his fingers at least
19:22 < skelterjohn> pleasure
19:24 < wrtp> np
19:28 -!- fmoo [~Adium@c-76-102-41-101.hsd1.ca.comcast.net] has joined #go-nuts
19:28 < skelterjohn> wrtp: nevermind - figured out my draw issue.  just some
pixel width/offset issues that i needed to suss out
19:30 < wrtp> skelterjohn: my problem at the moment is that if i do a window
flush in one thread, the actual drawing happens in another thread, and by that
time the flushing thread has gone on to change the source graphics
19:30 < wrtp> this causes flickering
19:31 < wrtp> i'm not quite sure how to deal with it.  perhaps by using a
pthread condition, yeuch
19:31 < wrtp> personally i think if i call flushWindow, it should only
return when the window has actually flushed
19:34 < skelterjohn> might it be easier to synchronize it on the go side?
19:34 -!- NBGuest [~adium@unaffiliated/nbguest] has quit [Quit: leaving]
19:36 < wrtp> i don't think that's possible.  the only time you know it's
safe to draw from the window image is during the FlushImage call
19:36 -!- tvw [~tv@e176002031.adsl.alicedsl.de] has joined #go-nuts
19:36 < wrtp> and the problem is that that's returning before the window
image has actually been called.
19:37 < wrtp> i think i need to do some thread synchronisation
19:39 -!- Bigbear11 [~Cody@d173-181-43-12.abhsia.telus.net] has joined #go-nuts
19:40 -!- Bigbear1 [~Cody@d173-181-43-12.abhsia.telus.net] has quit [Ping timeout:
276 seconds]
19:44 -!- Bigbear11 [~Cody@d173-181-43-12.abhsia.telus.net] has quit [Ping
timeout: 240 seconds]
19:45 -!- nictuku [~yvesj@84-72-7-79.dclient.hispeed.ch] has joined #go-nuts
19:45 -!- nictuku [~yvesj@84-72-7-79.dclient.hispeed.ch] has quit [Changing host]
19:45 -!- nictuku [~yvesj@unaffiliated/nictuku] has joined #go-nuts
19:45 -!- Sake [~Sake@] has quit [Ping timeout: 260 seconds]
19:48 -!- Bigbear1 [~Cody@d173-181-43-12.abhsia.telus.net] has joined #go-nuts
19:49 -!- zanget [~zanget@hurf.durf.me] has quit [Read error: Operation timed out]
19:50 < keidaa> skelterjohn: when I put it in front of http.Handle like so:
go http.Handle("/", http.HandlerFunc(dispatch))
19:50 < keidaa> it shows, but now it's blocking..
19:51 < skelterjohn> perhaps GOMAXPROCS is 1?
19:51 < wrtp> skelterjohn: GOMAXPROCS shouldn't make a difference to correct
go programs
19:51 < wrtp> other than in performance
19:51 < keidaa> I thought goroutines wasn't dependent on cpus?
19:51 < wrtp> keidaa: they're not
19:52 -!- Sake [~Sake@] has joined #go-nuts
19:53 < keidaa> am I testing it right: if test {
19:53 < keidaa> test = false
19:53 < keidaa> time.Sleep(5000000000)
19:53 < keidaa> }
19:53 < keidaa> test is a global bool
19:53 < keidaa> this is in the function that shows the index page
19:54 -!- gedevan [~gedevan@] has quit [Ping timeout: 252 seconds]
19:54 < keidaa> so first attempt should sleep while second attempt should go
19:54 < Kafo> keidaa: Yes.
19:55 < keidaa> so I have duplicate tabs open, second tabs waits for first
request which it shouldn't
19:55 < keidaa> I must be doing something wrong with the goroutine..
19:56 < skelterjohn> time.Sleep() is problematic
19:56 < Kafo> keidaa: Can you post the code you use?
19:56 < skelterjohn> it will make the whole process sleep
19:56 -!- Sake [~Sake@] has quit [Client Quit]
19:56 < skelterjohn> if you want other goroutines to run, use
19:56 < skelterjohn> that will cause thec urrent goroutine to wait, but not
block the whole process
19:57 < Kafo> Shouldn't go then create another thread to execute other
19:57 < skelterjohn> time.Sleep is a syscall, and grabs the whole process
19:57 < skelterjohn> it's out of go's hands
19:57 < skelterjohn> if it only has that one process, there is no way it can
execute any logic to move goroutines around
19:57 < Kafo> Oh, okay
19:57 < keidaa> hmm..  is there a better way to fake a block?
19:58 < skelterjohn> whenever you'd write "time.Sleep(x)", instead write
19:58 < skelterjohn> also, "select{}"
19:58 < skelterjohn> will block forever, and allow other things to keep
19:58 < keidaa> ok I'll try
19:59 < Kafo> I didn't know I can do "<-time.After(x)".  I've always used
"c := time.After(x); <-c" D:
20:00 -!- nutate [~rseymour@cacsag4.usc.edu] has joined #go-nuts
20:00 < skelterjohn> time.After(x) is a channel :)
20:00 < Kafo> Yeah, it's obvious now but I haven't thought about it earlier
20:01 < keidaa> replaced time.Sleep with select{}, still blocks :/
20:01 < Namegduf> Go should probably implement time.Sleep() using
20:01 < Namegduf> IMO
20:01 -!- vinisterx [~ryan@74-129-201-27.dhcp.insightbb.com] has quit [Ping
timeout: 240 seconds]
20:01 -!- vzx [~ryan@74-129-201-27.dhcp.insightbb.com] has joined #go-nuts
20:01 < Namegduf> Equivalent behaviour, no massive number of syscalls
20:02 < wrtp> skelterjohn: time.Sleep doesn't grab the whole process.
20:02 < skelterjohn> that's what i was told
20:02 < wrtp> skelterjohn: GOMAXPROCS has no bearing on threads created for
blocking syscalls
20:02 < skelterjohn> but the conversation is foggy - i might be
20:02 < wrtp> Namegduf: it's the other way around - time.After is
implemented using time.Sleep
20:02 < wrtp> Namegduf: Sleep is the more primitive operation
20:03 < wrtp> (currently)
20:03 < wrtp> keidaa: is this in the app engine?
20:03 < skelterjohn> then why does time.Sleep cause this issue when
<-time.After() does not?
20:03 < keidaa> wrtp: no
20:03 < nutate> I'm going to start translating some parallel molecular
dynamics code from C to Go
20:03 -!- photron_ [~photron@port-92-201-54-223.dynamic.qsc.de] has quit [Ping
timeout: 258 seconds]
20:04 < wrtp> skelterjohn: i don't know - i'd have to see the code
20:04 < skelterjohn> nutate: i think go is great for scientific coding, i
use it for my machine learning stuff
20:04 < nutate> When I say start...  there is probably a 5% chance of it
going anywhere due to PhD thesis writing, but...  has anyone done much MPI to Go
20:04 -!- snearch [~snearch@f053002142.adsl.alicedsl.de] has quit [Quit:
20:04 < nutate> (I say without having googled)
20:05 < wrtp> skelterjohn: if time.After is working then time.Sleep is
running in the background already with no problems
20:05 < wrtp> so there's something else wrong with the code
20:05 < wrtp> keidaa: can you paste some code that demos the problem?
20:06 < keidaa> yes just a sek
20:06 -!- Sake [~Sake@] has joined #go-nuts
20:06 < wrtp> keidaa: what's your cpu usage like when your program is
20:07 < nutate> What's funny is I've done pthreads, CUDA, MPI, C, Fortran,
Python, Ruby...  but I have this fear with Go that I won't do it "right"
20:07 < nutate> (not that I did any of those "right" :-)
20:08 < keidaa> wrtp: normal <10%
20:08 < nutate> I'm going to write a few pages of thesis then get back to
20:08 < wrtp> nutate: IMO there are less ways to get it "wrong" in go
20:08 < wrtp> because everything's so orthogonal
20:08 < nutate> wrtp: i should say that Perl was my first language (after
20:08 < nutate> wrtp: which...  broke me for life
20:08 * wrtp has never used perl
20:09 < nutate> It's something.
20:09 < nutate> Certainly paid my bills before I went back to school...  I
just feel like now there aren't jobs for crappy programmers like there were 10
years ago
20:10 -!- NBGuest [~adium@unaffiliated/nbguest] has joined #go-nuts
20:11 < keidaa> wrtp: http://pastie.org/1890399
20:17 < Kafo> I should get a new computer.
20:17 < ww> if guess go has something like mpi almost built in, with netchan
and rpc packages
20:17 < Kafo> Because I have a spare GeForce 9600GT GPU waiting to be used.
20:18 < ww> if you were to combine that with doozer to find cluster nodes
and coordinate handing out jobs...  it could work very well
20:18 < nutate> ww, we do big cluster jobs
20:18 < nutate> 1024 cores
20:18 < nutate> but we generally have that laid out
20:19 < nutate> 64-1024 cores, spread out over 32-256 nodes
20:19 < nutate> (or more)
20:19 < nutate> so I would really like to see it run like MPI where it
doesn't really care if it is on a core on the same node or not
20:19 < ww> most of the pieces that you need are there
20:20 < nutate> yeah, i'll look into netchan
20:20 -!- zanget [~zanget@hurf.durf.me] has joined #go-nuts
20:20 < ww> but i'm not aware of anything that will actually do the
coordination - that would be a very valuable library to write
20:20 -!- grumpytoad [~niel@t1004.greatnet.de] has left #go-nuts ["WeeChat 0.3.0"]
20:20 -!- kr [~Keith@c-24-5-193-165.hsd1.ca.comcast.net] has joined #go-nuts
20:20 < nutate> yeah...  MPI has like MPI_COMM_WORLD
20:21 < nutate> where all of the processes join, and it magically figures
things out
20:21 < nutate> in mpich2 it runs as a daemon
20:21 < nutate> so just handing out ids is non-trivial
20:22 < ww> yes, i would use doozer for that - shared place where everybody
joins, guaranteed consistent small data store basically
20:22 < ww> the magic part is missing though :)
20:22 < nutate> it always is
20:22 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Ping timeout: 276
20:23 -!- monsieur_max [~monsieurm@ip-78.net-89-2-171.rev.numericable.fr] has quit
[Quit: Leaving.]
20:25 < nutate> hmmm doozer does look like it could handle it
20:26 < nutate> in the end that's pretty much what MPI does, but I only know
MPI from a user perspective
20:26 < nutate> in MPI on doozer you'd pretty much do one write and one read
from each client at the start
20:30 < skelterjohn> wrtp: how do you deal with the 22 pixels under the
title bar?
20:33 < wrtp> skelterjohn: i don't know what you mean.
20:33 < wrtp> perhaps you're getting your coord tranformations wrong?
20:35 < skelterjohn> the point 0,0 in mac window coords is the upper left of
the title bar
20:36 -!- ExtraSpice [~XtraSpice@] has quit [Read error: Connection
reset by peer]
20:36 < skelterjohn> the first pixel below the title bar is at 0, 22
20:37 * huin wonders if a channel exported with netchan.Send is supposed to break
once a client disconnects
20:39 < wrtp> skelterjohn: i thought the mac coords started at bottom left
20:39 < skelterjohn> doesn't seem like it in the code i'm running
20:39 < wrtp> actually, it depends on the transformation for the view you're
drawing into
20:40 < wrtp> huin: i think that's a bug really
20:40 < huin> wrtp: it does seem like one.  i'll check the tracker
20:40 < wrtp> skelterjohn: so what's happening in the 22 pixels under the
title bar for you?
20:40 < wrtp> (i haven't got a title bar...  nothing so advanced, i'm stuck
on update synchronisation)
20:41 < skelterjohn> can't see them - but it was offsetting my image
20:41 < skelterjohn> so i moved my NSImageView frame down 22 pixels
20:41 < skelterjohn> problem solved
20:42 < wrtp> ah, so you mean the 22 pixels *of* the title bar?
20:42 < skelterjohn> yes
20:42 < skelterjohn> i didn't mean under as in y-1
20:42 < wrtp> i dunno, i'll burn that bridge when i cross it
20:42 < skelterjohn> i meant under as in being overlaid
20:42 < wrtp> ahh
20:42 < skelterjohn> sorry
20:42 < wrtp> i think the go api should expose only the pixels outside the
title bar
20:43 < wrtp> (unless you ask otherwise, i guess)
20:43 < skelterjohn> i think so too
20:43 < skelterjohn> this happens on iphone apps too
20:43 < skelterjohn> i had to trial-and-error to figure out exactly how
thick it is
20:43 < skelterjohn> 22.
20:43 < skelterjohn> possible i'm doing something silly, certainly
20:44 < skelterjohn> but i blame an overly convoluted API
20:45 < skelterjohn> btw - trying to turn a go []byte into a C UInt8* - is
unsafe.Pointer(&theSlice) correct?
20:45 < skelterjohn> i feel like it isn't
20:45 < aiju> everything is allowed in love, war and cgo
20:46 < skelterjohn> i feel like it's the UInt8**
20:46 < skelterjohn> but i'm having trouble getting the syntax together to
dereference it
20:46 < skelterjohn> i can't unsafe.Pointer(theSlice) :\
20:48 < skelterjohn>
20:48 < skelterjohn> :s
20:48 -!- Sake [~Sake@] has left #go-nuts []
20:48 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:5e9:7e17:7ee4:5254] has quit
[Quit: Leaving.]
20:49 < skelterjohn>
20:49 < skelterjohn> that works
20:50 < aiju> hahaha
20:53 < ww> 0unsafe.Pointer(&theSlice[0])
20:53 < skelterjohn> ahhhh
20:53 < skelterjohn> yes of course
20:53 < skelterjohn> theSlice[0]
20:54 < skelterjohn> thank you
20:54 < ww> np :)
20:55 < ww> i sometimes get the feeling that cgo should relax type
conversion/casting rules
20:55 < ww> one library i was dealing with gave values char **
20:56 < ww> each element of the array was null terminated as strings are
wont to be
20:56 < ww> and the array itself was null terminated
20:56 < ww> dealing with that from go was a nightmare
21:00 < skelterjohn> wrtp: so the issue you're dealing with now is that
CGImageCreate returns immediately and does its work in a different thread, right?
21:01 < wrtp> ww: if in doubt, cast to *[1e9]T...
21:01 < skelterjohn> or rather, it lazily accesses the data to draw
21:01 < wrtp> no, it's that [window display] and/or [window flushImage] does
21:01 < wrtp> (sometimes!  which is my current problem)
21:03 < wrtp> basically, if one thread calls [window display], then another
(probably the main thread) gets invoked to do the job
21:03 < skelterjohn> hmm - i don't use either of those methods
21:03 < skelterjohn> i just set the image of an NSImageView and it takes
care of it
21:03 < skelterjohn> drawing in another goroutine *appears* to be fine, but
who knows really
21:03 < skelterjohn> could be getting lucky
21:03 < wrtp> are you doing any kind of animation?
21:04 < ww> i've not looked at the os x special sauces...  is NS the
NeXTSTEP heritage?
21:04 < skelterjohn> yes - changing the pattern every second
21:04 < wrtp> ww: yes
21:04 < skelterjohn> ww: yes
21:04 < wrtp> jinx
21:04 < skelterjohn> :x
21:04 < Namegduf> Just in case you forgot which OS you were on, it stuck its
name in all its APIs.
21:04 < skelterjohn> heh
21:04 < Namegduf> And then the name was wrong.
21:05 < ww> <g>
21:05 < skelterjohn> there are more than the NS functions
21:05 < ww> i thought that looked familiar
21:05 < wrtp> Namegduf: the obj c method namespace is global, so they need
to disambiguate somehow...
21:05 < skelterjohn> each framework has its own prefix, really
21:05 < wrtp> contract with Go.
21:05 < wrtp> s/contract/contrast/
21:05 < Namegduf> wrtp: Since they're basically the only people using that
language, why didn't they just fix it?
21:05 * ww fondly remembers the surplus 68040 slab that i had in university
21:05 < wrtp> Namegduf: because they didn't know how
21:06 * wrtp still has a nextcube
21:06 -!- keidaa [~keidaa@cm-] has quit [Quit:
21:06 -!- hallas [~hallas@x1-6-30-46-9a-b2-c5-1f.k891.webspeed.dk] has quit
[Remote host closed the connection]
21:06 < wrtp> Namegduf: they didn't know how
21:06 < wrtp> years ago i thought that objective c should move to a
protocol-based type system
21:06 < ww> wrtp: colour?
21:06 < wrtp> black
21:06 < ww> nono, the screen
21:07 < wrtp> but they moved to something more like java instead
21:07 < ww> b&w or colour?
21:07 < wrtp> ww: no, 2 bit
21:07 < ww> yeah!
21:07 < wrtp> ww: they were really nice machines
21:08 < wrtp> took until last year before Go did it right
21:08 < skelterjohn> did what right
21:09 < ww> i remember my first compsci class...  they were using a language
called OOT...  the first day they said, go to the bookstore and buy your windows
copy...  i raised my hand and...
21:09 < wrtp> did a decent protocol-based type system
21:09 < skelterjohn> and "until last year" doesn't really indicate that they
took a long time
21:09 < skelterjohn> :)
21:09 < ww> got sent to a dungeon underneath the physics building where
someone pointed me at an ftp site...  i still had to buy the windows copy
21:10 < wrtp> windows hardly existed when i was at uni
21:10 < wrtp> at least, i don't remember it.  maybe it was still dos.  when
did windows come out?
21:11 < ww> 95 had just come out
21:11 < skelterjohn> before my conscious computer memory
21:11 < ww> in...  errm...  94 iirc
21:11 < nutate> I had took "non-honors" comp sci...  in C...  honors was in
21:11 -!- dforsyth [~dforsyth@ec2-50-18-22-230.us-west-1.compute.amazonaws.com]
has joined #go-nuts
21:11 < wrtp> i lie, windows 2.0 was out...
21:11 -!- moraes [~moraes@] has quit [Quit: Leaving]
21:11 < Namegduf> nutate: Ew
21:12 < nutate> that was the only A+ I ever got in my life...  still proud.
21:12 < skelterjohn> java came out mid-highschool for me
21:12 * wrtp feels old
21:12 < skelterjohn> i think it made it to the AP exam 2 years after i
21:12 < skelterjohn> <- 29
21:12 < nutate> <- 32
21:13 < wrtp> <- 43
21:13 < nutate> born in 3 different decades
21:13 * ww repairs http://en.wikipedia.org/wiki/Object-Oriented_Turing
21:13 < skelterjohn> i was writing C code when i was the age you were when i
was born
21:13 -!- fmoo [~Adium@c-76-102-41-101.hsd1.ca.comcast.net] has quit [Quit:
21:14 < wrtp> i didn't write any C till i was 19
21:14 < wrtp> bbc basic was my thing
21:14 < wrtp> marvellous it was
21:14 < wrtp> and 6502 assembler
21:14 < dforsyth> you guys are old
21:15 < skelterjohn> :(
21:15 < skelterjohn> i'm in my 20s!  barely
21:15 < dforsyth> but c ftw
21:15 < skelterjohn> that means i'm young
21:15 < wrtp> dforsyth: feel the wisdom :-)
21:15 < dforsyth> :)
21:15 < dforsyth> i feel old
21:15 < skelterjohn> wrtp: you're the same age as my academic advisor
21:15 < dforsyth> im 22 and spent the last 3+ years writing lots of c
21:15 < dforsyth> while all my friends were making internet on rails or
21:16 < skelterjohn> cool group of friends
21:16 < skelterjohn> my friends and i played halo
21:16 < skelterjohn> that was pretty cool too
21:16 < dforsyth> i remember halo
21:16 < dforsyth> spent much or freshman year doing that
21:16 < skelterjohn> it's not like it's gone...
21:16 < dforsyth> of*
21:16 * wrtp played Elite
21:16 < dforsyth> its gone for me, i dont have an xbox anymore
21:16 < skelterjohn> is that an arcade?
21:16 < wrtp> that was stupendous for its time
21:16 < dforsyth> i move across the country to make internets on rails
21:17 < skelterjohn> commodore64?
21:17 < dforsyth> and left my xbox behind
21:17 -!- huin [~huin@] has quit [Quit: bedtime]
21:17 < wrtp> skelterjohn: http://en.wikipedia.org/wiki/Elite_(video_game)
21:17 < ww> oh now that's ironic
21:17 < ww> there's now a http://code.google.com/p/opent/ which runs in the
21:17 < skelterjohn> definitely never heard of a bbc micro before today
21:17 < wrtp> it fitted a multi-galaxy 3d first-person shooter/trader into
32K inc video memory
21:18 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
quit [Quit: whitespacechar]
21:18 < wrtp> astonishing
21:18 < ww> and oot was replaced with...  java...  the year after i finished
21:18 < wrtp> with no external storage at all
21:18 < skelterjohn> and quake claims to be the first true 3d FPS!
21:18 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
joined #go-nuts
21:19 < wrtp> well, elite probably cheated, but it did hidden line removal,
even if it didn't fill the polygons
21:19 < skelterjohn> i made 3d pong in HS
21:19 < skelterjohn> that was fun, and got me some fame among the students
21:20 < skelterjohn> well...fame might be the wrong word
21:20 < dforsyth> anyone know what app.yaml needs to look like for go?
21:20 < wrtp> dforsyth: there's an example on the website
21:21 < dforsyth> the mustacheio app, right?
21:21 < dforsyth> i made mine look like that and i get compile errors or
21:21 < wrtp> no, the hello app
21:21 -!- moraes [~moraes@] has joined #go-nuts
21:21 < ww> hrmmm...  TuringPlus - "a concurrent systems programming
21:22 < wrtp> first thing you come do
21:22 -!- Fish- [~Fish@9fans.fr] has quit [Quit: So Long, and Thanks for All the
21:22 < dforsyth> that doesnt show the handlers part of the file
21:23 < wrtp> dforsyth: i don't think you need one
21:23 < wrtp> handlers are specified in the go program
21:23 < dforsyth> mustachio has it set, so i figured i needed it
21:23 < dforsyth> ill try it without them later, i guess
21:23 -!- GeertJohan [~Squarc@D978EC5D.cm-3-1d.dynamic.ziggo.nl] has joined
21:24 < wrtp> oh, i haven't looked a mustachio
21:25 < ww> hmmm...  sounds like plan9 borrowed some indeas from TUNIS...
which was implemeted in a language that sounds a lot like Go's ancestor
21:26 < wrtp> i've not heard of TUNIS
21:27 -!- NBGuest [~adium@unaffiliated/nbguest] has quit [Quit: leaving]
21:27 < ww> not much info on wikipedia, i hadn't heard of it before i just
followed my nose there...
21:27 -!- Nitro [~Nitro@unaffiliated/nitro] has quit [Ping timeout: 240 seconds]
21:27 -!- NBGuest [~adium@unaffiliated/nbguest] has joined #go-nuts
21:27 < wrtp> ww: what do you think plan9 borrowed from TUNIS?
21:27 < ww> but concurrent euclid (ancestor of turing+) sounds go-like
21:28 < wrtp> in what way?
21:30 < ww> the co/goroutine "processes" as concurrent euclid calls them,
used in a system programming language
21:30 < wrtp> coroutines are an old paradigm
21:30 < ww> and as for tunis, maybe the modularity without being too
21:31 < ww> wrtp: sure, but for writing a unix clone?  afaik that's only
been seriously done in c
21:31 < wrtp> the core of plan 9 is really the name space
21:32 < wrtp> ww: plan 9 didn't use coroutines
21:32 < ww> agreed, no i'm going to backtrack on my claim that plan9 may
have been influenced by tunis
21:33 -!- TheMue [~TheMue@p5DDF7617.dip.t-dialin.net] has quit [Quit: TheMue]
21:33 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has left
#go-nuts []
21:34 < ww> but the idea of using a coroutine-language for systems
programming is go's thing now...  but that was done in the early 80s at uoft
21:35 < wrtp> ww: goroutines are a bit different because they turn into
thread/processes when necessary
21:35 < ww> trouble is that was also the time of no free software and it
probably seemed reasonable to them to just run it at uoft and maybe license it one
day to somewhere else so it withered
21:36 < wrtp> inferno's model was very similar (except that they didn't run
in parallel)
21:36 -!- marino0 [~marino0@] has quit [Quit: Leaving]
21:36 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
quit [Quit: whitespacechar]
21:36 < wrtp> ww: what language are you referring to?
21:36 < ww> hard to say with any certainty, just speculating...  i'm 5000
miles from toronto now and even then you might need an archaeologist to find out
what tunis actually did with concurrent euclid
21:36 < wrtp> :-)
21:36 < ww> apparently, concurrent euclid
21:38 < ww> which i learned is a...  great-uncle?  of object oriented
turing, which is what comp sci courses were taught in at utoronto when i was there
21:39 -!- XenoPhoenix [~Xeno@cpc13-aztw24-2-0-cust23.aztw.cable.virginmedia.com]
has quit [Remote host closed the connection]
21:39 < wrtp> i think universities liked pascal-like syntax.  my first lang
at uni was pascal
21:40 -!- imsplitbit [~imsplitbi@] has quit [Quit: Bye!]
21:40 < wrtp> an utterly flawed language
21:41 < aiju> haha
21:41 < aiju> wrtp: have you read the kernigham paper?  ;P
21:41 < wrtp> aiju: of course
21:42 < wrtp> long after i'd stopped programming in pascal though
21:42 -!- XenoPhoenix [~Xeno@cpc13-aztw24-2-0-cust23.aztw.cable.virginmedia.com]
has joined #go-nuts
21:43 < str1ngs> ww: you are from the TO area?
21:43 -!- piranha [~piranha@5ED43A0B.cm-7-5a.dynamic.ziggo.nl] has quit [Quit:
Computer has gone to sleep.]
21:44 < ww> montreal actually, but i went to school there
21:44 < str1ngs> ah I'm from outside toronto originally now I'm in BC
21:45 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Read error:
Connection reset by peer]
21:48 -!- yudishtira [~Adium@pool-71-165-239-253.lsanca.dsl-w.verizon.net] has
joined #go-nuts
21:48 -!- Tonnerre [tonnerre@netbsd/developer/tonnerre] has quit [Quit: Foo]
21:49 -!- dlowe2 [~dlowe@] has joined #go-nuts
21:49 -!- dlowe2 [~dlowe@] has quit [Client Quit]
21:51 -!- awidegreen [~quassel@h-170-226.A212.priv.bahnhof.se] has quit [Remote
host closed the connection]
21:53 < skelterjohn> can anyone point me at an example of giving a go
function as a callback to cgo?
21:55 < ww> oh, skelterjohn if you're trying to do what i think you are, i
had to jump through a c wrapper
21:56 < skelterjohn> well, certainly C code will be involved...
21:56 < ww> https://bitbucket.org/ww/goraptor/src/be0acaa10b1c/craptor.c
21:56 < skelterjohn> but i can't poll from the go side, or anything
21:56 < skelterjohn> rather, i don't want to
21:56 < skelterjohn> craptor...lol
21:57 < wrtp> skelterjohn:
21:57 < ww> the functions in there set up a callback that raptor uses that
calls into go
21:57 < ww> couldn't make those calls directly
21:57 < wrtp> skelterjohn: you only have to do the thread synchronisation
thing if the callback is from a non-Go-created thread
21:57 < skelterjohn> it isn't, in my case
21:58 < wrtp> that's ok then.  it's not too hard, assuming the callback
function has a void* context pointer
21:59 < skelterjohn> what is a context pointer :s
22:00 < wrtp> skelterjohn: just some data that you pass to the code that
will call the callback function
22:00 < wrtp> and it calls the callback function with that data
22:01 < ww> does it involve trying to pass a go function to a c function
that expects a function argument?
22:01 < wrtp> ww: you asking me?
22:01 < ww> no, skelterjohn's problem
22:02 < skelterjohn> i am writing both the C code and go code involved
22:02 < ww> if it does, that's what i had to work around with those wrappers
- icouldn't get the type conversion to make the compiler happy
22:02 < skelterjohn> so i don't have to bend things to suit some common way
of doing it
22:03 < ww> in that case there should be nothing special to do apart from
//export the go functions involved
22:03 < wrtp> skelterjohn: the basic technique is to export a Go function
that takes an argument that holds the closure; it then calls the closure.
22:03 < yudishtira> anyone have any luck with xcode4 syntax highlighting?
22:04 < wrtp> it's slightly complicated by the fact that you can't convert a
func to unsafe.Pointer.
22:05 < skelterjohn> yudishtira: no - i had xcode 3 syntax coloring work,
but not xcode 4
22:05 < wrtp> but i'm sure you can work it out
22:05 < skelterjohn> i appreciate the (possibly unwarranted) confidence
22:06 < yudishtira> wrtp - yeah same - guess it's textmate then!
22:06 < skelterjohn> i use eclipse
22:06 < skelterjohn> :\
22:07 < yudishtira> yeah not a fan of it on os x
22:07 < wrtp> i use acme.  who needs coloured text?  :-)
22:07 < yudishtira> haha
22:07 < skelterjohn> well, right now i'm using text wrangler because i don't
want eclipse and xcode open at the same time
22:07 < ww> Aquamacs!
22:08 * skelterjohn investigates
22:09 < skelterjohn> i'd really like a simple, light-weight editor that used
the filesystem for project organization and gave me a code outline for the file
i'm looking at
22:09 < skelterjohn> i don't want it to have tons of building utilities - i
wrote my own already and i like it
22:12 < yudishtira> i tend to fallback to textmate/terminal
22:16 -!- elephants [~elephants@] has quit [Remote host closed the
22:19 < skelterjohn> ww: with Aquamacs, do you know how to use it from the
command line?
22:19 < skelterjohn> i'd like to go > aquamacs file.go
22:19 < skelterjohn> and have it launch/open
22:19 < skelterjohn> i can set it up so it launches (make a script that
opens the app) but i don't know how to send file.go to it
22:20 -!- nictuku [~yvesj@unaffiliated/nictuku] has quit [Ping timeout: 240
22:20 -!- prip [~foo@host131-130-dynamic.36-79-r.retail.telecomitalia.it] has
joined #go-nuts
22:22 -!- dfc [~dfc@eth59-167-133-99.static.internode.on.net] has joined #go-nuts
22:23 < uriel> "Is there any planing using go on the web without computer
and any operating sistem.
22:23 < uriel> "
22:23 < uriel> hahaha
22:23 < exch> wouldn't that be awesome
22:24 -!- wrtp [~rog@] has quit [Quit: wrtp]
22:24 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
joined #go-nuts
22:25 -!- NBGuest [~adium@unaffiliated/nbguest] has quit [Quit: leaving]
22:26 < uriel> as somebody answered on the list, you can use pen and paper!
22:27 < ampleyfly> if you're good you might even do correctness proofs
22:27 -!- skelterjohn [~jasmuth@] has quit [Quit: skelterjohn]
22:27 -!- NBGuest [~adium@unaffiliated/nbguest] has joined #go-nuts
22:27 -!- yudishtira [~Adium@pool-71-165-239-253.lsanca.dsl-w.verizon.net] has
left #go-nuts []
22:32 -!- kr [~Keith@c-24-5-193-165.hsd1.ca.comcast.net] has quit [Quit: WeeChat
22:34 -!- virtualsue [~chatzilla@nat/cisco/x-kxohtmkujlbikkcd] has quit [Ping
timeout: 276 seconds]
22:38 -!- whitespacechar [~whitespac@24-247-159-7.dhcp.klmz.mi.charter.com] has
quit [Ping timeout: 258 seconds]
22:38 -!- NBGuest [~adium@unaffiliated/nbguest] has quit [Quit: leaving]
22:40 -!- NBGuest [~adium@unaffiliated/nbguest] has joined #go-nuts
22:42 -!- jbooth1 [~jay@] has left #go-nuts []
22:43 -!- NBGuest [~adium@unaffiliated/nbguest] has quit [Client Quit]
22:47 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
22:48 -!- NBGuest [~adium@unaffiliated/nbguest] has joined #go-nuts
22:48 -!- GeertJohan [~Squarc@D978EC5D.cm-3-1d.dynamic.ziggo.nl] has quit [Quit:
22:49 -!- Venom_X [~pjacobs@216-188-225-44.dyn.grandenetworks.net] has quit [Quit:
22:51 -!- whitespacechar [~whitespac@24-176-0-18.dhcp.klmz.mi.charter.com] has
joined #go-nuts
23:00 -!- Tonnerre [tonnerre@netbsd/developer/tonnerre] has joined #go-nuts
23:05 -!- davisp [~davisp@couchdb/developer/davisp] has quit [Quit: Terminated
with extreme prejudice - dircproxy 1.0.5]
23:09 -!- hungrygruffalo
[~hungrygru@host86-135-59-30.range86-135.btcentralplus.com] has quit [Read error:
Connection reset by peer]
23:18 -!- rlab [~Miranda@] has quit [Read error: Connection reset by
23:19 -!- aho [~nya@fuld-590c6580.pool.mediaWays.net] has joined #go-nuts
23:20 -!- pharris1 [~Adium@rhgw.opentext.com] has quit [Quit: Leaving.]
23:25 -!- Wiz126 [~Wiz@] has quit [Ping timeout:
276 seconds]
23:44 -!- tvw [~tv@e176002031.adsl.alicedsl.de] has quit [Ping timeout: 240
23:47 -!- kr [~Keith@c-24-5-193-165.hsd1.ca.comcast.net] has joined #go-nuts
23:55 -!- DerHorst [~Horst@e176096154.adsl.alicedsl.de] has joined #go-nuts
23:59 -!- saracen [~saracen@81-5-140-201.dsl.eclipse.net.uk] has joined #go-nuts
--- Log closed Thu May 12 00:00:50 2011