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

--- Log opened Sun May 29 00:00:51 2011
00:12 -!- brandini [~orbit@adsl-69-221-167-43.dsl.akrnoh.ameritech.net] has quit
[Changing host]
00:12 -!- brandini [~orbit@metabug/brandon] has joined #go-nuts
00:22 -!- hungrygruffalo
[~hungrygru@host86-161-13-173.range86-161.btcentralplus.com] has quit [Quit:
00:23 -!- ccc [~ron@c-76-26-54-186.hsd1.fl.comcast.net] has left #go-nuts
["Konversation terminated!"]
00:31 -!- brtk_ [~brtk@c83-248-35-158.bredband.comhem.se] has quit [Ping timeout:
250 seconds]
00:34 -!- bugQ [~bug@c-67-186-255-54.hsd1.ut.comcast.net] has quit [Ping timeout:
252 seconds]
00:41 -!- bugQ [~bug@c-67-186-255-54.hsd1.ut.comcast.net] has joined #go-nuts
00:49 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has quit
[Ping timeout: 276 seconds]
01:04 -!- foocraft [~ewanas@] has joined #go-nuts
01:20 -!- aho [~nya@fuld-590c7272.pool.mediaWays.net] has quit [Quit:
01:36 -!- mgray [~mgray@li226-224.members.linode.com] has joined #go-nuts
01:40 -!- bickfordb [~bran@70-36-197-162.dsl.dynamic.sonic.net] has joined
01:48 < nictuku> were type specs in the form of "typeA|typeB" ever
01:49 < nictuku> and is there a name for this in language design?
01:50 < kevlar> nictuku: I don't understand the question
01:50 < nictuku> kevlar, https://gist.github.com/997386
01:50 < kevlar> are you asking if you can make a function argument that
allows one of a given list of types?
01:50 < nictuku> no
01:51 < nictuku> I'm asking if this was ever proposed by another naive
01:51 < nsf> looks ugly I must say
01:51 < nsf> but there was a fuzz about something like that I'm sure
01:51 < kevlar> I agree, and it can (and should) be done with interfaces
01:51 < nsf> type safe unions or something
01:51 < nsf> variant types
01:52 < nictuku> kevlar, interfaces don't help with the second example.
01:53 < kevlar> I'm purposefully ignoring the second example because it
falls into the context of generics.
01:53 < nictuku> no, that is clearly not generics.
01:54 < kevlar> how is it not generics?
01:54 < kevlar> it's asking the compiler to generate code for
identically-named functions for different types
01:54 -!- rputikar [~240182H@203-59-121-184.dyn.iinet.net.au] has joined #go-nuts
01:56 < exch> that scenario would be better served by generics
01:56 < nictuku> exch, sure.
01:56 < kevlar> nictuku: I'm going to give you the same advice I always give
when anyone brings up questions relating to the current Go system:
01:57 < nictuku> thanks to nsf I found a few discussions on the list now, by
searching for [union types]
01:57 -!- sunfmin [~sunfmin@] has joined #go-nuts
01:57 < exch> mm unions would be nice
01:57 < kevlar> Go write code with it, and when you find something that you
can't do, bring it to us.
01:57 < nictuku> kevlar, what an annoying attitude.
01:57 < nsf> or I have a better advice
01:57 < nsf> figure out how would you implement your feature
01:58 < kevlar> nictuku: the problem is, when you're new to Go, you still
think like whatever your favorite language is
01:58 < nsf> because knowing that unveils some stuff sometimes
01:58 < nictuku> kevlar, why are you assuming I'm new to go?
01:58 < kevlar> so you might think that generics are the best way to solve
it, when in actuality you wouldn't go about it like that at all in Go.
01:58 < nictuku> nsf, that's a good advise.
01:59 < nictuku> kevlar, you're adopting the usual tone of this channel,
which is to try to patronize everyone by saying "you're not thinking the go way,
which is the right way".  Stop doing that.
01:59 < kevlar> nictuku: since you're not one of the inventors of the
language, I can pretty safely call you "new" to go for some suitable definition of
02:00 < nictuku> kevlar, you're probably newer to the language than me.  :-P
02:00 < kevlar> nictuku: Doubtful.
02:00 < nsf> haha
02:00 < nsf> who cares who's new, who's not
02:00 < str1ngs> nictuku:
02:00 < nsf> what does it change?
02:00 < nictuku> str1ngs, hi
02:01 < str1ngs> nictuku: apply the language then if you have problems
addres them
02:02 < niemeyer> nictuku: FWIW, it's not just "patronizing" (whatever that
means)..  every language has custom idioms
02:02 < niemeyer> nictuku: So in some cases in may be worth paying attention
when folks say there's a slightly different way to achieve some result
02:03 -!- hallas [~hallas@x1-6-30-46-9a-b2-c5-1f.k891.webspeed.dk] has quit [Ping
timeout: 260 seconds]
02:03 < str1ngs> niemeyer: and often that way is alot easier then you
originally envisioned.
02:03 < nictuku> niemeyer, sure.  I'm all ears.  How would you write the
sort package to be able to sort on all builtin types?
02:03 < kevlar> with generics.
02:03 < nictuku> kevlar, is that available?
02:03 < kevlar> because then it can work on non-basic types too.
02:03 < nictuku> no.
02:03 < kevlar> !gofaq generics
02:03 < GoBIR> kevlar: Q. generics -
02:04 < niemeyer> nictuku: I would use the sort package.
02:05 < niemeyer> nictuku: Rather than writing it.
02:05 < nictuku> niemeyer, can you use it as is to sort []byte without
having to write boiler plate?
02:07 < nictuku> kevlar, generics is a different scope of what I'm
discussing (note, I'm not even proposing).
02:07 < niemeyer> nictuku: I would write the three functions which take to
sort whatever type I want, in less time it's taking to debate that with you.
02:08 < nictuku> I'm sorry for using your time.
02:09 < niemeyer> nictuku: I wasn't blaming you for using my time, I was
using the time of our conversation as a time reference.
02:10 < niemeyer> nictuku: Explaining something to someone on IRC and then
blame *them* for that would be pretty strange.
02:11 < kevlar> I think what you are proposing is essentially iterated
02:11 < nictuku> It sounded strange.
02:11 < niemeyer> nictuku: That's because you misunderstood what I meant.
02:12 < niemeyer> nictuku: But in essence I was answering your precise
02:14 < nictuku> it turns out this is being worked on by the team already.
02:14 < nictuku> s/worked on/considered/
02:15 < nictuku> maybe I could help.  yay.
02:22 < niemeyer> nictuku: That would be awesome
02:33 -!- alexc [~alexc@unaffiliated/alexc] has joined #go-nuts
02:38 -!- bickfordb [~bran@70-36-197-162.dsl.dynamic.sonic.net] has quit [Ping
timeout: 260 seconds]
02:47 -!- wwkeyboard [~wwkeyboar@75-1-145-222.lightspeed.snantx.sbcglobal.net] has
joined #go-nuts
02:55 -!- foocraft [~ewanas@] has quit [Quit: Leaving]
02:58 -!- Omnivore [~Omnivore@adsl-75-18-198-192.dsl.pltn13.sbcglobal.net] has
joined #go-nuts
02:58 -!- foocraft [~ewanas@] has joined #go-nuts
03:15 < Omnivore> anyone here familiar with installing packages on windows 7
via goinstall?
03:18 -!- rputikar [~240182H@203-59-121-184.dyn.iinet.net.au] has quit [Quit:
03:24 < Ekspluati> Omnivore, I've used it once
03:24 < Omnivore> did you have trouble with the paths (having both \ and /)?
03:25 < Ekspluati> No if I remember correctly
03:25 -!- wwkeyboard [~wwkeyboar@75-1-145-222.lightspeed.snantx.sbcglobal.net] has
quit [Quit: wwkeyboard]
03:26 < Omnivore> it seems like gopack worked ok, but the very next command,
looks like a file copy, bombed out
03:27 < Omnivore> I manually copied the .a file over to the pkg/xxx dir but
unsure if its usable or if I'm doing something really wrong
03:28 < nictuku> sorry to resurrect the union types subject, but from what I
see the team is unsure if union types would help that much, saying only things the
ast package would benefit.  But I disagree, and documented a few more cases here
03:28 -!- wwkeyboard [~wwkeyboar@75-1-145-222.lightspeed.snantx.sbcglobal.net] has
joined #go-nuts
03:29 < nictuku> strconv, maybe json, and several other packages could get
their implementation and maybe interfaces simplified.
03:34 < nictuku> hmm actually all my points were already raised before.  all
of them.
03:34 < nictuku> rsc even says "I'm skeptical thatit would include an error
for a missing case in a type switch."
03:37 -!- tobym [~tobym@cpe-72-229-2-6.nyc.res.rr.com] has quit [Ping timeout: 258
03:39 -!- nictuku [~nict@unaffiliated/nictuku] has quit [Quit: .]
03:46 -!- hargettp [~hargettp@pool-71-184-185-93.bstnma.east.verizon.net] has quit
[Quit: Leaving...]
03:47 -!- alexc [~alexc@unaffiliated/alexc] has quit [Quit: WeeChat 0.3.4]
03:49 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has joined #go-nuts
03:56 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has joined
03:58 -!- bickfordb [~bran@70-36-197-162.dsl.dynamic.sonic.net] has joined
04:02 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has quit [Read error:
Connection reset by peer]
04:03 -!- bickfordb [~bran@70-36-197-162.dsl.dynamic.sonic.net] has quit [Ping
timeout: 260 seconds]
04:04 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has joined #go-nuts
04:12 -!- rejb [~rejb@unaffiliated/rejb] has quit [Disconnected by services]
04:12 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
04:16 -!- Ekspluati [5b9a0fda@gateway/web/freenode/ip.] has quit
[Ping timeout: 252 seconds]
04:16 -!- grncdr [~stephen@sdo.csc.UVic.CA] has quit [Read error: Operation timed
04:24 -!- wwkeyboard [~wwkeyboar@75-1-145-222.lightspeed.snantx.sbcglobal.net] has
quit [Quit: wwkeyboard]
04:33 -!- adlan [~adlan@] has joined #go-nuts
04:41 -!- angasule [~angasule@] has quit [Remote host closed the
04:50 -!- alexc [~alexc@unaffiliated/alexc] has joined #go-nuts
05:15 -!- telexicon [~telexicon@unaffiliated/chowmeined] has quit [Read error:
Connection reset by peer]
05:16 -!- telexicon [~telexicon@unaffiliated/chowmeined] has joined #go-nuts
05:17 -!- telexicon_ [~telexicon@c-67-160-127-145.hsd1.wa.comcast.net] has joined
05:20 -!- telexicon__ [~telexicon@c-67-160-127-145.hsd1.wa.comcast.net] has joined
05:20 -!- telexicon [~telexicon@unaffiliated/chowmeined] has quit [Ping timeout:
252 seconds]
05:23 -!- telexicon_ [~telexicon@c-67-160-127-145.hsd1.wa.comcast.net] has quit
[Ping timeout: 252 seconds]
05:24 -!- bugQ [~bug@c-67-186-255-54.hsd1.ut.comcast.net] has quit [Remote host
closed the connection]
05:51 -!- niemeyer [~niemeyer@200-102-196-125.pltce701.dsl.brasiltelecom.net.br]
has quit [Ping timeout: 240 seconds]
06:02 -!- pamera [~Pam@c-76-102-255-99.hsd1.ca.comcast.net] has left #go-nuts []
06:16 -!- ios_ [~ios@] has joined #go-nuts
06:20 -!- photron [~photron@port-92-201-136-197.dynamic.qsc.de] has joined
06:22 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has quit
[Ping timeout: 276 seconds]
06:33 -!- piranha [~piranha@5ED43A0B.cm-7-5a.dynamic.ziggo.nl] has joined #go-nuts
06:34 -!- noam [noam@] has quit [Ping timeout: 250
06:36 -!- ronnyy [~quassel@p4FF1C512.dip0.t-ipconnect.de] has joined #go-nuts
06:40 -!- noam [noam@] has joined #go-nuts
06:42 -!- adlan [~adlan@] has quit [Read error: Connection timed out]
06:43 -!- adlan [~adlan@] has joined #go-nuts
06:44 -!- ronnyy [~quassel@p4FF1C512.dip0.t-ipconnect.de] has quit [Remote host
closed the connection]
06:44 -!- ronnyy [~quassel@p4FF1C512.dip0.t-ipconnect.de] has joined #go-nuts
06:57 -!- coderendezvous [~coderende@adsl-98-66-2-41.mem.bellsouth.net] has joined
06:59 -!- adlan [~adlan@] has quit [Ping timeout: 260 seconds]
07:01 -!- napsy [~luka@] has quit [Quit: Lost terminal]
07:03 -!- adlan [~adlan@] has joined #go-nuts
07:07 -!- sebastianskejoe [~sebastian@] has joined #go-nuts
07:12 -!- LeNsTR [~lenstr@unaffiliated/lenstr] has joined #go-nuts
07:15 -!- coderendezvous [~coderende@adsl-98-66-2-41.mem.bellsouth.net] has quit
[Quit: Leaving]
07:29 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
07:40 -!- mgray [~mgray@li226-224.members.linode.com] has quit [Quit: Lost
07:40 -!- adlan [~adlan@] has quit [Ping timeout: 240 seconds]
07:41 -!- adlan [~adlan@] has joined #go-nuts
07:44 -!- ShadowIce
[~pyoro@HSI-KBW-109-193-120-162.hsi7.kabel-badenwuerttemberg.de] has joined
07:44 -!- ShadowIce
[~pyoro@HSI-KBW-109-193-120-162.hsi7.kabel-badenwuerttemberg.de] has quit
[Changing host]
07:44 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
07:48 -!- georgezhou [480ee599@gateway/web/freenode/ip.] has joined
07:51 -!- XenoPhoenix [~Xeno@cpc13-aztw24-2-0-cust23.aztw.cable.virginmedia.com]
has quit [Remote host closed the connection]
07:51 -!- ronnyy [~quassel@p4FF1C512.dip0.t-ipconnect.de] has quit [Remote host
closed the connection]
08:00 -!- Tv [~Tv@cpe-76-168-227-45.socal.res.rr.com] has quit [Ping timeout: 248
08:02 -!- adlan [~adlan@] has quit [Read error: Connection timed out]
08:03 -!- adlan [~adlan@] has joined #go-nuts
08:07 -!- Adys [~Adys@unaffiliated/adys] has quit [Ping timeout: 246 seconds]
08:10 -!- Ekspluati [5b9a0fda@gateway/web/freenode/ip.] has joined
08:21 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts
08:23 -!- Adys [~Adys@unaffiliated/adys] has quit [Read error: Connection reset by
08:24 -!- mikespook [~mikespook@] has quit [Ping timeout: 240
08:24 -!- mikespook [~mikespook@] has joined #go-nuts
08:28 < Omnivore> Where can I find a good VMware-player image to use as base
for go experimentation/development?
08:31 < taruti> why do you need vmware?
08:32 < Omnivore> I run windows and the windows build tools for go are a bit
on the iffy side
08:35 -!- alexc [~alexc@unaffiliated/alexc] has quit [Quit: WeeChat 0.3.4]
08:40 -!- Ekspluati_ [5b9a0fda@gateway/web/freenode/ip.] has joined
08:43 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.5]
08:43 -!- Ekspluati [5b9a0fda@gateway/web/freenode/ip.] has quit
[Ping timeout: 252 seconds]
09:00 -!- XenoPhoenix [~Xeno@cpc13-aztw24-2-0-cust23.aztw.cable.virginmedia.com]
has joined #go-nuts
09:04 -!- adlan [~adlan@] has quit [Ping timeout: 276 seconds]
09:08 -!- adlan [~adlan@] has joined #go-nuts
09:13 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has quit [Ping timeout:
608 seconds]
09:17 -!- rcrowley [~rcrowley@c-71-202-44-233.hsd1.ca.comcast.net] has joined
09:21 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts
09:28 -!- adlan [~adlan@] has quit [Remote host closed the
09:41 -!- huin [~huin@] has joined #go-nuts
09:43 -!- tobier [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
joined #go-nuts
09:44 -!- tobier_ [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
quit [Read error: Operation timed out]
09:46 -!- adlan [~adlan@] has joined #go-nuts
09:47 -!- tobier [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
quit [Read error: Operation timed out]
09:48 -!- tobier [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
joined #go-nuts
09:52 -!- TheMue [~TheMue@p5DDF753A.dip.t-dialin.net] has joined #go-nuts
09:55 -!- ithkuil [~marko@host27-203-dynamic.27-79-r.retail.telecomitalia.it] has
joined #go-nuts
09:57 -!- Omnivore [~Omnivore@adsl-75-18-198-192.dsl.pltn13.sbcglobal.net] has
quit [Read error: Connection reset by peer]
09:58 -!- napsy [~luka@] has joined #go-nuts
09:59 < napsy> Hello.  Can I cast a map to a structure?
10:01 < Ekspluati_> napsy, I don't think so.
10:03 -!- Omnivore [~Omnivore@adsl-75-18-198-192.dsl.pltn13.sbcglobal.net] has
joined #go-nuts
10:04 < TheMue> napsy: How should this work?  Any key representing an
element of the struct?
10:05 < napsy> TheMue: yes, I'm decoding a JSON data and need to map data to
10:05 < napsy> where the JSCON data has an array of different "structure"
10:06 < TheMue> napsy: Why the map?  Doesn't the json package work for you?
10:06 < napsy> oh, there's Unmarshall
10:06 < napsy> maybe this is it
10:07 < napsy> hm but I already decoded the data and get a map[string]
string object
10:07 -!- ExsysTech [~ExsysTech@50-46-213-60.evrt.wa.frontiernet.net] has quit
[Read error: Connection reset by peer]
10:07 < TheMue> OK, you could create the struct variable first, then range
over the map and use the reflect package.
10:08 < TheMue> In both cases the elements of the struct have to be exported
(uppercased first char).
10:08 < napsy> yes I understand that ...  well I'll try with reflect then
10:08 -!- edsrzf [~edsrzf@122-61-221-144.jetstream.xtra.co.nz] has quit [Remote
host closed the connection]
10:09 -!- ExsysTech [~ExsysTech@50-46-213-60.evrt.wa.frontiernet.net] has joined
10:10 < napsy> http://pastie.org/private/k9jliylq5b0a7y3nhrkyg
10:10 -!- awidegreen [~quassel@h-170-226.A212.priv.bahnhof.se] has quit [Remote
host closed the connection]
10:10 < napsy> I have this data, the problem is with "Steps" because the
json parser returns a type of map[string] map[string]string
10:10 < napsy> but I want to map the steps in the table to structures.
10:11 < napsy> There probably isn't an automated way of doing this, isn't
10:12 -!- vdrab [~vdrab@pd36944.kyotnt01.ap.so-net.ne.jp] has joined #go-nuts
10:16 -!- vdrab [~vdrab@pd36944.kyotnt01.ap.so-net.ne.jp] has quit [Client Quit]
10:18 -!- th0re [~thre@] has joined #go-nuts
10:20 < TheMue> napsy: AFAIK no, but the range and reflect way.
10:23 < napsy> ok thanks
10:28 -!- th0re [~thre@] has quit [Ping timeout: 240 seconds]
10:29 -!- tobier_ [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
joined #go-nuts
10:29 -!- awidegreen [~quassel@h-170-226.A212.priv.bahnhof.se] has joined #go-nuts
10:32 -!- tobier [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
quit [Read error: Operation timed out]
10:34 -!- boscop [~boscop@unaffiliated/boscop] has quit [Read error: Connection
reset by peer]
10:35 -!- tobier [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
joined #go-nuts
10:36 -!- tobier_ [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
quit [Read error: Operation timed out]
10:41 -!- boscop [~boscop@unaffiliated/boscop] has joined #go-nuts
10:42 -!- rputikar [~240182H@203-59-121-184.dyn.iinet.net.au] has joined #go-nuts
10:44 -!- alexc [~alexc@unaffiliated/alexc] has joined #go-nuts
10:50 -!- tobier_ [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
joined #go-nuts
10:50 -!- awidegreen [~quassel@h-170-226.A212.priv.bahnhof.se] has quit [Read
error: Connection reset by peer]
10:51 -!- tobier [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
quit [Read error: Operation timed out]
10:52 -!- awidegreen [~quassel@h-170-226.A212.priv.bahnhof.se] has joined #go-nuts
10:54 -!- rputikar [~240182H@203-59-121-184.dyn.iinet.net.au] has quit [Quit:
11:09 -!- Project_2501 [~Marvin@] has joined #go-nuts
11:10 -!- noam [noam@] has quit [Ping timeout: 240
11:14 -!- sebastianskejoe [~sebastian@] has quit [Quit: Lost terminal]
11:14 -!- gummibr [~gummibr@dslb-088-067-161-012.pools.arcor-ip.net] has joined
11:19 -!- foocraft [~ewanas@] has quit [Ping timeout: 240 seconds]
11:28 -!- noam [noam@] has joined #go-nuts
11:31 -!- gummibr [~gummibr@dslb-088-067-161-012.pools.arcor-ip.net] has quit
[Ping timeout: 260 seconds]
11:32 -!- gummibr [~gummibr@dslb-088-067-161-012.pools.arcor-ip.net] has joined
11:40 -!- Kissaki [~Kissaki@tango076.server4you.de] has quit [Read error:
Connection reset by peer]
11:43 -!- alexc [~alexc@unaffiliated/alexc] has quit [Quit: WeeChat 0.3.4]
11:44 -!- alexc [~alexc@unaffiliated/alexc] has joined #go-nuts
11:45 -!- hargettp [~hargettp@pool-71-184-185-93.bstnma.east.verizon.net] has
joined #go-nuts
11:45 -!- tobier [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
joined #go-nuts
11:45 -!- tobier_ [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
quit [Read error: Operation timed out]
11:53 -!- tobier [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
quit [Read error: Operation timed out]
11:53 -!- tobier_ [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
joined #go-nuts
11:56 -!- coudX [~coud@] has joined #go-nuts
12:00 -!- rputikar [~240182H@203-59-121-184.dyn.iinet.net.au] has joined #go-nuts
12:01 -!- Ekspluati_ [5b9a0fda@gateway/web/freenode/ip.] has quit
[Quit: Page closed]
12:03 -!- noam [noam@] has quit [Ping timeout: 260
12:04 -!- ios_ [~ios@] has quit [Quit: Leaving]
12:09 -!- noam [noam@] has joined #go-nuts
12:10 -!- wwkeyboard [~wwkeyboar@75-1-145-222.lightspeed.snantx.sbcglobal.net] has
joined #go-nuts
12:10 -!- alexc [~alexc@unaffiliated/alexc] has quit [Quit: WeeChat 0.3.4]
12:14 -!- tobier [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
joined #go-nuts
12:15 -!- tobier_ [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
quit [Read error: Operation timed out]
12:19 -!- tobier [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
quit [Read error: Operation timed out]
12:19 -!- tobier [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
joined #go-nuts
12:22 -!- tobier [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
quit [Read error: Operation timed out]
12:22 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has joined
12:24 -!- tobier [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
joined #go-nuts
12:26 -!- Paradox924X [~Paradox92@c-68-35-229-34.hsd1.fl.comcast.net] has quit
[Ping timeout: 246 seconds]
12:29 -!- tobier [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
quit [Read error: Operation timed out]
12:29 -!- tobier [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
joined #go-nuts
12:30 -!- hallas [~hallas@x1-6-30-46-9a-b2-c5-1f.k891.webspeed.dk] has joined
12:41 -!- tobier_ [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
joined #go-nuts
12:41 -!- tobier [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
quit [Read error: Operation timed out]
12:45 -!- noam [noam@] has quit [Read error:
Connection reset by peer]
12:45 -!- noam [noam@] has joined #go-nuts
12:46 -!- tobier_ [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
quit [Read error: Operation timed out]
12:46 -!- tobier [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
joined #go-nuts
12:49 -!- cenuij [~cenuij@] has joined #go-nuts
12:49 -!- cenuij [~cenuij@] has quit [Changing host]
12:49 -!- cenuij [~cenuij@base/student/cenuij] has joined #go-nuts
12:54 -!- tobier_ [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
joined #go-nuts
12:55 -!- tobier [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
quit [Read error: Operation timed out]
12:56 -!- tobier_ [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
quit [Read error: Operation timed out]
12:59 -!- tobier [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
joined #go-nuts
13:03 -!- noam [noam@] has quit [Read error:
Connection reset by peer]
13:03 -!- noam [noam@] has joined #go-nuts
13:05 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has quit [Remote host
closed the connection]
13:39 -!- sebastianskejoe [~sebastian@] has joined #go-nuts
13:50 -!- gummibr [~gummibr@dslb-088-067-161-012.pools.arcor-ip.net] has quit
[Ping timeout: 255 seconds]
13:51 -!- gummibr [~gummibr@dslb-088-067-161-012.pools.arcor-ip.net] has joined
13:54 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has joined #go-nuts
14:04 -!- tobym [~tobym@cpe-72-229-2-6.nyc.res.rr.com] has joined #go-nuts
14:05 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has quit
[Ping timeout: 264 seconds]
14:06 -!- sebastianskejoe [~sebastian@] has quit [Quit: Lost terminal]
14:12 -!- angasule [~angasule@] has joined #go-nuts
14:16 < KBme> hi
14:16 < KBme> i'm having troubles compiling the release
14:16 < KBme> go/src/cmd/gc/go.h:1148:6: note: expected 'char *' but
argument is of type 'const char *'
14:16 < KBme> also, cc1: warnings being treated as errors
14:17 -!- twolfe18 [~twolfe18@c-71-61-180-11.hsd1.pa.comcast.net] has joined
14:18 < KBme> http://paste.pocoo.org/show/397127/
14:24 < KBme> ok, well, the tip is compiling fine
14:25 -!- brtk_ [~brtk@c83-248-35-158.bredband.comhem.se] has joined #go-nuts
14:26 -!- napsy [~luka@] has quit [Quit: Lost terminal]
14:28 -!- twolfe18 [~twolfe18@c-71-61-180-11.hsd1.pa.comcast.net] has quit [Quit:
14:35 -!- napsy [~luka@] has joined #go-nuts
14:35 < KBme> but it's buggy
14:36 < KBme> damn it
14:44 -!- moraes [~moraes@] has quit [Ping timeout: 255 seconds]
14:45 -!- bugQ [~bug@c-67-186-255-54.hsd1.ut.comcast.net] has joined #go-nuts
14:49 -!- moraes [~moraes@] has joined #go-nuts
14:51 < str1ngs> KBme: what version of gcc?
14:52 -!- ronnyy [~quassel@p4FF1C512.dip0.t-ipconnect.de] has joined #go-nuts
14:52 < KBme> 4.5.2
14:52 < str1ngs> KBme: and bison?
14:53 < KBme> 2.5
14:53 < str1ngs> iirc that a bug in bison 2.5
14:53 < KBme> i removed -Werr from quietgcc.bash and the installation
completed fine
14:53 < str1ngs> tip has a fix for it.  so you will have to sue that for now
14:53 < str1ngs> or that
14:53 < KBme> ☺
14:53 < str1ngs> or remove -Werror
14:53 < KBme> sorry, that
14:54 < KBme> i don't remember all the stupid gcc flags
14:54 < str1ngs> I'm not sure if this is a bug with bison yet so do not
qoute me on it
14:54 < str1ngs> -Werror is very strict but intended I think
14:54 < KBme> well, tip does have a fix for it so that's fine, but tip had
an other bug so i couldn't use it
14:54 < str1ngs> what bugs?
14:58 < KBme> not really bugs
14:58 < KBme> more like the package I'm trying to install wouldn't compile
with it
14:59 < str1ngs> KBme: ok turns out the bison issues was a go bug that shows
up with bison 2.5.  so that is a proper fix
15:00 < str1ngs> http://code.google.com/p/go/issues/detail?id=1843
15:00 < str1ngs> so maybe that fix should be back ported to release.
15:00 < str1ngs> I'll mention it in the issue
15:02 -!- wwkeyboard [~wwkeyboar@75-1-145-222.lightspeed.snantx.sbcglobal.net] has
quit [Quit: wwkeyboard]
15:04 -!- bickfordb [~bran@70-36-197-162.dsl.dynamic.sonic.net] has joined
15:04 < str1ngs> KBme: I updated the issue, but my guess is removing -WError
for now until a new release is the best option
15:05 < str1ngs> as for the other packages I try to push fixes upstream for
those if I can.  generally gofix solves most of it
15:07 < str1ngs> KBme: if its just one package I can look at it quickly if
you like?
15:08 -!- tobym [~tobym@cpe-72-229-2-6.nyc.res.rr.com] has quit [Ping timeout: 260
15:09 < KBme> yeah, i'm fixing the packages right now
15:09 < str1ngs> ok
15:09 < KBme> and submitting bugreports as I go
15:09 < str1ngs> nice, thank you
15:10 < KBme> i'm trying to install bitbucket.com/mpl/xplor
15:11 -!- gummibr [~gummibr@dslb-088-067-161-012.pools.arcor-ip.net] has quit
[Ping timeout: 240 seconds]
15:12 -!- gummibr [~gummibr@dslb-088-067-161-012.pools.arcor-ip.net] has joined
15:12 < str1ngs> is that right say unknown repositroy
15:13 < KBme> uhh
15:13 < KBme> https://bitbucket.org/mpl/xplor/wiki/Home
15:13 -!- aho [~nya@fuld-590c7632.pool.mediaWays.net] has joined #go-nuts
15:13 < KBme> should be, yeah
15:14 < str1ngs> hmm strange could have been a white space
15:18 -!- wwkeyboard [~wwkeyboar@75-1-145-222.lightspeed.snantx.sbcglobal.net] has
joined #go-nuts
15:18 < str1ngs> goplan9.googlecode.com/hg/plan9/client seems to be the
15:18 < str1ngs> KBme: gofix dial.go
15:18 < str1ngs> should resolve that
15:19 < KBme> yes
15:19 < KBme> ah
15:19 < KBme> well i did it manually
15:19 < KBme> but it might not be working
15:21 < KBme> yeah, i did the same thing
15:23 < str1ngs> ya might be easier to clone those locally for now and
install them
15:23 < str1ngs> but the name spaces might break
15:23 < str1ngs> I pushed the plan9 fix to github
15:24 -!- nictuku [~nict@unaffiliated/nictuku] has joined #go-nuts
15:24 < str1ngs> man I such with hg hehe
15:24 < str1ngs> suck*
15:24 -!- sunfmin [~sunfmin@] has quit [Quit: sunfmin]
15:25 < KBme> me too ☺
15:25 < KBme> huh to github?
15:25 < KBme> i submitted the fix as a bugreport
15:25 < str1ngs> there was no fork option for plan9 package
15:25 < KBme> also have forked xplor and will make a pull request now that i
know it works
15:26 < str1ngs> ok thanks saves me making a bitbucket account
15:27 < KBme> sucks that he doesn't have the issue tracker enabled though,
seems like a big overkill to have to fork to submit a patch
15:27 < str1ngs> KBme: who is acme btw been meaning to try it out
15:27 < KBme> who?
15:27 < str1ngs> how*
15:27 < KBme> where?  what?
15:27 < KBme> oh
15:27 < KBme> acme is the most awesome ide ☺
15:27 -!- gummibr [~gummibr@dslb-088-067-161-012.pools.arcor-ip.net] has quit
[Ping timeout: 252 seconds]
15:28 < str1ngs> I just woke up, cut me some slack.  pumping dark roast into
me still :P
15:28 < KBme> i've been using it for something like 10 years now
15:28 < KBme> i always try the new fad ide
15:28 -!- gummibr [~gummibr@dslb-088-067-161-012.pools.arcor-ip.net] has joined
15:28 < KBme> and always go back to acme
15:28 < KBme> it's fast and usefull
15:28 < taruti> acme <3
15:28 < KBme> with no useless stupid features
15:28 < str1ngs> what OS are you using I found it hard to find linux package
for my distro
15:28 < KBme> there is no package, just use p9p
15:28 < taruti> str1ngs: just use p9p
15:28 < KBme> it installs just like go
15:29 < KBme> swtch.com
15:29 < str1ngs> oh nice
15:29 < str1ngs> will check it out
15:29 < KBme> though xplor is very much needed in these modern days where a
project has so many directories
15:30 < str1ngs> what is p9p?
15:30 < taruti> I actually prefer a win with a few strategical ls
15:30 -!- tobym [~tobym@cpe-72-229-2-6.nyc.res.rr.com] has joined #go-nuts
15:31 -!- bugQ [~bug@c-67-186-255-54.hsd1.ut.comcast.net] has quit [Ping timeout:
260 seconds]
15:31 < KBme> str1ngs, plan9ports, the plan9 userspace for lunix systems
15:31 -!- napsy [~luka@] has quit [Quit: Lost terminal]
15:31 < str1ngs> ah ok thought it was plan9 userspace but was not sure
15:31 < KBme> yep
15:32 < KBme> it takes a bit of getting used to for someone comming from the
modern unix desktop world
15:32 < KBme> there is no real gui
15:32 < KBme> just windows and text
15:32 < KBme> and chording
15:33 < str1ngs> ok I have p9p but how do I install acme now?
15:33 < KBme> install p9p
15:33 < KBme> then you'll have acme
15:34 < KBme> it's part of p9p
15:34 < str1ngs> doh
15:34 < KBme> ☺
15:34 < str1ngs> its installed then :P
15:34 < KBme> so type acme ;)
15:34 < str1ngs> actuall I'm use to used to using just consoles
15:34 < str1ngs> yay it works!
15:34 -!- Tv [~Tv@cpe-76-168-227-45.socal.res.rr.com] has joined #go-nuts
15:35 -!- Tv [~Tv@cpe-76-168-227-45.socal.res.rr.com] has left #go-nuts []
15:35 -!- Tv [~Tv@cpe-76-168-227-45.socal.res.rr.com] has joined #go-nuts
15:35 < str1ngs> thanks I was looking at acme-sac this was much easier
15:35 < KBme> 'well, acme-sac is portable which is nice about it
15:36 < KBme> but it doesn't tie into the underlying os as well since it
runs in the inferno virtual machine
15:37 < str1ngs> this is going to sound silly.  is there a vi mode plugin?
15:37 < str1ngs> or vim as you wil
15:37 < str1ngs> will*
15:37 < taruti> :D
15:37 < taruti> no :D
15:37 < str1ngs> no!
15:37 < str1ngs> I'm lost without vi like bindings :(
15:38 < str1ngs> I even use set -o vi in bash
15:38 < KBme> lol
15:38 < str1ngs> I will still try it though :P
15:38 < KBme> yeah, well, this is a graphical editor
15:41 < aiju> set -o vi drives me crazy
15:43 < str1ngs> ya I dont expect most people to use set -o vi
15:46 -!- tobier_ [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
joined #go-nuts
15:46 < str1ngs> I actually use set editing-mode vi . for .inputrc so I get
vi bindings in most things readline
15:46 -!- tobier [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
quit [Read error: Operation timed out]
15:47 < aiju> you could try adding vi key bindings to 9term
15:47 < aiju> but rob is going to kill you
15:48 < str1ngs> haha
15:48 < str1ngs> hai I have a vi patch.  please accept!
15:48 < aiju> *getoutshotgun* BAM HEADSHOT
15:49 < str1ngs> you crazy plan9 guys!
15:52 < aiju> we have ported doom
15:52 < aiju> now we're all violent assholes
15:53 < str1ngs> whats the right way to throttle a for loop that uses
channels?  or is select enough?
15:57 -!- Adys [~Adys@unaffiliated/adys] has quit [Ping timeout: 246 seconds]
15:59 -!- gummibr [~gummibr@dslb-088-067-161-012.pools.arcor-ip.net] has quit
[Ping timeout: 276 seconds]
16:00 -!- hpvincent [~zig@nap13-11-83-156-121-34.fbx.proxad.net] has joined
16:00 < KBme> throttle?
16:01 -!- gummibr [~gummibr@dslb-088-067-161-012.pools.arcor-ip.net] has joined
16:02 < str1ngs> I'll put a test together will be easier to explain
16:03 -!- angasule [~angasule@] has quit [Ping timeout: 248 seconds]
16:03 -!- tobym [~tobym@cpe-72-229-2-6.nyc.res.rr.com] has quit [Ping timeout: 258
16:04 -!- rlab [~Miranda@] has joined #go-nuts
16:06 -!- DerHorst [~Horst@e177131018.adsl.alicedsl.de] has joined #go-nuts
16:08 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has quit [Ping
timeout: 248 seconds]
16:08 < str1ngs> actually throttle is the wrong term for this issue I'm
16:08 < str1ngs> https://gist.github.com/997898
16:08 < str1ngs> this is a simple netchan client server
16:09 < str1ngs> if I do not sleep at the end of the client.  the channel
seems to truncate
16:10 < str1ngs> netchan export: value decode:EOF; type chan string
16:10 < str1ngs> is the error I get
16:10 < str1ngs> if I sleep for one second its fine.
16:11 -!- telexicon [~telexicon@c-67-160-127-145.hsd1.wa.comcast.net] has quit
[Ping timeout: 252 seconds]
16:12 < Tv> str1ngs: sounds like you want Drain or its friends
16:13 < str1ngs> tried that does not see to help
16:13 < str1ngs> as fair as I can tell the client exits before the channel
properly sends
16:14 < str1ngs> so I need to figure out how to verify message <- m was
16:14 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has joined #go-nuts
16:14 < str1ngs> but I would think that would block?
16:15 -!- sacho [~sacho@] has joined #go-nuts
16:15 < Tv> message <- m will block long enough for the netchan machinery
to read it; not long enough for it to make it out to tcp
16:15 < Tv> Drain
16:16 < str1ngs> import has no drain option though
16:16 < str1ngs> and even when I use drain in the server for loop I get the
same result
16:16 < Tv> then you need the client to wait for a response
16:16 < Tv> what's "messages"?
16:16 < str1ngs> just a string
16:17 < Tv> you seem to be using it as both something .Push and a <-chan
16:17 < str1ngs> I save the string into a string vector on the server
16:19 < str1ngs> I guess I need a ok channel?
16:19 < Tv> how about you explain what you're trying to do?
16:20 < str1ngs> I have a server that listens on a unix socket.  and a
client that sends it messages
16:20 < str1ngs> the messages are plain strings.  which the sever then
stores in a string vector
16:20 < str1ngs> the messages are sent via netchan.
16:21 < Tv> you're describing how not what
16:21 < Tv> perhaps there's an easier way than manually building
acknowledgement mechanisms on top of netchan
16:21 < Tv> such as rpc
16:22 < str1ngs> I'd rathe not use rpc.  because netchan provides more
transport mechanisms
16:22 < str1ngs> ie the server can run on tcp etc
16:23 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts
16:23 < str1ngs> right now I just happen to use unix sockets.  but if I
change to tcp i get the same problem.
16:23 < Tv> you can run rpc on any ReadWriteCloser
16:23 -!- jtoy [~jtoy@li167-197.members.linode.com] has joined #go-nuts
16:23 < str1ngs> using channels though?
16:23 -!- niemeyer [~niemeyer@200-102-196-125.pltce701.dsl.brasiltelecom.net.br]
has joined #go-nuts
16:23 < Tv> i don't understand what you mean by that sentence
16:24 < jtoy> im learning go now, why does a new language like go require to
explicitly type return val at the end of functions?
16:24 < str1ngs> Tv: can I use channels with rpc?
16:24 < Tv> str1ngs: not for the actual data passed as args or return
16:24 < Tv> str1ngs: for between your rpc handler and the rest of your app,
16:25 < Tv> str1ngs: you can't put chans inside netchan messages either
16:25 < str1ngs> anyways.  lets say this is a exercise in go and netchan
16:26 < Tv> str1ngs: then you need to build an ack mechanism, if that's what
you need
16:26 < str1ngs> ok that makes more sense then
16:26 < str1ngs> but not what I would expect.
16:27 < Tv> str1ngs: you'll find netchan is very limited, and you'll hit the
limits fairly quickly if you try to go against the basics at all
16:27 < str1ngs> well I would think the basics are much like normally
channels no?
16:27 < Tv> normal channels never have their transport disappear
16:29 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
16:29 -!- wallerdev [~wallerdev@] has joined #go-nuts
16:30 < str1ngs> ack channel is not that bad now that I think about it
16:30 < str1ngs> I'll play with that then think more on if rpc would be
better for this.
16:31 < str1ngs> this is not a serious project was just an excuse to play
with netchan
16:31 < Tv> i was there some months ago, got frustrated with netchan..  ;)
16:31 < str1ngs> well I kinda like the idea of IPC with netchan
16:32 < str1ngs> atleast when I use a socket
16:34 -!- brandini [~orbit@metabug/brandon] has quit [Ping timeout: 240 seconds]
16:34 -!- angasule [~angasule@] has joined #go-nuts
16:37 -!- tobier [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
joined #go-nuts
16:37 -!- bickfordb [~bran@70-36-197-162.dsl.dynamic.sonic.net] has quit [Ping
timeout: 264 seconds]
16:38 -!- tobier_ [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
quit [Read error: Operation timed out]
16:40 -!- niemeyer [~niemeyer@200-102-196-125.pltce701.dsl.brasiltelecom.net.br]
has quit [Ping timeout: 240 seconds]
16:43 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has quit [Remote host
closed the connection]
16:43 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has joined #go-nuts
16:43 -!- rlab [~Miranda@] has quit [Read error: Connection reset by
16:47 -!- awidegreen [~quassel@h-170-226.A212.priv.bahnhof.se] has quit [Remote
host closed the connection]
16:48 -!- rputikar [~240182H@203-59-121-184.dyn.iinet.net.au] has quit [Quit:
16:48 -!- awidegreen [~quassel@h-170-226.A212.priv.bahnhof.se] has joined #go-nuts
16:52 < kevlar> str1ngs: I find gob over unix domain sockets work great for
16:52 < kevlar> and it's pretty easy to have a goroutine or two monitoring
the socket and passing stuff in and out on a channel.
16:53 -!- brandini [~orbit@adsl-69-221-174-224.dsl.akrnoh.ameritech.net] has
joined #go-nuts
16:53 < Tv> that + call a function on incoming message = rpc
16:53 < Tv> now if you only need one type of message per direction, raw gob
might be neater
16:54 < Tv> but rpc is just darn easy
16:55 -!- tobier_ [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
joined #go-nuts
16:56 -!- tobier [~tobier@c-1c9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
quit [Read error: Operation timed out]
16:57 < str1ngs> kevlar: Tv hmm maybe gob would be better
16:57 < str1ngs> I just took a look at doozer and it uses gob's also
16:58 -!- ako [~nya@fuld-590c67ae.pool.mediaWays.net] has joined #go-nuts
16:59 < str1ngs> I'm still going to play with this netchan for now.  I think
the importer helper connect might be subject to problem with my client.  I'll try
a manual dial see if that also helps
16:59 < Tv> has someone written a locking client on top of doozer yet?
17:00 -!- aho [~nya@fuld-590c7632.pool.mediaWays.net] has quit [Ping timeout: 240
17:03 < kevlar> Tv: what do you mean by a locking client?
17:03 < Tv> mutual exclusion with heartbeat etc
17:03 < kevlar> don't you just open/write a file and if you succeed you have
the lock?
17:03 < Tv> and then when you crash?
17:04 < kevlar> oh, duh, that would be a problem.
17:04 < Tv> zookeepers ephemeral idea is nice..  close tcp connection, lose
17:05 < kevlar> you could write a gob with your server ID and a timestamp,
and if your write fails, you retry every X seconds and if the timestamp hasn't
been updated you take over
17:05 < Tv> s/gob/json/ but yeah ;)
17:05 < kevlar> well, can't TCP take like up to 18 minutes to close a TCP
connection that closed uncleanly?
17:06 < Tv> kevlar: you can do pings inside the connection to detect it
17:06 < Tv> kevlar: the real difference is, others wanting the lock don't
need to fiddle with freshness checks, the server does it for them
17:06 < Tv> but i do like doozerd's simplicity
17:07 < kevlar> if anything, you'd want to write a client-side library that
can do various common doozer tasks, like locking.
17:07 < kevlar> s/you/I/
17:07 < Tv> yeah that's what i asked for, does it exist yet ;)
17:07 < Tv> the heroku guys said they kinda have something like that, just
not ready for release
17:07 < kevlar> oh, I thought you were looking for something that ran on the
server that did it.
17:07 < Tv> just saying that's the zk way
17:07 < kevlar> ah.
17:08 < kevlar> doozerd seems really neat.
17:08 < Tv> yea
17:08 < kevlar> I'd be curious to see how it compares to Google's chubby.
17:09 -!- twolfe18 [~twolfe18@c-71-61-180-11.hsd1.pa.comcast.net] has joined
17:17 -!- bickfordb [~bran@70-36-197-162.dsl.dynamic.sonic.net] has joined
17:21 -!- adlan [~adlan@] has quit [Ping timeout: 248 seconds]
17:21 -!- adlan [~adlan@] has joined #go-nuts
17:25 -!- piranha [~piranha@5ED43A0B.cm-7-5a.dynamic.ziggo.nl] has quit [Quit:
Computer has gone to sleep.]
17:26 -!- bugQ [~bug@c-67-186-255-54.hsd1.ut.comcast.net] has joined #go-nuts
17:30 -!- angasule [~angasule@] has quit [Ping timeout: 240 seconds]
17:36 -!- awidegreen [~quassel@h-170-226.A212.priv.bahnhof.se] has quit [Read
error: Operation timed out]
17:36 -!- ronnyy [~quassel@p4FF1C512.dip0.t-ipconnect.de] has quit [Remote host
closed the connection]
17:37 -!- awidegreen [~quassel@h-170-226.A212.priv.bahnhof.se] has joined #go-nuts
17:40 -!- gummibr [~gummibr@dslb-088-067-161-012.pools.arcor-ip.net] has quit
[Remote host closed the connection]
17:46 < jtoy> can channels work across go processes?
17:47 < Tv> jtoy: channels only exist inside a go process
17:47 < Tv> jtoy: netchan provides something similar over any bi-directional
stream, but it has more limitations
17:47 < jtoy> does go have some kind of cross language communication?
17:47 < jtoy> ah ok
17:47 < Tv> there's plenty of ways to talk between processes
17:48 < Tv> for cross-language, you probably want HTTP, these days..
17:48 < jtoy> i was wondering if its built into go like erlang
17:48 < nsf> jtoy: for cross language communication there is a go protobuf
library somewhere, afaik
17:48 < jlaffaye> netchan on unix domain socket
17:48 < jtoy> was wondering if i could use it for distributed programming
ala erlang
17:48 < Tv> of course
17:49 < jtoy> ala erlang as its built into the language foundations, which
it sounds like its not in go
17:49 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
17:49 < bugQ> inter-thread comm is built in, which can be used to very
simply abstract inter-anything else
17:50 < Tv> jtoy: more like, go doesn't tell you there's exactly one way of
doing it
17:51 < Tv> personally, i dislike erlang ipc security model
17:51 < str1ngs> Tv: hmm ya rpc is way better for this . thanks for pushing
me in that direction.
17:51 < Tv> it's a shared secret key, any node can do anything :(
17:51 < jtoy> seems fine, just do the security at the ip level
17:52 < Tv> eww
17:56 < str1ngs> so netchan seems better for persistent connections?
17:56 < Tv> str1ngs: honestly, i have not found a single use case where
netchan made sense all the way through the exercise :(
17:57 < str1ngs> Tv: I'm starting to think that, even though my use case was
probably a poor example
17:57 < str1ngs> but, maybe better to say netchan is still work in progress
17:57 < str1ngs> I see potential there anyways
17:58 -!- tobym [~tobym@cpe-72-229-2-6.nyc.res.rr.com] has joined #go-nuts
17:58 < Tv> str1ngs: yeah i like the streaming idea
17:58 < Tv> it's just very hard to control end of stream etc situation
17:58 < str1ngs> yep
17:58 < Tv> and once you need replies, because you can't pass channels,
you're building rpc on top of netchan
17:58 < jtoy> so what exactly is it that makes go comparable to python?  im
coming from ruby and i want a lang that is fasand great to program in like
17:58 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
17:58 < str1ngs> but when I used permanent connection it was very robust
17:58 < jtoy> one of the fun things about python/ruby is that i dont have to
type out so much extra code
17:58 < Tv> jtoy: go is more comfortable with dynamic datatypes than most
statically typed languages
17:59 < Tv> but nowhere near the convenience of really dynamically typed
languages; it's a tradeoff
17:59 -!- eclark [~eclark@2001:470:1f11:b82:4c5a:d7a5:219:61cc] has joined
17:59 < str1ngs> jtoy: you get some of the power of dynamic types with
compile time checking . ie a := "foo"
18:00 < Tv> go is pretty darn good at not making you repeat anything the
compiler knows anyway
18:00 < jtoy> yeah ,that is cool, why are there explicit returns in go?
18:00 < bugQ> ya the interface-like binding and type inference makes it feel
more like duck typing, even though it's mostly sugar
18:00 -!- cbeck1 [cbeck@gateway/shell/pdx.edu/x-aemvyygptfuunvnd] has joined
18:00 -!- Soultake1 [~Soultaker@hell.student.utwente.nl] has joined #go-nuts
18:01 < str1ngs> jtoy: you mean as apposed to inferred return types?
18:01 -!- chressie1 [~chressie@dreggn.in-ulm.de] has joined #go-nuts
18:01 < jtoy> in ruby the last line in a function is the return value, the
compiler cant figure that out?
18:01 -!- bickford1 [~bran@70-36-197-162.dsl.dynamic.sonic.net] has joined
18:01 -!- Netsplit *.net <-> *.split quits: Soultaker, Natch|, zerohp,
tobier_, bickfordb, SecretAgent, nsf, cbeck, arun, TheSeeker, (+7 more, use
/NETSPLIT to show all of them)
18:01 -!- nsf1 [~nsf@jiss.convex.ru] has joined #go-nuts
18:01 -!- enferex_ [~enferex@users.757.org] has joined #go-nuts
18:02 -!- nsf1 [~nsf@jiss.convex.ru] has quit [Client Quit]
18:02 < str1ngs> it can but you have to remember, that go is designed to
have minimal compile time overhead.
18:02 -!- Netsplit over, joins: SecretAgent
18:02 < Tv> explicit return is more about making sure you didn't screw up
and leave a line out
18:02 -!- Netsplit over, joins: nsf
18:02 -!- Viriix [~joseph@c-67-169-172-251.hsd1.ca.comcast.net] has quit [Quit:
18:02 < str1ngs> its also more readable.  and easier to know what gets
returned just by looking at the signature
18:02 -!- Netsplit over, joins: sacho
18:02 < Tv> even when you return by assigning to named return variable, you
still need to say "return" in go
18:03 -!- awidegreen_ [~quassel@] has joined #go-nuts
18:03 < str1ngs> even though godoc does not show that in the table of
contents which would be nice.
18:03 < bugQ> jtoy: I have had headaches over that "convenient" feature of
ruby myself, returning something I did not intend
18:03 < jtoy> does go have all the enumerable methods like map/select/reject
familiy of functions?
18:03 -!- awidegreen [~quassel@h-170-226.A212.priv.bahnhof.se] has quit [Ping
timeout: 248 seconds]
18:04 -!- Xenith [~xenith@xenith.org] has joined #go-nuts
18:04 < Tv> jtoy: what do you mean by enumerable methods?
18:04 < jtoy> bugQ: i find that hard to believe though, isnt the last line
where the return goes anyway, can you return somehting then continue to hve code
after the return?
18:04 -!- justinlilly [~justinlil@173-203-200-41.static.cloud-ips.com] has joined
18:04 < jlaffaye> jtoy: no
18:05 < bugQ> jtoy: no, but you can return something that was calculated
three blocks in, and has to be returned three times.  it gets hard to keep track
18:05 < |Craig|> if the last line was the return value, that would conflict
with named return values.  What if you have both?  What if the last line is inside
flow control?
18:05 < jlaffaye> wait?  we dont have something like yield in go, right?
18:06 < jtoy> Tv: for any object or type that implements a comparable method
like (<=>) , then they can run methods like each/ select/reject ,ie stuff
from functional programming
18:06 < jtoy> bugQ: in ruby you can use return alos to force the return
18:06 < |Craig|> jlaffaye: you can use a channel, or just pass a closure
that produces values when asked (and a second return value to signal when its
18:06 < jtoy> |Craig|: yeah, having the return cna still be called, its just
not required
18:07 < jlaffaye> |Craig|: sure :)
18:07 < bugQ> jlaffaye: functions are first-class, so kinda.  yield is just
sugar for calling a func that was passed as an arg
18:07 < Tv> jtoy: only ruby and js cram all those things into every single
18:07 -!- TheSeeker [~n@99-153-250-110.lightspeed.irvnca.sbcglobal.net] has joined
18:07 < Tv> jtoy: sounds like you are talking just about map/filter
18:07 < jtoy> Tv: true, but on an array/list/hash you need to run those
methods all the time
18:07 < bugQ> jtoy: yes, I often found myself using return explicitly to
avoid confusion.
18:07 < jtoy> Tv: yes, map and filter, same thing
18:08 -!- arun [~arun@unaffiliated/sindian] has joined #go-nuts
18:08 < jtoy> bugQ: I use both ways, for simple functions i dont type
return, for complex stuff with deep if logic i use return
18:08 < str1ngs> jtoy: I'm not sure if comparing go to ruby is a good idea.
when in rome do as the romans do.  seems to be what works best with go
18:08 < jlaffaye> some people dont like return in the middle of a function,
nor continue in a loop.  but I do :)
18:08 < Tv> bugQ: though the yield syntactic sugar is huge, easier control
flow than a callback
18:09 < |Craig|> if you want syntactic sugar, return a channel, then you can
range over it like an iterator.  Its almost like yield
18:09 * bugQ has an engineer's mind, so just prefers explicitude wherever possible
18:09 < jtoy> str1ngs: the reason I am asking is because on the website they
mention python often, and i only know ruby
18:10 < str1ngs> jtoy: the problem is ruby is OO, and go has OO like
features.  ie ruby does not have interfaces as I recall?
18:10 < str1ngs> which are very powerful I think.
18:10 < bugQ> correct, they opt for duck typing
18:10 < Tv> ruby is a weird variant of OO
18:10 < jtoy> str1ngs: no interfaces, isnt that similiar to duck typign
18:11 < jtoy> i sawduck typing and ruby mentioned a few times in go
18:11 < Tv> jtoy: first paragraph of this applies to you & ruby:
18:11 < Tv> jtoy: try to start more from scratch, don't write "ruby in go"
18:11 < jtoy> way too long
18:12 < Tv> o_O "first paragraph"
18:12 < jtoy> ok, its empty now !
18:12 < str1ngs> jtoy: that is the most common pitfall though.  with go you
need to put other languages aside.  and seek the go way.
18:12 < Tv> str1ngs: not just go, *any* paradigm change
18:12 < str1ngs> sure
18:13 < jtoy> str1ngs: yeah, it looks like a cool language , im just trying
to get my head around it, i was playing with clojure the past week which i think
is quite a departure from ruby also
18:13 < Tv> python by c programmers is hideous too
18:13 < Tv> ruby is the odd one out ;)
18:13 < aiju> 20:17 < Tv> python by c programmers is hideous too
18:13 < aiju> do you mean me?
18:13 < bugQ> jtoy: heh, skip clojure and go to a real lisp
18:13 < aiju> i emulate pointers in python by using one-element lists
18:13 < Tv> aiju: the example in my mind currently is autotest
18:13 < Tv> aiju: i do that too, and i'm a hardcore pythonista ;)
18:13 < jtoy> i would like the succinctness of python/ruby but speed of c
languages, that is my allure to go right now
18:14 < Tv> jtoy: oh yes
18:14 < aiju> i prefer c over python and ruby
18:14 < |Craig|> aiju: you don't have to be a c programmer to do that one..
18:14 < Tv> jtoy: not quite there, but close
18:14 < bugQ> jtoy: just realise that you will have to sacrifice at least
some of the meta-power of a scripting language
18:15 < jtoy> clojure seems pretty good in terms of speed with the metapower
18:15 < aiju> Go can do metaprogramming just fine
18:15 < aiju> fmt.Printf and pipe into the compiler
18:15 < bugQ> hee
18:15 < jlaffaye> where is the new garbage collector they promised?  :p
18:15 * jlaffaye hides
18:15 < aiju> i write LISP when i want metaprogramming
18:15 < str1ngs> jlaffaye: let us know when you are done writing it..
thanks :P
18:15 < aiju> and with no serious task i ever really wanted metaprogramming
18:16 < bugQ> jtoy: that's because it is close enough to lisp to handle it
18:16 < bugQ> seriously you should at least look at scheme
18:16 < bugQ> if not CL
18:16 < |Craig|> when moving from python to go, I realized I needed a lot
more lines of code, but not really much more text (the lines were short).  It was
kinda like I was forced to write with decent style and produce maintainable
legible code.
18:16 < jlaffaye> oh noes!  :)
18:16 < aiju> python and ruby programmers tend to use map etc all the time
18:17 < jtoy> |Craig|: as the hurdle big?  going from dynamic language to
compiled language?
18:17 < Tv> |Craig|: my big thing in py->go is i miss having same
functions work on multiple data types
18:17 < jtoy> yes, I love map!
18:17 < aiju> Tv: interfaces?
18:17 < aiju> i dislike map
18:17 -!- kevinwatt [~kevin@59-125-147-75.HINET-IP.hinet.net] has joined #go-nuts
18:17 < aiju> i don't use it in python
18:17 < Tv> aiju: more like, try writing your own map() implementation
18:17 < Tv> aiju: interface{} is a huge kludge
18:17 < aiju> using map is like talking chinese to me
18:18 < bugQ> I can understand that analogy
18:18 < Tv> aiju: i don't mean actual map, i mean things that process
arbitrary data
18:18 < jtoy> aiju: not sure how it is in python, but its so useful in ruby,
you never need silly things like for i; i < length; i++
18:18 < aiju> it takes lots of work to write and read and it's most likely
18:18 < aiju> jtoy: that's not silly
18:18 < jlaffaye> aiju: its funny how the language you are writting in
changes how you code.  for instance in C I worry to minimize the number of
function call even if I know the function is _very_ cheap.  In python most people
just dont care and use map for everything.
18:18 -!- adlan [~adlan@] has quit [Ping timeout: 260 seconds]
18:19 < aiju> jlaffaye: function calls being expensive is a myth
18:19 < aiju> get that shit out of ya head
18:19 < jtoy> in what situation can map not replace for i ......
18:19 < Tv> it's very rare to see python use map
18:19 < aiju> jtoy: real algorithms
18:19 < Tv> list comprehensions rule
18:19 < aiju> i've programmed K which goes really hardcore with all this
18:19 < aiju> map, reduce, list comprehensions etc
18:19 < jlaffaye> aiju: I mean what the function does
18:19 < nsf> function calls overhead may cause problems only in very tight
18:19 < nsf> like raytracing or something
18:19 < Tv> anyway, i really wish someone would come up with a way of doing
some kind of generics in go, without making the language suck
18:19 < aiju> and my programs end up being really unreadable
18:19 < aiju> and either wrong or inefficient
18:19 < |Craig|> I use nested and chained list comprehensions all over
python, but I think I only used map once
18:20 < aiju> most likely both
18:20 < nsf> check if ray hits triangle should be inlined
18:20 < aiju> try avoiding computing something twice with map et al.
18:20 < bugQ> jlaffaye: what you are concerned about is what profiling tools
are for
18:20 < aiju> i found it to be very hard.
18:20 < jlaffaye> bugQ: I know I shouldnt be concerned about that but, eh, I
cant help it when writing C :p
18:21 < aiju> you shouldn't think of C as a hurr durr performance language
18:21 < aiju> 20:22 < Tv> aiju: i don't mean actual map, i mean things
that process arbitrary data
18:22 < aiju> i don't need that kind of stuff.  really.
18:22 < aiju> but i'm the kind of persons who happily reimplements hashmaps
in C programs
18:22 < aiju> because the 15 mins i'm working on that hashmap are nothing
compared to the hours working on the serious business
18:23 -!- adlan [~adlan@] has joined #go-nuts
18:23 < Tv> aiju: i fiddled with writing e.g.  a tiny mapreduce
implementation, and trying to get map & reduce to do anything but strings or
interface{} was just pretty much impossible
18:24 < aiju> yeah, but why?
18:24 < Tv> where as in python they'd get to take & return arbitrary types,
for free
18:24 < Tv> what do you mean why?
18:24 < aiju> type errors in python annoy the fuck out of me
18:24 < aiju> why do you implement mapreduce
18:24 < Tv> aiju: good practise
18:25 < aiju> good ruby practice maybe
18:25 < aiju> not good go practice
18:25 < Tv> ehh
18:25 < Tv> perfect go practise; inherently distributed problem, gets you to
think about error handling, etc
18:25 < aiju> uh
18:25 < aiju> i disagree
18:25 < Tv> feel free to be wrong ;)
18:26 < aiju> reimplementing LISP is not perfect go practice.  period.
18:26 < Tv> aiju: i think you're confusing mapreduce with functional
programming as lisp used the words
18:27 -!- yaniv_ [~alon@xdsl-188-154-4-146.adslplus.ch] has joined #go-nuts
18:27 < jtoy> seems map & reduce is wonderful for everything :) look at
18:27 < Tv> jtoy: actually, not, mr is just a simple idiom to understand..
it has frustrating limitations, and reorganizing things a bit gets you nicer
tradeoffs (imo)
18:27 < Tv> and this is what i wanted to play with
18:28 < KBme> hey, Tv, don't expect a statically typed language to be python
18:28 < yaniv_> Hi, I just compiled "Hello, World" on osx 10.5 and the
binary size is 1mb.  Is this normal?  The same thing written in c is only 16kb?
18:28 < jtoy> what are some of the limitations?
18:28 < KBme> you'll cry a lot otherwise
18:28 < Tv> except then i started wanting generics, because writing
foo.(uint64) in all my mr functions was annoying
18:28 < Tv> yaniv_: go is statically linked
18:28 < aiju> yaniv_: yes, it's normal
18:28 -!- alehorst [~alehorst@] has quit [Ping timeout: 246 seconds]
18:28 < Tv> jtoy: read up on e.g.  caffeine and pregel
18:28 < aiju> yaniv_: it got smaller on Lunix already
18:28 < aiju> jtoy: try to express real life algorithms with it
18:29 < yaniv_> ok, thx guys!
18:29 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:7db6:c2a6:58a6:4b01] has joined
18:29 < aiju> jtoy: i find it to be very hard, much harder than just using
18:29 < Tv> aiju: i think you're still confusing mapreduce with functional
18:29 < aiju> no i'm not
18:29 < Tv> aiju: you can't replace a mapreduce cluster with a for loop
18:29 < aiju> oh this is about parallelism?
18:31 < aiju> http://en.wikipedia.org/wiki/Mapreduce
18:31 < aiju> ah you mean this thing
18:31 < aiju> i was thinking of map/reduce
18:31 < Tv> which is why i tried to keep saying i don't mean functional
18:31 < aiju> map/reduce isn't strictly functional programming
18:32 -!- mnoel [~mnoel@c-75-65-250-60.hsd1.la.comcast.net] has joined #go-nuts
18:33 < aiju> i'd say you can just use goroutines, channels and netchan for
that kind of stuff
18:34 < Tv> aiju: the bother is having user-pluggable functions to call..
currently go forces you to either pick a datatype (like string) and make all
callers convert back and forth, or do interface{} and suffer that
18:34 < Tv> aiju: i fiddled with reflect a lot, but it's just too painful to
be productive
18:37 < KBme> what you loose on "productivity" side you win on application
18:38 < Tv> KBme: static typing is not a replacement for automated tests..
18:38 < KBme> did i say that?
18:38 < Tv> not you, but many others who say things like you said
18:38 < Tv> i don't find static typing to be a stability bonus
18:39 < Tv> i find it to be an execution speed bonus
18:39 < KBme> also
18:39 < Tv> my python stuff works even when facing half a decade of neglect
18:39 < kevlar> Tv: it's not the neglect that kills it, it's when you or
someone else tries to extend it or update it.
18:39 -!- wwkeyboard [~wwkeyboar@75-1-145-222.lightspeed.snantx.sbcglobal.net] has
quit [Quit: wwkeyboard]
18:39 < jlaffaye> wait?  you lose productivity with static typing?
18:39 < Tv> kevlar: that's what you have tests for
18:40 < aiju> jlaffaye: yeah, entire 15 mins of reimplementing trivial shit
18:40 < kevlar> Tv: also, it's entirely possible to use reflection to call
an arbitrary function without having to pass interface{}s everywhere
18:40 < Tv> kevlar: i know it's possible, i'm just saying it was fairly
18:40 < Tv> kevlar: i do believe reflect can improve, and make it less so
18:41 < kevlar> Tv: just out of curiosity, how recent was your foray into
using reflect for that?
18:41 < Tv> kevlar: for real, about 3 months ago
18:41 < kevlar> do you know if it was before or after the latest refactor?
18:41 < Tv> kevlar: i'm due for a retry soon
18:41 < kevlar> I didn't use it before, so I can't attest to this, but
apparently it got a lot nicer
18:41 -!- vinisterx [~ryan@74-129-201-27.dhcp.insightbb.com] has joined #go-nuts
18:42 < kevlar> it was a lot of type switches, but beyond that it didn't
seem to be too bad when I was writing my XML marshaler.
18:43 < Tv> i think what i want is something like this: func
call_if_you_can(fn interface{}, args interface{}) (retval interface{}, can_call
bool, err os.Error)
18:43 < kevlar> though that has nothing to do with parsing through a
functions arguments and its return value and creating arbitrary values of various
types, so.
18:43 < Tv> not quite that signature
18:43 < Tv> but "call this function if you can make this arg match what it
can take, otherwise give me an error"
18:44 < Tv> totally doable using reflect, i'm sure
18:44 < Tv> but painful to write when you don't know the system 100%
18:44 < kevlar> http://golang.org/pkg/reflect/#Value.Call
18:45 < Tv> kevlar: panics but i could catch that
18:45 < Tv> kevlar: i think that's new..  ok i'm gonna go try it again ;)
18:45 < kevlar> yeah, it definitely panics in just about every error
18:45 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Ping timeout: 276
18:46 < kevlar> but (especially for reflection) doing the checks both before
you call and while reflect.Call is doing it might be more expensive than its
18:46 < Tv> i do want to differentiate between the function panicing and
Call panicing
18:46 < Tv> but that's finetuning
18:46 < kevlar> hack: check if the message starts with "reflect: " lol
18:46 < Tv> i can do proof of concept work with what's there, it seems
18:47 -!- alehorst [~alehorst@] has joined
18:47 < kevlar> you could probably also look at rpc.Call, as it does
reflection relating to function arguments
18:48 < kevlar> though I think it only does two-argument functions or
something like that
18:48 < Tv> ooh i have some code using .Call already, let's see why i wasn't
100% happy about it..
18:48 -!- pvarga [~pvarga@pool-71-172-108-117.nwrknj.east.verizon.net] has joined
18:49 < Tv> oh wait this is still from before the last refactor, since gofix
had things to fix..
18:49 < Tv> let's see..
18:49 < chowmeined> is there a cleaner way of turning the keys of a map into
an array/slice than looping through them and building it manually?
18:52 < Tv> chowmeined: i don't think any utility function is provided; as
long as you write it smartly, it'll be just as efficient the way you write it
18:52 < Tv> chowmeined: trick: set right cap from the start
18:53 < pvarga> can you build the array/slice as you re populating the map?
18:53 -!- tncardoso [~thiago@] has joined
18:54 < Tv> or avoid the need for one; perhaps you should describe the
ultimate goal
18:55 < chowmeined> well, i have a map of names -> *structs, but
sometimes i need to output say, a comma separated list of all the names
18:55 < Tv> chowmeined: what's wrong with just iterating the map at that
18:55 < chowmeined> so ive been building an array to use strings.Join
18:56 < Tv> chowmeined: you're probably better off writing each chunk
independently, and not building a big string
18:57 < bugQ> yup
18:57 -!- rlab [~Miranda@] has joined #go-nuts
18:57 < pvarga> if you use a set of names in paralell with populaitng the
map, then implement a reader for that set and ....  channell it.
18:58 < Tv> the comma handling is a bit annoying but it's just an if first {
first = false} else { output comma }
18:59 -!- yaniv_ [~alon@xdsl-188-154-4-146.adslplus.ch] has left #go-nuts []
18:59 < chowmeined> hm, idk how id avoid building a string, im using
net.textproto and all these names go in one line
19:00 -!- tncardoso [~thiago@] has quit [Ping
timeout: 255 seconds]
19:02 < Tv> chowmeined: there was a Writer to in-memory buffer somewhere..
19:03 < chowmeined> oh, that seems handy
19:03 < Tv> bytes.NewBuffer
19:03 -!- coudX [~coud@] has quit [Read error: Connection reset by
19:05 < Tv> or just append to a []byte yourself
19:05 < Tv> it seems the bytes package predates append()
19:07 < chowmeined> thank you
19:08 < Tv> i'm still not 100% clear on the difference of string and []byte
in go
19:08 < huin> the latter is mutable
19:08 < huin> apart from anything else
19:08 < chowmeined> i guess im just used to how it would be in python,
','.join(x) where x = {'foo': 1, 'bar': 2, 'baz': 3}
19:08 < Tv> huin: that implies conversion in between is a copy?
19:08 < huin> also, iterating over one vs the other gives different results
19:08 < huin> Tv: i imagine it does, yes
19:09 -!- kosta [~Adium@krlh-4d0358c6.pool.mediaWays.net] has joined #go-nuts
19:10 < Tv> chowmeined: yeah, sadly go has no generic iterator concept
19:10 < nsf> Tv: but I guess it is possible to remove some copies by
performing extensive code analysis
19:10 < Tv> nsf: yeah but that sounds bad to rely on
19:10 < Tv> so constructing a string by first creating a []byte actual
sounds a bit silly now
19:11 < nsf> in my humble opinion Go isn't as low level as people want it to
19:11 < Tv> i mean, this is not gonna matter in real world benchmarks unless
it's in a tight loop
19:11 < str1ngs> chowmeined: are they all strings?
19:11 < Tv> perhaps the right thing after all is to collect a list of
strings and then do strings.join()
19:12 < Tv> that means allocating memory for the list etc, but not an extra
copy of all the strings
19:12 < Tv> but that's performance wankery, just do what works
19:12 < chowmeined> str1ngs, the keys in the map are all strings, yes
19:12 < nsf> Tv: if it's a really big list
19:12 < nsf> and wasting memory matters
19:12 < nsf> you should definitely measure it
19:12 < str1ngs> chowmeined: what are the values?
19:12 -!- tncardoso [~thiago@] has joined #go-nuts
19:12 < chowmeined> str1ngs, pointers to structs
19:12 < nsf> before trying to optimize by making assumptions
19:12 < Tv> nsf: i think he should definitely ignore the performance aspect
19:13 < nsf> in most cases ignoring is a good idea, yes
19:13 < Tv> i'm in this for the education
19:13 < str1ngs> chowmeined: maybe a container would work better then a map?
19:14 < kosta> if I have a func(f *Foo) bar(), how do I define a
corresponding interface?
19:14 < nsf> kosta: type X interface { bar() }
19:14 -!- m4dh4tt3r [~Adium@c-98-210-145-213.hsd1.ca.comcast.net] has joined
19:15 < chowmeined> str1ngs, hm, i thought a map would be a good fit because
i get the name from network input, and then look up the struct to manipulate the
session data
19:15 < chowmeined> is there a collection that would work better for that?
19:15 < kosta> nsf: I tried that and got a "Foo does not implement Spammer
(SetHidden method requires pointer receiver)"
19:15 < Tv> chowmeined: sounds good enough
19:15 < kosta> nsf: Ah, but I'm returning a Foo where the error occurs
19:15 < kosta> nsf: and so the literal cannot satisfy that interface.  haha
19:15 < kosta> nsf: ok, thanks :)
19:16 < nsf> kosta: :D
19:16 -!- Fish [~Fish@9fans.fr] has joined #go-nuts
19:18 < str1ngs> chowmeined: list might work then use something like type
foo struct { key string; point pointer } for the Value
19:18 < str1ngs> chowmeined: not sure what pointer is so I made that up.
fill it in of course
19:19 < str1ngs> chowmeined: but not as powerful as vector
19:19 -!- pvarga [~pvarga@pool-71-172-108-117.nwrknj.east.verizon.net] has quit
[Quit: pvarga]
19:19 < chowmeined> idk if going from O(1) lookups to O(N) lookups is worth
19:20 < str1ngs> ya I dont think so either
19:20 < chowmeined> especially since thats the primary way im using this
19:20 < chowmeined> lookups by name
19:20 < Tv> chowmeined: the first reason for you to go beyond maps would be
if you needed LRU expiry or something like that
19:20 < Tv> chowmeined: and even then, you'd be looking at maps + something
19:21 < chowmeined> this sounds like overkill, i dont expect more than a
couple hundred elements
19:21 < Tv> so just use the map and stop doubting ;)
19:21 -!- bickford1 [~bran@70-36-197-162.dsl.dynamic.sonic.net] has quit [Ping
timeout: 240 seconds]
19:22 < chowmeined> well, in my original question i wasnt really doubting
the map, i was just wondering if there was a convenience function somewhere to get
the keys as a slice
19:22 < Tv> yeah, doesn't exist, is easy to write
19:22 < Tv> ooh and i know why it probably doesn't exist, too -- it requires
generics, or it's tied to your map key datatype
19:23 < chowmeined> okay, that makes sense
19:26 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has joined
19:30 -!- twolfe18 [~twolfe18@c-71-61-180-11.hsd1.pa.comcast.net] has quit [Quit:
19:30 -!- DerHorst [~Horst@e177131018.adsl.alicedsl.de] has quit [Read error:
Connection reset by peer]
19:31 < kosta> could someone explain this to me?
19:32 < kosta> basically, I have a type with an unexported field and want to
call a non-pointer method of it
19:33 < kosta> it only works when I use foo.SpammerInterface(&a).Spam().
Any other way does not work.  Not even if it looks similar to me… :)
19:33 < Tv> kosta: passing it by copy means needing to copy the unexported
field -> not posible
19:33 < kosta> Tv: yeah, but why does it work on line 39 then?
19:33 < Tv> kosta: &a is not a copy
19:34 < Tv> hold on still reading
19:34 < kosta> ok
19:34 < Tv> kosta: make your receiver take a pointer
19:34 < Tv> upi
19:35 < Tv> kosta: you'll need to follow the go style of having a NewFoo
function, that returns a pointer to Foo
19:35 < Tv> kosta: and at that point, you may choose to just have it return
Spammer instead
19:35 < Tv> and make Foo unexported as a whole
19:36 < kosta> Tv: I'm just trying to wrap my head around the type system,
not implementing anything in particular
19:37 < Tv> kosta: copying a struct is basically a field-by-field copy;
can't do unexported fields
19:37 < Tv> kosta: so anything with unexported fields needs to handled via
pointers, outside the package
19:37 -!- Project-2501 [~Marvin@] has joined #go-nuts
19:37 < kosta> Tv: I read somewhere on the go homepage that you should use
func(T) instead of (*T) if the function doesn't change T
19:37 < kosta> Tv: yeah that makes sense
19:37 < kosta> I'm just confused why line 39 works and the other ones dont
19:38 < kosta> especially, where is the difference to lines 35/36?
19:38 < Tv> kosta: hard to say as your pastebin isn't even valid code..  you
have no SpammerInterface ;)
19:39 < kosta> Tv: damn, I pasted an old file.  wait a second :)
19:39 < kosta> try again: http://pastebin.com/index/1bv6EeLk
19:40 -!- Project_2501 [~Marvin@] has quit [Ping timeout: 246 seconds]
19:40 < kosta> sorry, still not there :(
19:41 < kosta> here we go: http://pastebin.com/LZm7fwUB
19:41 < kosta> still, my big question mark is around: why does line 39 work
when 35/36 don't?
19:43 -!- mnoel [~mnoel@c-75-65-250-60.hsd1.la.comcast.net] has quit [Read error:
Connection reset by peer]
19:44 -!- mnoel [~mnoel@c-75-65-250-60.hsd1.la.comcast.net] has joined #go-nuts
19:45 < Omnivore> interface methods are pure virtual (in C++ speak) - no
19:46 -!- ithkuil [~marko@host27-203-dynamic.27-79-r.retail.telecomitalia.it] has
quit [Ping timeout: 246 seconds]
19:47 < Omnivore> 39 'works' that is might compile - because its a typecast
- you're telling the compiler it's ok
19:48 < kosta> Omnivore: but it's just a typecast whats in line 35, right?
19:49 < kosta> ah, i'm stupid
19:49 < Omnivore> foo.SpammerStruct doesn't implement the interface
19:49 < kosta> I meant to put a type in there
19:49 < kosta> gotta run, telephone
19:49 < kosta> be back in 10 minutes
19:50 < Omnivore> oh nvm I'm blind
19:52 -!- wwkeyboard [~wwkeyboar@75-1-145-222.lightspeed.snantx.sbcglobal.net] has
joined #go-nuts
19:56 -!- awidegreen [~quassel@h-170-226.A212.priv.bahnhof.se] has joined #go-nuts
19:57 -!- awidegreen_ [~quassel@] has quit [Ping timeout: 276 seconds]
19:59 -!- ithkuil [~marko@host143-52-dynamic.11-79-r.retail.telecomitalia.it] has
joined #go-nuts
20:03 -!- rlab_ [~Miranda@] has joined #go-nuts
20:04 < kosta> Omnivore: no I think you're right
20:06 -!- rlab [~Miranda@] has quit [Ping timeout: 276 seconds]
20:06 < Omnivore> the compiler couldn't figure out the type in line 35 I
20:07 < Omnivore> I'm still trying to wrap my head around this language too
20:08 -!- hargettp [~hargettp@pool-71-184-185-93.bstnma.east.verizon.net] has quit
[Quit: Leaving...]
20:08 < kosta> here is what I actually meant to write:
20:08 < kosta> so now lines 36/36 work
20:09 < Omnivore> yep makes sense
20:09 < kosta> what I still find weird, tough: "var interfacePtrA
foo.SpammerInterface = &a" works
20:10 < kosta> but "var interfacePtrA *foo.SpammerInterface = &a" does *NOT*
20:10 < Omnivore> well you're telling the compiler here's a var named
interfacePtrA of type foo.SpammerInterface that I'm assigning the address of a to
(I think)
20:11 -!- ExsysTech [~ExsysTech@50-46-213-60.evrt.wa.frontiernet.net] has quit
[Read error: Connection reset by peer]
20:11 < kosta> yeah and that implies it's reference type but they try to
hide that away from us :)
20:12 -!- ExsysTech [~ExsysTech@50-46-213-60.evrt.wa.frontiernet.net] has joined
20:12 < kosta> still weird that line 10 doesn't work in that light
20:13 -!- angasule [~angasule@] has joined #go-nuts
20:14 < Omnivore> looks more like an ambiguous assignment than an implicit
one in that one case
20:15 < kosta> I gotta run, but I think I'm gonna ask about this on the go
mailing list tomorrow
20:15 < Omnivore> yeah it'd be worth a read
20:20 -!- djbrown [~djbrown@unaffiliated/djbrown] has joined #go-nuts
20:26 -!- robteix [~robteix@host40.201-253-152.telecom.net.ar] has joined #go-nuts
20:27 -!- rlab_ [~Miranda@] has quit [Ping timeout: 260 seconds]
20:28 -!- matthias_ [~chatzilla@p4FF133B8.dip.t-dialin.net] has joined #go-nuts
20:29 -!- TheMue [~TheMue@p5DDF753A.dip.t-dialin.net] has quit [Quit: TheMue]
20:30 -!- bugQ [~bug@c-67-186-255-54.hsd1.ut.comcast.net] has quit [Ping timeout:
250 seconds]
20:31 -!- rlab [~Miranda@] has joined #go-nuts
20:32 -!- angasule [~angasule@] has quit [Ping timeout: 276 seconds]
20:33 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:7db6:c2a6:58a6:4b01] has quit
[Quit: Leaving.]
20:37 -!- angasule [~angasule@] has joined #go-nuts
20:42 -!- hargettp [~hargettp@pool-71-184-185-93.bstnma.east.verizon.net] has
joined #go-nuts
20:43 -!- hargettp [~hargettp@pool-71-184-185-93.bstnma.east.verizon.net] has quit
[Client Quit]
20:48 -!- piranha [~piranha@5ED43A0B.cm-7-5a.dynamic.ziggo.nl] has joined #go-nuts
20:48 -!- sacho [~sacho@] has quit [Ping timeout: 255 seconds]
20:56 -!- adlan [~adlan@] has quit [Ping timeout: 240 seconds]
21:02 -!- XenoPhoenix [~Xeno@cpc13-aztw24-2-0-cust23.aztw.cable.virginmedia.com]
has quit [Quit: "Wait...  what?!"]
21:06 -!- dazfuller [~dazfuller@cpc1-stap1-0-0-cust738.12-2.cable.virginmedia.com]
has joined #go-nuts
21:06 -!- dazfuller [~dazfuller@cpc1-stap1-0-0-cust738.12-2.cable.virginmedia.com]
has left #go-nuts []
21:07 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.5]
21:08 -!- matthias_ [~chatzilla@p4FF133B8.dip.t-dialin.net] has quit [Quit:
ChatZilla [Firefox 3.6.17/20110422054454]]
21:10 -!- piranha [~piranha@5ED43A0B.cm-7-5a.dynamic.ziggo.nl] has quit [Quit:
Computer has gone to sleep.]
21:11 -!- manveru [~manveru@b08s28ur.corenetworks.net] has quit [Quit: ZNC -
21:11 -!- manveru [~manveru@b08s28ur.corenetworks.net] has joined #go-nuts
21:13 -!- kosta [~Adium@krlh-4d0358c6.pool.mediaWays.net] has quit [Quit:
21:14 -!- rlab_ [~Miranda@] has joined #go-nuts
21:15 -!- rlab [~Miranda@] has quit [Ping timeout: 260 seconds]
21:16 -!- photron [~photron@port-92-201-136-197.dynamic.qsc.de] has quit [Ping
timeout: 255 seconds]
21:20 -!- robteix [~robteix@host40.201-253-152.telecom.net.ar] has quit [Quit:
Computer has gone to sleep.]
21:23 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
21:27 -!- Fish [~Fish@9fans.fr] has quit [Quit: So Long, and Thanks for All the
21:29 -!- kosta [~Adium@krlh-4d0358c6.pool.mediaWays.net] has joined #go-nuts
21:29 -!- kosta [~Adium@krlh-4d0358c6.pool.mediaWays.net] has quit [Client Quit]
21:30 -!- rlab_ [~Miranda@] has quit [Quit: Miranda IM! Smaller,
Faster, Easier.  http://miranda-im.org]
21:39 -!- abiosoft [~Abiosoft@] has joined #go-nuts
21:41 -!- aiju [~aiju@unaffiliated/aiju] has quit [Quit: ZNC -
21:44 -!- abiosoft [~Abiosoft@] has quit [Read error: Connection reset
by peer]
21:48 -!- noam [noam@] has quit [Read error:
Connection reset by peer]
21:49 -!- aiju [~aiju@unaffiliated/aiju] has joined #go-nuts
21:49 -!- noam [noam@] has joined #go-nuts
21:52 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit:
21:55 -!- wallerdev [~wallerdev@] has quit [Quit: wallerdev]
22:04 -!- dRbiG [drbig@unhallowed.pl] has quit [Ping timeout: 276 seconds]
22:08 -!- wwkeyboard [~wwkeyboar@75-1-145-222.lightspeed.snantx.sbcglobal.net] has
left #go-nuts []
22:09 -!- mnoel [~mnoel@c-75-65-250-60.hsd1.la.comcast.net] has quit [Quit: mnoel]
22:16 -!- dRbiG [drbig@unhallowed.pl] has joined #go-nuts
22:18 -!- XenoPhoenix [~Xeno@cpc13-aztw24-2-0-cust23.aztw.cable.virginmedia.com]
has joined #go-nuts
22:18 -!- brandini [~orbit@adsl-69-221-174-224.dsl.akrnoh.ameritech.net] has quit
[Ping timeout: 240 seconds]
22:18 -!- tncardoso [~thiago@] has quit [Read error: Connection reset
by peer]
22:20 -!- awidegreen [~quassel@h-170-226.A212.priv.bahnhof.se] has quit [Remote
host closed the connection]
22:20 -!- xeno42 [~xeno42@s.omnipotent.net] has joined #go-nuts
22:20 -!- brandini [~orbit@adsl-69-221-167-216.dsl.akrnoh.ameritech.net] has
joined #go-nuts
22:21 -!- vpit3833 [~user@] has joined #go-nuts
22:23 < xeno42> I'm trying to run some go code on an old x86 Debian box..
machine can't currently be upgraded to a recent version of Debian, but Go compiles
ok on it and generates executables..
22:23 < xeno42> running the simple hello world program generates teh output
and then crashes on exit with a split stack overflow error
22:25 < xeno42> anyone come across this before?
22:26 < xeno42> runs ok on a slightly newer build of Debian, but I can't
utilize that
22:30 < nictuku> xeno42, is it a real hardware or maybe a Xen instance?
22:30 < xeno42> it's a real machine
22:30 < nictuku> ok, so I don't know, sorry.
22:30 < xeno42> np
22:31 < nictuku> xeno42, you could maybe paste the stack trace in pastie.org
22:31 < ww> kernel version?
22:31 < ww> if it's 2.4 you're probably s.o.l.
22:31 < Tv> xeno42: "lsb_release -a", "uname -a", "cat /proc/cpuinfo", and
the crash message in a bug report might help you
22:32 < xeno42> yeah it's 2.4
22:33 < xeno42> didn't realize it was dependent on a 2.6 kernel
22:33 < ww> ah.  there was some discussion on that recently on the list i
22:33 < ww> it should be stated more clearly i guess...
22:34 < ww> i think the upshot was it isn't a priority for the main go
developers to figure out how to support very old linux kernels
22:34 < xeno42> ah yeah there it is..  depends on TLS variables which
requires a 2.6 kernel..
22:34 < xeno42> crap
22:34 < xeno42> yeah i can understand that..  just wish it was documented as
a requirement..  would of saved a lot of time today :-(
22:37 -!- AmourDeZombi [~jphillips@c-76-112-223-150.hsd1.mi.comcast.net] has
joined #go-nuts
23:01 -!- Project-2501 [~Marvin@] has quit [Quit: E se abbasso questa
leva che succ...]
23:04 -!- twolfe18 [~twolfe18@c-71-61-180-11.hsd1.pa.comcast.net] has joined
23:04 -!- twolfe18 [~twolfe18@c-71-61-180-11.hsd1.pa.comcast.net] has quit [Client
23:06 -!- huin [~huin@] has quit [Quit: bedtime]
23:23 -!- nictuku [~nict@unaffiliated/nictuku] has quit [Quit: Leaving]
23:50 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
23:58 -!- vinisterx [~ryan@74-129-201-27.dhcp.insightbb.com] has quit [Read error:
Operation timed out]
23:59 -!- vinisterx [~ryan@74-129-201-27.dhcp.insightbb.com] has joined #go-nuts
--- Log closed Mon May 30 00:00:18 2011