Hokay, I officially give up...

John Carter <[email protected]> Fri, 22 May 2009 13:45:33 +1200 (NZST)
Newsgroups gmane.comp.programming.language-of-the-year
Message-ID <[email protected]>
I have sort it with needles, I have sort it with care, I have pursued
it with forks and hope...

... I have found bugs, in my code and fixed'em. I have found bugs in
ruby, and fixed them. But there are more and I can't see the bottom of
the pool. Each time I thought, "AH! I have FOUND IT!", but I have
merely decreased the probability of occurrence. Each time I think, if
I just get this right, it's going to be a small contained no-risk
tweak to my app... it's worth ploughing on.

Threading is a truly awful paradigm and I truly regret ever having
anything to do with it.

Threading in an interpreter is intrusive and incredibly subtle,
putting hooks into every corner. Maybe one day they will get it
perfect... but I doubt it.

In fact, the next generation of ruby uses pthreads.... which leaves me
with a feeling of cold dread. Why? Because last year I wasted more
time than I care to account for tracking a race in a the glibc pthread
library routines.

Threading is very easy to do, easy to get 99.9% right, but incredibly
hard to get 100% robust. You can get it 99.9% right, or 99.99% right or
even 99.999% right... but right always and in every case seems to be
incredibly hard. Not just for me apparently, but for OS, library and
interpreter writers as well.

And alas, unless _everybody_ gets it perfect, the end result is still
flawed... and as we get more and more cores on the CPU, the problems
are just going to get bigger.

I'm giving up on them and ripping out the word Thread from my entire
app.

Alas, threads still exist as cruft within in the OS, libraries and
interpreters making them all much bigger, much more complex and a lot
buggier.

Sorry, it is time to admit Moore's Law has just crashed into the
immovable barrier of Grunt's Law (Human aren't getting smarter)....

I'm just plain not smart enough to do threads.

John Carter                             Phone : (64)(3) 358 6639
Tait Electronics                        Fax   : (64)(3) 359 4632
PO Box 1645 Christchurch                Email : [email protected]
New Zealand