--- Log opened Sun Dec 26 00:00:01 2010
00:16 -!- xash [~xash@d075168.adsl.hansenet.de] has joined #go-nuts
00:23 -!- ymasory [~ymasory@adsl-2-112-153.mia.bellsouth.net] has joined #go-nuts
00:28 -!- napsy [~luka@88.200.96.18] has quit [Quit: Lost terminal]
00:32 -!- vdrab [~vdrab@pd3e9b4.kyotnt01.ap.so-net.ne.jp] has quit [Quit: vdrab]
00:32 -!- ap3xo [~apexo@daedalus.isaco.de] has joined #go-nuts
00:33 -!- enferex_ [~enferex@users.757.org] has joined #go-nuts
00:33 -!- tdnrad_ [~darndt@terminal.research.cs.dal.ca] has joined #go-nuts
00:33 -!- suiside_ [tajnyman@bakery.awkwardcake.net] has joined #go-nuts
00:33 -!- c9s_ [~c9s@59-126-64-204.HINET-IP.hinet.net] has joined #go-nuts
00:33 -!- taruti_ [taruti@ultra.violetti.org] has joined #go-nuts
00:33 -!- drd_ [~eric@compassing.net] has joined #go-nuts
00:33 -!- GilJ_ [~gilles@zeus.ugent.be] has joined #go-nuts
00:38 -!- Netsplit *.net <-> *.split quits: taruti, enferex, tdnrad, apexo,
suiside, drd, c9s, GilJ, jesusaurus
00:51 -!- yebyen [~yebyen@cpe-67-253-244-26.rochester.res.rr.com] has joined
#go-nuts
00:53 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Ping timeout: 272
seconds]
00:55 -!- tav_ [~tav@92.7.68.30] has joined #go-nuts
00:56 -!- ExtraSpice [~XtraSpice@88.118.33.48] has quit [Ping timeout: 276
seconds]
00:56 -!- tav [~tav@92.24.231.145] has quit [Ping timeout: 255 seconds]
01:00 -!- Tuller [~tuller@pool-98-117-92-241.rcmdva.fios.verizon.net] has joined
#go-nuts
01:06 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts
01:17 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Ping timeout: 265
seconds]
01:19 -!- ymasory [~ymasory@adsl-2-112-153.mia.bellsouth.net] has quit [Ping
timeout: 240 seconds]
01:33 -!- vdrab [~vdrab@pd3e9b4.kyotnt01.ap.so-net.ne.jp] has joined #go-nuts
01:39 -!- Davidian1024 [~Davidian1@cpe-173-88-174-84.neo.res.rr.com] has quit
[Ping timeout: 264 seconds]
01:39 -!- Davidian1024 [~Davidian1@cpe-173-88-174-84.neo.res.rr.com] has joined
#go-nuts
01:42 -!- Scorchin [~Scorchin@host86-181-88-13.range86-181.btcentralplus.com] has
quit [Quit: Scorchin]
01:45 -!- Tv [~tv@cpe-76-168-227-45.socal.res.rr.com] has quit [Ping timeout: 255
seconds]
01:47 -!- nettok [~quassel@200.119.167.28] has joined #go-nuts
01:49 -!- vdrab [~vdrab@pd3e9b4.kyotnt01.ap.so-net.ne.jp] has quit [Quit: vdrab]
02:00 -!- tensai_cirno [~cirno@77.232.15.216] has quit [Quit: Leaving]
02:14 -!- ymasory [~ymasory@adsl-2-112-153.mia.bellsouth.net] has joined #go-nuts
02:18 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts
02:19 -!- nettok [~quassel@200.119.167.28] has quit [Ping timeout: 240 seconds]
02:19 -!- Project_AFK [~Marvin@82.84.98.59] has quit [Ping timeout: 276 seconds]
02:23 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Ping timeout: 240
seconds]
02:27 -!- nettok [~quassel@200.119.167.28] has joined #go-nuts
02:32 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts
02:38 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Ping timeout: 250
seconds]
02:46 -!- xash [~xash@d075168.adsl.hansenet.de] has quit [Ping timeout: 255
seconds]
02:56 -!- boscop [~boscop@f055203132.adsl.alicedsl.de] has quit [Ping timeout: 240
seconds]
03:01 -!- ryanu [~ryan_@c-98-200-189-134.hsd1.tx.comcast.net] has joined #go-nuts
03:04 -!- nettok [~quassel@200.119.167.28] has quit [Ping timeout: 240 seconds]
03:15 -!- nettok [~quassel@200.119.167.28] has joined #go-nuts
03:23 -!- adu [~ajr@pool-173-66-253-179.washdc.fios.verizon.net] has joined
#go-nuts
03:31 -!- thomas_b [~thomasb@cm-84.215.47.51.getinternet.no] has joined #go-nuts
03:32 < adu> hi all
03:40 < Eko> sup adu
03:41 < Eko> Namegduf: fixing the way I send messages to the client
goroutines made my 300user*100channels test go from 18sec to 6sec
03:42 < Namegduf> Eko: Interesting.  What change did that involve?
03:43 -!- adu [~ajr@pool-173-66-253-179.washdc.fios.verizon.net] has quit [Quit:
adu]
03:43 < Eko> Namegduf: I originally sent a pointer to a type Event struct {
Command string; Args map[string]{}interface; Result map[string]{}interface; Reply
chan bool }
03:44 < Eko> and I had a giant switch on Event.Command
03:44 < Eko> and each one would do things like ev.Args["name"].(string)
03:44 < Eko> and they'd set any "return" values in the result and the sender
would decode similarly
03:44 < Namegduf> So the bulk of your time was spent in type assertions?
03:45 < Eko> type assertions, map lookups and sets, yeah
03:45 < Eko> so now I have a different structure for each "event"
03:45 < Eko> and a single type assertion switch
03:45 < Eko> and then all of the members can be accessed directly, both on
the client and user side
03:45 < Namegduf> Neat.
03:45 < Eko> (of the event structure)
03:46 < Eko> so, a LOT less overhead.
03:46 < Eko> now the thing I'm running into is weird error "write tcp:
broken pipe" issues with too many clients
03:46 < Eko> like, 500 or so
03:46 < Namegduf> How do you handle commands which touch a channel and
users, like messages?
03:47 < Eko> hmm, that one successfully did 400 users on 300 channels each
in 30 seconds without the broken pipe =.
03:47 * Eko tries 500
03:47 < Eko> Namegduf: I use the communication more for events than for
get/set
03:48 < Namegduf> So your Event.Command options don't directly connect to
IRC commands?
03:48 < Eko> so, for instance, the client goroutine will make sure that the
channel exists (by asking the server) before sending the message to the channel
coroutine to be dispatched to its clients
03:48 < Namegduf> Ah, I see.
03:48 < Namegduf> Hmm.
03:48 < Namegduf> What happens if the channel stops existing between those
two things?
03:49 < Eko> Bad Things, I'm sure.
03:49 < Namegduf> I used to have my clients work like that.
03:49 < Namegduf> It made quitting an entertaining exercise.
03:49 < Eko> haha
03:50 < Eko> actually, no, a channel will never cease to exist while a
client is still on it
03:51 < Namegduf> So as long as you can't send commands to channels you
aren't on, you're okay?
03:51 < Namegduf> Hmm.
03:51 < Namegduf> Or remove other users.
03:51 < Eko> well, the server properly handles +n, not sure what you're
asking
03:51 < Namegduf> Users 1 and 2 are on the channel.  User 1 kicks user 2,
then parts.  User 2 is at the same time sending a message to the channel.
03:51 < Eko> oh, I see
03:52 < Namegduf> If user 1's commands resolve first entirely
03:52 < Namegduf> Then user 2 will not know they aren't on the channel at
the time they send a message to it
03:52 < Namegduf> Is that possible?
03:52 < Eko> or if you try to send to a channel you aren't on and the last
person parts after your client gets the channel from the server and before the
message is dispatched
03:52 < Namegduf> Yeah.
03:53 < Namegduf> I found I *couldn't* make it so everyone would know
reliably, so I had to do something very slow
03:53 < Namegduf> And have all messages to clients go through a "client
goroutine" which would be updated on the live/deadness of a client reliably before
a client's goroutine would go away.
03:54 < Eko> either one could be bad.
03:56 < Eko> damn concurrency :P
03:56 < Namegduf> Yeah.
03:56 < Namegduf> Every so often I kick myself.
03:57 < Namegduf> Right now, I realised that the hooks on various write
events are not guaranteed at all to happen in the order the writes do.
03:57 < Namegduf> Well, that was a day ago.
03:57 < Namegduf> I'm readding synchronisation to things which were lockless
due to magic.  :(
03:57 < Eko> actually, I could do something really sneaky
03:57 < Eko> and essentially use channels to lock the server/channel
coroutine
03:58 -!- adu [~ajr@pool-173-66-253-179.washdc.fios.verizon.net] has joined
#go-nuts
03:58 < Namegduf> Are you using buffered channels, as a matter of interest?
03:58 < adu> Eko!!
03:59 < adu> my parser is nearly done
03:59 -!- ymasory [~ymasory@adsl-2-112-153.mia.bellsouth.net] has quit [Ping
timeout: 265 seconds]
03:59 < Eko> basically have a no-op event would hang in the coroutine's
event loop until the client read the "completion" status from the reply channel
03:59 < Eko> nope
04:00 < Eko> hullo adu
04:00 < Eko> haha, nice
04:00 < Eko> my IRC server is coming along quite nicely
04:00 < Eko> modes are all implemented, though not all of them do anything
04:00 < Eko> (notably, +blk)
04:00 < Eko> Namegduf was being nice enough as to stab holes in my design
methodologies with a battering ram.
04:00 < adu> Eko: http://pastie.org/1405899
04:00 < Eko> I think I'm just going to pretend that they don't exist for now
though, lol
04:01 < Eko> adu: I thought you were doing a parser just for the literal
syntax, not for the whole language
04:01 < Eko> because we have go/ast for that
04:02 < Namegduf> Eko: I'm being lazy and not writing +k
04:02 < adu> Eko: yes, the whole language
04:02 < Namegduf> But I'm trying to design "a good communications server"
and that involves correcting certain bad design decisions in early IRC
04:02 < adu> I just happen to like the literal syntax
04:02 < Eko> oh, this is for dsgc
04:02 < Namegduf> :P
04:02 < adu> Eko: dsgo
04:02 < adu> yes
04:02 < Eko> neat
04:02 < Eko> what's dsgo written in?
04:03 < adu> Haskell
04:03 < Eko> noes!
04:03 < Eko> who's working on a Go compiler for Go!
04:03 < Eko> nobody :(
04:03 < adu> I really like haskell's features
04:03 < Eko> the name "gogo" is even wide open (at least last time I
checked)
04:03 < adu> want me to paste the parser file?
04:03 < Eko> haskell makes my brain hurt.
04:04 < Eko> so I'll just trust the input/output :)
04:04 -!- falconindy [~noclaf@unaffiliated/falconindy] has quit [Quit: leaving]
04:04 < Eko> though my various repositories have thousands of lines of go
source if you want to try your parser on them ;)
04:05 -!- falconindy [~noclaf@unaffiliated/falconindy] has joined #go-nuts
04:05 < adu> http://hpaste.org/42550/go_parser
04:06 < Eko> *brain hurts*
04:06 < Eko> dang, I"ve been off IRC too long
04:06 * Eko 's brain hurts
04:06 < adu> my favorite part is "goCVSpecs"
04:06 < Eko> I am great with imperative languages...  functional langues
take a lot of work.
04:07 < adu> Eko: but they save you a lot of work too
04:07 < Eko> this is true.
04:07 < adu> some of those one liners end up being pages of C
04:07 < Eko> HLint doesn't like you ;)
04:07 < adu> how os?
04:07 < adu> so
04:08 -!- nettok [~quassel@200.119.167.28] has quit [Ping timeout: 264 seconds]
04:08 < Eko> the hlint output at the bottom of the hpaste page?
04:08 < adu> oh i see
04:09 < adu> ya, I can probably get rid of those $
04:09 < adu> Eko: do you know why I like $ so much?
04:09 < Eko> because you like $?
04:10 < adu> but it turns F a (b c (d e)) into F a $ b c $ d e
04:10 < adu> its why Haskell has fewer parens than lisp
04:10 < Eko> lol, parens.
04:10 < Eko> I've only done scheme, never true lisp
04:11 < adu> anyways, back to #go
04:11 < Eko> and I took one look at Haskell and ran away.
04:11 * Eko pets Go
04:12 < adu> I took 2,654,299 looks at Go, then I stayed
04:12 < Eko> lol
04:13 < adu> my favorite part is how unambiguous it is
04:13 < adu> also, it makes a great language for program transformation
research
04:13 < Eko> all I had to hear was (a) compiled system language (b)
emphasizes concurrency (c) garbage collected
04:13 < Eko> which I heard within a few minutes of hearing about Go
04:13 < Eko> and then I went and compiled it and tried it that night.
04:13 < adu> (not as good as lisp/scheme, but still a good choice)
04:14 < Eko> dayum, 500 users on 100 channels in 8.6 seconds.
04:14 < Eko> now my broken pipe issue happens at 600 users.
04:14 < Namegduf> Are you doing all the channel joins in one operation?
04:15 < Namegduf> Mine all happen as separate "events", so to speak.
04:17 < adu> Eko: take a look at "goTypeLit" isn't that beautiful?
04:21 -!- nettok [~quassel@200.119.167.28] has joined #go-nuts
04:22 < Eko> write tcp: broken pipe
04:22 < Eko> anyone have any idea?
04:22 < Eko> I haven't a clue if that's on the client side or the server
side.
04:22 < Eko> or does the fact that the first error on the server side is
"read: read tcp: connection reset by peer" mean that it's a client-side issue?
04:22 < Eko> I would test it out on a real IRC server, but I'm pretty sure
I'd get banned faster than you can say "wtf botnet"
04:22 -!- dju [~dju@fsf/member/dju] has quit [Read error: Connection reset by
peer]
04:23 -!- Netsplit *.net <-> *.split quits: Eko, nsf, XenoPhoenix,
Guest55373
04:26 -!- Netsplit over, joins: Eko
04:28 < adu> wb
04:30 -!- adu [~ajr@pool-173-66-253-179.washdc.fios.verizon.net] has quit [Quit:
adu]
04:30 * Eko waves to adu
04:31 -!- rejb [~rejb@unaffiliated/rejb] has quit [Ping timeout: 276 seconds]
04:32 -!- adu [~ajr@pool-173-66-253-179.washdc.fios.verizon.net] has joined
#go-nuts
04:33 < Eko> wb adu
04:33 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
04:35 -!- Guest55373 [~irc@209.17.191.58] has joined #go-nuts
04:35 -!- XenoPhoenix [~Xeno@cpc5-aztw24-2-0-cust39.aztw.cable.virginmedia.com]
has joined #go-nuts
04:36 -!- DarthShrine [~angus@pdpc/supporter/student/DarthShrine] has quit [Quit:
DarthShrine]
04:54 -!- adu [~ajr@pool-173-66-253-179.washdc.fios.verizon.net] has quit [Quit:
adu]
04:57 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts
04:58 -!- adu [~ajr@pool-173-66-253-179.washdc.fios.verizon.net] has joined
#go-nuts
05:05 -!- Tuller [~tuller@pool-98-117-92-241.rcmdva.fios.verizon.net] has quit
[Remote host closed the connection]
05:09 -!- adu [~ajr@pool-173-66-253-179.washdc.fios.verizon.net] has quit [Quit:
adu]
05:11 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Ping timeout: 265
seconds]
05:12 -!- ios_ [~ios@180.191.132.172] has joined #go-nuts
05:19 -!- araujo [~araujo@190.38.50.25] has joined #go-nuts
05:19 -!- araujo [~araujo@190.38.50.25] has quit [Changing host]
05:19 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts
05:24 -!- coldturnip [~COLDTURNI@118-166-68-186.dynamic.hinet.net] has joined
#go-nuts
05:25 -!- DarthShrine [~angus@58-6-93-222.dyn.iinet.net.au] has joined #go-nuts
05:25 -!- DarthShrine [~angus@58-6-93-222.dyn.iinet.net.au] has quit [Changing
host]
05:25 -!- DarthShrine [~angus@pdpc/supporter/student/DarthShrine] has joined
#go-nuts
05:26 -!- adu [~ajr@pool-173-66-253-179.washdc.fios.verizon.net] has joined
#go-nuts
05:37 < adu> Eko: did you fix the pipe issue?
05:43 < Eko> adu: not yet =/
05:43 < Eko> I think I just somehow got within a few inches of hanging my
system trying to debug it >_<
05:43 < adu> inches?
05:44 < adu> you mean cycles?
05:44 < Namegduf> Eko: 20k psuedousers, 20 channels each, 30 seconds, here;
but my module system is a lot more complicated and most of it isn't very
optimised.
05:44 < Eko> figurative language meaning that I think I was pretty close...
unrelated parts of my system started not wanting to respond (like ps aux)
05:45 < Eko> Namegduf: I discovered that my fake users weren't reusing
channels, so my numbers aren't comparable
05:45 < Namegduf> Reusing channels?
05:45 < Eko> yeah, the channels they were using were all different, so
instead of having 300 users on 100 channels, 300 users were on 300*100 channels
05:45 < Namegduf> Ah.
05:45 < Eko> Oops.
05:45 < Namegduf> Mine are kind of like that, kind of not.
05:46 < Namegduf> They randomise channel names to generate channels of
different sizes.
06:14 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Ping timeout: 265
seconds]
06:19 < Eko> Namegduf: I couldn't come up with a good way to make channels
of different sizes
06:19 < Eko> maybe generate X channels and then pick Y of them to join?
06:19 < Namegduf> Eko: Randomise channel name for each join.
06:19 < Eko> I did that
06:19 < Namegduf> Have five be #big_1-100
06:19 < Eko> but it ended up with 1, maybe 2 users per join
06:19 < Namegduf> Five be #medium_1-1000
06:20 < Eko> interesting.
06:20 < Namegduf> And ten be #small_1-whatever
06:20 < Eko> ah.
06:20 < Namegduf> Is what I did.
06:22 -!- dju [~dju@at.dmz.me] has joined #go-nuts
06:22 -!- dju [~dju@at.dmz.me] has quit [Changing host]
06:22 -!- dju [~dju@fsf/member/dju] has joined #go-nuts
06:29 < Eko> hmmmmmm.
06:32 < Eko> so, I must have some sort of race condition or something,
because when I get to 200 users all registering simultaneously, it hangs with
somewhere between 170 and 200 users in each channel but no more JOINs are being
sent back...  or something...
06:41 -!- zozoR [~zozoR@56346ed3.rev.stofanet.dk] has joined #go-nuts
06:42 < adu> race conditions suck
06:46 < zozoR> nsf: your gocode daemon, is it possible to make the it work
with gedit?
06:46 < nsf> zozoR: if you'll make a plugin for gedit, yes
06:46 < nsf> fuzzybyte is doing something at the moment
06:46 < nsf> for gedit
06:47 < nsf> ask him too
06:47 < nsf> or just considering doing, I don't know
06:48 < nsf> I can say that integrading gocode with gedit is not a big
problem, gedit supports python-based scripts
06:48 < nsf> it's basically running a subprocess with args and parsing the
output
06:48 < nsf> the hard part is presenting all the stuff to the user
06:49 < nsf> it requires a bit of gtk knowledge I guess
06:49 < zozoR> i used to do a lot of wx in my days :D
06:49 < nsf> wx is far from gtk
06:49 < zozoR> i know -.-
06:49 < zozoR> its sad
06:49 < zozoR> wx is easy
06:49 < zozoR> :P
06:49 < zozoR> well, anyway, it works with eclipse so ill just use that from
now on
06:49 < zozoR> i gotta say, your autocompletion is magical :)
06:50 < nsf> kinda works, I hope
06:50 < nsf> it's not magical
06:50 < nsf> yesterday I've found another infinite loop bug :(
06:50 < zozoR> hehe
06:50 < nsf> the problem with Go
06:51 < nsf> that infinite loops which are based on a recursion eat all the
memory
06:51 < nsf> well, yeah, the proper name here is infinite recursion
06:51 < nsf> but still
06:51 < nsf> in C it blows the stack
06:51 < nsf> in Go it blows the memory :)
06:51 < zozoR> heh true
06:51 < zozoR> it om nom noms the memory :D
06:52 < zozoR> i still think its epic you made it :)
06:52 < nsf> :)
06:55 < adu> why the difference?
06:55 < nsf> Go's stack is dynamic
06:56 < adu> does it have to be?
06:56 < nsf> it provides better memory safety guarantees
06:57 < nsf> for example in C there is a feature in C99
06:57 < nsf> that you can dynamically allocate arrays on the stack
06:57 < nsf> int myarray[non_const_var];
06:57 < nsf> but it's pretty much useless
06:58 < nsf> because it's very easy to explode the stack that way
06:58 < nsf> in my opinion in future Go will allocate much more stuff on the
stack than it does currently
06:59 < nsf> because it's one way to decrease pressure on garbage collector
07:00 < adu> i prefer RC to GC
07:00 < nsf> so..  in theory there are reasons to have a dynamic stack
07:00 < nsf> RC?
07:00 < adu> reference counting
07:01 < nsf> oh..  it sucks in mutlithreaded environment
07:01 < nsf> and Go has this shared memory model
07:01 < nsf> reference counting is a no-no for Go
07:01 < nsf> definitely :)
07:01 < adu> why?
07:02 < nsf> because reference counter operations require synchronization
07:02 < nsf> it means they will be slow
07:02 < nsf> and commonly used data structure such as tree will suck
07:02 < nsf> structures*
07:02 < Eko> interesting......  I just made my client write coroutine have a
buffered input channel, and it dramatically changed throughput
07:04 < nsf> adu: on the other hand
07:04 < nsf> ref counting will deliver a nice property of a memory manager
07:04 < adu> what about Go requires a shared memory model?
07:04 < nsf> such as stability and predictability
07:04 < nsf> adu: what about it?  it just does//
07:04 < nsf> ..*
07:05 < nsf> for some reason
07:05 < adu> nsf: the word "shared" appears once in the gospec
07:06 < nsf> http://golang.org/doc/go_mem.html
07:07 < nsf> it is called shared, because every bit of memory is shared
between all goroutines
07:07 < nsf> Go doesn't mention thread local storages or goroutine local
storages
07:08 < adu> not necessarily
07:10 < nsf> Go's semantics says almost nothing about memory ownage
07:10 < adu> hmm
07:11 < adu> this is why I like Haskell
07:11 < nsf> I hate Haskell
07:11 < Eko> night y'all
07:11 < adu> why?
07:11 < adu> night Eko
07:11 < nsf> because it has nothing to do with real practical programmig
07:11 < nsf> programming*
07:11 < nsf> people disagree though
07:11 < adu> http://book.realworldhaskell.org/
07:11 < adu> i disagree
07:11 < nsf> I know, and I don't care :)
07:11 < adu> I'm writing a parser for Go in Haskell
07:12 < nsf> also I can't be taken seriously
07:12 < nsf> I don't know haskell
07:12 < zozoR> people who study math use haskell
07:12 < zozoR> :)
07:13 < nsf> but I'm pretty much sure, that in 2030 still no one will use
haskell for production work, we will never see a photoshop CS10 written in haskell
07:13 < zozoR> xD
07:13 < zozoR> true
07:13 < zozoR> it is ofcourse written in go
07:13 < adu>
http://shootout.alioth.debian.org/u32/benchmark.php?test=all&lang=ghc&lang2=go
07:14 -!- theos [~theos@unaffiliated/theos] has joined #go-nuts
07:15 < zozoR> go is slow :o
07:15 < adu>
http://shootout.alioth.debian.org/u32/benchmark.php?test=threadring&lang=all
07:15 -!- theos [~theos@unaffiliated/theos] has left #go-nuts ["sleep time"]
07:15 < adu> do you see which language is at the top?
07:16 < zozoR> haskell :o
07:16 < zozoR> lol
07:16 < nsf> it tells me that haskell sorts stuff very nicely
07:16 < zozoR> benchmarks only tells more about the testing environment than
the actual language
07:17 < zozoR> remove only from that sentence :D
07:17 < vsmatck> This conversation gets dumber by the second.
07:17 < zozoR> :D
07:17 < nsf> oh, wait
07:18 < vsmatck> People get pretty 1 dimensional when talking about
performance sometimes.
07:18 < nsf> I thought it's a sorting benchmark
07:18 < nsf> it's even something more abstract and useless
07:18 < adu> it's a threading benchmark
07:19 < nsf> not really
07:19 < nsf> I'm looking at the Go example
07:19 < nsf> and for some reason I'm pretty sure that it runs on a single
thread :)
07:19 < zozoR> haha
07:20 < nsf> but it's good
07:20 < nsf> most likely with GOMAXPROCS > 1 it will be slower
07:20 < nsf> let's test it
07:21 < vsmatck> This conversation is getting smarter by the second.  :)
07:22 < nsf> also note
07:22 < nsf> it's a 32 bit machine
07:22 < nsf> Go is faster on 64 bit machines
07:22 < adu> anyways, it's supposed to illustrate that Haskell doesn't use
complicated synchronization primitives
07:22 < nsf> the question is
07:23 < nsf> whether it helps you to develop applications
07:23 < nsf> or not
07:23 < adu> it helps me
07:23 < nsf> I tend to think that all haskell programmers are fanatics
07:23 < nsf> maybe I'm wrong
07:24 < nsf> btw, I was damn right about Go example
07:24 < adu> yes, I am a fan of Haskell, but I like lots of other languages
for other reasons
07:24 < nsf> with GOMAXPROCS=4 it takes ages
07:24 < nsf> on my 2 core machine
07:25 < vsmatck> I'm doing HTTP stuff and I've found that performance goes
up for me all the way to about GOMAXPROCS=64.
07:25 < vsmatck> No idea why tho.
07:25 < vsmatck> 2 CPU computer.
07:26 < adu> vsmatck: lots of benchmarks have an upper limit
07:26 < nsf> http://pastie.org/1406077
07:26 < nsf> how about that
07:26 < adu> vsmatck: I remember reading somewhere that statistically, the
CPU limit it 4
07:26 < nsf> the benchmark from the link above
07:26 < adu> don't know about thread limit
07:26 < zozoR> ll
07:27 < zozoR> lol :D
07:27 < nsf> with GOMAXPROCS=4 it's 6-7 times slower
07:27 < adu> sweet
07:27 -!- nettok [~quassel@200.119.167.28] has quit [Ping timeout: 276 seconds]
07:27 < vsmatck> Maybe there's a speedup on IO stuff somehow.
07:28 < zozoR> i recall io in go is slower than in python
07:28 < zozoR> atleast to stdout
07:28 < nsf> zozoR: you mean fmt or something else?
07:29 < zozoR> through fmt :D
07:29 < vsmatck> http://pastie.org/1406079 Basically web.go with some
database stuff.
07:29 < nsf> fmt can be slow
07:30 < zozoR> true
07:30 < zozoR> if you write directly to stdout its probably faster
07:30 < nsf> it depends
07:30 < nsf> buffered io is a must in some cases
07:31 < nsf> like if you're planning to write zillion of bytes, one byte at
a time
07:31 < nsf> although, that's just a theory
07:31 < zozoR> :)
07:31 -!- Tv [~tv@cpe-76-168-227-45.socal.res.rr.com] has joined #go-nuts
07:31 < nsf> I have no idea whatsoever how bad direct syscall usage is
07:32 < nsf> frequent usage I mean
07:37 < zozoR> me neither
07:42 -!- zozoR [~zozoR@56346ed3.rev.stofanet.dk] has quit [Read error: Connection
reset by peer]
07:43 -!- illya77 [~illya77@133-111-133-95.pool.ukrtel.net] has joined #go-nuts
07:43 -!- zozoR [~zozoR@56346ed3.rev.stofanet.dk] has joined #go-nuts
07:43 < zozoR> arg, vlc ate my memory D:
07:44 < nsf> or maybe it was a gocode?
07:44 < nsf> :)
07:45 < zozoR> i start gocode manually :P
07:45 < nsf> and it means?
07:45 < nsf> gocode wasn't running?
07:46 < zozoR> i dont run it when i dont use it :)
07:46 < nsf> i see
07:46 < zozoR> also, when i top'ed in the terminal, 80% memory hogged by vlc
:D
07:46 -!- prip [~foo@host107-121-dynamic.47-79-r.retail.telecomitalia.it] has quit
[Ping timeout: 265 seconds]
07:46 < zozoR> it didnt even have enough memory to kill it : |
07:46 < zozoR> (or time)
07:46 < zozoR> :D
07:46 < nsf> yeah, I use swap for that
07:47 < nsf> although sometimes it doesn't help
07:48 < zozoR> at least go programs die when i tell them to : |
07:51 < taruti_> Has anyone have gocode working with emacs?
07:52 < nsf> taruti: I have no idea
07:56 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
07:58 -!- prip [~foo@host196-197-dynamic.17-79-r.retail.telecomitalia.it] has
joined #go-nuts
08:07 -!- ExtraSpice [~XtraSpice@88.118.33.48] has joined #go-nuts
08:08 -!- tdc [~santegoed@host217-44-173-250.range217-44.btcentralplus.com] has
joined #go-nuts
08:14 -!- adu [~ajr@pool-173-66-253-179.washdc.fios.verizon.net] has quit [Quit:
adu]
08:22 -!- Davidian1024 [~Davidian1@cpe-173-88-174-84.neo.res.rr.com] has quit
[Ping timeout: 276 seconds]
08:23 -!- Davidian1024 [~Davidian1@cpe-173-88-174-84.neo.res.rr.com] has joined
#go-nuts
08:34 -!- rlab [~Miranda@91.200.158.34] has quit [Quit: Miranda IM! Smaller,
Faster, Easier.  http://miranda-im.org]
08:35 -!- brad_ [621a78e5@gateway/web/freenode/ip.98.26.120.229] has quit [Ping
timeout: 265 seconds]
08:38 -!- Tv [~tv@cpe-76-168-227-45.socal.res.rr.com] has quit [Ping timeout: 240
seconds]
08:40 -!- DerHorst [~Horst@e176097059.adsl.alicedsl.de] has joined #go-nuts
08:41 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
08:49 -!- ryanu [~ryan_@c-98-200-189-134.hsd1.tx.comcast.net] has quit []
08:51 -!- tensai_cirno [~cirno@77.232.15.216] has joined #go-nuts
08:52 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
09:04 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts
09:11 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Ping timeout: 276
seconds]
09:31 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3]
09:36 -!- illya77 [~illya77@133-111-133-95.pool.ukrtel.net] has quit [Read error:
Connection reset by peer]
09:42 -!- piranha [~piranha@5ED4B890.cm-7-5c.dynamic.ziggo.nl] has joined #go-nuts
09:54 -!- Project_2501 [~Marvin@82.84.98.88] has joined #go-nuts
10:00 -!- zozoR [~zozoR@56346ed3.rev.stofanet.dk] has quit [Quit: Morten.  Desu~]
10:08 -!- Scorchin [~Scorchin@host86-186-246-246.range86-186.btcentralplus.com]
has joined #go-nuts
10:22 -!- vdrab [~vdrab@pd3e9b4.kyotnt01.ap.so-net.ne.jp] has joined #go-nuts
10:22 -!- araujo [~araujo@190.38.52.109] has joined #go-nuts
10:22 -!- araujo [~araujo@190.38.52.109] has quit [Changing host]
10:22 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts
10:58 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
11:05 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Ping timeout: 276
seconds]
11:07 -!- Guest26237 [~shaman@120-170.77-83.cust.bluewin.ch] has joined #go-nuts
11:10 -!- piranha_ [~piranha@5ED4B890.cm-7-5c.dynamic.ziggo.nl] has joined
#go-nuts
11:10 -!- piranha [~piranha@5ED4B890.cm-7-5c.dynamic.ziggo.nl] has quit [Read
error: Connection reset by peer]
11:15 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
11:17 -!- foocraft [~dsc@78.101.178.79] has joined #go-nuts
11:18 -!- tvw [~tv@e176007121.adsl.alicedsl.de] has joined #go-nuts
11:20 -!- vdrab [~vdrab@pd3e9b4.kyotnt01.ap.so-net.ne.jp] has quit [Quit: vdrab]
11:33 -!- tvw [~tv@e176007121.adsl.alicedsl.de] has quit [Remote host closed the
connection]
11:43 -!- ptilol [~shaman@120-170.77-83.cust.bluewin.ch] has quit [Ping timeout:
250 seconds]
11:54 -!- vdrab [~vdrab@pd3e9b4.kyotnt01.ap.so-net.ne.jp] has joined #go-nuts
12:03 -!- shaman [~shaman@182-188.76-83.cust.bluewin.ch] has joined #go-nuts
12:10 -!- shvntr [~shvntr@116.26.136.124] has joined #go-nuts
12:26 -!- vdrab [~vdrab@pd3e9b4.kyotnt01.ap.so-net.ne.jp] has quit [Quit: vdrab]
12:31 -!- Guest47367 [~shaman@182-188.76-83.cust.bluewin.ch] has quit [Remote host
closed the connection]
12:35 -!- illya77 [~illya77@49-242-133-95.pool.ukrtel.net] has joined #go-nuts
12:44 -!- thomas_b [~thomasb@cm-84.215.47.51.getinternet.no] has quit [Ping
timeout: 265 seconds]
12:45 -!- vdrab [~vdrab@pd3e9b4.kyotnt01.ap.so-net.ne.jp] has joined #go-nuts
12:46 -!- thomas_b [~thomasb@cm-84.215.47.51.getinternet.no] has joined #go-nuts
12:53 -!- vdrab [~vdrab@pd3e9b4.kyotnt01.ap.so-net.ne.jp] has quit [Quit: vdrab]
12:54 -!- xash [~xash@d026000.adsl.hansenet.de] has joined #go-nuts
13:08 -!- chickamade [~chickamad@116.118.63.154] has joined #go-nuts
13:31 < foocraft> hi all
13:31 < foocraft> I have a question relating to generic work-arounds
13:32 < foocraft> so I've looked at the sort package
13:32 < foocraft> and it can sort anything that implements a certain
interface
13:33 -!- chickamade [~chickamad@116.118.63.154] has quit [Ping timeout: 240
seconds]
13:33 < foocraft> so I'm wondering, what's a good way to go(in go) about
declaring a generic container..
13:35 < exch> The only way you can do that, is by having it contain values
of type interface{}.  Or your own interface if you want a little more specificity
13:36 < exch> The sort package doesn't really care what is in the container.
All it deals with is the sort.Sort interface, which your type must implement
13:37 < exch> That's not a generic implementation though.  It simply has no
need to know about the actual container type
13:38 < exch> As long as your own container implements 'Less(int, int)
bool', 'Swap(int, int)' and 'Len() int', you can use it for sorting
13:40 < foocraft> so for a graph, I would probably need Equals ( )
implemented for the vertices and the edges need to connect two vertices, each
13:40 < foocraft> I feel like I'm stepping down to java lane...:p
13:41 < Namegduf> In gneeral, you "can'", and unless you need to, shouldn't.
13:41 < Namegduf> *can't
13:41 < Namegduf> interface{} as the contents works, though.
13:41 < Namegduf> You can do basically anything you could in C.
13:42 < Namegduf> I don't know much about graphs, but I'd implement types
specifically for what I needed, not a generic one.
13:43 < aiju> how is this implemented BTW?
13:43 < aiju> more like dynamic typing or more like C++ templates?  (or
something completely different?)
13:43 < Namegduf> ...neither.
13:43 < Namegduf> Well.
13:43 < Namegduf> What's "this"?
13:44 < aiju> interfaces
13:44 < Namegduf> interface{} is a two-word structure
13:44 < Namegduf> A pointer to an itable (like a vtable) and a pointer to
the data
13:45 < Namegduf> If the data fits in a word (significant example:
interfaces satisfied by a pointer to a struct or such) it's stored directly
13:47 < foocraft> that's a neat optimization :)
13:47 < foocraft> I wonder what's going on with GC right now
13:48 < Namegduf> Me too.
13:49 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has quit [Ping
timeout: 260 seconds]
13:54 < exch> it
13:54 < exch> *it's probably eating christmas dinners atm and will therefor
be out of comission for the next 2 weeks :p
13:55 < Namegduf> XD
13:55 < Namegduf> I suppose I didn't mean right now.  :P
13:57 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has joined #go-nuts
14:04 < foocraft> make( []xmas, MERRY )
14:05 < Namegduf> Same to you.
14:05 < Namegduf> make([]wine, 100)
14:05 < Namegduf> I made you a box of wine.
14:07 < foocraft> hmm, we need to pass the wine through a channel, and spawn
all the guests to drink from it...
14:07 < foocraft> give me that box, nao!
14:09 -!- exch [~exch@h78233.upc-h.chello.nl] has quit [Read error: Connection
reset by peer]
14:09 -!- exch [~exch@h78233.upc-h.chello.nl] has joined #go-nuts
14:11 < nsf> I remember someone complained about my llvm bindings, that it's
broken with the new cgo
14:11 < nsf> I've just uploaded a fix for that
14:18 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
14:18 -!- DerHorst [~Horst@e176097059.adsl.alicedsl.de] has quit [Remote host
closed the connection]
14:18 -!- ios_ [~ios@180.191.132.172] has quit [Quit: Leaving]
14:37 -!- DarthShrine [~angus@pdpc/supporter/student/DarthShrine] has quit [Quit:
DarthShrine]
14:40 -!- tdc [~santegoed@host217-44-173-250.range217-44.btcentralplus.com] has
quit [Quit: tdc]
14:50 -!- niemeyer_ [~niemeyer@200-203-59-56.pltce701.dsl.brasiltelecom.net.br]
has joined #go-nuts
14:56 -!- foocraft [~dsc@78.101.178.79] has quit [Quit: Leaving]
14:58 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3]
15:04 -!- foocraft [~dsc@78.101.178.79] has joined #go-nuts
15:07 -!- boscop [~boscop@g226235228.adsl.alicedsl.de] has joined #go-nuts
15:08 -!- shvntr [~shvntr@116.26.136.124] has quit [Ping timeout: 264 seconds]
15:18 -!- shvntr [~shvntr@123.64.92.2] has joined #go-nuts
15:19 -!- ymasory [~ymasory@adsl-2-112-153.mia.bellsouth.net] has joined #go-nuts
15:19 -!- sacho_ [~sacho@90.154.208.35] has joined #go-nuts
15:20 -!- sacho [~sacho@87-126-6-67.btc-net.bg] has quit [Ping timeout: 240
seconds]
15:22 -!- shvntr [~shvntr@123.64.92.2] has quit [Ping timeout: 260 seconds]
15:23 -!- shvntr [~shvntr@123.64.92.2] has joined #go-nuts
15:36 -!- nettok [~quassel@200.119.153.135] has joined #go-nuts
15:37 -!- xash [~xash@d026000.adsl.hansenet.de] has quit [Ping timeout: 272
seconds]
15:41 -!- XenoPhoenix [~Xeno@cpc5-aztw24-2-0-cust39.aztw.cable.virginmedia.com]
has quit [Ping timeout: 240 seconds]
15:42 -!- skelterjohn [~jasmuth@c-68-45-238-234.hsd1.nj.comcast.net] has joined
#go-nuts
15:44 -!- nettok [~quassel@200.119.153.135] has quit [Ping timeout: 272 seconds]
15:50 -!- bfrank [621a78e5@gateway/web/freenode/ip.98.26.120.229] has joined
#go-nuts
15:51 < bfrank> is there anyway to compile all the compilers for different
targets?
15:51 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts
15:59 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has quit [Ping
timeout: 260 seconds]
16:02 < exch> bfrank: the target depends on your Go environment vars.  I
suppose you could write a lil shellscript which sets them to whatever target you
need, then build, then change the vars and build again, etc
16:03 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-171-190.clienti.tiscali.it] has
joined #go-nuts
16:06 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has joined #go-nuts
16:07 -!- Project_2501 [~Marvin@82.84.98.88] has quit [Ping timeout: 276 seconds]
16:10 -!- bfrank [621a78e5@gateway/web/freenode/ip.98.26.120.229] has quit [Ping
timeout: 265 seconds]
16:12 -!- yebyen [~yebyen@cpe-67-253-244-26.rochester.res.rr.com] has quit [Ping
timeout: 250 seconds]
16:30 -!- nettok [~quassel@200.119.153.135] has joined #go-nuts
16:37 -!- nettok [~quassel@200.119.153.135] has quit [Ping timeout: 260 seconds]
16:37 -!- zozoR [~zozoR@56346ed3.rev.stofanet.dk] has joined #go-nuts
16:39 -!- jesusaurus [jesusaur@firefly.cat.pdx.edu] has joined #go-nuts
16:45 -!- niemeyer_ [~niemeyer@200-203-59-56.pltce701.dsl.brasiltelecom.net.br]
has quit [Ping timeout: 240 seconds]
16:46 -!- sav [~lsd@jagat.xored.org] has joined #go-nuts
16:46 -!- sav [~lsd@jagat.xored.org] has quit [Excess Flood]
16:52 -!- shvntr [~shvntr@123.64.92.2] has quit [Quit: leaving]
16:57 -!- ildorn [~ildorn@212.23.105.25] has joined #go-nuts
17:22 -!- Project_2501 [~Marvin@82.84.84.135] has joined #go-nuts
17:24 < aiju> writing Go destroys one's ability to write other languages
17:25 < aiju> i just forgot all the break;s in a switch
17:25 -!- Project-2501 [~Marvin@dynamic-adsl-94-36-171-190.clienti.tiscali.it] has
quit [Ping timeout: 240 seconds]
17:28 -!- Project_2501 [~Marvin@82.84.84.135] has quit [Quit: E se abbasso questa
leva che succ...]
17:29 -!- Project_2501 [~Marvin@82.84.84.135] has joined #go-nuts
17:29 < mpl> aiju: yep that happened to me several time when writing java
after writing go
17:30 < mpl> and that's nastier to spot than forgotten semi colons.
17:38 -!- bfrank [621a78e5@gateway/web/freenode/ip.98.26.120.229] has joined
#go-nuts
17:38 -!- XenoPhoenix [~Xeno@cpc5-aztw24-2-0-cust39.aztw.cable.virginmedia.com]
has joined #go-nuts
17:41 < fuzzybyte> and i keep forgetting to initialize my variables because
of go
17:45 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has quit [Read error:
Operation timed out]
17:45 -!- TheMue [~TheMue@p5DDF6CA4.dip.t-dialin.net] has joined #go-nuts
17:49 < taruti> go has warts too
17:49 < taruti> like shadowing variables without warnings
17:52 < bfrank> yeah and forcing curlys up a line
17:52 < bfrank> really quite annoying
17:52 < Namegduf> I don't find it particularly annoying.
17:53 < bfrank> I do
17:53 < taruti> curly braces are ok
17:53 < taruti> that is just a style matter
17:53 < taruti> shadowing creates bugs
17:53 < bfrank> it forces it on you
17:53 < Namegduf> Yep.
17:53 < bfrank> you should have a choice
17:53 < Namegduf> Nope.
17:53 < bfrank> next it will be forcing tabs and spacing
17:53 < Namegduf> It pretty much does.
17:53 < Namegduf> gofmt.
17:53 < bfrank> obnoxious
17:53 < Eko> ono python!
17:53 < taruti> one does not have a choice on most real software projects
17:54 < Namegduf> Choice is super so long as you're the one making the
choice and it's only your own code you need to read ever.
17:54 < Namegduf> Otherwise the penalty of different styles overwhelms any
benefit from using yours.
17:55 < bfrank> if style is keeping you from being able to read code, then
there are likely deeper problems
17:55 < aiju> syntax issues are largely bikeshed
17:55 < Namegduf> bfrank: Same to you.
17:55 < bfrank> the language shouldn't be forcing layout
17:55 < Namegduf> Why not?
17:55 < bfrank> because that is obnoxious
17:55 < Namegduf> Why?
17:55 < TheMue> and that's great, helping to create a code base that many
people are able to read
17:55 < Namegduf> The alternative is that each project forces layout
17:56 < Namegduf> Which is no different except that projects differ
17:56 < bfrank> I guess that is why it is good there are alternatives
17:56 < aiju> i haven't seen C code with { on the next line in a loooooong
while
17:56 < bfrank> just because you haven't doesn't mean it doesn't happen.
And it doesn't mean go should be forcing a style
17:57 < Namegduf> Your response there didn't make sense.
17:57 < Namegduf> It is good there are alternatives to what?
17:57 < bfrank> ha, nor does forcing a style
17:57 < Namegduf> Alright.
17:57 < Namegduf> Let's optimise this conversation
17:57 < aiju> the forcing of style wasn't intended
17:57 < Namegduf> I'm going to go get a cup of tea
17:57 < bfrank> I'm going to go for a walk
17:57 < aiju> just a sideeffect of the semicolon heuristics
17:57 < Namegduf> You can say the same thing you'd be saying if I was
replying
17:57 < Namegduf> Which is constantly repeating your assertion without
backing logic
17:58 < bfrank> gofmt could have just as easily added semicolons
17:58 < Namegduf> Me saying anything is redundant
17:58 < Namegduf> :P
17:58 < bfrank> forcing the curly up a line because people didn't want to
type a semicolon is asinine
17:58 < Namegduf> No, gofmt couldn't have.
17:58 < Namegduf> gofmt reads valid Go and outputs valid Go.
17:58 < TheMue> In which way is forcing a style wrong?
17:59 < aiju> TheMue: it's not politically correct!
17:59 < aiju> the language shouldn't force me to use arabic numbers either
17:59 < TheMue> Oh, ok, gooooood argument.  *lol*
17:59 < aiju> or english keywords
17:59 < aiju> language localization!
17:59 < bfrank> there are languages that actually let you do that
18:00 < aiju> wow.
18:00 < TheMue> I onced worked with such a programming lang, it has
different keywords in different langs.
18:00 < aiju> never underestimate software bloat
18:00 < TheMue> Seen it in English and German, and the code wasn't portable.
*sigh*
18:00 < TheMue> Bad idea.
18:01 < aiju> the commercial code i've seen so far is already bilingual
18:01 < aiju> using non-english in programming should be a criminal offence…
18:01 < bfrank> if you speak english it should be
18:01 < TheMue> Like forcing a codestyle?
18:04 < TheMue> I really like it, hacking fast and then just type :make
format and everything is fine.
18:04 < aiju> bfrank: really, how many non-english speaking programmers are
there?
18:04 < Namegduf> I did some work in the Czech Republic with a programming
group
18:04 < Namegduf> They all spoke great English
18:05 < aiju> compare that to non-german speaking programmers
18:05 < aiju> you don't have to write novels
18:05 < aiju> nobody gives a shit if your grammar is off
18:05 < taruti> as a non-english programmer I prefer code in english
entirely
18:05 -!- Tv [~tv@cpe-76-168-227-45.socal.res.rr.com] has joined #go-nuts
18:05 < taruti> mixed natural language code is a horrible mess
18:06 < TheMue> we even comment in english, it's more simple than the
continuous switching between comment and code languege
18:07 < TheMue> only visible parts for the UI follow typical I18N patterns
18:08 -!- tdc [~santegoed@host217-44-173-250.range217-44.btcentralplus.com] has
joined #go-nuts
18:09 -!- tdc [~santegoed@host217-44-173-250.range217-44.btcentralplus.com] has
quit [Read error: Connection reset by peer]
18:09 -!- tdc [~santegoed@host217-44-173-250.range217-44.btcentralplus.com] has
joined #go-nuts
18:11 -!- foocraft [~dsc@78.101.178.79] has quit [Quit: Leaving]
18:12 < zozoR> if i write the code in my own language, i feel the code
speaks to me, and thats creepy and i end up feeling stupid
18:14 < TheMue> *rofl*
18:14 < zozoR> and im glad go chose the brace at the end style
18:15 < zozoR> all the empty lines you get from having the brace on the next
line is really confusing
18:15 < zozoR> makes it harder to read : |
18:15 < zozoR> atleast for me :D
18:16 < zozoR> especially with alot of nesting.  its hideous!  >.<
18:17 < taruti> lots of nesting is hideous ;)
18:18 < taruti> write helper functions
18:22 < Eko> okay, here's a fun problem...  I have a program that's meant to
battle-test my IRC server, so it spawns off N goroutines each of which makes an
independent net.Conn to the server.  If I make more than some number of
connections (say, 230), I start getting "connection reset by peer" and "read: EOF"
and "broken pipe" errors all over the place
18:23 < Eko> to try to rule out my server, I wrote a server that blindly
accepts all connections on a port in a loop and printfs "."
18:23 < Eko> (and I get the same behavior)
18:23 < Eko> Anyone have any ideas what might be wrong or what I should try?
18:28 -!- niemeyer_ [~niemeyer@200-203-59-56.pltce701.dsl.brasiltelecom.net.br]
has joined #go-nuts
18:42 -!- xash [~xash@d026000.adsl.hansenet.de] has joined #go-nuts
18:49 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 240 seconds]
18:53 -!- ymasory [~ymasory@adsl-2-112-153.mia.bellsouth.net] has quit [Ping
timeout: 250 seconds]
18:55 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Ping timeout: 255
seconds]
19:07 -!- foocraft [~dsc@78.101.178.79] has joined #go-nuts
19:21 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
19:25 < Tv> Eko: sounds like you're hitting a 256 fd limit
19:25 < Tv> smells either like windows or ulimit
19:27 < vsmatck> linux is generally default 1024.  I know for windows you
have to manually set FD_SETSIZE because it's rediculously low (not sure what go
windows sets it to).
19:27 < vsmatck> If you're on windows, windows has syn flood protection.  If
you do non-blocking connect too fast that can happen.
19:27 < vsmatck> I don't know how Go does it but I'm betting it's
non-blocking connect.
19:27 < Eko> Tv: my ulimit -n is over 2000, and the number isn't consistent
19:28 < Eko> the number of connections it can sustain
19:28 < Eko> now for some reason I'm having trouble duplicating the behavior
with the blind accept client, so I am even more confused.
19:29 < vsmatck> If you close the program with a ton of connections open
linux won't ehh "free" them for about a minute.
19:29 * Tv hugs netstat -nt
19:29 < Tv> (or "ss", these days, if i could ever remember how to use it)
19:30 < vsmatck> Ah, netstat would tell you if the ports are still being
used.  It'd have a ton of crap listed.
19:30 < vsmatck> I've never heard of ss *googles*.
19:31 < Tv> ifconfig & route : ip :: netstat : ss
19:32 < Eko> is ip a command?  if not, I don't get your analogy...
19:32 < Tv> yup
19:32 < Eko> never used it.
19:33 < Eko> hmm, yes, interesting
19:33 < Eko> I just did my fake client thing on my server and there are now
two lingering tcp6 connections to the server even after the fake client program is
dead.
19:34 < Eko> closing the server put them in FIN_WAIT_2 and CLOSE_WAIT (which
I remember from my massive TCP connection state diagram)
19:38 -!- neur [~neuro@unaffiliated/neurosys/x-283974] has quit [Ping timeout: 276
seconds]
19:39 < Urtie> A question about booleans..  A "binary.Write(buf,
binary.BigEndian, true)" (where true is actually a boolean variable) doesn't
actually seem to write anything to the buffer.  That doesn't seem right to me?  I
can obviously change to using an int8 instead, but it was still interesting.
19:51 < ampleyfly> just guessing here, but you might need to flush
19:51 < Urtie> I am :).  It's not the only value I'm writing, I just
happened to notice the bool was never pushed to the buffer.
19:55 < Eko> Urtie: Looks like a bug.
19:55 < Eko>
http://golang.org/src/pkg/encoding/binary/binary.go?h=value#L343
19:56 < Eko> notice none of those are BoolValue
19:57 < Eko> unless, of course, they don't intend you to be able to send
booleans.
19:57 < Eko> (in which case an error should be returned)
19:58 -!- Zoopee [alsbergt@zoopee.org] has quit [Ping timeout: 240 seconds]
19:59 < Urtie> Eko: Ok, thanks!
19:59 < Eko> Urtie: let me know if you don't want to file a bug report for
it, and I will.
20:00 < Urtie> Eko: Feel free :)
20:01 -!- Zoopee [alsbergt@zoopee.org] has joined #go-nuts
20:03 -!- GoBIR [~gobir@adsl-76-251-235-206.dsl.ipltin.sbcglobal.net] has quit
[Ping timeout: 276 seconds]
20:04 -!- Eko [~eko@adsl-76-251-235-206.dsl.ipltin.sbcglobal.net] has quit [Ping
timeout: 240 seconds]
20:08 -!- xash [~xash@d026000.adsl.hansenet.de] has quit [Ping timeout: 246
seconds]
20:11 -!- ymasory [~ymasory@adsl-2-112-153.mia.bellsouth.net] has joined #go-nuts
20:15 -!- Eko [~eko@adsl-76-251-235-206.dsl.ipltin.sbcglobal.net] has joined
#go-nuts
20:29 -!- ryanu [~ryan_@c-98-200-189-134.hsd1.tx.comcast.net] has joined #go-nuts
20:34 -!- makkalot [~makkalot@85.101.150.117] has joined #go-nuts
20:34 < makkalot> hi i'm trying the rot13 example, when compile it sasy it
cant find the rot13 any ideas ?
20:43 < taruti> Is there an idiom for iterating over a golang map with
sorted keys (or values) ?
20:50 -!- zozoR [~zozoR@56346ed3.rev.stofanet.dk] has quit [Remote host closed the
connection]
20:51 -!- zozoR [~zozoR@56346ed3.rev.stofanet.dk] has joined #go-nuts
20:52 -!- skelterjohn [~jasmuth@c-68-45-238-234.hsd1.nj.comcast.net] has quit
[Quit: skelterjohn]
20:54 -!- xash [~xash@d026000.adsl.hansenet.de] has joined #go-nuts
20:56 -!- Project-2501 [~Marvin@82.84.78.38] has joined #go-nuts
20:57 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
20:59 -!- Project_2501 [~Marvin@82.84.84.135] has quit [Ping timeout: 260 seconds]
21:03 -!- xash [~xash@d026000.adsl.hansenet.de] has quit [Ping timeout: 260
seconds]
21:06 < TheMue> taruti: No short one.  First get all keys in a slice, then
sort them, and then get all values for those keys.
21:06 < TheMue> taruti: Or build a key-value-type according to your map, a
slice type with those kvs and then sort this slice.
21:06 -!- tensai_cirno [~cirno@77.232.15.216] has quit [Quit: Leaving]
21:14 -!- tensai_cirno [~cirno@77.232.15.216] has joined #go-nuts
21:16 < Namegduf> You inherently can't
21:16 < Namegduf> They're hash tables, they don't store keys sorted
21:18 -!- illya77 [~illya77@49-242-133-95.pool.ukrtel.net] has quit [Read error:
Connection reset by peer]
21:27 -!- napsy [~luka@88.200.96.18] has quit [Ping timeout: 276 seconds]
21:27 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
21:30 -!- DarthShrine [~angus@58-6-93-222.dyn.iinet.net.au] has joined #go-nuts
21:30 -!- DarthShrine [~angus@58-6-93-222.dyn.iinet.net.au] has quit [Changing
host]
21:30 -!- DarthShrine [~angus@pdpc/supporter/student/DarthShrine] has joined
#go-nuts
21:32 -!- pothos_ [~pothos@111-240-221-153.dynamic.hinet.net] has joined #go-nuts
21:33 -!- makkalot [~makkalot@85.101.150.117] has quit [Remote host closed the
connection]
21:34 -!- pothos [~pothos@111-240-229-100.dynamic.hinet.net] has quit [Ping
timeout: 265 seconds]
21:35 < taruti> Does append double the size of the underlaying slice or just
grow it by the number of elements?
21:35 -!- ronnyy [~quassel@drsd-4dbda0d7.pool.mediaWays.net] has joined #go-nuts
21:39 < taruti> i.e.  is code calling it in a loop appending one element
going to be O(n^2)
21:44 < TheMue> just try it, append so that the slice grows and compare
len() and cap()
21:47 < taruti> it doubles them :)
21:48 < TheSeeker> No fibonacci growth?  :(
21:49 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
21:55 -!- SoniaKeys [Alliebloom@c-24-91-112-191.hsd1.ma.comcast.net] has joined
#go-nuts
21:57 -!- neur [~neuro@81.214.95.216] has joined #go-nuts
22:01 -!- Project-2501 [~Marvin@82.84.78.38] has quit [Quit: E se abbasso questa
leva che succ...]
22:03 -!- napsy [~luka@88.200.96.18] has quit [Quit: leaving]
22:06 -!- tdc [~santegoed@host217-44-173-250.range217-44.btcentralplus.com] has
quit [Quit: tdc]
22:27 -!- piranha [~piranha@5ED4B890.cm-7-5c.dynamic.ziggo.nl] has quit [Quit:
Computer has gone to sleep.]
22:28 -!- TheMue [~TheMue@p5DDF6CA4.dip.t-dialin.net] has quit [Quit: TheMue]
22:41 < Eko> taruti: you can preallocate the slice and use append() to set
it by setting slice := make(type[], 0, estimatedsize)
22:41 -!- zozoR [~zozoR@56346ed3.rev.stofanet.dk] has quit [Quit: Morten.  Desu~]
22:42 < Eko> then your append() won't reallocate unless you exceed
estimatedsize.
22:43 -!- napsy [~luka@88.200.96.18] has joined #go-nuts
22:43 -!- DarthShrine [~angus@pdpc/supporter/student/DarthShrine] has quit [Quit:
DarthShrine]
23:09 -!- rlab [~Miranda@91.200.158.34] has quit [Read error: Connection reset by
peer]
23:11 -!- ildorn [~ildorn@212.23.105.25] has quit [Quit: Leaving.]
23:12 -!- ymasory [~ymasory@adsl-2-112-153.mia.bellsouth.net] has quit [Ping
timeout: 260 seconds]
23:17 -!- ryanu [~ryan_@c-98-200-189-134.hsd1.tx.comcast.net] has quit []
23:38 -!- Cobi [~Cobi@2002:1828:88fb:0:aede:48ff:febe:ef03] has joined #go-nuts
23:39 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts
23:42 -!- SoniaKeys [Alliebloom@c-24-91-112-191.hsd1.ma.comcast.net] has quit []
23:44 -!- bfrank [621a78e5@gateway/web/freenode/ip.98.26.120.229] has quit [Ping
timeout: 265 seconds]
--- Log closed Mon Dec 27 00:00:01 2010