Linus on C++

From: Linus Torvalds <torvalds <at> linux-foundation.org>
Subject: Re: [RFC] Convert builin-mailinfo.c to use The Better String Library.
Newsgroups: gmane.comp.version-control.git
Date: 2007-09-06 17:50:28 GMT (2 years, 14 weeks, 16 hours and 36 minutes ago)

On Wed, 5 Sep 2007, Dmitry Kakurin wrote:
> 
> When I first looked at Git source code two things struck me as odd:
> 1. Pure C as opposed to C++. No idea why. Please don't talk about portability,
> it's BS.

*YOU* are full of bullshit.

C++ is a horrible language. It's made more horrible by the fact that a lot 
of substandard programmers use it, to the point where it's much much 
easier to generate total and utter crap with it. Quite frankly, even if 
the choice of C were to do *nothing* but keep the C++ programmers out, 
that in itself would be a huge reason to use C.

In other words: the choice of C is the only sane choice. I know Miles 
Bader jokingly said "to piss you off", but it's actually true. I've come 
to the conclusion that any programmer that would prefer the project to be 
in C++ over C is likely a programmer that I really *would* prefer to piss 
off, so that he doesn't come and screw up any project I'm involved with.

C++ leads to really really bad design choices. You invariably start using 
the "nice" library features of the language like STL and Boost and other 
total and utter crap, that may "help" you program, but causes:

 - infinite amounts of pain when they don't work (and anybody who tells me 
   that STL and especially Boost are stable and portable is just so full 
   of BS that it's not even funny)

 - inefficient abstracted programming models where two years down the road 
   you notice that some abstraction wasn't very efficient, but now all 
   your code depends on all the nice object models around it, and you 
   cannot fix it without rewriting your app.

In other words, the only way to do good, efficient, and system-level and 
portable C++ ends up to limit yourself to all the things that are 
basically available in C. And limiting your project to C means that people 
don't screw that up, and also means that you get a lot of programmers that 
do actually understand low-level issues and don't screw things up with any 
idiotic "object model" crap.

So I'm sorry, but for something like git, where efficiency was a primary 
objective, the "advantages" of C++ is just a huge mistake. The fact that 
we also piss off people who cannot see that is just a big additional 
advantage.

If you want a VCS that is written in C++, go play with Monotone. Really. 
They use a "real database". They use "nice object-oriented libraries". 
They use "nice C++ abstractions". And quite frankly, as a result of all 
these design decisions that sound so appealing to some CS people, the end 
result is a horrible and unmaintainable mess.

But I'm sure you'd like it more than git.

            Linus

Die guten alten Zeit, als Torvalds noch kein Blatt vor den Mund nahm.

Linus rastet aus

From	Linus Torvalds <>
Date	Sun, 23 Dec 2012 09:36:15 -0800
Subject	Re: [Regression w/ patch] Media commit causes user space to misbahave (was: Re: Linux 3.8-rc1)
share 2k
On Sun, Dec 23, 2012 at 6:08 AM, Mauro Carvalho Chehab
<mchehab@redhat.com> wrote:
>
> Are you saying that pulseaudio is entering on some weird loop if the
> returned value is not -EINVAL? That seems a bug at pulseaudio.

Mauro, SHUT THE FUCK UP!

It's a bug alright - in the kernel. How long have you been a
maintainer? And you *still* haven't learnt the first rule of kernel
maintenance?

If a change results in user programs breaking, it's a bug in the
kernel. We never EVER blame the user programs. How hard can this be to
understand?

To make matters worse, commit f0ed2ce840b3 is clearly total and utter
CRAP even if it didn't break applications. ENOENT is not a valid error
return from an ioctl. Never has been, never will be. ENOENT means "No
such file and directory", and is for path operations. ioctl's are done
on files that have already been opened, there's no way in hell that
ENOENT would ever be valid.

> So, on a first glance, this doesn't sound like a regression,
> but, instead, it looks tha pulseaudio/tumbleweed has some serious
> bugs and/or regressions.

Shut up, Mauro. And I don't _ever_ want to hear that kind of obvious
garbage and idiocy from a kernel maintainer again. Seriously.

