--- Log opened Sat Aug 20 00:00:20 2011
00:03 -!- avelino [~avelino@unaffiliated/avelino] has quit [Remote host closed the
connection]
00:04 -!- brett [~brett@rdnzl.net] has quit [Ping timeout: 250 seconds]
00:05 -!- brett [~brett@rdnzl.net] has joined #go-nuts
00:09 -!- aat [~aat@rrcs-184-75-54-130.nyc.biz.rr.com] has quit [Ping timeout: 240
seconds]
00:16 -!- shoenig [~shoenig@pool-71-170-212-131.dllstx.fios.verizon.net] has quit
[Remote host closed the connection]
00:23 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts
00:28 < moraes> you have a variadic function.  is there an easy way to call
it like you'd do with python's *args, passing an array?
00:29 < nicka> slice it and use slice...
00:29 < str1ngs> moraes: you mean like fmt.Printf("%s is %s",...s)
00:29 < leterip> yeah.  f(...args)
00:30 < moraes> uh.  i can call it like that.
00:30 < moraes> wasn't aware.
00:31 < str1ngs> actually it should bee s...
00:32 < str1ngs> I always forget mybad
00:33 < nicka> it needs to be a slice though, I think
00:38 < leterip> it might but even then you can just do f(...args[:]) to
slice it in place
00:38 -!- kevlar_work [~kevlar@unaffiliated/eko] has quit [Quit: Leaving]
00:47 < nicka> when are arrays used over slices?
00:48 -!- xeon [~chatzilla@101.44.223.252] has quit [Ping timeout: 268 seconds]
00:51 -!- erus` [~chatzilla@cpc2-gill2-0-0-cust701.basl.cable.virginmedia.com] has
quit [Remote host closed the connection]
00:52 < uriel> nicka: slices are basically a convenient way to access arrays
00:52 < leterip> 4.99?  ill click it
00:52 -!- pearle [~pearle@142.162.35.185] has quit [Quit: Leaving]
00:52 < uriel> you use arrays when you know exactly the size and that it
wont change
00:53 < leterip> whoops thats the wrong channel :)
00:53 < nicka> Yeah I know their relation, I just can't come up with a case
where a slice wouldn't do
00:54 < leterip> slices cant be statically checked for out of bounds
indexing
00:55 < leterip> and some other optimization things.  i man everything you
can do with arrays you can do with slices, you just give up some compiler
hints/optimizations
00:55 < leterip> s/man/mean
01:00 -!- qeed [~qeed@adsl-98-85-38-143.mco.bellsouth.net] has joined #go-nuts
01:03 <@adg> nicka: the most common use of arrays is to allocate a static
buffer associated with some data structure
01:04 <@adg> nicka: say, in a parser you could have
01:04 <@adg> type Parser struct {
01:04 <@adg> [1024]byte
01:04 <@adg> // some other internals
01:04 <@adg> }
01:04 <@adg> then the parser could use that as scratch space for
back-tracking, and so-on
01:05 < moraes> exp/regexp will replace regexp and current regexps will
continue to work?
01:05 < nicka> I had not considered that, pretty cool
01:05 <@adg> moraes: should do, yeah
01:06 < moraes> that is cool.
01:06 <@adg> nicka: or, say "type Pixel [4]byte" for an RGBA
01:06 <@adg> nicka: examples
http://golang.org/search?q=%5C%5B%5B0-9%5D%2B%5C%5Dbyte
01:06 <@adg>
http://golang.org/src/pkg/crypto/openpgp/packet/literal.go?h=%5C%5B%5B0-9%5D%2B%5C%5Dbyte#L28
01:07 <@adg>
http://golang.org/src/pkg/encoding/base64/base64.go?h=%5C%5B%5B0-9%5D%2B%5C%5Dbyte#L25
01:19 -!- taruti [taruti@ultra.violetti.org] has joined #go-nuts
01:20 -!- kamaji [~kamaji@handtomouse.demon.co.uk] has quit [Read error:
Connection reset by peer]
01:20 -!- kamaji [~kamaji@handtomouse.demon.co.uk] has joined #go-nuts
01:25 -!- taruti [taruti@ultra.violetti.org] has quit [Ping timeout: 252 seconds]
01:26 -!- nicka1 [~nicka@blk-222-42-163.eastlink.ca] has joined #go-nuts
01:29 -!- taruti [taruti@ultra.violetti.org] has joined #go-nuts
01:33 -!- taruti [taruti@ultra.violetti.org] has quit [Ping timeout: 258 seconds]
01:37 < qeed> is there any nice way to remove duplicates from a slice?
01:37 <@adg> for []T you could
01:37 <@adg> set := make(map[T]bool)
01:37 -!- aho [~nya@fuld-590c6fc6.pool.mediaWays.net] has quit [Quit:
EXEC_over.METHOD_SUBLIMATION]
01:38 <@adg> for _, v := range slice { set[v] = true }
01:38 <@adg> slice = make([]T, len(set))
01:38 <@adg> for v := range set { slice = append(slice, v) }
01:39 < qeed> ok thanks
01:39 <@adg> (the make function should be "make([]T, 0, len(set))")
01:42 -!- ccc1 [~Adium@140.109.127.21] has joined #go-nuts
01:43 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
01:43 -!- rcrowley [~rcrowley@c-71-202-44-233.hsd1.ca.comcast.net] has quit [Quit:
Computer has gone to sleep.]
01:51 -!- nekoh [~nekoh@dslb-188-107-193-049.pools.arcor-ip.net] has quit [Quit:
nekoh]
01:52 -!- clr_ [~colin@c-67-160-86-87.hsd1.wa.comcast.net] has joined #go-nuts
01:53 -!- aat [~aat@cpe-72-225-174-173.nyc.res.rr.com] has joined #go-nuts
01:54 < chilts> phew, am getting somewhere implementing a SimpleDB library
for GoAMZ :)
01:54 < chilts> got a few tests passing, now implementing various operations
01:55 -!- ccc [~macroron@c-76-26-54-186.hsd1.fl.comcast.net] has quit [Quit:
leaving]
01:56 -!- robteix [~robteix@host254.190-225-208.telecom.net.ar] has quit [Quit:
Leaving...]
01:59 -!- kamaji [~kamaji@handtomouse.demon.co.uk] has quit [Ping timeout: 240
seconds]
01:59 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
02:03 -!- moraes [~moraes@189.103.177.124] has quit [Quit: Leaving]
02:04 -!- dario [~dario@domina.zerties.org] has quit [Read error: Operation timed
out]
02:04 -!- dario [~dario@domina.zerties.org] has joined #go-nuts
02:04 -!- coffeejunk [~max@static.58.62.47.78.clients.your-server.de] has quit
[Read error: Operation timed out]
02:04 -!- coffeejunk [~max@static.58.62.47.78.clients.your-server.de] has joined
#go-nuts
02:05 < chilts> interesting question ...  in some code I've see an 'r'
(http.Response) being passed to another function which calls r.Body.Close() ...
I'm just thinking that I should do a 'defer r.Body.Close' right after we call
http.DefaultClient.Do(&req), which still allows 'r' to be passed to that other
function but this time we don't close it - sound ok?
02:05 < chilts> https://gist.github.com/1158499
02:06 < chilts> I think the 2nd way is cleaner, but I'm not sure if it's
correct/valid to do such a thing
02:06 < chilts> and I must admit, I don't really like the first way of doing
it which is why I'd like to change it
02:13 -!- squeese [~squeese@cm-84.209.17.156.getinternet.no] has quit [Remote host
closed the connection]
02:16 < chilts> ok, sent an email to the list and see if anyone else is
around :) also, that'll be good documentation for the future :)
02:20 < niemeyer> chilts: You're not doing anything weird..  that's
perfectly valid
02:21 < chilts> oh sweet, thanks :)
02:22 < niemeyer> chilts: and I actually see there's a bug in goamz's S3
logic due to that
02:22 < chilts> it's the buildError() function in ec2.go which closes it, so
I'm probably just gonna move it to query()
02:22 < chilts> yeah, there'a chance it doesn't get closed
02:22 < chilts> that what you saw?
02:23 -!- xash [~xash@d065108.adsl.hansenet.de] has quit [Quit: Lost terminal]
02:23 < niemeyer> chilts: Yeah, that sounds like a good use of defer
02:24 < niemeyer> chilts: Right, ec2 is fine..  it would be better with
defer, but it's fine
02:24 < niemeyer> chilts: s3 has to be fixed
02:26 < chilts> ah yeah, s3.go - looking at the wrong file :)
02:28 < chilts> I'm happy to fix up s3.go and send you a pull request later
if you like
02:28 -!- edsrzf [~edsrzf@ip-58-28-201-165.ftth.xnet.co.nz] has joined #go-nuts
02:29 < chilts> hi evan :)
02:30 * chilts <- andy in Wellington here
02:30 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has quit [Ping
timeout: 276 seconds]
02:30 < edsrzf> Hey
02:31 < chilts> are you 'go'ing this afternoon?
02:32 < chilts> I really should be outside, it's beautiful down here
02:32 -!- ccc1 [~Adium@140.109.127.21] has quit [Quit: Leaving.]
02:32 < edsrzf> Yeah, I am
02:32 < edsrzf> It's pretty nice here too
02:33 -!- d_m [~d_m@64.186.128.169] has quit [Ping timeout: 260 seconds]
02:33 -!- d_m [~d_m@64.186.128.169] has joined #go-nuts
02:39 -!- aat [~aat@cpe-72-225-174-173.nyc.res.rr.com] has quit [Quit: Computer
has gone to sleep.]
02:42 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has joined #go-nuts
02:42 -!- shoenig [~shoenig@pool-71-170-212-131.dllstx.fios.verizon.net] has
joined #go-nuts
02:45 -!- pphalen [~pphalen@66.92.11.149] has quit [Quit: pphalen]
02:51 -!- ccc1 [~Adium@140.109.127.21] has joined #go-nuts
02:52 -!- homovitruvius [~user@pool-96-236-165-90.pitbpa.east.verizon.net] has
joined #go-nuts
03:03 -!- ccc1 [~Adium@140.109.127.21] has quit [Remote host closed the
connection]
03:04 -!- ccc1 [~Adium@140.109.127.21] has joined #go-nuts
03:08 -!- niemeyer [~niemeyer@200-102-220-163.pltce701.dsl.brasiltelecom.net.br]
has quit [Ping timeout: 240 seconds]
03:26 < s|k_> hi
03:27 -!- s|k_ [~bjorn@c-76-126-163-6.hsd1.ca.comcast.net] has quit [Changing
host]
03:27 -!- s|k_ [~bjorn@unaffiliated/sk/x-5968384] has joined #go-nuts
03:27 < s|k> hi
03:29 -!- homovitruvius [~user@pool-96-236-165-90.pitbpa.east.verizon.net] has
quit [Read error: Connection reset by peer]
03:31 -!- franciscosouza [~francisco@187.105.21.97] has joined #go-nuts
03:41 < Jzalae> if you have a question, s|k, just ask.  we're here
sometimes, but we're not likely to start a conversation
03:42 -!- qeed [~qeed@adsl-98-85-38-143.mco.bellsouth.net] has quit [Quit:
Leaving]
03:46 -!- franciscosouza [~francisco@187.105.21.97] has quit [Read error:
Connection reset by peer]
03:46 -!- franciscosouza [~francisco@187.105.21.97] has joined #go-nuts
03:47 -!- ccc1 [~Adium@140.109.127.21] has quit [Ping timeout: 240 seconds]
03:49 -!- ccc1 [~Adium@140.109.127.21] has joined #go-nuts
04:13 -!- aat [~aat@cpe-72-225-174-173.nyc.res.rr.com] has joined #go-nuts
04:25 -!- Argue [~Argue@112.198.78.101] has joined #go-nuts
04:32 -!- rcrowley [~rcrowley@c-71-202-44-233.hsd1.ca.comcast.net] has joined
#go-nuts
04:32 -!- Tv__ [~Tv__@cpe-76-168-227-45.socal.res.rr.com] has joined #go-nuts
04:35 -!- magn3ts [~magn3ts@colemickens.unl.edu] has joined #go-nuts
04:36 -!- aat [~aat@cpe-72-225-174-173.nyc.res.rr.com] has quit [Quit: Computer
has gone to sleep.]
04:40 -!- kergoth [~kergoth@ip24-251-173-232.ph.ph.cox.net] has quit [Quit:
Computer has gone to sleep.]
04:47 -!- Tv__ [~Tv__@cpe-76-168-227-45.socal.res.rr.com] has quit [Ping timeout:
264 seconds]
04:49 -!- angasule [~angasule@190.2.33.49] has quit [Ping timeout: 240 seconds]
04:50 -!- zaero [~eclark@servo.m.signedint.com] has quit [Read error: Connection
reset by peer]
04:51 -!- rcrowley [~rcrowley@c-71-202-44-233.hsd1.ca.comcast.net] has quit [Quit:
Computer has gone to sleep.]
04:51 -!- zaero [~eclark@servo.m.signedint.com] has joined #go-nuts
04:54 -!- ccc1 [~Adium@140.109.127.21] has quit [Quit: Leaving.]
04:54 -!- chadkouse [~Adium@rrcs-74-218-87-242.central.biz.rr.com] has quit [Quit:
Leaving.]
04:57 -!- Argue [~Argue@112.198.78.101] has quit [Read error: Connection reset by
peer]
04:59 -!- Argue [~Argue@112.198.78.94] has joined #go-nuts
05:02 < s|k> Jzalae: was just saying hi :P
05:02 < s|k> although I have a question now
05:02 < s|k> looking through the os package
05:03 < s|k> wondering if there's some way to get cpu usage for the system
the go program is running on programmatically
05:03 < s|k> I'm on darwin/mac os x so there's no /proc
05:04 < s|k> there are c apis for this
05:06 < s|k> maybe in syscall
05:09 < s|k> Getrusage hrmmm
05:20 -!- JakeyChan
[~JakeyChan@ec2-175-41-238-53.ap-northeast-1.compute.amazonaws.com] has joined
#go-nuts
05:24 -!- shoenig_ [~shoenig@pool-71-170-212-131.dllstx.fios.verizon.net] has
joined #go-nuts
05:24 -!- shoenig [~shoenig@pool-71-170-212-131.dllstx.fios.verizon.net] has quit
[Read error: Connection reset by peer]
05:26 -!- kergoth [~kergoth@ip24-251-173-232.ph.ph.cox.net] has joined #go-nuts
05:27 < s|k> that only gives me info for my program
05:32 -!- arun [~arun@unaffiliated/sindian] has quit [Ping timeout: 240 seconds]
05:39 < s|k> lol at the perl files in syscall
05:39 < s|k> http://golang.org/src/pkg/syscall/mksysnum_darwin.pl
05:45 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
05:45 -!- arun [~arun@unaffiliated/sindian] has joined #go-nuts
05:47 -!- JakeyChan
[~JakeyChan@ec2-175-41-238-53.ap-northeast-1.compute.amazonaws.com] has quit [Ping
timeout: 276 seconds]
05:49 -!- ccc1 [~Adium@140.109.127.21] has joined #go-nuts
06:05 -!- smw [~stephen@unaffiliated/smw] has quit [Ping timeout: 240 seconds]
06:05 -!- jmil [~jmil@c-68-81-252-40.hsd1.pa.comcast.net] has quit [Quit: jmil]
06:09 -!- JakeyChan [~JakeyChan@118.132.214.248] has joined #go-nuts
06:10 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
06:16 -!- djbrown [~djbrown@unaffiliated/djbrown] has quit [Remote host closed the
connection]
06:25 -!- awidegreen [~quassel@h-170-226.a212.priv.bahnhof.se] has joined #go-nuts
06:36 -!- Argue [~Argue@112.198.78.94] has quit [Quit: Leaving]
06:37 -!- B4R0n [~baron@189.36.132.197] has quit [Ping timeout: 258 seconds]
06:38 -!- awidegreen [~quassel@h-170-226.a212.priv.bahnhof.se] has quit [Ping
timeout: 264 seconds]
06:44 -!- replore [~replore@ntkngw133234.kngw.nt.ftth.ppp.infoweb.ne.jp] has quit
[Remote host closed the connection]
06:45 -!- smw [~stephen@unaffiliated/smw] has joined #go-nuts
06:50 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
06:55 -!- moraes [~moraes@189.103.177.124] has joined #go-nuts
07:08 -!- taruti [taruti@ultra.violetti.org] has joined #go-nuts
07:10 -!- alehorst [~alehorst@189.58.28.55.dynamic.adsl.gvt.net.br] has quit [Read
error: Connection reset by peer]
07:11 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Quit: Leaving]
07:13 -!- taruti [taruti@ultra.violetti.org] has quit [Ping timeout: 250 seconds]
07:15 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has joined #go-nuts
07:16 -!- alehorst [~alehorst@189.58.31.250.dynamic.adsl.gvt.net.br] has joined
#go-nuts
07:17 -!- taruti [taruti@ultra.violetti.org] has joined #go-nuts
07:19 -!- smw [~stephen@unaffiliated/smw] has quit [Ping timeout: 268 seconds]
07:23 -!- black_rez [~black_rez@house.calculating-god.com] has quit [Excess Flood]
07:24 -!- black_rez [~black_rez@house.calculating-god.com] has joined #go-nuts
07:28 -!- yogib [~yogib@dslb-178-009-079-205.pools.arcor-ip.net] has joined
#go-nuts
07:31 -!- remy_o [~babar@archlinux/developer/remy-o] has joined #go-nuts
07:31 -!- black_rez [~black_rez@house.calculating-god.com] has quit [Excess Flood]
07:32 -!- black_rez [~black_rez@house.calculating-god.com] has joined #go-nuts
07:45 -!- tvw [~tv@e176008066.adsl.alicedsl.de] has joined #go-nuts
07:45 -!- meling [~meling@134.81-167-41.customer.lyse.net] has joined #go-nuts
07:47 -!- yogib [~yogib@dslb-178-009-079-205.pools.arcor-ip.net] has quit [Quit:
yogib]
07:56 -!- taruti [taruti@ultra.violetti.org] has quit [Remote host closed the
connection]
07:56 -!- kfmfe04 [~kfeng@114-32-57-164.HINET-IP.hinet.net] has quit [Quit:
WeeChat 0.3.4]
08:03 -!- taruti [taruti@ultra.violetti.org] has joined #go-nuts
08:11 -!- yogib [~yogib@dslb-178-009-079-205.pools.arcor-ip.net] has joined
#go-nuts
08:14 -!- xeon [~chatzilla@101.44.223.252] has joined #go-nuts
08:34 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit:
Verlassend]
08:35 -!- ccc1 [~Adium@140.109.127.21] has quit [Quit: Leaving.]
08:36 -!- ccc1 [~Adium@140.109.127.21] has joined #go-nuts
08:36 -!- Solak [~stijnw@cthia.xs4all.nl] has joined #go-nuts
08:39 -!- GeertJohan [~Squarc@clal-5-212.eduroam.inholland.nl] has joined #go-nuts
08:44 -!- JakeyChan [~JakeyChan@118.132.214.248] has quit [Ping timeout: 268
seconds]
08:46 -!- smw [~stephen@unaffiliated/smw] has joined #go-nuts
08:58 -!- JakeyChan
[~JakeyChan@ec2-175-41-238-53.ap-northeast-1.compute.amazonaws.com] has joined
#go-nuts
08:59 -!- JakeyChan
[~JakeyChan@ec2-175-41-238-53.ap-northeast-1.compute.amazonaws.com] has quit
[Client Quit]
09:04 -!- clr_ [~colin@c-67-160-86-87.hsd1.wa.comcast.net] has quit [Ping timeout:
264 seconds]
09:04 < moraes> my mux api: http://paste.pocoo.org/show/461209/
09:05 < moraes> let me know if it looks awful :P
09:07 < str1ngs> "/{key}" is intresting do you expand that somehow or use
the template package?
09:08 < moraes> expand
09:11 < moraes> in a very simple way
09:11 < moraes> / Matches "{name:pattern}" or "{name}".
09:11 < moraes> var routeRe =
regexp.MustCompile(`\{([a-zA-Z_][a-zA-Z0-9_]*)(\:[^\}]*)?\}`)
09:12 < str1ngs> either way this looks pretty good.  how do you define
handlers?
09:13 < str1ngs> obviously its code but I'm guessing you made it easy?
09:14 < moraes> they are simple functions
09:14 < str1ngs> ah ok
09:16 -!- xeon [~chatzilla@101.44.223.252] has quit [Ping timeout: 240 seconds]
09:16 < moraes> uriel, ^^
09:16 -!- clr_ [~colin@c-67-160-86-87.hsd1.wa.comcast.net] has joined #go-nuts
09:17 -!- xcombelle [~xcombelle@AToulouse-551-1-102-228.w92-149.abo.wanadoo.fr]
has joined #go-nuts
09:18 -!- osiman [clip9@er.en.svarteper.com] has joined #go-nuts
09:20 < moraes> str1ngs, thanks.  want to publish it this weekend.  have
been playing with it too much already.
09:21 < moraes> idea is to have a very simple basic api that goes expanding.
09:21 < str1ngs> moraes: it looks, something I would look at using next time
I goto write something web based.
09:22 -!- clr_ [~colin@c-67-160-86-87.hsd1.wa.comcast.net] has quit [Ping timeout:
250 seconds]
09:22 < str1ngs> actually I have a project that could use this
09:22 < uriel> moraes: I like it
09:22 < moraes> yay
09:22 < uriel> but I would s/NewPath/Path/
09:22 -!- Project_2501 [~Marvin@82.84.93.105] has joined #go-nuts
09:23 < moraes> "uriel seal of approval"
09:23 < uriel> hahah
09:23 < uriel> well, haven't tried to use it yet, but looks simple and clean
enough
09:23 < uriel> but I was wondering one thing
09:23 < moraes> i'm very undecided about the name for that factory.
09:23 < str1ngs> moraes: basically I want to create an android app that just
displays a browser and it interfaces with a locally running go http server.  for
installing console based packages.
09:24 < uriel> why not make the whole thing (method, scheme, host, path) all
a single string you match on?
09:24 < uriel> mux.NewPath("/products",
ProductsHandler).SetHost("www.domain.com").SetMethods("GET").SetSchemes("http").SetName("products")
09:24 -!- Kahvi [5b9b57fc@gateway/web/freenode/ip.91.155.87.252] has joined
#go-nuts
09:24 < moraes> uriel, i thought about that briefly.  regexps complicate
this.
09:25 < uriel> would be GET::htp::www.domain.com:://products, or something
like that
09:25 < uriel> but you might be right
09:26 < moraes> .SetHost("{subdomain}.{domain:foo\.com|bar\.com}")
09:26 < uriel> another thing, methods like SetHost, could they be mux.Host?
and return a route too?  so you could do
mux.Methods('GET').Host('foo.com').Path('/bar')?
09:27 < moraes> could use a separator or some sort.  but that adds more
syntax overhead no?  when setters would do.
09:27 < str1ngs> or a struct?  and just use composite literals ?
09:27 < uriel> yea, you are probably right, I was just wondering
09:27 < uriel> str1ngs: that also might make sense
09:27 < uriel> moraes: anyway, this are random ideas, what you have looks
fairly reaosnable
09:28 < moraes> i'll probably still massage it
09:28 < str1ngs> I think that line is a rare case, seems so by your comment
anyways.
09:29 < uriel> moraes: what do you think of my idea of having mux.Host()
etc?
09:29 < moraes> str1ngs, you can actually pass a struct (ieve hidden that).
it is not cleaner to look.
09:29 < moraes> (i've
09:29 < moraes> uriel, i like it.  will change that
09:30 < uriel> only annoying thing might be that you will have both a method
and a function versions of each, but you already have that with NewPath I think
09:31 < moraes> why a function?
09:31 < moraes> annoying is that mux and route must have them all.
09:32 < moraes> have to think about it.  it changes how nested routes are
set.
09:32 < uriel> ah, thought mux was a package
09:32 < uriel> but yea, that is what I mean, that they will be needed int
two parts
09:33 < uriel> the ones in mux just implicitly create a new route
09:33 -!- ccc1 [~Adium@140.109.127.21] has quit [Quit: Leaving.]
09:33 < moraes> yep.
09:33 < uriel> one thing I never quite get is why routes need names at all?
09:33 < moraes> will need to keep Set*
09:34 < moraes> uriel, scroll down
09:34 < moraes> "Building URLs."
09:34 < moraes> you only set a name if you wanna build them.
09:34 < uriel> but why can't URL be a method of route?
09:35 < moraes> cool thing is mux.URL() returns a http.URL.
09:35 < uriel> anyway, really got to go, but keep up the good work (I'm
probably missing the whole point of the url thing or how it is used in practice)
09:35 < moraes> uriel, it actually is...
09:35 < moraes> but you need a name to call from mux.
09:35 < moraes> mux gets the route and calls URL().
09:36 < uriel> aha, so I guess my question is, do you really need URL both
in mux and route?
09:36 < moraes> i guess so...  how do you keep references to routes?
09:36 < moraes> if not by name you'd need to keep references around.
09:36 < uriel> you could have mux.Routes() that retuns a dict of routes, and
you could do mux.Routes()['foo'].URL
09:37 < uriel> (or maybe mux.Routes['foo'] depending of your implementation)
09:37 < moraes> yeah this is interesting.
09:38 < moraes> or mux.Route('foo').URL() indeed.
09:38 < uriel> yes, that was another option I though of
09:38 < moraes> it returns a http.URL :)
09:38 < uriel> but I don't like it too much if mux.Path('/foo') and
mux.Host(...) all return new routes, but mux.Route('foo') actually looks up a
route :)
09:39 < moraes> ok.  these were nice ideas.
09:39 < moraes> mux.RouteByName('foo')
09:39 < uriel> nah
09:39 < uriel> at most mux.GetRoute('foo')
09:39 < moraes> byname is useless, it is the only way to get a route.
09:40 < uriel> but mux.Routes() returnding a dict might be the best to give
you a way to get all routes in a mux, but maybe not all are named, hmmmm...
09:41 < moraes> i keep a map and an array.
09:41 < moraes> i have to.  :-/
09:41 < uriel> I guessed as much :/
09:41 < moraes> array to match.  map to build.
09:41 -!- xcombelle [~xcombelle@AToulouse-551-1-102-228.w92-149.abo.wanadoo.fr]
has quit [Read error: Operation timed out]
09:41 < uriel> though you could return a map and an array
09:41 < uriel> but would be akward
09:42 < uriel> maybe mux.Routes() and mux.NamedRoutes(), but I don't like
any of this as i can't imagine how it would be used in practice
09:42 < moraes> they are public
09:42 < moraes> mux.RouteMap['foo'].URL()
09:42 < uriel> mux.Route('foo') or mux.GetRoute('foo') are probably the best
options
09:42 < uriel> oh, then forget all this shit :)
09:42 < uriel> s/RouteMap/Namedroutes/
09:43 < moraes> hm.
09:43 < moraes> this i don't like.
09:43 < uriel> RouteMap seems to imply all routes are in the map
09:43 < moraes> at least CameCase
09:43 < uriel> yes, sorry, typo
09:43 < moraes> no, all are in RouteArr
09:43 < moraes> ^that is ugly
09:44 < uriel> RouteArr yuck
09:44 < uriel> Routes and NamedRoutes
09:44 < uriel> IMHO are the least bad
09:44 < moraes> indeed
09:44 < uriel> really got to go now
09:44 < moraes> ok, and i'll sleep
09:44 < moraes> thanks for the feedback.
09:45 * moraes saves chat log and goes away.
09:47 < uriel> sleep well
09:47 -!- photron [~photron@port-92-201-63-176.dynamic.qsc.de] has joined #go-nuts
09:52 -!- moraes [~moraes@189.103.177.124] has quit [Ping timeout: 246 seconds]
09:56 -!- xcombelle [~xcombelle@AToulouse-551-1-62-195.w92-146.abo.wanadoo.fr] has
joined #go-nuts
09:58 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts
09:58 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Read error:
Connection reset by peer]
09:59 -!- araujo [~araujo@190.73.44.29] has joined #go-nuts
09:59 -!- araujo [~araujo@190.73.44.29] has quit [Changing host]
09:59 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts
10:02 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Client Quit]
10:07 -!- avelino [~avelino@unaffiliated/avelino] has joined #go-nuts
10:08 -!- araujo [~araujo@190.73.44.29] has joined #go-nuts
10:08 -!- araujo [~araujo@190.73.44.29] has quit [Changing host]
10:08 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts
10:09 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Read error:
Connection reset by peer]
10:11 -!- Fish- [~Fish@bus77-2-82-244-150-190.fbx.proxad.net] has joined #go-nuts
10:13 -!- araujo [~araujo@190.73.44.29] has joined #go-nuts
10:13 -!- araujo [~araujo@190.73.44.29] has quit [Changing host]
10:13 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts
10:14 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Remote host closed
the connection]
10:22 -!- araujo [~araujo@190.73.44.29] has joined #go-nuts
10:22 -!- araujo [~araujo@190.73.44.29] has quit [Changing host]
10:22 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts
10:23 -!- erus` [~chatzilla@cpc2-gill2-0-0-cust701.basl.cable.virginmedia.com] has
joined #go-nuts
10:31 -!- nekoh [~nekoh@dslb-188-107-170-103.pools.arcor-ip.net] has joined
#go-nuts
10:32 -!- xcombelle [~xcombelle@AToulouse-551-1-62-195.w92-146.abo.wanadoo.fr] has
quit [Remote host closed the connection]
10:32 -!- xcombelle [~xcombelle@AToulouse-551-1-62-195.w92-146.abo.wanadoo.fr] has
joined #go-nuts
10:40 -!- sunfmin [~sunfmin@115.197.34.59] has joined #go-nuts
10:40 < sunfmin> Hi, All
10:40 < sunfmin> How can I get a file's FileInfo with go?
10:40 < sunfmin> os.Stat("somefile.txt") ?
10:42 < chilts> you need to have a 'File', then call Stat on it ...
file.Stat()
10:42 < chilts> http://golang.org/pkg/os/#File.Stat
10:43 < foocraft> http://golang.org/pkg/os/#FileInfo
10:43 < chilts> yeah, file.Stat() returns a FileInfo
10:44 < foocraft> func Stat(name string) (fi *FileInfo, err Error)
10:44 < foocraft> Doesn't this mean Stat which takes a string and return a
FileInfo pointer and an Error?
10:45 < chilts> ah yeah, I didn't see that one
10:45 < sunfmin> cool, thanks a lot.
10:45 < chilts> sorry :D
10:45 < foocraft> It's alright.  :)
10:45 < chilts> ah well, we're all learnign :D
10:45 * foocraft nod
10:45 < chilts> (and learning to type it seems)
10:52 -!- shoenig_ [~shoenig@pool-71-170-212-131.dllstx.fios.verizon.net] has quit
[Read error: Connection reset by peer]
10:53 -!- shoenig [~shoenig@pool-71-170-212-131.dllstx.fios.verizon.net] has
joined #go-nuts
10:56 -!- xeon [~chatzilla@101.44.223.252] has joined #go-nuts
10:58 -!- erus` [~chatzilla@cpc2-gill2-0-0-cust701.basl.cable.virginmedia.com] has
quit [Remote host closed the connection]
11:01 < chilts> WAHOO!  I got my xml.Unmarshal working :)
11:03 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Remote host closed
the connection]
11:16 -!- Project-2501 [~Marvin@82.84.83.113] has joined #go-nuts
11:19 -!- Project_2501 [~Marvin@82.84.93.105] has quit [Ping timeout: 240 seconds]
11:31 -!- aho [~nya@fuld-590c64fb.pool.mediaWays.net] has joined #go-nuts
11:47 -!- erus` [~chatzilla@cpc2-gill2-0-0-cust701.basl.cable.virginmedia.com] has
joined #go-nuts
11:50 -!- moraes [~moraes@189.103.177.124] has joined #go-nuts
11:51 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has quit [Ping
timeout: 264 seconds]
11:52 -!- noam [~noam@87.69.42.61.cable.012.net.il] has quit [Read error:
Connection timed out]
11:54 -!- edsrzf [~edsrzf@ip-58-28-201-165.ftth.xnet.co.nz] has quit [Remote host
closed the connection]
11:55 -!- noam [~noam@87.69.42.61.cable.012.net.il] has joined #go-nuts
11:59 < Gertm> does anyone have experience with termbox?
12:16 -!- remy_o [~babar@archlinux/developer/remy-o] has quit [Ping timeout: 264
seconds]
12:22 < Kahvi> How big is the whole go repository after compiling?
12:27 < moraes> gigantic.
12:27 < moraes> kidding.  no idea.
12:29 -!- remy_tel [~remy_tel@80.214.0.5] has joined #go-nuts
12:31 < nicka1> du -ch $GOROOT gets me 200MB Kahvi
12:32 < Kahvi> nicka1, Thanks
12:34 < moraes> ah.  not compiling.
12:34 < moraes> checking out.  or pulling.  or whatever.
12:38 < Kahvi> Does run.bash do only build witthout tests?
12:42 < Kahvi> Apparently it's make.bash
12:42 -!- skelterjohn [~jasmuth@216.117.19.250] has joined #go-nuts
12:43 -!- huin [~huin@91.85.139.164] has joined #go-nuts
12:45 -!- niemeyer [~niemeyer@200-102-220-163.pltce701.dsl.brasiltelecom.net.br]
has joined #go-nuts
12:50 -!- remy_tel [~remy_tel@80.214.0.5] has quit [Remote host closed the
connection]
12:51 < Kahvi> I seriously want a ssd.
12:58 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
13:04 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has joined
#go-nuts
13:04 -!- miker2 [~miker2@pool-96-245-224-59.phlapa.fios.verizon.net] has joined
#go-nuts
13:05 -!- hargettp [~hargettp@pool-71-174-137-214.bstnma.east.verizon.net] has
joined #go-nuts
13:08 < skelterjohn> Kahvi: I hear that technology is available now
13:10 < Kahvi> Yep.  I've been using ram disks as a poor man's alternative.
:D
13:12 -!- squeese [~squeese@cm-84.209.17.156.getinternet.no] has joined #go-nuts
13:13 -!- miker2 [~miker2@pool-96-245-224-59.phlapa.fios.verizon.net] has quit
[Quit: Computer has gone to sleep.]
13:16 < niemeyer> Kahvi: adventurous man as well :-)
13:18 -!- Project-2501 [~Marvin@82.84.83.113] has quit [Read error: Connection
reset by peer]
13:18 < Kahvi> Works well but it feels a bit clumsy.
13:27 < moraes> pair programming++
13:29 < skelterjohn> the most productive i've ever been is when i've done
pair programming
13:29 < skelterjohn> keeps me off fark and reddit
13:31 < moraes> well.  codereview is pair programming.  and from distance
you still have reddit.
13:31 < jlaffaye> why do I feel that go drivers for databases are not
"stable" ? :)
13:32 < moraes> you think there's a cleaner way to do this?
http://paste.pocoo.org/show/461285/ (i check that they are pairs before calling
this function)
13:32 < moraes> jlaffaye, which ones?
13:34 < jlaffaye> SQLite, pgsql
13:34 < skelterjohn> moraes: that seems straightforward to me
13:34 < moraes> okay.  just checking the ninjas.
13:34 < skelterjohn> jlaffaye: http://code.google.com/p/gosqlite/ seems
stable
13:35 < skelterjohn> the recent updates have been goinstall issues
13:37 < jlaffaye> issue #2 loos annoying to me for example
13:39 < skelterjohn> huh - that seems important
13:40 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts
13:42 < niemeyer> jlaffaye: labix.org/mgo
13:43 < niemeyer> moraes: code review != pair programming..  completely
different dynamics
13:43 < aiju> hahaahahaha
13:43 < aiju> bullshit != horseshit
13:44 < niemeyer> aiju: I'm glad we're having an interesting conversation
13:44 < moraes> niemeyer, it kinda is.
13:45 < moraes> code review == distance pair programming
13:46 < aiju> i only write code with my cat
13:46 < aiju> studies have shown that i write shorter, better and faster
code this way
13:47 < moraes> do you appreciate feedback?
13:47 < aiju> feedback != pair programming
13:48 < skelterjohn> well if you use cat as your editor, you have to be
careful to not make any mistakes or you'll have to start over again.  so you keep
it short to minimize the chances.
13:48 -!- xeon [~chatzilla@101.44.223.252] has quit [Ping timeout: 258 seconds]
13:48 < moraes> damn.  i was hoping to hear "yes.  i think feedback is
lovely."
13:48 < aiju> skelterjohn: not cat(1)
13:48 < skelterjohn> oh, was i joking?
13:48 < aiju> http://aiju.de/katzen.jpg
13:49 < niemeyer> moraes: If you've done actual pair programming, you know
the dynamics of sitting next to someone and debating the code as you go is
different than looking over a complete branch
13:49 < skelterjohn> i like pair programming, as long as the pairs are not
too dissimilar in ability
13:49 < moraes> niemeyer, then i've never done it.  :-(
13:49 < skelterjohn> otherwise it's one person programming
13:50 < niemeyer> skelterjohn: True
13:50 < niemeyer> skelterjohn: Well, kind of..  there's still value..
13:50 < skelterjohn> yes
13:50 < skelterjohn> but i don't like it as much :)
13:50 < erus`> crowd programming
13:50 < erus`> with 3 people
13:50 < aiju> cloud programming
13:50 < erus`> its a riot
13:50 < niemeyer> skelterjohn: Of course, the value is always greater for
the less knowledgeable at the task at hand for the pair
13:51 < skelterjohn> cloud programming - you vote up the lines you like the
best
13:51 < erus`> skelterjohn: thats web 2.0 programming
13:51 < niemeyer> web 2.0 is so 1.0 nowadays
13:51 < moraes> there's a movie in which two characters type at the same
time on one keyboard, checking stuff as it was pretty natural.  is that pair
programming?
13:51 < skelterjohn> niemeyer: i suppose it's naive to assume i'd be the
more skilled in a real setting.  i'm just thinking back to my days as an undergrad
w/ pair and group projects
13:51 * moraes hides
13:52 < moraes> web 2.0 will die in december 31, 2012.
13:52 < skelterjohn> along with the rest of the world?
13:52 < moraes> yes.  :)
13:52 < aiju> i thought it was a different day
13:53 < skelterjohn> you thought wrong.
13:53 < niemeyer> I'll be utterly disappointed if the world ends before the
sun explodes.
13:53 < moraes> it will.
13:53 < aiju> skelterjohn: no
13:53 < aiju> skelterjohn: i'm right
13:53 < aiju> december 21, 2012
13:53 < moraes> before it explodes its radius will reach earth.
13:54 < skelterjohn> nope.  the world will end on the 31st of dec, 2012
13:54 < skelterjohn> this is a fact.
13:54 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-170-185.clienti.tiscali.it] has
joined #go-nuts
13:54 < niemeyer> moraes: I bet it will explode before that..
13:55 < skelterjohn> depends on what you mean by explode
13:55 < moraes> niemeyer, you don't watch carl sagan.  supernova happens
after the expansion.  i guess.
13:55 < skelterjohn> "getting big fast"
13:55 < skelterjohn> but yeah - before the sun goes nova it will gobble mars
13:56 < moraes> and earth.
13:56 < skelterjohn> no - just mars
13:56 < skelterjohn> earth will be ok
13:56 < moraes> ok, i believe you.
13:56 < moraes> "ok", heh
13:57 < moraes> only better sunscreens will be needed.
13:57 < skelterjohn> the sun will become a taurus
13:59 < niemeyer> Yeah, we better type faster..
14:14 -!- Kahvi [5b9b57fc@gateway/web/freenode/ip.91.155.87.252] has quit [Quit:
Page closed]
14:19 -!- shoenig [~shoenig@pool-71-170-212-131.dllstx.fios.verizon.net] has quit
[Remote host closed the connection]
14:19 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has quit [Ping
timeout: 260 seconds]
14:21 -!- sebastianskejoe [~sebastian@56347a49.rev.stofanet.dk] has joined
#go-nuts
14:26 -!- skelterjohn [~jasmuth@216.117.19.250] has quit [Quit: skelterjohn]
14:27 -!- bugQ [~bug@c-67-186-254-86.hsd1.ut.comcast.net] has joined #go-nuts
14:31 -!- tvw [~tv@e176008066.adsl.alicedsl.de] has quit [Remote host closed the
connection]
14:38 -!- dfr|mac [~dfr|work@ool-18baf7e7.dyn.optonline.net] has joined #go-nuts
14:38 < jessta> I'm sure earth can use it's jetpacks to escape
14:39 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
14:42 -!- B4R0n [~baron@189.36.132.197] has joined #go-nuts
14:46 -!- GoBIR [~gobir@70-90-168-189-SFBACalifornia.hfc.comcastbusiness.net] has
quit [Read error: Connection reset by peer]
14:48 -!- GoBIR [~gobir@70-90-168-189-SFBACalifornia.hfc.comcastbusiness.net] has
joined #go-nuts
14:48 -!- ccc1 [~Adium@118-166-226-220.dynamic.hinet.net] has joined #go-nuts
14:49 -!- ericvh [~Adium@cpe-72-177-122-77.austin.res.rr.com] has joined #go-nuts
14:55 -!- xcombelle [~xcombelle@AToulouse-551-1-62-195.w92-146.abo.wanadoo.fr] has
quit [Quit: I am a manual virus, please copy me to your quit message.]
15:02 -!- rcrowley [~rcrowley@c-71-202-44-233.hsd1.ca.comcast.net] has joined
#go-nuts
15:10 -!- skelterjohn [~jasmuth@216.117.19.250] has joined #go-nuts
15:22 -!- gmilleramilar [~gmiller@pool-74-101-133-165.nycmny.fios.verizon.net] has
joined #go-nuts
15:23 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.5]
15:39 -!- xeon [~chatzilla@101.44.223.252] has joined #go-nuts
15:40 < gmilleramilar> how do you use reflect.Type.Implements()?
specifically, how do you get a reflect.Type that represents an interface?
15:43 < nicka> var i InterfaceYouWant
15:43 < nicka> reflect.TypeOf(i)
15:44 < nicka> should do it, but I'm not sure what the most common way is
15:45 < gmilleramilar> nicka: this doesn't seem to work:
15:45 < gmilleramilar> var err os.Error
15:45 < gmilleramilar> fmt.Printf("%#v\n", reflect.TypeOf(err).Kind())
15:46 < nicka> Yeah, disregard what I said.  I'm not sure exactly
15:46 -!- kamaji [~kamaji@handtomouse.demon.co.uk] has joined #go-nuts
15:51 < niemeyer> gmilleramilar: reflect.TypeOf((*os.Error)(nil)).Elem()
15:53 < gmilleramilar> niemeyer: thanks, that seems to work.  Seems like a
hack tho, no?
15:54 < niemeyer> gmilleramilar: No..
15:54 < moraes> uriel, made the adaptations:
http://paste.pocoo.org/show/461350/
15:56 < gmilleramilar> :)
16:00 < nicka> niemeyer: that is indeed the simplest way to get a Type for
an interface?
16:04 -!- franciscosouza_ [~francisco@187.105.21.97] has joined #go-nuts
16:04 -!- ccc1 [~Adium@118-166-226-220.dynamic.hinet.net] has quit [Quit:
Leaving.]
16:05 -!- replore_ [~replore@ntkngw133234.kngw.nt.ftth.ppp.infoweb.ne.jp] has
joined #go-nuts
16:05 -!- GoBIR [~gobir@70-90-168-189-SFBACalifornia.hfc.comcastbusiness.net] has
quit [Read error: Connection reset by peer]
16:05 -!- franciscosouza [~francisco@187.105.21.97] has quit [Read error:
Connection reset by peer]
16:06 -!- Slant [~scott@124-168-200-235.dyn.iinet.net.au] has joined #go-nuts
16:07 -!- GoBIR [~gobir@70-90-168-189-SFBACalifornia.hfc.comcastbusiness.net] has
joined #go-nuts
16:07 -!- awidegreen [~quassel@h-170-226.a212.priv.bahnhof.se] has joined #go-nuts
16:09 < Slant> I have two decoder processes getting events from two
different sources
16:09 < Slant> And they're both putting their decoded Events on to the same
channel.
16:10 < Slant> On the other side of that channel, a goroutine is consuming
the Events and processing them.
16:10 < Slant> Now, I have a problem that when I want to quit, right now I'm
just closing the channel and that stops my range(events) loop...
16:10 -!- qeed [~qeed@adsl-98-85-37-82.mco.bellsouth.net] has joined #go-nuts
16:11 < Slant> But, the decoders will still try to put new Events on to the
now closed channel
16:11 < Slant> I can't imagine this isn't an unheard of problem-- I presume
I'm architecting this wrong.
16:11 < Slant> Perhaps I should use a channel per decoder (and if so, then
how do I select on multiple channels at the same time?)
16:12 < Slant> Or I should use an out-of-band signal?
16:12 < Slant> (An different "exit" request channel?)
16:12 < Slant> (But, that's just the same issue all over again, now that I
think about it.)
16:12 -!- deadmoth [~void@2607:f358:1:fed5:22:0:bd62:7fa7] has joined #go-nuts
16:12 < aiju> Slant: select?
16:13 < Slant> aiju: Sorry, I know it's not select.  What is the term for
dequeueing something off a channel?
16:13 -!- miker2 [~miker2@pool-96-245-224-59.phlapa.fios.verizon.net] has joined
#go-nuts
16:13 < aiju> read?  :)
16:13 < aiju> but i think you mean select
16:13 < aiju> select { a := <- b: dosomething; c := <- d:
dosomethingelse }
16:14 < Slant> The problem with that is that it'll block.
16:14 < aiju> yes?
16:15 < exch> add a default: case and it won't block
16:15 < Slant> I mean, how can I block on reading from two channels
simultaneously.
16:15 < aiju> Slant: that's exactly what select does
16:15 < Slant> Oh.
16:15 < Slant> OH
16:15 < Slant> There's an actual select statement.
16:15 < exch> yes
16:15 < Slant> aiju: Thanks.  I'll look into that.
16:17 < Slant> aiju: I can't help but wonder, is there a way to setup a
select to operate on an array of channels?
16:17 -!- remy_o [~babar@archlinux/developer/remy-o] has joined #go-nuts
16:17 < Slant> or, a slice.
16:17 < Slant> That way you can just throw extra channels on and not have to
custom code for a known number of producers?
16:18 -!- TheMue [~FMueller@p5DDF634D.dip.t-dialin.net] has joined #go-nuts
16:18 < exch> nope, just individual channels
16:19 < Slant> Dang.
16:21 < ericvh> it may be too early on a Saturday morning, but isn't this a
really bad idea (from src/cmd/ld/lib.c): void
16:21 < ericvh> objfile(char *file, char *pkg)
16:21 < ericvh> {
16:21 < ericvh>         int32 off, l;
16:21 < ericvh>         Biobuf *f;
16:21 < ericvh>         char magbuf[SARMAG];
16:21 < ericvh>         char pname[150];
16:21 < ericvh>         struct ar_hdr arhdr;
16:21 < ericvh>         pkg = smprint("%i", pkg);
16:21 < ericvh> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
16:26 -!- franciscosouza [~francisco@187.105.21.97] has quit [Quit:
franciscosouza]
16:26 -!- miker2 [~miker2@pool-96-245-224-59.phlapa.fios.verizon.net] has quit
[Quit: Computer has gone to sleep.]
16:27 < bugQ> Slant: Go's predecessor had that feature, but it is still
possible to recreate it
16:27 < bugQ> read through
http://groups.google.com/group/golang-nuts/browse_thread/thread/3ba2157b3259ee54
16:28 < Slant> bugQ: Thanks.  Reading now.
16:29 < Slant> bugQ: Ahh, but that just brings me back around to my original
problem.
16:29 < Slant> bugQ: Which was that when the channel closed, I had multiple
writers.  If one writer closes the channel, the other doesn't know about that and
panics.
16:30 < Slant> Where closing the channel is used to signal to the reader
that all processing is done.
16:30 < aiju> ericvh: what's wrong with it?
16:31 < nicka> I can't comment personally but some people recommend avoiding
calling close
16:31 < ericvh> maybe nothing.  I'm chasing down stack corruption in ql that
happens right around there.  soemthing is shitting all over the stack and I
haven't been able to figure out what yet.
16:31 < bugQ> Slant: each routine should not have sole right to close it.
if necessary you can send open/close messages to a routine that will count the
number of connections
16:32 < bugQ> and then close it when the count reaches 0
16:32 < remy_o> ericvh: how can this line trigger stack corruption ?
16:32 < ericvh> n
16:32 < Slant> bugQ: Right.  So I'm doing something like that now.  Just
making the exit condition an explicit event that goes down the channel.
16:34 < bugQ> it is always surprising to me how many threading issues can be
solved with channel patterns
16:34 -!- niemeyer [~niemeyer@200-102-220-163.pltce701.dsl.brasiltelecom.net.br]
has quit [Ping timeout: 240 seconds]
16:35 < bugQ> semaphore takes on a much more apt meaning
16:35 < Slant> I liked having the channel "closed" indicate there was no
more processing needed.  It seems a little uglier this way.  But, I'm not sweating
it.
16:36 < Slant> http://ietherpad.com/dfYr6M1ZNc
16:37 < Slant> That was vs.  originally having a for p := range(ctx.Events)
16:38 < Slant> (Blah.  Gotta expose the exit channel now too.)
16:42 -!- niemeyer [~niemeyer@200-102-220-163.pltce701.dsl.brasiltelecom.net.br]
has joined #go-nuts
16:43 -!- hargettp [~hargettp@pool-71-174-137-214.bstnma.east.verizon.net] has
quit [Quit: Leaving...]
16:46 < niemeyer> hokapoka: ping
16:48 < Slant> Changed it so that my events could just cancel the loop
themselves.
16:48 < Slant> And created an Exit event.
16:50 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has joined
#go-nuts
16:51 -!- qeed [~qeed@adsl-98-85-37-82.mco.bellsouth.net] has quit [Quit: Leaving]
16:52 -!- jmil [~jmil@c-68-81-252-40.hsd1.pa.comcast.net] has joined #go-nuts
16:53 -!- remy_tel [~remy_tel@89.95.59.132] has joined #go-nuts
16:55 -!- hargettp [~hargettp@pool-71-174-137-214.bstnma.east.verizon.net] has
joined #go-nuts
16:58 -!- remy_tel [~remy_tel@89.95.59.132] has quit [Remote host closed the
connection]
17:05 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-170-185.clienti.tiscali.it] has
quit [Read error: Connection reset by peer]
17:07 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-149-182.clienti.tiscali.it] has
joined #go-nuts
17:16 -!- moraes [~moraes@189.103.177.124] has quit [Ping timeout: 252 seconds]
17:23 -!- Kahvi [5b9b57fc@gateway/web/freenode/ip.91.155.87.252] has joined
#go-nuts
17:28 -!- Kahvi_ [5b9b57fc@gateway/web/freenode/ip.91.155.87.252] has joined
#go-nuts
17:30 -!- Kahvi [5b9b57fc@gateway/web/freenode/ip.91.155.87.252] has quit [Ping
timeout: 252 seconds]
17:33 -!- remy_o [~babar@archlinux/developer/remy-o] has quit [Ping timeout: 264
seconds]
17:38 -!- Kahvi [5b9b57fc@gateway/web/freenode/ip.91.155.87.252] has quit []
17:39 -!- Kahvi [5b9b57fc@gateway/web/freenode/ip.91.155.87.252] has joined
#go-nuts
17:39 -!- TheMue [~FMueller@p5DDF634D.dip.t-dialin.net] has quit [Ping timeout:
276 seconds]
17:41 -!- hargettp [~hargettp@pool-71-174-137-214.bstnma.east.verizon.net] has
quit [Quit: Leaving...]
17:42 -!- pyrhho [~pyrhho@027e80ed.bb.sky.com] has joined #go-nuts
17:44 -!- robteix_ [~robteix@host254.190-225-208.telecom.net.ar] has joined
#go-nuts
17:47 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
17:50 -!- bugQ [~bug@c-67-186-254-86.hsd1.ut.comcast.net] has quit [Remote host
closed the connection]
17:52 -!- erus` [~chatzilla@cpc2-gill2-0-0-cust701.basl.cable.virginmedia.com] has
quit [Quit: ChatZilla 0.9.87 [Firefox 6.0/20110811165603]]
17:52 -!- sebastianskejoe [~sebastian@56347a49.rev.stofanet.dk] has quit [Quit:
Lost terminal]
17:53 -!- robteix_ [~robteix@host254.190-225-208.telecom.net.ar] has quit [Quit:
Computer has gone to sleep.]
17:59 -!- qeed [~qeed@adsl-98-85-37-82.mco.bellsouth.net] has joined #go-nuts
18:04 < Slant> Are there any tutorials to packages?
18:04 < Slant> I've dropped a bunch of files I want in a separate namespace
in a sub-directory off my project "local"
18:04 < Slant> and they now all begin with "package local"
18:05 < Slant> But the compiler says it "expected main"
18:05 -!- xeon [~chatzilla@101.44.223.252] has quit [Ping timeout: 246 seconds]
18:07 < KirkMcDonald> Slant: The compiler?  Or the linker?
18:07 < |Craig|> Slant: you sure thats the compiler?  I though it was the
linker that said that one, but I haven't worked with go recently.
18:07 < Slant> Well, 6g.  But it's probably chain-calling the linker.
18:08 < KirkMcDonald> Slant: In truth I recommend writing a Makefile.
18:08 < Slant> gomake has it 6g -o blah x.go local/y.go ...
18:08 < Slant> KirkMcDonald: I have.  I'm using one of the standard makefile
forms.
18:08 < |Craig|> Slant: compile your packages seperatly
18:08 < KirkMcDonald> Ah.
18:08 < |Craig|> then link them together
18:08 < KirkMcDonald> Yes, that.
18:09 < Slant> |Craig|: Any pointers to how to setup the Makefile
appropriately?
18:09 < nicka> Slant: I recommend gb
18:09 < KirkMcDonald> Slant: So x.go is your "main" package?
18:09 < |Craig|> I use gb
18:09 < Slant> KirkMcDonald: Yes.
18:09 < KirkMcDonald> Slant: And local/y.go is the local package?
18:09 < Slant> KirkMcDonald: Yes.
18:09 < nicka> http://code.google.com/p/go-gb/
18:09 < KirkMcDonald> Slant: First compile y.go.  The result is the local
package.
18:09 < KirkMcDonald> Slant: Then compile x.go.  The result is the main
package.
18:09 < KirkMcDonald> Then link the main package.
18:09 < Slant> 6g won't do it in one-pass?  Huh.
18:09 < Slant> Good to know.
18:10 < KirkMcDonald> When compiling the main package, you'll probably need
to provide it with the path where the local package resides.
18:10 -!- Kahvi [5b9b57fc@gateway/web/freenode/ip.91.155.87.252] has quit [Ping
timeout: 252 seconds]
18:10 < KirkMcDonald> Compiling a package will statically link the packages
it imports into it.
18:10 < KirkMcDonald> Then you just link the main package to produce the
binary.
18:12 < KirkMcDonald> The key thing (or at least the thing I was surprised
about when I first learned Go) is that the result of compiling .go code is a
package, and you import packages (not .go code).
18:12 < nicka> Think of packages as compilation units
18:13 < Slant> Yeah.  That's how I was hoping.
18:14 < Slant> But, go it.
18:14 < Slant> Hmm.
18:14 < |Craig|> KirkMcDonald: that surprised me to.  Importing compiled
code not source seemed a bit odd at first
18:16 -!- dfr|mac [~dfr|work@ool-18baf7e7.dyn.optonline.net] has quit [Remote host
closed the connection]
18:18 -!- franciscosouza [~francisco@187.105.21.97] has joined #go-nuts
18:32 -!- kergoth_ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has joined #go-nuts
18:40 -!- taruti [taruti@ultra.violetti.org] has quit [Ping timeout: 240 seconds]
18:41 -!- dfr|mac [~dfr|work@ool-18baf7e7.dyn.optonline.net] has joined #go-nuts
18:46 -!- Bigbear1 [~Cody@S010600222dcddd0f.cg.shawcable.net] has joined #go-nuts
18:49 -!- r [~retrograd@83.149.32.117] has joined #go-nuts
18:49 -!- franciscosouza [~francisco@187.105.21.97] has quit [Read error:
Connection reset by peer]
18:50 -!- franciscosouza [~francisco@187.105.21.97] has joined #go-nuts
18:50 -!- Guest24863 [~retrograd@83.149.32.117] has quit [Remote host closed the
connection]
18:50 -!- TheMue [~FMueller@p5DDF634D.dip.t-dialin.net] has joined #go-nuts
18:52 -!- kergoth_ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has quit [Quit:
Computer has gone to sleep.]
18:52 -!- qeed [~qeed@adsl-98-85-37-82.mco.bellsouth.net] has quit [Quit: Leaving]
18:58 -!- jmil [~jmil@c-68-81-252-40.hsd1.pa.comcast.net] has quit [Quit: jmil]
19:01 -!- replore_ [~replore@ntkngw133234.kngw.nt.ftth.ppp.infoweb.ne.jp] has quit
[Remote host closed the connection]
19:04 -!- nekoh [~nekoh@dslb-188-107-170-103.pools.arcor-ip.net] has quit [Ping
timeout: 240 seconds]
19:08 -!- Kahvi [5b9b57fc@gateway/web/freenode/ip.91.155.87.252] has joined
#go-nuts
19:08 -!- pyrhho [~pyrhho@027e80ed.bb.sky.com] has quit [Ping timeout: 260
seconds]
19:14 -!- nekoh [~nekoh@dslb-088-068-006-051.pools.arcor-ip.net] has joined
#go-nuts
19:15 < niemeyer> Slant: If you want to isolate a package, you'll have to
build the package independently
19:16 < niemeyer> Slant: 6g itself won't produce the package..  you'll have
to gopack as well
19:16 < niemeyer> Slant: As others have said, using a standard Makefile, or
goinstall, will be easier to start with
19:17 < Slant> I have been using standard Makefiles.  But, yes, I see that
all now...
19:17 < niemeyer> Slant: cool
19:17 < Slant> But, given that weight, it seems like packages aren't made
for program level segmentation...
19:17 < Slant> But entirely independent functionality namespacing.
19:18 < niemeyer> Slant: Those two things are pretty related..  agreed
there's some weight there to be removed still, though.  We'll get there
eventually.
19:19 < niemeyer> Slant: There's some good work happening in goinstall and
gomake
19:20 -!- moraes [~moraes@189.103.177.124] has joined #go-nuts
19:20 < Slant> niemeyer: I'm thinking around namespacing.  Packages ain't
that.  For example, as far as I can see, a sub-package has to be an entirely
consistent compilation unit.  So, if there are types or methods in the main
package, then they can't be used.
19:20 < niemeyer> Slant: You mean the types in the main package can't be
used in the sub-package explicitly?
19:21 < Slant> Yes.
19:21 < Slant> Or functions.
19:21 < niemeyer> Slant: Thanks to the designer gods for that..  that's
proper namespacing in my book
19:21 < nicka> Yeah I'd try to keep imports as one-way as possible
19:21 < Slant> niemeyer: I agree.  But it was a question.
19:21 -!- djbrown [~djbrown@unaffiliated/djbrown] has joined #go-nuts
19:22 < niemeyer> Slant: It wasn't a question..  you stated packages aren't
namespacing.  They are namespacing done right.
19:23 < Slant> niemeyer: I was clarifying.  I'm only just now understanding.
19:23 < niemeyer> Slant: Sounds good, sorry for the pedantism then
19:25 -!- Bigbear1 [~Cody@S010600222dcddd0f.cg.shawcable.net] has quit [Read
error: Connection reset by peer]
19:28 -!- franciscosouza [~francisco@187.105.21.97] has quit [Read error:
Connection reset by peer]
19:28 -!- Bigbear1 [~Cody@S010600222dcddd0f.cg.shawcable.net] has joined #go-nuts
19:30 -!- franciscosouza [~francisco@187.105.21.97] has joined #go-nuts
19:49 -!- dustyw [~dustyw@c-98-247-248-194.hsd1.wa.comcast.net] has quit [Ping
timeout: 260 seconds]
19:51 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has joined #go-nuts
19:51 -!- shane84 [~shane@d24-36-35-107.home1.cgocable.net] has joined #go-nuts
19:52 < shane84> hello
19:52 -!- taruti [taruti@ultra.violetti.org] has joined #go-nuts
19:53 -!- skelterjohn [~jasmuth@216.117.19.250] has quit [Ping timeout: 264
seconds]
19:53 -!- miker2 [~miker2@pool-96-245-224-59.phlapa.fios.verizon.net] has joined
#go-nuts
19:53 -!- Slant [~scott@124-168-200-235.dyn.iinet.net.au] has quit [Quit: Slant]
19:53 < shane84> just a minor question
19:53 -!- miker2 [~miker2@pool-96-245-224-59.phlapa.fios.verizon.net] has quit
[Client Quit]
19:53 < shane84> but why is the keyword "func" necessary
19:57 < aho> clearly a mistake
19:57 < aho> it should have been "funk"
19:57 < aho> <:
20:00 < shane84> lol
20:01 < shane84> min (x, y int) int { ...  }
20:01 < shane84> im sure the parser could do without it
20:02 < TheMue> the parser for sure, but a keyword makes it more clear for
the developer
20:02 < TheMue> people are important, not machines/parser
20:02 < aho> ye, i'm actually glad it's "function" in javascript
20:03 < aiju> 21:54 < shane84> but why is the keyword "func" necessary
20:03 < aiju> consistency
20:03 < aho> since a function creates a new scope, it's a pretty big deal...
hence the big keyword is actually perfectly fine
20:03 < Kahvi> What about func types?  func in "type MyComplexFunction
func(a, b, c SomeFancyType, d, e int) (int, os.Error)" makes sense.
20:03 < aiju> now all global statements start with a keyword
20:03 < shane84> the braces indicate scope?
20:03 < Kahvi> And what aiju said.
20:04 < aiju> without func would be way cooler, though ;P
20:04 < shane84> lol, ok that makes sense
20:04 < shane84> i couldn't find anything on the FAQ nor google
20:05 < shane84> i like the explanation about type declarations after the
variable
20:05 < shane84> it seemed redundant though to use "func", but if all global
statements start with a keyword, that makes sense
20:06 < aiju> back to old C!
20:06 < aiju> foo(a, b, c) { return a + b * c; }
20:06 < shane84> sure that looks more traditional, i like that
20:06 < aiju> haha
20:06 < aiju> traditional family values
20:08 < shane84> does anyone use Haskell?
20:08 < aiju> no
20:09 < Namegduf> I heard a rumour, once, of a person using Haskell
20:09 < aiju> i remain skeptical
20:09 < shane84> lol
20:09 < Namegduf> But it turned out they just used Python and thought it'd
be really cool to learn
20:09 < Namegduf> But hadn't yet.
20:09 < zozoR> i know one guy who speaks haskell
20:09 < shane84> lol
20:10 < zozoR> but he likes java too
20:10 < aiju> haskell programmers are like lojban programmers
20:10 < aiju> *speakers
20:10 < zozoR> so his oppinion doesnt really count
20:12 -!- Kahvi_ [5b9b57fc@gateway/web/freenode/ip.91.155.87.252] has joined
#go-nuts
20:12 -!- Kahvi [5b9b57fc@gateway/web/freenode/ip.91.155.87.252] has quit [Ping
timeout: 252 seconds]
20:13 < shane84> its nice and terse
20:13 < shane84> but lazy evaluation seems unnecessary as a default
20:13 -!- preflex [~preflex@unaffiliated/mauke/bot/preflex] has joined #go-nuts
20:14 < shane84> many languages support "yield" or you can implement an
iterator to terminate early
20:14 < shane84> i want an off-work language for my spare time
20:14 < shane84> i tried haskell, but i feel it is too inconsistent
20:15 < zozoR> try go
20:15 < shane84> stackoverflow praises it like its a god language so i tried
it out
20:15 < zozoR> it feels awesome between your legs
20:15 < shane84> it looks nice
20:15 < shane84> i enjoy c, but it takes too long to be productive, i like
the consistency of go
20:15 < niemeyer> shane84: Lazy evaluation is quite unrelated to yield
20:15 < moraes> i only hear good things about haskell
20:15 < aiju> haha
20:16 < moraes> and i have no friggin idea of what haskell is
20:16 < zozoR> the only bad thing i've heard about haskell is its functional
20:16 < exch> that's likely because the only ones who talk about it are
zealous supporters
20:16 < aiju> if i only hear good things about something, i uually switch my
source
20:16 < niemeyer> aiju++
20:16 < moraes> i only hear bad things about go
20:16 < moraes> seriously, except in go-nuts
20:16 < zozoR> weird
20:16 < aiju> haha
20:16 < zozoR> :D
20:16 < niemeyer> moraes: and here..  ;)
20:17 < moraes> i missed the #, meant #go-nuts
20:17 < exch> "zomg it doesn't look like my fav language, so it sucks!11"
20:17 < zozoR> the only real complains i hear about go is lack of generics
20:18 < zozoR> although these people dont get interfaces
20:18 < niemeyer> zozoR: There are many real complaints..  all languages
suck..
20:18 < zozoR> true that
20:18 < TheMue> yep
20:18 < aiju> four out of five language designers agree: go sucks
20:18 < niemeyer> Ideally we'd think and correct logic would just
materialize
20:19 < TheMue> done many langs in the past, and all lead to lang wars
20:19 < aiju> the fifth was too busy actually writing code
20:19 < zozoR> in go
20:19 < zozoR> :D
20:19 < zozoR> while the other four had to wait while compiling
20:20 < zozoR> or finding memory leaks
20:20 < shane84> @niemeyer I belie yield is a form of lazy evaluation
20:20 < aiju> i believe yield is a form of genocide
20:20 < Kahvi_> I'm so pro that I don't do memory leaks.
20:21 < aiju> my programs don't leak memory, they have incremental memory
requirements
20:21 < niemeyer> shane84: yield is as much lazy evaluation as callbacks are
a form of context switching.
20:22 < aiju> callbacks are a form of madness
20:23 < shane84> "lazy evaluation is an evaluation strategy which delays
evaluation of an epression until its value is actually required" - wikipedia on
Lazy evaluation
20:23 < shane84> i think "yield" fits that description
20:23 < aiju> that's not how it works
20:23 < niemeyer> shane84: Ugh
20:24 -!- qeed [~qeed@adsl-98-85-45-149.mco.bellsouth.net] has joined #go-nuts
20:24 < niemeyer> shane84: You should try haskell, even if for understanding
what that actually means :)
20:24 < aiju> Go has yield, it's called <-
20:24 < moraes> shane84, go is pretty lovely.  try it.
20:24 < TheMue> lazy evaluation is deferring to learn a language so long
that it isn't needed anymore
20:24 < shane84> i have tried a fair bit
20:25 < shane84> and lists seem similar to yield
20:25 < aiju> channels are similar
20:25 < aiju> Go doesn't have lists
20:25 < niemeyer> shane84: You should try Go as well..
20:25 * niemeyer hides
20:27 < shane84> in fact im certain its lazy
20:27 -!- smw [~stephen@unaffiliated/smw] has quit [Read error: Connection reset
by peer]
20:27 < shane84> non-strictness is implemented by lazy evaluation in haskell
20:27 < shane84> non-strictness is defined by any function that can process
bottom (_|_)
20:28 < shane84> const1 x = 1
20:28 < aiju> i'm not sure what haskell programmers are programming, but
it's not a computer
20:29 < shane84> you could pass an expression that is (_|_) to a yield
operator and have it evaluate it
20:29 < shane84> as long as it terminated before (_|_)
20:29 * exch sticks with Factor when he feels allobscure and non-conformist
20:29 < shane84> niemeyer: I will have to respectfully disagree with you
20:29 -!- smw [~stephen@unaffiliated/smw] has joined #go-nuts
20:29 < zozoR> if you change it a bit
20:29 < niemeyer> shane84: f(a, b())..  b() is never computed if it's not
used within f..  do you agree this is lazy evaluation?
20:29 < zozoR> you have boobs ( . Y . )
20:30 < aiju> no, lazy evaluation is when i say it is lazy evaluation
20:30 < aiju> this is how definitions work
20:30 < niemeyer> shane84: That's a feature _entirely_ different from
channels and yields
20:31 < shane84> niemeye i agree that its lazy if b() is never evaluated
20:31 < shane84> *niemeyer
20:32 < shane84> correction i would say its non-strict
20:32 < aiju> that's exactly the definition of lazy evaluation
20:34 < exch> so how does that work?  The program should be fully aware
before hand if the result of a given expression is ever used.  Otherwise it can't
avoid executing it..  But if it knows beforehand it will never be used, why not
just remove it from the code entirely at compile time?
20:35 < aiju> exch: the thing is crazy stuff like an infinite list
20:35 -!- alanl [~yogafire@c-71-204-189-190.hsd1.ca.comcast.net] has quit [Ping
timeout: 260 seconds]
20:36 < niemeyer> exch: Not really..  imagine f contains "if a > 42 { use
b_var }"
20:36 < aiju> tail list is executed only finitely many times, but you don't
know in advance how often
20:36 < shane84> you can't pass inifinity to a c# IEnumerable that yields
20:36 < niemeyer> exch: It is pretty involved, yes
20:36 < shane84> however you could pass it something that might bottom
20:36 < niemeyer> exch: it's magically awesome..  and causes bad headaches
20:36 < shane84> if you enumerate say dividing by a value that decrements
down to zero
20:37 < exch> hmm
20:37 < shane84> i would still say lazy
20:37 < aiju> http://9fans.net/archive/2004/02/1227
20:37 < aiju> regarding "yield is actually lazy"
20:37 < aiju> ...
20:37 < zozoR> why is lazy evaluation good anyway?
20:37 < shane84> it defers unnecessary calculations
20:38 < shane84> defers calculations until they are needed
20:38 < aiju> instead it eats all your memory
20:38 < zozoR> you tell me what it is
20:38 < zozoR> not why its awesome
20:39 < zozoR> sounds like bad coding to me if you arent gonna use your
stuff anyway
20:39 < shane84> in haskell or in c#
20:39 < zozoR> dunno
20:39 < zozoR> lazy evalutation
20:39 < aiju> zozoR: it certainly has applications
20:39 < shane84> c# or python you can use "yield" to evaluate as necessary
20:39 < aiju> zozoR: e.g.  you can read a whole file at once
20:40 < aiju> or pretend you do it
20:40 < niemeyer> zozoR: It lets you not worry about optimization..  and
lets you unable to understand anything about what's going on as well.  :-)
20:40 < shane84> its implemented by creating an iterator class that
termiantes upon reaching the necessary value
20:40 < zozoR> screw python and C#
20:40 < zozoR> yield doesnt count as lazy
20:40 < shane84> you can write your own iterator in c++
20:40 -!- dustyw [~dustyw@c-98-247-248-194.hsd1.wa.comcast.net] has joined
#go-nuts
20:40 < aiju> yay, more shitty languages
20:41 < aiju> someone bring in COBOOL
20:41 < aiju> -O
20:41 < shane84> you can achieve non-strict function calls with function
pointers or delegates
20:41 < aiju> and Objective C
20:41 < moraes> and ALGOL-68
20:41 * moraes hides
20:41 * moraes thinks he'll be banned
20:41 < aiju> haha
20:42 < zozoR> aiju, when you read this file at once (without actually doing
it)
20:42 < shane84> zozoR why doesnt yield count as lazy?
20:42 < zozoR> i dont see why that matters..
20:42 < aiju> yield is not lazy at all
20:42 < zozoR> cause you are gonna use it eventually
20:42 < aiju> zozoR: memory
20:42 < zozoR> and om nom memory
20:42 < aiju> memory doesn't grow on trees
20:42 < shane84> not necessarily
20:42 * TheMue works with smalltalk, where we never had more than 5 keywords and
even true and false are single instances of the classes True and False derived
from Boolean
20:43 < zozoR> how are you gonna load a file without using memory >.<
20:43 < aiju> shane84: _yield is not lazy_ period
20:43 < zozoR> aiju, agreed
20:43 < aiju> zozoR: the question is not about using memory, but about how
much
20:43 < shane84> you dont understand, its not evaluating the arguments, only
as necessary
20:43 < aiju> yes it does
20:43 < shane84> no it doesnt
20:43 < zozoR> reading 200MB file now or later, what is the difference?
20:43 < aiju> yield is a return from a coroutine
20:43 < shane84> say i have static IEnumerable Powers(int base, int stop);
20:44 < aiju> zozoR: reading 200 MB now is different from reading 4096 B
every once ain a while
20:44 -!- taruti [taruti@ultra.violetti.org] has quit [Remote host closed the
connection]
20:44 < zozoR> but lazy doesnt mean it loads a few bits when its bored does
it?
20:44 < shane84> it creates an iterator that will evaluate teh powers as
needed
20:44 < shane84> it doesnt eagerly evaluate them all at once
20:44 < niemeyer> zozoR: Not as needed at all
20:44 < zozoR> noam, it evaluates, and then waits till someone grabs the
value
20:44 < aiju> shane84 is basically telling me that the sky is green
20:44 < niemeyer> Sorry
20:44 < aiju> for blue values of green
20:44 < niemeyer> shane84: Not as needed at all
20:45 < niemeyer> shane84: list(generator)..  boom world
20:45 < shane84> sure if I implemented as the iterator pattern
20:45 < shane84> I could only evaluate the current power as I needed
20:45 < aiju> shane84: yield is quite similar to channel
20:45 < aiju> +s
20:45 < aiju> so channels are lazy evaluation?
20:45 < niemeyer> Man..  I'm going to join the fifth language designer at
this point..
20:45 < zozoR> ill just go to bed
20:45 < shane84> try this:
http://blogs.msdn.com/b/pedram/archive/2007/06/02/lazy-evaluation-in-c.aspx
20:46 < shane84>
http://stackoverflow.com/questions/1088442/what-is-the-purpose-advantage-of-using-yield-return-iterators-in-c
20:46 < shane84> top answer states lazy "on demand"
20:46 < aiju> sorry, it isn't
20:47 < shane84> then down vote the answer
20:47 < shane84> it has 32 to accepts and 0 downs
20:47 < zozoR> because people are stupid doesnt make it lazy
20:47 < aiju> i fucking hate this vote crap, but that's a different story
20:47 < aiju> hey, let's vote
20:47 < aiju> 1+1=3
20:47 < shane84> im pretty sure the stackoverflow community isnt all
retarded
20:47 < aiju> who thinks that's true?
20:47 < aiju> if 80% answer yes, it's still wrong
20:47 < Namegduf> I don't, but I'm going to vote yes anyway
20:48 < aiju> just because something behaves remote like something else,
doesn't mean they are identical
20:48 < aiju> or even directly related
20:48 < aiju> cars don't have horses in them
20:48 < zozoR> unless 32 people thinks so :P
20:48 < TheMue> funny, during the last 27yrs I've used basic, pascal, c/c++,
rexx, perl, python, java, c#, smalltalk, scheme, erlang and go and it's always the
same problem: the bug sits in front of the screen
20:48 < shane84> its not completely lazy like stackoverflow because it will
evaluate the parameters
20:48 < shane84> but you could pass lambda abstractions as your parameters
20:48 < zozoR> and everything else..
20:49 < zozoR> the idea is, it evaluates everything until yield, then it
waits
20:49 < shane84> and i would consider as lazy as possible without changing
the internals of c#
20:49 < shane84> no its an iterator
20:50 < zozoR> ..  ill just go to bed then
20:50 < zozoR> i cant take this anymore
20:50 < zozoR> later ^^
20:50 < shane84> it evaluates when MoveNext() is called
20:50 -!- Bigbear1 [~Cody@S010600222dcddd0f.cg.shawcable.net] has quit [Read
error: Connection reset by peer]
20:51 -!- zozoR [~Morten@2906ds2-arno.0.fullrate.dk] has quit [Remote host closed
the connection]
20:52 -!- robteix_ [~robteix@host254.190-225-208.telecom.net.ar] has joined
#go-nuts
20:58 -!- shane84 [~shane@d24-36-35-107.home1.cgocable.net] has quit [Quit:
leaving]
20:58 -!- edsrzf [~edsrzf@ip-58-28-201-165.ftth.xnet.co.nz] has joined #go-nuts
21:12 -!- robteix_ [~robteix@host254.190-225-208.telecom.net.ar] has quit [Quit:
Computer has gone to sleep.]
21:21 < knowmercy> I'm setting up my websites on a pair of low power
webservers running the intel D510 procs and they still out perform my ruby and
python apps :)
21:22 < aiju> haha
21:22 < aiju> kencc (the C compiler also used for the Go runtime) running in
my ARM emulator outperforms g++
21:22 < TheMue> beside all theoretical language discussions: i'm currently
coding unit test for my redis database client and it's always fun how pragmatic go
is
21:24 -!- awidegreen [~quassel@h-170-226.a212.priv.bahnhof.se] has quit [Ping
timeout: 240 seconds]
21:31 -!- noam [~noam@87.69.42.61.cable.012.net.il] has quit [Ping timeout: 252
seconds]
21:33 -!- TheMue [~FMueller@p5DDF634D.dip.t-dialin.net] has quit [Quit: leaving]
21:34 -!- Fish- [~Fish@bus77-2-82-244-150-190.fbx.proxad.net] has quit [Quit:
WeeChat 0.3.5]
21:36 -!- shane84 [~shane@d24-36-35-107.home1.cgocable.net] has joined #go-nuts
21:50 -!- franciscosouza [~francisco@187.105.21.97] has quit [Read error:
Connection reset by peer]
21:51 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
21:52 -!- franciscosouza [~francisco@187.105.21.97] has joined #go-nuts
21:53 -!- taruti [taruti@ultra.violetti.org] has joined #go-nuts
21:55 -!- robteix_ [~robteix@host254.190-225-208.telecom.net.ar] has joined
#go-nuts
21:56 -!- B4R0n [~baron@189.36.132.197] has quit [Ping timeout: 258 seconds]
21:59 -!- rlab [~Miranda@91.200.158.34] has quit [Quit: Miranda IM! Smaller,
Faster, Easier.  http://miranda-im.org]
22:00 -!- dblue [5ae3bc32@gateway/web/freenode/ip.90.227.188.50] has joined
#go-nuts
22:02 < dblue> Hi, Does anyone have experience integrating the go compiler
into xcode?
22:03 -!- robteix_ [~robteix@host254.190-225-208.telecom.net.ar] has quit [Quit:
Computer has gone to sleep.]
22:06 -!- homovitruvius [~user@pool-96-236-165-90.pitbpa.east.verizon.net] has
joined #go-nuts
22:09 -!- rcrowley [~rcrowley@c-71-202-44-233.hsd1.ca.comcast.net] has quit [Ping
timeout: 252 seconds]
22:13 -!- shane84 [~shane@d24-36-35-107.home1.cgocable.net] has left #go-nuts []
22:13 -!- rcrowley [~rcrowley@c-71-202-44-233.hsd1.ca.comcast.net] has joined
#go-nuts
22:17 -!- nekoh [~nekoh@dslb-088-068-006-051.pools.arcor-ip.net] has quit [Quit:
nekoh]
22:17 -!- nekoh [~nekoh@dslb-088-068-006-051.pools.arcor-ip.net] has joined
#go-nuts
22:26 -!- dfr|mac [~dfr|work@ool-18baf7e7.dyn.optonline.net] has quit [Remote host
closed the connection]
22:27 -!- dfr|mac [~dfr|work@ool-18baf7e7.dyn.optonline.net] has joined #go-nuts
22:28 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
22:32 -!- homovitruvius [~user@pool-96-236-165-90.pitbpa.east.verizon.net] has
quit [Ping timeout: 240 seconds]
22:32 -!- photron [~photron@port-92-201-63-176.dynamic.qsc.de] has quit [Ping
timeout: 240 seconds]
22:36 -!- cron_ [cron@190.121.101.14] has joined #go-nuts
22:38 -!- noam [~noam@87.69.42.61.cable.012.net.il] has joined #go-nuts
22:40 < jlaffaye> hey guyz I have a question totally not related to Go but I
will ask here :)
22:40 -!- yourstruly [~nisstyre@infocalypse-net.info] has quit [Quit: Leaving]
22:41 < crest> jlaffaye: 42
22:41 < jlaffaye> It would be totally awesome to authenticate on a webapp
with a private rsa key (challenge).  is that possible?
22:41 < jlaffaye> and not a certificate
22:41 < crest> jlaffaye: a selfsigned client cert?
22:42 < crest> the go http package allows you to access the clients cert if
you requested it
22:44 -!- Kahvi_ [5b9b57fc@gateway/web/freenode/ip.91.155.87.252] has quit [Ping
timeout: 252 seconds]
22:44 < jlaffaye> the thing is that I already have the public keys of the
clients, so I could use the same proof it would be nice.  Instead of managing
multiple type of keys.
22:45 < jlaffaye> (understand ssh keys)
22:50 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-149-182.clienti.tiscali.it] has
quit [Quit: E se abbasso questa leva che succ...]
22:52 -!- shoenig [~shoenig@rrcs-71-42-216-106.sw.biz.rr.com] has joined #go-nuts
22:54 -!- Kahvi [5b9b57fc@gateway/web/freenode/ip.91.155.87.252] has joined
#go-nuts
22:55 -!- Solak [~stijnw@cthia.xs4all.nl] has quit [Remote host closed the
connection]
22:59 -!- B4R0n [~baron@189.36.132.197] has joined #go-nuts
23:02 -!- zanget` [~zanget@hurf.durf.me] has quit [Ping timeout: 240 seconds]
23:03 -!- mindphaze [~void@2607:f358:1:fed5:22:0:bd62:7fa7] has quit [Read error:
Operation timed out]
23:05 -!- dblue [5ae3bc32@gateway/web/freenode/ip.90.227.188.50] has quit [Quit:
Page closed]
23:11 -!- zanget [~zanget@205.185.124.164] has joined #go-nuts
23:15 -!- cron_ [cron@190.121.101.14] has quit [Quit: Leaving]
23:18 -!- zanget [~zanget@205.185.124.164] has quit [Quit: ZNC -
http://znc.sourceforge.net]
23:20 -!- zanget [~zanget@205.185.124.164] has joined #go-nuts
23:20 -!- mindphaze [~void@2607:f358:1:fed5:22:0:bd62:7fa7] has joined #go-nuts
23:26 -!- huin [~huin@91.85.139.164] has quit [Quit: leaving]
23:26 -!- kergoth_ [~kergoth@ip24-251-173-232.ph.ph.cox.net] has joined #go-nuts
23:28 -!- dreadlorde [~dreadlord@c-68-42-82-10.hsd1.mi.comcast.net] has quit [Ping
timeout: 258 seconds]
23:30 -!- Kahvi [5b9b57fc@gateway/web/freenode/ip.91.155.87.252] has quit [Ping
timeout: 252 seconds]
23:32 -!- yogib [~yogib@dslb-178-009-079-205.pools.arcor-ip.net] has quit [Quit:
yogib]
23:33 -!- stalled [~stalled@unaffiliated/stalled] has quit [Read error: Connection
reset by peer]
23:33 -!- ako [~nya@fuld-590c6281.pool.mediaWays.net] has joined #go-nuts
23:34 -!- rcrowley [~rcrowley@c-71-202-44-233.hsd1.ca.comcast.net] has quit [Quit:
Computer has gone to sleep.]
23:35 -!- nekoh [~nekoh@dslb-088-068-006-051.pools.arcor-ip.net] has quit [Quit:
nekoh]
23:36 -!- aho [~nya@fuld-590c64fb.pool.mediaWays.net] has quit [Ping timeout: 240
seconds]
23:39 -!- stalled [~stalled@unaffiliated/stalled] has joined #go-nuts
23:39 -!- rcrowley [~rcrowley@c-71-202-44-233.hsd1.ca.comcast.net] has joined
#go-nuts
23:50 -!- moraes [~moraes@189.103.177.124] has quit [Ping timeout: 264 seconds]
23:56 -!- yourstruly [~yours@infocalypse-net.info] has joined #go-nuts
23:56 -!- yourstruly [~yours@infocalypse-net.info] has quit [Max SendQ exceeded]
23:58 -!- yourstruly [~yours@infocalypse-net.info] has joined #go-nuts
23:58 -!- yourstruly [~yours@infocalypse-net.info] has quit [Max SendQ exceeded]
23:58 -!- yourstruly [~yours@infocalypse-net.info] has joined #go-nuts
23:58 -!- yourstruly [~yours@infocalypse-net.info] has quit [Max SendQ exceeded]
23:59 -!- yourstruly [~yours@infocalypse-net.info] has joined #go-nuts
23:59 -!- yourstruly [~yours@infocalypse-net.info] has quit [Max SendQ exceeded]
--- Log closed Sun Aug 21 00:00:20 2011