--- Log opened Sun Aug 01 00:00:05 2010
00:00 < chaosclown> i primarily use linux as well, but when i develop most
of the time i like to develop for windows, since thats where most people are.
00:05 < chaosclown> but, Go seems really impressive, so I'm wanting to give
it a shot.
00:05 < chaosclown> although there seems to be a lack of documentation.
00:05 < chaosclown> right now i'm watching the talk video by Rob Pike.
00:08 < exch> since it's still under heavy development, documentation isn't
really a priority.  The source code for the standard library is really the best
place to study at the moment.  Writing independant docs will require constant
rewrites and tweaks at this stage, since go keeps being improved
00:09 < chaosclown> so would it be stupid to transfer development to it?
00:10 < exch> That depends on what you want to use it for.  It can do a fair
bit, personally i wouldn't use it for production stuff just yet.
00:11 < exch> The go devs made it clear they already do within the google
company, but it wasn't made clear what for
00:13 < chaosclown> i do infosec r&d, a lot of reversing and grayhat
projects.  currently, i do API calls with C, whereas if I'm looking for networking
code I'll use Python to write a quick client or packet generation, for example
fake ISATAP router advertisements was my most recent project.
00:14 < chaosclown> so I'm looking at low-level code with the API and
sockets, pretty much.  and i'm looking for something to consolidate what I'm
currently doing through two languages.
00:15 < chaosclown> python has the weakness of needing to ship the runtime,
you have py2exe, but added libraries bring problems with that, even though it's a
nice language, especially with the C types.  and then C just has its own
difficulties, not to mention being a little long-winded.
00:16 < exch> Go will have a little of both worlds in that regard, though
certainly not a magic wand that fixes everything.  I can't really judge if it'll
be useful for your needs though.  I guess you'll just have to give it a go and see
for yourself
00:17 < exch> keep in mind that the Windows port is not officially supported
and is a community effert.  That means it likely lags behind the mainline by at
least a few versions
00:17 -!- cjyar [~cjyar@chris.static.mt.net] has left #go-nuts []
00:17 < chaosclown> i see
00:18 < chaosclown> well i will be trying it out :) thanks for your time.
i'm sure i'll be asking some questions soon.
00:18 < exch> np :)
00:18 < exch> have fun.  Regardless of Go's state, I do know it's a lot of
fun to work with
00:27 -!- emmanueloga [~emmanuelo@190.247.41.202] has joined #go-nuts
00:30 -!- nomo [~nomo@mobile-166-137-137-079.mycingular.net] has joined #go-nuts
00:35 -!- Davids [~davids@cpe-74-64-107-34.nyc.res.rr.com] has joined #go-nuts
00:35 -!- Davids [~davids@cpe-74-64-107-34.nyc.res.rr.com] has quit [Remote host
closed the connection]
00:35 -!- scm [justme@d039234.adsl.hansenet.de] has joined #go-nuts
00:40 -!- nomo [~nomo@mobile-166-137-137-079.mycingular.net] has quit [Quit:
Colloquy for iPhone - http://colloquy.mobi]
00:51 -!- scm [justme@d039234.adsl.hansenet.de] has quit [Ping timeout: 264
seconds]
00:59 -!- napsy [~luka@212.235.174.112] has quit [Read error: Operation timed out]
00:59 -!- Byron [~Byron@cpe-98-155-138-202.hawaii.res.rr.com] has joined #go-nuts
01:01 -!- Byron [~Byron@cpe-98-155-138-202.hawaii.res.rr.com] has left #go-nuts []
01:27 -!- Bombe [~droden@weltgehirnmaschine.de] has quit [Excess Flood]
01:28 -!- Bombe [~droden@weltgehirnmaschine.de] has joined #go-nuts
01:57 -!- napsy [~luka@212.235.174.112] has joined #go-nuts
01:58 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined
#go-nuts
02:01 -!- raylu [raylu@75.53.103.63] has joined #go-nuts
02:10 -!- photron [~photron@port-92-201-79-39.dynamic.qsc.de] has quit [Ping
timeout: 276 seconds]
02:16 -!- ivan` [~ivan@li14-39.members.linode.com] has quit [Quit: Coyote finally
caught me]
02:16 -!- ivan` [~ivan@unaffiliated/ivan/x-000001] has joined #go-nuts
02:35 -!- wobsite [~wobsite@pool-96-237-162-24.bstnma.fios.verizon.net] has joined
#go-nuts
02:40 -!- carllerche [~carllerch@208.87.61.203] has quit [Quit: carllerche]
02:52 -!- wobsite [~wobsite@pool-96-237-162-24.bstnma.fios.verizon.net] has quit
[Read error: Connection reset by peer]
03:03 -!- rejb [~rejb@unaffiliated/rejb] has quit [Ping timeout: 276 seconds]
03:19 -!- carllerche [~carllerch@208.87.61.203] has joined #go-nuts
03:19 -!- carllerche [~carllerch@208.87.61.203] has quit [Client Quit]
03:29 -!- jchen2010 [~chatzilla@adsl-072-148-044-017.sip.rmo.bellsouth.net] has
joined #go-nuts
03:41 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has quit [Ping timeout:
619 seconds]
03:41 -!- allengeorge [~allengeor@74.12.150.7] has quit [Quit: allengeorge]
03:49 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has joined #go-nuts
03:51 -!- araujo_ [~araujo@61.173.116.67] has joined #go-nuts
03:52 -!- araujo_ [~araujo@61.173.116.67] has quit [Remote host closed the
connection]
03:52 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Quit: Leaving]
03:52 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts
03:53 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.2]
04:01 -!- napsy [~luka@212.235.174.112] has quit [Ping timeout: 265 seconds]
04:13 -!- jchen2010 [~chatzilla@adsl-072-148-044-017.sip.rmo.bellsouth.net] has
quit [Quit: ChatZilla 0.9.86 [Firefox 3.6.3/20100401080539]]
04:15 -!- egad [~chatzilla@pool-173-49-140-136.phlapa.fios.verizon.net] has joined
#go-nuts
04:15 < egad> hello
04:17 < cw> hi
04:19 < exch> hi
04:19 -!- nf [~nf@124-171-6-238.dyn.iinet.net.au] has quit [Remote host closed the
connection]
04:20 -!- nf [~nf@203-158-42-150.dyn.iinet.net.au] has joined #go-nuts
04:23 -!- gent00r [~r00t@gw.invnetworks.com] has joined #go-nuts
04:29 -!- jdp [~gu@24.238.32.162.res-cmts.segr.ptd.net] has joined #go-nuts
04:33 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Read error:
Connection timed out]
04:34 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts
04:38 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Max SendQ exceeded]
04:38 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit:
This computer has gone to sleep]
04:50 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined
#go-nuts
04:58 -!- napsy [~luka@212.235.174.112] has joined #go-nuts
05:16 -!- cco3 [~conley@c-69-181-138-209.hsd1.ca.comcast.net] has quit [Read
error: Operation timed out]
05:20 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts
05:43 -!- bmizerany [~bmizerany@c-24-6-37-113.hsd1.ca.comcast.net] has joined
#go-nuts
05:58 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Remote
host closed the connection]
06:07 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
06:09 -!- joyer [~user@113.109.184.45] has joined #go-nuts
06:13 -!- glewis [~glewis@cpe-76-168-189-117.socal.res.rr.com] has joined #go-nuts
06:17 < glewis> If I've got this: "s := make(map[int]vector.IntVector) ;
s[n] = vector.IntVector{} " why can't I then later do this: s[n].Push(i) ?
06:32 -!- egad [~chatzilla@pool-173-49-140-136.phlapa.fios.verizon.net] has quit
[Quit: ChatZilla 0.9.86 [Firefox 3.6.8/20100722155716]]
06:38 -!- snearch [~snearch@f053003242.adsl.alicedsl.de] has joined #go-nuts
06:44 < cbeck> glewis: Are you getting a compile error or a runtime error?
06:44 < glewis> compile error
06:45 < cbeck> What's the error?
06:45 < glewis> "cannot call pointer method on s[n]"
06:47 < cbeck> check
http://golang.org/src/pkg/container/vector/intvector.go#L175
06:49 -!- aho [~nya@fuld-4d00d3e7.pool.mediaWays.net] has quit [Quit:
EXEC_over.METHOD_SUBLIMATION]
06:50 < glewis> I apologize...  I'm just a Go newbie...  I still don't get
it.  I tried &s[n].Push(i) and it still doesn't like that.
06:53 < nsf> map indexing operation isn't addressable
06:54 < nsf> you can't gen an address of s[n]
06:54 < nsf> get*
06:54 < nsf> so, you should store pointers to a vector.IntVector in your map
06:54 < cbeck> make s a map[int]*vector.IntVector
06:55 < nsf> in order to use pointer methods
06:55 < cbeck> err, what he said
06:55 < cbeck> or possibly do &(s[n]).Push(i)
06:55 < glewis> oh!  I think I understand.  Thanks!  I'll try that out.
06:57 < glewis> That worked!  Thanks a bunch!
07:00 -!- jefferai_gone [~quassel@jefferai.org] has joined #go-nuts
07:00 -!- glewis [~glewis@cpe-76-168-189-117.socal.res.rr.com] has quit [Quit:
glewis]
07:01 -!- jefferai [~quassel@kde/amarok/mitchell] has quit [Ping timeout: 240
seconds]
07:02 -!- napsy [~luka@212.235.174.112] has quit [Ping timeout: 246 seconds]
07:04 -!- dacc [~dan@c-67-171-32-251.hsd1.wa.comcast.net] has joined #go-nuts
07:05 < dacc> so it's not possible to define new methods on non-local type,
and there is no concept of subclassing, so is there any other way to "mix in" new
methods?
07:07 < dacc> oh wait, nm
07:07 < dacc> i think i see =)
07:08 < dacc> define a new local type
07:08 -!- joyer` [~user@96.56.210.156] has joined #go-nuts
07:11 -!- Byron [~Byron@cpe-98-155-138-202.hawaii.res.rr.com] has joined #go-nuts
07:11 -!- Byron [~Byron@cpe-98-155-138-202.hawaii.res.rr.com] has left #go-nuts []
07:11 -!- joyer [~user@113.109.184.45] has quit [Ping timeout: 265 seconds]
07:13 < dacc> hmm, actually didn't work
07:13 < dacc> guess i'll just use an internal instance in a new struct type
07:14 -!- jefferai_gone [~quassel@jefferai.org] has quit [Quit:
http://quassel-irc.org - Chat comfortably.  Anywhere.]
07:15 -!- jefferai [~quassel@kde/amarok/mitchell] has joined #go-nuts
07:34 < dacc> ok so details: i want to define a local type ReplayFile that
derives from os.File and adds a new method
07:35 < dacc> is this proper go think?  doing "type ReplayFile os.File"
doesn't allow me to convert os.Files to ReplayFiles due to unexported fields
07:36 -!- ronny [~quassel@p4FF1DB6F.dip.t-dialin.net] has joined #go-nuts
07:40 < cbeck> dacc: You can do type ReplayFile struct {*os.File;
MyOtherField foo}
07:41 -!- snearch [~snearch@f053003242.adsl.alicedsl.de] has quit [Quit:
Verlassend]
07:42 < dacc> cbeck: ok, so maybe i should just embed os.File as you say
07:42 < dacc> i guess i'm groping around for "subclassing" =)
07:43 < dacc> although i guess what i'm trying would be upcasting
07:44 < dacc> cbeck: i thought it'd be useful to be able to convert between
ReplayFile and os.File instances, but apparently this requires a copy
07:44 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has quit [Quit:
slashus2]
07:44 < dacc> hmm, or maybe i can use a type assertion
07:45 -!- napsy [~luka@212.235.174.112] has joined #go-nuts
07:47 < cbeck> dacc: What are you trying to do?  It sounds a bit like you're
trying to write java/c++ in Go
07:50 < dacc> cbeck: yes, still trying to break old mindsets
07:50 < dacc> cbeck: i'd like to add a method Consume that does both a Read
and a Seek to os.File
07:51 < dacc> cbeck: i could create a struct type that contains an *os.File
field and add the method there as you said
07:51 < dacc> cbeck: ..  but then i have to proxy all of the other methods
on os.File
07:51 < dacc> cbeck: i thought maybe there was a more clever way
07:53 < dacc> cbeck: actually, i'm starting to see the light =)
07:53 < dacc> cbeck: having my client code rely on "Consumable" is probably
cleaner separation
07:54 < dacc> cbeck: then "ReplayFile" can rely on an io.ReadSeeker instead
of os.File
07:56 -!- Guest98064 [~quassel@p4FF1DB6F.dip.t-dialin.net] has quit [Remote host
closed the connection]
07:56 < cbeck> dacc: no proxy would be needed
07:57 < dacc> cbeck: just expose the os.File instance?
07:58 < cbeck> dacc: from the lang spec: Fields and methods (§Method
declarations) of an anonymous field are promoted to be ordinary fields and methods
of the struct (§Selectors).  The following rules apply for a struct type named S
and a type named T:
07:58 < cbeck> http://golang.org/doc/go_spec.html#Struct_types
07:58 < dacc> cbeck: ooh, i see
07:58 < dacc> cbeck: thank you
07:59 < cbeck> np, happy hacking
08:03 -!- bmizerany [~bmizerany@c-24-6-37-113.hsd1.ca.comcast.net] has quit
[Remote host closed the connection]
08:04 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.2]
08:08 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
08:12 -!- a2800276 [~tbe@xdsl-87-78-60-115.netcologne.de] has joined #go-nuts
08:14 -!- ikaros [~ikaros@drms-4d0158be.pool.mediaWays.net] has joined #go-nuts
08:33 -!- ShadowIce [pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
08:38 < dacc> cbeck: hmm, not sure what i'm doing wrong
http://gist.github.com/503120
08:38 < dacc> cbeck: gives info_sandbox.go:38: unknown ReplayFile field 'fd'
in struct literal
08:38 < dacc> etc.
08:39 -!- jhh [~jhh@g227187248.adsl.alicedsl.de] has joined #go-nuts
08:39 < dacc> cbeck: despite "Fields and methods (§Method declarations) of
an anonymous field are promoted to be ordinary fields and methods of the struct
(§Selectors)."
08:40 < cbeck> sec
08:42 < cbeck> dacc: You don't get access to unexported fields
08:42 < dacc> cbeck: ah ok
08:43 < dacc> cbeck: so i need to duplicate these methods in ReplayFile?
08:43 < dacc> cbeck: seems to break encapsulation
08:44 < cbeck> But you can do what you're trying to with: return
&ReplayFile(file)
08:44 < cbeck> err
08:44 -!- soc [~soc@p54AD9BF2.dip.t-dialin.net] has joined #go-nuts
08:44 < dacc> same issue with unexported fields i think
08:44 < cbeck> &ReplayFile{file}
08:44 < dacc> oh hrm
08:46 -!- soc [~soc@p54AD9BF2.dip.t-dialin.net] has left #go-nuts []
08:46 -!- soc [~soc@p54AD9BF2.dip.t-dialin.net] has joined #go-nuts
08:47 < dacc> worked!
08:49 < dacc> ok think i grok it, very cool
08:49 < dacc> thanks again
08:51 < cbeck> np
08:51 * cbeck -> bed
08:51 -!- soc [~soc@p54AD9BF2.dip.t-dialin.net] has left #go-nuts []
08:51 < dacc> gnight
08:53 -!- soc [~soc@p54AD9BF2.dip.t-dialin.net] has joined #go-nuts
08:54 -!- napsy [~luka@212.235.174.112] has quit [Quit: Lost terminal]
08:57 -!- soc [~soc@p54AD9BF2.dip.t-dialin.net] has quit [Quit: Leaving.]
08:57 -!- soc [~soc@p54AD9BF2.dip.t-dialin.net] has joined #go-nuts
08:58 -!- jhh [~jhh@g227187248.adsl.alicedsl.de] has quit [Quit: jhh]
08:58 -!- napsy [~luka@212.235.174.112] has joined #go-nuts
08:59 < soc> test
08:59 < dacc> yay!
08:59 < soc> wth?
08:59 < soc> :-)
08:59 < soc> ok, well it works, i don't know why and i don't want to care
08:59 < soc> THANKS!
08:59 < dacc> sure np
09:00 < soc> ok, now to my question:
09:00 < soc> i was reading a bit documentation, especially strings/unicode
etc.  ...  and i wonder, are these things still drafts?
09:04 < soc> for instance there is "toUpper".  how is this supposed to work?
09:05 -!- ikaros_ [~ikaros@drms-4d014074.pool.mediaWays.net] has joined #go-nuts
09:05 < soc> is there a implicit locale assumed?
09:05 < soc> or will this behave diffenrently on every computer?
09:08 -!- ikaros [~ikaros@drms-4d0158be.pool.mediaWays.net] has quit [Ping
timeout: 240 seconds]
09:10 < soc> mhh ...  anyone?
09:12 -!- ikaros_ [~ikaros@drms-4d014074.pool.mediaWays.net] has quit [Quit: Leave
the magic to Houdini]
09:17 -!- ikaros [~ikaros@drms-4d014265.pool.mediaWays.net] has joined #go-nuts
09:20 -!- saschpe [~saschpe@mgdb-4d0cfe9f.pool.mediaWays.net] has joined #go-nuts
09:21 -!- ikaros [~ikaros@drms-4d014265.pool.mediaWays.net] has quit [Ping
timeout: 240 seconds]
09:22 -!- napsy [~luka@212.235.174.112] has quit [Ping timeout: 246 seconds]
09:24 -!- photron [~photron@port-92-201-38-67.dynamic.qsc.de] has joined #go-nuts
09:29 -!- napsy [~luka@212.235.174.112] has joined #go-nuts
09:29 -!- iant [~iant@nat/google/x-srqmxngjuqdcpqqh] has joined #go-nuts
09:29 -!- mode/#go-nuts [+v iant] by ChanServ
09:31 < soc> mhh ...  obviously noone ...  *sigh*
09:32 -!- a2800276_ [~tbe@xdsl-78-34-159-6.netcologne.de] has joined #go-nuts
09:33 -!- rhino9 [~rhino9@92.47.209.144] has joined #go-nuts
09:34 -!- a2800276 [~tbe@xdsl-87-78-60-115.netcologne.de] has quit [Ping timeout:
258 seconds]
09:36 -!- ikaros [~ikaros@drms-4d0143c0.pool.mediaWays.net] has joined #go-nuts
09:39 -!- tvw [~tv@e176005226.adsl.alicedsl.de] has joined #go-nuts
09:48 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
09:54 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Ping timeout: 240 seconds]
09:54 -!- ikaros [~ikaros@drms-4d0143c0.pool.mediaWays.net] has quit [Quit: Leave
the magic to Houdini]
10:00 -!- Fish [~Fish@bus77-2-82-244-150-190.fbx.proxad.net] has joined #go-nuts
10:07 < taruti> Are there any plans to get compilers written in Go instead
of the C ones, those look quite painful to touch
10:11 <+iant> I don't know of anybody working on that
10:25 < soc> does someone know a bit about how go's string should work?
10:26 < napsy> soc: what problem do you have?
10:26 < soc> i wonder how things like ToUpper work for instance
10:27 < araujo> taruti, compilers written in Go for ...  which language?
10:27 < soc> will go take the locale of the system it is running on, the
system it was compiled on or is there a default locale?
10:27 < taruti> araujo: go :)
10:28 < araujo> oh ok .9
10:28 < araujo> :)
10:30 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts
10:32 < nsf> soc: Go's strings library assumes that string contains utf-8
encoded data
10:32 < nsf> therefore it doesn't care about locales
10:38 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.2]
10:40 < soc> so how should ToUpper work without a locale?
10:41 < soc> there is no single correct way a casing function can work
without a locale
10:41 -!- peterdn [~peterdn@cpc1-oxfd18-2-0-cust914.4-3.cable.virginmedia.com] has
joined #go-nuts
10:46 < soc> *sigh*
10:47 < soc> getting people to answer seems to be really hard :-/
10:51 < korfuri> i suck at localization but i fail to see why you need a
locale to capitalize utf8 characters
10:52 < korfuri> i mean, the lower/upper chars are fixed by the charset
right ?
11:01 < Namegduf> "not entirely"
11:01 < Namegduf> Is all I remember.
11:03 < Namegduf> Yeah.
11:03 < Namegduf> http://unicode.org/reports/tr21/tr21-3.html "Characters
may have case mappings that depend on the locale"
11:04 < Namegduf> In which case (no pun intended) I guess it'd behave
according to some default behaviour without locale support, which might or might
not be a biggie.
11:04 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has quit [Ping
timeout: 260 seconds]
11:07 < bartbes> in any case you can translate ascii to upper
11:10 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has joined #go-nuts
11:13 -!- snearch [~snearch@f053003242.adsl.alicedsl.de] has joined #go-nuts
11:15 -!- roop [~roop@122.167.3.83] has joined #go-nuts
11:15 < soc> sure ...
11:15 < soc> korfuri, Namegduf: thanks for answering ...
11:17 < soc> i was just looking through all these new languages and it made
me really sad that we still almost all programing lnaguages fail at handling
strings
11:18 < soc> i understand that languages created before unicode 3 try to
stay compatible when using utf-16 internally
11:19 < korfuri> oh, ok
11:19 < soc> but really, we're living in the 21.  century and basically no
one is even able to provide a halfway working string implementation?
11:19 < korfuri> some day i'll man up and try to understand fully the whole
locale+charset mess
11:20 < korfuri> some day...
11:20 < soc> sure ...  i would really wish that people would read and
UNDERSTAND the unicode manual before implementing anything related to strings ...
11:22 < soc> it is _always_ the same ...  first some half-baked solution
which won't work with almost every non-ASCII text and after that: "Oh no, it's
wrong, but now we can't change it anymore, because of backward compatibility"
11:23 < korfuri> well, i'm reading the sources and it seems to be partially
taken care of
11:23 < korfuri> pkg/unicode/casetables.go
11:23 < korfuri> but there's a kind of big "TODO" in there
11:23 -!- rhino9 [~rhino9@92.47.209.144] has quit []
11:23 < soc> and i can tell you: that won't change until it is to late to
change
11:24 < korfuri> that'd sadden me a lot coming from the Go team, especially
given their strong interaction with the utf8 team
11:24 < soc> it's the same thing every language designer had before:
"Strings are easy"
11:24 < soc> then they mess it up
11:24 < korfuri> no they are not (sigh)
11:24 < korfuri> :(
11:25 < Namegduf> What's wrong with Go?
11:25 < korfuri> even when you are coding with high level tools
11:26 < korfuri> actually, reading a bit further in the unicode package
11:26 < korfuri> there's a tool to generate unicode tables
11:26 -!- Wiz126 [~Wiz126@24.229.245.72.res-cmts.sm.ptd.net] has quit [Ping
timeout: 264 seconds]
11:26 -!- roop [~roop@122.167.3.83] has quit [Remote host closed the connection]
11:26 < korfuri> retrieving data from the web
11:27 < soc> the hardest part imo is to explain that computing the length of
a string is O(n) complexity ...  language designers start screaming and kicking
...  and then declare "well, it is to hard, we'll just count bytes (or chars)"
11:27 < Namegduf> Er
11:27 < Namegduf> Your statement is wrong on multiple counts.
11:27 < soc> although this is exactly what 99,5% of their users are _not_
expecting
11:27 < Namegduf> 1) Length can easily be O(1)
11:27 < soc> then correct me
11:27 < soc> Namegduf: absolutely not
11:28 < korfuri> Namegduf: that's caching
11:28 < Namegduf> No, it isn't "caching".
11:28 < korfuri> at some point you have to make the calculation
11:28 < Namegduf> Caching implies an intermediary layer
11:28 < Namegduf> Calculating the length in bytes of a C string is O(n)
11:28 < soc> you can armotize the time via caching, but that's ahrd if you
try splitting strings
11:28 < Namegduf> In Go, it is O(1)
11:28 < soc> Namegduf: sorry, that's mathematically impossible
11:29 < Namegduf> Wrong.
11:29 < Namegduf> C strings are a series of bytes with a null at the end.
11:29 < korfuri> yeah but that's just optimization, when you get a string
from the outside world you have to count the bytes and perform utf8 hard
calculations to know both the length in bytes and in chars
11:29 < Namegduf> Go strings are a length (in bytes) at the start, followed
by a sequence of bytes, no terminating character.
11:30 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has quit [Ping
timeout: 260 seconds]
11:30 < soc> Namegduf: so you are exactly doing what i complained earlier:
you start counting bytes
11:30 < napsy> soc: go strings are immutable so you can store the lenght
while being certain it won't change
11:30 < Namegduf> soc: My point is that you could do the exact same thing
with characters
11:30 < Namegduf> You'd be storing the same information twice, with an O(n)
operation able to derive one from the other
11:31 < soc> and that's almost never the correct answer if people wonder
"how long the string is"
11:31 < soc> Namegduf: but still computing the length is O(n), of course you
can cache it afterwards
11:31 < Namegduf> No, it isn't.
11:31 < Namegduf> You can't compute the length of a Go string.
11:31 < Namegduf> They aren't null-terminated.
11:31 < Namegduf> You're dependent on the length being stored at the time
the string is created.
11:31 < korfuri> well, it has to be computed at some point
11:32 < korfuri> namely the construction of the string
11:32 < Namegduf> Yes, but it is not computed from the string.
11:32 < Namegduf> It's known separately.
11:32 < soc> Namegduf: sorry, but you don't understand it: at the beginning
of a Go string you are storing the amount of bytes, not the lenght of the string
11:32 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
11:32 < korfuri> of course it's not, because the string doesn't exist yet...
:)
11:32 -!- Fish [~Fish@bus77-2-82-244-150-190.fbx.proxad.net] has quit [Ping
timeout: 252 seconds]
11:33 < Namegduf> korfuri: No. "Of course it's not, because there's no way
to generate it from the string"
11:33 < Namegduf> Getting the length with the prestored value from the
string is O(1); getting the length without from the string is impossible.
11:34 < Namegduf> Getting the length in characters is O(n), but you could
duplicate the length measure if you really cared and avoid that.
11:34 < Namegduf> It'd just be stupid.
11:34 < soc> to compute the length of a string, you have to take the amount
of bytes and iterate trough your data and accumulating the seperate graphemes
11:34 -!- joyer` [~user@96.56.210.156] has quit [Remote host closed the
connection]
11:34 < Namegduf> Right.  And you could store that at the time the string is
created, instead of the byte count, if you wanted.
11:35 < Namegduf> And derive the length in bytes from that with an O(n)
operation when you needed it.
11:35 < Namegduf> It'd be stupid, but it's possible.
11:35 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has joined #go-nuts
11:35 < Namegduf> Then it would be like the length in bytes now; O(1)
assuming you have it, impossible to get otherwise.
11:36 < Namegduf> Anyways, that was only the first failing of your point,
the assumption that it had to be O(n)
11:36 < soc> no it's not
11:37 < soc> sorry, but at the moment Go strings don't store the length in
it, only the amount of bytes they need to store their data, they are completely
seperate concepts
11:37 < Namegduf> "at the moment" has nothing to do with anything I just
said.
11:37 < soc> if you _would_ change the string representation in the language
to actually store the lenght, then the length would be O(1).
11:37 < Namegduf> Right.
11:38 < soc> and that's what i'm complaining about.  that proper string
handling is only an afterthought in most programming languages today.
11:38 < Namegduf> So it isn't inherently an O(n) operation- it's just no
languages store the length in characters, probably because it's a pointless and
useless thing to do.
11:38 < Namegduf> Wasting space on something which is pretty much never
needed.
11:38 < soc> Namegduf: why is it useless/pointless?
11:38 < Namegduf> soc: How often does a typical program care about the
length of a string in characters?
11:39 < Namegduf> Iteration is not included, because that's best done in a
single pass without getting the length ahead of time.
11:39 < soc> Namegduf: almost 99.5% of the time
11:39 -!- tvw [~tv@e176005226.adsl.alicedsl.de] has quit [Ping timeout: 265
seconds]
11:39 < Namegduf> soc: No, I mean, give me a scenario.
11:39 < korfuri> Namegduf: that depends what operation you are talking
about.  Storing a result doesn't make the operation itself cheaper, it replaces it
with a simple, cheap "fetch an already known result" operation
11:39 < soc> the only exception is memory management
11:39 < Namegduf> 99.5% of the time is a lot of the time
11:39 < Namegduf> So I'm hoping for maybe a dozen or half-dozen examples
here
11:40 < Namegduf> Of when real programs would, often, need the length of a
string in characters, but not for iteration, which needs an O(n) operation anyway
which is not made faster by having the length at hand.
11:40 < Namegduf> (Iteration doesn't need the length persay- just needs to
know when it's done)
11:40 < soc> input validation for instance
11:40 -!- Fish [~Fish@bus77-2-82-244-150-190.fbx.proxad.net] has joined #go-nuts
11:41 < Namegduf> Alright.  Restricting input to a certain number of
characters.
11:41 < soc> people do things like "that input should have at least 3
'characters'" and then check for the amount of bytes
11:42 < Namegduf> Ah, but is it three "characters" because it needs to fit
into a three character buffer?
11:42 < Namegduf> A lot of lengths actually are byte restrictions, but okay,
that is a valid one.
11:42 < soc> "a\u0300\u0301\u0302\u0303\u0304\u0320\u0324" this is one
character, but 8 codepoints.  but i promise you, i will get thorugh with that on
99% of all programs which validate their input
11:42 < Namegduf> But, it is not a good example of a case where having
lengths be O(1) would be clever
11:43 < Namegduf> Because it is not a point that should be taking a
significant fraction of CPU time.
11:43 < Namegduf> So it is a case where you care about length in characters,
but not a case where that particularly wants to be that fast.
11:43 < soc> Namegduf: i didn't say that.  i mentioned it, that the simple
acceptance that "number of bytes"/"length of string" are different things is the
first step realizing that string handling is a hard thing and almost never done
right
11:44 < Namegduf> You know that ranging over a string in Go iterates over
codepoints, not bytes, right?
11:44 < soc> yes
11:44 < soc> which doesn't really solve anything
11:44 < Namegduf> You know that Go provides functions for indexing by
character, right?
11:45 < soc> only codepoints, but i'm happily corrected
11:45 < Namegduf> Hmm, probably codepoints.
11:46 < Namegduf> My point though is that these things have been considered
11:46 < Namegduf> And you cannot claim "they were ignorant" as an automatic
explanation of why you're right
11:46 < soc> which probably depends on your interpretation of character (=
grapheme/codepoint/"casual")
11:47 < Namegduf> You need to explain why the pros and cons favour what you
want.
11:48 < Namegduf> Go indexes by byte because it cares about speed- the
default operation is less clever than indexing by character, but much faster and
more scalable, resulting in the majority of code being MUCH faster and O(n^2)
algorithms being avoided, at the cost that people need to be aware when they need
to use the functions for indexing by codepoint.
11:48 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has quit [Ping
timeout: 265 seconds]
11:48 < Namegduf> That is the explanation I have read before.
11:48 < soc> i just saw that typical ad-hoc approach in the current
documentation which _will_ lead to problems further down the road
11:49 < soc> it's the same in almost all langauges ("whats easy/fast" vs.
"what people actually expect")
11:49 < Namegduf> Easy and fast are unrelated concerns
11:49 < soc> and in my opinion it is possible to provide both
11:49 < Namegduf> That'd be quite the trick.
11:50 < Namegduf> Would "what people actually expect" include indexing by
character?
11:50 < Namegduf> Because doing that in O(1) time without increasing RAM
usage would be impressive
11:50 < soc> but the things i see are that every language realizes it after
a while, that the thing they are doing might fast and easy, but doesn't do what
people expect and then start putting additional things into different libraries
which should have been available on string since day one
11:51 < Namegduf> Go does not provide any methods on string
11:51 < Namegduf> So it's averted
11:51 < soc> Namegduf: yes, that was just an example
11:51 < soc> the naming is important
11:52 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has joined #go-nuts
11:52 < soc> Namegduf: indexing is very hard to do fast, but often needed
11:52 < Namegduf> Things are not hard or easy
11:53 < Namegduf> There are algorithms to do them with various tradeoffs
involved to pick from.
11:53 < soc> people do things like "give me the third charcter" and expect
that they get a character back and not a broken surrogate pair or a combining
diacritic mark
11:53 < Namegduf> I don't think there is a fast one at all.
11:53 < Namegduf> Yeah, but they also, more commonly, do things like "split
the string at spaces"
11:53 -!- scm [justme@d057245.adsl.hansenet.de] has joined #go-nuts
11:53 < Namegduf> Or commas, or quotation marks...
11:53 < Namegduf> Which due to the way UTF-8 works is totally safe to do by
byte.
11:53 < soc> which needs unicode support too
11:53 < Namegduf> Nope.
11:54 < Namegduf> At least, pretty sure not.
11:54 < Namegduf> UTF-8 guarantees ASCII characters in the string will
always literally represent that character, not be part of a separate value.
11:54 < soc> there are fun things like ZWNJ and the like ...  you pretty
make damn sure you handle things like that
11:54 < Namegduf> Why?
11:55 < Namegduf> If I'm parsing a specific file/input format, I don't need
to let people specify "any whitespace" to split on.
11:55 < Namegduf> More commonly, you just split on a specific character or
set of characters.
11:55 <+iant> soc: it's true that case tables are not implemented in the Go
library, but the plan is outlined in unicode/casetables.go
11:55 < soc> there was a fun bug in c# where people wanted to do a simple
text operation: replace two "spaces" by one "space" ...  the code never returned
11:56 < Namegduf> When I say space
11:56 <+iant> soc: it's silly to assume that that will never be fixed
11:56 < Namegduf> I mean ASCII value 32
11:56 < Namegduf> Not "arbitrary whitespace characters".
11:56 <+iant> strings in Go are really sequences of bytes, not sequences of
characters
11:57 -!- Fish [~Fish@bus77-2-82-244-150-190.fbx.proxad.net] has quit [Remote host
closed the connection]
11:57 <+iant> this is a little confusing because string literals can be
UTF-8
11:57 <+iant> and because the range statement on strings works on
characters, not bytes
11:57 <+iant> but in general strings are bytes
11:57 <+iant> when you need characters, use the utf8 and unicode packages
12:00 < soc> iant: they only provide codepoints or did i miss something?
12:00 <+iant> you're right, they just deal with codepoints
12:00 <+iant> sorry for misusing the terminology
12:01 < soc> http://paste.pocoo.org/show/244069/ this is one example of why
every function ahndling strings should be aware of unicode
12:02 < soc> the problem with that code (C#) was that IndexOf had basic
unicode support, but replace had not
12:03 < Namegduf> I'd say the problem was that the language considered a
zero-width joiner to equal a space in a literal string.
12:03 < soc> so this thing would loop forever, IndexOf would return true,
but Replace() would never find anything to replace
12:03 <+iant> strings in Go are byte sequences, not character or codepoint
sequences
12:03 < Namegduf> If I write a space, I damn well mean a space.
12:03 <+iant> I'm not very familiar with C# but it seems that you are
demonstrating a confusion in the C# library
12:04 <+iant> There are no current plans to introduce such a confusion into
Go
12:04 < soc> no, IndexOf ignored ZWNJ (which might be sensible thing to do),
but replace compared it directly
12:04 < Namegduf> XD
12:04 < Namegduf> At any rate, confusion with what stuff does sucks, but I
don't see why Go would suffer from that.
12:05 <+iant> what you are saying is that IndexOf interprets strings one
way, and replace interprets them another way
12:05 <+iant> I would call that a confusion
12:05 < soc> it was an example of why even methods considered "trivial"
should have clear unicode semantics
12:05 <+iant> I would say that they should be clear in which semantics they
are implementing
12:05 <+iant> in some cases that should be Unicode semantics
12:05 <+iant> in others it should not
12:05 <+iant> because in Go strings are sequences of bytes
12:06 <+iant> and a function like strings.Index is explicitly not Unicode
aware
12:06 < soc> iant: i guess that's true about every language ...  i know no
langauge which actaully used linked lists or something :-)
12:06 < Namegduf> Actually
12:07 <+iant> I would say that you just gave an example in C# where it was
not true
12:07 < Namegduf> Well, no, that's just a mess of definitions.
12:07 <+iant> your example of the C# indexOf function suggests that it does
not view a string as a sequence of bytes
12:10 -!- smw [~smw@c-76-28-90-0.hsd1.ct.comcast.net] has joined #go-nuts
12:11 < soc> iant: yes, IndexOf is unicode-aware, but Replace not (or was
not, might be fixed in newer versions...)
12:12 < Namegduf> If I followed, I think the point is that things in Go
don't treat strings as unicode unless they explicitly do, thus avoiding that.
12:12 < Namegduf> Well, as a particular unicode encoding.
12:12 < Namegduf> range being an exception for convenience.
12:13 -!- snearch [~snearch@f053003242.adsl.alicedsl.de] has quit [Quit:
Verlassend]
12:13 < soc> Namegduf: and Fields
12:14 < soc> which calls FieldsFunct with unicode.IsSpace
12:14 < Namegduf> In which package?
12:14 < soc> strings
12:14 < Namegduf> Ah, I see.
12:15 < Namegduf> strings appears to assume UTF-8
12:15 <+iant> FieldsFunc is documented to work on Unicode code points; looks
like a bug that Fields is not documented that way
12:15 -!- crashR [~crasher@codextreme.pck.nerim.net] has joined #go-nuts
12:16 <+iant> and, you're right, they should be documented as using UTF-8,
although in general that is going to be the default for the Go libraries
12:17 <+iant> also strings.Map assumes UTF-8
12:17 < smw> iant, what will be the default?
12:17 <+iant> hmmm
12:17 < smw> []int (unicode)?
12:17 <+iant> in general, the Go libraries are going to assume that when a
string contains Unicode, it will be encoded as UTF-8
12:18 < smw> ok
12:18 <+iant> for a function which takes []int, there are no concerns about
encoding
12:19 < soc> a language which positively surprised me lately was Perl 6
12:20 < soc> they removed the simple "length" and forced people to actually
say what they wanted
12:20 < Namegduf> Indexing is more of an issue, really, isn't it?
12:20 < Namegduf> And string manipulation functions.
12:20 < soc> so they provided "bytes", "codes" (codepoints), "graphs"
(graphemes)
12:20 < soc> i found that this was a good start ...
12:21 < smw> what is a "graphemes"
12:21 < smw> what are *
12:21 < soc> smw: what a normal person would call "character"
12:21 < smw> than what is a code point?
12:22 < soc> a codepoint is a representation of a single entry in the
unicode table
12:22 < soc> problem is that not every codepoint is a "charcter by itself"
12:22 < smw> then what is it?
12:22 < Namegduf> Some codepoints just add stuff to another character.
12:23 < soc> "something" ...  is probably the most accurate explanation
12:23 < soc> example:
12:23 < soc> a\u0300\u0301\u0302\u0303\u0304\u0320\u0324
12:23 < Namegduf> Like that delightful one I forget that lets me outline
characters on IRC with a ring of fire.
12:23 < soc> this thing has 8 codepoints, but it is a single grapheme ( ~
character)
12:23 < soc> à̠̤́̂̃̄
12:23 < Namegduf> I forget what it is actually supposed to be.
12:24 < soc> smw: so you basically have a "real" character and tell the
renderer that there are "some additional things" which belong to it ...
12:24 < smw> this is too confusing
12:24 < smw> I am going to stick to ascii!
12:24 < smw> like a tilde or something?
12:24 < soc> they are called combining diacritic marks ...
12:25 < soc> smw: sure
12:25 < smw> next (hopefully final question):
12:25 < soc> problem: there are also "compatibility characters" in it,
"precomposed glyphs" so to say
12:25 < soc> which make string comparison working on bytes practically
useless
12:26 < smw> wow
12:26 < Namegduf> Eh.
12:26 < soc> so you basically have dozens of different ways to show the
"bsacially" same character
12:26 < smw> so e with a ' is a glyph
12:26 < smw> but taht can also be two code points
12:26 < soc> smw: mhh, better call it character, sorry for glyph
12:26 < soc> smw: sure
12:27 <+iant> what all this means is that there is no generic way to handle
Unicode
12:27 < smw> or n with a ~ is a codepoint but could be represented as two
:-\
12:27 <+iant> because different programs have different needs
12:27 < soc> smw: yepp
12:28 < soc> unicode has defined 4 "comparison" modes where it tries to
unify graphemes so that string comparison halfway works ...
12:28 < soc> but basically that means loss of information
12:28 < soc> in some cases
12:30 < smw> soc, so, in go, range breaks by codepoint?
12:31 < soc> smw: afaik yes
12:31 <+iant> smw: yes, and it assumes UTF-8 encoding
12:31 < soc> iant: which is a good thing imo :-)
12:32 <+iant> it's the only plausible default, as far as I know
12:32 < soc> java made the mistake to user the underlying platform encoding
...  is was a pita
12:32 < soc> a solution would be to force users to provide the "mode" they
want
12:33 < smw> at this point it makes most sense to always use unicode with
the most extended codepoints possible just so everything is standard :-\
12:33 < soc> so that every method working on strings forces the user to
specify wether he wants to operate on bytes, codepoints or graphemes
12:33 <+iant> In Go I would say that that should be expressed by using
different packages
12:33 < smw> it takes alot of space, but there is no ambiguity
12:33 < soc> smw: and at this point langauge designers start screaming and
kicking :-)
12:33 <+iant> so some of the strings functions should probably move
12:34 <+iant> to me that is not a language issue, it is a library issue
12:34 < soc> iant: that would be ok too ...
12:34 <+iant> at least for a language like Go
12:34 <+iant> want to propose some patches?
12:34 < soc> is indexed access in Go a language or a library consruct?
12:34 <+iant> indexed access is always to bytes
12:35 <+iant> it's part of the language, not the library
12:35 <+iant> the language also provides a conversion from string to []int,
which gives you a slice of code points
12:35 < soc> then it is both, although this is arguable :-)
12:35 < smw> indexed access to a "string" should give codepoints
12:35 < smw> indexed access to "int8" should be bytes
12:35 <+iant> smw: in Go, a string is a sequence of bytes
12:36 < smw> iant, well, change that :-P
12:36 <+iant> so indexing into it gives you bytes
12:36 <+iant> no, having string be a sequence of bytes is desirable
12:36 < soc> it would be better to disallow the array syntax on strings
12:36 < smw> why?
12:36 <+iant> string is not restricted to representing valid character
sequences in any particular encoding
12:36 <+iant> it can represent any sequence of bytes
12:36 < soc> and have libraries for IndexByte, IndexCodepoint, IndexGrapheme
12:36 < smw> ok
12:40 < smw> iant, what would it take to make a go shell?  Something where
you could break in a program and run commands (most of them probably to print or
assign a new value to a variable).
12:40 < smw> sort of like python or other scripting languages
12:40 <+iant> well, if you use gccgo you can use gdb, I don't know if you
would count that
12:40 <+iant> otherwise I think somebody would have to finish exp/eval
12:40 < smw> gdb is good :-D
12:41 < smw> what is unfinished?
12:41 <+iant> not sure
12:41 <+iant> getting gdb to work with 6g/8g means generating debug info
which gdb can understand
12:41 <+iant> or changing gdb to understand the symbol tables that they
output today
12:41 <+iant> somebody is working on getting 6g/8g to generate DWARF line
tables
12:42 < smw> I need to install gccgo :-)
12:43 < smw> iant, what I want the most is a go shell that auto-completed
and that I could test code in.
12:43 < smw> being able to break in code and change its state is also good
12:44 < smw> gdb can do that, but it does not understand interface{} and
stuff naively
12:44 < smw> spell check XD
12:44 <+iant> yeah, that needs to be done
12:44 <+iant> nsf send out an auto-completion daemon
12:44 < smw> natively
12:44 <+iant> you could tie that to a simple shell which invokes 6g and runs
the result
12:46 < smw> iant, the issue with that is it needs to run everything over
again each time.  Something needs to keep track of the state of the fake program
12:46 < smw> like a := 1 then later println(a)
12:46 <+iant> yeah, it doesn't work with the state of the program
12:47 < smw> iant, I am trying to recreate python :-P
12:47 < smw> really fast statically typed python
12:49 <+iant> it's doable in principle but there are going to be several
steps to get there....
12:49 < smw> iant, next questions.  What are the steps and could they be
done by someone with little experience (like me)
12:50 <+iant> working on this would be a good way to gain experience....
12:50 <+iant> The first approach I would try would be exp/eval
12:50 <+iant> see how fast that is
12:50 <+iant> anything else will be an order of magnitude harder
12:51 < smw> fast does not really matter for something like this
12:51 < smw> I am still not sure what exp/eval is missing :-\
12:53 <+iant> I don't know either, you would have to give it a try
12:54 <+iant> according to exp/eval/world.go it does not implement interface
values or Go packages
12:55 < smw> ok
12:55 -!- tvw [~tv@e176005226.adsl.alicedsl.de] has joined #go-nuts
12:55 < smw> my guess is that that would be the hardest parts :-P
12:56 <+iant> presumably
12:56 -!- ronnyy [~quassel@p4FF1DB6F.dip.t-dialin.net] has joined #go-nuts
13:00 -!- Adys [~Adys@unaffiliated/adys] has quit [Remote host closed the
connection]
13:01 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts
13:01 -!- Damn3d [damn3d@unaffiliated/morpheus/x-0931003] has quit [Remote host
closed the connection]
13:54 -!- napsy [~luka@212.235.174.112] has quit [Read error: Connection reset by
peer]
13:54 -!- napsy_ [~luka@212.235.174.112] has joined #go-nuts
13:55 -!- Damn3d [damn3d@bimbrownia.org] has joined #go-nuts
14:00 -!- Damn3d [damn3d@bimbrownia.org] has quit [Changing host]
14:00 -!- Damn3d [damn3d@unaffiliated/morpheus/x-0931003] has joined #go-nuts
14:00 -!- boscop [~boscop@f055016052.adsl.alicedsl.de] has quit [Read error:
Connection reset by peer]
14:00 -!- sioraiocht [~tomh@unaffiliated/sioraiocht] has joined #go-nuts
14:07 -!- tvw [~tv@e176005226.adsl.alicedsl.de] has quit [Ping timeout: 245
seconds]
14:11 -!- sioraiocht [~tomh@unaffiliated/sioraiocht] has quit [Ping timeout: 265
seconds]
14:12 -!- tvw [~tv@e176005226.adsl.alicedsl.de] has joined #go-nuts
14:24 -!- Wiz126 [~Wiz126@24.229.245.72.res-cmts.sm.ptd.net] has joined #go-nuts
14:25 -!- rutkowski [~adrian@078088207115.walbrzych.vectranet.pl] has joined
#go-nuts
14:25 -!- rutkowski [~adrian@078088207115.walbrzych.vectranet.pl] has left
#go-nuts []
14:29 -!- a2800276_ [~tbe@xdsl-78-34-159-6.netcologne.de] has quit [Quit:
a2800276_]
14:36 -!- gastal [~jokerwww@187.106.16.17] has joined #go-nuts
14:39 -!- Fish [~Fish@9fans.fr] has joined #go-nuts
14:40 < gastal> Can anyone tell me why this example doesn't work:
http://pastebin.com/WsEhcULr ? I get this error when compiling: "type_test.go:19:
cannot use b (type *B) as type *A in function argument"
14:45 < exch> because you are passing *A instead of A
14:45 < exch> you dont have to use the pointer with an interface type
14:46 -!- gabriel9 [~gabriel9@93.157.192.28] has quit [Read error: Connection
reset by peer]
14:48 < exch> http://pastebin.com/AvuzQikP
14:54 -!- napsy_ [~luka@212.235.174.112] has quit [Read error: Operation timed
out]
14:59 -!- vegai [vegai@archlinux/developer/vegai] has joined #go-nuts
15:01 -!- soc [~soc@p54AD9BF2.dip.t-dialin.net] has left #go-nuts []
15:10 < gastal> exch: thank you, worked like a charm
15:15 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has joined
#go-nuts
15:17 -!- nomono [~nomono@c-69-136-241-18.hsd1.nj.comcast.net] has joined #go-nuts
15:18 -!- ronnyy [~quassel@p4FF1DB6F.dip.t-dialin.net] has quit [Remote host
closed the connection]
15:18 -!- gastal [~jokerwww@187.106.16.17] has quit [Read error: Operation timed
out]
15:19 -!- gastal [~jokerwww@187.106.16.17] has joined #go-nuts
15:23 -!- a2800276 [~tbe@xdsl-78-34-159-6.netcologne.de] has joined #go-nuts
15:23 -!- napsy [~luka@212.235.174.112] has joined #go-nuts
15:24 -!- a2800276 [~tbe@xdsl-78-34-159-6.netcologne.de] has quit [Client Quit]
15:25 < rsaarelm> Anyone getting "fail: fixedbugs/bug272.go" when building
latest hg checkout on linux/amd64?
15:26 < napsy> yes
15:26 -!- slashus2 [~slashus2@74-137-24-74.dhcp.insightbb.com] has joined #go-nuts
15:29 -!- iant [~iant@nat/google/x-srqmxngjuqdcpqqh] has quit [Ping timeout: 276
seconds]
15:29 < exch> rsaarelm: same here
15:30 < bartbes> http://godashboard.appspot.com/
15:30 < bartbes> lists linux amd64 as broken
15:30 -!- dacc [~dan@c-67-171-32-251.hsd1.wa.comcast.net] has quit [Ping timeout:
240 seconds]
15:31 < exch> someone made booboo
15:32 < ampleyfly> that's a nice bugfix
15:34 -!- turbinio [~tobias@141.76.34.211] has joined #go-nuts
15:34 -!- turbinio [~tobias@141.76.34.211] has left #go-nuts []
15:35 < rsaarelm> Maybe they should have a robot that blocks commits that
break common builds?
15:35 < bartbes> interesting how they call linux amd64 their primary target
15:35 < bartbes> yet from what I've seen 386 builds more often
15:37 -!- gabriel9 [~gabriel9@93.157.192.28] has joined #go-nuts
15:37 < exch> perhaps it needs more bugfixes :)
15:43 -!- adu [~ajr@softbank220043139062.bbtec.net] has joined #go-nuts
15:49 -!- crashR [~crasher@codextreme.pck.nerim.net] has quit [Quit: (◣_◢)
BigBrowser is watching ⓎⓄⓊ]
15:54 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 260 seconds]
16:01 -!- nomono [~nomono@c-69-136-241-18.hsd1.nj.comcast.net] has quit [Read
error: Connection reset by peer]
16:06 -!- a2800276 [~tbe@xdsl-78-34-159-6.netcologne.de] has joined #go-nuts
16:07 -!- sladegen [~nemo@unaffiliated/sladegen] has quit [Disconnected by
services]
16:07 -!- sladegen [~nemo@unaffiliated/sladegen] has joined #go-nuts
16:08 -!- tobiassjosten
[~tobias@c-919ee253.04-114-73746f13.cust.bredbandsbolaget.se] has joined #go-nuts
16:11 -!- smw [~smw@c-76-28-90-0.hsd1.ct.comcast.net] has quit [Remote host closed
the connection]
16:16 -!- gastal [~jokerwww@187.106.16.17] has quit [Remote host closed the
connection]
16:17 -!- awidegreen [~quassel@62.176.237.78] has joined #go-nuts
16:28 -!- napsy [~luka@212.235.174.112] has quit [Read error: Connection reset by
peer]
16:30 -!- napsy [~luka@212.235.174.112] has joined #go-nuts
16:39 -!- napsy [~luka@212.235.174.112] has quit [Read error: Connection reset by
peer]
16:41 -!- napsy [~luka@212.235.174.112] has joined #go-nuts
16:44 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined
#go-nuts
16:46 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
16:49 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Remote
host closed the connection]
16:51 -!- macroron [~ron@c-98-242-168-49.hsd1.fl.comcast.net] has joined #go-nuts
17:02 -!- Adys [~Adys@unaffiliated/adys] has quit [Remote host closed the
connection]
17:03 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts
17:03 -!- a2800276 [~tbe@xdsl-78-34-159-6.netcologne.de] has quit [Quit: a2800276]
17:16 -!- a2800276 [~tbe@xdsl-78-34-159-6.netcologne.de] has joined #go-nuts
17:16 -!- a2800276 [~tbe@xdsl-78-34-159-6.netcologne.de] has quit [Client Quit]
17:19 -!- tvw [~tv@e176005226.adsl.alicedsl.de] has quit [Ping timeout: 265
seconds]
17:24 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 240 seconds]
17:24 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
17:31 -!- Melvar [~melvar@dslb-092-072-161-123.pools.arcor-ip.net] has joined
#go-nuts
17:32 -!- Melvar [~melvar@dslb-092-072-161-123.pools.arcor-ip.net] has quit [Read
error: Connection reset by peer]
17:32 -!- Melvar1 [~melvar@dslb-092-072-161-123.pools.arcor-ip.net] has joined
#go-nuts
17:42 -!- jvogel [~jonathan@friedpancakes.com] has quit [Quit: leaving]
17:49 -!- saschpe [~saschpe@mgdb-4d0cfe9f.pool.mediaWays.net] has quit [Remote
host closed the connection]
17:58 -!- iant [~iant@81-233-149-58-no82.tbcn.telia.com] has joined #go-nuts
17:58 -!- mode/#go-nuts [+v iant] by ChanServ
18:08 -!- a2800276 [~tbe@xdsl-78-34-159-6.netcologne.de] has joined #go-nuts
18:19 -!- sioraiocht [~tomh@unaffiliated/sioraiocht] has joined #go-nuts
18:21 -!- a2800276 [~tbe@xdsl-78-34-159-6.netcologne.de] has quit [Quit: a2800276]
18:25 -!- jdp [~gu@24.238.32.162.res-cmts.segr.ptd.net] has quit []
18:29 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
18:29 -!- XenoPhoenix [~Xeno@94.171.244.40] has quit [Quit: "Wait...  what?!"]
18:33 -!- sioraioc_ [~tomh@85-220-92-205.dsl.dynamic.simnet.is] has joined
#go-nuts
18:33 -!- sioraiocht [~tomh@unaffiliated/sioraiocht] has quit [Read error:
Connection reset by peer]
18:35 -!- kevinm416 [~kevin@99-150-247-233.lightspeed.sndgca.sbcglobal.net] has
joined #go-nuts
18:37 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.2]
18:38 -!- kevinm416 [~kevin@99-150-247-233.lightspeed.sndgca.sbcglobal.net] has
quit [Client Quit]
18:39 -!- sioraioc_ [~tomh@85-220-92-205.dsl.dynamic.simnet.is] has quit [Ping
timeout: 245 seconds]
18:39 -!- kevinm416 [~kevin@99-150-247-233.lightspeed.sndgca.sbcglobal.net] has
joined #go-nuts
18:41 -!- kevinm416 [~kevin@99-150-247-233.lightspeed.sndgca.sbcglobal.net] has
quit [Client Quit]
18:41 -!- kevinm416 [~kevin@99-150-247-233.lightspeed.sndgca.sbcglobal.net] has
joined #go-nuts
18:45 -!- napsy [~luka@212.235.174.112] has quit [Ping timeout: 264 seconds]
18:46 -!- sioraiocht [~tomh@unaffiliated/sioraiocht] has joined #go-nuts
18:48 -!- kevinm416 [~kevin@99-150-247-233.lightspeed.sndgca.sbcglobal.net] has
quit [Quit: Leaving]
18:48 -!- path[l] [UPP@120.138.102.50] has quit [Ping timeout: 258 seconds]
18:48 -!- napsy [~luka@212.235.174.112] has joined #go-nuts
18:49 -!- tobiassjosten
[~tobias@c-919ee253.04-114-73746f13.cust.bredbandsbolaget.se] has quit [Ping
timeout: 276 seconds]
18:57 -!- snearch [~snearch@f053003242.adsl.alicedsl.de] has joined #go-nuts
18:59 -!- napsy_ [~luka@212.235.174.112] has joined #go-nuts
18:59 -!- napsy [~luka@212.235.174.112] has quit [Read error: Connection reset by
peer]
19:01 -!- Melvar1 [~melvar@dslb-092-072-161-123.pools.arcor-ip.net] has left
#go-nuts []
19:20 -!- sioraiocht [~tomh@unaffiliated/sioraiocht] has quit [Remote host closed
the connection]
19:22 -!- Byron [~Byron@cpe-98-155-138-202.hawaii.res.rr.com] has joined #go-nuts
19:22 -!- Byron [~Byron@cpe-98-155-138-202.hawaii.res.rr.com] has left #go-nuts []
19:23 -!- path[l] [UPP@120.138.102.50] has joined #go-nuts
19:38 -!- adu [~ajr@softbank220043139062.bbtec.net] has quit [Quit: adu]
19:38 < ZincSaucier> can I get someone to reopen #945 based on the comments?
It fixed the panic() but not the actual issue from the bug
19:42 -!- boscop [~unknown@g226249058.adsl.alicedsl.de] has joined #go-nuts
19:43 < exch> that's prolly a job for iant
19:43 -!- iant [~iant@81-233-149-58-no82.tbcn.telia.com] has quit [Ping timeout:
276 seconds]
19:45 < bartbes> heh
19:45 < bartbes> apparenly he doesn't feel like doing it
19:45 < ZincSaucier> hah -- not urgent at all, just didn't want it to get
swept away as perma-fixed
19:49 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has joined
#go-nuts
19:56 -!- iant [~iant@74.125.121.49] has joined #go-nuts
19:56 -!- mode/#go-nuts [+v iant] by ChanServ
20:04 -!- awidegreen [~quassel@62.176.237.78] has quit [Remote host closed the
connection]
20:17 < napsy_> Hello.  I tried to compile gccgo but get the following error
http://pastebin.com/0MeVMXiL Any ideas why this happens?
20:19 -!- macroron [~ron@c-98-242-168-49.hsd1.fl.comcast.net] has quit [Quit:
Leaving]
20:19 -!- iant [~iant@74.125.121.49] has quit [Ping timeout: 260 seconds]
20:26 -!- b0r3d [~k@194.146.155.142] has joined #go-nuts
20:26 -!- b0r3d [~k@194.146.155.142] has quit [Changing host]
20:26 -!- b0r3d [~k@unaffiliated/b0r3d] has joined #go-nuts
20:26 -!- b0r3d [~k@unaffiliated/b0r3d] has left #go-nuts []
20:36 < napsy_> ok it compiles now, I was missing flex
20:42 < raylu> hm...  it'd be nice if the configure script pointed that out
20:42 < napsy_> yes ...  but now build still failed
20:44 < napsy_> I now get this error http://pastebin.com/5kVuVztc
21:00 -!- Makoryu [~vt920@pool-71-174-191-10.bstnma.fios.verizon.net] has joined
#go-nuts
21:16 -!- genbat [~genbat@125-239-208-148.jetstream.xtra.co.nz] has joined
#go-nuts
21:26 -!- thiago__ [~thiago@189.107.219.157] has joined #go-nuts
21:35 -!- thiago__ [~thiago@189.107.219.157] has quit [Ping timeout: 246 seconds]
21:36 -!- thiago__ [~thiago@189.107.219.157] has joined #go-nuts
21:37 -!- rlab [~Miranda@91.200.158.34] has quit [Quit: Miranda IM! Smaller,
Faster, Easier.  http://miranda-im.org]
21:48 -!- nickaugust [~nickaugus@114.232.121.70.cfl.res.rr.com] has joined
#go-nuts
21:49 < nickaugust> hey if I want to import progs/cat.go?
import("progs/cat") isnt working...
21:50 < nickaugust> should I just copy it to my directory and import it from
there?
21:51 < exch> you can't import .go files.  You can only import compiled
packages
21:51 < exch> if you want to build multiple go files into the same binary,
pass them to the compiler in the makefile
21:51 < nickaugust> ok so I cp cat.go to my project directory then complie
it then import it?
21:52 < nickaugust> exch: ah makefile..  ok gotcha.  thanks
21:53 -!- ShadowIce [pyoro@unaffiliated/shadowice-x841044] has quit [Quit:
Verlassend]
21:53 -!- aho [~nya@fuld-4d00d3de.pool.mediaWays.net] has joined #go-nuts
22:01 -!- snearch [~snearch@f053003242.adsl.alicedsl.de] has quit [Quit:
Verlassend]
22:06 -!- napsy_ [~luka@212.235.174.112] has quit [Ping timeout: 265 seconds]
22:07 -!- napsy [~luka@212.235.174.112] has joined #go-nuts
22:08 -!- scarabx [~scarabx@c-76-19-43-200.hsd1.ma.comcast.net] has quit [Quit:
This computer has gone to sleep]
22:12 < napsy> Hello I'm trying to compile gccgo but I get this error
http://pastebin.com/5kVuVztc Any ideas?
22:14 < nickaugust> im trying to deocode a json file and print it to stdout.
so I've build a file.go like in the turtorial, and I've got the file with
file.Open("myfile", 0, 0).  that works fine and I can print it here as encoded
json.  now I try to create a new json decoder like this decoder :=
json.NewDecoder(file) and get the ouput like this output := decoder.Decode() but
when I print output its os.Error type.
22:14 < nickaugust> heres the code http://sprunge.us/MiiQ any help?
22:15 < vrtical> napsy: I haven't tried, and this advice may be way
off-base, but: is there a published list of pre-requisites to build gccgo?  Have
you checked you have all the relevant libraries installed?
22:15 < vrtical> A swift google suggests stubs32.h is part of the libc
development library.
22:16 < vrtical> (I mean stubs-32.h)
22:18 < nickaugust> napsy: yeah youre just missing some of the depencies.
when that happens just look for the file not found error and google the file and
find out what package it is in (like vrtical said) and install it.  what OS are
you using?
22:19 < exch> nickaugust: the signature for Decode is: func (dec *Decoder)
Decode(v interface{}) os.Error
22:20 < exch> the actual value from the json is stored in the v parameter
22:20 < exch> Do you need this manual decoding btw?  If you just need to
decode json into a Go struct, i suggest using the json.Marshal and json.Unmarshal
functions.  They do all the hard work for you.
22:21 -!- nettok [~quassel@200.119.181.121] has joined #go-nuts
22:22 -!- qIIp [~qIIp@72-173-157-34.cust.wildblue.net] has joined #go-nuts
22:23 < nickaugust> exch: ok thanks i'll check out json.Marshal.  this is my
first Go programs so im just getting familiar with the syntax.  i'm trying to take
a directory of json files as input and output to stdout a list of a certain field.
ie just the Name and Company fields from the json files.
22:24 < exch> ah ok.  Manual decoding can work, but if all of those files
have the same format, a simple Unmarshal() call may be easier
22:24 < nickaugust> ah yes looks like Umarshler is what I want.
22:24 < nickaugust> now does that return an object?
22:25 < exch> I'll write up a quick example.  Just a sec
22:25 < nickaugust> like in python i would expect to be able to say
returned_object.name or returned_object['name']
22:25 < nickaugust> you know?
22:25 -!- qIIp_ [~qIIp@72-173-157-34.cust.wildblue.net] has joined #go-nuts
22:26 < exch> json unmarshals the data to a go struct.  You can then simply
access the struct instance
22:26 < nickaugust> ok so a struct is an object?
22:27 < exch> yup
22:27 < exch> You can also make it return key/value pairs as a map
22:27 -!- qIIp [~qIIp@72-173-157-34.cust.wildblue.net] has quit [Ping timeout: 240
seconds]
22:27 < nickaugust> hm i want more than one value per key here though so a
struct is probably more appropriate
22:30 -!- qIIp_ [~qIIp@72-173-157-34.cust.wildblue.net] has quit [Ping timeout:
240 seconds]
22:30 -!- qIIp [~qIIp@72-173-157-34.cust.wildblue.net] has joined #go-nuts
22:31 < napsy> nickaugust: ubuntu 10.10
22:32 < napsy> well I have libc development files installed
22:33 < exch> nickaugust: http://pastebin.com/phzbymda
22:33 -!- qIIp [~qIIp@72-173-157-34.cust.wildblue.net] has quit [Read error:
Connection reset by peer]
22:34 < nickaugust> exch: thanks man
22:34 < nickaugust> napsy: let me look what you need...
22:34 < napsy> ok
22:35 -!- qIIp [~qIIp@72-173-157-34.cust.wildblue.net] has joined #go-nuts
22:36 -!- RobertLJ [~quassel@c-68-44-163-191.hsd1.nj.comcast.net] has quit [Remote
host closed the connection]
22:37 -!- marsu [~marsu@93.15.196.248] has joined #go-nuts
22:38 < napsy> Ok I was missing the 32-bit libc development libraries
22:38 -!- qIIp [~qIIp@72-173-157-34.cust.wildblue.net] has quit [Read error:
Connection reset by peer]
22:38 < napsy> Let's see if the baby compiles
22:47 -!- qIIp [~qIIp@72-173-157-34.cust.wildblue.net] has joined #go-nuts
22:49 < nickaugust> exch: what are you using 8 spaces for tabs?
22:50 < exch> I use tabs
22:50 < exch> 4 spaces
22:51 < Makoryu> A tab is actually 8 spaces
22:52 < nickaugust> two tabs for indentation?  maybe its just showing funny
im looking at it in links2
22:52 < Makoryu> I like how most people don't understand this because
they're used to text editors where it's 4
22:52 < nickaugust> i always use 4 spaces
22:52 < exch> 1 tab for indentation
22:52 < nickaugust> set expandtab set tabstop 4
22:52 < nickaugust> should I use regular tabs instead of soft tabs?
22:52 < Makoryu> Almost all compilers will read a tab as 8 spaces
22:52 < MizardX> :set et ts=4 sw=4
22:53 < nickaugust> MizardX: thx ill try that
22:53 < exch> I ran all my code through gofmt regularly.  It uses 8
spaces/tab by default
22:53 -!- marsu [~marsu@93.15.196.248] has quit [Ping timeout: 252 seconds]
22:53 < exch> *run
22:53 < nickaugust> ive always done 4 spaces and softabes..  i dont know why
really.  oh cool i'll check out gofmt
22:53 -!- sioraiocht [~tomh@unaffiliated/sioraiocht] has joined #go-nuts
22:53 < exch> Gedit makes it 4/tab though.  It's the editor I use usually
22:54 -!- thiago__ [~thiago@189.107.219.157] has quit [Ping timeout: 246 seconds]
22:54 < exch> gofmt is a godsend really.  it makes code formatting
consistent.  Handy if you're about to read some else's work
22:54 < nickaugust> ah see im not even using tabs just spaces
22:56 < nickaugust> ok so i should define the json structure as a struct and
then Unmarshal it..  ok this make sense.
22:57 < nickaugust> thanks alot exch this is what i needed :)
22:57 < exch> np
22:58 < Makoryu> So I keep hearing rumors about generics in Go
22:58 < Makoryu> Anyone know if array, map, etc.  syntax will be changed to
use generic types' syntax?
22:59 < Makoryu> Or will it be a new syntax that differs in awkward and
confusing ways?
22:59 < Makoryu> I sure hope it's the latter
22:59 < Makoryu> That would be awesome
23:01 < exch> Do I detect a hint of sarcasm there?  :p
23:01 -!- Fish [~Fish@9fans.fr] has quit [Remote host closed the connection]
23:02 < nf> Makoryu: "array, map, etc"?  You mean "array and map" ?
23:02 < nf> slices/arrays will stay the same
23:06 < nettok> fixedbugs/bug272.go is crashing on me, but not by the bug
#272
23:07 < Makoryu> nf: Array, map, channel, and function types all have
different syntax
23:07 -!- Wiz126 [~Wiz126@24.229.245.72.res-cmts.sm.ptd.net] has quit [Ping
timeout: 276 seconds]
23:07 < Makoryu> And probably something else I'm forgetting
23:07 -!- marsu [~marsu@93.15.196.248] has joined #go-nuts
23:07 < nf> how are channels and functions related to generics?
23:07 -!- Wiz126 [~Wiz126@24.229.245.72.res-cmts.sm.ptd.net] has joined #go-nuts
23:08 < nf> i can understand the desire to work the existing container types
into a new system of generics
23:08 < nf> but i don't see how the other types are related
23:08 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts
23:09 < nettok> anyone else got problems with bug272.go in latest trunk?
23:11 < exch> nettok: yes
23:12 < nettok> exch: so it's a bug or what?
23:12 < nf> http://godashboard.appspot.com/
23:12 < nf> nettok: looks like it ^
23:12 < nf> failing on 64-bit systems
23:13 < Makoryu> nf: ^ Because all of them are generic types
23:14 < Makoryu> nf: If the generic syntax were foo<bar, baz>, then
you could write them as chan<int> and func<int, string>
23:14 < exch> nettok: yes, apparently something went wrong on one of the
latest releases.  Go will work fine though
23:14 < nf> Makoryu: but that makes no sense for functions, which have
arguments and return values
23:15 < nf> the declaration syntax for slices, channels, and functions will
not change.  of that i am sure
23:15 < nettok> ok
23:15 < Makoryu> nf: What if generic syntax has a special provision for a
return value, like maps sort of do?
23:16 < nf> Makoryu: why would something that works well and is easy to
understand be changed?  what is the benefit?
23:17 -!- sioraiocht [~tomh@unaffiliated/sioraiocht] has quit [Remote host closed
the connection]
23:17 < Makoryu> nf: I'm not asking for anything to be changed.  I sort of
assume that some things will change, and you've answered that.  Now I'm just
offering an explanation for why this question does not have a self-evident answer
23:18 < Makoryu> (I mean, you've answered my original question of which
things might change, and which things probably won't change)
23:18 < nf> Makoryu: okay i was just confused because i don't regard these
things as "generic types" :)
23:19 < Makoryu> nf: Because they're not actual containers?  :p
23:19 < nf> well, yeah!  a function and a channel are most certainly not
containers!
23:20 < Makoryu> But neither is a comparator
23:20 < Makoryu> Er, that is: A comparator is also not a container.
23:21 < nf> i agree
23:21 -!- cco3 [~conley@c-69-181-138-209.hsd1.ca.comcast.net] has joined #go-nuts
23:24 < Makoryu> nf: So a comparator is a valid use of generics, but a
channel is not?
23:27 < nf> what do you mean by comparator?
23:33 -!- marsu [~marsu@93.15.196.248] has quit [Quit: Leaving]
23:40 < napsy> cool gccgo compiled
23:42 -!- photron [~photron@port-92-201-38-67.dynamic.qsc.de] has quit [Ping
timeout: 246 seconds]
23:42 -!- bmizerany [~bmizerany@c-24-6-37-113.hsd1.ca.comcast.net] has joined
#go-nuts
23:46 -!- nf [~nf@203-158-42-150.dyn.iinet.net.au] has quit [Remote host closed
the connection]
23:46 -!- nf [~nf@124-171-30-29.dyn.iinet.net.au] has joined #go-nuts
23:46 < nickaugust> exch: you still around?  i'm gettin this error I cant
figure out what it means http://sprunge.us/hQSA heres my code that I adapted from
your example http://sprunge.us/HDQI
23:47 -!- qIIp [~qIIp@72-173-157-34.cust.wildblue.net] has quit [Quit: Lost
terminal]
23:48 < exch> The struct fields need to be public (Start with capital
letter)
23:49 -!- boscop [~unknown@g226249058.adsl.alicedsl.de] has quit [Quit: See you
later, alligator!]
23:49 < exch> It should return an os.Error instead of a panic() though,
which is a know bug.  http://code.google.com/p/go/issues/detail?id=977
23:49 < exch> if you change the struct fields to have a capital first
letter, it should all work as expected
23:49 < nickaugust> exch: ah gotcha...  the thing is the json fields are not
capitalized so will it still Unmarshal correctly?
23:49 < exch> yes
23:50 < nickaugust> ok thanks again :)
23:51 < nickaugust> sweet!  works
23:51 < exch> cool :)
23:52 < nickaugust> print out as {Land O Lakes Farmland AG [] [{ }]} which
is kinda funky but i can figure out the formatting stuff
23:52 < exch> %+v and %#v will yield more verbose output
23:53 < Makoryu> nf: Sorry about the wait.  "Comparator" is actually a
pretty rare term outside Java and C++ land, where it means "object used for
comparing two values"
23:53 < Makoryu> nf: In Go, it would just be a function, I'm sure
23:53 < Makoryu> That is, a func(T, T) bool for some type T
23:53 < Makoryu> Er
23:54 < Makoryu> Not bool
23:54 < Makoryu> Bluh
23:55 < nickaugust> Makoryu: do you just call a comparator like a function?
what good is that?
23:55 < Makoryu> nickaugust: It's one of those weird OOP design patterns to
compensate for the absence of lambda expressions
23:55 < nickaugust> sounds silly to me :P
23:56 < Makoryu> nickaugust: Yes, this practice is very silly
--- Log closed Mon Aug 02 00:00:05 2010