--- Log opened Wed Jul 28 00:00:01 2010 --- Day changed Wed Jul 28 2010 00:00 < ilovefairuz> it has a global config file 00:00 -!- artefon [~thiago@189.107.178.3] has joined #go-nuts 00:00 < exch> the hostname is listed in /etc/rc.conf though. but only on arch 00:00 < ilovefairuz> yeap that's it 00:01 -!- rejb [~rejb@unaffiliated/rejb] has quit [Ping timeout: 276 seconds] 00:02 < ilovefairuz> exch: open a new (uncontaminated) terminal and try: env | grep -HOSTNAME 00:02 < ilovefairuz> dash is a typo 00:03 < exch> you're right. it's not listed 00:04 < ilovefairuz> distros parse the config files (whether it's /etc/hostname or rc.conf) to set variables for a shell 00:04 < ilovefairuz> I guess arch uses 'set' instead of 'export' 00:04 < exch> It's possible 00:05 < exch> parsing the output of ifconfig seems like the best approach. I can skip the hostname lookup bit and get straight at the IP for a specific interface 00:05 < exch> ofcourse that assumes the system running this has ifconfig 00:05 < KirkMcDonald> Oh, right. 00:05 < ilovefairuz> exch: invoke 'hostname'? it's a surefire way to get it 00:06 < KirkMcDonald> exch: You could call syscall.Uname. 00:06 -!- Wiz126 [~Wiz126@24.229.245.72.res-cmts.sm.ptd.net] has quit [Ping timeout: 246 seconds] 00:06 < exch> alright. I'll give that a go 00:09 < ilovefairuz> curiously syscall has a 'Sethostname' but not a Get- ? 00:09 < exch> yea I noticed that 00:09 < exch> probably because it can be done wuth Uname() 00:10 < exch> Go doesn;t want to be like php in having a function for /everything/ :) 00:10 < KirkMcDonald> man gethostname notes: 00:10 < KirkMcDonald> "The GNU C library implements gethostname() as a library function that calls uname(2)..." 00:11 < KirkMcDonald> Hence, not an actual syscall. 00:11 -!- Wiz126 [~Wiz126@24.229.245.72.res-cmts.sm.ptd.net] has joined #go-nuts 00:14 -!- photron [~photron@port-92-201-232-104.dynamic.qsc.de] has quit [Ping timeout: 248 seconds] 00:15 -!- photron [~photron@port-92-201-232-104.dynamic.qsc.de] has joined #go-nuts 00:16 -!- Wiz126 [~Wiz126@24.229.245.72.res-cmts.sm.ptd.net] has quit [Ping timeout: 258 seconds] 00:21 -!- Wiz126 [~Wiz126@24.229.245.72.res-cmts.sm.ptd.net] has joined #go-nuts 00:25 -!- thomas_b [~thomasb@cm-84.215.47.51.getinternet.no] has quit [Quit: leaving] 00:25 < exch> righty. that sorted it out 00:27 < ilovefairuz> exch: you should report that in arch's issue tracker 00:28 < exch> that's probably a good idea 00:36 -!- napsy [~luka@212.235.174.112] has joined #go-nuts 00:38 < exch> In response to the dynamic/static link discussion, this might be of interest to some: http://sta.li/ 00:41 < ilovefairuz> interesting 00:42 < ilovefairuz> static linking is 'so google' but it would naturally piss off packagers 00:43 < exch> There's been a lenghty discussion about it in the Go Mailing list. 00:43 < exch> http://groups.google.com/group/golang-nuts/browse_thread/thread/26f3738b149510a9/df8f9e647545f842 00:43 < exch> interesting read 00:48 < ilovefairuz> what's with all the interludes in the docs? and when do we get at least a concerto ? 00:49 -!- Xenith [~xenith@xenith-2-pt.tunnel.tserv3.fmt2.ipv6.he.net] has quit [Remote host closed the connection] 00:49 -!- Xenith [~xenith@xenith-2-pt.tunnel.tserv3.fmt2.ipv6.he.net] has joined #go-nuts 00:56 -!- mikespook [~mikespook@219.137.75.31] has joined #go-nuts 00:56 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts 01:00 < ilovefairuz> any insight as to why type definitions have two keywords instead of on? ie 'type Something struct', in contrast to just 'Something struct' 01:00 -!- imrahjl [~josh@DHCP-135-196.caltech.edu] has quit [Remote host closed the connection] 01:01 < nsf> ilovefairuz: I guess it's mainly for making grammar clean 01:02 < nsf> notice that all top-level declarations start with a keyword: type, package, import, var, const 01:02 < nsf> func 01:03 < exch> you could probably get away with omitting it for the one case (types) and still be unambiguous, but it's not very consistent 01:03 < nsf> yes, unambiguous and clean are different things :) 01:03 < nsf> clean in that context means consistent 01:03 < nsf> too 01:04 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has joined #go-nuts 01:07 -!- jer [~jtregunna@unaffiliated/jer] has quit [Read error: Operation timed out] 01:08 -!- jer [~jtregunna@unaffiliated/jer] has joined #go-nuts 01:14 -!- photron [~photron@port-92-201-232-104.dynamic.qsc.de] has quit [Ping timeout: 260 seconds] 01:15 -!- jer [~jtregunna@unaffiliated/jer] has quit [Remote host closed the connection] 01:21 -!- skelterjohn [~jasmuth@c-76-116-182-139.hsd1.nj.comcast.net] has joined #go-nuts 01:32 -!- hoisie [~user@206.169.213.106] has quit [Ping timeout: 276 seconds] 01:39 -!- skelterjohn [~jasmuth@c-76-116-182-139.hsd1.nj.comcast.net] has quit [Quit: skelterjohn] 01:46 < ilovefairuz> can I pass a code block to a function? 01:46 < ilovefairuz> with all the binding that entails ... 01:47 < exch> If it's closures you are referring to, then yes 01:48 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined #go-nuts 01:50 < ilovefairuz> i thinking it would be more maintainable to make a function and delegate checking the typical second 'error' variable to it 01:50 < ilovefairuz> and possibly pass it a block to execute if it proves to be an error 01:52 < exch> http://pastebin.com/cGfc28bN <- closure 01:54 < exch> http://pastebin.com/6VeVe0w2 even better. the code inside the closure cna access variables from the parent scope 01:54 < exch> (as indicated by the use of the 'somevar' variable 01:55 -!- py3k [~Py3k@219.134.63.121] has joined #go-nuts 01:56 < ilovefairuz> exch: i guess an anonymous function/closure would work for that too but i was referring to actual code blocks, more... Ruby-style 01:57 -!- py3k [~Py3k@219.134.63.121] has quit [Client Quit] 01:58 < exch> ah, nope. Don't think that's gonna work. Closures are the best you're going to get 01:58 -!- nsf [~nsf@jiss.convex.ru] has quit [Ping timeout: 245 seconds] 01:58 -!- py3k [~Py3k@219.134.63.121] has joined #go-nuts 01:59 -!- py3k [~Py3k@219.134.63.121] has quit [Client Quit] 02:00 -!- py3k [~Py3k@219.134.63.121] has joined #go-nuts 02:01 -!- py3k [~Py3k@219.134.63.121] has quit [Client Quit] 02:01 -!- py3k [~Py3k@219.134.63.121] has joined #go-nuts 02:04 -!- py3k [~Py3k@219.134.63.121] has quit [Client Quit] 02:05 -!- py3k [~Py3k@219.134.63.121] has joined #go-nuts 02:07 -!- artefon [~thiago@189.107.178.3] has quit [Ping timeout: 245 seconds] 02:10 < ilovefairuz> so the type of a function is it's signature? 02:11 < ilovefairuz> s/it's/its 02:15 -!- py3k [~Py3k@219.134.63.121] has quit [Quit: leaving] 02:15 -!- py3k [~Py3k@219.134.63.121] has joined #go-nuts 02:16 < exch> 'func(a, b, c string) int' <- that the full signature 02:27 < ilovefairuz> var f func(a, b, c string) int; 02:27 < ilovefairuz> that's what i was referring to 02:27 < ilovefairuz> and i'm having a hard time giving up the semi-colons! 02:29 -!- iubdwe [~iubdwe@atx14.neoplus.adsl.tpnet.pl] has joined #go-nuts 02:33 -!- py3k [~Py3k@219.134.63.121] has quit [Quit: leaving] 02:33 -!- py3k [~Py3k@219.134.63.121] has joined #go-nuts 02:33 -!- py3k [~Py3k@219.134.63.121] has quit [Client Quit] 02:34 -!- bmizerany [~bmizerany@dsl081-064-072.sfo1.dsl.speakeasy.net] has quit [Remote host closed the connection] 02:36 < ilovefairuz> looks like function delegates in c# 02:37 < angasule> ilovefairuz: you don't have to give them up, they are optional :-) 02:37 -!- py3k [~Py3k@219.134.63.121] has joined #go-nuts 02:38 < ilovefairuz> angasule: yeah but i tend to write some and leave out some, haha 02:38 -!- cco3 [~conley@c-69-181-138-209.hsd1.ca.comcast.net] has joined #go-nuts 02:38 < angasule> ilovefairuz: that works just fine, even if it looks weird :P 02:39 -!- napsy [~luka@212.235.174.112] has quit [Ping timeout: 245 seconds] 02:40 < angasule> I wish there was go for the n810, I could program on the way to work! 02:42 -!- py3k [~Py3k@219.134.63.121] has quit [Quit: leaving] 02:42 -!- Damn3d [damn3d@unaffiliated/morpheus/x-0931003] has quit [Remote host closed the connection] 02:42 -!- py3k [~Py3k@219.134.63.121] has joined #go-nuts 02:49 < ilovefairuz> you can always compile in your head! 02:50 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit: This computer has gone to sleep] 02:51 -!- iubdwe [~iubdwe@atx14.neoplus.adsl.tpnet.pl] has quit [Ping timeout: 276 seconds] 02:52 -!- jokerwww [~jokerwww@187.106.16.17] has joined #go-nuts 02:53 < jokerwww> I'm trying to wrap a c function call that return **int (null terminated array of ints) but can't seem to do it because I don't know the size of the array. any ideas? 02:59 < jokerwww> code I have so far: http://pastebin.com/YyEurCAC but it doesn't work because len(array) is alway zero.... 03:01 < angasule> nice! 03:01 < angasule> I mean, that you are working on SDL 03:01 -!- xuwen [~xuwen@adsl-75-61-119-20.dsl.pltn13.sbcglobal.net] has joined #go-nuts 03:01 < angasule> I think Go could be pretty nifty for videogames 03:02 < jokerwww> angasule: yeah, I'm trying to use Go-SDL but I need the ListModes function.... 03:04 -!- cmarcelo [~cmarcelo@187.58.102.223] has joined #go-nuts 03:04 -!- cmarcelo [~cmarcelo@187.58.102.223] has quit [Changing host] 03:04 -!- cmarcelo [~cmarcelo@enlightenment/developer/cmarcelo] has joined #go-nuts 03:05 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Remote host closed the connection] 03:06 < angasule> I was thinking about binding OpenAL 03:08 < exch> mm go-sdl is having some compile issues for me :( duplicate type declaration in constants.go and a missing tyoe (internalVideoMode) 03:08 < exch> shame cos I was going to port the libVLC tut that let's you render video to an SDL surface 03:09 < jokerwww> exch: I've compiled todays Go-SDL with todays go on 386 without problems 03:10 < exch> hmm. I've updated both go-sdl and go today as well (64bit) 03:11 < jokerwww> very strange... 03:11 < exch> yes 03:11 -!- ilovefairuz [~ilovefair@unaffiliated/violinappren] has quit [Quit: Leaving.] 03:29 -!- jokerwww [~jokerwww@187.106.16.17] has quit [Remote host closed the connection] 03:30 -!- MizardX [~MizardX@unaffiliated/mizardx] has quit [Ping timeout: 240 seconds] 03:32 -!- yashi [~yashi@210.191.215.173] has quit [Quit: yashi] 03:35 -!- nf [~nf@203-158-40-182.dyn.iinet.net.au] has quit [Remote host closed the connection] 03:35 -!- nf [~nf@124-168-173-236.dyn.iinet.net.au] has joined #go-nuts 03:37 -!- napsy [~luka@212.235.174.112] has joined #go-nuts 03:37 -!- kingfishr [~kingfishr@c-24-130-147-77.hsd1.ca.comcast.net] has joined #go-nuts 03:40 -!- angasule [~angasule@190.2.33.49] has quit [Ping timeout: 265 seconds] 03:42 -!- nf [~nf@124-168-173-236.dyn.iinet.net.au] has quit [Read error: Connection reset by peer] 03:42 -!- nf [~nf@124-168-145-211.dyn.iinet.net.au] has joined #go-nuts 03:44 -!- MaybeSo [~jimr@lions.Stanford.EDU] has joined #go-nuts 03:55 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts 04:03 -!- hoisie [~user@c-71-202-45-220.hsd1.ca.comcast.net] has joined #go-nuts 04:08 -!- hoisie [~user@c-71-202-45-220.hsd1.ca.comcast.net] has quit [Ping timeout: 260 seconds] 04:41 -!- Belg [~kim@81-235-198-218-no57.tbcn.telia.com] has quit [Read error: Connection reset by peer] 04:46 -!- iubdwe [~iubdwe@atx14.neoplus.adsl.tpnet.pl] has joined #go-nuts 05:02 -!- kingfishr [~kingfishr@c-24-130-147-77.hsd1.ca.comcast.net] has quit [Remote host closed the connection] 05:03 -!- scm [justme@d070035.adsl.hansenet.de] has quit [Ping timeout: 246 seconds] 05:04 -!- scm [justme@d071079.adsl.hansenet.de] has joined #go-nuts 05:08 -!- Yappo__ [~yappo@221x243x122x124.ap221.ftth.ucom.ne.jp] has quit [Ping timeout: 240 seconds] 05:11 -!- zozoR [~zozoR@x1-6-00-0e-2e-a3-e0-23.k377.webspeed.dk] has joined #go-nuts 05:15 -!- iubdwe [~iubdwe@atx14.neoplus.adsl.tpnet.pl] has quit [Ping timeout: 240 seconds] 05:38 -!- gavintong [71fe95c5@gateway/web/freenode/ip.113.254.149.197] has joined #go-nuts 05:40 -!- napsy [~luka@212.235.174.112] has quit [Ping timeout: 276 seconds] 06:07 -!- cmarcelo [~cmarcelo@enlightenment/developer/cmarcelo] has quit [Remote host closed the connection] 06:15 -!- path[l] [UPP@120.138.102.50] has joined #go-nuts 06:16 -!- path[l] [UPP@120.138.102.50] has quit [Client Quit] 06:20 -!- hokapoka [~hokapoka@hoka.hokapoka.com] has quit [Ping timeout: 258 seconds] 06:20 -!- napsy [~luka@212.235.174.112] has joined #go-nuts 06:23 < mjrentz> jokerwww: why not just write a c function to compute the length? 06:28 -!- cco3 [~conley@c-69-181-138-209.hsd1.ca.comcast.net] has quit [Ping timeout: 240 seconds] 06:33 -!- Sacho [~sacho@90-154-149-17.btc-net.bg] has joined #go-nuts 06:34 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts 06:39 -!- tensorpudding [~user@99.56.175.166] has quit [Remote host closed the connection] 06:39 -!- tensorpudding [~user@99.56.175.166] has joined #go-nuts 06:43 -!- hokapoka [~hokapoka@hoka.hokapoka.com] has joined #go-nuts 06:43 -!- ikaros [~ikaros@drms-4d014909.pool.mediaWays.net] has joined #go-nuts 06:44 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has joined #go-nuts 06:46 -!- mikespook [~mikespook@219.137.75.31] has quit [Read error: Connection reset by peer] 06:46 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has quit [Quit: slashus2] 06:47 -!- mikespook [~mikespook@219.137.72.122] has joined #go-nuts 06:47 -!- General1337 [~support@71-84-50-230.dhcp.mtpk.ca.charter.com] has joined #go-nuts 06:50 -!- Yappochan [~yappo@221x243x122x124.ap221.ftth.ucom.ne.jp] has joined #go-nuts 06:50 -!- General13372 [~support@71-84-50-230.dhcp.mtpk.ca.charter.com] has quit [Ping timeout: 248 seconds] 06:55 -!- gavintong [71fe95c5@gateway/web/freenode/ip.113.254.149.197] has quit [Quit: Page closed] 07:07 -!- hoisie [~user@c-71-202-45-220.hsd1.ca.comcast.net] has joined #go-nuts 07:07 -!- hoisie [~user@c-71-202-45-220.hsd1.ca.comcast.net] has quit [Client Quit] 07:08 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has joined #go-nuts 07:12 -!- Sacho [~sacho@90-154-149-17.btc-net.bg] has quit [Quit: Leaving] 07:13 -!- Sacho [~sacho@90-154-149-17.btc-net.bg] has joined #go-nuts 07:15 -!- NfNitLoop [~bip@2001:470:b9cc:beef::1] has quit [Read error: Operation timed out] 07:19 -!- Yappochan [~yappo@221x243x122x124.ap221.ftth.ucom.ne.jp] has quit [Ping timeout: 240 seconds] 07:19 -!- NfNitLoop [~bip@2001:470:b9cc:beef::1] has joined #go-nuts 07:21 -!- Yappochan [~yappo@221x243x122x124.ap221.ftth.ucom.ne.jp] has joined #go-nuts 07:23 -!- napsy [~luka@212.235.174.112] has quit [Ping timeout: 265 seconds] 07:25 -!- iant [~iant@nat/google/x-jxhrohkkhmuisohm] has joined #go-nuts 07:25 -!- mode/#go-nuts [+v iant] by ChanServ 07:26 -!- Fish [~Fish@9fans.fr] has joined #go-nuts 07:31 -!- ikaros [~ikaros@drms-4d014909.pool.mediaWays.net] has quit [Quit: Leave the magic to Houdini] 07:32 -!- korfuri [~korfuri@eth0.korfuri.fr] has quit [Ping timeout: 264 seconds] 07:33 -!- Eridius [~kevin@unaffiliated/eridius] has quit [Ping timeout: 245 seconds] 07:36 -!- ronnyy [~quassel@p4FF1CF9A.dip.t-dialin.net] has joined #go-nuts 07:57 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts 07:59 -!- korfuri [~korfuri@eth0.korfuri.fr] has joined #go-nuts 08:01 -!- ronnyy [~quassel@p4FF1CF9A.dip.t-dialin.net] has quit [Remote host closed the connection] 08:03 -!- bmizerany [~bmizerany@c-24-6-37-113.hsd1.ca.comcast.net] has joined #go-nuts 08:14 -!- tensorpudding [~user@99.56.175.166] has quit [Remote host closed the connection] 08:15 -!- ithor [~thor@81.95.228.239] has joined #go-nuts 08:15 -!- tensorpudding [~user@99.56.175.166] has joined #go-nuts 08:18 -!- Sacho [~sacho@90-154-149-17.btc-net.bg] has quit [Quit: Leaving] 08:18 -!- nf [~nf@124-168-145-211.dyn.iinet.net.au] has quit [Read error: Connection reset by peer] 08:18 -!- nf [~nf@124-168-155-100.dyn.iinet.net.au] has joined #go-nuts 08:19 -!- peterdn [~peterdn@cpc1-oxfd18-2-0-cust914.4-3.cable.virginmedia.com] has joined #go-nuts 08:19 -!- sioraiocht [~tomh@unaffiliated/sioraiocht] has quit [Remote host closed the connection] 08:19 -!- napsy [~luka@212.235.174.112] has joined #go-nuts 08:21 -!- Sacho [~sacho@90-154-149-17.btc-net.bg] has joined #go-nuts 08:21 -!- Kashia [~Kashia@port-92-200-179-75.dynamic.qsc.de] has quit [Quit: This computer has gone to sleep] 08:23 -!- tvw [~tv@212.79.9.150] has joined #go-nuts 08:24 -!- sahid [~sahid@LNeuilly-152-21-22-10.w193-253.abo.wanadoo.fr] has quit [Quit: Ex-Chat] 08:28 < exch> What would you consider an acceptable location to store a small file that holds service data between sessions when said service runs as a daemon in root mode? 08:29 < exch> I'd go with /etc/foo.conf, since that's where pretty much all configurations are location. But those all seem to be static/human configurable configurations. Not so much storage facilities to be edited by a program itself.. Eventhough the file technically contain configuration information 08:29 < exch> *located 08:30 < bartbes> /var/cache? 08:30 < smw> isn't /usr/lib also an option? 08:31 < exch> mm. /var/ could work 08:31 < smw> /usr/lib/program-name or /usr/local/lib/program-name 08:31 < nsf> exch: http://www.pathname.com/fhs/pub/fhs-2.3.html#VARCACHEAPPLICATIONCACHEDATA 08:32 < exch> /usr/lib just has .so files here 08:32 -!- path[l] [~path@59.162.86.164] has joined #go-nuts 08:32 < nsf> /var/cache or /var/tmp 08:32 < smw> that is only for calculated info, not stored data 08:32 < nsf> anyway, read FHS and find what suits your requirements 08:33 < smw> ah 08:33 < nsf> "The /var/tmp directory is made available for programs that require temporary files or directories that are preserved between system reboots." 08:33 < nsf> maybe that will work for you 08:33 < smw> not /usr/lib, /var/lib is the dir I was thinking of 08:34 < smw> /var/lib has stored data /var/cache has nice to have but not necessary data. 08:34 -!- sahid [~sahid@LNeuilly-152-21-22-10.w193-253.abo.wanadoo.fr] has joined #go-nuts 08:34 < smw> /var/tmp has temporary files that do not move between runs. 08:34 < smw> does that sound about right? 08:35 < smw> http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLIBVARIABLESTATEINFORMATION 08:35 < exch> /var/cache sounds closest to what I need 08:36 < smw> ok 08:36 -!- `kaserd [724db695@gateway/web/freenode/ip.114.77.182.149] has joined #go-nuts 08:39 -!- `kaserd [724db695@gateway/web/freenode/ip.114.77.182.149] has quit [Client Quit] 08:43 -!- `dkarnr [724db695@gateway/web/freenode/ip.114.77.182.149] has joined #go-nuts 08:43 -!- `dkarnr [724db695@gateway/web/freenode/ip.114.77.182.149] has quit [Client Quit] 08:46 -!- ukai [~ukai@220.109.219.244] has quit [Remote host closed the connection] 08:46 -!- amfija [~amfija@c114-77-182-149.hillc3.qld.optusnet.com.au] has joined #go-nuts 08:47 -!- ukai [~ukai@nat/google/x-oduyeobywiusdwxs] has joined #go-nuts 08:49 -!- amfija [~amfija@c114-77-182-149.hillc3.qld.optusnet.com.au] has quit [Client Quit] 08:50 -!- maht [~maht__@85-189-31-174.proweb.managedbroadband.co.uk] has quit [Ping timeout: 240 seconds] 08:50 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.2] 08:56 -!- maht [~maht__@85-189-31-174.proweb.managedbroadband.co.uk] has joined #go-nuts 09:02 -!- napsy [~luka@212.235.174.112] has quit [Quit: leaving] 09:12 -!- njsarten [~njsarten@125-239-208-148.jetstream.xtra.co.nz] has joined #go-nuts 09:16 -!- wrtp [~rog@92.17.51.177] has joined #go-nuts 09:17 -!- visof [~visof@unaffiliated/visof] has joined #go-nuts 09:23 -!- ExtraSpice [~XtraSpice@88.118.32.225] has joined #go-nuts 09:35 -!- bmizerany [~bmizerany@c-24-6-37-113.hsd1.ca.comcast.net] has quit [Remote host closed the connection] 09:43 -!- bmizerany [~bmizerany@c-24-6-37-113.hsd1.ca.comcast.net] has joined #go-nuts 10:02 -!- ronnyy [~quassel@p4FF1CF9A.dip.t-dialin.net] has joined #go-nuts 10:04 -!- bmizerany [~bmizerany@c-24-6-37-113.hsd1.ca.comcast.net] has quit [Remote host closed the connection] 10:05 -!- photron [~photron@port-92-201-230-90.dynamic.qsc.de] has joined #go-nuts 10:21 -!- napsy [~luka@212.235.174.112] has joined #go-nuts 10:45 -!- ender2070 [~ender2070@bas22-toronto12-2925102709.dsl.bell.ca] has joined #go-nuts 10:57 -!- wrtp [~rog@92.17.51.177] has quit [Ping timeout: 265 seconds] 11:06 -!- wrtp [~rog@92.17.51.177] has joined #go-nuts 11:07 -!- allengeorge [~allengeor@74.12.150.7] has joined #go-nuts 11:07 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts 11:08 -!- mjf- [~mjf@tech.cas.ip-anywhere.net] has quit [Ping timeout: 248 seconds] 11:08 -!- mjf- [~mjf@2001:1528:1:ffff:21f:d0ff:fed0:968f] has joined #go-nuts 11:15 -!- mjrentz [~mjrentz@adsl-99-183-242-115.dsl.pltn13.sbcglobal.net] has quit [Quit: mjrentz] 11:23 -!- napsy [~luka@212.235.174.112] has quit [Read error: Operation timed out] 11:31 -!- njsarten [~njsarten@125-239-208-148.jetstream.xtra.co.nz] has left #go-nuts [] 11:32 -!- kanru [~kanru@61-30-10-70.static.tfn.net.tw] has quit [Quit: WeeChat 0.3.2] 11:34 -!- allengeorge [~allengeor@74.12.150.7] has quit [Quit: allengeorge] 11:40 -!- Fish-Work [~Fish@86.65.182.207] has quit [Ping timeout: 260 seconds] 11:41 -!- artefon [~thiago@189.107.178.3] has joined #go-nuts 11:42 -!- Fish-Work [~Fish@86.65.182.207] has joined #go-nuts 11:50 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 248 seconds] 11:53 -!- mattn [~mattn@180-144-148-95.eonet.ne.jp] has joined #go-nuts 11:55 -!- napsy [~luka@212.235.174.112] has joined #go-nuts 11:57 -!- wrtp [~rog@92.17.51.177] has quit [Ping timeout: 265 seconds] 11:58 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Read error: Connection reset by peer] 12:00 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts 12:01 < exch> Mmm. All that messing around to find the system's Hostname using syscall earlier.. turns out there's a os.Hostname() function -.- 12:02 -!- angasul [c80571ea@gateway/web/freenode/ip.200.5.113.234] has joined #go-nuts 12:06 < bartbes> :D 12:08 < exch> It doesn't use syscall to get the hostname, but gets it by reading output from os.Open("/proc/sys/kernel/hostname", O_RDONLY, 0) 12:09 -!- artefon [~thiago@189.107.178.3] has quit [Quit: bye] 12:12 < bartbes> well that works 12:12 < bartbes> occams razor? 12:13 < exch> probably :p 12:13 -!- wrtp [~rog@92.17.51.177] has joined #go-nuts 12:13 < exch> judging from the info available in /proc/sys/kernel/ I wouldn't be surprised if the syscall used the same method to fill the Utsname struct 12:14 < bartbes> hehe 12:15 < exch> hmm. I'm torn between 2 choices for a user customizable config file. Should I just load/save it as marshalIndent()'ed json, or should I write a parser that can deal with the more commonly used plaintext config files on linux? 12:17 < rsaarelm> The json config thing is very picky about formatting for something humans will edit by hand. 12:17 < rsaarelm> But it's a good first approximation since you can have it running in minutes. 12:17 < exch> Shouldn't be too difficult. its just KEY=VALUE pairs with # comments and optionall using quoted strings for values 12:18 < exch> I'll do it properly then and write a parser 12:18 < rsaarelm> Famous last words, "shouldn't be too difficult" and "quoted strings" in the same sentence... 12:18 < exch> hehe yes, I will likely regret this. But it keeps me off the streets :p 12:19 < rsaarelm> But yeah, if you want proper config files, json won't cut it imo. Too ugly and finicky. 12:19 < rsaarelm> Actually, someone might have made a parser for ini style files. 12:19 -!- mattn___ [~mattn___@180-144-148-95.eonet.ne.jp] has joined #go-nuts 12:21 < rsaarelm> Not finding it on the cat-v libraries page. Guess I misremembered. 12:21 -!- wrtp [~rog@92.17.51.177] has quit [Ping timeout: 245 seconds] 12:22 < soul9> hi 12:23 < soul9> anyone know if there exists an ebuild for go? 12:25 < soul9> hmm seems not 12:27 < soul9> i get a test failing http://dpaste.com/222736/ 12:28 -!- wrtp [~rog@92.17.51.177] has joined #go-nuts 12:30 < jessta> soul9: ipv6? 12:30 < soul9> yes 12:30 < jessta> no ipv4? 12:31 < soul9> i have both 12:31 < soul9> but only ipv6 dns server 12:31 < jessta> that might explain it 12:31 < soul9> lemme see 12:32 < angasul> oh, writing an ini file parser sounds like a neat little project to do in my dead times :D 12:36 < soul9> jessta: that was it. isn't it completely legal tu use just ipv6 dns though? 12:36 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined #go-nuts 12:36 -!- iubdwe [~iubdwe@atx14.neoplus.adsl.tpnet.pl] has joined #go-nuts 12:39 < jessta> I guess so, but not if you try to make ipv4 connections to it 12:40 < soul9> well sure 12:46 -!- mattn [~mattn@180-144-148-95.eonet.ne.jp] has left #go-nuts [] 12:47 -!- artefon [~thiago@189.26.198.134.dynamic.adsl.gvt.net.br] has joined #go-nuts 12:47 -!- mattn__ [~mattn@180-144-148-95.eonet.ne.jp] has joined #go-nuts 12:47 -!- kanru [~kanru@118-160-160-73.dynamic.hinet.net] has joined #go-nuts 12:49 < jessta> "Go is sort of like Java's (and C's) hot younger sister. Can't blame a person for wanting it available. :D" 12:49 < jessta> lol 12:57 < mattn__> hi 12:57 < exch> hi 12:58 < mattn__> Ah, sorry. i just write now in this channel. 12:59 -!- wrtp [~rog@92.17.51.177] has quit [Ping timeout: 276 seconds] 13:00 < mattn__> http://gist.github.com/494276 13:02 < plexdev> http://is.gd/dOAzZ by [Kai Backman] in 3 subdirs of go/ -- arm: minor bugfixes. 13:02 < exch> Is there a question associated with that? It seems to work fine here 13:02 -!- wrtp [~rog@92.17.51.177] has joined #go-nuts 13:04 -!- path[l] [~path@59.162.86.164] has quit [Remote host closed the connection] 13:04 < bartbes> he's just a showoff :P 13:04 -!- path[l] [~path@122.182.0.38] has joined #go-nuts 13:04 < exch> :p 13:05 < mattn__> me? 13:11 -!- wrtp [~rog@92.17.51.177] has quit [Ping timeout: 260 seconds] 13:11 < mattn__> is there way to add code into World in exp/eval? 13:14 -!- g0bl1n [~pr0kter@89.214.117.3] has joined #go-nuts 13:15 -!- xuwen [~xuwen@adsl-75-61-119-20.dsl.pltn13.sbcglobal.net] has quit [Remote host closed the connection] 13:18 < mattn__> I want to add package into the world. 13:18 <+iant> the comment in exp/eval/world.go says that it doesn't support packages 13:18 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit: This computer has gone to sleep] 13:20 < mattn__> ah, i see. 13:25 < mattn__> more 1 question 13:25 < mattn__> i've got issue about go-gtk few weeks ago, 13:25 < mattn__> it seems that cgo doesn't working in 64bit machine correctly. 13:25 < mattn__> http://github.com/mattn/go-gtk/issues#issue/3/comment/268829 13:26 < mattn__> i don't know the well 13:26 -!- gastal [~jgastal@201.53.197.138] has joined #go-nuts 13:26 <+iant> the order of the definitions in Go is irrelevant 13:27 <+iant> I don't see why you would get a recursive type error from those examples 13:27 < napsy> mattn__: there's a bug in cgo, I think you have to manually edit the cgo utput 13:27 < napsy> output* 13:28 < nsf> I saw a doc mentioning Go namespaces somewhere, am I wrong or there is something like that? 13:28 < nsf> maybe it was a blog post 13:28 < nsf> don't remember totally :( 13:28 <+iant> there are no namespaces other than packages 13:29 < mattn__> napsy: thanks 13:29 < nsf> well, there is package namespace and file namespace (where imported packages has their own names) 13:29 <+iant> there is no difference between the package namespace and the file namespace, at least as I would use the terms 13:29 <+iant> but I think you are thinking of the language spec 13:29 <+iant> which talks about universal scope and package scope 13:30 < nsf> ah.. it's called scope 13:30 < nsf> thanks 13:30 -!- wrtp [~rog@92.17.51.177] has joined #go-nuts 13:31 -!- jA_cOp [~yakobu@unaffiliated/ja-cop/x-9478493] has joined #go-nuts 13:41 -!- wrtp [~rog@92.17.51.177] has quit [Ping timeout: 240 seconds] 13:44 -!- g0bl1n [~pr0kter@89.214.117.3] has quit [Ping timeout: 260 seconds] 13:44 -!- zozoR [~zozoR@x1-6-00-0e-2e-a3-e0-23.k377.webspeed.dk] has quit [Quit: Morten. Desu~] 13:48 -!- wrtp [~rog@92.17.51.177] has joined #go-nuts 13:49 < plexdev> http://is.gd/dOFGb by [Kai Backman] in go/test/ -- arm: fix build (dodgy floats) 13:51 -!- XenoPhoenix [~Xeno@94.171.244.40] has quit [Ping timeout: 276 seconds] 13:52 -!- LeNsTR [~lenstr@unaffiliated/lenstr] has quit [Quit: LeNsTR] 13:52 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.2] 13:58 -!- skelterjohn [~jasmuth@c-76-116-182-139.hsd1.nj.comcast.net] has joined #go-nuts 13:59 -!- napsy [~luka@212.235.174.112] has quit [Ping timeout: 264 seconds] 14:00 -!- path[l]_ [~path@59.162.86.164] has joined #go-nuts 14:02 -!- path[l] [~path@122.182.0.38] has quit [Ping timeout: 245 seconds] 14:03 -!- wrtp [~rog@92.17.51.177] has quit [Ping timeout: 252 seconds] 14:03 -!- jA_cOp [~yakobu@unaffiliated/ja-cop/x-9478493] has quit [Quit: Leaving] 14:06 -!- Esmil [~esmil@83.221.146.177] has joined #go-nuts 14:06 -!- XenoPhoenix [~Xeno@94.171.244.40] has joined #go-nuts 14:07 -!- skelterjohn [~jasmuth@c-76-116-182-139.hsd1.nj.comcast.net] has quit [Quit: skelterjohn] 14:08 -!- artefon [~thiago@189.26.198.134.dynamic.adsl.gvt.net.br] has quit [Quit: bye] 14:09 -!- wrtp [~rog@92.17.51.177] has joined #go-nuts 14:13 -!- General1337 [~support@71-84-50-230.dhcp.mtpk.ca.charter.com] has quit [Ping timeout: 260 seconds] 14:20 -!- gastal [~jgastal@201.53.197.138] has left #go-nuts [] 14:20 -!- gastal [~jgastal@201.53.197.138] has joined #go-nuts 14:20 -!- A32 [5b991ee8@gateway/web/freenode/ip.91.153.30.232] has joined #go-nuts 14:21 -!- A32 [5b991ee8@gateway/web/freenode/ip.91.153.30.232] has left #go-nuts [] 14:21 -!- furfag [5b991ee8@gateway/web/freenode/ip.91.153.30.232] has joined #go-nuts 14:24 -!- gid [~gid@220-253-150-39.VIC.netspace.net.au] has quit [Quit: Leaving.] 14:26 -!- furfag [5b991ee8@gateway/web/freenode/ip.91.153.30.232] has left #go-nuts [] 14:28 -!- gid [~gid@220-253-150-39.VIC.netspace.net.au] has joined #go-nuts 14:29 -!- gid [~gid@220-253-150-39.VIC.netspace.net.au] has quit [Client Quit] 14:29 -!- mattn___ [~mattn___@180-144-148-95.eonet.ne.jp] has left #go-nuts [] 14:31 -!- Zoopee [alsbergt@zoopee.org] has joined #go-nuts 14:31 -!- path[l] [~path@59.162.86.164] has quit [Quit: path[l]] 14:32 -!- a32 [~a32@a91-153-30-232.elisa-laajakaista.fi] has joined #go-nuts 14:34 -!- path[l] [~path@59.162.86.164] has joined #go-nuts 14:37 -!- wrtp [~rog@92.17.51.177] has quit [Ping timeout: 240 seconds] 14:38 -!- a32 [~a32@a91-153-30-232.elisa-laajakaista.fi] has quit [Quit: Lähdössä] 14:43 -!- path[l] [~path@59.162.86.164] has quit [Quit: path[l]] 14:46 -!- path[l] [~path@59.162.86.164] has joined #go-nuts 14:47 -!- wrtp [~rog@92.17.51.177] has joined #go-nuts 14:48 -!- MizardX [~MizardX@unaffiliated/mizardx] has joined #go-nuts 14:50 < Esmil> Is there a go-library that wraps POSIX tcgetattr and tcsetattr ? 14:50 -!- kanru [~kanru@118-160-160-73.dynamic.hinet.net] has quit [Quit: WeeChat 0.3.2] 14:52 -!- ithor [~thor@81.95.228.239] has quit [Quit: bye] 14:54 -!- visof [~visof@unaffiliated/visof] has quit [Quit: Leaving] 14:55 -!- awidegreen [~quassel@62.176.237.78] has joined #go-nuts 14:57 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined #go-nuts 14:58 -!- wrtp [~rog@92.17.51.177] has quit [Ping timeout: 276 seconds] 15:00 < exch> Esmil: This may be of interest: https://groups.google.com/group/golang-nuts/browse_thread/thread/f28f5fc4f69e16ef 15:00 -!- napsy [~luka@212.235.174.112] has joined #go-nuts 15:01 < Esmil> exch: Ahh yes, thank you. 15:04 -!- path[l] [~path@59.162.86.164] has quit [Quit: path[l]] 15:10 -!- iant [~iant@nat/google/x-jxhrohkkhmuisohm] has quit [Ping timeout: 248 seconds] 15:11 -!- nighty^ [~nighty@x122091.ppp.asahi-net.or.jp] has quit [Quit: Disappears in a puff of smoke] 15:13 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts 15:15 -!- RobertLJ_ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined #go-nuts 15:16 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Ping timeout: 276 seconds] 15:21 -!- path[l] [~path@59.162.86.164] has joined #go-nuts 15:28 -!- Esmil [~esmil@83.221.146.177] has quit [Quit: leaving] 15:29 -!- nighty^ [~nighty@x122091.ppp.asahi-net.or.jp] has joined #go-nuts 15:30 -!- wrtp [~rog@92.17.51.177] has joined #go-nuts 15:30 -!- jmp [jmp@kapsi.fi] has left #go-nuts [] 15:43 -!- iant [~iant@81-233-149-58-no82.tbcn.telia.com] has joined #go-nuts 15:43 -!- mode/#go-nuts [+v iant] by ChanServ 15:43 -!- wrtp [~rog@92.17.51.177] has quit [Read error: Connection reset by peer] 15:46 -!- wrtp [~rog@92.17.51.177] has joined #go-nuts 15:49 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has quit [Quit: Leaving.] 16:02 -!- Adys [~Adys@unaffiliated/adys] has quit [Quit: I ♥ Unicode] 16:03 -!- MizardX [~MizardX@unaffiliated/mizardx] has quit [Quit: What are you sinking about?] 16:05 -!- wrtp [~rog@92.17.51.177] has quit [Ping timeout: 258 seconds] 16:09 -!- ShadowIce [pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts 16:09 -!- kingfishr [~kingfishr@c-24-130-147-77.hsd1.ca.comcast.net] has joined #go-nuts 16:10 -!- skelterjohn [~jasmuth@c-76-116-182-139.hsd1.nj.comcast.net] has joined #go-nuts 16:12 -!- Damn3d [damn3d@bimbrownia.org] has joined #go-nuts 16:13 -!- gnuvince_ [~vince@64.235.207.135] has quit [Quit: I goes to t3h sch00lz] 16:13 -!- ikaros [~ikaros@drms-4d015f47.pool.mediaWays.net] has joined #go-nuts 16:14 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts 16:14 -!- iant [~iant@81-233-149-58-no82.tbcn.telia.com] has quit [Quit: Leaving.] 16:15 -!- deso [~deso@x0561a.wh30.tu-dresden.de] has joined #go-nuts 16:15 -!- wrtp [~rog@92.17.51.177] has joined #go-nuts 16:18 -!- AmberJ [amberj@support.team.at.shellium.org] has joined #go-nuts 16:22 -!- gastal_ [~jgastal@201.53.197.138] has joined #go-nuts 16:23 -!- gastal [~jgastal@201.53.197.138] has quit [Ping timeout: 276 seconds] 16:25 -!- AmberJ [amberj@support.team.at.shellium.org] has left #go-nuts [] 16:31 -!- Fish [~Fish@9fans.fr] has quit [Remote host closed the connection] 16:31 -!- Fish [~Fish@9fans.fr] has joined #go-nuts 16:35 -!- sacho_ [~sacho@213.91.244.15] has joined #go-nuts 16:35 -!- path[l] [~path@59.162.86.164] has quit [Read error: Connection reset by peer] 16:36 -!- Sacho [~sacho@90-154-149-17.btc-net.bg] has quit [Disconnected by services] 16:39 -!- iLeNsTR [~quassel@unaffiliated/lenstr] has joined #go-nuts 16:40 -!- artefon [~thiagon@150.164.2.20] has joined #go-nuts 16:44 -!- path[l] [~path@59.162.86.164] has joined #go-nuts 16:44 -!- path[l] [~path@59.162.86.164] has quit [Client Quit] 16:45 -!- peterdn [~peterdn@cpc1-oxfd18-2-0-cust914.4-3.cable.virginmedia.com] has quit [Quit: ChatZilla 0.9.86-rdmsoft [XULRunner 1.9.2/20100222071121]] 16:48 -!- path[l] [~path@59.162.86.164] has joined #go-nuts 16:48 -!- sioraiocht [~tomh@212-30-192-34.static.simnet.is] has joined #go-nuts 16:48 -!- sioraiocht [~tomh@212-30-192-34.static.simnet.is] has quit [Changing host] 16:48 -!- sioraiocht [~tomh@unaffiliated/sioraiocht] has joined #go-nuts 16:48 -!- sahid [~sahid@LNeuilly-152-21-22-10.w193-253.abo.wanadoo.fr] has quit [Quit: Ex-Chat] 16:55 -!- iLeNsTR [~quassel@unaffiliated/lenstr] has quit [Remote host closed the connection] 16:55 -!- Venom_X [~pjacobs@adsl-99-3-159-249.dsl.hstntx.sbcglobal.net] has joined #go-nuts 17:01 -!- ronnyy [~quassel@p4FF1CF9A.dip.t-dialin.net] has quit [Remote host closed the connection] 17:01 -!- boscop_ [~boscop@f055210009.adsl.alicedsl.de] has joined #go-nuts 17:02 -!- boscop [~boscop@g225234142.adsl.alicedsl.de] has quit [Ping timeout: 264 seconds] 17:10 -!- path[l] [~path@59.162.86.164] has quit [Read error: Connection reset by peer] 17:12 -!- mjrentz [~mjrentz@adsl-99-183-242-115.dsl.pltn13.sbcglobal.net] has joined #go-nuts 17:16 -!- nickaugust [~nickaugus@114.232.121.70.cfl.res.rr.com] has joined #go-nuts 17:18 -!- Fish [~Fish@9fans.fr] has quit [Ping timeout: 260 seconds] 17:21 -!- iubdwe [~iubdwe@atx14.neoplus.adsl.tpnet.pl] has quit [Ping timeout: 276 seconds] 17:26 < napsy> Why doesn't the regexp compiler recognise \s and gives an illegal backslash error? 17:27 -!- macroron [~ron@c-98-242-168-49.hsd1.fl.comcast.net] has joined #go-nuts 17:29 < exch> the regexp package is very simple. it's missing a lot of those kind of constructs 17:29 < napsy> ok 17:32 -!- deso [~deso@x0561a.wh30.tu-dresden.de] has quit [Read error: Connection reset by peer] 17:33 -!- iubdwe [~iubdwe@atx14.neoplus.adsl.tpnet.pl] has joined #go-nuts 17:34 -!- RobertLJ_ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Quit: No Ping reply in 180 seconds.] 17:35 -!- Sacho [~sacho@213.91.244.15] has quit [Remote host closed the connection] 17:36 -!- wrtp [~rog@92.17.51.177] has quit [Ping timeout: 264 seconds] 17:38 -!- mjrentz [~mjrentz@adsl-99-183-242-115.dsl.pltn13.sbcglobal.net] has quit [Quit: mjrentz] 17:39 -!- macroron [~ron@c-98-242-168-49.hsd1.fl.comcast.net] has quit [Quit: Leaving] 17:40 < angasule> I don't remember getting an answer yesterday: what is the regex expression for any unicode character? I'd need that for identifying identifiers with exhuberant ctags 17:41 < exch> I'm not sure if you can 17:42 < angasule> hmm, might be \X in some 17:42 < angasule> http://www.regular-expressions.info/refunicode.html 17:42 < angasule> but I will have to check if that's the kind e-ctags uses 17:43 -!- path[l] [UPP@120.138.102.50] has joined #go-nuts 17:43 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined #go-nuts 17:45 -!- Fish [~Fish@9fans.fr] has joined #go-nuts 17:46 -!- marsu [~marsu@93.10.90.137] has joined #go-nuts 17:49 -!- wrtp [~rog@92.17.51.177] has joined #go-nuts 17:49 < angasule> hmm 17:52 < angasule> not sure if it will work, but I'll try it tonight 17:53 -!- Fish [~Fish@9fans.fr] has quit [Remote host closed the connection] 17:54 -!- mattn__ [~mattn@180-144-148-95.eonet.ne.jp] has quit [Quit: leaving] 17:59 -!- napsy [~luka@212.235.174.112] has quit [Quit: Lost terminal] 18:00 -!- Fish [~Fish@9fans.fr] has joined #go-nuts 18:00 -!- bmizerany [~bmizerany@c-24-6-37-113.hsd1.ca.comcast.net] has joined #go-nuts 18:04 -!- wrtp [~rog@92.17.51.177] has quit [Ping timeout: 265 seconds] 18:04 -!- bmizerany [~bmizerany@c-24-6-37-113.hsd1.ca.comcast.net] has quit [Remote host closed the connection] 18:06 -!- marsu [~marsu@93.10.90.137] has quit [Ping timeout: 240 seconds] 18:07 -!- wrtp [~rog@92.17.51.177] has joined #go-nuts 18:07 -!- Sacho [~sacho@79-100-169-151.btc-net.bg] has joined #go-nuts 18:17 -!- ghiu [~gu@93-32-175-181.ip34.fastwebnet.it] has joined #go-nuts 18:17 -!- wrtp [~rog@92.17.51.177] has quit [Read error: Connection reset by peer] 18:18 < ghiu> hi to all 18:18 < exch> hello 18:19 -!- ZincSaucier [~quassel@c-76-126-34-217.hsd1.ca.comcast.net] has joined #go-nuts 18:21 -!- cbeck [~cbeck@adelie.cs.pdx.edu] has joined #go-nuts 18:26 < ghiu> question: i can make a simple tcp server and use Connection.Read([]byte) to get some data. now, my byte array is 512 bytes, after that, if the message being sent from the client is longer, it gets trunked, of course. how to read an arbitrary length message? 18:28 -!- wrtp [~rog@92.17.51.177] has joined #go-nuts 18:28 < exch> Use a buffered stream reader/writer: http://github.com/jteeuwen/calculon/blob/master/bot/net/network.go#L46 18:28 < exch> the reader is used on line 126 18:29 -!- gastal_ [~jgastal@201.53.197.138] has left #go-nuts [] 18:29 -!- gastal [~jgastal@201.53.197.138] has joined #go-nuts 18:30 < ghiu> great, thank you :) 18:30 < ghiu> i'm gonna try it right now 18:30 -!- tensorpudding [~user@99.56.175.166] has quit [Quit: ERC Version 5.3 (IRC client for Emacs)] 18:32 -!- tensorpudding [~michael@99.56.175.166] has joined #go-nuts 18:33 < ghiu> maybe also this? 18:33 < ghiu> http://github.com/tcpip4000/socketgo/blob/github/serversocket.go#L34 18:35 < exch> that'll work to 18:36 -!- wrtp [~rog@92.17.51.177] has quit [Ping timeout: 246 seconds] 18:39 < plexdev> http://is.gd/dP91t by [Brad Fitzpatrick] in go/src/pkg/io/ -- io: MultiReader and MultiWriter 18:40 -!- sioraiocht [~tomh@unaffiliated/sioraiocht] has quit [Remote host closed the connection] 18:40 -!- derferman [~derferman@dsl092-048-218.sfo4.dsl.speakeasy.net] has joined #go-nuts 18:43 -!- py1hon [~kent@evilpiepirate.org] has joined #go-nuts 18:46 < cbeck> Does anyone have a link to video of Rob Pike's talk at the emerging languages camp at OSCON? 18:46 -!- tvw [~tv@212.79.9.150] has quit [Remote host closed the connection] 18:47 < exch> http://www.youtube.com/watch?v=5kj5ApnhPAE this one? 18:49 < cbeck> exch: In that one he mentions a more in depth talk to follow, I was hoping to find it 18:49 -!- wrtp [~rog@92.17.51.177] has joined #go-nuts 18:49 < exch> ah 18:52 <+danderson> don't know if the latter was taped. 18:52 <+danderson> if it was, it's not in the oscon youtube playlist yet. 18:57 < ghiu> can i declare a map of interface? 18:57 < ghiu> m := map[string]interface does not work 18:58 < exch> m := map[string]interface{} 18:58 -!- iant [~iant@81-233-149-58-no82.tbcn.telia.com] has joined #go-nuts 18:58 -!- mode/#go-nuts [+v iant] by ChanServ 18:58 < ghiu> neither :( 18:59 < Venom_X> cbeck: http://oscon.blip.tv/file/3917782/ 18:59 < exch> err, sorry: m := make(map[string]interface{}) 19:00 < exch> Venom_X: it's the same one as on youtube 19:00 < Venom_X> oh 19:03 -!- ender2070 [~ender2070@bas22-toronto12-2925102709.dsl.bell.ca] has quit [Remote host closed the connection] 19:06 -!- wrtp [~rog@92.17.51.177] has quit [Ping timeout: 276 seconds] 19:07 -!- wrtp [~rog@92.17.51.177] has joined #go-nuts 19:12 -!- angasule [c80571ea@gateway/web/freenode/ip.200.5.113.234] has quit [Quit: Page closed] 19:16 -!- artefon [~thiagon@150.164.2.20] has quit [Quit: Leaving] 19:18 -!- angasule [c80571ea@gateway/web/freenode/ip.200.5.113.234] has joined #go-nuts 19:19 -!- Damn3d [damn3d@bimbrownia.org] has quit [Changing host] 19:19 -!- Damn3d [damn3d@unaffiliated/morpheus/x-0931003] has joined #go-nuts 19:20 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts 19:23 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts 19:25 -!- Eridius [~kevin@unaffiliated/eridius] has joined #go-nuts 19:26 < ghiu> exch: thanks, i forgot it 19:27 -!- Eridius [~kevin@unaffiliated/eridius] has quit [Client Quit] 19:33 -!- CodeWar [~as@c-24-23-206-137.hsd1.ca.comcast.net] has joined #go-nuts 19:34 -!- peterdn [~peterdn@cpc1-oxfd18-2-0-cust914.4-3.cable.virginmedia.com] has joined #go-nuts 19:35 -!- b00m_chef [~watr@216.251.138.130] has joined #go-nuts 19:44 -!- rannmann [~SmurfGutz@66-230-86-162-rb1.fai.dsl.dynamic.acsalaska.net] has joined #go-nuts 19:44 -!- rannmann [~SmurfGutz@66-230-86-162-rb1.fai.dsl.dynamic.acsalaska.net] has left #go-nuts [] 19:47 -!- iubdwe [~iubdwe@atx14.neoplus.adsl.tpnet.pl] has quit [Quit: leaving] 19:47 -!- tvw [~tv@e176006098.adsl.alicedsl.de] has joined #go-nuts 19:47 -!- tumdum [~iubdwe@unaffiliated/tumdum] has joined #go-nuts 19:47 < tumdum> hi, I can't find (in pkg reflect) any way to get func name, is there none? 19:50 -!- zuser [~nonet@c-76-126-152-253.hsd1.ca.comcast.net] has joined #go-nuts 19:51 -!- zuser [~nonet@c-76-126-152-253.hsd1.ca.comcast.net] has left #go-nuts [] 19:53 < CodeWar> rather premature question (having read 2 blogs and the GO youtube presentation) but why does a *systems* language have to be compiled to native code 19:53 < CodeWar> JITing provides faster runtime adaptable code no? or do your studies reveal otherwise? 19:53 < exch> why not? 19:54 -!- ilovefairuz [~ilovefair@unaffiliated/violinappren] has joined #go-nuts 19:54 < CodeWar> my defintion of systems may not match yours but lets take an OS kernel for example.. the memory manager the part that deals iwth tons of page tables can beneift from JITting IMO 19:56 -!- gladimdim [~gladimdim@77.90.254.9] has joined #go-nuts 19:56 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Ping timeout: 265 seconds] 19:57 < exch> I really don't know enough about either case to give an informed response, so I'll leave that to those who do :) 19:59 < CodeWar> if this has been discussed in some forum/blog feel free to point me at this point I m simply underread 20:00 < exch> If it's been discussed anywhere, it'll be the mailinglist: http://groups.google.com/group/golang-nuts/topics 20:00 <+iant> tumdum: the reflection package does not provide a way to get the name of a function, no 20:01 -!- gladimdim [~gladimdim@77.90.254.9] has left #go-nuts [] 20:01 <+iant> CodeWar: a JIT can be faster in the long run in some cases, but there is a startup penalty 20:03 < CodeWar> hence hotspot JITting 20:03 < CodeWar> though true your init code running native will be faster than interpreted (hotspot jitting) 20:04 < tumdum> iant: do you know of ony way to get that kind of information? 20:04 <+iant> tumdum: what function name do you want? 20:04 <+iant> does runtime.Caller give you what you need? 20:05 <+iant> CodeWar: A JIT is a much more complex system which can in some specific cases provide better performance 20:05 <+iant> compiling to native code is simpler and always gives good performance 20:05 <+iant> it would be entirely possible to use Go with a JIT 20:06 <+iant> but it doesn't seem like the obvious choice for a first implementation 20:06 <+iant> at least not to me 20:06 < CodeWar> iant, fair enough I buy the simplicity argument .. the *specific* case speedup / *always* good performance parts are a bit vague but I m sure you have your studies to back taht up for the problems at hand 20:07 < tumdum> i have func A that takes other func B as argument and want to know the name of B in A. Caller doesn't help with that 20:07 <+iant> tumdum: there is no general way to answer that question, because the argument to A may not have a name at all 20:07 <+iant> it is also true that there is no way to discover the name if it does in fact have a name 20:07 < exch> tumdum: that won't always make sense. if yuo pass a closure as B, it will never have a name to begin with 20:08 -!- tvw [~tv@e176006098.adsl.alicedsl.de] has quit [Ping timeout: 245 seconds] 20:08 < ilovefairuz> tumdum: 'func's are just values 20:08 < CodeWar> another introductory question ... when you place an object on a channel are we doing a deep copy or passing references 20:08 < ilovefairuz> tumdum: the 'name' is just an identifier referring to this value 20:09 <+iant> CodeWar: putting an object on a channel is like an assignment; the object is passed by value 20:09 <+iant> CodeWar: if you put a pointer on the channel, then you in effect passing a reference 20:09 <+iant> to whatever the pointer points to 20:09 < angasule> CodeWar: perhaps you should read some docs and watch the google tech talk? the techtalk in particular is nice 20:09 < CodeWar> but it doesnt internally deserialize the pointer and place a copy of the origianl object graph does it? 20:10 < CodeWar> reason I ask .. 20:10 <+iant> no, it's like an assignment 20:10 <+iant> you get another copy of the pointer 20:10 < ilovefairuz> tumdum: var f func(){} = func(){} ; var g = f; 20:10 < CodeWar> we have a pipeline that does something similar and in the long run we found that placing references in a chain is just as bad because that reference can by virtue of an object graph .. 20:10 < ilovefairuz> tumdum: sorry, var f fun() = func(){} 20:10 < CodeWar> touch global state which needs locking 20:11 < ilovefairuz> err missing c 20:11 -!- tumdum_ [~iubdwe@att186.neoplus.adsl.tpnet.pl] has joined #go-nuts 20:11 -!- tumdum [~iubdwe@unaffiliated/tumdum] has quit [Disconnected by services] 20:11 <+iant> I'm not sure what you mean by "just as bad," but in any case, if doing something is painful, then don't do it 20:12 <+iant> you can definitely get synchronization errors by passing pointers on channels 20:12 <+iant> those should be avoided 20:12 < CodeWar> ok .. so to avoid that you do what exasctly use explicit locks / some optimistic construct or is there something in the language to catch such mistakes 20:13 <+iant> there nothing in the language to catch such a mistake, because when done correctly it is very useful 20:13 < CodeWar> 5s summary .. message passing using references ( or pointers) doesnt really provide much value for concurrency unless theres something that guarnatees single ownership of that reference 20:13 <+iant> the language makes it easy to write correct concurrent code, but it does not prevent you from writing incorrect code 20:14 <+iant> you write program logic to guarantee that single ownership 20:14 -!- tumdum_ [~iubdwe@att186.neoplus.adsl.tpnet.pl] has left #go-nuts [] 20:14 <+iant> if somebody had a clever way to express that in the language I'm sure we would consider it, but it's hard 20:14 -!- tumdum [~iubdwe@unaffiliated/tumdum] has joined #go-nuts 20:14 < tumdum> one more thing -- so the only reason that there is a way to get name of method is that methods are not first class and there is no way to create them and assign them to vars ? 20:15 < CodeWar> iant, thats difficult for a programmer to guarantee single ownership .. consider two objects from different classes that are composed of a whole graph of objects. the last leaf of this object graph could be a shared object 20:15 -!- rlab [~Miranda@91.200.158.34] has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org] 20:15 < CodeWar> so now these two objects are related to each other via shared state .. side effect of one can bite the other 20:15 <+iant> tumdum: I would put it the other way: you can't get the name of a function because functions are first class and you can create them 20:16 < ilovefairuz> tumdum: that's what i just did, i assigned one to a var and reassigned it 20:16 <+iant> tumdum: not sure if you mean to distinguish functions and methods 20:16 <+iant> CodeWar: I'm not sure how to relate that to Go which doesn't have objects or classes, but I certainly agree that you can construct a situation in which two goroutines think they own an object 20:16 < tumdum> ilovefairuz: but there is no method literals, only function literals 20:17 <+iant> the way to avoid that is to follow Go's slogan: share memory by communicating, don't communicate by sharing memory 20:17 <+iant> transfer explicit ownership between goroutines 20:18 < CodeWar> I see so there is an ownership transfer construct .. interesting 20:18 <+iant> it's just a program logic thing, there isn't a language construct 20:19 < CodeWar> ok then I ll contend its not really helping your concurency goal from a language perspective anymore than say Java or C# which can provide channels as libraries. The slogan "share by cummincation" applies equally well there 20:20 <+iant> in a purely abstract sense, that is true; in a practical actual coding sense, it's a lot easier to use channels which are first class in the language than it is to use a library 20:20 < ilovefairuz> tumdum: there aren't really 'methods' in go, in classical OO sense 20:20 < CodeWar> you mean the "<-" and "->" syntax? hmmm 20:21 <+iant> in particular, the efficient select statement in Go is difficult to implement in a general library 20:21 < ilovefairuz> more like, associated functions 20:21 <+iant> not impossible, mind you, but it's not like there are libraries sitting around which provide it 20:21 < CodeWar> I suppose select is something taht does pattern matching on incoming messages? like erlang? 20:21 <+iant> no; erlang requires it because their version of channels (I forget the name) are not first class 20:22 <+iant> you can write pattern matching on a channel but it's much less necessary in Go 20:22 < CodeWar> *its like not there are libraries siting around which provide it" .... I ll contend that too :-) JMS ? 20:23 < CodeWar> you post your message to named queues .. queues can be single owner or pubish subscribe .. 20:23 <+iant> what is the equivalent to the select statement? 20:23 < CodeWar> named queue .. the name part 20:23 < CodeWar> you say what queue you want to handle messages for ... 20:23 <+iant> that doesn't sound the same.... 20:23 < tumdum> ilovefairuz: ofc, but I'm not arguing about that ;) 20:23 < CodeWar> oh you re asking if a queue has messages of different types then what 20:24 <+iant> select takes a set of I/O operations on channels, picks one that is ready, and runs it 20:24 < CodeWar> true then the listener has to implement a State pattern or at the very least a giant switch case 20:24 < CodeWar> my bad I completely misunderstood what select does ... let me think about this 20:25 < CodeWar> Unix select/poll like behaviour right? 20:25 -!- fenicks [~christian@log77-3-82-243-254-112.fbx.proxad.net] has left #go-nuts [] 20:25 <+iant> similar, but the actual I/O is done by the select as well 20:25 <+iant> (otherwise you have race conditions) 20:25 < CodeWar> sure 20:26 < CodeWar> tell me something .. if you have a named queue and several incoming messages on that queue why doesnt a green thread per message type give you what you want 20:26 < plexdev> http://is.gd/dPjXS by [Rob Pike] in go/src/pkg/fmt/ -- fmt: move comment into doc.go. 20:26 < xb95> I need someone to RTFM me, because I can't find this anywhere... I want to create a well-structured program. The main package does only limited stuff, pulling in other packages that define the data structures, support methods, etc. But I can't for the life of me figure out how to get 6g/6l to like what I'm feeding it. Is there a simple-ish example/doc on how to make an app that uses several .go files? 20:27 < CodeWar> let me elaborate 20:27 <+iant> CodeWar: can I have a queue of queues? Can I construct a queue and send it to another thread and then wait for that thread to reply on that queue? 20:27 <+iant> xb95: you could look at src/cmd/cgo 20:28 < tensorpudding> can i ask a bothersome question? 20:28 < CodeWar> iant, queue of queues.. interesting concept never thought about that one :-) 20:28 < xb95> iant: Thanks, I'll start there. 20:28 <+iant> CodeWar: maybe you should read Effective Go, it will give you more a feel for the language 20:28 <+iant> tensorpudding: you can just ask, you don't need to ask whether you can ask 20:29 < tensorpudding> namely, will go evolve to get generics? or is that something that is unlikely to ever happen? 20:29 < CodeWar> iant, let me do that ... 20:29 < tensorpudding> if anyone in here at the moment has their fingers on the pulse of go's development 20:29 <+iant> tensorpudding: http://golang.org/doc/go_lang_faq.html#generics 20:31 < tensorpudding> also, is it a feature or a bug that one cannot give instance methods for built-in types? 20:32 <+iant> tensorpudding: it's a feature 20:32 -!- b00m_chef [~watr@216.251.138.130] has quit [Ping timeout: 276 seconds] 20:32 < tensorpudding> rather, i wanted to create an interface which would be satisfied by int/float/et. al. 20:32 <+iant> you say "type MyInt int" and put methods on MyInt 20:32 <+iant> yeah, the only interface that they satisfy is interface{} 20:33 < tensorpudding> The thing I wanted to do was to create an interface that generalized well-orderable types 20:33 -!- gastal [~jgastal@201.53.197.138] has left #go-nuts [] 20:33 < exch> xb95: This may be of help. A simple example project showing how compiling multiple files in one project works, as well as compiling/linking multiple packages into 1 binary: http://github.com/jteeuwen/go-example-multipkg 20:33 -!- nickaugust [~nickaugus@114.232.121.70.cfl.res.rr.com] has left #go-nuts ["WeeChat 0.2.6"] 20:33 -!- CodeWar [~as@c-24-23-206-137.hsd1.ca.comcast.net] has quit [Quit: Leaving] 20:33 < taruti> tensorpudding: for what purpose? 20:34 < tensorpudding> I wanted to make a binary search tree for arbitrary things which could be ordered 20:34 < taruti> tensorpudding: go idioms are different so if you are trying to port concepts from e.g. Haskell that won't work nicely. 20:34 < tensorpudding> You read me well, heh. My language of choice is Haskell. 20:34 < taruti> so why not 'interface{}' + a sort function? 20:34 < Namegduf> Absence of generics means writing generic data structures is not essentially possible without boxing/unboxing via interface{} 20:34 <+iant> tensorpudding: well, as noted, Go doesn't yet have generic types 20:35 < ilovefairuz> can 8g only compile one go file per invocation ? 20:35 <+iant> ilovefairuz: no..... 20:36 < tensorpudding> taruti: how would that work? 20:36 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts 20:36 < tensorpudding> also i have one final question at the moment about godoc 20:36 <+iant> tensorpudding: see the sort package 20:37 < tensorpudding> I recall I looked at the sort packages but I don't see how that could be useful to me. 20:37 <+iant> I'm not sure whether it would be useful, but it's an example of interface{} plus a sort function 20:37 < tensorpudding> The data structure I wanted to implement, a treap, doesn't have a concept of sorting, just a concept of being ordered. 20:38 <+iant> well, container/heap is another example of this kind of approach 20:38 <+iant> again, I don't know whether it would actually work for you 20:39 -!- nickaugust [~nickaugus@114.232.121.70.cfl.res.rr.com] has joined #go-nuts 20:39 <+iant> I won't deny that Go does not have good support for generic containers 20:40 < nickaugust> ok so im writing these go programs and all is going well but how do I write a more interactive terminal program? i want display a form with a fiew fields and a save button on the bottom. in general how do I go about doing somethign like that? 20:40 < tensorpudding> I figure I should probably take to programming in Go using Go's strengths rather than trying to port things I have written in vastly different languages 20:40 -!- aho [~nya@fuld-4d00d407.pool.mediaWays.net] has joined #go-nuts 20:42 < tensorpudding> Anyway, my question about godoc 20:42 < tensorpudding> godoc is able to print documentation from the packages included with go, but I can't figure out how to get it to generate documentation from my own packages 20:44 -!- sioraiocht [~tomh@unaffiliated/sioraiocht] has joined #go-nuts 20:44 < tensorpudding> wait, I found -path, i suppose that could work 20:46 < taruti> tensorpudding: see http://bitbucket.org/taruti/go-extra/src/tip/Makefile for a dirty way to do it 20:51 -!- ikaros [~ikaros@drms-4d015f47.pool.mediaWays.net] has quit [Quit: Leave the magic to Houdini] 20:55 -!- Eridius [~kevin@unaffiliated/eridius] has joined #go-nuts 20:59 -!- ckennelly [~ckennelly@beryllium.caltech.edu] has quit [Quit: Leaving.] 21:00 -!- ckennelly [~ckennelly@neon.caltech.edu] has joined #go-nuts 21:00 -!- cbeck [~cbeck@adelie.cs.pdx.edu] has quit [Quit: leaving] 21:05 -!- ronnyy [~quassel@p4FF1CF9A.dip.t-dialin.net] has joined #go-nuts 21:06 -!- awidegreen [~quassel@62.176.237.78] has quit [Remote host closed the connection] 21:08 -!- artefon [~thiago@189.107.178.3] has joined #go-nuts 21:11 -!- tumdum [~iubdwe@unaffiliated/tumdum] has quit [Ping timeout: 246 seconds] 21:11 -!- gnuvince_ [~vince@64.235.207.135] has joined #go-nuts 21:16 -!- Adys [~Adys@unaffiliated/adys] has quit [Quit: I ♥ Unicode] 21:17 -!- ronnyy [~quassel@p4FF1CF9A.dip.t-dialin.net] has quit [Remote host closed the connection] 21:20 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts 21:20 -!- General1337 [~support@71-84-50-230.dhcp.mtpk.ca.charter.com] has joined #go-nuts 21:20 -!- iant [~iant@81-233-149-58-no82.tbcn.telia.com] has quit [Ping timeout: 240 seconds] 21:23 -!- Fish [~Fish@9fans.fr] has quit [Remote host closed the connection] 21:25 -!- tvw [~tv@e176006098.adsl.alicedsl.de] has joined #go-nuts 21:26 < ilovefairuz> nickaugust: i think there are some ncurses bindings 21:26 < ilovefairuz> Question: Can I not compile files declaring different packages in the same 8g invocation ? 21:26 < exch> nope 21:27 < exch> need to be compiled seperately 21:27 < nickaugust> ilovefairuz: thx i'll check that out 21:30 < ilovefairuz> exch: and in order to link it, do i have to compile a library or can i just link the .8 object file? 21:31 < exch> you compile each package independantly with 8g. When yuo reach a package/app that requires another one, you just need to tell 8l where to find the compiled .a files. By default they are installed to the go package dir 21:31 < exch> it'll import them automatically 21:31 < exch> http://github.com/jteeuwen/go-example-multipkg <- better explanation 21:32 < exch> http://www.youtube.com/watch?v=jDWBJOXs_iI this vid also makes it pretty clear 21:33 < nickaugust> is there a go ncurses library? 21:34 < exch> nickaugust: yep http://go-lang.cat-v.org/library-bindings 21:34 < ilovefairuz> exch: thanks, nice repo 21:34 < nickaugust> exch: ah cat-v :) thanks 21:34 < ilovefairuz> including $(GOROOT)/src/Make.$(GOARCH) is rather.. strange though 21:35 < xb95> oh exch++, that's what I was looking for an hour ago. I've already used cgo as an example and that's working, but this is helpful. thanks! 21:35 < exch> It makes sure it works on all platforms :) 21:35 < exch> xb95: I did link it for you, but I guess you where away. Sorry, should have been faster :) 21:36 < xb95> exch: oh oops, I see that now. well, thanks for trying. :-) 21:36 < exch> np 21:38 < exch> Is there a simple way of doing this in Go? 's = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)' Or should I just rip the guts out of the net package and do it manually? 21:39 < xb95> net.DialUDP ? 21:39 < exch> nvm. it's pretty straightforward, judging from the socket() function 21:39 < exch> I just need a socket. the dial() functions actually make connections which I don't need in this case 21:40 < xb95> ah, syscall.Socket then 21:40 < xb95> yeah 21:40 < xb95> which is probably what you found 21:40 < exch> aye 21:40 < xb95> also, UDP is connectionless, so I don't expect the DialUDP function does anything other than setup the socket. at least, I'd hope :) 21:41 < xb95> http://golang.org/src/pkg/net/udpsock.go#L227 21:41 -!- ghiu [~gu@93-32-175-181.ip34.fastwebnet.it] has quit [Quit: ghiu] 21:41 < xb95> yeah 21:41 < xb95> it's basically just a socket wrapper 21:41 < exch> good point 21:42 < xb95> but it does a lot of the setup and error checking, so if you're going to use it for sending data, it might be worth using anyway 21:42 < exch> The api doesn't expose the underlying socket though 21:42 < xb95> ahh 21:44 -!- iant [~iant@81-233-149-58-no82.tbcn.telia.com] has joined #go-nuts 21:44 -!- mode/#go-nuts [+v iant] by ChanServ 21:45 < ilovefairuz> exch: how do I make a library out of a .8 ? 21:47 < exch> there's a subtle difference in the includes of the Makefiles that determine if you are building an app or package. The second include is either Make.pkg for packages or Make.cmd for apps 21:47 < exch> if you run make on that, it'll build either the one or the other. All the messy work is defined in those includes 21:48 < exch> Probably worth reading through them sometime to see what's going on 21:49 < nickaugust> is termbox stable? 21:49 < nickaugust> nsf: you here? 21:49 < ilovefairuz> exch: the makes files or go or the example repo? 21:50 < ilovefairuz> of go * 21:50 -!- iant [~iant@81-233-149-58-no82.tbcn.telia.com] has quit [Quit: Leaving.] 21:50 < exch> the includes are from go itself 21:50 < exch> $(GOROOT)/src/Make.pkg and $(GOROOT)/src/Make.cmd 21:51 < ilovefairuz> oh i just saw it 22:04 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Remote host closed the connection] 22:05 -!- Venom_X [~pjacobs@adsl-99-3-159-249.dsl.hstntx.sbcglobal.net] has quit [Quit: Venom_X] 22:13 -!- ShadowIce [pyoro@unaffiliated/shadowice-x841044] has quit [Quit: Verlassend] 22:19 -!- wrtp [~rog@92.17.51.177] has quit [Quit: wrtp] 22:22 -!- photron [~photron@port-92-201-230-90.dynamic.qsc.de] has quit [Ping timeout: 258 seconds] 22:24 < ilovefairuz> http://stackoverflow.com/questions/tagged/go 22:24 < ilovefairuz> good stuff 22:39 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Ping timeout: 240 seconds] 22:41 -!- tvw [~tv@e176006098.adsl.alicedsl.de] has quit [Read error: Connection reset by peer] 22:45 -!- Davidian2024 [~Davidian1@cpe-98-27-192-193.neo.res.rr.com] has joined #go-nuts 22:47 -!- Davidian1024 [~Davidian1@cpe-98-27-192-193.neo.res.rr.com] has quit [Ping timeout: 260 seconds] 22:53 -!- jokerwww [~jokerwww@187.106.16.17] has joined #go-nuts 22:55 < jokerwww> I'm trying to wrap a c function call that return **SDL_Rect(null terminated array of SDL_Rect) but can't seem to do it because I don't know the size of the array. any ideas? This is the code I have so far: http://pastebin.com/YyEurCAC but it doesn't work because len(array) is alway zero.... 22:57 < raylu> my first intuition is that you should instead be looping until you hit a null 22:58 < jokerwww> raylu: yes, that's how I'd do it in C, but how do I loop over a pointer in go? 22:59 < raylu> i'd answer if i knew go :P sorry 23:00 < exch> I had a similar issue with a list of c strings. I've solved it, but if I remember right, i dod know the size of the list 23:00 < exch> lemme check 23:00 < exch> *did 23:02 < ilovefairuz> raylu: look in the pointer section of the 'unsafe' pkg 23:03 < ilovefairuz> jokerwww: ^ 23:03 -!- MizardX [~MizardX@unaffiliated/mizardx] has joined #go-nuts 23:04 < ilovefairuz> http://golang.org/src/pkg/unsafe/unsafe.go#L21 23:04 < exch> hmm yes. it's the reverse as well, but you can index the slab of memory using i as a counter. a pointer is always 8 bytes in size, so you can index each new rect at (arr + i*8).. continue looping until the value at (arr + i*8) is null 23:05 < jokerwww> ilovefairuz: I have looked at it, but I still couldn't find anything that would be similar to pointer arithmetic 23:05 < exch> http://github.com/jteeuwen/go-pkg-libvlc/blob/master/libvlc/instance.go#L14 this does the reverse with the string list 23:05 < exch> No sure if it'll help though 23:06 < jokerwww> exch: I think it will, it shows how to add pointers 23:06 < exch> ya. that works quite well 23:06 < exch> the casting is a bit of a headache though :p 23:07 < ilovefairuz> looks like the regex of pointers! 23:11 < ilovefairuz> wouldn't it have been shorter if defining the receiver only required the type (and not an identifier) and was referred to inside the func body with a keyworded 'this' ? 23:11 < exch> the net package needs an implementation for inet_ntop 23:12 < exch> ilovefairuz: yes I suppose it would have. But I guess that smelled too much like status quo OOP :) 23:12 < exch> I'm a rebel though, I always name the receiver 'this' 23:12 < exch> My syntax highlighter even has it highlighted as a keyword :p 23:12 < ilovefairuz> but it isn't, just being terse in the spirit of Go! 23:12 < exch> yessir! 23:13 < ilovefairuz> they should have keyworded this even if not used 23:16 -!- saracen [~saracen@81-5-140-201.dsl.eclipse.net.uk] has joined #go-nuts 23:16 -!- boscop_ [~boscop@f055210009.adsl.alicedsl.de] has left #go-nuts [] 23:16 -!- boscop [~boscop@f055210009.adsl.alicedsl.de] has joined #go-nuts 23:17 < boscop> when a function in go returns multiple values, can you pass them to another function call without having to create tmp variables? 23:18 < exch> yes, as long as the receiver has the same amount of arguments 23:18 < exch> and of the right type/order of course 23:19 -!- Adys [~Adys@unaffiliated/adys] has quit [Quit: I ♥ Unicode] 23:19 < saracen> Is it possible for me to get the size of a struct? it appears unsafe.SizeOf and binary.TotalSize both require an initialised variable of that struct type, I need it before I initialise a variable 23:19 < boscop> what if the function requires further arguments, can you just add them to the parameter list, next to the first function call? 23:20 < exch> boscop: not sure. Havent actually tried that yet 23:20 < ilovefairuz> boscop: try and tell us! 23:20 < exch> Incidentally, this won't work when you try to initialize a struct with literals: type F struct{ a, b, c int}; func foo() (int, int, int) {...}; f := F{ foo() } <- won't work 23:20 < boscop> ;) 23:21 < exch> saracen: not as far as I know 23:23 < saracen> :( 23:23 < boscop> http://steve-yegge.blogspot.com/2010/07/wikileaks-to-leak-5000-open-source-java.html 23:28 -!- bjarneh [~bjarneh@1x-193-157-193-186.uio.no] has joined #go-nuts 23:29 < exch> lol 23:32 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts 23:32 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined #go-nuts 23:33 < nickaugust> boscop: nice 23:39 < ilovefairuz> lol 23:41 < ilovefairuz> i was just fixing compile errors because of using non-capitalized methods 23:42 < ilovefairuz> the compiler error is a little cryptic whining about "non exported" stuff 23:55 -!- angasule [c80571ea@gateway/web/freenode/ip.200.5.113.234] has quit [Quit: Page closed] 23:55 < exch> yay. socket stuff sorted out. That was easier than I thought 23:56 -!- drhodes [~none@209-20-72-61.slicehost.net] has left #go-nuts [] 23:56 < exch> I cna now fetch the ip address for a local interface by it's name 23:56 -!- drhodes [~none@209-20-72-61.slicehost.net] has joined #go-nuts 23:57 -!- photron [~photron@port-92-201-230-90.dynamic.qsc.de] has joined #go-nuts 23:57 < drhodes> exch: have you seen the netchan package? 23:58 < exch> I've played with it a bit a while ago 23:58 < drhodes> I wonder if it has the one way restriction . 23:58 < drhodes> ^ still 23:59 < exch> Not sure. it did when I used it. about 2 months ago or so 23:59 < drhodes> but there's a fairly easy hack to get around that, anyways. netchan is great, one of my favorites. --- Log closed Thu Jul 29 00:00:05 2010