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

--- Log opened Thu Jun 30 00:00:54 2011
00:05 -!- hcatlin [~hcatlin@host86-161-237-3.range86-161.btcentralplus.com] has
joined #go-nuts
00:05 -!- hcatlin [~hcatlin@host86-161-237-3.range86-161.btcentralplus.com] has
quit [Changing host]
00:05 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has joined
#go-nuts
00:07 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has quit [Client
Quit]
00:10 -!- franciscosouza [~francisco@187.105.9.70] has quit [Read error:
Connection reset by peer]
00:11 -!- franciscosouza [~francisco@187.105.9.70] has joined #go-nuts
00:12 -!- noam [~noam@87.69.42.61.cable.012.net.il] has joined #go-nuts
00:22 -!- timetrap [~jkern@74.72.185.232] has quit [Quit: Lost terminal]
00:33 -!- |Craig| [~|Craig|@71-217-17-63.tukw.qwest.net] has joined #go-nuts
00:34 -!- GeertJohan [~Squarc@D978EC5D.cm-3-1d.dynamic.ziggo.nl] has quit [Quit:
Leaving.]
00:34 -!- |Craig| [~|Craig|@71-217-17-63.tukw.qwest.net] has quit [Changing host]
00:34 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
00:39 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has quit [Ping
timeout: 276 seconds]
00:48 -!- meling [~meling@cse-dhcp-10-91.ucsd.edu] has quit [Remote host closed
the connection]
00:55 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has joined
#go-nuts
00:56 -!- iant [~iant@67.218.104.187] has quit [Quit: Leaving.]
00:56 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has joined
#go-nuts
00:58 -!- debill [~ivan@95-55-24-237.dynamic.avangarddsl.ru] has quit [Ping
timeout: 252 seconds]
00:59 -!- franciscosouza [~francisco@187.105.9.70] has quit [Ping timeout: 252
seconds]
01:05 -!- message144 [~message14@pool-98-112-179-26.lsanca.fios.verizon.net] has
joined #go-nuts
01:05 -!- franciscosouza [~francisco@187.105.22.148] has joined #go-nuts
01:09 -!- message144 [~message14@pool-98-112-179-26.lsanca.fios.verizon.net] has
quit [Client Quit]
01:10 -!- tncardoso [~thiago@187.58.197.172] has quit [Quit: bye]
01:17 -!- ccc1 [~Adium@140.109.98.187] has joined #go-nuts
01:23 -!- jsj [~johan@78-70-253-105-no149.tbcn.telia.com] has quit [Remote host
closed the connection]
01:28 -!- chomp [~chomp@c-67-186-35-69.hsd1.pa.comcast.net] has quit [Quit:
Leaving]
01:39 -!- pvarga [~pvarga@pool-71-172-108-117.nwrknj.east.verizon.net] has joined
#go-nuts
01:40 < moraes> off-topic: anybody wants a google+ invite?
01:41 < skelterjohn> i think there must have been a large salvo fired
01:41 < skelterjohn> i've seen a few invitations (and received one)
01:43 < moraes> yeah people invited can invite, so now it is all opened
01:43 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has quit [Ping
timeout: 244 seconds]
01:44 < skelterjohn> hmm - strange thing with the new release
01:44 < skelterjohn> the last weekly had changed sort.StringArray to
sort.StringSlice
01:44 < brandini> moraes: I'd like one
01:44 < skelterjohn> and the new release has it as sort.StringArray again
01:44 < moraes> brandini, pm you mail
01:45 < brandini> sent
01:49 -!- slicslak [~slicslack@S010600212966ae5b.ed.shawcable.net] has joined
#go-nuts
01:52 < uriel> skelterjohn: I think they branched a while ago, which is
rather annoying
01:52 < skelterjohn> do you know why?
01:52 < uriel> as it makes the weekly release notes that are pointed to from
the 'release' release notes misleading (and plain wrong)
01:53 < uriel> adg: this is a problem ^^^^^^^^^^^^^
01:53 < skelterjohn> well, he should finish his cheerios soon
01:53 < uriel> or maybe release was based on a preveious weekly?
01:55 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has joined #go-nuts
01:55 < uriel> oh, has there been no weekly since the Stringarray change, I
think
01:55 < uriel> adg: sorry, disregard my stupid misinformed comment :)
01:56 < skelterjohn> is that right?
01:56 < skelterjohn> i thought i had upped to weekly
01:56 < uriel> I thought so too
01:56 < skelterjohn> http://goneat.org/pkg/sort/#StringSlice
01:56 < skelterjohn> is that at tip or weekly?
01:56 < uriel> tip, AFAIK
01:57 -!- ananamoose [~ajoe47@h227.35.25.72.ip.windstream.net] has joined #go-nuts
01:58 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has joined
#go-nuts
01:58 < skelterjohn> how do i pull from one branch to another in git?
02:02 < str1ngs> pull or merge?
02:05 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Quit: Leaving]
02:06 -!- tgall_foo [~tgall@206.9.88.154] has quit [Ping timeout: 276 seconds]
02:07 -!- kevin`` [~kevin@sank.pentabarf.net] has left #go-nuts []
02:10 < slicslak> what's the recommended keyword for searches: golang,
google go, just go?
02:11 < uriel> skelterjohn: http://go-lang.cat-v.org/go-search
02:11 < uriel> er s/ skelterjohn/ slicslak/
02:11 -!- kevlar [~kevlar@unaffiliated/eko] has quit [Quit: This computer has gone
to sleep]
02:17 -!- meling [~meling@99-10-121-218.lightspeed.sndgca.sbcglobal.net] has
joined #go-nuts
02:24 < slicslak> mmm, ok
02:24 < slicslak> thanks
02:25 -!- tgall_foo [~tgall@206.9.88.154] has joined #go-nuts
02:26 -!- ananamoose [~ajoe47@h227.35.25.72.ip.windstream.net] has quit [Quit:
Textual IRC Client: http://www.textualapp.com/]
02:31 -!- nannto [~nanto@pee5b70.tokyff01.ap.so-net.ne.jp] has joined #go-nuts
02:38 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has quit [Quit:
WeeChat 0.3.0]
02:42 -!- chickamade [~chickamad@115.78.135.244] has joined #go-nuts
02:49 -!- chickamade [~chickamad@115.78.135.244] has quit [Remote host closed the
connection]
02:49 -!- chickamade [~chickamad@115.78.135.244] has joined #go-nuts
02:50 -!- keithcascio [~keithcasc@nat/google/x-botqorpdavbulpum] has quit [Quit:
Leaving]
02:53 -!- benjack [~benjack@bb119-74-99-26.singnet.com.sg] has joined #go-nuts
02:54 -!- serialhex [~quassel@99-101-148-183.lightspeed.wepbfl.sbcglobal.net] has
joined #go-nuts
02:55 < serialhex> hey, does anyone know where i can find a big image of the
gopher?  i'm thinking of making it my bg but the one on the site is too small...
02:57 < skelterjohn> her name is glenda, i think
02:57 < skelterjohn> if that helps you google
02:57 < serialhex> hmm...  i'll try that
02:57 < serialhex> thanks!
02:57 < skelterjohn> or is that the rabbit
02:58 < skelterjohn>
http://www-public.it-sudparis.eu/~berger_o/go-uriel/img/gophercolor.png
02:59 < uriel> skelterjohn: no, this is glenda: http:/glenda.cat-v.org
02:59 < skelterjohn> right
02:59 < skelterjohn> i did manage to find your big gopher, though
02:59 < serialhex> that is a BIG image!!  thanks skelterjohn!!
03:00 < uriel> i think that is in the Go distribution
03:00 < uriel> yes, doc/gopher/
03:01 < serialhex> now why do they have to hide something like that on me!!
:P
03:03 < serialhex> now a more sereous go-related Q: is there any way to make
a variable-sized array?  or just declare a big array and do the slice thing??
03:04 < skelterjohn> slices are definitely what you want to do here
03:05 < serialhex> so...  what?  i can use slices alone??
03:05 < skelterjohn> you can get away with never using arrays (only using
slices) for a long time - only if you start to worry about memory layouts etc
would you care
03:05 < serialhex> really...
03:05 < skelterjohn> for instance, if you have a struct { x int; a []int }
03:06 < skelterjohn> that represents two pieces of distinct memory, if a
refers to anything
03:06 < skelterjohn> but if you have struct { x int; a [3]int }
03:06 < skelterjohn> that's just one piece of memory
03:06 < skelterjohn> with the array built into it
03:06 < skelterjohn> but really, you shouldn't need to worry about it for
most things
03:07 < serialhex> ok, so if i'm doing something memory intensive or
something and need to worry about KB's then use arrays
03:07 < skelterjohn> well, not exactly
03:07 < skelterjohn> you can't resize arrays - they are fixed at compile
time
03:07 < serialhex> but i can resize slices?
03:07 < skelterjohn> i guess it says a *little* space
03:07 < skelterjohn> yes you can resize slices
03:08 < serialhex> what about maps...  can i resize a map??
03:08 < skelterjohn> of course
03:08 < skelterjohn> you just keep adding elements
03:08 < serialhex> ooh...  sweet!
03:08 < serialhex> i know about -> | | <- that much C/C++, and i don't
like it for some of those reasons
03:09 < skelterjohn> is that a lot or a little?
03:09 < skelterjohn> i don't think i have the scale right
03:09 < serialhex> i've been learning ruby and it's *SOOOO* much nicer, but
*SOOOOOOOOOOOOO* much slower
03:10 < serialhex> umm, it's enough to get by the first 2 simesters of a CS
degree with :P
03:10 < skelterjohn> ruby is a bit feature rich
03:10 < skelterjohn> one of go's attractions is its lack of features
03:10 < skelterjohn> i heard once that the core team has to have a unanimous
vote in order to add a new language feature
03:10 < skelterjohn> i don't know if that is true or not
03:11 < serialhex> hmm, i wouldn't say that, personally i like its features,
at least what it has over C & java and the like (no semicolons!!  WHEEEE!!!  you
dont know how many errors i've made b/c of them!)
03:11 < serialhex> i heard the same thing...  i think in one of their vids
or something
03:13 < serialhex> ok, well i'm off to see if i can't solve this...  thanks
for the help!!  :D
03:13 < skelterjohn> np
03:16 < serialhex> (though, personally,
iFreakingHateCamelCaseItAlmostMakesEverythingUnFreakingReadable!!!)
03:17 < skelterjohn> ok
03:18 < skelterjohn> that would be a rather long variable name
03:20 -!- franciscosouza_ [~francisco@187.105.22.148] has joined #go-nuts
03:21 < serialhex> i know, that var name would be dumb in any language, i
still don't like camel case...  oh the things i do to keep in style :P
03:21 -!- franciscosouza [~francisco@187.105.22.148] has quit [Read error:
Connection reset by peer]
03:42 < exch>
as_opposed_to_________________underscores___________________________spanning___60______lines___hich_is_certainly______much_better
03:44 -!- magn3ts [~magn3ts@ip68-103-225-65.ks.ok.cox.net] has joined #go-nuts
03:44 <@adg> uriel, skelterjohn: releases aren't branched from the latest
weekly
03:45 <@adg> they're derived from a newish weekly that was stable (judged in
retrospect)
03:45 <@adg> if you want to track the release tag, then use release
03:45 <@adg> if you want to follow the weeklies, use weekly
03:45 <@adg> but don't do both, you'll just get confused
03:45 <@adg> the whole point of the releases is to provide a stable go
platform that requires updating less often
03:46 -!- Tv [~Tv@cpe-76-168-227-45.socal.res.rr.com] has quit [Ping timeout: 240
seconds]
03:47 <@adg> as the notes say, this particular release is based on
weekly.2011-06-09 with a couple of cherry-picked fixes
03:47 < exch> I'm guessing the two will nerge into a single package deal
when Go becomes stable enough that it doesnt require weekly updates?
03:47 <@adg> go will always have weeklies for the fringe dwellers
03:47 < exch> ah ok
03:47 -!- thomas___ [~thomas@50.55.235.119] has joined #go-nuts
03:48 <@adg> just pick one or the other and stick with it.  both have
tradeoffs
03:50 < serialhex> exch:
i_like_my_underscores_as_long_as_there_is_only_one_per_space (easier to read IMHO
& i *really* don't like python's __init__ and the like, very annoying!!)
03:51 <@adg> discussions over which style is better or worse are incredibly
tedious
03:51 <@adg> what is important is consistency, and we have that
03:51 < serialhex> i know, and i understand that...  i'm just lamenting that
you didnt choose *MY* favorite style :P
03:51 < exch> agreed
03:52 <@adg> serialhex: that's what i find tedious.  sorry :)
03:52 -!- franciscosouza [~francisco@187.105.22.148] has quit [Read error:
Connection reset by peer]
03:52 < serialhex> np, no more on the subject from me :D
03:52 -!- franciscosouza [~francisco@187.105.22.148] has joined #go-nuts
03:52 < serialhex> ...now i just gotta get used to it
03:54 <@adg> i give you 48 hours before you forget all about it ;)
03:54 < serialhex> what?  that i wont bring it up or
thatIGetUsedToCamelCase??  :P
03:55 < serialhex> btw, besides the tutorial & effective go from the site,
are there any other good resources someone can point me to for learning go?
03:56 < exch> mostly just the go source itself
03:56 < exch> worked for me anyways
03:56 < serialhex> or something like ruby's ruby-doc.org for all the methods
& such
03:57 < serialhex> hmm...  go to the source...  sounds spooky
03:57 < exch> http://golang.org/pkg/
03:58 -!- Phelps [~benphelps@2001:470:1f0f:2fa:223:dfff:fe86:95ae] has joined
#go-nuts
03:58 < exch> you can run that locally with $ godoc -http :8080
03:58 < exch> or just have it print to the console
03:58 < exch> eg: $ godoc http Request | less
03:58 < exch> thatll give you docs for http.Request
03:58 <@adg> serialhex: http://golang.org/doc/codelab/wiki/
03:59 <@adg> serialhex: http://golang.org/doc/codewalk/
03:59 <@adg> serialhex: the source code is a great resource also
03:59 <@adg> serialhex: also a meta-post http://nf.id.au/on-learning-go
03:59 < serialhex> i saw the codewalk, and that looks pretty cool (in fact i
wish more people/projects would do something like this)
04:01 <@adg> :)
04:01 < serialhex> though the /pkg/ thing dosn't seem to include everything,
like what kind of things can i do with a map??  theres no page for the map methods
04:02 -!- thomas___ [~thomas@50.55.235.119] has quit [Quit: leaving]
04:03 -!- Tekerson [~brenton@gir.tekerson.com] has joined #go-nuts
04:03 < serialhex> as for the blog post (i've read the first para, will read
the rest in a min) that's what i'm doing, i've got a problem i was trying to solve
in ruby (which i know passibly well) and the heat death of the universe will come
before my computer finishes running it :(
04:03 -!- vyom [~vyom@c-24-18-47-160.hsd1.wa.comcast.net] has quit [Remote host
closed the connection]
04:03 < exch> a map has no methods..  none of the builtin types do
04:04 < serialhex> so i decided to do it in go (which i really don't know)
and learn as i go :P
04:04 < exch> there are some functions that can operate on a map, slice or
chanel, but they are not specific to these types
04:04 < serialhex> really?  ...interesting
04:04 < exch> like append() for slices, close() for channels
04:04 < serialhex> ok...
04:04 < exch> len() and cap() for slices
04:05 < exch> those should be covered in the Go tutorial though
04:06 < serialhex> yeah, i read that you can't map.len() but you can
len(map) which is backwards from an OO pers.  but whatev, i can't remember the
reason i read but it made sense while i was reading it
04:06 < exch> at least I suspect they are.  I never read it
04:06 -!- rejb [~rejb@unaffiliated/rejb] has quit [Disconnected by services]
04:06 < serialhex> probably later on...  i'm like 0.5 way thru it, or
something
04:06 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
04:08 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has quit [Ping
timeout: 252 seconds]
04:14 -!- enferex [~enferex@users.757.org] has quit [Ping timeout: 240 seconds]
04:17 -!- enferex [~enferex@users.757.org] has joined #go-nuts
04:18 -!- Phelps [~benphelps@2001:470:1f0f:2fa:223:dfff:fe86:95ae] has quit [Quit:
Linkinus - http://linkinus.com]
04:22 -!- dropw [~dropw@IGLD-84-228-136-116.inter.net.il] has quit [Read error:
Connection reset by peer]
04:26 -!- franciscosouza [~francisco@187.105.22.148] has quit [Read error:
Connection reset by peer]
04:26 -!- franciscosouza [~francisco@187.105.22.148] has joined #go-nuts
04:33 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has joined #go-nuts
04:39 <@adg> serialhex: also, check out the spec
04:41 < serialhex> ok...  i'm watching a vid: "The Go Programming Language"
from that blog post you gave me, the guy said it was easy to read...  is that you
BTW??
04:42 < serialhex> adg ^
04:43 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has quit [Remote host
closed the connection]
04:49 -!- Andy_S [~kvirc@212.38.176.8] has quit [Ping timeout: 276 seconds]
04:49 -!- chickamade [~chickamad@115.78.135.244] has quit [Quit: chickamade]
04:56 -!- Phelps [~benphelps@2001:470:1f0f:2fa:223:dfff:fe86:95ae] has joined
#go-nuts
04:59 -!- fabled [~fabled@83.145.235.194] has joined #go-nuts
05:01 -!- Phelps [~benphelps@2001:470:1f0f:2fa:223:dfff:fe86:95ae] has quit [Quit:
Linkinus - http://linkinus.com]
05:03 -!- vmil86 [~vmil86@88.118.37.245] has joined #go-nuts
05:08 -!- manveru [~manveru@b08s28ur.corenetworks.net] has quit [Remote host
closed the connection]
05:10 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has joined #go-nuts
05:10 -!- mode/#go-nuts [+v iant] by ChanServ
05:11 -!- manveru [~manveru@b08s28ur.corenetworks.net] has joined #go-nuts
05:11 -!- Andy_S [~kvirc@222.129.41.248] has joined #go-nuts
05:14 <@adg> which video?
05:17 -!- sacho [~sacho@90.154.221.44] has joined #go-nuts
05:17 < serialhex> adg this one:
http://blip.tv/open-source-developers-conference/the-go-programming-language-4450722
05:18 <@adg> yeah that's me
05:18 < serialhex> his e-mail address is the same as your sn :P
05:18 < serialhex> cool!  well it's time for sleep (~1:30am here) nite!
05:19 <@adg> night
05:20 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:981:565a:463b:aff4] has joined
#go-nuts
05:20 -!- bakedb [~kel@cpc4-lea21-0-0-cust755.6-3.cable.virginmedia.com] has
joined #go-nuts
05:30 -!- moraes [~moraes@189.103.188.201] has quit [Ping timeout: 250 seconds]
05:33 -!- moraes [~moraes@189.103.188.201] has joined #go-nuts
05:34 -!- nannto [~nanto@pee5b70.tokyff01.ap.so-net.ne.jp] has quit [Quit:
Leaving...]
05:35 < pjz> anyone awake?
05:36 -!- jsj [~johan@78-70-253-105-no149.tbcn.telia.com] has joined #go-nuts
05:37 < jessta> yes
05:37 < pjz> is there a way to get godoc compiled into your code?
05:38 < pjz> I want to do the equivalent of python's print func.__doc__
05:39 -!- bakedb [~kel@cpc4-lea21-0-0-cust755.6-3.cable.virginmedia.com] has quit
[Ping timeout: 255 seconds]
05:41 < pjz> I'm using gorun, so os.Args[0] is the source code
05:41 < jessta> you could look at http://golang.org/pkg/go/doc/
05:41 < magn3ts> Is gd updated for the new exec?
05:41 < Tonnerre> Is there a known problem with putting []bytes with gob
encoded data into gob encoders?
05:42 < Tonnerre> I have corrupted data, i.e.  gobs that I cannot restore,
and I don't quite see where it comes from
05:44 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has quit [Ping
timeout: 255 seconds]
05:45 -!- iant [~iant@216.239.45.130] has joined #go-nuts
05:45 -!- mode/#go-nuts [+v iant] by ChanServ
05:50 -!- Tonnerre [tonnerre@netbsd/developer/tonnerre] has quit [Ping timeout:
240 seconds]
05:51 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has joined
#go-nuts
05:52 -!- vyom [~vyom@c-24-18-47-160.hsd1.wa.comcast.net] has joined #go-nuts
05:53 -!- smw [~stephen@unaffiliated/smw] has joined #go-nuts
05:56 -!- vyom [~vyom@c-24-18-47-160.hsd1.wa.comcast.net] has quit [Ping timeout:
244 seconds]
06:00 -!- Tonnerre [tonnerre@netbsd/developer/tonnerre] has joined #go-nuts
06:03 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has quit [Remote
host closed the connection]
06:04 -!- Project_2501 [~Marvin@82.84.92.43] has joined #go-nuts
06:06 -!- Andy_S [~kvirc@222.129.41.248] has quit [Ping timeout: 244 seconds]
06:09 -!- sacho_ [~sacho@90.154.221.44] has joined #go-nuts
06:10 -!- sacho [~sacho@90.154.221.44] has quit [Ping timeout: 255 seconds]
06:10 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
06:16 -!- squeese [~squeese@244.14.213.193.static.cust.telenor.com] has joined
#go-nuts
06:19 -!- Andy_S [~kvirc@222.129.41.248] has joined #go-nuts
06:20 -!- squeese [~squeese@244.14.213.193.static.cust.telenor.com] has quit
[Remote host closed the connection]
06:20 -!- squeese [~squeese@244.14.213.193.static.cust.telenor.com] has joined
#go-nuts
06:25 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 276 seconds]
06:38 -!- napsy [~luka@193.2.66.6] has joined #go-nuts
06:49 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:981:565a:463b:aff4] has quit
[Quit: Leaving.]
06:57 -!- niemeyer [~niemeyer@conference/canonical/x-dnzbphkwfxtqhdok] has joined
#go-nuts
07:03 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has quit [Quit:
WeeChat 0.3.0]
07:10 -!- bakedb [~kel@188.28.125.117.threembb.co.uk] has joined #go-nuts
07:15 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
07:18 -!- Jessica_Lily [~Jessica@unaffiliated/xray7224] has quit [Quit:
Leaving...]
07:37 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has quit [Remote
host closed the connection]
07:40 -!- neshaug [~oyvind@213.239.108.5] has quit [Quit: leaving]
07:40 -!- Slant [~scott@203.26.30.226] has joined #go-nuts
07:40 -!- neshaug [~oyvind@213.239.108.5] has joined #go-nuts
07:52 -!- niemeyer [~niemeyer@conference/canonical/x-dnzbphkwfxtqhdok] has quit
[Ping timeout: 240 seconds]
08:05 -!- niemeyer [~niemeyer@conference/canonical/x-qiukjrglztmtyzxh] has joined
#go-nuts
08:07 -!- Jessica_Lily [~Jessica@unaffiliated/xray7224] has joined #go-nuts
08:10 -!- pyrhho [~pyrhho@host-92-27-75-48.static.as13285.net] has joined #go-nuts
08:16 -!- jcao219 [~Jimmy@99.13.102.128] has joined #go-nuts
08:17 < jcao219> anyone tried Google+ yet?
08:21 < squeese> func Compare(a, b []byte) int { ...  // Is a also declared
as []byte, same as b?
08:22 < mpl> squeese: yes.
08:23 < squeese> ok, so its just a "fallthrough" to next type if none
specified?
08:24 < squeese> asking same question again it seems ;P
08:24 < squeese> mpl: thx
08:24 < mpl> np
08:25 -!- niemeyer [~niemeyer@conference/canonical/x-qiukjrglztmtyzxh] has quit
[Quit: Leaving]
08:27 -!- jcao219 [~Jimmy@99.13.102.128] has left #go-nuts ["Leaving"]
08:33 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has joined #go-nuts
08:39 -!- Phelps [~benphelps@2001:470:1f0f:2fa:223:dfff:fe86:95ae] has joined
#go-nuts
08:39 -!- foocraft_ [~ewanas@78.100.217.94] has quit [Excess Flood]
08:40 -!- foocraft_ [~ewanas@78.100.217.94] has joined #go-nuts
08:40 < Phelps> Anyone have any tips or reading resources for someone who
learned a loosely typed language first, that is now trying to grasp a language
like Go?
08:41 < zippoxer> python?
08:41 < Phelps> much worse
08:41 < zippoxer> ruby?  :P
08:41 < Phelps> even lower
08:41 < zippoxer> omg
08:41 < zippoxer> i can't guess.
08:41 < Phelps> php :(
08:41 < zippoxer> ohh.
08:42 < zippoxer> so you're going to use go for web development?
08:42 < Phelps> no, but I'm a professional php developer
08:42 < zippoxer> php is a bit c-like
08:42 < zippoxer> so it'll help you to better getting started with go
08:42 < Phelps> language structure and typing is just fine, that I get
08:42 < zippoxer> I think you should first of all
08:43 < zippoxer> choose a small project to develop
08:43 < Phelps> but types, structs, etc
08:43 < zippoxer> mm yeah
08:43 < Phelps> how hard would an IRC server be in Go ?
08:43 < zippoxer> lol it's pretty large project
08:44 < zippoxer> unless you're going to implement just the basics
08:44 < Phelps> just the basics
08:44 < zippoxer> you know the protocol?  :P
08:44 < Phelps> yeah, pretty much
08:44 < Phelps> Here is one I did in PHP
08:44 < Phelps> https://gist.github.com/1055876
08:44 < zippoxer> drop
08:45 < Phelps> its not too much, and it would use quite a bit of the
language basics
08:46 < zippoxer> nice, you know oop and almost everything that's needed
08:46 < zippoxer> to learn about structs
08:46 < zippoxer> golang.org has some
08:46 < zippoxer> documentation
08:46 < Phelps> yeah, I'm looking at the specs, but thats not helping much
:/
08:47 < Phelps> golang.org/doc/go_spec.html
08:47 < zippoxer> specs are not tutorial :P
08:47 < zippoxer> if you don't know the basics
08:47 < zippoxer> you'll be lost there
08:47 < zippoxer> wait a sec
08:47 < zippoxer> http://golang.org/doc/go_tutorial.html
08:48 < zippoxer> when you define a struct, you basically put all the
properties (variables in php) you want it to have
08:48 < zippoxer> functions you define outside of it
08:49 < Phelps> and using a struct as a type ?
08:49 < zippoxer> what do you mean?  to initialize with new?
08:49 < Phelps> https://gist.github.com/1055885
08:49 < Phelps> say I want to do
08:50 < Phelps> idk how to show this in C or Go
08:50 < Phelps> :(
08:50 < zippoxer> show in php I was professional too :P
08:50 < zippoxer> forgot some but...
08:50 < Phelps> well, i guess the result would be a better start
08:51 < Phelps> Color.red
08:51 < Phelps> Color.blue
08:51 < Phelps> etc.
08:51 < Phelps> or a class static in PHP
08:51 < zippoxer> wait what do you expect to do with the func color() ?
08:51 < Phelps> class Color { static $red = "FF0000"; }
08:52 < mpl> Phelps: I'm having some trouble understanding what's your
problem.  if you're a professional coder, whatever the language.  what's stopping
you from learning another?
08:52 < Phelps> PHP is so loosely typed, and I have done only that, learning
something like C or Go is quite a challenge
08:53 < Phelps> i know Perl and Python almost as well, and learned those
just fine
08:53 < zippoxer> the truth is that it's not recommended to learn Go before
any statically typed language
08:53 < zippoxer> because there's no any go tutorial from scratch
08:53 < mpl> that's rubbish imho.
08:53 < mpl> anyone can understand the difference between an int or a type
08:54 < mpl> s/type/string/
08:54 < zippoxer> it's not just about it.
08:54 < mpl> sure, but that's a start.
08:54 < Phelps> I have never HAD to do that before though
08:54 < mpl> Phelps: then just start and see how it goes :)
08:54 < Phelps> i tried, and thats why I'm here
08:54 < mpl> seriously, if you've been programming for years, you must be
used to learning new stuff, techniques etc...
08:55 < zippoxer> okay so I opened a document, paste some codes that you
know there:
https://docs.google.com/document/d/1tjKIsK9sa5gwkCuitKHPfzWzq9tlgMBch1tT2S7G64c/edit?hl=en_US&authkey=CPmF_bwP
08:55 -!- Slant [~scott@203.26.30.226] has quit [Quit: Slant]
08:55 < Phelps> pretty much only web languages though, I have never learned
a compiled language
08:56 < Phelps> the Go that I have so far zippoxer?
08:56 < zippoxer> yeah :)
08:56 < mpl> Phelps: in practicality that means you'll have to run make
instead of clicking reload in your browser.  is that so frightening?  :)
08:56 < zippoxer> not frightening, but there's no much support for beginners
in the go area
08:56 < zippoxer> so he came to ask questions here..
08:57 < mpl> sure, that's the right thing to do.  I just think he shouldn't
worry that much and I think he'll get a hand of it quickly.
08:58 -!- GeertJohan [~Squarc@clal-1-127.eduroam.inholland.nl] has joined #go-nuts
08:58 < mpl> anyway, have fun :)
09:00 -!- yogib [~kaiser@131.234.59.53] has joined #go-nuts
09:01 -!- sahid [~sahid@LNeuilly-152-21-22-10.w193-253.abo.wanadoo.fr] has joined
#go-nuts
09:05 -!- squeese [~squeese@244.14.213.193.static.cust.telenor.com] has quit
[Remote host closed the connection]
09:09 < GeertJohan> morning everyone :)
09:22 -!- [dmp] [~dennis@unaffiliated/dmp/x-546784] has quit [Ping timeout: 258
seconds]
09:23 -!- icy [~icy@lighttpd/icy] has quit [Ping timeout: 258 seconds]
09:23 -!- icy [~icy@singularity.cryosphere.de] has joined #go-nuts
09:23 -!- icy [~icy@singularity.cryosphere.de] has quit [Changing host]
09:23 -!- icy [~icy@lighttpd/icy] has joined #go-nuts
09:28 -!- vyom [~vyom@c-24-18-47-160.hsd1.wa.comcast.net] has joined #go-nuts
09:33 -!- vyom [~vyom@c-24-18-47-160.hsd1.wa.comcast.net] has quit [Ping timeout:
255 seconds]
09:33 -!- Slant [~scott@203.26.30.226] has joined #go-nuts
09:48 -!- Slant [~scott@203.26.30.226] has quit [Quit: Slant]
09:52 -!- hcatlin [~hcatlin@host86-161-237-3.range86-161.btcentralplus.com] has
joined #go-nuts
09:52 -!- hcatlin [~hcatlin@host86-161-237-3.range86-161.btcentralplus.com] has
quit [Changing host]
09:52 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has joined
#go-nuts
09:52 < sahid> morning :)
09:54 -!- [dmp] [~dennis@unaffiliated/dmp/x-546784] has joined #go-nuts
09:55 -!- Slant [~scott@203.26.30.226] has joined #go-nuts
10:02 -!- ronnyy [~quassel@p4FF1C5E2.dip0.t-ipconnect.de] has joined #go-nuts
10:10 -!- squeese [~squeese@cm-84.209.17.156.getinternet.no] has joined #go-nuts
10:13 -!- gnuvince [~vince@ip-96-43-233-174.dsl.netrevolution.com] has quit [Ping
timeout: 246 seconds]
10:13 -!- Slant [~scott@203.26.30.226] has quit [Quit: Slant]
10:17 -!- jsj [~johan@78-70-253-105-no149.tbcn.telia.com] has quit [Ping timeout:
255 seconds]
10:17 -!- jsj [~johan@78-70-253-105-no149.tbcn.telia.com] has joined #go-nuts
10:19 -!- ananamoose [~ajoe47@h227.35.25.72.ip.windstream.net] has joined #go-nuts
10:19 -!- tncardoso [~thiago@150.164.7.231] has joined #go-nuts
10:20 -!- gnuvince [~vince@ip-96-43-233-174.dsl.netrevolution.com] has joined
#go-nuts
10:31 -!- stalled [~stalled@unaffiliated/stalled] has quit [Ping timeout: 252
seconds]
10:32 -!- ronnyy [~quassel@p4FF1C5E2.dip0.t-ipconnect.de] has quit [Remote host
closed the connection]
10:39 -!- alehorst [~alehorst@186.212.213.85] has joined #go-nuts
10:40 -!- stalled [~stalled@unaffiliated/stalled] has joined #go-nuts
10:46 -!- ccc1 [~Adium@140.109.98.187] has quit [Quit: Leaving.]
10:47 -!- Slant [~scott@203.26.30.226] has joined #go-nuts
10:52 -!- tvw [~tv@212.79.9.150] has joined #go-nuts
10:53 -!- Project_2501 [~Marvin@82.84.92.43] has quit [Read error: Connection
reset by peer]
10:53 -!- Project_2501 [~Marvin@82.84.92.43] has joined #go-nuts
10:57 -!- virtualsue [~chatzilla@nat/cisco/x-jegxvoxxagegpkio] has joined #go-nuts
10:59 -!- Slant [~scott@203.26.30.226] has quit [Quit: Slant]
10:59 -!- sunfmin [~sunfmin@125.119.3.55] has joined #go-nuts
11:14 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
11:36 -!- gnuvince|work [8e544424@gateway/web/freenode/ip.142.84.68.36] has joined
#go-nuts
11:37 -!- jsj [~johan@78-70-253-105-no149.tbcn.telia.com] has quit [Remote host
closed the connection]
11:39 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
11:48 -!- alanliang [~yogafire@c-71-204-189-190.hsd1.ca.comcast.net] has quit
[Ping timeout: 240 seconds]
11:49 -!- justinlilly [justinlill@70.32.34.100] has quit [Ping timeout: 260
seconds]
11:49 -!- tncardoso [~thiago@150.164.7.231] has quit [Quit: bye]
11:54 -!- lucian [~lucian@78-86-217-168.zone2.bethere.co.uk] has joined #go-nuts
11:57 -!- justinlilly [justinlill@70.32.34.100] has joined #go-nuts
12:03 -!- tux21b [~christoph@chello080109196184.3.graz.surfer.at] has quit [Ping
timeout: 255 seconds]
12:04 -!- stalled [~stalled@unaffiliated/stalled] has quit [Ping timeout: 252
seconds]
12:04 -!- alanliang [~yogafire@c-71-204-189-190.hsd1.ca.comcast.net] has joined
#go-nuts
12:11 -!- photron [~photron@port-92-201-30-175.dynamic.qsc.de] has joined #go-nuts
12:13 -!- franciscosouza [~francisco@187.105.22.148] has quit [Quit:
franciscosouza]
12:13 -!- stalled [~stalled@unaffiliated/stalled] has joined #go-nuts
12:15 -!- virtualsue [~chatzilla@nat/cisco/x-jegxvoxxagegpkio] has quit [Ping
timeout: 246 seconds]
12:28 -!- pvarga [~pvarga@pool-71-172-108-117.nwrknj.east.verizon.net] has quit
[Quit: pvarga]
12:29 -!- virtualsue [~chatzilla@nat/cisco/x-zmohkhzftjvdbzfm] has joined #go-nuts
12:31 -!- flaguy48 [~gmallard@user-0c6s350.cable.mindspring.com] has left #go-nuts
[]
12:32 -!- vyom [~vyom@c-24-18-47-160.hsd1.wa.comcast.net] has joined #go-nuts
12:35 < xyproto> Hi, I have written a function in 64-bit assembly that I
wish to call from Go. It works when I call it from C. How is it done?
12:36 < xyproto> As I understand, cgo, import "C" and "·" are keywords here.
12:36 < xyproto> I've searched the web and stackoverflow.
12:37 < xyproto> I have hello.asm with a hello function that says "hello
world" and works from C.
12:38 < xyproto> And a main.go that wants to call hello().  I've tried
import "C" and C.hello(), but I don't know how to use cgo.  "cgo hello.o main.go"
gives "unable to find value of constant C.hello" and "call of non-function
C.hello".
12:39 < exch> if you write it in Go's asm flavour, you can add it to you go
project with the AFILES var in a makefile
12:39 < xyproto> exch: ah, nice, thanks!  I'll look into that.
12:40 < xyproto> exch: I was hoping I could use the mid-dot somehow, like in
http://golang.org/src/pkg/runtime/cgocall.h, but nasm does not like · at all.
12:40 < exch> you specify the Hello() signature in your go code, but without
the implementation.  It'll be linked to the asm version
12:40 -!- photron [~photron@port-92-201-30-175.dynamic.qsc.de] has quit [Quit:
Leaving]
12:41 < exch> I think the bytes and syscall pakages use the same mechanism.
You couldcheck out their source for info
12:41 < xyproto> exch: thanks!
12:41 < ww> xyproto: whilst it is probably best to use go's asm flavour, if
you want to use cgo you'll need to make a c-style header file to include that has
the declaration for the function
12:41 < ww> then C.hello() should work
12:42 < xyproto> I see that
http://golang.org/src/pkg/syscall/asm_linux_amd64.s uses functions that start with
·, I might try something similar.
12:42 < xyproto> ww: I see, I might try the header-approach.
12:42 < ww> the main reason to use go's asm instead of cgo is that the
calling convention is cheaper/simpler
12:43 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has joined
#go-nuts
12:44 -!- franciscosouza [~francisco@201.7.186.67] has joined #go-nuts
12:45 < xyproto> Would it be possible to use gccgo for this, as well?
12:47 < ww> gccgo should be able to call the asm functions in the same way
as c so that should work well enough
12:47 < xyproto> And, furthermore, would it be possible to just hexedit the
.o file from nasm, to name the function ·ello instead of hello?  :)
12:47 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has quit [Ping
timeout: 258 seconds]
12:47 < xyproto> It would be great to have the combination of nasm and go,
without going through C.
12:47 < ww> wouldn't want to try mixing the gccgo and regular go object
files though...  no idea what would happen if you tried but it robably wouldn't
wokr
12:48 < xyproto> ww: how about using gccgo instead of regular go?
12:48 -!- bakedb [~kel@188.28.125.117.threembb.co.uk] has quit [Read error:
Connection timed out]
12:49 < ww> that would probably work just fine, though i've never tried that
myself
12:49 -!- bakedb [~kel@188.28.125.117.threembb.co.uk] has joined #go-nuts
12:49 < xyproto> ww: installing gccgo-svn now, excited to find out :)
12:49 < xyproto> ww: I bet it works.
12:50 < xyproto> build failed, I guess the state of gccgo-svn is in flux
12:51 -!- virtualsue [~chatzilla@nat/cisco/x-zmohkhzftjvdbzfm] has quit [Ping
timeout: 240 seconds]
12:52 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has quit [Remote
host closed the connection]
12:53 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has joined #go-nuts
12:53 -!- noam [~noam@87.69.42.61.cable.012.net.il] has quit [Ping timeout: 246
seconds]
12:56 < xyproto> whoo!  It worked!  The function has to be labled
go.main.hello in hello.asm, then the function signature has to be added to
main.go, then "gccgo hello.o main.go" does the trick.
12:56 < exch> cool :)
12:57 -!- sniper506th [~sniper506@rrcs-70-61-192-18.midsouth.biz.rr.com] has
joined #go-nuts
13:01 < ww> xyproto: that took you exactly five minutes!  not bad i'd say :P
13:01 -!- rejb [~rejb@unaffiliated/rejb] has quit [Quit: .]
13:03 -!- th0re [~thre@ip-178-200-116-109.unitymediagroup.de] has joined #go-nuts
13:04 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has quit [Read error:
Connection reset by peer]
13:06 < xyproto> I uploaded the example for using Go and 64-bit assembly
with NASM here, if anyone is interested:
http://www.roboticoverlords.org/gonasm/gonasm.tgz
13:07 -!- th0re [~thre@ip-178-200-116-109.unitymediagroup.de] has quit [Remote
host closed the connection]
13:07 < xyproto> ww: :)
13:07 -!- th0re [~thre@ip-178-200-116-109.unitymediagroup.de] has joined #go-nuts
13:08 < gnuvince|work> Does Go have a package to generate temporary file
names?
13:10 -!- Fish [~Fish@exo3753.pck.nerim.net] has quit [Quit: So Long, and Thanks
for All the Fish]
13:10 < pjz> syscall.GetTempPath() ?
13:10 -!- th0re [~thre@ip-178-200-116-109.unitymediagroup.de] has quit [Read
error: Connection reset by peer]
13:10 -!- th0re_ [~thre@tmo-110-128.customers.d1-online.com] has joined #go-nuts
13:12 < xyproto> gnuvince|work: yes, there is a function in one of the
standard packages, I can find it
13:14 < xyproto> gnuvince|work: io.ioutil.TempFile
13:14 < xyproto> gnuvince|work: http://gonuts.org/pkg/io/ioutil/#TempFile
13:14 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has joined
#go-nuts
13:14 < gnuvince|work> xyproto: ah, thanks, I hadn't look at that package.!
13:18 -!- pharris [~Adium@rhgw.opentext.com] has joined #go-nuts
13:19 -!- araujo [~araujo@190.73.44.29] has joined #go-nuts
13:19 -!- araujo [~araujo@190.73.44.29] has quit [Changing host]
13:19 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts
13:22 -!- robteix [~robteix@nat/intel/x-ysqenxyadvnkkrxi] has joined #go-nuts
13:23 < jessta> tempfile() does sound like something that would be under os
13:30 -!- Fish [~Fish@exo3753.pck.nerim.net] has joined #go-nuts
13:31 -!- th0re_ [~thre@tmo-110-128.customers.d1-online.com] has quit [Quit: Der
weg zur erkenntniss ist der richtige.]
13:34 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
13:36 -!- GeertJohan [~Squarc@clal-1-127.eduroam.inholland.nl] has quit [Read
error: Connection reset by peer]
13:37 -!- GeertJohan [~Squarc@clal-1-127.eduroam.inholland.nl] has joined #go-nuts
13:44 -!- chickamade [~chickamad@27.3.2.189] has joined #go-nuts
13:45 -!- hargettp [~phil@dhcp-161.mirrorimage.net] has joined #go-nuts
13:47 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has quit [Quit:
hcatlin]
13:50 -!- chomp [~chomp@dap-209-166-184-50.pri.tnt-3.pgh.pa.stargate.net] has
joined #go-nuts
13:54 -!- chickamade [~chickamad@27.3.2.189] has quit [Read error: Connection
reset by peer]
13:54 -!- chickamade [~chickamad@27.3.2.189] has joined #go-nuts
13:55 -!- chickamade [~chickamad@27.3.2.189] has quit [Client Quit]
13:55 -!- virtualsue [~chatzilla@nat/cisco/x-dytzkwgmxjnbtcif] has joined #go-nuts
13:55 -!- zippoxer [~zippoxer@109.67.200.156] has quit [Ping timeout: 276 seconds]
13:56 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has joined #go-nuts
13:59 -!- robteix [~robteix@nat/intel/x-ysqenxyadvnkkrxi] has quit [Ping timeout:
244 seconds]
14:02 -!- ArgonneIntern [~gauge@anlextwls093-157.wl.anl-external.org] has joined
#go-nuts
14:09 -!- tncardoso [~thiago@187.20.195.36] has joined #go-nuts
14:16 -!- fabled [~fabled@83.145.235.194] has quit [Quit: Ex-Chat]
14:19 -!- meling [~meling@99-10-121-218.lightspeed.sndgca.sbcglobal.net] has quit
[Remote host closed the connection]
14:20 -!- Nach [~nach@93-173-141-96.bb.netvision.net.il] has joined #go-nuts
14:22 -!- Uncle_archie [8eb13e4a@gateway/web/freenode/ip.142.177.62.74] has joined
#go-nuts
14:22 -!- GeertJohan [~Squarc@clal-1-127.eduroam.inholland.nl] has quit [Quit:
Leaving.]
14:25 -!- Nach [~nach@93-173-141-96.bb.netvision.net.il] has left #go-nuts
["Konversation terminated!"]
14:25 < skelterjohn|work> morning
14:27 -!- cafesofie [~cafesofie@pool-74-101-77-36.nycmny.east.verizon.net] has
joined #go-nuts
14:28 -!- ArgonneIntern [~gauge@anlextwls093-157.wl.anl-external.org] has quit
[Ping timeout: 260 seconds]
14:28 < chomp> howdy
14:29 < pjz> is there a programmatic interface to godoc ?
14:29 < pjz> ie.  if I have a foo.go file and I want my prog to get the doc
for function foo.bar, how do I do that?  the godoc module was...  unhelpful.
14:29 < chomp> there is the go.doc package in stdlib
14:30 < chomp> or rather go/doc
14:30 < exch> http://golang.org/pkg/go/doc/
14:30 < exch> it only works on parsed sourcecode though
14:30 < pjz> right..  how do I parse the sourcecode?
14:31 < exch> with go/parser and go/ast etc
14:31 < str1ngs> pjz: godoc -path=.  <Function>
14:31 < chomp> str1ngs, programmatic interface
14:31 < skelterjohn|work> well, could write a scraper i guess :)
14:32 < chomp> seems that all the necessary tools are there and easy enough
to use :)
14:32 -!- tncardoso [~thiago@187.20.195.36] has quit [Quit: bye]
14:32 < chomp> actually i was thinking of writing a simple web server that
would scrape go packages from the dashboard and serve up docs
14:33 < chomp> along with tip, release, and weekly docs, because why not.
14:33 -!- sacho [~sacho@90.154.221.44] has quit [Ping timeout: 244 seconds]
14:33 < skelterjohn|work> that'd be pretty useful - though i'd suggest lazy
evaluation
14:34 < chomp> aye that would make sense
14:34 -!- ancientlore [~ancientlo@63.76.22.10] has joined #go-nuts
14:35 < skelterjohn|work> it would also be sweet if it used the
github.com/nsf/gortfm format O:-)
14:35 < pjz> why does go.parser.ParseFile take a *token.FileSet ?
14:35 -!- sniper506th [~sniper506@rrcs-70-61-192-18.midsouth.biz.rr.com] has quit
[Read error: Operation timed out]
14:36 -!- cafesofie [~cafesofie@pool-74-101-77-36.nycmny.east.verizon.net] has
quit [Remote host closed the connection]
14:36 < skelterjohn|work> pjz: if you want to parse multiple files, the
token.FileSet stuff helps keep track of where in each file each token is
14:37 < skelterjohn|work> you can just give it an empty one each time if you
don't care
14:37 < skelterjohn|work> but if you do, you won't be able to recreate the
file from the ast, since it won't know where the newlines go, extra space, etc
14:37 < skelterjohn|work> (had to learn all about that with my refactoring
experiment)
14:38 -!- cafesofie [~cafesofie@pool-74-101-77-36.nycmny.east.verizon.net] has
joined #go-nuts
14:38 < pjz> skelterjohn|work: how do I make an empty one?  import
"go/token" ; go.token.NewFileSet()?
14:38 < skelterjohn|work> yes
14:38 < skelterjohn|work> token.NewFileSet(), in go code
14:38 < skelterjohn|work> if you import "go/token" the package you get has
the name "token"
14:39 < skelterjohn|work> you can also just create one, and reuse it each
time you parse a file
14:40 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 250 seconds]
14:44 -!- sniper506th [~sniper506@rrcs-70-61-192-18.midsouth.biz.rr.com] has
joined #go-nuts
14:45 -!- pjacobs [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has
joined #go-nuts
14:48 -!- hargettp [~phil@dhcp-161.mirrorimage.net] has quit [Quit: leaving]
14:48 < pjz> skelterjohn|work: what's the mode argument ?
14:48 * pjz can't find docc on it
14:48 < skelterjohn|work> it's in go/parser
14:48 -!- hargettp [~phil@dhcp-161.mirrorimage.net] has joined #go-nuts
14:48 < skelterjohn|work> http://golang.org/pkg/go/parser/#Constants
14:49 < pjz> ah.  I see.
14:49 < skelterjohn|work> since you want the godocs, i'd suggest using
parser.ParseComments as your mode
14:49 < skelterjohn|work> and none of the others
14:50 -!- fabled [~fabled@83.145.235.194] has joined #go-nuts
14:54 -!- Slant [~scott@124-148-144-228.dyn.iinet.net.au] has joined #go-nuts
14:57 -!- micromatikal [~quassel@96-42-218-124.dhcp.roch.mn.charter.com] has quit
[Ping timeout: 240 seconds]
14:58 -!- johanlundberg [hidden-use@194-236-28-194.customer.telia.com] has joined
#go-nuts
14:58 -!- johanlundberg [hidden-use@194-236-28-194.customer.telia.com] has left
#go-nuts []
15:01 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has quit [Ping
timeout: 264 seconds]
15:04 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has joined
#go-nuts
15:05 < pjz> skelterjohn|work: http://pastebin.com/3d89PaaM
15:06 < skelterjohn|work> that's some code, alright
15:06 < pjz> skelterjohn|work: not quite as nice as print("main doc is: " +
main.__doc__), but servicable, I guess
15:07 < pjz> skelterjohn|work: or is there a better way than that?  some
reflection or something I didn't find?
15:07 < skelterjohn|work> what you have there seems straightforward
15:07 < skelterjohn|work> i haven't used the reflect
15:08 * pjz likes to make his code self-documenting, but docs are less useful if
you can't show them to the user
15:08 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has quit [Ping
timeout: 240 seconds]
15:09 < skelterjohn|work> i mean, i haven't used the doc package.  not
reflect.
15:09 < pjz> I dunno about striaghtforward.  the list of imports got kinda
long.
15:09 < skelterjohn|work> nothing wrong with that
15:10 < skelterjohn|work> maybe try nil as the file set
15:10 < pjz> is there the equivalent of __file__ or __line__ ?
15:10 < skelterjohn|work> like, a macro?  don't think so
15:11 < pjz> whoa.  nil as the fil set...  doesn't work.
15:11 < skelterjohn|work> not surprised
15:11 < pjz> runtime panic, nil pointer deref, etc etc.
15:11 -!- Sep102 [~Sep102@c-71-227-179-131.hsd1.wa.comcast.net] has quit [Read
error: Connection reset by peer]
15:12 -!- Sep102 [~Sep102@c-71-227-179-131.hsd1.wa.comcast.net] has joined
#go-nuts
15:13 < pharris> pjz: The equivalent of __file__ and __line__ is
runtime.Caller(0)
15:13 < pjz> pharris: ah, thanks.
15:14 -!- `micro` [~quassel@96-42-218-124.dhcp.roch.mn.charter.com] has joined
#go-nuts
15:17 * pjz wonders if he could write func (f *func) DocString() string { ..  } to
return a random function's docstrings.  mm, likely not because of closures.
15:17 -!- tvw [~tv@212.79.9.150] has quit [Remote host closed the connection]
15:17 < skelterjohn|work> you mean func DocString(f *func) ...  ?
15:18 < skelterjohn|work> this isn't a runtime kind of thing - you need to
do source analysis
15:18 < pjz> skelterjohn|work: yeah
15:18 < pjz> skelterjohn|work: well, probably, yes.  presuming that
docstrings are stored in the data section or something.
15:18 < skelterjohn|work> you could do func DocString(pkg, name string) ....
15:18 -!- `micro` [~quassel@96-42-218-124.dhcp.roch.mn.charter.com] has quit [Ping
timeout: 255 seconds]
15:18 < pjz> skelterjohn|work: right, that would be pretty decent.
15:19 < skelterjohn|work> it would involve importers and not be trivial
15:19 -!- Nisstyre [~nisstyre@109.74.204.224] has quit [Ping timeout: 255 seconds]
15:19 < pjz> skelterjohn|work: nothing about this has been trivial :)
15:20 -!- `micro` [~quassel@96-42-218-124.dhcp.roch.mn.charter.com] has joined
#go-nuts
15:29 -!- photron [~photron@port-92-201-30-175.dynamic.qsc.de] has joined #go-nuts
15:29 -!- olivier__ [~chatzilla@AGrenoble-152-1-42-57.w82-122.abo.wanadoo.fr] has
joined #go-nuts
15:32 < olivier__> where did the Search box on golang.org go ? is it r58
related ?
15:32 -!- GeertJohan [~Squarc@ip4da06866.direct-adsl.nl] has joined #go-nuts
15:34 -!- rael_wiki [~chatzilla@unaffiliated/rael-wiki/x-8420294] has joined
#go-nuts
15:34 < rael_wiki> hello
15:36 < rael_wiki> is it possible to write on a network interface using the
same semantic of channels?
15:36 <+iant> not precisely, but see the netchan package
15:36 < rael_wiki> thanks
15:37 -!- virtualsue [~chatzilla@nat/cisco/x-dytzkwgmxjnbtcif] has quit [Ping
timeout: 250 seconds]
15:40 -!- napsy [~luka@193.2.66.6] has quit [Read error: Operation timed out]
15:41 -!- virtualsue [~chatzilla@nat/cisco/x-vvyleynavidgbhpe] has joined #go-nuts
15:46 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
15:47 < skelterjohn|work> anyone here use gocheck?
15:53 -!- chomp [~chomp@dap-209-166-184-50.pri.tnt-3.pgh.pa.stargate.net] has quit
[Quit: Leaving]
15:57 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
15:59 -!- sunfmin [~sunfmin@125.119.3.55] has quit [Quit: sunfmin]
16:04 -!- zippoxer [~zippoxer@109.67.200.156] has joined #go-nuts
16:06 -!- sniper506th [~sniper506@rrcs-70-61-192-18.midsouth.biz.rr.com] has quit
[Quit: Leaving...]
16:07 -!- sacho [~sacho@79-100-170-94.btc-net.bg] has joined #go-nuts
16:10 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has quit [Remote host
closed the connection]
16:18 -!- sahid [~sahid@LNeuilly-152-21-22-10.w193-253.abo.wanadoo.fr] has quit
[Quit: Ex-Chat]
16:22 -!- Slant [~scott@124-148-144-228.dyn.iinet.net.au] has quit [Quit: Slant]
16:24 -!- Uncle_archie [8eb13e4a@gateway/web/freenode/ip.142.177.62.74] has quit
[Quit: Page closed]
16:26 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
16:26 -!- awidegreen [~quassel@h-170-226.A212.priv.bahnhof.se] has joined #go-nuts
16:26 -!- franciscosouza [~francisco@201.7.186.67] has quit [Quit: franciscosouza]
16:28 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has joined #go-nuts
16:35 -!- robteix [~robteix@192.55.54.36] has joined #go-nuts
16:43 -!- tncardoso [~thiago@187.20.195.36] has joined #go-nuts
16:51 -!- cafesofie [~cafesofie@pool-74-101-77-36.nycmny.east.verizon.net] has
quit [Remote host closed the connection]
16:53 -!- robteix [~robteix@192.55.54.36] has quit [Ping timeout: 255 seconds]
16:53 -!- jonedoe [~chatzilla@AGrenoble-152-1-42-57.w82-122.abo.wanadoo.fr] has
quit [Remote host closed the connection]
16:55 -!- pyrhho [~pyrhho@host-92-27-75-48.static.as13285.net] has quit [Quit:
pyrhho]
16:56 -!- sniper506th [~sniper506@rrcs-70-61-192-18.midsouth.biz.rr.com] has
joined #go-nuts
16:56 -!- pyrhho [~pyrhho@host-92-27-75-48.static.as13285.net] has joined #go-nuts
16:57 -!- pyrhho [~pyrhho@host-92-27-75-48.static.as13285.net] has quit [Client
Quit]
16:58 -!- chomp [~chomp@dap-209-166-184-50.pri.tnt-3.pgh.pa.stargate.net] has
joined #go-nuts
16:59 -!- robteix [~robteix@192.55.54.36] has joined #go-nuts
17:07 -!- sniper506th [~sniper506@rrcs-70-61-192-18.midsouth.biz.rr.com] has quit
[Quit: Computer has gone to sleep.]
17:08 -!- phao [~phao@pontenova.dpi.ufv.br] has joined #go-nuts
17:08 -!- phao [~phao@pontenova.dpi.ufv.br] has left #go-nuts []
17:09 -!- bakedb [~kel@188.28.125.117.threembb.co.uk] has quit [Ping timeout: 240
seconds]
17:13 -!- cafesofie [~cafesofie@pool-74-101-77-36.nycmny.east.verizon.net] has
joined #go-nuts
17:13 -!- gmilleramilar [~gmiller@pool-74-101-133-165.nycmny.fios.verizon.net] has
joined #go-nuts
17:14 < gmilleramilar> how do you invoke a method using reflection?
17:14 < gmilleramilar> I have the reflect.Method object, but how do you ...
make it go?
17:18 < skelterjohn|work> it has a field "Func", which is a Value type
17:18 < skelterjohn|work> and values have a Call method
17:18 -!- serialhex [~quassel@99-101-148-183.lightspeed.wepbfl.sbcglobal.net] has
left #go-nuts ["http://quassel-irc.org - Chat comfortably.  Anywhere."]
17:18 < skelterjohn|work> the first parameter probably needs to be the
receiver
17:18 < gmilleramilar> ah, cool.  thanks.
17:19 < skelterjohn|work> oh wait
17:19 < skelterjohn|work> Value.Method
17:19 < skelterjohn|work> if you have a value representing the thing you
want to use as a receiver, call its Method() method, and use it as a function
17:20 < skelterjohn|work> but *don't* provide the receiver as the first
argument
17:20 < skelterjohn|work> http://golang.org/pkg/reflect/#Value.Method
17:20 -!- exch [~blbl@ip34-181-209-87.adsl2.static.versatel.nl] has quit [Ping
timeout: 260 seconds]
17:20 < gmilleramilar> how do I "use it as a function"?
17:20 < skelterjohn|work> what i mentioned previously:
http://golang.org/pkg/reflect/#Value.Call
17:20 < gmilleramilar> oh, ok
17:20 < gmilleramilar> sorry I thought you were suggesting a completely
different way
17:21 < skelterjohn|work> now that i see how that works, i'd bet that the
method's Func field doesn't need the receiver
17:21 < skelterjohn|work> but i'd just try and find out
17:21 -!- pbgc [~pbgc@bl20-179-224.dsl.telepac.pt] has joined #go-nuts
17:30 -!- pbgc [~pbgc@bl20-179-224.dsl.telepac.pt] has quit [Ping timeout: 255
seconds]
17:31 < gmilleramilar> skelterjohn|work: yup, needs the receiver.  works
like a charm, thanks.
17:31 < skelterjohn|work> pleasure.
17:32 -!- twolfe18 [~twolfe18@c-71-61-180-11.hsd1.pa.comcast.net] has joined
#go-nuts
17:34 < ancientlore> anyone else see this in the windows build?  It gets to
doc/progs, and can't create the exe: cannot create 8.out.exe
17:35 < skelterjohn|work> do you mean $GOROOT/src/pkg/go/doc/progs?  because
i have no such directory
17:35 < skelterjohn|work> oops
17:35 < skelterjohn|work> i meant to hit delete
17:35 < skelterjohn|work> cause i found the dir you were talking about
17:35 < skelterjohn|work> but i don't know the problem
17:36 -!- virtualsue [~chatzilla@nat/cisco/x-vvyleynavidgbhpe] has quit [Ping
timeout: 258 seconds]
17:36 < ancientlore> rm *.8
17:36 < ancientlore> whoops
17:37 < ancientlore> there's a run script in there...seems like it should
work.  i'll keep looking
17:37 < skelterjohn|work> i don't think my go tries to build anything in
there
17:38 -!- yogib [~kaiser@131.234.59.53] has quit [Read error: Operation timed out]
17:40 < pjz> hrm, the weekly ubuntu package has a differnt implementation of
go/token, apparnetly
17:42 -!- cafesofie [~cafesofie@pool-74-101-77-36.nycmny.east.verizon.net] has
quit [Remote host closed the connection]
17:43 < skelterjohn|work> weekly and release are apparently parallel
branches
17:43 < skelterjohn|work> they differ in the sort package, too
17:43 < pjz> hrm, which should I use?
17:43 < skelterjohn|work> depends how often you like to update
17:44 < skelterjohn|work> both are perfectly serviceable for most things
17:44 < skelterjohn|work> i don't mind updating, so i use weekly
17:44 < skelterjohn|work> also sometimes i'll catch some bugs and get to
help out
17:45 < pjz> I don't mind updating (tanks to the PPA), but I'd rather not
have to rewrite my code too often
17:45 < pjz> if there's going to be changes
17:45 < skelterjohn|work> then you should stick to release
17:46 < skelterjohn|work> but things that appear in weekly versions will
probably appear in releases, eventually
17:46 < skelterjohn|work> but they are in bigger batches, with release
17:46 -!- Fish- [~Fish@9fans.fr] has joined #go-nuts
17:48 < magn3ts> Is gd updated for the new exec?
17:49 < skelterjohn|work> i don't know, but i know the best way to find out
17:49 -!- hargettp [~phil@dhcp-161.mirrorimage.net] has quit [Quit: leaving]
17:50 < pjz> bah, golang-weekly doesn't include package docs so I can't tell
how to fix my code (without reading the package source)
17:52 < skelterjohn|work> pjz: you can run a local godoc server
17:52 < skelterjohn|work> godoc -http :6060
17:52 < skelterjohn|work> then go to localhost:6060
17:58 < jessta> or godoc <packagename> | less
17:59 -!- cafesofie [~cafesofie@pool-74-101-77-36.nycmny.east.verizon.net] has
joined #go-nuts
18:02 -!- Project-2501 [~Marvin@82.84.91.132] has joined #go-nuts
18:03 < pjz> wow, nice.
18:03 < pjz> godoc go/token crashes on me
18:03 -!- smw [~stephen@unaffiliated/smw] has quit [Ping timeout: 250 seconds]
18:03 < pjz> npd
18:03 < skelterjohn|work> what platform?  works for me
18:03 < pjz> natty
18:03 < pjz> ubuntu natty
18:04 < pjz> 686
18:04 < pjz> 64-bit
18:04 < skelterjohn|work> i don't know about 686, but it works fine for me
on 10.04
18:04 < skelterjohn|work> 64bit
18:04 < skelterjohn|work> try rebuilding
18:04 * chomp candidly recommends building go from mercurial
18:05 -!- Project_2501 [~Marvin@82.84.92.43] has quit [Ping timeout: 258 seconds]
18:05 < skelterjohn|work> oh -yeah if you're on ubuntu, don't install from a
package manager
18:05 < chomp> (instead of using a prebuilt package)
18:05 < skelterjohn|work> it's so easy to get it working the right way that
there's no point
18:07 < pjz> bah, found the prolbem...  which was that I had previously
installed go fom src but switched to the PPA, so had both on my path, which was...
ungood
18:08 < skelterjohn|work> wouldn't it be neat if you could make a go package
that would just use hg to pull and make.bash to build it?
18:08 < skelterjohn|work> i guess people want the binaries to be pre-built
18:08 < pjz> people have done those kinds of things before
18:09 < pjz> ususally due to licensing restrictions
18:09 < pjz> debian packages aren't very complicated
18:11 < pjz> usually they're '-package' packages, like googleearth-package
or kernel-package ; packages that build packages
18:12 < pjz> aptitude search [-]package$ will get you a list of some
18:15 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Remote host closed
the connection]
18:16 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
18:18 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-150-132.clienti.tiscali.it] has
joined #go-nuts
18:20 -!- sniper506th [~sniper506@rrcs-70-61-192-18.midsouth.biz.rr.com] has
joined #go-nuts
18:21 -!- Project-2501 [~Marvin@82.84.91.132] has quit [Ping timeout: 240 seconds]
18:21 -!- exch [~blbl@ip34-181-209-87.adsl2.static.versatel.nl] has joined
#go-nuts
18:22 -!- pbgc [~pbgc@195-23-115-137.static.net.novis.pt] has joined #go-nuts
18:24 -!- cafesofi_ [~cafesofie@pool-74-101-80-101.nycmny.east.verizon.net] has
joined #go-nuts
18:25 -!- cafesofie [~cafesofie@pool-74-101-77-36.nycmny.east.verizon.net] has
quit [Ping timeout: 255 seconds]
18:28 -!- yogib [~kaiser@dslb-084-062-112-128.pools.arcor-ip.net] has joined
#go-nuts
18:31 -!- pbgc [~pbgc@195-23-115-137.static.net.novis.pt] has quit [Ping timeout:
255 seconds]
18:31 -!- noam [~noam@87.69.42.61.cable.012.net.il] has joined #go-nuts
18:32 -!- flaguy48 [~gmallard@user-0c6s350.cable.mindspring.com] has joined
#go-nuts
18:34 -!- cafesofi_ [~cafesofie@pool-74-101-80-101.nycmny.east.verizon.net] has
quit [Remote host closed the connection]
18:36 -!- serialhex [~quassel@99-101-148-183.lightspeed.wepbfl.sbcglobal.net] has
joined #go-nuts
18:37 -!- sacho [~sacho@79-100-170-94.btc-net.bg] has quit [Ping timeout: 255
seconds]
18:37 < serialhex> hey, quick Q: does go support the terenary operator?  you
know - foo() ? fooBeTru() : fooBeFalse()
18:37 < KirkMcDonald> I don't believe so.
18:38 <+iant> no, it doesn't
18:38 < KirkMcDonald> Hah, the language spec doesn't contain a single
question mark.
18:38 < serialhex> ok, thanks!
18:38 < skelterjohn|work>
http://golang.org/doc/go_faq.html#Does_Go_have_a_ternary_form
18:39 -!- cafesofie [~cafesofie@pool-74-101-80-101.nycmny.east.verizon.net] has
joined #go-nuts
18:39 < serialhex> KirkMcDonald: thats weird!!i just checked myself :P
18:40 < serialhex> ok, np...  i was just wondering so i could make my code
shorter...
18:41 < skelterjohn|work> keystrokes are not a good metric to minimize
18:41 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 252 seconds]
18:41 < skelterjohn|work> within reason
18:42 -!- jsj [~johan@78-70-253-105-no149.tbcn.telia.com] has joined #go-nuts
18:43 -!- pbgc [~pbgc@2.81.179.224] has joined #go-nuts
18:43 -!- cafesofie [~cafesofie@pool-74-101-80-101.nycmny.east.verizon.net] has
quit [Remote host closed the connection]
18:43 < serialhex> true, it can make the code unreadable, but so can
verbosity - seek the middle path, and be enlightened :P
18:43 < serialhex> hey, another Q: can i do this?  i, j, k := 0
18:44 < serialhex> err, will it do what i think it does?
18:45 < skelterjohn|work> i, j, k := 0, 0, 0
18:46 < serialhex> ok, i guess for ambiguity reasons itwouldnt make them all
== 0
18:47 < skelterjohn|work> it won't compile :)
18:48 < serialhex> yeah, i'm sure it wouldn't be hard to implement but b/c
of ambiguity...  anyway, i think `var i, j, k int` will work better for my
purposes anyway
18:48 < skelterjohn|work> that will initialize them to zero, certainly
18:49 -!- message144 [~message14@cpe-75-83-155-145.socal.res.rr.com] has joined
#go-nuts
18:51 < serialhex> any spiffy way to find the minimum of a set of numbers?
18:52 < serialhex> (i know i'm asking a lot of Q's, but hey, i'm learning!)
18:52 < skelterjohn|work> problem with that is there are a number of ways to
represent "a set of numbers"
18:53 < skelterjohn|work> many of them are reasonable, but it's not
reasonable to write a 3 line function for each of them
18:53 -!- sacho [~sacho@90-154-151-157.btc-net.bg] has joined #go-nuts
18:53 < skelterjohn|work> err, short answer: no :)
18:54 < serialhex> well, i have 3 numbers, just variables i'm using right
now, i can throw em in a slice or whatever, or i can just make a new var, take the
min of 2, then compare the third to the var and take the min of those...
18:55 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
18:55 < skelterjohn|work> if it's always exactly three numbers that always
have exactly one type, write a helper
18:55 < skelterjohn|work> and nothing will be more efficient that besides
inlining the code
18:56 < skelterjohn|work> there is math.Fmin and math.Fmax, if you use
float64
18:56 < serialhex> yeah, it's 3 nums in the middle of a function...  so i
guess the code will be longer but in the end the execution will be shorter :D
18:57 < serialhex> nah, they're ints...
18:57 < serialhex> and what do you mean 'write a helper'??
18:57 < serialhex> just another func?
18:57 < serialhex> or is there something spiffy i should know about??
18:58 < skelterjohn|work> not a special term - just a small function to help
you out
18:58 < serialhex> ok, cool, thanks!
18:59 -!- JimPeak [~lejimpeak@modemcable213.208-160-184.mc.videotron.ca] has
joined #go-nuts
19:02 -!- keithcascio [~keithcasc@nat/google/x-bayxpocdgyvlwkib] has joined
#go-nuts
19:04 -!- bakedb [~kel@cpc4-lea21-0-0-cust755.6-3.cable.virginmedia.com] has
joined #go-nuts
19:05 -!- cafesofie [~cafesofie@pool-74-101-80-101.nycmny.east.verizon.net] has
joined #go-nuts
19:06 -!- cafesofie [~cafesofie@pool-74-101-80-101.nycmny.east.verizon.net] has
quit [Remote host closed the connection]
19:08 -!- gnuvince|work [8e544424@gateway/web/freenode/ip.142.84.68.36] has quit
[Quit: Page closed]
19:10 -!- Jessica_Lily [~Jessica@unaffiliated/xray7224] has quit [Ping timeout:
258 seconds]
19:10 -!- cmike_ [~mcrosby@c-71-57-13-183.hsd1.il.comcast.net] has joined #go-nuts
19:12 -!- fabled [~fabled@83.145.235.194] has quit [Quit: Ex-Chat]
19:13 < cmike_> hey everyone
19:15 -!- sacho [~sacho@90-154-151-157.btc-net.bg] has quit [Ping timeout: 240
seconds]
19:17 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has quit [Quit:
WeeChat 0.3.0]
19:18 < cmike_> having some issure making gocode on deb system
19:18 < cmike_> i have all env vars setup, but it won't make
19:19 -!- chomp [~chomp@dap-209-166-184-50.pri.tnt-3.pgh.pa.stargate.net] has quit
[Quit: Leaving]
19:19 -!- cafesofie [~cafesofie@pool-74-101-84-87.nycmny.east.verizon.net] has
joined #go-nuts
19:20 -!- eikenberry [~jae@173-164-68-213-Oregon.hfc.comcastbusiness.net] has
joined #go-nuts
19:24 -!- ronnyy [~quassel@p4FF1C5E2.dip0.t-ipconnect.de] has joined #go-nuts
19:24 -!- Narren [~skald@narren.la.net.ua] has quit [Read error: Connection reset
by peer]
19:26 -!- huin [~huin@91.85.188.1] has joined #go-nuts
19:27 -!- sacho [~sacho@46.10.23.185] has joined #go-nuts
19:30 -!- eikenberry [~jae@173-164-68-213-Oregon.hfc.comcastbusiness.net] has quit
[Quit: End of line.]
19:31 < skelterjohn|work> cmike_: pastebin the error message?
19:32 < cmike_> http://pastebin.com/h0CZkP3k
19:32 < cmike_> I dont' understand because i can echo out all path and
gobin/goroot vars fine
19:32 -!- bakedb [~kel@cpc4-lea21-0-0-cust755.6-3.cable.virginmedia.com] has quit
[Ping timeout: 255 seconds]
19:32 < skelterjohn|work> are they exported?
19:32 < skelterjohn|work> try using gomake instead of make
19:33 < cmike_> that worked
19:33 < skelterjohn|work> (gomake exports some values for GOROOT, GOOS,
GOARCH and runs make)
19:33 < skelterjohn|work> good :)
19:33 < cmike_> easy when you know what's going on
19:33 < skelterjohn|work> some problems pop up a lot
19:33 < skelterjohn|work> so i don't have to think too hard to figure out
what's wrong
19:34 < cmike_> just started programming in go a few days ago.  love it but
it's a huge change for me, so learning is slow
19:34 -!- moraes [~moraes@189.103.188.201] has quit [Remote host closed the
connection]
19:50 -!- cafesofi_ [~cafesofie@pool-74-101-89-173.nycmny.east.verizon.net] has
joined #go-nuts
19:51 -!- cafesofie [~cafesofie@pool-74-101-84-87.nycmny.east.verizon.net] has
quit [Ping timeout: 255 seconds]
19:52 < serialhex> ok, so i'm trying to assign variables to a slice (which
is small right now, but eventually IDK how big it will grow) and i'm not sure what
i'm doing wrong, here is the pertinent code: https://gist.github.com/1057066
19:52 < serialhex> err, strings to a slice, not variables...  :P
19:52 < skelterjohn|work> you haven't allocated enough memory for dict
19:52 < skelterjohn|work> or any, really
19:53 < skelterjohn|work> if you change the 0 in the call to make to a 4,
that will work
19:53 < serialhex> ok, so how do i do it so i dont allocate too little?
cause i'm going to be importing a rather large file in the future & i don't want
it to be too small
19:53 < skelterjohn|work> you can use append
19:53 < skelterjohn|work> dict = append(dict, "foo")
19:53 < skelterjohn|work> etc
19:54 < serialhex> ok, that will work better, thanks!
19:54 < skelterjohn|work> that will allocate a new underlying array, if
necessary
19:54 < cmike_> is there anything I need to add to my vimrc files to get
gocode to work?  other than filetype plugin on?
19:54 < serialhex> the first is probably faster, but allocating the array
won't be the bottleneck in this prog :D
19:55 < skelterjohn|work> you can still use append and "guess" the amount of
memory you need with make([]string, 0, theGuess)
19:55 < skelterjohn|work> it will be a slice of length zero backed by an
array of length theGuess
19:55 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
19:56 -!- danilo04 [~danilo04@66.44.225.80] has joined #go-nuts
19:56 < serialhex> cool, ok...  that would probably work
20:00 < serialhex> ok...  now i get: `compiling: social_distance.go;
social_distance.go:51: append(dict, "foo") not used` and so on...  :-/
20:00 -!- cmike_ [~mcrosby@c-71-57-13-183.hsd1.il.comcast.net] has quit [Quit:
cmike_]
20:01 < skelterjohn|work> dict = append(dict, "foo")
20:02 < serialhex> AHH!!!  ok, cool (der me :P)
20:02 < skelterjohn|work> if the array backing dict isn't large enough to
fit an extra element, append will allocate a new array
20:02 < skelterjohn|work> you get that new array by keeping the return value
of append()
20:02 < serialhex> yeah, i just forgot the assignment
20:03 -!- virtualsue [~chatzilla@nat/cisco/x-tvlcvemcfbaplzoq] has joined #go-nuts
20:04 -!- alehorst [~alehorst@186.212.213.85] has quit [Quit: Leaving.]
20:06 -!- alehorst [~alehorst@186.212.213.85] has joined #go-nuts
20:08 -!- TheMue [~TheMue@p5DDF5A46.dip.t-dialin.net] has joined #go-nuts
20:10 -!- Jessica_Lily [~Jessica@unaffiliated/xray7224] has joined #go-nuts
20:10 < serialhex> BUAHAHAHAHAHA!!!!!  phase 1 of my plan for world
domination is complete!!!!
20:11 < dforsyth> cool.  keep us posted.
20:11 < zippoxer> sorry but world domination is at google.  are you there?
20:12 < serialhex> i'm using go arent i??  thats close enough to google :D
20:12 -!- lucian_ [~lucian@78-86-217-168.zone2.bethere.co.uk] has joined #go-nuts
20:12 < zippoxer> enough for being dominated by them :)
20:12 < serialhex> google go: the official language of world domination!!!
20:12 < serialhex> :P
20:13 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Remote host closed
the connection]
20:14 -!- lucian [~lucian@78-86-217-168.zone2.bethere.co.uk] has quit [Ping
timeout: 252 seconds]
20:15 -!- JimPeak [~lejimpeak@modemcable213.208-160-184.mc.videotron.ca] has left
#go-nuts []
20:17 < aiju> 22:18 < serialhex> google go: the official language of
world domination!!!
20:18 < aiju> you might want to inflict pain..  maybe try java
20:18 < skelterjohn|work> ruby.
20:18 < serialhex> no no, see, i'm going to dominate the world with go, and
forse everyone i dont like to use java!!
20:18 < serialhex> hey, i like ruby!  it's slow but nice!!  :P
20:19 < aiju> haha
20:19 < aiju> x.nonzero?
20:20 < serialhex> yes!
20:20 < aiju> x!=0 is so hard to type
20:20 < aiju> and so much longer
20:20 < serialhex> it is!!!  :P
20:20 < aiju> same with .first
20:20 < aiju> no need to parody ruby
20:20 < aiju> ruby is its own parody
20:23 -!- cmike_ [~mcrosby@c-71-57-13-183.hsd1.il.comcast.net] has joined #go-nuts
20:23 < skelterjohn|work> err...  i just did a hg up and I don't see r58 in
the list of tags...  only up to r57.2
20:24 < skelterjohn|work> oh i probably need to pull
20:25 < skelterjohn|work> yeah that was it
20:26 -!- twolfe18 [~twolfe18@c-71-61-180-11.hsd1.pa.comcast.net] has quit [Quit:
twolfe18]
20:28 -!- twolfe18 [~twolfe18@c-71-61-180-11.hsd1.pa.comcast.net] has joined
#go-nuts
20:29 < cmike_> what editor do you guys use for go?  vim emacs?
20:29 < taruti> acme
20:29 < aiju> sam
20:31 < skelterjohn|work> emacs
20:31 < cmike_> i am lazy and like autocomplete
20:34 < serialhex> <-- sublime editor 2, see here for my reason:
http://kati672.files.wordpress.com/2011/06/learning_curve-text-editors.jpg
20:34 < cmike_> using sublime 2 right now serialhex
20:35 -!- ronnyy [~quassel@p4FF1C5E2.dip0.t-ipconnect.de] has quit [Remote host
closed the connection]
20:35 < serialhex> yeah, i recently found it and i *really* like it :D
20:36 < cmike_> ya, $60 when it is released
20:36 < serialhex> tru, but IMO worth it...(when i get a job that is :P)
20:37 < skelterjohn|work> the curve for vi seems a bit unliekly
20:37 < skelterjohn|work> it'd say it's more of a flatline on zero for the
first 90%, then it can jump up
20:37 -!- TheMue [~TheMue@p5DDF5A46.dip.t-dialin.net] has quit [Quit: TheMue]
20:37 < aiju> what the fuck is the learning curve, even
20:37 < aiju> the axes are not labelled
20:37 < aiju> this is worthless
20:37 < skelterjohn|work> for science, yeah it is
20:37 < skelterjohn|work> fortunately this isn't in an academic publication
20:38 < aiju> it's still worthless
20:38 < lucian> skelterjohn|work: i'd say it's also useless for fun
20:38 < skelterjohn|work> it's good for making fun of things without being
objectively wrong
20:38 < cmike_> i use vim all the time, but cannot get gocode to work in it.
Setup on osx and ubuntu,
20:38 < skelterjohn|work> which is fun for the person making the graph
20:38 < aiju> so anyway, what are the axes?
20:38 < aiju> i'm genuinely interested
20:38 < aiju> time - booze?
20:39 < serialhex> ...and thats what i'm using it for :D but when i can
learn vi i will (i'm still trying)
20:39 < skelterjohn|work> x axis is time, y axis is skill with the tool
20:39 < aiju> vi seems a bit unlikely
20:39 -!- GeertJohan [~Squarc@ip4da06866.direct-adsl.nl] has quit [Quit: Leaving.]
20:39 < skelterjohn|work> serialhex: you're on that long flatline at zero
20:39 < serialhex> yeah i know :P
20:39 < skelterjohn|work> aiju: see what i said one page ago haha
20:39 < aiju> hahaha
20:40 -!- Nisstyre [~nisstyre@109.74.204.224] has joined #go-nuts
20:40 < ampleyfly> it seems sublime 2 is in alpha, is it stable?
20:40 -!- twolfe18 [~twolfe18@c-71-61-180-11.hsd1.pa.comcast.net] has quit [Quit:
twolfe18]
20:41 < aiju> Added smooth scrolling
20:41 < aiju> VERY IMPORTANT
20:41 < skelterjohn|work> why is sublime2 nice?
20:41 < cmike_> ya, sublime2 is stable
20:41 < aiju> sublime2 is like purified featuritis
20:42 < serialhex> ampleyfly: yeah it's stable...  i've been using it
without a hiccup for days (like, my computer is on for days, and it's been running
while my computer is on)
20:42 < aiju> wasn't it that editor which requires opengl
20:42 < skelterjohn|work> does it have emacs navigation?  ctrl-e/ctrl-a for
end/beginning of line, etc?
20:42 -!- pharris [~Adium@rhgw.opentext.com] has quit [Quit: Leaving.]
20:42 < aiju> skelterjohn|work: s/emacs/unix/
20:42 < skelterjohn|work> ctrl-y for paste, ctrl-w for cut?
20:43 < aiju> pasting should be done by a middle click menu
20:43 < aiju> like god meant it to be
20:43 < serialhex> no, ctrl-c copy, ctrl-v paste, etc...
20:43 < skelterjohn|work> my middle mouse button is a wheel
20:43 < magn3ts> a mouse in a text editor?  blasphemy
20:43 < skelterjohn|work> so i don't like to do that
20:43 < serialhex> lol aiju
20:43 < aiju> magn3ts: pretending that you're using a 80s terminal is WAY
MORE FUN
20:43 < aiju> i know
20:43 < magn3ts> oooh a visual scroller!
20:44 < skelterjohn|work> that does seem like a nice feature, actually
20:44 < magn3ts> aiju, I was partially kidding, but I'm still faster with
arrows, home/end and shift when I'm coding.  I'm normally moving blocks rather
than mid line fragments
20:44 < skelterjohn|work> $60 seems steep....
20:44 < cmike_> the problem with vim is that you try to navigate everything
with h,j,k,l
20:45 < skelterjohn|work> shouldn't be a problem for anyone who has played
enough nethack
20:45 < aiju> if you navigate with hjkl you're either playing nethack or are
nostalgic to a worrying amount
20:45 -!- arun_ [~arun@unaffiliated/sindian] has quit [Read error: Connection
reset by peer]
20:45 < skelterjohn|work> !!
20:45 < aiju> 22:49 < magn3ts> aiju, I was partially kidding, but I'm
still faster with arrows, home/end and shift when I'm coding.  I'm normally moving
blocks rather than mid line fragments
20:45 < aiju> my favourite delusion
20:45 < magn3ts> That's not a delusion, come on man.
20:45 < aiju> haha
20:45 < aiju> I'M TOTALLY FASTER PRESSING THE ARROW KEYS FOR TEN SEOCNDS
20:46 < magn3ts> End, Shift, Home Ctrl+X, faster than leavijng the keyboard,
grabbing my mouse, finding where it's at on my three monitors selecting the end of
the line moving the mouse around and then going back
20:46 < magn3ts> someone has never spent more than 3 minutes in vim and got
pissed off.
20:46 < serialhex> i don't like using the mouse much while i'm coding
either, though whichever is faster...
20:46 < aiju> if you have to search for your mouse, you've fucked up
something
20:46 < magn3ts> why?  my mouse is 20x20 pixels on a screen 200 times the
size
20:47 < skelterjohn|work> my mouse exists simultaneously on all my monitors,
but will only click on the one i'm looking at
20:47 < aiju> oh you mean the fucking CURSOR
20:47 < cmike_> lol
20:47 < magn3ts> well poor word choice on my part, but yeah that's what I
meant
20:47 < aiju> no clue, i can't understand that problem
20:47 < skelterjohn|work> hey, sublime looks very nice (running it now)
20:47 -!- arun_ [~arun@e71020.upc-e.chello.nl] has joined #go-nuts
20:47 -!- arun_ [~arun@e71020.upc-e.chello.nl] has quit [Changing host]
20:47 -!- arun_ [~arun@unaffiliated/sindian] has joined #go-nuts
20:47 < magn3ts> I just dont appreciate being laughed at and called
delusional because I'm fast-functioning in vim.
20:48 < skelterjohn|work> appears to have go syntax coloring by default
20:48 < cmike_> i think that sublime is not timed so you may not have to buy
it
20:48 < magn3ts> and to be told that the mouse is obviously faster is just a
bit uh, surprising
20:48 < skelterjohn|work> that's good - i might be ok with $20
20:48 < skelterjohn|work> but $60 is a lot
20:48 < cmike_> ya, agree
20:48 < cmike_> i am not paying $60 for it
20:48 -!- m4dh4tt3r [~Adium@c-98-210-145-213.hsd1.ca.comcast.net] has joined
#go-nuts
20:48 < serialhex> how do you do this?  :D <skelterjohn|work> my mouse
exists simultaneously on all my monitors, but will only click on the one i'm
looking at
20:48 -!- twolfe18 [~twolfe18@c-71-61-180-11.hsd1.pa.comcast.net] has joined
#go-nuts
20:48 < skelterjohn|work> serialhex: i only have one monitor
20:49 < magn3ts> skelterjohn, I assume you were joking about the mouse on
all screens, but that'd be a neat kinect hack, maybe wire it up with compiz.
20:49 < serialhex> lol :P
20:49 < cmike_> lol
20:49 < aiju> i have two monitors
20:49 < aiju> and two computers
20:49 < skelterjohn|work> me too, but the other one is 40 miles away righ
tnow
20:49 < aiju> also solves the problem
20:49 < serialhex> i _had_ 2 monitors...  the my primary died...
20:49 < aiju> skelterjohn|work: i actually have third, and my third one is
over 1000 km away
20:49 < aiju> +a
20:50 < serialhex> my screen space is now 37" smaller, i weep ;(
20:50 < magn3ts> 37" monitor?  yikes
20:50 -!- robteix [~robteix@192.55.54.36] has quit [Ping timeout: 250 seconds]
20:51 < magn3ts> that seems like it would be uncomfortable unless you're
sitting a ways away.
20:51 < aiju> everything larger than 15" freaks me out
20:51 < magn3ts> I have a 23" but it's too large and not dense enough for my
taste, I prefer my MBP at a similar resolution on a smaller screen
20:51 < serialhex> yeah.  i'm sitting ~ 3' away from my secondary (17")
monitor now, and was about the same dist from the primary
20:52 < serialhex> i need to rearrange everything
20:52 < cmike_> ya, i don't care about the size, i like high pixel density
20:52 < lucian> cmike_: me too
20:52 < aiju> high pixel density is annoying
20:52 < aiju> at least with windows
20:52 < magn3ts> lol
20:52 < lucian> i'm quite angry with the low density on most things
20:52 < lucian> it's getting ridiculous
20:52 -!- m4dh4tt3r [~Adium@c-98-210-145-213.hsd1.ca.comcast.net] has quit [Read
error: Connection reset by peer]
20:53 < aiju> fonts become ridiculously small
20:53 < lucian> my phone has at least double the density
20:53 < magn3ts> upgraded smartphones only to find the screen is larger and
resolution smaller than my old phone.
20:53 < serialhex> i like the fact that i could watch movies comfortably on
my primary...
20:53 < lucian> aiju: make them bigger, that's a silly reason
20:53 < magn3ts> aiju, that's how it works :P
20:53 -!- twolfe18 [~twolfe18@c-71-61-180-11.hsd1.pa.comcast.net] has quit [Client
Quit]
20:53 < mkb218> high pixel density is driving web designers to the new large
type trend
20:53 < magn3ts> you can also change DPI settings in windows easily
20:53 < aiju> magn3ts: have i missed something?
20:53 < cmike_> i wish the 15" MBP screen would come in 1080 instead of 1050
20:53 < aiju> i managed to make it 25% larger
20:53 < aiju> but this fucks up so much
20:53 < aiju> i got a terrible headache after a few minutes
20:53 < aiju> small fonts + cleartype ..  jesus christ
20:53 < lucian> aiju: haven't used windows in a long time, but i think win7
has good DPI settings
20:54 < magn3ts> does it?  My parents run the high DPI on my old laptop I
gave them and they don't seem to mind ever...
20:54 < magn3ts> you can also turn off cleartype :/
20:54 < aiju> i don't have admin priviliges
20:54 < magn3ts> ouch.  that makes more sense :[
20:54 < lucian> aiju: then you obviously don't own it :P
20:54 -!- m4dh4tt3r [~Adium@c-98-210-145-213.hsd1.ca.comcast.net] has joined
#go-nuts
20:55 < aiju> did i ever claim i do
20:55 < aiju> i obviously hacked into it
20:55 < aiju> it's a machine at work
20:55 -!- m4dh4tt3r [~Adium@c-98-210-145-213.hsd1.ca.comcast.net] has quit [Read
error: Connection reset by peer]
20:55 < magn3ts> I could get used to sublime, this isn't bad.  I like having
an editor I can use via ssh too though.  I kinda doubt sublime supports that
20:55 < lucian> aiju: then go on strike until you get admin
20:55 < aiju> lucian: ha
20:56 -!- tncardoso [~thiago@187.20.195.36] has quit [Ping timeout: 250 seconds]
20:56 < cmike_> ya no ssh in sublime
20:56 < skelterjohn|work> sublime seems to not go to the beginning/end of
the line with ctrl-a/e, ctrl-left/right, or alt-left/right
20:56 < skelterjohn|work> i have to use the home/end keys...
20:56 < aiju> sam has something even better than vi + ssh
20:56 < cmike_> what is that aiju
20:56 < magn3ts> is sam another editor?
20:56 < aiju> it does some caching your end
20:56 < aiju> magn3ts: yeah
20:56 < aiju> so you can edit files conveniently even over a high latency
link
20:57 < serialhex> that sounds pretty cool
20:57 < serialhex> do you have a link?
20:57 < aiju> it's just a bitch to set up, i need to create a script for
that
20:57 < mkb218> tramp+emacs does this
20:57 < aiju> http://sam.cat-v.org/
20:57 < mkb218> but not well
20:57 -!- m4dh4tt3r [~Adium@c-98-210-145-213.hsd1.ca.comcast.net] has joined
#go-nuts
20:57 < mkb218> because it hangs when it tries to autosave
20:58 < aiju> sam uses this model even when editing locally
20:58 < aiju> it just connects both ends with a pipe
20:58 -!- m4dh4tt3r [~Adium@c-98-210-145-213.hsd1.ca.comcast.net] has quit [Read
error: Connection reset by peer]
21:00 -!- pbgc [~pbgc@2.81.179.224] has quit [Ping timeout: 255 seconds]
21:01 -!- alehorst [~alehorst@186.212.213.85] has quit [Ping timeout: 250 seconds]
21:01 -!- m4dh4tt3r [~Adium@c-98-210-145-213.hsd1.ca.comcast.net] has joined
#go-nuts
21:02 -!- alehorst [~alehorst@186.212.213.85] has joined #go-nuts
21:05 -!- cafesofie [~cafesofie@pool-173-77-24-106.nycmny.east.verizon.net] has
joined #go-nuts
21:05 -!- m4dh4tt3r [~Adium@c-98-210-145-213.hsd1.ca.comcast.net] has quit [Client
Quit]
21:07 -!- ananamoose [~ajoe47@h227.35.25.72.ip.windstream.net] has quit [Quit:
Textual IRC Client: http://www.textualapp.com/]
21:08 -!- cafesofi_ [~cafesofie@pool-74-101-89-173.nycmny.east.verizon.net] has
quit [Ping timeout: 250 seconds]
21:09 < skelterjohn|work> who was it that uses sublime?  is there a way to
filter files out of a project?
21:10 < skelterjohn|work> i want to add a folder to a project and have it
show me only the .go files within (arbitrarily many directories deep)
21:10 -!- pbgc [~pbgc@bl20-179-224.dsl.telepac.pt] has joined #go-nuts
21:11 < serialhex> hmm...  i dunno skelterjohn|work, i'll see if i can find
it...
21:12 < cmike_> i just stated using it yesterday, so havnt dug very deep
into the settings
21:12 -!- Fish- [~Fish@9fans.fr] has quit [Quit: So Long, and Thanks for All the
Fish]
21:14 < skelterjohn|work> http://www.sublimetext.com/docs/projects tells me
how
21:15 < serialhex> ahh, sweet!!
21:15 < skelterjohn|work> though...that page indicates that projects are xml
files.  the projects it makes for me seem to be json files
21:15 < serialhex> probably a change from 1 to 2...
21:15 < skelterjohn|work> oh good call
21:15 < skelterjohn|work> now to look for the 2alpha docs
21:16 < skelterjohn|work> http://www.sublimetext.com/docs/2/index.html
somewhat incomplete
21:17 < serialhex> yeah (i was just about to post that link)
21:17 < skelterjohn|work> and it's nice to work with go...  i'm compiling a
C++ program (klayout, in case anyone has heard of it) and it has been chugging for
a solid 30 minutes at least
21:17 < skelterjohn|work> each .cc file takes 5-10 seconds
21:18 -!- lucian [~lucian@78-86-217-168.zone2.bethere.co.uk] has quit [Quit: bye]
21:20 < cmike_> it's taking me longer to get up to speed with Go than what I
would like
21:20 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-150-132.clienti.tiscali.it] has
quit [Quit: E se abbasso questa leva che succ...]
21:20 < skelterjohn|work> cmike_: what's the stumbling point?
21:20 < cmike_> my fault, not Go's
21:20 < cmike_> i dont have a background in C
21:21 < skelterjohn|work> what's your background?
21:21 < cmike_> as3
21:21 < serialhex> me too!  isn't there a way i can direct-inject this info
to my head?
21:21 < skelterjohn|work> i don't know what as3 is.
21:21 < skelterjohn|work> action script?
21:21 < cmike_> ya, actionscript
21:21 < skelterjohn|work> well, different kind of language, certainly
21:21 < cmike_> learning things like pointers is slowing me down
21:22 < skelterjohn|work> there are 10 types of people in the world - those
who understand pointers and those who don't.
21:22 < serialhex> ...that almost works skelterjohn|work :P
21:23 < skelterjohn|work> :)
21:23 -!- rlab [~Miranda@91.200.158.34] has quit [Quit: Miranda IM! Smaller,
Faster, Easier.  http://miranda-im.org]
21:24 -!- pbgc [~pbgc@bl20-179-224.dsl.telepac.pt] has quit [Ping timeout: 255
seconds]
21:24 < cmike_> started doing VBA (excel macros), then jumped into AS3 and
Php for my backends.  Now needing a more powerful language for some stuff and
picked Go instead of py
21:25 < serialhex> ok, so i'm stuck, i'm trying to load a file & set each
line to a new slot in a slice...  and just loading & working with a file is
stumping me, i think i may have to cast the byte-stream into a string...?
21:25 < skelterjohn|work> check out the bufio package
21:25 -!- cafesofie [~cafesofie@pool-173-77-24-106.nycmny.east.verizon.net] has
quit [Remote host closed the connection]
21:25 < skelterjohn|work> file, err = os.Open(theFile)
21:25 < skelterjohn|work> reader = bufio.NewReader(file)
21:25 < skelterjohn|work> reader.ReadLine()
21:25 < serialhex> ahh, ok cool
21:26 < mkb218> ReadLine still returns a []byte
21:26 < serialhex> so i'll have to cast it to a string or something?
21:26 < skelterjohn|work> you can convert []byte to string
21:27 < skelterjohn|work> (cast is the wrong word - string(aByteSlice)
copies the byte slice
21:28 -!- TheMue [~TheMue@p5DDF5A46.dip.t-dialin.net] has joined #go-nuts
21:28 < serialhex> ahh, ok...  yeah i have a little C expierence, and
cast-ing, or just incompatible variables have always been a painfor me
21:29 < skelterjohn|work> casting is treating something of one type as
something of another type - the only way to cast in go is via the unsafe package
21:29 < serialhex> ahh, ok
21:29 < skelterjohn|work> converting is making a new thing with the new
type, using the old thing
21:29 < skelterjohn|work> in go you can't say *A(aBPointer)
21:29 < skelterjohn|work> even if you could say A(aB)
21:30 < mkb218> this bit from teh spec confuses me: "x is a bidirectional
channel value, T is a channel type, x's type V and T have identical element types,
and at least one of V or T is not a named type."
21:30 < skelterjohn|work> you have to dereference it, convert it, and then
take the address of the new thing
21:30 < skelterjohn|work> context?
21:30 < mkb218> A value x is assignable to a variable of type T in any of
these cases...
21:31 < serialhex> yeah, both pointers and printers hate me equally....  :P
21:31 < skelterjohn|work> mkb218: if you have "var x chan X", and "var y
<-chan X", you can say "y = x"
21:32 < skelterjohn|work> you can go from a bidirectional channel (just
"chan") to any type of channel (chan, <-chan, chan<-) if the underlying
types match enough
21:32 < mkb218> as long you don't have both "type xchan chan X" and "ychan
<-chan X"?
21:33 < skelterjohn|work> i'm not sure
21:33 < skelterjohn|work> it's getting complicated
21:33 < mkb218> the spec seems to imply that.  i shoudl try to see what will
break this
21:33 < skelterjohn|work> well, with what yo just said, xchan is a named
type
21:33 < skelterjohn|work> and the other is not a named type
21:33 < skelterjohn|work> so at least one is not a named type
21:34 < mkb218> oops, i meant "type ychan <-chan X"
21:34 -!- pjz [~pj@place.org] has quit [Quit: Changing server]
21:34 < skelterjohn|work> then i'd guess you're right
21:34 < skelterjohn|work> but i've never tried that
21:34 < mkb218> not important, just ran into while looking up
string<->[]byte conversions
21:35 < mkb218> no professional purpose for go yet
21:37 < cmike_> i learn better when I have a project to work on.  Try to
think of something that I need (backend) to code in Go
21:40 -!- virtualsue [~chatzilla@nat/cisco/x-tvlcvemcfbaplzoq] has quit [Ping
timeout: 240 seconds]
21:43 -!- huin [~huin@91.85.188.1] has quit [Quit: bedtime]
21:44 -!- TheMue [~TheMue@p5DDF5A46.dip.t-dialin.net] has quit [Quit: TheMue]
21:47 -!- kamaji [~kamaji@handtomouse.demon.co.uk] has quit [Quit: leaving]
21:47 < cmike_> you working on anything fun serialhex
21:50 -!- m4dh4tt3r [~Adium@99-117-98-39.lightspeed.sntcca.sbcglobal.net] has
joined #go-nuts
21:50 < cmike_> would go be good for a selective asset updater?  Goes though
the assets of an application and see what are out of date compared to the servers
assets, then downloads the new assets?  Have a go program for both sides?
21:52 -!- tgall_foo [~tgall@206.9.88.154] has quit [Read error: Operation timed
out]
21:56 -!- kergoth__ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has joined #go-nuts
21:57 < serialhex> cmike_: i'm mostly working on learning go :P but as far
as a "real" project i'm doing this (look at the challenge at the bottom) :
http://jobs.github.com/positions/181fb26e-71cc-11e0-96a9-8752f87b91a0
21:58 < serialhex> maybe i can impress them with my ~n00b skillz and get a
job to pay for college :P
21:58 -!- sniper506th [~sniper506@rrcs-70-61-192-18.midsouth.biz.rr.com] has quit
[Quit: Leaving...]
22:02 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit:
Verlassend]
22:02 < serialhex> or maybe i have n00b++ skillz by now :P
22:02 < cmike_> nice problem solving example
22:03 -!- ampleyfly [ampleyfly@gateway/shell/blinkenshell.org/x-yahjkozdmbjmyyzd]
has quit [Ping timeout: 258 seconds]
22:03 < cmike_> they give you the code on the wiki
22:03 < serialhex> yeah, i was tryingit in ruby, but getting the distances
of the dict from 'causes' was taking FOREVER!!!
22:04 < cmike_> can you filter out the words that won't have the correct
length first?
22:04 -!- moraes [~moraes@189.103.188.201] has joined #go-nuts
22:04 < serialhex> they give you the code, but then you need to find the
friends of the friends, and friends of friends of friends...  and so on
22:05 -!- ampleyfly [ampleyfly@gateway/shell/blinkenshell.org/x-lgswimayhnjhowcv]
has joined #go-nuts
22:05 * kergoth__ adds that one to his slowly growing list of
exercises/challenges/etc
22:05 < serialhex> probably...  take all words that are +-1 letter
22:05 < cmike_> you just store the friends, then do the same thing to them
22:06 < serialhex> next i'll probably do some of the euler project things in
go...
22:06 < cmike_> keep looping, just fire up some instances on ec2 to put that
to work
22:06 < serialhex> on ec2??
22:06 < cmike_> amazon ec2
22:06 < serialhex> oh, i see...  i didn't thinkof that :D
22:07 < serialhex> my computer being slow is probably a big reason it was
taking so long
22:07 < cmike_> ya,
22:07 < cmike_> then just have another process for each friend
22:08 < serialhex> i would have chunked it into threads and workd on it that
way, but, at their heart,.  P4's are single-core
22:08 < cmike_> use the Go controller and worker example to serve our jobs
22:08 < serialhex> and thus, single thread
22:08 < cmike_> server out*
22:09 < cmike_> have the controller hold the list of friends, then when the
workers are done looping, they give back friends that they found, and add those to
the controller's list
22:09 < serialhex> ...as anyone else seen google's spiffy new ui??
22:09 < KirkMcDonald> Google?
22:10 < serialhex> hmm...  that sounds interesting
22:10 < exch> google has a knack for fixing what isn't broken
22:10 < KirkMcDonald> Tell us more of this "the Google."
22:10 < serialhex> yeah, google.com & the searches look different for me
now, not bad, just new
22:10 < |Craig|> serialhex: get all the friend relations into a queue or
some sort, and use an upTree find all the disconnected parts of the graph.  Then
scan for the one containing the work or interest.
22:11 < serialhex> upTree |Craig|??
22:11 < serialhex> KirkMcDonald: ask The Great Google any Q, and it shall be
answered (answered correctly is a different story, but answered it shall be!)
22:11 < |Craig|> serialhex: its a trivial data structure that does unions
and finds with sets.  look it up, its almost linear time ;)
22:12 -!- tgall_foo [~tgall@206.9.88.154] has joined #go-nuts
22:12 < serialhex> hmm, i'll see what i can find, thanks |Craig|!!
22:13 < |Craig|> upTrees are not used very often, but when you need one
(usally for kruskal's algorithm) they are great.
22:13 < cmike_> serialhex: you make the loop that goes though the wordlist
and finds friends for X word, then I will make you a queue and controller to dish
out more X for the the loop again
22:13 < cmike_> be our Go learning exercise for both of us
22:14 < serialhex> you got a github acct cmike_??
22:14 < cmike_> ya, what is your username
22:14 < serialhex> i'll give you 3 guesses, the first 2 dont count :P
22:14 < |Craig|> serialhex: my up tree based approach has the issue that it
divides the entire word list into the separate friend networks, not just the one
you need, which prabably wasts most of the time, but is interesting
22:16 < serialhex> |Craig|: well getting in and writing some cool algos in
go is probably better than simply trying to find the quickest route when trying to
learn
22:16 * serialhex can't find uptrees on wikipedia...  needs another resource
22:16 < |Craig|> an optimized upTree in java is 2 methods, a total of like
6-8 lines.
22:16 -!- vinisterx [~ryan@74-129-201-27.dhcp.insightbb.com] has quit [Ping
timeout: 240 seconds]
22:17 < cmike_> sent you a msg on github serialhex
22:17 < cmike_> bbl
22:17 -!- cmike_ [~mcrosby@c-71-57-13-183.hsd1.il.comcast.net] has quit [Quit:
cmike_]
22:18 < serialhex> yeah, i just can't find a description or implementation
yet...  too many damn plants in my way!!!
22:19 < |Craig|> serialhex: look up kruskal's algorithm, its the only common
use of upTrees
22:20 < serialhex> ahh, got it, thanks!!
22:23 -!- Slant [~scott@124-148-144-228.dyn.iinet.net.au] has joined #go-nuts
22:24 -!- vmil86 [~vmil86@88.118.37.245] has quit [Remote host closed the
connection]
22:25 -!- squeese [~squeese@cm-84.209.17.156.getinternet.no] has quit [Remote host
closed the connection]
22:31 < brandini> I just built go again on my cr-48
22:32 -!- napsy [~luka@88.200.96.18] has quit [Read error: Operation timed out]
22:35 -!- awidegreen [~quassel@h-170-226.A212.priv.bahnhof.se] has quit [Read
error: Operation timed out]
22:41 -!- sacho [~sacho@46.10.23.185] has quit [Ping timeout: 252 seconds]
22:41 -!- photron [~photron@port-92-201-30-175.dynamic.qsc.de] has quit [Ping
timeout: 258 seconds]
22:45 -!- yogib [~kaiser@dslb-084-062-112-128.pools.arcor-ip.net] has quit [Remote
host closed the connection]
22:53 -!- jbooth1 [~jay@209.249.216.2] has left #go-nuts []
22:57 -!- Sep102 [~Sep102@c-71-227-179-131.hsd1.wa.comcast.net] has quit [Read
error: Connection reset by peer]
22:57 -!- sacho [~sacho@46.10.23.185] has joined #go-nuts
22:58 -!- Sep102 [~Sep102@c-71-227-179-131.hsd1.wa.comcast.net] has joined
#go-nuts
23:01 -!- pr [phil@unaffiliated/pr] has joined #go-nuts
23:02 -!- Slant [~scott@124-148-144-228.dyn.iinet.net.au] has quit [Quit: Slant]
23:14 -!- NiteRain [~kvirc@c-98-254-236-21.hsd1.fl.comcast.net] has joined
#go-nuts
23:22 < serialhex> when using bufio.Readline() how do i know when i've
reached the end of the file??
23:24 -!- vinisterx [~ryan@74-128-48-122.dhcp.insightbb.com] has joined #go-nuts
23:24 < Phelps> is there an ftp package for Go?
23:24 -!- ancientlore [~ancientlo@63.76.22.10] has quit [Quit: ~ Trillian Astra -
www.trillian.im ~]
23:25 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has quit [Read error:
Operation timed out]
23:29 -!- vinisterx [~ryan@74-128-48-122.dhcp.insightbb.com] has quit [Ping
timeout: 244 seconds]
23:30 -!- danilo04 [~danilo04@66.44.225.80] has quit [Quit: Leaving]
23:32 -!- Andy_S [~kvirc@222.129.41.248] has quit [Read error: Connection reset by
peer]
23:34 -!- Andy_S [~kvirc@222.129.42.255] has joined #go-nuts
23:35 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has joined #go-nuts
23:37 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has joined
#go-nuts
23:39 -!- Andy_S [~kvirc@222.129.42.255] has quit [Ping timeout: 263 seconds]
23:40 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has joined
#go-nuts
23:41 -!- Andy_S [~kvirc@222.129.42.255] has joined #go-nuts
23:43 -!- cmike_ [~mcrosby@c-71-57-13-183.hsd1.il.comcast.net] has joined #go-nuts
--- Log closed Fri Jul 01 00:00:54 2011