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

--- Log opened Wed Mar 23 00:00:04 2011
--- Day changed Wed Mar 23 2011
00:00 < steven> i wonder if Go has the potential to overtake Ruby
00:03 < kimelto> do we want to?  :)
00:03 < Namegduf> I suspect it to steal from some areas where C/C++ are
used, like servers which actually perform reasonably, rather than the high level,
lots of features, horrible performance languages, mostly.
00:04 -!- codelurker [~codelurke@c-98-227-187-219.hsd1.il.comcast.net] has quit
[Quit: Leaving]
00:04 < Namegduf> It could grab some of those people who feel like a
language which helps them write good (maintainable, safe, correct, fast) code,
rather than working code, though.
00:04 < |Craig|> Personally go is stealing from my Python coding a bit, as
well as from my desire to learn C++ better
00:05 < Namegduf> It really should replace Java as a fairly performant in
CPU "safe" high level language, with a lot less overhead and annoyance, but Java's
users are OO fanatics.
00:05 < |Craig|> I wish go could replace java, but I only use java for class
projects that require it
00:05 < Namegduf> Me too.
00:06 < str1ngs> I think go has great appeal for ruby and python folks.  it
does for me anyways.
00:06 < |Craig|> Go is like Java without the virtual machine and class trees
that make re-factoring hard (and no generics)
00:06 < str1ngs> ie ruby has alot of abstraction and lacks interfaces
00:06 < Namegduf> And with larger module sizes, so to speak.
00:07 < Namegduf> Packages are bigger units than classes, and cover a
significant block of functionality rather than the smallest definable thing.
00:08 -!- ajstarks [~ajstarks@pool-98-109-198-180.nwrknj.fios.verizon.net] has
joined #go-nuts
00:09 < Namegduf> Oh, and with far nicer syntax and manual error passing
instead of checked exceptions, but both avoid unchecked exceptions.
00:10 < str1ngs> there is another larger factor about Go that I think alot
of people over look.  its how it handles dependancies
00:12 < str1ngs> ruby and python you need to have the depends in system some
where or installed with something.  Go all you need is the static binary
00:15 < kimelto> and that's supposed to be good?
00:15 < str1ngs> yes
00:16 < str1ngs> build on this machine copy to 100 others.
00:16 -!- boscop [~boscop@g227151009.adsl.alicedsl.de] has quit [Ping timeout: 260
00:17 < str1ngs> plus you dont even need go installed on the other machines
00:18 < kimelto> I prefer a libgo.so of 3Mb than 10 binary of 3Mb each :)
00:18 -!- rtharper [~tomh@unaffiliated/sioraiocht] has quit [Read error:
Connection reset by peer]
00:19 < kimelto> ok, disk space is cheap but, eh!
00:19 * MizardX compiles the internet, and puts it on his usb drive.
00:19 -!- rtharper [~tomh@unaffiliated/sioraiocht] has joined #go-nuts
00:19 < str1ngs> libgo.so is nice but are you really hurting for 3mb of
space?..  doubt it
00:20 -!- waqas [~waqas@jaim.at] has left #go-nuts []
00:20 < kimelto> It stange.  I know that space is not an issue, yet it is
not one of my expectation to have such big binaries.
00:20 < kimelto> Im use to tiny bin
00:21 -!- m4dh4tt3r [~Adium@61.sub-69-99-167.myvzw.com] has quit [Ping timeout:
252 seconds]
00:21 < str1ngs> yes but even with space limitation you sometimes pay for
that with large dependcies anyways
00:21 < str1ngs> ie python and ruby even perl.  you can slim them down but
its a cost
00:22 < str1ngs> dynamic linking is overrated imo
00:22 < jessta> kimelto: the issue has been discuseed a lot on the
00:22 < Namegduf> kimelto: While that might be true for stuff from your
distro, for distribution-as-binary purposes, the 3MB is better
00:22 < jessta> go binaries are fairly similar to statically linked C
00:23 < Namegduf> The large size is also due to debugging information
00:23 < str1ngs> better in some retards not all C programs static link
00:24 < Namegduf> It won't be an issue once gccgo can do goroutines
00:24 < Namegduf> I think.
00:24 < str1ngs> I like it personally.  maybe I'm a odd duck
00:24 < kimelto> jessta: I dont even if it is an issue for me.  The
"problem" is that I dont know how I feel about it :)
00:25 < jessta> if go supported dynamic linking it wouldn't be very easy to
use at the moment, the libgo.so would be changing on a weekly basis so you
couldn't expect someone else to have the same version you compiled with
00:26 < str1ngs> libgo.so still wont help you dynamic link packages though
00:26 < Namegduf> It'd be silly to use for distribution purposes
00:26 < str1ngs> it does make for small bins
00:27 < Namegduf> Of course, it increases startup time a bit, so...
00:27 < str1ngs> dependency hell, is the bane of Linux
00:27 < Namegduf> Not really
00:27 < Namegduf> I mean, yeah, if you're using Slackware
00:28 < str1ngs> hehe
00:28 < Namegduf> But if you've left the 90s then it's not a problem,
package managers Just Work nowadays.
00:28 < str1ngs> I guess I havent left the 90s :P
00:29 < str1ngs> rpmfind was most useful
00:30 -!- skelterjohn [~jasmuth@c-68-46-33-145.hsd1.nj.comcast.net] has joined
00:31 < str1ngs> and we dont have to deal with header files yay!
00:32 < skelterjohn> yay!
00:32 -!- artefon [~thiago@] has quit [Quit:
00:32 < str1ngs> see..  can I get a amen!
00:32 < str1ngs> skelterjohn: did you get godoc -path working?
00:33 < skelterjohn> no
00:33 < str1ngs> it does work.  but for me it shows package on the top menu
00:33 < skelterjohn> godoc -path=.  -http=:6060 did not list things from the
00:33 < skelterjohn> oh...
00:33 < skelterjohn> like
00:33 < skelterjohn> ok i gotcha
00:33 < str1ngs> see it now?
00:34 < skelterjohn> no
00:34 < str1ngs> hmm
00:35 < skelterjohn> i do "godoc -path=.  a" in a directory with "a" in it,
and source within
00:35 < skelterjohn> 2011/03/22 20:37:39 open
/Users/jasmuth/Documents/userland/go/src/pkg/a: no such file or directory
00:35 < skelterjohn> etc/go/src/pkg certainly isn't where i'm running it
00:36 < str1ngs> hmm thats strange
00:36 < str1ngs> I see what you mean
00:41 < str1ngs> godoc -http=:8080 -path=.  works for me
00:41 < skelterjohn> trying to set it up so that my IDE will bring up godoc
really easily for you
00:41 < str1ngs> doesnt work for a cmd type packge though
00:41 < str1ngs> what ide?
00:42 < str1ngs> hmm did you make install?
00:43 < str1ngs> yep no need.  still works without make install . is a it a
00:45 < str1ngs> godoc -http=:8080 -path=.  then it lists the package next
to the Packages link
00:48 < str1ngs> skelterjohn: actually been meaning to look at godoc.  I as
thinking it would beuseful to see the return types next to the func signatures
00:49 -!- skelterjohn [~jasmuth@c-68-46-33-145.hsd1.nj.comcast.net] has quit [Read
error: Connection reset by peer]
00:51 -!- skelterjohn [~jasmuth@c-68-46-33-145.hsd1.nj.comcast.net] has joined
00:57 -!- enherit [~enherit@24-176-217-66.dhcp.lnbh.ca.charter.com] has quit
[Quit: Lost terminal]
00:59 -!- iant [~iant@] has quit [Quit: Leaving.]
01:00 -!- saturnfive [~saturnfiv@] has joined #go-nuts
01:06 -!- nettok [~quassel@] has joined #go-nuts
01:09 -!- skelterjohn [~jasmuth@c-68-46-33-145.hsd1.nj.comcast.net] has quit [Read
error: Connection reset by peer]
01:11 -!- skelterjohn [~jasmuth@c-68-46-33-145.hsd1.nj.comcast.net] has joined
01:29 -!- skelterjohn [~jasmuth@c-68-46-33-145.hsd1.nj.comcast.net] has quit [Read
error: Connection reset by peer]
01:31 -!- skelterjohn [~jasmuth@c-68-46-33-145.hsd1.nj.comcast.net] has joined
01:35 -!- niekie [~niek@CAcert/Assurer/niekie] has quit [Read error: Operation
timed out]
01:35 -!- cbeck [cbeck@gateway/shell/pdx.edu/x-pllcmjdcistvcdyt] has quit [Read
error: Connection reset by peer]
01:35 -!- cbeck [cbeck@gateway/shell/pdx.edu/x-fshuyffsydjrqafk] has joined
01:37 -!- niekie [~niek@CAcert/Assurer/niekie] has joined #go-nuts
01:37 -!- larva_ [~larvanitr@ec2-46-51-171-183.eu-west-1.compute.amazonaws.com]
has joined #go-nuts
01:37 -!- larva [~larvanitr@ec2-46-51-171-183.eu-west-1.compute.amazonaws.com] has
quit [Quit: No Ping reply in 180 seconds.]
01:38 -!- skelterjohn [~jasmuth@c-68-46-33-145.hsd1.nj.comcast.net] has quit
[Quit: skelterjohn]
01:40 -!- skelterjohn [~jasmuth@c-68-46-33-145.hsd1.nj.comcast.net] has joined
01:40 < dfr|work> is there a map function for a slice?
01:41 < dfr|work> which returns a slice of applyign the function to each
slice element?
01:41 < skelterjohn> not in the core
01:41 < dfr|work> skelterjohn, argh.  okay.  =/
01:41 < dfr|work> there grows my util package :D
01:42 < skelterjohn> yep :)
01:42 < skelterjohn> a "lists" package, that does map, reduce, fold, and
perhaps concurrent versions thereof, would be neat
01:42 < Namegduf> I don't think you can.
01:42 < skelterjohn> but, honestly, of little utility
01:42 < Namegduf> It'd have to be a built-in
01:42 < dfr|work> skelterjohn, i come from ruby world, and would love that.
01:42 < Namegduf> You'd need generics to write it
01:43 < skelterjohn> oh, there is that
01:43 < dfr|work> Namegduf, yea, I think I'm getting into that right now,
01:43 < skelterjohn> i did a package that does this, using interface{}s
01:43 < Namegduf> Well, or interface{} parameters and happy fun
un-compile-time-checked reflection
01:43 < dfr|work> Namegduf, as in I just realized that would need generics
to make it generic
01:43 < skelterjohn> more of an experiment than something that was actually
supposed to be useful
01:43 < dfr|work> Namegduf, there's no reflection, huh?
01:43 < skelterjohn> there is reflection...
01:44 < dfr|work> err, i guess there is...
01:44 < skelterjohn> import "reflect" :)
01:44 < Namegduf> There's reflection, it isn't compile time checked because
it examines type information at runtime instead.
01:44 < dfr|work> Namegduf, tbh, I'm not a great fan of compile-time checks.
But I generally keep quiet to avoid heat ;)
01:45 < dfr|work> but whatever, I guess i'll figure it out >.<
01:45 < skelterjohn> i like type safety
01:45 < skelterjohn> helps me not forget what's going on
01:46 < skelterjohn> when i do stuff in a dynamic-typed language, i find
myself having to be very descriptive with variable names
01:46 < skelterjohn> basically including the type
01:46 < plexdev> http://is.gd/3ykqjR by [Ken Thompson] in
go/src/pkg/runtime/ -- chan: allocate a new chan with one
01:47 < str1ngs> hmm exec.Run think it would be possible to pass *Cmd up one
call chain . then read the pipe or could I miss some pipe info that way?  trying
to make exec more generic
01:47 < dfr|work> skelterjohn, it's really a paradigm change, I think.  TDD
tends to fix issues with being worried about types.
01:48 < Namegduf> I'm not sure how you can not be a fan of static analysis
checks, they improve safety and catch whole classes of errors early with almost no
inherent cost; you need an infrastructure that does them but the compiler kind
tend to be cheaper anyway.
01:48 < Namegduf> *that kind of compiler tends
01:48 < skelterjohn> what is TDD
01:48 < Namegduf> Test driven development
01:48 < Namegduf> Define what your code needs to do through tests written
for it
01:48 < skelterjohn> zzz
01:49 < skelterjohn> i write tests once everything is working
01:49 < str1ngs> tests are good for packages
01:49 < dfr|work> skelterjohn, and I tend to spec out what I need to write
before I write it.  ;)
01:49 < Namegduf> A fan of the waterfall methodology?  :P
01:49 < dfr|work> Namegduf, no.  You do it bit by bit.
01:49 < skelterjohn> i find the most value from testing to be making sure
you don't break things by changing things later
01:50 < dfr|work> anyhow.  I'm not particularly interested in fighting an
uphill battle.  ;) Just saying that the fact that reflection does runtime checks
doesn't upset me one bit ;)
01:50 < skelterjohn> it's only when it's something i wrote a while before
that it's sufficiently out of my head for me to not be able to easily debug
01:51 < Namegduf> TDD at most makes compile-time checks less helpful, not
bad, anyways
01:51 < dfr|work> Namegduf, yea.  I don't have a problem with compile-time
checks per se.  It's more that I'm missign duck typing and stuff, which tend to be
against compile-time checks.
01:52 < Namegduf> Go's interfaces behave as if duck typed.
01:52 < Namegduf> Expect one of those.
01:52 < Namegduf> They're *also* compile time checked
01:52 < dfr|work> Namegduf, yep, and that's something I'm definitely
enjoying.  However, it's hard to specify interface as a parameter to a method call
or whatever.  =/
01:52 < dfr|work> which would be, effectively, generics
01:53 < Namegduf> If you mean you can't have a type whose method's required
interface is determined at instantiation, then yes.
01:53 < Namegduf> Obviously, you can take an interface parameter in a method
as anywhere else, it's just fixed.
01:53 < dfr|work> Namegduf, either way.  I think this discussion is a bit
premature as I have no good understanding as to what exactly I want.  ;)
01:53 < Namegduf> Heh, okay.
01:54 < dfr|work> :)
01:58 -!- skelterjohn [~jasmuth@c-68-46-33-145.hsd1.nj.comcast.net] has quit [Read
error: Connection reset by peer]
02:00 -!- skelterjohn [~jasmuth@c-68-46-33-145.hsd1.nj.comcast.net] has joined
02:05 -!- littlebobby [~bob@unaffiliated/littlebobby] has joined #go-nuts
02:13 -!- adu [~ajr@softbank220043138128.bbtec.net] has joined #go-nuts
02:15 -!- tensorpudding [~user@] has quit [Remote host closed the
02:17 < steven> why doesnt someone just fork Go and add generics already?  i
mean it is OSS after all
02:18 < steven> Gonerics :)
02:18 -!- skelterjohn [~jasmuth@c-68-46-33-145.hsd1.nj.comcast.net] has quit [Read
error: Connection reset by peer]
02:19 -!- littlebobby [~bob@unaffiliated/littlebobby] has quit [Quit: Ex-Chat]
02:19 < Namegduf> People have written preprocessors for them.
02:19 -!- littlebobby [~bob@unaffiliated/littlebobby] has joined #go-nuts
02:20 -!- skelterjohn [~jasmuth@c-68-46-33-145.hsd1.nj.comcast.net] has joined
02:20 < dfr|work> steven, do it!  :P
02:23 < dforsyth> this weekend i ean into my first situation where i wanted
02:23 < dforsyth> then i realized i didnt need them and that was that
02:25 < str1ngs> dforsyth: did you get my link on how getting current
function name?
02:25 < dforsyth> str1ngs: yes, thank you
02:26 < jessta> steven: if it was that easy, then someone would have doneit
02:26 -!- shvntr [~shvntr@] has joined #go-nuts
02:26 < str1ngs> dforsyth: ok , but I guess you noticed that it doesnt work
to well if the call list is long
02:28 < dforsyth> yeah i tried it in somethings and got some weird results
with a long call list
02:28 < dforsyth> its no biggy
02:28 < dforsyth> i dont actually *need* the functionality
02:28 < dforsyth> i was just curious in the moment
02:29 < str1ngs> you can adjust in some but ya long list gets strange.  and
goroutine probably be messy :P
02:32 -!- slashus2 [~slashus2@74-141-110-130.dhcp.insightbb.com] has joined
02:33 -!- adu [~ajr@softbank220043138128.bbtec.net] has quit [Quit: adu]
02:38 -!- skelterjohn [~jasmuth@c-68-46-33-145.hsd1.nj.comcast.net] has quit [Read
error: Connection reset by peer]
02:40 -!- skelterjohn [~jasmuth@c-68-46-33-145.hsd1.nj.comcast.net] has joined
02:40 < dfr|work> mhmm...  I'm somewhat confused about interfaces......
02:40 < dfr|work> so by default, when I'm creating a method for a type, I
should generally do func (foo *foo) bar() correct?
02:40 < dfr|work> so pass pointer to Foo?
02:40 < dfr|work> s/\*foo/*Foo
02:41 < dfr|work> 'cause otherwise it will copy the struct?
02:42 < skelterjohn> if you don't want it to copy the struct, use a pointer,
02:43 < dfr|work> skelterjohn, okay, that's what I thought..  in that case,
lemme pastie the issue I'm running into
02:43 < skelterjohn> there are certainly times where it makes sense to use a
value rather than a pointer
02:43 < skelterjohn> for instance, if you have a slice type or a map type
02:43 -!- stalled [~stalled@unaffiliated/stalled] has quit [Read error: Connection
reset by peer]
02:45 -!- kpumuk [~kpumuk@69-165-246-181.cable.teksavvy.com] has joined #go-nuts
02:45 < dfr|work> skelterjohn, right, but I do want a pointer..  I'm
compiling a pastie of the issue I'm getting with interfaces
02:46 < dfr|work> but the jist is: I have a Listener interface {
onEvent(event string) }
02:46 < dfr|work> but then if I create a type with func (l *FooListener)
onEvent(str string) <- that doesn't implement that interface =/
02:46 < str1ngs> dfr|work: all attached method's use pointer to the type
02:47 < dfr|work> str1ngs, so in that sense func (f *Foo) and func (f Foo)
are identical?  or not?
02:47 < skelterjohn> dfr|work: FooListener does not implement Listener
02:47 < skelterjohn> but *FooListener does
02:48 < skelterjohn> a *FooListener also has FooListener methods
02:48 < skelterjohn> but not the other way around
02:48 < dfr|work> skelterjohn, oh, that makes a lot of sense.
02:48 -!- olegfink [~olegfink@ppp92-100-71-138.pppoe.avangarddsl.ru] has quit
[Read error: Operation timed out]
02:48 < str1ngs> dfr|work: no.  func (f *foo) bar() f is always a pointer
02:49 < dfr|work> skelterjohn, however, when suppose I call
(*fooListener).onEvent("asdf") will that cause a new struct to be created?
02:49 < skelterjohn> good question
02:49 < skelterjohn> don't kno
02:49 < skelterjohn> e
02:49 < skelterjohn> w
02:50 < dfr|work> skelterjohn, 'cause I don't really want it to...=/
02:50 < str1ngs> dfr|work: you may want &fooListner{}.onEvent(asdf")
02:50 -!- kpumuk_ [~kpumuk@69-165-246-181.cable.teksavvy.com] has left #go-nuts []
02:50 < skelterjohn> having a "func (x X) foo()" in go is kind of like
having a "foo(X x)" in C
02:51 < skelterjohn> dfr|work: if you don't want onEvent to copy the
FooListener, then don't have it on a non pointer type
02:51 < skelterjohn> define it only for the pointer type
02:51 -!- kpumuk [~kpumuk@69-165-246-181.cable.teksavvy.com] has joined #go-nuts
02:51 < dfr|work> skelterjohn, right, but I still want to use a Listener
02:51 < skelterjohn> so have *FooListener implement the interface
02:51 < skelterjohn> you can pass *FooListeners around
02:53 < str1ngs> dfr|work: you are thinking to object oriented.
02:53 < str1ngs> dfr|work: it much easier then that..  but easier if you
pastebin some code
02:54 < dfr|work> str1ngs, yea, I'm trying to make sure something close to
working in the playground
02:55 -!- kpumuk [~kpumuk@69-165-246-181.cable.teksavvy.com] has left #go-nuts []
02:55 < str1ngs> often times you will find that it doesnt hurt to have the
struct anyways.  if you need to call a method or for an interface
02:56 < dfr|work> str1ngs, this is roughly what I want:
02:56 < str1ngs> https://gist.github.com/882539 here is something like what
I think you are trying to do
02:57 < dfr|work> str1ngs, huh?  I think that gist is a bit outdated =/
02:57 < skelterjohn> you don't want to subscribe(*Listener)
02:57 < dfr|work> skelterjohn, then what do I want?
02:57 < skelterjohn> using a pointer to an interface is very rarely what you
want to do
02:58 < skelterjohn> subscribe(Listener)
02:58 < dfr|work> skelterjohn, okay, that's fine.  As long the instance
passed is not copied
02:58 < dfr|work> but I still get the issue, i think
02:58 < skelterjohn> what's the issue, again?
02:59 < dfr|work> oh wait, i guess that worked.
02:59 < dfr|work> now lemme try to understand what's going on :))
03:00 < str1ngs> dfr|work: its not outdated just wasnt what I though you
were trying to do :P
03:01 < dfr|work> str1ngs, ah, okay :)))
03:01 < dfr|work> alrighty, I think I get the idea...  because
&testListener{} is of *testListener type, so it has onEvent method directly...
03:01 < str1ngs> dfr|work: I thought you were just trying to call a method
with out creating the struct
03:01 < skelterjohn> dfr|work: right
03:02 < dfr|work> skelterjohn, either way, it works, so it's all good.  :)
03:02 < dfr|work> thanks for help guys, really appreciate it :)
03:03 < skelterjohn> pleasure
03:03 -!- olegfink [~olegfink@ppp92-100-95-30.pppoe.avangarddsl.ru] has joined
03:05 < skelterjohn> anyone want to check out the beginnings of an IDE i'm
working on?
03:07 < |Craig|> what does it use for a GUI?
03:07 < skelterjohn> web browser
03:07 < skelterjohn> runs a server
03:07 < skelterjohn> html/js for the gui
03:08 < skelterjohn> so it's portable
03:08 -!- adu [~ajr@softbank220043138128.bbtec.net] has joined #go-nuts
03:08 < |Craig|> so its that project.  I remember about that
03:08 < |Craig|> sounds like an interesting idea
03:08 < skelterjohn> i've made some progress
03:08 < skelterjohn> want to check it out?  feedback would be appreciated
03:09 < exch> works a treat :)
http://img.jteeuwen.nl/var/albums/Misc/mpwc-1442197337.png MPD client, also in
03:09 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has joined #go-nuts
03:09 -!- mode/#go-nuts [+v iant] by ChanServ
03:09 < |Craig|> can I use a remote server and compile/run on it and pipe it
out to my web UI for seamless Go coding from my ipod?  (Not that I would ever
bother, just wondering)
03:09 < exch> skelterjohn: i'll check it out
03:09 < skelterjohn> |Craig|: um, i have no idea
03:09 < skelterjohn> but if you allow remote connections to your machine,
anyone can edit your stuff
03:09 < skelterjohn> no security yet
03:10 < skelterjohn> ok exch first you need to install gb O:-) it's based
around the services gb provides
03:10 < skelterjohn> not just building, but identifying packages, etc
03:10 < exch> ah :)
03:10 < skelterjohn> the project is github.com/skelterjohn/gbide
03:10 < skelterjohn> "gee bee eyed"
03:11 -!- kpumuk [~kpumuk@69-165-246-181.cable.teksavvy.com] has joined #go-nuts
03:12 < |Craig|> skelterjohn: sounds like a neat project, perhaps I'll check
it out when I move to using gb
03:12 < str1ngs> skelterjohn: whats wrong with make files :(
03:12 < skelterjohn> str1ngs: why should i bother writing makefiles when the
information is already there?
03:13 < skelterjohn> also, the standard makefiles didn't really work for
multi-package projects
03:13 < skelterjohn> and i had a 20-odd package project (still do) and it
was a huge pain to build
03:13 < skelterjohn> so i wrote gb in order to not go insane
03:13 < |Craig|> I wrote a make file that builds all sub packages using
their make files, which you can duplicate into your packages, but its a horrible
hack and mess....
03:13 < skelterjohn> gb -M creates makefiles
03:13 < skelterjohn> that do incremental building :)
03:14 < skelterjohn> they follow the general template for normal go
projects, but with extra stuff.  not hacky at all.
03:15 < skelterjohn> exch: you seem to be way better at html/js than I am
03:15 < exch> trial and error :p
03:15 < exch> I stick to webkit (chromium)
03:16 < exch> once im done, I try to make it work in Firefox, but if it
takes too much hackery, I wont shed any tears over it
03:16 < skelterjohn> yeah
03:16 < skelterjohn> i'm just doing chrome, too
03:16 < skelterjohn> i figure anyone who is writing go code probably doesn't
hate google enough to avoid chrome
03:17 < skelterjohn> btw - did the gb dependence turn you off of checking
out gbide, or are you still doing that?
03:17 < exch> for me it's javascript engine.  V8 is still far more powerful
than anything FF can do
03:18 < exch> I'm checking it out atm
03:18 < str1ngs> skelterjohn: honestly be easier if the build script just
ran goinstall.  easier to read then the generated stuff from gb
03:18 < skelterjohn> cool
03:18 < str1ngs> I know the effect is the same
03:18 < skelterjohn> no, it isn't
03:18 < skelterjohn> goinstall doesn't do what gb does, not by half
03:19 < skelterjohn> gb uses goinstall in some places
03:19 < skelterjohn> to download remote packages
03:20 < str1ngs> Iam going to check your ide out.  just kinda talking at the
same time
03:20 < |Craig|> go install has an issue: it installs your packages.
Suppose I have a lot of local packages I don't want globally installed
03:20 < skelterjohn> goinstall won't have that issue for much longer
03:20 < skelterjohn> i don't really like the solution that is going to be
used, though
03:22 < |Craig|> regardless, installing all the local packages just to build
a project is silly, and using the provided make files, it seemed like thats what I
03:22 -!- MizardX [MizardX@unaffiliated/mizardx] has quit [Quit: blink~ really~
03:22 < str1ngs> skelterjohn: ok so I see your method here.  I dont care as
long as I dont have to install gb.  so this makes more sense
03:22 -!- keithcascio [~keithcasc@nat/google/x-jugdexvwzyyiipcv] has quit [Quit:
03:23 < skelterjohn> to use gbide you have to install gb.  in theory i could
change that, though
03:23 < skelterjohn> just nuke it once you're done testing
03:23 < skelterjohn> "make nuke" will remove all traces
03:23 < skelterjohn> on the other hand, you might find it useful :)
03:23 < str1ngs> no thats fine its your ide make sense to use a build system
you can work with
03:23 < exch> mm also requires two external dependencies.  I cant get web.go
to build though.  Looks like it's missing some updates for recent go changes
03:24 < skelterjohn> oh yeah - i had to revert to weekly to deal with that
03:24 < skelterjohn> instead of tip
03:24 < skelterjohn> so maybe tonight isn't a good night for sharing
03:24 < str1ngs> web.go has api bug some one should fix and do pull request
03:24 < skelterjohn> i filed an issue
03:24 < skelterjohn> i don't know how to fix it, though
03:24 < skelterjohn> it's stuff with cookies
03:24 < str1ngs> pulls are better I find.  if you have the time
03:24 < str1ngs> ah ok fair enough
03:24 < exch> the recent changes to http package have not been fixed in it
03:25 -!- j3parker [j3parker@artificial-flavours.csclub.uwaterloo.ca] has quit
[Ping timeout: 250 seconds]
03:25 -!- j3parker [j3parker@artificial-flavours.csclub.uwaterloo.ca] has joined
03:25 < skelterjohn> exch: what's the other external dep it has?
03:26 < skelterjohn> i thought it was just web.gpo
03:26 < skelterjohn> web.go
03:26 < exch> gonicetrace.googlecode.com/hg/nicetrace
03:26 < skelterjohn> oh yeah
03:27 -!- nettok [~quassel@] has quit [Ping timeout: 260 seconds]
03:28 < skelterjohn> removed that dep, fwiw
03:28 < steven> whats the rule about when type conversions are implicit and
when they must be explicit?
03:29 < skelterjohn> only interfaces get implicit typing
03:29 < skelterjohn> "duck typing"
03:29 < dfr|work> dfc, ping
03:29 < str1ngs> skelterjohn: hmm build doent work what version of bash are
you using?
03:29 < skelterjohn> oh - don't use that build script
03:29 < skelterjohn> use gb :)
03:29 < skelterjohn> i haven't updated the build script
03:29 < str1ngs> ok fair enough
03:30 < steven> skelterjohn: but interfaces always get them?
03:30 < skelterjohn> you never need to convert something to an interface
03:30 < skelterjohn> it either satisfies the interface, or it doesn't
03:30 < steven> i was writing a function param and thinknig "hmm it would be
cool if i could shorten this function signature by using a type, like i would with
a typedef in C"
03:31 < skelterjohn> doesn't work the same as with C
03:31 < steven> then i realized they would have to cast their function (or
func literal) to my type in order to pass it to my function where that new type
wwas expected.
03:31 < steven> which would suck worse.
03:31 < steven> right
03:31 < skelterjohn> also, the new type wouldn't have any of the methods
defined for the old type
03:31 < str1ngs> skelterjohn: now if you tell me to use gb to install gb I'm
going to lose it :P
03:31 < steven> i know they're different types, i was just hoping maybe
there was implicit type convrsion
03:31 < skelterjohn> it's best to just not think of it the same as you would
with typedef in c
03:32 < skelterjohn> str1ngs: gb comes with a makefile :)
03:32 < steven> also, are ALL of the built-in-type's interfaces all entirely
03:32 < steven> ie func, map, string, int, etc
03:32 < skelterjohn> the question as phrased doesn't make sense
03:32 < steven> do ALL of them have empty interfaces, ie 0 methods?
03:32 < skelterjohn> but, those types have no methods defined for them
03:32 < steven> ok
03:32 < steven> that makes sense.
03:32 < skelterjohn> a way to say that would be, the only interface they
satisfy is interface{}
03:32 < steven> you sure?
03:33 < steven> right.
03:33 < skelterjohn> not 100% but pretty sure
03:33 < skelterjohn> it's difficult to be sure of a negation
03:33 < skelterjohn> the lack of existence
03:34 < steven> right.
03:34 < steven> btw, are these two statements equal?  "var DefaultLoop
IOLoop" and "var DefaultLoop IOLoop = IOLoop{}"
03:34 < plexdev> http://is.gd/sgvqZp by [Andrew Gerrand] in go/src/pkg/sync/
-- sync: fix example code
03:34 < plexdev> http://is.gd/vPGGDZ by [David Symonds] in
go/misc/vim/syntax/ -- misc/vim: remove 'closed' as a builtin function.
03:34 < skelterjohn> steven: yes
03:34 < steven> i believe they are because i believe they both create
zero-values for that type
03:34 < steven> sweet.
03:34 < steven> skelterjohn: you're teaching me way much
03:34 < steven> thanks <3
03:34 < steven> god be with you brother
03:34 < skelterjohn> heh
03:35 < skelterjohn> no worries
03:35 < steven> im practicing my SOLID principles by writing an irc bot in
03:35 < skelterjohn> str1ngs: for what it's worth, I *do* build gb with gb.
03:35 < steven> waaaay clear than when i did it in ruby
03:37 < str1ngs> skelterjohn: also should gb alone build this?  or gb -g?
03:37 < skelterjohn> gb -g if you don't have web.go already installed
03:37 < skelterjohn> from then on, just gb
03:37 < skelterjohn> gb -G if you need to update your installation of web.go
03:38 < str1ngs> ok now to fix web.go
03:38 < steven> hmm im confused
03:39 < steven> if you pass in a struct by-value, making changes to its
members is transient and those changes are discarded after the function call
because it was just a copy of that struct, right?
03:40 < skelterjohn> yes
03:40 < steven> is that the reason we make methods on pointers to
struct-types rather than just the type itself?
03:40 < skelterjohn> that and memory efficiency
03:40 < skelterjohn> but mostly what you said
03:40 < steven> (since the "receiver" is semantically exactly the same as a
normal argument)
03:40 < dfr|work> skelterjohn, str1ngs: in case you guys are curious of what
I wound up doing with the stuff I bugged you about:
https://github.com/ratnikov/go-xmpp/blob/master/events.go (and documentation:
03:41 < skelterjohn> steven: right, that's the way I think about it.  I just
pretend it's a normal function with the first parameter as the receiver
03:42 < steven> right on
03:42 < steven> <3
03:43 < skelterjohn> bed time
03:43 < dfr|work> skelterjohn, +1
03:44 -!- Natch [~natch@c-6dcde155.25-4-64736c10.cust.bredbandsbolaget.se] has
joined #go-nuts
03:46 < str1ngs> IR still figuring out if http.Cookies Version was removed
or changed
03:47 -!- olegfink [~olegfink@ppp92-100-95-30.pppoe.avangarddsl.ru] has quit [Ping
timeout: 240 seconds]
03:47 -!- Natch| [~natch@c-6dcde155.25-4-64736c10.cust.bredbandsbolaget.se] has
quit [Ping timeout: 264 seconds]
03:57 -!- codelurker [~codelurke@c-98-227-187-219.hsd1.il.comcast.net] has joined
03:58 -!- ajstarks [~ajstarks@pool-98-109-198-180.nwrknj.fios.verizon.net] has
left #go-nuts []
03:59 -!- Zoopee [alsbergt@zoopee.org] has quit [Ping timeout: 264 seconds]
04:00 -!- codelurker [~codelurke@c-98-227-187-219.hsd1.il.comcast.net] has quit
[Client Quit]
04:02 < steven> SNAP!
04:02 < steven> i cant declare a method on an interface type.
04:02 < steven> i forgot
04:02 < steven> ok, so is there a type i can use thats basically nothing, ie
04:03 < str1ngs> interface{}
04:03 -!- olegfink [~olegfink@ppp92-100-111-96.pppoe.avangarddsl.ru] has joined
04:03 < str1ngs> or nil
04:03 < steven> well i have this type, 'NoopEventHandler'
04:03 < steven> which i want to define a set of no-op methods on
04:03 < str1ngs> my guess is you want interface{}
04:04 < steven> that wont work.  you cant define methods on interface types.
04:04 < steven> i guess what im trying to do isnt very conventional Go..
04:04 < str1ngs> anything is of interface{}
04:05 < steven> im trying to implement an interface with "optional"
04:05 < str1ngs> define optional
04:05 < steven> you dont have to implement all (or any) of the methods in
the interface in order to satisfy it
04:06 < steven> my plan is to use struct composition to accomplish this..
ie, type MyHandler struct { NoopEventHandler }
04:06 < str1ngs> ok then you need to do some checking then
04:06 < steven> suddenly, MyHandler implements every single one
04:06 < steven> and if it wants, it can redefine any of them itself.
04:07 < str1ngs> I do not use interfaces much.  but if you want to pass
something around and you know it will have something then just use interface{}
04:07 < steven> that bypasses compile-time checking though
04:08 < steven> id like to keep my safety net in place
04:08 < steven> (and avoid using reflect)
04:08 < str1ngs> ie func foo(a interface{}) can take anything
04:08 < str1ngs> right
04:08 < str1ngs> I agree not the best way
04:08 < steven> this way seems to work fine..  but i have to define
NoopEventHandler as being some kind of type
04:08 < steven> and there is no "default" type
04:09 < steven> and since it does nothing, it doesnt matter.  so i was
hoping for void or something, but they dont exist
04:09 < steven> so i have to define it as int or string or bool or
something, which feels weird.
04:09 < str1ngs> I try to avoid interfaces when I can I dont use them enough
to be helpful I think
04:10 < steven> ok thanks
04:10 < str1ngs> NoopEvenHandler is a method or a field?
04:11 < |Craig|> whats it mean what I often get "resource temporarily
unavailable" when first trying to read from my new (incoming) tcp connection?  Do
I need to wait for it to be ready somehow?
04:12 < steven> NoopEventHandler is a type.
04:12 < steven> its a type that has several methods (no-ops) defined on it.
thats the only reason it exists.
04:12 < str1ngs> ah so your embedding it?
04:13 < steven> so it can be composited into another type, a struct type
04:13 < steven> so its methods will be available on my struct type
04:13 < steven> yes
04:13 < str1ngs> ok that make sense
04:13 -!- rejb [~rejb@unaffiliated/rejb] has quit [Ping timeout: 246 seconds]
04:13 < steven> kind of like poor-man's inheritance
04:13 < str1ngs> ya ya
04:13 < steven> i feel a bit yucky doing inheritance in a non-inheritant
04:14 < str1ngs> umm only if you are use to OO
04:14 < steven> and i also feel yucky because im using it to implement
"optional" methods in an interface
04:14 -!- shvntr [~shvntr@] has quit [Quit: leaving]
04:15 < str1ngs> I have something like that but I didnt use interfaces.I
used a struct.  some structs have the mothod some dont.  so I just did a if != nil
on them.  but that might be bad lol
04:16 < str1ngs> but I dont think this will help you
04:17 < jessta> steven: you really shouldn't do that
04:17 < jessta> steven: just make more interfaces
04:18 < jessta> you shouldn't have optional methods
04:19 < jessta> https://github.com/jessta/rest.go/blob/master/server.go
04:20 -!- tensai_cirno [~cirno@] has quit [Quit: Leaving]
04:23 < uriel> hummmmm...
04:23 < uriel>
04:26 < steven> just thought of a nice Go feature:
04:26 < uriel> getting ready for Apr 1st perhaps ;)
04:27 < steven> when constructing a new struct literal, you should be able
to omit the type of a literal within it, as Go should be able to figure out its
type from your usage
04:28 < steven> ie, type Foo struct { Bars []something }; Foo{ { smthn1,
smth1 } } // this should suffice rather than Foo { []something{ smthn1, smthn2 } }
04:29 < steven> Go already does this with 2-d arrays, why not struct
04:31 < str1ngs> no
04:31 < uriel> steven: I'm pretty sure this has come up in the mailinglist
04:31 < steven> jessta: how would you do an irc-event-handler then, where a
single handler may handle several events?
04:31 < steven> uriel: ah
04:31 < steven> str1ngs: ok
04:31 < steven> uriel: whoa.  generics?
04:31 < steven> they serious?
04:32 < str1ngs> steven: I guess what I mean is if you do stuff like to much
you have to back step to much to find what a type is
04:32 < uriel> steven: I have no idea, as I said, probably preparing for Apr
1st ;P
04:33 < str1ngs> steven: mind you I missed the double curls so that makes
more sence
04:33 -!- slashus2 [~slashus2@74-141-110-130.dhcp.insightbb.com] has quit [Quit:
04:35 < steven> i hope not uriel
04:38 -!- slashus2 [~slashus2@74-141-110-130.dhcp.insightbb.com] has joined
04:38 -!- slashus2 [~slashus2@74-141-110-130.dhcp.insightbb.com] has quit [Client
04:40 < steven> type coercion seems useless, i dont get it.
04:40 < steven> it seems no different than type assertion?
04:42 < KirkMcDonald> Coercion?  Do you mean conversion?
04:42 < steven> no.
04:43 < steven>
04:44 < steven> the fun part of that document is generics :)
04:46 -!- shvntr [~shvntr@] has joined #go-nuts
05:16 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
05:16 -!- Zoopee [alsbergt@zoopee.org] has joined #go-nuts
05:18 -!- arvindht_ [c2ed8e11@gateway/web/freenode/ip.] has joined
05:18 -!- zozoR [~Morten@56344966.rev.stofanet.dk] has joined #go-nuts
05:30 -!- zozoR [~Morten@56344966.rev.stofanet.dk] has quit [Remote host closed
the connection]
05:34 -!- zozoR [~Morten@56344966.rev.stofanet.dk] has joined #go-nuts
05:37 < plexdev> http://is.gd/7QOT95 by [Anthony Starks] in go/misc/bbedit/
-- misc/bbedit: remove closed keyword
05:41 < zozoR> how do you check if channel is closed then?
05:44 < KirkMcDonald> closed()
05:45 < djbrown> closed was removed wasnt it?
05:45 < KirkMcDonald> Was it?
05:45 < KirkMcDonald> I admit I haven't been following development that
05:45 < KirkMcDonald> It's still in the spec, at least.
05:45 < zozoR> would be weird to remove the keyword from the editors if it
still was in effect :o
05:46 < KirkMcDonald> Technically it is not a keyword.
05:46 < djbrown> it was removed in the last weekly
05:47 < KirkMcDonald> To be replaced with what?
05:47 < djbrown> v, ok := <-ch if !ok { }
05:48 < KirkMcDonald> Ah.
06:13 -!- TheSeeker [~n@99-153-250-110.lightspeed.irvnca.sbcglobal.net] has quit
[Ping timeout: 252 seconds]
06:13 -!- sav [~lsd@peirce.xored.org] has quit [Remote host closed the connection]
06:14 -!- sav [~lsd@peirce.xored.org] has joined #go-nuts
06:14 -!- TheSeeker [~n@99-153-250-110.lightspeed.irvnca.sbcglobal.net] has joined
06:15 -!- tensorpudding [~user@] has joined #go-nuts
06:17 -!- zozoR [~Morten@56344966.rev.stofanet.dk] has quit [Remote host closed
the connection]
06:23 -!- TMKCodes [~TMKCodes@unaffiliated/tmkcodes] has quit [Ping timeout: 276
06:27 -!- itrekkie [~itrekkie@ip72-201-208-165.ph.ph.cox.net] has quit [Quit:
06:33 -!- dfc [~dfc@sydfibre2.atlassian.com] has quit [Ping timeout: 255 seconds]
06:37 -!- tensai_cirno [~cirno@] has joined #go-nuts
06:39 -!- Project_2501 [~Marvin@] has joined #go-nuts
06:43 -!- rlab [~Miranda@] has joined #go-nuts
06:59 -!- kingfishr [~kingfishr@c-98-207-87-183.hsd1.ca.comcast.net] has quit
[Remote host closed the connection]
07:02 -!- GeoBSD [~geobsd@lns-bzn-38-82-253-118-161.adsl.proxad.net] has joined
07:15 -!- rtharper [~tomh@unaffiliated/sioraiocht] has quit [Remote host closed
the connection]
07:16 -!- rtharper [~tomh@unaffiliated/sioraiocht] has joined #go-nuts
07:24 -!- waqas [~waqas@jaim.at] has joined #go-nuts
07:31 -!- ExtraSpice [XtraSpice@] has joined #go-nuts
07:32 < uriel> if you find yourself wanting to check if a channel is closed,
you should first of all make sure you know what you are doing, this should be less
common than most people think
07:32 -!- unofficialmvp [~dev@94-62-164-227.b.ipv4ilink.net] has joined #go-nuts
07:32 -!- unofficialmvp [~dev@94-62-164-227.b.ipv4ilink.net] has left #go-nuts []
07:34 < waqas> Is there any idiom for testing object equality?  A standard
interface defining Equals() or Compare() perhaps?
07:35 < taruti> no
07:35 -!- tensai_cirno [~cirno@] has quit [Quit: Leaving]
07:36 < Namegduf> Pointer comparison does the job in most cases.
07:41 < waqas> I don't think that's feasible when separate objects are being
constructed with different source data
07:48 < jessta> waqas: the problem is that the interface would have to have
the method Equals(interface{})
07:49 < waqas> jessta: Yeah, I realize that.  Currently trying to figure out
a nice way to map the object to a string.
07:50 < jessta> how about a String() method
07:51 < waqas> One complication is I wanted some properties of the object to
not be used in the comparison
07:52 -!- rlab [~Miranda@] has quit [Read error: Connection reset by
07:55 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has joined #go-nuts
08:04 -!- piranha [~piranha@5ED42E59.cm-7-5a.dynamic.ziggo.nl] has joined #go-nuts
08:04 -!- skejoe [~skejoe@] has joined #go-nuts
08:05 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
08:05 -!- ronnyy [~quassel@p4FF1C687.dip0.t-ipconnect.de] has joined #go-nuts
08:06 -!- tvw [~tv@e176008068.adsl.alicedsl.de] has joined #go-nuts
08:07 < dforsyth> waqas: reflect.DeepEqual()?
08:10 < waqas> That has an interesting implementation
08:11 < Namegduf> I'm not sure your problem is best expressed through the
word "equality" when you're comparing different struct layouts for equality and
they can be equal.
08:11 < Namegduf> But you'll need a custom thing for it, definitely, yeah.
08:12 < Namegduf> I wouldn't use String() for that because String() is
normally a generic string representation, useful for passing as an os.Error and
08:12 < waqas> Namegduf: Possibly, yeah (though there isn't a non-custom
thing, is there?)
08:12 -!- wrtp [~rog@] has joined #go-nuts
08:12 < Namegduf> No.
08:14 < Namegduf> Struct equality in general is hard to provide a simple
right generic answer for, and Go favours no answer over a complicated or wrong
08:14 < Namegduf> Or, rather, a "programmer solves their problem in the
right way for them themselves" answer.
08:15 < Namegduf> What're you actually trying to do?
08:15 < waqas> Interesting, I see the connection with maps not allowing
structs as keys
08:15 < Namegduf> Yes.
08:15 < Namegduf> Pointers work, though.
08:15 < Namegduf> Maps do only let things which have equality defined be
08:18 < Namegduf> http://programming-motherfucker.com/ <- Of interest to
this channel?
08:19 -!- rtharper [~tomh@unaffiliated/sioraiocht] has quit [Remote host closed
the connection]
08:19 < waqas> That made it to the top of HN, but then got killed.
08:23 -!- thomas_b [~thomasb@cm-] has quit [Ping
timeout: 255 seconds]
08:24 -!- tensorpudding [~user@] has quit [Remote host closed the
08:24 -!- thomas_b [~thomasb@cm-] has joined #go-nuts
08:30 < olegfink> adg: the one that lists return variables
08:43 -!- tvw [~tv@e176008068.adsl.alicedsl.de] has quit [Remote host closed the
08:54 -!- viirya [~viirya@cml506-25.csie.ntu.edu.tw] has quit [Ping timeout: 255
08:54 -!- viirya [~viirya@cml506-25.csie.ntu.edu.tw] has joined #go-nuts
09:02 -!- femtoo [~femto@95-89-249-242-dynip.superkabel.de] has joined #go-nuts
09:07 -!- tensai_cirno [~cirno@h212.net62.bmstu.ru] has joined #go-nuts
09:13 -!- tensai_cirno [~cirno@h212.net62.bmstu.ru] has quit [Quit: Leaving]
09:14 -!- stalled [~stalled@unaffiliated/stalled] has joined #go-nuts
09:21 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.4]
09:36 -!- virtualsue [~chatzilla@nat/cisco/x-dfyhwpnwyiktcftf] has joined #go-nuts
09:51 -!- eaburns [~eaburns@c-24-62-248-129.hsd1.nh.comcast.net] has joined
09:54 -!- petrux [~petrux@host16-224-static.53-82-b.business.telecomitalia.it] has
joined #go-nuts
09:54 -!- tensai_cirno [~cirno@h212.net62.bmstu.ru] has joined #go-nuts
09:57 -!- ronnyy [~quassel@p4FF1C687.dip0.t-ipconnect.de] has quit [Remote host
closed the connection]
10:02 -!- femtoo [~femto@95-89-249-242-dynip.superkabel.de] has quit [Ping
timeout: 260 seconds]
10:09 -!- wrtp [~rog@] has quit [Quit: wrtp]
10:11 -!- wrtp [~rog@] has joined #go-nuts
10:13 -!- wrtp [~rog@] has quit [Client Quit]
10:13 -!- waqas [~waqas@jaim.at] has left #go-nuts []
10:20 -!- wrtp [~rog@] has joined #go-nuts
10:20 -!- saturnfive [~saturnfiv@] has quit [Read error: Connection
reset by peer]
10:23 -!- shvntr_ [~shvntr@] has joined #go-nuts
10:23 -!- shvntr [~shvntr@] has quit [Read error: Connection reset
by peer]
10:35 -!- Fish [~Fish@exo3753.pck.nerim.net] has quit [Ping timeout: 250 seconds]
10:38 -!- napsy [~luka@] has joined #go-nuts
10:39 -!- tvw [~tv@] has joined #go-nuts
10:45 -!- saturnfive [~saturnfiv@] has joined #go-nuts
10:49 -!- Fish [~Fish@exo1066.net2.nerim.net] has joined #go-nuts
10:57 -!- saturnfive [~saturnfiv@] has left #go-nuts []
11:19 -!- virtualsue [~chatzilla@nat/cisco/x-dfyhwpnwyiktcftf] has quit [Ping
timeout: 252 seconds]
11:28 -!- waqas [~waqas@jaim.at] has joined #go-nuts
11:38 -!- waqas [~waqas@jaim.at] has left #go-nuts []
11:40 -!- virtualsue [~chatzilla@nat/cisco/x-ydxmdaeaeszsltwc] has joined #go-nuts
11:43 -!- waqas [~waqas@jaim.at] has joined #go-nuts
11:44 * waqas wishes there was a flag to disable godoc's search index
11:51 -!- virtualsue [~chatzilla@nat/cisco/x-ydxmdaeaeszsltwc] has quit [Ping
timeout: 250 seconds]
11:51 -!- karpar [~user@] has joined #go-nuts
11:55 -!- plainhao [~plainhao@] has joined #go-nuts
12:04 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has quit [Ping timeout: 264
12:05 -!- virtualsue [~chatzilla@nat/cisco/x-qnktbvylxzvskajv] has joined #go-nuts
12:08 < wrtp> waqas: -maxresults=0
12:08 -!- boscop [~boscop@g227113009.adsl.alicedsl.de] has joined #go-nuts
12:08 < waqas> That would disable index building?
12:09 -!- rlab [~Miranda@] has joined #go-nuts
12:09 -!- jgonzalez [~jgonzalez@173-14-137-134-NewEngland.hfc.comcastbusiness.net]
has joined #go-nuts
12:10 < waqas> Nope, it still builds
12:10 -!- artefon [~thiago@dhcp37.usuarios.dcc.ufmg.br] has joined #go-nuts
12:10 -!- napsy [~luka@] has quit [Quit: leaving]
12:11 -!- napsy [~luka@] has joined #go-nuts
12:18 -!- napsy [~luka@] has quit [Read error: Connection reset by peer]
12:20 -!- virtualsue [~chatzilla@nat/cisco/x-qnktbvylxzvskajv] has quit [Ping
timeout: 240 seconds]
12:21 -!- karpar [~user@] has quit [Read error: Connection reset by
12:23 -!- karpar [~user@] has joined #go-nuts
12:40 -!- waqas [~waqas@jaim.at] has left #go-nuts []
12:45 -!- shvntr_ [~shvntr@] has quit [Ping timeout: 246 seconds]
12:53 -!- geocalc [~geobsd@lns-bzn-56-82-255-235-145.adsl.proxad.net] has joined
12:56 -!- GeoBSD [~geobsd@lns-bzn-38-82-253-118-161.adsl.proxad.net] has quit
[Ping timeout: 248 seconds]
13:01 -!- littlebobby [~bob@unaffiliated/littlebobby] has quit [Quit: Ex-Chat]
13:01 -!- adu [~ajr@softbank220043138128.bbtec.net] has quit [Quit: adu]
13:05 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has quit [Quit:
13:10 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
13:12 -!- shvntr [~shvntr@] has joined #go-nuts
13:28 -!- karpar [~user@] has quit [Read error: Connection reset by
13:31 -!- emjayess [~emjayess@pix1.i29.net] has joined #go-nuts
13:38 -!- karpar [~user@] has joined #go-nuts
13:41 -!- skelterjohn [~jasmuth@c-68-46-33-145.hsd1.nj.comcast.net] has quit
[Quit: skelterjohn]
13:43 -!- iant [~iant@] has joined #go-nuts
13:43 -!- mode/#go-nuts [+v iant] by ChanServ
13:44 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has joined #go-nuts
13:44 -!- petrux [~petrux@host16-224-static.53-82-b.business.telecomitalia.it] has
quit [Ping timeout: 264 seconds]
13:47 -!- niemeyer [~niemeyer@201-66-179-18.pltce701.dsl.brasiltelecom.net.br] has
joined #go-nuts
13:47 < steven> guys
13:48 < steven> when you have "var a, b int", neither a nor b are pointers,
but a == b compares the addresses of them still?
13:48 < aiju> no
13:48 < steven> im confused.
13:48 < Namegduf> Why?
13:48 < Namegduf> a == b compares a and b.
13:48 < steven> from a discussion in here earlier
13:48 < steven> oh ok.
13:48 < steven> wow that was a stupid question
13:49 < Namegduf> Well, it would in Java, but that's because Java is a
massive pile of failure.
13:49 < Namegduf> But Go is nice and obvious.
13:49 < steven> ha!  it is real!
13:49 < steven> i no longer have permission to view it!  yay!
13:49 < steven> woot, we're getting generics soon!
13:49 < steven> i cant wait to write Map and Reduce etc
13:50 < aiju> really?
13:50 < steven> yep.
13:50 < Namegduf> That could just mean that it was an April Fools joke that
escaped into here and they wanted to do damage control before people declared it
real.  :P
13:50 < Namegduf> Too late!
13:50 < steven> that would be a HORRIBLE april fools joke
13:50 < Namegduf> I think it'd be hilarious.
13:50 < steven> that would be like "you have cancer....  APRIL FOOLS!"
13:50 < Namegduf> But you'd be basically the brunt of the joke.
13:50 < Namegduf> So I can understand.
13:50 < steven> sigh.
13:50 < steven> ill keep hoping.
13:51 < Namegduf> I doubt it is a joke, myself
13:51 < Namegduf> So keep hoping.  :P
13:51 < aiju> where is that from?
13:51 < Namegduf> It looked like a legitimate if complicated proposal.
13:51 < Namegduf> aiju: It was a bunch of spec changes for generics
13:51 < aiju> where?
13:51 < aiju> i don't see them in the spec
13:51 < steven> well, type coercion and generalized/specialized functions
13:52 < Namegduf> That link which you no longer have permission to see
13:52 < steven> although i dont see the point of type coercion, it seems
exactly the same as type assertion
13:52 < steven> aiju: it was linked in here last night, and we could see the
contents of the diff at that point.
13:52 < Namegduf> I assume type coercion was type assertion for generic
types, rather than interfaces.
13:52 < steven> but they changed permissions.
13:52 < steven> Namegduf: ahh..  but why wouldnt type assertion work for
generic types?
13:53 < Namegduf> I unno.  Different code, probably, but why the same syntax
couldn't mean the same I don't know.
13:53 < steven> gen func Map(a []T) []T // ftw!
13:53 < aiju> yuck
13:53 < steven> Namegduf: im betting it has something to do with
compile-time checking done slightly differently or something
13:53 < steven> yeah
13:53 < steven> aiju: nah its good
13:54 < steven> we can write our own Append now :)
13:54 < steven> gen func Append(a []T) []T
13:54 < Namegduf> Append can move out of the compiler into a package
13:54 < Namegduf> Potentially
13:54 < Namegduf> And map/reduce/foo can go into a package.
13:54 < Namegduf> But yeah.
13:55 < taruti> re that syntax, how does the compiler infer that T is a type
13:56 < Namegduf> I assume the gen plus the single character-ness?  I'm
13:56 < steven> im sure i got it wrong.
13:56 < Namegduf> Ah.
13:56 < steven> the spec wasnt full (or clear to me) last night
13:57 < steven> i just saw the "gen" reserved keyword added, and some
confusing bits about generalized function declarations
13:58 < Namegduf> Yeah, the words generalized and type were used a lot.
13:58 < Namegduf> I don't remember much else.
13:58 < steven> no one seemed to tweet about it
13:58 < aiju> haha
13:58 < steven> darn
13:58 < aiju> gen, ???, PROFIT
13:58 < steven> ha
13:58 < Namegduf> Pretty much!
13:59 < Namegduf> The proposal was way more detailed
13:59 < steven> whats the go twitter hashtag used the most?
13:59 < Namegduf> I just didn't read it well and don't have it to look at.
13:59 < Namegduf> Probably #golang
13:59 < nsf> personally I don't think it's true
13:59 < nsf> if Go guys have some taste
13:59 < Namegduf> I don't know if the Go team would pull that kind of joke.
13:59 < nsf> they won't call it 'gen'
13:59 < nsf> it's ugly
13:59 < Namegduf> It doesn't have a guaranteed approval, though.
14:00 < aiju> hahahaha
14:00 < Namegduf> It could just be a proposal being experimented with.
14:00 < Namegduf> Which is why it was hidden.
14:00 < Namegduf> Because people were going nuts.
14:00 -!- lmoura [~lauromour@] has quit [Remote host closed the
14:00 < Namegduf> Which is, actually, kinda predictable.
14:02 < nsf> uhm, I don't like Go's way to determine decls visibility
14:02 -!- tensai_cirno [~cirno@h212.net62.bmstu.ru] has quit [Quit: Leaving]
14:02 < nsf> (e.g.  by name)
14:02 < nsf> does anyone have other ideas?
14:03 < aiju> decls?
14:03 < nsf> declarations
14:03 < aiju> isn't by name ...  default?
14:03 < nsf> funcs, vars, consts
14:03 < nsf> Exported
14:03 < nsf> nonExported
14:03 < aiju> oh you mean that one
14:03 < nsf> I don't like that
14:04 < aiju> who likes that, after all?  ;P
14:04 -!- lmoura [~lauromour@] has joined #go-nuts
14:04 < nsf> some do
14:04 < nsf> and I understand why
14:04 < nsf> but I don't
14:04 < nsf> :)
14:04 < nsf> but every language needs visibility control features
14:04 < nsf> for .so at least
14:07 < steven> nsf: i really like it
14:07 < steven> aiju: i really like it
14:07 < aiju> gosh, you don't need to repeat that
14:07 < aiju> at least write a macro ;P
14:07 < nsf> steven: good for you, I don't
14:08 < nsf> I'm looking for alternatives
14:08 * taruti likes the go visiblity system too
14:08 < steven> i like it a lot.
14:08 < taruti> nsf: module Foo(export list) ...
14:08 < steven> if you fuck with it ill be very sad.
14:08 < steven> its one of my fav features of GO
14:08 < steven> Go.
14:08 < nsf> visibility system is fine, but camel case enforcing is a bad
side effect
14:08 < steven> meh
14:09 < nsf> taruti: uhm..  this export list will be quite long
14:09 < nsf> isn't it?
14:10 < steven> im excited!
14:10 < nsf> and it causes duplication
14:10 < steven> i want generics NOW DAMNIT
14:10 < taruti> nsf: yes?
14:10 < nsf> I think so
14:10 < aiju> haha
14:11 -!- waqas [~waqas@jaim.at] has joined #go-nuts
14:11 < nsf> private func..
14:11 < nsf> I don't like keyword 'private'
14:11 < nsf> but I have zero other ideas
14:12 < nsf> maybe add a special symbol, lol
14:12 < taruti> nsf: good design should encourage functions to be private
14:12 < nsf> $func or #func
14:12 < nsf> taruti: what's the reason?  good design should tell about
14:13 < taruti> nsf: easier testablity, less interface to document etc
14:13 < steven> every single function should be private, period.
14:13 < steven> public visibility is EVIL and should be avoided at all
14:14 < nsf> it doesn't matter, developing a library and trying to minimize
visible entities simply because it's "right" is a bad idea
14:14 < steven> this encourages good practices such as writing your own
stdlib for every single app you write.
14:14 < nsf> steven: and you too
14:14 < steven> :)
14:14 < nsf> it's just bullshit from OOP books
14:14 < steven> meh, im neutral on that issue
14:15 < nsf> for example I have a very strong opinion against private fields
in structs
14:15 < aiju> castrated interfaces piss me off an infinite amount
14:15 < nsf> but package-wide visibility control is required
14:16 < waqas> What is Go's rationale for not having method overloading?
14:16 < nsf> waqas: Go has method overloading
14:16 < steven> i dont think it does..
14:16 < nsf> type X MyStructWithBunchOfMethods
14:16 < aiju> overloading leads to all kind of funny behaviour
14:16 < nsf> type Y X
14:17 < nsf> func (Y) MethodFromX() { // do different stuff }
14:17 < waqas> nsf: Are you thinking of overriding?
14:17 < nsf> yeah
14:17 < nsf> overloading is not even considered as a feature
14:17 < steven> im fine with lack of overloading
14:17 < nsf> wise C++ programmers recommend you to use GetItemByName,
GetItemByIndex, etc.
14:18 < nsf> instead of overloaded GetItem
14:18 < nsf> it's like 5 times more readable
14:18 < aiju> overloading + implicit casts = HELL
14:18 < aiju> when foo(5) and foo(5.) behave differently, something is
seriously wrong
14:18 < steven> but i wish it had optional arguments or keyword arguments
14:18 < steven> or both!
14:19 < taruti> steven: use a structure
14:19 < waqas> I'm all for readability, however optional arguments is
something quite desirable IMO
14:19 < nsf> use python
14:19 < aiju> both are just ways to hide bad interfaces
14:19 < steven> taruti: sure sure
14:19 < steven> your face aiju
14:19 -!- virtualsue [~chatzilla@nat/cisco/x-zsrmssudtctfutmz] has joined #go-nuts
14:19 < waqas> taruti: Using structures is an neat workaround
14:20 < Namegduf> Optional arguments without named parameters are just
shorthand which makes your code less explicit.
14:20 < Namegduf> Named parameters are a whole different kettle of fish.
14:22 -!- eaburns [~eaburns@c-24-62-248-129.hsd1.nh.comcast.net] has left #go-nuts
14:22 < waqas> I'm very much in favor of keeping internals private.
Otherwise people are going to depend on them.  Big red warning text in docs
doesn't stop them, and you can end up maintaining compatibility for things which
should have been implementation details.
14:22 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
14:23 < steven> my privates are internal, yes.
14:23 < steven> wait, no!
14:23 < steven> that would make me a woman.
14:24 < steven> ok internal privates are for women, external privates are
for men.  agreed?
14:24 < waqas> A point, agreed.
14:24 < aiju> if people depend on them, it's their fault
14:25 < aiju> most library authors break the public interface any release
14:25 < waqas> aiju: Sometimes you don't have much choice but to keep third
party code working.
14:25 -!- skelterjohn [~jasmuth@lawn-gw.rutgers.edu] has joined #go-nuts
14:25 < waqas> Do they?  That's not my experience (not in go land)
14:29 < Namegduf> Go is too in dev.
14:29 < Namegduf> In general public interfaces are super, just don't rush
towards fixing one.
14:30 < Namegduf> At *least* prototype heavily so your public interface and
implementation match up nicely.  Most FOSS does this during a dev period where
it's "unstable", I think.
14:30 < Namegduf> Rather than setting the public interface first then doing
horrible hacks to keep it and ignoring all improvements made obvious during
initial implementation.
14:30 < Namegduf> Right now I've not seen a Go library care about it.
14:31 < Namegduf> When even the stdlib doesn't you're pretty screwed anyway.
14:31 < waqas> Indeed, Go is too in dev at the moment
14:31 < waqas> And perhaps would remain so for the forseeable future
14:31 < Namegduf> Well, I suspect it will stablise some day.
14:32 < skelterjohn> this is google we're talking about
14:32 < Namegduf> I just wouldn't make a call as to when.
14:32 < skelterjohn> gmail was in beta for years
14:32 < Namegduf> It's perfectly usable right now if you're willing to
presume a level of agility to your project.
14:32 < skelterjohn> 5 years, to be exacty
14:32 < skelterjohn> exact
14:32 < Namegduf> If you're working in a large enterprise where code can't
be upgraded, sure, you're going to want to keep using COBOL or whatever they're
still using
14:33 < skelterjohn> heh
14:33 < Namegduf> But I doubt Go would be considered in such environments
14:34 < Namegduf> It works okay if you're okay with your code being
regularly maintained and updated and tested with newer versions of stuff.
14:34 < aiju> Namegduf: have you heard of Visual COBOL?  ;P
14:34 < Namegduf> aiju: I just /clear'd, the answer is no and I'd rather try
to stay that way.
14:34 < aiju> haha
14:34 < aiju> COBOL + .NET
14:35 < Namegduf> Now that's cruel, I don't have time to drink myself into
forgetting that today.
14:37 < nsf> I guess Go's way of controlling visibility is the best option
at the moment
14:37 < Namegduf> It's a nice way to define a public interface.
14:38 < Namegduf> I think trying to fuck it into being generic for future
change should be done with extreme reluctance, though.
14:38 < Namegduf> But that's just my opinion on, well, everything.
14:38 < Namegduf> So maybe it's bias.
14:38 -!- virtualsue [~chatzilla@nat/cisco/x-zsrmssudtctfutmz] has quit [Quit:
ChatZilla 0.9.86 [Firefox 3.5.17/20110121150727]]
14:40 < waqas> I don't have strong opinions about 'private' in Go. I don't
see much need for it given Go doesn't have dynamic libs and is rapidly evolving.
14:41 -!- ildorn [~ildorn@dslb-188-105-121-044.pools.arcor-ip.net] has joined
14:42 -!- ildorn [~ildorn@dslb-188-105-121-044.pools.arcor-ip.net] has quit
[Client Quit]
14:47 -!- pharris [~Adium@rhgw.opentext.com] has joined #go-nuts
14:48 -!- olegfink [~olegfink@ppp92-100-111-96.pppoe.avangarddsl.ru] has quit
[Read error: Operation timed out]
14:49 -!- femtoo [~femto@95-89-249-242-dynip.superkabel.de] has joined #go-nuts
14:51 < nsf> I'm always open to suggestion, but I don't like simplest idea
of that form: "private func blabla() {}"
14:51 < nsf> suggestions*
14:51 < nsf> camel case is better
14:51 < nsf> I think symbolic definition may work too, like: "!func blabla()
{}" or "$func blabla() {}"
14:51 < nsf> or whatever symbol it is
14:51 < nsf> at least it's short
14:52 < Namegduf> I like Go's.
14:52 -!- aho [~nya@fuld-4d00d393.pool.mediaWays.net] has quit [Quit:
14:54 -!- karpar [~user@] has quit [Remote host closed the
14:54 < skelterjohn> if i were doing things from the beginning, I would have
had vars that begin with an underscore non exported
14:55 < skelterjohn> and all others exported
14:55 < skelterjohn> but i've grown used to the way it is now, and i don't
think it should change
14:56 -!- imsplitbit [~imsplitbi@] has joined #go-nuts
14:59 < wrtp> skelterjohn: inside packages, most code uses unexported
identifiers.  an underscore-based rule would needlessly add an extra char and two
keypresses to all those identifiers
14:59 < nsf> name-based system has many pros
15:00 < nsf> 1.  no extra symbols/keywords
15:00 < nsf> 2.  it's always visible whether entity is public or not
15:00 < wrtp> the main benefit of a name-based system is that you can tell
if something is exported from any use of it, not just the declaration.
15:00 < nsf> 3.  forces common naming style for everyone
15:00 < skelterjohn> wrtp: I don't consider a little extra typing to be an
15:00 < wrtp> skelterjohn: it's not just the typing, it's the visual clutter
15:00 < skelterjohn> i have to do an "extra" key press to export something
now - i have to press shift
15:01 < skelterjohn> the whole point of capitals being exported is so that
looks different visually
15:01 < nsf> skelterjohn: I bet C++ was designed with the same idea in mind
15:01 < skelterjohn> if we didn't want visual clutter, we'd do something
like C++
15:01 < nsf> "let's see, another feature, few extra key presses are ok"
15:01 < nsf> and in the result :)
15:01 < nsf> there are plenty of extra key presses
15:02 < skelterjohn> preceding private things with an underscore is a very
common and readable convention
15:02 < nsf> and I hate it
15:02 < nsf> :)
15:02 < nsf> I'd better go with mVar or m_var
15:02 < nickbp> i dont like pressing shift more often than necessary thx
15:03 < nsf> actually underscore based naming leads to 1 extra key press per
15:03 < nickbp> also yeah you can use any lowercase char so you can have
some things start with a, others with s, or whatever
15:03 <+iant> two, really, since you need to press the shift key
15:03 < nsf> my_var m y shift _ v a r
15:03 < nsf> myVar m y shift v a r
15:04 -!- olegfink [~olegfink@92-100-146-220.dynamic.avangarddsl.ru] has joined
15:04 < nickbp> (if you like categorizing things by name)
15:04 < nsf> iant: well, it's usually all lower case
15:04 <+iant> I mean, you need to press the shift key to get the underscore
15:04 < skelterjohn> anyway, don't get me wrong.  i'm not suggesting a
change.  i was just saying how in my universe things might have gone differently
15:04 < skelterjohn> nsf is on a russian keyboard
15:04 < nsf> yes, but otherwise you're pressing shift for capital letter
15:05 <+iant> true
15:05 < skelterjohn> the idea is that it's extra effort to export something
15:05 < wrtp> needing an underscore makes private identifiers seem like
second class citizens, to me.
15:05 < str1ngs> the effort to make something readable at a glance is worth
it imo
15:05 < skelterjohn> well, make sure you compliment them so they don't feel
too bad about it
15:06 < skelterjohn> also in my universe, all bikesheds are painted red
15:06 < wrtp> a random excerpt from the netchan code, with underscores:
15:06 < skelterjohn> since that's my favorite color
15:06 < nsf> wrtp: hehe
15:06 < nsf> I know a javascript guy
15:06 < nsf> who uses two underscores for private vars
15:07 < nsf> :D
15:07 < nsf> __myvar
15:07 < nsf> for some weird reason
15:07 -!- iant [~iant@] has quit [Quit: Leaving.]
15:07 < wrtp> it's great being able to have single-letter private members in
15:07 < nsf> yeah
15:08 < nsf> anyways, I'll stick with Go's system
15:08 < nsf> for the moment
15:09 -!- fhs [~fhs@pool-74-101-66-112.nycmny.east.verizon.net] has joined
15:14 -!- skejoe [~skejoe@] has quit [Quit: Lost terminal]
15:17 -!- artefon [~thiago@dhcp37.usuarios.dcc.ufmg.br] has quit [Quit: bye]
15:17 -!- iant [~iant@nat/google/x-xhrzuimeovgdlgbr] has joined #go-nuts
15:17 -!- mode/#go-nuts [+v iant] by ChanServ
15:19 -!- zozoR [~Morten@56344966.rev.stofanet.dk] has joined #go-nuts
15:22 -!- foocraft [~dsc@] has joined #go-nuts
15:27 -!- shvntr [~shvntr@] has quit [Read error: Connection reset
by peer]
15:28 -!- kpumuk [~kpumuk@69-165-246-181.cable.teksavvy.com] has quit [Quit:
15:30 -!- femtoo [~femto@95-89-249-242-dynip.superkabel.de] has quit [Ping
timeout: 255 seconds]
15:31 -!- unofficialmvp [~dev@94-62-164-227.b.ipv4ilink.net] has joined #go-nuts
15:31 -!- unofficialmvp [~dev@94-62-164-227.b.ipv4ilink.net] has left #go-nuts []
15:40 -!- Venom_X [~pjacobs@] has joined #go-nuts
15:43 -!- SecretAgent [sa@] has quit [Read error:
Operation timed out]
15:43 -!- SecretAgent [sa@] has joined #go-nuts
15:44 < plexdev> http://is.gd/2GGBgG by [Russ Cox] in go/src/pkg/runtime/ --
runtime: more stack split fixes
15:44 < plexdev> http://is.gd/C1zyVp by [Russ Cox] in 10 subdirs of
go/src/pkg/runtime/ -- runtime: os-specific types and code for setitimer
15:44 < plexdev> http://is.gd/oRfuoB by [Russ Cox] in go/src/cmd/godefs/ --
godefs: handle volatile
15:44 < plexdev> http://is.gd/HHOBY6 by [Russ Cox] in 2 subdirs of
go/src/pkg/runtime/ -- runtime: fix print - no %v in C
15:44 -!- Venom_X [~pjacobs@] has quit [Ping timeout: 252 seconds]
15:44 -!- DerHorst [~Horst@e176102216.adsl.alicedsl.de] has joined #go-nuts
15:45 < str1ngs> anyone have an example of while ! EOF for loop?  I not
quite use to for loops in this regard
15:46 <+iant> for !EOF { }
15:46 < waqas> Heh
15:46 < str1ngs> in a reader context though?
15:46 < str1ngs> hold on I"ll try that iant thanks
15:50 -!- Venom_X [~pjacobs@] has joined #go-nuts
15:53 -!- waqas [~waqas@jaim.at] has left #go-nuts []
15:53 < wrtp> str1ngs: if a reader context, it's more conventional to use a
for{ } loop with a break
15:54 -!- fabled [~fabled@mail.fi.jw.org] has quit [Read error: No route to host]
15:54 < wrtp> i.e.  for { n, err := r.Read(buf); if err != nil { break } ...
15:54 < str1ngs> wrtp: ah that might be easier
15:58 -!- Venom_X_ [~pjacobs@] has joined #go-nuts
15:59 -!- Venom_X [~pjacobs@] has quit [Ping timeout: 255 seconds]
15:59 -!- femtoo [~femto@95-89-249-242-dynip.superkabel.de] has joined #go-nuts
16:00 < plexdev> http://is.gd/iuBk4c by [Russ Cox] in 12 subdirs of
go/src/pkg/runtime/ -- runtime: cpu profiling support
16:02 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-154-99.clienti.tiscali.it] has
joined #go-nuts
16:02 < str1ngs> thats perfect thanks guys
16:05 -!- Project_2501 [~Marvin@] has quit [Ping timeout: 250 seconds]
16:08 -!- tvw [~tv@] has quit [Remote host closed the connection]
16:09 -!- fabled [~fabled@mail.fi.jw.org] has joined #go-nuts
16:21 -!- artefon [~thiago@] has joined #go-nuts
16:22 < nsf> uhm, I don't understand this
16:22 < nsf> x's type V and T have identical underlying types and at least
one of V or T is not a named type.
16:22 < steven> come on where are my generics already
16:22 < nsf> go spec says x is assignable to var with type T if:
16:22 < nsf> and here it is
16:22 < nsf> type A int64
16:23 < nsf> var a A
16:23 < nsf> var b int64
16:23 < nsf> identical underlying types
16:23 < nsf> right?
16:23 < nsf> on of them is not a named type
16:23 < cbeck> They're both named types..
16:23 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has quit [Quit: Leaving.]
16:23 < nsf> so, built-in types are named too?
16:24 -!- awidegreen [~quassel@c-eacae555.08-2-73746f39.cust.bredbandsbolaget.se]
has joined #go-nuts
16:25 < Namegduf> nsf: That sounds right.
16:26 < nsf> I see
16:26 < Namegduf> I mean, your thing
16:26 < Namegduf> Not built-in type names being names
16:26 < nsf> uhm..
16:26 < nsf> I'm confused
16:26 < nsf> if int64 is not a named type
16:27 < nsf> then Go compiler is not conforming its spec
16:27 < nsf> which is unlikely
16:27 < nsf> :)
16:27 < cbeck> http://pastie.org/1704544
16:28 < nsf> therefore I assume that named types are all non-composite types
16:28 < nsf> two types of types :)
16:28 < nsf> named and composite ones
16:28 < cbeck> that compiles
16:28 < nsf> cbeck: I see
16:28 < nsf> struct is not a named type it's a composite type
16:28 < nsf> therefore all non-composite types are named types
16:29 < cbeck> Sounds right
16:29 < skelterjohn> whoah - i'm surprised that compiles
16:31 < nsf> frankly I don't understand it as well
16:31 < nsf> type Int int; var a int; var b Int; a = b; // wrong
16:32 < nsf> type Int struct { v int;}; var a struct {v int}; var b Int; a =
b; // ok
16:32 < nsf> wtf
16:32 < nsf> :)
16:33 < nsf> I don't get the conceptual difference here
16:34 < cbeck> It makes some sense to me, if two types are named, there must
be a reason and allowing cross assignment would possibly break safety, if one
isn't named you can effectively use structural typing
16:35 < skelterjohn> yeah, it makes sense that it's allowed
16:35 < skelterjohn> i was just surprised
16:35 < nsf> doesn't make sense to me :(
16:36 < Namegduf> I think the confusing part is that it doesn't work for
non-composite types.
16:36 < nsf> yeah, what's the difference, composite type with one element
vs.  simple type
16:36 < nsf> and here I mean struct
16:37 < nsf> as composite type
16:37 < nsf> the confusing part is classification
16:37 < skelterjohn> i think it comes down to the fact that no implicit
conversions are allowed because you might get wrong behavior...  but composite
types *have* no behavior, so you can't get anything unexpected
16:37 < nsf> named/unnamed
16:38 < nsf> skelterjohn: but it's easy to distinguish a built-in type
16:38 -!- Venom_X [~pjacobs@] has quit [Quit: Venom_X]
16:38 < nsf> it has no behaviour too
16:38 -!- Venom_X [~pjacobs@] has joined #go-nuts
16:38 < skelterjohn> but int and uint are incompatible
16:39 < skelterjohn> int and int32 are sometimes incompatible, sometimes
it's int and int64
16:39 < nsf> for me having a "user defined type" and "built-in type"
difference makes more sense
16:39 < nsf> skelterjohn: but what's the problem
16:39 < nsf> just define int as a separate built-in type
16:39 < nsf> and uint
16:39 < skelterjohn> you can, for instance, pass a func() int to something
that wants an A, where type A func()int
16:39 < skelterjohn> so that conversion is implicit
16:39 < nsf> yes
16:40 < nsf> makes sense
16:40 < nsf> but why can't I pass int to something
16:40 < nsf> that expectes type A int
16:40 < nsf> expects*
16:40 -!- piranha [~piranha@5ED42E59.cm-7-5a.dynamic.ziggo.nl] has quit [Quit:
Computer has gone to sleep.]
16:40 < skelterjohn> maybe you should file an issue
16:40 < Namegduf> It seems like it might be good behaviour
16:40 < skelterjohn> it makes sense to me, after this discussion, that it
would be allowed
16:40 < Namegduf> But it is puzzling.
16:40 -!- eaburns [~eaburns@c-24-62-248-129.hsd1.nh.comcast.net] has joined
16:41 < aiju> seems like a literal / expression issue to me
16:41 < Namegduf> As struct/function literals which are not expressly typed
are often useful to pass without casting
16:41 < aiju> a function name or an anonymous function is a basically
16:41 < nsf> literals are a whole different story
16:41 < nsf> in Go they are special
16:41 < Namegduf> Ah.
16:41 < nsf> uhm..
16:41 < nsf> ok
16:42 < nsf> var x struct { a, b, c int; }; type Y struct { a, b, c int; };
var y Y;
16:42 < nsf> doing: x = struct { a, b, c int; }(y)
16:42 < nsf> is ugly
16:42 < nsf> but that's not an excuse :)
16:43 -!- tensai_cirno [~cirno@] has joined #go-nuts
16:43 < nsf> well, ok, one more reason for having explicit type casts
16:43 < skelterjohn> can you do it in that direction, too?
16:43 < nsf> int is a variable sized type
16:43 < nsf> right?
16:44 < nsf> ah, wait
16:44 < nsf> no
16:44 < nsf> skelterjohn: yes
16:44 < skelterjohn> it's an implementation-specific sized type
16:44 < nsf> yeah, but it doesn't matter
16:44 < nsf> type Int int; will have the same size
16:44 < nsf> anyway
16:44 < skelterjohn> yes
16:45 < nsf> so allowing assignment Int to int won't hurt
16:45 < nsf> and vice versa
16:45 < nsf> but Go doesn't allow this
16:45 < Namegduf> I don't know if Int to int would work
16:45 < Namegduf> int to Int would.
16:45 -!- waqas [~waqas@jaim.at] has joined #go-nuts
16:46 < skelterjohn> o_O
16:46 < nsf> Namegduf: in Go? I'm afraid it won't
16:46 < nsf> abstract int to Int would
16:46 < Namegduf> Well yeaah, I meant with that logic.
16:46 < nsf> where abstract int is an untyped const or simply a literal
16:46 < skelterjohn> i think he means "if it were allowed, would it make
16:46 < nsf> skelterjohn: yeah, I'm very interested in all reasons behind
Go's type system
16:47 < nsf> maybe I should ask about that in the ML
16:47 < nsf> I agree that implicit conversions like uint to int, or even
worse float to int
16:47 < nsf> are evil
16:47 < nsf> but what's wrong with:
16:47 < nsf> type A int
16:47 < nsf> int to A and A to int
16:48 < wrtp> nsf: i don't understand your problem
16:48 < wrtp> named types have names
16:48 < wrtp> struct { ...  } is not a name
16:48 < nsf> wrtp: I don't have a problem
16:48 < nsf> I just don't understand reasons behind Go's type system
16:48 < skelterjohn> wrtp: the issue is not understanding what the rules
*are*, but *why* the rules are the way they are
16:48 < wrtp> it's a simple rule
16:49 < nsf> yeah
16:49 < wrtp> implicit assignment is allowed between a named type and an
unnamed type
16:49 < nsf> wrtp: why?  :)
16:49 < nsf> and why it disallowed in case: type A int; var a A; var b int;
a = b;
16:50 < nsf> it's*
16:50 < skelterjohn> it makes just as much sense to allow that as it does to
assign an "int" to a "type A int"
16:50 < wrtp> because it allows assignment of struct and array literals to
compatible named types
16:50 < wrtp> which is very convenient
16:50 < nsf> wrtp: I got it
16:50 < skelterjohn> he asked why it is disallowed in the other case
16:50 < skelterjohn> not why it's allowed in the case you mention
16:50 < nsf> but why can't you assign 'type A int' to 'int'
16:50 < nsf> or vice versa
16:51 < wrtp> because the rule is simple
16:51 < skelterjohn> :\
16:51 < nsf> what's the big difference between unnamed type and built-in
16:51 < wrtp> any named type must be converted
16:51 < nsf> or there is no built-in type
16:51 < wrtp> a built-in type has a name
16:51 < nsf> exactly, I don't get the classification
16:51 < skelterjohn> wrtp: then why consider "int" a named type
16:51 < nsf> yeah
16:51 < wrtp> because it is
16:51 < skelterjohn> well then.
16:51 < wrtp> "int" is its name
16:51 * waqas is amused :)
16:51 < nsf> then the question is
16:51 < skelterjohn> i could just as well call "struct {a int}" a name
16:52 < wrtp> no you couldn't
16:52 < nsf> how do you define int?
16:52 < wrtp> because it isn't a name, it's structured
16:52 < nsf> if it's named, it's defined somewhere somehow :)
16:52 < wrtp> "int" is a simple textual name
16:52 < wrtp> struct {a int} is not
16:52 < skelterjohn> my point was, i can call anything whatever i want.  the
semantics remain unchanged
16:52 < cbeck> Interestingly, it allows code like http://pastie.org/1704656,
which I hadn't considered before
16:52 < skelterjohn> and assigning int to type A int makes as much semantic
sense as the other case
16:53 < nsf> yeah
16:53 < skelterjohn> very interesting, cbeck
16:53 < skelterjohn> kind of like a union type
16:53 < skelterjohn> !
16:53 < nsf> skelterjohn: no
16:53 < skelterjohn> except not really
16:53 < wrtp> skelterjohn: disallowing that means that it's easy to provide
more compile-time checks for assignment between otherwise compatible types
16:53 < nsf> the layout is always the same
16:54 < nsf> wrtp: a type check for the sake of type check?
16:54 < waqas> wrtp: Isn't the type information available to the compiler
the same, whether there's a name or not?
16:54 < wrtp> same as why assignment between int and int32 is disallowed,
even when they have the same underlying representation
16:54 < nsf> what kind of error it prevents?  :)
16:54 < wrtp> nsf: category errors
16:54 < nsf> wrtp: they have different underlying repr
16:54 < skelterjohn> wrtp: i don't follow
16:54 < nsf> int is platform-dependent, int32 is not
16:55 < nsf> int32 is fixed
16:55 < wrtp> nsf: that might be true of type A int too
16:55 < nsf> no
16:55 < skelterjohn> wrtp: type A int and int will always have teh same
16:55 < wrtp> nsf: it might be defined as type A int64 on some other
16:55 < nsf> 'type A int' always has the same representation as 'int'
16:55 < nsf> wrtp: yes
16:56 < nsf> wrtp: and in that case you can't assign int to it
16:56 < nsf> but int64 is ok
16:56 < wrtp> preventing the automatic conversion means that it's easy to
stop people making the assumption unless they do the conversion explicitly
16:56 < skelterjohn> what assumption, exactly?
16:56 < waqas> wrtp: Doesn't the same apply in the unnamed case?
16:56 < skelterjohn> beyond ones already made for assigning unnamed
16:56 < nsf> 'type A int64' has the same memory repr as 'int64'
16:56 < nsf> and that assumption is always correct
16:56 < nsf> why preventing it?
16:57 < eaburns> to remove extra special cases from the rule?
16:57 < nsf> eaburns: it depends, you see, we're talking here about
16:57 < skelterjohn> forget about simplicity of rules, for the moment
(though that is a good enough reason)
16:57 < nsf> Go has 'named'/'unnamed' classification
16:57 < nsf> we may have other classification
16:57 < nsf> like 'user defined'/'built-in'
16:57 < nsf> an amount of special cases is questionable
16:58 < nsf> it may or may not be different in both directions (bigger,
16:58 < eaburns> but now you are adding more complexity for, what I
consider, very little benefit
16:58 < nsf> no, I don't
16:59 < nsf> I'm just redefining 'int' and 'struct { a, b,c int; }' as
built-in types
16:59 < nsf> and two values are assignable if their built-in types are the
16:59 -!- fabled [~fabled@mail.fi.jw.org] has quit [Quit: Ex-Chat]
17:00 < nsf> hm..
17:00 < nsf> anyways, I'm confused a lot
17:00 < nsf> with Go's classification :)
17:01 < eaburns> Additionally, changeing the type (even if the built-in type
matches) changes the method set.  I think that this is another good argument for
making them explicit
17:02 < nsf> but what kind of errors it prevents?
17:02 < nsf> I'm not exactly sure if there are any
17:02 -!- femtoo [~femto@95-89-249-242-dynip.superkabel.de] has quit [Ping
timeout: 240 seconds]
17:02 < eaburns> inadvertantly calling the incorrect method I guess
17:03 < eaburns> I suppose that I would need to think about it more but, at
least at the moment, I am a fan of the explicit conversions
17:03 < nsf> ok, we have to equally defined types (same memory layout) which
have two identical methods
17:03 < nsf> is there a big probability of that?
17:03 < waqas> eaburns: Is that possible (calling the incorrect method)?
There is no method overloading.
17:04 < nsf> yeah, the only type method call depends on is a receiver
17:04 < nsf> how is it possible to get the wrong receiver by accident?
17:04 < nsf> :\
17:04 < waqas> It isn't possible afaik
17:04 < eaburns> if the receiver has the same built-in type but a different
named type then the built-in type can have multiple methods with the same name
17:04 < skelterjohn> i think a better classification would be
17:04 < skelterjohn> behavior being a method with the type as its receiver
17:05 < skelterjohn> built-ins and unnamed structs would fall into the 2nd
17:05 < eaburns> < nsf> how is it possible to get the wrong receiver
by accident?
17:05 < nsf> eaburns: built-in types have no methods
17:05 < eaburns> it is not for the compiler, it is for the programmer
17:05 < skelterjohn> any "type" defined by the code would fall into the 1st
17:05 < nsf> skelterjohn: by 'behaviour' you mean methods?
17:05 < skelterjohn> read more carefully :)
17:05 < nsf> ah
17:05 < nsf> yes
17:05 < nsf> :)
17:05 < nsf> sorry
17:06 < wrtp> the kind of error i'm think of is when you have two sets of
bitwise constants.  defining each one as a named type means the compiler can give
an error when you try to combine two inappropriate constants
17:06 < nsf> skelterjohn: I totally agree
17:06 -!- piranha [~piranha@5ED43A0B.cm-7-5a.dynamic.ziggo.nl] has joined #go-nuts
17:06 < nsf> wrtp: but that's a different story you see :)
17:06 < nsf> it's a binary operation
17:06 < wrtp> skelterjohn: can-have-behaviour is irrelevant if the type
comes from another package
17:07 < nsf> they are special because:
17:07 < nsf> a := b op c
17:07 < skelterjohn> wrtp: that other package can-give-it-behavior
17:07 < nsf> type(a) == type(b) || type(a) == type(c)
17:07 < wrtp> skelterjohn: only if it chooses to
17:07 < nsf> you can't allow any kind of implicit behaviour here
17:07 < skelterjohn> the reason there are no implicit conversions, usually,
is that it it can cause unexpected behavior
17:07 < wrtp> i don't see the fundamental difference, other than that
built-in types are defined in the universe scope
17:07 -!- fabled [~fabled@] has joined #go-nuts
17:07 < nsf> ah, I get it!
17:07 < skelterjohn> if you pass type A with one kind of Foo to something
that wants a type B with a different Foo
17:08 < skelterjohn> there can be unexpected Fooing
17:08 < nsf> Go allows implicit conversion for compsite types
17:08 < nsf> because they are invalid for binary operations
17:08 < skelterjohn> wrtp: and the built-ins have no methods, and you can
count on that
17:08 < nsf> !!
17:08 < skelterjohn> you only remove behavior by turning something into a
built-in type
17:08 < nsf> really, that't the reasn
17:08 < nsf> reason*
17:08 < wrtp> nsf they're not
17:09 < wrtp> . is a binary operation
17:09 < nsf> no
17:09 < nsf> god no :)
17:09 < eaburns> skelterjohn: your example with type A, Foo and type B is
precisely the reason that I dislike implicit conversions
17:09 < skelterjohn> right - and i don't suggest allowing them in that case
17:09 < nsf> wrtp: . is called a selector expression
17:10 < nsf> and it has this form:
17:10 < nsf> pexpr '.' identifier
17:10 < nsf> it's more like unary in a sense that only half of it has a type
17:10 < skelterjohn> the operation is ".identifier"
17:11 < eaburns> skelterjohn: my understanding was that the argument was for
implicit conversions between two types that were structurally the same.  Couldn't
you type A and B also bu structurally the same and therefore wouldn't require the
explicit conversion?
17:11 < skelterjohn> no - that's not the argument
17:11 < eaburns> I see
17:11 < skelterjohn> at least, not my argument
17:11 < eaburns> I appologize then :)
17:12 < skelterjohn> i think that assigning something of "type A int" to
"int" should be implicit, like assigning something of "type A struct {a int}" to
"struct{a int}" is, now
17:13 < nsf> skelterjohn: I can only see one reason why Go avoids that
17:13 < skelterjohn> btw, this doesn't really bother me *that* much
17:13 < skelterjohn> it just seems a bit inconsistent
17:13 < nsf> type A int; var a A; var b int;
17:13 < nsf> c := a + b;
17:13 < nsf> what's the type of 'c'?
17:13 < waqas> int
17:13 < skelterjohn> + isn't defined for A and int
17:13 < skelterjohn> it's defined for int and int
17:13 < skelterjohn> or A and A
17:13 < nsf> yeah
17:13 < skelterjohn> that would be a compile error
17:13 < nsf> that's the special case
17:14 < nsf> for disallowing implicit conversion in binary ops
17:14 < wrtp> skelterjohn: currently there's no difference between
compatibility and assignment compatibility, i think
17:14 < nsf> if it's allowed for assignment
17:14 < wrtp> nsf: i don't think so
17:14 < zozoR> are there any implicit conversions?
17:14 < nsf> wrtp: yeah
17:14 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
17:14 < nsf> zozoR: some
17:15 < nsf> const abstract types to concrete types
17:15 < nsf> all types to interface types
17:15 < wrtp> zozoR: unnamed types to named types
17:15 < nsf> nil to pointer types and some built-in types
17:15 < zozoR> oh ok :)
17:15 < skelterjohn> the reason that i like and accept is "it's too much
bother to type 'struct {a int}(theOtherType)', so we just do it implicitly"
17:15 < skelterjohn> that is fine with me
17:15 < skelterjohn> but going from struct{a int} to A implicitly doesn't
sit as well
17:15 < skelterjohn> cause you can just A() it
17:16 < nsf> wrtp: you don't think so about what?  :)
17:16 < nsf> wrtp: because you've said what I meant
17:16 < nsf> wrtp | skelterjohn: currently there's no difference between
compatibility and assignment compatibility, i think
17:16 < wrtp> nsf: sorry, i didn't see the "if" in "if it's allowed for
17:16 < nsf> :)
17:16 < nsf> I think it's a valid reason
17:17 < nsf> binop compatibility and assignment compatibility
17:17 < nsf> in Go they are sort of like the same
17:17 < nsf> with few additional statements on the assignment side
17:17 < nsf> as far as I can see
17:18 < nsf> hm..
17:18 < nsf> interesting
17:18 < wrtp> i like the section on "type identity" and "assignability" in
the spec
17:19 < wrtp> it seems nice and simple
17:19 < wrtp> and understanding it doesn't require enumerating all the
built-in types
17:19 -!- gmilleramilar [~gmiller@pool-74-101-133-165.nycmny.fios.verizon.net] has
joined #go-nuts
17:21 < nsf> wrtp: the more important part here
17:22 < nsf> is that binary operators definition links to "identical types"
17:22 < nsf> "Comparisons are discussed elsewhere.  For other binary
operators, the operand types must be identical unless the operation involves
channels, shifts, or untyped constants.  For operations involving constants only,
see the section on constant expressions."
17:22 < nsf> in that case it's really simply defined
17:22 < nsf> the operand types must be identical, unless few simple corner
17:26 < nsf> unfortunately my rules will be more complex
17:26 < nsf> I have pointer arithmetic
17:27 < nsf> and it doesn't make sense allowing implicit conversions from
pointer types to integer types
17:27 < nsf> but it makes sense allowing mixing these in binary ops
17:27 -!- tensai_cirno [~cirno@] has quit [Quit: Leaving]
17:27 < dfr|work> hey, so the default GO license is a special license,
17:28 < dfr|work> I'm trying to figure what's the best LICENSE file to push
with my teeny-weenie go project on github =/
17:28 < nsf> dfr|work: what default GO license means?  :)
17:28 < nsf> there are no "default licenses"
17:28 -!- niekie [~niek@CAcert/Assurer/niekie] has quit [Read error: Operation
timed out]
17:28 < nsf> and you can use whatever license you want
17:29 < nsf> Go itself uses MIT-like license
17:29 < dfr|work> nsf, yea, I know.  But different communities tend to
prefer different licenses: most linux C projects with GPL, Java with Apache, ruby
with MIT, etc
17:29 < dfr|work> nsf, i don't particularly care, I guess..  so wanna take
what majority do ;)
17:29 < dfr|work> nsf, i guess you don't particularly care either :D
17:29 < nsf> well, I don't like GPL, take MIT or zlib
17:29 < nsf> :)
17:30 < nsf> I like the idea of all the information being in a public domain
17:30 < skelterjohn> i use apache when i bother
17:30 < dfr|work> nsf, ditto.
17:30 < skelterjohn> which is only sometimes
17:30 < dfr|work> skelterjohn, okay, apache sounds good, i guess
17:31 < skelterjohn> <- more influential than nsf
17:31 < nsf> because everything you write is only partially yours, for
example you're writing a C program, but you can only do that, because someone
created C programming language
17:31 < nsf> therefore more or less
17:31 < nsf> all information belongs to community
17:31 -!- KBme [~KBme@9angled-2-pt.tunnel.tserv5.lon1.ipv6.he.net] has quit
[Remote host closed the connection]
17:31 < dfr|work> nsf, actually, everything I write is Google's....  so I'm
just trying to properly OSS the project so I can link the github page :D
17:31 < nsf> :D
17:31 < dfr|work> and they force me to select a license...  anyhow
17:32 < dfr|work> not like I expect anyone to use it :P
17:32 < nsf> use MIT then
17:32 -!- niekie [quasselcor@CAcert/Assurer/niekie] has joined #go-nuts
17:32 < nsf> I will say thank you for that
17:32 < nsf> even if I won't use your project :)
17:33 < plexdev> http://is.gd/HwyvdJ by [Russ Cox] in go/ -- CONTRIBUTORS:
John DeNero, Sameer Ajmani (Google CLA)
17:33 < dfr|work> nsf, there's also WTFPL: http://sam.zoy.org/wtfpl/COPYING
17:34 < nsf> I think it's less legaly correct than MIT
17:35 < nsf> and if you don't care about legal issues, public domain is what
you're looking for
17:35 < nsf> but I'm not a layer
17:35 < nsf> and I don't really care, other people do though..  I use MIT
17:36 < dfr|work> nsf, yea...  prolly will go with MIT.  I don't
particularly care for legal issues.  But I have to due to being employed by Google
and them retaining copyright.  So to do properly I do need to release it under a
17:36 < dfr|work> nsf, damn legalities :(
17:37 < nsf> :)
17:37 < skelterjohn> curses, nsf stole him back
17:37 < dfr|work> skelterjohn, I believe you're able to copy it and
re-license it as apache :P
17:37 < skelterjohn> i don't actually know what the difference between MIT
and apache is
17:37 < skelterjohn> i just know that two minutes ago, you were taking my
17:37 < dfr|work> skelterjohn, i think they're both quite similar...
17:37 < skelterjohn> now you're taking nsf's
17:37 < dfr|work> skelterjohn, I'm undecisive like that :P
17:38 < skelterjohn> and I'm hurt.
17:38 < skelterjohn> :'(
17:38 < dfr|work> skelterjohn, plus, you trashed my TDD yesterday :P
17:38 < dfr|work> skelterjohn, the karma strikes back :P
17:38 < skelterjohn> i forgot what a TDD is again
17:38 < dfr|work> skelterjohn, see, you're trashing it yet again!  :P
17:38 < dfr|work> Test Driven development :P
17:38 < skelterjohn> and i forgot the conversation, too
17:38 < skelterjohn> oh yeah
17:38 < skelterjohn> "trashed" haha
17:38 -!- napsy [~luka@] has joined #go-nuts
17:39 -!- m4dh4tt3r [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has joined
17:40 -!- KBme [~KBme@9angled-2-pt.tunnel.tserv5.lon1.ipv6.he.net] has joined
17:40 < dfr|work> skelterjohn, :)
17:40 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.4]
17:42 < wrtp> nsf: why does it make sense to mix pointer and integer types?
17:43 < skelterjohn> whoah, where did that come from?
17:43 -!- sauerbraten [~sauerbrat@p508CDEA1.dip.t-dialin.net] has joined #go-nuts
17:44 < wrtp> skelterjohn: about 15 minutes ago
17:45 < wrtp> "and it doesn't make sense allowing implicit conversions from
pointer types to integer types but it makes sense allowing mixing these in binary
17:45 -!- sauerbraten [~sauerbrat@p508CDEA1.dip.t-dialin.net] has quit [Client
17:45 -!- sauerbraten [~sauerbrat@p508CDEA1.dip.t-dialin.net] has joined #go-nuts
17:47 -!- snearch [~snearch@f053009066.adsl.alicedsl.de] has joined #go-nuts
17:49 -!- nixness [~dsc@] has joined #go-nuts
17:49 < plexdev> http://is.gd/KuKGJS by [Brad Fitzpatrick] in 2 subdirs of
go/src/pkg/http/ -- http: export Transport, add keep-alive support
17:50 -!- SirPlus [~dsc@] has quit [Ping timeout: 252 seconds]
17:50 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:9130:4f1b:d331:fda8] has joined
17:50 -!- foocraft [~dsc@] has quit [Ping timeout: 248 seconds]
17:50 < skelterjohn> i guess he's referring to pointer arithmetic, and I
don't miss it
17:51 -!- iant [~iant@nat/google/x-xhrzuimeovgdlgbr] has quit [Quit: Leaving.]
17:53 < dfr|work> skelterjohn, :'( core dumps always made me nostalgic...
17:54 -!- keithcascio [~keithcasc@nat/google/x-srjknbhndbzkbbqw] has joined
17:56 -!- sysiphus [~opera@unaffiliated/sysiphus] has joined #go-nuts
17:58 -!- arun_ [~arun@unaffiliated/sindian] has quit [Read error: Connection
reset by peer]
17:59 -!- tobier [~tobier@c-1e9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
quit [Read error: Operation timed out]
17:59 -!- DerHorst [~Horst@e176102216.adsl.alicedsl.de] has quit [Remote host
closed the connection]
18:00 -!- tobier [~tobier@c-1e9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
joined #go-nuts
18:02 < wrtp> skelterjohn: but even C doesn't allow implicit conversion
between pointer types and integer types
18:03 < skelterjohn> nothing in what i've suggested includes conversion
between pointers and integers
18:05 < skelterjohn> not that you are actually implying that
18:05 < skelterjohn> so, apologies there
18:05 < skelterjohn> unfortunately nsf left the chatroom, so we might not
learn exactly what he meant
18:05 -!- SirPlus [~dsc@] has joined #go-nuts
18:06 < plexdev> http://is.gd/vuhu50 by [Russ Cox] in 2 subdirs of
go/src/pkg/ -- runtime/pprof: cpu profiling support
18:11 -!- iant [~iant@nat/google/x-rravhypubkzoqhat] has joined #go-nuts
18:11 -!- mode/#go-nuts [+v iant] by ChanServ
18:13 -!- dahankzter [~henrik@92-244-3-192.customers.ownit.se] has joined #go-nuts
18:14 -!- olegfink [~olegfink@92-100-146-220.dynamic.avangarddsl.ru] has quit
[Ping timeout: 240 seconds]
18:18 < skelterjohn> how can I make a regexp to match "build.go:58:
undefined: asf" and give me "build.go", "58" and "undefined: asf"?
18:18 < skelterjohn> "(.+):(.+): (.+)" doesn't do it - it gives me
"build.go:58" for the first token
18:18 < dfr|work> so when the main() exists, all go routines get killed or
18:19 < skelterjohn> oh, maybe if instead of .+ for the 2nd, i did \d+
18:19 < skelterjohn> dfr|work: assuming you meant "exits", yes
18:19 < |Craig|> dfr|work: yes, when main ends, the program quits
18:19 < dfr|work> "([^:]+:([^:]+): (.*)"
18:19 < dfr|work> skelterjohn, ^^
18:20 < dfr|work> skelterjohn, alternative you can make the + non-greedy via
18:20 < skelterjohn> mismatched parens in your regexp
18:20 < dfr|work> skelterjohn, |Craig|: Hmm...  thanks.  That's what I
figured.  =/
18:20 < dfr|work> skelterjohn, "([^:])+:([^:]+): (.*)" <- aircode :P
18:20 < skelterjohn> what is [^:]
18:20 < dfr|work> skelterjohn, anything but :
18:20 < skelterjohn> ah, thanks
18:20 < skelterjohn> killer
18:22 -!- dahankzter [~henrik@92-244-3-192.customers.ownit.se] has quit [Quit:
18:22 < ww> maybe to be safe [^:\s]+
18:23 < ww> or [^: \t]+ or whatever idiom for whitespace we have...
18:23 < ww> unless we want files to contain whitespace...
18:23 < skelterjohn> i'm guaranteed that it is output from 6g though
18:24 < skelterjohn> can a file have a ':' in it?
18:24 * ww is tempted to put : in a filename just to be contrary...
18:24 < dfr|work> skelterjohn, sure.
18:24 < ww> skelterjohn: no reason wy not
18:24 < skelterjohn> well, it's the path splitter for unix
18:24 < ww> only character that isn't allowed in a file name is /
18:24 < dfr|work> skelterjohn, but if I were you I'd not worry about it.  :P
18:24 < dfr|work> ww, really?  =/
18:25 < dfr|work> ww, :(
18:25 < ww> dfr|work: unix anyways...  or so my memory for trivia is telling
18:25 -!- ShadowIce
[~pyoro@HSI-KBW-109-193-120-162.hsi7.kabel-badenwuerttemberg.de] has joined
18:25 -!- ShadowIce
[~pyoro@HSI-KBW-109-193-120-162.hsi7.kabel-badenwuerttemberg.de] has quit
[Changing host]
18:25 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
18:26 < dfr|work> ww, yea, seems like it just assumes it's a directory...
wikipedia also says the same =/
18:28 < dfr|work> argh...  how am i supposed to do event looping =/
18:28 -!- tensorpudding [~user@] has joined #go-nuts
18:28 -!- olegfink [~olegfink@ppp92-100-69-165.pppoe.avangarddsl.ru] has joined
18:29 < dfr|work> oh well, I'll figure it out eventually...
18:31 -!- Fish- [~Fish@9fans.fr] has joined #go-nuts
18:33 < skelterjohn> need a bit more context if i am to offer a suggestion
18:34 < dfr|work> skelterjohn,
18:34 < dfr|work> skelterjohn, so that's how my thingie looks right now.
That "Loop" blocks it.
18:34 < dfr|work> skelterjohn, because it reads info from server, and when
it gets stuff, it then fires events
18:34 < dfr|work> skelterjohn, so I tried to make it a goroutine, however as
main doesn't wait for anything, it'll just exit, killing the go routine....
18:35 < dfr|work> skelterjohn, theoretically I can maybe pass some channels
around to wait for it, but the go routing is pretty deep inside of it....  so it
feels a tad icky.
18:36 < skelterjohn> why not have main's goroutine do the "read info from
server" bit?
18:36 < skelterjohn> then it won't die
18:36 -!- TheMue [~TheMue@p5DDF623F.dip.t-dialin.net] has joined #go-nuts
18:37 < dfr|work> skelterjohn, well, because I feel it's better done with
the client -- all the parsing of the messages.  If I expose something like DoStuff
that'd be effectively polling..  and I'd probably prefer more event-driven design
18:37 < dfr|work> if that makes any sense at all
18:38 < dfr|work> skelterjohn, of course what I was gonna do is throw in the
towel and not worry about it...  After all the .Loop is just fine for now.  And
then improve it once I get into its deficiencies =/
18:38 < plexdev> http://is.gd/yYmatK by [Russ Cox] in go/src/cmd/gofmt/ --
gofmt: add profiling flag
18:38 < wrtp> dfr|work: i'd be tempted to use (.*):([0-9]+):(.*) 
18:38 < plexdev> http://is.gd/u56WEr by [Albert Strasheim] in
go/src/pkg/syscall/ -- syscall: GetsockoptInt.
18:38 < |Craig|> I sometimes just put a permeant block at the end of my main
if the app is never supposed to quit itself
18:39 < skelterjohn> "select {}" ftw
18:39 < dfr|work> |Craig|, skelterjohn: yea, I think that's actually a good
18:39 < |Craig|> skelterjohn: does that block forever?  I havent used that
18:39 < dfr|work> that will allow a bunch of eventful goroutines to hang out
to each other...
18:39 < skelterjohn> yes
18:41 -!- arvindht_ [c2ed8e11@gateway/web/freenode/ip.] has quit
[Ping timeout: 252 seconds]
18:41 -!- tefla [5006eb84@gateway/web/freenode/ip.] has joined
18:42 < wrtp> dfr|work: that will work on filenames with spaces and colons
in too
18:44 < dfr|work> wrtp, well, actually it was skelterjohn that originally
asked the question.  And I'm being pragmatic about it -- chances are he won't get
files with colons.  If my regex works for him -- great.  If yours works better --
even more awesome.  :)
18:44 < skelterjohn> ideally it would work with any file
18:45 < skelterjohn> but what about the string "somefile:93: here is a weird
error:23 ok and some more text"
18:45 < skelterjohn> then wouldn't it put "somefile:93: here is a weird
error" as the first match
18:45 < skelterjohn> 23 as the second, and "ok and some more" as the 3rd?
18:46 -!- snearch [~snearch@f053009066.adsl.alicedsl.de] has quit [Quit:
18:46 < skelterjohn> just have to rely on people being reasonable, i guess
18:47 < wrtp> skelterjohn: yes it would, but the set of errors is much more
constrained than the set of file names
18:47 < skelterjohn> that is true
18:47 < wrtp> actually, no it wouldn't
18:47 < wrtp> becasue the second :23 is not followed immediately by a colon
18:48 < skelterjohn> ah, then follow it by a colon to make the point :)
18:48 < skelterjohn> my mistake
18:48 < wrtp> sure, i don't think that'll happen though
18:48 < wrtp> (
18:48 < wrtp> alt
18:48 < wrtp> hou
18:48 < wrtp> th
18:48 < wrtp> (although your example probably will, with redeclaration
18:49 < skelterjohn> maybe i can do the non-greedy match
18:49 < skelterjohn> .+?, dfr|work said
18:50 < dfr|work> skelterjohn, if I were you, I'd basically write a test
that it parses certain things.  And just keep adding it for edge-cases that it may
fail.  :P
18:51 < skelterjohn> you and your TDD
18:51 < dfr|work> skelterjohn, and if that looks good enough, just commit it
and move on...  And if you get a report error, add it, and fix it..  etc
18:51 < dfr|work> skelterjohn, yes.  That way you'll define what format your
code parses :P
18:52 < dfr|work> skelterjohn, that way you'll have your mind at ease that
it probably works as intended, and if there's a bug or whatever, pretty easy to
address it.  :)
18:52 < skelterjohn> i prefer the wild-west approach
18:52 < skelterjohn> i'm mavricky
18:52 < dfr|work> skelterjohn, well, I bet you're still gonna try it out.
Just you're gonna do it by running the program and providing the thingie as a
param :P
18:53 < skelterjohn> it's certainly a great opportunity to add some test
cases, i agree
18:54 < dfr|work> skelterjohn, but yea..  if you're not too particularly
worried about parsing, I'd certainly wouldn't worry about it either.
18:54 < dfr|work> skelterjohn, like my go xmpp bot thing, I still need to
figure out how to stub out the talkign to the server, once I decide to start
adding good handling of errors and what not.
18:54 < dfr|work> but one thing at a time...  ;)
18:55 < skelterjohn> times like these i'm glad gb supports testing of cmds,
even though "make test" does not
18:57 -!- iant [~iant@nat/google/x-rravhypubkzoqhat] has quit [Quit: Leaving.]
19:05 -!- Venom_X [~pjacobs@] has quit [Quit: Venom_X]
19:06 -!- aho [~nya@fuld-590c78ab.pool.mediaWays.net] has joined #go-nuts
19:14 -!- femtoo [~femto@95-89-249-242-dynip.superkabel.de] has joined #go-nuts
19:14 -!- tefla [5006eb84@gateway/web/freenode/ip.] has quit [Ping
timeout: 252 seconds]
19:18 -!- kurt [kurt@pdpc/supporter/active/kurt] has quit [Quit: leaving]
19:19 -!- lmoura [~lauromour@] has quit [Read error: Connection reset
by peer]
19:21 -!- lmoura [~lauromour@] has joined #go-nuts
19:21 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-155-88.clienti.tiscali.it] has
joined #go-nuts
19:24 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-154-99.clienti.tiscali.it] has
quit [Ping timeout: 240 seconds]
19:29 -!- iant [~iant@nat/google/x-pdktfwwkknnrhgak] has joined #go-nuts
19:29 -!- mode/#go-nuts [+v iant] by ChanServ
19:31 -!- littlebobby [~bob@unaffiliated/littlebobby] has joined #go-nuts
19:34 -!- viirya [~viirya@cml506-25.csie.ntu.edu.tw] has quit [Read error:
Connection reset by peer]
19:34 -!- viirya [~viirya@cml506-25.csie.ntu.edu.tw] has joined #go-nuts
19:35 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-155-88.clienti.tiscali.it] has
quit [Quit: E se abbasso questa leva che succ...]
19:47 -!- perdix [~mkhl@sxemacs/devel/perdix] has joined #go-nuts
19:50 -!- perdix [~mkhl@sxemacs/devel/perdix] has quit [Remote host closed the
19:50 -!- perdix [~mkhl@sxemacs/devel/perdix] has joined #go-nuts
19:57 -!- sauerbraten [~sauerbrat@p508CDEA1.dip.t-dialin.net] has quit [Remote
host closed the connection]
19:58 -!- sysiphus [~opera@unaffiliated/sysiphus] has quit [Remote host closed the
19:58 -!- rtharper [~tomh@unaffiliated/sioraiocht] has joined #go-nuts
20:02 -!- tensai_cirno [~cirno@] has joined #go-nuts
20:02 -!- geocalc [~geobsd@lns-bzn-56-82-255-235-145.adsl.proxad.net] has quit
[Quit: leaving]
20:12 -!- imsplitbit [~imsplitbi@] has quit [Quit: Bye!]
20:16 -!- arun_ [~arun@pool-108-18-145-233.washdc.fios.verizon.net] has joined
20:16 -!- arun_ [~arun@pool-108-18-145-233.washdc.fios.verizon.net] has quit
[Changing host]
20:16 -!- arun_ [~arun@unaffiliated/sindian] has joined #go-nuts
20:40 -!- chimes_ [~chimes@] has joined #go-nuts
20:52 -!- itrekkie [~itrekkie@ip72-201-208-165.ph.ph.cox.net] has joined #go-nuts
20:57 -!- tobel [~tobel@pD9E8AC05.dip.t-dialin.net] has joined #go-nuts
20:57 -!- tobel [~tobel@pD9E8AC05.dip.t-dialin.net] has quit [Client Quit]
21:01 -!- Venom_X [~pjacobs@] has joined #go-nuts
21:03 -!- mertimor [~Adium@p5DC1D108.dip.t-dialin.net] has joined #go-nuts
21:04 -!- femtoo [~femto@95-89-249-242-dynip.superkabel.de] has quit [Ping
timeout: 252 seconds]
21:04 -!- mertimor [~Adium@p5DC1D108.dip.t-dialin.net] has left #go-nuts []
21:04 -!- mertimor [~Adium@p5DC1D108.dip.t-dialin.net] has joined #go-nuts
21:09 -!- littlebobby [~bob@unaffiliated/littlebobby] has quit [Quit: Ex-Chat]
21:09 -!- emjayess [~emjayess@pix1.i29.net] has quit [Ping timeout: 260 seconds]
21:20 < ww> is there a way to disable the tests when building go?
21:21 < ww> trying to build the arm cross-compiler seems to work but blows
up on the tests before it installs
21:21 < pharris> ww: Run make.bash instead of all.bash
21:22 -!- emjayess [~emjayess@pix1.i29.net] has joined #go-nuts
21:24 < ww> pharris: oh, actually it had installed...  just in the wrong
place because i set GOBIN wrongly...
21:25 < ww> not sure that it is correct to have build things like goinstall
as arm though...  because of course they cannot execute
21:26 < plexdev> http://is.gd/M5za89 by [Brad Fitzpatrick] in
go/src/cmd/gotest/ -- gotest: fix gofmt issue in generated _testmain.go
21:26 < kamaji> Is it bad to allow "nil" as an argument to a function?
21:27 < kamaji> as in a nil value
21:28 < ww> i don't think so, but if it is possible that your value is nil
best to check lest you panic
21:30 < kamaji> yeah, if it's nil i'm making the object that would normally
be passed
21:33 -!- schmrkc [~marcus@sxemacs/devel/schme] has quit [Ping timeout: 240
21:34 -!- fabled [~fabled@] has quit [Quit: Ex-Chat]
21:36 < ww> hrmmm...  ok so a basic arm binary, func main() { println("hello
world") } works on an android phone...
21:37 < ww> but using log or fmt blows up because it tries to initialise
math.asin, presumably floating point problems
21:37 < ww> SIGILL: illegal instruction
21:37 < ww> 0x70040ebc] math.init·1+0x28
21:38 < ww> ...
21:38 < skelterjohn> that line is blank for me
21:39 < ww> skelterjohn: curioser and curioser
21:40 -!- skelterjohn [~jasmuth@lawn-gw.rutgers.edu] has quit [Quit: skelterjohn]
21:42 < plexdev> http://is.gd/Sqsznl by [Brad Fitzpatrick] in
go/src/pkg/http/ -- http: don't chunk 304 responses
21:46 < ww> aha...  GOARM=5 fixed it
21:49 -!- ronnyy [~quassel@p4FF1C687.dip0.t-ipconnect.de] has joined #go-nuts
21:52 -!- artefon [~thiago@] has quit [Quit: bye]
21:53 -!- emjayess [~emjayess@pix1.i29.net] has quit [Quit: Leaving]
21:54 -!- bortzmeyer [~stephane@2a01:e35:8bd9:8bb0:9130:4f1b:d331:fda8] has quit
[Quit: Leaving.]
22:01 -!- schmrkc [~marcus@c83-254-205-76.bredband.comhem.se] has joined #go-nuts
22:01 -!- schmrkc [~marcus@c83-254-205-76.bredband.comhem.se] has quit [Changing
22:01 -!- schmrkc [~marcus@sxemacs/devel/schme] has joined #go-nuts
22:04 -!- dfc [~dfc@sydfibre2.atlassian.com] has joined #go-nuts
22:12 -!- zozoR [~Morten@56344966.rev.stofanet.dk] has quit [Remote host closed
the connection]
22:13 < ww> ok...  now cgo
22:14 < ww> 5l -o expcmd _go_.5
22:14 < ww> make[1]: *** [expcmd] Segmentation fault
22:14 < ww> make[1]: *** Deleting file `expcmd'
22:14 < plexdev> http://is.gd/A4V4SB by [Luuk van Dijk] in 3 subdirs of
go/src/cmd/ -- 5l/6l/8l: undo spadj cleanup at ARET for following instructions in
the same stackframe.
22:15 < ww> aha...  of course...  wrong GCC
22:16 < str1ngs> ww: if it catches fire warranty is void :P
22:16 < steven> when will go work on solaris
22:16 < str1ngs> when you port it
22:19 -!- TheMue [~TheMue@p5DDF623F.dip.t-dialin.net] has quit [Quit: TheMue]
22:21 -!- napsy [~luka@] has quit [Quit: leaving]
22:30 -!- Natch [~natch@c-6dcde155.25-4-64736c10.cust.bredbandsbolaget.se] has
joined #go-nuts
22:31 -!- Natch| [~natch@c-6dcde155.25-4-64736c10.cust.bredbandsbolaget.se] has
quit [Read error: Operation timed out]
22:31 < plexdev> http://is.gd/Wkw6BJ by [Russ Cox] in 3 subdirs of go/src/
-- testing: add -test.cpuprofile flag
22:32 -!- wrtp [~rog@] has quit [Quit: wrtp]
22:32 -!- rlab [~Miranda@] has quit [Quit: Miranda IM! Smaller,
Faster, Easier.  http://miranda-im.org]
22:33 -!- mertimor [~Adium@p5DC1D108.dip.t-dialin.net] has quit [Quit: Leaving.]
22:36 -!- Venom_X [~pjacobs@] has quit [Quit: Venom_X]
22:39 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit:
22:41 -!- pharris [~Adium@rhgw.opentext.com] has quit [Quit: Leaving.]
22:41 -!- Fish- [~Fish@9fans.fr] has quit [Quit: So Long, and Thanks for All the
22:41 -!- awidegreen [~quassel@c-eacae555.08-2-73746f39.cust.bredbandsbolaget.se]
has quit [Remote host closed the connection]
23:01 -!- piranha [~piranha@5ED43A0B.cm-7-5a.dynamic.ziggo.nl] has quit [Quit:
Computer has gone to sleep.]
23:14 -!- ajstarks [~ajstarks@pool-98-109-198-180.nwrknj.fios.verizon.net] has
joined #go-nuts
23:22 -!- iant [~iant@nat/google/x-pdktfwwkknnrhgak] has quit [Quit: Leaving.]
23:26 -!- gid [~gid@220-253-20-152.VIC.netspace.net.au] has joined #go-nuts
23:34 -!- iant [~iant@] has joined #go-nuts
23:34 -!- mode/#go-nuts [+v iant] by ChanServ
23:38 -!- gid [~gid@220-253-20-152.VIC.netspace.net.au] has quit [Quit: Leaving.]
23:41 -!- gid [~gid@220-253-20-152.VIC.netspace.net.au] has joined #go-nuts
23:51 -!- jgonzalez [~jgonzalez@173-14-137-134-NewEngland.hfc.comcastbusiness.net]
has quit [Ping timeout: 255 seconds]
23:55 -!- gid [~gid@220-253-20-152.VIC.netspace.net.au] has quit [Quit: Leaving.]
--- Log closed Thu Mar 24 00:00:50 2011