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

--- Log opened Sun Jul 24 00:00:01 2011
00:02 -!- kungfuelmosan [~kungfuelm@121-73-91-220.cable.telstraclear.net] has
joined #go-nuts
00:04 -!- Bigbear1 [~Cody@d75-158-129-33.abhsia.telus.net] has quit [Read error:
Connection reset by peer]
00:08 -!- foocraft [~ewanas@178.152.120.32] has joined #go-nuts
00:12 -!- Bigbear1 [~Cody@d75-158-129-33.abhsia.telus.net] has joined #go-nuts
00:36 -!- danilo04
[~danilo04@province-wireless-173-84-26-168.dr02.roch.ny.frontiernet.net] has
joined #go-nuts
00:40 -!- clip9_ [clip9@109.169.41.5] has joined #go-nuts
00:40 -!- AndrewBC_ [~andrewbc@scarlet.andrewbc.net] has joined #go-nuts
00:41 -!- tsung [~jon@112.104.53.151] has joined #go-nuts
00:42 -!- GoBIR_ [~gobir@70-90-168-189-SFBACalifornia.hfc.comcastbusiness.net] has
joined #go-nuts
00:45 -!- Netsplit *.net <-> *.split quits: clip9, |Craig|, GoBIR, chressie,
pjm0616, Adys, Bigbear1, tsung_, qrush, AndrewBC
00:46 -!- _macro [~Neil@c-67-169-183-90.hsd1.ca.comcast.net] has joined #go-nuts
00:48 -!- Bigbear1 [~Cody@d75-158-129-33.abhsia.telus.net] has joined #go-nuts
00:48 -!- Bigbear1 [~Cody@d75-158-129-33.abhsia.telus.net] has quit [Read error:
Connection reset by peer]
00:49 -!- kamaji [~kamaji@handtomouse.demon.co.uk] has quit [Quit: sleep]
00:50 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts
00:52 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
00:54 -!- foxen [~foxen@212.12.18.237] has joined #go-nuts
00:55 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has joined #go-nuts
00:57 -!- pjm0616 [~user@114.200.203.101] has joined #go-nuts
01:02 -!- _macro [~Neil@c-67-169-183-90.hsd1.ca.comcast.net] has quit [Ping
timeout: 240 seconds]
01:07 -!- _macro [~Neil@c-67-169-183-90.hsd1.ca.comcast.net] has joined #go-nuts
01:09 -!- qrush [u1528@gateway/web/irccloud.com/x-covuekabljevhlym] has joined
#go-nuts
01:22 -!- moraes [~moraes@189.103.188.201] has joined #go-nuts
01:30 -!- vsayer [~vsayer@c-67-170-236-166.hsd1.ca.comcast.net] has quit [Remote
host closed the connection]
01:44 -!- pvarga [~pvarga@pool-71-187-202-33.nwrknj.fios.verizon.net] has joined
#go-nuts
01:45 -!- Wiz126 [Wiz@h229.120.232.68.dynamic.ip.windstream.net] has quit [Ping
timeout: 260 seconds]
01:46 -!- pvarga [~pvarga@pool-71-187-202-33.nwrknj.fios.verizon.net] has quit
[Remote host closed the connection]
01:58 -!- Niedar [~bleh@ip68-99-166-222.hr.hr.cox.net] has quit [Quit: (
www.nnscript.com :: NoNameScript 4.22 :: www.esnation.com )]
01:58 -!- _macro [~Neil@c-67-169-183-90.hsd1.ca.comcast.net] has quit [Ping
timeout: 264 seconds]
01:58 -!- erus` [~chatzilla@cpc2-gill2-0-0-cust701.basl.cable.virginmedia.com] has
quit [Remote host closed the connection]
02:01 -!- kungfuelmosan [~kungfuelm@121-73-91-220.cable.telstraclear.net] has quit
[Ping timeout: 258 seconds]
02:04 -!- Wiz126 [Wiz@h229.120.232.68.dynamic.ip.windstream.net] has joined
#go-nuts
02:09 -!- robteix_ [~robteix@host79.190-30-209.telecom.net.ar] has joined #go-nuts
02:18 -!- pjacobs [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has
joined #go-nuts
02:23 -!- Niedar [~bleh@ip68-99-166-222.hr.hr.cox.net] has joined #go-nuts
02:27 -!- robteix [~robteix@host79.190-30-209.telecom.net.ar] has quit [Quit:
Leaving...]
02:27 -!- Kahvi [5b9b57fc@gateway/web/freenode/ip.91.155.87.252] has joined
#go-nuts
02:28 -!- Niedar [~bleh@ip68-99-166-222.hr.hr.cox.net] has quit [Read error:
Connection reset by peer]
02:28 -!- Count_Niedar [~bleh@ip68-99-166-222.hr.hr.cox.net] has joined #go-nuts
02:38 -!- danilo04
[~danilo04@province-wireless-173-84-26-168.dr02.roch.ny.frontiernet.net] has quit
[Quit: Leaving]
02:47 -!- chressie [~chressie@dreggn.in-ulm.de] has joined #go-nuts
02:48 -!- vsayer [~vsayer@c-67-170-236-166.hsd1.ca.comcast.net] has joined
#go-nuts
02:50 -!- flavius [~flav@unaffiliated/flavious] has quit [Ping timeout: 255
seconds]
03:02 -!- NiteRain [~kvirc@c-98-254-236-21.hsd1.fl.comcast.net] has quit [Quit:
KVIrc 4.1.1 Equilibrium http://www.kvirc.net/]
04:01 -!- chadkouse [~Adium@rrcs-74-218-87-242.central.biz.rr.com] has joined
#go-nuts
04:06 -!- Dr_Who [~tgall_foo@linaro/tgall-foo] has quit [Quit: ZZZZZzzzzz]
04:11 -!- kergoth_ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has quit [Quit:
Computer has gone to sleep.]
04:14 < askhader> For some reason Parse in this source returns a pointer to
an empty 'c'.  THis suggests xml.Unmarshal failed but the structures i've defined
match the xml document structure...
04:14 < askhader> http://pastebin.com/CsttBdN5
04:15 -!- moraes [~moraes@189.103.188.201] has quit [Ping timeout: 255 seconds]
04:18 < jessta> askhader: did you look at the error returned?
04:19 < askhader> jessta: There is no error returned
04:19 < askhader> c merely points to a blank object
04:19 < askhader> does xml.Unmarshal return an error?
04:20 < jessta> yes
04:20 < askhader> So it does!
04:21 < jessta> askhader: it's generally prety obvious what kinds of
functions will return an error.
04:22 < askhader> EOF error...
04:23 < jessta> askhader: ah, also you don't need to use pointers to
interfaces
04:23 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
04:24 < jessta> i.e feedxml *io.Reader should be feedxml io.Reader
04:24 < askhader> Neat.
04:27 < askhader> Ah I see another error
04:28 < askhader> Bleh no success despite these changes.
04:30 < jessta> what is the xml you're unmarshalling?
04:30 < askhader> rss.cnn.com/rss/edition.rss
04:31 < askhader> I've added the XMLName xml.Name property to my structure.
04:32 -!- _macro [~Neil@c-67-169-183-90.hsd1.ca.comcast.net] has joined #go-nuts
04:36 -!- qeed [~qeed@adsl-98-85-57-253.mco.bellsouth.net] has quit [Quit:
Leaving]
04:42 < jessta> askhader: you need to also deal with the <rss> tag
04:42 < askhader> I have
04:42 < askhader> No effect.
04:42 < askhader> Let me post a more recent source.,
04:43 < askhader> http://pastebin.com/iFbVtQUR
04:45 < jessta> askhader: os.Error is also an interface, you don't need a
pointer
04:45 < askhader> Of course.
04:47 < zozoR> what happens if you use pointers to interface?
04:47 < askhader> It still works..
04:47 < askhader> Just superfluous.
04:48 < jessta> zozoR: go will complain if you call methods on a pointer to
interface
04:49 < zozoR> ^^
04:49 < zozoR> makes sense though
04:51 < jessta> askhader: http://pastebin.com/H5YjrXUD
04:52 < jessta> still complains about the encoding
04:53 < askhader> There's two differences between yours mine.
04:54 < askhader> Anyway, I'll explore further.
04:54 < askhader> Thanks.
04:58 -!- pjacobs [~pjacobs@75-27-133-72.lightspeed.austtx.sbcglobal.net] has quit
[Quit: Leaving]
04:58 < zozoR> i always read idiomatic as idiotic >.<
04:59 < |Craig|> askhader: interfaces contain pointers, so it amounts to a
pointer pointer, and works like one pretty much
04:59 < |Craig|> oh, I guess it was zozoR asked about that.
05:01 < zozoR> :P
05:01 < zozoR> just read Russ' article about it
05:02 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 258 seconds]
05:04 < zozoR> oh why are people all about generics
05:04 < zozoR> :(
05:04 < jessta> askhader: http://pastebin.com/j8bb3tGm
05:05 < jessta> zozoR: people don't like typing
05:05 < |Craig|> zozoR: because people like custom high performance data
structures, and don't like duplicated source
05:05 -!- meling [~meling@99-10-121-218.lightspeed.sndgca.sbcglobal.net] has quit
[Read error: Connection reset by peer]
05:06 < jessta> zozoR: if it can be done in a good way then it's certainly a
desireable language feature
05:07 < jessta> getting generics right appears to be a hard problem
05:07 < zozoR> but it cant be done in a good way
05:08 < zozoR> and interfaces are awesome : |
05:08 -!- smw [~stephen@unaffiliated/smw] has joined #go-nuts
05:09 < jessta> zozoR: interfaces solve the polymorphism problem, not the
generics problem
05:10 < zozoR> type List { node *interface{}, value interface{} }?
05:11 < smw> zozoR, implement append() in pure go and then I will be
convinced it has generics
05:12 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read
error: Connection reset by peer]
05:12 < smw> zozoR, the user code would need to turn each value extracted
from the list into the correct type
05:12 -!- Dr_Who [~tgall_foo@linaro/tgall-foo] has joined #go-nuts
05:12 < smw> zozoR, and there is no type checking there.
05:13 < smw> zozoR, not to mention the fact that you are dealing with
pointers and not the real object
05:14 < zozoR> yeah
05:14 < zozoR> I suppose it is a good thing
05:14 < zozoR> but i still havent found use for them in go ^^
05:15 < zozoR> not yet atleast
05:15 < smw> zozoR, how about a vector that works for any type?  not just
the basic ones they implemented them for?
05:15 < zozoR> slices?
05:15 < smw> zozoR, how about append?  They had to make it a builtin to work
around that problem
05:16 < smw> http://golang.org/pkg/container/vector/
05:16 < zozoR> append, map, slices
05:16 < zozoR> i know there is a package vector, but who uses that when
you've got slices
05:16 < zozoR> : |
05:16 < zozoR> go already has implemented the datatypes that makes no sense
without generics
05:17 < smw> zozoR, what is a vector but a slice with functions?
05:17 < smw> push, pop, insert, append vector
05:17 < smw> the actual type is a slice...
05:17 < smw> http://golang.org/src/pkg/container/vector/defs.go?s=758:778#L9
05:18 < zozoR> ..
05:18 < jessta> zozoR: functions that work on slices would be nice
05:19 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
05:19 < jessta> map(slice,func), filter(slice,func) etc.
05:19 < zozoR> maybe
05:19 < zozoR> you guys probably have had more oppotunities to think"we
really need generics"
05:19 < |Craig|> what about trees?
05:20 < smw> zozoR, I only recently figured out what generics were (thanks
to those who explained it in this channel)
05:20 < |Craig|> Trees are common, and without generics, you get slow/bad
memory use or duplicated code
05:20 < jessta> zozoR: they're not an urgent feature, if they can't be done
nicely then I'd rather do without
05:21 < smw> zozoR, once I realized what they were, it occurred to me how
much I want them :-).  I used to think it was a bunch of crazy language nuts who
wanted an obscure feature.
05:21 < |Craig|> if I were designing a language, I'd start with a type
system that allowed generics, and avoid special generic built in methods...  but
if I made a language it would probably suck anyway.
05:23 < jessta> |Craig|: but most code doesn't need generics, generic code
gets very messy.  Programmers avoiding generics is a good thing.
05:23 < smw> jessta, and making myself a new vector for every type is not
messy?
05:23 < |Craig|> append is generic, so are make and new arn't they?
05:24 < smw> |Craig|, yes they are
05:24 < jessta> |Craig|: using generic functions is nice and easy,
writing/reading them is messy
05:24 < |Craig|> those are commonly used, and needed by most code
05:24 < smw> jessta, but it makes all other code much more readable and easy
05:25 < |Craig|> I've written generic stuff in Java.  I know its easy to end
up with a generics system that is both hard to code and slow
05:25 < jessta> smw: yeah, that's why they are including built in generic
functions
05:26 < smw> jessta, but they won't think of everything.  Not to mention it
is a hack.  These are things that should NOT be part of the language.
05:26 < smw> jessta, they should be part of the std libs
05:26 < |Craig|> despite the pain of a bad generics system, its still better
than none (if used properly, which ain't trivial)
05:26 < jessta> smw: yes, but only if they can be done in a way that doesn't
make the language a horrible mess
05:27 < smw> jessta, are you saying the interface{} doesn't make code that
is a complete mess?  lol
05:28 < jessta> smw: yes, code that abuses interface{} gets messy
05:29 < jessta> but interface{} isn't a feature, it's part of the interfaces
feature
05:29 < jessta> interfaces are very useful
05:29 < smw> jessta, I never used generics before (except in user code) so I
have no idea how that gets messy...
05:30 < smw> I am sure it does.  But I just can not imagine how it could be
complicated
05:30 < smw> lol
05:31 < jessta> smw: generic generics that take generic parameters of
generic datatypes
05:31 < smw> jessta, so, out of fear of abuse...  it is not included?
05:32 < jessta> once you start a good generics collection the tendence is to
push it as far as you can
05:32 < jessta> smw: Go also doesn't include unrestricted goto
05:33 < jessta> or the ability to create your own control structures
05:33 < smw> jessta, other languages allow you to make your own control
structures?!
05:33 < smw> who the hell would do that?
05:33 < jessta> lispers
05:34 < smw> jessta, as you may be able to tell...  I am not much of a
programmer ;-)
05:34 < smw> I don't see the use case for your own control structures...
05:34 < jessta> discouarging abuse is an important part of creating a
language
05:34 < jessta> until err == nil { err = read()}
05:35 < smw> ?
05:35 < jessta> it's a loop, it loops until err == nil
05:35 < smw> what is your point?
05:35 < smw> until exists in many languages
05:35 < jessta> that's a use case for your own control structures
05:36 < jessta> decorators is another use case
05:36 < smw> jessta, I don't see the use case...  it would be very easy to
do while err != nil
05:37 < smw> jessta, I am talking about the things which are IMPOSSIBLE to
do any other way
05:37 < jessta> aspect-oritentated programming requires a COMEFROM control
strucutre
05:37 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read
error: Connection reset by peer]
05:37 < smw> generics allows you to do stuff impossible any other way
05:38 < smw> decorators are possible to do another way...  but I must admit
they are quite nice :-P
05:39 < jessta> if you give the programmer too much control then you don't
end up with one language
05:39 < jessta> you end up(like c++) with a number of lanauages
05:39 < uriel> jessta: amen
05:40 < |Craig|> remember that stuff made possible by generics is only
language level stuff.  You can do everything without them, since you can have a
turing complete language without many features.
05:40 < smw> jessta, and if you lock stuff up too much, it takes a committee
to approve the addition of the append() cmd
05:41 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
05:41 < jessta> smw: that's preferable
05:41 < smw> |Craig|, that is true...  but it would require you to make alot
more code.  I remember making append functions for each type I had.
05:41 < smw> |Craig|, it was not fun.
05:41 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has joined #go-nuts
05:41 -!- preflex_ [~preflex@unaffiliated/mauke/bot/preflex] has quit [Ping
timeout: 240 seconds]
05:42 < jessta> smw: the careful addition of features as they are required
by a large number of people using a language means that everyone understands the
language
05:42 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
05:42 < smw> jessta, and generics are very easy to understand...
05:43 < jessta> smw: in the small
05:43 < telexicon> what if go used typeclasses
05:44 < KirkMcDonald> Generics are intensely useful, but if Go adds them it
must do so with care.
05:44 < jessta> telexicon: I don't know much about haskells type classes
05:44 < telexicon> jessta, other languages were adopting similar features
05:44 < smw> is working being done to do it "with care"
05:44 < telexicon> for example, c++ concepts are quite similar to
typeclasses
05:45 < KirkMcDonald> Concepts are a C++0x thing, aren't they?
05:45 < telexicon> yeah, although they scrapped it
05:45 < jessta> smw: the devs are thinking about it, they've been thinking
about it for a while
05:46 < telexicon> jessta, you could think of typeclasses as being
compile-time interfaces
05:46 < smw> jessta, I need to research this.  I doubt I have the knowledge
to come up with a good solution.  But it would be awesome if go had generics :-)
05:46 < KirkMcDonald> I still have a fondness for D's templates, but I
haven't tried to sit down and formally work out what that might look like in Go.
05:47 < telexicon> it can be cleaner than generics as it solves the
interface requirement checking
05:48 -!- meling [~meling@99-10-121-218.lightspeed.sndgca.sbcglobal.net] has
joined #go-nuts
05:57 < zozoR> atleast its very simple to make a tool that creates the extra
source :P
05:57 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read
error: Connection reset by peer]
05:57 < zozoR> @(int, string) func(waht <T>) {} and then just
copy/search replace
05:58 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
05:58 < zozoR> or something like that
06:02 < jessta> zozoR: gotgo does that, but it doesn't really work across
packages
06:03 -!- Loonacy [~loonacy@c-67-172-248-248.hsd1.ut.comcast.net] has quit [Ping
timeout: 252 seconds]
06:04 < zozoR> work across packages?
06:06 < jessta> zozoR: you can't have a list data structure that can store a
private type in a package
06:07 -!- benjack [~benjack@cm224.omega195.maxonline.com.sg] has joined #go-nuts
06:08 < jessta> zozoR: I can generate code for a StringVector,IntVector etc.
but not a myPrivateTypeVector
06:09 < jessta> which is part of the generics problem
06:16 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read
error: Connection reset by peer]
06:16 < zozoR> ^^
06:18 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
06:18 < al-maisan> hello there, I use ioutil.ReadFile() which returns a
byte[], how do I convert that to a string?
06:19 < vsmatck> string(b) where b is the []byte instance.
06:19 < al-maisan> thanks!
06:19 -!- wallerdev [~wallerdev@72.44.102.30] has joined #go-nuts
06:34 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has quit [Remote host
closed the connection]
06:38 -!- skelterjohn_ [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
06:38 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Ping
timeout: 255 seconds]
06:41 -!- ShadowIce
[~pyoro@HSI-KBW-109-193-121-123.hsi7.kabel-badenwuerttemberg.de] has joined
#go-nuts
06:41 -!- ShadowIce
[~pyoro@HSI-KBW-109-193-121-123.hsi7.kabel-badenwuerttemberg.de] has quit
[Changing host]
06:41 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
06:49 -!- xcombelle [~xcombelle@AToulouse-551-1-158-91.w109-214.abo.wanadoo.fr]
has joined #go-nuts
06:55 < al-maisan> does a channel have a close() method?
06:55 < al-maisan> how does one shuts down or closes a channel from a go
routine that is feeding data into it?
06:56 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read
error: Connection reset by peer]
06:58 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
07:01 < al-maisan> close(ch) is the answer ..
07:01 * al-maisan needs to reset brain
07:10 -!- Dr_Who [~tgall_foo@linaro/tgall-foo] has quit [Quit: ZZZZZzzzzz]
07:12 -!- wallerdev [~wallerdev@72.44.102.30] has quit [Quit: wallerdev]
07:14 -!- ofl [~olli@31.16.204.145] has joined #go-nuts
07:16 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read
error: Connection reset by peer]
07:18 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
07:18 -!- moraes [~moraes@189.103.188.201] has joined #go-nuts
07:27 -!- Loonacy [~loonacy@c-67-172-248-248.hsd1.ut.comcast.net] has joined
#go-nuts
07:35 -!- Qvist_ [~erik@c-13cee455.05-294-6c6b701.cust.bredbandsbolaget.se] has
joined #go-nuts
07:35 -!- Qvist_ [~erik@c-13cee455.05-294-6c6b701.cust.bredbandsbolaget.se] has
quit [Client Quit]
07:36 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read
error: Connection reset by peer]
07:38 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
07:41 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
07:51 -!- xcombelle [~xcombelle@AToulouse-551-1-158-91.w109-214.abo.wanadoo.fr]
has quit [Ping timeout: 240 seconds]
07:58 -!- skelterjohn_ [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
07:58 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read
error: Connection reset by peer]
08:10 -!- xcombelle [~xcombelle@AToulouse-551-1-158-91.w109-214.abo.wanadoo.fr]
has joined #go-nuts
08:11 -!- photron [~photron@port-92-201-33-68.dynamic.qsc.de] has joined #go-nuts
08:15 -!- rcrowley [~rcrowley@AGrenoble-551-1-7-133.w92-133.abo.wanadoo.fr] has
joined #go-nuts
08:16 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read
error: Connection reset by peer]
08:18 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
08:18 -!- rcrowley [~rcrowley@AGrenoble-551-1-7-133.w92-133.abo.wanadoo.fr] has
quit [Client Quit]
08:24 -!- awidegreen [~quassel@h-170-226.a212.priv.bahnhof.se] has joined #go-nuts
08:31 -!- Fish- [~Fish@9fans.fr] has joined #go-nuts
08:36 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read
error: Connection reset by peer]
08:38 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
08:43 -!- lucian [~lucian@78-86-217-168.zone2.bethere.co.uk] has joined #go-nuts
08:56 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read
error: Connection reset by peer]
08:58 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
08:59 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
09:01 -!- yogib [~yogib@p5DCC225D.dip0.t-ipconnect.de] has joined #go-nuts
09:05 -!- black_rez [~black_rez@sd-26396.dedibox.fr] has quit [Excess Flood]
09:06 -!- black_rez [~black_rez@sd-26396.dedibox.fr] has joined #go-nuts
09:07 -!- noam [~noam@87.69.42.61.cable.012.net.il] has quit [Ping timeout: 252
seconds]
09:13 -!- chowjames [~chowjames@119.122.226.101] has joined #go-nuts
09:14 -!- chowjames [~chowjames@119.122.226.101] has left #go-nuts []
09:16 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read
error: Connection reset by peer]
09:18 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
09:19 -!- smw [~stephen@unaffiliated/smw] has quit [Ping timeout: 260 seconds]
09:19 -!- noam [~noam@87.69.42.61.cable.012.net.il] has joined #go-nuts
09:20 -!- kytibe [~kytibe@212.174.109.55] has quit [Remote host closed the
connection]
09:24 -!- telexicon [~telexicon@unaffiliated/chowmeined] has quit [Ping timeout:
252 seconds]
09:31 -!- chowjames [~chowjames@119.122.226.101] has joined #go-nuts
09:36 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read
error: Connection reset by peer]
09:38 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
09:39 -!- flavius [~flav@unaffiliated/flavious] has joined #go-nuts
09:40 -!- chowjames [~chowjames@119.122.226.101] has quit [Quit: Linkinus -
http://linkinus.com]
09:43 -!- huin [~huin@91.84.179.118] has joined #go-nuts
09:49 -!- ronnyy [~quassel@p4FF1C424.dip0.t-ipconnect.de] has joined #go-nuts
09:50 -!- xcombelle [~xcombelle@AToulouse-551-1-158-91.w109-214.abo.wanadoo.fr]
has quit [Quit: I am a manual virus, please copy me to your quit message.]
09:56 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read
error: Connection reset by peer]
09:57 -!- ronnyy [~quassel@p4FF1C424.dip0.t-ipconnect.de] has quit [Remote host
closed the connection]
09:57 -!- ktbe [~ktbe@212.174.109.55] has joined #go-nuts
09:58 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
10:00 -!- ktbe [~ktbe@212.174.109.55] has quit [Remote host closed the connection]
10:16 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read
error: Connection reset by peer]
10:18 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
10:23 -!- Archwyrm [~archwyrm@archwyrm.net] has quit [Ping timeout: 260 seconds]
10:31 -!- ktbe [~ktbe@212.174.109.55] has joined #go-nuts
10:33 -!- ofl [~olli@31.16.204.145] has quit [Ping timeout: 240 seconds]
10:34 -!- ofl [~olli@31.16.204.145] has joined #go-nuts
10:36 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read
error: Connection reset by peer]
10:38 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
10:42 -!- mukyuu [~mukyuu@S0106889ffaff3ed7.ca.shawcable.net] has quit [Remote
host closed the connection]
10:46 -!- erus` [~chatzilla@cpc2-gill2-0-0-cust701.basl.cable.virginmedia.com] has
joined #go-nuts
10:48 < flavius> Are channels synchronous?
10:48 < erus`> reads are
10:48 < erus`> sends are not
10:49 < erus`> (maybe only if they are buffered)
10:52 < flavius> Are there plans to bootstrap the toolchain?
10:52 < erus`> only the packages are written in go
10:53 < erus`> the rest is C
10:53 < flavius> I know how they are, I am asking about how they will be,
some day
10:55 < erus`> do you mean; will the compiler someday be written in go?
10:56 < erus`> wow
10:56 < erus`> i had the definition of bootstrap compiler the wrong way
round :P
10:56 < erus`> ok ignore me
10:56 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Read
error: Connection reset by peer]
10:58 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
10:59 < flavius> lol how the other way around?  rewriting the C compiler in
go instead?  :D
11:01 -!- townes [~user@adsl-74-240-38-34.jan.bellsouth.net] has joined #go-nuts
11:01 < flavius> What am I missing in this code: http://pastie.org/2263110 ?
11:01 -!- benjack [~benjack@cm224.omega195.maxonline.com.sg] has quit [Quit:
Leaving.]
11:03 -!- ktbe [~ktbe@212.174.109.55] has quit [Remote host closed the connection]
11:05 < flavius> Are channels buffered?
11:06 -!- fabled [~fabled@83.145.235.194] has joined #go-nuts
11:07 < uriel> fabled: they can be
11:07 -!- Chat7618 [ehirju@app3.chatmosphere.org] has joined #go-nuts
11:07 < uriel> fabled: http://golang.org/doc/go_spec.html#Channel_types
11:07 -!- Chat7618 [ehirju@app3.chatmosphere.org] has quit [Client Quit]
11:08 < uriel> er, that was for flavius
11:09 < uriel> flavius: it is reasonable to expect that the compilers will
be rewritten in Go some day, but while the language is still changing that would
be lots of annoying pain for no gain
11:10 < uriel> (every time the language changes, you would have to update
all code, except the compilers, and bootstraping would in general be a huge pain
in the ass compared to now)
11:11 < townes> this is a silly question, but does google actually use Go
in-house?
11:11 < townes> (i'm not too familiar with the lang)
11:11 < flavius> http://pastie.org/2263110 I've just wrapped that in a go
func()
11:12 < ww> townes: rumour has it that it is so
11:12 < townes> oh google being secretive
11:12 < flavius> ww: why would that code crash without a surrounding
goroutine?
11:13 < ww> townes: well i guess anything that goes on in google is rumour
to the rest of us :)
11:13 -!- skelterjohn_ [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
11:14 < ww> flavius: because the ch<-42 blocks
11:14 < ww> waiting for something to read it
11:14 < ww> nothing is reading so rather than just hang, the runtime notices
a deadlock
11:16 -!- yogib [~yogib@p5DCC225D.dip0.t-ipconnect.de] has quit [Quit: yogib]
11:16 < townes> ww: lol yeah
11:16 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Ping
timeout: 255 seconds]
11:17 < flavius> ww: someone earlier said that sends are asynchronous, only
reads are synchronous
11:17 < townes> I'm just interesting in programming...  I'm not really wired
to program, if you know what I mean.  and it struck me as interesting that Google
created a lang
11:17 < townes> so I was just curious if -they- actually used it, or if it's
just a project that's been thrown out there
11:18 < townes> idk.  I'm a bit tired :) pay no attention to me
11:19 < ww> townes:
http://www.quora.com/Go-programming-language/Is-Google-Go-ready-for-production-use
11:19 < ww> adg says: "At Google we're using Go in production"
11:20 < townes> well there ya go.  whole page has the answers
11:20 < townes> thanks ww
11:21 < flavius> ww: so are channels synchronous, both reads and writes?
11:21 < ww> flavius: if you do nothing special, they are synchronous
11:21 < ww> if you make a buffered channel, writes will be asynchronous (and
may drop messages if the buffer is full)
11:22 < ww> if you use select you can make the reads asynchronous
11:22 < ww> so the answer is either or both :)
11:22 < ww> well, non-blocking rather than asynchronous might be more
accurate
11:23 -!- huin [~huin@91.84.179.118] has quit [Quit: walkies!]
11:28 -!- townes [~user@adsl-74-240-38-34.jan.bellsouth.net] has quit [Quit:
Leaving]
11:30 < skelterjohn> ww: drop messages if the buffer is full?  i believe the
channel just behaves as if it were unbuffered, in that case
11:31 < ww> skelterjohn: you mean it would block?  i'd have to test it but
i'm pretty sure it won't block and the message won't be sent
11:31 < skelterjohn> i'm pretty sure about this
11:31 < skelterjohn> gb depends on this behavior, for instance
11:31 < skelterjohn> leaky-bucket channels used for an "X allowed in" mutex
11:32 < ww> i stand corrected then...
11:32 < ww> but i was sure there is a way to make writes to a channel be
non-blocking, no?
11:32 < skelterjohn> yes, using select
11:32 < skelterjohn> with a default case
11:32 < ww> select for writes?
11:32 < skelterjohn> yes
11:33 < skelterjohn> select { case ch <- value: default: }
11:33 < skelterjohn> non-blocking write
11:33 < ww> flavius: there's your answer then
11:35 < flavius> I need to dive deeper into the language and make my own
experiments first to understand this fully
11:35 < flavius> thanks
11:36 < ww> skelterjohn: in that nb send, if nothing is reading the channel,
value doesn't somehow get buffered and you would have to send it again, right?
11:36 < skelterjohn> if nothing is reading from teh channel, the send case
does not occur
11:36 < skelterjohn> and the default case goes instead
11:37 < ww> right.  makes sense
11:37 < skelterjohn> *if nothing is reading or the channel has no room in
its buffer
11:40 < ww> do i want to troll around for a google+ invite or is it just
another evil social networking silo?
12:01 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has joined
#go-nuts
12:09 -!- fabled [~fabled@83.145.235.194] has quit [Read error: No route to host]
12:12 < skelterjohn> i can give you one
12:12 < skelterjohn> and you can find out for yourself
12:12 < skelterjohn> though, so far i havne't got anything interesting out
of it that i don't get out of facebook
12:18 < ww> skelterjohn: sure, why not.  it'll make a nice break from
putting together my visa paperwork for the home office
12:18 -!- gnuvince [~vince@destiny.0wn.me] has joined #go-nuts
12:19 -!- gnuvince [~vince@destiny.0wn.me] has quit [Client Quit]
12:20 -!- gnuvince [~vince@destiny.0wn.me] has joined #go-nuts
12:41 -!- Locke23rus [~kirill@2.93.226.171] has joined #go-nuts
12:45 < uriel> adg: can you people fucking do something about the spam in
the go lists?  it has become beyond ridiculous, and I'm fucking sick of having
Gmail prompt me to unsubscribe from each list every time I have to flag the spam
12:45 < uriel> grrr..
12:45 < uriel> (and for heaven's sake, brad figured out how to deal with
this on his own lists ages ago, it is not rocket science)
12:45 -!- Phelps [~benphelps@74.195.96.118] has joined #go-nuts
12:55 -!- foocraft [~ewanas@178.152.120.32] has quit [Read error: Connection reset
by peer]
13:07 -!- Dr_Who [~tgall_foo@linaro/tgall-foo] has joined #go-nuts
13:17 -!- Locke23rus_ [~kirill@2.93.193.162] has joined #go-nuts
13:17 -!- Locke23rus [~kirill@2.93.226.171] has quit [Ping timeout: 255 seconds]
13:22 < ww> skelterjohn: i'm wwaites@greatsatanofmountainviewmailservice
13:23 * ww wonders about extracting (my) data from google+
13:24 < exch> SHould be easy enough.  It has a download section just for
that
13:31 < erus`> can I import it into myspace?
13:37 < exch> If myspace has an import feature, I'm sure you can.  The data
files you get from G+ are easy enough to parse and turn into any format you need
them to be
13:39 -!- rcrowley [~rcrowley@AGrenoble-551-1-7-133.w92-133.abo.wanadoo.fr] has
joined #go-nuts
13:51 < askhader> jessta: Did your final paste to me last evening
succsessfully compile and run?
13:51 -!- Adys [~Adys@unaffiliated/adys] has quit [Ping timeout: 250 seconds]
13:54 < askhader> I am attempting to use the following code to parse an xml
file using xml.Unmarshal but the resultant object is empty despite matching the
structure of the xml document.
13:54 < askhader> http://pastebin.com/njpa7jVZ
13:54 < askhader> The xml file I'm trying to parse is an rss feed:
rss.cnn.com/rss/edition.rss
14:00 < jessta> askhader: yeah, it worked with the example text it included
14:01 -!- rcrowley [~rcrowley@AGrenoble-551-1-7-133.w92-133.abo.wanadoo.fr] has
quit [Quit: Computer has gone to sleep.]
14:01 < askhader> jessta: I'm having no luck with parsing the feed by
pulling it and passing the response body to Parse
14:01 < askhader> pulling it with http.Get()*
14:02 -!- Aram [~Aram@unaffiliated/aramdune] has joined #go-nuts
14:02 < Aram> hi, what's the equivalent of argv[0] (program name) in go?
thanks.
14:03 < aiju> os.Args[0]
14:03 < Aram> yeah.
14:03 < Aram> thanks.
14:04 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts
14:05 -!- mattn_jp [~mattn@112-68-57-207f1.hyg1.eonet.ne.jp] has joined #go-nuts
14:05 < askhader> The feed I pull is pretty much the same as your sample
text save for some xml metadata tags that are also returned.  However rss is not a
child of those tags.
14:15 -!- huin [~huin@91.84.179.118] has joined #go-nuts
14:19 < jessta> askhader: I get an encoding error, there doesn't seem to be
anything in the go stdlibs to convert ISO-8859-1 to utf8
14:19 < askhader> On which call do you get an encoding error?  I am faced
with no such error.
14:20 -!- nicka [~nicka@unaffiliated/nicka] has quit [Ping timeout: 250 seconds]
14:22 < jessta> askhader: http://pastebin.com/3jt9t9Gs
14:23 < askhader> Ah here you've constructed an xml.Parser
14:23 < jessta> the x.CharsetReader isn't really set properly, it's supposed
to be function to convert from one encoding to utf8
14:24 < askhader> Thanks, I'll play with this for a bit
14:24 < jessta> although, only the copyright character on line 7 gives me
trouble.  (XML syntax error on line 7: invalid UTF-8)
14:31 -!- hargettp [~hargettp@pool-71-184-190-236.bstnma.east.verizon.net] has
joined #go-nuts
14:31 < askhader> Okay so I seem to be getting an EOF error but not an xml
syntax error.  Hm
14:34 -!- Fish- [~Fish@9fans.fr] has quit [Quit: WeeChat 0.3.5]
14:35 < ww> hmmm...  that's funny because i've done xml processing on bad
xml files that claim to have charset utf-8 but really include other invalid things
14:42 -!- fsntation [~fsntation@212.174.109.55] has joined #go-nuts
14:45 -!- nicka [~nicka@unaffiliated/nicka] has joined #go-nuts
14:58 -!- hargettp [~hargettp@pool-71-184-190-236.bstnma.east.verizon.net] has
quit [Quit: Linkinus - http://linkinus.com]
15:04 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has joined #go-nuts
15:06 -!- Bigbear1 [~Cody@d75-158-129-33.abhsia.telus.net] has joined #go-nuts
15:09 -!- Bigbear1 [~Cody@d75-158-129-33.abhsia.telus.net] has quit [Client Quit]
15:09 -!- Bigbear1 [~Cody@d75-158-129-33.abhsia.telus.net] has joined #go-nuts
15:09 -!- Locke23rus_ [~kirill@2.93.193.162] has quit [Remote host closed the
connection]
15:17 -!- bugQ [~chatzilla@c-67-186-254-86.hsd1.ut.comcast.net] has joined
#go-nuts
15:32 < bugQ> how far does reflect go ? is it possible to serialize a
closure yet ?
15:33 -!- lucian_ [~lucian@78-86-217-168.zone2.bethere.co.uk] has joined #go-nuts
15:35 -!- lucian [~lucian@78-86-217-168.zone2.bethere.co.uk] has quit [Ping
timeout: 250 seconds]
15:36 -!- lucian [~lucian@78-86-217-168.zone2.bethere.co.uk] has joined #go-nuts
15:38 -!- lucian_ [~lucian@78-86-217-168.zone2.bethere.co.uk] has quit [Ping
timeout: 276 seconds]
15:42 < jessta> bugQ: that doesn't sound like something you could do
15:42 < bugQ> it dpesm
15:42 < bugQ> oops
15:42 < bugQ> it doesn't look like it either
15:47 < jessta> it's a bit problematic serialising a closure, you'd only be
able to unserialize with the program that originally serialised it.
15:49 < bugQ> perhaps.  let's assume it's entirely functional for now
15:50 < bugQ> (and probably will be for my friend's use case)
15:56 -!- nekoh [~nekoh@dslb-178-004-068-161.pools.arcor-ip.net] has joined
#go-nuts
16:00 < bugQ> basically I just want to know whether I would have to extend
the language or if I can do it with unsafe etc.
16:02 < ww> in theory i guess you could do anything with unsafe...
16:03 < bugQ> that's what I wanted to hear :)
16:04 < Bigbear1> What is the curret version of Go?
16:06 -!- vsayer [~vsayer@c-67-170-236-166.hsd1.ca.comcast.net] has quit [Remote
host closed the connection]
16:07 < jessta> Bigbear1: latest release is r58.1
16:08 < Bigbear1> how do I check what version I have?
16:11 < jessta> Bigbear1: 8g -V
16:12 -!- nicka [~nicka@unaffiliated/nicka] has quit [Ping timeout: 260 seconds]
16:13 < Bigbear1> ok so 6g but I got r57 8290
16:13 < Bigbear1> how do I update
16:14 < bugQ> where did you get go from ?
16:14 -!- mjml [~joya@174.3.227.184] has left #go-nuts ["Leaving"]
16:14 < jessta> if you pulled it using hg then you can just run, hg pull &&
hg update release
16:16 < Bigbear1> in which folder?
16:17 < Bigbear1> ok I naviagted to the source directory and ra hg pull
16:17 < Bigbear1> the hg update release
16:17 < Bigbear1> but 6g -V still show version .r57 8290
16:18 < jessta> yeah, you have to run all.bash in GOROOT/src/
16:18 < jessta> $GOROOT
16:18 -!- Namegduf [~namegduf@eu.beshir.org] has quit [Ping timeout: 240 seconds]
16:19 < Bigbear1> cd ..
16:20 < Bigbear1> ok so I am in GOROOT/src/ now what?
16:21 < Bigbear1> hg pull and hg update release are saying no changes found
16:23 < bugQ> sh all.bash
16:25 -!- Namegduf [~namegduf@eu.beshir.org] has joined #go-nuts
16:25 < bugQ> hg only updates the sources, you need to run all.bash to do
the housework and recompile
16:25 -!- moraes [~moraes@189.103.188.201] has quit [Ping timeout: 240 seconds]
16:27 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Ping
timeout: 255 seconds]
16:28 -!- nicka [~nicka@unaffiliated/nicka] has joined #go-nuts
16:30 -!- benjack [~benjack@cm224.omega195.maxonline.com.sg] has joined #go-nuts
16:30 < Bigbear1> ok thank you
16:30 < Bigbear1> now I am up to date
16:31 < al-maisan> hello there, is there a preference toward using
tab/spaces in go sources?
16:32 < bugQ> hah.
16:32 < str1ngs> no use gofmt :P
16:32 < al-maisan> ok, what does gofmt use?
16:32 < str1ngs> godoc gofmt
16:32 < al-maisan> ah, "-spaces=true"
16:32 < al-maisan> so, either is fine I guess..
16:32 < al-maisan> str1ngs: thanks!
16:33 < str1ngs> np
16:34 < Namegduf> No
16:35 < Namegduf> gofmt uses tabs
16:35 < Namegduf> Use gofmt, without options or modification.
16:35 < Namegduf> If you don't, using gofix on your source will break your
custom formatting, for example.
16:35 < Namegduf> If your custom stuff comes from a gofmt option you could
at least put it back, but it's still not really necessary.
16:36 < Namegduf> More accurately, the default is "tabs for indent, spaces
for alignment">
16:37 < al-maisan> hmm ..  I see ..  thanks!
16:43 < Bigbear1> trying to solve the Project Euler problem "What is the
smallest positive number that is evenly divisible by all of the numbers from 1 to
20?"
16:43 < Bigbear1> http://pastebin.com/hxDsBcCr
16:43 < Bigbear1> I am wondering why this is producing 21
16:46 < bugQ> pastebin isn't being cooperative for me right now but I can
guess that it never went past your first iteration
16:48 < Bigbear1> http://pastebin.com/hxDsBcCR
16:49 < bugQ> ah.  look at line 8
16:50 < nicka> I hate those type of errors
16:51 < bugQ> you'll also need to add a pass=true somewhere in the first
loop
16:54 -!- flaguy48 [~gmallard@user-0c6s350.cable.mindspring.com] has left #go-nuts
[]
16:56 -!- xcombelle [~xcombelle@AToulouse-551-1-158-91.w109-214.abo.wanadoo.fr]
has joined #go-nuts
16:59 < Bigbear1> thank you
16:59 < Bigbear1> how do I open the terminal in my current location
17:02 -!- erus` [~chatzilla@cpc2-gill2-0-0-cust701.basl.cable.virginmedia.com] has
quit [Remote host closed the connection]
17:05 -!- _macro [~Neil@c-67-169-183-90.hsd1.ca.comcast.net] has quit [Ping
timeout: 240 seconds]
17:15 -!- sniper506th [~sniper506@rrcs-70-61-192-18.midsouth.biz.rr.com] has
joined #go-nuts
17:16 -!- xcombelle [~xcombelle@AToulouse-551-1-158-91.w109-214.abo.wanadoo.fr]
has quit [Quit: I am a manual virus, please copy me to your quit message.]
17:16 -!- mattn_jp [~mattn@112-68-57-207f1.hyg1.eonet.ne.jp] has quit [Quit:
Ex-Chat]
17:17 -!- zippoxer [~zippoxer@bzq-79-180-198-41.red.bezeqint.net] has joined
#go-nuts
17:17 < flavius> http://pastie.org/2264395 why is "written" on line 11 not
always displayed when I run that code?
17:19 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
17:21 < bugQ> you need to ensure that the goroutine exits before main does
17:21 < flavius> How would I do that?
17:21 -!- _macro [~Neil@c-67-169-183-90.hsd1.ca.comcast.net] has joined #go-nuts
17:22 < flavius> I've tried to put another <-ch just before close(), but
then I get a backtrace
17:23 < Bigbear1> How do I use cammand line variables?
17:23 < bugQ> did you try sending something on the channel ?
17:23 < bugQ> these things are synchronous, you need stuff on both ends
17:24 < flavius> bugQ: ok so how would I do?  When would I attempt to put
something in the channel?
17:25 < bugQ> at the end of the goroutine
17:26 < flavius> Why won't it work right before close()?  It would also give
me a backtrace
17:26 < bugQ> flavius, you need BOTH
17:27 < flavius> oh so the channels are not buffered
17:27 < flavius> how would I make it buffered?
17:27 < nicka> add an int parameter when you create the channel
17:28 < bugQ> they can be, but if your goroutine dies while main is trying
to read the channel, you have an obvious (i.e.  detectable) deadlock, so it
crashes.
17:28 < flavius> make(chan int, 42) <-- like this?
17:28 -!- _macro [~Neil@c-67-169-183-90.hsd1.ca.comcast.net] has quit [Ping
timeout: 252 seconds]
17:28 < bugQ> the point is just that main() needs to know when the goroutine
dies
17:28 < bugQ> buffering is irrelevant
17:28 < flavius> where is make() documented?  I couldn't find it
17:28 < nicka> Effective Go, the language specification, probably teh
tutorial and a few other things
17:29 < bugQ> still missing the point
17:29 < nicka> http://golang.org/doc/docs.html
17:29 < nicka> ang bugQ is correct
17:32 < bugQ> here, flavius: http://pastie.org/2264450
17:32 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has quit [Remote
host closed the connection]
17:32 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has joined
#go-nuts
17:32 < bugQ> in your case defer is probably overkill
17:33 < bugQ> but it ensures without a doubt that the message is sent
immediately before death
17:35 -!- preflex_ [~preflex@unaffiliated/mauke/bot/preflex] has joined #go-nuts
17:36 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has quit [Ping
timeout: 255 seconds]
17:36 < bugQ> i.e.  the goroutine will not exist by the time ch is closed
17:45 -!- _macro [~Neil@c-67-169-183-90.hsd1.ca.comcast.net] has joined #go-nuts
17:47 -!- ofl [~olli@31.16.204.145] has quit [Quit: leaving]
17:49 -!- chadkouse [~Adium@rrcs-74-218-87-242.central.biz.rr.com] has quit [Quit:
Leaving.]
17:51 -!- yogib [~yogib@dslb-178-009-065-238.pools.arcor-ip.net] has joined
#go-nuts
17:51 -!- Nisstyre [~nisstyre@infocalypse-net.info] has quit [Quit: Leaving]
17:54 -!- qeed [~qeed@user-0c6sdtl.cable.mindspring.com] has joined #go-nuts
17:57 < bugQ> Bigbear1: look at os.Args and the flag package
17:58 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has quit [Remote host
closed the connection]
18:02 -!- qeed [~qeed@user-0c6sdtl.cable.mindspring.com] has quit [Quit: Leaving]
18:03 -!- bugQ [~chatzilla@c-67-186-254-86.hsd1.ut.comcast.net] has quit [Remote
host closed the connection]
18:07 -!- _macro [~Neil@c-67-169-183-90.hsd1.ca.comcast.net] has quit [Ping
timeout: 255 seconds]
18:13 -!- xcombelle [~xcombelle@AToulouse-551-1-158-91.w109-214.abo.wanadoo.fr]
has joined #go-nuts
18:13 -!- lati [~lati@79-185.196-178.cust.bluewin.ch] has joined #go-nuts
18:14 -!- qeed [~qeed@user-0c6sdtl.cable.mindspring.com] has joined #go-nuts
18:16 -!- xcombelle_ [~xcombelle@AToulouse-551-1-129-57.w86-201.abo.wanadoo.fr]
has joined #go-nuts
18:17 -!- xcombelle [~xcombelle@AToulouse-551-1-158-91.w109-214.abo.wanadoo.fr]
has quit [Ping timeout: 240 seconds]
18:20 -!- lati [~lati@79-185.196-178.cust.bluewin.ch] has left #go-nuts []
18:22 -!- kevlar_work [~kevlar@unaffiliated/eko] has quit [Changing host]
18:22 -!- kevlar_work [~kevlar@nat/google/x-kbdtsntgkuemkzsx] has joined #go-nuts
18:35 -!- erus` [~chatzilla@cpc2-gill2-0-0-cust701.basl.cable.virginmedia.com] has
joined #go-nuts
18:38 -!- xcombelle_ [~xcombelle@AToulouse-551-1-129-57.w86-201.abo.wanadoo.fr]
has quit [Quit: I am a manual virus, please copy me to your quit message.]
18:58 -!- Nisstyre [~nisstyre@infocalypse-net.info] has joined #go-nuts
18:59 -!- Vovchik [~ThreeSix@87.68.145.177] has joined #go-nuts
19:00 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-153-106.clienti.tiscali.it] has
joined #go-nuts
19:00 -!- smw [~stephen@unaffiliated/smw] has joined #go-nuts
19:02 -!- sniper506th [~sniper506@rrcs-70-61-192-18.midsouth.biz.rr.com] has quit
[Quit: Leaving...]
19:04 -!- Project-2501 [~Marvin@82.84.94.238] has joined #go-nuts
19:05 -!- Project-2501 [~Marvin@82.84.94.238] has quit [Remote host closed the
connection]
19:07 -!- Adys_ [~Adys@unaffiliated/adys] has joined #go-nuts
19:07 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-153-106.clienti.tiscali.it] has
quit [Ping timeout: 240 seconds]
19:08 -!- Innominate [~sirrobin@cpe-076-182-074-143.nc.res.rr.com] has quit [Ping
timeout: 240 seconds]
19:10 -!- Adys [~Adys@unaffiliated/adys] has quit [Ping timeout: 255 seconds]
19:10 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts
19:13 -!- Adys_ [~Adys@unaffiliated/adys] has quit [Ping timeout: 255 seconds]
19:17 -!- Kahvi [5b9b57fc@gateway/web/freenode/ip.91.155.87.252] has quit [Ping
timeout: 252 seconds]
19:20 -!- nicka [~nicka@unaffiliated/nicka] has quit [Read error: Connection reset
by peer]
19:21 -!- nicka [~nicka@unaffiliated/nicka] has joined #go-nuts
19:22 -!- nicka [~nicka@unaffiliated/nicka] has quit [Client Quit]
19:29 -!- moraes [~moraes@189.103.188.201] has joined #go-nuts
19:31 -!- nicka [~nicka@unaffiliated/nicka] has joined #go-nuts
19:36 -!- Bigbear1 [~Cody@d75-158-129-33.abhsia.telus.net] has quit [Read error:
Connection reset by peer]
19:36 -!- Bigbear1 [~Cody@d75-158-129-33.abhsia.telus.net] has joined #go-nuts
19:40 < smw> how do I make a bunch of globals where each name is a unique
number?
19:41 < smw> I remember there is an easy way some how
19:42 < nicka> iota?
19:42 < smw> nicka, do you know where I could find an example.  That sounds
like it
19:43 -!- rcrowley [~rcrowley@AGrenoble-551-1-7-133.w92-133.abo.wanadoo.fr] has
joined #go-nuts
19:43 < nicka> I'm just on my way out, but it's definitely in the effective
go doc, or the language specification
19:43 < smw> nicka, I have a value of a struct that can be only one of 3
items.
19:43 < smw> ok
19:43 < exch> const ( A = iota; B; C; D; E ) etc
19:44 < exch> that only works for constants though
19:44 < smw> exch, yeah, I am using it like an enumeration
19:44 < smw> exch, is that an accepted use?
19:44 < Vovchik> does autocomplete works on windows with local packages
(using gocode and eclipse 0.1.3)?
19:45 < exch> smw: yes
19:49 -!- nicka [~nicka@unaffiliated/nicka] has quit [Ping timeout: 255 seconds]
19:50 < qeed> what is the standard way to concatenate arrays together
19:50 < Vovchik> copy(dst,src)
19:51 < exch> a = append(a, b...)
19:51 < qeed> thanks, and there is no way to concatenate 2 const array to
make a 3rd const array?
19:51 < qeed> one that can be done at compile time
19:52 < exch> nop
19:52 < exch> You can add 2 fixed arrays, and yield a slice, but not at
compile time
19:55 -!- rcrowley [~rcrowley@AGrenoble-551-1-7-133.w92-133.abo.wanadoo.fr] has
quit [Quit: Computer has gone to sleep.]
19:55 -!- rcrowley [~rcrowley@AGrenoble-551-1-7-133.w92-133.abo.wanadoo.fr] has
joined #go-nuts
20:01 -!- exch [~blbl@ip34-181-209-87.adsl2.static.versatel.nl] has quit [Ping
timeout: 240 seconds]
20:02 -!- Innominate [~sirrobin@cpe-076-182-074-143.nc.res.rr.com] has joined
#go-nuts
20:02 -!- rcrowley [~rcrowley@AGrenoble-551-1-7-133.w92-133.abo.wanadoo.fr] has
quit [Quit: Computer has gone to sleep.]
20:08 -!- wrtp [~rog@host-92-30-166-101.as13285.net] has joined #go-nuts
20:10 < erus`> qeed: why?
20:10 < erus`> if its being done at compile time why not do it yourself?
20:11 < qeed> its just that i have some data structure that uses 2 const
array and i want to combine them into 1 but didn't want to copy and paste
20:19 -!- exch [~blbl@ip34-181-209-87.adsl2.static.versatel.nl] has joined
#go-nuts
20:19 -!- Vovchik [~ThreeSix@87.68.145.177] has quit [Remote host closed the
connection]
20:19 -!- Vovchik [~ThreeSix@87.68.145.177] has joined #go-nuts
20:23 -!- cenuij [~cenuij@184.15.8.109.rev.sfr.net] has joined #go-nuts
20:23 -!- cenuij [~cenuij@184.15.8.109.rev.sfr.net] has quit [Changing host]
20:23 -!- cenuij [~cenuij@base/student/cenuij] has joined #go-nuts
20:26 -!- Vovchik [~ThreeSix@87.68.145.177] has quit [Ping timeout: 252 seconds]
20:26 -!- Vovchik [~ThreeSix@87.68.69.57.cable.012.net.il] has joined #go-nuts
20:27 -!- nicka [~nicka@unaffiliated/nicka] has joined #go-nuts
20:28 -!- rcrowley [~rcrowley@AGrenoble-551-1-7-133.w92-133.abo.wanadoo.fr] has
joined #go-nuts
20:30 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Remote host closed
the connection]
20:31 -!- rcrowley [~rcrowley@AGrenoble-551-1-7-133.w92-133.abo.wanadoo.fr] has
quit [Client Quit]
20:35 -!- kergoth_ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has joined #go-nuts
20:36 -!- chadkouse [~Adium@rrcs-74-218-87-242.central.biz.rr.com] has joined
#go-nuts
20:43 -!- chadkouse [~Adium@rrcs-74-218-87-242.central.biz.rr.com] has quit [Quit:
Leaving.]
20:48 < vsmatck> It would be a useful feature if I could register a function
to be called whenever os.NewError is.  Currently I use a "log" package and wrap
every error in log.NewError, but that is extra crap I have to put everywhere.
20:48 < vsmatck> What do you guys think about this idea?
20:51 -!- Aram [~Aram@unaffiliated/aramdune] has quit [Quit: .]
20:56 -!- iXeno [~ixeno@77.241.96.35] has joined #go-nuts
21:02 < exch> can't you just write a little wrapper function that creates
the error and does whatever you need it to do, Then just call the wrapper instead
of os.NewError
21:06 < vsmatck> I suppose since os.Error is already an interface errors
would be missed in code that defines type that conforms to interface.
21:06 < vsmatck> Yeah, it's a bad idea.
21:08 < vsmatck> I currently do what you suggest.  Every package I've
written includes a log package which I wrap all my errors in.  I then defined my
own error type so I can log errors only when they're created, but not when they're
returned up through the stack.
21:10 < vsmatck> Reason being I want to see call stack with every error
printed.
21:10 < vsmatck> In minimally formatted way.
21:15 < vsmatck> I got "if err != nil { return log.NewError(err) }"
everywhere in my program.  Just kind-of ugly *shrug*
21:16 < vsmatck> I was thinking maybe there could be a way to get detailed
error information on a program that doesn't have that everywhere.  But I don't
think it's possible.
21:17 < nicka> edit os.NewError and recompile is as close as you're going to
get
21:18 < vsmatck> yeah, I think you're right.
21:19 -!- rlab [~Miranda@91.200.158.34] has quit [Quit: Miranda IM! Smaller,
Faster, Easier.  http://miranda-im.org]
21:22 -!- pjz [~pj@place.org] has quit [Ping timeout: 264 seconds]
21:27 -!- cds- [cds-@unaffiliated/cds-] has joined #go-nuts
21:27 -!- wrtp [~rog@host-92-30-166-101.as13285.net] has quit [Quit: wrtp]
21:28 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has joined
#go-nuts
21:29 -!- telexicon [~telexicon@unaffiliated/chowmeined] has joined #go-nuts
21:30 -!- Bigbear1 [~Cody@d75-158-129-33.abhsia.telus.net] has quit [Ping timeout:
240 seconds]
21:31 -!- Bigbear1 [~Cody@d75-158-129-33.abhsia.telus.net] has joined #go-nuts
21:40 -!- Dr_Who [~tgall_foo@linaro/tgall-foo] has quit [Quit: ZZZZZzzzzz]
21:41 -!- Dr_Who [~tgall_foo@linaro/tgall-foo] has joined #go-nuts
21:45 -!- flaguy48 [~gmallard@user-0c6s350.cable.mindspring.com] has joined
#go-nuts
21:47 -!- Dr_Who [~tgall_foo@linaro/tgall-foo] has quit [Ping timeout: 250
seconds]
21:47 -!- cds- [cds-@unaffiliated/cds-] has left #go-nuts []
21:51 < smw> can anyone tell me what is wrong with this function?
http://paste.pocoo.org/show/445655/
21:52 < smw> I gave the compiler error
21:52 -!- chadkouse [~Adium@rrcs-74-218-87-242.central.biz.rr.com] has joined
#go-nuts
21:54 < vsmatck> smw: The if statement defines a scope.  Only stuff within
the if/else will be able to see the "infohash" variable.
21:54 < vsmatck> You'd have to declare that outside the if statement for it
to be seen.
21:54 < smw> vsmatck, ok, thanks
21:54 < vsmatck> Bittorrent ftw btw.  :)
21:54 < smw> I am making a google app engine torrent tracker :-)
21:55 < smw> in go of course ;-)
21:55 < vsmatck> Very cool!  I like the idea.  Scaleable bittorrent tracker.
21:56 < aiju> great for sharing child porn!
21:56 < smw> aiju, nah, you don't want google to know who is sharing that
stuff...
21:57 < smw> it would be great if the next time ubuntu came out with a
release their torrent tracker was responsive...
21:57 < smw> lol
21:57 < smw> the users DDoSed the torrent tracker.  That takes skill!
21:59 < vsmatck> I was working on a program for a while that distributed
hash downloading.  Hosting file block hashes can take considerable resources.
22:08 -!- photron [~photron@port-92-201-33-68.dynamic.qsc.de] has quit [Ping
timeout: 240 seconds]
22:09 -!- Phelps [~benphelps@74.195.96.118] has quit [Quit: Linkinus -
http://linkinus.com]
22:21 -!- kungfuelmosan [6ee8901a@gateway/web/freenode/ip.110.232.144.26] has
joined #go-nuts
22:26 -!- Bigbear1 [~Cody@d75-158-129-33.abhsia.telus.net] has quit [Read error:
Connection reset by peer]
22:27 -!- moraes [~moraes@189.103.188.201] has quit [Ping timeout: 250 seconds]
22:29 -!- nicka [~nicka@unaffiliated/nicka] has quit [Ping timeout: 255 seconds]
22:30 -!- qeed [~qeed@user-0c6sdtl.cable.mindspring.com] has quit [Quit: Leaving]
22:38 -!- fuho [~fuho@ool-43548e6f.dyn.optonline.net] has joined #go-nuts
22:39 < fuho> Hi everyone I am having problem running Go on its own.  It
works fine through GAE.  I probably missed something is anybody willing to help me
out?
22:41 < vsmatck> A good way to be ignored is to "ask to ask".
22:44 -!- huin [~huin@91.84.179.118] has quit [Quit: bedtime]
22:50 -!- nicka [~nicka@unaffiliated/nicka] has joined #go-nuts
22:52 < fuho> vsmatck: You right,I haven't been on IRC for a while.  I am
trying to fix it myself again if I run in trouble I will ask again with details.
22:53 -!- yogib [~yogib@dslb-178-009-065-238.pools.arcor-ip.net] has quit [Quit:
yogib]
22:53 < vsmatck> :) kk
23:02 -!- anticide [~textual@91.200.224.93] has joined #go-nuts
23:07 < fuho> When instaling GO one test failed
(os/inotify.TestInotifyEvents - Watcher.Watch() failed: inotify_add_watch _test:
no space left on device).  Is this a big problem?  8g still runs
23:08 < fuho> I was installing the RELEASE version cloned using Mercurial
23:09 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has quit [Remote
host closed the connection]
23:10 -!- qeed [~qeed@adsl-98-85-40-169.mco.bellsouth.net] has joined #go-nuts
23:35 -!- awidegreen [~quassel@h-170-226.a212.priv.bahnhof.se] has quit [Remote
host closed the connection]
23:36 -!- erus` [~chatzilla@cpc2-gill2-0-0-cust701.basl.cable.virginmedia.com] has
quit [Remote host closed the connection]
23:38 -!- _macro [~Neil@c-67-169-183-90.hsd1.ca.comcast.net] has joined #go-nuts
23:40 -!- vsayer [~vsayer@c-67-170-236-166.hsd1.ca.comcast.net] has joined
#go-nuts
23:51 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has quit [Ping
timeout: 250 seconds]
--- Log closed Mon Jul 25 00:00:01 2011