Зарегистрируйтесь сейчас для лучшей персонализированной цитаты!

Linus Torvalds: Juggling chainsaws and building Linux

4 октября 2021 г Hi-network.com

Thirty years ago, give or take, Linus Torvalds created Linux. At the Linux Foundation's Open Source Summit last week, Torvalds talked with his good friend and VMware VP and chief open-source officer Dirk Hohndel about Linux's history.

First things first, they talked about the actual date of Linux's birthday. Hohndel noted that Torvalds "has redefined the birthday of Linux everyone used to use -- August 25 -- and then said, 'well, actually it's September'." Indeed Torvalds and I have talked about this very point before, and you can choose between four dates for Linux's "official" birthday.

Recommends

The best Linux Foundation classes

Want a good tech job? Then you need to know Linux and open-source software. One of the best ways to learn is via a Linux Foundation course.

Read now

Torvalds is just fine with that:

 "We've never had a very good and well-defined birthday and I'm more than happy to just have the party continue for six weeks because the first time it was publicly talked about an announcement per se, the code wasn't ready, and then when I did the first code drop, which was September 17, I still didn't think it was quite ready enough. But I had promised some people that I will make it available so I made it available but didn't announce it publicly. And then the next code drop was the one that I now hold so there's like this six-week period of wild partying going on every year when the anniversary comes up because the birthdays just spread out."

What did he expect to happen once Linux was out in the wild? It certainly wasn't for it to become the world's dominant server, device, and cloud operating system. 

Torvalds remembered, "I was at university, but it was never a university project. So I didn't really talk to anybody about it, except for five people I emailed about the 0.01 release." He told them, "Hey, I put it up like I promised." And that was that. 

He explained, "I was 21 years old. I'd been programming for about half my life already. I expected it to be yet another of these projects where I do something interesting for the programming, and then it gets useful enough that you kind of see that, hey, I did something. And then you find a different project to go move on to because I mean, you've proven your project. ... and it's done enough that it's not interesting anymore." 

Of course, that isn't how it worked out. That's when, Torvalds admitted, "open source changed everything. Suddenly, this project that I probably would have left behind if it was only up to me, I started getting questions about and, and eventually patches, and that just kept the motivation going. And here we are 30 years later. And it's still what keeps the motivation going. Because, as far as I'm concerned, it's been done for 29 of those 30 years. And every single feature ever since has been about things that other people needed or wanted or were interested in."

Hohndel recalled, " I remember when I sent you my first patches after 0.11 came out, you would rewrite all my patches. So, you would absolutely not take code from people like me. He would look at the code and then implemented it the right way. And thankfully, at some point, you stopped doing that."

Torvalds explained, "It is really hard to start taking patches from other people because they're not quite to, I wouldn't say your standards, but they're not what you're used to. So for the first three or four months of people actually sending me patches, I would look at the patches, and I would read the patches just to understand what they wanted done. And then I would rewrite the code entirely."

That was, needless to say, a lot of work. Too much work. Today, Torvalds confessed, "I might have continued doing that for much too long. But I'm fundamentally lazy. And at some point, I just decided this is stupid." So, he "just started applying patches, which actually makes everybody so much happier, because it's very frustrating as a developer, to send patches upstream, and then have the upstream maintainer basically throw your patch away, and then rewrite it. And you go like, what am I chopped liver?"

Torvalds then realized this wasn't "good for the community. So it's very important for the maintainer to just relax a bit and say, 'Okay, I'm not this control freak person.' And I actually want to spend my time on other things than rewriting other people's patches."

Hohndel added, "There was one of those hilarious moments when I sent him a patch. And he responded back and said, 'this doesn't work.' And I foolishly said, 'Did you try it?' And he said, No, I read it. Okay, cool." Since Hohndel has been a contributor to Linux since late 1991, clearly he was cool with it. 