I'd wait for Rafael's patch to go through you, but I have another
error report in my mailbox of all KDE media applications being broken
by v3.8-rc1, and I bet it's the same kernel bug. And you've shown
yourself to not be competent in this issue, so I'll apply it directly
and immediately myself.

WE DO NOT BREAK USERSPACE!

Seriously. How hard is this rule to understand? We particularly don't
break user space with TOTAL CRAP. I'm angry, because your whole email
was so _horribly_ wrong, and the patch that broke things was so
obviously crap. The whole patch is incredibly broken shit. It adds an
insane error code (ENOENT), and then because it's so insane, it adds a
few places to fix it up ("ret == -ENOENT ? -EINVAL : ret").

The fact that you then try to make *excuses* for breaking user space,
and blaming some external program that *used* to work, is just
shameful. It's not how we work.

Fix your f*cking "compliance tool", because it is obviously broken.
And fix your approach to kernel programming.

               Linus

Klassischer Torvalds-Ausbruch zu einer Zeit, als er gelegentlich noch aus der Haut fuhr.

Ich persönlich wäre schwerst angepisst, wenn mir jemand dermassen an den Karren fahren würde, Torvalds hin oder her. Umso eindrücklicher die coole Antwort:

Date	Sun, 23 Dec 2012 18:21:35 -0200
From	Mauro Carvalho Chehab <>
Subject	Re: [Regression w/ patch] Media commit causes user space to misbahave (was: Re: Linux 3.8-rc1)
share 0
Linus,

Em Sun, 23 Dec 2012 09:36:15 -0800
Linus Torvalds <torvalds@linux-foundation.org> escreveu:

> To make matters worse, commit f0ed2ce840b3 is clearly total and utter
> CRAP even if it didn't break applications. ENOENT is not a valid error
> return from an ioctl. Never has been, never will be. ENOENT means "No
> such file and directory", and is for path operations. ioctl's are done
> on files that have already been opened, there's no way in hell that
> ENOENT would ever be valid.

Agreed: ENOENT was a bad choice, and it should be reverted.

What I'm trying to understand is why pulseaudio is complaining.
Is it because it only accepts EINVAL error code for media controls?

I'm asking it to Rafael because I'm pretty sure that other drivers
don't return EINVAL when a media control is not available. So, the bug
may already be there, and probably got noticed on 3.8-rc1 because most
notebooks come with UVC cameras installed internally.

> > So, on a first glance, this doesn't sound like a regression,
> > but, instead, it looks tha pulseaudio/tumbleweed has some serious
> > bugs and/or regressions.
> 
> Shut up, Mauro. And I don't _ever_ want to hear that kind of obvious
> garbage and idiocy from a kernel maintainer again. Seriously.

OK.

> I'd wait for Rafael's patch to go through you, but I have another
> error report in my mailbox of all KDE media applications being broken
> by v3.8-rc1, and I bet it's the same kernel bug.

Ouch!

> And you've shown
> yourself to not be competent in this issue, so I'll apply it directly
> and immediately myself.

OK, please apply it.

I suspect however that just applying Rafael's patch may not be enough,
as the bug may still be there affecting all other drivers.

> WE DO NOT BREAK USERSPACE!

I know and I'm doing my best rejecting patches that could potentially
break userspace in advance.

Sometimes shit happens. Sorry for that.

Cheers,
Mauro

Farewell from Rusty Russell (kernel.org)

To my fellow maintainers: stay harsh on code and don’t be afraid to say “No” or “Why?”; there really are more bad ideas than good ones, and complexity is such a bright candle for us hacker-moths. But be gentle, kind and forgiving of your peers: respect from people you respect is really the only reward that sticks.

Farewell all, and I look forward to crossing your paths again!

Rusty.

commit: ed875ea1fcc6c34ea232610c3041d0978e327bbe

Node.js

