--- Log opened Sat Jul 09 00:00:55 2011
00:05 -!- iant [~iant@67.218.103.165] has joined #go-nuts
00:05 -!- mode/#go-nuts [+v iant] by ChanServ
00:07 -!- gtaylor [~gtaylor@108-196-160-120.lightspeed.tukrga.sbcglobal.net] has
joined #go-nuts
00:17 -!- Phelps [~benphelps@2001:470:1f0f:2fa:223:dfff:fe86:95ae] has quit [Quit:
Linkinus - http://linkinus.com]
00:20 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has joined #go-nuts
00:23 -!- gtaylor [~gtaylor@108-196-160-120.lightspeed.tukrga.sbcglobal.net] has
quit [Quit: gtaylor]
00:33 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has quit [Remote host
closed the connection]
00:55 -!- kinofcain [~KinOfCain@h-64-105-141-42.snvacaid.static.covad.net] has
quit [Quit: kinofcain]
00:58 -!- bmizerany [~bmizerany@204.14.152.118] has quit [Remote host closed the
connection]
00:59 -!- rael_wiki [~chatzilla@unaffiliated/rael-wiki/x-8420294] has quit [Quit:
ChatZilla 0.9.87 [Firefox 8.0a1/20110707030839]]
01:02 -!- iant [~iant@67.218.103.165] has quit [Quit: Leaving.]
01:17 -!- Dr_Who [~tgall_foo@linaro/tgall-foo] has joined #go-nuts
01:19 -!- keithcascio [~keithcasc@nat/google/x-wjlpgpnfqpjvrmqb] has quit [Quit:
Leaving]
01:26 -!- alehorst [~alehorst@189.115.80.233] has joined #go-nuts
01:39 -!- kergoth__ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has quit [Read
error: Connection reset by peer]
01:40 < grai> weird things happen when I directly call a function literal
that returns multiple values:
01:40 < grai>
http://pastie.org/pastes/2185893/text?key=eweksyznr8s0xqlqugdoya
01:40 -!- smw [~stephen@unaffiliated/smw] has quit [Remote host closed the
connection]
01:40 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has joined #go-nuts
01:41 < grai> am I doing something wrong?
01:49 -!- crazy2be [~crazy2be@d75-152-167-124.abhsia.telus.net] has joined
#go-nuts
01:50 < crazy2be> wooo make() vs new()!
01:51 < crazy2be> also the reddit thread is really angry for some reason
01:51 < exch> it's reddit.  what did you expect?
01:53 -!- Queue29 [~Queue29@egress-w.sfo1.yelpcorp.com] has quit [Remote host
closed the connection]
01:53 < crazy2be> it's worse than slashdot
01:53 < crazy2be> I used to enjoy reading comments on there
01:54 < crazy2be> now I can predict what they will say with about 90%
accuracy after reading the article title
01:54 < crazy2be> and usually they are wrong and/or misinformed
01:55 < exch> grai: that looks peculiar.  Trying that myself, yields 0, 0
for the first case
01:56 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has joined #go-nuts
01:56 -!- mode/#go-nuts [+v iant] by ChanServ
01:56 < vsmatck> Haters gonna hate.
01:56 < exch> Same result in second case
01:56 < exch> that looks wrong
01:57 < exch> grai: Best file a bug report
01:57 < crazy2be> vsmatck: I suppose so, but it also seems like they are
choosing such a small bit to fight over
01:58 < crazy2be> i mean, new() vs make()?
01:58 < crazy2be> that's basically ire
01:58 < crazy2be> (meant to backspace that last line but pressed enter
instead)
01:58 < grai> exch: ok, will do
01:59 < crazy2be> it's a very small thing, and one you can easily get used
to
01:59 < grai> exch: "Same result" meaning it segfaults like on my computer?
01:59 < crazy2be> as opposed to all the **** you have to deal with in tons
of other languages
01:59 < Namegduf> new() vs make() seems weird at first, then you learn that
it's about initialisation differing needs
01:59 < Namegduf> And hopefully you then realise that that applies to all
types in general and learn something
01:59 < crazy2be> but I guess it's just crap you are used to vs new crap
02:00 < crazy2be> Namegduf: I think the primary difficulty for new users is
not the difference between the functions, but the fact that new() is called new,
and new does something very different in other languages
02:00 < vsmatck> Weren't they talking about combining new/make a long time
ago?
02:01 < exch> grai: yes (3 and segfault)
02:01 < crazy2be> e.g.  in C++, new() does what make() does in go
02:01 < Namegduf> Yeah, but nothing seemd quite right.
02:01 < Namegduf> In C++, new absorbs what make does, and instead of knowing
whether you need to use a make() function or a constructor function()
02:01 < Namegduf> You need to know about parameters to pass it
02:01 < Namegduf> Same problem, different form, IMO.
02:02 < crazy2be> If they had called it alloc() or something there might
have been less confusion, but alloc() doesn't seem as clean to me
02:02 < Namegduf> Admittably, the need for parameters is more obvious than
the potential need for internal initialisation, but it's still there.
02:02 < Namegduf> I'm not a big fan of the make(*T) idea
02:03 < angasule> well, new in C++ replaced, sort of, malloc in C, and
malloc in C is pretty much new in Go. I'm a C->C++->Go guy and I have no
problem with new/make
02:03 < Namegduf> Yeah.
02:04 < crazy2be> Make: "Form (something) by putting parts together or
combining substances; construct; create"
02:04 < angasule> Objective C does [[Object alloc] init], which is
allocation followed by initialisation
02:05 < Namegduf> My problem with *T in make() is that right now, for stuff
it takes
02:05 < crazy2be> New: "Not existing before; made, introduced, or discovered
recently or now for the first time"
02:05 < Namegduf> make() is the right way to create an initialised, working
instance of it.
02:05 < angasule> a friend who likes Scala has been complaining about Go
having generics for the native types, but not for user defined ones
02:05 < Namegduf> make(*T) will *not* make that true for user defined Ts
which need initialisation
02:05 < angasule> crazy2be: you forgot "shiny" :-)
02:05 < Namegduf> It's technically speaking consistent with []T
02:07 < crazy2be> angasule: They are attempting to add generics, and have
been for some time
02:07 < crazy2be> but there's no solution they like
02:07 < Namegduf> Go doesn't "have generics"
02:07 < Namegduf> Full stop
02:07 < crazy2be> Namegduf: make() is generic
02:07 < exch> oh god, can we drop this silly discussion already?  :p
02:07 < crazy2be> er
02:07 < Namegduf> Not really
02:07 < crazy2be> new()
02:07 < Namegduf> make() and new() break the rules and amongst other things
take types, which are not values, as parameters
02:07 < Namegduf> That's a way bigger rule broken than generics, even.
02:08 < crazy2be> exch: Would you rather talk about politics?  :P
02:08 < angasule> crazy2be: I know, I've been meaning to look at gotgo, see
its pitfalls, etc
02:08 < Namegduf> They take things which aren't values, as parameters.
02:08 < angasule> crazy2be: vim rules?  :-)
02:08 * crazy2be never really liked vim :P
02:09 < Namegduf> Anyways, my real complaint with that complaint is that to
say it has "generics for some types but not others" implies there's an
implementation of generics, definitions of generic types, and it's just
arbitrarily restricted
02:09 < Namegduf> While, well, it isn't.
02:09 < angasule> crazy2be: heathen.
02:09 < Namegduf> Those functions break the rules but they're not written in
Go.
02:09 < exch> I'd prefer a discussion that would actuallylead somewhere :p
02:10 < angasule> exch: well, since I'm lazy but in the mood to talk about
generics, what about gotgo?  what is good and bad about that possibility?
02:10 < crazy2be> Namegduf: True, but you also have map[string]string that
can have arbitrary types.  You can't make a map with an arbitrarilly optimized
argorithm as a user of the language, and I think that's what many people complain
about
02:10 < crazy2be> unless you make one for each type you want to use it with
02:11 < Namegduf> True, but map[string]string isn't written in Go.
02:11 < Namegduf> IMO a more accurate way to say it is that Go types don't
have generics.
02:11 < exch> angasule: I ouldn't know..  I never used it.  I was referring
to the whole new() vs make() thing :)
02:12 < Namegduf> Types provided in core which aren't written in Go can, but
that doesn't mean there's even a small part of a solution for a way to define
generics implemented
02:12 -!- ccc1 [~Adium@220-136-29-155.dynamic.hinet.net] has joined #go-nuts
02:12 < Namegduf> I guess the suggestion that there's a solution there but
it's been broken/restricted/sucks bugs me.
02:12 < crazy2be> Personally, i've never had to write an alternative map
implementation, so i'm not sure what people are complaining about
02:12 < Namegduf> I have, and I don't care that much.
02:13 < Namegduf> I instantiate using sed and cp
02:13 < Namegduf> Not in that order
02:13 < crazy2be> and you *can* do that if you need to, but it's not
syntactically convenient
02:13 < Namegduf> I used to use gofmt, which is a much nicer way than sed.
02:13 < crazy2be> Namegduf: You change the functions in the stdlib?
02:13 < Namegduf> No, I wrote a package defining a trie structure
02:14 < Namegduf> Because I needed a structure which could let subtrees be
iterated.
02:14 < Namegduf> I just did what Vector did.
02:16 < Namegduf> Kinda annoying, yeah
02:16 -!- moraes [~moraes@189.103.188.201] has quit [Ping timeout: 240 seconds]
02:16 < Namegduf> Worse than the consequences generics would have to the
rest of the code in terms of complexity?
02:16 < Namegduf> Or the language in general?
02:16 -!- yogib [~kaiser@dslb-178-009-079-088.pools.arcor-ip.net] has quit [Remote
host closed the connection]
02:16 < Namegduf> I unno, depends on whether they can find a good proposal
or not.
02:17 < crazy2be> well generally it's pretty rare to need an alternate
implementation for more than a couple types
02:17 < crazy2be> in my experience
02:17 < crazy2be> YMMV
02:25 -!- Queue29 [~Queue29@173-8-182-114-SFBA.hfc.comcastbusiness.net] has joined
#go-nuts
02:35 -!- gridaphobe [~gridaphob@cpe-74-68-151-24.nyc.res.rr.com] has quit [Remote
host closed the connection]
02:39 -!- Sep102_ [~Sep102@c-71-227-179-131.hsd1.wa.comcast.net] has joined
#go-nuts
02:41 -!- Sep102__ [~Sep102@c-71-227-179-131.hsd1.wa.comcast.net] has quit [Ping
timeout: 252 seconds]
02:47 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts
02:53 -!- bugQ [~bug@c-71-195-207-34.hsd1.ut.comcast.net] has quit [Ping timeout:
250 seconds]
02:55 -!- nteon_ [~nteon@c-98-210-195-105.hsd1.ca.comcast.net] has joined #go-nuts
03:00 -!- bugQ [~bug@c-71-195-207-34.hsd1.ut.comcast.net] has joined #go-nuts
03:02 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
03:06 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
03:07 -!- nteon_ [~nteon@c-98-210-195-105.hsd1.ca.comcast.net] has quit [Ping
timeout: 260 seconds]
03:08 -!- nteon_ [~nteon@c-98-210-195-105.hsd1.ca.comcast.net] has joined #go-nuts
03:08 < angasule> dum de dum
03:08 < angasule> I'm writing an IRC server
03:09 -!- mdxi [~mdxi@li11-97.members.linode.com] has quit [Quit: leaving]
03:09 -!- chanwit [~chanwit@223.207.103.105] has joined #go-nuts
03:15 -!- lucian [~lucian@78-86-217-168.zone2.bethere.co.uk] has quit [Remote host
closed the connection]
03:17 -!- bugQ [~bug@c-71-195-207-34.hsd1.ut.comcast.net] has quit [Ping timeout:
250 seconds]
03:25 -!- erus` [~chatzilla@host86-162-228-176.range86-162.btcentralplus.com] has
quit [Remote host closed the connection]
03:37 -!- neshaug [~oyvind@213.239.108.5] has quit [Ping timeout: 246 seconds]
03:38 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has quit [Quit:
WeeChat 0.3.0]
03:38 < crazy2be> angasule: There's a few of those aroud already :P
03:39 < crazy2be> but a fun excercise none the less
03:39 -!- ccc1 [~Adium@220-136-29-155.dynamic.hinet.net] has quit [Quit: Leaving.]
03:39 < angasule> crazy2be: yeap, just for fun
03:40 < angasule> every user and every channel will have a goroutine
03:40 < angasule> I'm sure that's the most efficient way to go :-P
03:40 < angasule> I guess I could do it properly, but meh
03:45 < crazy2be> that's less fun if you do it properly :P
03:46 < angasule> yup
03:46 < angasule> well, not necessarily, but I'm mostly just messing around
03:47 < angasule> for example, "researching the IRC protocol" involves
joining channels with telnet and being silly
03:48 -!- angasulino [~pep@190.2.33.49] has joined #go-nuts
03:48 < angasulino> mana mana!
03:48 -!- angasulino [~pep@190.2.33.49] has left #go-nuts []
03:49 < crazy2be> can't do that with xmpp
03:54 < angasule> nope, muppets don't like xmpp
03:54 -!- _nil [~ct@c-67-189-251-116.hsd1.ct.comcast.net] has quit [Read error:
Connection reset by peer]
03:54 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has joined
#go-nuts
03:55 -!- kergoth_ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has quit [Quit:
Computer has gone to sleep.]
04:05 -!- rejb [~rejb@unaffiliated/rejb] has quit [Disconnected by services]
04:05 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
04:17 -!- Varriount [~Varriount@67.222.157.172] has joined #go-nuts
04:20 < cmike_> i think I may make a mercurial backup to s3 go-app
04:20 < crazy2be> I've got this idea: https://github.com/crazy2be/htmlsuds
04:20 -!- Bigbear1 [~Cody@d75-158-131-113.abhsia.telus.net] has quit [Read error:
Connection reset by peer]
04:20 < crazy2be> but it turns out tree-based parsers and representations
are difficult
04:20 < crazy2be> :P
04:21 < crazy2be> I'm getting there, just trying to figure out what order to
process the @tags
04:21 < crazy2be> e.g.  innermost first or outermost first
04:21 < crazy2be> since each handler for a tag can output arbitrary HTML
04:21 < crazy2be> or anything really
04:28 -!- Queue29 [~Queue29@173-8-182-114-SFBA.hfc.comcastbusiness.net] has quit
[Remote host closed the connection]
04:30 < crazy2be> but the idea was basically that each @tag corresponds to a
command
04:30 < crazy2be> and the content of that tag would be passed to the command
on STDIN
04:30 < crazy2be> and then it would pass out arbitrary HTML on STDOUT
04:31 < crazy2be> the attributes would be passed as flags like so:
-src="/js/foo.js"
04:31 < crazy2be> thus you could make arbitrary mappings of commands to html
04:36 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has joined #go-nuts
04:39 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has quit [Ping
timeout: 250 seconds]
04:39 -!- iant [~iant@216.239.45.130] has joined #go-nuts
04:39 -!- mode/#go-nuts [+v iant] by ChanServ
04:45 -!- ccc1 [~Adium@42-72-236-108.dynamic-ip.hinet.net] has joined #go-nuts
04:46 -!- Bigbear1 [~Cody@d75-158-131-113.abhsia.telus.net] has joined #go-nuts
04:51 -!- icey [u2593@gateway/web/irccloud.com/x-apkzldlslrypswjs] has joined
#go-nuts
04:53 -!- Dr_Who [~tgall_foo@linaro/tgall-foo] has quit [Quit: ZZZZZzzzzz]
04:53 < cmike_> anyone using github for mac?
04:54 < cmike_> the desktop app
04:56 < nteon_> cmike_: not me, sorry :)
04:56 < nteon_> anyone have experience with gob?
04:56 < nteon_> it seems gob can't encode slices
04:56 -!- hopelessnewbie [~antonio@123.120.134.253] has joined #go-nuts
04:56 -!- chanwit [~chanwit@223.207.103.105] has quit [Quit: Leaving.]
04:56 < hopelessnewbie> hello go nuts
04:57 < kevlar> nteon_: sure it can
04:57 -!- ccc1 [~Adium@42-72-236-108.dynamic-ip.hinet.net] has quit [Ping timeout:
258 seconds]
04:58 < hopelessnewbie> i've followed the steps outlined in
http://blog.golang.org/2011/06/profiling-go-programs.html and it appears that most
of the rime running my program is spent in something called "itam", can someone
enlighten me to what that is ?
04:59 < kevlar> wow, that's a new one
04:59 < kevlar> give me a sec.
05:00 < hopelessnewbie> i think it has something to do with interface type
conversion
05:01 -!- cmike_ [~cmike@adsl-99-75-50-144.dsl.bltnin.sbcglobal.net] has quit
[Remote host closed the connection]
05:01 -!- squeese [~squeese@cm-84.209.17.156.getinternet.no] has quit [Remote host
closed the connection]
05:02 < kevlar> I can't find that anywhere in the code base...
05:03 -!- Adys [~Adys@unaffiliated/adys] has quit [Read error: Operation timed
out]
05:03 < hopelessnewbie> oops
05:03 < hopelessnewbie> sorry
05:03 < hopelessnewbie> it's itab
05:03 < hopelessnewbie> not itam
05:04 < kevlar> yeah, I thought so.
05:04 < hopelessnewbie> damn fat fingers
05:04 < kevlar> lol, I feel oyu.
05:04 * kevlar rofls
05:05 < hopelessnewbie> i pasted my code here:http://pastie.org/2186437
05:05 < hopelessnewbie> i think it's the a2 :=
a.(slowgraph.EdgeIface).Weight() stuff that's casing the problem
05:06 < hopelessnewbie> but it's taking like 50% of the time to do the itab
thing
05:07 < kevlar> so, you could probably benefit from doing an aEdge :=
a.(slowgraph.EdgeIface)
05:07 < kevlar> so the interface conversion costs less
05:07 < hopelessnewbie> yes, i tried that too
05:08 < hopelessnewbie> it's almost the same
05:08 < kevlar> also, type assertions on interface{} cost a lot more than a
non-empty interface
05:08 < hopelessnewbie> hmmm
05:08 < kevlar> I don't see why you're using it anyway, since you know
exactly the type you're using
05:08 < hopelessnewbie> i have to use interface{} becasue of the GoLLRB
library
05:09 < hopelessnewbie> or at least i thought so
05:09 < hopelessnewbie> you think i can replace interface{} with interface
slowgraph.EdgeIface ?
05:10 < kevlar> that would certainly be preferable
05:10 < crazy2be> interface{} is hardly ever a good idea
05:10 < hopelessnewbie> let me try
05:10 < crazy2be> just write python if you want that
05:10 < crazy2be> *shudder
05:10 < hopelessnewbie> heh
05:11 < hopelessnewbie> i was told i had to use the empty one there
05:11 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Quit: Leaving]
05:12 < kevlar> this is one reason why the Sort interfaces are defined the
way they are
05:12 < kevlar> you'll notice that it isn't "Define Less(other interface{})
for your type and it all works nicely"
05:12 -!- Bigbear1 [~Cody@d75-158-131-113.abhsia.telus.net] has quit [Read error:
Connection reset by peer]
05:13 < kevlar> so if GoLLRB requires interface{} methods in the interface,
it probably needs to be rethrought
05:13 < crazy2be> why is it that Len() is not a method on []slices in the
first place?
05:13 < crazy2be> Just curious
05:13 < crazy2be> was there a ml discussion on that?
05:13 < kevlar> crazy2be: there have been many
05:14 < crazy2be> I figured :P
05:14 < kevlar> and it comes down to a lack of magic
05:14 < kevlar> that would be a "magical" method and might allow a naked
slice to implement a nonempty interface
05:14 < crazy2be> hm
05:15 < crazy2be> I kinda like how C# does that
05:15 < crazy2be> there's methods like Len() Swap() or such that you
implement in a class
05:15 < crazy2be> and then you can be used as a generic container
05:15 < kevlar> and it can pretend to be the basic type?
05:15 < kevlar> yeah, thatls what we're trying to avoid ;-)
05:15 < crazy2be> [] is just syntactic sugar
05:15 < kevlar> too magical.
05:15 < crazy2be> well, it's an interesting tradeoff
05:16 < kevlar> as soon as something starts happening that I can't see
directly in code, the magic threshold is passed.
05:16 < crazy2be> ah
05:16 < crazy2be> but [] does magic
05:16 < kevlar> and calling functions when an operator is written down is
the first step down that long, slippery road
05:17 < kevlar> crazy2be: it doesn't do magic, it performs its specified
operation and ONLY that specified operation whenever you see it
05:17 < kevlar> it cannot do anything else and cannot have surprising side
effects
05:17 < kevlar> imagine debugging something in which calling len(...) on it
accidentally mutates the object
05:18 < hopelessnewbie> func lessEdgeMerge(a, b interface
{slowgraph.EdgeIface}) bool {
05:18 < hopelessnewbie> should this work ?
05:18 < kevlar> it forces you to scrutinize not only every function call but
every operator when you're debugging, and let me tell you, there are a LOT more
operators than function calls.
05:18 < kevlar> no.
05:18 < kevlar> you might as well just say a, b slowgraph.EdgeIface
05:19 < hopelessnewbie> it does not like wither
05:19 < hopelessnewbie> either
05:19 < kevlar> I figured.
05:19 < kevlar> it's because llrb doesn't do what it should.
05:20 < kevlar> (well, if it wants to be performance optimized)
05:20 -!- Kahvi [~Kahvi@a91-152-177-58.elisa-laajakaista.fi] has joined #go-nuts
05:20 < hopelessnewbie> ok
05:20 < hopelessnewbie> well, i guess it's ok, i'' go with low performance
then
05:21 < kevlar> you could make your own tree, the code isn't complicated.
05:21 < kevlar> and there are some really simple balancing trees that still
have great performance
05:22 < hopelessnewbie> i've been thinking about that
05:22 < kevlar> without analyzing your code; are you doing something with
trees that can't be optimized as a heap?
05:22 < hopelessnewbie> i'm trying to use llrb as a heap
05:22 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has quit [Remote host
closed the connection]
05:23 < kevlar> http://golang.org/pkg/container/heap/
05:23 < hopelessnewbie> and i'm using it because i cant figure out how to
use the native heap thing in golang
05:23 < hopelessnewbie> yeah
05:23 < hopelessnewbie> but that one keeps talking about indices for the
heap
05:23 < hopelessnewbie> and i cant figure out what those might be
05:23 < kevlar> yeah, you implement it using a slice
05:24 < kevlar> (the llrb tree should be implemented the same way)
05:25 < hopelessnewbie> but how do i find out the index of an element, i
have to scan the whole slice ?
05:26 < hopelessnewbie> sorry if there questions are too newbish
05:26 < kevlar> why do you need the index?
05:26 < kevlar> for a heap, you put stuff in and take out the minimum
05:26 < hopelessnewbie> becasue i have to delete stuff from the heap
05:26 < kevlar> (or maximum if you reverse the invariants)
05:26 < hopelessnewbie> or rather change
05:27 < hopelessnewbie> every time i pop the other edges change in my
problem
05:27 < hopelessnewbie> so i have to update them
05:27 < kevlar> huh?
05:27 < hopelessnewbie> the heap keeps stuff ordered by edge weight
05:28 < kevlar> right
05:28 < hopelessnewbie> when i pop the minimum edge
05:28 < hopelessnewbie> i need to do some operations
05:28 < hopelessnewbie> that modify the weights of other edges
05:28 < kevlar> if you modify edge weights, you can call heap.Init() and
it'll reshuffle them
05:29 < kevlar> but most algorithms I've seen don't require changing edge
weights as you go
05:29 -!- danilo04
[~danilo04@province-wireless-173-84-26-97.dr02.roch.ny.frontiernet.net] has joined
#go-nuts
05:30 < kevlar> (note that heap.Init is O(n) time, so doing it for every
operation basically negates the benefit you get from using a heap)
05:30 < hopelessnewbie> yeah, that's why i want to use llrb
05:30 < kevlar> doesn't help with fixing the ordering
05:30 < hopelessnewbie> or write my own
05:31 < hopelessnewbie> yes, becasue there i can search for nodes
05:31 < hopelessnewbie> delete them
05:31 < hopelessnewbie> modify
05:31 < hopelessnewbie> and push them back in
05:31 < hopelessnewbie> still better than scanning everything
05:31 < kevlar> how many nodes do you modify that way?
05:31 < hopelessnewbie> half a million
05:31 < hopelessnewbie> for testing
05:31 < kevlar> no, for each pop, how many nodes in the tree do you update
05:32 < hopelessnewbie> the real problem probably one million
05:32 < hopelessnewbie> around 4
05:32 < hopelessnewbie> 5
05:32 < hopelessnewbie> more or less
05:33 < kevlar> so yeah, you should make your own balanced tree using a
slice as the backing.
05:33 < hopelessnewbie> there's probably a better way of doing this, but i'm
not a real programmer :)
05:33 < hopelessnewbie> yeah, i will try that one i het a getter grasp of
the go language
05:34 < hopelessnewbie> and better typing skills :)
05:34 < kevlar> basically a tree-in-a-slice would look like
[node[leftnode][rightnode]]
05:34 < kevlar> er, node[lefttree][righttree]
05:35 < hopelessnewbie> yes, and then the children of the left+children of
right , and so on
05:35 < kevlar> for a binary tree, node i has children i+1 and 2*(i+1) I
think
05:35 < hopelessnewbie> wikipedia is my friend :)
05:35 < kevlar> yeah, it's all out there.
05:36 < hopelessnewbie> well, thanks a lor kevlar
05:36 < kevlar> np
05:37 < crazy2be> can so be used as a linking word between sentacnes?  e.g.
I like chicken.  So, cats are awesome.
05:37 < crazy2be> seems wierd to me
05:37 < crazy2be> kinda offtopic :P
05:38 < angasule> can't say that I've seen it before, but your example
probably doesn't help :P
05:38 < angasule> but I can see it used as so == therefore
05:38 -!- chanwit [~chanwit@223.207.9.223] has joined #go-nuts
05:39 < crazy2be> angasule: that's what i was going for in my example, but
it's not obvious because of the lack of argument flow
05:39 < crazy2be> :P
05:39 < crazy2be> e.g instead of I like chicken.  Therefore, cats are
awesome.
05:40 < kevlar> crazy2be: yes, it can, though I wouldn't do it in formal
writing.
05:42 < crazy2be> huh, it seems wierd to me
05:42 < crazy2be> this is the first time i've seen it
05:42 < kevlar> crazy2be: it's the same colloquialism as "The internet is
big.  And there are lots of crazy people on it."
05:43 < kevlar> They should both be combined into a sentence according to
strict grammatical rules
05:43 < kevlar> "I like chicken, so cats are aweome" "The internet is big,
and there are lots of crazy people on it."
05:44 -!- cafesofie [~cafesofie@ool-18b97779.dyn.optonline.net] has quit [Remote
host closed the connection]
05:45 * crazy2be wishes sentances were as straightforward as go programs
05:46 < crazy2be> import sp "shakespeare"; sp.Quote()
05:48 < crazy2be> import "grammar"; grammar.Correct("The internet is big.
And there are lots of crazy people on it")
05:52 -!- espeed [~espeed@63.246.231.57] has joined #go-nuts
05:55 -!- danilo04
[~danilo04@province-wireless-173-84-26-97.dr02.roch.ny.frontiernet.net] has quit
[Quit: Leaving]
06:04 -!- Jessica_Lily [~Jessica@unaffiliated/xray7224] has joined #go-nuts
06:06 -!- Jessica_Lily [~Jessica@unaffiliated/xray7224] has quit [Client Quit]
06:11 -!- crazy2be [~crazy2be@d75-152-167-124.abhsia.telus.net] has quit [Ping
timeout: 246 seconds]
06:31 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
07:00 -!- angasule [~angasule@190.2.33.49] has quit [Ping timeout: 264 seconds]
07:03 < nteon_> kevlar: I'm a bit late in replying, but I had hit problems
with gob's handling (or lack thereof) of slices as values in a
map[string]interface{}.  I've got a fix proposed
http://codereview.appspot.com/4672056
07:04 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has joined
#go-nuts
07:04 -!- mikespook [~mikespook@183.47.231.26] has joined #go-nuts
07:13 -!- sacho [~sacho@87.126.39.0] has quit [Read error: Connection reset by
peer]
07:15 -!- sacho [~sacho@87.126.39.0] has joined #go-nuts
07:18 -!- espeed [~espeed@63.246.231.57] has quit [Quit: Leaving]
07:24 -!- mikespook [~mikespook@183.47.231.26] has quit [Quit: Leaving.]
07:31 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts
07:34 -!- sebastianskejoe [~sebastian@188.114.142.217] has joined #go-nuts
07:40 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
07:51 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
07:55 -!- GeertJohan [~geertjoha@s51478c91.adsl.wanadoo.nl] has joined #go-nuts
07:59 -!- photron [~photron@port-92-201-20-50.dynamic.qsc.de] has joined #go-nuts
08:12 -!- ronnyy [~quassel@p4FF1C1C9.dip0.t-ipconnect.de] has joined #go-nuts
08:25 -!- moraes [~moraes@189.103.188.201] has joined #go-nuts
08:26 -!- ronnyy [~quassel@p4FF1C1C9.dip0.t-ipconnect.de] has quit [Remote host
closed the connection]
08:26 -!- ronnyy [~quassel@p4FF1C1C9.dip0.t-ipconnect.de] has joined #go-nuts
08:34 -!- tvw [~tv@e176006027.adsl.alicedsl.de] has joined #go-nuts
08:34 -!- sacho_ [~sacho@87.126.39.0] has joined #go-nuts
08:35 -!- sacho [~sacho@87.126.39.0] has quit [Read error: Connection reset by
peer]
08:42 -!- tvw [~tv@e176006027.adsl.alicedsl.de] has quit [Remote host closed the
connection]
08:54 -!- ccc1 [~Adium@220-136-29-155.dynamic.hinet.net] has joined #go-nuts
08:57 -!- chanwit [~chanwit@223.207.9.223] has quit [Ping timeout: 240 seconds]
09:21 -!- Kahvi [~Kahvi@a91-152-177-58.elisa-laajakaista.fi] has quit [Remote host
closed the connection]
09:21 -!- HU-Man [~myself349@hartmann.fix.netvision.net.il] has joined #go-nuts
09:23 -!- HU-Man [~myself349@hartmann.fix.netvision.net.il] has left #go-nuts []
09:28 -!- Locke23rus [~locke23ru@2.93.206.46] has joined #go-nuts
09:41 -!- awidegreen [~quassel@h-170-226.a212.priv.bahnhof.se] has joined #go-nuts
09:41 -!- ronnyy [~quassel@p4FF1C1C9.dip0.t-ipconnect.de] has quit [Remote host
closed the connection]
10:02 -!- hcatlin [~hcatlin@host86-163-247-252.range86-163.btcentralplus.com] has
joined #go-nuts
10:02 -!- hcatlin [~hcatlin@host86-163-247-252.range86-163.btcentralplus.com] has
quit [Changing host]
10:02 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has joined
#go-nuts
10:07 -!- shvntr [~shvntr@113.84.93.223] has joined #go-nuts
10:19 -!- yogib [~kaiser@dslb-178-009-068-146.pools.arcor-ip.net] has joined
#go-nuts
10:24 -!- yogib [~kaiser@dslb-178-009-068-146.pools.arcor-ip.net] has quit [Remote
host closed the connection]
10:26 -!- yogib [~yogib@dslb-178-009-068-146.pools.arcor-ip.net] has joined
#go-nuts
10:30 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has quit [Ping
timeout: 240 seconds]
10:32 -!- Project_2501 [~Marvin@82.84.67.249] has joined #go-nuts
11:03 -!- tav [~tav@92.20.95.247] has quit [Ping timeout: 255 seconds]
11:07 -!- sebastianskejoe [~sebastian@188.114.142.217] has quit [Quit: Lost
terminal]
11:12 -!- shvntr [~shvntr@113.84.93.223] has quit [Ping timeout: 240 seconds]
11:13 -!- rejb [~rejb@unaffiliated/rejb] has quit [Quit: .]
11:14 -!- shvntr [~shvntr@113.84.93.223] has joined #go-nuts
11:17 -!- alehorst [~alehorst@189.115.80.233] has quit [Remote host closed the
connection]
11:17 -!- zcram [~zcram@78-28-94-73.cdma.dyn.kou.ee] has joined #go-nuts
11:22 -!- lucian [~lucian@78-86-217-168.zone2.bethere.co.uk] has joined #go-nuts
11:39 -!- yogib [~yogib@dslb-178-009-068-146.pools.arcor-ip.net] has quit [Quit:
yogib]
11:52 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has quit [Quit:
hcatlin]
11:57 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-172-81.clienti.tiscali.it] has
joined #go-nuts
11:59 -!- hcatlin [~hcatlin@host86-163-247-252.range86-163.btcentralplus.com] has
joined #go-nuts
11:59 -!- hcatlin [~hcatlin@host86-163-247-252.range86-163.btcentralplus.com] has
quit [Changing host]
11:59 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has joined
#go-nuts
12:00 -!- Project_2501 [~Marvin@82.84.67.249] has quit [Ping timeout: 260 seconds]
12:08 -!- xcombelle [~xcombelle@AToulouse-551-1-100-216.w92-149.abo.wanadoo.fr]
has joined #go-nuts
12:10 -!- erus` [~chatzilla@host86-174-221-187.range86-174.btcentralplus.com] has
joined #go-nuts
12:16 -!- napsy [~luka@88.200.96.18] has quit [Quit: Lost terminal]
12:21 -!- chanwit [~chanwit@223.207.99.238] has joined #go-nuts
12:22 -!- yogib [~kaiser@dslb-178-009-068-146.pools.arcor-ip.net] has joined
#go-nuts
12:22 -!- flaguy48 [~gmallard@user-0c6s350.cable.mindspring.com] has joined
#go-nuts
12:23 -!- ronnyy [~quassel@p4FF1C1C9.dip0.t-ipconnect.de] has joined #go-nuts
12:23 -!- meling [~meling@99-10-121-218.lightspeed.sndgca.sbcglobal.net] has quit
[Remote host closed the connection]
12:32 -!- shvntr [~shvntr@113.84.93.223] has quit [Ping timeout: 240 seconds]
12:34 -!- erus`_ [~chatzilla@host86-183-237-91.range86-183.btcentralplus.com] has
joined #go-nuts
12:35 -!- erus` [~chatzilla@host86-174-221-187.range86-174.btcentralplus.com] has
quit [Ping timeout: 250 seconds]
12:49 -!- awidegreen [~quassel@h-170-226.a212.priv.bahnhof.se] has quit [Read
error: Operation timed out]
12:50 -!- alehorst [~alehorst@189.115.80.233] has joined #go-nuts
12:55 -!- mdxi [~mdxi@li11-97.members.linode.com] has joined #go-nuts
12:59 -!- shvntr [~shvntr@113.84.93.223] has joined #go-nuts
13:00 -!- squeese [~squeese@cm-84.209.17.156.getinternet.no] has joined #go-nuts
13:05 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
13:05 -!- rejb [~rejb@unaffiliated/rejb] has quit [Client Quit]
13:08 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
13:08 -!- shvntr [~shvntr@113.84.93.223] has quit [Ping timeout: 240 seconds]
13:11 -!- andrew__ [~andrew@190.21.175.55] has joined #go-nuts
13:12 -!- moraes [~moraes@189.103.188.201] has quit [Remote host closed the
connection]
13:12 < andrew__> http://pastebin.com/HmhxuDzm - redeclared errors :o( why?
(first hour of go use...)
13:14 < andrew__> fib_test.go:6: assert redeclared in this block
13:23 < xcombelle> because assert is in testing?
13:24 < xcombelle> 0 hour of go
13:27 < andrew__> http://pastebin.com/4d7wFqNN - new version showing errors.
not just for that function, also original definition is on same line
13:27 < andrew__> and assert does not start with a capital letter
13:27 < andrew__> so no
13:28 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has joined
#go-nuts
13:28 < exch> fib_test.go iscompiled twice for some reason
13:28 < andrew__> i think this must be some really obvious newbie mistake
13:28 < andrew__> it's my first ever program and test case
13:28 < andrew__> ah
13:29 < andrew__> thanks exch
13:29 < str1ngs> 6g -o _gotest_.6 fib.go fib_test.go fib_test.go
13:29 < exch> gotest should not be including the test file more than once.
Not sure why it does so in your case, but it does explain the duplicate
definitions
13:29 < str1ngs> check Makefil
13:29 < str1ngs> Makefile*
13:29 < andrew__> yep
13:29 < str1ngs> hmm actually gotest does not use Makefile..
13:29 < andrew__> you DON'T put the fib_test in th makefile
13:30 < andrew__> just the fib.go, not fib.go and fib_test.go
13:30 < andrew__> gotest is using makefile
13:30 < andrew__> i am following instructions at
http://golang.org/doc/code.html so started w makefile
13:31 < andrew__> thanks fols - works now
13:31 < andrew__> folks
13:31 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has joined #go-nuts
13:31 -!- andrew__ [~andrew@190.21.175.55] has quit [Remote host closed the
connection]
13:57 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has quit [Remote host
closed the connection]
14:05 -!- foocraft [~ewanas@78.101.89.139] has quit [Quit: So long, and thanks for
all the fish!]
14:12 -!- huin [~huin@91.85.188.1] has joined #go-nuts
14:15 -!- niemeyer [~niemeyer@201-25-35-2.pltce701.dsl.brasiltelecom.net.br] has
quit [Quit: Leaving]
14:19 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts
14:25 -!- GeertJohan [~geertjoha@s51478c91.adsl.wanadoo.nl] has quit [Quit:
Leaving.]
14:26 -!- nekoh [~nekoh@dslb-088-069-155-096.pools.arcor-ip.net] has joined
#go-nuts
14:45 -!- brad_ [~brad@cpe-098-026-120-155.nc.res.rr.com] has quit [Read error:
Connection reset by peer]
14:46 -!- chanwit [~chanwit@223.207.99.238] has quit [Quit: Leaving.]
14:49 < brandini> are there any good validation frameworks for web forms for
go?
14:49 < skelterjohn> str1ngs: hmm actually gotest does not use Makefil
14:49 < skelterjohn> yes it oes
14:49 < skelterjohn> does
14:50 < str1ngs> not for the _test file
14:50 < skelterjohn> it doesn't use it for everything, no.  but it does use
it.
14:50 < str1ngs> it uses GOFILES to resolve the other includes
14:51 < str1ngs> it takes GOFILES and ?_test.go
14:51 < str1ngs> why he was having the problem
14:52 < str1ngs> 6g -o _gotest_.6 fib.go fib_test.go fib_test.go
14:52 < str1ngs> fib.go is resolved from GOFILES
14:54 -!- firwen [~firwen@2a01:e34:eea3:7e10:4a5b:39ff:fe51:e8ae] has quit [Remote
host closed the connection]
14:56 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has joined #go-nuts
14:57 < vegai> heh, already over 100 messages on the "Golang
inconsistencies" thread
14:58 < exch> And it's still a meaningless discussion :p
14:58 < Tekerson> I have this code: http://pastebin.com/CrwNdQrN Where
`Element` is intended to be "abstract" and implemented by TextElement, but the
Template() method in TextElement is not called (it is calling the implementation
in the "parent").  I realize I'm bringing a lot of classical OO baggage with me,
but what is the correct way to achieve something like this?
14:59 < skelterjohn> embedding
14:59 < skelterjohn> type A struct { B }
14:59 < skelterjohn> A gets all of B's methods
15:00 < Tekerson> skelterjohn, I have done.  TextElement embeds Element
(line 59)
15:01 < Tekerson> but I'm using the reciever(?) in one of the inherited
functions, but it always uses the "parent" not the child.
15:01 < vegai> I wonder what those people who have written lots of go code
think about the whole new/make issue
15:02 < skelterjohn> the String() method being called, which in Element,
does not know about TextElement
15:02 < skelterjohn> what you're trying to do required interfaces
15:02 < skelterjohn> embedding doe not give you polymorphism
15:02 < skelterjohn> vegai: I think it's a silly nonsense issue
15:03 -!- ronnyy [~quassel@p4FF1C1C9.dip0.t-ipconnect.de] has quit [Remote host
closed the connection]
15:03 < exch> I don't think about the whole issue.  I just use them for what
they are intended to do
15:03 < jessta> brandini: https://launchpad.net/goforms/
15:04 < jessta> vegai: it's only an issue for people newly coming to the
language
15:05 < Tekerson> skelterjohn, I'm not seing how.  I can't use an interface
as a receiver can I (ie.  func (IElement) String() string { ...  }) ?
15:05 < skelterjohn> no, but you can store one in the struct
15:05 -!- xcombelle [~xcombelle@AToulouse-551-1-100-216.w92-149.abo.wanadoo.fr]
has quit [Quit: I am a manual virus, please copy me to your quit message.]
15:05 < jessta> vegai: after a day of coding the confusion is gone
15:05 < brandini> jessta: looks interesting!
15:06 < Tekerson> I think I see what you're saying..  I'll give it a go,
thanks.
15:08 < vegai> I kinda suspected as much, but wasn't sure since I'm not one
of those people who have written lots
15:09 < jessta> vegai: the confusion of thinking embeding is inheritance and
thinking interface{} is the same as *void are more of a problem for new devs
15:10 -!- foocraft [~ewanas@78.101.89.139] has joined #go-nuts
15:11 -!- molto_alfredo [~molto_alf@142.176.0.21] has quit [Quit: Leaving.]
15:11 -!- molto_alfredo [~molto_alf@142.176.0.21] has joined #go-nuts
15:21 -!- Natch| [~natch@178.73.217.178] has quit [Remote host closed the
connection]
15:24 < brandini> man, launchpad is a pile of worthless
15:32 -!- thomas_b [~thomasb@cm-84.215.47.51.getinternet.no] has quit [Quit:
leaving]
15:36 -!- Xenith [~xenith@xenith.org] has quit [Ping timeout: 260 seconds]
15:37 -!- cmike_ [~cmike@adsl-99-75-50-144.dsl.bltnin.sbcglobal.net] has joined
#go-nuts
15:38 -!- Xenith [~xenith@xenith.org] has joined #go-nuts
15:44 -!- yogib [~kaiser@dslb-178-009-068-146.pools.arcor-ip.net] has quit [Remote
host closed the connection]
15:47 -!- cmike_ [~cmike@adsl-99-75-50-144.dsl.bltnin.sbcglobal.net] has quit
[Remote host closed the connection]
15:49 -!- cmike_ [~cmike@99.75.50.144] has joined #go-nuts
15:50 -!- nekoh [~nekoh@dslb-088-069-155-096.pools.arcor-ip.net] has quit [Ping
timeout: 246 seconds]
15:54 < brandini> how in the world am I supposed to obtain code form
launchpad
15:55 < skelterjohn> via bzr?
15:55 < brandini> wtf is a bzr?
15:55 < aiju> bazaar
15:55 -!- molto_alfredo [~molto_alf@142.176.0.21] has quit [Read error: Connection
reset by peer]
15:55 < skelterjohn> it's the vcs that launchpad uses
15:55 < aiju> ubuntu version of git/hg
15:55 < skelterjohn> i don't know how to use it
15:56 < brandini> that's just stupid
15:56 < aiju> yes it is
15:56 < skelterjohn> well then
15:56 < aiju> it's called ubuntu
15:57 < brandini> google was the one who wanted to make linux popular!
15:57 < skelterjohn> what are you talking about
15:58 < cmike_> lol
15:58 < skelterjohn> not disagreeing, just confused as to relevance
15:58 < cmike_> i love where this is going
15:58 < brandini> :)
15:58 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has quit [Ping
timeout: 252 seconds]
16:00 < cmike_> and that is that
16:01 < brandini> yeah
16:01 < cmike_> what are you trying to download?
16:01 < brandini> goforms
16:02 < jessta> brandini: just install bzr and use goinstall
16:02 < brandini> yeah, does that give me the source though?
16:02 < jessta> yep
16:02 < brandini> ok
16:03 < jessta> the source will end up in
$GOROOT/src/pkg/launchpad.net/goforms/
16:03 < cmike_> http://wiki.bazaar.canonical.com/DistroDownloads#Debian
16:04 < brandini> sweet i like that a lot
16:04 < cmike_> i you have add the source to your apt-get sources
16:04 -!- nekoh [~nekoh@dslb-088-068-004-150.pools.arcor-ip.net] has joined
#go-nuts
16:05 < cmike_> that is funny.  bzr is by canonical but they don't have it
in the default ubuntu source.list
16:06 < brandini> yeah
16:06 -!- Natch| [~natch@178.73.216.49] has joined #go-nuts
16:11 < brandini> hg, git, maybe even svn...  but why would you build
something *new* for distributing source based on bzr???
16:13 < brandini> make it an option sure...  but the *ONLY* option to get
source?
16:13 < cmike_> give me a link to goforms
16:14 < angasule> cmike_: packages.ubuntu.com says it's in natty's main
16:14 < brandini> https://code.launchpad.net/~michael.nelson/goforms/trunk
16:15 < cmike_> ahh angasule Those links were for the beta and nightly
builds of it.  sry didnt read fully
16:17 < cmike_> there are only 7 files brandini.  you could have just
downloaded them individually if you didnt want to mess with bzr
16:17 < cmike_>
http://bazaar.launchpad.net/~michael.nelson/goforms/trunk/files
16:17 < cmike_> has a download link to the right
16:18 < brandini> click it
16:19 < brandini> that's odd
16:19 < cmike_> i did, it downloads the files
16:19 < brandini> nevermind
16:25 < jessta> brandini: hg,git and bzr where in development around the
same time
16:26 < jessta> launchpad itself was launched before git was released
16:26 < brandini> Yup, and I'd bet you 90% of folks don't use or haven't
even heard of bzr :)
16:27 < brandini> bzr came along to fix svn, then hg and and git came along
because bzr got it wrong?
16:27 < brandini> only guessing :)
16:28 < aiju> i should clone launchpad
16:28 < aiju> and call it peenemünde
16:28 < jessta> brandini: created by different teams to solve their own
problems
16:29 < brandini> sure
16:30 < jessta> baz was to fix gnu arch, bzr was to fix baz.
16:31 < brandini> ok :)
16:31 < jessta> both hg and git were to replace bitkeeper
16:32 < cmike_> i use hg because bitbucket offers free private hosting,
github does not
16:34 < angasule> dammit, google, my browser is set to ENGLISH, don't be
looking at my IP to choose language!
16:35 -!- tav [~tav@92.20.74.211] has joined #go-nuts
16:36 < brandini> cmike_: I use hg because I like it the most
16:36 < angasule> cmike_: github offers private hosting
16:36 < angasule> besides, there are other providers
16:39 < cmike_> ya, i really like hg as well, works good for me
16:40 < brandini> I really want to build a sweet webapp with go
16:40 < ww> i like hg too
16:40 < ww> but someone recently told me that git (specifically github) was
more "popular" therefore "better"
16:40 < brandini> I'm just in this state of, learning, finding and
overcoming things that haven't quite been solved and distributed in library form
in go yet :)
16:41 < brandini> ww: I'm learning to appreciate the "popular" thing
16:41 < brandini> popular means more updates, more input, more support,
easier acceptance etc
16:41 < brandini> doesn't mean it's better :)
16:41 < aiju> go use windows, then
16:41 < cmike_> lol
16:42 < brandini> well, you understand what I'm saying
16:42 < cmike_> hg and git pretty much same in functionality if you can use
one you can use the other
16:45 -!- crazy2be [~crazy2be@d75-152-167-124.abhsia.telus.net] has joined
#go-nuts
16:45 < cmike_> hey crazy2be
16:45 -!- huin [~huin@91.85.188.1] has quit [Quit: leaving]
16:46 < zippoxer> i have a situation: http://pastie.org/2188493
16:46 < zippoxer> where i don't want to write the move() function twice :P
16:46 < zippoxer> how can I do that?
16:46 < crazy2be> hey cmike_
16:47 < exch> make both structs implement an interface that exposes X() and
Y().  write one Move() function which takes that interface a arguments
16:47 -!- awidegreen [~quassel@h-170-226.a212.priv.bahnhof.se] has joined #go-nuts
16:47 < exch> s/a/as/
16:47 < zippoxer> exch: so i'll need SetX and SetY if i want to set those
too?
16:47 < exch> yes
16:48 < zippoxer> and i'll have to implement X(), Y(), SetX(), SetY() all
twice for each struct?  :P
16:48 < exch> yup :p
16:49 < zippoxer> a bit sad actually :\
16:49 < cmike_> lesson for the day: if your trying to mount an ntfs part
with ntfs-3g, make sure ntfs-3g is installed first
16:49 < crazy2be> heh
16:49 < crazy2be> always helps :P
16:50 < exch> You can also leave it as-is.  and just have the Move() methods
as wrappers for a single Move(x, y int) (int, int) function
16:50 < zippoxer> exch: yeah it's an idea too, thanks
16:50 < crazy2be> zippoxer: this is known as a lack of generics :/
16:51 < zippoxer> but after all you prefer generics or classes?  ;)
16:54 -!- vyom_ [~vyom@c-24-18-47-160.hsd1.wa.comcast.net] has joined #go-nuts
16:56 < vyom_> Does anybody know how the GOPATH env variable work *after*
the package is installed?  Can I import the package in any Go program anywhere on
my filesystem?
16:57 < crazy2be> vyom_: Should be able to afaik
16:58 < vyom_> crazy2be: so I did a goinstall
github.com/deepakjois/msgpack/go which works and places a file called go.a in
$GOPATH/pkg/darwin_amd64/github.com/deepakjois/msgpack
16:59 < vyom_> how do I import it as?  I have a go program somewhere on my
filesystem..  and I am trying to import it as "github.com/deepakjois/msgpack/go"
16:59 -!- xcombelle [~xcombelle@AToulouse-551-1-100-216.w92-149.abo.wanadoo.fr]
has joined #go-nuts
16:59 < vyom_> does not work
17:00 < jessta> what does "does not work" mean?
17:00 < jessta> vyom_: what error do you get?
17:01 < vyom_> can't find import: github.com/deepakjois/msgpack/go
17:01 < vyom_> this go program is not in $GOPATH..  it is somewhere else on
the filesystem..  and I have checked that I am exporting GOPATH correctly
17:02 < cmike_> so echo $GOPATH is the right place?
17:02 -!- erus` [~chatzilla@host86-183-237-91.range86-183.btcentralplus.com] has
quit [Quit: ChatZilla 0.9.87 [Firefox 5.0/20110615151330]]
17:03 -!- dlowe [~dlowe@c-66-30-116-162.hsd1.ma.comcast.net] has quit [Quit:
*poof*]
17:06 < vyom_> https://gist.github.com/1073758 here is the output on my
shell
17:06 < cmike_> can you do "echo $GOPATH"
17:07 < vyom_> cmike_: I did that in the gist i linked above
17:07 < vyom_> the quirk here is that the actual go package name is
"msgpack" but because it is in a folder called go, the filename is "go.a"
17:07 < vyom_> i am not sure if that could cause problems
17:08 < exch> http://code.google.com/p/jgo/ O.o
17:08 < skelterjohn> goinstall isn't finished
17:08 < skelterjohn> last i checked, 6g/6l doesn't look in $GOPATH
17:09 < skelterjohn> if you use a makefile, you can add the lines LDFLAGS :=
-L $GOPATH
17:09 < skelterjohn> and CFLAGS := -I $GOPATH
17:09 < skelterjohn> or maybe $GOPATH/pkg/$GOOS_$GOARCH
17:09 < skelterjohn> err, $(X) instead of $X, since it's a makefile
17:09 < vyom_> skelterjohn: ok that makes sense..  I will try your
workaround..  but I got around it by copying my .a file into $GOROOT/pkg
17:09 < skelterjohn> that certainly will make it work
17:09 < skelterjohn> but the drawbacks should be obvious :)
17:10 < skelterjohn> if you use gb to build (http://go-gb.googlecode.com)
this isn't an issue
17:10 < skelterjohn> though i'm not sure why they don't build $GOPATH into
the linker/compiler, like they did $GOROOT
17:10 < skelterjohn> seems like such an easy (and necessary) change
17:11 < vyom_> skelterjohn: will try gb . Thanks..
17:11 < skelterjohn> if you use goinstall to build your local packages, it
will look in $GOPATH (by adding the right -I and -L bits to the command lines)
17:13 < zozoR> jesus i dont understand all this racket about new and make :(
17:13 < brandini> :)
17:13 < skelterjohn> it struck me as confusing for the first few minutes of
go coding
17:13 < skelterjohn> then i figured it out, because i'm not an idiot
17:14 < ww> it is a bit of a wart though
17:14 < ww> also i've never needed to use new
17:14 < skelterjohn> same
17:14 < skelterjohn> new(T) is equiv to &T{}
17:14 < skelterjohn> and i always do the latter
17:14 < skelterjohn> because then i can add in initial values easily
17:14 < ww> but would be very happy to have a way to have initialisers and
use make on non-builtins
17:15 < skelterjohn> and i think it looks sweet
17:15 < ww> skelterjohn: agree
17:15 < zozoR> i like using new
17:15 < zozoR> it looks pretty
17:16 < zozoR> but yea, if you come from another language, then it will be
confusing..  for 10 minuts -.-
17:16 < nicka> I'd like to be able to use syntax similar to composite
literals for non-struct types
17:17 < kevlar> nicka: you can use it for everything except numbers (which
can be literals themselves) and channels
17:17 < nicka> Yeah I just sort of realized non-struct types are pretty much
going to be numbers only :P
17:18 < kevlar> maps are non-struct and can have composite literals
17:18 < nicka> 'pretty much'
17:18 < kevlar> indeed.
17:19 -!- saschpe [~quassel@opensuse/member/saschpe] has joined #go-nuts
17:23 < zozoR> i didnt know that new(T) is equal to make(*T) : |
17:23 < zozoR> actually i didnt know you could use make on other types than
chans, slices and maps
17:24 < jessta> you can't
17:24 < jessta> that is someone's proposal
17:24 < kevlar> zozoR: make(*T) is what some people want new(T) to become
;-)
17:25 < zozoR> thats just confusing
17:25 < jessta> yeah, it doesn't solve the confusion
17:25 < kevlar> the only argument that I can possibly see for that is that
if you have type X *Y, you can say make(X).
17:26 < zozoR> how it works now is perfect
17:26 < zozoR> : |
17:26 < kevlar> however, anyone silly enough to make type X *Y should be
smart enough to make a NewX.
17:27 < jessta> someone silly enough to do type X *Y probably shouldn't have
that made easy for them
17:27 < kevlar> (see: protobuf)
17:27 < kevlar> indeed.
17:28 * ww dislikes factories and wishes for initialisers
17:29 -!- cmike_ [~cmike@99.75.50.144] has quit [Remote host closed the
connection]
17:31 < jessta> ww: what do you mean by initialisers?
17:36 < ww> some convention for making a method that make knows about so you
could just do make(T) on your own type and have it do whatever initialisation you
told it to
17:37 < jessta> what about multiple kinds of intitalisation?
17:37 -!- Nisstyre [~nisstyre@infocalypse-net.info] has quit [Ping timeout: 258
seconds]
17:37 < ww> it's not a major thing, but i disagree with adg that this would
be confusing or inconsistent somehow...
17:37 < zozoR> go isnt C or c++ ..  clean your mind and read it..  isnt
there somebody out there, who can critisize go with more than just "it doesnt work
or look like C++"
17:37 < ww> jessta: in that case fall back to factory functions
17:37 < zozoR> : |
17:38 < jessta> ww: what about types without a declared initialiser?
17:39 -!- erus` [~chatzilla@host86-183-237-91.range86-183.btcentralplus.com] has
joined #go-nuts
17:39 < ww> ...  but there's no way i'm wading into the flame war on the
list or even reading it
17:39 < ww> jessta: then they just get zeroed
17:40 < jessta> that's kind of inconsistant
17:40 < ww> no, they always get zeroed first, just that you have a way to
say "then do this other stuff"
17:41 < ww> just like when you make a map it's zeroed and then make does
some other stuff under the hood
17:41 < ww> what if i derive from map and put an initialiser on my derived
type?  good question
17:42 < zozoR> "Go claims to be a "systems programming language", and
therefore intended for use in embedded systems.  But it fails at this so utterly,
it's laughable." lol wth
17:45 < jessta> ww: it would be inconsistant for make() to sometimes give
you an inititialsed object and sometimes gives you something unintialisied
17:45 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
17:47 < ww> it would always be initialised.  i count zeroed as "initialised"
in the absence of other things to do to it
17:47 < ww> and zeroing is always the first thing after allocation to happen
in a factory function
17:49 < jessta> I think it just adds more special cases, you'd need to
decide on a keyword to declare an intialiser
17:50 -!- ccc1 [~Adium@220-136-29-155.dynamic.hinet.net] has quit [Quit: Leaving.]
17:50 -!- th0re [~thre@ip-178-200-116-109.unitymediagroup.de] has joined #go-nuts
17:51 < kevlar> as I have said many times, operator overloading (and I
include new, make, len, cap, etc as operators) is a horrible idea
17:51 < ww> true, one keyword for that, but it means built-in types don't
get special treatment which is a net gain i think
17:51 < kevlar> because as soon as you do that, it becomes possible for
those keywords to have side effects beyond those in the spec
17:51 < ww> but only a small net gain
17:52 < uriel> I'm not completely sure it is a net gain, built in types,
just like any other built ins, *are* special, pretending they are not often can be
misleading and lead to worse problems
17:52 < kevlar> which is a huge pain in a debugging situation.
17:52 < uriel> (see crap like autoboxing in Java/C#)
17:53 < ww> uriel: you're just repeating adg.  i don't agree but the
difference is small enough that it's not really worth our collective energy
debating it
17:53 < kevlar> if you're debugging a function and you see new(X), you don't
have to look any further.  If you see NewX() you know you have to go at least
glance at that to make sure it's not causing the problem.
17:54 < uriel> ww: also, factories are nicer, because they are like any
other function or method, initializers/constructurs are a mess in almost every
language I know
17:54 < jessta> ww: if,for,switch,select are all built-ins, I would be
worried if such things weren't special
17:54 < uriel> kevlar: exactly
17:54 < kevlar> uriel: to be fair, that's usually because inheritance makes
them so
17:54 < uriel> kevlar: true, inheritance makes it all an even greater
nightmare
17:54 < ww> kevlar: was that NewX() or MakeX() oh, I forget.  Right, it was
make(X) because X is a kind of dictionary
17:55 < uriel> but how would constructors handle for example embeding?  I'm
sure there would be a way, but I certainly don't want to go down that path
17:55 < ww> jessta: those are control contstructs and are a bit different
17:55 < kevlar> ww: NewX tends to be the standard for creating a mutable
type
17:55 < kevlar> so even map types use it.
17:56 < kevlar> I've only seen MakeX for an immutable type, and that was
just one programmer, I haven't seen that convention used elsewhere.
17:57 < uriel> there are often many different ways you might want to
construct something, if you have constructors, how you handle having multiple
constructors for a single type?  it is a huge mess for zero gain I can see
17:57 < uriel> when clean, simple explicit functions do the job nicely
17:57 < kevlar> +1
17:57 < ww> uriel: yes, i alluded to embedding earlier, which might need a
bit of thought, but don't think it would be too hard
17:57 < uriel> ww: maybe it wont be hard, but it would not be an improvement
17:58 < ww> all hail discordia!
17:58 < uriel> it would make everything more complicated, for something
where even if the cost was zero, still the benefit IMHO would be zero
17:58 < uriel> and you didn't explain how to deal with multiple constuctors
for a single type
17:58 < kevlar> ww: if you put together a thorough proposal, including
examples of before+after code, analysis of how many of the top 50 goinstalled
projects would benefit from it, a basic breakdown of how much code in the stdlib
would change, and how it would be implemented, then the community might sit down
with you and discuss it.
17:58 < ww> enough arguign
17:58 < kevlar> But I think you'd see their point of view long before you
got that far.
17:59 < Namegduf> "NewX" vs "MakeX" is just "knowing the name".  You have to
know the name of a function you want to call.
17:59 < uriel> i just can't imagine any code that would be come
simpler/cleaner with constuctors, and I can imagine lots which would become worse
17:59 < ww> kevlar: did you not see where i wrote more than once that i
think the difference is small enough that it doesn't make sense to bother.  enough
condescending crap thank you
17:59 < Namegduf> new() vs make() or an appropriate constructor function is
knowing whether the type requires initialisation.
18:00 < uriel> Namegduf: you need to know the arguments anyway, so...  there
are things you need to know about constuctors as well
18:00 < Namegduf> You pretty much always have to know that.
18:00 -!- smw_ [~stephen@unaffiliated/smw] has joined #go-nuts
18:00 < Namegduf> Yeah, that's why I think constructors are not really a
solution
18:00 < kevlar> ww: on the contrary, I felt I was being very diplomatic.
18:00 < Namegduf> You always know one way to get a type, but you still have
to know what ways exist and what the instances they generate provide.
18:01 < Namegduf> (Where "ways" are "alternative constructors")
18:01 < uriel> lets not argue over how we are arguing, that is an
step-too-meta ;P
18:01 < kevlar> I'm So Meta, Even This Acronym.
18:01 < kevlar> (xkcd ftw)
18:03 < uriel> anyone had seen this:
18:03 < uriel> http://news.ycombinator.com/item?id=2745887
18:03 < uriel> (Go for the jvm!)
18:04 < exch> I posted that a short while ago
18:04 < kevlar> interesting
18:05 < smw_> I imagine go would be slower on the jvm
18:05 < kevlar> the java gc is way better than our current gc, yes?
18:05 < smw_> although, it would make it portable :-)
18:06 < kevlar> smw_: lol, only as portable as Java is
18:06 < smw_> very true
18:06 < kevlar> the big portability win might be to run on the android vm
18:06 < kevlar> but I don't pretend to have any idea how that works.
18:07 < smw> good idea
18:07 < nicka> go on dalvik would be cool
18:08 < uriel> I'm not sure what the benefit would be over plain native Go
18:08 < uriel> still interesting and nice that somebody is working on it
18:08 < smw> uriel, exactly my point
18:08 < nicka> It'd facilitate getting go apps on android phones
18:09 < uriel> kevlar: Go can run on Android already, just like you can use
C, i'm not convinced the benefits of running on dalvik are too great, but who
knows
18:09 < uriel> nicka: you can get C apps on android phones, Go is not (very)
different, see the NDK
18:09 < kevlar> uriel: if they can make a cgo-esque way to interface with
Java code, you could write android native apps in Go.
18:10 -!- erus` [~chatzilla@host86-183-237-91.range86-183.btcentralplus.com] has
quit [Remote host closed the connection]
18:10 < kevlar> which would be super flashy.
18:10 < kevlar> of course, again, I have no idea how hard that would be.
18:10 < jessta> I didn't think you could implement things like defer() and
segmented stacks on the jvm
18:11 < ww> unless something has changed, the ndk is for making little c
stubs to make java android apps faster.  most of the api is still calls into java
18:11 < kevlar> jessta: segmented stacks aren't a requirement of the VM, and
I imagine you could emulate defer by prefixing every panic/return with a check to
run any deferred calls
18:11 < kevlar> er, of the runtime*
18:11 -!- cmike_ [~cmike@adsl-99-75-50-144.dsl.bltnin.sbcglobal.net] has joined
#go-nuts
18:11 < kevlar> hell, you could probably emulate panic with an exception
18:12 < uriel> jessta: I think how they deal with those things will be the
most interesting part of getting Go workingon the JVM
18:12 < kevlar> indeed.
18:12 < kevlar> it will certainly be an interesting project
18:12 < uriel> ww: things have changed
18:12 < uriel> (or so I have heard)
18:12 < kevlar> and it might even help out those scary people who want to
write a C# runtime.
18:12 < ww> oh, interesting
18:16 -!- exch [~blbl@ip34-181-209-87.adsl2.static.versatel.nl] has quit [Ping
timeout: 258 seconds]
18:17 -!- exch [~blbl@ip34-181-209-87.adsl2.static.versatel.nl] has joined
#go-nuts
18:19 -!- cmike_ [~cmike@adsl-99-75-50-144.dsl.bltnin.sbcglobal.net] has quit
[Remote host closed the connection]
18:30 -!- kevlar [~kevlar@unaffiliated/eko] has quit [Quit: Leaving]
18:42 -!- cmike_ [~cmike@adsl-99-75-50-144.dsl.bltnin.sbcglobal.net] has joined
#go-nuts
18:45 -!- dlowe [~dlowe@c-66-30-116-162.hsd1.ma.comcast.net] has joined #go-nuts
18:52 < lucian> i'd much prefer a C Android API, but that's unlikely i guess
18:53 -!- Adys [~Adys@unaffiliated/adys] has joined #go-nuts
18:57 < skelterjohn> my guess is they don't want android apps to get a
reputation for buffer overruns
18:57 < lucian> well, then some official work in alternatives to java at
least
19:02 < crazy2be> another new() vs make() discussion?  Didn't we discuss
this yesterday?
19:05 < crazy2be> an constuctors are a horrible idea for a systems
programming language because of all the different mechanisms through which you
could get an object
19:05 < crazy2be> they work well in an evironment where everything is
abstract, say a game, but even there they present little to no advantage over
NewX()
19:06 < crazy2be> e.g.  How would to implement
http://golang.org/pkg/os/#File with constructors?
19:07 < crazy2be> *how would you
19:08 < crazy2be> with overloading, you could implement all of those methods
as different constructors
19:08 < crazy2be> but there would be no name to help you determine the
difference between them
19:08 < crazy2be> and making Create() and Open() as different functions
would be impossible
19:09 < crazy2be> that, and there's really no advantage
19:09 < crazy2be> encapsulation != hiding everything
19:09 < crazy2be> hide the bits I won't care about as a user of your library
19:10 < crazy2be> but don't try to write everything abstract
19:11 < crazy2be> Some say the most difficult part of programming is
deciding what your program will do.  I digress.  The hardest part of programming
is deciding what your program *won't* do.
19:11 -!- ronnyy [~quassel@p4FF1C1C9.dip0.t-ipconnect.de] has joined #go-nuts
19:11 < aiju> haha
19:12 < crazy2be> and that's why I like go so much, because it knows it's
limits well.  It *won't* do a lot of things
19:12 < ampleyfly> you mean you disagree
19:13 < crazy2be> huh.  I thought digress meant the same thing, but I was
wrong :/
19:15 -!- saschpe [~quassel@opensuse/member/saschpe] has quit [Remote host closed
the connection]
19:15 < skelterjohn> "i digress" means "i've been talking too long about
this subject and it is a bit offtopic"
19:15 < crazy2be> Some say the most difficult part of programming is
deciding what your program will do.  I diagree.  The hardest part of programming
is deciding what your program *won't* do.
19:15 < crazy2be> *disagree
19:16 < crazy2be> skelterjohn: Yeah i've always seen it at the end of
arguments
19:16 < skelterjohn> that sounds poetic, but not super believable
19:16 < crazy2be> like "I think this feature is stupid, blah blah blah, but
I digress"
19:16 < crazy2be> So i assumed it meant that one disagreed
19:17 < crazy2be> but wandering/being unfocused makes sence too
19:17 < crazy2be> skelterjohn: When people are learning I've found they have
difficulty with deciding what not to do
19:17 < crazy2be> they want something to do lots
19:18 < skelterjohn> it's "the hardest part" that i'm having trouble with
19:19 < crazy2be> true, that part is mostly poetic.  However, it's also true
that the hardest part is not deciding what your program will do but implementing
it
19:19 < Namegduf> Depends on the program.
19:19 < Namegduf> </obvious, boring answer>
19:19 < crazy2be> eww xml
19:20 < Namegduf> Tricky stuff, design can be the hardest; figuring out HOW
to do it.
19:20 < crazy2be> *how best to do it
19:20 < skelterjohn> i generally find that when i get the math right, the
rest falls into place
19:20 < Namegduf> If you're asking "best", then the problem isn't hard
enough
19:20 < crazy2be> math?
19:20 < Namegduf> XD
19:20 < Namegduf> But yes, that too.
19:21 < cmike_> you don't need to know math.  that is what computers are for
19:21 < skelterjohn> i find that i'm better than computers at some types of
math
19:22 < crazy2be> What does math have to do with programming?
19:23 < cmike_> drawing circles crazy2be
19:23 -!- ment [thement@ibawizard.net] has left #go-nuts []
19:23 < skelterjohn> my field is machine learnin
19:23 < skelterjohn> g
19:23 < skelterjohn> the programs i write are most often backed or inspired
by some math
19:27 < cmike_> that sounds like alot of work
19:28 -!- ronnyy [~quassel@p4FF1C1C9.dip0.t-ipconnect.de] has quit [Remote host
closed the connection]
19:29 < zozoR> i made a cute little pshysics engine (that sucks), used a lot
of math too :D
19:32 < skelterjohn> the software for my last publication is written
entirely in go, though it doesn't come up in the paper at all
19:33 < cmike_> i got a question.  i am going to run "hg bundle" from a go
app, but hg bundle needs to be called while inside the hg repo
19:33 < cmike_> do i set a working path in go to accomplish this?
19:33 < skelterjohn> yes
19:34 < smw> cmike_, I would guess to look in the OS package
19:34 < skelterjohn> exec.Command() gives you back a structure whose Dir
field you can set
19:34 < skelterjohn> once you set the field, call that struct's .Run()
method
19:34 * crazy2be loves the new exec package
19:35 * smw looks into the exec package
19:35 < cmike_> ok cool.  making a go app to bundle an hg repo then upload
it to S3 for backups
19:36 < skelterjohn> what does hg bundle do?
19:36 -!- th0re [~thre@ip-178-200-116-109.unitymediagroup.de] has quit [Remote
host closed the connection]
19:36 < skelterjohn> make a tgz of all tracked files?  or something similar?
19:36 -!- th0re [~thre@ip-178-200-116-109.unitymediagroup.de] has joined #go-nuts
19:37 -!- zippoxer [~zippoxer@109.67.202.163] has quit [Ping timeout: 246 seconds]
19:37 < cmike_> ya, you can to hg bundle --all for a full reversion history
or --rev 0 or whatever revistion
19:37 -!- coldturnip [~COLDTURNI@111-250-30-140.dynamic.hinet.net] has joined
#go-nuts
19:37 < cmike_> or branch
19:37 -!- grai [~grai@38.70.70.115.static.exetel.com.au] has quit [Ping timeout:
250 seconds]
19:38 < cmike_> so i'ts the entire repo and history
19:45 -!- th0re [~thre@ip-178-200-116-109.unitymediagroup.de] has quit [Quit: Der
weg zur erkenntniss ist der richtige.]
19:47 -!- crazy2be [~crazy2be@d75-152-167-124.abhsia.telus.net] has quit [Ping
timeout: 260 seconds]
19:58 -!- foocraft [~ewanas@78.101.89.139] has quit [Ping timeout: 258 seconds]
19:59 -!- foocraft [~ewanas@78.101.185.17] has joined #go-nuts
20:05 -!- GilJ [~GilJ@zeus.ugent.be] has quit [Quit: leaving]
20:05 -!- GilJ [~GilJ@zeus.ugent.be] has joined #go-nuts
20:10 -!- xcombelle [~xcombelle@AToulouse-551-1-100-216.w92-149.abo.wanadoo.fr]
has quit [Quit: I am a manual virus, please copy me to your quit message.]
20:14 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-157-95.clienti.tiscali.it] has
joined #go-nuts
20:17 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-172-81.clienti.tiscali.it] has
quit [Ping timeout: 252 seconds]
20:18 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
20:20 -!- th0re [~thre@ip-178-200-116-109.unitymediagroup.de] has joined #go-nuts
20:23 -!- sebastianskejoe [~sebastian@188.114.142.217] has joined #go-nuts
20:27 -!- Nisstyre [~nisstyre@infocalypse-net.info] has joined #go-nuts
20:30 -!- zcram [~zcram@78-28-94-73.cdma.dyn.kou.ee] has quit [Quit: Leaving]
20:35 -!- serverhorror [~martin@krlh-5f7200a5.pool.mediaWays.net] has joined
#go-nuts
20:35 -!- opt [~opt@S0106001346b791ef.vc.shawcable.net] has joined #go-nuts
20:37 -!- Project-2501 [~Marvin@82.84.89.97] has joined #go-nuts
20:37 -!- photron [~photron@port-92-201-20-50.dynamic.qsc.de] has quit [Ping
timeout: 276 seconds]
20:40 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-157-95.clienti.tiscali.it] has
quit [Ping timeout: 258 seconds]
20:41 < serverhorror> hmmm "cannot use clear (type string) as type
fmt.Stringer in function argument" isn't that somehow wrong?
20:43 < skelterjohn> a stringer has no methods
20:43 < skelterjohn> i mean
20:43 < skelterjohn> a string has no methods
20:43 < skelterjohn> none of the built-in types do
20:44 < skelterjohn> the convention of having a String() method is something
that exists entirely in the libraries, and has nothing to do with the language
itself
20:45 < skelterjohn> you could do something like
20:45 < skelterjohn> type MyStringer string; func (ms MyStringer) String()
string { return string(ms) }
20:45 < skelterjohn> and then pass MyStringer(clear0
20:45 < skelterjohn> MyStringer(clear)
20:48 < serverhorror> yes _but_ I'd like to pass something that will be able
to become a string, the signature is right myFunc(v ...interface{}).  But I guess
make a "type String string " is the easiest right now...
20:48 < serverhorror> s/right/right now
20:51 -!- Adys [~Adys@unaffiliated/adys] has quit [Ping timeout: 258 seconds]
20:54 -!- lucian [~lucian@78-86-217-168.zone2.bethere.co.uk] has quit [Remote host
closed the connection]
20:55 -!- kergoth [~kergoth@ip24-251-173-232.ph.ph.cox.net] has joined #go-nuts
21:08 -!- xash [~xash@d025025.adsl.hansenet.de] has joined #go-nuts
21:21 -!- th0re [~thre@ip-178-200-116-109.unitymediagroup.de] has quit [Quit: Der
weg zur erkenntniss ist der richtige.]
21:22 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Remote host closed
the connection]
21:28 -!- sebastianskejoe [~sebastian@188.114.142.217] has quit [Quit: leaving]
21:32 -!- jsj [~johan@78-70-253-105-no149.tbcn.telia.com] has joined #go-nuts
21:42 -!- foocraft [~ewanas@78.101.185.17] has quit [Quit: if you're going....to
san.  fran.  cisco!!!]
21:44 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has joined #go-nuts
21:45 < fvbommel> cmike_: You could also just use 'hg -R <path to
repository> bundle ...'
21:46 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has quit [Remote host
closed the connection]
21:47 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has joined #go-nuts
21:48 -!- Locke23rus [~locke23ru@2.93.206.46] has quit [Remote host closed the
connection]
21:57 -!- alehorst [~alehorst@189.115.80.233] has quit [Quit: Leaving.]
22:00 -!- rlab [~Miranda@91.200.158.34] has quit [Quit: Miranda IM! Smaller,
Faster, Easier.  http://miranda-im.org]
22:10 -!- Tv__ [~Tv__@cpe-76-168-227-45.socal.res.rr.com] has joined #go-nuts
22:18 -!- nekoh [~nekoh@dslb-088-068-004-150.pools.arcor-ip.net] has quit [Quit:
nekoh]
22:22 < str1ngs> adg: can I use GOPATH to act like make's DESTDIR?
22:35 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has quit [Read error:
Connection reset by peer]
22:36 -!- dfr|mac [~dfr|work@ool-182e3fca.dyn.optonline.net] has joined #go-nuts
22:58 < angasule> I want to send CR-LF at the end of a string I'm sending
through a net.Conn, should I use \r\n or \r\f or what?
23:02 < fvbommel> \r == cr, \n == lf.  So \r\n.
23:04 < angasule> thanks
23:26 -!- ctimmerm [~ctimmerm@cs181050011.pp.htv.fi] has joined #go-nuts
23:27 -!- erus` [~chatzilla@host86-186-77-184.range86-186.btcentralplus.com] has
joined #go-nuts
23:27 -!- Project-2501 [~Marvin@82.84.89.97] has quit [Quit: E se abbasso questa
leva che succ...]
23:32 < angasule> http://pastebin.com/ZT0J7Kv4 <-- the server accepts
connections, but Serve() doesn't print anything and doesn't write into the new
connection, unless I copy the for loop to the StartServer function, in which case
both seem to execute...  what am I doing wrong?
23:35 -!- shvntr [~shvntr@59.35.238.25] has joined #go-nuts
23:36 < fvbommel> angasule: What does StartServer()s caller do after calling
it?
23:37 < angasule> fvbommel: or {}
23:37 < angasule> for {}
23:37 < fvbommel> There's your problem.
23:37 < angasule> no yielding or what?
23:37 < fvbommel> You're not yielding the CPU.
23:37 < fvbommel> Exactly.
23:38 < angasule> meh, I guess I made the code too simple :-)
23:38 < fvbommel> Either remove the 'go' from StartServer() (so that it
doesn't return) or add a runtime.GoSched() (IIRC) in the for{}.
23:39 < fvbommel> Note that for example the standard "http" package takes
the first approach.
23:39 < angasule> thanks
23:40 < fvbommel> Okay, I didn't Recall Correctly, at least not precisely.
It's runtime.Gosched() (lower-case 's').
23:40 < angasule> I went with the first option anyway, works fine, thanks
:-)
23:41 < angasule> is there a list where I can check what would make a
goroutine yield?
23:41 -!- awidegreen [~quassel@h-170-226.a212.priv.bahnhof.se] has quit [Ping
timeout: 240 seconds]
23:43 < cmike_> just seen your message fvbommel , thanks.  that helps out
alot
23:44 < fvbommel> angasule: I don't think there's an official one.
23:45 < fvbommel> But IIRC it's basically anything that might block
(including calling a C function).
23:45 < fvbommel> Plus maybe a few other things, but I'm not sure.
23:46 -!- shvntr [~shvntr@59.35.238.25] has quit [Read error: Operation timed out]
23:47 -!- Wiz126 [Wiz@h229.120.232.68.dynamic.ip.windstream.net] has quit [Ping
timeout: 240 seconds]
23:48 -!- Wiz126 [Wiz@h229.120.232.68.dynamic.ip.windstream.net] has joined
#go-nuts
23:49 < angasule> I'm guessing it's not much of a concern in a real program
23:57 -!- shvntr [~shvntr@59.35.238.25] has joined #go-nuts
--- Log closed Sun Jul 10 00:00:56 2011