--- Log opened Sun Jun 05 00:00:53 2011
00:12 -!- mehalelal [~mehalelal@76.103.175.11] has joined #go-nuts
00:14 < hallas> If I have a http server via the http package, and my
handlers are accessing a global scope variable, do I then need to use the sync
package to make sure that the go routines dont access it at the same time?  Or can
the goroutines figure that out them eslves?
00:15 < exch> they dont figure that out by themselves
00:15 < kevlar> hallas: do you really need a global variable?
00:16 < kevlar> (that changes)
00:16 < kevlar> obviously constants and predefined variables work fine.
00:16 < hallas> kevlar: it may be stupid, but go with it :-) I want a global
cache that occasionally will update
00:16 < exch> if all they do is read the value, you shouldnt have to bother
with a lock.  If they change the value, you will need one
00:16 < kevlar> hallas: then I would definitely rwlock them.
00:17 < hallas> sync.RWMutex :-) ?
00:17 < kevlar> yes.
00:17 < hallas> Super, thanks, ill work it out from here :P
00:17 < hallas> thanks exch and kevlar
00:17 < kevlar> I, personally, would make it into its own type and bake the
mutex in so that the boilerplate isn't on the client side, but that's me.
00:18 < kevlar> (that's also if you don't need atomic update semantics)
00:18 < hallas> Kevlar put the mutex in the cache type it self?
00:18 < hallas> or..  the lock even
00:19 < kevlar> hallas: as I said, only if I am not concerned about atomic
update semantics (e.g.  read 42, write 43)
00:19 < kevlar> (where 43 is 42 + 1, not some random number gleaned
elsewhere)
00:20 < kevlar> but even in cases like that, you make an "Increment" method
that does it atomically.
00:20 < kevlar> just pretend that, in client code, you never know what's
actually stored in the cache between calls to the object and you'll be fine.
00:23 -!- ajstarks [~ajstarks@pool-173-54-115-34.nwrknj.fios.verizon.net] has left
#go-nuts []
00:33 -!- abiosoft [~abiosoft@41.206.12.7] has quit [Quit: Leaving.]
00:45 -!- gedevan [~gedevan@83.167.106.253] has quit [Quit: Leaving...]
00:48 < mehalelal> Hello, I am trying to check a string for '+' and '-'
using regular expressions.  However, someVar := regexphe.MustCompile("[+-]")
errors with: bad range in character class.  What am I doing wrong?
00:50 < kevlar> you need to escape the -
00:50 < kevlar> in [], a - means any character between the one befor and
after; e.g.  [a-z], [0-9], etc
00:51 < kevlar> regexp in Go is very simplified, so it doesn't allow the
dash first and dash last that you can do in perl and other languages
00:51 < kevlar> (e.g.  [-_a-zA-Z0-9] is legal in perl but not in go)
00:57 -!- juanfra [~juanfra@juanfra.xen.prgmr.com] has joined #go-nuts
00:57 < meatmanek_> orly
00:59 < mehalelal> I tried to escape it with a backslash but it didn't work:
unknown escape - (I used [+\-]).  I have also tried using \x2d with the same panic
I originally asked about
01:00 < juanfra> is available in golang any similar to hash of arrays of
perl or defaultdict(list) of python?  I need a dictionary with multiple values.
01:00 < exch> when you use escape tokens in a regex, use `` as the string
delimiters, instead of ""
01:00 < exch> `foo`is for multiline strings and it doesnt cuse Go to parse
escape sequences
01:01 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has quit [Ping
timeout: 240 seconds]
01:01 < mehalelal> Thank you kevlar and exch.
01:02 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has quit
[Ping timeout: 252 seconds]
01:03 < meatmanek_> alternatively, use double-backslashes
01:03 < kevlar> mehalelal: to add to what exch said, \\- would work too.
01:04 < kevlar> mehalelal: in general, you want to use ` for regexes and
things like XML/HTML where there are lots of ", ', \, and such floating around.
01:06 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has joined #go-nuts
01:08 < mehalelal> kevlar: Thanks for the info.  I don't remember any of
that being recorded in the language spec, where is it?
01:10 < kevlar> !golang string literal
01:10 < GoBIR> kevlar: Spec Section String literals -
http://golang.org/doc/go_spec.html#String_literals
01:13 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has joined
#go-nuts
01:18 < mehalelal> kevlar: Thank you.  I think I glazed over when I read the
raw literal part :-)
01:31 -!- tav [~tav@92.20.13.243] has quit [Ping timeout: 250 seconds]
01:37 -!- tav [~tav@2.96.40.157] has joined #go-nuts
01:42 -!- icey [~user@ip68-104-183-151.ph.ph.cox.net] has joined #go-nuts
01:52 -!- Zoopee [alsbergt@zoopee.org] has quit [Ping timeout: 276 seconds]
01:54 -!- meling [~meling@99-10-121-218.lightspeed.sndgca.sbcglobal.net] has quit
[Remote host closed the connection]
02:01 -!- Stiletto [7f000001@69.195.144.4] has quit [Ping timeout: 250 seconds]
02:03 -!- MaL0 [~ircd@unaffiliated/mal0] has quit [Quit: WeeChat 0.3.4]
02:06 -!- Stiletto [7f000001@69.195.144.4] has joined #go-nuts
02:11 -!- Stiletto [7f000001@69.195.144.4] has quit [Ping timeout: 240 seconds]
02:16 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has joined
#go-nuts
02:20 -!- dfc [~dfc@124-149-49-45.dyn.iinet.net.au] has joined #go-nuts
02:26 -!- Stiletto [7f000001@69.195.144.4] has joined #go-nuts
02:31 -!- robteix [~robteix@host40.201-253-152.telecom.net.ar] has quit [Quit:
Computer has gone to sleep.]
02:54 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has quit
[Ping timeout: 276 seconds]
02:56 -!- XenoPhoenix [~Xeno@cpc13-aztw24-2-0-cust23.aztw.cable.virginmedia.com]
has quit [Read error: Connection reset by peer]
03:00 -!- wallerdev [~wallerdev@72.44.102.30] has joined #go-nuts
03:01 -!- AmourDeZombi [~jphillips@c-76-112-223-150.hsd1.mi.comcast.net] has
joined #go-nuts
03:01 -!- XenoPhoenix [~Xeno@cpc13-aztw24-2-0-cust23.aztw.cable.virginmedia.com]
has joined #go-nuts
03:08 -!- Paradox924X [~Paradox92@c-68-35-229-34.hsd1.fl.comcast.net] has quit
[Read error: Connection reset by peer]
03:13 -!- niemeyer [~niemeyer@201-40-174-53.pltce701.dsl.brasiltelecom.net.br] has
quit [Ping timeout: 240 seconds]
03:23 -!- Paradox924X [~Paradox92@c-68-35-229-34.hsd1.fl.comcast.net] has joined
#go-nuts
03:23 -!- Paradox924X [~Paradox92@c-68-35-229-34.hsd1.fl.comcast.net] has quit
[Changing host]
03:23 -!- Paradox924X [~Paradox92@vaserv/irc/founder] has joined #go-nuts
03:45 < kevlar> interesting: fmt.Fprint(w, str) is nearly twice as fast as
w.Write([]byte(str))
03:46 < kevlar> in my very unscientific testing.Benchmark()
03:46 < edsrzf> I find that very surprising
03:47 < edsrzf> It seems like fmt.Fprint would just be doing that same
w.Write underneath anyway.
03:48 < kevlar> I also found it surprising.
03:49 < edsrzf> It looks like fmt has some kind of free list that it's using
so it's not allocating every time.
03:50 < kevlar> https://gist.github.com/d60ca00f28717b18185a
03:52 < kevlar> in any case, that is something I shall definitely remember.
03:53 < kevlar> in order of preference, for writing a string: (1)
w.WriteString, (2) fmt.Fprint, (3) w.Write([]byte())
03:55 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
03:56 -!- aat [~aat@cpe-72-225-174-173.nyc.res.rr.com] has joined #go-nuts
04:07 < kevlar> I changed it to use bufio; similar results, but WriteByte()
falls interestingly far behind: https://gist.github.com/d60ca00f28717b18185a
04:07 < kevlar> er, bytes.Buffer*
04:11 -!- rejb [~rejb@unaffiliated/rejb] has quit [Disconnected by services]
04:11 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
04:16 -!- hallas [~hallas@x1-6-30-46-9a-b2-c5-1f.k891.webspeed.dk] has quit [Ping
timeout: 250 seconds]
04:26 -!- coderendezvous [~coderende@adsl-98-66-2-41.mem.bellsouth.net] has joined
#go-nuts
04:28 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has joined #go-nuts
04:34 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
04:35 -!- tav [~tav@2.96.40.157] has quit [Ping timeout: 255 seconds]
04:40 -!- tav [~tav@92.20.3.183] has joined #go-nuts
04:44 -!- mehalelal [~mehalelal@76.103.175.11] has quit [Quit: Leaving]
04:47 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has quit [Remote host
closed the connection]
05:38 -!- xulfer [~xulfer@cheapbsd.net] has quit [Read error: Connection reset by
peer]
05:40 -!- NfNitLoop [~bip@2001:470:b9cc:beef::1] has left #go-nuts []
05:43 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
05:44 -!- sfduih [~kvirc@125-236-193-190.adsl.xtra.co.nz] has joined #go-nuts
05:45 -!- sfduih [~kvirc@125-236-193-190.adsl.xtra.co.nz] has left #go-nuts []
05:47 -!- iant [~iant@216.239.45.130] has quit [Read error: Connection reset by
peer]
05:59 -!- aat [~aat@cpe-72-225-174-173.nyc.res.rr.com] has quit [Quit: Computer
has gone to sleep.]
06:00 -!- jarsen [~jarsen@76.8.206.19] has joined #go-nuts
06:03 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has quit [Remote
host closed the connection]
06:05 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has joined #go-nuts
06:05 -!- mode/#go-nuts [+v iant] by ChanServ
06:16 -!- ExtraSpice [XtraSpice@78-57-204-104.static.zebra.lt] has joined #go-nuts
06:21 -!- piranha [~piranha@5ED43A0B.cm-7-5a.dynamic.ziggo.nl] has joined #go-nuts
06:28 -!- snearch [~snearch@f053007128.adsl.alicedsl.de] has joined #go-nuts
06:29 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.5]
06:32 -!- tvw [~tv@e176009175.adsl.alicedsl.de] has joined #go-nuts
06:34 -!- coderendezvous [~coderende@adsl-98-66-2-41.mem.bellsouth.net] has quit
[Quit: Leaving]
07:07 < vsmatck> Hm. Reflect question.  I've got a reflect.Value that's a
pointer type.  How do I get the type that's pointed to?  I can't indirect it
because it's a nil pointer to the type.
07:08 < vsmatck> I'm unmarshaling in to a struct full of nil pointers.  I
want to new if the value is present.  So it can be known if a value is not present
by checking to see if the pointer is nil after unmarshal.
07:11 < Omnivore> organize your stream to not marshal nils (or default
values for that matter)
07:11 < vsmatck> *facepalm*
07:12 < Omnivore> hehe its suggested in the go docs somewhere
07:12 < vsmatck> Where?
07:13 < Omnivore> one of the serialization packages I think - or was it in
one of the dev blogs?  - horrible memory for sources :(
07:13 < vsmatck> I don't know that I can google with what information I have
about it.
07:13 < Omnivore> golang marshal
07:13 < Omnivore> golang serialization
07:14 < Omnivore> check the pkg with the net channels too
07:14 < Omnivore> thats in the standard package library
07:15 < vsmatck> All yield now results.
07:15 < vsmatck> no*
07:15 < Omnivore> hmm..  lemme try to find it
07:15 < vsmatck> It seems like it should be possible to get the type.  I'm
thinking about getting the .String() on the type and doing a switch.
07:15 -!- jarsen [~jarsen@76.8.206.19] has quit [Remote host closed the
connection]
07:16 -!- snearch [~snearch@f053007128.adsl.alicedsl.de] has quit [Quit:
Verlassend]
07:17 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
07:17 < Omnivore> http://golang.org/pkg/gob/
07:18 -!- photron [~photron@port-92-201-69-196.dynamic.qsc.de] has joined #go-nuts
07:19 < Omnivore> another reference that may be useful:
http://blog.golang.org/2011/03/gobs-of-data.html
07:19 < kevlar> vsmatck: wait, what're you doing
07:19 < kevlar> trying to determine if the reflect.Value (which has Kind
reflect.Interface) is pointing to nil?
07:20 < kevlar> er, is refering to a nil valued interface*
07:20 < vsmatck> No, I know it's pointing to nil.  I want to new a value so
I can put something in it.
07:20 < kevlar> ah
07:20 < kevlar> thats easy
07:20 < vsmatck> uffer misfeatures
07:21 < vsmatck> doh, middle click.
07:21 < kevlar> created := reflect.New(value.Elem().Type()) yes?
07:21 < kevlar> then you should be able to val.Set(created)
07:21 * vsmatck tries elem.
07:21 < kevlar> or it may be val.Type().Elem(), I can never remember.
07:22 < vsmatck> omg!  I was doing v.Elem(), when I needed to do
v.Type().Elem().
07:22 < vsmatck> :D
07:22 < kevlar> ah yes, it's val.Elem().Type() for interfaces,
val.Type().Elem() for slices and such :D
07:23 < vsmatck> Whew.  Hey man thanks a lot.  I been strugglin with that
for about an hour.
07:23 < kevlar> no, Type().Elem() is for arrays
07:23 < kevlar> "// It panics if the type's Kind is not Array, Chan, Map,
Ptr, or Slice."
07:24 < kevlar> hmm, unless that comment is wrong
07:24 < vsmatck> Hm. I got a reflect value with type "*bool".  I do
v.Type().Elem() and I get "bool" on it.
07:24 < kevlar> okay, yeah, that comment is wrong then.
07:24 < kevlar> (submit a CL to fix it)
07:24 * vsmatck checks.
07:25 < kevlar> actually, no, that's right for a pointer.
07:25 < kevlar> I was thinking it was an interface.
07:25 < kevlar> why was I thinking you were trying to create the value of an
interface?  *headdesk*
07:26 < vsmatck> Ah. I just didn't see that part of the Type interface.
07:26 < kevlar> the type interface is monstrous.
07:26 < kevlar> and Type and Kind are still mildly confusing.
07:27 < vsmatck> Unmarshaling is a little hairy.  It makes things nicer
everywhere else once you get it working tho.  :)
07:27 < kevlar> lol, yeah
07:27 < kevlar> marshaling is kinda hairy too, but it's a lot more efficient
than unmarshaling
07:27 < kevlar> (I am working on getting xml.Marshal() submitted, it's in
review)
07:28 < kevlar> rsc managed to take a scalpel to almost half the lines of
code I'd initally written :D.
07:28 < vsmatck> I wrote my own protocol buffers a while ago (int C++).  It
was basically protocol buffers without the cruft that they gotta stick with
because of compatibility.
07:28 < vsmatck> Sort of want to recreate that in Go for stuff which doesn't
require compatibility.
07:29 < kevlar> why not just use gob then?
07:29 < kevlar> it's basically protocol buffers without caring if anything
but Go or the same program version can ever use it.
07:30 < kevlar> (and yes, "because reinventing wheels is a good way to
learn" is a valid reason.  It's why I do half of what I do.  Or more...)
07:35 < vsmatck> http://pastie.org/2021391 Is the format.
07:35 < vsmatck> All the field types are implicit.  Each side has to know
what the format of the field is otherwise it can't decode it.  But it can still
delimit it (like protocol buffers).
07:35 < vsmatck> Except it only defines a swizzle int, or length delimited
field.
07:36 < vsmatck> Protocol buffers defines more stuff, gob does too.
07:36 < vsmatck> It was nightmare to implement in C++.
07:37 < vsmatck> http://sourceforge.net/projects/cpproto/ Not sure why I put
"simple clean" there.  Heh
07:37 < kevlar> I didn't think protobufs self delimited.
07:38 < kevlar> (you have to frame them yourself if you want to stream
sequential protobufs)
07:39 < vsmatck> It does in the sense that you can discard a field you don't
understand.  Like if you're an old version of a program, and you're communicating
with a new version of the program with extra field types.
07:39 < Omnivore> meh if noone ever reinvented the wheel, you'd get
splinters when you changed your car tires
07:39 < kevlar> oyeah.
07:39 < vsmatck> Omnivore: LOL!!
07:39 -!- tvw [~tv@e176009175.adsl.alicedsl.de] has quit [Remote host closed the
connection]
07:39 -!- tvw [~tv@e176009175.adsl.alicedsl.de] has joined #go-nuts
07:49 -!- ShadowIce
[~pyoro@HSI-KBW-109-193-120-162.hsi7.kabel-badenwuerttemberg.de] has joined
#go-nuts
07:49 -!- ShadowIce
[~pyoro@HSI-KBW-109-193-120-162.hsi7.kabel-badenwuerttemberg.de] has quit
[Changing host]
07:49 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
07:53 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
08:07 -!- virtualsue [~chatzilla@host81-148-98-238.in-addr.btopenworld.com] has
joined #go-nuts
08:08 -!- huin [~huin@91.85.171.238] has joined #go-nuts
08:44 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
08:47 -!- GeertJohan [~Squarc@195-240-16-71.ip.telfort.nl] has joined #go-nuts
08:47 -!- wallerdev [~wallerdev@72.44.102.30] has quit [Quit: wallerdev]
08:53 -!- tvw [~tv@e176009175.adsl.alicedsl.de] has quit [Remote host closed the
connection]
09:08 -!- huin [~huin@91.85.171.238] has quit [Quit: leaving]
09:13 -!- luruke [~luruke@adsl-ull-253-105.50-151.net24.it] has joined #go-nuts
09:13 -!- luruke [~luruke@adsl-ull-253-105.50-151.net24.it] has left #go-nuts []
09:15 -!- virtualsue [~chatzilla@host81-148-98-238.in-addr.btopenworld.com] has
quit [Ping timeout: 250 seconds]
09:21 -!- chowmeined [~chow@unaffiliated/chowmeined] has quit [Quit: Leaving]
09:21 -!- virtualsue [~chatzilla@nat/cisco/x-icbyhrmnpsxgabrz] has joined #go-nuts
09:23 -!- huin [~huin@91.85.171.238] has joined #go-nuts
09:28 -!- shvntr [~shvntr@59.35.239.66] has joined #go-nuts
09:38 -!- th0re [~thre@p5B3B4850.dip.t-dialin.net] has joined #go-nuts
09:42 -!- virtualsue [~chatzilla@nat/cisco/x-icbyhrmnpsxgabrz] has quit [Ping
timeout: 276 seconds]
09:52 -!- GeertJohan [~Squarc@195-240-16-71.ip.telfort.nl] has quit [Ping timeout:
260 seconds]
09:53 -!- mehalelal [~mehalelal@76.103.175.11] has joined #go-nuts
09:55 -!- awidegreen [~quassel@h-170-226.A212.priv.bahnhof.se] has quit [Ping
timeout: 240 seconds]
10:00 -!- th0re_ [~thre@tmo-111-74.customers.d1-online.com] has joined #go-nuts
10:01 -!- mehalelal [~mehalelal@76.103.175.11] has quit [Remote host closed the
connection]
10:02 -!- th0re [~thre@p5B3B4850.dip.t-dialin.net] has quit [Ping timeout: 252
seconds]
10:03 -!- wrtp [~rog@92.30.183.6] has joined #go-nuts
10:03 -!- ronnyy [~quassel@p4FF1C798.dip0.t-ipconnect.de] has joined #go-nuts
10:04 -!- sebastianskejoe [~sebastian@188.114.142.217] has joined #go-nuts
10:10 -!- ExtraSpice [XtraSpice@78-57-204-104.static.zebra.lt] has quit [Remote
host closed the connection]
10:15 -!- TheMue [~TheMue@p5DDF4B15.dip.t-dialin.net] has joined #go-nuts
10:17 -!- huin [~huin@91.85.171.238] has quit [Quit: leaving]
10:17 -!- awidegreen [~quassel@h-170-226.A212.priv.bahnhof.se] has joined #go-nuts
10:22 -!- th0re [~thre@tmo-111-74.customers.d1-online.com] has quit [Quit: Der weg
zur erkenntniss ist der richtige.]
10:22 -!- GeertJohan [~Squarc@195-240-16-71.ip.telfort.nl] has joined #go-nuts
10:22 < GeertJohan> goodmorning :)
10:22 < str1ngs> hai
10:32 -!- Kissaki [~Kissaki@tango076.server4you.de] has joined #go-nuts
10:46 -!- dfc [~dfc@124-149-49-45.dyn.iinet.net.au] has quit [Quit: dfc]
10:47 < TheMue> moo
10:50 < ww> quak
10:56 < TheMue> Btw, just as a helping note: I one is doing it right it will
work.
10:57 * TheMue yesterday tried to build a unit test.  But I imported the own
package, so I got a stack overflow at the init.  A very dumb error.  *sigh*
Especially I've done it in other tests the right way.
10:57 < TheMue> But once I detected my failure it now works.  *smile*
11:01 -!- Baughn [~svein@2002:5965:d1f2::1] has joined #go-nuts
11:06 -!- rutkowski [~adrian@078088202051.walbrzych.vectranet.pl] has joined
#go-nuts
11:06 -!- unofficialmvp [~dev@94-62-164-227.b.ipv4ilink.net] has joined #go-nuts
11:06 -!- unofficialmvp [~dev@94-62-164-227.b.ipv4ilink.net] has left #go-nuts []
11:08 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Ping
timeout: 260 seconds]
11:14 -!- edsrzf [~edsrzf@122-61-221-144.jetstream.xtra.co.nz] has quit [Remote
host closed the connection]
11:18 -!- GeertJohan [~Squarc@195-240-16-71.ip.telfort.nl] has quit [Ping timeout:
255 seconds]
11:58 -!- GeertJohan [~Squarc@195-240-16-79.ip.telfort.nl] has joined #go-nuts
12:20 -!- GeertJohan [~Squarc@195-240-16-79.ip.telfort.nl] has quit [Read error:
Connection reset by peer]
12:28 -!- sacho [~sacho@46.10.4.19] has quit [Read error: Connection reset by
peer]
12:41 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has joined #go-nuts
12:42 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.5]
12:43 -!- foocraft [~ewanas@86.36.49.200] has joined #go-nuts
12:53 -!- cenuij [~cenuij@170.21.8.109.rev.sfr.net] has joined #go-nuts
12:53 -!- cenuij [~cenuij@170.21.8.109.rev.sfr.net] has quit [Changing host]
12:53 -!- cenuij [~cenuij@base/student/cenuij] has joined #go-nuts
12:57 -!- shvntr [~shvntr@59.35.239.66] has quit [Quit: leaving]
13:10 -!- huin [~huin@91.85.171.238] has joined #go-nuts
13:15 -!- hargettp [~hargettp@pool-71-184-177-169.bstnma.east.verizon.net] has
joined #go-nuts
13:20 -!- Wiz126 [~Wiz@24.229.245.72.res-cmts.sm.ptd.net] has quit []
13:24 -!- Wiz126 [~Wiz@24.229.245.72.res-cmts.sm.ptd.net] has joined #go-nuts
13:24 -!- rutkowski [~adrian@078088202051.walbrzych.vectranet.pl] has quit [Quit:
WeeChat 0.3.3-dev]
13:44 -!- rputikar [~240182H@203-206-21-179.dyn.iinet.net.au] has joined #go-nuts
13:49 -!- foocraft [~ewanas@86.36.49.200] has quit [Quit: if you're going....to
san.  fran.  cisco!!!]
13:55 -!- tobym [~tobym@cpe-72-229-2-6.nyc.res.rr.com] has joined #go-nuts
14:06 -!- tobym [~tobym@cpe-72-229-2-6.nyc.res.rr.com] has quit [Ping timeout: 258
seconds]
14:07 -!- wrtp [~rog@92.30.183.6] has quit [Quit: wrtp]
14:10 -!- wrtp [~rog@92.30.183.6] has joined #go-nuts
14:15 -!- oal [4fa07a05@gateway/web/freenode/ip.79.160.122.5] has joined #go-nuts
14:16 < oal> Hey.  I just registered at Project Euler, to learn Go, however
I can't seem to find a solution for problem 1
14:16 < oal> Here's the code I've written http://pastebin.com/p8vsgqBn
14:17 < oal> The problem is "Find the sum of all the multiples of 3 or 5
below 1000."
14:19 < oal> The thing is, I get 266333, but the correct answer is 233168
14:21 < photron> your code is missing an "else"
14:21 < oal> Do I need else if there is nothing else to do?
14:21 < vegai> oal: well...  what happens when i=15 for instance?
14:22 < oal> vegai: for i := 15; ? That gives 266288
14:22 < vegai> oal: no, I mean what happens in the loop body when i=15
14:22 < oal> Ah, let me see
14:23 < oal> Ah, that would be 3*5!  I think I go it
14:23 < oal> got it*
14:23 < vegai> yep :)
14:23 < oal> Thanks ;)
14:30 -!- niemeyer [~niemeyer@201-40-174-53.pltce701.dsl.brasiltelecom.net.br] has
joined #go-nuts
14:31 -!- gavin_ [74306884@gateway/web/freenode/ip.116.48.104.132] has joined
#go-nuts
14:40 -!- tobym [~tobym@cpe-72-229-2-6.nyc.res.rr.com] has joined #go-nuts
14:40 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has joined
#go-nuts
14:53 < Kissaki> mh, wasn't there a lib for creating REST services?
15:10 -!- sebastianskejoe [~sebastian@188.114.142.217] has quit [Ping timeout: 260
seconds]
15:12 -!- sebastianskejoe [~sebastian@188.114.142.217] has joined #go-nuts
15:14 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has joined
#go-nuts
15:15 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has quit
[Client Quit]
15:16 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has joined
#go-nuts
15:19 -!- goon12 [~goon12@71-87-215-29.dhcp.oxfr.ma.charter.com] has joined
#go-nuts
15:22 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts
15:22 -!- virtualsue [~chatzilla@host81-148-98-238.in-addr.btopenworld.com] has
joined #go-nuts
15:24 -!- Kami_ [~kami@unaffiliated/kami-/x-9078513] has joined #go-nuts
15:26 -!- th0re [~thre@p5B3B4850.dip.t-dialin.net] has joined #go-nuts
15:27 -!- angasule__ [~angasule@190.2.33.49] has joined #go-nuts
15:27 -!- angasule [~angasule@190.2.33.49] has quit [Ping timeout: 252 seconds]
15:32 -!- crashR [~crasher@codextreme.pck.nerim.net] has joined #go-nuts
15:32 -!- dj2 [~dj2@CPE001f5b35feb4-CM0014048e0344.cpe.net.cable.rogers.com] has
quit [Remote host closed the connection]
15:41 -!- gavin_ [74306884@gateway/web/freenode/ip.116.48.104.132] has quit [Quit:
Page closed]
15:42 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has quit
[Ping timeout: 240 seconds]
15:43 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has quit [Remote host
closed the connection]
15:45 -!- ronnyy [~quassel@p4FF1C798.dip0.t-ipconnect.de] has quit [Remote host
closed the connection]
15:50 -!- boscop [~boscop@unaffiliated/boscop] has quit [Ping timeout: 255
seconds]
15:52 -!- DerHorst [~Horst@e176108027.adsl.alicedsl.de] has joined #go-nuts
15:55 -!- tobym [~tobym@cpe-72-229-2-6.nyc.res.rr.com] has quit [Ping timeout: 240
seconds]
15:57 -!- boscop [~boscop@unaffiliated/boscop] has joined #go-nuts
15:59 < Kissaki> I seem to have problems with goinstall.  For one github
repo, goinstall does not work for my forked repo, but for the original github repo
as well as another forked one.  Same with another github repo I forked, own does
not work, but original does work.  Cloning the repo by hand and then running
goinstall works fine.  It seems goinstall does not check out my repos correctly.
15:59 < Kissaki> "Your configuration specifies to merge with the ref
'master' from the remote, but no such ref was fetched."
15:59 < Kissaki> What could be the problem?  Shouldn't the github repos be
the same?
15:59 < Kissaki> at least for goinstall
16:06 < niemeyer> Kissaki: Can you please paste the command + result
somewhere?
16:08 < Kissaki> sure
16:10 < Kissaki> niemeyer, https://gist.github.com/c862f7f6273b25ba4d7f
16:12 < niemeyer> Kissaki: can you please kill the
home/jan/go/src/pkg/github.com/kissaki/go-xmpp directory, assuming you have no
local changes you want to preserve, and try again?
16:12 < Kissaki> yeah, I did just that just now, for pasting that :)
16:13 < Kissaki> let me make sure again
16:13 < niemeyer> Kissaki: Let me check it
16:14 < Kissaki> totally gone
16:14 -!- tobym [~tobym@cpe-72-229-2-6.nyc.res.rr.com] has joined #go-nuts
16:14 -!- GeertJohan [~Squarc@ip4da06866.direct-adsl.nl] has joined #go-nuts
16:14 -!- Fish- [~Fish@9fans.fr] has joined #go-nuts
16:14 -!- boscop [~boscop@unaffiliated/boscop] has quit [Ping timeout: 255
seconds]
16:14 < Kissaki> very strange that I have it for my own repos, but not for
the other ones, where one is based on the other one.
16:16 < niemeyer> Kissaki: That repository does not exist.  Your username
has a capital K
16:16 < Kissaki> could it be that the key is passed to github, which somehow
fucks fetching up when you have write access?
16:16 < Kissaki> oh, so that matters?
16:16 -!- hargettp [~hargettp@pool-71-184-177-169.bstnma.east.verizon.net] has
left #go-nuts ["Linkinus - http://linkinus.com"]
16:16 -!- DerHorst [~Horst@e176108027.adsl.alicedsl.de] has quit [Remote host
closed the connection]
16:16 < Kissaki> -.-
16:16 < niemeyer> Kissaki: Yeah, path names in URLs are case sensitive :)
16:17 < Kissaki> ah right, it's also in the clone url
16:17 < Kissaki> ok thanks :P
16:17 -!- boscop [~boscop@unaffiliated/boscop] has joined #go-nuts
16:19 -!- mogoh [~mogoh@ip-95-222-106-192.unitymediagroup.de] has joined #go-nuts
16:20 -!- sacho [~sacho@95-42-105-25.btc-net.bg] has joined #go-nuts
16:21 < mogoh> Hallo.  Why could have return values names?
16:21 < niemeyer> Kissaki: np
16:21 < niemeyer> mogoh: Hm?
16:21 < niemeyer> mogoh: The question is why return values have names?
16:22 < mogoh> yes
16:22 < mogoh> oh, bad english
16:22 < niemeyer> mogoh: Because it makes it easy to tell what they mean,
and because in some cases it's easier to create logic using these variables in the
function body
16:24 < mogoh> niemeyer: ok, thanks :)
16:24 < niemeyer> mogoh: No worries
16:26 -!- marko_ [~marko@host128-202-dynamic.250-95-r.retail.telecomitalia.it] has
joined #go-nuts
16:28 -!- snearch [~snearch@f053007128.adsl.alicedsl.de] has joined #go-nuts
16:31 -!- jarsen [~jarsen@76.8.206.19] has joined #go-nuts
16:35 -!- crashR [~crasher@codextreme.pck.nerim.net] has quit [Ping timeout: 260
seconds]
16:36 -!- marko_ [~marko@host128-202-dynamic.250-95-r.retail.telecomitalia.it] has
quit [Ping timeout: 255 seconds]
16:37 -!- crashR [~crasher@codextreme.pck.nerim.net] has joined #go-nuts
16:38 -!- alehorst [~alehorst@189.58.28.232.dynamic.adsl.gvt.net.br] has quit
[Read error: Connection reset by peer]
16:41 -!- crashR [~crasher@codextreme.pck.nerim.net] has quit [Client Quit]
16:45 -!- alehorst [~alehorst@186.212.209.175] has joined #go-nuts
16:45 -!- wallerdev [~wallerdev@72.44.102.30] has joined #go-nuts
16:49 -!- jarsen [~jarsen@76.8.206.19] has quit [Remote host closed the
connection]
16:49 -!- boscop [~boscop@unaffiliated/boscop] has quit [Ping timeout: 248
seconds]
16:50 -!- th0re [~thre@p5B3B4850.dip.t-dialin.net] has quit [Ping timeout: 252
seconds]
16:50 -!- prip [~foo@host92-220-dynamic.45-79-r.retail.telecomitalia.it] has quit
[Ping timeout: 248 seconds]
16:50 -!- prip [~foo@host92-220-dynamic.45-79-r.retail.telecomitalia.it] has
joined #go-nuts
16:50 -!- boscop [~boscop@unaffiliated/boscop] has joined #go-nuts
16:52 -!- th0re [~thre@p5B3B4850.dip.t-dialin.net] has joined #go-nuts
16:54 -!- crashR [~crasher@codextreme.pck.nerim.net] has joined #go-nuts
16:56 -!- zcram [~zcram@77-233-85-113.cdma.dyn.kou.ee] has joined #go-nuts
16:57 -!- icey [~user@ip68-104-183-151.ph.ph.cox.net] has quit [Quit: ERC Version
5.3 (IRC client for Emacs)]
16:59 -!- tvw [~tv@e176009175.adsl.alicedsl.de] has joined #go-nuts
17:01 -!- th0re [~thre@p5B3B4850.dip.t-dialin.net] has quit [Quit: Der weg zur
erkenntniss ist der richtige.]
17:09 -!- boscop_ [~boscop@g227013241.adsl.alicedsl.de] has joined #go-nuts
17:09 < GeertJohan> How to use a func with multiple return values directly
in another func call?  Like: callMe(singleReturnValue(), "abc") ?
17:10 < skelterjohn> either use an intermediate variable or wrap it in
another function
17:10 -!- boscop [~boscop@unaffiliated/boscop] has quit [Ping timeout: 250
seconds]
17:10 < skelterjohn> func ReturnOnlyOne(x int) (y int) { y, _ =
ReturnAFew(x) }
17:12 < GeertJohan> ah ok, thats a nice one, did think of the intermediate
var..  wrapper is nicer solution when the functionality is required mored ofte..
17:12 < GeertJohan> thx :)
17:17 -!- snearch [~snearch@f053007128.adsl.alicedsl.de] has quit [Quit:
Verlassend]
17:19 < skelterjohn> one day a clever compiler will optimize it away
17:19 -!- ronnyy [~quassel@p4FF1C798.dip0.t-ipconnect.de] has joined #go-nuts
17:20 < jessta_> GeertJohan: hopefully those aren't errors you're ignoring
17:21 -!- Fish- [~Fish@9fans.fr] has quit [Ping timeout: 255 seconds]
17:21 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has quit [Remote
host closed the connection]
17:22 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has joined
#go-nuts
17:23 < GeertJohan> jessta_: how do you mean :)
17:23 -!- napsy [~luka@88.200.96.18] has quit [Quit: Lost terminal]
17:34 -!- Fish- [~Fish@9fans.fr] has joined #go-nuts
17:36 -!- rael_wiki [~chatzilla@unaffiliated/rael-wiki/x-8420294] has joined
#go-nuts
17:37 < rael_wiki> hello
17:37 < skelterjohn> GeertJohan: a lot of functions will return an error as
a 2nd parameter
17:37 < skelterjohn> and you shouldn't ignore it
17:39 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-182-206.clienti.tiscali.it] has
joined #go-nuts
17:40 < Kissaki> mogoh, If I remember correctly the tutorial also gives
usage-examples of the named return vars.  I'm not too sure what it was, somehow
when you had to access them, in goroutines or outside of the actual block or sth.
If you're really interested, check the tutorial.  Not even sure where it was
anymore...  first or second tut, or effective go ...  Arr, what a bad answer
17:41 < rael_wiki> I have a class which has a method to get some info, this
class starts a goroutine, makes some initialization and then can give the info to
the caller.  Is it a good a idea, in order for the caller to wait until the init
phase is done, to create an unbuffered chan from which the caller reads and the
goroutine closes that chan when the init phase is done?
17:41 < rael_wiki> if I'm not wrong the caller wiull block until the chan
gets closed
17:41 < rael_wiki> *will
17:41 < mogoh> Kissaki: I have not found an usage example, but I will look
again :)
17:42 < Kissaki> rael_wiki, why do a goroutine in the first place then?
17:42 < mogoh> Kissaki: I havent read everything yet
17:43 < GeertJohan> skelterjohn: ah yes I know, I'm always checking function
headers for multiple return values and always handling errors :)
17:43 < Kissaki> mogoh, sorry I can't give you anything more specific :P
17:43 < mogoh> Kissaki: ^^
17:44 < rael_wiki> Kissaki: because the routine which starts this class
wants to start it, do stuff, and then call the methods
17:45 -!- virtualsue [~chatzilla@host81-148-98-238.in-addr.btopenworld.com] has
quit [Quit: ChatZilla 0.9.87 [Firefox 4.0.1/20110413222027]]
17:45 < rael_wiki> Kissaki: this class' goroutine should keep running in
background and sometimens the creator will call it's methods
17:47 < GeertJohan> So I have this struct Note which implements the Item
interface..
17:47 < GeertJohan> and I have a List with Items..
17:49 < GeertJohan> the list contains one Note, which is "casted" (I guess)
when I use func AddItem(item Item) using this Call AddItem(note), where note is
type *Note
17:49 < GeertJohan> when at another moment I get the first element from the
List, I can still assert its value as Item..  but not as Note
17:50 < GeertJohan> so I can still call the Item method's (after I asserted
it as Item)..
17:50 < GeertJohan> but assertion to Note fails (ok = false)
17:50 < GeertJohan> why?  :s
17:51 < GeertJohan> tried a lot of stuff, shifting arround with pointers and
stuff..  but doesnt work :s
17:52 < GeertJohan> should I make a Note inteface?
17:52 < GeertJohan> and change the struct to NoteImplementation or something
/
17:52 < GeertJohan> and then assert to that interface?
17:53 < jessta_> GeertJohan: shouldn't you be asserting to *Note instead of
Note?
17:53 < GeertJohan> yeah well thats a wierd thing too
17:53 < GeertJohan> cause you would think so
17:53 < GeertJohan> but assertion to Item (not *Item) works fine...  can
call all of Item's methods..
17:54 < GeertJohan> when asserting to *Item it fails..
17:54 < GeertJohan> on the method calls..
17:54 < GeertJohan> cause *Item doesnt have methods..  it sais..
17:54 < GeertJohan> but ehm, let me see..  using *Note now
17:55 < GeertJohan> whaaat
17:55 < GeertJohan> :o it works :D :P
17:55 < jessta_> You probably dont want a *Item
17:55 < jessta_> pointers to interfaces are rarely useful
17:55 < GeertJohan> hum
17:56 < GeertJohan> I think I was thinking the wrong way about interfaces..
17:57 < jessta_> yeah, If you're making that mistake you should probably
re-read all the stuff about interfaces
17:57 < GeertJohan> yeah :P
17:57 < GeertJohan> hehe
17:58 < GeertJohan> hum yeah, I was asuming that once I had a pointer to a
struct instance...  the interface should be pointer too..
17:58 < jessta_>
http://research.swtch.com/2009/12/go-data-structures-interfaces.html
17:58 -!- virtualsue [~chatzilla@host81-148-98-238.in-addr.btopenworld.com] has
joined #go-nuts
17:59 < jessta_> unlike a lot of other languages, in Go interfaces are
runtime types of their own
18:03 -!- dj2 [~dj2@CPE001f5b35feb4-CM0014048e0344.cpe.net.cable.rogers.com] has
joined #go-nuts
18:09 -!- tvw [~tv@e176009175.adsl.alicedsl.de] has quit [Remote host closed the
connection]
18:11 < GeertJohan> :) ok
18:11 < GeertJohan> reading ..  :)
18:11 < GeertJohan> that link
18:12 -!- angasule__ [~angasule@190.2.33.49] has quit [Ping timeout: 276 seconds]
18:13 < GeertJohan> skelterjohn: ah, this is something that works nice too
:) : if v, ok := any.(Stringer); ok {
18:14 < skelterjohn> yes...not sure what that is apropos of
18:14 < GeertJohan> regarding the multiple return values in if
18:14 < skelterjohn> yeah but you aren't ignoring any of them
18:14 < GeertJohan> offcourse that is an intermediate var...
18:14 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
18:14 < skelterjohn> and that has nothing to do with multiple return values
explicitely
18:14 < cenuij> oh i see an fcgi responder arrived in the http package, this
is new since 57/57.1?
18:14 < skelterjohn> you can also do "if y := foo; isOk() { ...  }"
18:15 < GeertJohan> true, but I mean, its shorter youknow...  like..  the if
and function call on one line
18:16 < skelterjohn> yes - i use this syntax all the time
18:17 < GeertJohan> ok :)
18:18 -!- photron [~photron@port-92-201-69-196.dynamic.qsc.de] has quit [Ping
timeout: 252 seconds]
18:21 -!- awidegreen [~quassel@h-170-226.A212.priv.bahnhof.se] has quit [Read
error: No route to host]
18:23 -!- tux21b [~christoph@chello213047047175.3.graz.surfer.at] has quit [Ping
timeout: 258 seconds]
18:24 < kamaji> I'm gonna fork the text processing part of my machine
learning library, anyone want to suggest a name?
18:24 < kamaji> it's basically like WVTool
18:24 < kamaji> or should I keep it as part of the library
18:25 < aiju> call it volkswagentool!
18:25 < kamaji> so hard to type ;_;
18:25 -!- awidegreen [~quassel@h-170-226.A212.priv.bahnhof.se] has joined #go-nuts
18:36 -!- wrtp [~rog@92.30.183.6] has quit [Quit: wrtp]
18:38 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:70f1:d635:e534:63cf] has joined
#go-nuts
18:38 -!- wrtp [~rog@92.30.183.6] has joined #go-nuts
18:39 -!- virtualsue [~chatzilla@host81-148-98-238.in-addr.btopenworld.com] has
quit [Ping timeout: 255 seconds]
18:40 -!- foocraft [~ewanas@78.101.153.142] has joined #go-nuts
18:44 -!- niemeyer [~niemeyer@201-40-174-53.pltce701.dsl.brasiltelecom.net.br] has
quit [Ping timeout: 240 seconds]
18:45 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
18:46 -!- virtualsue [~chatzilla@nat/cisco/x-ysmgmdwsfgypykvx] has joined #go-nuts
18:49 -!- ronnyy [~quassel@p4FF1C798.dip0.t-ipconnect.de] has quit [Remote host
closed the connection]
18:51 -!- niemeyer [~niemeyer@201-40-174-53.pltce701.dsl.brasiltelecom.net.br] has
joined #go-nuts
18:51 -!- DisposaBoy [~DisposaBo@212.78.230.238] has joined #go-nuts
18:53 -!- DisposaBoy [~DisposaBo@212.78.230.238] has quit [Remote host closed the
connection]
18:56 -!- Coanda [~dennis@users.d75.net] has joined #go-nuts
19:01 -!- Coanda [~dennis@users.d75.net] has quit [Quit: WeeChat 0.3.4]
19:02 -!- Coanda [~dennis@users.d75.net] has joined #go-nuts
19:06 -!- wallerdev [~wallerdev@72.44.102.30] has quit [Read error: Connection
reset by peer]
19:16 -!- icy [~icy@lighttpd/icy] has left #go-nuts []
19:16 -!- Project-2501 [~Marvin@82.84.94.73] has joined #go-nuts
19:17 -!- angasule__ [~angasule@190.2.33.49] has joined #go-nuts
19:19 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-182-206.clienti.tiscali.it] has
quit [Ping timeout: 240 seconds]
19:21 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has joined #go-nuts
19:24 -!- aat [~aat@cpe-72-225-174-173.nyc.res.rr.com] has joined #go-nuts
19:25 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has quit [Remote host
closed the connection]
19:26 -!- dfr|mac [~dfr|work@nat/google/x-xmiidiydgedohbpf] has joined #go-nuts
19:26 < kamaji> can I take L2 norm of a vector with gomatrix?
19:26 -!- dfr|mac_ [~dfr|work@ool-182e3fca.dyn.optonline.net] has joined #go-nuts
19:28 < kamaji> oh, TwoNorm
19:30 < vsmatck> http://pastie.org/2023831 What does this "using
unaddressable value" error mean?
19:31 -!- dfr|mac [~dfr|work@nat/google/x-xmiidiydgedohbpf] has quit [Ping
timeout: 260 seconds]
19:31 -!- rutkowski [~adrian@078088202051.walbrzych.vectranet.pl] has joined
#go-nuts
19:33 < fvbommel> vsmatck: It means you're trying to set a reflect.Value
you're not allowed to change.
19:35 < fvbommel> if you use something like "x := false; v :=
reflect.ValueOf(&x).Elem()" instead of your current definition of 'v' it should
work.
19:36 < vsmatck> Ah. So with reflect you can't create values and use them.
You _must_ manipulate values created outside of reflect?  Is that the general
thinking?
19:37 < fvbommel> Alternatively, if you only want to change v itself but not
anything else, you can always use "v = reflect.ValueOf(true)".
19:38 < fvbommel> You can also use "v :=
reflect.New(reflect.TypeOf(true)).Elem()" to heap-allocate a boolean you can
change via reflect.  This is more useful when you don't know the exact type at
compile time.
19:38 < fvbommel> So you *can* create values via reflect, but it's not
always the best way to do it.
19:39 < vsmatck> Ah. I will try this.  I don't know the type of my value, it
depends on another reflect value I get.  So the second way may workf or me.
19:39 < fvbommel> But basically, you can't use
reflect.ValueOf(whatever).Set(something)
19:41 < vsmatck> That's workin for me.  :) tmp :=
reflect.New(fv.Type().Elem()).Elem() Getting the type the slice holds, making a
new heap allocated element.
19:41 -!- th0re [~thre@p5B3B4850.dip.t-dialin.net] has joined #go-nuts
19:42 -!- Fish- [~Fish@9fans.fr] has quit [Quit: So Long, and Thanks for All the
Fish]
19:42 < vsmatck> fvbommel: Thanks for your help.  I really appreciate it.
19:42 -!- Fish- [~Fish@9fans.fr] has joined #go-nuts
19:43 -!- sebastia1skejoe [~sebastian@188.114.142.217] has joined #go-nuts
19:43 < fvbommel> vsmatck: No problem.  Just spent some time figuring all
that out myself :).
19:44 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has joined
#go-nuts
19:45 -!- icey [~user@ip68-104-183-151.ph.ph.cox.net] has joined #go-nuts
19:45 < vsmatck> This reflect stuff is a new type of thinking for me.  You
can't do much of this type of stuff in C++.  Seems really great for unmarshaling
things.
19:45 < fvbommel> Yep :).
19:46 -!- sebastianskejoe [~sebastian@188.114.142.217] has quit [Ping timeout: 250
seconds]
19:49 -!- niemeyer [~niemeyer@201-40-174-53.pltce701.dsl.brasiltelecom.net.br] has
quit [Ping timeout: 240 seconds]
19:56 -!- th0re [~thre@p5B3B4850.dip.t-dialin.net] has quit [Quit: Der weg zur
erkenntniss ist der richtige.]
19:56 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 246 seconds]
19:56 -!- Knirch [fatal@debian.as] has joined #go-nuts
19:57 < Knirch> how is gos support with lighter libc implementations, like
uclibc, dietlibc, musl?
19:57 < aiju> Knirch: Go has its own libc
19:58 < Knirch> nice, ok, thanks
19:58 -!- hallas [~hallas@x1-6-30-46-9a-b2-c5-1f.k891.webspeed.dk] has joined
#go-nuts
20:01 < rael_wiki> I'm sorry I made a question some hours ago but didn't get
an answer, is it unpolite to repost it?
20:02 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has joined
#go-nuts
20:04 -!- rutkowski [~adrian@078088202051.walbrzych.vectranet.pl] has quit [Quit:
WeeChat 0.3.3-dev]
20:04 < mogoh> bye bye :)
20:04 -!- mogoh [~mogoh@ip-95-222-106-192.unitymediagroup.de] has quit [Quit:
Verlassend]
20:09 -!- Zoopee [alsbergt@zoopee.org] has joined #go-nuts
20:12 < wrtp> rael_wiki: in answer to your question: yes, as far as i can
work out without further info
20:13 < rael_wiki> wrtp: I was wondering if the behaviour of the read on a
close channel can change in the future...
20:13 < rael_wiki> *closed
20:14 < wrtp> rael_wiki: how do you think it might change?
20:15 < rael_wiki> maybe panicking like the write?
20:15 < wrtp> definitely not
20:15 < |Craig|> rael_wiki: that would make closing useless
20:15 < wrtp> the whole point of closing a channel is so that the reader can
tell when it's been closed
20:16 < |Craig|> well, I guess you could use recover, but making recover
necessary to read from a chanel in a safe manner until it closes would be bad
20:16 < wrtp> but in your case, you could just as well use sync.Once, i
think
20:16 < rael_wiki> ok, so I guess it's no bad habit to do something like the
stuff I was asking for
20:16 < wrtp> no
20:16 < wrtp> it's just fine
20:17 < wrtp> you can rely on the channel semantics
20:17 < rael_wiki> wrtp: I never heard about sync.Once, I'm going to take a
look at it
20:17 < rael_wiki> thanks for the answers
20:17 < wrtp> np
20:20 -!- pothos [~pothos@111-240-168-112.dynamic.hinet.net] has quit [Read error:
Connection reset by peer]
20:21 -!- boscop_ [~boscop@g227013241.adsl.alicedsl.de] has quit [Ping timeout:
255 seconds]
20:22 -!- pothos [~pothos@111-240-170-45.dynamic.hinet.net] has joined #go-nuts
20:24 -!- piranha [~piranha@5ED43A0B.cm-7-5a.dynamic.ziggo.nl] has quit [Quit:
Computer has gone to sleep.]
20:30 -!- toadflax [~toadflax@unaffiliated/toadflax] has joined #go-nuts
20:37 -!- Fish- [~Fish@9fans.fr] has quit [Quit: So Long, and Thanks for All the
Fish]
20:39 -!- sacho [~sacho@95-42-105-25.btc-net.bg] has quit [Ping timeout: 255
seconds]
20:43 -!- GeertJohan [~Squarc@ip4da06866.direct-adsl.nl] has quit [Quit: Leaving.]
20:47 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has quit [Remote
host closed the connection]
20:48 -!- oal [4fa07a05@gateway/web/freenode/ip.79.160.122.5] has quit [Ping
timeout: 252 seconds]
20:51 -!- Project-2501 [~Marvin@82.84.94.73] has quit [Quit: E se abbasso questa
leva che succ...]
20:53 -!- huin [~huin@91.85.171.238] has quit [Quit: leaving]
20:55 -!- sebastia1skejoe [~sebastian@188.114.142.217] has quit [Quit: Lost
terminal]
20:55 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Ping timeout: 255
seconds]
20:58 -!- alkavan_ [~alkavan@IGLD-84-228-126-217.inter.net.il] has joined #go-nuts
21:01 * TheMue has just published the first alpha of his RESTful Web Framework at
http://code.google.com/p/tideland-rwf/.
21:02 < TheMue> Now it's time to go to bed.
21:02 -!- TheMue [~TheMue@p5DDF4B15.dip.t-dialin.net] has quit [Quit: TheMue]
21:02 -!- edsrzf [~edsrzf@122-61-221-144.jetstream.xtra.co.nz] has joined #go-nuts
21:04 -!- rlab [~Miranda@91.200.158.34] has quit [Quit: Miranda IM! Smaller,
Faster, Easier.  http://miranda-im.org]
21:07 -!- virtualsue [~chatzilla@nat/cisco/x-ysmgmdwsfgypykvx] has quit [Ping
timeout: 252 seconds]
21:19 -!- virtualsue [~chatzilla@host81-148-98-238.in-addr.btopenworld.com] has
joined #go-nuts
21:21 -!- Varriount [~Varriount@99.198.122.47] has quit [Disconnected by services]
21:21 -!- Varriount [~Varriount@public-craft.com] has joined #go-nuts
21:21 -!- Varriount [~Varriount@public-craft.com] has quit [Disconnected by
services]
21:22 -!- Varriount [~Varriount@public-craft.com] has joined #go-nuts
21:22 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:70f1:d635:e534:63cf] has quit
[Quit: Leaving.]
21:22 -!- edsrzf_ [~edsrzf@122-61-221-144.jetstream.xtra.co.nz] has joined
#go-nuts
21:22 -!- Varriount [~Varriount@public-craft.com] has quit [Disconnected by
services]
21:23 -!- Varriount [~Varriount@public-craft.com] has joined #go-nuts
21:24 -!- edsrzf [~edsrzf@122-61-221-144.jetstream.xtra.co.nz] has quit [Ping
timeout: 276 seconds]
21:28 -!- flaguy48 [~gmallard@user-0c6s350.cable.mindspring.com] has left #go-nuts
[]
21:39 -!- ynv [~alon@xdsl-188-154-4-146.adslplus.ch] has joined #go-nuts
21:44 -!- elephants [~elephants@173.230.160.81] has joined #go-nuts
21:50 -!- sacho [~sacho@95-42-105-25.btc-net.bg] has joined #go-nuts
21:57 -!- ynv [~alon@xdsl-188-154-4-146.adslplus.ch] has quit [Quit: Lost
terminal]
22:00 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
22:05 -!- jarsen [~jarsen@76.8.206.19] has joined #go-nuts
22:05 -!- dfc [~dfc@124-149-49-45.dyn.iinet.net.au] has joined #go-nuts
22:08 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 252 seconds]
22:10 -!- jarsen [~jarsen@76.8.206.19] has quit [Remote host closed the
connection]
22:12 -!- juanfra [~juanfra@juanfra.xen.prgmr.com] has left #go-nuts []
22:13 -!- dfc [~dfc@124-149-49-45.dyn.iinet.net.au] has quit [Quit: dfc]
22:23 -!- niemeyer [~niemeyer@201-40-174-53.pltce701.dsl.brasiltelecom.net.br] has
joined #go-nuts
22:25 -!- franciscosouza [~francisco@187.105.21.125] has joined #go-nuts
22:33 -!- flaguy48 [~gmallard@user-0c6s350.cable.mindspring.com] has joined
#go-nuts
22:33 -!- zcram [~zcram@77-233-85-113.cdma.dyn.kou.ee] has quit [Ping timeout: 244
seconds]
22:40 -!- ynv [~alon@xdsl-188-154-4-146.adslplus.ch] has joined #go-nuts
22:53 -!- rael_wiki [~chatzilla@unaffiliated/rael-wiki/x-8420294] has quit [Quit:
ChatZilla 0.9.87 [Iceweasel 3.5.19/20110430164311]]
22:56 -!- aat [~aat@cpe-72-225-174-173.nyc.res.rr.com] has quit [Quit: Computer
has gone to sleep.]
23:11 -!- ynv [~alon@xdsl-188-154-4-146.adslplus.ch] has quit [Quit: leaving]
23:15 -!- aat [~aat@cpe-72-225-174-173.nyc.res.rr.com] has joined #go-nuts
23:20 -!- wrtp [~rog@92.30.183.6] has quit [Quit: wrtp]
23:21 -!- franciscosouza_ [~francisco@187.105.21.125] has joined #go-nuts
23:21 -!- franciscosouza [~francisco@187.105.21.125] has quit [Read error:
Connection reset by peer]
23:21 -!- Stiletto [7f000001@69.195.144.4] has quit [Ping timeout: 255 seconds]
23:25 -!- dfc [~dfc@eth59-167-133-99.static.internode.on.net] has joined #go-nuts
23:25 -!- Stiletto [7f000001@69.195.144.4] has joined #go-nuts
23:28 < vsmatck> Hm. I came upon a nice way of doing a thing in go.  m :=
make([]string,0); m := add(m, "hi"); vs m := add(nil, "hi").  Second one just
creates the container if if sees nil.
23:29 < vsmatck> Seems like a good way to go if you have functions which add
to a map or slice.
23:30 -!- dfc [~dfc@eth59-167-133-99.static.internode.on.net] has quit [Client
Quit]
23:32 < kevlar> yeah, the append notation with a nil slice is nice,
especially for accumulating a named return parameter result slice and such
23:34 -!- dfc [~dfc@eth59-167-133-99.static.internode.on.net] has joined #go-nuts
23:39 < vsmatck> Hm. I suspected I wasn't the first person to do this.  :)
23:44 -!- virtualsue [~chatzilla@host81-148-98-238.in-addr.btopenworld.com] has
quit [Ping timeout: 255 seconds]
23:54 -!- angasule__ [~angasule@190.2.33.49] has quit [Ping timeout: 240 seconds]
23:54 -!- foocraft [~ewanas@78.101.153.142] has quit [Quit: Leaving]
--- Log closed Mon Jun 06 00:00:53 2011