Slashdot Mirror


Linus Torvalds Will Answer Your Questions

Linus Torvalds was (and still is) the primary force behind the development of the Linux kernel, and since you are reading Slashdot, you already knew that. Mr. Torvalds has agreed to answer any questions you may have about the direction of software, his thoughts on politics, winning the Millenial Technology Prize, or anything else. Ask as many questions as you'd like, but please keep them to one per post. We'll send the best to Linus, and post his answers when we get them back. Remember to keep an eye out for the rest of our upcoming special interviews this month.

46 of 460 comments (clear)

  1. The Absolute Death of Software Copyright? by eldavojohn · · Score: 3, Interesting

    Recently you spoke out about software patents and the patent process. But I was interested in what you said about how "nasty" copyright issues could get. You use SCO as the obvious nightmare case but what about violations against open source licenses like the GPLv3? Would you care if someone forked the Linux kernel and made major modifications to it and started selling it without releasing the code to the customers? What does your ideal situation look like for open source and commercial closed source? Would you just copy the Finnish model and aren't you afraid American experts are just as daft as American juries?

    --
    My work here is dung.
    1. Re:The Absolute Death of Software Copyright? by Anonymous Coward · · Score: 4, Funny

      Linus: What's your tool of choice for giving eldavojohn the severe beatdown he deserves?

    2. Re:The Absolute Death of Software Copyright? by hairyfeet · · Score: 5, Interesting

      That sounds like a question more for Perens than for Torvalds.

      My question for Torvalds would be thus: Now that all mainstream OSes other than yours, BSD, Solaris, OSX, Windows, have a stable ABI to help make sure that drivers continue to work why do you think your way is better than all those other OSes? How can the kernel devs do QA and QC for tens of thousands of drivers when there are so few of you, so many drivers, and such a hectic release schedule? Why is an ABI such a bad thing when it seems to work for everybody else? If it is because you hope to use lack of an ABI to force drivers to be open what do you say to the fact that the most stable graphics driver in Linux is Nvidia, who is closed?

      If you are gonna ask the man questions don't play pattycake and throw softballs, give him the hard ones. While I'm sure to be modded down for asking the hard questions and I doubt anybody would have had the guts to ask him I for one would have liked to have seen if he had a truly legitimate answer or if it would have boiled down to dogma or "If things are stable then i can't tweak all I want" instead of having a legitimate programming reason why he thinks his design is better than everyone else on the planet.

      --
      ACs don't waste your time replying, your posts are never seen by me.
    3. Re:The Absolute Death of Software Copyright? by nschubach · · Score: 3, Funny

      Haiku, ReactOS ... you know, mainstream.

      --
      Every time I start to have faith in humanity, I ruin it by driving to work between 7 and 8 am.
  2. Your 2007 Comments on C++ by eldavojohn · · Score: 5, Interesting

    In 2007 you made some rather polarizing remarks about C++. Coincidentally, Slashdot absolutely loves language wars and I seem to only find evidence that you use C based on the lack of malice and contempt I can find you publicizing on it. Do you find anything terrible about C? Conversely, do you have anything nice to say bout C++, Java, Ruby, Perl, JavaScript, Lisp, Prolog, Microsoft's languages or any other language you feel particularly vehement about at the moment?

    --
    My work here is dung.
    1. Re:Your 2007 Comments on C++ by i_ate_god · · Score: 5, Funny

      what about PHP?

      --
      I'm god, but it's a bit of a drag really...
    2. Re:Your 2007 Comments on C++ by Kjella · · Score: 3, Insightful

      You want Linus to do a book project?

      --
      Live today, because you never know what tomorrow brings
    3. Re:Your 2007 Comments on C++ by betterunixthanunix · · Score: 3, Informative

      his knowledge of C++ seems to centre around 25 year old information

      Not really. C++11 is as bad as C++98; for every problem C++98 has that C++11 solves, C++11 introduces some other problem. C++ actually has more problems than C, which is where Torvalds is spot on (he is wrong, though, in saying that C is the only sane choice for anything).

      The problem with C++ is that the standard allows programmers to do things that cannot make sense at all. What is "undefined" in C is often "a total disaster, waiting to attack you like Jack the Ripper" in C++. Here, for example, is a C function with undefined behavior:

      int f(void){}

      See, it says it will return an int, but has no return statements; thus the behavior is undefined. Now, here is a C++ version that will crash your program if you are lucky, but which might actually not crash your program:

      std::string f(void){}

      See, this time, the compiler is going to try to copy and then destroy the object the function returns. The problem is that such an object is not created, and so whatever the compiler generates will be guaranteed to do something you do not want. This might crash immediately when you call the function; it might call a destructor for some unrelated object; it might even call a member function that is not a destructor, for some object of a totally different type, and you will have no idea why your data is being corrupted until you find that one line (this is made worse by the fact that most C++ programmers will start the debugging process by checking for dangling pointers when data is being corrupted for no apparent reason, yet the offending code has no pointers).

      Of course, everyone knows that you are supposed to use a compiler that either forbids this (but the standard doesn't) or turn on warnings so that your compiler will flag it (but it might not). This is the problem with learning C++: rather than learning how to use its features, you really need to learn how not to use its features, and also how to use your compiler's optional features (so much for portability). This is loosely connected to learning C, except that in C you can do OK even if you do not know the "oral tradition" about what should never be done.

      Note that this is as true in C++11 as it was in C++98, and C++11 even lets you do things that are even worse. Look at this:

      std::function f(void)
      {
      int i = 0;
      return [&](){return i++;};
      }

      This looks like what I wanted to do: create a lexical closure that increments a counter every time it is called. What this actually does is to screw up everything, because as we all know, you were supposed to use a smart pointer and capture by value. Once again, we see that the language allows you to do something that cannot make sense, and does not force you to do "what everyone knows you are supposed to do."

      So, yes, Torvalds was right about C++. Now, C is probably the wrong choice for everything that is not the lowest level of kernel code, but at least the list of "bad things you should never do" in C is concise and mostly clear to someone who understands the abstractions presented by the language. In C++, that list is not concise, it is not obvious even to experts (example: never allow exceptions to propagate out of constructors, which is usually news even to people who know about exceptions and destructors).

      I would like to hear Torvalds' opinion on higher level languages and the model used by Emacs: a small core written in C that includes a compiler for a high level language, with the rest written in that high level language.

      --
      Palm trees and 8
    4. Re:Your 2007 Comments on C++ by Anonymous Coward · · Score: 5, Interesting

      This site you link to is mostly gibberish. Linus is more concise and a much better writer.

      This author views it as a logical fallacy for Linus to say that C++ is terrible because terrible programmers use it. I think to call that a "logical fallacy" misses the point - the point that in practice, it's actually true.

      The idea that criticism of common practice in the C++ community comes from ignorance is also kind of amusing. I'm no stranger to C++ personally, there are things that are great about it. I dig that templates can generate good machine code while still allowing generics at the source code level (much better performance than doing generics with function pointers and void*, like libc's qsort for example). I think RAII is great and it's interesting that the technique replicates some of the practices I already do in my C code, but with less room for programmer error. That's all good. I'm a fan of some of what C++11 brings to the table, lambdas are nice, it's good to have the whole "move semantics" to fix those annoying issues with copy constructors getting called more than they ought to.

      At the same time in my career I haven't worked with any programmers who understand these points and what they mean. I mean, I know that the "good" C++ programmers are somewhere, I see them occasionally make intelligent points on forums or hear them give talks about C++11. But I never seem to work with these people. Instead what I get are either (1) people writing C++ with a Java accent, or (2) people writing C++ with a C accent. In both cases they tend to do this poorly. The results are pretty crap to work with.

      Yes there is bad C code out there, like there is bad code in every language. The mplayer example is fair. But I don't think that's as fundamental to the language as inefficient use of STL is. How many times have you seen a programmer introduce tons of heap allocations or copies without realizing it, due to un-careful use of STL? That's a problem that C has a lot less of. Sticking to a simple language to avoid those issues doesn't seem that unreasonable to me, especially in a development model where people contribute from all over, and being able to quickly audit for bad practices is important.

    5. Re:Your 2007 Comments on C++ by Anonymous Coward · · Score: 4, Insightful

      This is remarkably stupid. Your argument about return values is literally the same thing in C. Your program is just as prone to crash if you return garbage instead of a char pointer. You just hid that by using an int instead, which could also crash if you use the int somewhere where its validity is important. C or C++, you should just use -Wall -Wfatal-errors.

      For the record, Linus was obviously performing his usual exaggeration routine to get his point across, just like "NVIDIA... Fuck you" and several other remarks that make him notorious.

    6. Re:Your 2007 Comments on C++ by UnknownSoldier · · Score: 3, Informative

      That letter *completely* misses the point Linus was making.

      * C _forces_ a programmer to _always_ be thinking about efficiency.

      * C++ _allows_ programmers to be _sloppy_ and not even bother to _think_ about efficiency.

      When you have idiots calling a virtual function inside an inner loop because they don't know how a virtual function is _implemented_ that is PRECISELY the type of programmer Linus says is a crap programmer because they have never learnt the 0th rule of programming: TINSTAAFL

      There Is No Such Things As A Free Lunch

      Yes, C can be tedious, but it encourages a certain mindset. The GREAT programmer is always thinking about the high level theory AND the low level implementation. That is a more _balanced_ programmer then one who doesn't understand how to write atoi() and itoa() (aka printf) which is the typical C++ programmer.

      The STL is a great example of the "rebuttal" completely ignorant of real-world needs.

      The API _design_ of the STL is great because it is orthogonal and consistent. However STL is total crap when you need to :

      - debug a container
      - serialize and unserialize it in a FAST and PORTABLE manner

      Part of the problem is that C++ compilers are crap and put out verbose messages because they can't output a simple, short type alias.
      When you have tools like "An STL Error Message Decryptor for C++" you know your language _design_ AND _implementation_ is FUCKED. Sadly the C++ community doesn't have the balls to be honest and admit their ego is out of control. "OK, We screwed up in certain areas of the language. How could we simply the grammar and language for people _using_ the language AND people _implementing_ the language?"
      http://www.bdsoft.com/tools/stlfilt.html

      _That_ is why Linus says STL is crap. Programmers start using C++ features without thinking about the _consequences_. A hard-core C programmer will go "OK, this looks like a great design -- where are the areas where it excels in, and where are the areas where it sucks in?" In C you are locked into someone else's bad design.

      To prove my point: WHY do you think EA (Electronic Arts) invented their OWN version of STL for game programming? Because the standard C++ STL has several KEY DESIGN FLAWS. Ignoring them doesn't make it go away!
      http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2271.html

      C++11 _finally_ got Move Semantics. Gee, we've only had to deal with _that_ problem for the past 20 years. Typical over-engineer design-by-committee C++ ignoring real-world (performance) problems.

      In closing, there are 2 points I'd like to make:

      The *best* programmer is one who balances the simplicity of C with the features of C++; on that I agree that Linus is incorrect. Sadly you can't disable all the crap in C++. Linus' only _pragmatic_ solution was to ban the language outright. His project, his call.

      and

      The author(s) of the rebuttal need to put up or shut up -- when they have shipped their own kernel THEN they will have earned the right to disagree with Linus.

      Hope this provides a little more insight into why C and C++ both suck. ;-/

    7. Re:Your 2007 Comments on C++ by betterunixthanunix · · Score: 3, Insightful

      Your program is just as prone to crash if you return garbage instead of a char pointer

      Unless you discard the return value. For example:

      char * f(void){
      if(some_condition) return "Some string";
      }

      /* ... */
      if(some_condition) printf("%s\n", f());
      else f();

      Sure, this is horrible code, but it won't crash. The equivalent C++ code will crash whenever some_condition is false, because it still expects to have an object to destroy.

      you should just use -Wall -Wfatal-errors.

      1. If everyone should use that, then those should be in the standard.
      2. That is "folklore" -- it is not standardized, it is just something every C++ programmer is "supposed to know."
      --
      Palm trees and 8
  3. A Helsinki Finn in King Dubya's Court by eldavojohn · · Score: 5, Interesting

    Despite your accomplishments and some of your public comments about the dire state of American politics, you remain a resident of the United States of America. Clearly you have the clout to live where you please, why do you continue to reside in the United States? Assuming your answer is simply "work", if there was one thing you could change in the United States what would it be and are you doing anything to move toward that accomplishment (aside from procreating and trying to help us out that way)?

    --
    My work here is dung.
  4. When I'm designing a processor for Linux.... by Art+Popp · · Score: 5, Interesting

    I spend some time designing things in Verilog and trying to read other people's source code at opencores.org, and I recall you did some work at Transmeta. For some time I've had a list of instructions that could be added to processsors that would be drastically speed up common functions, and SSE 4.2 includes some of my favorites, the dqword string comparision instructions. So...

    What are your ideas for instrructions that you've always thought should be handled by the processor, but never seen implemented?

  5. Books, Books, Books by eldavojohn · · Score: 5, Interesting

    As a software developer, I have a coveted collection of books. A few of said tomes -- both fiction and non -- have fundamentally altered the course of my life. Assuming yours aren't just man pages and .txt files, what are they?

    --
    My work here is dung.
  6. The End by eldavojohn · · Score: 4, Interesting

    Describe the end of the Linux kernel. Symbolically and/or literally, your choice.

    --
    My work here is dung.
    1. Re:The End by Narnie · · Score: 5, Interesting

      Speaking of ends, one day you'll pass on your duties. How do you envision the kernel and the Linux ecosystem after passing your reigns?

      --
      greed@All_Evils:~#
  7. Aging and low-level programming... by jasno · · Score: 5, Interesting

    Hi Linus! Thanks for everything!

    How has getting older and raising a family changed the way you look at kernel work and programming in general? Do you see yourself still being involved in the kernel in 20 years? Do you ever just want to take a break for a few years, or do you feel like your time working on the kernel is a rest from the real world?

    --

    http://www.masturbateforpeace.com/
  8. Avoiding the Unix Wars by dkleinsc · · Score: 5, Interesting

    Why do you think Linux has been able to (mostly) avoid the fragmentation that plagued the competing Unixes of the 1980's? What would you say helps keep Linux a unified project rather than more forked system like BSD?

    --
    I am officially gone from /. Long live http://www.soylentnews.com/
  9. general-purpose computing by Type44Q · · Score: 5, Interesting
    Linus, what are your thoughts re: the coming war on general-purpose computing?

    PS: Thank you for everything you've done, and continue to do (the world is actually full of heroes but the vast majority of them - at least in this day and age - have limited spheres of influence. You on the other hand...) ;)

  10. steam by Anonymous Coward · · Score: 3, Interesting

    How do you feel about steam coming to linux? one of my friends is actually the one working on porting it.

  11. The obvious question: the binary blobs in linux by Anonymous Coward · · Score: 4, Insightful

    What is his stance on the subject today and why did he allow them in the first place? When will he kick them out?

  12. Frustrations by Bogtha · · Score: 4, Interesting

    What frustrates you most in the GNU/Linux ecosystem?

    --
    Bogtha Bogtha Bogtha
    1. Re:Frustrations by Alter_3d · · Score: 3, Insightful

      What frustrates you most in the GNU/Linux ecosystem?

      I can answer that for him.

      People who insist on using the name GNU/Linux
      Naming controversy wars!!

  13. Stallman ahoy by javipas · · Score: 4, Funny

    What would you ask to Richard Stallman if you had to interview him? :)

  14. OS challenges for the next 20 years? by Anonymous Coward · · Score: 4, Interesting

    Hi, Linus. Thank you for your amazing work! I'm wondering what you think the big challenges will be in OS design for the next 20 years.

  15. What would you have done differently? by Rob+Kaper · · Score: 4, Interesting

    It's been over twenty years since the inception of Linux. With 20/20 hindsight, what you have done differently if you had had today's knowledge and experience back in the early days?

  16. Any wisdom for students and early-career techies? by davidwr · · Score: 5, Interesting

    If you could give one piece of technical advice and one piece of non-technical advice to students seeking a technical career and/or early-career tech professionals, what would it be?

    --
    Knowledge is how to play a game, intelligence is how to win, wisdom is knowing what game to play.
  17. OT: Everyone should be able to mod this by davidwr · · Score: 3, Interesting

    Every registered with halfway decent karma should get several free mod points for Q&A threads like this.

    --
    Knowledge is how to play a game, intelligence is how to win, wisdom is knowing what game to play.
  18. Cooles by needs2bfree · · Score: 5, Interesting

    What is the coolest thing that you have heard of people doing with Linux recently?

  19. Monolithic vs. Micro-kernel architecture by NoNeeeed · · Score: 5, Interesting

    Has there ever been a time in the development of the Linux Kernel where you've wished you'd gone the Hurd-style micro-kernel route espoused by the like of Tannenbaum, or do you feel that from an architectural standpoint Linux has benefitted from having a monolithic design?

    Linux has been massively more successful than Hurd, but I wonder how much of that is down to intrinsic technical superiority of its approach, and how much to the lack of a central driving force supported by a community of committed developers? It always seemed like the Hurd model should have allowed more people to be involved, but that has never seemed to be the case.

  20. Requirements and Design in Linux by Anonymous Coward · · Score: 3, Interesting

    You've said many times that not having a specific direction or goal for Linux has been a huge advantage and is the main reason it's flexible enough to run on everything from smart phones to super computers. Do you believe that this is a philosophy suited to all projects or is it unique to the kernel? How do the requirements and design phases with formal planning fit into the open source model?

  21. Joker question by Coeurderoy · · Score: 4, Interesting

    What question was not asked or not transmitted to you and you'd really wish it was so that you can answer it ?

  22. GIT by vlm · · Score: 5, Interesting

    If you had to do GIT over again, what, if anything, would you change?
    VERY closely related question, do you like the git-flow project and would you think about pulling that into mainline or not?

    --
    "Science flies us to the moon. Religion flies us into buildings." - Victor Stenger
  23. Android by Jacek+Poplawski · · Score: 5, Interesting

    What is your current opinion on Android? Do you consider Android as a "Linux", "Linux type" or "Linux child"? Are you connected somehow with Android development?

  24. The year of Linux on the desktop by bit+trollent · · Score: 3, Funny

    What do you think will be the year of Linux on the desktop?

  25. What would get you to move to the GPLv3 (or 4)? by gQuigs · · Score: 3, Interesting

    I understand that you are completely fine with Tivoization (in that you don't want a license to restrict that), but the GPLv3 does do some other important things. As a user, I really like ending Tivoization, but I understand your position.

    More compatible with Apache and other licenses
    New ways to provide source (torrenting, the internet)
    Better path to compliance (if someone doesn't initially)
    Much stronger patent language

    More here: http://www.gnu.org/licenses/quick-guide-gplv3.html

  26. favorite hack by vlm · · Score: 5, Interesting

    I asked a bunch of hard architecture questions, now for a softball Q. Your favorite hack WRT kernel internals and kernel programming in general. drivers, innards, I don't care which. The kind of thing where you took a look at the code and go 'holy cow thats cool' or whatever. You define favorite, hack, and kernel. Just wanting to kick back and hear a story about cool code.

    --
    "Science flies us to the moon. Religion flies us into buildings." - Victor Stenger
  27. BK & Git by A.K.A_Magnet · · Score: 4, Interesting

    You were 'forced' to start working on Git as a result of Jeremy Allison's reverse engineering of the BitKeeper protocol and Larry McVoy's hostile reaction.

    At first you weren't too enchanted about the waste of time having to write your own DVSC system from scratch for lack of acceptable alternatives. I remember you complaining about that work preventing you to progress on the kernel.

    Now Git is becoming the de-facto tool for source control management in most F/OSS communities and inside companies. That's another very successful project you fathered, and while I guess Mercurial or other projects would have existed anyway, the usage of Git on the kernel has demonstrated its reliability and its performance and traction have made DVCS'es gain visibility and market in no time.

    Here come the questions:

    * Are there any features you still miss from BK?
    * As a happy Git user, I thank Jeremy Allison for his refusal to accept compromise and his tentative to create a Free BK client and I thank you for your refusal to accept a technically inferior/ill-suited solution like SVN. How do you reflect on this?

  28. What would it take to make Linux mainstream? by copb.phoenix · · Score: 3, Interesting

    What do you believe it would take to make Linux a mainstream OS on the conventional consumer desktop? We've already seen broad enough server adoption to not have to worry about being seen there and mobile is good with Android (albeit often not realized by consumers)... So how do we get desktops finally claimed? ... Or have we missed that boat long, long ago?

  29. If you could start over again what would you do? by Vellmont · · Score: 4, Interesting

    The Linux kernel has now been developed for more than 20 years, and is in ways now part of "the establishment" since it now runs on everything from consumer televisions to mass-marketed phones.

    If you could start something entirely new, or go back and do it all over again, what would you do? You've made comments in the past about disliking visualization, since getting close to the hardware was what attracted you to the kernel. So this question is largely about what you see as the next radical change at the kernel level might happen over the next 20 years, if anything.

    --
    AccountKiller
  30. Simple: Microsoft by ThatsNotPudding · · Score: 5, Interesting

    Tell me how can we defeat UEFI and 'Windows Only' ARM devices?

  31. How do you deal with burn-out? by kallisti5 · · Score: 5, Interesting

    You must of been burned out on Linux kernel development multiple-times over by now... how do you deal with it?

  32. Finland / United States by void*p · · Score: 4, Interesting

    Kind of a political question: I've always wanted to ask if you think your life would have gone differently had you grown up in the U.S. with similar means. Are there things about life in Finland (politically, socially, economically) that you feel made it more or less possible for you to pursue your interests and eventually develop an O.S. kernel?

  33. Exact time of your birth by fotoguzzi · · Score: 3, Interesting

    Hello, Linus, Do you know the time-of-day of your birth? This would fulfill a nerdly need to contemplate by how many seconds you predate the UNIX Epoch. Thanks.

    --
    Their they're doing there hair.
  34. How do you stay organized? by twistedcubic · · Score: 4, Interesting

    Do you keep a to-do list on paper, on a computer, or do something else?