--- Log opened Sat Mar 12 00:00:55 2011
00:04 <+iant> iainmcgin: I would say that we are working on a combination of
making Go more efficient and reducing the barriers for people to use Go
00:05 -!- piranha [~piranha@e180080213.adsl.alicedsl.de] has quit [Quit: Computer
has gone to sleep.]
00:05 <+iant> I don't know whether we have an intern allocation, Rob would
know
00:05 <+iant> I wouldn't say we are working on fresh exciting stuff, I would
say we are working on grinding through details
00:05 <+iant> still interested?
00:10 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit:
Verlassend]
00:16 -!- ExtraSpice [XtraSpice@78-62-101-194.static.zebra.lt] has quit [Read
error: Connection reset by peer]
00:21 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Ping timeout: 250
seconds]
00:21 -!- Venom_X [~pjacobs@66.54.185.133] has quit [Quit: Venom_X]
00:24 -!- itrekkie [~itrekkie@ip70-190-110-197.ph.ph.cox.net] has quit [Quit:
itrekkie]
00:26 -!- iant [~iant@nat/google/x-mdcaopglrbiqisnz] has quit [Read error:
Operation timed out]
00:27 -!- tensai_cirno [~cirno@77.232.15.216] has joined #go-nuts
00:34 -!- iant [~iant@nat/google/x-rwxsjdyrwelgxpat] has joined #go-nuts
00:34 -!- mode/#go-nuts [+v iant] by ChanServ
00:34 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts
00:35 -!- iant1 [~iant@67.218.107.6] has joined #go-nuts
00:38 -!- iant [~iant@nat/google/x-rwxsjdyrwelgxpat] has quit [Ping timeout: 252
seconds]
00:44 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 240 seconds]
00:51 < evildho> iant1: ping
00:52 -!- mode/#go-nuts [+v iant] by ChanServ
00:52 < evildho> hebbes
00:52 <+iant> evildho: pong
00:52 < evildho> iant: looking at gccgo on freebsd again, but having some
troubles with getting things built properly again.
00:53 < evildho> this is going to be entirely useless right now because i
don't have specific questions
00:53 < evildho> just letting you know that in the not-too-distant future, i
may have some :)
00:53 <+iant> don't hesitate to file bug reports, of course
00:53 <+iant> sure
00:53 -!- pharris [~Adium@rhgw.opentext.com] has quit [Quit: Leaving.]
00:53 < evildho> last time the big issue was -fplan9-extensions didn't work
happily with opaque structs
00:53 -!- nettok [~quassel@200.119.183.211] has joined #go-nuts
00:54 < evildho> now it's that i can't get a dev environment set up to save
my life, but i think that's more my fault
00:54 < evildho> haha
00:54 -!- JusticeFries [~JusticeFr@173-8-247-218-Colorado.hfc.comcastbusiness.net]
has quit [Ping timeout: 250 seconds]
00:56 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.4]
01:00 -!- zimsim [~simon@87.72.77.195] has quit [Remote host closed the
connection]
01:05 -!- jgonzalez [~jgonzalez@173-14-137-134-NewEngland.hfc.comcastbusiness.net]
has quit [Ping timeout: 252 seconds]
01:07 -!- ronnyy [~quassel@p4FF1C6C4.dip0.t-ipconnect.de] has quit [Remote host
closed the connection]
01:08 -!- sauerbraten [~sauerbrat@p508CB43A.dip.t-dialin.net] has joined #go-nuts
01:13 -!- sauerbraten [~sauerbrat@p508CB43A.dip.t-dialin.net] has quit [Remote
host closed the connection]
01:33 -!- Natch [~natch@c-6dcde155.25-4-64736c10.cust.bredbandsbolaget.se] has
joined #go-nuts
01:35 -!- Natch| [~natch@c-6dcde155.25-4-64736c10.cust.bredbandsbolaget.se] has
quit [Ping timeout: 250 seconds]
01:59 -!- tobik [~tobik@p549FF747.dip.t-dialin.net] has quit [Quit: WeeChat 0.3.3]
01:59 -!- tvw [~tv@e176008068.adsl.alicedsl.de] has quit [Ping timeout: 255
seconds]
02:00 -!- tvw [~tv@e176007158.adsl.alicedsl.de] has joined #go-nuts
02:04 -!- binarypie [~binarypie@c-24-6-151-185.hsd1.ca.comcast.net] has quit
[Remote host closed the connection]
02:07 < evildho> iant: I don't understand the point of the most recent
patch; I don't get where it reduces contention and I only really see additional
function call overhead
02:07 < evildho> I feel like I'm clearly missing something
02:07 <+iant> it's a bit obscure
02:07 < evildho> I don't see how the one place mwakeup gets used is
beneficial :)
02:08 <+iant> what happens is that as soon as anything calls notewakeup,
that thread starts running
02:08 <+iant> very often it then needs to grab the scheduler lock
02:08 <+iant> so if you call notewakeup when you have the scheduler lock
yourself, the normal result is that the thread you just woke up tries to get the
lock, fails because you have it locked, and puts itself to sleep
02:08 <+iant> then you immediately release the scheduler lock, and wake up
the thread so that it can continue
02:09 <+iant> my patch avoids this contention for the scheduler lock, by not
waking up the thread until the scheduler lock is free
02:10 <+iant> this pattern happens particularly in entersyscall
02:10 <+iant> which is called pretty often
02:10 < evildho> oh wow
02:10 < evildho> yes it is
02:10 * evildho looks harder at schedunlock
02:10 < evildho> that's the key
02:10 < evildho> /agree russ; nice
02:12 <+iant> Russ has seen the strace I was looking at....
02:13 -!- iant [~iant@67.218.107.6] has quit [Quit: Leaving.]
02:28 -!- foocraft [~dsc@89.211.254.177] has quit [Quit: Leaving]
02:28 -!- tvw [~tv@e176007158.adsl.alicedsl.de] has quit [Remote host closed the
connection]
02:29 -!- keithcascio [~keithcasc@nat/google/x-ayuxteyrobpuxnqg] has quit [Ping
timeout: 248 seconds]
02:37 -!- foocraft [~dsc@89.211.254.177] has joined #go-nuts
02:57 -!- SirPsychoS [~sp@c-24-13-132-130.hsd1.il.comcast.net] has joined #go-nuts
02:58 < SirPsychoS> does an interface type assertion correspond to
runtime.assertE2T ?
03:07 < SirPsychoS> just confirmed that that's the case in the runtime
source, in case anyone reading this has occasion to wonder
03:20 < steven> how would you go about reading a file of digits separated by
whitespace and turning it into an []int?
03:21 < steven> i guess i would read it into a string, split it by
whitespace into a []string, and map it into a []int by calling strings.Atoi() on
each element
03:26 -!- pilgrum [~pilgrum@cpe-67-49-71-222.socal.res.rr.com] has joined #go-nuts
03:34 < KirkMcDonald> Clearly, Go needs list comprehensions.
03:41 < araujo> and union types
03:41 < araujo> *perfect language*
03:42 < sav> what about generics?
03:42 < sav> ;)
03:42 < SirPsychoS> * cue flamewar *
03:43 < SirPsychoS> my previous question and its results seem like an
argument for adding generics - according to 6prof, a surprising amount of time was
spent in type assertions on List elements
03:44 < SirPsychoS> almost a quarter of all execution time (excluding the
time the scheduler thread spent sleeping in runtime.futex)
03:46 -!- rm445 [rm445@pip.srcf.societies.cam.ac.uk] has joined #go-nuts
03:46 < SirPsychoS> lol well I just moved all the execution time to
runtime.findfunc
03:58 -!- gogogrrl [~max@p5DE8C53B.dip.t-dialin.net] has joined #go-nuts
03:59 < steven> KirkMcDonald: meh
03:59 < steven> list comprehemsions in python are kinda stupid
03:59 < steven> they're a language feature that should be (and already are)
a library feature
04:00 < steven> which makes them inflexible
04:00 < steven> map() works just fine
04:01 -!- gogogrrl_ [~max@p5DE8FB61.dip.t-dialin.net] has quit [Ping timeout: 276
seconds]
04:03 -!- nutate [~rseymour@204.140.130.68] has quit [Quit: nutate]
04:14 -!- rejb [~rejb@unaffiliated/rejb] has quit [Ping timeout: 246 seconds]
04:23 -!- saturnfive [~saturnfiv@61.150.60.153] has joined #go-nuts
04:23 -!- saturnfive [~saturnfiv@61.150.60.153] has left #go-nuts []
04:39 < steven> guys
04:39 < steven> how do you convert an int to a byte?
04:39 < steven> is it possible ever?
04:42 < niemeyer> steven: byte(intval)
04:43 -!- foocraft [~dsc@89.211.254.177] has quit [Ping timeout: 240 seconds]
04:44 < steven> thought so, was getting exceptions though.  weird
04:44 < steven> lemme try again
04:45 -!- foocraft [~dsc@78.101.133.245] has joined #go-nuts
04:49 < steven> niemeyer: my problem is that i have a []byte which i want to
sort using the "sort" package
04:49 < steven> but it only really accepts ints and strings and maybe uints
04:49 < steven> (and floats)
04:49 < steven> so im not sure how to go about this
04:49 < iainmcgin> iant: potentially still interested, I'll see what rob
says if he gets back to me
04:50 < niemeyer> steven: Just implement the needed interface
04:50 -!- iainmcgin [~iainmcgin@78.32.138.101] has quit [Quit: Leaving]
04:50 < niemeyer> steven: Those you find in package sort are just helpers
04:50 < niemeyer> steven: Look here:
http://golang.org/src/pkg/sort/sort.go?s=3634:3653#L149
04:50 < niemeyer> steven: It's really quite simple
04:51 < steven> gotcha.
04:51 < steven> thanks
04:51 < niemeyer> steven: You can pretty much copy the IntArray into your
own ByteArray, and s/int/byte/
04:51 < steven> huh, this is weird.
04:51 < niemeyer> steven: No problme
04:51 < niemeyer> steven: What's weird?
04:51 < steven> im doing: var a []byte; var b []byte; /* fill a with some
random bytes */; copy(b, a);
04:51 < steven> and then b is still empty!
04:52 < SirPsychoS> is b still nil?
04:52 < SirPsychoS> it only copies as much as there is space for
04:52 < niemeyer> steven: Check the len() of b
04:52 < steven> yeah.  i assumed copy will allocat space.
04:52 < steven> thanks
04:52 < niemeyer> steven: It doesn't
04:53 < steven> ok.
04:53 < SirPsychoS> copy is basically memcpy, with built-in bounds checking
04:53 < steven> nice.
04:53 < niemeyer> Woohay built-in bounds checking
04:53 < steven> <3
04:54 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has joined #go-nuts
04:54 -!- mode/#go-nuts [+v iant] by ChanServ
04:54 < niemeyer> Woohay iant as well
04:55 < steven> oh i remember what the problem was
04:55 < steven> i was trying to convert an []int into a []byte, which Go
does not like for some reason.
04:56 < steven> []byte(myintslice) // seems to fail
04:56 < SirPsychoS> yeah, slices of different types aren't really
convertible - under the slice is an array of the element type, so you've got a
bunch of 32-bit ints next to each other
04:57 < niemeyer> steven: Yeah, that doesn't work..
04:57 < SirPsychoS> if you tried to just use that as a byte slice, it'd
behave wierdly, and actually converting it would be costly
04:57 < SirPsychoS> so I suspect that's why they left it out, to avoid
having costly operations hiding in type conversions
04:58 < niemeyer> And also because it's not very common to throw out
information like this, and it's trivial to do so when one really wants to.
05:00 < steven> oh.
05:01 < steven> the thing is, i was trying to leverage bytes.Compare
05:01 < steven> since its the only stdlib compare function i can find for
slices.
05:01 -!- sav [~lsd@peirce.xored.org] has quit [Read error: Connection reset by
peer]
05:02 < steven> i was confused on why there wasnt an interface for it like
in sort
05:03 < niemeyer> steven: Uh..  you mean this: if len(a) != len(b) { return
false }; for i := 0; i < len(a); i++ { if a[i] != b[i] { return false } };
return true;?
05:03 < steven> yes.
05:03 -!- xyproto [~alexander@77.40.159.131] has quit [Ping timeout: 252 seconds]
05:03 * steven facepalms.
05:03 < steven> so ive been using bytes all this time for no good reason.
05:03 < steven> sigh.
05:10 -!- sav [~lsd@peirce.xored.org] has joined #go-nuts
05:13 -!- shvntr [~shvntr@116.26.131.43] has joined #go-nuts
05:16 -!- sav [~lsd@peirce.xored.org] has quit [Read error: Connection reset by
peer]
05:17 -!- sav [~lsd@peirce.xored.org] has joined #go-nuts
05:19 < steven> so, apparently strings.ToTitle() isnt what i thought it was
05:20 < steven> i thought it would make "bob" become "Bob"
05:20 < steven> but nope, "BOB"
05:20 < steven> sigh.
05:23 -!- iant1 [~iant@216.239.45.130] has joined #go-nuts
05:23 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has quit [Ping
timeout: 255 seconds]
05:27 -!- mode/#go-nuts [+v iant] by ChanServ
05:40 -!- Archwyrm [~archwyrm@archwyrm.net] has quit [Quit: leaving]
05:41 -!- Archwyrm [~archwyrm@archwyrm.net] has joined #go-nuts
05:50 -!- ExtraSpice [XtraSpice@78-62-101-194.static.zebra.lt] has joined #go-nuts
05:52 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
06:06 < steven> cnt wait for my goroutine-based quicksort implmentation to
finish so i can see the benchmarks and be giddy
06:08 -!- niemeyer [~niemeyer@201-40-152-213.pltce701.dsl.brasiltelecom.net.br]
has quit [Ping timeout: 255 seconds]
06:29 -!- rup [~rupert@deathknight.net] has quit [Ping timeout: 255 seconds]
06:33 -!- crazy2be [~justin@d209-89-248-73.abhsia.telus.net] has joined #go-nuts
06:36 < steven> who wrote the original sqlite go wrapper?
06:36 < steven> i added to it:
https://github.com/sdegutis/sqlite/blob/master/sqlite.go#L376-398
06:36 -!- crazy2be [~justin@d209-89-248-73.abhsia.telus.net] has quit [Remote host
closed the connection]
06:37 -!- crazy2be [~crazy2be@d209-89-248-73.abhsia.telus.net] has joined #go-nuts
06:38 -!- fafhrd [~fafhrd@unaffiliated/fafhrd] has joined #go-nuts
06:41 < steven> sorry, i mean
https://github.com/sdegutis/sqlite-go-wrapper/blob/master/sqlite.go#L376-398
06:42 -!- photron [~photron@port-92-201-21-224.dynamic.qsc.de] has joined #go-nuts
06:47 -!- zozoR [~Morten@56346ed3.rev.stofanet.dk] has joined #go-nuts
06:55 < napsy> Hello.  How can I convert an object of type unsafe.Pointer to
*C.uchar ?
06:58 -!- nettok [~quassel@200.119.183.211] has quit [Ping timeout: 250 seconds]
07:06 -!- cco3 [~conley@c-69-181-140-72.hsd1.ca.comcast.net] has quit [Ping
timeout: 240 seconds]
07:09 < djbrown> steven: did you figure out why your irc thing wasnt
working?
07:16 < SirPsychoS> napsy: can't you just cast it?  (*C.uchar)(p)
07:18 < napsy> SirPsychoS: yes it woked, tnx
07:29 -!- rup [~rupert@deathknight.net] has joined #go-nuts
07:29 -!- piranha [~piranha@e180080213.adsl.alicedsl.de] has joined #go-nuts
07:34 < napsy> what about converting a *C.char (a string) to a Go string?
07:43 -!- piranha [~piranha@e180080213.adsl.alicedsl.de] has quit [Quit: Computer
has gone to sleep.]
07:45 < SirPsychoS> that would be "C.GoString(p)"
07:45 < SirPsychoS> I assume you're using cgo
07:45 < napsy> oh tnx
07:46 -!- crazy2be [~crazy2be@d209-89-248-73.abhsia.telus.net] has quit [Remote
host closed the connection]
07:56 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
08:11 -!- arvindht [c2ed8e14@gateway/web/freenode/ip.194.237.142.20] has quit
[Ping timeout: 245 seconds]
08:11 -!- fabled [~fabled@mail.fi.jw.org] has quit [Quit: Ex-Chat]
08:21 -!- pilgrum [~pilgrum@cpe-67-49-71-222.socal.res.rr.com] has quit [Max SendQ
exceeded]
08:21 -!- pilgrum [~pilgrum@cpe-67-49-71-222.socal.res.rr.com] has joined #go-nuts
08:26 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
08:26 -!- saturnfive [~saturnfiv@61.150.60.153] has joined #go-nuts
08:26 -!- saturnfive [~saturnfiv@61.150.60.153] has left #go-nuts []
08:37 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-181-176.clienti.tiscali.it] has
joined #go-nuts
08:58 < SirPsychoS> does Go have an equivalent of function-static variables
in C? or does it just have to be global?
08:58 < nsf> use a global var, yes
08:59 < zozoR> nsf, is it easy to implement your gocode with something?  ^^
08:59 < zozoR> integrate it, or whatever it is called
09:00 < nsf> it is
09:00 < zozoR> awesomes
09:00 < zozoR> i might want to add support for Kate some day
09:00 < zozoR> ill ask again when time comes :)
09:01 < nsf> zozoR: http://pastie.org/1662611
09:02 < nsf> something like that
09:03 < zozoR> you already implemented json right?
09:04 < nsf> I don't remember
09:04 < nsf> I think there is a json formatter, someone added it
09:04 < zozoR> cool
09:04 < nsf> yes, there is
09:04 < nsf> also there is a csv formatter
09:05 < nsf> it's very easy to parse it
09:07 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
09:09 < zozoR> oh jesus, kate plugins are made in c++ xD
09:09 < nsf> it's easier to use csv format in that case
09:10 < zozoR> :)
09:10 -!- piranha [~piranha@port-92-200-9-197.dynamic.qsc.de] has joined #go-nuts
09:10 < nsf> well, it's actually dcsv :D
09:10 < nsf> double comma separated values
09:11 < zozoR> why the double comma?  :P
09:11 < nsf> because function types has commas
09:11 < nsf> and I don't want to add escaping
09:11 < nsf> func,,Printf,,func(format string, a ...interface{}) (n int,
errno os.Error)
09:11 < nsf> looks like that
09:12 < nsf> <class>,,<word>,,<type>
09:12 < nsf> where <class> is one of func/var/const/type
09:12 < zozoR> ah
09:12 < zozoR> smart
09:14 -!- vasu [~vasu@202.63.112.184] has joined #go-nuts
09:19 -!- sav [~lsd@peirce.xored.org] has quit [Remote host closed the connection]
09:20 -!- sav [~lsd@peirce.xored.org] has joined #go-nuts
09:32 -!- zimsim [~simon@87.72.77.195] has joined #go-nuts
09:37 -!- ronnyy [~quassel@p4FF1C248.dip0.t-ipconnect.de] has joined #go-nuts
09:38 -!- aho [~nya@fuld-4d00d17c.pool.mediaWays.net] has quit [Ping timeout: 255
seconds]
09:40 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
09:56 -!- aho [~nya@fuld-4d00d784.pool.mediaWays.net] has joined #go-nuts
09:59 < ww> 'morning
10:20 < zimsim> hi
10:23 * ww has come to the sad realisation that goroutines are not magic
10:24 < ww> i had structured an ETL type think with a reader that sent stuff
to a channel, a couple of transform operations chained along that channel, ending
in a writer
10:24 < ww> very elegant and pretty to look at.
10:25 < ww> more than twice as slow to actually run compared to cutting out
the channel i/o and goroutines
10:43 -!- Fish [~Fish@bus77-2-82-244-150-190.fbx.proxad.net] has joined #go-nuts
10:46 -!- littlebobby [~bob@unaffiliated/littlebobby] has joined #go-nuts
10:49 -!- venk [~user@CPE-124-189-81-145.azsz1.cht.bigpond.net.au] has quit [Quit:
ERC Version 5.3 (IRC client for Emacs)]
11:05 -!- MizardX [~MizardX@46.230.253.178] has joined #go-nuts
11:05 -!- MizardX [~MizardX@46.230.253.178] has quit [Changing host]
11:05 -!- MizardX [~MizardX@unaffiliated/mizardx] has joined #go-nuts
11:07 -!- littlebobby [~bob@unaffiliated/littlebobby] has quit [Ping timeout: 255
seconds]
11:23 -!- kingfishr [~kingfishr@c-98-207-87-183.hsd1.ca.comcast.net] has joined
#go-nuts
11:29 < rm445> nope, they're still magic.  Well worth paying the cost :-)
11:34 -!- stalled [~stalled@unaffiliated/stalled] has quit [Ping timeout: 252
seconds]
11:34 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 240 seconds]
11:40 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
11:43 -!- boscop [~boscop@f055020065.adsl.alicedsl.de] has joined #go-nuts
11:45 -!- vasu [~vasu@202.63.112.184] has quit [Ping timeout: 252 seconds]
11:50 -!- stalled [~stalled@unaffiliated/stalled] has joined #go-nuts
11:53 -!- vasu [~vasu@202.63.112.184] has joined #go-nuts
11:56 -!- foocraft [~dsc@78.101.133.245] has quit [Ping timeout: 255 seconds]
11:56 -!- wtfness [~dsc@78.101.80.142] has joined #go-nuts
11:59 < ptrb> Is it safe to modify a map within a "for k, v := range
some_map" iteration over it?
11:59 < ptrb> by modify I mean erase keys
12:00 < MizardX> Not sure, but I don't think so.  You could make a copy of
the keys in the map, and iterate over that.
12:00 < SirPsychoS> http://golang.org/doc/go_spec.html#For_statements - says
it's fine to delete
12:01 < MizardX> oh
12:01 < SirPsychoS> insertion is implementation-dependent
12:01 < ptrb> Making a copy would be potentially too much duplication
12:01 < SirPsychoS> well, by "fine to delete" I mean that if you delete it
before it gets there, it will be skipped
12:02 < ptrb> I would only delete the key the 'iterator' is currently on
12:02 < SirPsychoS> probably best just to read the section, a few paragraphs
down from that anchor
12:02 < SirPsychoS> number 3
12:02 < ptrb> yeah, I grokked it.  cool.  thanks.
12:10 -!- MizardX [~MizardX@unaffiliated/mizardx] has quit [Ping timeout: 250
seconds]
12:13 -!- femtoo [~femto@95-89-198-8-dynip.superkabel.de] has joined #go-nuts
12:13 -!- MizardX [MizardX@46.230.253.178] has joined #go-nuts
12:13 -!- MizardX [MizardX@46.230.253.178] has quit [Changing host]
12:13 -!- MizardX [MizardX@unaffiliated/mizardx] has joined #go-nuts
12:16 -!- karpar [~karpar@112.96.255.4] has joined #go-nuts
12:19 -!- tensai_cirno [~cirno@77.232.15.216] has quit [Remote host closed the
connection]
12:32 -!- karpar [~karpar@112.96.255.4] has quit [Ping timeout: 250 seconds]
12:32 -!- zhilihu [~karpar@112.96.224.11] has joined #go-nuts
13:03 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-181-176.clienti.tiscali.it] has
quit [Quit: E se abbasso questa leva che succ...]
13:03 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-181-176.clienti.tiscali.it] has
joined #go-nuts
13:20 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
13:21 -!- smw [~smw@conference/pycon/x-mxaqitupfubngdmb] has joined #go-nuts
13:25 -!- smw [~smw@conference/pycon/x-mxaqitupfubngdmb] has quit [Client Quit]
13:26 -!- wrtp [~rog@93-97-137-84.zone5.bethere.co.uk] has joined #go-nuts
13:35 -!- rlab_ [~Miranda@91.200.158.34] has joined #go-nuts
13:37 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 250 seconds]
13:37 -!- niemeyer [~niemeyer@201-40-152-213.pltce701.dsl.brasiltelecom.net.br]
has joined #go-nuts
13:40 -!- sacho [~sacho@95-42-85-88.btc-net.bg] has joined #go-nuts
13:43 -!- peterdn [~peterdn@dhcp-110-228.new.ox.ac.uk] has quit [Quit: ChatZilla
0.9.86-rdmsoft [XULRunner 1.9.2/20100222071121]]
13:56 -!- femtoo [~femto@95-89-198-8-dynip.superkabel.de] has quit [Read error:
Connection reset by peer]
13:58 < ww> rm445: well its a tradeoff like everything else...  if an
operation in the pipeline is much cheaper than a context switch...
13:59 < ww> processing a lot of data, maybe best to minimise the context
switches...
14:00 < ww> so either find a 32-core laptop or 256-core commodity server...
or dispense with goroutines and channels for bulk data processing...
14:00 < ww> ...  and shed a tear for the loss of elegance
14:25 -!- niemeyer [~niemeyer@201-40-152-213.pltce701.dsl.brasiltelecom.net.br]
has quit [Ping timeout: 255 seconds]
14:27 -!- pilgrum [~pilgrum@cpe-67-49-71-222.socal.res.rr.com] has quit [Quit:
Leaving]
14:32 -!- femtoo [~femto@95-89-198-8-dynip.superkabel.de] has joined #go-nuts
14:35 -!- niekie [~niek@CAcert/Assurer/niekie] has quit [Read error: Connection
reset by peer]
14:42 < skelterjohn> ww if you mean switching between two goroutines in the
same process, calling it a context switch is a bit misleading
14:44 -!- tensorpudding [~user@99.56.160.152] has quit [Read error: Connection
reset by peer]
14:48 -!- zhilihu [~karpar@112.96.224.11] has quit [Quit: Bye!]
14:48 -!- jumzi [~none@c-89-233-234-125.cust.bredband2.com] has joined #go-nuts
14:50 < wrtp> skelterjohn: it is a context switch though.  just not as heavy
weight as a kernel context switch...
14:50 < skelterjohn> i was under the impression that the switch between
goroutines was very simple
14:50 < aiju> it is a context switch nevertheless
14:50 < skelterjohn> since they share memory, and differ only by a program
counter and a stack pointer
14:51 < aiju> a context switch can be as simple as one instruction on some
architectures
14:51 < skelterjohn> my point is, then, that minimizing context switches is
not very useful in this...  er, context
14:59 -!- sacho [~sacho@95-42-85-88.btc-net.bg] has quit [Read error: Connection
reset by peer]
15:01 -!- sacho [~sacho@46.10.16.35] has joined #go-nuts
15:16 -!- shvntr [~shvntr@116.26.131.43] has quit [Quit: leaving]
15:17 -!- jyxent [~jyxent@129.128.191.96] has quit [Ping timeout: 276 seconds]
15:18 -!- wrtp [~rog@93-97-137-84.zone5.bethere.co.uk] has quit [Quit: wrtp]
15:26 -!- neshaug [~oyvind@213.239.108.5] has quit [Quit: Lost terminal]
15:28 -!- wrtp [~rog@93-97-137-84.zone5.bethere.co.uk] has joined #go-nuts
15:29 -!- wrtp [~rog@93-97-137-84.zone5.bethere.co.uk] has quit [Client Quit]
15:30 -!- wrtp [~rog@93-97-137-84.zone5.bethere.co.uk] has joined #go-nuts
15:36 -!- skejoe [~skejoe@89.249.0.154] has joined #go-nuts
15:41 -!- jokoon [~zonax@feu30-1-82-242-58-229.fbx.proxad.net] has joined #go-nuts
15:51 < steven> uhh, guys
15:52 < steven> when i set runtime.GOMAXPROCS(4) and i watch the go process
thats heavily using goroutines, i only see the process using 1 processor
15:52 < steven> whats the deal?
15:52 < jnwhiteh> its not very good right now?
15:52 < jnwhiteh> goroutine scheduling is still incredibly primitive
15:53 < steven> o
15:54 -!- vsayer [~vivek@2001:470:1f04:1a6b:21a:6bff:fe35:d2a5] has quit [Ping
timeout: 264 seconds]
15:54 < steven> i benchmarked my quicksorts, one using goroutines and one
not, and the goroutine one takes 7.572338 sec and the sync one takes 12.409333 sec
15:55 < steven> at 100000 elements
15:55 < jnwhiteh> Keep in mind that GOMAXPROCS is the number of processes,
not the number of cores to be used
15:55 < steven> so it must know how to do something right
15:55 < jnwhiteh> but its an implication
15:55 < jnwhiteh> =)
15:55 -!- TheMue [~TheMue@p5DDF60E0.dip.t-dialin.net] has joined #go-nuts
15:55 < steven> jnwhiteh: i have 8 cores, 4 dual core processors
15:55 < steven> jnwhiteh: so that shouldnt be an issue
15:55 < jnwhiteh> I'm just saying
15:55 < steven> k
15:55 < jnwhiteh> I don't believe Go jumps through any hoops
15:56 < jnwhiteh> it just uses X OS level threads, afaik
15:58 -!- thomas_b [~thomasb@cm-84.215.47.51.getinternet.no] has quit [Quit:
leaving]
16:01 -!- cco3 [~conley@c-69-181-140-72.hsd1.ca.comcast.net] has joined #go-nuts
16:06 -!- littlebobby [~bob@unaffiliated/littlebobby] has joined #go-nuts
16:07 -!- vasu [~vasu@202.63.112.184] has quit [Remote host closed the connection]
16:09 < KBme> yeah
16:09 -!- Fish [~Fish@bus77-2-82-244-150-190.fbx.proxad.net] has quit [Quit: So
Long, and Thanks for All the Fish]
16:09 < KBme> n:m threading it's called afaik?
16:11 -!- MizardX [MizardX@unaffiliated/mizardx] has quit [Ping timeout: 248
seconds]
16:12 < aiju> Threads created by the user are in 1-1 correspondence with
schedulable entities in the kernel.  This is the simplest possible threading
implementation.
16:12 < aiju> hahahahaha
16:12 < aiju> wikipedia is full of bullshit again
16:13 < skelterjohn> disagree with "simplest"?
16:14 -!- Fish [~Fish@bus77-2-82-244-150-190.fbx.proxad.net] has joined #go-nuts
16:14 < aiju> the simplest possible way is having processes which can share
memory
16:15 < aiju> calling the process-thread dichotomy in kernel "simple"..  wow
16:19 < wrtp> steven: if your goroutines are communicating a lot with one
another, the overhead can be considerable if you're aiming for parallel speedup
16:20 < skelterjohn> simplest does not necessarily mean simple
16:22 -!- femtoo [~femto@95-89-198-8-dynip.superkabel.de] has quit [Ping timeout:
255 seconds]
16:32 -!- MizardX [~MizardX@46.230.253.178] has joined #go-nuts
16:32 -!- MizardX [~MizardX@46.230.253.178] has quit [Changing host]
16:32 -!- MizardX [~MizardX@unaffiliated/mizardx] has joined #go-nuts
16:40 < ww> skelterjohn: right, context switch is often taken to mean
process or thread, but i meant goroutine
16:41 < ww> so maybe it's context switching, maybe it's copy operations on
the channels, maybe its both
16:41 < ww> but i definitely see a pipeline of groutines being significantly
slower than doing it "by hand"
16:42 < ww> but the pipeline looks mor elegant and will scale better to
parallel hardware
16:44 < ww> but to really exploit this pattern, to construct pipelines of
goroutines as a matter of course without giving it a second thought can only work
well where either the amount of data to be processed is small or we are running on
a massively parallel machine
16:44 < ww> ...  neither of which being a case i'd be inclined to optimise
for at present
16:55 -!- dju_ [dju@fsf/member/dju] has joined #go-nuts
16:58 -!- sacho [~sacho@46.10.16.35] has quit [Read error: Connection reset by
peer]
16:58 -!- dju [dju@fsf/member/dju] has quit [Ping timeout: 248 seconds]
17:00 -!- rlab_ [~Miranda@91.200.158.34] has quit [Ping timeout: 276 seconds]
17:01 -!- JusticeFries [~JusticeFr@64.134.153.79] has joined #go-nuts
17:02 -!- MizardX [~MizardX@unaffiliated/mizardx] has quit [Ping timeout: 240
seconds]
17:07 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
17:10 -!- MizardX [~MizardX@unaffiliated/mizardx] has joined #go-nuts
17:10 -!- vsayer [~vivek@2001:470:1f04:1a6b:21a:6bff:fe35:d2a5] has joined
#go-nuts
17:12 -!- cco3 [~conley@c-69-181-140-72.hsd1.ca.comcast.net] has quit [Ping
timeout: 264 seconds]
17:12 < napsy> I'm getting a strange error if I try to cast an interface{}
to list.List inside a type switch: implicit assignment of unexported field 'front'
of list.List in assignment ...  any ideas what this message means?
17:15 -!- MizardX [~MizardX@unaffiliated/mizardx] has quit [Ping timeout: 276
seconds]
17:18 < Namegduf> napsy: list.List contains unexported fields, and thus
cannot be assigned.
17:18 < Namegduf> I don't think the interface{} could contain it.
17:18 < napsy> hum
17:18 < Namegduf> Perhaps you mean a pointer to list.List?
17:18 < Namegduf> (This is what list.New() returns)
17:19 < napsy> oh yes, it works now
17:19 < Namegduf> Great.
17:32 -!- tobik [~tobik@p549FF44C.dip.t-dialin.net] has joined #go-nuts
17:33 -!- TheMue [~TheMue@p5DDF60E0.dip.t-dialin.net] has quit [Quit: TheMue]
17:36 -!- femtoo [~femto@95-89-198-8-dynip.superkabel.de] has joined #go-nuts
17:37 -!- tobik [~tobik@p549FF44C.dip.t-dialin.net] has quit [Quit: WeeChat 0.3.3]
17:40 -!- tobik [~tobik@p549FF44C.dip.t-dialin.net] has joined #go-nuts
17:44 < steven> btw wrtp
17:44 < steven> https://github.com/sdegutis/gorm
17:44 < steven> look at gorm_test.go so far :)
17:45 < steven> hmm, the spec doesnt seem to mention how append() behaves if
the slice passed to it is nil.  i assume because it says "If the capacity of s is
not large enough to fit the additional values, append allocates a new,
sufficiently large slice that fits both the existing slice elements and the
additional values." that implies that nil is not large enough
17:45 < aiju> steven: it works
17:45 < steven> aiju: sweet.
17:46 < aiju> i regularly build slices by piece starting with nil
17:47 < steven> ooh right
17:47 < steven> nil is a valid zero-value for slices, ie an empty slice
17:47 < steven> nice.
17:49 < steven> grr blarg
17:50 < steven> i dont konw what order the return values will be for GetAll
so i dont know how to test that
17:59 < skelterjohn> test the collection
18:00 -!- jumzi [~none@c-89-233-234-125.cust.bredband2.com] has quit [Remote host
closed the connection]
18:01 < steven> right but i dont know how to test that the collection
contains exact values, without knowing the order of them.
18:01 < steven> oh i know
18:01 < steven> its ugly but meh
18:01 < skelterjohn> you will probably have to write a loop, or something =p
18:02 -!- napsy [~luka@88.200.96.18] has quit [Read error: Connection reset by
peer]
18:02 -!- jumzi [~none@c-89-233-234-125.cust.bredband2.com] has joined #go-nuts
18:04 < steven> yep.
18:15 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
18:16 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
18:26 -!- crazy2be [~crazy2be@d209-89-248-73.abhsia.telus.net] has joined #go-nuts
18:27 -!- Urmel| [~11087Urme@82-136-196-44.ip.telfort.nl] has quit []
18:30 -!- Urmel| [~11087Urme@82-136-196-44.ip.telfort.nl] has joined #go-nuts
18:35 -!- snearch [~snearch@f053011121.adsl.alicedsl.de] has joined #go-nuts
18:40 -!- sauerbraten [~sauerbrat@p508CB9F7.dip.t-dialin.net] has joined #go-nuts
18:40 -!- PortatoreSanoDiI [~Marvin@82.84.78.19] has joined #go-nuts
18:43 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-181-176.clienti.tiscali.it] has
quit [Ping timeout: 252 seconds]
18:45 -!- piranha [~piranha@port-92-200-9-197.dynamic.qsc.de] has quit [Quit:
Computer has gone to sleep.]
18:51 -!- rafadc [~rafael@108.Red-80-39-57.staticIP.rima-tde.net] has joined
#go-nuts
18:52 -!- rafadc [~rafael@108.Red-80-39-57.staticIP.rima-tde.net] has left
#go-nuts []
19:04 -!- JusticeFries [~JusticeFr@64.134.153.79] has quit [Quit: JusticeFries]
19:05 -!- JusticeFries [~JusticeFr@64.134.153.79] has joined #go-nuts
19:08 -!- zimsim [~simon@87.72.77.195] has quit [Quit: /dev/null]
19:15 -!- snearch [~snearch@f053011121.adsl.alicedsl.de] has quit [Quit:
Verlassend]
19:19 -!- wrtp [~rog@93-97-137-84.zone5.bethere.co.uk] has quit [Quit: wrtp]
19:19 < SirPsychoS> steven: why not return a map[string]Person?
19:20 < steven> SirPsychoS: in my code?
19:20 < steven> in what function?
19:20 < SirPsychoS> GetAll
19:20 < steven> because its a generic interface.
19:20 < steven> meant to be reusable with any struct you might want to
create, assuming the sqlite schema matches.
19:21 < SirPsychoS> well right, not necessarily Person
19:21 < steven> k
19:21 < SirPsychoS> but, by filling a map rather than a slice
19:21 < SirPsychoS> that makes retrieving things easy, at least
19:21 < steven> uh, because, what would the key be?
19:22 < SirPsychoS> whatever the key of the sqlite db is
19:22 < SirPsychoS> integer usually
19:22 < steven> but it could have multiple keys
19:22 -!- rtharper [~tomh@unaffiliated/sioraiocht] has quit [Remote host closed
the connection]
19:22 < SirPsychoS> whatever the primary id / primary key / whatever that's
called is?
19:22 < steven> ie, select persons where name = 'bob' and age = 42;
19:22 < steven> its not written that way.
19:22 < SirPsychoS> ah
19:22 < steven> its written slightly more flexible.
19:22 < steven> ie, you hae to write the where clause yourself
19:22 < steven> :)
19:22 < steven> *have
19:24 < SirPsychoS> all I'd looked at was TestGetMultiple
19:24 < steven> k
19:28 < SirPsychoS> bug report : pluralizeString("octopus") returns
"octopuss" :P
19:29 < steven> fix it ;)
19:29 < |Craig|> needs ...s -> ...ses rules
19:30 < SirPsychoS> that would work, although no matter how many rules you
add it's always going to miss something
19:30 < skelterjohn> or us -> i, in this case
19:30 < nsf> wolf wolves, 'lf' -> 'lv' works too?
19:30 < skelterjohn> SirPsychoS: there is an accepted list of pluralization
rules
19:31 < |Craig|> dont forget ius -> ii sometimes
19:31 < SirPsychoS> and an almost-infinite list of exceptions :O
19:31 < skelterjohn> though they are ambiguous on purpose :)
19:31 < ww> are there known problems on darwin 9.8 (osx leapard) with things
like dns?
19:31 < skelterjohn> SirPsychoS: less than you may think
19:32 < |Craig|> skelterjohn: octopuses is correct apparently, not octopi
19:32 < SirPsychoS> maybe it'd be better to simply add "s" to everything and
call it done
19:32 < SirPsychoS> depends on who's touching the database table names
19:32 < SirPsychoS> i.e., GoRM only or some admin creating tables with real
plural forms
19:33 < skelterjohn> |Craig|: if any dictionary lists octopuses, it will
also list octopi
19:33 < SirPsychoS> what about octopodes
19:33 < SirPsychoS> I believe that's correct too
19:33 < skelterjohn> octopod is a level up from octopus
19:33 < skelterjohn> in the taxonomy
19:34 < SirPsychoS> hmm, well the way I heard about it was that octopus is
actually Greek, not Latin, so if we're following rules from the language of
origin, it'd be octopodes
19:34 < |Craig|> go supports multiple languages.  Doing correct
pluralization in all cases is impossible.
19:35 < SirPsychoS> alternative: just call the table name the singular
19:35 < SirPsychoS> sidestep all the confusion
19:36 < |Craig|> back-formation and over generalization make deciding the
correct form of words based on origin inaccurate.  The only real hope is
statistical analysis of use.
19:37 < skelterjohn> you can just include a dictionary with the library and
look up the plurals
19:37 < |Craig|> if only natural languages were as clean as go, we would
have an easy time....
19:37 < skelterjohn> []octopus
19:37 < nsf> an array of ...?
19:37 < nsf> lol
19:37 < skelterjohn> now you're back in english
19:38 < skelterjohn> i was talking in go
19:38 < nsf> I'm thinking about probability of seeing the word 'octopus' in
someone's source file
19:40 < nsf> oceanarium database software needs that for sure
19:41 -!- wrtp [~rog@93-97-137-84.zone5.bethere.co.uk] has joined #go-nuts
19:43 < steven> notice that i didnt add checks for that kind of thing
19:43 < steven> for this very reason.
19:43 < steven> its impossible to get it 100% right because language isnt
that simple
19:43 < steven> so im settling for 95% right
19:44 < SirPsychoS> that's what I settled on eventually :P
19:45 < SirPsychoS> although I might suggest just using the singular for the
table name - would that look less weird than having tables named "octupuss" and
"wolfs"?
19:46 < crazy2be> would this function correctly read a big-edian short into
a little-edian int16?
19:46 < crazy2be> http://pastebin.com/XQyeQJ0y
19:46 < crazy2be> (short is two bytes in this case)
19:47 < SirPsychoS> see http://golang.org/pkg/encoding/binary
19:47 < SirPsychoS> I believe that's implemented there
19:47 < nsf> crazy2be: maybe
19:47 < nsf> :)
19:48 < crazy2be> nsf: Under what conditions would it work/fail?  :P
19:48 < aiju> we should put encoding/binary in the topic
19:48 < aiju> i feel like 1/2 of all questions could be answered by "use
encoding/binary"
19:48 < SirPsychoS> aiju: yes please, I facepalmed so hard when I found that
19:48 < nsf> I think if your processor is little-endian, then your statement
is correct
19:48 < nsf> otherwise it's not :)
19:48 < SirPsychoS> wouldn't that have issues with sign extension?
19:48 < SirPsychoS> nevermind
19:48 < SirPsychoS> it's casting from unsigned
19:49 < ww> oh nvm.  osx being stupid with its "do you want to allow foo to
accept connections"...  which of course you don't see when logged in over the
network...
19:49 < nsf> crazy2be: but maybe I'm saying nonsense
19:50 < crazy2be> hmm
19:50 < crazy2be> i'll just try encoding/binary
19:50 < nsf> yeah
19:50 < nsf> that's a good idea
19:51 -!- Fish [~Fish@bus77-2-82-244-150-190.fbx.proxad.net] has quit [Quit: So
Long, and Thanks for All the Fish]
19:59 < steven> grrrrr
19:59 < steven> what the crap
20:02 -!- wrtp [~rog@93-97-137-84.zone5.bethere.co.uk] has quit [Quit: wrtp]
20:03 < crazy2be> an, there we go
20:03 < crazy2be> *ah
20:03 < crazy2be> my ReadShort() was working i think, but the floating point
ones were not even close
20:04 < SirPsychoS> were you using math.Float64Bits() ?
20:04 < crazy2be> yeah
20:04 < crazy2be> but my bits were in the wrong order somehow i think
20:04 < SirPsychoS> huh, oh well, encoding/binary makes it easy
20:04 < crazy2be> yeah
20:09 < ww> was thinking about this recently, encoding.binary.  not that it
matters because the implentations are symmetric and don't use the usual C
tricks...  but is there a way to tell the host endianness?
20:10 < SirPsychoS> you mean like detect host endianness from arbitrary go
code?
20:11 < SirPsychoS> bytes := *(*[4]byte)(unsafe.Pointer(some_int32))
20:11 < SirPsychoS> then use encoding.Binary to convert it back with some
endianness, if it matches the original, that's the host endianness, otherwise not
20:12 < aiju> why would you test host endianness?
20:12 -!- tensai_cirno [~cirno@77.232.15.216] has joined #go-nuts
20:12 < exch> no need for the binary pkg.  Just check the value at bytes[0].
if it's 1, you have LE, otherwise BE
20:13 < SirPsychoS> good point
20:13 < SirPsychoS> assuming you're using MIN_INT32?
20:13 < SirPsychoS> nevermind, using just 1
20:14 < ww> right...
20:15 < ww> aiju: it is not uncommon in some situations.  if you look at the
networking code in most kernels it will do things like convert data to network
byte order iff host byte order is LE
20:16 < aiju> ww: there are better ways
20:16 < ww> if you were to want to do something close to the metal like that
with go, you'd do it that way too
20:16 < aiju> no
20:16 < aiju> you can simple use multiple files for that
20:16 < exch> interaction with a C lib as well.  If you get a union struct..
go presents that as a fixed size byte array.  If you want to extract an int, you
need to know how it was encoded
20:16 < aiju> one for LE and one for BE
20:18 < SirPsychoS> exch: the way I handled that situation was just make an
identically structured Go struct and cast it through unsafe.Pointer
20:18 < aiju> SirPsychoS: really bad idea
20:18 < SirPsychoS> barring weird struct padding stuff, that should work
20:18 -!- JusticeFries [~JusticeFr@64.134.153.79] has quit [Quit: JusticeFries]
20:18 < SirPsychoS> I wasn't exactly trying to write portable code at the
time
20:18 < aiju> no, it will not work if 8g and gcc happen to align structures
differently
20:19 < SirPsychoS> it worked on my machine, and that's all I wanted, lol
20:19 < crazy2be> hmm is there any way to read a half-byte in go?
20:19 < ww> of course the way it's handled in C is that it disappears in the
preprocessor if the operation is unnecessary, so yes, lacking a preprocessor we'd
better use multiple files...  obviously means a more complex build process so no
goinstall :P
20:19 < aiju> crazy2be: a "half-byte"?
20:20 < aiju> crazy2be: are you running Go on your PDP-10?
20:20 * ww nibbles
20:20 < aiju> ww: "in C"
20:20 < aiju> ww: you mean in bad C
20:20 < crazy2be> aiju: Like a int4
20:20 < ww> aiju: well if you mean the networking code in *BSD and linux is
bad C, I'd half agree with you :P
20:20 < crazy2be> 4 bits long, rather than 8
20:20 < aiju> crazy2be: none of the Go arch can handle an int4 natively
20:20 < SirPsychoS> haha read a byte, bitshift, and mask with 0xF
20:21 < aiju> ww: code with #ifdef is likely to be bad
20:21 < SirPsychoS> every C code I've ever read over 100 lines has an #ifdef
20:21 * ww rofl
20:22 < SirPsychoS> every header file in /usr/include has an #ifdef
20:22 < aiju> yeah, and everyone #define's their int constants
20:22 < aiju> that's not good practice either
20:22 < aiju> /usr/include is a huge pile of crap on GNU systems
20:22 < aiju> try reading ANY of the file, it's impossible
20:22 < SirPsychoS> haha I won't argue with that
20:22 < aiju> twenty layers of #include
20:23 < SirPsychoS> the hundred or so of us in this channel should band
together and reimplement the linux userland in Go
20:23 < tensai_cirno> s/linux/GNU/
20:23 < steven> guys whats the deal with this?
20:23 < steven> https://gist.github.com/867528
20:24 < SirPsychoS> well, it wouldn't be GNU anymore
20:24 < aiju> tensai_cirno: no, i don't want GNU code in Go
20:24 < steven> why cant i set the value of a struct field via reflect?
20:24 < SirPsychoS> i picked "linux" because it'd be meant to run on linux,
and only vaguely similar to GNU's stuff
20:24 < SirPsychoS> maybe plan9 in go
20:24 < tensai_cirno> aiju, i mean it is common problem with GNU code,
bloated by #ifdefs, etc.  Just look at glibc
20:24 < aiju> oh yeah
20:24 < tensai_cirno> static binary weights 600kb
20:24 < aiju> glibc is a huge pile of utter crap
20:24 < steven> haaaalp!
20:24 < tensai_cirno> it's pretty fked up
20:25 < steven> :'(
20:25 < napsy> ce staticno kompajlas se ne pomen da dobis cel libc zraven
20:25 < aiju> what language is this
20:25 < napsy> err wrong chan, sorry
20:26 < aiju> i want to know nevertheless :P
20:26 < steven> please?
20:26 < SirPsychoS> polish?!
20:26 < steven> anyone?
20:26 < napsy> slovenian
20:26 < steven> :'(
20:26 < SirPsychoS> ah, close-ish
20:26 < aiju> hahaha
20:26 < aiju> "close"
20:28 < crazy2be> hmm not sure how to read a single bit.  I tried reading
bools, but it won't let me convert them into bytes
20:28 * ww points aiju at...  for example...
http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/i386/include/endian.h?rev=1.41.24.1;content-type=text%2Fplain
20:29 < aiju> crazy2be: bit operations
20:29 < exch> steven: I am going to guess here, but you are giving reflect a
struct value.  Any changes you make to it through reflect are likely done on a
copy.  Try bob := new(Person) instead and modify the code accordingly
20:29 < steven> oooh.
20:29 < aiju> ww: yuck
20:29 < aiju> ww: gee, i just ate
20:29 < steven> im passing it via a function.
20:29 < steven> right.
20:29 < ww> no gnu, no linux, no libc...  but you can make pretty fast
routers out of freebsd...
20:29 < aiju> "fast" and "*BSD"?
20:30 * ww suggest aiju look at http://www.juniper.net/
20:30 < ww> ...  for example...
20:30 < crazy2be> aiju: How can i do that without converting to a byte()?
20:30 < aiju> crazy2be: >>?
20:30 < ww> only they use an asic or two...  pretty sure they have ifdefs in
their vhdl...
20:30 < aiju> (foo >> 5) & 3
20:30 < aiju> et al
20:31 < aiju> ww: what's up witht hat
20:31 < ww> well, you wanted to know about fast bsd routers...
20:31 < crazy2be> aiju: Won't that bit shift the bit out of existance?
20:31 < aiju> crazy2be: well, that was just an example
20:31 < aiju> crazy2be: what do you want to do?
20:31 -!- alkavan_ [~alkavan@IGLD-84-228-184-133.inter.net.il] has joined #go-nuts
20:32 < SirPsychoS> (foo >> n) & 1
20:32 < crazy2be> read a half-byte into a byte (since that's the closest
type in go)
20:32 < aiju> what do you mean by "read"?
20:32 -!- tensorpudding [~user@99.56.160.152] has joined #go-nuts
20:32 < SirPsychoS> oh, (foo >> (0 or 4)) & 0xF
20:32 < crazy2be> read a binary half-byte into a go byte
20:32 -!- alkavan_ [~alkavan@IGLD-84-228-184-133.inter.net.il] has left #go-nuts
[]
20:32 < aiju> you mean a half-byte in the file?
20:32 < aiju> where the fuck are you reading from?
20:33 < crazy2be> well, network stream, but yeah
20:33 < aiju> the smallest unit is one byte
20:33 < steven> fixed.  thanks
20:33 < aiju> you need to read one byte and split it
20:42 < steven> guys
20:42 < steven> just made Get and GetAll work :)
20:42 < steven> https://github.com/sdegutis/GoRM/blob/master/gorm_test.go
20:44 -!- ExtraSpice [XtraSpice@78-62-101-194.static.zebra.lt] has quit [Remote
host closed the connection]
20:45 < steven> lines 42 to 47 are the interesting part
21:01 -!- femtooo [~femto@95-89-198-8-dynip.superkabel.de] has joined #go-nuts
21:04 -!- femtoo [~femto@95-89-198-8-dynip.superkabel.de] has quit [Ping timeout:
255 seconds]
21:19 < crazy2be> hmm compress/flate isn't working properly for me
21:19 < crazy2be> is there any way to get a more detailed error?
21:20 < crazy2be> it just says "corrupt input before offset 5"
21:20 < steven> crap
21:20 < steven> this refactoring broke something and i cant figure out how.
21:22 < steven> maybe it has something to do with my return value of this
type: []map[string][]byte
21:22 < steven> hehe
21:22 < steven> (its ugly)
21:22 < crazy2be> array of maps that map strings to byte slices?
21:22 < steven> its not complex, just ugly
21:24 < steven> oh no wait, it didnt break on that end.
21:24 < steven> its my sqlite patch that broke it.heh.
21:30 < steven> fixed.  woot.
21:30 < crazy2be> is the go implementation of Inflate() working properly for
anyone else?
21:36 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.4]
21:39 < SirPsychoS> crazy2be: I'm using it to decompress Minecraft maps, so
yes
21:40 < crazy2be> SirPsychoS: You tried decompressing the Map Chunck
packets?
21:40 < crazy2be> *chunk
21:40 < SirPsychoS> yeah, are you working with minecraft too?  lol
21:41 < SirPsychoS> well, I'm reading directly from the region files
21:41 < SirPsychoS> not communicating with the server
21:41 < crazy2be> hmm
21:42 < crazy2be> it made pastebin go durples, but this is what i have:
http://pastebin.com/3kDBg1N3
21:43 < crazy2be> according to the documentation here:
http://mc.kev009.com/Protocol#Map_Chunk_.280x33.29
21:44 < crazy2be> not sure if my bitshifts are correct there for handling
the half-bits, but that's not the part that's giving me trouble
21:44 -!- littlebobby [~bob@unaffiliated/littlebobby] has quit [Ping timeout: 260
seconds]
21:44 -!- Wiz126 [~Wiz@24.229.245.72.res-cmts.sm.ptd.net] has quit [Ping timeout:
250 seconds]
21:45 < crazy2be> the deflate (or rather, inflate) function doesn't like the
data i give it
21:45 < crazy2be> and gives an error right at the start
21:45 < SirPsychoS> is it possible the protocol changed with 1.3?
21:46 < SirPsychoS> the map format changed
21:46 < crazy2be> hmm
21:47 < SirPsychoS> what are you trying to write, anyway?
21:47 < crazy2be> simple client that can automate routine tasks
21:48 < SirPsychoS> world of minecraft glider?
21:48 < crazy2be> i've so far got it working so that it can maintain a
connection, but it won't read chunk data
21:48 < crazy2be> er?
21:48 < SirPsychoS> lol world of warcraft has a hack thing called glider
that grinds for you
21:49 < crazy2be> ah
21:49 < SirPsychoS> I quit wow long before I started caring enough to use it
:P
21:51 -!- Wiz126 [~Wiz@24.229.245.72.res-cmts.sm.ptd.net] has joined #go-nuts
21:51 < SirPsychoS> why not just use binary.Read* for everything?
21:51 < crazy2be> that's what i'm doing, but that doesn't work for
compressed data
21:52 < crazy2be> well, actually, the ReadByte() functions are because i
didn't know about binary.Read*
21:52 < SirPsychoS> you should be able to read it into a []byte
21:52 < crazy2be> but they use that anyway
21:52 < SirPsychoS> and then deflate on a bytes.Buffer
21:52 < crazy2be> yeah that's what i do :/
21:53 < SirPsychoS> compressed = make([]byte, csize); binary.Read(conn,
whateverendian, &compressed)
21:54 < crazy2be> hrm
21:54 < crazy2be> is it normal to get like 10x compression?
21:54 < crazy2be> e.g.  Chunck is size: 154 (compressed), and 1200
(uncompressed)
21:55 -!- Wiz126 [~Wiz@24.229.245.72.res-cmts.sm.ptd.net] has quit [Ping timeout:
252 seconds]
21:55 < SirPsychoS> there are LOTS of zeros in minecraft chunks
21:55 < SirPsychoS> so, i'd say yes
21:55 < SirPsychoS> tons of repetition
21:55 -!- JusticeFries [~JusticeFr@c-24-9-171-36.hsd1.co.comcast.net] has joined
#go-nuts
21:56 < crazy2be> they all start with [120, 1] as the first two bytes
21:56 < crazy2be> wierd
21:57 -!- Wiz126 [~Wiz@24.229.245.72.res-cmts.sm.ptd.net] has joined #go-nuts
21:59 -!- davisp [~davisp@couchdb/developer/davisp] has quit [Quit: Permission
revoked - dircproxy 1.0.5]
22:02 < SirPsychoS> do the chunk sizes make sense?
22:02 < SirPsychoS> the x,y,z, sx,sy,sz values, that is
22:04 -!- femtooo [~femto@95-89-198-8-dynip.superkabel.de] has quit [Read error:
Connection reset by peer]
22:04 < crazy2be> huh
22:05 < crazy2be> if i slice off the first two bytes it *seems* to work
22:05 < crazy2be> i get things like
22:05 < crazy2be> 2011/03/12 15:07:45 Chunck sent: 48 0 32 15 127 15 5291
22:05 < crazy2be> 2011/03/12 15:07:46 Chunck is size: 5291 (compressed), and
81920 (uncompressed)
22:05 < SirPsychoS> does the decompressed data match the expected size?
22:06 < SirPsychoS> that's the size of one whole chunk
22:06 < SirPsychoS> so yeah, there's two extra bytes of data there
22:06 < crazy2be> well i never reach EOF
22:06 < crazy2be> so i guess
22:07 < SirPsychoS> there's no way it would be the right output size if you
had the wrong data
22:07 < crazy2be> yeah and if i read one more then i reach EOF
22:07 < crazy2be> wierd how there are two extranious bytes
22:08 < SirPsychoS> and they're always 120, 1 for every chunk?
22:08 < crazy2be> yeah for me anyway
22:09 < SirPsychoS> see if that's the case for my server - i'll pm you an ip
22:11 -!- photron [~photron@port-92-201-21-224.dynamic.qsc.de] has quit [Ping
timeout: 250 seconds]
22:13 -!- PortatoreSanoDiI [~Marvin@82.84.78.19] has quit [Quit: E se abbasso
questa leva che succ...]
22:13 -!- sauerbraten [~sauerbrat@p508CB9F7.dip.t-dialin.net] has quit [Remote
host closed the connection]
22:18 -!- ronnyy [~quassel@p4FF1C248.dip0.t-ipconnect.de] has quit [Remote host
closed the connection]
22:21 < steven> hey Namegduf
22:22 < steven> get via id,
https://github.com/sdegutis/GoRM/blob/master/gorm_test.go#L41-45
22:22 < steven> get all,
https://github.com/sdegutis/GoRM/blob/master/gorm_test.go#L58-62
22:22 < steven> get single,
https://github.com/sdegutis/GoRM/blob/master/gorm_test.go#L25-29
22:22 < steven> :)
22:25 -!- piranha [~piranha@e180080213.adsl.alicedsl.de] has joined #go-nuts
22:31 -!- skejoe [~skejoe@89.249.0.154] has quit [Quit: Lost terminal]
22:31 -!- rlab [~Miranda@91.200.158.34] has quit [Quit: Miranda IM! Smaller,
Faster, Easier.  http://miranda-im.org]
22:33 -!- dju__ [dju@fsf/member/dju] has joined #go-nuts
22:34 -!- zozoR [~Morten@56346ed3.rev.stofanet.dk] has quit [Remote host closed
the connection]
22:36 -!- dju_ [dju@fsf/member/dju] has quit [Ping timeout: 250 seconds]
22:54 -!- niemeyer [~niemeyer@189.27.130.232.dynamic.adsl.gvt.net.br] has joined
#go-nuts
23:03 -!- crazy2be [~crazy2be@d209-89-248-73.abhsia.telus.net] has quit [Ping
timeout: 276 seconds]
23:08 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has quit [Ping
timeout: 248 seconds]
23:11 -!- wrtp [~rog@93-97-137-84.zone5.bethere.co.uk] has joined #go-nuts
23:15 -!- wrtp [~rog@93-97-137-84.zone5.bethere.co.uk] has quit [Client Quit]
23:16 -!- wrtp [~rog@93-97-137-84.zone5.bethere.co.uk] has joined #go-nuts
23:17 -!- wrtp [~rog@93-97-137-84.zone5.bethere.co.uk] has quit [Client Quit]
23:17 -!- piranha [~piranha@e180080213.adsl.alicedsl.de] has quit [Ping timeout:
255 seconds]
23:18 -!- wrtp [~rog@93-97-137-84.zone5.bethere.co.uk] has joined #go-nuts
23:26 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Ping timeout: 252 seconds]
23:27 -!- cco3 [~conley@c-69-181-140-72.hsd1.ca.comcast.net] has joined #go-nuts
23:27 -!- piranha [~piranha@e180067093.adsl.alicedsl.de] has joined #go-nuts
23:28 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has joined #go-nuts
23:30 -!- ronny [~quassel@p4FF1C248.dip0.t-ipconnect.de] has joined #go-nuts
23:32 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has quit [Ping timeout:
615 seconds]
23:32 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
23:34 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has quit [Ping
timeout: 248 seconds]
23:44 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit:
Verlassend]
23:45 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has joined #go-nuts
23:50 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Ping timeout: 246 seconds]
23:54 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has joined #go-nuts
23:54 < steven> almost done writing gorm.Save now
23:55 < steven> then all that will be left for 1.0 is relationships
23:56 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has quit [Ping timeout:
615 seconds]
23:57 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
--- Log closed Sun Mar 13 00:00:55 2011