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.

Geht mit der Zeit

GPT-4, meinem gelegentlichen Einflüsterer und Ideen-Sparringpartner, der mir auch ein bisschen Angst macht, folgende Frage gestellt, um sprachliche Doppeldeutigkeiten zu überprüfen:

Erkläre den Satz: wer nicht mit der Zeit geht, geht mit der Zeit.

Ich hatte insgeheim gehofft, dass ES nicht dahinter kommt, aber nichts da, entschlüsselt und beschrieben, besser als ich es jemals könnte:

Der Satz “Wer nicht mit der Zeit geht, geht mit der Zeit” ist ein deutsches Sprichwort, das auf die Notwendigkeit hinweist, sich an Veränderungen anzupassen und mit der Entwicklung Schritt zu halten. Es betont die Bedeutung von Flexibilität und Offenheit für Neues in einer sich ständig ändernden Welt.

In diesem Zusammenhang bedeutet “mit der Zeit gehen” so viel wie “sich anpassen” oder “sich weiterentwickeln”. Wenn jemand “mit der Zeit geht”, passt er sich erfolgreich an Veränderungen an und bleibt relevant und erfolgreich.

Das Sprichwort warnt davor, dass diejenigen, die sich nicht anpassen und an veralteten Ansichten oder Methoden festhalten, schließlich von der Zeit überholt werden und zurückbleiben (“geht mit der Zeit”). Dies kann bedeuten, dass sie ihre Bedeutung oder ihren Einfluss verlieren oder dass ihre Fähigkeiten und Kenntnisse veraltet werden.

Der Satz unterstreicht also die Wichtigkeit, offen für Veränderungen zu sein und sich kontinuierlich weiterzuentwickeln, um erfolgreich und wettbewerbsfähig zu bleiben.

Google wird sehr bald in grosse Schwierigkeiten geraten.

Und immer wieder: Simplicity

Eine Person auf Hacker News:

For the last 12 years, I’ve worked with 40+ different software teams (helping with UI/UX design]). From small scrappy startups to fortune 500.
The teams that were great to work with and ended up having the biggest wins, were always small teams with a great cultural balance. They always strived for the simplest solutions.

You could trace this balance of engineers in all of the cases back to GREAT hiring by the CEO.

The teams that were the least productive and just burnt through VC money were the ones that had a handful of toxic engineers at their core. Finding complex and seemingly clever (over engineered) ‘solutions’ seemed to be their goal in every meeting.

A way to find out if your team belongs to the second group, measure the amount of jargon that’s being used in meetings.

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

Raspberry Pi als Tor Relay

Hinweise zur Installation von Tor auf einem Raspberry Pi.

  • Raspberry Pi OS via Raspberry Pi Imager auf die micro SD Karte schreiben (SSH aktivieren!)
  • Ethernetverbindung und Stromversorgung herstellen
  • Via SSH einloggen
  • Pakete aktualisieren:
    apt-get install update
    apt-get install upgrade
  • Tor installieren
    apt-get install tor
  • /etc/tor/torrc:

SocksPort 0
Log notice file /var/log/tor/notices.log
RunAsDaemon 1
DataDirectory /var/lib/tor
ORPort 9001 IPv4Only
ExitPolicy reject *:*

  • Auf dem Router Port 9001 öffnen
  • systemctl restart tor@default.service
  • Auf einem schwachbrüstiger Raspberry Pi kann tor von systemd beendet werden, weil tor nicht innerhalb von 5min einen erfolgreichen Start signalisierte (zu erkennen in den Logs, wenn inmitten des Bootstrapping das Programm neu gestartet wird). Lösung: Erhöhung der TimeoutStartSec (z.B. von 300 auf 600) in /lib/systemd/system/tor@default.service.

Unix Pipes

Doug McIlroy beschreibt Pipes, lange bevor Unix das Licht der Welt erblickte.

            Summary--what's most important.
    To put my strongest concerns into a nutshell:
1. We should have some ways of coupling programs like
garden hose--screw in another segment when it becomes when
it becomes necessary to massage data in another way.
This is the way of IO also.
2. Our loader should be able to do link-loading and
controlled establishment.
3. Our library filing scheme should allow for rather
general indexing, responsibility, generations, data path
switching.
4. It should be possible to get private system components
(all routines are system components) for buggering around with.

                                                M. D. McIlroy
                                                October 11, 1964 

Goodbye Hostpoint, Hello Hetzner

Seit Anbeginn anno 2006 war dieser Blog bei Hostpoint im schönen Rapperswil gehostet. Das billigste Webhosting Angebot beläuft sich bei diesem Anbieter unterdessen auf CHF 12.90/Monat (CHF 154.80/Jahr). Bisschen teuer für das bescheidene Datenaufkommen, der dieser Blog verursacht.

Kann man heutzutage bei gleicher Qualität weitaus billiger haben, zum Beispiel bei Hetzner für rund 25 Stutz pro Jahr (EUR 1.8/Monat). Deshalb kurzerhand Umzug. Auch gleich noch alles aktualisiert. Bisher nichts zu Beklagen. Daumen hoch.