From there, Torvalds got his first job. He recalled, "One of the things that Linux did for me was I learned about all the computer architecture and features of the 386." He also got all these connections to other people through Linux. And there turned out to be a small startup company [Transmeta] in Silicon Valley, which was making a clone 386 chip [Crusoe]. I was one of the fairly small number of people who actually understands how the 386 really works. A lot of people kind of know how it works. But a lot of people don't understand how it works at a very low level, outside of maybe Intel."

So, even though he hadn't finished his studies yet, Torvalds flew out to the Bay Area in 1997 and got a job offer. That "was wonderful," Torvalds said, "because that's the only thing that actually got me to stop procrastinating and write my thesis and, and get my paperwork in order so that I could move to the US."

Unfortunately, while Crusoe was technically a success, Transmeta wasn't able to monetize the chip. 

In the meantime, though, Torvalds realized he didn't fit into Silicon Valley tech culture where "everybody else around me, switched companies every three years."  He said, "I'm the kind of person who is boring and just wants to do one thing. And I'm a one-track mind." And that track was largely Linux. 

So, in 2004, Torvalds left Transmeta to join the Open Source Development Lab (OSDL), a precursor to the Linux Foundation. There he would devote almost all his time to Linux.

That's fine by Torvalds. Along the way, he's made many good friends. In particular, he said, "I'm very proud of the fact that there's actually a fair number of people still involved with the kernel that came in in 1991. I mean, literally 30 years ago. I mean, Dirk is one of them. But considering how few people we were back then, the fact that we still have a handful of people that I can say, 'Yeah, he was, he was there before Linux was really even Linux.' I think that's a testament to how good the community, on the whole, has been. And how much fun it has been."

Linux turns 30: The biggest events in its history so far

Torvalds also talked about how Rust is making its way into Linux. Hohndel introduced the subject, saying, "I was really intrigued by this idea of Rust kernel modules because Rust is the golden pet project of so many people with a security focus. I was very surprised to see how someone like you who is very much a through-and-through C programmer was to this idea of introducing Rust modules to the kernel."

Torvalds answered, "I think C is a great language. To me, it's really a way to control the hardware at a fairly low level." That said, "it is so close to the hardware that you can do anything with it. It is dangerous. It's like juggling chainsaws. I also see that it does have a lot of pitfalls and they're easy to overlook. And in a kernel, that's not always a good thing. It's good when it comes to things like low-level memory management, where you're literally setting up the virtual memory map for a process. But, in many other situations, you don't want it. Rust was the first language I saw which looked like this might actually be a solution to the other part of the problem, not the control of the machine at the lowest possible level so that you can read the machine code and match it up with the C code. But to the problem where you just want to get the job done of writing a driver or a file system."

At that level, it's much safer to create drivers, file systems, and routines with Rust. That said, Torvalds reminded everyone that while "people have been talking about Rust in the kernel for the longest time and it's not done yet." It's coming though. "We'll probably see some modules next year being written in Rust, and maybe being integrated into the mainline kernel."

The pair concluded their conversion with Torvalds hoping that the next Linux Foundation Open Source Summit could be held in Fiji. Linux Foundation executive director Jim Zemlin suggested that they pay for this by taking the 1991 email, making an NFT [non-fungible token] of it, and auction it off. An amused and appalled Torvalds replied, "I'm staying out of the whole craziness with crypto and NFTs. Those people are cuckoo!"

Related Stories:

  • Linux turns 30: Linus Torvalds on his "just a hobby" operating system
  • AWS introduces Bottlerocket: A Rust language-oriented Linux for containers
  • Programming languages: Now Rust project looks for a way into the Linux kernel

Linux

The best Linux laptops for consumers and developersWant to save your aging computer? Try these 5 Linux distributionsThe best distros for beginnersHow to enable Linux on your Chromebook (and why you should)
  • The best Linux laptops for consumers and developers
  • Want to save your aging computer? Try these 5 Linux distributions
  • The best distros for beginners
  • How to enable Linux on your Chromebook (and why you should)

tag-icon Горячие метки: По вопросам бизнеса Программное обеспечение предприятия

Copyright © 2014-2024 Hi-Network.com | HAILIAN TECHNOLOGY CO., LIMITED | All Rights Reserved.