--- Log opened Mon Jan 17 00:00:04 2011
00:02 -!- jhawk28 [~jhawk28@user-387c58d.cable.mindspring.com] has joined #go-nuts
00:12 -!- watr_ [~watr@66.183.100.58] has quit [Ping timeout: 264 seconds]
00:26 -!- waqas [~waqas@jaim.at] has joined #go-nuts
00:30 -!- skejoe_ [~skejoe@188.114.142.162] has quit [Quit: Lost terminal]
00:38 -!- Scorchin [~Scorchin@host86-186-246-184.range86-186.btcentralplus.com]
has quit [Quit: Scorchin]
00:46 -!- l00t [~i-i3id3r_@189.105.2.99] has joined #go-nuts
00:52 -!- Tv [~tv@cpe-76-168-227-45.socal.res.rr.com] has quit [Ping timeout: 272
seconds]
00:57 -!- skelterjohn [~jasmuth@c-68-45-238-234.hsd1.nj.comcast.net] has joined
#go-nuts
00:57 -!- nettok [~quassel@200.119.190.170] has quit [Quit: No Ping reply in 180
seconds.]
00:58 -!- nettok [~quassel@200.119.190.170] has joined #go-nuts
01:05 < skelterjohn> evening
01:06 < temoto> \o
01:10 < skelterjohn> hows coding?
01:12 -!- LeNsTR [~lenstr@unaffiliated/lenstr] has quit [Quit: LeNsTR]
01:16 -!- LeNsTR [~lenstr@unaffiliated/lenstr] has joined #go-nuts
01:23 -!- skelterjohn [~jasmuth@c-68-45-238-234.hsd1.nj.comcast.net] has quit
[Quit: skelterjohn]
01:23 < temoto> Awesome.  robots.txt library is ready for production use.
01:29 -!- skelterjohn [~jasmuth@c-68-45-238-234.hsd1.nj.comcast.net] has joined
#go-nuts
01:31 -!- skelterjohn [~jasmuth@c-68-45-238-234.hsd1.nj.comcast.net] has quit
[Client Quit]
01:32 -!- skelterjohn [~jasmuth@c-68-45-238-234.hsd1.nj.comcast.net] has joined
#go-nuts
01:32 -!- saturnfive [~saturnfiv@210.74.155.131] has joined #go-nuts
01:41 -!- shvntr [~shvntr@123.89.110.64] has quit [Quit: leaving]
01:51 -!- jhawk28 [~jhawk28@user-387c58d.cable.mindspring.com] has quit [Quit:
Leaving...]
01:56 < crazy2be> temoto: robots.txt library?
01:57 < temoto> crazy2be, yes.
01:58 < temoto> it parses robots.txt into internal 'database' and allows to
query whether some user agent is allowed to visit some url path
01:59 < crazy2be> ah
01:59 < crazy2be> don't have any use for that at the moment, but i could see
why it would be useful
02:11 -!- vpit3833 [~user@203.111.33.203] has quit [Quit: ERC Version 5.3 (IRC
client for Emacs)]
02:18 -!- ios_ [~ios@180.191.33.144] has joined #go-nuts
02:21 -!- skelterjohn [~jasmuth@c-68-45-238-234.hsd1.nj.comcast.net] has quit
[Quit: skelterjohn]
02:25 -!- vpit3833 [~user@203.111.33.203] has joined #go-nuts
02:28 -!- waqas [~waqas@jaim.at] has left #go-nuts []
02:35 -!- Paradox924X [~Paradox92@c-68-35-229-34.hsd1.fl.comcast.net] has quit
[Remote host closed the connection]
02:36 -!- skelterjohn [~jasmuth@c-68-45-238-234.hsd1.nj.comcast.net] has joined
#go-nuts
02:37 -!- boscop [~boscop@f055214238.adsl.alicedsl.de] has quit [Ping timeout: 240
seconds]
02:40 -!- tensorpudding [~user@99.23.127.179] has quit [Remote host closed the
connection]
02:53 -!- ios_ [~ios@180.191.33.144] has quit [Ping timeout: 240 seconds]
02:53 -!- cafesofie [~cafesofie@dhcp-140-254-204-17.osuwireless.ohio-state.edu]
has quit [Remote host closed the connection]
02:59 < sifi> can someone explain how to create a new StringVector?
03:00 < JBeshir> new(vector.StringVector), likely
03:00 < Namegduf> Or just var x vector.StringVector
03:00 < sifi> cool, thanks
03:03 < mosva> What is that animal on go logo?
03:03 <@adg> mosva: a gopher
03:05 < mosva> nice!
03:05 < TheSeeker> instantrimshot.com
03:09 -!- LeNsTR [~lenstr@unaffiliated/lenstr] has quit [Quit: LeNsTR]
03:20 < mosva> [0:12] silces the array with length 12 and indexes 0....10,
11.  right?
03:20 < mosva> When passing an array to a function we need to slice it?
Always?
03:26 <@adg> mosva: yes to your first question
03:27 <@adg> mosva: if you need to use an array where a slice is expected,
you need to turn it into a slice, yes
03:27 <@adg> eg foo[:]
03:27 < mosva> If so why do they call it low:high and not index:length
03:28 -!- cco3 [~conley@c-69-181-138-209.hsd1.ca.comcast.net] has quit [Read
error: Operation timed out]
03:28 <@adg> oh it's not the length (i misunderstood your question) - it's
the end index
03:29 <@adg> mosva:
http://blog.golang.org/2011/01/go-slices-usage-and-internals.html
03:29 < mosva> wow, nice
03:29 < mosva> Thanks for writing that
03:29 <@adg> :)
03:30 -!- m4dh4tt3r [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has quit [Quit:
Leaving.]
03:32 < mosva> Go was released in Nov 2009.  So its been only ~1 year.
right?
03:33 -!- m4dh4tt3r [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has joined
#go-nuts
03:33 * mosva is looking for a way to delete the stupid question above
03:42 < mosva> The only confusing thing is low will be included and high
won't be included in the slice
03:43 -!- devrim1 [~Adium@cpe-72-225-239-227.nyc.res.rr.com] has quit [Quit:
Leaving.]
03:43 -!- cafesofie [~cafesofie@rnwifi-164-107-92-51.resnet.ohio-state.edu] has
joined #go-nuts
03:44 < saturnfive> how to open non utf-8 text file?
03:44 < crazy2be> saturnfive: What other type is there?
03:44 < saturnfive> gb18030
03:44 < crazy2be> unless you want binary
03:45 <@adg> mosva: just remember it's a half-open range, and that
a[0:len(a)] is the identity slice
03:46 < crazy2be> saturnfive: It's not opening the file that would be an
issue, but doing something useful with the data
03:46 < crazy2be> afaik, os.Open() will open any file, including text or
binary
03:46 < saturnfive> e.g.  GB18030 text file
03:47 < crazy2be> it might require the O_BINARY flag or something
03:47 < crazy2be> but you might have to write your own decoder, or steal
someone elses
03:47 < crazy2be> i'm assuming you tried it and it didn't work
03:48 <@adg> saturnfive: there's nothing special you need to do to open a
file like that
03:48 < saturnfive> 3Q, i'm going to eat rice, bye
03:49 < crazy2be> it uses unicode code points and such as far as i can tell
03:56 < mosva> adg, any articles where I can learn the new/make and
value/reference from the compiler's perspective?
03:58 <@adg> there's no value/reference thing
03:58 <@adg> they're all values
03:58 <@adg> just know that slices, channels, functions, and maps are
reference types
03:58 <@adg> and strings i guess
03:58 <@adg> strings and functions are immutable so it doesn't matter that
they're reference types
03:59 <@adg> and obviously pointers are reference types
03:59 -!- iant [~iant@216.239.45.130] has quit [Ping timeout: 246 seconds]
04:02 <@adg> i would like to write a blog post about this, though
04:03 < Namegduf> It'd be nice to have something written approachably that
could be linked
04:04 < mosva> Thanks.  adg
04:04 < mosva> Will Google be renaming 'Go'?
04:06 < fzzbt> why?
04:08 -!- l00t [~i-i3id3r_@189.105.2.99] has quit [Ping timeout: 265 seconds]
04:09 < mosva> because I don't like to say I'm going
04:09 < crazy2be> you're going where?
04:10 < crazy2be> going to program go code?
04:10 < crazy2be> i mean, you don't say you're Cing or C++ing or Javaing
04:11 < Namegduf> Go is a good name.
04:16 <@adg> we (the Go team) like the name Go, and are not going to change
it
04:16 -!- Paradox924X [~Paradox92@vaserv/irc/founder] has joined #go-nuts
04:17 < crazy2be> and the debugger called ogle :)
04:18 < crazy2be> or, at least, that's what it used to be called
04:18 < crazy2be> ah yes
04:18 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has joined #go-nuts
04:19 -!- mode/#go-nuts [+v iant] by ChanServ
04:23 -!- cafesofie [~cafesofie@rnwifi-164-107-92-51.resnet.ohio-state.edu] has
quit [Remote host closed the connection]
04:23 -!- cafesofie [~cafesofie@rnwifi-164-107-92-51.resnet.ohio-state.edu] has
joined #go-nuts
04:26 -!- Paradox924X [~Paradox92@vaserv/irc/founder] has quit [Ping timeout: 265
seconds]
04:26 -!- rejb [~rejb@unaffiliated/rejb] has quit [Ping timeout: 276 seconds]
04:30 -!- cafesofie [~cafesofie@rnwifi-164-107-92-51.resnet.ohio-state.edu] has
quit [Remote host closed the connection]
04:30 -!- Paradox924X [~Paradox92@c-68-35-229-34.hsd1.fl.comcast.net] has joined
#go-nuts
04:30 -!- Paradox924X [~Paradox92@c-68-35-229-34.hsd1.fl.comcast.net] has quit
[Changing host]
04:30 -!- Paradox924X [~Paradox92@vaserv/irc/founder] has joined #go-nuts
04:30 -!- cafesofie [~cafesofie@rnwifi-164-107-92-51.resnet.ohio-state.edu] has
joined #go-nuts
04:34 -!- jeff2 [~sername@c-67-164-29-36.hsd1.ca.comcast.net] has joined #go-nuts
04:36 -!- elimisteve [~elimistev@pool-71-102-138-52.snloca.dsl-w.verizon.net] has
joined #go-nuts
04:43 -!- ios_ [~ios@180.191.88.7] has joined #go-nuts
05:06 -!- cafesofi_ [~cafesofie@rnwifi-164-107-92-51.resnet.ohio-state.edu] has
joined #go-nuts
05:06 -!- cafesofie [~cafesofie@rnwifi-164-107-92-51.resnet.ohio-state.edu] has
quit [Read error: Connection reset by peer]
05:07 -!- cafesofi_ [~cafesofie@rnwifi-164-107-92-51.resnet.ohio-state.edu] has
quit [Remote host closed the connection]
05:07 -!- kixo [~kixo@78-0-206-31.adsl.net.t-com.hr] has quit [Ping timeout: 240
seconds]
05:07 -!- cafesofie [~cafesofie@rnwifi-164-107-92-51.resnet.ohio-state.edu] has
joined #go-nuts
05:26 -!- ios_ [~ios@180.191.88.7] has quit [Quit: Leaving]
05:34 -!- segy [~segfault@pdpc/supporter/active/segy] has quit [Quit: leaving]
05:35 -!- segy [~segfault@pdpc/supporter/active/segy] has joined #go-nuts
05:44 -!- SRabbelier [~SRabbelie@188.142.63.148] has quit [Ping timeout: 255
seconds]
05:47 -!- cco3 [~conley@c-69-181-138-209.hsd1.ca.comcast.net] has joined #go-nuts
06:02 -!- cafesofie [~cafesofie@rnwifi-164-107-92-51.resnet.ohio-state.edu] has
quit [Remote host closed the connection]
06:10 -!- niemeyer [~niemeyer@189.30.51.233] has joined #go-nuts
06:14 -!- fabled [~fabled@mail.fi.jw.org] has joined #go-nuts
06:21 -!- watr_ [~watr@66.183.100.58] has joined #go-nuts
06:29 -!- watr_ [~watr@66.183.100.58] has quit [Quit: Leaving]
06:32 -!- jeff2 [~sername@c-67-164-29-36.hsd1.ca.comcast.net] has quit [Quit: This
computer has gone to sleep]
06:32 -!- foocraft [~dsc@89.211.156.34] has joined #go-nuts
06:33 -!- crazy2be [~justin@d75-152-162-237.abhsia.telus.net] has quit [Remote
host closed the connection]
06:39 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
06:41 -!- krig_ [kegie@stalin.acc.umu.se] has quit [Ping timeout: 264 seconds]
06:46 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has joined #go-nuts
06:52 -!- krig [kegie@honecker.acc.umu.se] has joined #go-nuts
06:57 -!- cco3 [~conley@c-69-181-138-209.hsd1.ca.comcast.net] has quit [Ping
timeout: 265 seconds]
07:03 -!- kixo [~kixo@78-1-147-32.adsl.net.t-com.hr] has joined #go-nuts
07:04 -!- zozoR [~zozoR@56346ed3.rev.stofanet.dk] has joined #go-nuts
07:14 -!- teejae [~teejae@220.109.219.245] has joined #go-nuts
07:15 -!- piranha [~piranha@5ED4B890.cm-7-5c.dynamic.ziggo.nl] has joined #go-nuts
07:17 < teejae> niemeyer: are you in the chat room?
07:17 < niemeyer> teejae: Yep, here
07:17 < teejae> niemeyer: are you the person that did gozk?
07:17 < niemeyer> teejae: I am indeed
07:17 < teejae> niemeyer: nice work, first of all :)
07:17 < niemeyer> teejae: Thanks :)
07:18 < teejae> niemeyer: seems like there's a problem w/ the makefile for
STATIC
07:18 < niemeyer> teejae: Hmm, ok
07:18 < niemeyer> teejae: What's up?
07:18 < teejae> niemeyer: i'm bad at makefiles, wondering how to get it
right
07:18 < teejae> niemeyer: seems like STATIC=1 depends on a _lib dir
07:18 < teejae> niemeyer: but it's happening in the wrong order
07:19 < teejae> niemeyer: i can do make install STATIC=1, and get lots of
undef'd symbol errors
07:19 < niemeyer> teejae: Ok, hold on
07:19 < teejae> niemeyer: and run a second time, and it works
07:19 < teejae> niemeyer: STATIC=0 works cleanly from the get-go
07:23 < mosva> for _, value := range m {
07:23 < mosva> What does '_' mean?
07:23 < teejae> mosva: _ = ignore the value
07:23 < teejae> range in that case would be (key, value)
07:23 < teejae> however, you don't want the key
07:24 < niemeyer> teejae: I see..  I have a local change to support some cgo
improvements I'm pushing which may be the reason why it works for me.  Give me a
sec
07:24 < teejae> and you can't have a variable declared if you don't use it
07:24 < teejae> niemeyer: ah ok.  if you could pastebin a patch, i can test
it.
07:25 < teejae> niemeyer: i think the dependency order of the _lib is wrong.
but i don't know how to fix it :P
07:25 < teejae> seems like the _lib dir or its contents are being created
after it's already needed
07:25 < teejae> hence a second run will work
07:25 < niemeyer> teejae: Yeah, the change touches that
07:25 < mosva> thanks teejae
07:26 < teejae> mosva: sure, hope that makes sense!
07:26 < niemeyer> teejae: It's not wrong for me, but I see why it's wrong
for you
07:26 < teejae> niemeyer: ah ok.  were you planning on pushing that change
to bzr soon?
07:26 < niemeyer> teejae: It's a change in Go itself..  it depends on the
review cycle
07:27 < teejae> niemeyer: also, the example.go has a syntax error, 2nd err
is already def'd (you use the :=)
07:28 < teejae> niemeyer: https://wiki.ubuntu.com/gozk where it shows the
zk.Create
07:29 < niemeyer> teejae: Oops, sorry about that
07:29 < niemeyer> That's what I get for hacking code in a browser
07:29 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Ping timeout: 264 seconds]
07:29 < teejae> niemeyer: hehe, its the simple stuff that always gets ya
07:30 < teejae> niemeyer: otherwise, i can say your gozk seems to work
pretty well.  just testing it out right now
07:31 < teejae> niemeyer: i did get a bit stuck w/ initializing zookeeper in
an Init fn, which caused all sorts of panics, but that's also because i didn't
know much about Init (that it's single threaded, and thus won't allow reading from
a channel)
07:31 < niemeyer> Ah, yeah, that may get tricku
07:31 < niemeyer> tricky
07:32 < teejae> niemeyer: bang'd head against wall for a few hours before
reading thru the spec more
07:34 < niemeyer> I should mention that in the docs
07:34 < teejae> niemeyer: i did read your blog post about dev'ing cgo and
gozk when it came out, and it just didn't click for me that the init was the
problem
07:35 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
07:39 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Ping timeout: 246 seconds]
07:41 < teejae> niemeyer: stupid question, but how do i generate the go docs
like you have at goneat?
07:42 < niemeyer> teejae: Ok, the Makefile should be working better now.
07:42 < niemeyer> teejae: Just pushed the changes
07:42 < mosva> func (file *File) Write(b []byte) (n int, err Error)
07:42 < mosva> => means we can call the write function with
file.Write(b[:]) right?
07:42 < niemeyer> teejae: You can get the docs locally in this format by
running godoc -server=:6060 and browsing to localhost:6060
07:43 < niemeyer> mosva: What's b's type?
07:43 < quantumelixir> I'm using Makefile's suffix macros and the binaries
build fine but they keep rebuilding even if unnecessary!  How do I specify the
dependencies?
07:43 < teejae> niemeyer: i see.  i have to place the code in GOROOT/pkg
tho?
07:43 < niemeyer> teejae: Yes, or tweak the -path flag to point to your
source
07:44 < mosva> niemeyer, []byte
07:44 < niemeyer> teejae: Or rather, to the parent of your source
07:44 -!- devrim [~Adium@cpe-72-225-239-227.nyc.res.rr.com] has joined #go-nuts
07:44 < niemeyer> mosva: You don't need the [:] then
07:44 < quantumelixir> I tried placing the dependency like so --> .c:
$< but that doesn't work either
07:44 < niemeyer> mosva: file.Write(b) will do
07:44 < Namegduf> mosva: In that case, just pass b itself, yeah, no need to
slice.
07:44 < Namegduf> someslice[:] returns the same slice
07:45 -!- SRabbelier [~SRabbelie@188.142.63.148] has joined #go-nuts
07:45 < mosva> Can a function parameter take array as input?
07:45 < niemeyer> quantumelixir: This doesn't make much sense..  $<
expands to the dependency of the rule, which is specified after the colon
07:45 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3]
07:45 < niemeyer> quantumelixir: You're referencing the dependency with
$< in the place where it's supposed to be defined
07:46 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
07:46 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has joined #go-nuts
07:46 < niemeyer> quantumelixir: You prevent the rule from running by having
a file/directory with the target's name which has a more recent timestamp than the
dependent target
07:46 < quantumelixir> niemeyer: Oh right!  Here's what I want to do: Build
binaries for each source file
07:47 < quantumelixir> like there's test{1..10}.c and I want test{1..10}
binaries
07:47 < niemeyer> quantumelixir: test%: test%.c
07:47 < quantumelixir> What is this called?  (so I can google it :)
07:49 < teejae> mosva: yes, you can get an array.  is there something you
need that's specifically an array vs a slice?
07:50 -!- vpit3833 [~user@203.111.33.203] has quit [Read error: Operation timed
out]
07:50 < niemeyer> mosva: You can, but it's a bad idea
07:50 < quantumelixir> niemeyer: How do I refer to the target?  Like $x
where x = ?
07:51 < niemeyer> mosva: An array type like [N]foo takes N into
consideration when matching against other types
07:51 < niemeyer> mosva: Which means the parameter will only be able to be
used with the precise [N]..
07:51 < niemeyer> mosva: The common idiom is really to accept a slice
07:52 < niemeyer> quantumelixir: The target is $@
07:52 < niemeyer> quantumelixir: You can find all those details in the make
manual: http://www.gnu.org/software/make/manual/make.html
07:52 < teejae> niemeyer: your new Makefile works beautifully :) i really
appreciate it
07:53 < quantumelixir> niemeyer: Thanks!  The makefile builds properly but
it still doesn't get the dependencies right :/ http://pastebin.com/iuHPRxPJ
07:55 < niemeyer> teejae: That's great to hear!
07:56 < teejae> niemeyer: so you guys are using zookeeper at canonical?
07:56 < niemeyer> quantumelixir: That's not even about Go :-)
07:56 -!- jkakar [~jkakar@165.Red-79-157-7.dynamicIP.rima-tde.net] has quit [Ping
timeout: 240 seconds]
07:57 -!- piranha [~piranha@5ED4B890.cm-7-5c.dynamic.ziggo.nl] has quit [Quit:
Computer has gone to sleep.]
07:57 < niemeyer> teejae: Yeah, we've been playing with it on Ensemble
07:57 < quantumelixir> niemeyer: you got me :D
07:57 < quantumelixir> But still a Makefile, nonetheless.  =D
07:57 < teejae> niemeyer: nice to meet you.  i'm in tokyo.  you're in sao
paulo?
07:58 < niemeyer> quantumelixir: For a start, you're mixing rules which
build binaries with source and object files..
07:58 < niemeyer> quantumelixir: But it's really time to study a bit more
about Makefiles, or to take this to a proper forum
07:58 < niemeyer> teejae: My pleasure.  I'm in the south of Brazil
07:58 < quantumelixir> niemeyer: I agree.  I thought I knew stuff about make
but I guess I don't.  Better learn it properly I suppoes :)
07:59 < |Craig|> quantumelixir: I though make was simple, then I wrote this:
https://github.com/Craig-Macomber/Grains--Vegetarian-Zombie-Rising/blob/master/Server/Makefile
and decided gnu make is crazy complex
08:00 < quantumelixir> hehe
08:00 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
08:00 < |Craig|> I never though you could write loops in makefiles, but you
can
08:01 < quantumelixir> I'm sure it's Turing complete and all that jazz
08:01 < quantumelixir> But I thought I'd get away without ever delving too
deep into it
08:03 <@adg> i thought Makefiles weren't turing complete
08:04 < quantumelixir>
http://stackoverflow.com/questions/3480950/are-makefiles-turing-complete
08:05 < quantumelixir> :'(
08:08 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
08:13 -!- petrux [~petrux@host16-224-static.53-82-b.business.telecomitalia.it] has
joined #go-nuts
08:17 < zozoR> how many people are working on go?
08:17 <@adg> zozoR: in what sense?
08:18 < zozoR> those people i can see adding stuff to the build status
08:18 < zozoR> or maybe the whole team that wworks at google ''
08:19 <@adg> there's about 10 of us on the team at google
08:19 <@adg> and probably another 10-20 regular contributors outside google
08:19 <@adg> over 150 people have contributed code, though
08:19 -!- temoto [~temoto@95-25-160-208.broadband.corbina.ru] has quit [Ping
timeout: 240 seconds]
08:21 -!- piranha [~piranha@5ED42E59.cm-7-5a.dynamic.ziggo.nl] has joined #go-nuts
08:21 -!- Mr_Dark` [~dk@poviko.demon.nl] has joined #go-nuts
08:22 < zozoR> cool ^^
08:25 -!- Mr_Dark [~dk@poviko.demon.nl] has quit [Ping timeout: 250 seconds]
08:27 -!- skejoe [~skejoe@188.114.142.162] has joined #go-nuts
08:30 < uriel> adg: in fairness, Russ counts for like a dozen people ;P
08:31 -!- unofficialmvp [~dev@94-62-164-227.b.ipv4ilink.net] has joined #go-nuts
08:32 <@adg> uriel: hah too true!
08:33 -!- unofficialmvp [~dev@94-62-164-227.b.ipv4ilink.net] has left #go-nuts []
08:40 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
08:46 -!- Belg [~kim@gw-gbg.ilait.se] has quit [Read error: Operation timed out]
08:49 -!- kixo [~kixo@78-1-147-32.adsl.net.t-com.hr] has quit [Quit: kixo]
08:49 -!- kixo [~kixo@78-1-147-32.adsl.net.t-com.hr] has joined #go-nuts
08:52 -!- kixo [~kixo@78-1-147-32.adsl.net.t-com.hr] has left #go-nuts []
08:55 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-148-187.clienti.tiscali.it] has
joined #go-nuts
08:56 -!- jkakar [~jkakar@85.48.252.209] has joined #go-nuts
08:57 -!- Belg [~kim@gw-gbg.ilait.se] has joined #go-nuts
09:02 -!- skejoe [~skejoe@188.114.142.162] has quit [Quit: Lost terminal]
09:07 -!- m4dh4tt3r [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has quit [Quit:
Leaving.]
09:19 -!- ondrej [~ondrej@ki.nic.cz] has joined #go-nuts
09:20 < ondrej> Hey, just a quick question.  Do you know if there's somebody
working on packaging Go for Debian.  And if you think this would be a good idea
(at least to have it in experimental branch).
09:22 < Namegduf> Probably not; Go is pretty fast moving and does not yet
shy away from breaking compatibility in the stdlib
09:22 < Namegduf> IMHO, of course.
09:23 -!- petrux [~petrux@host16-224-static.53-82-b.business.telecomitalia.it] has
quit [Ping timeout: 276 seconds]
09:23 < ondrej> I found ITP bug (Intent To Package) meanwhile it seems that
Ivan Wong is working on that.
09:24 -!- teejae [~teejae@220.109.219.245] has quit [Quit: teejae]
09:27 -!- ExtraSpice [~XtraSpice@88.118.33.48] has joined #go-nuts
09:27 -!- ondrej [~ondrej@ki.nic.cz] has quit [Quit: leaving]
09:27 -!- tvw [~tv@e176002116.adsl.alicedsl.de] has joined #go-nuts
09:31 -!- sl [~sl@68-179-130-17.bsr-c9-d1.evv.dhcp.sigecom.net] has quit [Ping
timeout: 272 seconds]
09:33 -!- temoto [~temoto@81.19.91.15] has joined #go-nuts
09:40 -!- pjm0616 [~user@110.9.28.45] has quit [Ping timeout: 276 seconds]
09:44 -!- pjm0616 [~user@110.9.28.45] has joined #go-nuts
09:49 -!- tvw [~tv@e176002116.adsl.alicedsl.de] has quit [Remote host closed the
connection]
09:50 -!- wrtp [~rog@92.17.53.205] has joined #go-nuts
09:56 -!- dforsyth [~dforsyth@c-76-21-40-117.hsd1.ca.comcast.net] has quit [Remote
host closed the connection]
09:57 -!- dforsyth [~dforsyth@c-76-21-40-117.hsd1.ca.comcast.net] has joined
#go-nuts
10:03 -!- teejae [~teejae@220.109.219.245] has joined #go-nuts
10:04 -!- temoto [~temoto@81.19.91.15] has quit [Quit: Leaving]
10:12 -!- petrux [~petrux@host16-224-static.53-82-b.business.telecomitalia.it] has
joined #go-nuts
10:13 -!- niemeyer [~niemeyer@189.30.51.233] has quit [Ping timeout: 240 seconds]
10:17 -!- nettok [~quassel@200.119.190.170] has quit [Ping timeout: 260 seconds]
10:22 -!- teejae [~teejae@220.109.219.245] has quit [Quit: teejae]
10:22 -!- saturnfive [~saturnfiv@210.74.155.131] has quit [Read error: Connection
reset by peer]
10:33 -!- temoto [~temoto@81.19.91.15] has joined #go-nuts
10:36 -!- artefon [~thiago@189.59.206.109] has joined #go-nuts
10:36 -!- tvw [~tv@212.79.9.150] has joined #go-nuts
10:36 -!- tvw [~tv@212.79.9.150] has quit [Remote host closed the connection]
10:37 < mosva> r// Unnecessarily complex:
10:37 < mosva> var p *[]int = new([]int)
10:37 < mosva> *p = make([]int, 100, 100)
10:37 -!- tvw [~tv@212.79.9.150] has joined #go-nuts
10:37 < mosva> Will the above work if the second line is var p *[]int
10:38 < temoto> Just p := make([]int, 100) is enough.
10:39 < mosva> but p is not a slice its a pointer to slice
10:39 < temoto> There is no need to create pointers to slices.
10:39 < temoto> slice is a pointer already
10:39 < mosva> yeah, so what does new([]int) return?
10:40 < temoto> A pointer to nil slice.
10:40 < mosva> the default value of it is a pointer to nil slice.  right?
10:41 -!- unofficialmvp [~dev@94-62-164-227.b.ipv4ilink.net] has joined #go-nuts
10:41 < temoto> The zero value of slice is nil.
10:41 < mosva> In the above statement p should return the memory address of
the slice?
10:42 < temoto> Yes.
10:42 < temoto> But that doesn't make sense.  It's a pointer to pointer to
array.
10:43 -!- unofficialmvp [~dev@94-62-164-227.b.ipv4ilink.net] has left #go-nuts []
10:44 < temoto> So the answer to your original question: var p *[]int ; p =
&make([]int, 100) this will work.  But this doesn't make sense.
10:48 < mosva> Thanks
10:53 < mosva> temoto, The difference b/w make and new.  Make is used for
reference type.  It creates a new object which is referenced by the datatype like
map or slice, allocates space for those data type(array for slice) and returns the
address of the slice(in memory) to the variable
10:53 < mosva> whereas new allocates the memory for simple datatypes and
returns the address
10:56 -!- skejoe [~skejoe@188.114.142.162] has joined #go-nuts
11:09 < wrtp> temoto: that doesn't work
11:09 < wrtp> p = &make([]int, 100) is not a valid statement
11:09 < wrtp> you could do: v := make([]int, 100); p := &v
11:10 < wrtp> p := new(*[]int)
11:10 < wrtp> *p = make([]int, 100)
11:13 -!- quantumelixir [~chillu@203.110.240.41] has quit [Ping timeout: 240
seconds]
11:20 -!- rlab_ [~Miranda@91.200.158.34] has joined #go-nuts
11:22 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 265 seconds]
11:25 -!- quantumelixir [~chillu@203.110.240.41] has joined #go-nuts
11:31 -!- NuLLBiT [~mosva@122.172.124.197] has joined #go-nuts
11:33 -!- mosva [~mosva@unaffiliated/mosva] has quit [Ping timeout: 240 seconds]
11:34 -!- NuLLBiT [~mosva@122.172.124.197] has quit [Client Quit]
11:35 -!- mosva [~mosva@unaffiliated/mosva] has joined #go-nuts
11:43 -!- shvntr [~shvntr@123.89.99.198] has joined #go-nuts
11:44 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3]
11:47 -!- shvntr [~shvntr@123.89.99.198] has quit [Ping timeout: 240 seconds]
11:48 -!- shvntr [~shvntr@113.84.149.38] has joined #go-nuts
11:51 -!- DarthShrine [~angus@pdpc/supporter/student/DarthShrine] has quit [Quit:
DarthShrine]
11:53 < temoto> mosva, i'm not sure why you quoted some documentation.
12:04 < mosva> temoto, lol.  I summarized what I understood
12:04 -!- MaybeSo [~jimr@lions.Stanford.EDU] has quit [Ping timeout: 276 seconds]
12:05 -!- MaybeSo [~jimr@lions.Stanford.EDU] has joined #go-nuts
12:08 < zozoR> i dont think curses likes concurrent programming
12:08 < zozoR> : |
12:10 * wrtp curses curses
12:10 < jumzi> i don't think anyone likes curses
12:10 < zozoR> i do :D
12:10 < wrtp> cursor addressing is the way of the past :-)
12:11 < zozoR> any ideas what i should use instead then?
12:12 < zozoR> i dont see any other terminal based guis out there
12:12 < zozoR> :3
12:12 < zozoR> for go that is
12:12 < wrtp> why try to make a gui?
12:13 < wrtp> in a tty, that is?
12:13 < wrtp> that way you lose all the power of the shell
12:13 < zozoR> im making a downloader thingy
12:13 < zozoR> it lists all the downloads
12:14 < zozoR> without curses, i'd have to clear the screen and print all
the entries every other second
12:14 < wrtp> or you could just print all the entries
12:14 < wrtp> and then you can always use grep or whatever
12:15 < wrtp> what does it gain from being interactive?
12:15 < zozoR> i'd have to print all entries, everytime i can update how
long the download is coming
12:16 < zozoR> also, if its a long list, its nice to be able to scroll down
12:16 < zozoR> but what i like is that i can just tell where in the terminal
something should be printed
12:17 < wrtp> why not just print out an overall percentage
12:17 < wrtp> ?
12:17 < zozoR> because that doesnt tell me anything about the individual
files, now does it?  :P
12:18 < wrtp> do you need to know that?
12:19 < wrtp> personally, i prefer programs that keep silent unless there's
something useful they have to say.
12:19 < wrtp> i admit that's just personal taste.
12:19 < zozoR> i prefer knowing whats going on
12:19 < zozoR> also, some individual files may fail
12:20 < zozoR> i'd like to know that on the spot
12:20 < wrtp> that's something useful to say, so you could just print it
12:20 -!- saturnfive [~saturnfiv@222.90.16.30] has joined #go-nuts
12:21 < wrtp> anyway, if you really want to use curses, it's straightforward
- just have one goroutine that deals with the GUI
12:21 < quantumelixir> what's with the peculiar compiler names (6g and 8g)?
12:21 < wrtp> define an interface for other goroutines to tell the GUI
goroutine about updates (e.g.  through a channel)
12:22 < wrtp> quantumelixir: the number signifies the architecture
12:22 < quantumelixir> wrtp: but it seems rather arbitrary
12:22 < quantumelixir> why 6 for 64-bit and 8 for 32-bit?
12:22 < wrtp> quantumelixir: it is arbitrary.  but consistent.
12:22 < quantumelixir> hehe
12:22 < wrtp> 6 for amd64; 8 for 386.
12:22 < quantumelixir> my peeve is that the 6 is hard to reach on my
keyboard :D
12:22 < quantumelixir> of course I aliased that on my shell :)
12:23 < wrtp> http://plan9.bell-labs.com/magic/man2html/1/2c gives a full
list
12:23 < wrtp> is the 6 harder to reach than the 8?
12:24 < quantumelixir> yep
12:24 < zozoR> right now, i have the main thread being the gui, and it runs
and runs forever, while a go routine handles the other data ..  but ill try your
idea
12:24 < zozoR> :D
12:24 < wrtp> strange
12:24 < quantumelixir> 6 is in the middle
12:24 < quantumelixir> I reach for the 8 with the middle finger of my right
hand
12:24 < wrtp> quantumelixir: fair enough
12:25 < wrtp> personally i almost never type 6g - i use make, or a little
shell script called "gc" which does both the 6g and the 6l
12:26 < wrtp> zozoR: that sounds similar to what i was describing
12:26 < quantumelixir> wrtp: same here :)
12:26 < zozoR> ye, but mine has a runtime panic somewhere, and i cant figure
out what it says
12:26 < wrtp> you'll be ok just as long as only one goroutine talks to
curses
12:26 < zozoR> problem really is i dont know what causes the errors
12:26 < wrtp> doesn't the panic give you a helpful stack trace?
12:27 < zozoR> yes..  but curses eats it
12:27 < zozoR> i see some of it, but not all
12:28 < zozoR> and i cant figure out a way to end curses so i can see the
stacktrace, cause i dont know where the problem is
12:29 < zozoR> and right now i have mutexes everywhere, so i suppose what
you said about channels would be a better idea
12:32 < wrtp> why don't you just redirect stderr to a file - then the stack
trace will go there and curses should operate as normal.
12:33 < wrtp> zozoR: you only need to use mutexes very rarely
12:33 < quantumelixir> how does Go handle constants without overflowing?
how do they interact with the other limited precision variables?
12:34 < zozoR> wrtp: true, thanks for your helå
12:34 < zozoR> though its IKEA time :D
12:34 < wrtp> zozoR: joy
12:35 < wrtp> quantumelixir: untyped constants have their own implementation
in the compiler.
12:35 < wrtp> quantumelixir: you can assign an untyped constant to a type if
it can fit within the type without loss of precision.
12:36 < wrtp> actually, i don't think that's strictly true
12:36 < quantumelixir> wrtp: So, it's an arbitrary precision data type?
12:36 < quantumelixir> I'm interested in how the compiler implements the
constant types and how their conversions are handled
12:36 < wrtp> yeah - and it caters for floating point too
12:36 < quantumelixir> interesting
12:37 < wrtp> why don't you just look at the source?
12:37 < quantumelixir> oh, er..  forgot about that :D
12:38 < wrtp> the manual says "It is an error if the constant value cannot
be accurately represented as a value of the respective type."
12:38 < wrtp> but i think that's strictly speaking untrue
12:39 < wrtp> because you can assign 3.141592653589793238463 to a float32,
which cannot accurately represent the value
12:39 < quantumelixir> hmm..  so it must handle all kinds of conversions
12:40 < wrtp> yeah it does
12:41 < quantumelixir> what is each of lib{9,bio,mac} for?  (in the source
tree)
12:42 < wrtp> lib9 has some plan 9 compatibility libraries
12:42 <@adg> quantumelixir: lib9 is the plan9 libc that the go compilers
link against
12:42 < wrtp> libbio has a buffered I/O library
12:42 < wrtp> (plan 9 style)
12:42 <@adg> quantumelixir: libmach is for writing mach-o files, for osx
12:42 <@adg> but they're only used by the compilers themselves, not for
actual go programs
12:42 < wrtp> quantumelixir: you can find the compiler source in cmd/gc
12:43 < wrtp> and see mparith[123].c
12:43 < uriel> adg: might be worth adding an FAQ about why Google is not
building yet another
IDE/GUI-toolkit/whatever-other-pet-wish-item-random-people-have
12:43 < quantumelixir> thanks wrtp adg
12:43 < uriel> (oh, JDBC was the other one)
12:44 -!- niemeyer [~niemeyer@189.30.51.233] has joined #go-nuts
12:45 -!- LeNsTR [~lenstr@unaffiliated/lenstr] has joined #go-nuts
12:50 -!- sauerbraten [~sauerbrat@p508CEC58.dip.t-dialin.net] has joined #go-nuts
13:11 -!- mosva [~mosva@unaffiliated/mosva] has quit [Read error: Connection reset
by peer]
13:11 -!- virtualsue [~chatzilla@nat/cisco/x-mqvwfctncwpcrpty] has joined #go-nuts
13:17 -!- ExtraSpice [~XtraSpice@88.118.33.48] has quit [Read error: Connection
reset by peer]
13:28 -!- boscop [~boscop@f055164118.adsl.alicedsl.de] has joined #go-nuts
13:34 -!- DerHorst [~Horst@e176102094.adsl.alicedsl.de] has joined #go-nuts
13:38 -!- Skola [~ik@5352A3FB.cm-6-3c.dynamic.ziggo.nl] has joined #go-nuts
14:06 -!- mosva [~mosva@unaffiliated/mosva] has joined #go-nuts
14:13 -!- skejoe [~skejoe@188.114.142.162] has quit [Quit: Lost terminal]
14:13 < mosva> Is someone writing a book for Go?
14:15 < jumzi> I AM, I WANT THE MONEY!
14:16 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
14:18 -!- shvntr [~shvntr@113.84.149.38] has quit [Ping timeout: 250 seconds]
14:21 -!- jesmon [~user@static-71-244-114-122.albyny.fios.verizon.net] has joined
#go-nuts
14:22 < fzzbt> mosva: i think there's already two or so
14:22 < fzzbt> http://go-lang.cat-v.org/books
14:23 -!- Skola [~ik@5352A3FB.cm-6-3c.dynamic.ziggo.nl] has left #go-nuts []
14:24 < mosva> jumzi, I won't buy your book ;)
14:25 < jumzi> Ah, do'h!
14:25 < jumzi> Maybe i should just keep myself to programming stuff
14:25 < jumzi> Or rather trolling irc channels
14:26 < fzzbt> make a free book and publish it online.  i will donate a
penny for you.
14:26 < fzzbt> maybe two if it's any good
14:29 < skelterjohn> i generally don't find books on programming very useful
14:30 < jumzi> There is to few good books on the subject that's true
14:30 < uriel> I have to say that from what I have heard, and rather
unsurprisingly, none of the books so far are really worth it
14:31 < uriel> I would wait a bit for the language to settle down a bit
14:31 < uriel> I'm quite sure Rob will get around to it sooner or later
14:31 < uriel> (hopefully sooner rather than later ;))
14:32 < fzzbt> mosva: maybe write your own go book to master the language?
14:33 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
14:33 -!- Fish-- [~Fish@exo3753.pck.nerim.net] has quit [Quit: So Long, and Thanks
for All the Fish]
14:33 -!- Fish [~Fish@exo3753.pck.nerim.net] has joined #go-nuts
14:34 -!- artefon [~thiago@189.59.206.109] has quit [Read error: Connection reset
by peer]
14:34 -!- rlab_ [~Miranda@91.200.158.34] has quit [Ping timeout: 260 seconds]
14:34 < mosva> skelterjohn, they are good for learning the basics of
language
14:35 -!- jkakar [~jkakar@85.48.252.209] has quit [Ping timeout: 264 seconds]
14:35 < skelterjohn> tutorial, examples
14:35 < mosva> Go Tutorial does not cover many of the features
14:35 < skelterjohn> it does cover the basics
14:35 < mosva> But it isn't clear
14:35 -!- femtoo [~femto@95-89-197-23-dynip.superkabel.de] has joined #go-nuts
14:35 < skelterjohn> i found it useful
14:36 < mosva> Its useful
14:37 < mosva> but things like defer and init are not even mentioned there
14:37 < mosva> I still haven't read anything about ...  in function
parameters
14:38 < mosva> Nothing about passing function as parameter is mentioned
anywhere in that
14:50 -!- jkakar [~jkakar@193.153.244.102] has joined #go-nuts
14:54 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
15:00 -!- virtualsue [~chatzilla@nat/cisco/x-mqvwfctncwpcrpty] has quit [Ping
timeout: 240 seconds]
15:03 -!- jackzh [~jackzh@222.241.96.238] has joined #go-nuts
15:07 -!- virtualsue [~chatzilla@nat/cisco/x-ryejeuhmukkxuyez] has joined #go-nuts
15:08 -!- petrux [~petrux@host16-224-static.53-82-b.business.telecomitalia.it] has
quit [Quit: ù]
15:10 < quantumelixir> Where, in the source tree, is the slice defined as a
struct?
15:12 -!- artefon [~thiago@dhcp16.usuarios.dcc.ufmg.br] has joined #go-nuts
15:20 < wrtp> quantumelixir: src/pkg/runtime/runtime.h
15:20 < wrtp> look for struct Slice
15:21 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
15:25 < zozoR> wrtp: how would i go about redirecting stdout?
15:25 -!- tav [~tav@92.7.128.181] has quit [Ping timeout: 240 seconds]
15:28 < femtoo> hey
15:29 < femtoo> I want to send a string from one go routine to many others
15:29 < femtoo> if i use a channel
15:29 < femtoo> the first goroutine to execute takes the string and the
others don't receive it
15:29 < femtoo> whats the best way to fix this?
15:30 < quantumelixir> wrtp: I did grep for -ir 'struct.*slice' but got too
many results.  I should have restricted the search to just the headers..
15:30 -!- tav [~tav@92.7.151.166] has joined #go-nuts
15:36 -!- saturnfive [~saturnfiv@222.90.16.30] has left #go-nuts []
15:39 < zozoR> curses doesnt work if i redirect output : |
15:41 < quantumelixir> p[i], p[j] = p[j], p[i] doesn't work when p is a
slice of a user defined type --> Is this because the fields of the struct are
unexported?
15:41 < quantumelixir> i.e.  begin with a lowercase alphabet
15:42 -!- windbg [~jackzh@222.241.96.238] has quit [Quit: leaving]
15:42 < quantumelixir> oops nevermind
15:52 < wrtp> zozoR: what shell are you using?
15:52 < zozoR> standard thing shelled with ubuntu
15:52 < wrtp> bash?
15:52 < wrtp> try running your program as
15:52 < zozoR> shipped with ubuntu*
15:53 < zozoR> as?
15:53 < wrtp> 6.out 2> err.out
15:53 < wrtp> which redirects stderr only
15:53 < jumzi> "echo $SHELl"
15:53 < zozoR> 2> means?
15:53 < jumzi> SHELL*
15:53 < zozoR> ye its bash
15:53 < wrtp> femtoo: the answer depends on what you're trying to do.
15:54 < wrtp> what are you trying to do that requires this kind of
broadcast?
15:54 < femtoo> I start a goroutine for each client that connects
15:54 < zozoR> ah, it showed me something :D
15:54 < zozoR> panic: runtime error: makeslice: cap out of range :D
15:54 < zozoR> yay
15:54 < femtoo> if a new client arrives I want the other client to know
15:54 -!- awidegreen [~quassel@c-eacae555.08-2-73746f39.cust.bredbandsbolaget.se]
has joined #go-nuts
15:55 -!- qjcg [~qjcg@208.88.110.46] has joined #go-nuts
15:57 < zozoR> epicness, thanks wrtp :D
15:59 -!- cco3 [~conley@c-69-181-138-209.hsd1.ca.comcast.net] has joined #go-nuts
16:02 < wrtp> femtoo: the easiest solution is probably to have a channel for
each client and to send on each one
16:02 < femtoo> ok thank you I will try that
16:04 < wrtp> the problem with broadcast as a primitive is that it's either
racy (you don't know when all the clients have read the value) or leaky (if you're
broadcasting many values, and one of the readers isn't reading fast enough, then
you can use large amounts of memory)
16:08 -!- tobel [~tobel@pD9E89D64.dip.t-dialin.net] has joined #go-nuts
16:08 -!- tobel [~tobel@pD9E89D64.dip.t-dialin.net] has quit [Client Quit]
16:08 < wrtp> i made a blog post a while ago about one way of doing a
broadcast.  i don't recommend it, but it's fun.
http://rogpeppe.wordpress.com/2009/12/
16:10 -!- awidegreen [~quassel@c-eacae555.08-2-73746f39.cust.bredbandsbolaget.se]
has quit [Read error: Connection reset by peer]
16:12 -!- awidegreen [~quassel@c-eacae555.08-2-73746f39.cust.bredbandsbolaget.se]
has joined #go-nuts
16:14 -!- bortzmeyer [~bortzmeye@batilda.nic.fr] has quit [Quit: Leaving.]
16:18 < femtoo> wrtp, your blog entry look interesting
16:22 < wrtp> femtoo: thanks
16:26 -!- Venom_X [~pjacobs@66.54.185.131] has joined #go-nuts
16:26 < quantumelixir> If I want a type foo to implement an interface,
what's the difference between defining a method as func (f *foo) method() { ..  }
and func (f foo) method() { ..  }
16:26 < femtoo> I think the first option you mentioned in the arcticle is
enough for my needs
16:27 -!- toyoshim [~toyoshim@y252053.dynamic.ppp.asahi-net.or.jp] has joined
#go-nuts
16:29 -!- DerHorst [~Horst@e176102094.adsl.alicedsl.de] has quit [Remote host
closed the connection]
16:29 < wrtp> femtoo: it usually is
16:29 < wrtp> the general broadcaster technique is just an interesting
curiosity really
16:29 < atsampson> wrtp: that sort of process is called a delta in occam
(see section 4.1.10 of http://offog.org/publications/ats-thesis.pdf)
16:29 -!- toyoshim_ [~toyoshim@y252053.dynamic.ppp.asahi-net.or.jp] has quit [Ping
timeout: 255 seconds]
16:32 < wrtp> atsampson: cool thanks.
16:32 < wrtp> BTW: "Parallel deltas are often slightly
16:32 < wrtp> less efficient though; a parallel delta must either perform a
choice across a group of
16:32 < wrtp> output guards, or fork and wait for a number of child
processes."
16:32 < wrtp> the implementation in my blog post does neither
16:32 -!- xash [~xash@d045007.adsl.hansenet.de] has joined #go-nuts
16:34 < atsampson> yeah, but you have buffered channels ;)
16:34 < taruti> what is the status of those plan9 patches?
16:34 < wrtp> atsampson: yeah!  aren't they just so incredibly useful?
16:35 < wrtp> i thought i remembered that occam had buffered channels too
16:35 < wrtp> it's been a long time though
16:35 < atsampson> yeah, there's some discussion of that elsewhere
16:35 < wrtp> and no dynamic channels in occam (at least there weren't then)
16:35 < atsampson> nope, occam's never had buffered channels; it does have
channel end mobility now, though
16:36 < wrtp> but channels still aren't first class values, right?
16:37 < atsampson> yes, channel ends are first-class values (it's
pi-calculus-like, to a degree)
16:39 < wrtp> cool.  so you can store channels in data structures, have
channels of channels, etc?  presumably you can now create new processes
dynamically too?
16:40 < wrtp> and have dynamic memory allocation?
16:40 < atsampson> yup, all of the above (although occam-pi's data
structures are very limited)
16:41 < atsampson> that's what makes it just about possible to do actual
work with it, although I'd rather use a more modern language
16:41 < wrtp> how are the data structures limited?
16:42 < wrtp> and, another limitation i remember: can you ALT on output?
16:43 < atsampson> it only has arrays, structs, and single-owner references,
which makes it hard to build anything non-trivial (e.g.  hash tables)
16:44 < atsampson> nope, you can't ALT over an output (the runtime system
supports it but the compilers don't)
16:46 -!- femtoo [~femto@95-89-197-23-dynip.superkabel.de] has quit [Read error:
Connection reset by peer]
16:49 < wrtp> ah, single owner references.
16:50 < wrtp> still, you could build the structure in my blog (using the
buffered channel extension)
16:51 < atsampson> yeah, you can build anything you like out of processes
16:56 < quantumelixir> what does foo.(int) mean?
16:57 -!- piranha [~piranha@5ED42E59.cm-7-5a.dynamic.ziggo.nl] has quit [Quit:
Computer has gone to sleep.]
16:57 < wrtp> dynamic cast to int
16:57 < wrtp> if foo is an interface type, it asserts that the underlying
type is int.  if not, you get a panic.
16:59 < quantumelixir> oh ok
17:00 < quantumelixir> the difference from int(foo) being that the
conditions are now checked at runtime instead of compile-time?
17:01 < wrtp> yes
17:01 < wrtp> atsampson: only one process required
17:01 < wrtp> atsampson: does occam-pi garbage collect processes waiting on
unreferenced channels?
17:02 < quantumelixir> why might the compiler not be able to ascertain the
type of foo at compile-time?
17:02 < aiju> packages
17:02 < wrtp> quantumelixir: interfaces
17:03 < wrtp> quantumelixir: an interface has both a compile-time type and a
run-time type
17:03 < wrtp> the compile-time type is statically known at compile time; the
run-time type is not.
17:03 < quantumelixir> but we are passing a concrete type to the func foo(x
interface{}) { ..  } right?
17:03 < quantumelixir> *variable of concrete type
17:04 < wrtp> yes, but the compiler doesn't know which type has been passed
in
17:04 < quantumelixir> you mean which interface it resembles?
17:04 < wrtp> i mean which concrete type is inside the interface value
17:05 < wrtp> i can do: a := []interface{4, "hello", 56.7}; for _, x :=
range a {foo(x)}
17:06 < quantumelixir> oh, right
17:06 < wrtp> then how can the compiler know inside foo what the static type
of x is?
17:09 < quantumelixir> i guess this is because of how []interface{} stores
the data internally (as void pointers) which necessitates the need for a dynamic
cast
17:09 < quantumelixir> on the other hand, []int, does retain the information
about the data it holds
17:13 < wrtp> quantumelixir: at runtime, there's no such thing as a "void
pointer".  there are just pointers.  interfaces bundle a pointer along with its
type and a table of methods.
17:15 < wrtp> and it's not about []interface{} particularly.  any value of
interface type stores the data in a similar way.
17:16 < quantumelixir> you're right, I meant that the information about the
particular kind of pointer it is is discarded during compilation
17:16 < wrtp> well, not quite "discarded" - stored in a different place.
17:17 -!- toyoshim_ [~toyoshim@y252053.dynamic.ppp.asahi-net.or.jp] has joined
#go-nuts
17:17 -!- toyoshim [~toyoshim@y252053.dynamic.ppp.asahi-net.or.jp] has quit [Ping
timeout: 255 seconds]
17:17 < quantumelixir> so your definition of a := ..  previously instructs
the compiler to save the actual data types elsewhere?
17:18 < atsampson> wrtp: garbage-collecting unused servers -- nope, but it's
been suggested several times
17:18 < atsampson> (again, the runtime has all the information it needs to
do it, it's just not supported in the language)
17:19 < wrtp> atsampson: that's the problem with "you can build anything you
like out of processes"...  the runtime consequences might be severe :-)
17:20 -!- femtoo [~femto@95-89-197-23-dynip.superkabel.de] has joined #go-nuts
17:20 < wrtp> quantumelixir: every time you convert a non-interface type to
an interface type, it saves the actual data type inside the interface value.
17:21 < wrtp> the conversion happens implicitly, so you might not have
noticed it happening :-)
17:21 < quantumelixir> yep..  seems very mysterious
17:22 < wrtp> it's not really
17:22 < wrtp> it's just the opposite of the dynamic cast you were asking
about earlier
17:23 < wrtp> but because it can't fail at run time, it's done automatically
by the compiler
17:23 < wrtp> x := interface{}(67)
17:23 < wrtp> y := x.(int)
17:24 < quantumelixir> why save the data types within the interface value if
we're going to have to dynamic cast anyway
17:24 < wrtp> the first line there is what's happening when you pass a
number to a function which takes an inteface argument
17:24 < quantumelixir> ok go on
17:24 -!- cco3 [~conley@c-69-181-138-209.hsd1.ca.comcast.net] has quit [Quit:
Leaving.]
17:24 < wrtp> quantumelixir: because interfaces also have methods
17:24 < wrtp> and without the data type, we can't check that you're trying
to dynamic cast to the correct type
17:25 < quantumelixir> oh right..  safety!
17:25 < wrtp> yup
17:25 < wrtp> go is type safe
17:25 < wrtp> although it's not statically type safe - because a dynamic
type assertion can fail
17:25 < wrtp> but if it does, the program panics
17:26 < zozoR> i like the word panic
17:26 < aiju> i prefer the gofy variant
17:26 < aiju> "fuck"
17:26 < zozoR> ye
17:26 < zozoR> i imagin the code running up the stack going "fuck fuck fuck
fuck fuck"
17:26 -!- virtualsue [~chatzilla@nat/cisco/x-ryejeuhmukkxuyez] has quit [Ping
timeout: 272 seconds]
17:26 < quantumelixir> fuck("out of memory") :D
17:26 < aiju> exactly
17:26 < zozoR> ;D
17:27 < quantumelixir> lmao
17:27 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
17:27 < quantumelixir> wrtp: I didn't get a word of what you last said
17:28 < quantumelixir> s/last/last before/
17:31 -!- teejae [~teejae@softbank219185095092.bbtec.net] has joined #go-nuts
17:31 < wrtp> "statically type safe" means safe at compile time.
17:31 < quantumelixir> right
17:31 < wrtp> "dynamic type assertion" means like x.(int) or x.(string)
17:32 -!- piranha [~piranha@5ED4B890.cm-7-5c.dynamic.ziggo.nl] has joined #go-nuts
17:32 < quantumelixir> what does that make statically type unsafe?
17:32 < quantumelixir> *why
17:32 -!- cco3 [~conley@c-69-181-138-209.hsd1.ca.comcast.net] has joined #go-nuts
17:35 < wrtp> if you've got a function that takes an interface type, then
inside the function the compiler doesn't know what the type is, so if you want to
operate on the original type, you've got to do a dynamic type assertion (or a type
case) which may fail, because who knows what type has actually been passed to the
function at run time?
17:41 < quantumelixir> I got this earlier..  I was asking what the dynamic
type assertion fail has to do with static type safety
17:44 -!- mattn_jp [~mattn@112-68-86-111f1.hyg1.eonet.ne.jp] has joined #go-nuts
17:45 < quantumelixir> Or, I could've stopped making sense some time ago
17:46 < teejae> this is a philosophical question: what does it mean to have
a map[map[int]]string?  and is that possible in Go? I think the answer is no
17:47 < quantumelixir> Does it even mean anything?
17:47 < teejae> if i understand the language spec correctly, you can only
use scalar types as keys
17:48 < quantumelixir> Or, am I continuing to not make any sense?
17:48 * quantumelixir goes to bed
17:50 -!- toyoshim_ [~toyoshim@y252053.dynamic.ppp.asahi-net.or.jp] has quit [Ping
timeout: 255 seconds]
17:51 < zozoR> you can only have keys that you can perform equallity
operations on
17:52 < teejae> zozoR: and is equality on maps in terms of "value-base"?
17:52 < zozoR> i suppose
17:52 < zozoR> you cant use structs, cause struct1 == struct2 doesnt make
sense
17:53 < teejae> zozoR: since there's no java "equals" on structs?
17:53 < zozoR> i dont know abracadabra
17:53 < zozoR> (java)
17:53 -!- toyoshim_ [~toyoshim@y252053.dynamic.ppp.asahi-net.or.jp] has joined
#go-nuts
17:53 < teejae> i mean, there's no way to provide an equivalence function
17:54 < zozoR> well you could make one yourself, but its not part of the
language
17:54 < zozoR> i think
17:54 -!- Project-2501 [~Marvin@82.84.98.218] has joined #go-nuts
17:54 < teejae> right, but i can't use a regular map then, is that right?
17:54 -!- sav1o [~savio@67.18.186.81] has quit [Quit: Ex-Chat]
17:54 -!- cco3 [~conley@c-69-181-138-209.hsd1.ca.comcast.net] has quit [Ping
timeout: 255 seconds]
17:54 < zozoR> dunno
17:54 < zozoR> lets try
17:55 < zozoR> i dont think so
17:55 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-148-187.clienti.tiscali.it] has
quit [Ping timeout: 260 seconds]
17:56 < zozoR> apparently that is possible
17:56 < zozoR> ah
17:57 < zozoR> because its a reference
17:57 < zozoR> you can compare pointers, but it doesnt make sense to use a
pointer as a key
17:57 < teejae> yea, i just tried map[map[int]int]string
17:58 < teejae> and it's putting pointers in
17:58 < zozoR> :3
17:58 < teejae> is that equivalent then with map[*map[int]int]string
17:58 < teejae> i mean, both are pointers right?
18:00 < niemeyer> zozoR: It is actually very useful to use pointers as keys
in many situations
18:00 < zozoR> niemeyer: situation?
18:01 < teejae> niemeyer: so are map[*map[int]int]string and
map[map[int]int]string the "same"?  or is one really a pointer-pointer?
18:01 < niemeyer> zozoR: Whenever you want to keep a map of any kind of
object to a value
18:01 < niemeyer> zozoR: By identity
18:02 < niemeyer> teejae: The latter
18:02 < zozoR> wouldnt it make more sense to map the object to a key
18:02 < zozoR> gawd, i need to restart kvirc ...  piece of crap client -.-
18:03 -!- zozoR [~zozoR@56346ed3.rev.stofanet.dk] has quit [Quit: Morten.  Desu~]
18:03 < niemeyer> zozoR: Why?
18:03 -!- zozoR [~zozoR@56346ed3.rev.stofanet.dk] has joined #go-nuts
18:03 < niemeyer> zozoR: Why?
18:03 < zozoR> since you'd have to iter through the map to get to your
objects
18:04 < zozoR> or have a pointer for the object you want
18:04 < niemeyer> zozoR: Not really..  a pointer is a unique word-sized
value which is perfect as a key
18:04 < zozoR> which gives you a value you could just have as a member of
the struct
18:04 < niemeyer> zozoR: Again, why bother?
18:05 < zozoR> since i cant access my object without iterating?
18:06 < niemeyer> zozoR: Why do you have to iterate when the pointer is the
key?
18:06 < teejae> i'm asking this question since i'm implementing a Go
language binding for thrift, which is like protobufs, only it has the concept of
sets/maps/lists as definable types.  i'm trying to figure out the "right way" to
have them used in Go
18:06 < niemeyer> zozoR: v := m[&obj]
18:06 < zozoR> yes
18:07 < zozoR> but would make more sense to just obj.value
18:07 -!- xash [~xash@d045007.adsl.hansenet.de] has quit [Ping timeout: 240
seconds]
18:07 < zozoR> and have a struct field, unless its temporary ofcourse :o
18:07 -!- femtoo [~femto@95-89-197-23-dynip.superkabel.de] has quit [Read error:
Connection reset by peer]
18:07 < niemeyer> zozoR: Not if you're not in control of the object's type
18:07 < teejae> zozoR: but you might be mapping objects -> related
objects
18:07 < wrtp> exactly
18:07 < zozoR> ah
18:08 < zozoR> your right :D
18:08 < teejae> like
18:08 < teejae> Person -> Pet
18:08 < zozoR> i think you mean person=girl and -> = =
18:08 < zozoR> :D
18:09 < teejae> wrtp and niemeyer, what are your thoughts on map keys being
non-base types, like maps/arrays, with respect to something equivalent to
protobufs
18:10 < wrtp> there's always the question: why not store the mapped object
along with its key; but here's one example: you've got a directed graph with nodes
represented as *Node types.  if you've got several goroutines operating on the
graph (e.g.  doing shortest path calculations) then it makes sense to represent
visited nodes with a map[*Node]bool
18:10 < niemeyer> teejae: Mutable types like these are generally bad keys
18:10 < wrtp> +1
18:11 < teejae> niemeyer: i completely agree, but they happen to be
definable in this spec
18:11 < teejae> trying to make the best of the situation
18:11 < teejae> at least more abstractly
18:11 < teejae> like in python, mapping tuples -> objects
18:12 < teejae> i'm generating language bindings
18:12 < teejae> and constants are part of the generation
18:12 < niemeyer> teejae: I don't think the current spec allows map/array
values as keys.
18:12 < teejae> niemeyer: i just tested it, and it does, using something
like pointers
18:12 < teejae> at least it does w/ map
18:13 < niemeyer> teejae: Sure, the reference may be used as a key, which is
fine
18:13 < teejae> ok
18:13 < teejae> i'm just trying to figure it out from a user perspective
18:13 < teejae> like
18:13 < teejae> map[tuple]string
18:13 < teejae> but tuple = [1,2,3]
18:14 < teejae> so let's say there were a constant map
18:14 < wrtp> teejae: that's the biggest thing that would be nice to do with
go maps
18:15 < teejae> do you suggest i implement a map that does "java/abstract
equals"?
18:15 < wrtp> it's a good question
18:15 < teejae> map[EqualsInterface]Object
18:15 * wrtp is looking at the spec
18:15 < taruti> I suppose no-one has written an interval tree implementation
in Go?
18:16 < teejae> since we can't do arbitrary equals at the moment
18:16 < teejae> taruti: if they have, it'd already have this right?  ;)
18:16 < wrtp> teejae: you can't use a map like that
18:16 < teejae> wrtp: right, but i mean, i'd implement a map that did
18:17 < niemeyer> teejae: That's by design..  there are higher level Maps
floating around already, which do what you suggest.
18:17 < wrtp> it would have to be a user-defined type, not a map
18:17 < teejae> right
18:17 < taruti> and no generics atm...
18:17 < teejae> i lose the ability to use the bracket notation
18:17 < wrtp> and what niemeyer says - i can't remember where any are
18:17 < wrtp> thought
18:17 < wrtp> s/ght/gh
18:18 < wrtp> teejae: yes, you lose that ability
18:18 < niemeyer> teejae: Something like this likely won't make into the
stdlib before the situation with generics is resolved (either included or gone for
good).  That's just an opinion, though.
18:18 < teejae> right
18:18 < teejae> i can't use json as the abstraction function right?  :P
18:19 -!- kixo [~kixo@78-1-147-32.adsl.net.t-com.hr] has joined #go-nuts
18:19 < teejae>
http://groups.google.com/group/golang-nuts/browse_thread/thread/68defff7c2198503/2e2c697d9aaeb0a2
18:19 < teejae> ah i see that's a relevant thread
18:21 < temoto> Oh boy, i just figured what struct field tags are.
18:21 < wrtp> teejae: if you don't care too much about garbage collecting
keys, i've got an idea for a different kind of interface.
18:21 < temoto> all this time json.Marshal would encode unexported
(lowercase) fields, despite the documentation said otherwise and on 5 Jan they
fixed it
18:22 < teejae> wrtp: what would that be?
18:22 < kixo> can i have optional parameters in function?
18:22 < taruti> kixo: no
18:22 < temoto> kixo, no.
18:22 -!- PortatoreSanoDiI [~Marvin@dynamic-adsl-94-36-150-191.clienti.tiscali.it]
has joined #go-nuts
18:22 < wrtp> teejae: i'll paste some code in a moment
18:22 < kixo> ok, thanks
18:23 < temoto> After Python, no kwargs seems wrong at first, but fine then.
18:23 < temoto> Must write type Result struct { Key string "key", ...  }
<- the string is "tag of field"
18:24 -!- gmilleramilar [~gmiller@184-106-207-119.static.cloud-ips.com] has joined
#go-nuts
18:24 < teejae> temoto: field tags are purely for reflection purposes?
18:25 -!- toyoshim [~toyoshim@y252053.dynamic.ppp.asahi-net.or.jp] has joined
#go-nuts
18:25 < temoto> teejae, i guess so.  But reflection is widely used in
libraries.
18:25 -!- Project-2501 [~Marvin@82.84.98.218] has quit [Ping timeout: 240 seconds]
18:25 -!- toyoshim_ [~toyoshim@y252053.dynamic.ppp.asahi-net.or.jp] has quit [Ping
timeout: 255 seconds]
18:26 < temoto> I hope this is the last change in json.Marshal behaviour.
18:26 < teejae> temoto: now json.Marshal is not using field tags, per spec?
18:27 < teejae> temoto: or did you want it to do field tags?
18:27 < temoto> teejae, i think it always used tags.  Now it skips
unexported (starts with lower case letter) fields, per spec.
18:27 < temoto> Two my projects exploited marshalling of unexported fields.
18:28 < teejae> i see
18:28 < temoto> Though, it doesn't convert field name to lower case, per
spec.
18:29 -!- TheMue [~TheMue@p5DDF76E1.dip.t-dialin.net] has joined #go-nuts
18:30 < kixo> why r.URL.String() in http handler func does not return whole
url but only path?!
18:31 < temoto> kixo, such is URL Stringer implementation.  It may be
documented.  There's url.Raw for whole.
18:33 < kixo> nope
18:33 < kixo> Raw returns the same
18:33 -!- wrtp [~rog@92.17.53.205] has quit [Ping timeout: 259 seconds]
18:33 < kixo> i id this workaround to fix it
18:33 < kixo> http://pastie.org/1470758
18:34 < temoto> This could mean only one thing: other fields are empty.
18:34 < kixo> yes they are, but why?
18:35 < temoto> Because some parser above didn't fill them.
18:35 < kixo> is it a bug in http package?
18:35 < temoto> It even makes some wierd sense: in http you get
18:35 < temoto> GET /path?query HTTP/1.1\r\nHost: foobar.nom
18:36 < temoto> although GET http://blabla is permitted too, it is rarely
used.
18:36 < temoto> So parser fill exactly what it received.
18:37 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
18:37 < temoto> I'd call it rather incompleteness of documentation (if
that's not described) than bug in http package.
18:39 -!- wrtp [~rog@92.17.53.205] has joined #go-nuts
18:39 < wrtp> hmm i was just disconnected.  what was the last piece of text
that i typed here, anyone?
18:40 < temoto> <wrtp> teejae: i'll paste some code in a moment
18:40 < wrtp> ah, ok
18:40 < wrtp> teejae: something like this: http://pastebin.com/W5bmgRPq
18:40 < wrtp> the idea is that you have a Mapping type that maps from
non-basic types to Keys
18:41 < wrtp> and your code uses map[Key] T when the Go maps aren't
sufficient
18:41 < wrtp> to look up a key, say a tuple, you first get its Key, then use
that to index the map
18:41 < temoto> kixo, i agree that giving url object with some fields absent
is misleading.
18:41 < wrtp> it relies on the fact that you can compare interface types
with different types
18:41 < wrtp> (different types compare unequal)
18:42 -!- gits [~gits@77.94.219.158] has joined #go-nuts
18:43 < teejae> wrtp: wow, this is great.  even overly general
18:44 < teejae> wrtp: that is, i just want all the keys to be the same type.
you've done the arbitrary object version
18:44 < wrtp> it has the problem that mapping entries can accumulate forever
18:44 < wrtp> teejae: yeah, well there are no generics, so an arbitrary
object version is all you can have :-)
18:44 < kixo> temoto: yes it is strange :)
18:45 < teejae> that's ok, especially for my use case where it only needs to
build the map once, and is expected to be read only
18:46 < wrtp> also, the user needs to read the map using the same Mapping
object it was created with
18:46 -!- sav1o [~savio@67.18.186.81] has joined #go-nuts
18:46 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 250 seconds]
18:48 < wrtp> you'd probably want to pass it as an argument to the Unmarshal
function, or when creating the Decoder object
18:48 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
18:48 -!- illya77 [~illya77@216-149-112-92.pool.ukrtel.net] has joined #go-nuts
18:56 < teejae> wrtp: thanks for your impl.  i'll see how best to use it
18:56 < wrtp> np
19:00 < skelterjohn> teejae: take a look at gohash.googlecode.com
19:00 < teejae> skelterjohn: looking
19:01 -!- skejoe [~skejoe@188.114.142.162] has joined #go-nuts
19:01 < skelterjohn> i may not have completely understood what you are
interested in
19:01 < skelterjohn> but i saw keys, hashes and mappings
19:03 < teejae> skelterjohn: yea, where keys are potentially more maps
19:04 < skelterjohn> with gohash you can use anything as long as you can
provide a Hashcode() and Equals(o interface{}) method
19:04 < skelterjohn> hashing a map doesn't seem straightforward without some
wrapping
19:04 < skelterjohn> something to do it incrementally as you add and remove
items
19:05 < skelterjohn> it might be worth my time to add those functions to the
hashmap/hashset structs from gohash :)
19:05 < teejae> skelterjohn: agreed.  this really started w/ having
constants
19:06 < teejae> skelterjohn: due to the thrift protobuf equivalent i'm
implementing
19:06 < teejae> its possible to declare constants which happen to be
maps/lists/sets
19:06 < teejae> and the keys are arbitrary, including more maps/lists/sets
19:06 < skelterjohn> ok
19:06 < skelterjohn> well, let me know if you decide to use gohash
19:07 < skelterjohn> or if you have a q about it
19:07 < teejae> skelterjohn: thanks.  i really appreciate the help.  looks
just like what i expect it to look like, w/ respect to java maps
19:08 < skelterjohn> glad you might find it useful!
19:09 < skelterjohn> it's tricky, making open source tools and then just
hoping someone uses them
19:09 < skelterjohn> with no easy way to know
19:09 < teejae> skelterjohn: yea, understand what you mean
19:10 < teejae> skelterjohn: frankly, what i'm working on is the first
open-source project i've ever contributed to
19:10 < skelterjohn> requires a bit of arrogance, heh
19:11 < skelterjohn> what project, teejae?
19:11 < teejae> https://github.com/teejae/thrift/tree/go_thrift_codegen
19:11 -!- sav1o [~savio@67.18.186.81] has quit [Remote host closed the connection]
19:11 < teejae> thrift Go language binding
19:11 < teejae> thrift = fb's version of protobuf
19:12 < skelterjohn> right, i think you've mentioned this to me before, now
19:12 < teejae> right
19:12 < teejae> i had compilable code, until i decided to break everything
cuz i didn't think it was as usable to a go developer
19:13 < teejae> trying to walk line between consistency and ease of use
19:13 < skelterjohn> making things compilable is the easy bit
19:14 < teejae> like i had made it generate types like map[*int]*string
19:14 < teejae> that made no sense :)
19:15 < skelterjohn> that is a bit odd, i agree :)
19:15 < teejae> but it made all the code so elegant
19:15 < teejae> the implementation code, not the generated code :P
19:15 < teejae> because it could do map[*struct]*struct
19:16 < wrtp> skelterjohn: the advantage of the map code that i posted above
is that it allows the value type to be statically defined.
19:16 < wrtp> and all standard key types just work, with no need to define
Hashcode and Equals methods
19:17 < wrtp> i only just thought of it, but i quite like the idea.
19:18 -!- sav1o [~savio@67.18.186.81] has joined #go-nuts
19:18 < teejae> wrtp: you may want to make a true lib out of it ;)
19:18 < wrtp> yeah, why not.
19:20 -!- mncaudill [~nolan@c-67-188-35-154.hsd1.ca.comcast.net] has quit [Ping
timeout: 276 seconds]
19:22 < skelterjohn> wrtp: I have to admit, I don't quite follow what you're
saying
19:22 -!- mncaudill [~nolan@c-67-188-35-154.hsd1.ca.comcast.net] has joined
#go-nuts
19:23 -!- gits [~gits@77.94.219.158] has quit [Ping timeout: 260 seconds]
19:24 < skelterjohn> or how that example code is supposed to operate
19:24 < wrtp> that's not example code; that's the library
19:24 < skelterjohn> the example code that makes up your library
19:24 < skelterjohn> perhaps it's even the finished product :)
19:24 < skelterjohn> but i still don't get how it's supposed to work
19:25 < skelterjohn> w/r/t "allows the value type to be statically defined"
19:28 -!- Scorchin [~Scorchin@host86-148-177-221.range86-148.btcentralplus.com]
has joined #go-nuts
19:28 < wrtp> hold on, i'm just writing an example
19:28 < skelterjohn> sure
19:29 -!- tvw [~tv@212.79.9.150] has quit [Remote host closed the connection]
19:31 < wrtp> http://pastebin.com/36CKhFw9
19:32 < skelterjohn> ah, i see
19:32 -!- artefon [~thiago@dhcp16.usuarios.dcc.ufmg.br] has quit [Quit: bye]
19:32 < wrtp> you can do goinstall rog-go.googlecode.com/hg/key if you want
to play with it
19:33 < skelterjohn> that's a good way to do things
19:34 < skelterjohn> esp since you can keep those keys around
19:35 < wrtp> yes - although you have to remember to do so
19:35 < wrtp> and to use the same Mapping object to access the map that you
used to create it
19:35 < wrtp> so it has its down sides.
19:36 < wrtp> one current problem - if you range through the map, you can't
get the actual key values, but that's a trivial fix (almost in)
19:36 < teejae> you guys are insane in speed ;)
19:37 < wrtp> it's easy if you know what you need to do...  :-)
19:37 -!- m4dh4tt3r [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has joined
#go-nuts
19:37 < wrtp> much harder when things aren't so well defined!
19:40 -!- rlab [~Miranda@91.200.158.34] has quit [Read error: Connection reset by
peer]
19:42 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
19:44 -!- m4dh4tt3r [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has quit [Quit:
Leaving.]
19:44 -!- nettok [~quassel@200.119.191.129] has joined #go-nuts
19:47 -!- Eridius [~kevin@unaffiliated/eridius] has joined #go-nuts
19:47 -!- m4dh4tt3r [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has joined
#go-nuts
19:50 < wrtp> skelterjohn: fixed.  example here:
http://pastebin.com/FXFfpZtc
19:54 -!- Urtie [~kim@90-227-159-22-no57.tbcn.telia.com] has quit [Remote host
closed the connection]
19:58 -!- gits [~gits@77.94.219.158] has joined #go-nuts
20:03 -!- tvw [~tv@e176002116.adsl.alicedsl.de] has joined #go-nuts
20:03 < skelterjohn> calling it Value() might be a bit misleading :)
20:06 < wrtp> yeah, i thought that too
20:06 < aiju> misleading names are always good
20:06 < wrtp> but i haven't thought of anything better for the time being
20:06 < aiju> * GFX_IS_DISPLAY_MODE_SUPPORTED
20:06 < aiju> * This routine sets the specified display mode.
20:06 < aiju> (Xfree86)
20:06 -!- gmilleramilar [~gmiller@184-106-207-119.static.cloud-ips.com] has quit
[Ping timeout: 240 seconds]
20:07 < aiju> try to reach that standard
20:07 < wrtp> "OtherKey"?  "OriginalKey"?  "Hasher"?
20:13 -!- femtoo [~femto@95-89-197-23-dynip.superkabel.de] has joined #go-nuts
20:16 -!- illya77 [~illya77@216-149-112-92.pool.ukrtel.net] has quit [Read error:
Connection reset by peer]
20:28 -!- m4dh4tt3r [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has quit [Ping
timeout: 240 seconds]
20:32 < wrtp> "Original" it is
20:34 -!- Fish- [~Fish@9fans.fr] has joined #go-nuts
20:34 -!- m4dh4tt3r [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has joined
#go-nuts
20:35 -!- foocraft [~dsc@89.211.156.34] has quit [Ping timeout: 276 seconds]
20:37 -!- foocraft [~dsc@78.101.105.166] has joined #go-nuts
20:38 -!- tensorpudding [~user@99.23.127.179] has joined #go-nuts
20:42 -!- photron [~photron@port-92-201-92-220.dynamic.qsc.de] has joined #go-nuts
20:46 -!- tvw [~tv@e176002116.adsl.alicedsl.de] has quit [Ping timeout: 240
seconds]
20:50 -!- skejoe [~skejoe@188.114.142.162] has quit [Quit: Lost terminal]
20:52 -!- sferry [sam@atheme/member/samferry] has quit [Read error: Operation
timed out]
20:53 -!- Archwyrm [~archwyrm@archwyrm.net] has quit [Ping timeout: 272 seconds]
20:53 -!- sav1o [~savio@67.18.186.81] has quit [Ping timeout: 250 seconds]
20:55 -!- suiside [tajnyman@unaffiliated/suiside] has quit [Ping timeout: 255
seconds]
20:55 -!- i__ [~none@unaffiliated/i--/x-3618442] has quit [Ping timeout: 265
seconds]
20:55 -!- mattn_jp [~mattn@112-68-86-111f1.hyg1.eonet.ne.jp] has quit [Ping
timeout: 276 seconds]
20:58 -!- xash [~xash@d179069.adsl.hansenet.de] has joined #go-nuts
20:59 -!- Archwyrm [~archwyrm@archwyrm.net] has joined #go-nuts
21:02 -!- samferry [sam@atheme/member/samferry] has joined #go-nuts
21:02 -!- i__ [~none@69.164.206.224] has joined #go-nuts
21:02 -!- Davidian1024 [~Davidian1@cpe-173-88-174-84.neo.res.rr.com] has quit
[Ping timeout: 240 seconds]
21:02 -!- adu [~ajr@pool-72-83-254-159.washdc.fios.verizon.net] has joined
#go-nuts
21:05 -!- suiside [tajnyman@unaffiliated/suiside] has joined #go-nuts
21:15 -!- femtooo [~femto@95-89-197-23-dynip.superkabel.de] has joined #go-nuts
21:17 -!- femtoo [~femto@95-89-197-23-dynip.superkabel.de] has quit [Ping timeout:
255 seconds]
21:24 -!- enherit [~enherit@cpe-98-149-170-48.socal.res.rr.com] has joined
#go-nuts
21:27 -!- sauerbraten [~sauerbrat@p508CEC58.dip.t-dialin.net] has quit [Quit:
Leaving]
21:31 -!- atsampson [~ats@94-194-126-16.zone8.bethere.co.uk] has quit [Read error:
Connection reset by peer]
21:31 -!- teejae [~teejae@softbank219185095092.bbtec.net] has quit [Quit: teejae]
21:32 -!- atsampson [~ats@94-194-126-16.zone8.bethere.co.uk] has joined #go-nuts
21:39 -!- Davidian1024 [~Davidian1@cpe-173-88-174-84.neo.res.rr.com] has joined
#go-nuts
21:40 -!- vpit3833 [~user@203.111.33.203] has joined #go-nuts
21:45 -!- femtooo [~femto@95-89-197-23-dynip.superkabel.de] has quit [Read error:
Connection reset by peer]
21:54 -!- xash [~xash@d179069.adsl.hansenet.de] has quit [Ping timeout: 255
seconds]
21:54 -!- bmizerany [~bmizerany@204.14.152.118] has joined #go-nuts
22:01 -!- sav1o [~savio@67.18.186.81] has joined #go-nuts
22:04 -!- zozoR [~zozoR@56346ed3.rev.stofanet.dk] has quit [Quit: Morten.  Desu~]
22:05 -!- Tuller [~tuller@c-69-143-52-174.hsd1.va.comcast.net] has joined #go-nuts
22:07 -!- piranha [~piranha@5ED4B890.cm-7-5c.dynamic.ziggo.nl] has quit [Quit:
Computer has gone to sleep.]
22:08 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3]
22:11 -!- TheMue [~TheMue@p5DDF76E1.dip.t-dialin.net] has quit [Quit: TheMue]
22:13 -!- Skola [~ik@5352A3FB.cm-6-3c.dynamic.ziggo.nl] has joined #go-nuts
22:17 -!- Venom_X_ [~pjacobs@75.92.43.21] has joined #go-nuts
22:18 -!- Venom_X [~pjacobs@66.54.185.131] has quit [Ping timeout: 240 seconds]
22:21 -!- rlab [~Miranda@91.200.158.34] has quit [Read error: Connection reset by
peer]
22:21 -!- adu [~ajr@pool-72-83-254-159.washdc.fios.verizon.net] has quit [Quit:
adu]
22:22 -!- jyxent [~jyxent@129.128.191.96] has quit [Read error: Connection reset
by peer]
22:26 -!- jyxent [~jyxent@129.128.191.96] has joined #go-nuts
22:27 -!- virtualsue [~chatzilla@nat/cisco/x-vghuylostvfubinz] has joined #go-nuts
22:30 -!- qjcg [~qjcg@208.88.110.46] has quit [Quit: qjcg]
22:39 -!- napsy [~luka@88.200.96.18] has quit [Quit: leaving]
22:43 -!- Scorchin [~Scorchin@host86-148-177-221.range86-148.btcentralplus.com]
has quit [Quit: Scorchin]
22:49 -!- photron [~photron@port-92-201-92-220.dynamic.qsc.de] has quit [Ping
timeout: 276 seconds]
22:54 -!- DarthShrine [~angus@pdpc/supporter/student/DarthShrine] has joined
#go-nuts
22:56 -!- Fish- [~Fish@9fans.fr] has quit [Quit: So Long, and Thanks for All the
Fish]
22:57 -!- i__ [~none@69.164.206.224] has quit [Changing host]
22:57 -!- i__ [~none@unaffiliated/i--/x-3618442] has joined #go-nuts
23:08 -!- Tuller [~tuller@c-69-143-52-174.hsd1.va.comcast.net] has quit [Quit:
Computer has gone to sleep.]
23:08 -!- awidegreen [~quassel@c-eacae555.08-2-73746f39.cust.bredbandsbolaget.se]
has quit [Read error: Connection reset by peer]
23:12 -!- kimelto [~kimelto@sd-13453.dedibox.fr] has quit [Ping timeout: 246
seconds]
23:12 -!- kimelto [~kimelto@sd-13453.dedibox.fr] has joined #go-nuts
23:13 -!- wrtp [~rog@92.17.53.205] has quit [Quit: wrtp]
23:17 -!- mncaudill [~nolan@c-67-188-35-154.hsd1.ca.comcast.net] has quit [Quit:
leaving]
23:18 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit:
Verlassend]
23:25 -!- kixo [~kixo@78-1-147-32.adsl.net.t-com.hr] has left #go-nuts []
23:35 -!- artefon [~thiago@189.59.206.109] has joined #go-nuts
23:41 -!- sav1o [~savio@67.18.186.81] has quit [Quit: bbl]
23:42 -!- virtualsue [~chatzilla@nat/cisco/x-vghuylostvfubinz] has quit [Ping
timeout: 246 seconds]
23:52 -!- Skola [~ik@5352A3FB.cm-6-3c.dynamic.ziggo.nl] has quit [Quit: Skola]
23:52 < cbeck> Happiness, thy name is redonkulous numbers of goroutines
23:53 -!- Tuller [~tuller@c-69-143-52-174.hsd1.va.comcast.net] has joined #go-nuts
23:53 < jesusaurus> that++
23:54 < cbeck> I was spawning 100,000, but the startup time got to be a bit
too much
--- Log closed Tue Jan 18 00:00:04 2011