--- Log opened Tue Nov 17 04:13:15 2009
04:13 < Ycros> absurdh: yeah, I don't find speed an issue with bzr these
days
04:13 -!- xuser [n=xuser@unaffiliated/xuser] has left #go-nuts []
04:13 <+agl> kuroneko: I mean it's a hg plugin to push/pull from a git
server.  I'm looking for a git command to push/pull from an hg server.
04:14 -!- agl [n=agl@72.14.229.81] has quit ["Leaving"]
04:15 -!- devyn [n=devyn@S01060013d4130071.vc.shawcable.net] has left #go-nuts []
04:15 < kuroneko> agl: the thing is, you can stage through hg this way
04:15 < kuroneko> remember, DVCS is for dealing with multiple upstreams.
04:16 < kuroneko> so you pull from upstream as hg, push to your local git
repo
04:16 < kuroneko> work in git.
04:16 -!- Fraeon_ [n=kzer-za@e212-246-65-153.elisa-laajakaista.fi] has joined
#go-nuts
04:16 < kuroneko> I'm giving it a shot right now to verify that it works ,
but so far so good.
04:17 < Ycros> kuroneko: yeah, I've worked like that in some projects in the
past - but using bzr
04:18 -!- voluspa [n=voluspa@x-134-84-102-227.reshalls.umn.edu] has joined
#go-nuts
04:18 -!- delza [n=delza@d66-183-63-49.bchsia.telus.net] has joined #go-nuts
04:19 < ericmoritz\0> Ycros, I never noticed bzr being slow either and I've
been using it for a while.  Everyone seems to give that excuse
04:20 -!- drusepth` [n=drusepth@76.211.88.252] has quit [Read error: 110
(Connection timed out)]
04:20 < Ycros> ericmoritz\0: it used to be, a long time ago
04:20 < kuroneko> I find compared to git, it still is.
04:20 < kuroneko> it's not that it's in the too slow to use basket - it
isn't.
04:21 < kuroneko> it's just slower than an alternative which I'm equally (or
more) comfortable with using
04:21 < Ycros> kuroneko: yeah, it used to be much slower than hg though -
and hg is also written in Python
04:21 -!- halfdan_ [n=halfdan@p57A96706.dip.t-dialin.net] has joined #go-nuts
04:22 < kuroneko> my biggest upset with git is that chunks of git are
written in sh
04:22 < kuroneko> which makes putting it onto anything non-unixish
non-trivial
04:23 < kuroneko> but now we have go, we'll have to write a go
implementation of git!
04:23 -!- strohman [n=strohman@adsl-71-135-96-124.dsl.pltn13.pacbell.net] has quit
[Read error: 110 (Connection timed out)]
04:23 -!- strohman_ is now known as strohman
04:23 < kuroneko> with no shell bits!
04:23 < kuroneko> *cough*
04:23 < kuroneko> sorry, I'll be good now.  :)
04:23 < kuroneko> ok, hg-git is a little slow.
04:23 -!- drusepth [n=drusepth@ppp-70-250-215-7.dsl.spfdmo.swbell.net] has quit
[Read error: 110 (Connection timed out)]
04:23 < kuroneko> pushing all of the hg history has taken 5 minutes CPU time
so far, and it's only about 70% done
04:24 -!- assiss [n=assiss@219.143.144.229] has joined #go-nuts
04:24 * Ycros goes back to writing more tests
04:26 -!- binaryjohn [n=binaryjo@cpe-24-30-132-50.san.res.rr.com] has quit []
04:27 -!- Clooth [n=Clooth@cs27062173.pp.htv.fi] has quit [Read error: 131
(Connection reset by peer)]
04:27 -!- Clooth [n=Clooth@cs27062173.pp.htv.fi] has joined #go-nuts
04:29 -!- thakis [n=thakis@c-71-198-222-88.hsd1.ca.comcast.net] has joined
#go-nuts
04:30 < uriel> kuroneko: there are implementations of both hg and git in
Limbo already, should be easy to translate them to Go
04:31 < kuroneko> somebody did git in limbo?
04:31 < Jerub> Trying to do things faster by using more than one version
control system seems to be a solution at odds with the goal.
04:31 < soul9> i don't think so, only mercurial
04:31 -!- jdp [n=justin@ool-435238c0.dyn.optonline.net] has joined #go-nuts
04:31 < soul9> kuroneko: there is mercurial in limbo.
04:32 < uriel> kuroneko: it was a gsoc project this summer
04:32 < kuroneko> oh, hahahahahaha.  :)
04:32 < kuroneko> hg-git, to push, builds a little git repo in .hg/git
04:32 < uriel> but I think mercurial is more mature, mjl has been working
hard at it for the last year
04:33 -!- rhelmer [n=rhelmer@adsl-69-107-65-242.dsl.pltn13.pacbell.net] has quit
[Read error: 113 (No route to host)]
04:33 < kuroneko> the commit history is intact in the push target though
04:33 < jgoebel> cool
04:33 < jgoebel> added a replace method :)
04:33 * jgoebel pasted http://pastie.textmate.org/private/p70h12x2hsglvbk27dug
04:33 -!- pace_t_zulu [n=pacetzul@unaffiliated/pacetzulu/x-585030] has joined
#go-nuts
04:33 < jgoebel> i love temates built in support to pastie to channel :)
04:34 -!- halfdan [n=halfdan@p57A96C05.dip.t-dialin.net] has quit [Read error: 110
(Connection timed out)]
04:34 -!- rhelmer [n=rhelmer@adsl-69-107-65-242.dsl.pltn13.pacbell.net] has joined
#go-nuts
04:35 -!- JSharpe2 [n=jamie@5ad1d7f1.bb.sky.com] has quit [Read error: 110
(Connection timed out)]
04:36 -!- Fraeon [n=kzer-za@e212-246-65-153.elisa-laajakaista.fi] has quit [Read
error: 110 (Connection timed out)]
04:36 -!- Fraeon_ is now known as Fraeon
04:36 -!- jharrys [n=de043124@c-71-195-253-55.hsd1.ut.comcast.net] has quit
["Leaving."]
04:38 -!- wobsite [n=wobsite_@68-189-250-56.static.oxfr.ma.charter.com] has joined
#go-nuts
04:39 -!- tcpip4000 [n=fulano@dsl-emcali-190.99.193.179.emcali.net.co] has left
#go-nuts []
04:42 -!- loureiro [n=loureiro@201008196167.user.veloxzone.com.br] has quit
["Quit"]
04:43 -!- kayess_ [n=kayess@ppp-124-122-211-91.revip2.asianet.co.th] has joined
#go-nuts
04:43 -!- ironfroggy__ [n=calvin@64.129.84.194] has quit [Read error: 60
(Operation timed out)]
04:45 -!- voluspa [n=voluspa@x-134-84-102-227.reshalls.umn.edu] has quit [Read
error: 60 (Operation timed out)]
04:47 -!- binaryjohn [n=binaryjo@cpe-24-30-132-50.san.res.rr.com] has joined
#go-nuts
04:47 -!- x-ip [n=sakura@unaffiliated/x-ip] has joined #go-nuts
04:50 -!- ericmoritz\0 [n=ericmori@c-76-123-248-214.hsd1.tn.comcast.net] has quit
["Leaving"]
04:50 -!- me___ [n=venkates@c-68-55-179-48.hsd1.md.comcast.net] has joined
#go-nuts
04:53 -!- rhelmer [n=rhelmer@adsl-69-107-65-242.dsl.pltn13.pacbell.net] has quit
[]
04:54 -!- rhelmer [n=rhelmer@adsl-69-107-65-242.dsl.pltn13.pacbell.net] has joined
#go-nuts
04:55 < KragenSitaker> hi.  looks like when I get a SIGFPE, the handler
writes error stuff to stdout instead of stderr.  that isn't a known problem, is
it?
04:55 < KragenSitaker> I assume I divided by zero.
04:56 < anticw> iant: should the boehm garbage collector work for gccgo?
04:56 <+iant> printing to stdout seems to be intentional
04:56 -!- JBeshir [n=namegduf@138-38-226-61.resnet.bath.ac.uk] has joined #go-nuts
04:56 <+iant> anticw: I think it would be hard to fit boehm gc into the
goroutine scheme
04:57 < JBeshir> win move 19
04:57 < KragenSitaker> iant: does that mean I should or shouldn
04:57 < JBeshir> Er, sorry.
04:57 < KragenSitaker> shouldn't file an issue?
04:57 <+iant> KragenSitaker: I'm in favor of stderr, so I will file an
issue, but Russ might just close it
04:57 <+iant> s/will/would/
04:57 <+iant> sorry, I wasn't volunteering to file an issue myself
04:57 < KragenSitaker> darn
04:57 < KragenSitaker> :)
04:57 < KragenSitaker> I appreciate all your help already!
04:58 <+iant> anticw: I think something like recycler really is the way to
go, it has the right sort of multicore semantics
04:58 < KragenSitaker> sigh, it looks like I need a Google account to file
an issue?
04:58 < anticw> iant: i was thinking more as a short-term hack not really
much of a long-term solution
04:58 <+iant> hmmm, yeah, maybe
04:58 < anticw> recycler ithe ibm gc?
04:58 <+iant> anticw: yes, from IBM
04:58 < KragenSitaker> how many pages of legalese is that going to require
me to review?
04:59 < KragenSitaker> </complaints>
04:59 <+iant> KragenSitaker: dunno, I hope not much
04:59 -!- path__ [n=path@115.240.111.225] has joined #go-nuts
04:59 -!- kill-9 [n=kill-9@cpe-65-24-145-70.columbus.res.rr.com] has quit [Read
error: 110 (Connection timed out)]
05:00 < KragenSitaker> I recognize Russ has a lot more experience designing
software for Unix than I do, but it is hard for me to imagine why someone would
think writing stack traces to stdout was a good idea
05:00 <+iant> anticw: the problem with GC in gccgo is mainly that it's hard
to do GC when you can't stop all the threads, and it's hard to stop all the
threads when they are all in different pthreads
05:00 -!- Wezz6400_ [n=Wezz6400@145-118-111-123.fttx.bbned.nl] has joined #go-nuts
05:00 < wcr> go nuts!
05:00 <+iant> anticw: I'm pretty sure it can be done, I just haven't put
together the steps to do it
05:00 < KragenSitaker> I'll get to it later I hope
05:00 < anticw> iant: do you really have to stop the threads?
05:00 -!- brrant [n=John@65-102-193-77.hlrn.qwest.net] has joined #go-nuts
05:01 <+iant> anticw: using recycler you don't, but using boehm you do,
because otherwise memory will be changing as the collector is looking at it
05:01 -!- brrant [n=John@65-102-193-77.hlrn.qwest.net] has quit [Read error: 104
(Connection reset by peer)]
05:02 < me___> iant: if you have per-osthread heaps, you could start gc-ing
there without stopping everyone?
05:02 -!- brrant [n=John@65-102-193-77.hlrn.qwest.net] has joined #go-nuts
05:03 <+iant> me___: yes, that is true
05:03 <+iant> well, wait
05:03 <+iant> you still have to find out whether anybody elses heap points
into yours
05:03 < anticw> iant: nothing precents maps and slices from badness when you
have multiple threads working...  i assume this is deliberately ommited from the
specification for now?
05:04 < anticw> s/precents/prevents/
05:04 < JBeshir> anticw: There was an FAQ item about it.
05:04 <+iant> yeah, they are deliberately non-atomic for now
05:04 < JBeshir> anticw: The judgement was basically that the majority of
use didn't require it, so you have to handle it yourself.
05:04 -!- evilhackerdude [n=stephan@e181102016.adsl.alicedsl.de] has quit [Nick
collision from services.]
05:04 < KragenSitaker> ...and wrapping them in locks would make them slower
05:05 -!- evilhackerdude [n=stephan@e181124118.adsl.alicedsl.de] has joined
#go-nuts
05:05 < JBeshir> Atomic data structures would actually be nice, to have as
an alternative.
05:05 < JBeshir> But someone could implement them in a package.
05:05 < anticw> KragenSitaker: taking a spinlock hot-cache when you have the
cache line already is pretty cheap
05:05 < KragenSitaker> JBeshir: not without parametric types
05:06 < KragenSitaker> anticw: I haven't done anything at that level so I
will take your word for it
05:06 -!- binaryjohn [n=binaryjo@cpe-24-30-132-50.san.res.rr.com] has quit []
05:06 -!- marciofss [n=marciofs@189.105.58.191] has quit []
05:06 < uriel> in case anyone was wondering, irc logs are working again
(they were down for a while), and now are split per-day:
http://go-lang.cat-v.org/irc-logs/go-nuts/2009-11-17
05:06 < uriel> and now good night
05:06 < KragenSitaker> uriel: awesome!  thanks!
05:07 < uriel> KragenSitaker: no problem, see you guys in the morning ;)
05:07 -!- thakis [n=thakis@c-71-198-222-88.hsd1.ca.comcast.net] has left #go-nuts
[]
05:09 < anticw> iant: wrt to locking for maps ...  a simple test to insert
1M intergers into a map (keys are ints) is about the same speed as python ...
which does locking
05:09 < anticw> (about 500k inserts/s)
05:10 <+iant> anticw: well, you're right that a cached uncontested lock can
be pretty fast
05:10 -!- Null-A [n=jason@c-76-21-4-0.hsd1.ca.comcast.net] has joined #go-nuts
05:10 <+iant> I think the real motivator not locking maps is that the memory
model says that you can't access the same map simultaneously in multiple
goroutines anyhow
05:11 < Null-A> iant: can you elaborate?
05:11 < anticw> i dont understand that ...  i mean, "can't" meaning the
language or something will prevent it
05:11 < anticw> or can't meaning "dont do that" ?
05:11 <+iant> Null-A, anticw: nothing prevents it, but a correct Go program
isn't supposed to do it
05:11 <+iant> Also, simultaneous multithreaded access to a map requires more
than a lock
05:12 <+iant> it also requires copying the value out of the map before
returning it to the program
05:12 < chrome> You're supposed to use channels to share data instead of
sharing the map
05:12 < chrome> ?
05:12 <+iant> and that means that a map to a large struct is slower
05:12 < anticw> iant: so if i have 16+ goroutines that need to do map
access...  i should use a channel to an accessor gorouting?
05:12 < KragenSitaker> iant: that sounds more like a rationale for a C
feature than a rationale for a Go feature
05:12 < KragenSitaker> the rest of the language is memory- and type-safe and
could probably be made capability-secure
05:12 -!- edw [n=user@c-76-99-21-9.hsd1.pa.comcast.net] has joined #go-nuts
05:12 <+iant> yes, the general rule is that you should use a channel to
transfer ownership of the map before modifying it
05:13 <+iant> nothing wrong with simultaneous reads of a map
05:13 < KragenSitaker> reads simultaneous to a modification?
05:13 < anticw> iant: unless updates are done in careful ways (they probably
are) there is no reason to assume reaps are safe under writes surely?
05:13 < Null-A> But the map elements need to manage read/write conflicts,
right?
05:13 <+iant> KragenSitaker: yes, we've discussed having a mode in which the
compiler/runtime do lock maps specifically for high security situations; there is
also a race condition involving slices
05:13 < me___> iant: was RWMutex included in sync just for this?
05:13 <+iant> KragenSitaker: no, reads simultaneous with reads, only
singleton writes
05:14 < KragenSitaker> that's what I thought
05:14 <+iant> me___: I dont think so
05:14 -!- Wezz6400 [n=Wezz6400@145-118-111-123.fttx.bbned.nl] has quit [Read
error: 110 (Connection timed out)]
05:14 < KragenSitaker> sorry to recapitulate old discussions for the
zillionth time
05:14 <+iant> I think it just seemed generally useful
05:14 <+iant> no worries
05:14 -!- turutosiya [n=turutosi@219.106.251.65] has quit [Read error: 110
(Connection timed out)]
05:14 < me___> fair, though i saw its not yet doing its job?
05:14 < Null-A> Are there conflicts with deleting elements in a map, and
reading that element?
05:15 < path__> is there any document that talks about how reflection was
implemented in go?
05:15 <+iant> Null-A: yes
05:15 <+iant> path__: beyond the docs for pkg/reflect?  I don't think so
05:15 < Null-A> hm
05:15 < path__> oh ok
05:15 -!- nickgibbon [n=nring@210.8.201.244] has joined #go-nuts
05:15 <+iant> path__: basically the compiler generates a type descriptor for
each type
05:16 < Null-A> Maybe it's worth supporting the full extent of single
writer, multiple reader ?
05:16 -!- jA_cOp [n=yakobu@ti0043a380-3093.bb.online.no] has quit ["Leaving"]
05:16 <+iant> Null-A: maybe; I don't think we know yet
05:16 < path__> hmm I see.  And this is even with gccgo right?
05:16 < KragenSitaker> Null-A: are you Korzybskian?
05:17 < Null-A> yep
05:17 < Null-A> =)
05:17 < KragenSitaker> what does "null-A" mean?
05:17 < path__> the world of null-
05:17 < path__> a
05:17 < path__> its a book isnt it
05:17 -!- sjbrown [n=sjbrown@c-69-181-182-137.hsd1.ca.comcast.net] has joined
#go-nuts
05:18 < Null-A> It comes from "The world of Null-A" a fiction novel; meaning
non- Aristotelean system
05:18 <+iant> A.E.  Van Vogt
05:18 < Null-A> yep
05:18 -!- antarus [n=antarus@gentoo/developer/antarus] has quit [Remote closed the
connection]
05:18 -!- antarus [n=antarus@nat/google/x-zfzjqbnyzryfnump] has joined #go-nuts
05:18 <+iant> (but I always preferred The Weapon Shops of Isher and related
stories)
05:19 < Null-A> A non-A system, is any system which supersets aristotle's
original logical premises, which was a two-valued logic mostly
05:19 < KragenSitaker> like intuitionistic logic, linear logic, that kind of
thing?
05:19 < Null-A> Korzybski in his book "Science of Sanity" tried to
incorporate such non-A systems, discovered in scientific theories, back in to
every-day language
05:20 < Null-A> I'm not familiar with those in particular, I would give
examples of fuzzy logic, infinite-valued logic, etc - but your probably right
05:20 < Null-A> iant: were you in sydney at all?
05:20 <+iant> No, I've never been there
05:20 < Null-A> ah ok, I saw russ and rob there
05:20 <+iant> yes, they were there, rob will be there again next spring
05:20 < KragenSitaker> at Google?
05:21 <+iant> yes
05:21 < Null-A> Yeah, its a nice vacationing office ;)
05:21 < chrome> iant: how much work do you think it would take to support
dlopen()?  :)
05:21 -!- igggy2 [n=iggy@c-76-104-189-88.hsd1.wa.comcast.net] has joined #go-nuts
05:21 <+iant> chrome: for 6g/8g/5g, not too much; they can already dlopen C
shared libraries; I think it would require some thought about which structures the
runtime expects to be unique
05:21 -!- brrant [n=John@65-102-193-77.hlrn.qwest.net] has quit [Read error: 110
(Connection timed out)]
05:22 <+iant> chrome: getting 6g/8g/5g to generate a shared library would be
considerably more work
05:22 <+iant> chrome: for gccgo, dlopen would be trivial
05:22 < chrome> the former is more what I'm interested in
05:22 -!- kmc [n=keegan@206-71-236-70.c3-0.nyw-ubr5.nyr-nyw.ny.cable.rcn.com] has
quit [Read error: 60 (Operation timed out)]
05:23 < chrome> iant: it would make it easier to integrate libraries, I
think.
05:24 < Null-A> iant: What happened to all the other go predecessors that
rob, etc worked on?
05:24 < Null-A> they didn't gain popularity?
05:24 -!- voluspa [n=voluspa@x-134-84-102-227.reshalls.umn.edu] has joined
#go-nuts
05:24 < KragenSitaker> chrome: it seems like start-time dynamic linking is
sufficient
05:24 < KragenSitaker> chrome: for integrating libraries
05:24 <+iant> Null-A: you would really have to ask him, but my impression is
that none of them really got released as open source for one reason or another
05:24 < KragenSitaker> chrome: unless you are planning on building some kind
of go repl, which is going to require more changes than that
05:25 < Null-A> *nods*, or maybe way too late
05:25 <+iant> it took them years to get Plan 9 out AT&T and it kind of
missed its window of opportunity
05:25 <+iant> yeah
05:25 < KragenSitaker> Null-A: Limbo didn't get released as open source for
a long time, at least
05:25 < KragenSitaker> I'm not sure what happened to Squeak
05:25 -!- itrekkie [n=itrekkie@ip72-200-108-156.tc.ph.cox.net] has quit []
05:25 < KragenSitaker> /Newsqueaik
05:25 < KragenSitaker> s/i// sorry
05:26 -!- triplez [n=triplez@bb116-14-29-6.singnet.com.sg] has quit []
05:26 < KragenSitaker> I remember at some mixer in 1996 talking to a bunch
of cisco guys
05:26 -!- wcn_ [n=wcn@80-219-150-87.dclient.hispeed.ch] has joined #go-nuts
05:26 < Null-A> That's too bad, C++ is so well established now, it would be
quite a surprise to me if go takes over a significant market share
05:26 -!- teedex [n=teedex@204.14.155.161] has quit [Remote closed the connection]
05:26 < KragenSitaker> They said their group at cisco was doing most of its
development in Plan9
05:26 < lifeless> well, programming languages are a totally saturated
market, and yet better ones do thrive.
05:26 -!- spook327 [n=RevSpook@173-20-203-218.client.mchsi.com] has quit [Read
error: 60 (Operation timed out)]
05:26 < KragenSitaker> But they were starting to have a hard time buying new
workstations, because Plan9 didn't support any non-ISA graphics cards
05:27 < Null-A> lol
05:27 <+iant> I don't really expect Go to take many programmers away from
C++, but the number of people writing programs keeps getting larger, so there is
some room for new languages
05:27 <+iant> KragenSitaker: ouch
05:27 < lifeless> the lack of loadable go modules, and generics is a bit of
an impediment at the moment.
05:28 < KragenSitaker> (and of course this was many years before the
open-source release, so there wasn't really a community of people able to pour
work into the system to fix things like that)
05:28 -!- spook327 [n=RevSpook@173-20-203-218.client.mchsi.com] has joined
#go-nuts
05:28 < me___> KragenSitaker: hah.  nice.
05:28 < dho> there's not a community of people pouring in work now
05:28 < Null-A> I don't know..  I use templates a lot in C++, but you can do
all sorts of meta programming
05:28 < Jerub> hm, isa.
05:28 < dho> there's like 20 of us
05:29 < Null-A> for generics..  I use them in collections mostly
05:29 < dho> and i don't have time to pour work into a system that 19 other
people might use :)
05:29 < KragenSitaker> dho: and how is Plan9 support for current hardware?
05:29 < dho> me___: did you see my changeset?
05:29 < KragenSitaker> heh
05:29 < me___> dho: yep!
05:29 < dho> KragenSitaker: depends on the hardware.  usually abysmal
05:29 < me___> KragenSitaker: depends.  there's USB2
05:29 < KragenSitaker> yeah.  so.
05:29 < KragenSitaker> nice!  I want a USB2 video adaptor :)
05:29 < dho> no acpi, which is only going to be a bigger issue as time
progresses
05:30 < me___> dho: nemo is doing acpi atm.
05:30 -!- nigwil [n=chatzill@berkner.ccamlr.org] has quit ["ChatZilla 0.9.85
[Firefox 3.5.5/20091102152451]"]
05:30 < path__> hmm does anyone know where I could get a quick understanding
of how garbage collection works in a "compiled to machine code" language.  I had
always assumed till now (wrongly) that gc required a runtime environment which
interpreted your code in some manner
05:30 -!- qbit_ [n=qbit_@c-75-71-160-106.hsd1.co.comcast.net] has quit ["Computer
has gone to sleep"]
05:30 < dho> he mentioned it
05:30 < dho> it's a big project.
05:30 < KragenSitaker> there could potentially have been a bigger groups of
people doing this if it had been open-source at the time
05:30 < me___> so was usb2
05:30 < dho> path__: go has a runtime
05:30 < chrome> path__: compiled languages can allocate memory.  GCs track
that allocated memory and free it when it is no longer referenced.
05:30 < dho> path__: think of your OS kernel
05:30 < me___> KragenSitaker: there are a few graphics drivers that do
reasonable stuff, vesa recently got mtrr support and is faster, radeon is out of
tree but supports enough stuff (r100-r400)
05:31 < KragenSitaker> me___: awesome!
05:31 < dho> path__: it executes your applications, and collects / frees
resources consumed by them (thus doing a fair amount of garbage collection)
05:31 < KragenSitaker> path__: interpretation doesn't really affect how
garbage collection works
05:31 < me___> witness boehm.
05:31 < Null-A> iant: Why didn't you guys write a JIT compiler for Go?
05:32 < chrome> why JIT when you can PRE
05:32 < KragenSitaker> well, boehm is kind of an extreme case.  it works
without *any* support from the compiler, which is atypical.
05:32 < Null-A> chrome: PRE?
05:32 < me___> sure, just that 'interpreted' and 'GC' are mostly
perpendicular.
05:32 < chrome> PREcompile
05:32 -!- teedex [n=teedex@204.14.155.161] has joined #go-nuts
05:32 < Null-A> chrome: platform independence for one
05:32 < KragenSitaker> path__: so anything you know about GC for
interpreters is true of GC for compiled languages, except the things that aren't
true of either one.
05:33 < KragenSitaker> Null-A: are you saying you think a JIT compiler for
Go would be a fun project?
05:33 <+iant> Null-A: I think fully compiled gets better runtime performance
for small programs
05:33 < me___> its ...  compiled to native code.  why?
05:34 < KragenSitaker> it's a little more speculative than I'm willing to
take on at the moment but I look forward to testing your results :)
05:34 <+iant> Null-A: and beating native code with a JIT is a heck of a lot
of work even for large programs
05:34 < Null-A> I'm wondering if they had any rationals behind the decision
05:34 < path__> hmm well my understanding is when you have a language that
supports gc there are only certain ways to allocate memory, you could use those to
allocate memory in certain areas and collect them when they are no longer
referenced (or circular references) etc.  And I read somewhere that the java gc
does some complex stuff like multiple areas of memory and multiple generations and
so on
05:34 < path__> so I always assumed this gc was something running on the
platform which interpreted your code
05:35 <+iant> path__: no, all you need for GC is some way to know that the
memory the collector is looking at is stable
05:35 < Null-A> iant: Isn't the only extra cost, the one-time process of
converting byte-code to native code?
05:35 < path__> with machine code does that mean the compiler links in a
library which then executes before your code does and provides all these features?
05:35 < Null-A> iant: effectively you could turn the current go compiler
into a JIT interpreter, if you had lazy compilation
05:35 < KragenSitaker> Null-A: wait, where did the bytecode come from?
05:35 <+iant> Null-A: but since one of the goals is speed of recompilation,
do we want to pay that cost?
05:36 < aho> just in time compilers dont compile everything in one go
05:36 <+iant> path__: I'm not sure I would say *before* your code, but it
executes in conjunction with your code somehow
05:36 < Null-A> KragenSitaker: JIT compiler architectures usually employ
byte code
05:36 < me___> so if you wanted to apply power overwhelming to 'speed of
recompile', you could keep a reverse map from executable to parts of the source or
intermediate trees that generated it
05:36 -!- fynn [n=fynn@unaffiliated/fynn] has joined #go-nuts
05:37 < me___> it'd allow partial recompiles...  otoh seems complex.  and
totally possibly not worth it
05:37 -!- gcopenhaver [n=greg@c-98-250-49-37.hsd1.mi.comcast.net] has quit
["Leaving."]
05:37 < fynn> any word on generics support?
05:37 < KragenSitaker> Null-A: HIPE used to but doesn't now, JVM does and
regrets it badly, Self sort of does but its "bytecode" is more like a parse tree,
LuaJIT doesn't, V8 doesn't, C# does
05:37 -!- mizai [n=mizai@rhou-164-107-213-187.resnet.ohio-state.edu] has quit
[Read error: 110 (Connection timed out)]
05:37 < Null-A> iant: Why not?  Really for the purposes of google
production, once the program has been executing for 4 seconds, it's fully
compiled.
05:37 < Null-A> iant: maybe I'm missing something
05:37 < KragenSitaker> oh, wait, I may be wrong about LuaJIT, sorry
05:38 < dho> Null-A: when you can compile very quickly beforehand, why would
you want to defer compilation?
05:38 < KragenSitaker> Null-A: in other words, bytecode isn't particularly
helpful for a JIT compiler.  it's great for program compression and fast
interpretation
05:38 < Null-A> dho: platform independence
05:38 <+iant> Null-A: the system is more complicated, requires a lot more
work, and what do we gain?
05:38 < KragenSitaker> fynn: the word is that lots of people want it but
nobody has offered a good design for it
05:38 -!- delza [n=delza@d66-183-63-49.bchsia.telus.net] has quit []
05:38 <+iant> Null-A: platform independence isn't very useful to us
05:38 < dho> Null-A: ok, but you still have to port the VM
05:38 < Null-A> hm
05:38 < me___> hmm, everyone's always said platform independence, but in
practice i find C more portable than Java...
05:39 < Null-A> iant: I guess more to the open source community
05:39 < path__> hmm ok.  I guess I need to a bit more reading up.  But I
guess as long as all the memory you're allocating and de-allocating is through
some language features I can see how it would work.  So you're saying providing a
platform that interpets code is no advantage at all for gc implementation?
05:39 < Null-A> iant: I agree it's a lot of work
05:39 < dho> it's not like it runs everywhere when you have an interpreter.
05:39 <+iant> I have nothing against platform independence, but is it worth
the work?
05:39 < me___> VMs may be just as big to port as retargeting a small
compiler.
05:39 < dho> exactly my point
05:39 < anticw> x86 won
05:39 < dho> Null-A: I ported most of it to freebsd in ~5 days
05:39 <+iant> clearly nothing prevents Go as a language from using a
bytecode/JIT implementation even if the current tools don't work that way
05:39 < KragenSitaker> path__: very little.  and it doesn't even have to be
through some language features; it can be through some library
05:39 < Null-A> *nods*
05:39 < anticw> x86 is *the* platform ...  warts and all
05:39 < path__> ah ok
05:40 < path__> thanks
05:40 < fynn> KragenSitaker: :-(
05:40 < dho> Null-A: so, it's not like it's excruciatingly difficult
05:40 < anticw> actually, that's not true...  arm does well in embedded
space
05:40 < anticw> but go has an arm port
05:40 < dho> i wouldn't call myself the most experienced engineer ever
05:40 < anticw> i think the only other platform that might be useful in time
is mips, since it's also big in embedded space
05:40 < KragenSitaker> path__: the boehm GC, for example, as me___ pointed
out earlier.  although it's very helpful to be able to tell what parts of memory
are pointers and what parts aren't, which benefits from compiler/interpreter
support
05:40 < Null-A> dho: Yeah, it depends on the architectures
05:41 < path__> ah I see
05:41 < dho> Null-A: well, true.  i was helped by the fact that i was
porting to an existing architecture / binary format.
05:41 < KragenSitaker> anticw: also I suspect that in 2038 x86 will no
longer be so dominant
05:41 < Null-A> JIT compilation is nice too, because you can take advantage
of specialized instruction sets available on the particular processor
05:41 < dho> x86 isn't extremely dominant now
05:42 < me___> iant: other than recycler, did you folks think about the
VCGC?
05:42 < dho> almost every consumer chip for the past 5 years has supported
amd's 64-bit extensions
05:42 < me___> dho: erm, atom.
05:42 < wcr> except the dorito
05:42 < anticw> KragenSitaker: that's a long way off, plenty of time for
people to write compilers, JIT engines, VMs and more
05:43 < dho> me___: i *did* qualify with almost
05:43 < dho> :)
05:43 < Null-A> iant: I'm so glad there's finally a decent language out with
CSPs & data mutation.  Calls for some new experimentation.
05:43 -!- wcn [n=wcn@74.125.121.49] has quit [Read error: 110 (Connection timed
out)]
05:43 -!- wcn_ is now known as wcn
05:43 < me___> hey, there's this Limbo thingy..  </whine>
05:44 -!- serdar_ [n=serdar@dslb-084-060-214-095.pools.arcor-ip.net] has quit
[Read error: 110 (Connection timed out)]
05:44 < dho> it's interpreted :)
05:44 <+iant> me___: I guess I don't know enough about the differences
between vcgc and recycler
05:44 < Null-A> KragenSitaker: where'd you hear about korzybski?
05:44 < Null-A> brb laundry
05:44 -!- serdar_ [n=serdar@dslb-084-060-207-026.pools.arcor-ip.net] has joined
#go-nuts
05:44 < KragenSitaker> Null-A: oh, all over the place
05:45 < KragenSitaker> Null-A: but I heard of "null-A" from reading Tatjana
van Vark's web page
05:45 < dho> iant: what's up with the patents ibm has on that recycle gc?
05:45 < anticw> channel overhead is tens of bytes?
05:45 < KragenSitaker> she describes herself as a "creative null-A
polymaniac"
05:45 < anticw> a few tens at most?
05:46 <+iant> dho: no idea
05:46 -!- path__ [n=path@115.240.111.225] has quit []
05:46 <+iant> dho: and I really don't want to know
05:46 -!- lambo4jos [n=chatzill@c-76-126-250-10.hsd1.ca.comcast.net] has quit
["ChatZilla 0.9.85 [Firefox 3.5.5/20091102152451]"]
05:46 < dho> was just wondering if that would interfere with using it
05:46 < me___> well, openjdk 7 will use it
05:47 < dho> we looked at it at work for an embedded interpreter we are
working on but a) implementing the pseudocode didn't end up freeing anything, and
b) patents were scary
05:47 < anticw> legal questions whilst interesting are very hard to answer,
even for legal people
05:47 < dho> (though we're commercial)
05:47 < me___> vcgc was the approach used by Inferno and SML/NJ, allows for
mark and sweep passes to be concurrent with mutate.
05:47 -!- fynn [n=fynn@unaffiliated/fynn] has left #go-nuts ["Leaving"]
05:48 < me___> probably not as good as recycler, haven't seen them compared
05:48 < KragenSitaker> if SML/NJ and Inferno used it, you can be very sure
that people on the Go team considered it
05:48 < KragenSitaker> in an informed fashion
05:48 < me___> but vcgc is older by a 5 or so years..
05:48 < KragenSitaker> I wonder if they wrote anything
05:49 < me___> KragenSitaker: 'wrote anything'?
05:49 < KragenSitaker> about their choice of GC
05:50 < me___> atm, there is a 'not for production' Mark/Sweep, so probably
not.
05:50 < Null-A> back
05:50 < anticw> me___: what does current 6g/8g runtime implement?
05:50 -!- path__ [n=path@115.240.126.55] has joined #go-nuts
05:50 < Amaranth> dang, google can't find anything on a recycler gc
05:50 < me___> anticw: a Mark/Sweep collector, with the header comment "NOT
FOR PRODUCTION"
05:51 < me___> Amaranth: "java without the coffee breaks"
05:51 < path__> this is about garbage collection without stopping the world?
05:51 < anticw> http://www.research.ibm.com/people/d/dfb/recycler.html
05:51 -!- droid0011 [n=g1@p4FDCD806.dip.t-dialin.net] has joined #go-nuts
05:52 < Null-A> KragenSitaker: This person is unusual?  worth reading?
05:52 -!- droid001 [n=g1@p4FDCC258.dip.t-dialin.net] has quit [Read error: 60
(Operation timed out)]
05:52 < dho> me___: how's dfbsd coming?
05:52 < KragenSitaker> Null-A: oh, very.  doesn't have much written material
up there, just photos of her work
05:53 < me___> dho: stalled atm, while i install dfly in a vm...  my k6
doesn't have network connectivity, so working on it was less than great.
05:53 < dho> aha
05:53 < me___> but making progress.  got the linker to finally do the right
thing.
05:53 < dho> that sucks
05:54 < dho> that sucks less :)
05:54 -!- itrekkie [n=itrekkie@ip72-200-108-156.tc.ph.cox.net] has joined #go-nuts
05:54 < KragenSitaker> me___: do you know Asheesh from JHU?
05:54 < me___> it was intentional, actually.  that computer just runs emacs
in full screen, its where i Get Stuff Done (tm)
05:54 < me___> KragenSitaker: yep!
05:54 -!- kill-9 [n=kill-9@cpe-65-24-145-70.columbus.res.rr.com] has joined
#go-nuts
05:55 < JBeshir> Why, you should have just advertised that Go used Bacon's
concurrency cycle collection.
05:55 < me___> JBeshir: it doesn't yet.
05:55 < KragenSitaker> speaking of Getting Stuff Done
05:55 < JBeshir> Oh, er, right.
05:55 < KragenSitaker> I'm signing off for now
05:55 < Null-A> org-mode
05:55 -!- cpr420 [n=cpr420@67.165.199.143] has joined #go-nuts
05:56 < Null-A> KragenSitaker: can't handle the context switching, i thought
so
05:56 < KragenSitaker> right :)
05:57 -!- itrekkie [n=itrekkie@ip72-200-108-156.tc.ph.cox.net] has quit [Client
Quit]
05:57 -!- armence [n=armence@c-67-188-229-128.hsd1.ca.comcast.net] has quit
["Leaving"]
05:57 -!- Kniht [n=kniht@c-68-58-17-177.hsd1.in.comcast.net] has quit [Connection
timed out]
05:58 -!- sjbrown [n=sjbrown@c-69-181-182-137.hsd1.ca.comcast.net] has quit [Read
error: 110 (Connection timed out)]
05:58 -!- Kniht [n=kniht@c-68-58-17-177.hsd1.in.comcast.net] has joined #go-nuts
05:58 -!- wcn [n=wcn@80-219-150-87.dclient.hispeed.ch] has quit []
06:01 -!- djanderson [n=dja@hltncable.pioneerbroadband.net] has quit [Client Quit]
06:03 -!- pace_t_zulu [n=pacetzul@unaffiliated/pacetzulu/x-585030] has quit []
06:04 < Gracenotes> hm..  there must be a map literal syntax somewhere..
06:04 < Gracenotes> there is, I've never used it though, heh
06:05 < strohman> hg sync doesn't work for me.  any tips?
06:07 -!- aanderse
[n=aanderse@CPE001b11cc67d3-CM0019475d7f5e.cpe.net.cable.rogers.com] has quit
[Remote closed the connection]
06:08 -!- wobsite [n=wobsite_@68-189-250-56.static.oxfr.ma.charter.com] has quit
["Leaving"]
06:10 -!- serdar_ [n=serdar@dslb-084-060-207-026.pools.arcor-ip.net] has quit
[Read error: 104 (Connection reset by peer)]
06:10 < Gracenotes> strohman: hm, how does it not work?  have you tried "hg
pull default"?  I'm not a mercurial expert in any way, but that works for me
06:10 -!- arty [n=arty@reactos/developer/arty] has quit [Read error: 145
(Connection timed out)]
06:10 < mikejs> anyone have code for a json.Marshal function?
06:11 < soul9> strohman: what is hg sync supposed to do?
06:12 <+iant> soul9: hg sync basically does hg pull -u
06:12 < soul9> hg: unknown command 'sync'
06:12 < soul9> :-/
06:12 <+iant> soul9: you need to have to Go codereview plugin
06:12 < soul9> ah, i see
06:14 -!- serdar_ [n=serdar@84.60.254.126] has joined #go-nuts
06:14 < dho> hm
06:15 < dho> the only sucky thing about that plugin is that you can't have
multiple changesets to the same file on different CLs
06:15 < dho> which is an understandable limitation, but it's blocking me on
fixing another thing in codereview.py
06:15 <+iant> dho: yes
06:15 -!- HELLO_WORLD [n=hello_wo@adsl-71-141-88-37.dsl.snfc21.sbcglobal.net] has
joined #go-nuts
06:15 <+iant> dho: for that you need to check out the sources multiple times
06:15 -!- strohman [n=strohman@216.239.45.130] has quit [Read error: 60 (Operation
timed out)]
06:15 < dho> so awful
06:16 <+iant> dho: it's somewhat painful
06:16 < Null-A> iant: I get a segfault when I use an uninitialized map, bug?
06:16 < dho> codereview.py doesn't like it when you have spaces in your CL
file spec
06:16 <+iant> Null-A: no, using an uninitialized map is basically a null
dereference
06:16 < dho> hg diff fails
06:16 <+iant> dho: that sounds like a bug
06:17 < dho> it is
06:17 < dho> trying to figure out how to fix it
06:17 < Gracenotes> hm.  if I modify the source, I should probably make a
separate hg repository
06:17 < dho> i think lstrip should do the job, just need to figure out if
the issue is in parsecl or elsewhere.
06:20 < Null-A> Do I always have to write my map types twice in Go once for
struct decl, and once struct init?
06:20 < Null-A> a bit annoying, since I don't have to do that in C++ if the
type is instantiating on construction
06:21 -!- wobsite [n=wobsite_@140.232.179.23] has joined #go-nuts
06:21 < KirkMcDonald> Null-A: Not sure what you're referring to.
06:21 < dho> i dunno, i'll look at it later
06:22 < Null-A> type A struct { n map[int]chan string }; Then CreateA() A {
return A{n:make(map[int]chan string)}; }
06:22 < Null-A> func CreateA()*
06:22 < Gracenotes> hm.  what's the best way to have two Go installations on
the same computer simultaneously?
06:22 < Gracenotes> switch environmental variables manually?
06:23 < jgoebel> have two bash profiles?
06:23 < jgoebel> and source the one you want to use?
06:23 < jgoebel> or write a shell script that does that
06:23 -!- metageorge [n=metageor@212.251.110.2.dsl.dyn.forthnet.gr] has joined
#go-nuts
06:24 < Gracenotes> hm.  that sounds good.  actually..  the situation is a
bit complicated..  so long as the environmental variables are only needed by the
installer, I should be fine
06:24 < jgoebel> build tools use them too i think
06:24 < KirkMcDonald> Gracenotes: Is this in order to have two architectures
installed?
06:25 < Gracenotes> KirkMcDonald: both are the same architecture/os, but I
want to modify the source of one, and leave the other one be
06:25 < Gracenotes> and then be able to run either compiler at will
06:25 -!- hlv [n=hlv@c-67-171-34-157.hsd1.wa.comcast.net] has joined #go-nuts
06:25 < jgoebel> just write a wrapper around the compile tools?
06:25 < jgoebel> my6g
06:25 < jgoebel> my6l
06:25 < jgoebel> that points to your install
06:26 < Gracenotes> that sounds like what I'll do; I just want to be sure
the compiler doesn't need $GOXXX
06:26 < dho> jgoebel: i don't think the build tools care at the moment.
06:26 < dho> Gracenotes: i'll look.
06:26 < Gracenotes> great
06:26 < dho> the linker uses goos
06:27 < Gracenotes> ah.  that's fine
06:27 -!- path__ [n=path@115.240.126.55] has quit [Read error: 145 (Connection
timed out)]
06:27 < dho> only if you don't pass -H though
06:28 -!- hlv [n=hlv@c-67-171-34-157.hsd1.wa.comcast.net] has left #go-nuts []
06:28 -!- strohman [n=strohman@adsl-71-135-96-124.dsl.pltn13.pacbell.net] has
joined #go-nuts
06:28 < Gracenotes> ok
06:29 < dho> (since the assembler is essentially built into the linker, this
effectively lets the linker crosscompile
06:29 -!- hlv [n=hlv@c-67-171-34-157.hsd1.wa.comcast.net] has joined #go-nuts
06:30 -!- Null-A [n=jason@c-76-21-4-0.hsd1.ca.comcast.net] has left #go-nuts []
06:30 -!- drusepth` [n=drusepth@ppp-70-250-215-7.dsl.spfdmo.swbell.net] has joined
#go-nuts
06:31 < Gracenotes> ooh.
06:31 -!- Cyprien [n=Cyprien@253-101.78-83.cust.bluewin.ch] has joined #go-nuts
06:32 < dho> unless i'm on crack.
06:32 < dho> i don't think i am, but it's 1:30am so who knows
06:32 -!- turing_type_bot [n=turing@pool-71-241-35-143.nrflva.east.verizon.net]
has quit [Read error: 110 (Connection timed out)]
06:32 < Gracenotes> to absolutely verify that you are on crack, 1.  smoke
crack
06:33 < dho> well, or i could just do 6l -H7.
06:34 < dho> nope, i am on crack :)
06:34 -!- drusepth`` [n=drusepth@ppp-70-250-215-7.dsl.spfdmo.swbell.net] has quit
[Read error: 60 (Operation timed out)]
06:34 -!- voluspa [n=voluspa@x-134-84-102-227.reshalls.umn.edu] has quit [Read
error: 113 (No route to host)]
06:35 -!- leavengood [n=vision@adsl-074-166-196-078.sip.bct.bellsouth.net] has
joined #go-nuts
06:36 -!- tsuru [n=user@c-174-50-217-160.hsd1.tn.comcast.net] has quit [Read
error: 110 (Connection timed out)]
06:36 -!- askhader [n=askhader@taurine.csclub.uwaterloo.ca] has quit ["Lost
terminal"]
06:37 -!- igfud [n=mike@ucb-np1-145.colorado.edu] has joined #go-nuts
06:37 -!- Kniht [n=kniht@c-68-58-17-177.hsd1.in.comcast.net] has quit [Read error:
60 (Operation timed out)]
06:38 -!- jharrys [n=de043124@c-71-195-253-55.hsd1.ut.comcast.net] has joined
#go-nuts
06:38 -!- Kniht [n=kniht@c-68-58-17-177.hsd1.in.comcast.net] has joined #go-nuts
06:42 -!- HELLO_WORLD [n=hello_wo@adsl-71-141-88-37.dsl.snfc21.sbcglobal.net] has
left #go-nuts []
06:42 < Gracenotes> hrm...  lookin for the 8g entry point..
06:43 < Gracenotes> there seems to be in gc/lex.c
06:43 < Gracenotes> but..  grr, I guess I'll have to look through the
makefile.  *shudder*
06:44 < dho> yes, it's in gc.
06:44 < dho> PLATc links to it
06:46 < Gracenotes> PLATc?
06:46 < dho> ${GOARCH}c
06:46 -!- wobsite [n=wobsite_@140.232.179.23] has left #go-nuts ["Leaving"]
06:48 -!- Kniht [n=kniht@c-68-58-17-177.hsd1.in.comcast.net] has quit [Read error:
60 (Operation timed out)]
06:48 < me___> someone was asking the same thing yesterday, but i answered
in cc/lex.c :)
06:52 < Gracenotes> dho: hm..  so what is the main entry point?
06:52 < me___> gc/lex.c has main()
06:52 < Gracenotes> what turns into the 8g executable
06:52 -!- silvs [n=silvs@scruffy.silvs.org] has quit ["This computer has gone to
sleep"]
06:52 < Gracenotes> me___: so do a few others :x
06:53 < Gracenotes> I'm just checking, really
06:53 < me___> right, this is the one for 8g.
06:53 < Gracenotes> okay.  good to know :D
06:53 -!- igggy2 [n=iggy@c-76-104-189-88.hsd1.wa.comcast.net] has quit []
06:54 < Gracenotes> I suppose I could have also made a graph of includes
06:55 -!- jharrys [n=de043124@c-71-195-253-55.hsd1.ut.comcast.net] has quit [Read
error: 60 (Operation timed out)]
06:55 -!- aho [n=nya@f050194216.adsl.alicedsl.de] has quit
["EXEC_over.METHOD_SUBLIMATION"]
06:56 -!- metageorge [n=metageor@212.251.110.2.dsl.dyn.forthnet.gr] has left
#go-nuts []
06:57 -!- ajsharp_ [n=ajsharp@76.89.131.245] has joined #go-nuts
06:58 -!- mkanat [n=mkanat@c-67-188-1-39.hsd1.ca.comcast.net] has quit ["Bye!"]
06:59 < ajsharp_> when I try to run gotest -h, I get a message saying please
create a Makefile for gotest.  Is this something that I need to do or that go team
has not gotten to yet?
07:00 -!- leavengood [n=vision@adsl-074-166-196-078.sip.bct.bellsouth.net] has
quit ["Vision[0.9.7-H-090826]: i've been blurred!"]
07:00 -!- igfud [n=mike@ucb-np1-145.colorado.edu] has quit [Read error: 110
(Connection timed out)]
07:00 -!- wcr [n=wcr@unaffiliated/warcrime] has quit []
07:01 -!- igfud [n=mike@cros5-105-dhcp.resnet.colorado.edu] has joined #go-nuts
07:01 -!- voluspa [n=voluspa@x-134-84-102-227.reshalls.umn.edu] has joined
#go-nuts
07:03 -!- ajsharp_ is now known as ajsharp
07:04 -!- strohman_ [n=strohman@216.239.45.130] has joined #go-nuts
07:05 -!- Snert [n=achowe@puff.snert.com] has joined #go-nuts
07:06 -!- chickamade [n=chickama@222.254.12.228] has joined #go-nuts
07:06 -!- mizai [n=mizai@rhou-164-107-213-187.resnet.ohio-state.edu] has joined
#go-nuts
07:07 -!- itrekkie [n=itrekkie@ip72-200-108-156.tc.ph.cox.net] has joined #go-nuts
07:07 -!- wcn [n=wcn@74.125.57.33] has joined #go-nuts
07:07 -!- turutosiya [n=turutosi@219.106.251.65] has joined #go-nuts
07:09 -!- lenst [n=user@90-229-131-67-no52.tbcn.telia.com] has joined #go-nuts
07:10 -!- silvs [n=silvs@210-84-16-103.dyn.iinet.net.au] has joined #go-nuts
07:12 -!- depood [n=depood@chello080108055214.19.11.vie.surfer.at] has joined
#go-nuts
07:13 -!- triplez [n=triplez@cm52.sigma225.maxonline.com.sg] has joined #go-nuts
07:14 -!- drusepth` [n=drusepth@ppp-70-250-215-7.dsl.spfdmo.swbell.net] has quit
[Read error: 110 (Connection timed out)]
07:17 -!- itrekkie [n=itrekkie@ip72-200-108-156.tc.ph.cox.net] has quit []
07:18 -!- jharrys [n=de043124@c-71-195-253-55.hsd1.ut.comcast.net] has joined
#go-nuts
07:18 -!- hipe [n=hipe@pool-74-108-181-155.nycmny.east.verizon.net] has quit [Read
error: 104 (Connection reset by peer)]
07:18 -!- strohman_ [n=strohman@216.239.45.130] has quit []
07:18 -!- hipe [n=hipe@pool-74-108-181-155.nycmny.east.verizon.net] has joined
#go-nuts
07:20 -!- triplez [n=triplez@cm52.sigma225.maxonline.com.sg] has quit []
07:21 -!- strohman [n=strohman@adsl-71-135-96-124.dsl.pltn13.pacbell.net] has quit
[Read error: 110 (Connection timed out)]
07:26 -!- triplez [n=triplez@218.212.225.52] has joined #go-nuts
07:26 -!- edw [n=user@c-76-99-21-9.hsd1.pa.comcast.net] has quit [Remote closed
the connection]
07:28 < KirkMcDonald> Hmm.  There's no strings.Replace.
07:28 < jgoebel> i just wrote it
07:29 < KirkMcDonald> I was just going to use strings.Map.
07:29 < jgoebel> http://codereview.appspot.com/155076/show
07:29 -!- dschn [n=dschn@pool-70-19-224-19.bos.east.verizon.net] has quit
[Operation timed out]
07:29 < KirkMcDonald> Excellent.
07:31 -!- sm [n=sm@cpe-76-173-194-242.socal.res.rr.com] has quit []
07:33 -!- shambler [n=kingrat@mm-73-164-84-93.dynamic.pppoe.mgts.by] has quit
[Read error: 104 (Connection reset by peer)]
07:33 -!- shambler [i=kingrat@mm-73-164-84-93.dynamic.pppoe.mgts.by] has joined
#go-nuts
07:34 -!- melba [n=blee@unaffiliated/lazz0] has joined #go-nuts
07:36 -!- fhs_ [n=fhs@pool-72-89-203-117.nycmny.east.verizon.net] has joined
#go-nuts
07:37 -!- itrekkie [n=itrekkie@ip72-200-108-156.tc.ph.cox.net] has joined #go-nuts
07:40 -!- hlv_ [n=hlv@c-67-171-34-157.hsd1.wa.comcast.net] has joined #go-nuts
07:41 -!- trickie [n=trickie@94.100.112.225] has joined #go-nuts
07:42 -!- hlv_ [n=hlv@c-67-171-34-157.hsd1.wa.comcast.net] has left #go-nuts []
07:43 < Gracenotes> does all.bash automatically run the tests?
07:44 < Gracenotes> oh, hm, there is a function maketest() in run.bash..
07:46 < Gracenotes> I'm not sure if that actually runs things like
{pgk}_test.go, though
07:46 -!- Cyprien [n=Cyprien@253-101.78-83.cust.bluewin.ch] has quit [Read error:
110 (Connection timed out)]
07:48 < Gracenotes> this is a bit confusing
07:49 -!- ineol [n=hal@mar75-9-88-171-191-168.fbx.proxad.net] has joined #go-nuts
07:49 -!- hlv [n=hlv@c-67-171-34-157.hsd1.wa.comcast.net] has quit [Read error:
110 (Connection timed out)]
07:50 < octoploid> Gracenotes: (xcd ../test
07:50 < octoploid> ./run
07:50 < octoploid> in run.bash
07:50 < octoploid> So yes, it runs all tests.
07:51 -!- olleolleolle [n=olleolle@kali.hypergene.com] has joined #go-nuts
07:52 -!- emptypointer [n=chatzill@p5084AA7C.dip0.t-ipconnect.de] has joined
#go-nuts
07:53 < Gracenotes> octoploid: there is the question of ./run does.  I
grepped the entire source tree for, e.g.  TestSymLink (from os_test), and didn't
find it anywhere eles
07:57 -!- General1337 [n=support@71-84-247-187.dhcp.gldl.ca.charter.com] has
joined #go-nuts
07:57 -!- caw [i=caw@res55551479.rh.rit.edu] has joined #go-nuts
07:57 -!- bquinn [n=bquinn@office.velleman.com] has joined #go-nuts
07:57 < octoploid> Gracenotes: Thats covert by the maketest() function.
07:58 < Gracenotes> ..how covert?
07:58 -!- garbeam [n=arg@garbe.us] has quit [Read error: 60 (Operation timed out)]
07:58 < Gracenotes> >_< oh, if you mean covered, I'm not sure where
07:59 < Gracenotes> I can go through the makefiles by myself
07:59 -!- garbeam [n=arg@garbe.us] has joined #go-nuts
07:59 -!- fhs [n=fhs@pool-72-89-195-252.nycmny.east.verizon.net] has quit [Read
error: 110 (Connection timed out)]
07:59 < octoploid> cd src/pkg/os && gomake test
07:59 -!- bjarneh [n=bjarneh@1x-193-157-194-25.uio.no] has joined #go-nuts
07:59 -!- senneth_ [i=senneth@irssi/staff/senneth] has joined #go-nuts
07:59 -!- Netsplit leguin.freenode.net <-> irc.freenode.net quits: jgoebel,
clip9_, blasdelf, Hertta, harja, Eytre, zum, stepnem, serdar_, skyyy, (+27 more,
use /NETSPLIT to show all of them)
07:59 -!- senneth_ is now known as senneth
08:00 -!- paulca [n=paul@89.100.39.244] has joined #go-nuts
08:01 -!- Netsplit over, joins: kertak
08:01 -!- Hofanoff [i=hofanoff@server1.bshellz.net] has joined #go-nuts
08:01 -!- Netsplit over, joins: josh, eiro
08:01 -!- kizzo [n=kizzo@c-24-6-50-117.hsd1.ca.comcast.net] has joined #go-nuts
08:01 -!- blasdelf [n=fred@c-76-104-181-225.hsd1.wa.comcast.net] has joined
#go-nuts
08:01 -!- tyler_wylie [n=tyler@remoteits.com] has joined #go-nuts
08:01 -!- Netsplit over, joins: Hertta
08:02 -!- Netsplit over, joins: hallsa
08:02 -!- praetorian [i=praetori@124-171-249-236.dyn.iinet.net.au] has joined
#go-nuts
08:02 -!- Netsplit over, joins: JBeshir, Jooon, clip9_
08:02 -!- Netsplit over, joins: jshriver
08:02 -!- CallToPower [n=CallToPo@s15229144.onlinehome-server.info] has joined
#go-nuts
08:02 -!- Netsplit over, joins: directrixx
08:02 -!- directrixx [n=directri@ip68-231-189-247.tc.ph.cox.net] has quit [Client
Quit]
08:03 -!- cpr420 [n=cpr420@67.165.199.143] has quit ["Vision[0.9.7-H-090423]: i've
been blurred!"]
08:04 < Gracenotes> hm, the actual search is grep -v '_test\.go:' in
Make.pkg
08:04 -!- Eytre [n=afitz@adsl-190-192-124.asm.bellsouth.net] has joined #go-nuts
08:05 -!- dpb [i=dpb@xob.kapsi.fi] has joined #go-nuts
08:05 -!- keishi [n=keishi@h116-000-230-016.ms01.itscom.jp] has joined #go-nuts
08:05 -!- Cameron [n=Cameron@203-217-12-139.perm.iinet.net.au] has joined #go-nuts
08:05 -!- zeebo- [n=zeebo-@pool-74-110-97-28.nrflva.fios.verizon.net] has joined
#go-nuts
08:06 -!- CallToPower [n=CallToPo@s15229144.onlinehome-server.info] has quit
[Killed by sagan.freenode.net (Nick collision)]
08:06 -!- Cameron [n=Cameron@203-217-12-139.perm.iinet.net.au] has quit [Killed by
sagan.freenode.net (Nick collision)]
08:06 -!- zeebo- [n=zeebo-@pool-74-110-97-28.nrflva.fios.verizon.net] has quit
[Killed by sagan.freenode.net (Nick collision)]
08:06 -!- kizzo [n=kizzo@c-24-6-50-117.hsd1.ca.comcast.net] has quit [Killed by
sagan.freenode.net (Nick collision)]
08:06 -!- tyler_wylie [n=tyler@remoteits.com] has quit [Killed by
sagan.freenode.net (Nick collision)]
08:06 -!- taybin [n=taybin@24.42.93.107] has joined #go-nuts
08:06 -!- triplez [n=triplez@218.212.225.52] has joined #go-nuts
08:06 -!- serdar_ [n=serdar@84.60.254.126] has joined #go-nuts
08:06 -!- General13372 [n=support@71.84.247.187] has joined #go-nuts
08:06 -!- directrixx [n=directri@ip68-231-189-247.tc.ph.cox.net] has joined
#go-nuts
08:06 -!- jgoebel [n=jgoebel@96-28-100-3.dhcp.insightbb.com] has joined #go-nuts
08:06 -!- mtz [n=jaan@165.206.191.90.dyn.estpak.ee] has joined #go-nuts
08:06 -!- zeebo- [n=zeebo-@74.110.97.28] has joined #go-nuts
08:06 -!- kizzo [n=kizzo@24.6.50.117] has joined #go-nuts
08:06 -!- zum [n=jsykari@xdsl-83-150-88-4.nebulazone.fi] has joined #go-nuts
08:06 -!- CallToPower [n=CallToPo@87.106.78.92] has joined #go-nuts
08:06 -!- riot [n=wntrmut@137.226.147.251] has joined #go-nuts
08:06 -!- wollw [n=wollw4@75-101-22-68.dsl.dynamic.sonic.net] has joined #go-nuts
08:06 -!- Cameron [n=Cameron@203.217.12.139] has joined #go-nuts
08:06 -!- Smari [n=smari@130.208.143.11] has joined #go-nuts
08:06 -!- vomjom [n=vomjom@99-157-248-71.lightspeed.stlsmo.sbcglobal.net] has
joined #go-nuts
08:06 -!- tyler_wylie [n=tyler@fedora/tyler-wylie] has joined #go-nuts
08:06 -!- Innominate [n=sirrobin@71.77.41.139] has joined #go-nuts
08:06 -!- harja [n=maharj@130.232.203.196] has joined #go-nuts
08:06 -!- daganev [n=daganev@adsl-99-32-245-41.dsl.lsan03.sbcglobal.net] has
joined #go-nuts
08:06 -!- Cameron` [n=Cameron@203-217-12-139.perm.iinet.net.au] has joined
#go-nuts
08:06 -!- tyler_wy1ie [n=tyler@remoteits.com] has joined #go-nuts
08:06 -!- kizzo_ [n=kizzo@c-24-6-50-117.hsd1.ca.comcast.net] has joined #go-nuts
08:06 -!- CallToPower [n=CallToPo@87.106.78.92] has quit [Connection reset by
peer]
08:06 -!- daganev [n=daganev@adsl-99-32-245-41.dsl.lsan03.sbcglobal.net] has quit
[Read error: 131 (Connection reset by peer)]
08:06 -!- jgoebel [n=jgoebel@96-28-100-3.dhcp.insightbb.com] has quit [Read error:
131 (Connection reset by peer)]
08:06 -!- zeebo- [n=zeebo-@74.110.97.28] has quit [Connection timed out]
08:06 -!- _CallToPower [n=CallToPo@s15229144.onlinehome-server.info] has joined
#go-nuts
08:06 -!- jsgotangco [n=JSG@ubuntu/member/jsgotangco] has quit ["Ciao"]
08:06 -!- Yuffster [n=yuffster@71.181.138.238] has quit [Remote closed the
connection]
08:06 -!- harja [n=maharj@130.232.203.196] has quit [Connection timed out]
08:07 -!- kizzo [n=kizzo@24.6.50.117] has quit [Read error: 145 (Connection timed
out)]
08:07 -!- tyler_wylie [n=tyler@fedora/tyler-wylie] has quit [Connection timed out]
08:07 -!- triplez [n=triplez@218.212.225.52] has quit [Connection timed out]
08:07 -!- triplez_ [n=triplez@cm52.sigma225.maxonline.com.sg] has joined #go-nuts
08:07 -!- General13372 [n=support@71.84.247.187] has quit [SendQ exceeded]
08:07 -!- emptypointer [n=chatzill@p5084AA7C.dip0.t-ipconnect.de] has quit
["ChatZilla 0.9.85 [Iceweasel 3.0.9/2009042807]"]
08:07 -!- vomjom [n=vomjom@99-157-248-71.lightspeed.stlsmo.sbcglobal.net] has quit
[Read error: 145 (Connection timed out)]
08:07 -!- directrixx [n=directri@ip68-231-189-247.tc.ph.cox.net] has quit
[Connection timed out]
08:07 -!- riot [n=wntrmut@137.226.147.251] has quit [SendQ exceeded]
08:07 -!- triplez_ is now known as triplez
08:07 -!- mejja [n=user@c-49b6e555.023-82-73746f38.cust.bredbandsbolaget.se] has
joined #go-nuts
08:07 -!- paulca [n=paul@89.100.39.244] has quit []
08:07 -!- daganev [n=daganev@99.32.245.41] has joined #go-nuts
08:07 -!- Cameron [n=Cameron@203.217.12.139] has quit [Connection timed out]
08:08 -!- jgoebel [n=jgoebel@96-28-100-3.dhcp.insightbb.com] has joined #go-nuts
08:08 -!- zum [n=jsykari@xdsl-83-150-88-4.nebulazone.fi] has quit [Connection
timed out]
08:09 -!- kizzo_ [n=kizzo@c-24-6-50-117.hsd1.ca.comcast.net] has quit [Client
Quit]
08:09 < jdp> is there any way to disable compile failures when a variable is
declared but not used
08:09 -!- kizzo [n=kizzo@c-24-6-50-117.hsd1.ca.comcast.net] has joined #go-nuts
08:10 < jdp> makes testing piece by piece hard if the whole thing has to be
implemented
08:10 -!- harja [n=maharj@castor.utu.fi] has joined #go-nuts
08:12 -!- path__ [n=path@59.162.86.164] has joined #go-nuts
08:12 -!- Fl1pFl0p1 [n=FlipFlop@ip68-8-225-187.sd.sd.cox.net] has quit [Client
Quit]
08:12 -!- alt^255 [n=k@85.88.27.205] has joined #go-nuts
08:13 < octoploid> jdp: Use _ instead
08:13 -!- path__ [n=path@59.162.86.164] has quit [Client Quit]
08:13 -!- path__ [n=path@59.162.86.164] has joined #go-nuts
08:13 < jabb> http://gopaste.org/63bTP doesn't print anything unless I
uncomment the only commented line :P
08:14 -!- kizzo [n=kizzo@c-24-6-50-117.hsd1.ca.comcast.net] has left #go-nuts []
08:15 -!- vomjom [n=vomjom@99-157-248-71.lightspeed.stlsmo.sbcglobal.net] has
joined #go-nuts
08:15 -!- zum [n=jsykari@xdsl-83-150-88-4.nebulazone.fi] has joined #go-nuts
08:15 < jgoebel> your program is probably terminating before the routien
runes?
08:16 < jgoebel> not sure if that's possible
08:16 < jgoebel> jsut a guess
08:16 < jabb> infinite loop in the main function
08:17 < jabb> when it runs it just sits there
08:17 < jgoebel> ah i see
08:17 -!- Snert [n=achowe@puff.snert.com] has quit [Read error: 113 (No route to
host)]
08:17 < Gracenotes> jdp: you could edit src/cmd/gc/walk.c
08:17 < Gracenotes> find the if block that throws it and comment it out
08:18 < Gracenotes> of course, that will make your code incompatible with
other compilers
08:18 < Gracenotes> source file, not resultant binary.  the problem is that
_ doesn't work in all contexts
08:19 < Gracenotes> in my case, channel sends in expressions require an
expression, when you don't care about whether it was sent or not.  one way to work
around it is: if mychan <- val {}.  eh.
08:19 -!- assiss1 [n=assiss@219.143.144.229] has joined #go-nuts
08:19 -!- assiss [n=assiss@219.143.144.229] has quit [Read error: 104 (Connection
reset by peer)]
08:21 -!- kaigan|work
[n=kaigan@c-8290e255.1411-10-64736c14.cust.bredbandsbolaget.se] has joined
#go-nuts
08:22 < Gracenotes> _ is a good idea regardless
08:22 < Gracenotes> wha, it's so late already
08:23 -!- Yuffster [n=yuffster@71.181.138.238] has joined #go-nuts
08:24 < Gracenotes> okay, so I've disabled all testing and crippled the
standard library.  but I'm not done yet!  there is work to be done!
08:25 -!- Kashia [n=Kashia@port-92-200-27-151.dynamic.qsc.de] has joined #go-nuts
08:28 -!- voluspa [n=voluspa@x-134-84-102-227.reshalls.umn.edu] has quit [Read
error: 113 (No route to host)]
08:29 -!- stepnem [n=stepnem@88.103.132.186] has joined #go-nuts
08:30 -!- path__ [n=path@59.162.86.164] has quit []
08:30 -!- fgb [n=fgb@190.246.85.45] has quit [Read error: 104 (Connection reset by
peer)]
08:32 -!- mainman__ [n=Adium@host247-200-dynamic.45-79-r.retail.telecomitalia.it]
has joined #go-nuts
08:34 -!- garbeam_ [n=arg@garbe.us] has joined #go-nuts
08:34 -!- mainman__ [n=Adium@host247-200-dynamic.45-79-r.retail.telecomitalia.it]
has quit [Client Quit]
08:35 -!- garbeam [n=arg@garbe.us] has quit [Read error: 104 (Connection reset by
peer)]
08:36 -!- bquinn [n=bquinn@office.velleman.com] has quit []
08:38 < KirkMcDonald> Awesome.  My command-line option parser's help
printing thingy is working.
08:39 -!- ajsharp [n=ajsharp@76.89.131.245] has quit []
08:40 -!- tedster [n=tedster@cpe-008051.dhcp008.wadsnet.net] has quit [Read error:
110 (Connection timed out)]
08:41 < alus> KirkMcDonald: example?
08:41 -!- dharman [n=dharman@extranet.i-m3d.com] has joined #go-nuts
08:42 < KirkMcDonald> alus: Ever use Python's optparse module?
08:42 < mitsuhiko> why doesn't go has pointer arrithmetics...
08:42 -!- alt^255 [n=k@85.88.27.205] has left #go-nuts []
08:42 < mitsuhiko> oldpos := slice - &b;
08:42 < mitsuhiko> what would be the go way to do that?
08:44 -!- Nanoo [n=Nano@95-89-198-15-dynip.superkabel.de] has joined #go-nuts
08:44 -!- Cameron` [n=Cameron@203-217-12-139.perm.iinet.net.au] has quit [Read
error: 110 (Connection timed out)]
08:45 -!- sjbrown [n=sjbrown@c-69-181-182-137.hsd1.ca.comcast.net] has joined
#go-nuts
08:46 -!- olleolleolle [n=olleolle@kali.hypergene.com] has left #go-nuts []
08:46 -!- jharrys [n=de043124@c-71-195-253-55.hsd1.ut.comcast.net] has quit
["Leaving."]
08:46 < alus> KirkMcDonald: only by mistake
08:47 -!- dibb [n=dibb@ashera.openend.se] has quit [Read error: 60 (Operation
timed out)]
08:48 < jgoebel> hmmm
08:48 < jgoebel> does my CC not work?
08:48 < jgoebel> i don't see my change on the dev mailing list
08:48 -!- defectiv [n=clays@c-24-5-65-40.hsd1.ca.comcast.net] has quit ["This
computer has gone to sleep"]
08:49 -!- dibb [n=dibb@ashera.openend.se] has joined #go-nuts
08:49 -!- bear [n=bear@c-71-230-97-250.hsd1.pa.comcast.net] has quit [Read error:
110 (Connection timed out)]
08:49 -!- bear [n=bear@c-71-230-97-250.hsd1.pa.comcast.net] has joined #go-nuts
08:51 -!- Sylvain_ [i=d4528311@gateway/web/freenode/x-kfpkjowljwpktede] has joined
#go-nuts
08:52 -!- ajsharp [n=ajsharp@76.89.131.245] has joined #go-nuts
08:52 < jdp> why don't variables declared outside of a for loop enter its
scope?
08:54 < jgoebel> they do in my experience
08:54 < ned> jdp, i think they do..
08:54 < jgoebel> paste?
08:54 -!- p0g0_ [n=pogo@unaffiliated/p0g0] has joined #go-nuts
08:56 -!- p0g0 [n=pogo@unaffiliated/p0g0] has quit [Read error: 113 (No route to
host)]
08:56 < jdp> whoops silly mistake
08:57 < jdp> but i do have another question, i see why this is technically
illegal
08:57 < jdp> erver.go:47: cannot use fmt.Sprintf("unexpected input: %c",
b[0]) (type string) as type os.ErrorString
08:58 < jdp> kinda silly that i have to jump through hoops to do stuff like
that
08:59 < olegfink> jdp: os.NewError(fmt.Sprintf(...))?
08:59 < jdp> yeah i found that eventually
08:59 < sfuentes> are semicolors ever needed aside from seperators in a list
and aside from loops?
08:59 < sfuentes> err semicolons
08:59 < jdp> but i was doing it in &io.Error
09:02 < KirkMcDonald> Hmm.  Weird.  I just had a compile error which went
away when I changed the order of the source files on the command-line.
09:02 < Gracenotes> hm, is it possible to copy a map?
09:02 < Gracenotes> in one fell swoop
09:16 -!- jwzn` [n=user@CPE001839f8e82b-CM0017ee6363de.cpe.net.cable.rogers.com]
has quit [Remote closed the connection]
09:17 -!- wcn [n=wcn@74.125.57.33] has quit []
09:18 -!- Boohbah is now known as cCeZXfiwSP
09:19 -!- cCeZXfiwSP is now known as Boohbah
09:20 -!- assiss1 [n=assiss@219.143.144.229] has left #go-nuts []
09:20 -!- garbeam [n=arg@garbe.us] has joined #go-nuts
09:20 -!- qcesarjr [n=qcesarjr@wsip-70-166-99-7.ph.ph.cox.net] has joined #go-nuts
09:21 -!- qcesarjr [n=qcesarjr@wsip-70-166-99-7.ph.ph.cox.net] has quit [Client
Quit]
09:22 -!- XniX23 [n=XniX23@212.235.186.231] has joined #go-nuts
09:22 -!- qcesarjr [n=qcesarjr@wsip-70-166-99-7.ph.ph.cox.net] has joined #go-nuts
09:25 -!- qcesarjr [n=qcesarjr@wsip-70-166-99-7.ph.ph.cox.net] has left #go-nuts
[]
09:25 -!- garbeam_ [n=arg@garbe.us] has quit [Read error: 104 (Connection reset by
peer)]
09:26 < jgoebel> hmmm
09:26 < jgoebel> http://github.com/kuroneko/gosqlite3
09:26 -!- path__ [n=path@59.162.86.164] has joined #go-nuts
09:26 -!- ineol [n=hal@mar75-9-88-171-191-168.fbx.proxad.net] has quit []
09:35 ,--[QueryResume]
09:35 | 08:06 -!- CallToPower [n=CallToPo@87.106.78.92] has quit [Connection reset
by peer]
09:35 | 08:06 -!- daganev [n=daganev@adsl-99-32-245-41.dsl.lsan03.sbcglobal.net]
has quit [Read error: 131 (Connection reset by peer)]
09:35 | 08:06 -!- jgoebel [n=jgoebel@96-28-100-3.dhcp.insightbb.com] has quit
[Read error: 131 (Connection reset by peer)]
09:35 | 08:06 -!- zeebo- [n=zeebo-@74.110.97.28] has quit [Connection timed out]
09:35 | 08:06 -!- _CallToPower [n=CallToPo@s15229144.onlinehome-server.info] has
joined #go-nuts
09:35 | 08:06 -!- jsgotangco [n=JSG@ubuntu/member/jsgotangco] has quit ["Ciao"]
09:35 | 08:06 -!- Yuffster [n=yuffster@71.181.138.238] has quit [Remote closed the
connection]
09:35 | 08:06 -!- harja [n=maharj@130.232.203.196] has quit [Connection timed out]
09:35 | 08:07 -!- kizzo [n=kizzo@24.6.50.117] has quit [Read error: 145
(Connection timed out)]
09:35 | 08:07 -!- tyler_wylie [n=tyler@fedora/tyler-wylie] has quit [Connection
timed out]
09:35 | 08:07 -!- triplez [n=triplez@218.212.225.52] has quit [Connection timed
out]
09:35 | 08:07 -!- triplez_ [n=triplez@cm52.sigma225.maxonline.com.sg] has joined
#go-nuts
09:35 | 08:07 -!- General13372 [n=support@71.84.247.187] has quit [SendQ exceeded]
09:35 | 08:07 -!- emptypointer [n=chatzill@p5084AA7C.dip0.t-ipconnect.de] has quit
["ChatZilla 0.9.85 [Iceweasel 3.0.9/2009042807]"]
09:35 | 08:07 -!- vomjom [n=vomjom@99-157-248-71.lightspeed.stlsmo.sbcglobal.net]
has quit [Read error: 145 (Connection timed out)]
09:35 | 08:07 -!- directrixx [n=directri@ip68-231-189-247.tc.ph.cox.net] has quit
[Connection timed out]
09:35 | 08:07 -!- riot [n=wntrmut@137.226.147.251] has quit [SendQ exceeded]
09:35 | 08:07 -!- triplez_ is now known as triplez
09:35 | 08:07 -!- mejja
[n=user@c-49b6e555.023-82-73746f38.cust.bredbandsbolaget.se] has joined #go-nuts
09:35 | 08:07 -!- paulca [n=paul@89.100.39.244] has quit []
09:35 | 08:07 -!- daganev [n=daganev@99.32.245.41] has joined #go-nuts
09:35 | 08:07 -!- Cameron [n=Cameron@203.217.12.139] has quit [Connection timed
out]
09:35 | 08:08 -!- jgoebel [n=jgoebel@96-28-100-3.dhcp.insightbb.com] has joined
#go-nuts
09:35 | 08:08 -!- zum [n=jsykari@xdsl-83-150-88-4.nebulazone.fi] has quit
[Connection timed out]
09:35 | 08:09 -!- kizzo_ [n=kizzo@c-24-6-50-117.hsd1.ca.comcast.net] has quit
[Client Quit]
09:35 | 08:09 < jdp> is there any way to disable compile failures when a
variable is declared but not used
09:35 | 08:09 -!- kizzo [n=kizzo@c-24-6-50-117.hsd1.ca.comcast.net] has joined
#go-nuts
09:35 | 08:10 < jdp> makes testing piece by piece hard if the whole thing
has to be implemented
09:35 | 08:10 -!- harja [n=maharj@castor.utu.fi] has joined #go-nuts
09:35 | 08:12 -!- path__ [n=path@59.162.86.164] has joined #go-nuts
09:35 | 08:12 -!- Fl1pFl0p1 [n=FlipFlop@ip68-8-225-187.sd.sd.cox.net] has quit
[Client Quit]
09:35 | 08:12 -!- alt^255 [n=k@85.88.27.205] has joined #go-nuts
09:35 | 08:13 < octoploid> jdp: Use _ instead
09:35 | 08:13 -!- path__ [n=path@59.162.86.164] has quit [Client Quit]
09:35 | 08:13 -!- path__ [n=path@59.162.86.164] has joined #go-nuts
09:35 | 08:13 < jabb> http://gopaste.org/63bTP doesn't print anything unless
I uncomment the only commented line :P
09:35 | 08:14 -!- kizzo [n=kizzo@c-24-6-50-117.hsd1.ca.comcast.net] has left
#go-nuts []
09:35 | 08:15 -!- vomjom [n=vomjom@99-157-248-71.lightspeed.stlsmo.sbcglobal.net]
has joined #go-nuts
09:35 | 08:15 -!- zum [n=jsykari@xdsl-83-150-88-4.nebulazone.fi] has joined
#go-nuts
09:35 | 08:15 < jgoebel> your program is probably terminating before the
routien runes?
09:35 | 08:16 < jgoebel> not sure if that's possible
09:35 | 08:16 < jgoebel> jsut a guess
09:35 | 08:16 < jabb> infinite loop in the main function
09:35 | 08:17 < jabb> when it runs it just sits there
09:35 | 08:17 < jgoebel> ah i see
09:35 | 08:17 -!- Snert [n=achowe@puff.snert.com] has quit [Read error: 113 (No
route to host)]
09:35 | 08:17 < Gracenotes> jdp: you could edit src/cmd/gc/walk.c
09:35 | 08:17 < Gracenotes> find the if block that throws it and comment it
out
09:35 | 08:18 < Gracenotes> of course, that will make your code incompatible
with other compilers
09:35 | 08:18 < Gracenotes> source file, not resultant binary.  the problem
is that _ doesn't work in all contexts
09:35 | 08:19 < Gracenotes> in my case, channel sends in expressions require
an expression, when you don't care about whether it was sent or not.  one way to
work around it is: if mychan <- val {}.  eh.
09:35 | 08:19 -!- assiss1 [n=assiss@219.143.144.229] has joined #go-nuts
09:35 | 08:19 -!- assiss [n=assiss@219.143.144.229] has quit [Read error: 104
(Connection reset by peer)]
09:35 | 08:21 -!- kaigan|work
[n=kaigan@c-8290e255.1411-10-64736c14.cust.bredbandsbolaget.se] has joined
#go-nuts
09:35 | 08:22 < Gracenotes> _ is a good idea regardless
09:35 | 08:22 < Gracenotes> wha, it's so late already
09:35 | 08:23 -!- Yuffster [n=yuffster@71.181.138.238] has joined #go-nuts
09:35 | 08:24 < Gracenotes> okay, so I've disabled all testing and crippled
the standard library.  but I'm not done yet!  there is work to be done!
09:35 | 08:25 -!- Kashia [n=Kashia@port-92-200-27-151.dynamic.qsc.de] has joined
#go-nuts
09:35 | 08:28 -!- voluspa [n=voluspa@x-134-84-102-227.reshalls.umn.edu] has quit
[Read error: 113 (No route to host)]
09:35 | 08:29 -!- stepnem [n=stepnem@88.103.132.186] has joined #go-nuts
09:35 | 08:30 -!- path__ [n=path@59.162.86.164] has quit []
09:35 | 08:30 -!- fgb [n=fgb@190.246.85.45] has quit [Read error: 104 (Connection
reset by peer)]
09:35 | 08:32 -!- mainman__
[n=Adium@host247-200-dynamic.45-79-r.retail.telecomitalia.it] has joined #go-nuts
09:35 | 08:34 -!- garbeam_ [n=arg@garbe.us] has joined #go-nuts
09:35 | 08:34 -!- mainman__
[n=Adium@host247-200-dynamic.45-79-r.retail.telecomitalia.it] has quit [Client
Quit]
09:35 | 08:35 -!- garbeam [n=arg@garbe.us] has quit [Read error: 104 (Connection
reset by peer)]
09:35 | 08:36 -!- bquinn [n=bquinn@office.velleman.com] has quit []
09:35 | 08:38 < KirkMcDonald> Awesome.  My command-line option parser's help
printing thingy is working.
09:35 | 08:39 -!- ajsharp [n=ajsharp@76.89.131.245] has quit []
09:35 | 08:40 -!- tedster [n=tedster@cpe-008051.dhcp008.wadsnet.net] has quit
[Read error: 110 (Connection timed out)]
09:35 | 08:41 < alus> KirkMcDonald: example?
09:35 | 08:41 -!- dharman [n=dharman@extranet.i-m3d.com] has joined #go-nuts
09:35 | 08:42 < KirkMcDonald> alus: Ever use Python's optparse module?
09:35 | 08:42 < mitsuhiko> why doesn't go has pointer arrithmetics...
09:35 | 08:42 -!- alt^255 [n=k@85.88.27.205] has left #go-nuts []
09:35 | 08:42 < mitsuhiko> oldpos := slice - &b;
09:35 | 08:42 < mitsuhiko> what would be the go way to do that?
09:35 | 08:44 -!- Nanoo [n=Nano@95-89-198-15-dynip.superkabel.de] has joined
#go-nuts
09:35 | 08:44 -!- Cameron` [n=Cameron@203-217-12-139.perm.iinet.net.au] has quit
[Read error: 110 (Connection timed out)]
09:35 | 08:45 -!- sjbrown [n=sjbrown@c-69-181-182-137.hsd1.ca.comcast.net] has
joined #go-nuts
09:35 | 08:46 -!- olleolleolle [n=olleolle@kali.hypergene.com] has left #go-nuts
[]
09:35 | 08:46 -!- jharrys [n=de043124@c-71-195-253-55.hsd1.ut.comcast.net] has
quit ["Leaving."]
09:35 | 08:46 < alus> KirkMcDonald: only by mistake
09:35 | 08:47 -!- dibb [n=dibb@ashera.openend.se] has quit [Read error: 60
(Operation timed out)]
09:35 | 08:48 < jgoebel> hmmm
09:35 | 08:48 < jgoebel> does my CC not work?
09:35 | 08:48 < jgoebel> i don't see my change on the dev mailing list
09:35 | 08:48 -!- defectiv [n=clays@c-24-5-65-40.hsd1.ca.comcast.net] has quit
["This computer has gone to sleep"]
09:35 | 08:49 -!- dibb [n=dibb@ashera.openend.se] has joined #go-nuts
09:35 | 08:49 -!- bear [n=bear@c-71-230-97-250.hsd1.pa.comcast.net] has quit [Read
error: 110 (Connection timed out)]
09:35 | 08:49 -!- bear [n=bear@c-71-230-97-250.hsd1.pa.comcast.net] has joined
#go-nuts
09:35 | 08:51 -!- Sylvain_ [i=d4528311@gateway/web/freenode/x-kfpkjowljwpktede]
has joined #go-nuts
09:35 | 08:52 -!- ajsharp [n=ajsharp@76.89.131.245] has joined #go-nuts
09:35 | 08:52 < jdp> why don't variables declared outside of a for loop
enter its scope?
09:35 | 08:54 < jgoebel> they do in my experience
09:35 | 08:54 < ned> jdp, i think they do..
09:35 | 08:54 < jgoebel> paste?
09:35 | 08:54 -!- p0g0_ [n=pogo@unaffiliated/p0g0] has joined #go-nuts
09:35 | 08:56 -!- p0g0 [n=pogo@unaffiliated/p0g0] has quit [Read error: 113 (No
route to host)]
09:35 | 08:56 < jdp> whoops silly mistake
09:35 | 08:57 < jdp> but i do have another question, i see why this is
technically illegal
09:35 | 08:57 < jdp> erver.go:47: cannot use fmt.Sprintf("unexpected input:
%c", b[0]) (type string) as type os.ErrorString
09:35 | 08:58 < jdp> kinda silly that i have to jump through hoops to do
stuff like that
09:35 | 08:59 < olegfink> jdp: os.NewError(fmt.Sprintf(...))?
09:35 | 08:59 < jdp> yeah i found that eventually
09:35 | 08:59 < sfuentes> are semicolors ever needed aside from seperators
in a list and aside from loops?
09:35 | 08:59 < sfuentes> err semicolons
09:35 | 08:59 < jdp> but i was doing it in &io.Error
09:35 | 09:02 < KirkMcDonald> Hmm.  Weird.  I just had a compile error which
went away when I changed the order of the source files on the command-line.
09:35 | 09:02 < Gracenotes> hm, is it possible to copy a map?
09:35 | 09:02 < Gracenotes> in one fell swoop
09:35 | 09:16 -!- jwzn`
[n=user@CPE001839f8e82b-CM0017ee6363de.cpe.net.cable.rogers.com] has quit [Remote
closed the connection]
09:35 | 09:17 -!- wcn [n=wcn@74.125.57.33] has quit []
09:35 | 09:18 -!- Boohbah is now known as cCeZXfiwSP
09:35 | 09:19 -!- cCeZXfiwSP is now known as Boohbah
09:35 | 09:20 -!- assiss1 [n=assiss@219.143.144.229] has left #go-nuts []
09:35 | 09:20 -!- garbeam [n=arg@garbe.us] has joined #go-nuts
09:35 | 09:20 -!- qcesarjr [n=qcesarjr@wsip-70-166-99-7.ph.ph.cox.net] has joined
#go-nuts
09:35 | 09:21 -!- qcesarjr [n=qcesarjr@wsip-70-166-99-7.ph.ph.cox.net] has quit
[Client Quit]
09:35 | 09:22 -!- XniX23 [n=XniX23@212.235.186.231] has joined #go-nuts
09:35 | 09:22 -!- qcesarjr [n=qcesarjr@wsip-70-166-99-7.ph.ph.cox.net] has joined
#go-nuts
09:35 | 09:25 -!- qcesarjr [n=qcesarjr@wsip-70-166-99-7.ph.ph.cox.net] has left
#go-nuts []
09:35 | 09:25 -!- garbeam_ [n=arg@garbe.us] has quit [Read error: 104 (Connection
reset by peer)]
09:35 | 09:26 < jgoebel> hmmm
09:35 | 09:26 < jgoebel> http://github.com/kuroneko/gosqlite3
09:35 | 09:26 -!- path__ [n=path@59.162.86.164] has joined #go-nuts
09:35 | 09:26 -!- ineol [n=hal@mar75-9-88-171-191-168.fbx.proxad.net] has quit []
09:35 `--<~/irclogs/freenode/#go-nuts.log>->
09:35 -!- uriel [n=uriel@li43-28.members.linode.com] has joined #go-nuts
09:35 -!- Topic for #go-nuts: Go: http://golang.org | Bug tracker:
http://code.google.com/p/go/issues/list |
http://code.google.com/p/go/wiki/CommonProblems | Please use a pastebin (like
pastebin.com) and include all context when reporting errors
09:35 -!- Topic set by rsc9 [] [Wed Nov 11 09:21:42 2009]
09:35 [Users #go-nuts]
09:35 [+danderson ] [ ct ] [ Guest34451 ] [ kolmodin ] [ pbunbun ] [ ssantino ]
09:35 [+iant ] [ cworth ] [ Gussi ] [ korfuri ] [ Perberos ] [ ssb ]
09:35 [ [k2]_ ] [ cyt ] [ h4xOr ] [ kota1111 ] [ Peter` ] [ sstangl ]
09:35 [ __ed ] [ daganev ] [ hagna ] [ KragenSitaker] [ philips ] [ StDan ]
09:35 [ __gilles ] [ dagle2 ] [ halfdan_ ] [ kridian ] [ pierron ] [ stepnem ]
09:35 [ _CallToPower ] [ darjeeling ] [ hallsa ] [ kuroneko ] [ Pilate ] [ strlen
]
09:35 [ abbyz ] [ dD0T ] [ harja ] [ laprice ] [ pilt ] [ svanlund ]
09:35 [ absurdh ] [ dejones ] [ Hertta ] [ lbrandy_ ] [ plux ] [ swetland ]
09:35 [ ac ] [ Demp ] [ hhg ] [ lenst ] [ poucet ] [ syd ]
09:35 [ adante ] [ deufrai ] [ highb ] [ lifeless ] [ pquerna ] [ Sylvain_ ]
09:35 [ ahf ] [ dg ] [ hnaz ] [ lmoura ] [ praetorian ] [ synx` ]
09:35 [ aidecoe ] [ dharman ] [ Hofanoff ] [ lolsuper_ ] [ prip ] [ t5vaha01 ]
09:35 [ ajhager ] [ dho ] [ homa_ran1 ] [ Lorthirk ] [ ptrb ] [ taaz ]
09:35 [ ajray-away ] [ diatribes ] [ Hong_MinHee ] [ lstoll ] [ purefusion ] [
tabo ]
09:35 [ akheron ] [ dibb ] [ hoodow ] [ luca__ ] [ quag ] [ taybin ]
09:35 [ alamar ] [ dj_ryan ] [ hooopy ] [ luca_work_ ] [ raphael ] [ tc ]
09:35 [ alexf ] [ DJCapelis ] [ hstimer ] [ m-takagi ] [ rbancroft ] [ teedex ]
09:35 [ alexsuraci ] [ dobre_zlo ] [ huf ] [ Maddas ] [ reppie ] [ TenOfTen ]
09:35 [ Altercation ] [ DotMethod ] [ hyn ] [ madmoose ] [ rhc ] [ tetha ]
09:35 [ alus ] [ doublec ] [ Ian_Daniher ] [ magglass1 ] [ rickard ] [ tgall_foo ]
09:35 [ Amaranth ] [ dpb ] [ icy ] [ maruel ] [ Rint ] [ The_Ball ]
09:35 [ AmirMohammad ] [ Dreamer3 ] [ igfud ] [ mat_ ] [ Rob_Russell] [ TheL ]
09:35 [ amro ] [ drhodes ] [ igorgue ] [ mbt ] [ Robdgreat ] [ tokuhiro_______]
09:35 [ andern ] [ droid0011 ] [ imbrandon ] [ me___ ] [ robot12 ] [ tomaw_ ]
09:35 [ andoma ] [ drry ] [ impl ] [ mejja ] [ rob| ] [ triddell ]
09:35 [ andresambrois] [ dsp_ ] [ inittab- ] [ melba ] [ rog ] [ triplez ]
09:35 [ antarus ] [ dsuch ] [ Innominate ] [ ment_ ] [ rogue780 ] [ tromp_ ]
09:35 [ anticw ] [ dwery ] [ insane_coder] [ mfb ] [ RooTer ] [ trutkin ]
09:35 [ Anusko ] [ ector ] [ int-e ] [ michaelh ] [ roto ] [ tsavola ]
09:35 [ ArekZB ] [ eek ] [ interskh ] [ mikejs ] [ rthc ] [ turutosiya ]
09:35 [ arun ] [ Egelmex ] [ ironfroggy_ ] [ mizai ] [ rullie ] [ tyler_wy1ie ]
09:35 [ AryehGregor ] [ eharmon ] [ islands ] [ mjard ] [ rup ] [ u4ia ]
09:35 [ atsampson ] [ eiro ] [ itrekkie ] [ mjburgess ] [ s_mosher ] [ uriel ]
09:35 [ awalton ] [ elmarco ] [ jabb ] [ mncaudill ] [ saati_ ] [ uxp ]
09:35 [ axisys ] [ emit ] [ JAH ] [ monkfish ] [ sahazel ] [ vegai ]
09:35 [ bakkdoor ] [ enigmus ] [ jaska^ ] [ monteslu ] [ sanooj ] [ vegard ]
09:35 [ Bao ] [ eno ] [ jaxdahl ] [ mow ] [ savy ] [ vmac ]
09:35 [ bartwe ] [ ephoenix ] [ jb55 ] [ mpl ] [ scandal ] [ vomjom ]
09:35 [ bear ] [ Eridius ] [ JBdiGriz ] [ mpurcell ] [ scoopr ] [ vsmatck ]
09:35 [ beneth` ] [ erikd ] [ JBeshir ] [ mrd` ] [ scyth ] [ vt100 ]
09:35 [ bengl ] [ Esmil ] [ jepler ] [ mrmg ] [ sdier ] [ vt3 ]
09:35 [ bentley` ] [ evilhackerdude] [ Jerub ] [ msw ] [ seank ] [ vz ]
09:35 [ bj_990 ] [ exch ] [ jessta ] [ mtz ] [ segy ] [ werdan7 ]
09:35 [ bjarneh ] [ exDM69 ] [ jgoebel ] [ MX80 ] [ senneth ] [ Wezz6400_ ]
09:35 [ bluemoon ] [ Exstatica ] [ jiing_ ] [ mxcl ] [ serdar_ ] [ whiteley ]
09:35 [ BlueT_ ] [ eydaimon ] [ jlouis ] [ mycroftiv ] [ sfuentes ] [ Whtiger ]
09:35 [ BMeph ] [ Eytre ] [ jnwhiteh ] [ Nanoo ] [ shachaf ] [ Wi11 ]
09:35 [ bockmabe_ ] [ F1sh ] [ jobias ] [ nathanielk ] [ shambler ] [ wifs ]
09:35 [ bombuzal ] [ facemelter ] [ johncylee ] [ nbaum ] [ shardz ] [ wiretapped
]
09:35 [ Boohbah ] [ feenode ] [ JoLeClodo ] [ ned ] [ shasbot ] [ wm_eddie ]
09:35 [ Borf ] [ felipe ] [ JoNaZ ] [ nickjohnson ] [ shatly ] [ wollw ]
09:35 [ brontide ] [ fhs_ ] [ Jooon ] [ niekie ] [ shawn ] [ wooden ]
09:35 [ bsod2 ] [ Fl1pFl0p ] [ josh ] [ nigeltao ] [ silvs ] [ woremacx ]
09:35 [ Bun ] [ ForLoop ] [ jshriver ] [ no_mind ] [ sjbrown ] [ x-ip ]
09:35 [ cagdas ] [ Fraeon ] [ jurg ] [ NoOneButMe ] [ skerner ] [ xid ]
09:35 [ category ] [ franksalim ] [ jvogel_ ] [ Norgg ] [ skyyy ] [ xjih78 ]
09:35 [ cbus ] [ Freeaqingme ] [ K6HX ] [ nsz ] [ sladegen ] [ XniX23 ]
09:35 [ CFlux ] [ freespace ] [ kaigan|work ] [ Null_ ] [ sliceofpi ] [ xorl ]
09:35 [ chickamade ] [ frodenius ] [ kampasky ] [ nullpo_ ] [ Smari ] [ Yappo_ ]
09:35 [ chipdude ] [ FxChiP ] [ Kashia ] [ octoploid ] [ smcq ] [ Ycros ]
09:35 [ Chris ] [ garbeam ] [ kayess_ ] [ offby1` ] [ Smergo ] [ Zarutian ]
09:35 [ chrome ] [ Garibaldi ] [ kcwu ] [ oklofok ] [ smooge ] [ zidoh ]
09:35 [ clip9_ ] [ gcarrier_ ] [ keishi ] [ olegfink ] [ snnd ] [ ztzg ]
09:35 [ Clooth ] [ General1337 ] [ kennyG_ ] [ ote ] [ Solver ] [ zum ]
09:35 [ cmatei ] [ gl ] [ kertak ] [ ozzloy ] [ Spaghettini] [ |jessica| ]
09:35 [ codemac ] [ Glao ] [ kichik|work ] [ p0g0_ ] [ spb ]
09:35 [ cpach ] [ gnibbler ] [ Killerkid ] [ pagenoare ] [ spiffytech ]
09:35 [ crakrjak ] [ gnomon ] [ kim__ ] [ Paradox924X ] [ spinout ]
09:35 [ crankyadmin ] [ gnuvince ] [ KiNgMaR ] [ path__ ] [ sr ]
09:35 [ creack ] [ Gracenotes ] [ KirkMcDonald] [ paulproteus ] [ SRabbelier ]
09:35 -!- Irssi: #go-nuts: Total of 415 nicks [0 ops, 0 halfops, 2 voices, 413
normal]
09:35 -!- lazzurs [n=lazzurs@77.74.198.235] has joined #go-nuts
09:35 -!- trickie [n=trickie@94.100.112.225] has joined #go-nuts
09:35 -!- blasdelf [n=fred@c-76-104-181-225.hsd1.wa.comcast.net] has joined
#go-nuts
09:35 -!- Gynvael [n=gynvael@static-87-105-185-61.ssp.dialog.net.pl] has joined
#go-nuts
09:35 -!- Channel #go-nuts created Mon Nov 9 18:22:37 2009
09:35 -!- spook327 [n=RevSpook@173-20-203-218.client.mchsi.com] has joined
#go-nuts
09:36 -!- djm [n=djm@paludis/slacker/djm] has joined #go-nuts
09:36 -!- sjbrown [n=sjbrown@c-69-181-182-137.hsd1.ca.comcast.net] has quit [Read
error: 110 (Connection timed out)]
09:36 < jgoebel> weird
09:36 < jgoebel> i had to build it by hand and copy it tehre
09:36 < jgoebel> does all.bash not do that?
09:36 -!- Irssi: Join to #go-nuts was synced in 55 secs
09:38 -!- kill-9 [n=kill-9@cpe-65-24-145-70.columbus.res.rr.com] has joined
#go-nuts
09:38 -!- rhelmer [n=rhelmer@adsl-69-107-65-242.dsl.pltn13.pacbell.net] has joined
#go-nuts
09:38 -!- hipe [n=hipe@pool-74-108-181-155.nycmny.east.verizon.net] has joined
#go-nuts
09:39 -!- vcgomes [n=vcgomes@li17-238.members.linode.com] has joined #go-nuts
09:39 -!- trvbldn [n=trvbldn@c-98-218-95-154.hsd1.dc.comcast.net] has joined
#go-nuts
09:39 -!- ivan` [n=ivan@unaffiliated/ivan/x-000001] has joined #go-nuts
09:39 -!- andoma [n=andoma@194.48.213.8] has left #go-nuts []
09:39 -!- kjk [n=Adium@67.215.69.74] has joined #go-nuts
09:39 -!- prefrontal [n=prefront@mist.colorado.edu] has joined #go-nuts
09:39 -!- mitsuhiko [n=mitsuhik@ubuntu/member/mitsuhiko] has joined #go-nuts
09:39 -!- dstien [n=daniel@89.236.202.84.customer.cdi.no] has joined #go-nuts
09:39 -!- Zaba [n=zaba@ip102.148.adsl.wplus.ru] has joined #go-nuts
09:39 -!- zilt [n=aking@74.210.120.119] has joined #go-nuts
09:40 -!- chickamade [n=chickama@222.254.12.228] has quit ["Leaving"]
09:40 -!- existsec [n=existsec@yosemite.yosemite.edu] has joined #go-nuts
09:40 -!- UKRep547 [n=jcricket@pirosa01.vm.bytemark.co.uk] has joined #go-nuts
09:40 -!- bthomson [n=bthomson@pool-71-114-74-245.washdc.dsl-w.verizon.net] has
joined #go-nuts
09:40 -!- yiyus [i=12427124@je.je.je] has joined #go-nuts
09:40 -!- Yuffster [n=yuffster@71.181.138.238] has joined #go-nuts
09:40 -!- existsec_ [n=existsec@76-228-31-64.lightspeed.frokca.sbcglobal.net] has
joined #go-nuts
09:40 -!- mfilenko [n=decoy@ns1.ukr.ua] has joined #go-nuts
09:41 -!- nickgibbon [n=nring@210.8.201.244] has joined #go-nuts
09:41 -!- Raziel2p [n=Raziel2p@ti0032a380-dhcp0316.bb.online.no] has joined
#go-nuts
09:41 -!- jimi_hendrix [n=jimi_hen@unaffiliated/jimihendrix] has joined #go-nuts
09:41 -!- jdp [n=justin@ool-435238c0.dyn.optonline.net] has joined #go-nuts
09:41 -!- clearscreen [n=clearscr@e248070.upc-e.chello.nl] has joined #go-nuts
09:41 -!- andguent [n=andguent@qcx.be] has joined #go-nuts
09:41 -!- cgibreak [n=cgibreak@pool-71-171-137-50.chi01.dsl-w.verizon.net] has
joined #go-nuts
09:42 -!- redondos [n=nnnnnred@twat.com.ar] has joined #go-nuts
09:42 -!- mitsuhiko [n=mitsuhik@ubuntu/member/mitsuhiko] has quit [Excess Flood]
09:42 -!- assiss [n=assiss@219.143.144.229] has joined #go-nuts
09:43 -!- mitsuhiko [n=mitsuhik@ubuntu/member/mitsuhiko] has joined #go-nuts
09:45 -!- XniX23 [n=XniX23@212.235.186.231] has left #go-nuts []
09:45 -!- Snert [n=achowe@puff.snert.com] has joined #go-nuts
09:46 < jdp> when you call Read on net.Conn, even if the buffer is really
big (say 25k bytes)
09:46 < jdp> will it try to fill it all in one shot?
09:46 < jdp> or do you have to loop the calls to Read in chunks
09:47 < amro> jdp: it works like other socket reads, it reads as much as it
can into the buffer.  it returns how many bytes it read
09:48 < amro> jdp: you still need to loop the read to make sure you get all
the data you're waiting for
09:48 < jdp> ok
09:48 < jdp> thanks
09:48 -!- asmo [n=asmo@c-f6c5e055.1155-1-64736c11.cust.bredbandsbolaget.se] has
joined #go-nuts
09:51 -!- kennyG_ [n=kenny@201.47.242.48.dynamic.adsl.gvt.net.br] has quit
["Leaving"]
09:52 -!- depood [n=depood@chello080108055214.19.11.vie.surfer.at] has joined
#go-nuts
09:54 -!- teedex [n=teedex@204.14.155.161] has quit [Remote closed the connection]
09:59 -!- soul9 [n=none@unaffiliated/johnnybuoy] has joined #go-nuts
10:00 -!- zhaozhou [n=zhaozhou@linfast76.bitnet.nu] has joined #go-nuts
10:01 -!- offby1` [n=user@q-static-138-125.avvanta.com] has quit [Read error: 60
(Operation timed out)]
10:01 -!- kmc [n=keegan@206-71-236-70.c3-0.nyw-ubr5.nyr-nyw.ny.cable.rcn.com] has
joined #go-nuts
10:03 < Gracenotes> hey.  I got the IRC Go-evaluating bot working, and I
think reasonably secure.  I'll run it in a few hours..  gotta get some sleep -_-
10:03 -!- chickamade [n=chickama@222.254.12.228] has joined #go-nuts
10:05 < Gracenotes> I think it helps that there's only one place import
statements are allowed, so "bad" functionality can be excluded by not importing
things.  (also by other, messier, means.) of course, if I'm wrong about this,
that's a problem, but I've taken other measures
10:07 < uriel> Gracenotes: awesome
10:07 < uriel> Gracenotes: link to source (of the irc bot)
10:07 < uriel> ?
10:07 -!- garbeam [n=arg@garbe.us] has quit [Read error: 104 (Connection reset by
peer)]
10:08 -!- garbeam [n=arg@garbe.us] has joined #go-nuts
10:09 < chickamade> I've got a gay bug here http://gopaste.org/k6Kqw#LC182
10:09 < vegai> whoa, I'm smarter than Anselm Garbe :P
10:09 < chickamade> prints out an infinte stream of 999999...
10:09 < vegai> (in a very specific way)
10:09 < jgoebel> sqlite3.cgo1.go:64: cannot use
_C_sqlite3_total_changes(h.cptr) (type _C_int) as type int in return argument
10:09 < jgoebel> anyone know how to do the right typecasting here?
10:10 < uriel> vegai: why?  because you didn't get trolled by the anti-null
zealots?
10:10 < chickamade> the caller is at line 207 and pass the correct argument
http://gopaste.org/k6Kqw#LC207
10:10 < vegai> uriel: :)
10:10 < chickamade> but the callee gets a very strange int argument
10:11 < Gracenotes> uriel: sure :) just a sec
10:11 -!- Kashia [n=Kashia@port-92-200-27-151.dynamic.qsc.de] has quit ["This
computer has gone to sleep"]
10:12 -!- paulca [n=paul@dsl-193-043.cust.imagine.ie] has joined #go-nuts
10:12 < chickamade> anyone got a couple of seconds to reproduce?
10:12 < jgoebel> anyone here know anything about cgo?
10:15 < jgoebel> where does import "C" come from?
10:15 -!- Snert [n=achowe@puff.snert.com] has quit ["ChatZilla 0.9.85 [Firefox
3.5.5/20091102152451]"]
10:16 -!- Snert [n=achowe@puff.snert.com] has joined #go-nuts
10:16 < nbaum> I don't understand the quesiton.
10:16 -!- mitchellh [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has joined
#go-nuts
10:16 < nbaum> Question.
10:16 -!- kertak [n=kertak@78.233.124.158] has quit [Client Quit]
10:17 -!- CoconutCrab [n=toor@unaffiliated/coconutcrab] has joined #go-nuts
10:17 -!- asmo [n=asmo@c-f6c5e055.1155-1-64736c11.cust.bredbandsbolaget.se] has
quit [Remote closed the connection]
10:19 -!- kayess__ [n=kayess@ppp-124-121-168-120.revip2.asianet.co.th] has joined
#go-nuts
10:20 < chickamade> doh I figure it out
10:20 -!- kayess_ [n=kayess@ppp-124-122-211-91.revip2.asianet.co.th] has quit
[Read error: 54 (Connection reset by peer)]
10:24 < uriel> Gracenotes: feel free to post a link to the source to
http://reddit.com/r/golang/
10:28 -!- crashR [n=crasher@codextreme.pck.nerim.net] has joined #go-nuts
10:28 -!- lenst [n=user@90-229-131-67-no52.tbcn.telia.com] has quit [Read error:
104 (Connection reset by peer)]
10:29 < poucet> How do you specify an argument to a function must satisfy
two interfaces?
10:29 < uriel> poucet: create a new interface that includes both interfaces,
and use that (I think)
10:31 < Gracenotes> uriel: know of any good readable pastebins?
10:31 < Gracenotes> anyway, hope this will do:
http://go.pastebin.com/m3464c811
10:31 <+danderson> Gracenotes: gopaste.org ? :)
10:32 < Gracenotes> the framework, thus far.  It's based on one I previously
did in Java, particularly the parsing, but I've changed the concurrency model to
reflect go's.
10:32 < Gracenotes> I've also implemented compiling/linking/running Go
programs inside Go programs, but haven't made that into a cohesive library
10:32 < uriel> poucet: http://golang.org/doc/effective_go.html#embedding
10:32 < poucet> uriel: ah thanks, been looking for embedding
10:33 < uriel> Gracenotes: gopaste.org, it rocks
10:33 < Gracenotes> or even module
10:33 -!- crankyadmin [n=crankyad@user-5af2599d.tcl121.dsl.pol.co.uk] has quit
[Read error: 104 (Connection reset by peer)]
10:34 < Gracenotes> eh.  well, feel free to take a look; I'll be back in a
few hours (sleep)
10:35 -!- _kayess [n=kayess@ppp-124-121-163-86.revip2.asianet.co.th] has joined
#go-nuts
10:35 < uriel> Gracenotes: see you
10:36 * uriel should sleep too
10:36 -!- rrr [i=rrr@gateway/gpg-tor/key-0x9230E18F] has joined #go-nuts
10:37 -!- turutosiya [n=turutosi@219.106.251.65] has quit [Remote closed the
connection]
10:37 -!- mitchellh [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has quit
["Leaving."]
10:39 -!- ironfroggy__ [n=calvin@64.129.84.194] has joined #go-nuts
10:40 -!- cagdas [n=chatzill@78.191.118.121] has left #go-nuts []
10:40 -!- afurlan [n=afurlan@scorpion.mps.com.br] has joined #go-nuts
10:40 < jgoebel> hmmm
10:40 < jgoebel> how can i init a new type but skip some of the fields?
10:41 -!- asmo [n=asmo@c83-248-96-173.bredband.comhem.se] has joined #go-nuts
10:41 < uriel> ?
10:41 < jgoebel> s = new(Statement{nil, h});
10:41 < jgoebel> type Statement struct {
10:41 < jgoebel> cptr *C.sqlite3_stmt;
10:41 < jgoebel> handle *Handle;
10:41 < jgoebel> i just want to set the handle
10:42 -!- kegie [i=kegie@stalin.acc.umu.se] has joined #go-nuts
10:43 -!- Lorthirk` [n=cm0901@109.114.32.70] has joined #go-nuts
10:44 < jgoebel> s = &Statement{handle: h};
10:44 < jgoebel> works
10:44 -!- darjeeling [n=dj@114.111.62.248] has quit [Read error: 54 (Connection
reset by peer)]
10:45 -!- kkb110 [n=kkb110@host133-16.student.udel.edu] has joined #go-nuts
10:46 < kkb110> can I use libraries such as wxWidget with go language?
10:46 < jgoebel> what language?
10:46 < kkb110> go
10:46 < jgoebel> you can link to other c libs with cgo
10:46 < kkb110> oh I see
10:46 < jgoebel> i'm doing that right now with sqlite )
10:47 -!- RayNbow [i=kirika@scientia.demon.nl] has joined #go-nuts
10:48 -!- darjeeling [n=dj@114.111.62.248] has joined #go-nuts
10:48 < nickjohnson> Can anyone suggest why this would use less than one CPU
even when started with GOMAXPROCS=4?  http://gist.github.com/236821
10:48 < nickjohnson> The relevant function is 'async2_move'
10:50 < kkb110> btw, I've read Faq but it's hard to see what's better than
using python or other simple scripting lanugages except speed
10:51 < nickjohnson> kkb110: You say that as if there's some sort of
absolute, objective scale of language 'goodness'
10:52 < kkb110> absolute..  objective scale of language??
10:52 < nickjohnson> Your statement implies there's some way to rank
languages from "best" to "worst" in an objective fashion
10:52 < nickjohnson> Which plainly isn't the case
10:53 < nickjohnson> Go has many differences to Python; for a large subset
of those, whether they make it 'better' or 'worse' is subjective
10:53 < crashR> kkb110: go is statically typed...  thats a crucial
difference
10:54 < kkb110> ok.  I've got one thing.  statically typed.  what else will
make some difference?
10:54 -!- assiss [n=assiss@219.143.144.229] has quit [Read error: 110 (Connection
timed out)]
10:54 -!- kayess__ [n=kayess@ppp-124-121-168-120.revip2.asianet.co.th] has quit
[Read error: 110 (Connection timed out)]
10:54 -!- __kayess [n=kayess@ppp-124-122-211-104.revip2.asianet.co.th] has joined
#go-nuts
10:55 < nickjohnson> Concurrency using goroutines and channels (Stackless
python has more or less the same, but you didn't specify Stackless)
10:55 < nickjohnson> Structural interfaces
10:55 < nickjohnson> And so forth.  I'm sure there's a list of features
somewhere.
10:56 < kkb110> ok hm..  do you know any url or document describes go's
feature?  (Faq isn't enough for me :( )
10:56 < nickjohnson> Have you read the tutorial and 'effective go'?
10:56 < kkb110> no
10:57 < nickjohnson> those would be good places to start
10:57 < nickjohnson> there's also the language spec
10:57 < chickamade> stackless's tasklets block and you can't select them
though
10:58 < chickamade> nickjohnson: just curious what game is that?
10:58 < kkb110> it seems it's the best way to learn go but...  I hope that
there is a document that describes what's new in go and what makes it different,
so that I can motivate myself to learn or not
10:59 < uriel> kkb110: did you watch Rob's presentation?
11:00 < nickjohnson> chickamade: It's a trivial connect 4 AI
11:00 < nickjohnson> chickamade: Created to test how well goroutines
schedule very small amounts of work :)
11:00 < kkb110> uriel: yeah I've found that but I can't see it now because
my roommate is sleeping lol I'll watch later
11:01 < uriel> headphones?
11:01 < kkb110> I don't have it now so..
11:01 < kkb110> :(
11:01 < crashR> btw..  is there any other dedicated websites about Go than
golang.org ?
11:01 < jgoebel> does cgo pull in constants to the local namespace somehow?
11:01 < uriel> crashR: http://go-lang.cat-v.org ...
11:01 < uriel> (there is also gopaste.org :))
11:02 -!- lenst [n=user@90-229-131-67-no52.tbcn.telia.com] has joined #go-nuts
11:02 < uriel> crashR: its barely been a week, I'm sure some will crop up...
there is also http://reddit.com/r/golang/
11:02 < crashR> thanks uriel..  !
11:03 < crashR> finding resources is difficult as the 'go' name isnt an
efficient keyword to search on google :)
11:03 < jgoebel> indeed
11:03 -!- raphael [n=rgb@did75-11-82-231-40-223.fbx.proxad.net] has quit
["leaving"]
11:03 -!- CoconutCrab [n=toor@unaffiliated/coconutcrab] has quit [Read error: 110
(Connection timed out)]
11:03 < uriel> crashR: http://go-lang.cat-v.org/go-search
11:03 < chickamade> nickjohnson: since your channel has buffer 7 it doesn't
block on send and the goroutine doesn't get muxed into another thread
11:04 < crashR> great uriel ! thank you !
11:04 < uriel> no problem
11:05 -!- cryptobeacon [n=irvin@unaffiliated/cryptobeacon] has joined #go-nuts
11:06 < nickjohnson> chickamade: Hm. Counterintuitive.  I set the buffer
because I didn't want the goroutines to wait on return
11:07 -!- Lorthirk [n=cm0901@109.112.51.123] has quit [Read error: 110 (Connection
timed out)]
11:07 < nickjohnson> I understand why it'd be the case in a non-preemptive
scheduler, but still, counterintuitive.  :)
11:08 -!- _kayess [n=kayess@ppp-124-121-163-86.revip2.asianet.co.th] has quit
[Connection timed out]
11:08 < chickamade> nickjohnson: you are doing it wrong though
11:08 < nickjohnson> chickamade: how so?
11:08 < chickamade> nickjohnson: go negamax_sync(*s, col, player, 6, ret);
11:09 < chickamade> modify that func to take a return channel
11:09 < chickamade> so that it is spawn in a different goroutine
11:09 < chickamade> right now you just calling it the same goroutine as
async_move2
11:10 < nickjohnson> 'ret' is a return channel
11:10 < nickjohnson> er, negamax_sync is _supposed_ to be synchronous.  :)
11:10 < nickjohnson> negamax_async takes a return channel and gets invoked
as a goroutine
11:11 -!- kayess [n=kayess@ppp-124-122-211-206.revip2.asianet.co.th] has joined
#go-nuts
11:11 < chickamade> wait you did do "go func()" outside nvm
11:13 -!- __kayess [n=kayess@ppp-124-122-211-104.revip2.asianet.co.th] has quit
[Read error: 60 (Operation timed out)]
11:13 < nickjohnson> A more trivial example - why does this take exactly the
same time with GOMAXPROCS=1 or 4?  http://pastebin.com/m50bc4aa5
11:14 < nickjohnson> (On a 4 core machine, naturally)
11:15 < exch> the loops may be optimized out as they are empty
11:15 -!- Zaba_ [n=zaba@about/goats/billygoat/zaba] has joined #go-nuts
11:15 < nickjohnson> exch: Nope, it takes time proportional to the size of
the loops
11:15 < exch> mm
11:15 < jgoebel> grrr
11:16 < nickjohnson> 15.0 seconds on my machine no matter how many procs.
It uses more CPU in top with GOMAXPROCS>1, though
11:16 < jgoebel> getting hung up on char * vs unsigned char *
11:16 < jgoebel> cgo likes one but not the other
11:16 < chickamade> nickjohnson: you might be interested in playing with
this http://github.com/aht/gosieve/, it's an much more efficient prime sieves than
the one from the tutorial
11:17 -!- CFlux [n=CFlux@pool-98-108-155-174.ptldor.fios.verizon.net] has quit
[Read error: 104 (Connection reset by peer)]
11:17 < nickjohnson> chickamade: I'd like to figure out why this parallel
program isn't, first.  :P
11:17 < nickjohnson> The trivial one, at least
11:17 < chickamade> nickjohnson: hmm I've got 0m22.179s vs 12.54r for
GOMAXPROCS=2
11:17 < nickjohnson> chickamade: Let me test it on another machine, then
11:17 < jgoebel> wish i knew more C
11:19 < asmo> can a channel have multiple writers?
11:19 < nickjohnson> asmo: yes
11:19 < nickjohnson> Oh, er, scratch my earlier.  I was misreading the
output.
11:19 < asmo> Implemented with lock or is it a lockless queue?
11:19 < nickjohnson> It always takes 15 cpu seconds, but wallclock seconds
scale as expected.  :P
11:20 * nickjohnson blames the difference between the 'time' command and the bash
builtin 'time' output
11:21 -!- kkb110 [n=kkb110@host133-16.student.udel.edu] has left #go-nuts []
11:22 -!- Fraeon [n=kzer-za@e212-246-65-153.elisa-laajakaista.fi] has quit [Read
error: 110 (Connection timed out)]
11:22 < nickjohnson> Hm. I still don't see any wall-clock improvement in my
original program, though
11:22 -!- Zaba [n=zaba@about/goats/billygoat/zaba] has quit [Read error: 110
(Connection timed out)]
11:22 -!- Fraeon [n=kzer-za@e212-246-65-153.elisa-laajakaista.fi] has joined
#go-nuts
11:22 -!- ikke [n=ikkibr@unaffiliated/ikkebr] has joined #go-nuts
11:22 < nickjohnson> And it's still using less than 1 CPU
11:24 < nickjohnson> eh, missed a buffer size on a channel
11:24 -!- Jan_Flanders [n=chatzill@d54C1E33B.access.telenet.be] has joined
#go-nuts
11:25 < jgoebel> sqlite3.cgo1.go:88: cannot use rv (type *_C_unsignedchar)
as type *_C_char in function argument anyone help?
11:25 < jgoebel> i'm sure this is something simple like typecasting
11:26 < jabb> you'll have to use unsafe.Pointer to convert to char*
11:26 < nickjohnson> Nope, still less than 1 CPU and worse wall-clock time
11:26 < jgoebel> jabb: can you show me what that might look like?
11:26 < jgoebel> return C.GoString(rv);
11:26 < jgoebel> is the code now
11:28 < jabb> http://gopaste.org/Z110s
11:28 < jabb> didn't test, but it looks similar to that
11:28 < jabb> (test what I just wrote to see if it compiles)
11:29 -!- vhold [n=vhold@adsl-67-114-158-146.dsl.sntc01.pacbell.net] has joined
#go-nuts
11:29 -!- ephoenix [n=phoenixl@cpe-66-108-194-2.nyc.res.rr.com] has quit [Remote
closed the connection]
11:31 -!- paulca [n=paul@dsl-193-043.cust.imagine.ie] has quit []
11:31 < jgoebel> can unsafe be used with "C" ?
11:31 < jgoebel> now my entire compile blows up with erally ugly errors
11:32 < jgoebel> "unsafe";
11:32 < jgoebel> gcc failed:
11:32 < jgoebel> <stdin>:6: error: 'sqlite3_column_count' undeclared
here (not in a function)
11:32 < jgoebel> cc1: warnings being treated as errors
11:33 < jgoebel> i think C imports it automatically somewhere down the line
11:33 < jgoebel> hmmm
11:33 < chickamade> nickjohnson: the game tree is different with
GOMAXPROCS>1
11:33 < jabb> got the idea from here:
http://github.com/banthar/Go-SDL/blob/master/sdl/sdl.go
11:34 < jabb> first place I saw it
11:34 < nickjohnson> chickamade: How so?
11:35 < nickjohnson> You mean the output is?
11:35 < jgoebel> ok progress
11:35 < chickamade> yeah
11:35 < nickjohnson> That shouldn't be...
11:35 < chickamade> nickjohnson: final score is 10019902 vs -20010001
11:35 < chickamade> the latter is multithreaded version
11:36 -!- bquinn [n=bquinn@nat/yahoo/x-zetmwcyrxvoubfuo] has joined #go-nuts
11:38 < nickjohnson> Hm, on my machine they're exactly identical
11:38 < chickamade> nickjohnson: and it spawned 2 threads on my computer
11:38 < nickjohnson> But then, I have modified it since I pasted
11:39 < nickjohnson> Updated: http://pastebin.com/m3da09b78
11:39 -!- jbauer [n=jbauer@adsl-99-176-8-19.dsl.lsan03.sbcglobal.net] has joined
#go-nuts
11:39 < jdp> what does interface{} mean, in the context of container/heap
11:40 < nickjohnson> Top doesn't tell me how many threads it has on this
box, but I'm fairly sure it's spawning 4, because other programs have used >1
CPU
11:40 < chickamade> jdp: means you can use it as a heap of anything (that
implements heap.Interface)
11:40 < jgoebel> hmmm
11:40 < jgoebel> well sure doesn't look like i'm geting data back :(
11:40 < jgoebel> now what am i doing wrong
11:41 < chickamade> nickjohnson: pressing H inside top show threads for me
11:41 -!- LaSaRuX [n=pedro@184.Red-83-50-170.dynamicIP.rima-tde.net] has joined
#go-nuts
11:41 < nickjohnson> chickamade: do you still get different results with the
latest code?
11:41 < chickamade> nickjohnson: and there's http://gopaste.com for better
paste!
11:41 < chickamade> nickjohnson: running it
11:42 < chickamade> damn ur AI is slow!
11:42 < nickjohnson> nickgibbon: neat
11:42 < jgoebel> bingo: return C.GoString((*C.char)(unsafe.Pointer(rv)));
11:42 < nickjohnson> 6 ply isn't trivial.  And it wasn't designed to be
fast.  No pruning or anything.  :P
11:42 < jgoebel> had to have just the right mix of * and unsafe and & :)
11:42 -!- stalled [n=411@89-178-47-76.broadband.corbina.ru] has joined #go-nuts
11:42 < chickamade> nickjohnson: still got different results
11:42 < jdp> hmm
11:42 -!- Sylvain_ [i=d4528311@gateway/web/freenode/x-kfpkjowljwpktede] has quit
[Ping timeout: 180 seconds]
11:43 < jdp> i'm trying to implement a priority queue, on top of the heap
interface
11:43 < jdp> this is what i have so far: http://www.gopaste.org/1q66n
11:43 < nickjohnson> okay, this is weird.  On my mac, I get different
results, and the threaded version is slightly faster but doesn't exceed 100% CPU
usage
11:43 < jdp> but i keep getting this error: msgqueue.go:36: x.Message
undefined (type interface { } has no field Message)
11:43 < nickjohnson> On my linux box, it gives the same results, but is
slower with n threads than 1
11:44 < nickjohnson> And I'll be damned if I can figure out why it should
give different results depending on the number of threads.  There oughtn't to be
any shared state in there
11:44 < nickjohnson> Hm, unless there are two different paths with equal
score at some point
11:45 -!- engla [n=ulrik@90-229-231-23-no153.tbcn.telia.com] has joined #go-nuts
11:47 < chickamade> jdp: see a PQ implementation here
http://github.com/aht/gosieve/blob/master/sieve2.go#L110
11:47 < Egelmex> nickjohnson: aparently if you are doing a lot of message
passing the speed will go down with number of "cores" due to the global lock
11:48 < nickjohnson> Looks like it - right at the very beginning
11:48 < chickamade> Egelmex: there's no global lock!
11:48 < nickjohnson> Egelmex: I expected that effect with the
massively-parallel version of the code, but not with the only-slightly-parallel
one
11:49 < alus> chickamade: goroutines are lockless?
11:49 -!- MrTopf [n=mrtopf@p5B397E4B.dip.t-dialin.net] has joined #go-nuts
11:49 < chickamade> nickjohnson: there're also a parallel spectral norm
implementation in $GOROOT/test/bench
11:49 < nickjohnson> spectral norm?
11:50 -!- sliceofpi1 [n=Adium@c-98-201-178-27.hsd1.tx.comcast.net] has joined
#go-nuts
11:50 -!- sliceofpi [n=Adium@c-98-201-178-27.hsd1.tx.comcast.net] has quit [Read
error: 104 (Connection reset by peer)]
11:51 < chickamade> alus: the way Egelmex was speaking reminds me of the
Python GIL
11:51 < nickjohnson> chickamade: I'm still puzzled why the current version
doesn't use more CPU and go faster as a result.  There's a substantial chunk of
work for each goroutine, and they're all independent
11:51 -!- rajeshsr [n=rajeshsr@59.92.26.181] has joined #go-nuts
11:52 < chickamade> did you fix the game tree to be deterministic?
11:52 < nickjohnson> Just testing that now
11:52 < Egelmex> chickamade: from what i understand, and it is all third
hand, it has somthing like the GIL
11:52 < nickjohnson> Yup, seems to have worked.
11:53 -!- cryptobeacon [n=irvin@unaffiliated/cryptobeacon] has quit ["leaving"]
11:53 < chickamade> Egelmex: no it doesn't!
11:53 < chickamade> Python has the GIL to make sure only one thread runs at
a time
11:54 < chickamade> Go programs are truly multiple threaded
11:54 < chickamade> nickjohnson: where's the code?
11:55 < nickjohnson> chickamade: http://gist.github.com/236821
11:55 -!- ctimmerm [n=ctimmerm@83.150.80.193] has joined #go-nuts
11:57 < nickjohnson> Hm, with threads on in top, I see 4 threads, each of
which consumes 25% of one CPU.  Weird.
12:00 -!- m-takagi is now known as m-takagi_
12:01 < Jerub> nickjohnson: sounds like i/o contention spread accross all
cpus
12:01 < nickjohnson> Jerub: There is no I/O.
12:05 -!- Cyprien [n=Cyprien@pub1.heig-vd.ch] has joined #go-nuts
12:05 -!- penguin42 [n=dg@tu006.demon.co.uk] has joined #go-nuts
12:06 < alus> without looking at the code, is the majority of the time spent
switching goroutines?
12:06 < alus> there could really be a global scheduler lock, which only
executes from one thread
12:07 < nickjohnson> alus: Not in the example I'm currently testing.  It
starts off 7 goroutines, each of which takes perhaps 500ms-1 second to execute
12:09 < alus> do you have real cores or HyperThreads?
12:09 [Users #go-nuts]
12:09 [+danderson ] [ cworth ] [ Gynvael ] [ kmc ] [ penguin42 ] [ SRabbelier ]
12:09 [+iant ] [ Cyprien ] [ h4xOr ] [ kolmodin ] [ Perberos ] [ ssantino ]
12:09 [ [k2]_ ] [ cyt ] [ hagna ] [ korfuri ] [ Peter` ] [ ssb ]
12:09 [ __ed ] [ daganev ] [ halfdan_ ] [ kota1111 ] [ philips ] [ sstangl ]
12:09 [ __gilles ] [ dagle2 ] [ hallsa ] [ KragenSitaker] [ pierron ] [ stalled ]
12:09 [ _CallToPower ] [ darjeeling ] [ harja ] [ kridian ] [ Pilate ] [ StDan ]
12:09 [ abbyz ] [ dD0T ] [ Hertta ] [ kuroneko ] [ pilt ] [ stepnem ]
12:09 [ absurdh ] [ dejones ] [ hhg ] [ laprice ] [ plux ] [ strlen ]
12:09 [ ac ] [ Demp ] [ highb ] [ LaSaRuX ] [ poucet ] [ svanlund ]
12:09 [ adante ] [ depood ] [ hipe ] [ lazzurs ] [ pquerna ] [ swetland ]
12:09 [ afurlan ] [ deufrai ] [ hnaz ] [ lbrandy_ ] [ praetorian ] [ syd ]
12:09 [ ahf ] [ dg ] [ Hofanoff ] [ lenst ] [ prefrontal ] [ synx` ]
12:09 [ aidecoe ] [ dharman ] [ homa_ran1 ] [ lifeless ] [ prip ] [ t5vaha01 ]
12:09 [ ajhager ] [ dho ] [ Hong_MinHee ] [ lmoura ] [ ptrb ] [ taaz ]
12:09 [ ajray-away ] [ diatribes ] [ hoodow ] [ lolsuper_ ] [ purefusion ] [ tabo
]
12:09 [ akheron ] [ dibb ] [ hooopy ] [ Lorthirk` ] [ quag ] [ taybin ]
12:09 [ alamar ] [ dj_ryan ] [ hstimer ] [ lstoll ] [ rajeshsr ] [ tc ]
12:09 [ alexf ] [ DJCapelis ] [ huf ] [ luca__ ] [ RayNbow ] [ TenOfTen ]
12:09 [ alexsuraci ] [ djm ] [ hyn ] [ luca_work_ ] [ Raziel2p ] [ tetha ]
12:09 [ Altercation ] [ dobre_zlo ] [ Ian_Daniher ] [ m-takagi_ ] [ rbancroft ] [
tgall_foo ]
12:09 [ alus ] [ DotMethod ] [ icy ] [ Maddas ] [ redondos ] [ The_Ball ]
12:09 [ Amaranth ] [ doublec ] [ igfud ] [ madmoose ] [ reppie ] [ TheL ]
12:09 [ AmirMohammad ] [ dpb ] [ igorgue ] [ magglass1 ] [ rhc ] [
tokuhiro_______]
12:09 [ amro ] [ Dreamer3 ] [ ikke ] [ maruel ] [ rhelmer ] [ tomaw_ ]
12:09 [ andern ] [ drhodes ] [ imbrandon ] [ mat_ ] [ rickard ] [ trickie ]
12:09 [ andguent ] [ droid0011 ] [ impl ] [ mbt ] [ Rint ] [ triddell ]
12:09 [ andresambrois] [ drry ] [ inittab- ] [ me___ ] [ Rob_Russell] [ triplez ]
12:09 [ antarus ] [ dsp_ ] [ Innominate ] [ mejja ] [ Robdgreat ] [ tromp_ ]
12:09 [ anticw ] [ dstien ] [ insane_coder] [ melba ] [ robot12 ] [ trutkin ]
12:09 [ Anusko ] [ dsuch ] [ int-e ] [ ment_ ] [ rob| ] [ trvbldn ]
12:09 [ ArekZB ] [ dwery ] [ interskh ] [ mfb ] [ rog ] [ tsavola ]
12:09 [ arun ] [ ector ] [ ironfroggy_ ] [ mfilenko ] [ rogue780 ] [ tyler_wy1ie ]
12:09 [ AryehGregor ] [ eek ] [ ironfroggy__] [ michaelh ] [ RooTer ] [ u4ia ]
12:09 [ asmo ] [ Egelmex ] [ islands ] [ mikejs ] [ roto ] [ UKRep547 ]
12:09 [ atsampson ] [ eharmon ] [ itrekkie ] [ mitsuhiko ] [ rrr ] [ uriel ]
12:09 [ awalton ] [ eiro ] [ ivan` ] [ mizai ] [ rthc ] [ uxp ]
12:09 [ axisys ] [ elmarco ] [ jabb ] [ mjard ] [ rullie ] [ vcgomes ]
12:09 [ bakkdoor ] [ emit ] [ JAH ] [ mjburgess ] [ rup ] [ vegai ]
12:09 [ Bao ] [ engla ] [ Jan_Flanders] [ mncaudill ] [ s_mosher ] [ vegard ]
12:09 [ bartwe ] [ enigmus ] [ jaska^ ] [ monkfish ] [ saati_ ] [ vhold ]
12:09 [ bear ] [ eno ] [ jaxdahl ] [ monteslu ] [ sahazel ] [ vmac ]
12:09 [ beneth` ] [ Eridius ] [ jb55 ] [ mow ] [ sanooj ] [ vomjom ]
12:09 [ bengl ] [ erikd ] [ jbauer ] [ mpl ] [ savy ] [ vsmatck ]
12:09 [ bentley` ] [ Esmil ] [ JBdiGriz ] [ mpurcell ] [ scandal ] [ vt100 ]
12:09 [ bj_990 ] [ evilhackerdude] [ JBeshir ] [ mrd` ] [ scoopr ] [ vt3 ]
12:09 [ bjarneh ] [ exch ] [ jdp ] [ mrmg ] [ scyth ] [ vz ]
12:09 [ blasdelf ] [ exDM69 ] [ jepler ] [ MrTopf ] [ sdier ] [ werdan7 ]
12:09 [ bluemoon ] [ existsec ] [ Jerub ] [ msw ] [ seank ] [ Wezz6400_ ]
12:09 [ BlueT_ ] [ existsec_ ] [ jessta ] [ mtz ] [ segy ] [ whiteley ]
12:09 [ BMeph ] [ Exstatica ] [ jgoebel ] [ MX80 ] [ senneth ] [ Whtiger ]
12:09 [ bockmabe_ ] [ eydaimon ] [ jiing_ ] [ mxcl ] [ serdar_ ] [ Wi11 ]
12:09 [ bombuzal ] [ Eytre ] [ jimi_hendrix] [ mycroftiv ] [ sfuentes ] [ wifs ]
12:09 [ Boohbah ] [ F1sh ] [ jlouis ] [ Nanoo ] [ shachaf ] [ wiretapped ]
12:09 [ Borf ] [ facemelter ] [ jnwhiteh ] [ nathanielk ] [ shambler ] [ wm_eddie
]
12:09 [ bquinn ] [ feenode ] [ jobias ] [ nbaum ] [ shardz ] [ wollw ]
12:09 [ brontide ] [ felipe ] [ johncylee ] [ ned ] [ shasbot ] [ wooden ]
12:09 [ bsod2 ] [ fhs_ ] [ JoLeClodo ] [ nickgibbon ] [ shatly ] [ woremacx ]
12:09 [ bthomson ] [ Fl1pFl0p ] [ JoNaZ ] [ nickjohnson ] [ shawn ] [ x-ip ]
12:09 [ Bun ] [ ForLoop ] [ Jooon ] [ niekie ] [ silvs ] [ xid ]
12:09 [ category ] [ Fraeon ] [ josh ] [ nigeltao ] [ skerner ] [ xjih78 ]
12:09 [ cbus ] [ franksalim ] [ jshriver ] [ no_mind ] [ skyyy ] [ xorl ]
12:09 [ cgibreak ] [ Freeaqingme ] [ jurg ] [ NoOneButMe ] [ sladegen ] [ Yappo_ ]
12:09 [ chickamade ] [ freespace ] [ jvogel_ ] [ Norgg ] [ sliceofpi1 ] [ Ycros ]
12:09 [ chipdude ] [ frodenius ] [ K6HX ] [ nsz ] [ Smari ] [ yiyus ]
12:09 [ Chris ] [ FxChiP ] [ kaigan|work ] [ Null_ ] [ smcq ] [ Yuffster ]
12:09 [ chrome ] [ garbeam ] [ kampasky ] [ nullpo_ ] [ Smergo ] [ Zaba_ ]
12:09 [ clearscreen ] [ Garibaldi ] [ kayess ] [ octoploid ] [ smooge ] [ Zarutian
]
12:09 [ clip9_ ] [ gcarrier_ ] [ kcwu ] [ oklofok ] [ Snert ] [ zhaozhou ]
12:09 [ Clooth ] [ General1337 ] [ kegie ] [ olegfink ] [ snnd ] [ zidoh ]
12:09 [ cmatei ] [ gl ] [ keishi ] [ ote ] [ Solver ] [ zilt ]
12:09 [ codemac ] [ Glao ] [ kichik|work ] [ ozzloy ] [ soul9 ] [ ztzg ]
12:09 [ cpach ] [ gnibbler ] [ kill-9 ] [ p0g0_ ] [ Spaghettini] [ zum ]
12:09 [ crakrjak ] [ gnomon ] [ Killerkid ] [ pagenoare ] [ spb ] [ |jessica| ]
12:09 [ crashR ] [ gnuvince ] [ kim__ ] [ Paradox924X ] [ spiffytech ]
12:09 [ creack ] [ Gracenotes ] [ KiNgMaR ] [ path__ ] [ spinout ]
12:09 [ ct ] [ Guest34451 ] [ KirkMcDonald] [ paulproteus ] [ spook327 ]
12:09 [ ctimmerm ] [ Gussi ] [ kjk ] [ pbunbun ] [ sr ]
12:09 -!- Irssi: #go-nuts: Total of 458 nicks [0 ops, 0 halfops, 2 voices, 456
normal]
12:09 < nickjohnson> real cores
12:09 < alus> hm.
12:11 < nickjohnson> Even weirder is that the same code shows a slight
improvement with more threads on my mac, and a slight degradation with more
threads on my linux box
12:11 < nickjohnson> In either case, without exceeding 1 CPU across all
threads
12:12 -!- jbauer [n=jbauer@adsl-99-176-8-19.dsl.lsan03.sbcglobal.net] has quit
[Remote closed the connection]
12:13 -!- Raziel2p [n=Raziel2p@ti0032a380-dhcp0316.bb.online.no] has quit [Client
Quit]
12:13 -!- plainhao [n=plainhao@mail.xbiotica.com] has joined #go-nuts
12:13 -!- Raziel2p [n=Raziel2p@ti0032a380-dhcp0316.bb.online.no] has joined
#go-nuts
12:14 -!- BMeph [n=black_me@65.103.151.24] has quit [Read error: 110 (Connection
timed out)]
12:14 < uriel> nickjohnson: have you tried comparing how it works on gccgo
vs gc?
12:14 < nickjohnson> uriel: I haven't tried out gccgo yet
12:15 -!- engla [n=ulrik@wikipedia/Sverdrup] has quit [Read error: 145 (Connection
timed out)]
--- Log closed Tue Nov 17 12:20:04 2009
--- Log opened Tue Nov 17 12:21:38 2009
12:22 -!- remy__ [n=remy@telnet.telecom-lille1.eu] has joined #go-nuts
12:23 < remy__> what would be the best way to have something that looks like
a constructor ?
12:23 < remy__> I've got a map in a struct
12:24 < remy__> and the default value is nil
12:24 -!- Jan_Flanders [n=chatzill@d54C1E33B.access.telenet.be] has quit
["Chatzilla 0.9.75.1 [SeaMonkey 1.1.18/2009082513]"]
12:24 < remy__> i'd like the map to be initialized when I new() my type
12:25 < nickjohnson> remy__: The convention is to define a 'New' or 'NewFoo'
function in your module
12:29 -!- Bun [n=kgm@69.60.117.186] has left #go-nuts []
12:30 < remy__> nickjohnson: ok, that's what I feared
12:30 -!- General13372 [n=support@71-84-247-187.dhcp.gldl.ca.charter.com] has
joined #go-nuts
12:30 < nickjohnson> Why is that so bad?
12:32 -!- vdrab [n=vdrab@cap003-017.kcn.ne.jp] has joined #go-nuts
12:34 -!- path__ [n=path@59.162.86.164] has quit []
12:35 < remy__> nickjohnson: I'm not sure
12:35 < uriel> heh
12:36 < remy__> nickjohnson: it's just that it sounds bad to me in some way
12:36 < uriel> remy__: that is because the OO religion has brainwashed you
12:37 < remy__> uriel: yeah I guess so
12:37 < exDM69> yeah, constructors and functions that return new objects are
essentially the same
12:37 < exDM69> not in C++ tho
12:38 -!- breeno [n=breeno@12.185.80.194] has joined #go-nuts
12:38 < nickjohnson> Although, is there any way to initialize a
stack-allocated struct with the Go approach?
12:38 < exDM69> inheritance also adds stuff that may need constructors
12:38 < exDM69> nickjohnson: are there stack-allocated structs in go?
12:39 < nickjohnson> exDM69: Sure - just declare one as a local
12:40 < uriel> nickjohnson: so, you are working on this?
http://code.google.com/p/googleappengine/issues/detail?id=2382 ;P
12:40 < exDM69> nickjohnson: you sure about that?  sounds to me like it
would break stuff
12:40 < nickjohnson> exDM69: I've used it myself.  Structs are structs,
there's nothing stopping you allocating them on the stack
12:41 < exDM69> you can't use them as return values and using them in data
structures will mess up garbage collectionb
12:41 -!- TheAppleMan [n=apple@funtoo/contributor/theappleman] has joined #go-nuts
12:41 < exDM69> or then there is a workaround for those problems
12:42 < nickjohnson> Yes, obviously you can't pass pointers to them that
exceed the lifetime of the function they're defined in
12:42 < nickjohnson> not sure how Go handles it if you try
12:43 < uriel> nickjohnson: it allocates then on the heap if you return a
pointer to it
12:44 < uriel> the compiler is smart enough to figure it out for you where
to allocate it
12:44 < alus> neat
12:44 < uriel> (I think rob explained this in the mailing list)
12:45 -!- Jan_Flanders [n=chatzill@d54C1E33B.access.telenet.be] has joined
#go-nuts
12:47 -!- General1337 [n=support@71-84-247-187.dhcp.gldl.ca.charter.com] has quit
[Read error: 110 (Connection timed out)]
12:47 -!- cmarcelo [n=cmarcelo@200.184.118.130] has joined #go-nuts
12:47 < nickjohnson> uriel: So it just looks like a local?  Crazy.
12:47 < nickjohnson> Does it magic away initializations as well?
12:48 < jgoebel> interesting now json impliments generics
12:48 < uriel> nickjohnson: not sure what you mean
12:48 < exDM69> jgoebel: generics in json?
12:48 < uriel> nickjohnson: if I got iant right, in Go the stack lives in
the heap anyway
12:48 < jgoebel> yes the json package
12:49 < uriel> jgoebel: to me it looks like it uses interfaces...
12:49 < nickjohnson> uriel: That doesn't really make any difference - stacks
are, well, stacked.
12:50 < nickjohnson> Unless every frame is individually allocated on the
heap and not freed until all references to locals are gone
12:50 < uriel> (what all the people asking and whinning about lack of
generics are missing is that with interfaces there is less need for generics)
12:50 < jgoebel> hmmmm
12:50 -!- breeno [n=breeno@12.185.80.194] has left #go-nuts []
12:50 < nickjohnson> I'm still curious how you initialize a struct on the
stack, though - even with a linked-list stack, that doesn't answer the question
12:50 < jgoebel> ah
12:50 < jgoebel> interesting :)
12:51 < uriel> nickjohnson: the compiler allocates it on the heap if the
function passes out a reference, so that makes sense to me
12:53 < nickjohnson> uriel: That still doesn't answer my question, though.
:)
12:53 -!- ponce [n=ponce@paradisia.net] has joined #go-nuts
12:54 < nickjohnson> If 'NewFoo' returns a pointer to a heap-allocated Foo,
how do I initialize my "var bar Foo"?
12:54 -!- Rob_Russell [n=chatzill@206-248-157-156.dsl.teksavvy.com] has quit
["ChatZilla 0.9.85 [Firefox 3.5.5/20091102152451]"]
12:57 -!- Sylvain_ [i=d4528311@gateway/web/freenode/x-tzaxbzirdjfflcmd] has joined
#go-nuts
12:58 -!- tor7 [n=tor@c-987a71d5.04-50-6c756e10.cust.bredbandsbolaget.se] has
joined #go-nuts
12:58 < uriel> nickjohnson:
http://groups.google.com/group/golang-nuts/browse_thread/thread/7b7c3b3a37feecd6/79816df02f26d65e
12:58 < uriel> (there are a few more threads about this)
13:01 -!- paulca [n=paul@86.43.5.29] has joined #go-nuts
13:02 -!- TheAppleMan [n=apple@funtoo/contributor/theappleman] has quit
["leaving"]
13:04 -!- scriptdevil [n=scriptde@122.174.109.132] has joined #go-nuts
13:05 -!- baldmountain [n=baldmoun@65.219.200.66] has joined #go-nuts
13:05 < nickjohnson> uriel: That addresses stack vs heap allocation, but not
construction of structs (as opposed to struct pointers)
13:05 -!- mightybyte [n=mightyby@pool-74-107-117-150.bltmmd.fios.verizon.net] has
joined #go-nuts
13:05 -!- baldmountain [n=baldmoun@65.219.200.66] has quit [Client Quit]
13:05 -!- baldmountain [n=baldmoun@65.219.200.66] has joined #go-nuts
13:07 < uriel> sorry, I'm not very awake, will try to figure it out later :)
13:08 -!- ponce [n=ponce@paradisia.net] has left #go-nuts []
13:08 < jlouis> nickjohnson: you probably just declare the struct and the
compiler chooses where to allocate it based on liveness of that struct.  If it
outlives its scope it is stuffed to the heap; if not, it can go on the stack
13:09 < jlouis> nickjohnson: It is a classic escape analysis optimization,
functional languages has had this one for about 20 years
13:09 < mightybyte> Why doesn't the time package export useful constants
like longDayNames, shortDayNames, and shortMonthNames?
13:10 < jlouis> nickjohnson: coincidentially, Java6 has a flag that enables
escape analysis.  It is said to give around 20-30% performance because many heap
allocations gets promoted to stack allocation
13:10 -!- eno [n=eno@nslu2-linux/eno] has quit [Read error: 104 (Connection reset
by peer)]
13:10 -!- triplez_ [n=triplez@cm52.sigma225.maxonline.com.sg] has joined #go-nuts
13:11 -!- paulca_ [n=paul@86.43.5.29] has joined #go-nuts
13:11 < jlouis> in addition, if something never escapes its scope, you can
omit taking locks on it and other neat stuff
13:12 -!- eno [n=eno@nslu2-linux/eno] has joined #go-nuts
13:13 -!- triplez [n=triplez@cm52.sigma225.maxonline.com.sg] has quit [Read error:
60 (Operation timed out)]
13:17 < nickjohnson> jlouis: Again, not wondering about where stuff is
allocated, just how to initialize a struct rather than a struct pointer
13:19 -!- x2cast [n=Administ@23.127.222.87.dynamic.jazztel.es] has joined #go-nuts
13:19 -!- x2cast [n=Administ@23.127.222.87.dynamic.jazztel.es] has left #go-nuts
[]
13:20 -!- me___ [n=venkates@c-68-55-179-48.hsd1.md.comcast.net] has quit [Read
error: 60 (Operation timed out)]
13:20 -!- andresambrois [n=aa@r190-135-145-236.dialup.adsl.anteldata.net.uy] has
quit [Read error: 148 (No route to host)]
13:20 < remy__> is the Read from TCPConn blocking ?
13:21 -!- sergio [n=sergio@unaffiliated/sergio] has joined #go-nuts
13:22 -!- scriptdevil [n=scriptde@122.174.109.132] has left #go-nuts []
13:22 -!- paulca [n=paul@86.43.5.29] has quit [Success]
13:22 < jgoebel> hmmm
13:22 < jgoebel> can't find import: dm
13:23 < jgoebel> it's in the current directory
13:23 < vegai> it has "package dm"?
13:24 < jgoebel> yes
13:24 < jgoebel> and i tried . as well
13:24 < Ycros> jgoebel: it looks for the .a file
13:24 < jgoebel> hmm
13:24 < jgoebel> there isn't one, just a .6 file
13:24 < jgoebel> from compiling it
13:25 < vegai> he meant that, I believe
13:25 < jgoebel> dm.6 right there
13:25 < Ycros> uh, I get a .a when I build my package
13:26 < vegai> jgoebel: and then try import "./dm"
13:26 < jgoebel> ok that works
13:26 < Ycros> mmk
13:26 -!- mightybyte [n=mightyby@pool-74-107-117-150.bltmmd.fios.verizon.net] has
left #go-nuts []
13:27 < jgoebel> hmmm
13:27 < jgoebel> anyway to define top level methods on a struct?  like you
would have class level methods in ruby?
13:27 < vegai> perhaps this'll help:
http://kirkmcdonald.blogspot.com/2009/11/on-compilation-of-go-packages.html
13:28 < vegai> I suppose all methods are like that, no?
13:28 < jgoebel> but i want Person.find and State.find, etc
13:28 < jgoebel> not datamapper.Find
13:28 < jgoebel> if there any such parallel in Go?
13:29 < Ycros> jgoebel: no, just define a function
13:29 < jgoebel> well, i want to define the function once for all models
13:29 < halfdan> how do i access programm arguments?
13:29 < halfdan> -m
13:29 < jgoebel> so I'd have something like datamapper.Find(Person, 1) ?
13:30 -!- paulca_ [n=paul@86.43.5.29] has quit [Success]
13:30 -!- chickamade [n=chickama@222.254.12.228] has quit ["Leaving"]
13:30 -!- paulca [n=paul@86.43.5.29] has joined #go-nuts
13:30 < Ycros> jgoebel: once we have generics, stuff like that will be a lot
nicer to do
13:31 < dho> is there a way for me to get a diff from the last codereview
point and my current code?
13:31 < jgoebel> can i even pass struct as s top-level object?
13:31 < vegai> jgoebel: perhaps do it with interfaces?
13:31 < vegai> I'll try this myself before talking out of my backside some
more
13:31 < jgoebel> vegai: trying to figure out how to come up with something
even approximating ruby :)
13:32 -!- al-maisan
[n=al-maisa@conference/ubuntu-developer-summit/x-irqxscgzcmnfywhv] has joined
#go-nuts
13:32 < vegai> that's probably a bad idea :)
13:32 < Ycros> jgoebel: this isn't ruby
13:32 < jgoebel> right
13:32 < Ycros> jgoebel: I know what you're trying to do and it won't work
13:32 < jgoebel> trying to write a nice data abstration
13:32 < jgoebel> like AR
13:32 < jgoebel> or at least see what's possible
13:32 < vegai> type Model interface { Find(id int) Model; } // perhaps?
13:33 < halfdan> is there even a way to access program arguments?
13:33 < vegai> and implement Find in your person package
13:33 < jgoebel> hmmm
13:34 < vegai> you'll have to find a different path to wrapping the database
than is possible with ruby, that's for sure
13:34 < Sylvain_> halfdan: this ? http://golang.org/pkg/flag/
13:35 < halfdan> ah crap
13:35 < halfdan> yeah i already used that
13:35 < halfdan> sorry
13:36 < jgoebel> Users/jgoebel/gosrc/gosqlite3/states.go:14: type State is
not an expression
13:36 < jgoebel> hmmm
13:36 < jgoebel> so i can't pass type as an argument
13:36 < vegai> no
13:36 -!- al-maisan
[n=al-maisa@conference/ubuntu-developer-summit/x-irqxscgzcmnfywhv] has left
#go-nuts ["Parting is tough.."]
13:36 < Ycros> jgoebel: nope, we need generics for that
13:36 < jgoebel> well i was assuming it would be of type Type
13:37 < jgoebel> i'm not trying to pass an objection
13:37 < jgoebel> trying to pass the type itself
13:37 -!- Scotch [n=scotch@83.101.32.153] has joined #go-nuts
13:37 < jgoebel> in ruby class Class
13:37 < Scotch> hey there
13:37 < Ycros> jgoebel: yes, but in ruby classes are objects
13:37 -!- Fraeon_ [n=kzer-za@e212-246-65-153.elisa-laajakaista.fi] has joined
#go-nuts
13:37 < jgoebel> yes, not so in Go i suppose :)
13:38 -!- lenst [n=user@90-229-131-67-no52.tbcn.telia.com] has quit [Remote closed
the connection]
13:38 < vegai> there was some introspection in go, wasn' there
13:38 < jgoebel> yes there is
13:40 -!- baldmountain [n=baldmoun@65.219.200.66] has quit []
13:43 -!- paulca [n=paul@86.43.5.29] has quit []
13:43 -!- UKRep547 [n=jcricket@pirosa01.vm.bytemark.co.uk] has quit ["Leaving"]
13:44 -!- Fraeon [n=kzer-za@e212-246-65-153.elisa-laajakaista.fi] has quit [Read
error: 145 (Connection timed out)]
13:44 -!- silvs [n=silvs@210-84-16-103.dyn.iinet.net.au] has quit ["This computer
has gone to sleep"]
13:46 -!- Freeaqingme [n=Freeaqin@ns3.hostdelight.com] has quit [Excess Flood]
13:47 -!- buluca [n=buluca@unaffiliated/buluca] has joined #go-nuts
13:47 -!- Guest42366 [n=Freeaqin@ns3.hostdelight.com] has joined #go-nuts
13:48 -!- Guest42366 [n=Freeaqin@ns3.hostdelight.com] has quit [Excess Flood]
13:48 -!- skyyy [i=caw@res55551479.rh.rit.edu] has quit [SendQ exceeded]
13:49 -!- silvs [n=silvs@210-84-16-103.dyn.iinet.net.au] has joined #go-nuts
13:49 -!- Freeaqinf [n=Freeaqin@ns3.hostdelight.com] has joined #go-nuts
13:52 -!- loureiro [n=loureiro@189.2.128.130] has joined #go-nuts
13:52 -!- bjb [n=bobby@cpe-065-184-253-213.ec.res.rr.com] has joined #go-nuts
13:52 -!- Cyprien [n=Cyprien@pub1.heig-vd.ch] has quit [Read error: 110
(Connection timed out)]
13:53 -!- hipe [n=hipe@pool-74-108-181-155.nycmny.east.verizon.net] has quit [Read
error: 54 (Connection reset by peer)]
13:53 -!- Cyprien [n=Cyprien@pub1.heig-vd.ch] has joined #go-nuts
13:53 -!- hipe [n=hipe@pool-74-108-181-155.nycmny.east.verizon.net] has joined
#go-nuts
13:55 < dho> good morning go-ites
14:01 -!- General1337 [n=support@71-84-247-187.dhcp.gldl.ca.charter.com] has
joined #go-nuts
14:05 -!- edw [n=user@c-69-141-214-58.hsd1.pa.comcast.net] has joined #go-nuts
14:10 -!- ctimmerm [n=ctimmerm@83.150.80.193] has quit ["Leaving..."]
14:11 -!- afurlan [n=afurlan@scorpion.mps.com.br] has quit ["Leaving"]
14:12 -!- afurlan [n=afurlan@scorpion.mps.com.br] has joined #go-nuts
14:12 -!- Freeaqinf [n=Freeaqin@ns3.hostdelight.com] has quit [Excess Flood]
14:14 -!- fhs_ [n=fhs@pool-72-89-203-117.nycmny.east.verizon.net] has quit
["leaving"]
14:14 -!- Guest74735 [n=Freeaqin@ns3.hostdelight.com] has joined #go-nuts
14:15 -!- Guest74735 [n=Freeaqin@ns3.hostdelight.com] has quit [Excess Flood]
14:16 -!- Guest69707 [n=Freeaqin@ns3.hostdelight.com] has joined #go-nuts
14:16 < Scotch> Is go an object oriented language ? It looks like it but I
don't get the whole idea with interfaces...  It doesn't look like to anything
close to class imo..  Does it even handle construction/destruction ?
14:16 < JBeshir> I think creation functions are used, so no.  I don't think
that's the point of them.
14:17 < JBeshir> Go provides abstraction, which is the most important and by
far the most useful feature of OO, IMO.
14:17 < exDM69> Scotch: Go is not really OO, it has some similar concepts,
but abandons most of OO in favor of something more practical
14:17 -!- dschn [n=dschn@pool-70-19-224-19.bos.east.verizon.net] has joined
#go-nuts
14:18 < JBeshir> Yeah, it kinda takes the good features of OO and implements
them orthagonally, rather than using the blender approach of classes.
14:18 -!- General13372 [n=support@71-84-247-187.dhcp.gldl.ca.charter.com] has quit
[Connection timed out]
14:18 < JBeshir> Even the little exposure to Go I've had time for has soured
me to putting up with the weird mix of code with data in the source that are
classes.
14:18 < edw> I need to add a method inside the http package (for handling
PUT requests); short of a massive reusing via copy and paste, anyone have a
suggestion?
14:19 < Scotch> so how's Go closer to C++ than C ?
14:20 -!- chachan [n=chachan@ccscliente156.ifxnetworks.net.ve] has joined #go-nuts
14:20 < edw> Are you practicing your flamebaitting skills?  How do you
measure distance between programming languages?
14:20 < JBeshir> In terms of level, due to additions of memory management
functionality (vastly superior to the optional RAII-methods of C++, which were the
big things you needed constructors/destructors for)
14:20 < Scotch> Object oriented syntax with interfaces everywhere looks like
crap to me
14:20 < Egelmex> halfway between c++ and occam :p
14:21 < JBeshir> And some other higher level things like basic containers
included in the standard library or in the case of maps and slices, in the
language itself.
14:21 < JBeshir> I guess.
14:21 < JBeshir> Comparing level and distance is very qualitative.
14:21 < JBeshir> It doesn't seem very C++-like to me.
14:21 -!- qbit_ [n=qbit_@c-75-71-160-106.hsd1.co.comcast.net] has joined #go-nuts
14:21 < exDM69> what I don't like about OO is that you can't add new methods
to classes, thankfully Go fixes this
14:22 < exDM69> using the visitor pattern is not a very nice solution
14:22 < edw> If it had multiple dispatch, I'd say it would most resemble
Dylan.
14:22 -!- remy__ [n=remy@telnet.telecom-lille1.eu] has quit [Remote closed the
connection]
14:23 < JBeshir> I need to learn about more arcane languages.
14:23 < JBeshir> I keep mentally converting that to Dyson.
14:23 < JBeshir> On the other hand, I'd be missing a joke if I did.
14:23 < edw> Dylan is basically CL.
14:23 < Scotch> exDM69: what's wrong with the visitor pattern ?
14:23 < exDM69> Scotch: the ton of boilerplate you have to add
14:23 < edw> Scotch: myList.map(func(x) { return x + 1; });
14:24 < exDM69> Scotch: all I want is to have some data and add operations
that work on the data
14:24 -!- ch4w [n=ch4w@62.57.138.69.dyn.user.ono.com] has joined #go-nuts
14:26 < nbaum> Visitor is a solution to a language problem, not a
programming problem.
14:26 < exDM69> nbaum: exactly
14:26 < exDM69> sometimes OO seems to cause more problems than it solves
14:26 -!- mennis [n=mennis@adsl-068-016-104-079.sip.asm.bellsouth.net] has joined
#go-nuts
14:27 < exDM69> and the problems it solves are often related to the
underlying type system, which are mostly inherited from C
14:28 -!- bjorn` [i=bjorn@archlinux.no] has joined #go-nuts
14:30 -!- rajeshsr [n=rajeshsr@59.92.26.181] has quit [Remote closed the
connection]
14:33 -!- delza [n=delza@d66-183-63-49.bchsia.telus.net] has joined #go-nuts
14:33 -!- LaSaRuX [n=pedro@184.Red-83-50-170.dynamicIP.rima-tde.net] has quit
["Leaving."]
14:40 -!- path__ [n=path@59.162.86.164] has joined #go-nuts
14:42 -!- ch4w [n=ch4w@62.57.138.69.dyn.user.ono.com] has quit [Remote closed the
connection]
14:43 -!- chickamade [n=chickama@222.254.12.228] has joined #go-nuts
14:44 -!- lenst [n=user@90-229-131-67-no52.tbcn.telia.com] has joined #go-nuts
14:44 -!- flyfish [n=flyfish@pixout.appriss.com] has joined #go-nuts
14:51 -!- buluca [n=buluca@unaffiliated/buluca] has left #go-nuts []
14:51 -!- iant [n=iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has quit [Read
error: 110 (Connection timed out)]
14:52 -!- brrant [n=John@65-102-193-77.hlrn.qwest.net] has joined #go-nuts
14:56 -!- Scotch [n=scotch@83.101.32.153] has left #go-nuts []
14:57 -!- dgnorton [n=dgnorton@97.65.135.119] has joined #go-nuts
14:59 * nickjohnson wonders about an IOGoCC
14:59 -!- raichoo [n=raichoo@lain.dhcp.uni-bielefeld.de] has joined #go-nuts
15:00 -!- sm [n=sm@cpe-75-85-88-227.socal.res.rr.com] has joined #go-nuts
15:02 -!- rakd [n=rakd@219.117.252.7.static.zoot.jp] has joined #go-nuts
15:02 -!- iant [n=iant@67.218.102.217] has joined #go-nuts
15:02 -!- mode/#go-nuts [+v iant] by ChanServ
15:04 < dgnorton> I have an AMD Phenom quad core running Ubuntu (9.0?) and
an Core 2 quad running XP with Ubuntu (9.01) running in VMWare.  If I build and
run my little test app (calling a go routine 1000x in a loop) on the AMD it takes
about 8 seconds to run.  If I build and run it on the Core 2 it takes less than a
second...even if I increase the loop to 10000.  Any idea why one would be so much
faster than the other?
15:05 < dgnorton> oops...the Ubuntu running the the VM is 9.10 ...  not 9.01
15:06 -!- JSharpe2 [n=jamie@5ad1d7f1.bb.sky.com] has joined #go-nuts
15:06 -!- levicook [n=levicook@gw.alice.com] has joined #go-nuts
15:07 -!- decriptor [n=decripto@137.65.132.26] has joined #go-nuts
15:08 < dgnorton> Good morning iant
15:08 < flyfish> Can someone run this code and verify that exec.Run is not
passing args to the executable.  http://pastebin.com/m5bd077be
15:09 -!- JSharpe2 [n=jamie@5ad1d7f1.bb.sky.com] has quit [Read error: 54
(Connection reset by peer)]
15:09 <+danderson> dgnorton: unless you're setting GOMAXPROCS, you're in
fact benchmarking the performance of a single core of your machine
15:09 <+iant> morning
15:09 < penguin42> dgnorton: Well I've got a core2 running Ubuntu 9.10 but
not in a VM if that would help to compare
15:09 <+danderson> I don't know how phenom and core2 compare to each other,
but I can imagine that the difference could be significant
15:09 <+danderson> are you also compiling for different architectures (6g
vs.  8g) ?
15:10 -!- diltsman [n=diltsman@64.122.18.77] has joined #go-nuts
15:10 < penguin42> danderson: There shouldn't be factors difference - and if
anything I'd have expected teh phenom without vmware in the way to be faster
15:10 < dgnorton> danderson, yes 6g & 8g
15:11 <+danderson> istr that the 32 bit compiler currently optimizes less
than the 64 bit one, so that may explain it
15:11 < dgnorton> danderson, if I set GOMAXPROCS=4 on the AMD, it pegs all 4
cores and takes about 30 seconds to complete instead of 8 seconds
15:11 -!- Jan_Flanders [n=chatzill@d54C1E33B.access.telenet.be] has quit
["Chatzilla 0.9.75.1 [SeaMonkey 1.1.18/2009082513]"]
15:11 <+danderson> but that memory is vague, so I think I'd better shut up
:)
15:12 -!- sm [n=sm@cpe-75-85-88-227.socal.res.rr.com] has quit []
15:12 -!- roosvzjh [i=5352e40d@gateway/web/freenode/x-lyxjbnrzvdsemvxx] has joined
#go-nuts
15:13 < Gracenotes> incidentally, is there a nice way to read a line from
stdin?
15:13 < Gracenotes> or does one have to do the whole bufio thing?
15:13 -!- brown` [n=user@72.14.228.129] has joined #go-nuts
15:14 < dho> Gracenotes: gofmt does it
15:14 -!- jA_cOp [n=yakobu@ti0043a380-3093.bb.online.no] has joined #go-nuts
15:14 < dho> but i'm not sure if it does the `whole bufio thing' without
looking
15:14 < dgnorton> danderson, 8g is 32 bit...right?
15:14 < dho> ah, it does.
15:15 -!- raichoo [n=raichoo@lain.dhcp.uni-bielefeld.de] has quit []
15:15 <+danderson> dgnorton: I believe so, yes
15:15 < dho> yes, it is
15:15 < dgnorton> danderson, my test app runs faster when compiled with 8g
...  6g is the slower
15:16 -!- Jan_Flanders [n=chatzill@d54C1E33B.access.telenet.be] has joined
#go-nuts
15:16 < penguin42> not impossible, 6g will use larger pointers
15:17 <+danderson> yeah, but orders of magnitude?
15:17 <+danderson> there is something strange at work
15:18 < Gracenotes> hey, I have my Go-evaluating bot running in #go-run —
feel free to join and see if it's suitable
15:18 < Gracenotes> I'd put it in here, but I think there would be a bit of
noise from it :/
15:18 < Gracenotes> unless it's okay to do that?
15:19 < exch> Chrome OS launches in a week :o
15:19 <+danderson> Gracenotes: I'd suggest test driving it in #go-run, then
bring it in here discreetly
15:19 <+danderson> but leave it also running in #go-run
15:19 <+danderson> so that I can direct people spamming it over there :P
15:19 <+danderson> does that make sense?
15:20 < Gracenotes> yeah, it's the case with some other language bots
15:20 < exch> the most noise I had from one of my bots was when I
implemented the magic 8 ball some years ago :p people just couldn't stop using it
15:20 -!- vdrab [n=vdrab@cap003-017.kcn.ne.jp] has quit []
15:22 -!- binaryjohn [n=binaryjo@cpe-24-30-132-50.san.res.rr.com] has joined
#go-nuts
15:25 -!- hector_ [n=chatzill@client-86-0-126-58.nrth.adsl.virginmedia.com] has
joined #go-nuts
15:25 <+danderson> when a bot joins a channel, there's always a period of
everyone trying it.  Eventually it becomes actually useful.
15:28 -!- offby1 [n=user@q-static-138-125.avvanta.com] has joined #go-nuts
15:31 -!- zhaozhou [n=zhaozhou@linfast76.bitnet.nu] has quit [""Some cause
happiness wherever they go; others whenever they go." --Oscar Wilde"]
15:34 -!- Cyprien [n=Cyprien@pub1.heig-vd.ch] has quit [Read error: 110
(Connection timed out)]
15:35 -!- afra [i=507e84eb@gateway/web/freenode/x-eyyampakienfzuzk] has joined
#go-nuts
15:36 < afra> d
15:36 -!- dharman [n=dharman@extranet.i-m3d.com] has quit [Read error: 54
(Connection reset by peer)]
15:37 -!- piotr [n=piotr@chello084010208203.chello.pl] has joined #go-nuts
15:37 -!- afraca [n=harkemas@a80-126-132-235.adsl.xs4all.nl] has joined #go-nuts
15:37 -!- brrant [n=John@65-102-193-77.hlrn.qwest.net] has quit [Read error: 110
(Connection timed out)]
15:37 -!- thepalephantom [n=thepalep@64.129.209.162] has joined #go-nuts
15:37 -!- brrant [n=John@65-102-193-77.hlrn.qwest.net] has joined #go-nuts
15:37 -!- edw [n=user@c-69-141-214-58.hsd1.pa.comcast.net] has quit [Read error:
110 (Connection timed out)]
15:38 < roosvzjh> Hey, is there anyone that can tell me whether Go! is the
right language to produce an Anti-Cheat for games with?
15:39 -!- afra [i=507e84eb@gateway/web/freenode/x-eyyampakienfzuzk] has quit [Ping
timeout: 180 seconds]
15:39 < dho> It's called Go, and I'm not sure
15:39 < dho> What do you mean by `anti-cheat for games'
15:39 < afraca> sort of punkbuster
15:39 < roosvzjh> yeah sort of
15:39 < dho> never heard of it.
15:40 < roosvzjh> Uhm..  its like hooking in the game and scan memory of a
client etc.
15:40 < afraca> a small application meant to bust cheater in multiplayer
games
15:40 -!- Cyprien [n=Cyprien@pub1.heig-vd.ch] has joined #go-nuts
15:40 <+danderson> that kind of software usually needs to hack itself pretty
deep into the underlying OS, and go may not provide those interfaces yet
15:40 < afraca> that's what I thought danderson
15:40 < roosvzjh> So C++ should be a better option?
15:40 < dho> danderson: I suppose you could open /proc/PID/map
15:41 < dho> or whatever
15:41 < afraca> for an application like that some c++ libraries should be
used
15:41 < dho> either way, it's typically very game and os specific.
15:41 < afraca> and go doesn't have that kind of libraries I guess....
15:41 < s_mosher> for networked games, I like the idea of distributed
behavior checking among the various clients
15:42 -!- howboutjoe [n=howboutj@65-120-132-14.dia.static.qwest.net] has joined
#go-nuts
15:42 < roosvzjh> s_mosher: can you please explain that?
15:42 * roosvzjh is not sure what you mean
15:42 < dho> I'm surprised I only got 1 reply to my email last night
15:42 < dho> from kaib heh
15:42 < penguin42> roosvzjh: Although OT I should point out that what you
are trying to do is actually impossible
15:42 < afraca> because.....
15:42 < s_mosher> roosvzjh, you just have other clients confirm that each
player is within accepted behaviors
15:43 < s_mosher> it's kind of a vague description, and it's a heuristic
check
15:43 < dho> Is there a Wave for Go?
15:43 < afraca> I sort of get what you mean mosher
15:43 < afraca> but
15:43 <+danderson> it's impossible because you're writing software that you
must trust absolutely when it runs in an environment controlled by a hostile and
motivated attacker
15:43 < penguin42> danderson: Exactly
15:43 -!- Txarli_ [n=jcarles@53.Red-80-24-0.staticIP.rima-tde.net] has joined
#go-nuts
15:43 <+danderson> the best you can do is make it hard enough that most
won't try
15:43 -!- bbeck [n=bbeck@dxr-fw.dxr.siu.edu] has joined #go-nuts
15:43 < afraca> well
15:43 < penguin42> If you don'tr trust people not to fiddle with your game
then you can't trust them not to fiddle with your checker
15:44 <+danderson> with obfuscation, cross-checks etc.
15:44 < Txarli_> Hello all
15:44 <+danderson> but that's just delaying the inevitable
15:44 < afraca> Checking for hooking could be done easily right?
15:44 < afraca> True
15:44 <+danderson> that said, that's worked pretty well for Skype so far
15:44 < s_mosher> trying to enforce things like untampered binaries is kind
of sisyphean
15:44 <+danderson> but they have a world class obfuscator over their code
15:44 < dho> yes, but removing checks for hooking is just as easy
15:44 < afraca> But that won't be the only thing
15:45 <+danderson> and their interest is hiding an algorithm inside the
program
15:45 -!- delza [n=delza@d66-183-63-49.bchsia.telus.net] has quit []
15:45 <+danderson> not preventing outside influence over the program as a
black box
15:45 < saati_> in a game you wouldn't want an obfuscated protocoll, it
would add a ton of latency
15:45 < afraca> "their" ?
15:45 -!- roosvzjh [i=5352e40d@gateway/web/freenode/x-lyxjbnrzvdsemvxx] has quit
["Page closed"]
15:45 < afraca> hackers you mean?
15:45 < penguin42> saati_: Not necessarily, it's small compared to the
network latency; anyway I call OT
15:46 <+danderson> penguin42++
15:46 <+danderson> take it to #go-cafe or something :)
15:46 < afraca> Ok, was just wondering how far Go can go, because c++ is all
grown up, and Go so young
15:47 < dho> speaking of which
15:47 < dho> i'm really enjoying some of the comments on issues
15:47 -!- binaryjohn [n=binaryjo@cpe-24-30-132-50.san.res.rr.com] has quit []
15:47 < asmo> punkbuster and gameguard works much like a rootkit
15:48 < levicook> Anyone know if there's a parser generator dealing with Go
out there?
15:48 <+danderson> well, go is still experimental quality at this stage, so
if you need a production quality language today, I wouldn't recommend using Go.
15:48 < dho> like the windows support issue
15:48 < dho> If you like you can have a Linux shell on my server and try it
on there.
15:48 < dho> If you're interested, email me at cool_fire_666[at]hotmail.com
15:48 -!- roosvzjh [i=5352e40d@gateway/web/freenode/x-iydrtkdwtgrugnxg] has joined
#go-nuts
15:48 * dho is amused.
15:49 -!- alexf [n=alexf@c-71-205-224-173.hsd1.mi.comcast.net] has quit [Read
error: 60 (Operation timed out)]
15:49 < nbaum> levicook: goyacc comes with Go.
15:49 < s_mosher> dho, I laughed when I read that.
15:49 < vegai> do programming languages really support Windows typically?
15:49 < vegai> or their implementations, of course
15:49 < nbaum> vegai: Windows is written in one...
15:49 < nbaum> Well, several.
15:49 < levicook> hmm.  must have overlooked it.  thanks
15:49 < asmo> vegai: That sentence makes no sense at all
15:49 < asmo> (:
15:49 < vegai> I haven't been in that world in like 10 years, so I honestly
don't know
15:50 < dho> Snert: poke
15:50 < Snert> dho howdy
15:50 < dho> Snert: freebsd/amd64 is done
15:50 < vegai> and since it's so different from anything else, I'm surprised
people bother to support it at all
15:50 < ector> yes, there's windows-compatible implementations of most major
programming languages..
15:50 < dho> while i'm waiting for it to be committed, do you need help with
openbsd/i386?
15:50 < ector> and it's not fundamentally THAT different from unix, it just
looks like it :p
15:50 < dho> I'm not starting on freebsd/i386 until the amd64 stuff is
committed.
15:50 * Snert been making chilli con carne for Thursday's Beaujolais Nouveau wine
tasting.
15:51 < Snert> dho: cool
15:51 < asmo> vegai: Because it is one of, if not the one, major OS's?
15:51 < dho> which is probably later today
15:51 < dho> so i've got a small time window and an openbsd laptop right now
:)
15:51 < Snert> :)
15:51 < dho> do you have a patchset?
15:51 < Snert> so you care to give me a hand then?
15:51 < dho> sure
15:52 < Snert> not as yet
15:52 < dho> can you just run hg diff over what you have?
15:52 < Snert> i have to commit my changes to my local git first
15:52 < dho> oh i see
15:52 < Snert> i don't have mercurial installed
15:52 < Snert> and will not installed it
15:52 -!- JSharpe [n=jamie@5ad1d7f1.bb.sky.com] has joined #go-nuts
15:52 < dho> that's ok, i hate git :)
15:52 < Snert> think it's great, much nicer than CVS or SVN
15:53 < dgnorton> git rocks
15:53 < Snert> and its all written in C (as I recall)
15:53 < Snert> I hate having to install yet another scripting language in
order to use some tool
15:53 * dho shrugs
15:53 < dho> i don't really care, whatever gets the job done
15:53 < Snert> and I clearly don't want to install Python
15:53 < dgnorton> snert, C and shell scripts
15:53 -!- engla [n=ulrik@90-229-231-23-no153.tbcn.telia.com] has joined #go-nuts
15:53 < dho> my big beef is i hate git add before git commit
15:53 < Snert> I'm fussy about what goes on my machines
15:53 < saati_> Snert: you use linux from scratch?
15:54 < Snert> I use OpenBSD
15:54 < dho> anyway, not meaning to open cans of worms, was just being a bit
satirical
15:54 -!- lux` [n=lux@151.54.240.177] has joined #go-nuts
15:54 -!- afraca [n=harkemas@a80-126-132-235.adsl.xs4all.nl] has left #go-nuts []
15:54 < exDM69> dho: what version control does not require you to add before
commit?
15:54 < exDM69> and what mess would it make if it didn't?
15:54 < dho> exDM69: you have to add changes too.
15:54 < Snert> it's ok, my chilli is made and is cooling on the stove, so I
have some time for cans of worms
15:54 < dho> you add changes to a changeset and then commit the changeset.
15:55 < saati_> Snert: that has mercurial in its ports
15:55 < scoopr> dho, use -a in commit?  ;)
15:55 < hnaz> dho: git commit file or git commit -a
15:55 < rullie> hey folks, im getting this make error on all.bash
Dial("tcp", "", "www.google.com:http") = _, dial tcp www.google.com:http: lookup
www.google.com.  on 192.168.2.1:53: no answer from server
15:55 < rullie> a bunch of these, actually
15:55 < dho> or hg commit and i'm 1 character shorter, at least :)
15:55 < exDM69> dho: does commit mean pushing or uploading in this context?
I'm not too familiar with git command meanings
15:55 < dho> rullie: you have a name server running on the local machine
15:55 < hnaz> dho: explicit git add is useful with -i or -p
15:55 < dho> exDM69: I don't know
15:55 < dho> anyway
15:56 <+danderson> rullie: iirc the net tests have some known problems with
DNS
15:56 < dho> not trying to be converted or learn anything about git
15:56 < dho> i'm quite happy with $whatever
15:56 < dgnorton> exDM69, no.  committing in git is to local repo
15:56 < poucet> Can go have recursive type declarations?
15:56 < dho> i've used cvs, svn, perforce, hg, and git, and i'll use
whatever's available.
15:56 < rullie> danderson: hmm ok.  it worked on a mac machine under the
same LAN, but that one is using opendns, could that be why?
15:57 < dgnorton> exDM69, push is a separate operation
15:57 < exDM69> dgnorton: just like in mercurial, thne
15:57 -!- alexf [n=alexf@c-71-205-224-173.hsd1.mi.comcast.net] has joined #go-nuts
15:57 -!- conra [n=konrad@host-89-229-12-166.torun.mm.pl] has joined #go-nuts
15:58 < dgnorton> exDM69, That I'll have to take your word for.  :) I only
started using hg for Go
15:58 < exDM69> dgnorton: hg commands are pretty close to those of svn (the
names I mean)
16:00 < dho> Snert: do you have a server to plop that up on?
16:01 -!- Jeffrey_ [i=4cd1835f@gateway/web/freenode/x-sfuuftbayohcrqxv] has joined
#go-nuts
16:01 < Snert> I have a server, but it doesn't have git install; so I could
tar ball the lot or at least my changes.
16:01 -!- Jeffrey_ [i=4cd1835f@gateway/web/freenode/x-sfuuftbayohcrqxv] has quit
[Client Quit]
16:02 < Snert> dho just a sec; on phone
16:02 < dho> yeah no problem
16:02 < dho> i just need diff output so i can run it through patch.
16:02 -!- mejja [n=user@c-49b6e555.023-82-73746f38.cust.bredbandsbolaget.se] has
quit [Remote closed the connection]
16:02 < exDM69> Snert: does git have a method to bundle a bunch of changes
into a file, use that if there's a way (like hg bundle/unbundle)
16:03 < path__> anyone know if there's an amazon ec2 image with a go
compiler on it?
16:04 -!- bmm [n=bram@195-240-186-6.ip.telfort.nl] has joined #go-nuts
16:05 < Snert> exDm69 : probably, but i've never had occasion to use use
such until today, so I have to go look.
16:05 < bmm> When is the first release archive going to hit the servers?  I
would love to try it, but to really put time in go I would have to have it in the
debian/ubuntu archive as a version I can depend on.
16:05 -!- igfud [n=mike@cros5-105-dhcp.resnet.colorado.edu] has quit [Read error:
110 (Connection timed out)]
16:06 -!- aninhumer
[n=aninhume@client-81-105-73-94.lds-bng-011.adsl.virginmedia.net] has joined
#go-nuts
16:07 -!- kaigan|work
[n=kaigan@c-8290e255.1411-10-64736c14.cust.bredbandsbolaget.se] has quit []
16:07 -!- kill-9 [n=kill-9@cpe-65-24-145-70.columbus.res.rr.com] has quit [Read
error: 104 (Connection reset by peer)]
16:09 -!- voluspa [n=voluspa@x-134-84-102-227.reshalls.umn.edu] has joined
#go-nuts
16:09 < offby1> exDM69: you want "git bundle".
16:09 -!- itrekkie [n=itrekkie@ip72-200-108-156.tc.ph.cox.net] has quit []
16:09 -!- diltsman [n=diltsman@64.122.18.77] has quit []
16:09 < offby1> exDM69: although it seems that "git format-patch" is used
more; don't know why
16:09 < exDM69> Snert: the "git bundle" is for you
16:11 -!- edsono [n=edsono@200-160-96-163-ma.static.vivax.com.br] has joined
#go-nuts
16:12 -!- french [i=534c5d6b@gateway/web/freenode/x-wvrfrvvjqfsnaonp] has joined
#go-nuts
16:13 -!- honeyhoney [n=francisp@72.14.229.81] has joined #go-nuts
16:14 -!- Capso [i=none@about/networking/128.0.0.0/Capso] has joined #go-nuts
16:14 -!- rbohn [n=rbohn@192.206.100.4] has joined #go-nuts
16:17 < Snert> exdm69: cheers, i'll take a look in a mo
16:18 -!- MigoMipo [n=kvirc@84-217-11-119.tn.glocalnet.net] has joined #go-nuts
16:18 -!- bmm [n=bram@195-240-186-6.ip.telfort.nl] has quit ["Ex-Chat"]
16:19 < french> https://gist.github.com/3fc8a8119ff5244a64dc memory usage is
20mb after allocating the buffer, then 40mb after creating the string.  but why
still >40mb after returning?  the buffer cannot possible be used anymore, so
shouldn't it be discarded?
16:19 -!- diltsman_ [n=diltsman@64.122.18.77] has joined #go-nuts
16:19 < exDM69> french: the garbage collectors always run a bit late
16:20 < french> I tried waiting, creating loops
16:20 < french> but it stays
16:20 < exDM69> french: also the tools for checking memory usage do not tell
the whole truth
16:20 < french> it never (half an hour enough?) gets collected
16:20 < exDM69> what did you use to check this?
16:20 < french> malloc.GetStats() lies?
16:21 < exDM69> it may be inaccurate
16:21 < dho> sweet, freebsd/amd64 support in the tree!
16:21 < french> so all of top, ps and malloc.GetStats() is wrong?  I find
that hard to believe.
16:21 -!- seank [n=sean@64-184-238-2.mammothnetworks.com] has quit [Read error:
104 (Connection reset by peer)]
16:22 -!- diltsman_ [n=diltsman@64.122.18.77] has quit [Client Quit]
16:25 -!- JSharpe [n=jamie@5ad1d7f1.bb.sky.com] has quit [Read error: 145
(Connection timed out)]
16:26 -!- flyfish [n=flyfish@pixout.appriss.com] has quit []
16:27 < french> exDM69: I'm running a loop allocating some []bytes after
loading, and you can clearly see the GC collecting unused stuff, but the 40mb stay
there no matter what
16:27 < exDM69> french: that's slightly awkward
16:27 -!- interskh [n=interskh@c-67-163-156-103.hsd1.pa.comcast.net] has quit
[Read error: 60 (Operation timed out)]
16:27 < french> I can't find a way to read a file straight into a string
either
16:28 < exDM69> french: I know java had (has?) a similar problem with
substrings.
16:28 -!- silvs [n=silvs@210-84-16-103.dyn.iinet.net.au] has quit ["Leaving"]
16:29 < rhc> french: i get the same result..  and i thought it might be
linux not returning memory back to the OS after a free(), but a similar testcase
in C actually shrinks the process back down in ps
16:29 < french> rhc: yes it does in C
16:29 < french> exDM69: Substrings are fine, they are just slices (?), so
use like 8 bytes or something
16:29 < KirkMcDonald> Go might fragment the heap more.
16:29 -!- jorendorff [n=jorendor@c-76-22-141-17.hsd1.tn.comcast.net] has joined
#go-nuts
16:30 -!- JSharpe [n=jamie@5ad1d7f1.bb.sky.com] has joined #go-nuts
16:30 -!- iant [n=iant@67.218.102.217] has quit [Read error: 110 (Connection timed
out)]
16:31 -!- Lorthirk` [n=cm0901@109.114.32.70] has quit [Network is unreachable]
16:32 < exDM69> french: anyways, if this is not a showstopper, I would not
worry about it
16:33 < exDM69> the memory is probably already freed or it will be freed in
the future and it just doesn't show yet
16:33 < french> well for what I'm trying to do, double memory usage is not
so good.  but I guess I'll have to live with it if I want to use Go.
16:33 -!- edsono [n=edsono@200-160-96-163-ma.static.vivax.com.br] has quit []
16:33 < exDM69> it also may be a bug somewhere as go is very new, but the
guys will probably fix it soon
16:33 < exDM69> maybe send an e-mail to the mailing list
16:34 < rhc> KirkMcDonald: i tried a 10k mallocs between 0 to 4k and then
freed all of them..  still reduces the size right back down..
16:35 < french> rhc: in C?
16:35 -!- Venom_X [n=pjacobs@cpe-67-9-131-167.austin.res.rr.com] has joined
#go-nuts
16:36 < KirkMcDonald> rhc: It is entirely possible that Go's GC causes heap
fragmentation.
16:38 < KirkMcDonald> Well, s/heap/page/
16:38 -!- diabolix [n=jsoyke@206.210.81.55] has joined #go-nuts
16:38 -!- Kniht [n=kniht@c-68-58-17-177.hsd1.in.comcast.net] has joined #go-nuts
16:38 < rhc> french: yeah
16:39 < french> I'm thinking that maybe the string() function marks the
buffer as "used" so it's not being deallocated
16:39 < rhc> yeah i guess heap fragmentation is probably hard to reproduce,
but french's testcase seems like a pretty straightforward allocation
16:39 < dgnorton> danderson, I can't reproduce the AMD / Core 2 performance
difference today.  I must have been smoking something yesterday.
16:39 < french> and since s is a global variable, it will stay marked
16:40 -!- vt100 [n=vt@cust125.179.113.38.dsl.g3telecom.net] has quit [Read error:
60 (Operation timed out)]
16:40 < rhc> french: ah..
16:40 < french> but I'm not sure how I can find out if that is the case.
16:41 < dgnorton> danderson, well - I can still reproduce the slow-down when
GOMAXPROCS > 1
16:41 < french> string() makes a copy of the buffer, that I know, because
strings are immutable
16:42 < vegai> dgnorton: that's not surprising
16:42 < dgnorton> vegai, why?
16:42 < rhc> french: i removed the string and it still sticks at 20 mb
16:42 -!- roosvzjh [i=5352e40d@gateway/web/freenode/x-iydrtkdwtgrugnxg] has quit
[Client Quit]
16:42 < french> just reading into a buf?
16:42 < vegai> dgnorton: becase of added bookkeeping and all that
16:42 < french> maybe the file needs to be closed?
16:42 < french> hm let me check on that
16:43 < vegai> dgnorton: although....  how big a slowdown are we talking
here?
16:43 < dgnorton> ~8 seconds to run with one proc ...  ~25 seconds with 2
16:43 < french> no change.
16:44 < vegai> oh, that's pretty bad.
16:44 < dgnorton> vegai, probably because both are accessing the same vector
16:44 < vegai> what kind of a task?
16:44 < dgnorton> vegai, iterating a vector looking for a match
16:44 -!- Raziel2p` [n=Raziel2p@ti0032a380-dhcp0316.bb.online.no] has joined
#go-nuts
16:45 < vegai> I don't know...  go doesn't do any kind of protection of a
shared resource anyway
16:45 < dgnorton> vegai, the vector holds pointers to a user defined type.
the vector has about 42K pointers in it
16:45 -!- ironfroggy__ [n=calvin@64.129.84.194] has quit [Read error: 104
(Connection reset by peer)]
16:45 < dgnorton> vegai, maybe some sort of cache sloshing type probelm
16:47 -!- ajray1 [n=alex@wvc32563rh.rh.ncsu.edu] has joined #go-nuts
16:47 < exDM69> vegai: accessing memory unsafely will cause slowdowns
because of CPU cache hierarchies
16:47 < vegai> oh, right.
16:48 < ajray1> what is the src []byte used for in the ebnf parser?
16:49 -!- jgoebel [n=jgoebel@96-28-100-3.dhcp.insightbb.com] has quit [Client
Quit]
16:49 < french> rhc: string -> buf -> string is used all over the
libraries in Go, and if the buf actually never gets GC'ed ....
16:49 -!- rovar [i=c7aca924@gateway/web/freenode/x-zlpydhqmkuutpaew] has joined
#go-nuts
16:49 < french> see strings.Map
16:49 -!- user__ [i=none@ip70-177-12-231.sb.sd.cox.net] has joined #go-nuts
16:49 < french> for example.  Actually I'll just do an test on that one
right now
16:49 -!- Capso [i=none@about/networking/128.0.0.0/Capso] has quit [Nick collision
from services.]
16:49 -!- Esmil [n=esmil@4704ds1-gjp.0.fullrate.dk] has quit [Read error: 104
(Connection reset by peer)]
16:49 -!- user__ [i=none@ip70-177-12-231.sb.sd.cox.net] has quit [Read error: 104
(Connection reset by peer)]
16:49 < exDM69> vegai: there was a good ddj article about a seemingly
parallel problem that ended up running sequentially because of memory hierarchies.
it had good solutions how to work around the problem.  too bad I can't find it now
16:50 -!- aa [n=aa@r200-40-114-26.ae-static.anteldata.net.uy] has joined #go-nuts
16:50 < dgnorton> exDM69, was that the one written by Herb Sutter?
16:51 < exDM69> dgnorton: probably
16:51 -!- evilhackerdude [n=stephan@e181124118.adsl.alicedsl.de] has quit [Read
error: 113 (No route to host)]
16:51 -!- interskh [n=interskh@c-67-163-156-103.hsd1.pa.comcast.net] has joined
#go-nuts
16:51 -!- bbeck [n=bbeck@dxr-fw.dxr.siu.edu] has quit [Read error: 104 (Connection
reset by peer)]
16:51 < dgnorton>
http://www.ddj.com/hpc-high-performance-computing/208801371
16:51 -!- triddell [n=tim@207-191-198-64.cpe.ats.mcleodusa.net] has left #go-nuts
[]
16:52 < exDM69> dgnorton: nope, not that one
16:53 < exDM69> it had lots of small code snippets and CPU usage graphs from
a 16 core system running the different algos
16:53 -!- bbeck [n=bbeck@dxr-fw.dxr.siu.edu] has joined #go-nuts
16:53 < diabolix> cache coherency can be a pain.  especially on intel cpus.
16:53 -!- pace_t_zulu [n=pacetzul@unaffiliated/pacetzulu/x-585030] has joined
#go-nuts
16:54 -!- Esmil [n=esmil@4704ds1-gjp.0.fullrate.dk] has joined #go-nuts
16:55 < french> rhc: exDM69: https://gist.github.com/3fc8a8119ff5244a64dc
<- uses 70mb just after running maptest(), then 30mb get GC'ed, but 40mb stay
16:55 < french> two buffers of 10mb, two strings of 10mb.  adds up, again.
16:55 < french> I'll write to the mailing list I guess
16:56 -!- voluspa [n=voluspa@x-134-84-102-227.reshalls.umn.edu] has quit [Read
error: 113 (No route to host)]
16:58 -!- diabolix [n=jsoyke@206.210.81.55] has quit ["Leaving"]
16:59 -!- dga [n=dga@63.226.120.198] has joined #go-nuts
16:59 -!- tcpip4000 [n=tcpip400@190.84.233.18] has joined #go-nuts
17:00 -!- keeto [n=keeto@121.54.92.149] has joined #go-nuts
17:01 -!- Cyprien [n=Cyprien@pub1.heig-vd.ch] has quit [Read error: 60 (Operation
timed out)]
17:02 -!- hipe [n=hipe@pool-74-108-181-155.nycmny.east.verizon.net] has quit
[Remote closed the connection]
17:02 -!- drusepth [n=drusepth@adsl-75-34-80-45.dsl.spfdmo.sbcglobal.net] has
joined #go-nuts
17:03 -!- hipe [n=hipe@pool-74-108-181-155.nycmny.east.verizon.net] has joined
#go-nuts
17:04 -!- mgdm [n=michael@pdpc/supporter/professional/mechanical-male] has joined
#go-nuts
17:04 -!- chickamade [n=chickama@222.254.12.228] has quit ["Leaving"]
17:04 -!- lazzurs [n=lazzurs@77.74.198.235] has quit [Read error: 60 (Operation
timed out)]
17:05 -!- drusepth` [n=drusepth@adsl-75-34-80-45.dsl.spfdmo.sbcglobal.net] has
joined #go-nuts
17:05 -!- lazzurs [n=lazzurs@77.74.198.235] has joined #go-nuts
17:05 < jorendorff> So, taking the address of a local variable is like
closing on it, right?  It keeps it alive?  (unlike C)
17:06 -!- doktoreas [n=doktorea@host55-2-dynamic.22-79-r.retail.telecomitalia.it]
has joined #go-nuts
17:06 -!- jeng [n=chatzill@75.110.231.66] has joined #go-nuts
17:06 -!- Sylvain_ [i=d4528311@gateway/web/freenode/x-tzaxbzirdjfflcmd] has quit
["Page closed"]
17:07 < french> exDM69: if you add "buf2 := make([]byte, int(stat.Size));"
and "file.Read(buf2);" to the program, the memory usage will be 60mb, but then
immediatly 20mb of that get collected.  Because string() was not used on buf2.
17:08 < scandal> jorendorff: yes
17:08 < jorendorff> thanks.
17:08 -!- calvin__ [n=calvin@64.129.84.194] has joined #go-nuts
17:08 -!- Raziel2p [n=Raziel2p@ti0032a380-dhcp0316.bb.online.no] has quit
[Connection timed out]
17:08 < scandal> jorendorff: also, when you return a pointer to a literal,
you get a *new* copy each time
17:08 < french> so I guess it's a bug.
17:09 -!- JSharpe [n=jamie@5ad1d7f1.bb.sky.com] has quit [Read error: 60
(Operation timed out)]
17:09 < sladegen> jorendorff: it doesn't have to be adress:
http://paste.lisp.org/display/90358
17:10 -!- serdar_ [n=serdar@84.60.254.126] has quit [Read error: 145 (Connection
timed out)]
17:11 -!- sjbrown [n=sjbrown@c-69-181-182-137.hsd1.ca.comcast.net] has joined
#go-nuts
17:11 < Snert> dho: sorry, been called away and I have to get ready for
dinner out; I'll try to prepare a bundle for you tomorrow morning.
17:12 < jorendorff> I'm aware of closures, thanks
17:12 < doktoreas> is there any tutorial about doing parallel processing
with go?
17:13 -!- ironfroggy__ [n=calvin@64.129.84.194] has joined #go-nuts
17:14 -!- dga [n=dga@63.226.120.198] has quit [Remote closed the connection]
17:14 -!- dga [n=dga@63.226.120.198] has joined #go-nuts
17:14 < dho> ok
17:15 < scandal> doktoreas: there is some discussion in the "effective go"
doc
17:15 -!- calvin__ [n=calvin@64.129.84.194] has quit [Read error: 104 (Connection
reset by peer)]
17:16 < doktoreas> thx scandal
17:16 < ajray1> the ebnf package takes a bit of getting use to
17:16 < jorendorff> mini-bug, maybe -- The language specification seems to
claim literals aren't addressable.
17:16 -!- hipe [n=hipe@pool-74-108-181-155.nycmny.east.verizon.net] has quit
[Remote closed the connection]
17:16 -!- piotr [n=piotr@chello084010208203.chello.pl] has quit ["Leaving"]
17:17 -!- hyn [n=hyn@p0a38fe.tokyte00.ap.so-net.ne.jp] has quit ["Get MacIrssi -
http://www.sysctl.co.uk/projects/macirssi/"]
17:17 < scandal> jorendorff: there is a corner can where if you define a
method on a pointer type, you can't use it with literals
17:17 < scandal> for example, (v *SomeType) Foo() you can't do
Sometype{}.Foo()
17:18 < scandal> just like in c++ you can't take the addr of a temporary
17:18 < jorendorff> scandal: huh.  a limitation of the implementation, or is
that intentional?
17:18 -!- delza [n=delza@209-52-232-202.vlan452.static.ucc-net.ca] has joined
#go-nuts
17:19 < scandal> its intentional
17:19 -!- serdar_ [n=serdar@dslb-084-062-234-086.pools.arcor-ip.net] has joined
#go-nuts
17:19 < jorendorff> but you can do x := &SomeType{}; x.Foo(); ?
17:19 < scandal> yup
17:19 -!- levicook [n=levicook@gw.alice.com] has quit []
17:20 -!- hipe [n=hipe@pool-74-108-181-155.nycmny.east.verizon.net] has joined
#go-nuts
17:20 < rhc> this works for me: func (s *MyType) foo() {} type MyType struct
{} func main() { (&MyType{}).foo(); }
17:20 -!- drusepth [n=drusepth@adsl-75-34-80-45.dsl.spfdmo.sbcglobal.net] has quit
[Read error: 110 (Connection timed out)]
17:20 < jorendorff> yeah, I can even write (&SomeType{}).Foo();
17:20 < scandal> also you can do: x := Sometype{}; x.Foo()
17:20 < rhc> ah, I gues cause & is allocation
17:20 < jorendorff> Actually I can even write (SomeType{}).Foo()
17:21 < jorendorff> oops, hang on
17:21 < dgnorton> i thought i read somewhere that a slice could be made like
slice := myarray[10:20]; ...  is there some syntax like that or do I have to use
make()?
17:21 < asmo> Where do I define how many processors Go should use?
17:21 -!- banthar [n=banthar@chello084010208203.chello.pl] has joined #go-nuts
17:21 < asmo> It seems that it only uses one core atm...
17:21 < jorendorff> dgnorton: you can, there is syntax liket hat
17:21 < dgnorton> asmo, GOMAXPROCS environment variable
17:21 < rhc> jorendorff: that gives me cannot call pointer method on (node
STRUCTLIT)
17:21 < asmo> thanks
17:21 < jorendorff> correction, "cannot call pointer method on (node
STRUCTLIT)"
17:22 < jorendorff> yeah, I hadn't typed what I thought I had
17:22 -!- drusepth [n=drusepth@75.34.80.45] has joined #go-nuts
17:22 < scandal> jorendorff: ah yes, i was off a bit.  that's what i was
referring to
17:22 < aninhumer> I've implemented a map that can use interfaces as the key
type using a pair of slices, why can't this be allowed in the built in map type?
17:22 -!- teedex [n=teedex@204.14.155.161] has joined #go-nuts
17:23 < scandal> aninhumer: i believe because map keys need to be immutable
17:23 -!- calvin__ [n=calvin@64.129.84.194] has joined #go-nuts
17:23 -!- Kashia [n=Kashia@port-92-200-27-151.dynamic.qsc.de] has joined #go-nuts
17:23 -!- JSharpe [n=jamie@5ad1d7f1.bb.sky.com] has joined #go-nuts
17:24 -!- ironfroggy__ [n=calvin@64.129.84.194] has quit [Read error: 60
(Operation timed out)]
17:24 -!- raichoo [n=raichoo@i577B8E89.versanet.de] has joined #go-nuts
17:24 -!- Esmil [n=esmil@4704ds1-gjp.0.fullrate.dk] has quit [Read error: 104
(Connection reset by peer)]
17:24 -!- lgolds [n=lucky@93-82-90-164.adsl.highway.telekom.at] has joined
#go-nuts
17:24 < aninhumer> Hmm, then how about a pointer to an interface as the key
type?
17:26 < jorendorff> actually the language specification appears to claim you
*can* use an interface type as a map key type
17:26 -!- dga [n=dga@63.226.120.198] has quit [Read error: 145 (Connection timed
out)]
17:26 < KirkMcDonald> If the underlying object can be used as one.
17:27 < jorendorff> yes--you can't mix keys of different types
17:27 < jorendorff> in the same map, you'll unpredictably get run-time
errors
17:27 -!- ajray1 [n=alex@wvc32563rh.rh.ncsu.edu] has left #go-nuts []
17:28 -!- kim__ [n=kim@207-179-247-248.mtco.com] has quit [Read error: 110
(Connection timed out)]
17:28 -!- Esmil [n=esmil@4704ds1-gjp.0.fullrate.dk] has joined #go-nuts
17:28 < jorendorff> wait, that's wrong...
17:29 -!- sm [n=sm@pool-71-189-233-10.lsanca.dsl-w.verizon.net] has joined
#go-nuts
17:30 < aninhumer> KirkMcDonald, So a map[interface{}] would work as long as
you only used constants and strings and such?
17:30 < dgnorton> I have a vector of pointers (to type Dog struct).  I want
to say "d := myvec.Data()" and then create slices "d0 := d[0:9999]; d1 :=
d[10000:19999];" and pass them to a function foo().  What is the parameter type of
foo?  func foo(dogs []*Dog) is sort of what I would like to have but that doesn't
work.
17:32 -!- Kniht [n=kniht@c-68-58-17-177.hsd1.in.comcast.net] has quit ["Leaving"]
17:32 -!- hipe [n=hipe@pool-74-108-181-155.nycmny.east.verizon.net] has quit
[Remote closed the connection]
17:33 < aninhumer> dgnorton, *[]Dogs ?
17:33 < tromp_> why doesn't []*Dogs work?
17:33 < aninhumer> []*Dogs is a slice of pointers, *[]Dogs is a pointer to a
slice
17:33 * offby1 has a C deja-vu
17:33 -!- calvin__ [n=calvin@64.129.84.194] has quit [Read error: 60 (Operation
timed out)]
17:34 -!- calvin__ [n=calvin@64.129.84.194] has joined #go-nuts
17:34 < tromp_> but he has a slice of pointers
17:34 < dgnorton> tromp_, correct
17:34 < aninhumer> oh right...  I should probably read stuff slower :P
17:34 < jorendorff> the static type, though, is []interface{}
17:35 -!- ote [n=shapor@yzf.shapor.com] has left #go-nuts []
17:35 < dgnorton> jorendorff, yes and that's what the compiler complains
about
17:35 < jorendorff> I don't think there's an answer in the language for what
you want;
17:36 < dgnorton> jorendorff, i can't pass a slice of interfaces?
17:36 < jorendorff> if you actually have an array of that type somewhere,
yes
17:37 -!- banthar [n=banthar@chello084010208203.chello.pl] has quit ["Leaving"]
17:37 < jorendorff> but a Vector is implemented, I'm guessing, as an array
of interface{}, not an array of Dog
17:37 < jorendorff> you could probably write IterDogs(myvec *Vector, start,
stop int) Dog chan {
17:37 < dgnorton> jorendorff, that's correct.  So can I change foo to take a
slice of interfaces?  I tried that too but it didn't work...i probably had the
syntax wrong.
17:38 < jorendorff> oh, that part is easier I think
17:38 < jorendorff> dgnorton: probably (dogs []interface{})
17:38 < jorendorff> and inside, you can just cast dog := dogs[i].(*Dog)
17:39 -!- no_mind_ [n=orion@122.162.27.69] has joined #go-nuts
17:39 -!- no_mind [n=orion@122.161.124.147] has quit [Nick collision from
services.]
17:39 -!- nmichaels [n=nathan@dhcp-0-50-ba-58-39-ed.cpe.townisp.com] has joined
#go-nuts
17:39 -!- clearscreen [n=clearscr@e248070.upc-e.chello.nl] has quit [Read error:
54 (Connection reset by peer)]
17:40 -!- drusepth` [n=drusepth@adsl-75-34-80-45.dsl.spfdmo.sbcglobal.net] has
quit [Read error: 110 (Connection timed out)]
17:40 -!- grajo [n=grajo@dynamic-78-8-28-129.ssp.dialog.net.pl] has joined
#go-nuts
17:40 < nmichaels> If I'm trying to send a string to a writer, is there an
easy way to cast it so the parameter looks like a []byte?
17:40 < dgnorton> jorendorff, I was missing the {} on the end eariler
17:40 -!- gnomon
[n=gnomon@CPE0022158a8221-CM000f9f776f96.cpe.net.cable.rogers.com] has quit [Read
error: 60 (Operation timed out)]
17:40 -!- Neil [n=neil@82.132.139.111] has joined #go-nuts
17:40 -!- gnomon
[n=gnomon@CPE0022158a8221-CM000f9f776f96.cpe.net.cable.rogers.com] has joined
#go-nuts
17:40 -!- serdar_ [n=serdar@dslb-084-062-234-086.pools.arcor-ip.net] has quit
[Read error: 110 (Connection timed out)]
17:40 < jorendorff> nmichaels: import "strings"; Bytes(str)
17:41 < jorendorff> er, strings.Bytes
17:41 -!- daganev [n=daganev@99.32.245.41] has left #go-nuts []
17:41 < jorendorff> nmichaels: that probably allocates a copy though
17:41 -!- serdar_ [n=serdar@dslb-084-060-234-025.pools.arcor-ip.net] has joined
#go-nuts
17:41 < jorendorff> nmichaels: casting would be unsafe, since strings are
supposed to be immutable
17:42 < nmichaels> jorendorff: right, thanks
17:42 -!- Neil [n=neil@82.132.139.111] has quit [Client Quit]
17:42 -!- ironfroggy__ [n=calvin@64.129.84.194] has joined #go-nuts
17:42 -!- nmichaels [n=nathan@dhcp-0-50-ba-58-39-ed.cpe.townisp.com] has left
#go-nuts []
17:42 -!- path__ [n=path@59.162.86.164] has quit []
17:43 -!- pshahmumbai [n=prashant@59.164.25.110] has joined #go-nuts
17:43 -!- trickie [n=trickie@94.100.112.225] has quit [Read error: 113 (No route
to host)]
17:43 -!- calvin__ [n=calvin@64.129.84.194] has quit [Read error: 60 (Operation
timed out)]
17:43 -!- chachan [n=chachan@ccscliente156.ifxnetworks.net.ve] has quit [Read
error: 113 (No route to host)]
17:43 -!- rowdog [n=jth@h19.147.30.71.dynamic.ip.windstream.net] has joined
#go-nuts
17:44 -!- Raziel2p` [n=Raziel2p@ti0032a380-dhcp0316.bb.online.no] has quit [Read
error: 60 (Operation timed out)]
17:44 -!- Fl1pFl0p1 [n=FlipFlop@ip68-8-225-187.sd.sd.cox.net] has joined #go-nuts
17:45 -!- homovitruvius [n=maurizio@pool-72-95-253-175.pitbpa.east.verizon.net]
has joined #go-nuts
17:45 -!- Snert [n=achowe@puff.snert.com] has quit ["ChatZilla 0.9.85 [Firefox
3.5.5/20091102152451]"]
17:45 -!- danly [n=danlesli@S010600226b5eab8e.vs.shawcable.net] has joined
#go-nuts
17:45 -!- grajo [n=grajo@dynamic-78-8-28-129.ssp.dialog.net.pl] has quit
["Leaving"]
17:45 -!- bbeck [n=bbeck@dxr-fw.dxr.siu.edu] has quit [Remote closed the
connection]
17:46 -!- iant [n=iant@nat/google/x-sqciwazqxkbmrczn] has joined #go-nuts
17:47 -!- mode/#go-nuts [+v iant] by ChanServ
17:47 -!- pace_t_zulu [n=pacetzul@unaffiliated/pacetzulu/x-585030] has quit []
17:48 -!- defectiv [n=clays@c-24-5-65-40.hsd1.ca.comcast.net] has joined #go-nuts
17:48 -!- Fl1pFl0p1 [n=FlipFlop@ip68-8-225-187.sd.sd.cox.net] has quit [Client
Quit]
17:49 -!- rowdog [n=jth@h19.147.30.71.dynamic.ip.windstream.net] has quit
["leaving"]
17:49 -!- ironfroggy__ [n=calvin@64.129.84.194] has quit [Remote closed the
connection]
17:49 -!- ironfroggy__ [n=calvin@64.129.84.194] has joined #go-nuts
17:50 < uriel> good morning iant :)
17:50 <+iant> morning
17:50 <+iant> I see the channel has dropped below 500, probably a good sign
17:51 < ikke> lol, the hype is gone :(
17:51 < ikke> maybe they are just waiting chrome os
17:51 -!- rowdog [n=jth@h19.147.30.71.dynamic.ip.windstream.net] has joined
#go-nuts
17:51 < uriel> yea, things are starting to calm down, it is nice..
17:52 < gl> http is crap :/
17:52 * gl struggles with the f*cking protocol
17:52 -!- howboutjoe [n=howboutj@65-120-132-14.dia.static.qwest.net] has quit []
17:52 < hagna> I came here because of the hype
17:53 < aninhumer> There's only so much documentation to read...
17:53 -!- KinOfCain [n=KinOfCai@rrcs-64-183-61-2.west.biz.rr.com] has joined
#go-nuts
17:54 -!- zero-1 [n=macbook@200.56.104.192.dsl.dyn.telnor.net] has joined #go-nuts
17:54 -!- bquinn [n=bquinn@nat/yahoo/x-zetmwcyrxvoubfuo] has quit []
17:54 -!- calvin__ [n=calvin@64.129.84.194] has joined #go-nuts
17:54 -!- Soulou [n=Soulou@bro67-2-82-225-6-71.fbx.proxad.net] has joined #go-nuts
17:55 < Soulou> Hello !
17:55 -!- spinout [n=s@adsl-71-146-141-45.dsl.pltn13.sbcglobal.net] has quit [Read
error: 110 (Connection timed out)]
17:56 -!- defectiv [n=clays@c-24-5-65-40.hsd1.ca.comcast.net] has quit ["Leaving"]
17:56 < Soulou> GO compilation error :
17:56 < Soulou> --- cd ../misc/cgo/stdio
17:56 < Soulou> rm -rf *.[568vqo] *.a [568vq].out *.cgo[12].go *.cgo[34].c
*.so _obj _test _testmain.go hello fib chain run.out
17:56 < Soulou> cgo file.go
17:56 < Soulou> could not determine kind of name for C.CString
17:56 < Soulou> could not determine kind of name for C.puts
17:57 < Soulou> could not determine kind of name for C.fflushstdout
17:57 < Soulou> could not determine kind of name for C.free
17:57 < Soulou> failed to interpret gcc output:
17:57 -!- ironfroggy__ [n=calvin@64.129.84.194] has quit [Connection reset by
peer]
17:57 < Soulou> cc1: warnings being treated as errors
17:57 < Soulou> ARCH amd64 OS Linux
17:57 <+iant> Soulou: which version of gcc is installed on your system?
17:57 < Soulou> 4.4.2
17:58 < Soulou> Fedora 12 Bêta
17:58 <+iant> are your Go sources up to date (e.g., hg pull -u)
17:58 -!- drusepth [n=drusepth@75.34.80.45] has quit [Read error: 110 (Connection
timed out)]
17:58 < Soulou> I just got them
17:58 < Soulou> 10min ago
17:58 < sjbrown> is there a link to download all the documentation that's on
the website?
17:59 -!- ineol [n=hal@mar75-9-88-171-191-168.fbx.proxad.net] has joined #go-nuts
17:59 < sjbrown> I want the FAQ and Effective Go as well
17:59 <+iant> Soulou: please file an issue for this in the issue tracker; I
don't know what the problem is
17:59 < uriel> sjbrown: it is included with the distribution
17:59 < scandal> just compiled it on my f12 box--no errors
17:59 -!- MrTopf [n=mrtopf@p5B397E4B.dip.t-dialin.net] has quit [Remote closed the
connection]
17:59 <+iant> sjbrown: it's all in the doc directory
17:59 -!- clearscreen [n=clearscr@e248070.upc-e.chello.nl] has joined #go-nuts
17:59 < Soulou> ok, go to bug tracker =)
18:00 < sjbrown> thanks
18:01 < depood> i hope, someone writes soon a good go book for non-c writer
^^
18:01 < zero-1> Hi everyone has anyone run into the following problem when
installing go?: --- FAIL: http.TestClient
18:01 < zero-1> Get http://www.google.com/robots.txt: dial tcp
www.google.com:http: lookup www.google.com.  on 4.2.2.1:53: no answer from server
18:01 -!- amacleod [n=amacleod@c-24-34-33-96.hsd1.ma.comcast.net] has joined
#go-nuts
18:01 < sladegen> sjbrown: godoc --http=:6060 &
18:01 <+iant> zero-1: that happens if you have a firewall, you can ignore
the test failure
18:02 < zero-1> iant: no firewall though :(
18:02 <+iant> it also happens if you use an HTTP proxy
18:03 <+iant> it's a DNS failure of some sort
18:03 <+iant> that is, a failure in Go's DNS client
18:04 < dho> man, a couple people on that list need a serious chill-pill
18:05 < michaelh> does anyone have the url of that blog comparing stackless
python to go?
18:05 -!- ShadowIce [n=pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
18:05 < michaelh> (someone pasted it earlier)
18:05 < alexsuraci> michaelh: is this it?
http://dalkescientific.com/writings/diary/archive/2009/11/15/100000_tasklets.html
18:06 -!- zero-1 [n=macbook@200.56.104.192.dsl.dyn.telnor.net] has quit []
18:07 -!- zhaozhou [n=zhaozhou@linfast76.bitnet.nu] has joined #go-nuts
18:07 < michaelh> thank you!
18:08 < Soulou> It is a minor bug, because i realized i've got binaries
18:08 < Soulou> so i can use the language, but i think some items are
missing
18:09 -!- triddell [n=tim@207-191-198-64.cpe.ats.mcleodusa.net] has joined
#go-nuts
18:09 -!- nsa310 [n=Adium@dyn26-165.roaming.few.vu.nl] has joined #go-nuts
18:09 -!- engla [n=ulrik@wikipedia/Sverdrup] has quit [Read error: 110 (Connection
timed out)]
18:09 -!- nsa310 [n=Adium@dyn26-165.roaming.few.vu.nl] has left #go-nuts []
18:11 -!- conra [n=konrad@host-89-229-12-166.torun.mm.pl] has quit ["Leaving."]
18:13 -!- engla [n=ulrik@90-229-231-23-no153.tbcn.telia.com] has joined #go-nuts
18:15 -!- directrixx [n=directri@ip68-231-189-247.tc.ph.cox.net] has joined
#go-nuts
18:18 -!- directrixx [n=directri@ip68-231-189-247.tc.ph.cox.net] has left #go-nuts
[]
18:18 -!- yourpalal [n=alex@198.161.51.49] has joined #go-nuts
18:19 -!- calvin__ [n=calvin@64.129.84.194] has quit [Read error: 110 (Connection
timed out)]
18:21 -!- vt100 [n=vt@cust125.179.113.38.dsl.g3telecom.net] has joined #go-nuts
18:21 < dho> iant: thank god
18:22 < dho> that jqb guy is awful
18:22 <+iant> his comments are starting to seem somewhat pointless to me
18:22 < dho> i want to reach throug the internets, grab him by the throat
and shake him
18:22 < dho> where's his non-amateurish language?
18:22 < dho> silly trolls.
18:22 -!- nocturnal [n=nocturna@ce05910.cenara.com] has joined #go-nuts
18:22 -!- cablehead [n=Adium@nat/slide/x-ashpzntpemrqqeos] has joined #go-nuts
18:22 -!- serdar_ [n=serdar@dslb-084-060-234-025.pools.arcor-ip.net] has quit
[Read error: 113 (No route to host)]
18:22 < uriel> he has got a huge sign hovering and blinking over his head
saying: 'T-R-O-L-L'
18:23 < uriel> bleh, dho beat me to it :)
18:23 -!- serdar_ [n=serdar@dslb-084-062-250-219.pools.arcor-ip.net] has joined
#go-nuts
18:23 -!- nocturnal [n=nocturna@ce05910.cenara.com] has left #go-nuts []
18:23 -!- directrixx [n=aleksand@ip68-231-189-247.tc.ph.cox.net] has joined
#go-nuts
18:23 -!- thepalephantom [n=thepalep@64.129.209.162] has quit []
18:24 -!- Soulou [n=Soulou@bro67-2-82-225-6-71.fbx.proxad.net] has quit []
18:24 -!- Soulou [n=Soulou@bro67-2-82-225-6-71.fbx.proxad.net] has joined #go-nuts
18:25 -!- diabolix [n=jsoyke@206.210.81.55] has joined #go-nuts
18:26 < yourpalal> Hi! I'm working on a go app which won't compile.  The
problem seems to be with my select statement, and I have written an example which
distills the problem at http://pastebin.ca/1675137.  any ideas?
18:26 -!- Robbo_ [n=cogs@CPE-121-216-207-237.lnse3.ken.bigpond.net.au] has joined
#go-nuts
18:27 <+iant> yourpalal: what is the compilation error?
18:27 -!- mitchellh [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has joined
#go-nuts
18:27 < yourpalal> syntax error near default
18:27 < yourpalal> and syntax error near return
18:27 <+iant> s/case default/default/
18:28 <+iant> yourpalal: that is, don't write "case default:" just write
"default:"
18:28 < yourpalal> omg
18:28 < yourpalal> thanks!
18:29 -!- mitchellh [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has quit
[Client Quit]
18:29 -!- Jan_Flanders [n=chatzill@d54C1E33B.access.telenet.be] has quit [Read
error: 54 (Connection reset by peer)]
18:29 < scandal> has there been any discussion about something ala memcpy()
for working with arrays?  all of the Copy() functions seem to loop through all
elements.
18:30 -!- Jan_Flanders [n=chatzill@d54C1E33B.access.telenet.be] has joined
#go-nuts
18:30 < dgnorton> danderson, vegai, exDM69: Regarding my little test app
from earlier that was searching a vector.  Creating 4 array slices from the vector
and having go routines search those instead of the entire vector dropped the time
from 8 seconds to 5.
18:30 <+iant> scandal: since Go is intended to be type-safe, it's hard to
avoid looping through elements unless you import "unsafe"
18:31 <+iant> memcpy is effectively an unsafe interface in Go terms
18:31 -!- mennis [n=mennis@adsl-068-016-104-079.sip.asm.bellsouth.net] has quit
[Read error: 60 (Operation timed out)]
18:32 < french> iant: you replied to my post on the mailing list.  I got a
new example here: https://gist.github.com/26afe2f8be13a46981f7
18:32 < french> it must be a bug.
18:32 < french> because it uses 400mb of memory when running it
18:32 -!- teedex [n=teedex@204.14.155.161] has quit [Remote closed the connection]
18:33 -!- Robbo_ [n=cogs@CPE-121-216-207-237.lnse3.ken.bigpond.net.au] has left
#go-nuts []
18:33 <+iant> french: how big is tab/cards.tab?
18:33 < french> 20mb
18:33 <+iant> so your program is going to use 200mb for sure
18:33 < french> why?
18:33 <+iant> because we only have a simpled minded garbage collector at
present
18:34 <+iant> and you load the file into memory 10 times
18:34 -!- p4p4 [n=P4p4@24.121.113.82.net.de.o2.com] has joined #go-nuts
18:34 -!- yourpalal [n=alex@198.161.51.49] has quit ["WeeChat 0.3.0"]
18:34 <+iant> not only do you load the file into memory, you then convert
the contents to a string, which winds up making another copy
18:34 <+iant> so there is your 400mb right there
18:35 <+iant> so, sure, there is a bug, which is that the GC needs work, but
we know that
18:35 < french> alright then so it's a GC limitation.
18:35 <+iant> yes
18:35 -!- MrTopf [n=mrtopf@p579F06BB.dip.t-dialin.net] has joined #go-nuts
18:35 < french> ok thanks
18:35 -!- ring-zero [n=hotshot@117.199.129.151] has joined #go-nuts
18:36 -!- teedex [n=teedex@204.14.155.161] has joined #go-nuts
18:37 -!- Kashia [n=Kashia@port-92-200-27-151.dynamic.qsc.de] has quit [Read
error: 60 (Operation timed out)]
18:37 -!- Wi11_ [n=william@dhcp-0-14-bf-38-80-9c.cpe.powergate.ca] has joined
#go-nuts
18:38 -!- Wi11 [n=william@dhcp-0-14-bf-38-80-9c.cpe.powergate.ca] has quit [Read
error: 104 (Connection reset by peer)]
18:40 -!- lgolds [n=lucky@93-82-90-164.adsl.highway.telekom.at] has left #go-nuts
[]
18:41 -!- gasreaa [n=atwong@nat/slide/x-laikwsduzeuuvnhy] has joined #go-nuts
18:42 -!- french [i=534c5d6b@gateway/web/freenode/x-wvrfrvvjqfsnaonp] has quit
["Page closed"]
18:42 < penguin42> can you explicitly trigger the GC - e.g.  if you know
you've just finished with 400mb of data?
18:42 -!- yourpalal [n=alex@198.161.51.49] has joined #go-nuts
18:43 -!- clearscreen [n=clearscr@e248070.upc-e.chello.nl] has quit [Read error:
104 (Connection reset by peer)]
18:43 -!- pshahmumbai [n=prashant@59.164.25.110] has quit ["Ex-Chat"]
18:43 -!- Soulou [n=Soulou@bro67-2-82-225-6-71.fbx.proxad.net] has left #go-nuts
[]
18:43 -!- serdar_ [n=serdar@dslb-084-062-250-219.pools.arcor-ip.net] has quit
[Read error: 110 (Connection timed out)]
18:44 -!- hipe__ [n=hipe@cpe-67-247-12-10.nyc.res.rr.com] has joined #go-nuts
18:44 -!- serdar_ [n=serdar@dslb-084-062-226-039.pools.arcor-ip.net] has joined
#go-nuts
18:44 < dgnorton> is there a non-blocking way to read from a channel?  a
test to see if there is data to read?
18:44 < exch> dgnorton: data, ok <- chan;
18:44 < exch> ko will be true/false depending on success
18:44 <+iant> dgnorton: and, for a buffered channel, len(ch)
18:44 < exch> *ok
18:45 < dgnorton> exch, iant, thanks!
18:46 < dgnorton> iant, now that you mention that, i remember you telling
someone else that several days ago.  Wish I had better memory.  :)
18:46 < Gracenotes> penguin42: I don't see one
18:46 -!- cmarcelo [n=cmarcelo@enlightenment/developer/cmarcelo] has quit [Remote
closed the connection]
18:48 < scandal> iant: i was trying to see it was possible to make typesafe
Copy() function that used memcpy http://gopaste.org/n3btr
18:48 < scandal> but i guess a slice is not a pointer
18:48 <+iant> scandal: that is true, a slice is a three element struct
holding a pointer, a length, and a capacity
18:48 -!- phosphoer [n=user@66-192-186-101.static.twtelecom.net] has joined
#go-nuts
18:49 <+iant> scandal: you could take a look at reflect.ArrayCopy
18:50 < phosphoer> I'm having an issue installing gccgo, when I run make I
get error 2 towards the end of the process
18:50 < phosphoer> Installing through cygwin on windows xp
18:51 <+iant> phosphoer: you should get some output from make indicating
what the error is
18:51 -!- nmichaels [n=nathan@dhcp-0-50-ba-58-39-ed.cpe.townisp.com] has joined
#go-nuts
18:51 < nmichaels> Is there a way to check to see if a channel has any data
for me without blocking?
18:52 <+iant> nmichaels: if the channel is buffered, then len(ch) will
return the number of elements on the channel
18:52 <+iant> nmichaels: or you can use v, ok := <- ch to do a
non-blocking receive
18:52 < nmichaels> iant: Thanks!
18:53 -!- becks` [n=becks_@38-163.104-92.cust.bluewin.ch] has joined #go-nuts
18:53 < nmichaels> Do I have to do something special to create a buffered
channel, or is "var ch chan bool" enough?
18:53 <+iant> obviously you can have race conditions if you rely on
len(ch)--somebody else might pull a value off, somebody might add a value just
after you check
18:54 <+iant> nmichaels: you have to create a channel using the make
function; to create a buffered channel, do "make(chan TYPE, N)" where N is the
buffer size
18:54 < phosphoer> I see something right above it that says, "unrecognized
-a option 'ware' "
18:54 < Gracenotes> nmichaels: that creates a 'zero value' of that type.
which is an unbuffered channel
18:54 < nmichaels> ah
18:54 < Gracenotes> I think at least.  likewise, the zero value for a string
is ""...  hm, I'll have to check the specs actually
18:55 < scandal> iant: wow, thanks for that pointer.  i missed
reflect.ArrayCopy() and reflect.DeepEqual()
18:55 <+iant> Gracenotes: actually the zero value of a channel is just nil;
you have to create the channel using make()
18:55 < Gracenotes> oh, right.  *facepalm*
18:56 < Gracenotes> but yeah, make without an explicit buffer length is
unbuffered.  as I learned messily
18:56 <+iant> right
18:56 -!- Alkavan [n=igal@77.127.229.182] has joined #go-nuts
18:56 < nmichaels> Okay, so here's another one: I want to read from stdin in
my program, but it doesn't seem to get any data unless I don't put the reader
function in a goroutine.  Also, that would explain the stack dumps I've been
seeing.
18:57 <+iant> nmichaels: os.Stdin.Read ought to work....
18:58 -!- phosphoer [n=user@66-192-186-101.static.twtelecom.net] has quit [Remote
closed the connection]
18:58 < nmichaels> iant: I used bufio.NewReader(os.Stdin) and read from
that.
18:59 < dgnorton> iant, if I fire off multiple go routines and I want all of
them to stop when one finds the answer, how can I do that?
18:59 < Gracenotes> probably check every so often
19:00 -!- hipe__ [n=hipe@cpe-67-247-12-10.nyc.res.rr.com] has quit [Read error:
104 (Connection reset by peer)]
19:00 -!- chachan [n=chachan@ccscliente156.ifxnetworks.net.ve] has joined #go-nuts
19:00 < dgnorton> Gracenotes, check what?
19:00 < nmichaels> dgnorton: you could use a channel to broadcast done-ness.
19:00 -!- Cyprien [n=Cyprien@43-180.203-62.cust.bluewin.ch] has joined #go-nuts
19:01 < drhodes> could dgnorton have have shared (chan bool) that all the
goroutines push to?
19:01 < Gracenotes> goroutines can't kill other goroutines, because that
might result in incomplete data structures.  channels are the communication
primitive to consider
19:01 < nmichaels> dgnorton: or, and I don't know if this is kosher, just
use a global variable.
19:01 < dgnorton> nmichaels, not kosher :)
19:01 < nmichaels> sigh
19:02 < Gracenotes> you can use non-blocking sends/gets for this
19:02 < dgnorton> nmichaels, as far as "broadcast done-ness" goes, I'm
guessing once one go routine reads from the channel that the data is gone
19:03 < dgnorton> nmichaels, might be able to create a buffered channel and
have all go routines check len()
19:03 < Gracenotes> it depends on your situation.  in my case, I did have
two goroutines doing competing tasks, and then at the end, if mychan <- true {
finish up, but only if we're first }
19:03 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"]
19:04 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
19:04 < Gracenotes> the value I put into it doesn't matter.  it is a chan
with length 1, btw.  you might want a non-blocking receive instead..  I don't know
your situation exactly
19:04 < drhodes> is it safe to think of a channel as a pointer to a
threadsafe queue with syntax support?
19:05 < dgnorton> Gracenotes, that in a package?
19:05 < Gracenotes> non-blocking channel communications is part of the
language spec
19:05 < facemelter> wasn't there somebody in here who coded an IRC-bot?
19:05 < Gracenotes> facemelter: I did
19:05 -!- cmarcelo [n=cmarcelo@200.184.118.130] has joined #go-nuts
19:06 -!- voluspa [n=voluspa@x-134-84-102-227.reshalls.umn.edu] has joined
#go-nuts
19:06 < Gracenotes> here is the basic framework,
http://go.pastebin.com/m3464c811 not excluding the main other application, which
is in #go-run - executing Go statements remotely
19:06 < Gracenotes> to be moved to here when it's stable enough.  -.-
19:07 -!- serdar_ [n=serdar@dslb-084-062-226-039.pools.arcor-ip.net] has quit
[Read error: 110 (Connection timed out)]
19:08 -!- serdar_ [n=serdar@dslb-084-060-206-034.pools.arcor-ip.net] has joined
#go-nuts
19:08 -!- WalterMundt [n=waltermu@twiki/developer/EtherMage] has joined #go-nuts
19:09 -!- nmichaels [n=nathan@dhcp-0-50-ba-58-39-ed.cpe.townisp.com] has left
#go-nuts []
19:10 -!- __ed [i=bitch@anal-co.it] has quit ["changing servers"]
19:10 -!- __ed [i=bitch@anal-co.it] has joined #go-nuts
19:11 -!- sockmonk [n=user@pixout.appriss.com] has joined #go-nuts
19:11 < yourpalal> I'd assume the zero value for a bool is false.  Is that
right?
19:11 < gl> 0
19:11 < gl> *rimshot*
19:13 -!- hipe [n=hipe@69.193.196.185] has joined #go-nuts
19:13 < Gracenotes> well, 1, sort of o-o
19:16 -!- bjarneh [n=bjarneh@1x-193-157-194-25.uio.no] has quit ["leaving"]
19:17 -!- jgoebel [n=jgoebel@96-28-100-3.dhcp.insightbb.com] has joined #go-nuts
19:17 -!- dmeikle [n=dmeikle@apache/committer/dmeikle] has joined #go-nuts
19:17 -!- diltsman_ [n=diltsman@128.187.128.6] has joined #go-nuts
19:17 -!- yourpalal [n=alex@198.161.51.49] has quit [Read error: 104 (Connection
reset by peer)]
19:19 -!- jA_cOp [n=yakobu@ti0043a380-3093.bb.online.no] has quit ["Leaving"]
19:19 -!- sm [n=sm@pool-71-189-233-10.lsanca.dsl-w.verizon.net] has quit [Remote
closed the connection]
19:19 -!- baldmountain [n=baldmoun@65.219.200.66] has joined #go-nuts
19:19 -!- buluca [n=buluca@unaffiliated/buluca] has joined #go-nuts
19:19 -!- buluca [n=buluca@unaffiliated/buluca] has left #go-nuts []
19:21 -!- doktoreas [n=doktorea@host55-2-dynamic.22-79-r.retail.telecomitalia.it]
has quit [Read error: 110 (Connection timed out)]
19:21 -!- lenst [n=user@90-229-131-67-no52.tbcn.telia.com] has left #go-nuts ["ERC
Version 5.3 (IRC client for Emacs)"]
19:22 -!- Wi11 [n=william@dhcp-0-14-bf-38-80-9c.cpe.powergate.ca] has joined
#go-nuts
19:22 -!- Wi11_ [n=william@dhcp-0-14-bf-38-80-9c.cpe.powergate.ca] has quit [Read
error: 104 (Connection reset by peer)]
19:23 -!- ajray [n=alex@nom27935d.nomadic.ncsu.edu] has joined #go-nuts
19:24 < ajray> iant: whats the filename for in ebnf.Parse() ?
19:24 -!- ring-zero [n=hotshot@117.199.129.151] has quit [Read error: 131
(Connection reset by peer)]
19:24 < ajray> took me a while to figure out that the grammar actually goes
in the []byte >.<
19:25 -!- jeng [n=chatzill@75.110.231.66] has quit ["ChatZilla 0.9.85 [Firefox
3.5.5/20091102152451]"]
19:25 -!- engla [n=ulrik@wikipedia/Sverdrup] has quit [Read error: 60 (Operation
timed out)]
19:27 -!- ShadowIce [n=pyoro@unaffiliated/shadowice-x841044] has quit
["Verlassend"]
19:28 -!- Alkavan [n=igal@77.127.229.182] has quit [Read error: 110 (Connection
timed out)]
19:28 -!- Alkavan [n=igal@77.127.229.182] has joined #go-nuts
19:29 -!- voluspa [n=voluspa@x-134-84-102-227.reshalls.umn.edu] has quit [Read
error: 113 (No route to host)]
19:30 -!- ShadowIce [n=pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
19:34 -!- rovar [i=c7aca924@gateway/web/freenode/x-zlpydhqmkuutpaew] has quit
["Page closed"]
19:34 -!- Lee` [n=user@94.170.148.183] has joined #go-nuts
19:34 -!- armence [n=armence@c-67-188-229-128.hsd1.ca.comcast.net] has joined
#go-nuts
19:35 -!- eydaimon [n=eydaimon@unaffiliated/anywho] has left #go-nuts ["WeeChat
0.3.0"]
19:35 -!- BeaN [n=afitz@adsl-190-192-124.asm.bellsouth.net] has joined #go-nuts
19:36 -!- diltsman_ [n=diltsman@128.187.128.6] has quit [Read error: 110
(Connection timed out)]
19:36 -!- engla [n=ulrik@90-229-231-23-no153.tbcn.telia.com] has joined #go-nuts
19:36 -!- asyncster [n=asyncste@206.169.213.106] has joined #go-nuts
19:37 < asyncster> what's the safe way to cast objects in go?  (i can't seem
to find it in the docs)
19:38 -!- diltsman [n=diltsman@76.8.194.226] has joined #go-nuts
19:38 < gl> is there an equivalent to strerror() in go?
19:38 < scandal> asyncster: you use explicit conversions
19:38 < scandal> gl: os.Error.String() perhaps
19:38 < gl> i mean i want to print the output of syscall.Socket()
19:39 -!- hugov [n=hugov@sjc237n225.joh.cam.ac.uk] has joined #go-nuts
19:39 < gl> scandal: nope
19:40 -!- sjbrown [n=sjbrown@c-69-181-182-137.hsd1.ca.comcast.net] has quit [Read
error: 110 (Connection timed out)]
19:40 -!- Maddas [n=mz@74.125.121.33] has quit ["leaving"]
19:40 < scandal> gl: ah, syscall.Errstr()
19:41 < exch> iant: I;m wracking my brain over some piece of data I get from
a c function.  It's a list of integers (*_C_int).  I can't seem to convert it to a
go array/slice or index it using the old fashioned c way (like: ptr[x])..  any
ideas?
19:42 < gl> scandal yeah i just found it :) thanks anyway
19:42 < Gracenotes> wow.  2/3 of the syscall documentation is just constants
19:42 -!- tcpip4000 [n=tcpip400@190.84.233.18] has left #go-nuts []
19:42 < Gracenotes> I thought there were more functions, but when you
actually scroll through the page...  wow
19:43 -!- flyfish [n=flyfish@pixout.appriss.com] has joined #go-nuts
19:44 -!- Eytre [n=afitz@adsl-190-192-124.asm.bellsouth.net] has quit []
19:46 < WalterMundt> Anything in go for handling HTTP cookies, beyond
manually setting the appropriate headers?
19:47 < WalterMundt> client-side in this case
19:48 -!- illya77 [n=illya77@247-138-113-92.pool.ukrtel.net] has joined #go-nuts
19:48 -!- becks` [n=becks_@38-163.104-92.cust.bluewin.ch] has quit []
19:49 < Gracenotes> I wonder if Go is a language that is destined to be
port-bound.  By which I mean most projects written in it are ports of those from
other languages.  Hell, much of the source code itself is ported from Plan 9.
19:50 -!- Alkavan_ [n=alkavan@77.127.229.182] has joined #go-nuts
19:50 -!- serdar_ [n=serdar@dslb-084-060-206-034.pools.arcor-ip.net] has quit
[Read error: 110 (Connection timed out)]
19:50 -!- Alkavan_ [n=alkavan@77.127.229.182] has quit [Client Quit]
19:50 -!- gdebug [n=gdebug@97.93.221.235] has joined #go-nuts
19:50 < uriel> Gracenotes: I doubt it, rob clearly has some new projects in
mind to build with go (I can feel a successor for acme is comming ;)
19:50 < Gracenotes> I've ported a few of my own things to it.  maybe I'm
just thinking this because it's a while since I've learned a truly new programming
language
19:50 < uriel> Gracenotes: in any case, there are new things already, like
gofmt
19:50 -!- serdar_ [n=serdar@dslb-084-062-242-003.pools.arcor-ip.net] has joined
#go-nuts
19:51 < Gracenotes> uriel: that's true.  though that project is a bit
navel-gazingy :)
19:51 < WalterMundt> I hope not; the type system is too cool for that
19:51 -!- sku [n=sk@217.175.10.144] has joined #go-nuts
19:52 -!- XniX23 [n=XniX23@89-212-198-49.dynamic.dsl.t-2.net] has joined #go-nuts
19:52 < Gracenotes> well.  nothing's as cool as System F variants and
Hindley-Milner and perhaps dependent types, but I grant it is interesting ;)
19:53 -!- dmeikle [n=dmeikle@apache/committer/dmeikle] has quit ["Leaving"]
19:53 < gdebug> this has probably already been talked about ad naseum in
here, but is there any plans for MySql, etc.  support?
19:53 < uriel> gdebug: see http://go-lang.cat-v.org/library-bindings
19:54 < sladegen> second!
19:54 < uriel> and there is at least somebody working on a pure-Go mysql
client implementation: http://go-lang.cat-v.org/pure-go-libs
19:55 < gdebug> that is fantastic.  thank you.  I might end up contributing
some, if needed
19:56 -!- KinOfCain [n=KinOfCai@rrcs-64-183-61-2.west.biz.rr.com] has quit [Read
error: 110 (Connection timed out)]
19:56 < asyncster> if I declare a type that's just a struct (i.e type Person
struct { ...  } ), and I create a new Person object, is it possible to cast that
back to a struct type?
19:56 -!- ikke [n=ikkibr@unaffiliated/ikkebr] has quit []
19:56 < uriel> gdebug: note that from what I have seen, they are all
somewhat experimental...
19:57 -!- jandem [n=jandem@unaffiliated/jandem] has joined #go-nuts
19:57 -!- jandem [n=jandem@unaffiliated/jandem] has left #go-nuts ["Leaving"]
19:58 < WalterMundt> asyncster: I think so, but why not try it?
19:59 < gdebug> uriel: I figured they would be.  I am mostly just evaluating
Go for a few of our systems, so there would be no rush or need for stability
immediately.
20:00 -!- hackbench [n=hackbenc@78.179.182.49] has joined #go-nuts
20:00 -!- teedex [n=teedex@204.14.155.161] has quit ["Leaving..."]
20:01 < asyncster> WalterMundt it works, but you need to specify all the
fields in the struct when you do the conversion
20:01 < asyncster> which is annoying
20:01 -!- Nanooo [n=Nano@95-89-198-15-dynip.superkabel.de] has joined #go-nuts
20:02 < jgoebel> No valid patches found in output from hg diff
20:02 < jgoebel> why is my hg upload failing?
20:02 < jgoebel> there are plenty of diffs in my tree
20:02 < WalterMundt> asyncster: why do you need to?  You can also cast it
directly to any type aliased to a struct with the same members AFAIK
20:02 < WalterMundt> so if you just want to strip the methods, define a
"plain" struct type
20:03 < uriel> jgoebel: did you commit them?  if you commited them, they
wont show up with hg diff
20:03 < jgoebel> nope, was a tab vs space issue
20:03 < uriel> ah
20:05 -!- afurlan [n=afurlan@scorpion.mps.com.br] has quit [Remote closed the
connection]
20:09 < scandal> iant: how do you create a new array using the
reflect.ArrayOrSliceType ?
20:10 < dho> boy this tls stuff is interesting
20:10 < dho> no wonder amd64 was so much easier to finish
20:10 < reppie> hehe
20:10 < dho> reppie: i do have the calling convention figured out for
calling sysarch...
20:10 < dho> reppie: i'm almost done actually
20:10 < dho> heh
20:11 -!- brontide [n=brontide@cpe-74-70-32-224.nycap.res.rr.com] has quit [Read
error: 113 (No route to host)]
20:11 -!- illya77 [n=illya77@247-138-113-92.pool.ukrtel.net] has quit [Read error:
54 (Connection reset by peer)]
20:11 < reppie> to change %gs ?
20:11 -!- depood [n=depood@chello080108055214.19.11.vie.surfer.at] has quit
[Remote closed the connection]
20:11 < dho> reppie: yeah
20:11 < dho> reppie: unfortunately, i'm having a little trouble figuring out
how to send an address up into sysarch
20:11 < reppie> what do you mean?
20:12 -!- tsuru [n=user@c-174-50-217-160.hsd1.tn.comcast.net] has joined #go-nuts
20:12 < dho> reppie: well, there's no i386_set_ldt syscall.
20:12 < dho> there's a sysarch syscall
20:12 < reppie> I386_SET_GSBASE
20:12 < dho> we have to pass an op and an address of a struct with args
20:12 < reppie> err
20:12 < dho> well, I want I386_SET_LDT
20:12 < dho> but
20:13 < reppie> AMD64_SET_GSBASE
20:13 < dho> no, amd64 is done.
20:13 < reppie> well are you doing amd64 or 386?
20:13 < reppie> oh
20:13 < dho> it was committed earlier today
20:13 -!- mkanat [n=mkanat@c-67-188-1-39.hsd1.ca.comcast.net] has joined #go-nuts
20:13 < Lee`> ?
20:13 < Lee`> help
20:13 -!- Lee` [n=user@94.170.148.183] has quit ["ERC Version 5.2 (IRC client for
Emacs)"]
20:13 < reppie> dho so what's the problem with I386_SET_LDT ?
20:13 < KragenSitaker> haha
20:14 -!- micshr [n=mickey@d540.ip15.netikka.fi] has joined #go-nuts
20:14 < dho> so I need to call sysarch(I386_SET_LDT,
&ptr_to_i386_set_ldt_args)
20:14 < dho> OS X lets you INT $0x82 to get into i386_set_ldt, so you can
just shove shit on the stack and it will copy it in
20:15 < dho> but I need to effectively have MOVL $I386_SET_LDT, BX; MOVL
args_ptr, CX; MOVL $165 AX; INT $0x80
20:15 < dho> I don't know how to get the args_ptr.
20:16 -!- baldmountain [n=baldmoun@65.219.200.66] has quit []
20:16 < reppie> leal ptr_to_i386_set_ldt_args,%eax; pushl %eax; pushl
$I386_SET_LDT; movl $sys_sysarch,%eax; int $0x80?
20:16 -!- hstimer [n=hans@c-98-234-25-125.hsd1.ca.comcast.net] has quit [Read
error: 110 (Connection timed out)]
20:16 < dho> can I just do LEAL 0(SP), AX?
20:17 < reppie> is the struct on the stack?
20:17 < dho> yes
20:17 < reppie> then yes
20:17 < dho> ok.
20:17 < jgoebel> hmmm
20:17 < WalterMundt> asyncster: http://gist.github.com/237234 shows a little
bit of casting a struct back and forth among types
20:17 < jgoebel> there has to be some way of storing a struct type
20:17 -!- tor7 [n=tor@c-987a71d5.04-50-6c756e10.cust.bredbandsbolaget.se] has quit
[Read error: 104 (Connection reset by peer)]
20:17 < KragenSitaker> dho: what are you writing?
20:17 < dho> freebsd/i386 port
20:18 -!- vegy [i=neki@89-212-27-225.dynamic.dsl.t-2.net] has joined #go-nuts
20:18 -!- kingfishr [n=kingfish@nat-128-42-155-239.rice.edu] has joined #go-nuts
20:18 * jgoebel pasted http://pastie.textmate.org/private/iopluavumriu6xqkdknqyg
20:18 < jgoebel> grrr
20:18 * jgoebel pasted http://pastie.textmate.org/private/mvzh79acanvrfme94mranw
20:18 < dho> huh?
20:18 < dho> I don't get this.
20:19 < jgoebel> anyone have any idea what line 12 should be
20:19 < jgoebel> i'm trying to figure out how to pass the type to Find so it
can build that type of object
20:19 < KragenSitaker> ohh
20:19 -!- Nanoo [n=Nano@95-89-198-15-dynip.superkabel.de] has quit [Connection
timed out]
20:19 < jgoebel> it will return interface{}
20:19 < dho> reppie: MOVL $165, AX
20:19 < dho> MOVL $1, BX //I386_SET_LDT
20:19 < dho> LEAL 0(SP), CX
20:19 < dho> INT $0x80
20:19 < jgoebel> but how does it know what to build in the first place?
20:19 < reppie> dho yes
20:19 < dho> still getting EINVAL, and the args don't look right at all:
20:19 < dho> CALL sysarch(0xffffffff,0xbfbfeb38)
20:20 < dho> maybe i didn't make install
20:20 < reppie> dho are you sure you can pass the arguments in registers, in
freebsd/386?
20:20 < reppie> i thought you had to pass them on the stack
20:20 < dho> really?
20:20 < dho> fuck me sideways.
20:20 < jgoebel> i'm i going to have to pass a new state in?
20:20 < reppie> i may or may not be wrong
20:21 * dho asks in #seekrut
20:21 < jgoebel> Find(new(State), 12) ?
20:21 < reppie> well, i know that passing on the stack works
20:21 < WalterMundt> jgoebel: how about reflect.Typeof()?
20:21 < WalterMundt> jgoebel: http://golang.org/pkg/reflect/#tmp_974
20:21 < reppie> but maybe passing in registers works too
20:21 < dho> reppie: well how do I pass them on the stack when I need to
point to the stack?
20:21 < WalterMundt> jgoebel: that will give you a reflect.StructType
instance, I think
20:21 -!- kingfishr [n=kingfish@nat-128-42-155-239.rice.edu] has quit [Client
Quit]
20:21 < dho> without overwriting it
20:21 < reppie> dho like on mac os
20:21 < jgoebel> Walter: and how do i turn that back into a State instance?
20:21 < reppie> create a new stack frame
20:22 -!- hackbench [n=hackbenc@78.179.182.49] has quit [Success]
20:22 < jimi_hendrix> what does iota mean?
20:22 < dho> reppie: i don't know how to do that
20:22 < jgoebel> walter: that was what i culdn't figure out
20:22 < reppie> push
20:22 < reppie> i have to catch the bus, bye
20:22 < dho> oic.
20:23 -!- ineol [n=hal@mar75-9-88-171-191-168.fbx.proxad.net] has quit []
20:24 < nickjohnson> Why are there both 'big' and 'bignum' packages?
20:24 < WalterMundt> jgoebel: a new State instance or what?
20:24 < WalterMundt> jgoebel: I'm unclear on precisely what you're
attempting to do
20:24 < jgoebel> Walter: how do i go from a reflect.StructType to a
new(State) so i can store data
20:24 < jgoebel> i'm trying to write dm.Find so it can return various types
20:25 < WalterMundt> reflect.NewValue(reflect.MakeZero(typeObject)) I think
20:25 < jgoebel> you tell it what type of object you want somehow, and it
fetched it and instantiates it from the db
20:25 < WalterMundt> then you can fill it in however you want
20:25 < gl> i'm trying to bind a specific ethernet device to a file
descriptor, but i can't see how, considering the documentation (maybe i'm looking
for a way too C-ish, aka.  ioctl() / etc), any idea?
20:25 < jgoebel> oh
20:25 < jgoebel> so you can make a new value
20:25 < jgoebel> hmmm
20:25 < jimi_hendrix> so what does iota mean?
20:26 -!- Nanooo [n=Nano@95-89-198-15-dynip.superkabel.de] has quit [Read error:
104 (Connection reset by peer)]
20:26 < WalterMundt> jgoebel: if you don't have an existing one to work
with, wouldn't you want to?
20:26 -!- Nanoo [n=Nano@95-89-198-15-dynip.superkabel.de] has joined #go-nuts
20:26 < WalterMundt> jgoebel: or do you have an existing State you want to
do something to?
20:26 < jgoebel> well
20:26 < jgoebel> i'm wondering if i should pass it in now
20:26 -!- p4p4 [n=P4p4@24.121.113.82.net.de.o2.com] has quit ["ChatZilla 0.9.84
[SeaMonkey 2.0a3/20090223135443]"]
20:27 < jgoebel> looks like you have to instantiant a new one just to get
Typeof to work
20:28 < rbohn> jimi: iota is the number of semicolons since the last const(.
20:28 < WalterMundt> I dunno, test it out, I haven't played with reflection
much
20:28 -!- creack [n=creack@ip-67.net-80-236-112.lhaylesroses.rev.numericable.fr]
has quit [Read error: 110 (Connection timed out)]
20:28 -!- creack [n=creack@ip-67.net-80-236-112.lhaylesroses.rev.numericable.fr]
has joined #go-nuts
20:29 -!- evilhackerdude [n=stephan@e181124118.adsl.alicedsl.de] has joined
#go-nuts
20:29 < exch> O_o I br0ke it.  commenting out a simple fmt.Printf() call
makes my app segfault
20:34 -!- nmichaels [n=nathan@dhcp-0-50-ba-58-39-ed.cpe.townisp.com] has joined
#go-nuts
20:34 < jgoebel> interface is *reflect.PtrValue, not main.State
20:34 < jgoebel> hmmm
20:35 -!- stefanc [n=stefanc@188.25.245.40] has joined #go-nuts
20:35 < nmichaels> I have an array and want to slice out elements 3, 6, and
9.  Can I do that?
20:35 -!- danly [n=danlesli@S010600226b5eab8e.vs.shawcable.net] has quit []
20:36 < nmichaels> (I want to be able to look at something that looks like
an array but contains pointers to array1[3], array1[6], and array1[9])
20:36 -!- pierron_ [n=pierron@91-164-174-118.rev.libertysurf.net] has joined
#go-nuts
20:36 -!- nsa310 [n=Adium@145.116.229.86] has joined #go-nuts
20:36 < exch> Not in 1 call.  arr[2:1] <- gets element 3
20:37 * jgoebel pasted http://pastie.textmate.org/private/ppigaafutldb8wwccli0g
20:37 * jgoebel pasted http://pastie.textmate.org/private/7yh2nt5eskfqiqlgf22ega
20:37 < jgoebel> walter: thoughts?
20:37 < jgoebel> i get an interface conversion error
20:38 < nmichaels> exch: so can I build something out of arr[3:4], arr[6:7],
and arr[9:10]?
20:38 -!- blabla [n=asd@serv4u.pl] has joined #go-nuts
20:38 < jgoebel> i don't think this is really building a State instance
20:39 -!- nsa310 [n=Adium@145.116.229.86] has left #go-nuts []
20:39 < dho> this isn't working.
20:39 * dho is missing something
20:39 < exch> nmichaels: yes..  but keep in mind that [3:4] gets a slice of
4 elements long..  the 3 is the start index..  and 4 is the length of the slice
20:39 -!- serdar_ [n=serdar@dslb-084-062-242-003.pools.arcor-ip.net] has quit
[Read error: 145 (Connection timed out)]
20:40 -!- plainhao [n=plainhao@mail.xbiotica.com] has quit []
20:40 < nmichaels> exch: I thought slices had the same syntax as in
Python...arr[3:4] == arr[3]...no?
20:40 < nickjohnson> exch: Wow, that's going to trip me up some day soon
20:40 < nmichaels> The language ref seems to suggest that.
20:41 < dgnorton> exch, are you sure?
20:41 < exch> not in my experience so far.  Might as well try it though.  I
have been know to be wrong :p
20:41 -!- skyyy [i=caw@129.21.116.238] has joined #go-nuts
20:41 <+iant> nmichaels: the type of arr[3:4] is []T and the type of arr[3]
is simply T
20:41 < tromp_> [3:4] is 1 long
20:42 < nmichaels> right, my bad, but still the same as Python, yes?
20:42 -!- Raziel2p` [n=Raziel2p@ti0032a380-dhcp0316.bb.online.no] has joined
#go-nuts
20:42 < exch> mm so both are indices.  Does [3:1] return a reversed slice
then?
20:42 < tromp_> same as [3:3], empty slice
20:43 <+iant> exch: no; taking a slice of a slice is an efficient operation,
which would not be the case if you could reverse a slice
20:43 < exch> bummer
20:43 -!- elmar [n=elmar@dslb-188-097-077-128.pools.arcor-ip.net] has joined
#go-nuts
20:43 -!- directrixx [n=aleksand@ip68-231-189-247.tc.ph.cox.net] has quit
["Leaving"]
20:44 -!- johanschepmans [n=johan@83.101.83.195] has joined #go-nuts
20:46 -!- ajray [n=alex@nom27935d.nomadic.ncsu.edu] has quit ["Leaving."]
20:46 -!- brrant [n=John@65-102-193-77.hlrn.qwest.net] has quit ["Leaving"]
20:46 -!- mxcl [n=mxcl@94-193-125-246.zone7.bethere.co.uk] has quit [Remote closed
the connection]
20:46 < nmichaels> So is there an easy way to build a slice whose contents
refer to non-contiguous pieces of an array?
20:46 <+iant> nmichaels: no, sorry
20:47 -!- dga [n=dga@63.226.120.16] has joined #go-nuts
20:47 < nmichaels> Array of pointers, here I come.
20:47 < WalterMundt> jgoebel: reading now
20:48 < sladegen> nmichaels: perhaps array of slices would be better.
20:48 < nickjohnson> For functions that accept arguments of type
interface{}, is there a way to use a more specific function to avoid all the
casting?
20:48 < exch> I am now officially puzzeled.  Using capturing groups in a
PCRE pattern causes the program to crash with a SIGSEGV.  Except when I put
fmt.Printfl() with a specific string somewhere in the code.  If it's a different
string, it still faults.
20:48 -!- serdar_ [n=serdar@dslb-084-060-253-005.pools.arcor-ip.net] has joined
#go-nuts
20:48 -!- mxcl [n=mxcl@94-193-125-246.zone7.bethere.co.uk] has joined #go-nuts
20:48 < nickjohnson> Eg, I want to use iterable.Find on a function that
checks ints
20:48 < WalterMundt> jgoebel: it is, you have to return o.Interface() though
20:49 < nmichaels> sladegen: [0] is longer than *...
20:49 < WalterMundt> jgoebel: o is a reflect.Value, which wraps the value in
methods allowing you to modify it without knowing its type
20:49 <+iant> nickjohnson: no, that is more or less the problem that would
be solved if Go had generics
20:49 < jgoebel> ok that's closer
20:50 < nickjohnson> iant: It does make implementing such functions a bit
verbose :/
20:50 -!- diltsman [n=diltsman@76.8.194.226] has quit []
20:50 <+iant> yes
20:50 < jgoebel> interface is *main.State, not main.State
20:50 -!- pierron [n=pierron@91-164-161-220.rev.libertysurf.net] has quit [Read
error: 110 (Connection timed out)]
20:50 < jgoebel> my interface conversion is failing
20:51 < jgoebel> state := dm.Find("State", 12).(State);
20:51 < WalterMundt> huh
20:51 < WalterMundt> are you sure the type object you're passing in is the
right one?
20:51 < jgoebel> interface is *main.State, not main.State
20:51 <+iant> jgoebel: if it is *main.State, try dm.Find("State",
12).(*State)
20:51 < jgoebel> it's something to do with pointer not pointer
20:52 < jgoebel> no error but now i get a SIGSEGV: segmentation violation
20:52 < WalterMundt> yes, it is.  I'm guessing the reflect.Type you passed
in is for *State rather than State
20:53 < jgoebel> when i try and access state.name it blows up
20:54 < jgoebel> so it's probably bad this is still zeroed
20:54 < jgoebel> is there a way to actually work with the type without
knowing what type it is?
20:54 < nickjohnson> Hm. Pity arrays and slices don't implement Iterable :/
20:54 < WalterMundt> without seeing more code I cna't tell you anything
20:54 -!- serdar_ [n=serdar@dslb-084-060-253-005.pools.arcor-ip.net] has quit
[Read error: 60 (Operation timed out)]
20:54 < jgoebel> nick : easy enough to add
20:54 <+iant> jgoebel: yes, but you are restricted to the operations
available in the reflect package
20:55 < WalterMundt> jgoebel: you're pasting really small pieces, which
isn't helpful in answering your questions
20:55 <+iant> which is not much of a restriction, since pretty much
everything is implemented, but it's harder to use
20:55 -!- nmichaels [n=nathan@dhcp-0-50-ba-58-39-ed.cpe.townisp.com] has left
#go-nuts []
20:55 < nickjohnson> jgoebel: Yes, but something that would be obviously
useful to everyone
20:55 < jgoebel> Walter: i'm just dealing with Find and State right now
20:56 -!- sku [n=sk@217.175.10.144] has quit [Remote closed the connection]
20:56 -!- hugov [n=hugov@sjc237n225.joh.cam.ac.uk] has quit []
20:56 < WalterMundt> jgoebel: doesn't matter, you changed the context and
didn't paste the calling code, which sets up the model map and is thus clearly
relevant
20:56 -!- serdar_ [n=serdar@dslb-084-060-203-188.pools.arcor-ip.net] has joined
#go-nuts
20:56 -!- mitchellh [n=mitchell@D-69-91-142-31.dhcp4.washington.edu] has joined
#go-nuts
20:57 * jgoebel pasted http://pastie.textmate.org/private/lmb5pmpp6wtxnxmafbjfhq
20:57 -!- likebike [i=900fffe3@gateway/web/freenode/x-bghyqcpasjlqvygu] has joined
#go-nuts
20:57 < jgoebel> which is just model_map = make(map[string] reflect.Type);
20:57 < likebike> wow.  lots of people here.
20:57 < WalterMundt> jgoebel: no it isn't
20:57 < WalterMundt> something is putting something IN the map
20:58 < WalterMundt> and that is not in the listed code
20:58 * jgoebel pasted http://pastie.textmate.org/private/xgwlip9plvgp3mylgrcxzq
20:58 < jgoebel> hasn't changed from earlier
20:58 < jgoebel> well save the * you asked me to add
20:58 < likebike> I have heard rumors that "Go" is a "Google" language.  But
I think that's just a rumor.  Can't find any proof that Google is really backing
the language.  Are they?
20:58 < dga> are you trolling, likebike?
20:58 < dgnorton> there an example of using TCPListener?
20:58 < WalterMundt> jgoebel: yes it is, I haven't seen the version with
reflect.Typeof
20:58 < likebike> dga: ???
20:59 < jgoebel> ah ok
20:59 < jgoebel> if i can't set attributes of State inside Find then this
isn't going to work
20:59 < jgoebel> the idea is to pass back a fully setup State
20:59 < WalterMundt> jgoebel: you probably want reflect.Typeof(State{})
rather than using new, and then remove the * from the type assertion
20:59 < likebike> Not trolling.  just curious.
20:59 < dga> http://golang.org/doc/go_faq.html
20:59 -!- clearscreen [n=clearscr@e248070.upc-e.chello.nl] has joined #go-nuts
21:00 -!- gkmngrgn [n=gkmngrgn@unaffiliated/gkmngrgn] has joined #go-nuts
21:00 < jgoebel> oh wow, that doesn't crash at least :)
21:00 -!- KinOfCain [n=KinOfCai@cpe-76-170-26-1.socal.res.rr.com] has joined
#go-nuts
21:00 < WalterMundt> jgoebel: now you can do
o.FieldByName("name").Set("foo") and such
21:00 < WalterMundt> before returning o.Interface()
21:00 < WalterMundt> I *think* that will work
21:00 < jgoebel> oh :)
21:01 < WalterMundt> may have to assert it to reflect.StructValue first
21:03 < jgoebel> hmmmm
21:03 < jgoebel> which syntax is that
21:03 -!- aa [n=aa@r200-40-114-26.ae-static.anteldata.net.uy] has quit [Remote
closed the connection]
21:04 < gl> mmh...  cgo's error messages are quite cryptic
21:04 < nickjohnson> Does Go support Python-style open slices?  Eg foo[1:]?
21:05 < jgoebel> feel like i'm so close
21:05 <+iant> nickjohnson: no, but it probably should; I think there is an
issue open for that
21:06 < jabb> am I forced to do this: http://gopaste.org/0P25S if I don't
want to allocate an Int on the heap?
21:07 < gl> iant do you know if there is a "simple" way to do an ioctl()?  I
didn't find anything in the online docs, and I'm looking for a cgo way now:/
21:07 -!- teedex [n=teedex@204.14.155.161] has joined #go-nuts
21:07 <+iant> jabb: even that won't work, taking the address will tend to
push the variable onto the heap
21:08 < jabb> hmm, really?
21:08 < uriel> gl: I doubt it, ioctl is *evil*
21:08 < uriel> (to put it mildly
21:08 <+iant> gl: I think that ioctl is not currently implemented
21:08 -!- MrTopf [n=mrtopf@p579F06BB.dip.t-dialin.net] has quit [Remote closed the
connection]
21:08 < jgoebel> finally :)
21:08 < jgoebel> Walter i got it
21:08 * jgoebel pasted http://pastie.textmate.org/private/6532dw02vxywqgolx3cx9a
21:08 < jgoebel> crazy
21:08 <+iant> gl: but you could call syscall.Syscall directly....
21:09 <+iant> jabb: yes, sorry to say, though that is really a compiler
implementation issue so it may change
21:09 < gl> uriel: maybe, but if I want to do the same thing as ioctl(fd,
SIOCGIFINDEX, &ifr)...
21:09 < uriel> jgoebel: use gopaste.org!  ;P
21:09 < gl> iant: well maybe, I'll take a look
21:10 < jgoebel> uriel: i'm very partial to pastie :)
21:12 -!- micshr [n=mickey@d540.ip15.netikka.fi] has quit [Read error: 145
(Connection timed out)]
21:12 -!- stefanc [n=stefanc@188.25.245.40] has quit [Read error: 54 (Connection
reset by peer)]
21:14 < alexsuraci> jgoebel: haha, i was going to recommend it myself but
then I recognized the name
21:14 < uriel> hey alexsuraci!
21:14 < alexsuraci> hey
21:15 < uriel> alexsuraci: really good job with gopaste!  but you should add
a link in gopaste.org to the source
21:15 < alexsuraci> probably true, but I'd rather get it in a more coherent
state
21:15 < uriel> it is one of the most substantive go apps around, and one of
the very few already in production :)
21:15 < alexsuraci> right now it's basically something I threw together in
my go-play repo
21:15 -!- hipe [n=hipe@69.193.196.185] has quit ["Leaving..."]
21:15 < alexsuraci> thanks :P
21:15 -!- serdar_ [n=serdar@dslb-084-060-203-188.pools.arcor-ip.net] has quit
[Read error: 110 (Connection timed out)]
21:16 -!- brrant [n=John@65-102-193-77.hlrn.qwest.net] has joined #go-nuts
21:16 < alexsuraci> there's a nice little feature I threw in last night
21:16 -!- tcpip4000 [n=tcpip400@190.84.233.18] has joined #go-nuts
21:17 < alexsuraci> hidden because it can be used to kill the server due to
a glitch in the http package (issue already reported and accepted)
21:17 < uriel> hehehe
21:17 -!- tor7 [n=tor@c-987a71d5.04-50-6c756e10.cust.bredbandsbolaget.se] has
joined #go-nuts
21:17 < uriel> I really like the minimalist design
21:17 < alexsuraci> but basically, curl --data-urlencode code@/path-to-file
http://gopaste.org/
21:17 < alexsuraci> it'll paste /path-to-file and return back the URL for it
21:18 < jgoebel> yeah, congrats on being the first paste service more
minimal than pastie :)
21:18 < alexsuraci> just don't use curl -F or I'll have to hunt you down ;)
21:18 < alexsuraci> haha, thanks
21:18 -!- serdar_ [n=serdar@dslb-084-060-234-184.pools.arcor-ip.net] has joined
#go-nuts
21:19 < alexsuraci> i'm planning on adding private/public pastes
21:19 < alexsuraci> I like the serendipity of just going to
pastie.org/pastes
21:19 -!- mitchellh [n=mitchell@D-69-91-142-31.dhcp4.washington.edu] has quit
["Leaving."]
21:22 -!- loureiro [n=loureiro@189.2.128.130] has quit ["Quit"]
21:23 -!- dga [n=dga@63.226.120.16] has quit [Read error: 104 (Connection reset by
peer)]
21:24 -!- sjbrown [n=sjbrown@dsl081-072-059.sfo1.dsl.speakeasy.net] has joined
#go-nuts
21:24 -!- dgnorton [n=dgnorton@97.65.135.119] has quit []
21:28 -!- Venom_X_ [n=pjacobs@66.54.185.131] has joined #go-nuts
21:29 -!- axisys [n=axisys@ip68-98-177-71.dc.dc.cox.net] has left #go-nuts []
21:29 -!- amacleod [n=amacleod@c-24-34-33-96.hsd1.ma.comcast.net] has quit ["Bye
Bye"]
21:29 -!- travisbrady [n=tbrady@67-207-96-194.static.wiline.com] has joined
#go-nuts
21:29 -!- diltsman [n=diltsman@76.8.194.226] has joined #go-nuts
21:30 -!- voluspa [n=voluspa@x-134-84-102-227.reshalls.umn.edu] has joined
#go-nuts
21:30 -!- cmarcelo [n=cmarcelo@enlightenment/developer/cmarcelo] has quit [Remote
closed the connection]
21:31 < XniX23> i have an integer, how can i redirect that pointer to show
on some other integer?
21:31 -!- melba [n=blee@unaffiliated/lazz0] has quit ["MICROSOFT WORD IS A FUN
GAME"]
21:32 < sladegen> wtf
21:32 < KirkMcDonald> XniX23: What pointer?
21:32 < aninhumer> You can't use an arbitrary integer as a pointer if that's
what you're asking?
21:33 -!- nil [n=ni|@isp2-resnet-nat1.union.edu] has joined #go-nuts
21:33 -!- __gilles [n=gilles@gw.poolp.org] has left #go-nuts []
21:33 < sladegen> i := &integer1 ; i = &integer2
21:35 -!- Venom_X [n=pjacobs@cpe-67-9-131-167.austin.res.rr.com] has quit [Read
error: 110 (Connection timed out)]
21:36 < XniX23> KirkMcDonald: doesnt integer have a pointer that points to
its value?  lets say i have 2 ints, a=2, b=5; and i'd like to switch so that a
points to b (which makes a=5) and b points to a(which makes b=2)
21:36 < nickjohnson> Is it possible to alias a function name from another
module?
21:36 -!- stalled [n=411@89-178-47-76.broadband.corbina.ru] has quit [Read error:
104 (Connection reset by peer)]
21:36 < XniX23> sladegen: ill try that
21:36 <+iant> XniX23: if a has type int, then it always has type int, and
you can't make it point to some other int
21:37 < sladegen> a, b = b ,a
21:37 < KirkMcDonald> But you can change which int is contained within the
variable.
21:37 -!- stalled_ [n=411@89-178-47-76.broadband.corbina.ru] has joined #go-nuts
21:37 < sladegen> XniX23: a, b = b, a ;
21:37 <+iant> nickjohnson: I suppose you could just write Myfunc :=
package.TheirFunc;
21:37 < nickjohnson> Wasn't sure if that worked
21:37 <+iant> or at top level var Myfunc = package.TheirFunc
21:37 <+iant> I can't think of any reason that it wouldn't work
21:38 < XniX23> ohhh i seee
21:38 < sladegen> nickjohnson: it works.
21:38 -!- Lorthirk [n=cm0901@109.114.32.87] has joined #go-nuts
21:38 < uriel> ok, I got trolled, sorry folks, I just can't stand the
anti-UTF-8 zealots :(
21:38 < XniX23> thanks iant, ill try that solution sladegen :D
21:39 < reppie> ni hao
21:39 < nickjohnson> I'm learning that Go is not the best language for code
golf ;)
21:39 -!- slowriot [n=kclancy@66.211.10.10] has joined #go-nuts
21:39 -!- Alkavan [n=igal@77.127.229.182] has quit [Read error: 110 (Connection
timed out)]
21:39 -!- rowdog [n=jth@h19.147.30.71.dynamic.ip.windstream.net] has quit ["gotta
go!"]
21:40 -!- migomipo [n=kvirc@84-217-11-119.tn.glocalnet.net] has quit ["When two
people dream the same dream, it ceases to be an illusion.  KVIrc 3.4.2 Shiny
http://www.kvirc.net"]
21:40 < sladegen> nickjohnson: what's code golf?
21:40 < nickjohnson> sladegen: Writing the shortest program that
accomplishes something
21:41 -!- rrr [i=rrr@gateway/gpg-tor/key-0x9230E18F] has quit [Remote closed the
connection]
21:41 < uriel> nickjohnson: hehehe
21:41 < sladegen> nickjohnson: write go REPL
21:42 < nickjohnson> sladegen: Hm?
21:42 -!- serdar_ [n=serdar@dslb-084-060-234-184.pools.arcor-ip.net] has quit
[Read error: 110 (Connection timed out)]
21:42 -!- insane_coder [n=nach@89-138-158-241.bb.netvision.net.il] has quit
[Remote closed the connection]
21:43 -!- insane_coder [n=nach@89-138-158-241.bb.netvision.net.il] has joined
#go-nuts
21:43 -!- danly [n=danlesli@S01060024012cac04.vs.shawcable.net] has joined
#go-nuts
21:45 -!- serdar_ [n=serdar@dslb-084-060-223-091.pools.arcor-ip.net] has joined
#go-nuts
21:45 -!- asmo [n=asmo@c83-248-96-173.bredband.comhem.se] has quit [Remote closed
the connection]
21:46 < jgoebel> cannot define new methods on non-local type string
21:46 < jgoebel> seriously?
21:46 < jgoebel> i can't add new methods to string?
21:46 -!- asmo [n=asmo@c83-248-96-173.bredband.comhem.se] has joined #go-nuts
21:46 < hagna> so including my pkg in $GOROOT/src/pkg is the way to make a
package for go?  What if I want a 3rd party package?
21:46 < nickjohnson> 342 characters is the shortest arbitrary-precision
fractran interpreter I can write: http://stackoverflow.com/questions/1749905
21:46 -!- djanderson [n=dja@hltncable.pioneerbroadband.net] has joined #go-nuts
21:46 <+iant> jgoebel: you can not add methods to the builtin type; you can
define your own type (type Mystring string) and add methods to that
21:48 < nickjohnson> How does one parse numeric strings in Go?
21:48 <+iant> nickjohnson: strconv.atoi?
21:49 < nickjohnson> cheers
21:49 -!- clip9_ [i=tj@12.81-166-62.customer.lyse.net] has quit [Remote closed the
connection]
21:50 < sladegen> nickjohnson: oh, i took it in a sense of doing quick
exploratory coding not creating the omega numbers, then surely encoding format is
the problem.
21:51 < nickjohnson> sladegen: ...creating the omega numbers?
21:52 -!- bjb [n=bobby@cpe-065-184-253-213.ec.res.rr.com] has quit [Read error:
110 (Connection timed out)]
21:52 -!- lenst [n=user@90-229-131-67-no52.tbcn.telia.com] has joined #go-nuts
21:53 < sladegen> nickjohnson: aka chaitin number
21:54 < nickjohnson> sladegen: Code golf has nothing to do with calculating
chaitin numbers
21:54 -!- sm [n=sm@pool-71-189-233-10.lsanca.dsl-w.verizon.net] has joined
#go-nuts
21:55 < nickjohnson> Maybe komologrov complexity, though...
21:55 -!- nil [n=ni|@isp2-resnet-nat1.union.edu] has joined #go-nuts
21:55 < facemelter> Gracenotes, thanks ;) awesome work...  (im slow i know)
21:55 < sladegen> nickjohnson: in a way it does, you are trying to find the
most compact solution to a given problem.  chaitin number is about ultimate
problem of computability.
21:55 < scandal> iant: i'm working with reflect to a ArrayConcat() function.
It seems odd that I have to create a slice that is backed by the entire underlying
array before i can create a subslice.  am i missing something?
http://gopaste.org/N0FsF
21:55 -!- ni| [n=ni|@isp2-resnet-nat1.union.edu] has quit [Read error: 54
(Connection reset by peer)]
21:56 < nickjohnson> sladegen: Are you sure you're not thinking of
Komologrov-Chaitin complexity?  They're different things.
21:56 < scandal> scandal: it seems like .SetValue() should allow me to
specify the start offset
21:56 < scandal> err, that was for iant
21:57 < sladegen> nickjohnson: bah, let's not get nickpicky, i merely wanted
to know what you meant by golf coding.
21:57 <+iant> say, suppose gopaste.org didn't use a black background....do
people really find that easy to read?
21:57 < scandal> iant: no :(
21:57 -!- scyth [n=scyth@rots.in.rs] has quit [Remote closed the connection]
21:57 -!- blackmagik [n=blackmag@unaffiliated/blackmagik] has joined #go-nuts
21:58 -!- Heavensrevenge
[n=quassel@CPE001d0fe73b7d-CM00111ae5c642.cpe.net.cable.rogers.com] has joined
#go-nuts
21:58 < nsz> i use w3m
21:58 < scandal> http://codepad.org/MwFysdJV
21:58 < nsz> every site has black background
21:58 < scandal> nsz: heh
21:59 <+iant> scandal: as far as I know you do have to do it that way; there
could certainly be a version of SetValue which took a starting offset, but there
isn't
21:59 < exch> it goes well with my current openbox theme.  light backgrounds
on sites make my eyes explode from the contrast
21:59 -!- cpr420 [n=cpr420@67.165.199.143] has joined #go-nuts
22:00 < scandal> exch: maybe it should support a light background and allow
the user to switch the theme?
22:00 -!- Associat0r [n=Associat@h163153.upc-h.chello.nl] has joined #go-nuts
22:00 < nsz> exch: why not enforce your own style?
22:00 -!- stalled_ [n=411@89-178-47-76.broadband.corbina.ru] has quit [Read error:
104 (Connection reset by peer)]
22:00 < nsz> i do that when i browse with a graphical browser..
22:00 < sladegen> books should be printed on black paper!
22:00 < yiyus> fwiw, the first thing i do is to remove the style-sheet,
getting rid of the dark bg and syntax hl
22:00 < exch> I can configure firefox to use a darker theme, but that
usually causes problems with text fields
22:00 -!- Fraeon_ [n=kzer-za@e212-246-65-153.elisa-laajakaista.fi] has joined
#go-nuts
22:00 < exch> specifically forms
22:01 < exch> making text ijnvisible cos it uses black text on a dark gray
backdrop :p
22:01 < nsz> exch: text fields can be styled too
22:01 < nsz> in case of ff use gtk-something-rc
22:01 < nsz> </offtopic>
22:01 < exch> yes, but it never works quite the way I need it to by
overriding FF's style settings
22:02 < Ian_Daniher> /w 7
22:02 -!- NoPyGod [n=NoPyGod@125-236-202-220.adsl.xtra.co.nz] has joined #go-nuts
22:02 -!- svet [n=svet@adsl-99-162-123-95.dsl.austtx.sbcglobal.net] has joined
#go-nuts
22:03 < NoPyGod> hello joe, what do you know
22:03 -!- asmo [n=asmo@c83-248-96-173.bredband.comhem.se] has quit [Read error:
110 (Connection timed out)]
22:04 -!- mxcl_ [n=mxcl@94-193-125-246.zone7.bethere.co.uk] has joined #go-nuts
22:04 -!- stalled [n=411@89-178-47-76.broadband.corbina.ru] has joined #go-nuts
22:06 -!- mxcl [n=mxcl@94-193-125-246.zone7.bethere.co.uk] has quit [Read error:
60 (Operation timed out)]
22:06 < WalterMundt> for debugging, is there any way to tell how many items
are in a channel buffer?
22:07 -!- sliceofpi1 [n=Adium@c-98-201-178-27.hsd1.tx.comcast.net] has quit
["Leaving."]
22:07 < WalterMundt> (I know that using that info for program logic is
likely to lead to interesting race conditions)
22:07 < exch> WalterMundt: len(somechan)
22:08 < WalterMundt> exch: ahh, thanks
22:09 -!- sjbrown [n=sjbrown@dsl081-072-059.sfo1.dsl.speakeasy.net] has quit
["Leaving"]
22:09 -!- sliceofpi [n=Adium@c-98-201-178-27.hsd1.tx.comcast.net] has joined
#go-nuts
22:10 -!- Hello [i=545b7b8f@gateway/web/freenode/x-ikrdtzhorrmjruvz] has joined
#go-nuts
22:10 -!- asmo [n=asmo@c-f6c5e055.1155-1-64736c11.cust.bredbandsbolaget.se] has
joined #go-nuts
22:10 < alexsuraci> iant: I'll probably add some sort of theme selector to
gopaste down the line
22:10 < kuroneko> ken broke 6l >_>
22:11 < alexsuraci> it's designed based on the popular twilight theme at the
moment, later themes will also style the site itself
22:11 -!- Amaranth [n=travis@ubuntu/member/Amaranth] has quit [Read error: 113 (No
route to host)]
22:12 < kuroneko> actually, maybe not - mercurial seems to have botched the
merge >_<
22:12 -!- drusepth [i=drusepth@72-24-207-121.cpe.cableone.net] has joined #go-nuts
22:14 -!- seedee [i=root@shell1.phx.gblx.net] has joined #go-nuts
22:14 < kuroneko> ah, google-code just caught up
22:15 -!- KinOfCain [n=KinOfCai@cpe-76-170-26-1.socal.res.rr.com] has quit [Read
error: 113 (No route to host)]
22:17 -!- drusepth` [n=drusepth@adsl-76-194-203-21.dsl.spfdmo.sbcglobal.net] has
joined #go-nuts
22:17 -!- Fraeon [n=kzer-za@e212-246-65-153.elisa-laajakaista.fi] has quit [Read
error: 110 (Connection timed out)]
22:18 -!- decriptor [n=decripto@137.65.132.26] has quit [Remote closed the
connection]
22:19 < jgoebel> states.Iter undefined (type vector.Vector has no field
Iter)
22:19 < jgoebel> hmmm
22:19 -!- drusepth`` [n=drusepth@adsl-76-194-203-21.dsl.spfdmo.sbcglobal.net] has
joined #go-nuts
22:19 < jgoebel> doesn't it?
22:19 < sladegen> .Iter() ?
22:20 < jgoebel> for state = range states.Iter() {
22:20 < jgoebel> where states is a ResultSet
22:20 < jgoebel> type ResultSet *vector.Vector;
22:20 < jgoebel> will that not work?
22:20 < sladegen> perhaps add *
22:21 -!- Lorthirk [n=cm0901@109.114.32.87] has quit [Read error: 54 (Connection
reset by peer)]
22:21 < jgoebel> where?
22:21 < jgoebel> in front of states has effect
22:21 < sladegen> *states.Iter()
22:21 < jgoebel> no dice
22:22 < sladegen> hmmm...  don't know then.  havent played with vectors yet.
22:22 -!- JSharpe [n=jamie@5ad1d7f1.bb.sky.com] has quit [Read error: 110
(Connection timed out)]
22:23 -!- Amaranth [n=travis@ubuntu/member/Amaranth] has joined #go-nuts
22:23 -!- elmar [n=elmar@dslb-188-097-077-128.pools.arcor-ip.net] has quit
["Leaving"]
22:23 -!- engla [n=ulrik@wikipedia/Sverdrup] has quit [Read error: 60 (Operation
timed out)]
22:24 -!- seedee [i=root@shell1.phx.gblx.net] has quit ["^C"]
22:31 < kuroneko> gotta saw, given that the broken merge made it into
mainline after being posted to codereview, I do wonder if the review process is
actually working at the moment.
22:31 < kuroneko> s/saw/say/
22:31 -!- bugles [n=s@12.177.127.226] has joined #go-nuts
22:31 -!- directrixx [n=aleksand@ip68-231-189-247.tc.ph.cox.net] has joined
#go-nuts
22:33 -!- diabolix [n=jsoyke@206.210.81.55] has quit ["Leaving"]
22:33 < WalterMundt> any material on debugging go?  I'm getting a "Bus
Error" crash (on Darwin 386)
22:33 < WalterMundt> and need to track down what it's doing
22:34 < uriel> *ogle*
22:34 < uriel> ;P
22:34 -!- voluspa [n=voluspa@x-134-84-102-227.reshalls.umn.edu] has quit [Read
error: 113 (No route to host)]
22:34 < NoPyGod> what's the difference between google, and goggles
22:34 < NoPyGod> the goggles, they do nothing!
22:35 -!- bj_990 [n=bj@12.200.27.66] has left #go-nuts ["Leaving"]
22:35 < uriel> btw, ogle is in go/src/pkg/exp/ogle/
22:35 < uriel> (haven't tried it, so not sure in what state it is)
22:35 < nsz> use println
22:36 < svet> heh
22:36 < uriel> (and I think rob has said they have plans for a more advanced
debugging system probably building on their experience with Plan 9's acid)
22:36 -!- drusepth` [n=drusepth@adsl-76-194-203-21.dsl.spfdmo.sbcglobal.net] has
quit [Read error: 110 (Connection timed out)]
22:36 -!- chachan [n=chachan@ccscliente156.ifxnetworks.net.ve] has quit ["KVIrc
Insomnia 4.0.0, revision: , sources date: 20090520, built on: 2009/06/06 11:44:47
UTC http://www.kvirc.net/"]
22:37 -!- serdar_ [n=serdar@dslb-084-060-223-091.pools.arcor-ip.net] has quit
[Read error: 110 (Connection timed out)]
22:38 -!- drusepth [i=drusepth@72-24-207-121.cpe.cableone.net] has quit [Read
error: 110 (Connection timed out)]
22:38 -!- Associat0r [n=Associat@h163153.upc-h.chello.nl] has quit []
22:39 < XniX23> is there a way to split the line a,b=c,d ?
22:39 < XniX23> lets say a,b \
22:39 < XniX23> =
22:39 < XniX23> c,d
22:39 < XniX23> or something
22:40 -!- kaib [n=kaib@c-76-102-52-156.hsd1.ca.comcast.net] has joined #go-nuts
22:40 -!- mode/#go-nuts [+v kaib] by ChanServ
22:40 < nsz> hm i thought go was not whitespace sensitive
22:40 -!- mesenga [n=cbacelar@20150131219.user.veloxzone.com.br] has joined
#go-nuts
22:41 -!- kaib_ [n=kaib@nat/google/x-drzxfobesxaxofmi] has joined #go-nuts
22:41 -!- mode/#go-nuts [+v kaib_] by ChanServ
22:41 < mizai> funcmain(){fmt.Printf("ithinkitis");}
22:41 < XniX23> nsz: its not?
22:42 <+iant> XniX23: you can break lines anywhere you like
22:44 -!- rhelmer [n=rhelmer@adsl-69-107-65-242.dsl.pltn13.pacbell.net] has quit
[]
22:46 -!- itrekkie [n=itrekkie@ip72-200-108-156.tc.ph.cox.net] has joined #go-nuts
22:51 < XniX23> iant: thanks, i find that awesome :D
22:52 -!- alexsuraci [n=alex@pool-71-188-133-67.aubnin.fios.verizon.net] has quit
[Read error: 110 (Connection timed out)]
22:53 -!- asmo [n=asmo@c-f6c5e055.1155-1-64736c11.cust.bredbandsbolaget.se] has
quit [Remote closed the connection]
22:54 -!- sockmonk [n=user@pixout.appriss.com] has quit [Connection timed out]
22:54 -!- Wiz126 [n=Wiz@72.20.223.16] has joined #go-nuts
22:55 < sladegen> heh, http://gopaste.org/D2S7D
22:56 < sladegen> but black input box on black background is overkill mr
gopaste.org
22:56 -!- kaib_ [n=kaib@nat/google/x-drzxfobesxaxofmi] has quit []
22:56 -!- rrr [i=rrr@gateway/gpg-tor/key-0x9230E18F] has joined #go-nuts
22:56 < jgoebel> is there a die or exit function that stops exection?
22:56 -!- rhelmer [n=rhelmer@adsl-69-107-65-242.dsl.pltn13.pacbell.net] has joined
#go-nuts
22:56 < sladegen> os.Exit(1);
22:57 < jgoebel> thanks !
22:57 < KirkMcDonald> Also there is panic()
22:57 < WalterMundt> argh
22:57 < dho> .....aaaaand there we go.
22:57 < WalterMundt> ; load . "loadtest";
22:57 < WalterMundt> debug/proc not implemented on OS X
22:57 -!- jdp [n=justin@ool-435238c0.dyn.optonline.net] has quit [Read error: 60
(Operation timed out)]
22:58 -!- jdp [n=justin@ool-435238c0.dyn.optonline.net] has joined #go-nuts
22:58 -!- nil [n=ni|@isp2-resnet-nat1.union.edu] has quit ["Leaving..."]
22:58 < directrixx> Is there a way to delete a value from a map without
using a dummy value in the assignment?
22:58 -!- pjina3 [n=pjina3@193.169.66-86.rev.gaoland.net] has joined #go-nuts
22:58 < dho> gofmt works on freebsd/i386
22:58 * dho expects most other things will too.
22:58 < directrixx> as in: mymap[x] = y, false;
22:59 -!- kaib [n=kaib@c-76-102-52-156.hsd1.ca.comcast.net] has quit [Read error:
110 (Connection timed out)]
22:59 < scandal> directrixx: use _ for the dummy val
22:59 -!- Wiz126 [n=Wiz@72.20.223.16] has quit [Read error: 60 (Operation timed
out)]
22:59 < directrixx> scandal: that was giving me a compile error
22:59 < uriel> dho: cool
22:59 < dho> > 8l -e -o gofmt _go_.8
22:59 < dho> > ./gofmt < ../../pkg/syscall/zsyscall_freebsd_386.go|wc
-l 660
22:59 < dho> > uname -a
22:59 < dho> FreeBSD 8.0-RC3 FreeBSD 8.0-RC3 #0: Tue Nov 10 07:50:36 UTC
2009 root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386
22:59 < scandal> oh.
22:59 < directrixx> scandal: "cannot use _ as a value"
23:00 < directrixx> scandal: seemed to me like the logical way to do it too
23:02 < scandal> try 0 instead
23:02 -!- alexsuraci [n=alex@pool-71-188-133-67.aubnin.fios.verizon.net] has
joined #go-nuts
23:03 -!- brrant [n=John@65-102-193-77.hlrn.qwest.net] has quit [Remote closed the
connection]
23:03 < directrixx> scandal: that's what I meant by dummy value, I'm using a
map[string]bool, so I'm just using false.  But it feels odd to me to put anything
there.
23:04 -!- evilhackerdude [n=stephan@e181124118.adsl.alicedsl.de] has quit [Read
error: 113 (No route to host)]
23:05 -!- hsuh [n=hsuh@c925a62a.virtua.com.br] has joined #go-nuts
23:05 -!- qbit_ [n=qbit_@c-75-71-160-106.hsd1.co.comcast.net] has quit
["WinPants!"]
23:05 < scandal> directrixx: yes, it is a little odd, but i guess it is
symmetric with pulling a value out
23:06 < jlouis> dho: impressive work!
23:06 < Heavensrevenge> if i wanted to create a little runtime to run code
on behalf of an executable input binary, would a virtual machine be a good base my
runtime i have planned to built ontop of??
23:07 < Heavensrevenge> or would it be possible to pull the gc'd go runtime
out of the refrence implementation as a base?
23:07 < directrixx> scandal: true, I suppose there's value in that.
23:07 < dho> there are some issues with goroutines still
23:07 -!- hsuh [n=hsuh@c925a62a.virtua.com.br] has left #go-nuts ["Killed buffer"]
23:07 < dho> but i think i'm not calling the syscalls properly
23:08 -!- hsuh [n=hsuh@c925a62a.virtua.com.br] has joined #go-nuts
23:09 -!- pjina3 [n=pjina3@193.169.66-86.rev.gaoland.net] has quit ["Leaving"]
23:09 < hsuh> is there a list of go software already written?  (supposing
there was sw insnide google that was also opensourced)
23:10 < uriel> hsuh: I have links to some at http:/go-lang.cat-v.org
23:10 < scandal> hsuh: the golang reddit has some stuff.  i have not seen
any list other than what individuals are posting to the golang-nuts email list
23:10 < jabb> I was about to link that
23:10 < jabb> :P
23:10 < hsuh> tks
23:10 < uriel> but for now mostly added libraries, will try to add links to
non-lib projects later on
23:10 < Gracenotes> there's no packaging system yet, but you might find code
around various public repositories and pastebins..  -.-
23:10 < uriel> and yea, there are a few things in
http://reddit.com/r/golang/
23:11 < hsuh> uhum, looking at it
23:11 -!- gkmngrgn [n=gkmngrgn@unaffiliated/gkmngrgn] has quit ["Leaving"]
23:11 -!- ggorgen [n=gkmngrgn@unaffiliated/gkmngrgn] has joined #go-nuts
23:12 -!- bugles [n=s@12.177.127.226] has quit [Read error: 110 (Connection timed
out)]
23:13 < Heavensrevenge> ok ill continue planning then ask after i can more
clearly ask my question :) those channels are what i like as long as they can be
run in separate threads
23:14 < jgoebel> who wrote the gopaste?
23:14 < jgoebel> does it just use files for backend storage?
23:14 < scandal> alexsuraci wrote it i believe
23:15 < dho> that's why.
23:16 < jgoebel> hmmm
23:16 < jgoebel> how am i supposed to test my private functions?
23:17 -!- malkia [n=malkia@external.treyarch.com] has joined #go-nuts
23:17 -!- danly [n=danlesli@S01060024012cac04.vs.shawcable.net] has quit []
23:18 -!- Nanoo [n=Nano@95-89-198-15-dynip.superkabel.de] has quit ["Leaving"]
23:19 < Ycros> jgoebel: I'm writing my tests following the style that's used
in the go sources - my tests are in the same package
23:19 < jgoebel> ah
23:19 < jgoebel> gotcha :)
23:20 < halfdan> Ycros: example?
23:20 < Ycros> so when you build the package, they don't get linked in, but
"make test" picks them up
23:20 -!- cpr420 [n=cpr420@67.165.199.143] has quit ["Vision[0.9.7-H-090423]: i've
been blurred!"]
23:21 < exch> the test framework is pretty nice
23:21 < exch> easy to work with
23:21 < Ycros> halfdan: just look at how the various packages are testing in
the go sources
23:21 < Ycros> exch: though I can't get the coverage tool to work, I need to
file a bug
23:22 -!- edsono [n=edson@200-160-96-163-ma.static.vivax.com.br] has joined
#go-nuts
23:22 -!- edsono [n=edson@200-160-96-163-ma.static.vivax.com.br] has quit [Client
Quit]
23:23 < jgoebel> hmmm
23:23 < jgoebel> so you can pass params with func blah ( a...) and then
reflect on them as a structure?
23:24 < WalterMundt> yeah
23:24 < jgoebel> any way to have a multi type map?
23:24 -!- evilhackerdude [n=stephan@82.113.106.205] has joined #go-nuts
23:24 < jgoebel> {id: 12, name: "Josh"}
23:24 -!- strohman [n=strohman@216.239.45.130] has joined #go-nuts
23:24 -!- nmichaels [n=nathan@dhcp-0-50-ba-58-39-ed.cpe.townisp.com] has joined
#go-nuts
23:25 < jgoebel> trying to figure out how to pass multiple named options to
a method
23:25 < WalterMundt> jgoebel: map[string]interface{}
23:25 < jgoebel> hmmm
23:25 -!- brrant [n=John@65-102-193-77.hlrn.qwest.net] has joined #go-nuts
23:25 < jgoebel> and then the reciever can worry about getting the values
back, right?
23:25 < KirkMcDonald> jgoebel: I came up with one fairly hack-ish solution
to that.
23:26 < KirkMcDonald> It involves defining a type for each possible
option...
23:26 < jgoebel> KirkMcDonald: do tell
23:26 < WalterMundt> so given that ogle seems not to work on OSX yet, any
ideas for tracking down a segfault?
23:26 < jgoebel> hmmm
23:26 -!- ShadowIce [n=pyoro@unaffiliated/shadowice-x841044] has quit
["Verlassend"]
23:26 < KirkMcDonald> Then writing a function which returns a (pointer to)
something of that type.
23:26 < nmichaels> I'm getting this error: "cannot use x (type chan T) as
type T in function argument" when I try to y <- x where x and y are both of
type chan T. What am I doing wrong?
23:27 < jgoebel> i'm looking for something i can write inline in a function
call
23:27 < jgoebel> map[string]interface{} might have to do
23:27 < KirkMcDonald> nmichaels: Perhaps you want: y <- <-x;
23:27 < jgoebel> state := dm.Find("State", 12).(State);
23:27 < jgoebel> is already way to verbose :)
23:28 < nmichaels> KirkMcDonald: Yes, I did...why?
23:28 < WalterMundt> segfaulting code at http://gopaste.org/Alp9a if anyone
wants to play with it
23:28 < KirkMcDonald> nmichaels: Why what?
23:28 < WalterMundt> it's a start of a hacked up http loadtester
23:28 < alexsuraci> jgoebel: yea, it does
23:29 < nmichaels> KirkMcDonald: Why does that work?  I'm confused...thought
<- popped things out of channels and/or put them into other channels.
23:29 -!- KinOfCain [n=KinOfCai@cpe-76-170-26-1.socal.res.rr.com] has joined
#go-nuts
23:29 -!- slowriot [n=kclancy@66.211.10.10] has quit []
23:29 < KirkMcDonald> nmichaels: y <- x attempts to put 'x' into the
channel y.
23:29 < jgoebel> alexsuraci: don't need a db?
23:29 < KirkMcDonald> nmichaels: y wants a T, not a chan T.
23:29 < WalterMundt> nmichaels: y <- <-x; is equivalent to temp :=
<-x; y <- temp;
23:29 < alexsuraci> jgoebel: nah, I think that'd be overkill, at least at
this point
23:29 < nmichaels> KirkMcDonald: ah, so y<- <- x attempts to put
"<-x" into y?
23:29 < KirkMcDonald> nmichaels: Yes.
23:30 < nmichaels> cool, thanks
23:30 -!- nmichaels [n=nathan@dhcp-0-50-ba-58-39-ed.cpe.townisp.com] has left
#go-nuts []
23:30 < alexsuraci> jgoebel: here's the source: http://gopaste.org/OHz06
23:30 < svet> http://gopaste.org/OHz06
23:30 < alexsuraci> (pretty.go and html.go can be found at
http://github.com/vito/go-play )
23:30 < jgoebel> sweet
23:30 -!- danly [n=danlesli@S010600226b5eab8e.vs.shawcable.net] has joined
#go-nuts
23:31 < jgoebel> though i miss my ERB
23:31 < alexsuraci> I just wrote up a little html dsl (html.go)
23:31 < alexsuraci> that combined with the template package is pretty
awesome
23:31 -!- hsuh [n=hsuh@c925a62a.virtua.com.br] has left #go-nuts ["Killed buffer"]
23:31 < alexsuraci> for example, the linesPre and codesPre stuff here:
http://gopaste.org/OHz06#LC160
23:32 < alexsuraci> it builds up both html blocks at the same time even
though they appear separately in the source
23:33 -!- Hello [i=545b7b8f@gateway/web/freenode/x-ikrdtzhorrmjruvz] has quit
["Page closed"]
23:36 -!- rrr [i=rrr@gateway/gpg-tor/key-0x9230E18F] has quit [Remote closed the
connection]
23:37 -!- stalled [n=411@89-178-47-76.broadband.corbina.ru] has quit [Read error:
104 (Connection reset by peer)]
23:39 -!- stalled [n=411@89-178-47-76.broadband.corbina.ru] has joined #go-nuts
23:40 < alexsuraci> hooray!
http://code.google.com/p/go/source/detail?r=751eaa8f96
23:40 -!- nacmartin [n=chatzill@77.224.92.149] has joined #go-nuts
23:41 < nacmartin> how to convert an int into []byte ?
23:42 -!- lux` [n=lux@151.54.240.177] has quit [Remote closed the connection]
23:42 < jabb> strconv?
23:42 < WalterMundt> nacmartin: http://golang.org/pkg/encoding/binary/
23:43 < exch> what exactly does 'println' do differently to
os.Stdout.WriteXXX() or fmt.PrintF(..)?  Cos it seems that anything pinted using
the last 2 methods from a go routine never appears in the shell..  Only the
println output does
23:43 -!- aa [n=aa@r190-135-220-138.dialup.adsl.anteldata.net.uy] has joined
#go-nuts
23:43 < nacmartin> aha, WalterMundt, thx
23:43 < WalterMundt> nacmartin: oops
23:43 < sladegen> exch: it adds "\n"?
23:43 < WalterMundt> may not be what you want
23:43 <+iant> exch: println is a low level builtin function (which may go
away some day); it doesn't know how to print interfaces, just simple values
23:43 < gl> println() adds the *
23:43 < gl> \n
23:44 <+iant> But I don't know what is happening with your fmt.Printf
output, it should work fine from a goroutine
23:44 < exch> hmm.  why then is println the only one that gets output to the
shell?
23:44 -!- sgtarr [n=sgt@rasterburn.org] has joined #go-nuts
23:44 -!- gnuvince [n=vince@64.235.207.47] has quit ["What the fruit is goin' on
here!?"]
23:45 < penguin42> does the fmt.Printf get output if you put a new line on
the end?
23:45 < WalterMundt> yeah, binary.LittleEndian.PutUint32(myBytes, myUint32);
23:45 < exch> penguin42: nope
23:45 < nacmartin> well, I want to send an integer via tcp...
23:46 < nacmartin> ints are 32bytes?
23:47 < exch> int32 is 4 bytes (32 bits)
23:47 < penguin42> nacmartin: They are *typically* 32bits, but might be 64
or 16
23:47 < nacmartin> is there a sizeof?
23:47 -!- likebike [i=900fffe3@gateway/web/freenode/x-bghyqcpasjlqvygu] has left
#go-nuts []
23:47 < penguin42> but as exch says int32s well, they're 32
23:47 < exch> this is odd.  println works well on it's own, but when I add a
fmt.Println() call next to it or before it to test both..  the println output
disappears as well
23:47 < halfdan> if you need a fixed size take the int32 / int64
23:48 < halfdan> exch: src?
23:48 < exch> sec.  i'll post it
23:48 <+iant> nacmartin: there is unsafe.Sizeof
23:48 < nacmartin> ok, thanks
23:48 < halfdan> which is..  *oh my* unsafe
23:49 < exch> http://go.pastebin.com/m1cca2e8c
23:49 < exch> the print stuff is in count()
23:49 < sladegen> iant: len return 1 for "all" ints?
23:49 < exch> as it is now, println works.  but when I uncomment the printf
stuff (and the imports), it stops working
23:50 < nacmartin> is there any way to disable that "I won't compile because
X declared and not used" behaviour?
23:50 -!- evilhackerdude [n=stephan@82.113.106.205] has quit [Nick collision from
services.]
23:50 -!- XniX23 [n=XniX23@89-212-198-49.dynamic.dsl.t-2.net] has quit [Remote
closed the connection]
23:50 -!- evilhackerdude [n=stephan@82.113.121.195] has joined #go-nuts
23:50 <+iant> sladegen: can you call len on an int?  that sounds like a type
error
23:51 < exch> nope.  only thing you can do is asign the value to _
temporarily
23:51 < sladegen> iant: haven't tried, but in context of sizof it might be
good extension.
23:51 <+iant> well, but we consider sizeof to be an unsafe operation; it's
not needed for the kinds of thing C uses it for
23:52 -!- flyfish [n=flyfish@pixout.appriss.com] has quit []
23:52 < jlouis> nacmartin: hopefully not :)
23:52 < nacmartin> iant, well, if I have an int, and you want to send it
through tcp, I need to convert it to []uint8, but I don't know the size of the
int...
23:53 < WalterMundt> nacmartin: how would the other side know either then?
23:53 <+iant> nacmartin: you shouldn't really send things according to the
size of int, you should send them according to some predetermined size (in my
opinion)
23:53 < WalterMundt> nacmartin: advise using gob in that case
23:53 < nacmartin> ok, then, fine
23:53 < quag> nacmartin: check to see how large the number is, and then
decide how many int8s to pack it into?
23:54 < WalterMundt> since you'd obviously have to control the protocol, and
gob knows how to send ints because it uses a size-independent encoding
23:54 -!- mxpxpod [n=bryan@unaffiliated/mxpxpod] has joined #go-nuts
23:54 < quag> nacmartin: but I do see what you're getting at: if you want a
simple go-to-go serialization more effort is required than if this was defined
natively.
23:54 <+iant> exch: you aren't giving your program enough to print anything
before it exits
23:54 -!- mitchellh [n=mitchell@c-71-231-140-22.hsd1.wa.comcast.net] has joined
#go-nuts
23:54 < mxpxpod> is there a way to get just the keys of a hash?
23:54 < WalterMundt> quag: that's what gob is for
23:54 <+iant> exch: you send quit <- true, which starts the goroutines
printing something, but then you exit right away
23:55 <+iant> exch: the program doesn't hang around waiting for the
goroutines to finish
23:55 < quag> WalterMundt: gob?  (missed that)
23:55 < exch> iant: ok..  so I suppose a short sleep after the quit should
sort it out?
23:55 < WalterMundt> quag: http://golang.org/pkg/gob/
23:55 * quag loves guessable urls :)
23:55 < nacmartin> ok, I have things more clear now
23:55 < WalterMundt> quag: basis of http://golang.org/pkg/rpc/
23:55 <+iant> exch: yes, or wait for an explicit acknowledgment that the
goroutines are finished
23:55 < nacmartin> let's check that gob thing
23:56 < quag> WalterMundt: perfect!  :)
23:56 < WalterMundt> which gives you fairly decent close-to-free
RPC-over-TCP or HTTP
23:56 < quag> hmm...  it uses unsafe.Pointer
23:56 < exch> righty.  a 10ms wait seems to be enough in this situation
23:56 < quag> didn't expect that :)
23:57 < quag> oh of course, it has to use reflection which is unsafe :)
23:57 < WalterMundt> yeah, precisely
23:57 < WalterMundt> that's magic that ought to be debugged once and then
never mucked with, that's why it's in the standard lib
23:58 -!- lenst [n=user@90-229-131-67-no52.tbcn.telia.com] has quit [Connection
timed out]
23:58 < jgoebel> grrr
23:58 < jgoebel> make is kicking my ass
23:59 * jgoebel pasted http://pastie.textmate.org/private/16lapebh476xjkuyaumgw
23:59 < jgoebel> Makefile:18: *** missing separator.  Stop.
23:59 -!- hagna [n=hagna@70.102.57.178] has quit ["leaving"]
--- Log closed Wed Nov 18 00:00:02 2009