--- Log opened Sat Dec 25 00:00:01 2010
00:06 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has joined
#go-nuts
00:10 < Eko> question: your opinions on googlecode vs.  bitbucket (for
mercurial source hosting)
00:12 < cbeck> googlecode, but by a slim enough margin that it's down to
which I tried first
00:12 < nsf> github ;)...  and git
00:12 < nsf> :P
00:13 < cbeck> But yes
00:13 < cbeck> github and git
00:13 < Eko> meh, I am way too lazy to use git ^_^
00:14 < nsf> actually it was created for lazy people :)
00:14 < Eko> but hg is soooo much lazier!
00:14 < Eko> its like, one less character and everything.
00:14 < nsf> :D
00:15 < Eko> is github that much nicer or do you like git better?
00:15 < nsf> more like git
00:15 < nsf> and well, I can compare code.google.com with github
00:15 < nsf> I think github is better
00:15 < nsf> at least for me
00:16 < nsf> I don't understand why code.google.com doesn't have a feature
that allows you to download a snapshot of the repo
00:16 < Eko> can I convert an hg repo into git easily?
00:16 < nsf> yes
00:16 < Eko> I forget, lol.
00:17 < nsf> but not vice versa
00:17 < Eko> oh no?
00:17 < Eko> hg imports svn nicely, I figured it'd import git too.
00:17 < nsf> git supports merges from multiple "tips" (in terms of hg)
00:17 < Eko> ah, it's all coming back to me now.
00:18 < nsf> so..  you can convert it, but it won't be the same repository
anymore
00:20 < fuzzybyte> does googlecode have "pull request" type of thing?
00:20 < nsf> afaik no
00:20 < nsf> it was created for svn initially
00:20 < nsf> so it lacks that kind of collaboration spirit
00:21 < exch> pull requests are kind anice
00:21 < nsf> which is essential for distributed vcs
00:21 < fuzzybyte> i'll just use bitbucket then in the future too
00:22 < Eko> meh, jaid is already mercurial, and I've been using mercurial
mostly, so until I start using git a lot I'll stick with hg and bitbucket ;)
00:22 < nsf> I tried switching from git to mercurial
00:22 < nsf> didn't happen
00:22 < fuzzybyte> why not?
00:22 < nsf> I like git's staging area a lot
00:23 < nsf> because I often do a mess in my source tree
00:23 < Eko> I tried switching from mercurial to git and it never happened
either =/
00:23 < nsf> and git allows me to do nice commits after that
00:23 < nsf> I know that mercurial has plugins and stuff for that
00:23 < nsf> but in git it feels more natural
00:23 < nsf> I guess
00:23 < Eko> even though I really should, because git would allow me to
commit only the changes that pertain to a specific thing, without all of the other
"Oh, I should change that while I'm thinking about it..." changes.
00:24 < nsf> Eko: exactly
00:24 < nsf> that's what staging area is about
00:24 < Eko> but I'm too lazy for that.
00:24 < Eko> lol
00:24 < nsf> but it is for lazy..  in some way
00:24 < nsf> because you can do a mess in your source code
00:24 < nsf> and then form nice commits and changes
00:25 < Eko> maybe someday ;)
00:25 < Tv> the tricks you can do with the staging area make life soo much
easier
00:25 < nsf> yeah
00:25 < Eko> I'm also reluctant to try to learn a new vcs when I don't know
what vcs I'll be using in a few months when I start work.
00:25 < Tv> i routinely do manipulations to the tree i wouldn't dare
otherwise
00:26 < nsf> but switching from hg to git or from git to hg can be painful
00:26 < nsf> they are very similar, but all the names are different
00:26 < Eko> yeah, that too.
00:26 < Eko> adg: what does google use internally?  or does it depend on
team?
00:27 < nsf> like pull/fetch, checkout/update, reset/revert,
rebase/histedit, stash/shelve...
00:27 < nsf> and I've named only few commands
00:27 < Tv> Eko: google uses perforce + lots of local hacks like FUSE
filesystems
00:27 < Tv> Eko: you are not google
00:28 -!- tensai_cirno [~cirno@77.232.15.216] has quit [Ping timeout: 255 seconds]
00:30 < Eko> Tv: starting in February.
00:30 < Tv> Eko: say goodbye to your open source life (if any)
00:31 < Eko> heh.
00:40 -!- virtualsue [~chatzilla@host81-148-14-32.in-addr.btopenworld.com] has
quit [Ping timeout: 240 seconds]
00:45 -!- Scorchin [~Scorchin@host86-147-116-169.range86-147.btcentralplus.com]
has quit [Quit: Scorchin]
00:46 -!- hcatlin [~hcatlin@pdpc/supporter/professional/hcatlin] has quit [Quit:
hcatlin]
01:35 -!- werdan7 [~w7@freenode/staff/wikimedia.werdan7] has joined #go-nuts
01:49 -!- shvntr [~shvntr@116.26.135.151] has joined #go-nuts
01:49 -!- LeNsTR [~lenstr@unaffiliated/lenstr] has joined #go-nuts
01:55 -!- LeNsTR [~lenstr@unaffiliated/lenstr] has quit [Quit: LeNsTR]
02:01 -!- Nicotux [~AndChat@62.201.142.70] has joined #go-nuts
02:03 -!- Nicotux [~AndChat@62.201.142.70] has quit [Read error: Connection reset
by peer]
02:03 -!- Nicotux [~AndChat@62.201.142.70] has joined #go-nuts
02:05 -!- Nicotux [~AndChat@62.201.142.70] has quit [Read error: Connection reset
by peer]
02:06 -!- Nicotux [~AndChat@62.201.142.70] has joined #go-nuts
02:08 -!- Nicotux [~AndChat@62.201.142.70] has quit [Read error: Connection reset
by peer]
02:08 -!- Nicotux [~AndChat@62.201.142.70] has joined #go-nuts
02:10 -!- Nicotux [~AndChat@62.201.142.70] has quit [Read error: Connection reset
by peer]
02:11 -!- vdrab [~vdrab@pd3e9b4.kyotnt01.ap.so-net.ne.jp] has joined #go-nuts
02:17 -!- vdrab [~vdrab@pd3e9b4.kyotnt01.ap.so-net.ne.jp] has quit [Quit: vdrab]
02:23 -!- nettok [~quassel@200.119.153.97] has joined #go-nuts
02:29 -!- vdrab [~vdrab@pd3e9b4.kyotnt01.ap.so-net.ne.jp] has joined #go-nuts
02:53 -!- boscop [~boscop@f055251208.adsl.alicedsl.de] has quit [Ping timeout: 240
seconds]
02:55 -!- LeNsTR [~lenstr@unaffiliated/lenstr] has joined #go-nuts
02:58 -!- LeNsTR [~lenstr@unaffiliated/lenstr] has quit [Client Quit]
02:58 -!- boscop [~boscop@f055203132.adsl.alicedsl.de] has joined #go-nuts
02:58 -!- LeNsTR [~lenstr@79.165.23.176] has joined #go-nuts
02:58 -!- LeNsTR [~lenstr@79.165.23.176] has quit [Changing host]
02:58 -!- LeNsTR [~lenstr@unaffiliated/lenstr] has joined #go-nuts
03:05 -!- noktoborus [debian-tor@gateway/tor-sasl/noktoborus] has quit [Quit:
noktoborus]
03:05 -!- noktoborus [debian-tor@gateway/tor-sasl/noktoborus] has joined #go-nuts
03:08 -!- boscop [~boscop@f055203132.adsl.alicedsl.de] has quit [Ping timeout: 240
seconds]
03:12 < vsmatck> pkg/http/ResponseWriter.SetHeader inserts HTTP header key
in to a map.  This makes it so you can only set one cookie.
03:12 < vsmatck> I think there can be multiple "Set-Cookie: " lines in the
HTTP response header.
03:12 -!- vdrab [~vdrab@pd3e9b4.kyotnt01.ap.so-net.ne.jp] has quit [Quit: vdrab]
03:12 < vsmatck> Hard to figure out HTTP cookie spec though.
03:14 < vsmatck> I think rfc2965 covers it.  But it's a gojillion pages
long.
03:16 < vsmatck> oh wait wait.  I think I'm wrong here.
03:16 < Tv> vsmatck: i think you'll find that real-world compatibility with
multiple header lines with same key is very poor
03:16 < vsmatck> On page 4 section 3.2.2 it says you can have comma
separated list of cookies.
03:16 < Tv> vsmatck: *any* repeated http header is supposed to be foldable
into a single line, with commas
03:17 < vsmatck> Tv: ah!
03:26 -!- sjd [~sjd@204-195-89-40.wavecable.com] has quit [Quit: sjd]
03:26 -!- SoniaKeys [Alliebloom@c-24-91-112-191.hsd1.ma.comcast.net] has quit []
03:28 -!- sjd [~sjd@204-195-89-40.wavecable.com] has joined #go-nuts
03:32 -!- vdrab [~vdrab@pd3e9b4.kyotnt01.ap.so-net.ne.jp] has joined #go-nuts
03:34 -!- vdrab [~vdrab@pd3e9b4.kyotnt01.ap.so-net.ne.jp] has quit [Client Quit]
03:44 < Eko> now does one convert a character (byte) into a string?
03:44 < Eko> string([]byte{ch})?
03:44 < Eko> seems awfully roundabout...
03:45 < Eko> oh.  string('b') works too.  Just kidding :-)
03:47 -!- d_m [d6@otaku.freeshell.org] has quit [Quit: Lost terminal]
03:49 < Eko> also, HELL YES @ &MyType{blah, blah} ....  makes life so much
easier.
03:50 -!- sjd [~sjd@204-195-89-40.wavecable.com] has quit [Quit: sjd]
03:52 -!- sjd [~sjd@204-195-89-40.wavecable.com] has joined #go-nuts
04:02 -!- rhencke [~rhencke@ppp-70-247-243-221.dsl.ltrkar.swbell.net] has joined
#go-nuts
04:03 < rhencke> is there a limit to the number of goroutines a go program
can execute?
04:03 < uriel> rhencke: short answer: no
04:03 < rhencke> i'm wondering why the (granted, nonsensical) snippet for {
go func() {}() } crashes instead of running forever.
04:04 < uriel> rhencke: you will obviously run out of memory at some point
04:04 < rhencke> uriel: ah..  so they stick around after completion?
04:04 < Tv> rhencke: probably starts them faster than it runs them to
completion -> keeps bloating until crash
04:04 < uriel> still, I'd think that should not crash
04:04 < rhencke> that's the second time i've made go double panic
04:04 < uriel> Tv: yea, that is probably it
04:05 < uriel> well, that is clearly a pretty dumb thing to do
04:05 < rhencke> thanks for the explanations.  i agree, it is dumb.  :)
04:05 < rhencke> it started when i was trying to understand if and how panic
and goroutines played together
04:06 < rhencke> so i did a for { go panic("oops) } and got an unrelated
error
04:21 -!- sjd [~sjd@204-195-89-40.wavecable.com] has quit [Quit: sjd]
04:23 -!- nettok [~quassel@200.119.153.97] has quit [Ping timeout: 260 seconds]
04:31 -!- rejb [~rejb@unaffiliated/rejb] has quit [Ping timeout: 276 seconds]
04:36 -!- vdrab [~vdrab@pd3e9b4.kyotnt01.ap.so-net.ne.jp] has joined #go-nuts
04:49 -!- ymasory [~ymasory@c-76-99-55-224.hsd1.pa.comcast.net] has quit [Quit:
Leaving]
05:07 -!- rhencke [~rhencke@ppp-70-247-243-221.dsl.ltrkar.swbell.net] has left
#go-nuts []
05:07 -!- ryanu [~ryan_@c-98-200-189-134.hsd1.tx.comcast.net] has joined #go-nuts
05:09 -!- jeff2 [~jeff@pool-108-13-140-226.lsanca.fios.verizon.net] has joined
#go-nuts
05:23 -!- zozoR [~zozoR@56346ed3.rev.stofanet.dk] has joined #go-nuts
05:29 -!- ymasory [~ymasory@c-76-99-55-224.hsd1.pa.comcast.net] has joined
#go-nuts
05:39 -!- DarthShrine [~angus@pdpc/supporter/student/DarthShrine] has quit [Quit:
DarthShrine]
05:45 -!- ymasory [~ymasory@c-76-99-55-224.hsd1.pa.comcast.net] has quit [Quit:
Leaving]
05:50 -!- DarthShrine [~angus@60-242-109-62.tpgi.com.au] has joined #go-nuts
05:50 -!- DarthShrine [~angus@60-242-109-62.tpgi.com.au] has quit [Changing host]
05:50 -!- DarthShrine [~angus@pdpc/supporter/student/DarthShrine] has joined
#go-nuts
06:01 -!- sjd [~sjd@204-195-89-40.wavecable.com] has joined #go-nuts
06:05 -!- Tv [~tv@cpe-76-168-227-45.socal.res.rr.com] has quit [Ping timeout: 260
seconds]
06:10 -!- sjd [~sjd@204-195-89-40.wavecable.com] has quit [Read error: Connection
reset by peer]
06:10 -!- sjd [~sjd@204-195-89-40.wavecable.com] has joined #go-nuts
06:10 -!- ryanu [~ryan_@c-98-200-189-134.hsd1.tx.comcast.net] has quit []
06:25 -!- vdrab [~vdrab@pd3e9b4.kyotnt01.ap.so-net.ne.jp] has quit [Quit: vdrab]
06:28 -!- sjd [~sjd@204-195-89-40.wavecable.com] has quit [Quit: sjd]
06:33 -!- d_m [d6@SDF.ORG] has joined #go-nuts
06:35 -!- sjd [~sjd@204-195-89-40.wavecable.com] has joined #go-nuts
06:49 < Eko> wuh?  rpctest.go:79: invalid operation: 1000000 / (stop -
start) (type float64 / int64)
06:55 < Eko> Damn, well I thought I was being clever but apparently not.
06:55 < Eko> Generic: 1000000 ops in 3.68502 sec ( 271368.580 ops/sec)
06:55 < Eko> TypeSwitch: 1000000 ops in 0.66889 sec ( 1495018.598 ops/sec)
06:56 * Eko makes a big fat TODO note to redo his data goroutines with a type
switch.
07:15 < Eko> So, this is going to sound realy obvious, but why can I modify
the values in a []Type but not a map[...]Type
07:16 < Eko> (obviously you can modify the values in a map[...]*Type, I'm
just curious)
07:28 -!- Project_2501 [~Marvin@82.84.98.59] has joined #go-nuts
07:34 < cbeck> That does seem inconsistant..
07:34 < cbeck> I can see why it would be though
07:35 < Eko> it only happens with type Type struct {...} trying to set a
struct field
07:36 < Eko> you can replace the value all you want, just not change its
fields
07:36 < Eko> I fell like I read a reason for this, but haven't found it.
07:41 -!- adu [~ajr@pool-173-66-253-179.washdc.fios.verizon.net] has joined
#go-nuts
07:59 -!- tensai_cirno [~cirno@77.232.15.216] has joined #go-nuts
08:02 < jeff2> what is an "unexpected reloc for dynamic symbol" from 6l, and
how can I make it expected?
08:04 -!- jeff2 [~jeff@pool-108-13-140-226.lsanca.fios.verizon.net] has quit
[Quit: Leaving]
08:06 -!- ExtraSpice [~XtraSpice@88.118.33.48] has joined #go-nuts
08:12 < nsf> I know what jeff2 needs
08:12 < nsf> -fPIC
08:12 < nsf> but sadly
08:12 < nsf> he isn't here anymore
08:15 -!- illya77 [~illya77@155-90-133-95.pool.ukrtel.net] has joined #go-nuts
08:15 < Eko> aw
08:15 < Eko> 6l has a -FPIC mode?
08:15 < nsf> no
08:15 < Eko> o_o
08:16 < nsf> but this error happens when you're linking elf stuff
08:16 < nsf> and apparently it was compiled by gcc
08:16 < Eko> what does he need to pass -fPIC to?
08:16 < nsf> to gcc of course
08:17 < Eko> bwahahahaa, my channel mode support is finally shaping up.
08:18 < Eko> at least, the getting and setting of them...  they're currently
not used for anything >_>
08:19 < Eko> and I don't have enough time to round everything out, because I
have family christmas in 6 hours and need to sleep.  Laaaame.
08:20 * Eko waves g'night to #go-nuts
08:28 -!- SoniaKeys [Alliebloom@c-24-91-112-191.hsd1.ma.comcast.net] has joined
#go-nuts
08:33 -!- yihuang [~yihuang@183.17.151.58] has joined #go-nuts
08:33 -!- yihuang [~yihuang@183.17.151.58] has left #go-nuts []
08:36 -!- |Craig| [~|Craig|@panda3d/entropy] has quit [Quit: |Craig|]
08:47 -!- ExtraSpice [~XtraSpice@88.118.33.48] has quit [Ping timeout: 276
seconds]
08:47 -!- SoniaKeys [Alliebloom@c-24-91-112-191.hsd1.ma.comcast.net] has quit []
08:52 < adu> hi all
08:52 < adu> Eko!
08:52 < adu> hi nsf
08:52 < nsf> hello
08:53 < adu> is this proper syntax?  http://pastie.org/1404455
08:54 -!- nettok [~quassel@200.119.171.102] has joined #go-nuts
08:54 < nsf> adu: maybe
09:02 < adu> hmm
09:02 < adu> n/m i fixed it
09:03 < adu> 6g says "assignment count mismatch"
09:05 < adu> YEY my parser is working
09:05 < nsf> two vars, one value
09:05 < adu> pi, e int = 3, 1 now works in both 6g and my parser
09:05 < nsf> yes
09:06 < adu> now onto functions :/
09:14 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3]
09:21 -!- noktoborus [debian-tor@gateway/tor-sasl/noktoborus] has quit [Ping
timeout: 240 seconds]
09:22 -!- noktoborus [debian-tor@gateway/tor-sasl/noktoborus] has joined #go-nuts
09:25 -!- yihuang [~yihuang@183.17.149.41] has joined #go-nuts
09:25 -!- yihuang [~yihuang@183.17.149.41] has left #go-nuts []
09:37 -!- bawr [~bawr@unaffiliated/mrfawkes] has quit [Ping timeout: 250 seconds]
09:52 -!- nettok [~quassel@200.119.171.102] has quit [Ping timeout: 264 seconds]
09:54 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
09:55 -!- Evill [~Evill@58-7-252-130.dyn.iinet.net.au] has quit [Quit:
http://www.GameRanger.com/]
09:58 -!- piranha [~piranha@5ED4B890.cm-7-5c.dynamic.ziggo.nl] has joined #go-nuts
09:59 -!- sjd [~sjd@204-195-89-40.wavecable.com] has quit [Quit: sjd]
10:21 -!- sjd [~sjd@204-195-89-40.wavecable.com] has joined #go-nuts
10:26 -!- noktoborus [debian-tor@gateway/tor-sasl/noktoborus] has quit [Ping
timeout: 240 seconds]
10:35 -!- skejoe [~skejoe@188.114.142.162] has joined #go-nuts
10:39 -!- tensai_cirno [~cirno@77.232.15.216] has quit [Quit: Leaving]
10:40 -!- tensai_cirno [~cirno@77.232.15.216] has joined #go-nuts
10:43 -!- tdc [~santegoed@host217-44-173-250.range217-44.btcentralplus.com] has
joined #go-nuts
10:45 -!- sjd [~sjd@204-195-89-40.wavecable.com] has quit [Quit: sjd]
10:53 -!- irc [~irc@209.17.191.58] has joined #go-nuts
10:54 -!- irc_ [~irc@209.17.191.58] has quit [Ping timeout: 276 seconds]
10:58 -!- Davidian1024 [~Davidian1@cpe-173-88-174-84.neo.res.rr.com] has quit
[Ping timeout: 240 seconds]
10:58 -!- Davidian1024 [~Davidian1@cpe-173-88-174-84.neo.res.rr.com] has joined
#go-nuts
11:00 -!- piranha_ [~piranha@5ED4B890.cm-7-5c.dynamic.ziggo.nl] has joined
#go-nuts
11:00 -!- piranha [~piranha@5ED4B890.cm-7-5c.dynamic.ziggo.nl] has quit [Read
error: Connection reset by peer]
11:02 -!- thomas_b [~thomasb@cm-84.215.47.51.getinternet.no] has joined #go-nuts
11:12 -!- tensai_cirno [~cirno@77.232.15.216] has quit [Quit: Leaving]
11:24 -!- dju_ [~dju@fsf/member/dju] has quit [Quit: Quitte]
11:25 -!- TheMue [~TheMue@p5DDF5F82.dip.t-dialin.net] has joined #go-nuts
11:27 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 265 seconds]
11:27 -!- rlab [~Miranda@91.200.158.34] has joined #go-nuts
11:27 -!- noktoborus [debian-tor@gateway/tor-sasl/noktoborus] has joined #go-nuts
11:31 -!- adu [~ajr@pool-173-66-253-179.washdc.fios.verizon.net] has quit [Quit:
adu]
11:38 -!- noktoborus [debian-tor@gateway/tor-sasl/noktoborus] has quit [Ping
timeout: 240 seconds]
11:49 -!- DerHorst [~Horst@e176102109.adsl.alicedsl.de] has joined #go-nuts
11:52 -!- noktoborus [debian-tor@gateway/tor-sasl/noktoborus] has joined #go-nuts
11:55 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
11:56 -!- wtfness [~dsc@78.101.122.198] has joined #go-nuts
11:57 -!- foocraft [~dsc@78.100.194.174] has quit [Ping timeout: 260 seconds]
12:24 -!- tulcod [~auke@83.160.115.167] has joined #go-nuts
12:24 < tulcod> is there some kind of extension of go which has generics?
like, a branch?
12:28 < uriel> obviously not, because nobody has come up with any acceptable
proposals for generics in Go
12:28 < uriel> and anyway, few people seem to really have need for generics
in practice
12:29 -!- sauerbraten [~sauerbrat@p508CF30D.dip.t-dialin.net] has joined #go-nuts
12:31 < nsf> who needs generics
12:31 < nsf> generics suck
12:31 < nsf> :P
12:35 -!- boscop [~boscop@f055203132.adsl.alicedsl.de] has joined #go-nuts
12:45 < Urtie> I would agree that they're not really needed, but I admit it
took me a while to understand why.  I wish there was a practical example of how to
use interfaces in the docs.  Maybe I am unusually dimwitted, but it took way too
long before I really started to understand how they could be used, despite reading
all I could find.  The examples were a bit abstract.
12:45 < nsf> interfaces are not a solution to generics problem
12:46 < nsf> imho, writing code by hand and generating code if it's really
necessary is a solution
12:47 < nsf> "easy generics" is a source number one for overabstraction
12:47 < nsf> and at this moment in 2010/2011
12:47 < nsf> the lack of generics is what programming community needs
12:48 < nsf> brain damage should be healed to some extent
12:48 -!- rlab_ [~Miranda@91.200.158.34] has joined #go-nuts
12:49 -!- rlab [~Miranda@91.200.158.34] has quit [Ping timeout: 272 seconds]
12:50 < nsf> and actually we can clearly see that even in Go
12:50 < nsf> e.g.  regexp package
12:50 < Urtie> I don't disagree with that, it's just that most of the
comments about it sound a bit subjective.  A bit like "It's bad", but without
"here's why" and "what to do instead".  I really feel the docs on golang.org could
use a bit more about it.
12:50 < nsf> was designed with interfaces for some reason, but abstraction
wasn't neccessary
12:51 < nsf> removing it resulted in a 30% speedup
12:51 < nsf> Urtie: you mean generics or interfaces?
12:52 < Urtie> nsf: The subjective part was about generics.  Interfaces
would just generally benefit from some real-world examples.  At least it would
help me :)
12:52 < nsf> ah, yes
12:52 < nsf> Urtie: but it's very hard to convince a C++ junkie that
templates are a bad idea
12:52 < nsf> :)
12:53 < Urtie> That's true
12:53 < nsf> I mean it's not like a very bad idea, they are interesting..
conceptually
12:53 < nsf> but practically
12:54 < nsf> not so much
12:54 < TheSeeker> import "skynet"
12:55 < nsf> one of the examples by Rob Pike, that there is too much of
abstract pointer types in C++
12:55 < nsf> like smart_ptr, auto_ptr, etc.
12:55 < Urtie> nsf: Lots of things are interesting conceptually.  I pretty
much came to Go from several years with Ruby, so such a big step away from
meta-meta-meta-code was really refreshing.
12:55 < nsf> and they exists because it's possible to create them in C++
12:55 < nsf> Urtie: I guess, my brain was damaged mostly by C++
12:56 < nsf> ruby is nice
12:56 < nsf> but for me scripting language is a good replacement for a shell
scripting
12:56 < nsf> I use ruby for that
12:57 < nsf> https://github.com/nsf/gocode/blob/master/testing/run.rb
12:57 < nsf> ruby is very beautiful
12:57 < Urtie> It's a siren language ;)
13:19 -!- xash [~xash@d046017.adsl.hansenet.de] has joined #go-nuts
13:42 -!- Eko [~eko@adsl-76-251-235-206.dsl.ipltin.sbcglobal.net] has quit [Quit:
Leaving]
13:47 -!- go-irc-c [~go-irc-ch@195-132-97-104.rev.numericable.fr] has quit [Ping
timeout: 260 seconds]
13:47 -!- GoBIR [~gobir@adsl-76-251-235-206.dsl.ipltin.sbcglobal.net] has quit
[Ping timeout: 260 seconds]
13:48 -!- TheMue [~TheMue@p5DDF5F82.dip.t-dialin.net] has quit [Quit: TheMue]
13:49 -!- arun_ [~arun@unaffiliated/sindian] has quit [Read error: Operation timed
out]
13:49 -!- rejb [~rejb@unaffiliated/rejb] has joined #go-nuts
14:03 -!- tulcod [~auke@83.160.115.167] has quit [Quit: Leaving]
14:11 -!- vdrab [~vdrab@pd3e9b4.kyotnt01.ap.so-net.ne.jp] has joined #go-nuts
14:21 -!- DarthShrine [~angus@pdpc/supporter/student/DarthShrine] has quit [Read
error: Connection timed out]
14:21 -!- tdc [~santegoed@host217-44-173-250.range217-44.btcentralplus.com] has
quit [Quit: tdc]
14:26 -!- sauerbraten [~sauerbrat@p508CF30D.dip.t-dialin.net] has quit [Remote
host closed the connection]
14:27 -!- go-irc-c [~go-irc-ch@195-132-97-104.rev.numericable.fr] has joined
#go-nuts
14:30 -!- DarthShrine [~angus@60-242-109-62.tpgi.com.au] has joined #go-nuts
14:30 -!- DarthShrine [~angus@60-242-109-62.tpgi.com.au] has quit [Changing host]
14:30 -!- DarthShrine [~angus@pdpc/supporter/student/DarthShrine] has joined
#go-nuts
14:38 < uriel> 12:57 < nsf> ruby is very beautiful
14:38 < uriel> hah, you got to be kidding, its got the most useless syntax
ever, even perl has more strcture
14:39 < uriel> in ruby every aspect of the syntax is either superfluous and
optional (oh, but just 90% of the time), or ther are ten different times to write
the same thing
14:39 < uriel> add to that trillions of vaguely similar and rarely used
method for every type
14:39 < uriel> it is trually disturbing
14:40 -!- adu [~ajr@pool-173-66-253-179.washdc.fios.verizon.net] has joined
#go-nuts
14:42 -!- adu [~ajr@pool-173-66-253-179.washdc.fios.verizon.net] has quit [Client
Quit]
14:46 < nsf> it's not about structure
14:46 < nsf> structured != beautiful
14:46 < nsf> ruby's syntax is horrible for big apps programming I agree
14:47 < nsf> but for small shell-like scripts it rocks
14:47 -!- adu [~ajr@pool-173-66-253-179.washdc.fios.verizon.net] has joined
#go-nuts
14:47 < nsf> because it's very compact, mostly one-liner stuff
14:48 < nsf> like for example
14:48 < nsf> read a file if it exists:
14:48 < nsf> data = IO.read("myfile.txt") rescue nil
14:49 < nsf> in python it's four lines
14:49 < nsf> or maybe two
14:49 < nsf> but still..  :)
14:50 < fuzzybyte> it's one line with eg.  "with open(path, "w") as f:"
14:50 < nsf> but 'with' is not exactly the thing I want
14:50 < nsf> you see, in ruby it reads the contents of the file to a 'data'
var
14:50 < nsf> and if there is no such file
14:51 < nsf> it writes 'nil' to 'data'
14:51 < fuzzybyte> hmm ,,
14:51 < nsf> it's just one case anyway
14:51 < nsf> there is a lot of different things like that
14:54 < zozoR> data = open("file").read() <-- python.  throws exception
if not found
14:54 < nsf> exactly
14:54 < fuzzybyte> well you could just put your read-file-to-a-var code to a
function and then call it on a single line.
14:54 < nsf> fuzzybyte: that too, you see in ruby you don't need to do that
14:55 < nsf> because when you write shell-like scripts, you don't really
want to use 3rd party libraries
14:55 < zozoR> well, you would have to check if it found anything later
anyway either with if/else or something
14:55 < nsf> or copy junks of code from another scripts
14:55 < zozoR> would you not?
14:56 < nsf> zozoR: it just a single example
14:56 < nsf> you can prove me that I'm wrong
14:56 < nsf> but that's not the point
14:57 < zozoR> hehe
14:57 < zozoR> maybe i should learn ruby for the hell of it ..
14:57 < nsf> fuzzybyte: I've just answered to your gocode question on github
14:59 < fuzzybyte> I'd argue that having lots of these "oneliner convenience
functions" in a library would make it more complex and harder to learn, but I
suppose they could come in handy if you can get used to them all.
14:59 < nsf> http://goo.gl/wZjnr
15:00 < nsf> fuzzybyte: no libraries!
15:00 < nsf> it's not a programming language, it's a scripting language
15:00 < nsf> some people think different though
15:00 < nsf> a lot of them actually
15:00 < fuzzybyte> ruby is not a programming language?
15:00 < nsf> for me writing desktop apps or servers in python or ruby is a
waste of time
15:01 < Namegduf> I find "one-liners" easier f I can actually remember and
understand the rules of the language at once.
15:01 < Namegduf> It's less important if I never need to go back, but four
lines I can throw out vs one line of cleverness?  Not even a contents.
15:01 < TheSeeker> So, Ruby is like EMCA?
15:01 < Namegduf> *contest
15:01 < nsf> TheSeeker: no
15:02 < Namegduf> Python also can do desktop apps pretty well; servers, too.
15:02 < nsf> Ruby is like: add more features to the language, they are cool
15:02 < Namegduf> Yeah, I hate that.
15:02 -!- adu [~ajr@pool-173-66-253-179.washdc.fios.verizon.net] has quit [Quit:
adu]
15:02 < nsf> idents.all?  {|i| smap.any?  {|e| i['Offset'] == e['Offset']}}
15:02 < nsf> I haven't seen a language that allows me to write code like
this
15:03 < nsf> in one line :)
15:03 -!- vdrab [~vdrab@pd3e9b4.kyotnt01.ap.so-net.ne.jp] has quit [Quit: vdrab]
15:03 < TheSeeker> Someone wrote a social networking application over
freenet in python.  I'd try it, but...  it's in python :P
15:03 < nsf> yeah, I don't use desktop apps written in python
15:03 < nsf> because they are written in python
15:03 < nsf> well, it's not exactly true, I think it's ok to write
configuration gui utils in python
15:04 < nsf> I wrote two of them by myself
15:04 * TheSeeker makes a new-years resolution to make a Go FCP package
15:04 < TheSeeker> (freenet client protocol)
15:05 < nsf> but things like gajim, deluge, etc..  is a no-no
15:05 < zozoR> its a scripting langauge, both, you can use them to whatever,
but their best purpose is utils and non cpu-hogging applications
15:05 < nsf> zozoR: exactly
15:05 < nsf> for me as I've said
15:05 < nsf> it's a replacement for shell scripts
15:05 < nsf> I hate bash syntax
15:05 < zozoR> true, bash is hell ;s
15:06 < nsf> and if I need to make something more or less simple like a
stupid testing framework
15:06 < nsf> for a particular app
15:06 < nsf> the ruby is my choice :)
15:06 < zozoR> if its quick and simple its good :D
15:07 < nsf> zozoR: mostly it's something like this: http://goo.gl/fxivS
15:08 < nsf> yes, I agree that this kind of things are mostly "one man code"
15:08 < zozoR> jep
15:09 < nsf> e.g.  written by single programmer and is being supported by
single programmer
15:09 < zozoR> i wrote a simple compiler "call the go compiler" script in
python :D
15:09 < zozoR> a simple script to call the go compiler*
15:09 < zozoR> because i never got the make files to work with go : |
15:09 -!- savio [~thc@18748176131.nit.megazon.com.br] has quit [Ping timeout: 272
seconds]
15:10 < nsf> :\
15:10 < nsf> recently I wrote super cool makefile templates for Go:
https://github.com/nsf/goal
15:10 < nsf> although they are hard to use
15:10 < nsf> unless you know gnu make very well
15:11 < nsf> but they use non-recursive approach and can solve problems for
apps with lots of local packages
15:12 < nsf> definitely there is a room for improvement
15:12 < zozoR> heh, i dont know what to write in go, so i havent had any use
for more than two files yet
15:12 < nsf> hehe
15:12 < zozoR> though i wonder if i can make a game with ncurses
15:12 < nsf> I'm not sure, but I think I wrote more than 20k lines of Go
code
15:13 < nsf> zozoR: are you using linux?
15:13 < zozoR> yea
15:13 < nsf> if so, you may want to try this lib:
https://github.com/nsf/termbox
15:13 -!- shvntr [~shvntr@116.26.135.151] has quit [Ping timeout: 250 seconds]
15:13 < nsf> instead of curses
15:13 < nsf> for Go
15:14 < zozoR> written in python?
15:14 < nsf> no
15:14 < nsf> it has python bindings
15:14 < nsf> written in C
15:14 < zozoR> ah ok
15:14 < nsf> and Go bindings too
15:16 < zozoR> is there a simple tutorial or are there only those examples?
15:16 < nsf> https://github.com/nsf/termbox/blob/master/go/example.go
15:16 < nsf> only one example at the moment :(
15:17 < nsf> and it's a bit clumsy
15:17 < zozoR> i think ill stay with curses then ^^
15:17 < nsf> the library is very simple though
15:17 < nsf> ok :)
15:17 < zozoR> its more common anyway:D
15:18 < zozoR> or general, whatever is the right word :)
15:18 < nsf> I can say only one thing about ncurses
15:18 < nsf> not a pleasant one :)
15:19 < nsf> I think it sucks
15:19 < zozoR> well, im pretty sure i end up making simpler functions to
wrap around the complex one
15:20 < zozoR> but i dunno :P
15:20 < nsf> http://jiss.convex.ru/tbui-text.swf
15:21 < nsf> currently I work on a termbox-based gui lib
15:21 < nsf> it's far from usable though
15:21 -!- skejoe [~skejoe@188.114.142.162] has quit [Quit: Lost terminal]
15:21 < nsf> http://jiss.convex.ru/lineedit.swf
15:21 < nsf> simple widget :)
15:22 < zozoR> hah :D
15:23 < nsf> but there are definitely reasons to use ncurses as well
15:24 < nsf> termbox has a lot of politics in it
15:24 < nsf> it denies 256 color terminals, a lot of key extensions, etc.
15:24 < nsf> and it works well only on linux
15:24 < nsf> on major/popular terminals :)
15:25 < nsf> ncurses tries to work everywhere
15:25 < zozoR> true
15:25 < nsf> but I can't say that my lib is portable in theory
15:26 < nsf> the thing is, that I'm not really interested in that
15:26 < zozoR> why not?
15:26 < nsf> the termbox is very simple, 12 functions or so, 2 data
structures
15:26 < nsf> you can write an ncurses backend for it in a day
15:27 < nsf> zozoR: portability leads to a mess in the code
15:27 < nsf> especially in that area (terminals)
15:27 < nsf> they are a mess
15:27 < zozoR> :o
15:28 < nsf> basically I'm desperately pretending that it's not true
15:28 < zozoR> hah xD
15:28 < zozoR> the only thing i miss in go is a gc you can control, and a
better regex library
15:28 < nsf> rsc works on a new gc
15:29 < nsf> is working* (i guess it's a better way to say that)
15:29 < nsf> anyways, the thing is
15:29 < nsf> go devs are aware of that need
15:29 < nsf> also Go is different from other programming languages
15:29 < zozoR> thats a good thing :D
15:30 -!- Fish [~Fish@ARennes-752-1-23-56.w90-32.abo.wanadoo.fr] has joined
#go-nuts
15:30 < nsf> in a sense that it's practical PL
15:30 < nsf> and good GC is a practical thing as well
15:30 < nsf> so, let's hope for the best
15:30 < zozoR> PL?
15:31 < nsf> programming language
15:31 < zozoR> oh
15:31 < zozoR> well, go is just awesome, i just need to find something to do
with it
15:31 < zozoR> :D
15:31 < nsf> ;)
15:33 < nsf> time to go to bed..  sweet dreams, everyone :)
15:33 -!- nsf [~nsf@jiss.convex.ru] has quit [Quit: WeeChat 0.3.3]
15:39 < uriel> 14:48 < nsf> data = IO.read("myfile.txt") rescue nil
15:39 < uriel> in rc shell:
15:39 -!- ExtraSpice [~XtraSpice@88.118.33.48] has joined #go-nuts
15:39 < uriel> ; data = `{cat myfile.txt}
15:40 < uriel> and you don't need tons of optional shit to have compact
syntax
15:43 < uriel> TheSeeker: yea, Go is perfect to build something like
freenet, unlike Java (*yuck*)
15:45 -!- jkakar [~jkakar@93.Red-79-151-184.dynamicIP.rima-tde.net] has joined
#go-nuts
16:00 < TheSeeker> soom(tm) the new freenet node protocol is going to be
merged in...  that's my current best excuse for being lazy and not getting started
writing a Go port of freenet :) FCP is a lot simpler though, so it makes a lot of
sense to do that first, allow easy construction of Go-based client apps.
16:14 -!- tensai_cirno [~cirno@80.250.216.102] has joined #go-nuts
16:18 < uriel> sounds cool
16:27 < kimelto> funny that the compiler does not mind if there is an extra
comma.  os.Open("datas", os.O_WRONLY|os.O_CREAT, 0666, ) compiles just fine
16:28 < fuzzybyte> how strange.
16:30 < cbeck> Not really, they did their best to make the grammar simple
16:43 < vsmatck> If you put the ')' on a newline it requires a comma.  Is
that because of the auto-semicolon-insertion-thing?
16:52 -!- femtoo [~femto@95-89-197-28-dynip.superkabel.de] has joined #go-nuts
17:14 -!- |Craig| [~|Craig|@panda3d/entropy] has joined #go-nuts
17:15 -!- Tv [~tv@cpe-76-168-227-45.socal.res.rr.com] has joined #go-nuts
17:23 -!- gr0gmint [~quassel@87.60.23.38] has joined #go-nuts
17:34 -!- dju [~dju@fsf/member/dju] has joined #go-nuts
17:48 -!- xash [~xash@d046017.adsl.hansenet.de] has quit [Read error: Operation
timed out]
17:48 -!- sjd [~sjd@204-195-89-40.wavecable.com] has joined #go-nuts
17:49 -!- nettok [~quassel@200.119.190.228] has joined #go-nuts
17:56 < tensai_cirno> array bounds mutable in go?
17:57 < tensai_cirno> for example i have array [1, 2, 3]
17:57 < tensai_cirno> how i can add 4 to tail?
17:58 < aiju> tensai_cirno: you can't
17:58 < aiju> however, this is possible with slices
17:58 < tensai_cirno> reconstruct new array?
17:58 < tensai_cirno> can you provide example?  :|
17:59 -!- WonTu [~WonTu@p57B53FBD.dip.t-dialin.net] has joined #go-nuts
17:59 -!- WonTu [~WonTu@p57B53FBD.dip.t-dialin.net] has left #go-nuts []
18:00 < tensai_cirno> aiju, don't need in example.  i think i figured out
18:04 < TheSeeker> array.Append(4) ?
18:06 < TheSeeker> err
18:06 < TheSeeker> append(array, 4)
18:08 < tensai_cirno> oh, works
18:29 -!- ildorn [~ildorn@p5B2FB473.dip.t-dialin.net] has joined #go-nuts
18:32 -!- Eko [~eko@adsl-76-251-235-206.dsl.ipltin.sbcglobal.net] has joined
#go-nuts
18:32 -!- sussman_ [~sussman@75-145-165-109-Illinois.hfc.comcastbusiness.net] has
joined #go-nuts
18:33 < sussman_> greetings; is there a Go library for doing DSP on audio
data?  Or at least allowing me to inspect data in a .wav file or similar?
18:33 < sussman_> googling hasn't revealed anything
18:36 < TheSeeker> tried looking through http://go-lang.cat-v.org/ and
http://godashboard.appspot.com/ ?
18:36 -!- ildorn [~ildorn@p5B2FB473.dip.t-dialin.net] has quit [Quit: Leaving.]
18:38 < sussman_> I will now, thanks
18:39 < fuzzybyte> Which style of block comments are preferred for go?  eg.
http://pastebin.ubuntu.com/547564/
18:40 < fuzzybyte> I'm trying to write a go plugin for gedit and i was
thinking whether i should bother to implement a code completion thingy for those
fancy block comments (eg.  styles 2-4)
18:41 < fuzzybyte> seems that eclipse's c++ plugin favors style 3 and has a
code completion for it too
18:41 -!- nettok [~quassel@200.119.190.228] has quit [Ping timeout: 276 seconds]
18:44 < Tv> fuzzybyte: why would you use /* */ in this modern day and age..
18:44 < fuzzybyte> hmm, though it seems that go source code almost never
uses block comments
18:45 < TheSeeker> to avoid using // in front of every line?
18:45 < Tv> TheSeeker: his paste has half the alternatives do that anyway..
18:46 < TheSeeker> gofmt doesn't complain about any of them, so any are OK?
18:46 -!- skejoe [~skejoe@188.114.142.162] has joined #go-nuts
18:46 < Tv> quick and inaccurate, but anyway:
18:46 < Tv> $ find -name '*.go' -exec cat '{}' ';'|grep -c //
18:46 < Tv> 29867
18:46 < Tv> find -name '*.go' -exec cat '{}' ';'|grep -c '/\*'
18:46 < Tv> 845
18:46 < fuzzybyte> heh, youre right.  you'd still would have to put * or
space characters on every line with all styles except style 2
18:46 < Tv> that's the go source tree
18:47 < Tv> now try telling me // is not the right way ;)
18:47 < fuzzybyte> the only example of block comments i could find from go
source code used style 2 (ie.  there is nothing in the beginning of each line)
18:47 < Tv> fuzzybyte: that makes you blind..
18:48 < Tv> fuzzybyte: there's piles of // block comments
18:48 < fuzzybyte> /// <- what are these called?  i thought /* are called
block comments
18:49 < fuzzybyte> oops, i meant //
18:49 < TheSeeker> Single line comments
18:49 < Tv> There are two forms of comments:
18:49 < Tv> Line comments start with the character sequence // and stop at
the end of the line.  A line comment acts like a newline.
18:49 < Tv> General comments start with the character sequence /* and
continue through the character sequence */.  A general comment that spans multiple
lines acts like a newline, otherwise it acts like a space.
18:49 < Tv> so they'd be called "line comments" (not "single")
18:49 < fuzzybyte> anyway, it seems that fancy block comments are pointless,
because you might as well use //-style comments to achieve the same.
18:49 < Tv> fuzzybyte: exactly my point
18:50 < Tv> why would you go through all that trouble, now that you no
longer have to
18:50 -!- Fish [~Fish@ARennes-752-1-23-56.w90-32.abo.wanadoo.fr] has quit [Ping
timeout: 265 seconds]
18:51 < TheSeeker> /* <many lines here> */ is still a lot less typing
when programing in a bare text editor.
18:52 < Tv> TheSeeker: yes, and writing comments in the margin in even less
typing when programming with pen & paper
18:52 < Tv> TheSeeker: how's that relevant?-)
18:52 < TheSeeker> [10:44.57] <Tv> fuzzybyte: why would you use /* */
in this modern day and age..
18:53 < Tv> "bare text editor" && "modern day and age" ?
18:53 < Tv> evaluates to false for me
18:53 -!- Fish [~Fish@ARennes-752-1-23-56.w90-32.abo.wanadoo.fr] has joined
#go-nuts
18:53 < TheSeeker> given that there's no IDE for Go...
18:53 * Tv hugs emacs
18:56 * tensai_cirno hugs Tv
18:57 < aiju> LUCKILY there is no IDE for Go
18:57 < aiju> IDEs are an archetypical example why most modern softwares
sucks terribly
18:57 < tensai_cirno> by the way, acme good choice for Go?
18:57 < aiju> tensai_cirno: acme is a good choice for anything
18:57 < Tv> you know, the first time i really saw Eclipse being used was the
first android sdk screencast..  the amount of code generation made me puke in my
mouth a little..
18:58 < aiju> IDE features are languages smells
18:58 < taruti> Has anyone have gocode working with emacs?
18:58 < aiju> hopefully not
18:59 < aiju> :<
18:59 < taruti> :D
19:00 < aiju> http://aiju.phicode.de/b/emacs
19:01 -!- sjd [~sjd@204-195-89-40.wavecable.com] has quit [Remote host closed the
connection]
19:01 < TheSeeker> If you're not going to allow anyone to use tools to make
programming easier and less error prone, why allow then to use code ay all?  they
should just program directly in machine code using a hex editor!  no need to
compile!
19:02 -!- sjd [~sjd@204-195-89-40.wavecable.com] has joined #go-nuts
19:02 < aiju> TheSeeker: IDEs just don't make programming easier
19:02 < TheSeeker> Not having to memorize every method of every package...
yeah, an IDE helps a LOT.
19:04 < aiju> i have documentation for that…
19:04 < aiju> and i don't spend much time looking stuff up
19:05 -!- tdc [~santegoed@host217-44-173-250.range217-44.btcentralplus.com] has
joined #go-nuts
19:05 < TheSeeker> yeah, and which is faster?  switching to a new
application and looking up stuff in the documentation, or having a window pop up
at will that gives you the information directly?
19:05 -!- sussman_ [~sussman@75-145-165-109-Illinois.hfc.comcastbusiness.net] has
quit [Quit: sussman_]
19:05 < aiju> if you spent most of your time looking functions up, you
either have a non-functioning memory or are a beginner
19:06 < aiju> esp.  with sane languages like Go with sane library it should
be possible remember most names
19:06 -!- sjd [~sjd@204-195-89-40.wavecable.com] has quit [Read error: Connection
reset by peer]
19:07 < zozoR> i dont know anyone with better memory than me, and i agree
with TheSeeker
19:07 < TheSeeker> not everyone can remember 10,000 functions and their
arguments with perfect recall.
19:07 < zozoR> codecompletion is the best invention ever
19:07 < aiju> 10,000 functions?  you're using all of them?
19:07 < zozoR> it makes programming thousands times faster
19:07 < aiju> haha
19:08 < aiju> i have yet to see a sane IDE which isn't a horrible bloat or
bugfest
19:08 < TheSeeker> aiju: my goal is to replicate freenet in Go. considering
how much of java it uses, I expect I'll be using quite a lot of Go's capabilities
if I can manage to do it.  :|
19:08 < zozoR> i dont want an ide, i just want code completion
19:09 < zozoR> and syntax highlighting
19:09 < cbeck> emacs =D
19:09 < zozoR> does emacs support code completion for go?
19:09 < napsy> even with code completion, you probably want to check API
documentation if you have 10000 functions
19:09 < cbeck> Not sure if anyone's written that yet
19:09 < zozoR> if you have 10000 functions you might want to optimize your
code a little :D
19:09 * cbeck adds it to his to-do list
19:09 < aiju> haha syntax highlighting
19:10 < aiju> do you colour all text you read?
19:10 < TheSeeker> gocode does code completion, not sure how you would get
syntax highlighting
19:10 < aiju> if all verbs were yellow, english would be easy as pie
19:10 < zozoR> programming is not meant to be hard ..
19:10 < cbeck> Only the highly structured english..
19:10 < zozoR> you might as well use assembler with tthat attitude
19:10 < TheSeeker> syntax highlighting is the easiest way to immediately
tell at a glance if you have mismatched parens or quotes.
19:10 < aiju> writing LISP eh
19:11 < Namegduf> How does syntax highlighting help with that?
19:11 * cbeck <3 LISP
19:11 < Namegduf> Quotes I can see.
19:11 < Namegduf> Parens, not so much.
19:11 < aiju> lots of superfluous irritating parentheses
19:11 < zozoR> smart syntax highlighting highlights the oppesit parantheses
19:11 < Namegduf> When you hover one, I guess
19:11 < Namegduf> I don
19:12 < zozoR> of those you hover above that is :P
19:12 < Namegduf> *I don't think of that as syntax highlighting, though, and
it doesn't help that much.
19:12 < Eko> I love the % command in vim (goto matching {([)
19:12 < TheSeeker> well, a good IDE will have matching parens highlighting,
and if you go to a new line without closing, it'll indent since it thinks you're
continuting the expression on the next line.
19:12 < Eko> :set ai :D
19:12 < aiju> autoindenting is one of the few good IDE features (and really
something most editors do)
19:13 < Namegduf> I can't say if I want an IDE because it gets into the
definition of what an IDE is.
19:13 < zozoR> i rage at the editors that does not do that :D
19:13 < TheSeeker> The argument against having an IDE to program in sounds
like the same argument for not having spell checkers.
19:13 < Eko> I just discovered that TextEdit.app has rudimentary text
completion
19:13 < Eko> I was kinda weirded out.
19:13 < Namegduf> I mean, if I like vi with a good process for quick builds
and reformats...  is that an IDE?
19:13 < Eko> It's like discovering that Notepad.exe has a built-in tea
timer.
19:14 < Eko> Namegduf: I totally use screen as an IDE :D
19:14 < Eko> and lots of split panes in vim
19:14 < aiju> yuck screen
19:14 < aiju> i have to set up tmux on my Linux computers, it really beats
screen
19:14 < zozoR> is there anything you like aiju?
19:14 < Eko> aiju: ? I LOVE screen.  Quite possibly one of my favorite GNU
programs.
19:14 < aiju> zozoR: yeah, acme, Plan 9, C, Go, the sane side of software
19:14 < Namegduf> I use a tiling WM with focus-follows-mouse, a build
terminal, a run terminal, and as many vi instances as I like.
19:14 < zozoR> define sane
19:15 < aiju> not bloated with all kind of features
19:15 < zozoR> what makes a feature bloated?
19:15 < aiju> doesn't really help anything
19:16 < aiju> good software should be simple and powerful
19:16 -!- Fish [~Fish@ARennes-752-1-23-56.w90-32.abo.wanadoo.fr] has quit [Ping
timeout: 276 seconds]
19:16 < aiju> not having zillions of features to fix basic design mistakes
19:16 < Eko> like C: You can do anything, but it may take you thousands of
lines of code ;D
19:16 < aiju> C is truly great
19:16 < Eko> actually, in that vein, you should LOVE assembly
19:16 < Eko> no silly "features"
19:16 < aiju> no
19:16 < Eko> but you can do anything!
19:17 < Eko> ;-)
19:17 < zozoR> assembler is awesome
19:17 < aiju> you totally don't get my point
19:17 < Eko> aiju: no, I do get your point, I'm just being silly.
19:17 < zozoR> if you live 200 years longer than everybody else
19:17 < aiju> compare sed/awk to the hell of Windows programs with
"features"
19:17 < aiju> assembly is terrible for actual development because it is
errorprone and unportable
19:17 < zozoR> well, not that i dont agree with you, but people have
different needs :P
19:17 < Eko> sed/awk/grep/cat/xargs = <3
19:18 < aiju> Eko: that's the point
19:18 -!- Fish [~Fish@ARennes-752-1-23-56.w90-32.abo.wanadoo.fr] has joined
#go-nuts
19:18 -!- brad_ [621a78e5@gateway/web/freenode/ip.98.26.120.229] has joined
#go-nuts
19:18 < Eko> oh, I almost forgot ed.
19:18 < aiju> people write thousands of lines of IDE code to find a single
function
19:18 < TheSeeker> aiju: so gofmt was a huge waste of resources to have ever
been made?
19:18 < zozoR> visual studio is like, you smash your head to the keyboard,
and the code is written for you
19:18 < Eko> With those tools, I can do in a single line of BASH what it
takes graphical people a half an hour to do manually.
19:18 < aiju> i just fucking do grep '^func\(' *.c and can search Plan 9
code
19:18 < zozoR> most developers like that
19:19 < aiju> zozoR: MSVS is an abomination
19:19 < zozoR> it truly is
19:19 < Eko> +1
19:19 < brad_> If only plan9 were being kept up to date
19:19 < aiju> zozoR: it's *REALLY* slow, has billions of bugs and it FUCKING
NEVER WORKS
19:19 < Eko> It works brilliantly, but only when it works, which is almost
never.
19:19 < aiju> MSVS is the essence of IDEs
19:19 < TheSeeker> thta's odd, I use VS every day with my day job, it's
fast, works well, and makes programs that run.
19:20 < aiju> TheSeeker: wow
19:20 < aiju> TheSeeker: working on the blue gene?
19:20 < Eko> Eclipse also works brilliantly, but has a bad habit of having
some pieces working while some others don't.
19:20 < aiju> i used a dualcore 2.2 GHZ processor with 2 GB RAMs of RAM and
it took minutes to start
19:20 < TheSeeker> I probably don't use half of it's features, but I don't
care, since if I'm not using them, they don't use appreciable resources.
19:20 < aiju> acme starts instantly on my 550 MHz Pentium III and it's
hundred times more usable
19:21 -!- binarypie [~binarypie@c-75-68-156-178.hsd1.vt.comcast.net] has joined
#go-nuts
19:21 < zozoR> youd have to write your own make code :D
19:21 < Eko> vim starts instantly on...  uh, every computer I own.
19:21 < TheSeeker> remeber: every feature that VS has was added because
someone asked for it.
19:21 < zozoR> well, im just happy i dont have to work with aiju :D
19:21 < brad_> sam starts instantly on plan9 too
19:21 < Eko> TheSeeker: that's how feature creep (read: bloat) happens
19:21 < aiju> zozoR: and i know i'll be working with your kind
19:21 < aiju> and i won't be happy
19:21 < zozoR> hey i agree with you >.>
19:22 < Eko> zozoR: that's okay, you can work with me
19:22 < Eko> I'm quite agreeable :)
19:22 < zozoR> except for the fact that i want code completion and syntax
highlighting :P
19:22 < aiju> i still spent most of my time thinking or just writing down
what i thought
19:22 < Eko> I'll use anything they pay me to use, but I'll grumble about it
at lunch and write tools and plugins and scripts to make my life easier and put
them on my local repo so my coworkers can check it out too.
19:22 < zozoR> i dont want to work with people who are fanatic about their
languages and ide's
19:22 < zozoR> true that :D
19:22 < TheSeeker> I like having a built-in debugger with breakpoints and
stanck walking etc etc.
19:22 < aiju> Eko: well true
19:23 < TheSeeker> *stack walking
19:23 < aiju> haha the MSVS debugger
19:23 < Eko> is actually a remarkable thing
19:23 < brad_> I thought google was ll about using whatever worked
19:23 < aiju> it can't even print MEMORY CONTENTS in a sane way
19:23 < aiju> in gdb i can do x/10x pointer
19:23 < aiju> hell in msvs
19:23 < TheSeeker> it prints memory contents how you tell it to.
19:23 < zozoR> you dont need that in .net?
19:23 -!- TheMue [~TheMue@p5DDF5F82.dip.t-dialin.net] has joined #go-nuts
19:23 < aiju> zozoR: don't get my started on that one
19:24 < aiju> *me
19:24 * TheSeeker sadly has to work with 10 year old horribly written C/C++ code
:/
19:24 < Eko> aiju: the MSVS debugger is quite possibly the ony reason you
would use the IDE, so I'd steer clear of dissing it.  It is actually pretty
awesome and supports so many different kinds of remote attachment that it will
make your brain melt.
19:24 < aiju> remote attachment?
19:24 < aiju> that's not a feature, that's a requirement
19:24 < aiju> acid does that cross-platform
19:24 < Eko> yeah, for instance, I can debug any application running on a
REMOTE windows CE installation
19:25 < aiju> but wait, MSVS doesn't even on more than one plattform
19:25 < Eko> just as if it were running locally
19:25 < zozoR> monodevelop?
19:25 < aiju> +run
19:25 < zozoR> mono
19:25 < aiju> mono doesn't run, mono creeps
19:25 < zozoR> xD
19:25 < Eko> lol.
19:25 < Eko> meh, not a big fan of .NET in general.
19:25 < zozoR> well, with that being said, i think i will read a book:D
19:25 < brad_> not for me, I find it is actually quite fast
19:26 < zozoR> that is alot more constructive than this :P
19:26 < aiju> well, i can't really say that
19:26 < brad_> but some of that is subjective
19:26 < aiju> because it never worked for me
19:26 < aiju> it fails fast, yeah
19:26 < zozoR> you suck at .net then :D
19:26 < aiju> i just avoid it
19:26 < cbeck> The MSVS debugger makes debugging threaded apps easier than
anything else I've used
19:26 < Namegduf> I've never had any trouble with gdb
19:26 < cbeck> Only reason to use VS
19:26 < aiju> i have seen .NET code, i avoit it as much as i can
19:27 < Namegduf> gdb
19:27 < aiju> the only reason to use VS is getting paid for it
19:27 < Eko> cbeck: eh, I've had great luck with GDB in Eclipse debugging
pthread apps written in C and C++
19:27 < Namegduf> *gdb's thread support never seemed to be bad.
19:27 < cbeck> Don't get me wrong, I much prefer gdb
19:27 < TheSeeker> and, amazingly, most people who write code want to get
paid for it, and use VS. :P
19:27 < Namegduf> I've never used VS, but I've never found threads that
hard.
19:27 < cbeck> Perhaps I've just not learned the correct incantation
19:27 < Eko> I just want in-situ debugging of goroutines and I don't care
how I get it :-D
19:27 < aiju> TheSeeker: flies and shit
19:28 < aiju> wtfi in-situ debugging?
19:28 < cbeck> I don't either, but when dealing with third party libs that
spawn threads, I found it very desirable
19:28 < Eko> cbeck: in my experience, you need a graphical frontend like
eclipse to properly use gdb with threaded apps
19:28 < cbeck> Yeah
19:28 < cbeck> I can see that
19:28 < Namegduf> I wouldn't mind a debugger integrated in my editor, but
the only pro seems to be so I can have a single "view" of the lines as opposed to
a prompt ala GDB
19:28 < aiju> eclipse is even worse than MSVS
19:28 < Eko> aiju: the ability to debug them while they're still running
19:28 < cbeck> M-x gdb-mode =)
19:28 < Namegduf> gdb works on threaded apps fine.
19:28 < Eko> lol emacs
19:29 < Namegduf> There are commands to switch threads.
19:29 < Eko> "Emacs is a great operating system, it just lacks a good text
editor."
19:29 < Namegduf> And you can operate on any thread as you would a single
one.
19:29 < Namegduf> I'm not sure what else I'd expect.
19:29 < aiju> Namegduf: fancy icons and shit
19:29 < cbeck> Eight megabytes and constantly swapping was always my
favorite
19:29 < aiju> escape-meta-alt-control-shift
19:29 < Namegduf> Is that how you insert a new line?
19:29 < TheSeeker> Most people here on freenode live in a linux bubble and
try to ignore that there's an outside world where most of real business gets done.
you might not like it, and you might be trying to change it, but telling people
that what they're used to that allows them to write and debug code quickly
efficiently is evil and they should just stop being a pussy and use notepad ...
is not a good way to
19:29 < TheSeeker> persuade people.
19:29 < Eko> Namegduf: yep, and that works awesome, until you have threads
being created and destroyed many times a second and don't want to be constantly
looking up thread IDs
19:30 < Namegduf> Eko: That sounds horribly inefficient
19:30 < aiju> TheSeeker: i don't live in a linux bubble i live in a plan 9
bubbles
19:30 < Namegduf> Thread creation isn't that cheap
19:30 < brad_> and plan9's bubble burst a long time ago
19:30 < aiju> TheSeeker: besides you _totally_ didn't get my point
19:30 < aiju> notepad is real crap
19:30 < cbeck> I'm still in school, so I live in all kinds of bubbles =p
19:31 < cbeck> But I try to enjoy them while I can
19:31 -!- tdc [~santegoed@host217-44-173-250.range217-44.btcentralplus.com] has
quit [Quit: tdc]
19:31 < Eko> Namegduf: even if you have 10 threads each of which can be
processing an individual request and the master is farming out work units, it'll
be difficult to debug in gdb command-line
19:31 < Eko> Namegduf: also, in the former case, I didn't write the code, I
was just supposed to maintain it.  *grumble*
19:32 < Namegduf> What does VS do that's helpful?
19:32 < aiju> i just don't write ultra-fancy threaded code when it's
completely superfluous :P
19:32 < Eko> just one more reason I love goroutines.
19:32 < Namegduf> Let you see the thread hierarchy or something?
19:32 -!- sussman_ [~sussman@75-145-165-109-Illinois.hfc.comcastbusiness.net] has
joined #go-nuts
19:33 < aiju> CSP is the only way to do sane multithreading
19:33 -!- sussman_ [~sussman@75-145-165-109-Illinois.hfc.comcastbusiness.net] has
left #go-nuts []
19:33 < Eko> Namegduf: mine was in eclipse.  But yes, VS has those sorts of
thread views.  You can also view them by creation time and visualize some kinds of
inter-thread communication and locking.
19:33 -!- sussman_ [~sussman@75-145-165-109-Illinois.hfc.comcastbusiness.net] has
joined #go-nuts
19:33 < cbeck> That, and makes seeing active threads and switching between
them very streamlined
19:33 < Namegduf> Ah.
19:34 < Eko> I justify the fact that MSVS debugging is so good because it's
difficult to write correct code the first time (a) in C/C# and (b) using the win32
APIs.
19:34 < tensai_cirno> is there Go analogue of C getc?
19:35 < Eko> tensai_cirno: not as a single, built-in incantation, no
19:35 < tensai_cirno> aiju, Actor model for multithreading fine too
19:35 < tensai_cirno> but that close to CSP
19:35 < aiju> tensai_cirno: anything but the Windows lock hell
19:36 < Eko> if you're looking to read from the command-line though you can
use fmt.Scan
19:36 -!- GoBIR [~gobir@adsl-76-251-235-206.dsl.ipltin.sbcglobal.net] has joined
#go-nuts
19:37 < tensai_cirno> Eko, thanks
19:37 -!- binarypie [~binarypie@c-75-68-156-178.hsd1.vt.comcast.net] has quit
[Remote host closed the connection]
19:38 < Eko> tensai_cirno: it also has friends like Scanf and Scanln (though
in my experience, the documentation could use some examples showing how they all
work to clarify it a bit)
19:40 -!- Fish [~Fish@ARennes-752-1-23-56.w90-32.abo.wanadoo.fr] has quit [Ping
timeout: 250 seconds]
19:40 < tensai_cirno> https://gist.github.com/755018
19:40 < tensai_cirno> Eko, this program doesn't work, as intended :\
19:41 < tensai_cirno> just spamming "Got: ''" on screen
19:42 -!- Fish [~Fish@ARennes-752-1-23-56.w90-32.abo.wanadoo.fr] has joined
#go-nuts
19:48 < Eko> !gopkg fmt
19:49 < Eko> psh.  http://golang.org/pkg/fmt/#Scan
19:49 < Eko> that's the one you're trying to use; notice it doesn't have a
format.
19:49 < Eko> Try using Scanf if you have a format.
19:51 -!- binarypie [~binarypie@c-75-68-156-178.hsd1.vt.comcast.net] has joined
#go-nuts
20:00 -!- gr0gmint [~quassel@87.60.23.38] has quit [Remote host closed the
connection]
20:01 < tensai_cirno> oh, thanks
20:07 < aiju> tensai_cirno's perfect Go class
20:07 < Eko> ?
20:07 < tensai_cirno> aiju, lol
20:07 < tensai_cirno> again you ^^'
20:07 < aiju> Eko: video game reference
20:07 < aiju> related to his nick
20:07 < tensai_cirno> Eko, local meme related to me
20:07 < Eko> lol.
20:08 < Eko> Unrelated note: when you join an IRC channel as the first user,
does the server +o you as a mode change or are you already +o via the NAMES reply?
20:08 < aiju> Eko: http://www.youtube.com/watch?v=5wFDWP5JwSM
20:09 < Tv> Eko: i would very much guess that's "undefined", in the way many
things about IRC are -- does anything even say you'll always be an op if you're
first to join..
20:10 < aiju> Eko: does a falling tree make a noise if nobody hears it
20:11 < Eko> The sad part is that I understand some of that japanese
>_<
20:12 < tensai_cirno> Eko, than you're with us ^.^
20:12 < Eko> Tv: RFC2812 says you're the operator when you join (with the
"notable exception" of +channels), and that NAMES is automatically sent
20:12 < Eko> I've now taken 8 years of japanese...  but I still couldn't
read a children's book, because I forgot most of the first 7 of that.
20:12 < Eko> well, at least the latter 5 or 6 years of the first 7.
20:13 < Namegduf> Shouldn't matter
20:13 < Namegduf> Either you'll be an op in the first NAMES reply or you'll
see yourself opped.
20:13 < Namegduf> I think the latter, but I'm not completely sure.
20:13 < Eko> my server's actually doing both, lol
20:13 < Namegduf> My server does neither
20:13 -!- tensai_cirno [~cirno@80.250.216.102] has quit [Quit: Leaving]
20:13 < Eko> it sends the +o to you after TOPIC and before NAMES.
20:13 < Namegduf> Op-on-join-empty-channel was a bad idea since Services
were created
20:14 < Namegduf> But standard servers do, yes.
20:14 < Eko> lol, well, my server currently can't do server linking yet, so
to make it usable it has to have that ^_^
20:15 < Eko> it's coming together rather nicely, though, I think.
20:16 < Eko> Go lends itself nicely to servers, I have thought that since
the beginning and have only become more convinced as I've written them.
20:16 < Namegduf> How're you planning on handling synchronisation of access
to channel data?
20:17 < Namegduf> Assuming you're going to use goroutines-per-client
20:17 < Eko> Namegduf: inter-server or intraserver?
20:17 < Namegduf> Intraserver
20:17 < Eko> I also have a goroutine per channel that farms out data access
and changes
20:17 < Namegduf> Ouch
20:17 < Eko> ouch?
20:17 < Namegduf> I started out using a central owning goroutine, but the
speed was dreadful.
20:18 < Eko> orly?
20:18 < Eko> so far I haven't seen issues.
20:18 < Namegduf> Introducing about 500 psuedo remote users in 20 channels
each was very slow.
20:18 < Eko> yeah, I'm almost to the point where I want to do that test.
20:19 < Namegduf> A single user in a couple of channels won't demonstrate
performance issues; IRCDs on even small network need to do 500ish
20:19 < Namegduf> Large networks, you need to handle tens of thousands of
users.
20:19 < Eko> what's your solution?
20:19 < Eko> and how did you test it?
20:20 -!- lifespective [~espeed@63.246.231.57] has quit [Ping timeout: 264
seconds]
20:20 < Namegduf> A server module which introduced many clients, with
typical data attached and random channel membership.
20:20 < Eko> I feel like these are the reasons that god invented expect.
20:20 < aiju> why don't you just look at actual code
20:20 < Eko> aiju: hmm?
20:20 < aiju> there have to be some open source IRC servers
20:20 < aiju> how they solve the problem
20:20 < Namegduf> They don't.
20:20 < Eko> aiju: not many in Go yet
20:21 < Namegduf> C IRCDs are not concurrent.
20:21 < aiju> select?
20:21 < Namegduf> epoll more typically
20:21 < Namegduf> But yes
20:22 -!- sussman_ [~sussman@75-145-165-109-Illinois.hfc.comcastbusiness.net] has
quit [Quit: sussman_]
20:22 < Eko> Namegduf: how'd you test the speed?
20:22 < Eko> signing on yourself and comparing speed or what?
20:22 < Eko> (after interoducing the 500 random clients)
20:22 < Namegduf> I measured time to introduce them.
20:22 < Namegduf> I originally set it to either 100,000 clients or 10,000
clients
20:22 < Namegduf> It died
20:23 < Eko> lol
20:23 < Namegduf> I dropped the count until it could introduce and join them
all in under a minute.
20:23 < Eko> I tend to be a pessimist when doing these sorts of tests and
start out small, so that I'm pleasantly surprised with how well it does >:-)
20:23 < Namegduf> 100,000 would be "safely handles all reasonable sizes"
20:23 < Eko> indeed.
20:23 < Namegduf> 10,000 is "safely handles small and medium"
20:24 < Eko> 1000 is safely handles your average, run-of-the-mill
me-and-my-friends IRC network
20:24 < Namegduf> Small, yes.
20:24 < Eko> 100 is why-don't-you-just-use-google-docs-to-chat ;)
20:24 < Namegduf> 100 won't safely handle anything.
20:24 < aiju> 10 is at-least-it-beats-python
20:24 < Eko> indeed.
20:24 < Eko> rofl.
20:25 < Namegduf> It's slow enough that anything making it significantly
slower will make it no longer work.
20:25 < Namegduf> No safety margin, you know?
20:25 -!- sussman_ [~sussman@75-145-165-109-Illinois.hfc.comcastbusiness.net] has
joined #go-nuts
20:25 -!- sussman_ [~sussman@75-145-165-109-Illinois.hfc.comcastbusiness.net] has
quit [Client Quit]
20:25 < Namegduf> Flood it a little and watch it fold.
20:25 < Namegduf> I got a lot of improvement by switching to mutexes.
20:25 * Eko goes to write a quick battle-test client.
20:26 < Namegduf> It meant I could avoid a per-client write goroutine and
goroutine context switches for most operations.
20:26 < Eko> how long did it take to convert to mutexes?
20:26 < Namegduf> Not too long.  Tricky to handle, though.
20:26 < Eko> seems like it'd be a long, complicated process...
20:26 < Eko> it's really nice handling everything via pseudo RPCs.
20:26 < Namegduf> I ensured they never escaped the core, weren't even
visible outside of it.
20:27 < aiju> what about buffered channels?
20:27 < Namegduf> Not tried.  Why would they help?
20:27 < Namegduf> The problem wasn't concurrency persay; the bulk of things
were uncontended.
20:28 < Eko> I started out having lots of packages, but the class
interdependencies pushed me back to using a single package with all of it
>_<
20:28 < aiju> don't you need to just pass messages between threads?
20:28 < Eko> Namegduf: it could in some circumstances
20:28 < Namegduf> aiju: No.
20:28 < aiju> but?
20:28 < Namegduf> "passing messages between threads" is one solution.
20:29 < Eko> it can allow a bunch of messages coming in at once from clients
to be processed before it gets around to answering channel data questions
20:29 < Eko> so it would be bad for real-time response, could be better for
overall latency
20:29 < Namegduf> aiju: What you need is to have multiple clients
communicating with each other, with code making decisions based on shared state.
20:29 < Namegduf> Passing messages is one way of implementing that, and
fundamentally the only way for the actual communication.
20:29 < Namegduf> The problem is the second half.
20:30 < Namegduf> Passing messages for accessing the shared state was just
way too slow.
20:30 < aiju> hm.  why do you need to access the shared state?
20:30 < Namegduf> To lookup the user to send to.  To do permission checks.
20:30 < Namegduf> To update the state if it's a join/part command.
20:31 < Namegduf> Or some other server state altering command.
20:31 < aiju> i'd just send messages between user/channel goroutines
20:31 < Namegduf> Channel goroutines are a nice idea but damn slow
20:31 < Namegduf> Right now?
20:32 < Namegduf> Read operations are completely unsynchronised.
20:33 < Namegduf> I switched to using atomic write operations, meaning reads
to state are fast.
20:34 < Namegduf> Goroutine context switches are slow, and the metric that's
important is the number of totally unrelated commands you can handle a second, in
terms of CPU.
20:38 -!- binarypie [~binarypie@c-75-68-156-178.hsd1.vt.comcast.net] has quit
[Remote host closed the connection]
20:38 < Namegduf> I feel goroutines managing state are a poor choice, even
though they were the first thing I tried, just because the amount of communication
required is insane.
20:41 < Tv> you definitely don't want to place getter/setter logic in
another goroutine
20:42 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Ping timeout: 272
seconds]
20:50 < Eko> I was under the impression that context switches between
goroutines on the same CPU were relatively cheap, like a function call
20:51 < Namegduf> Channels are slow because of select, as I recall.
20:51 < Namegduf> Maybe they can be made cheap.
20:52 < Namegduf> I assume they'd require at least an atomic write op,
though.
20:52 -!- illya77 [~illya77@155-90-133-95.pool.ukrtel.net] has quit [Quit:
illya77]
20:52 < Eko> of course, I am also doing a really stupid, naive way of
sending the "commands" over the goroutines, and that will have to change
20:52 < Namegduf> I had getter/setter methods on channel/user pointers
20:52 < Eko> I did a benchmark and I can get a raw 600% improvement in
one-way communication by fixing it.
20:53 < zozoR> whats the point of goroutines if they cant be used for heavy
stuff : |
20:53 < Eko> zozoR: from my experience, they can
20:53 < Namegduf> Goroutines provide easier, cheaper concurrency; they're
just not optimal for things where concurrency is not optimal.
20:53 < zozoR> oh ok
20:53 < Namegduf> And that includes shared state which has to be queried a
lot, quickly.
20:54 < Eko> yep.
20:54 < Eko> though some part of me wants to keep using them that way and
let the compilers catch up.
20:54 < zozoR> :D
20:54 < Eko> compilers/optimizers/runtime, that is.
20:54 < Namegduf> Well, for reads, they can't.
20:54 < aiju> i still write evil non-concurrent programs
20:55 < Namegduf> If a goroutine listening to receive a send involves an
atomic write operation
20:55 < Eko> lol
20:55 < Eko> aiju: bad!
20:55 < Tv> frankly, if you have a lot of really-tangled shared state,
you'll have hell growing >1 machine anywa
20:55 < Tv> y
20:55 < aiju> reading UNIX V6 source code right now
20:55 < Namegduf> Then you causing a goroutine to do that might not be able
to beat a read which can avoid it entirely.
20:55 < Namegduf> Why would growing >1 machine be a concern?
20:55 < Eko> I thought mutexes were implemented with channels anyway.
20:55 < Namegduf> No, they aren't.
20:56 < Namegduf> They use a compare-and-swap operation
20:56 < Namegduf> Not sure what happens if that operation fails and it needs
to wait
20:56 < Namegduf> But that's a rare event
20:56 < aiju> implementing mutexes with compare-and-swap is a little odd
20:56 < Namegduf> I assume it's fast?
20:56 < aiju> ain't the point of compare-and-swap to avoid mutexes?  :D
20:57 < Namegduf> They've implemented mutexes which avoid mutexes!  Genius!
20:57 < Namegduf> In this case, "clearly not"
20:57 < aiju> at least Synthesis uses compare-and-swap to avoid mutexes…
20:58 < aiju> but that one is amazingly even more dead than Plan 9 lol
20:58 < Namegduf> Anyways
20:58 < Namegduf> Compare-and-swap to avoid mutexes which are implemented in
compare and swap can make perfect sense.
20:59 < Namegduf> For one, pretty sure even an uncontended mutex does two
compare-and-swap operations.
20:59 < Namegduf> If you can trade for one...
20:59 < Namegduf> For two, you might be able to mutex less; if you
compare-and-swap the data itself reads can avoid having to use the mutex.
20:59 < zozoR> anyway, for the earlier discussion: nsf wrote a
codecompletion daemon, that works with editors (vim, eclipse, perhabs more?) for
those who are interested
21:00 -!- araujo_ [~araujo@190.38.49.178] has joined #go-nuts
21:00 -!- araujo_ [~araujo@190.38.49.178] has quit [Read error: Connection reset
by peer]
21:00 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts
21:00 < Namegduf> I think something was said on the mailing list that
suggested that typical mutexes are done in a different (possibly slower) way,
though.
21:00 < brad_> anyone write any kate plugins that will syntax highlight and
fold?
21:02 < kimelto> this discussion is interesting.  I am thinking to limit the
number of concurrent requests to a specific host in my http workers (goroutines).
I wonder what is the best way to achieve this.
21:08 -!- rbraley [~rbraley@ip72-222-134-229.ph.ph.cox.net] has quit [Read error:
Connection reset by peer]
21:11 < Urtie> Sorry to just jump in, maybe I missunderstood something, but
why are channels slow?  If loads of them suffer from C10K, or is throughput bad
for some reason?
21:12 < Namegduf> I'm not sure.
21:12 < Namegduf> I know that a more optimal implementation couldn't be used
due to select support
21:13 < Urtie> They don't want to depend on something like epoll/kpoll then?
So it's when you hit a large number of channels it starts getting bad?
21:13 < Tv> Urtie: it's not really a c10k issue, just that channels have
more overhead than direct data access
21:14 < Tv> Urtie: they're not a scalability issue, but don't use them if
you don't need them
21:14 < Namegduf> It's not got to do with the number of them, no.
21:15 < Namegduf> Channel sends and receives just have significant overhead,
and I suspect that a context switch between a goroutine does, too, although it
could have been mostly in the channel implementation.
21:15 < Urtie> Oh, that's a shame.  I just got worked up yesterday about
using the networked channels to talk to some backend servers.
21:15 < Namegduf> If you have a network in there, it's already going to be
way slower than channels are.
21:15 < Namegduf> They're perfectly usable.
21:16 < kimelto> maybe if the channel is not fast enough for your case it is
not worth it to have mutiple goroutines?
21:16 < kimelto> I mean if the time spent in the goroutine is less than the
time taken to communicate
21:16 < Urtie> I can't really say they're not fast enough - I don't know
that yet - I'm just anal about doing it "the right way".
21:17 < Namegduf> kimelto: In this case the interesting matter was
synchronisation of data access, not distribution of work done
21:20 -!- foocraft [~dsc@78.101.122.198] has quit [Ping timeout: 240 seconds]
21:22 < Namegduf> Urtie: Channels are usually "the right way".  I just think
cases where communication can't be reduced with them are unusual cases in which
other methods are called for.
21:22 < Eko> Namegduf: hmm.  This one's interesting.  I can do 1000
connections, but somewhere between there and 5000 I get this:
21:22 < Eko> [12/25/10 16:22:45] [EROR] Accept: accept tcp 0.0.0.0:6667: too
many open files
21:22 < aiju> Eko: look at your sysconf
21:22 < Namegduf> Sounds like your FD limit is interfering
21:23 < aiju> _SC_OPEN_MAX
21:23 < Eko> can I set that via ulimit?
21:23 < Namegduf> Yes, but it's complicated and annoying.
21:23 < Eko> :(
21:23 < Namegduf> I did it as root, then ran it as root, and it worked.
21:23 < Eko> lol
21:23 < Namegduf> Couldn't figure out how to do it for a regular user.
21:23 < Namegduf> It should have worked but didn't.
21:24 < Eko> I can never find documentation on ulimit, I always have to
google it.
21:24 * Eko checks man bash
21:24 < Eko> ah, ulimit -n.
21:24 < aiju> help ulimit
21:24 < aiju> in bash
21:24 < Eko> 2560 lame.
21:25 < Eko> kyle@strategos ~/dev/hosted/jaid $ ulimit -n 1000000
21:25 < Eko> bash: ulimit: open files: cannot modify limit: Invalid argument
21:25 < Eko> worth a shot...
21:25 < aiju> could also be your limits.conf
21:27 < Eko> root can set his ulimit up to 12288 (trial and error, woot)
21:28 < Eko> I can sudo up to root, change my ulimit, and then su down to my
user.  </kludge>
21:29 < Eko> in practice, will an IRC server ever have that many clients?
If you have more than 10k on your server, it's probably time to start a network
21:30 < Namegduf> You need to handle that many *remote* users.
21:30 < Namegduf> Local, not so much.
21:30 < Eko> indeed.
21:30 < Namegduf> Freenode reports 6k local on the server I'm on.
21:31 < Eko> 1605 on mine, globally 53k or so.
21:31 < Eko> (max 3k locally)
21:36 -!- araujo [~araujo@gentoo/developer/araujo] has quit [Ping timeout: 265
seconds]
21:38 -!- tensai_cirno [~cirno@77.232.15.216] has joined #go-nuts
21:39 < Eko> hmm.
21:39 < Eko> now I"m getting broken pipe when I get around 500
21:41 < KBme> i just had to introduce mutexes
21:41 < KBme> at once it seems i introduced a race ☺
21:46 < Eko> so, my server can process 300 clients in parallel all signing
in and joining 20 channels in 3.5 seconds including all setup and cleanup
21:47 < Eko> I think a lot of the latency is the printfs to the
command-line, lol
21:47 < Eko> it can do 300 users each connecting to 300 channels in 17
seconds.
21:50 -!- femtoo [~femto@95-89-197-28-dynip.superkabel.de] has quit [Read error:
Connection reset by peer]
21:56 < Eko> er, that's 100 channels*
21:57 < Eko> so it's not as bad as I thought.  I do want to do my overhaul
of the inter-client channels though, right now I'm sending one structure with a
string command and map[string]interface{} and I .() the types later, but it turns
out that's really slow.
21:57 < Eko> compared to having individual structures for each "command"
type that are selected via a typeswitch.
21:59 -!- TheMue [~TheMue@p5DDF5F82.dip.t-dialin.net] has quit [Quit: TheMue]
21:59 -!- piranha_ [~piranha@5ED4B890.cm-7-5c.dynamic.ziggo.nl] has quit [Quit:
Computer has gone to sleep.]
22:03 -!- Fish [~Fish@ARennes-752-1-23-56.w90-32.abo.wanadoo.fr] has quit [Quit:
So Long, and Thanks for All the Fish]
22:09 -!- DerHorst [~Horst@e176102109.adsl.alicedsl.de] has quit [Remote host
closed the connection]
22:45 -!- Nicotux [~AndChat@62.201.142.70] has joined #go-nuts
22:45 -!- zozoR [~zozoR@56346ed3.rev.stofanet.dk] has quit [Quit: Morten.  Desu~]
22:46 -!- Scorchin [~Scorchin@host86-181-88-13.range86-181.btcentralplus.com] has
joined #go-nuts
22:48 -!- Nicotux [~AndChat@62.201.142.70] has quit [Read error: Connection reset
by peer]
22:48 -!- Nicotux [~AndChat@62.201.142.70] has joined #go-nuts
22:50 -!- Nicotux [~AndChat@62.201.142.70] has quit [Read error: Connection reset
by peer]
22:50 -!- Nicotux [~AndChat@62.201.142.70] has joined #go-nuts
22:53 -!- Nicotux [~AndChat@62.201.142.70] has quit [Read error: Connection reset
by peer]
22:53 -!- Nicotux [~AndChat@62.201.142.70] has joined #go-nuts
22:55 -!- Nicotux [~AndChat@62.201.142.70] has quit [Read error: Connection reset
by peer]
22:58 -!- rlab_ [~Miranda@91.200.158.34] has quit [Quit: Miranda IM! Smaller,
Faster, Easier.  http://miranda-im.org]
22:59 -!- DarthShrine [~angus@pdpc/supporter/student/DarthShrine] has quit [Quit:
DarthShrine]
23:14 -!- thomas_b [~thomasb@cm-84.215.47.51.getinternet.no] has quit [Ping
timeout: 260 seconds]
23:29 -!- nsf [~nsf@jiss.convex.ru] has joined #go-nuts
23:31 -!- DarthShrine [~angus@58-6-93-222.dyn.iinet.net.au] has joined #go-nuts
23:31 -!- DarthShrine [~angus@58-6-93-222.dyn.iinet.net.au] has quit [Changing
host]
23:31 -!- DarthShrine [~angus@pdpc/supporter/student/DarthShrine] has joined
#go-nuts
23:34 -!- DarthShrine [~angus@pdpc/supporter/student/DarthShrine] has quit [Client
Quit]
23:53 -!- araujo [~araujo@gentoo/developer/araujo] has joined #go-nuts
23:55 -!- DarthShrine [~angus@58-6-93-222.dyn.iinet.net.au] has joined #go-nuts
23:55 -!- DarthShrine [~angus@58-6-93-222.dyn.iinet.net.au] has quit [Changing
host]
23:55 -!- DarthShrine [~angus@pdpc/supporter/student/DarthShrine] has joined
#go-nuts
23:56 -!- skejoe [~skejoe@188.114.142.162] has quit [Quit: Lost terminal]
23:58 -!- vdrab [~vdrab@pd3e9b4.kyotnt01.ap.so-net.ne.jp] has joined #go-nuts
--- Log closed Sun Dec 26 00:00:01 2010