--- Log opened Sat Apr 16 00:00:15 2011
--- Day changed Sat Apr 16 2011
00:00 -!- vpit3833 [~user@CPE-58-160-37-24.phzl1.ken.bigpond.net.au] has quit
[Quit: ERC Version 5.3 (IRC client for Emacs)]
00:04 -!- m4dh4tt3r1 [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has quit [Quit:
Leaving.]
00:05 -!- dj2 [~dj2@CPE001f5b35feb4-CM0014048e0344.cpe.net.cable.rogers.com] has
joined #go-nuts
00:09 -!- go^lang [~newblue@119.121.240.213] has joined #go-nuts
00:09 -!- krolaw [~krolaw@203.100.208.229] has joined #go-nuts
00:16 -!- gzmask [~ray@corwin.cat.uregina.ca] has left #go-nuts []
00:28 -!- espeed [~espeed@63.246.231.57] has quit [Ping timeout: 246 seconds]
00:32 -!- iant [~iant@66.109.104.109] has joined #go-nuts
00:32 -!- mode/#go-nuts [+v iant] by ChanServ
00:34 -!- espeed [~espeed@63.246.231.57] has joined #go-nuts
00:37 -!- fenicks [~fenicks@log77-3-82-243-254-112.fbx.proxad.net] has quit [Ping
timeout: 264 seconds]
00:44 -!- boscop [~boscop@g230111102.adsl.alicedsl.de] has quit [Ping timeout: 246
seconds]
00:44 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has quit
[Ping timeout: 260 seconds]
00:49 -!- Jantire [~Jantire@c-71-202-156-84.hsd1.ca.comcast.net] has joined
#go-nuts
00:49 < Jantire> Would go be a better choice than node.js for a tcp
listener?
00:55 < uriel> what is 'a tcp listener'?
00:59 -!- Jantire [~Jantire@c-71-202-156-84.hsd1.ca.comcast.net] has left #go-nuts
["Leaving"]
01:05 < scyth> hm, that would be an interesting comparation
01:06 < scyth> he probably meant speed/scaling/resource consumption
01:07 -!- joelkronander
[~joelkrona@c-bf2fe253.617-1-64736c22.cust.bredbandsbolaget.se] has quit [Quit:
joelkronander]
01:10 -!- m4dh4tt3r [~Adium@14.sub-75-208-154.myvzw.com] has joined #go-nuts
01:12 -!- nettok [~quassel@200.119.151.131] has joined #go-nuts
01:19 -!- tux21b [~tux21b@pyhost.srv.tux21b.org] has joined #go-nuts
01:24 < tux21b> hi, i am not able to execute any go applications (such like
the hello world example).  neither release nor tip is working.  Anyway, the go
compiler compiled fine and all tests (except 2 known) passed, compilation of
helloworld.go worked too, but when i execute it, i get "throw: runtime: SysReserve
returned unaligned address"
01:26 -!- boscop [~boscop@g227148016.adsl.alicedsl.de] has joined #go-nuts
01:29 < edsrzf> tux21b: What OS and architecture are you running?
01:31 < tux21b> linux 2.6.35.11-83.fc14.i686, fedora 14, Intel(R) Atom(TM)
CPU N270 (32 bit).  so nothing special i guess...
01:36 < tux21b> the last time i was playing with go was 7 months ago, but it
was on the same system and everything was working without any problems
01:38 < tux21b> i can provide my executable of the helloworld prog and a
core file if you think that might help
01:38 -!- m4dh4tt3r [~Adium@14.sub-75-208-154.myvzw.com] has quit [Ping timeout:
276 seconds]
01:40 < edsrzf> My first guess would've been some kind of mismatch between
your libraries, compiler, and linker, but the linker should detect those problems.
01:56 -!- bpalmer [~user@unaffiliated/bpalmer] has joined #go-nuts
01:59 -!- boscop [~boscop@g227148016.adsl.alicedsl.de] has quit [Ping timeout: 250
seconds]
02:04 -!- ssb [~ssb@213.167.39.150] has quit [Ping timeout: 276 seconds]
02:05 -!- ssb [~ssb@213.167.39.150] has joined #go-nuts
02:05 -!- ekontsevoy [~ekontsevo@209.20.66.251] has quit [Remote host closed the
connection]
02:05 -!- ekontsevoy [~ekontsevo@209.20.66.251] has joined #go-nuts
02:07 -!- iant [~iant@66.109.104.109] has quit [Quit: Leaving.]
02:08 -!- gtaylor [~gtaylor@64-139-83-121-Nashville.hfc.comcastbusiness.net] has
joined #go-nuts
02:12 -!- katakuna [~pie@kjal.demon.co.uk] has quit [Ping timeout: 250 seconds]
02:16 -!- aho [~nya@fuld-590c74f4.pool.mediaWays.net] has quit [Quit:
EXEC_over.METHOD_SUBLIMATION]
02:22 -!- reds [~reds@pool-74-101-147-57.nycmny.fios.verizon.net] has quit [Remote
host closed the connection]
02:25 -!- edsrzf_ [~chickench@122-61-221-144.jetstream.xtra.co.nz] has joined
#go-nuts
02:26 -!- edsrzf [~chickench@122-61-221-144.jetstream.xtra.co.nz] has quit [Ping
timeout: 240 seconds]
02:32 -!- boscop [~boscop@g227148016.adsl.alicedsl.de] has joined #go-nuts
02:35 -!- matti_ [~mumboww@c-24-6-22-101.hsd1.ca.comcast.net] has joined #go-nuts
02:37 -!- crodjer [~rohanjain@203.110.240.205] has joined #go-nuts
02:37 -!- gtaylor [~gtaylor@64-139-83-121-Nashville.hfc.comcastbusiness.net] has
quit [Quit: gtaylor]
02:37 -!- fmoo [~Adium@66.220.144.74] has quit [Quit: Leaving.]
02:45 -!- edsrzf_ [~chickench@122-61-221-144.jetstream.xtra.co.nz] has joined
#go-nuts
02:45 -!- edsrzf [~chickench@122-61-221-144.jetstream.xtra.co.nz] has quit [Ping
timeout: 260 seconds]
02:57 -!- kr [~Keith@204.14.152.118] has quit [Quit: WeeChat 0.3.2]
03:01 -!- Viriix [~joseph@c-67-169-172-251.hsd1.ca.comcast.net] has joined
#go-nuts
03:20 -!- dga [~dga@MOO.CMCL.CS.CMU.EDU] has joined #go-nuts
03:22 < dga> Hi, Lazywebs - my go has gotten rusty in the last year.  Am I
correct in assuming that there's no easy way to create "something new that behaves
like a slice" (this sounds suspiciously like operator overloading, which is how
I've implemented it in C++).  ie, to be concrete, I want to pass something that's
not actually an array of bytes to the suffix array code and have it "just work".
But under the hood, a[5], e.g., is actually derived from b[5]+c[5] or som
03:25 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has joined #go-nuts
03:25 -!- mode/#go-nuts [+v iant] by ChanServ
03:26 < dga> From looking at the suffixarray.go code, I'm guessing my best
option is to change all instances of data[...] to call
data.dga_range_function(...), but that seems somehow inelegant.
03:29 -!- tensai_cirno [~cirno@77.232.15.216] has quit [Ping timeout: 276 seconds]
03:32 -!- ezys [~ezys@c-67-161-85-212.hsd1.wa.comcast.net] has joined #go-nuts
03:33 < jessta_> dga: nope, you can't do that
03:33 < vsmatck> There's no operator overloading.  I think some go
programmers say this is to eliminate context awareness needed to understand code
by others which uses operator overloading.
03:36 < dga> I know there's no overloading; I was curious if there's another
way to view this.  e.g., viewing [...] as an interface that could be provided, or
by sneaking under the covers somehow.  Alas.  So, barring that:
03:36 < vsmatck> Allowing a user to define an operator is operator
overloading.
03:37 < vsmatck> Seems like there's not much trickery allowed in go
otherwise.  Not even macros to abuse.
03:37 < vsmatck> heh
03:38 -!- iant [~iant@adsl-71-133-8-30.dsl.pltn13.pacbell.net] has quit [Ping
timeout: 246 seconds]
03:38 -!- iant [~iant@216.239.45.130] has joined #go-nuts
03:38 -!- mode/#go-nuts [+v iant] by ChanServ
03:38 < ezys> Apply preprocessor to taste
03:38 < dga> Fair.  Perhaps the real argument is why slice operations aren't
simply syntactic sugar for a function call that *can* be provided as an interface.
:-)
03:39 < vsmatck> That's calling operator overloading by another name.
03:40 < vsmatck> That gets back to some Go people not liking context
dependent code.  Code where you can't understand it just by looking at it.
03:41 < dga> So given that what I want to do is impossible (roughly,
sneakily hand a compressed array to suffixarray.go and have it "just work") --
would it be similarly indigestable to change suffixarray.go to take an object that
supports ReaderAt?  It'd definitely be slower if you had to wrap your []bytes in a
random reader wrapper.  But more flexible.
03:43 < skelterjohn> there is no reason to have special syntax to do what
you're talking about
03:43 < skelterjohn> just define an interface
03:43 < vsmatck> It probably would be a little slower.  However, slices are
real lightweight so it wouldn't be too bad.
03:44 < vsmatck> Most people would dismiss the difference but I know a C++
programmer wouldn't.  :)
03:46 < dga> skelter: The reason I ask is because using such an interface
requires changing the existing pkg code.  I was trying to figure out if there was
a way to avoid doing so.  It also, as vsm notes, imposes a bit of overhead to the
entire package -- in effect, suffixarray is specialized for slices.  I'd be
de-specializing it.
03:46 < skelterjohn> the overhead is the compiler's job :)
03:48 < uriel> vsmatck: making what is basically array indexing into a
function call would be really surprising
03:48 < uriel> vsmatck: if you want a method/function, what is wrong with
using a method/function?
03:49 < vsmatck> uriel: I agree.
03:49 < uriel> the main problem with data.dga_range_fnction(...) is that the
name choosen for the method is not very concise
03:49 < skelterjohn> i should put skelterjohn in all of my function names
from now on
03:49 < skelterjohn> skelterjohn_parallel_matrix_multiply
03:49 < uriel> skelterjohn: haha
03:49 < vsmatck> dga: Do you have templates in mind?  Go is less flexible
than C++ in that regard.
03:50 < dga> uriel: Apologies for not being clear -- I was just throwing up
an example.  There are more obvious existing interfaces to use -- namely ReadAt
03:50 -!- jyxent [~jyxent@129.128.191.96] has quit [Read error: Operation timed
out]
03:50 -!- MX80 [~MX80@cust151.253.117.74.dsl.g3telecom.net] has quit [Read error:
Operation timed out]
03:50 -!- jyxent [~jyxent@129.128.191.96] has joined #go-nuts
03:52 -!- wchicken [~chicken@c-24-7-112-207.hsd1.ca.comcast.net] has quit [Ping
timeout: 246 seconds]
03:52 -!- pingveno [~pingveno@c-98-246-133-8.hsd1.or.comcast.net] has quit [Ping
timeout: 246 seconds]
03:53 -!- wchicken [~chicken@24.7.112.207] has joined #go-nuts
03:53 < dga> I didn't really have anything specific in mind.  I'm mostly
curious what the "best" (for some definition) way is to do what I want.  The
context of this: I have a suffix array-based application in C++ that I'm porting
to Go partly for fun and partly because I have in mind some extensions to it
that're getting annoying in C++.  I was hoping to use/improve the existing suffix
array code instead of continuing to maintain my own.  But mine's weird, because it
i
03:53 -!- pingveno [~pingveno@c-98-246-133-8.hsd1.or.comcast.net] has joined
#go-nuts
03:53 -!- MX80 [~MX80@cust151.253.117.74.dsl.g3telecom.net] has joined #go-nuts
03:54 < skelterjohn> curse the 255 char cap
03:54 < dga> doh.  where'd that get cut?
03:54 < skelterjohn> what does it mean for an application to be "array
based"?
03:54 < dga> suffix array.
03:55 < uriel> dga: 'But mine's werid, because it i'
03:55 < dga> ...  But mine's weird, because it indexes data that's
bit-packed into a dense array.  I handle that in C++ by overloading [] to unpack
on demand.
03:55 < skelterjohn> what does it mean for an application to be "suffix
array based"?
03:56 < dga> The core of the application performs searches in a few hundred
megabytes of text using a suffix array index.
03:56 < skelterjohn> what is a suffix array index?
03:56 < dga> see index/suffixarray.go
03:57 < skelterjohn> hmm
03:57 < skelterjohn> i'm not really in a state of mind to read code doc
right now
03:57 < dga> it's an efficient index that supports arbitrary substring
searches on a text corpus.  Uses roughly a 32-bit integer for every character of
text (4x blowup in size), but in log(n) steps you can find all occurrances of
whatever input search you're looking for.
03:57 < skelterjohn> just got back from dinner with the wife and friends
O:-)
03:57 < skelterjohn> ah, thanks
03:57 < dga> suffix arrays do not mix well with a few glasses of wine, as a
warning.  :)
03:58 < dga> But they're a damn clever indexing mechanism for the situations
where you need them.
03:59 < skelterjohn> cool
03:59 < skelterjohn> i think i'm going to go pass out
04:00 -!- ezys [~ezys@c-67-161-85-212.hsd1.wa.comcast.net] has quit [Quit: WeeChat
0.3.3]
04:01 < dga> Unsurprisingly, their inventor (Udi Manber) is now at Google.
One of the better implementations of suffix array construction code is from Sean
Quinlan and Sean Doward ...  both now at Google.  :p
04:01 < dga> and on that note...  I think I'll now go beg forgiveness for
working on a friday night.  Thanks for the advice, all.
04:06 -!- ezys [~ezys@c-67-161-85-212.hsd1.wa.comcast.net] has joined #go-nuts
04:07 < uriel> Sean Quinlan and Sean Doward worked with russ cox and rob
pike at Bell Labs on plan9
04:07 < dga> nod
04:07 < uriel> dga: might be worth asking them to work on something for Go
;)
04:09 < dga> (uriel: I was proobably being a bit oblique; I actually meant
for my comments to explain why I believe Go has a nice implementation of suffix
arrays that I'd like to replace my own crappy, painful-to-debug code with...)
04:09 -!- Viriix [~joseph@c-67-169-172-251.hsd1.ca.comcast.net] has quit [Quit:
Leaving]
04:12 -!- ezys [~ezys@c-67-161-85-212.hsd1.wa.comcast.net] has quit [Quit: WeeChat
0.3.3]
04:21 <@adg> dga: the suffixarray package is all gri
04:22 -!- rejb [~rejb@unaffiliated/rejb] has quit [Ping timeout: 246 seconds]
04:27 -!- ezys [~ezys@c-67-161-85-212.hsd1.wa.comcast.net] has joined #go-nuts
04:28 -!- tensai_cirno [~cirno@79.104.4.91] has joined #go-nuts
04:29 -!- photron [~photron@port-92-201-69-164.dynamic.qsc.de] has joined #go-nuts
04:30 -!- dga [~dga@MOO.CMCL.CS.CMU.EDU] has quit [Quit: Lost terminal]
04:31 -!- krolaw [~krolaw@203.100.208.229] has quit [Quit: krolaw]
04:47 -!- nixness [~dsc@78.100.161.104] has quit [Ping timeout: 258 seconds]
04:47 -!- foocraft [~dsc@78.100.161.104] has quit [Ping timeout: 246 seconds]
05:02 -!- ezys [~ezys@c-67-161-85-212.hsd1.wa.comcast.net] has quit [Quit: WeeChat
0.3.3]
05:04 -!- fmoo [~Adium@c-76-102-41-101.hsd1.ca.comcast.net] has joined #go-nuts
05:04 -!- brett [~brett@rdnzl.net] has joined #go-nuts
05:09 -!- krolaw [~krolaw@203.100.208.229] has joined #go-nuts
05:14 -!- vsayer [~vivek@2001:470:1f04:1a6b:21a:6bff:fe35:d2a5] has quit [Ping
timeout: 260 seconds]
05:16 -!- tensai_cirno [~cirno@79.104.4.91] has quit [Quit: Leaving]
05:27 -!- keithcascio [~keithcasc@nat/google/x-msbffqjmgitnlwwz] has quit [Quit:
Leaving]
05:27 -!- ezys [~ezys@c-67-161-85-212.hsd1.wa.comcast.net] has joined #go-nuts
05:29 -!- eikenberry [~jae@68.118.117.234] has quit [Quit: End of line.]
05:35 -!- vsayer [~vivek@c-67-170-236-166.hsd1.ca.comcast.net] has joined #go-nuts
05:41 -!- niemeyer_unaway
[~niemeyer@189-10-155-52.pltce701.dsl.brasiltelecom.net.br] has quit [Ping
timeout: 240 seconds]
05:41 -!- bpalmer [~user@unaffiliated/bpalmer] has quit [Ping timeout: 260
seconds]
05:43 -!- nettok [~quassel@200.119.151.131] has quit [Remote host closed the
connection]
05:43 -!- krutcha1 [~krutcha@S010600045a27676a.vs.shawcable.net] has joined
#go-nuts
05:43 -!- bpalmer [~user@unaffiliated/bpalmer] has joined #go-nuts
05:50 -!- crodjer [~rohanjain@203.110.240.205] has quit [Ping timeout: 240
seconds]
05:57 -!- crodjer [~rohanjain@203.110.240.205] has joined #go-nuts
06:00 -!- dchest [~dchest@109.228.79.14] has joined #go-nuts
06:01 -!- Eko [~eko@unaffiliated/eko] has left #go-nuts ["Leaving"]
06:25 -!- saturnfive [~saturnfiv@210.74.155.131] has joined #go-nuts
06:28 -!- cafesofie [~cafesofie@ool-4a5a6ee5.dyn.optonline.net] has quit [Remote
host closed the connection]
06:31 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
06:32 -!- scyth [~scyth@rots.in.rs] has quit [Ping timeout: 258 seconds]
06:32 -!- scyth [~scyth@rots.in.rs] has joined #go-nuts
06:47 -!- Viriix [~joseph@c-67-169-172-251.hsd1.ca.comcast.net] has joined
#go-nuts
06:50 -!- fmoo [~Adium@c-76-102-41-101.hsd1.ca.comcast.net] has quit [Quit:
Leaving.]
06:54 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Quit: Leaving]
06:57 -!- jgonzalez [~jgonzalez@173-14-137-134-NewEngland.hfc.comcastbusiness.net]
has joined #go-nuts
07:08 -!- zimsim [~simon@87.72.77.195] has joined #go-nuts
07:08 -!- rlab [~Miranda@91.200.158.34] has quit [Read error: Connection reset by
peer]
07:09 -!- manveru [~manveru@b08s28ur.corenetworks.net] has quit [Remote host
closed the connection]
07:10 -!- krutcha1 [~krutcha@S010600045a27676a.vs.shawcable.net] has quit [Quit:
Leaving]
07:11 -!- manveru [~manveru@b08s28ur.corenetworks.net] has joined #go-nuts
07:17 -!- piranha [~piranha@5ED43A0B.cm-7-5a.dynamic.ziggo.nl] has joined #go-nuts
07:17 -!- randfur [~androirc@58.145.148.59] has joined #go-nuts
07:20 -!- jgonzalez [~jgonzalez@173-14-137-134-NewEngland.hfc.comcastbusiness.net]
has quit [Quit: Leaving]
07:25 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
07:27 -!- huin [~huin@91.85.185.181] has joined #go-nuts
07:40 -!- Viriix [~joseph@c-67-169-172-251.hsd1.ca.comcast.net] has quit [Quit:
This computer has gone to sleep]
07:43 -!- Project_2501 [~Marvin@82.84.94.192] has joined #go-nuts
07:44 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
07:45 -!- ShadowIce
[~pyoro@HSI-KBW-109-193-120-162.hsi7.kabel-badenwuerttemberg.de] has joined
#go-nuts
07:45 -!- ShadowIce
[~pyoro@HSI-KBW-109-193-120-162.hsi7.kabel-badenwuerttemberg.de] has quit
[Changing host]
07:45 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has joined #go-nuts
07:50 -!- randfur [~androirc@58.145.148.59] has quit [Ping timeout: 240 seconds]
07:56 -!- dchest [~dchest@109.228.79.14] has quit [Quit: dchest]
08:02 -!- Fish [~Fish@9fans.fr] has joined #go-nuts
08:09 -!- dchest [~dchest@109.228.79.14] has joined #go-nuts
08:13 -!- ezys [~ezys@c-67-161-85-212.hsd1.wa.comcast.net] has quit [Quit: reboot]
08:27 -!- firwen [~firwen@gex01-1-78-234-55-225.fbx.proxad.net] has joined
#go-nuts
08:29 -!- virtualsue [~chatzilla@nat/cisco/x-ffeukhuehwsznieo] has joined #go-nuts
08:38 -!- virtualsue [~chatzilla@nat/cisco/x-ffeukhuehwsznieo] has quit [Ping
timeout: 240 seconds]
08:59 < plexdev> http://is.gd/xXCMO4 by [Dmitry Chestnykh] in
go/misc/goplay/ -- misc/goplay: fix Tab and Shift+Enter in Firefox.
09:11 -!- foocraft [~dsc@78.101.196.112] has joined #go-nuts
09:20 -!- saturnfive [~saturnfiv@210.74.155.131] has quit [Read error: Connection
reset by peer]
09:24 -!- matti_ [~mumboww@c-24-6-22-101.hsd1.ca.comcast.net] has left #go-nuts []
09:44 -!- Fish [~Fish@9fans.fr] has quit [Quit: So Long, and Thanks for All the
Fish]
09:56 -!- femtoo [~femto@95-89-249-242-dynip.superkabel.de] has joined #go-nuts
09:57 -!- go^lang [~newblue@119.121.240.213] has quit [Read error: Connection
timed out]
09:58 -!- go^lang [~newblue@119.121.240.213] has joined #go-nuts
10:01 -!- femtooo [~femto@95-89-249-242-dynip.superkabel.de] has joined #go-nuts
10:02 -!- arun_ [~arun@unaffiliated/sindian] has joined #go-nuts
10:02 -!- shvntr [~shvntr@116.26.132.70] has joined #go-nuts
10:04 -!- femtoo [~femto@95-89-249-242-dynip.superkabel.de] has quit [Ping
timeout: 246 seconds]
10:05 -!- joelkronander
[~joelkrona@c-bf2fe253.617-1-64736c22.cust.bredbandsbolaget.se] has joined
#go-nuts
10:31 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
10:57 -!- saati [~bjb@marvin.harmless.hu] has left #go-nuts []
11:08 -!- dju [dju@fsf/member/dju] has joined #go-nuts
11:24 -!- tensai_cirno [~cirno@195.91.156.2] has joined #go-nuts
11:29 -!- tensai_cirno [~cirno@195.91.156.2] has quit [Quit: Leaving]
11:52 -!- zozoR [~Morten@56344480.rev.stofanet.dk] has joined #go-nuts
11:58 -!- nixness [~dsc@89.211.128.121] has joined #go-nuts
11:59 -!- edsrzf [~chickench@122-61-221-144.jetstream.xtra.co.nz] has quit [Remote
host closed the connection]
12:01 -!- foocraft [~dsc@78.101.196.112] has quit [Ping timeout: 250 seconds]
12:08 -!- huin [~huin@91.85.185.181] has quit [Quit: brb]
12:08 -!- huin [~huin@91.85.185.181] has joined #go-nuts
12:11 -!- Project_2501 [~Marvin@82.84.94.192] has quit [Read error: Operation
timed out]
12:13 -!- Project_2501 [~Marvin@82.84.90.52] has joined #go-nuts
12:15 -!- zimsim [~simon@87.72.77.195] has quit [Read error: Connection reset by
peer]
12:17 -!- photron [~photron@port-92-201-69-164.dynamic.qsc.de] has quit [Ping
timeout: 240 seconds]
12:18 -!- shvntr [~shvntr@116.26.132.70] has quit [Quit: leaving]
12:24 -!- foocraft [~dsc@78.101.179.198] has joined #go-nuts
12:27 -!- nixness [~dsc@89.211.128.121] has quit [Ping timeout: 250 seconds]
12:29 -!- zimsim [~simon@87.72.77.195] has joined #go-nuts
13:06 < taruti> Is there a nice way of enlarging a []byte efficiently?
13:06 < Namegduf> append()
13:07 < Namegduf> Copying it to a bigger thing is the best you can do.
13:07 < taruti> b = append(b, make([]byte, 10240)...) does not seem very
efficient
13:07 < Namegduf> You *can't* enlarge things in memory efficiently.
13:07 -!- hopso [58734516@gateway/web/freenode/ip.88.115.69.22] has joined
#go-nuts
13:07 < nsf> the only efficient way to enlarge array is to preallocate it
13:07 < Namegduf> Because there's other stuff in memory around it.
13:08 < nsf> taruti: make and copy will work
13:08 < taruti> just wondering whether there is a idiomatic way to avoid the
double-allocation
13:08 < Namegduf> Allocate it once, at the size you want it.
13:08 < Namegduf> If you need to resize it bigger, you have to reallocate.
That's inherent in the way contiguous data structures work.
13:09 < nsf> taruti: newa := make([]byte, 0, 100500); copy(newb, b);
13:09 < str1ngs> taruti: or use bytes.Buffer
13:09 < nsf> oops
13:09 < nsf> newa := make([]byte, 0, 100500); copy(newa, a);
13:09 < nsf> but whatever
13:09 < taruti> nsf, ok, I'll do that way
13:10 < nsf> although
13:10 < nsf> maybe you need to use length
13:10 < nsf> instead of capacity
13:10 < nsf> newa := make([]byte, 100500); copy(newa, a);
13:10 < nsf> like that
13:10 < nsf> ah, no
13:10 < nsf> newa := make([]byte, len(a), 100500); copy(newa, a);
13:10 < nsf> :)
13:10 < nsf> anyways..
13:13 -!- TheMue [~TheMue@p5DDF6E5B.dip.t-dialin.net] has joined #go-nuts
13:13 -!- crodjer [~rohanjain@203.110.240.205] has quit [Quit: Leaving]
13:14 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
13:17 -!- tvw [~tv@e176005213.adsl.alicedsl.de] has joined #go-nuts
13:18 -!- crodjer [~rohanjain@203.110.240.205] has joined #go-nuts
13:19 -!- coud [~coud@81.25.16.87] has joined #go-nuts
13:19 -!- m4dh4tt3r [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has joined
#go-nuts
13:25 -!- Scorchin [~Scorchin@host86-160-233-247.range86-160.btcentralplus.com]
has joined #go-nuts
13:30 < hopso> Why on earth does F-Secure think ld.exe is a malicious?
13:30 -!- coudX [~coud@81.25.16.87] has joined #go-nuts
13:30 -!- coudX [~coud@81.25.16.87] has quit [Read error: Connection reset by
peer]
13:30 -!- coud [~coud@81.25.16.87] has quit [Read error: Connection reset by peer]
13:31 -!- coudX [~coud@81.25.16.87] has joined #go-nuts
13:33 < taruti> Has anyone written a nice library for parsing binary data
that supports length-prefixed-fields?
13:34 -!- coudX [~coud@81.25.16.87] has quit [Read error: Connection reset by
peer]
13:37 -!- reds [~reds@pool-74-101-147-57.nycmny.fios.verizon.net] has joined
#go-nuts
13:42 -!- joelkronander
[~joelkrona@c-bf2fe253.617-1-64736c22.cust.bredbandsbolaget.se] has quit [Quit:
joelkronander]
13:44 -!- joelkronander [~joelkrona@83.226.47.191] has joined #go-nuts
13:50 < nsf> taruti: you can use Go's gob, it's a binary format
13:50 < nsf> and it can serialize arrays and slices
13:51 -!- niemeyer_unaway
[~niemeyer@189-10-155-52.pltce701.dsl.brasiltelecom.net.br] has joined #go-nuts
13:51 < nsf> or I know a C library, which does serialization just fine,
called 'tpl'
13:58 -!- m4dh4tt3r [~Adium@c-69-181-223-245.hsd1.ca.comcast.net] has quit [Quit:
Leaving.]
14:00 -!- crodjer [~rohanjain@203.110.240.205] has quit [Quit: Leaving]
14:02 -!- Fish [~Fish@sat78-8-88-174-225-4.fbx.proxad.net] has joined #go-nuts
14:02 -!- crodjer [~rohanjain@203.110.240.205] has joined #go-nuts
14:08 -!- coudX [~coud@81.25.16.87] has joined #go-nuts
14:16 -!- nixness [~dsc@89.211.154.142] has joined #go-nuts
14:18 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 264 seconds]
14:18 -!- foocraft [~dsc@78.101.179.198] has quit [Ping timeout: 250 seconds]
14:23 -!- wtfness [~dsc@89.211.73.236] has joined #go-nuts
14:26 -!- nixness [~dsc@89.211.154.142] has quit [Ping timeout: 260 seconds]
14:28 -!- crodjer [~rohanjain@203.110.240.205] has quit [Quit: Leaving]
14:28 -!- crodjer [~rohanjain@203.110.240.205] has joined #go-nuts
14:30 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-156-243.clienti.tiscali.it] has
joined #go-nuts
14:33 -!- Project_2501 [~Marvin@82.84.90.52] has quit [Ping timeout: 252 seconds]
14:36 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
14:37 -!- krolaw [~krolaw@203.100.208.229] has quit [Quit: krolaw]
14:43 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Quit:
skelterjohn]
14:51 -!- reds [~reds@pool-74-101-147-57.nycmny.fios.verizon.net] has quit [Remote
host closed the connection]
14:53 -!- unofficialmvp [~dev@94.62.164.227] has joined #go-nuts
14:53 -!- nsf [~nsf@jiss.convex.ru] has quit [Read error: Operation timed out]
14:54 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
15:04 -!- unofficialmvp [~dev@94.62.164.227] has left #go-nuts []
15:04 -!- GutenLinux [~chatzilla@122.242.168.132] has quit [Remote host closed the
connection]
15:09 < exch> yay.  Can now bind Go functions to be called from a script.
15:11 -!- krolaw [~krolaw@203.100.208.229] has joined #go-nuts
15:15 -!- nixness [~dsc@78.101.168.111] has joined #go-nuts
15:16 -!- tvw [~tv@e176005213.adsl.alicedsl.de] has quit [Ping timeout: 246
seconds]
15:18 -!- foocraft [~dsc@89.211.73.236] has quit [Ping timeout: 248 seconds]
15:18 < niemeyer> exch: How so?
15:19 < exch> cos I made it to do so
15:21 -!- virtualsue [~chatzilla@nat/cisco/x-sbhokjwoxgpptbkg] has joined #go-nuts
15:24 < ww> anyone used this spdy package and knows how it works?
15:29 -!- tensai_cirno [~cirno@77.232.15.216] has joined #go-nuts
15:29 -!- krolaw [~krolaw@203.100.208.229] has quit [Quit: krolaw]
15:29 < hopso> I only know it's some ind of augmented http protocol.
15:30 -!- krolaw [~krolaw@203.100.208.229] has joined #go-nuts
15:38 -!- virtualsue [~chatzilla@nat/cisco/x-sbhokjwoxgpptbkg] has quit [Ping
timeout: 240 seconds]
15:39 < str1ngs> exch: kitten?
15:39 < str1ngs> ww: not yet but I did clone it
15:40 < exch> str1ngs: yes
15:40 < str1ngs> exch: dude that rocks.  I'll check it out.
15:40 -!- crodjer [~rohanjain@203.110.240.205] has quit [Remote host closed the
connection]
15:40 < str1ngs> exch: have you seen the eval package?
15:41 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 252 seconds]
15:42 < exch> haven't tried it myself, but I understand there are some
limitations to that
15:43 < str1ngs> I think kitten is more what I was looking for
15:43 < str1ngs> mainly binding fucntions in script form
15:43 < str1ngs> functions* even
15:44 < exch> If you like esoteric stuff like Factor :)
15:44 < ww> ok, some progress...
15:45 -!- wtfness [~dsc@89.211.181.225] has joined #go-nuts
15:45 < ww> if you run chrome with --use-spdy=no-ssl it will try to connect
to the spdy port (8181 in my case)
15:45 < ww> and now...  it just hangs with no response from the server...
15:47 -!- Fish [~Fish@sat78-8-88-174-225-4.fbx.proxad.net] has quit [Remote host
closed the connection]
15:47 < ww> i also wonder how one of the assumptions they talk about on the
spdy page will work in my application - that headers like Accept need to be sent
only once at the start of the session...  which in my case is most definitely not
true
15:47 < ww> but first...  to try to get it to give a response...  any
response...
15:47 -!- nixness [~dsc@78.101.168.111] has quit [Ping timeout: 240 seconds]
15:49 < dforsyth> ha, i was thinking about writing a spdy package
15:49 < dforsyth> sweet
15:50 < ww> a spdy command line client would be very useful for debugging...
15:51 < ww> like some patches for curl or a go curl clone or something...
15:51 * ww actually hates web browsers
15:53 < str1ngs> I have a rough go curl client that I have been working on
15:53 < str1ngs> but its not hard to debug the http headers
15:53 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
15:54 < ww> wow...  if you actually inspect the spdy state
chrome://net-internals/#spdy...  chrome calls home a lot to google...
15:54 < ww> bloody spyware
15:54 < str1ngs> lol
15:56 < ww> actually though...  a good c library for spdy client would be
more useful than a go one...
15:56 < ww> i could see lots-of-things-that-aren't-web-browsers that do
repeated http calls (like api clients) using it
15:57 -!- nettok [~quassel@200.119.185.91] has joined #go-nuts
15:58 < ww> obviously a go client package would be very useful too - i think
brad fitzpatrick is working on one from what i have read
15:58 -!- go^lang [~newblue@119.121.240.213] has quit [Ping timeout: 246 seconds]
15:58 -!- crodjer [~rohanjain@203.110.240.205] has joined #go-nuts
15:58 < str1ngs> Segmentation fault yes!
15:59 * ww congratulates str1ngs
15:59 < ww> did you make go segfault without using cgo or unsafe?
16:00 < str1ngs> chromium
16:01 < dforsyth> do i want to go see rms speak today?
16:02 < ww> dforsyth: why not?
16:02 -!- hopso [58734516@gateway/web/freenode/ip.88.115.69.22] has quit [Ping
timeout: 252 seconds]
16:03 < dforsyth> have any of you guys every gone to a talk by him?
16:03 < dforsyth> is it worth the time?
16:03 < str1ngs> ww: hmm I got it to connect thanks to the no-ssl but I
think my handle is wrong
16:04 < ww> dforsyth: if you haven't, definitely.  and if you know a good
chinese restaurant, suggest it afterwards
16:04 -!- tensai_cirno [~cirno@77.232.15.216] has quit [Ping timeout: 246 seconds]
16:08 < dforsyth> i guess that gives me a reason to head downtown, too
16:08 < ww> panic: interface conversion: *spdy.serverStream is not
http.Hijacker: missing method Hijack
16:08 < str1ngs> ww: https://gist.github.com/923231
16:08 < str1ngs> ww: add a index.html
16:09 < str1ngs> that just serves ./ as root.  I need to figure out how to
do routed handles
16:09 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-156-243.clienti.tiscali.it] has
quit [Quit: E se abbasso questa leva che succ...]
16:10 < ww> str1ngs: i've got a couple of flavours of routed handlers for
you...  need to move them to their own generic handler package
16:10 < str1ngs> ww: I ment in the context of http package
16:10 -!- wtfness [~dsc@89.211.181.225] has quit [Ping timeout: 240 seconds]
16:11 < ww> yes,
https://bitbucket.org/ww/gold/src/f149c088ee56/deref/autoneg.go#cl-45
16:11 < str1ngs> I think I left io in there you dont need it
16:12 < ww> sure...  but does that example serve normal http too?  let's
see...
16:12 < ww> DOS alert -- try making a non-spdy request to the spdy port...
16:12 < ww> it just waits and waits...
16:13 < ww> e.g.  telnet localhost 8181
16:13 < ww> GET / HTTP/1.0
16:13 < ww> no protocol error...
16:14 < ww> and those flags to chrome, --use-spdy=no-ssl seem to make it try
to use spdy for everything...  so i can't see the bbc, for example...
16:16 < str1ngs> I noticed that ot
16:16 < str1ngs> to*
16:16 -!- go^lang [~newblue@119.121.240.213] has joined #go-nuts
16:16 < str1ngs> so probably best to server with tls
16:18 < ww> aha...  i see why i got that panic...
16:18 < ww> i have a special /sparql path that reverse-proxies to a sparql
service (sparql is a query language for rdf, you use it to talk to the database)
16:19 < ww> and the reverse proxy hijacks the connection...  which it cannot
do with spdy
16:24 -!- wtfness [~dsc@89.211.215.228] has joined #go-nuts
16:26 -!- katakuna [pie@kjal.demon.co.uk] has joined #go-nuts
16:27 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts
16:30 < ww> https://bitbucket.org/ww/gold/changeset/e6cc56f0eb38
16:30 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has quit [Quit:
skelterjohn]
16:34 -!- angasule [~angasule@190.2.33.49] has quit [Remote host closed the
connection]
16:36 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts
16:40 < str1ngs> ww: have you seen https://github.com/petar/GoReverseProxy
16:40 < str1ngs> dont think that will help this though
16:41 < ww> str1ngs: yes, that may have been where i ripped some code from
16:41 < dforsyth> everytime i see mail about mongo drivers, i cant believe
no one has named their project mon.go
16:41 -!- tensai_cirno [~cirno@77.232.15.216] has joined #go-nuts
16:43 < str1ngs> ww: oh man the way you worded that to funny
16:43 -!- krolaw [~krolaw@203.100.208.229] has quit [Quit: krolaw]
16:43 < ww> ?
16:43 < str1ngs> seems like you were not sure if you did or not
16:44 -!- krolaw [~krolaw@203.100.208.229] has joined #go-nuts
16:44 < ww> i'm not sure
16:45 < ww> i know i saw it when i was looking how to do a reverse proxy...
but may have used or modified something from somewhere else
16:45 < ww> actually, i noted it in the source file:
16:46 < ww> // copied with slight modifications from
16:46 < ww> // https://github.com/cthom06/go-rproxy/blob/master/proxy.go
16:46 < str1ngs> ah
16:52 -!- skelterjohn [~jasmuth@c-24-0-2-70.hsd1.nj.comcast.net] has joined
#go-nuts
16:57 < skelterjohn> morning
16:59 < ww> heya skelterjohn
17:01 -!- niemeyer [~niemeyer@189-10-155-52.pltce701.dsl.brasiltelecom.net.br] has
quit [Ping timeout: 240 seconds]
17:02 -!- niemeyer [~niemeyer@189-30-249-127.pltce701.dsl.brasiltelecom.net.br]
has joined #go-nuts
17:03 -!- niekie [~niek@CAcert/Assurer/niekie] has quit [Read error: Operation
timed out]
17:05 -!- tensai_cirno [~cirno@77.232.15.216] has quit [Remote host closed the
connection]
17:06 -!- crazy2be [~crazy2be@d209-89-248-73.abhsia.telus.net] has joined #go-nuts
17:07 -!- boscop [~boscop@g227148016.adsl.alicedsl.de] has quit [Ping timeout: 246
seconds]
17:08 -!- boscop [~boscop@f055210242.adsl.alicedsl.de] has joined #go-nuts
17:14 -!- krolaw [~krolaw@203.100.208.229] has quit [Quit: krolaw]
17:15 -!- angasule [~angasule@190.2.33.49] has quit [Remote host closed the
connection]
17:17 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
17:18 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts
17:20 -!- unhygienix [~unhygieni@host81-159-208-247.range81-159.btcentralplus.com]
has joined #go-nuts
17:21 -!- napsy [~luka@APN-122-53-214-gprs.simobil.net] has joined #go-nuts
17:26 -!- napsy [~luka@APN-122-53-214-gprs.simobil.net] has quit [Ping timeout:
276 seconds]
17:27 -!- tensai_cirno [~cirno@77.232.15.216] has joined #go-nuts
17:31 -!- ExtraSpice [XtraSpice@88.118.35.153] has joined #go-nuts
17:31 -!- Chopinn [~Chopin@ti0018a380-dhcp0864.bb.online.no] has joined #go-nuts
17:31 -!- unhygienix [~unhygieni@host81-159-208-247.range81-159.btcentralplus.com]
has quit [Quit: unhygienix]
17:35 -!- tensai_cirno [~cirno@77.232.15.216] has quit [Remote host closed the
connection]
17:40 -!- dju_ [dju@fsf/member/dju] has joined #go-nuts
17:43 -!- dju [dju@fsf/member/dju] has quit [Ping timeout: 260 seconds]
17:46 < crazy2be> what do people here use for IPC?
17:48 < vsmatck> rpc or netchan
17:49 < aiju> pipes
17:50 < vsmatck> aiju: :)
17:51 < crazy2be> aiju: Well, i'm trying to communicate with a deamon, so
i'm not sure how that would work
17:52 < crazy2be> basically a service management system
17:52 -!- niekie [~niek@CAcert/Assurer/niekie] has joined #go-nuts
17:53 < vsmatck> It would by nice to have something like ruby God in go.
17:53 < aiju> it would be nice to have something like /srv in Linux
17:56 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts
17:56 -!- zimsim [~simon@87.72.77.195] has quit [Read error: Operation timed out]
17:57 < skelterjohn> what is ruby God?
17:57 < vsmatck> It monitors a process and restarts it if it dies.  It has a
nice configuration file and deals with stuff like flapping.
17:59 < skelterjohn> sounds like something you need in a language where it's
hard to prevent things from crashing
17:59 < crazy2be> lol
18:00 < aiju> doesn't at all like a language specific thing
18:00 < vsmatck> Well, go is better but I'd still use something like God.
18:00 < aiju> +sound
18:00 < aiju> more like something a daemon should take care of
18:00 < vsmatck> yeah, linux distributions have similar things built in.  I
know debian does.
18:01 < crazy2be> like upstart you mean?
18:02 < crazy2be> i suppose i could adapt upstart to my needs, but that
seems way more code than i need...
18:02 < str1ngs> systemd
18:03 < vsmatck> Like right now.  Go applications leak memory.  If a
regression like that got introduced I might not see it and my web application
would crash.  Just a safegaurd for stuff like that.
18:03 < skelterjohn> go apps leak memory?
18:03 < skelterjohn> i know they don't give it back ever
18:03 < skelterjohn> but they reuse what they took
18:04 < vsmatck> Currently godoc and my program eat more memory until the OS
kills them.  I could have a God like applications which would monitor memory use
and restart them.
18:04 < crazy2be> well i have one app that leaks massive memory
18:04 < crazy2be> allocating tons of data structures
18:04 < skelterjohn> godoc is "workng as intended" indexing all the
documentation and source
18:04 < vsmatck> Something wrong with the GC. In the bug it appears that it
crashes for most people.  On my system it just leaks fast.
18:04 < skelterjohn> it spend about 90 seconds
18:04 < skelterjohn> and grabs about .5gb of memory
18:05 < skelterjohn> but then internally releases it
18:05 < skelterjohn> i filed an issue about it but they said i should mind
my own business
18:05 < skelterjohn> i mean "working as intended"
18:05 < skelterjohn> you can disable it with -maxresults=0 or some such
nonsense
18:05 < vsmatck> oh!
18:06 * vsmatck tests
18:06 < skelterjohn> i might have misspelled maxresults, just so you know
18:06 < skelterjohn> but it's something like that
18:06 < skelterjohn> if you want a nice low mem version of godoc, use nsf's
18:06 < str1ngs> something like http://golang.org/pkg/debug/proc/
18:07 < nsf> gortfm doesn't have a server side at all
18:07 < skelterjohn> right
18:07 < skelterjohn> that's why it's low memory :)
18:07 < nsf> it's just a static generator of js rich html documents
18:07 < skelterjohn> the server runs very quickly.
18:07 < vsmatck> If this is normal behavior for godoc there must be other
problems with my program that cause it to go crazy.
18:08 < vsmatck> yep, 464mb and it stopped taking more memory.
18:08 < skelterjohn> and it will "report" its using only 150mb
18:08 < skelterjohn> but the other 300 is just sitting there inside the go
runtime
18:08 < ww> "just in case"
18:09 < skelterjohn> :)
18:09 < ww> actually i don't mind that it does that, except it makes it
really difficult to detect memory leaks in code that calls through cgo
18:10 < skelterjohn> i don't mind either, i just think that godoc should not
do this
18:10 < skelterjohn> forces me to not run local servers...  i mean, 1/4 my
available memory?
18:10 < skelterjohn> no thanks
18:10 < ww> yeah, i turned it off also...
18:11 < skelterjohn> but i like rtfm.  i can easily jump from package to
package
18:11 < skelterjohn> with godoc i'd find myself opening 15 different windows
for all the different packages i was using
18:12 < nsf> http://nsf.github.com/go/
18:12 < nsf> link
18:12 < nsf> ;)
18:12 < skelterjohn> i should fork gortfm and push back a fix i had to do, i
think
18:12 < nsf> you should
18:12 < skelterjohn> but the fix i did is the "wrong" way to do it
18:12 < nsf> I'm not developing it anymore
18:12 < skelterjohn> i just check to see if a target begins with "-n " and
if so, trim it
18:13 < nsf> hehe
18:13 < nsf> yeah, I won't accept a fix like that
18:13 < nsf> there must be a reason for this "-n "
18:13 < nsf> :(
18:13 < skelterjohn> right, and i didn't feel like delving deep enough to
figure out what that reason was
18:14 -!- zimsim [~simon@87.72.77.195] has joined #go-nuts
18:18 -!- coudX [~coud@81.25.16.87] has quit [Read error: Connection reset by
peer]
18:22 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-156-243.clienti.tiscali.it] has
joined #go-nuts
18:45 -!- nixness [~dsc@89.211.215.228] has joined #go-nuts
18:51 -!- Fish [~Fish@bus77-2-82-244-150-190.fbx.proxad.net] has joined #go-nuts
18:51 -!- nixness [~dsc@89.211.215.228] has quit [Quit: Leaving]
18:51 -!- rlab [~Miranda@71-249-113-92.pool.ukrtel.net] has joined #go-nuts
18:55 -!- nixness [~dsc@89.211.215.228] has joined #go-nuts
19:05 -!- eaburns [~eaburns@c-24-62-248-129.hsd1.nh.comcast.net] has joined
#go-nuts
19:05 -!- eaburns [~eaburns@c-24-62-248-129.hsd1.nh.comcast.net] has left #go-nuts
[]
19:10 -!- angasule [~angasule@190.2.33.49] has quit [Remote host closed the
connection]
19:12 -!- go^lang [~newblue@119.121.240.213] has quit [Ping timeout: 246 seconds]
19:15 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-159-115.clienti.tiscali.it] has
joined #go-nuts
19:18 -!- Project_2501 [~Marvin@dynamic-adsl-94-36-156-243.clienti.tiscali.it] has
quit [Ping timeout: 250 seconds]
19:20 -!- niemeyer [~niemeyer@189-30-249-127.pltce701.dsl.brasiltelecom.net.br]
has quit [Ping timeout: 240 seconds]
19:25 < crazy2be> hmm how do you actually *use* debug/proc?
19:26 < crazy2be> it just seems to be a collection of types
19:26 < crazy2be> but i've no idea how to get my hands on one of the types
19:26 < crazy2be> lol
19:26 < str1ngs> attach to a process
19:26 < str1ngs> with a pid
19:26 < crazy2be> ah
19:26 < crazy2be> stops all threads tho
19:27 < crazy2be> so i have to do
19:27 < str1ngs> might need to Continue
19:27 < str1ngs> but that seems strange
19:27 < crazy2be> process, err := proc.Attach(pid); process.Continue()
19:27 < str1ngs> I have not used it myself
19:27 < crazy2be> yeah it does
19:27 < crazy2be> but it's in the debug package
19:27 < crazy2be> so within that context it makes sence
19:27 < str1ngs> true
19:28 < str1ngs> there is the other signal stuff but I think this is more
what you are looking for.
19:29 < crazy2be> hmm rpc seems like a strange solution for ipc on the same
machine
19:29 < str1ngs> ya
19:29 < crazy2be> i have to choose a port and have a listener
19:29 -!- go^lang [~newblue@119.121.240.213] has joined #go-nuts
19:29 < crazy2be> and if i have lots of children that i'm communicating
with, it could be a pain
19:30 < crazy2be> there should be a way to have piped files
19:30 < crazy2be> essentally buffers held in memory
19:30 < str1ngs> there are pipes
19:30 < str1ngs> exec.Run
19:30 < str1ngs> for example
19:30 < crazy2be> yes but
19:30 < crazy2be> hm
19:30 < crazy2be> i want to be able to store that pipe somewhere on the
filesystem, and pick it up again later
19:31 < str1ngs> fifo ?
19:31 < str1ngs> or more like a socket?
19:31 < crazy2be> hm
19:31 < crazy2be> reading about named pipes
19:31 < crazy2be> sockets always seemed wierd to me
19:32 < str1ngs> I use pipes alot but that for simple stuff really
19:32 < crazy2be> ah named pipes are cool
19:34 < crazy2be> sockets seem overly compicated
19:34 -!- boomtopper
[~boomtoppe@cpc12-nrte22-2-0-cust249.8-4.cable.virginmedia.com] has joined
#go-nuts
19:35 < str1ngs> ya think you might want a fifo then
19:36 -!- Innominate [~sirrobin@cpe-076-182-074-143.nc.res.rr.com] has quit [Quit:
Caught signal 15, Terminated]
19:39 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-159-115.clienti.tiscali.it] has
quit [Ping timeout: 276 seconds]
19:40 -!- nixness [~dsc@89.211.215.228] has quit [Ping timeout: 248 seconds]
19:46 -!- Innominate [~sirrobin@cpe-076-182-074-143.nc.res.rr.com] has joined
#go-nuts
19:48 -!- Scorchin [~Scorchin@host86-160-233-247.range86-160.btcentralplus.com]
has quit [Quit: Scorchin]
19:49 < skelterjohn> anyone use xcode 4?
19:49 < skelterjohn> it seems to have forgotten about go files since i
upgrade just now
19:50 -!- edsrzf [~chickench@122-61-221-144.jetstream.xtra.co.nz] has joined
#go-nuts
20:02 -!- ExtraSpice [XtraSpice@88.118.35.153] has quit [Remote host closed the
connection]
20:04 -!- pothos [~pothos@111-240-172-98.dynamic.hinet.net] has quit [Read error:
Operation timed out]
20:04 -!- pothos_ [~pothos@111-240-167-237.dynamic.hinet.net] has joined #go-nuts
20:06 -!- skammer [~skammer@ppp95-165-187-230.pppoe.spdop.ru] has joined #go-nuts
20:11 -!- skammer [~skammer@ppp95-165-187-230.pppoe.spdop.ru] has quit [Remote
host closed the connection]
20:11 -!- skammer [~skammer@ppp95-165-187-230.pppoe.spdop.ru] has joined #go-nuts
20:12 -!- skammer [~skammer@ppp95-165-187-230.pppoe.spdop.ru] has left #go-nuts []
20:18 -!- femtooo [~femto@95-89-249-242-dynip.superkabel.de] has quit [Read error:
Connection reset by peer]
20:23 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has quit [Ping
timeout: 260 seconds]
20:32 -!- zozoR [~Morten@56344480.rev.stofanet.dk] has quit [Remote host closed
the connection]
20:34 -!- reds [~reds@pool-74-101-147-57.nycmny.fios.verizon.net] has joined
#go-nuts
20:36 < dforsyth> skelterjohn: so much stuff has changed, it doesnt surprise
me if go support it borked
20:46 -!- tobier [~tobier@c-1e9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
quit [Read error: Operation timed out]
20:47 -!- tobier [~tobier@c-1e9de055.712-1-64736c11.cust.bredbandsbolaget.se] has
joined #go-nuts
20:48 < crazy2be> hmm can you have a two-way connection with a named pipe?
20:51 -!- rlab [~Miranda@71-249-113-92.pool.ukrtel.net] has quit [Quit: Miranda
IM! Smaller, Faster, Easier.  http://miranda-im.org]
20:54 -!- virtualsue [~chatzilla@nat/cisco/x-painlddpxrzxmkib] has joined #go-nuts
21:01 -!- reds [~reds@pool-74-101-147-57.nycmny.fios.verizon.net] has quit [Remote
host closed the connection]
21:04 -!- Fish [~Fish@bus77-2-82-244-150-190.fbx.proxad.net] has quit [Quit: So
Long, and Thanks for All the Fish]
21:11 -!- tgall_foo [~tgall@206.9.88.154] has quit [Ping timeout: 276 seconds]
21:12 -!- firwen [~firwen@gex01-1-78-234-55-225.fbx.proxad.net] has quit [Remote
host closed the connection]
21:13 -!- Scorchin [~Scorchin@host86-160-233-247.range86-160.btcentralplus.com]
has joined #go-nuts
21:16 -!- reds [~reds@pool-74-101-147-57.nycmny.fios.verizon.net] has joined
#go-nuts
21:18 -!- krutcha1 [~krutcha@S010600045a27676a.vs.shawcable.net] has joined
#go-nuts
21:20 < crazy2be> :O
21:20 < crazy2be> rpc/jsonrpc should do what i want
21:20 < crazy2be> i was going to write it myself
21:20 < crazy2be> but it seems to be already written
21:20 < crazy2be> and should work on a named pipe rather than a http
connection
21:26 -!- TheMue [~TheMue@p5DDF6E5B.dip.t-dialin.net] has quit [Quit: TheMue]
21:36 -!- virtualsue [~chatzilla@nat/cisco/x-painlddpxrzxmkib] has quit [Quit:
ChatZilla 0.9.86.1 [Firefox 4.0/20110318052756]]
21:37 -!- zimsim [~simon@87.72.77.195] has quit [Quit: /dev/null]
21:42 -!- nixness [~dsc@78.100.176.127] has joined #go-nuts
21:44 < krutcha1> what's the typical strategy to farm say X tasks out to X
goroutines, then wait till all X have completed before moving forward?  a 'join'
behavior
21:45 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has joined
#go-nuts
21:45 < taruti> there is waitgroup
21:45 -!- foocraft [~dsc@89.211.215.228] has quit [Ping timeout: 240 seconds]
21:46 < krutcha1> oh?  I haven't hard of that one
21:46 < krutcha1> no hits on the specification page or effective go page
21:46 < krutcha1> is that a package ?
21:47 < aiju> yeah
21:47 < aiju> i mean no
21:47 < aiju> it's in a package
21:47 < aiju> i think it's in sync
21:47 < krutcha1> ah yeah I see it
21:47 < uriel> what is wrong with just using select?
21:47 < uriel> or maybe I'm not understanding the problem
21:48 < krutcha1> doesn't select just take whatever is offering data?
21:48 < skelterjohn> a common thing to do is to give each of these tasks a
"doneChan"
21:48 < skelterjohn> when they're done they each send something on doneChan
21:48 < skelterjohn> and to sync you read from doneChan X times
21:48 < aiju> i don't think select is even appropriate here
21:48 < uriel> actually, donou don't even need select
21:48 < skelterjohn> but a waitgroup is fine
21:48 < uriel> aiju: yea, you are right
21:49 < aiju> waitgroup is the fancy way
21:49 -!- niemeyer [~niemeyer@189-30-249-127.pltce701.dsl.brasiltelecom.net.br]
has joined #go-nuts
21:49 < krutcha1> yeah doing it manually with a bunch of channels seems like
a lot of scaffolding just to wait for some goroutines though
21:49 < uriel> not sure how waitgroup works, but giving each goroutine a
'done' channel, count how many messages come down that channel, when it is equal
the number of goroutines, you are done
21:49 < skelterjohn> waitgroup is more flexible
21:49 < skelterjohn> keeps track of the number of tasks so you don't have to
21:49 < uriel> krutcha1: you only need one channel
21:49 < aiju> uriel: this is probably just the implementation of waitgroup
21:50 < uriel> skelterjohn: an int keeps track of the number of tasks quite
fine I think
21:50 < aiju> oh no
21:50 < skelterjohn> right
21:50 < aiju> waitgroup is full of mutex bullshit
21:50 < skelterjohn> i'm not saying it's hard
21:50 < skelterjohn> i'm saying that waitgroup does it
21:50 < uriel> aiju: I'm guessing as much, but seems simple enough that I'm
not sure what the interface to waitgroup is, but seems like it might be just as
simple to do it yourself
21:50 < uriel> waitgroup uses mutexes?  yuck
21:50 < taruti> Is there any implementation of diffie-hellman in Go?
21:51 < uriel> taruti: check the crypto package, is quite complete I think
21:51 < krutcha1> looks like it might be just a counting semaphore or
something
21:51 < krutcha1> you call wg.Add(1) for each goroutine, and wg.Done() in
each goroutine to decrement
21:51 < krutcha1> then call Wait() and it falls through when the count hits
0 or something
21:52 * uriel thinks wg++ is still simpler than wg.Add(1)
21:52 < taruti> uriel: maybe I'm blind and don't see it there
21:52 < uriel> and then have wgd++ for each thing coming down the done chan
21:52 < uriel> when wgd == wg, you are done
21:53 < aiju> uriel: you don't need two, just decrement and check for zero
21:53 < aiju> just a variable and a channel
21:53 < uriel> aiju: ah, good point, even easier
21:53 < aiju> i had expected that to be the implementation of waitgroup
21:53 < uriel> really, what can get simpler than a fucking int counter and a
channel?
21:54 < krutcha1> thats about as simple as it gets, but waitgroup doesn't
use a channel even
21:54 < aiju> krutcha1: yeah, it uses a fucking mutex and a fucking
semaphore
21:54 < uriel> well, waitgroup probably has to be more 'general' and deal
with being a transparent/opaque/whatever interface, and other shit, one more
reason that kind of stuff is trivial using channels
21:55 < aiju> uriel: i think waitgroup requires less context switches
21:55 < uriel> I'm sure there are cases when waitgroup makes sense, but I
doubt they are very common
21:55 < aiju> that's the one only advantage
21:55 < uriel> aiju: could be, doubt it matters
21:55 < aiju> i can imagine it to matter, if you do lots of shit in lots of
threads
21:56 < uriel> how many context switches could you have with the channels
model?  not more than one per goroutine, and if what the goroutines do is
minimally expensive, that makes it quite irrelevant
21:56 < uriel> (and still doubt that much is needed)
21:56 < krutcha1> I don't mind how waitgroup appears to be implemented,
looks like it could use a timeout though
21:56 < aiju> uriel: you have two context switches with channels every time
some task finishes
21:56 < aiju> and only one with waitgroup
21:57 < aiju> not to say it actually matters in most applications
21:57 -!- Kunkka [~kristian@mivacukor.lha.sgsnet.se] has quit [Quit: leaving]
21:58 -!- boomtopper
[~boomtoppe@cpc12-nrte22-2-0-cust249.8-4.cable.virginmedia.com] has quit [Ping
timeout: 250 seconds]
21:58 < crazy2be> hmm when and why did they change os.Open()?
21:58 < exch> in the last weekly
21:59 < aiju> what happened to it?
21:59 < uriel> it was mentioned in the release notes
21:59 < crazy2be> it's now os.Open(name)
21:59 < uriel> it was simplified
21:59 < str1ngs> the change is for the better imo
21:59 < aiju> huh golang.org is not yet updated
21:59 < uriel> common case is simpler, uncommon case is just as complicated
as before, sounds like a win to me
22:00 < str1ngs> godoc os File
22:00 < uriel> aiju: that is quite sad
22:00 < vsmatck> I'm betting golang.org is updated to releases.
22:00 < str1ngs> err os Open
22:00 < vsmatck> Not weeklys.  Not sure tho.  Just a guess.
22:00 < uriel> adg: ping?  are golang.org docs only updated for 'release'?
22:00 < uriel> vsmatck: heh, was guessing the same, lets see what adg says
22:01 < ww> uriel: heya: you mentioned you wanted to talk about okf a while
back...
22:01 < uriel> although golang.org does have the docs for tip too
22:01 < crazy2be> hmm i suppose it's a nicer interface, but i really don't
want to have to change all my code...
22:01 < uriel> ww: yes, but not yet, in a few weeks/months ;P
22:01 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.4]
22:01 < ww> ok...  what part of the world are you in, btw?
22:01 < aiju> so how the fuck do you open files for writing?
22:01 < uriel> right now San Francisco
22:02 < aiju> os.Create?
22:02 < str1ngs> godoc os OpenFile
22:02 < ww> was going to mention http://okfn.org/okcon/ -- but a bit far
from sf
22:02 < aiju> *sigh* i love updating code
22:03 < str1ngs> aiju: Create works to
22:03 < crazy2be> hmm what happened to os.O_CREAT?
22:03 < krutcha1> does gofix implement the api changes per weekly?
22:03 < str1ngs> crazy2be: its now O_CREATE
22:04 < crazy2be> ah, that's much better
22:04 < crazy2be> +1 for that change
22:05 < aiju> hehe
22:05 < aiju> reminds me of Ken Thompson once being asked what he would
change if would redo Unix
22:05 < aiju> "i would have spelled creat(2) with an e"
22:05 < aiju> +he
22:09 < rm445> last time I looked Go had both O_CREAT and O_CREATE, did that
change?
22:09 < ampleyfly> go is not unix
22:09 < str1ngs> rm445: yes it changed
22:12 < crazy2be> i didn't know they added O_CREATE
22:13 < crazy2be> and O_CREAT really annoyed me
22:13 < crazy2be> but i had just gotten used to it
22:13 < crazy2be> :p
22:13 < crazy2be> also what is the functional difference between + and |?
22:13 < crazy2be> for masks
22:13 < rm445> carry
22:13 < aiju> crazy2be: 1+1 and 1|1
22:13 < aiju> check it out ;P
22:14 -!- huin [~huin@91.85.185.181] has quit [Quit: leaving]
22:14 < crazy2be> hmm gotry won't do 1|1
22:15 < crazy2be> ah nvm it wsa bash
22:15 < crazy2be> but for a flag, say os.O_CREATE+os.O_RDONLY, is there any
difference between + and |?
22:15 < aiju> no
22:15 < aiju> unless you have one twice
22:15 < crazy2be> huh
22:15 < aiju> in which case hells open with + and nothing happens with |
22:16 < aiju> os.O_CREATE | os.O_CREATE == os.O_CREATE
22:16 < aiju> os.O_CREATE + os.O_CREATE == ???
22:16 < crazy2be> because i had some old code that used + for the flags
22:16 < crazy2be> and i was confused by my own coding
22:16 < rm445> don't ever use +, you will just annoy anyone who looks at
your code.
22:16 < aiju> haha
22:16 < rm445> hah, including yourself :-)
22:17 < crazy2be> this is kinda annoying tho, i have 19 modules i have to
update to use the new call :/
22:17 < crazy2be> ah well
22:18 -!- ampleyfly [ampleyfly@gateway/shell/blinkenshell.org/x-dxztkkwxzwrqkqwj]
has quit [Ping timeout: 276 seconds]
22:18 < aiju> well, you have to keep coders busy
22:18 < aiju> or they start implementing "features"
22:18 < vsmatck> I don't much mind so long as the new library code is
better.  The reflect updates burned 2 hours of my time but resulted in better
code.
22:18 -!- ampleyfly [ampleyfly@gateway/shell/blinkenshell.org/x-zgyvzvdgacficgjz]
has joined #go-nuts
22:18 < crazy2be> vsmatck: that's true, but this is a minor improvement if
anything
22:19 < crazy2be> they could have just done Open() as it was, then
OpenFile() using the new syntax
22:20 < crazy2be> hmm they removed RemoteAddr() from http.ResonseWriter
22:21 < str1ngs> crazy2be: use gofix no?
22:21 < aiju> gofix seems suspicious
22:22 < str1ngs> how so?
22:23 -!- XenoPhoenix [~Xeno@cpc13-aztw24-2-0-cust23.aztw.cable.virginmedia.com]
has quit [Ping timeout: 276 seconds]
22:32 -!- Transformer [~Transform@ool-4a59e397.dyn.optonline.net] has joined
#go-nuts
22:34 -!- Transformer [~Transform@ool-4a59e397.dyn.optonline.net] has quit [Excess
Flood]
22:37 < crazy2be> why does os.Create() make a file with 0666 permissions by
default?
22:37 < crazy2be> doesn't that mean writable by all users?
22:37 < str1ngs> hmm should be 644 no?
22:37 < crazy2be> yeah that's what i would think
22:37 < exch> I generally even go with 0600
22:37 < exch> but i'm a bit paranoid that way
22:38 < aiju> ehm
22:38 < aiju> there is umask
22:38 < str1ngs> does it use umask though?
22:38 < aiju> 0666 ends up as 0644
22:38 < crazy2be> what is that?
22:38 < aiju> everything uses umask
22:38 < aiju> crazy2be: goddamn google it or whatever
22:38 < crazy2be> lol
22:38 < crazy2be> i've heard of it, but never was entirely sure how it
worked or what it did
22:38 < aiju> or just umask(2)
22:39 < crazy2be> its /etc/umask or something
22:39 < aiju> no
22:39 -!- go^lang [~newblue@119.121.240.213] has quit [Read error: Connection
timed out]
22:39 < aiju> umask is per process
22:39 < aiju> just read the damn manpage
22:39 -!- go^lang [~newblue@119.121.240.213] has joined #go-nuts
22:39 < exch> pff who reads those anymore?
22:39 < aiju> or the info page if you are that way inclined
22:40 < crazy2be> huh
22:40 < crazy2be> that's useful to know
22:40 < crazy2be> hmm they removed SetHeader
22:45 < crazy2be> hrm
22:46 < crazy2be> why am i getting deamon.go:25: undefined: syscall.Mkfifo
22:46 < crazy2be> it exists in the release version, as well as the weekly i
am currently using
22:47 -!- dchest [~dchest@109.228.79.14] has quit [Quit: dchest]
23:00 -!- ShadowIce [~pyoro@unaffiliated/shadowice-x841044] has quit [Quit:
Verlassend]
23:07 -!- scyth [~scyth@rots.in.rs] has quit [Quit: Leaving]
23:11 < crazy2be> named pipes are AWESOME
23:12 < crazy2be> but they do seem to be uni-directional
23:12 < crazy2be> easy enough to make two, i suppose
23:12 < crazy2be> and, actually, that makes sence
23:17 < uriel> 22:17 < crazy2be> this is kinda annoying tho, i have 19
modules i have to update to use the new call :/
23:17 < uriel> crazy2be: didn't read up on gofix?
23:17 < crazy2be> i used that after someone suggested it
23:17 < crazy2be> didn't know it existed
23:18 < uriel> http://blog.golang.org/2011/04/introducing-gofix.html
23:20 -!- angasule [~angasule@190.2.33.49] has joined #go-nuts
23:21 < aiju> that does gofmt on your code, right?
23:22 < crazy2be> wow gofix is awesome
23:23 < kevlar> indeed
23:23 < kevlar> it's soon going to make its way to the top of my list of
"awesome Go features"
23:24 < aiju> gofmt adds 40 lines to my code haha
23:24 -!- scyth [~scyth@rots.in.rs] has joined #go-nuts
23:25 < crazy2be> gofix, gofmt, awesome standard library, and the forced
naming conventions are all my favoriate things about go :)
23:25 < crazy2be> i used to hate having to update go code every time
something changed
23:25 < aiju> startx-ay*dBondDistance
23:26 < aiju> ^-- yuck
23:26 < aiju> personally i find gofmt reducing code readability
23:30 < crazy2be> aiju: Was that output by gofmt?
23:30 < kevlar> crazy2be: it removes whitespace in formulas
23:30 < crazy2be> huh
23:30 < crazy2be> gofix added whitespace for me
23:31 -!- dreadlorde [~dreadlord@c-24-11-39-160.hsd1.mi.comcast.net] has quit
[Ping timeout: 252 seconds]
23:33 < aiju> it also adds newlines to "if foo { bar }"
23:35 < crazy2be> aiju: That's usually good, imo
23:35 < aiju> i disagree
23:35 -!- scyth [~scyth@rots.in.rs] has quit [Quit: Leaving]
23:35 < aiju> if err != nil { Error(err.String()) }
23:35 < aiju> i have five of these in one function
23:35 < crazy2be> yes
23:35 < crazy2be> i have them all over
23:36 < crazy2be> what's your point?
23:36 < crazy2be> i write them as
23:36 < crazy2be> if err != nil {
23:36 < crazy2be> return err
23:36 < aiju> well, i find them much nicer to read than the "long" form
23:36 < crazy2be> }
23:36 < crazy2be> somewhat
23:37 < crazy2be> tradeoff between horizontal width and number of lines
23:37 < aiju> i'm not working on punch cards
23:37 -!- Scorchin [~Scorchin@host86-160-233-247.range86-160.btcentralplus.com]
has quit [Quit: Scorchin]
23:37 < aiju> and even those had 80 columns
23:38 < crazy2be> yes, but code with long lines gets progressively harder to
read, imo
23:38 < aiju> so does code with short lines
23:39 < aiju> there's an optimum somewhere in between
23:39 < crazy2be> yeah, you have the same issue in typography
23:40 < crazy2be> i like to write my latex documents with [twocolumn]
23:40 < aiju> eek
23:40 < crazy2be> so it's also persional perference :P
23:40 < aiju> i dislike twocolumn texts
23:50 < vsmatck> Seems like two column is the standard for a lot of CS
journals.
23:51 < aiju> another reason not to use it
23:51 < crazy2be> lol
23:51 < vsmatck> ?
23:54 -!- Transformer [~Transform@ool-4a59e397.dyn.optonline.net] has joined
#go-nuts
23:54 -!- scyth [~scyth@rots.in.rs] has joined #go-nuts
23:55 < crazy2be> well if i use one column, all of the equations end up with
a load of empty space
23:57 -!- Transformer [~Transform@ool-4a59e397.dyn.optonline.net] has left
#go-nuts []
--- Log closed Sun Apr 17 00:00:34 2011