Der legendäre Vortrag von Ryan Dahl, in dem er Node.js (das revolutionäre weil non-blocking evented I/O Framework for the V8 JavaScript Engine) vorstellt. Interessant für alle, die sich für Web/Javascript/clevere Ideen begeistern können.
Ich habe es jetzt auch bemerkt, denn die Spatzen pfeifen es von den Dächern: Javascript ist zurück! Als vermurkst und kaputt verschrien, feiert die Programmiersprache ihre viel umjubelte Rückkehr in den Schoss der Web-Gemeinschaft. Da müsste man sich mal ein Buch kaufen und die Sprache lernen.

Hier ist das Video.

The Zen of Python

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren’t special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one– and preferably only one –obvious way to do it.
Although that way may not be obvious at first unless you’re Dutch.
Now is better than never.
Although never is often better than right now.
If the implementation is hard to explain, it’s a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea — let’s do more of those!

—Tim Peters

Linux und Spiderman

Folgende Meldung, als ich ein kleines Skriptli als root auf einer fremden Linux-Kiste laufen lassen wollte (man beachte Punkt 3):


$ sudo ./blah.sh

We trust you have received the usual lecture from the local System Administrator. It usually boils down to these three things:

#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.

1. August in der Ostschweiz

Ich war mit Laure am Wochenende des 1. August bei Dominik in St.Gallen zu Besuch. Es war ausgesprochen herrlich, wir schliefen ausgiebig (die Stille in St.Georgen ob St.Gallen ist diesbezüglich sehr förderlich), wir badeten im See, wir brateten Würste auf dem Freudenberg und tranken Bier dazu, wir bestaunten die Höhenfeuer, die riesige Schweizer Fahne am Säntis sowie ein beeindruckendes Feuerwerk in Romanshorn, brunchten ausgiebig und als der Regen einsetzte, besichtigten wir unter kundiger Führung von Dominik und Joachim die Stadt St.Gallen.
Kann ich nur weiterempfehlen. Besucht diese Stadt. Ihr werdet es nicht bereuen.

Blinkenlights

Mal wieder was für den Nerd in dir (Quelle: Wikipedia).

Blinkenlights ist ein Kunstwort aus dem Text eines Warnschildes, in pseudo-englisch-deutscher Schreibweise. Die ursprüngliche Version des Textes stammt aus dem Jahre 1955 aus IBM-Rechenzentren. Das Originalwort „blinkenlichten“ bezeichnet dabei die Lampen einer Maschinenkonsole. Im Laufe der 60er und 70er Jahre verbreitete sich der Originaltext weltweit und wurde schließlich in Deutschland zu der heute bekannten Form mit dem Wort “Blinkenlights” weiterentwickelt.

Der Originaltext:

ACHTUNG! ALLES LOOKENSPEEPERS!

ALLES TURISTEN UND NONTEKNISCHEN LOOKENPEEPERS!
KOMPUTERMASCHINE IST NICHT FÜR DER GEFINGERPOKEN UND MITTENGRABEN!
ODERWISE IST EASY TO SCHNAPPEN DER SPRINGENWERK, BLOWENFUSEN UND POPPENCORKEN MIT SPITZENSPARKSEN.
IST NICHT FÜR GEWERKEN BEI DUMMKOPFEN.
DER RUBBERNECKEN SIGHTSEEREN KEEPEN DAS COTTONPICKEN HÄNDER IN DAS POCKETS MUSS.
ZO RELAXEN UND WATSCHEN DER BLINKENLICHTEN.

Die abgeänderte Form aus Deutschland mit dem Wort „Blinkenlights“:

ATTENTION

This room is fullfilled mit special electronische equippment. Fingergrabbing and pressing the cnoeppkes from the computers is allowed for die experts only! So all the “lefthanders” stay away and do not disturben the brainstorming von here working intelligencies. Otherwise you will be out thrown and kicked anderswhere! Also: please keep still and only watchen astaunished the blinkenlights.

CDs rippen

Die Antwort unter Linux lautet: sound-juicer.
Um mp3 Files zu generieren, sind folgende Packages erforderlich:

lame
gstreamer0.10-plugins-ugly
gstreamer0.10-plugins-ugly-multiverse

Aber versuchs doch mal mit ogg.