Slashdot Mirror


Entertaining Bits From The Ancient Kernel Tree

option8 writes "I have added a page of some of the miscellaneous comments that appear in the Linux Kernel, version 0.01 (ca. August, 1991). Linus turns out to be quite the jokester, leaving all kinds of non-sequiturs and irreverent one-liners in the code, many of which survive today in the latest developmental releases. I thought to archive these and share with those people who aren't the types who go diving through ten year (gasp!) old code for kicks. Enjoy."

23 of 171 comments (clear)

  1. Pope hating by jidar · · Score: 3

    /*
    * PS. I hate whoever though up the year 1970 - couldn't they have gotten
    * a leap-year instead? I also hate Gregorius, pope or no. I'm grumpy.
    */

    This cracks me up. He even hates the Pope, :)

    seriously, this is probably going to end up in some news article some day;

    This just in...
    "Linux created by Pope hater! OS of Satan!"

    Of coarse I guess we would have to fight with Microsoft for the "OS of Satan" title...

    --
    Sigs are awesome huh?
  2. Colorful Comments by artdodge · · Score: 3
    DaveM is notorious for his comments in the TCP/IP stack. Look especially through the 1.3.X and 2.1.X patches for some tasty examples. "Fscking Sun blows goats" has shown up a few times, if I remember correctly.

    You can also search the linux-kernel mailing list archives for some lively debates about "cleaning up the language in the kernel source"...

  3. Re:As far as finding the Rainbow series online.... by jpatokal · · Score: 3
    "Department Of Defense Trusted Computer System Evaluation Criteria" ("Orange Book"), 12/85 I knew the Orange book was online... if I ever find the others I'll let you know.

    There are many Color X Books out there, the original poster was referring to the particular Orange Book that defines (one of) the standards for CD(-ROM?) encoding.

    Cheers,

    -j.

  4. Slightly offtopic but... by seizer · · Score: 5

    Did anyone see that someone posted the incomplete source to COMMAND.COM way back?

    http://slashdot.org/co mments.pl?sid=00/06/08/0647212&cid=574.

    Have to love this bit:

    ; REV 1.50
    ; Some code for new 2.0 DOS, sort of HACKey. Not enough time to
    ; do it right.


    --Remove SPAM from my address to mail me

  5. Sort of eerie by Red+Moose · · Score: 5
    It's a bit eerie reading that (c) 1991 Linus Torvalds, almost a decade ago.

    Think about, Win32 didn't exist, and IBM didn't know MS were going to screw them over with OS/2. Amiga were fighting with Atari.

    The Gulf War was on...threats of bombing and the stealth plane made it's debut.

    Slashdot didn't exist. Heck, Tim Lee was thinking maybe Hypertext mught be a cool way to store his university notes, thus was born the web.

    Usenet didn't contain thousands of porn pictures, BBS systems were alive and well.

    Sort of wierd, that unknown to all the mainstream and even tech groups Linus + some people were working on the only OS that would ever threaten Microsoft.....that Microsoft would even *need* threatening.

    And still 10 years later, MacOS still is cludgy and can't multitask....I suppose some things just don't change.

    --

    Acting stupid isn't much fun when there's someone around who knows better

  6. That's a classic by bandicoot · · Score: 3

    "For those with more memory than 8 Mb - tough luck. I've not got it, why should you."
    -- Linus Torvalds, 1991

    "Nobody will ever need more than 640k RAM!"
    -- Bill Gates, 1981

    So who's the bigger idiot?

  7. POSIX wanted money for a *standard* by Black+Perl · · Score: 3
    From Linus' comments:

    * Hopefully these are posix or something. I wouldn't know (and posix
    * isn't telling me - they want $$$ for their f***ing standard).

    POSIX wanted money for a standard. That's fascinating. How did they think a standard was going to catch on if they charged people to just *see* it?

    I guess it's a telltale sign of the mindset of the Unix community in the early 90's. Charge an arm and a leg for everything. Some of the stragglers are still just breaking free of that mindset (Motif comes to mind).

    --
    bp
    1. Re:POSIX wanted money for a *standard* by Pieter-Bas · · Score: 4
      Most standards are confidential. Licenses are being sold. Many of them have no problem catching on at all. Examples:

      • CD (Orange, Green, Red book) are all still secret. You can not find them on internet
      • DVD + Next.Gen. DVD (Confidential standards. Kept a (trade) secret by the DVD Forum!)
      • Dolby AC3 Digital Audio [And with it all Dolby sandards]
      • ISO9660 (for some time, it's ECMA119 now and downloadable for free, but ISO charge[sd] about $1000 for it)
      • MacroVision (though I don't think it would have caught on in the Open Source world :) )
      • FAT32 and NTFS (eeeh... well...)
      By the way, compact casette was also a confidential standard until Philips decided to give it away for free to gain more market...

      And these are just the standards I could think of in a second. I think more 'standards' are secret and have to be paid for than one would think.

      --
      Common sense is not so common - Voltaire
  8. Re:The value of a manual by Enahs · · Score: 3

    Ahhh...no, don't have a CoCo, but I *do* have an old 1000 EX (cruddy, not as open...and my old DOS 2.11 disk still works. No one should need more than 360k to store their data. :^)

    Along with the old 1000 EX I have an old DMP 130 printer (don't ya love how Tandy turns acronyms into model numbers?) The manual for the printer had nearly EVERYTHING you ever needed to know about the printer. My current HP? The manual might as well be a single sheet with the words "Magic Happens. Send it back if it's broke." :^( If it weren't for companies so busy trying to protect trade secrets, we wouldn't have this problem. I suppose companies like IBM can't be blamed too severely for this attitude; my old DMP 130 rarely got switched to native mode, instead staying in ProPrinter mode. Most folks using ProPrinter drivers on their PCs, I daresay, didn't have an IBM ProPrinter. :^)

    I just wonder what would have happened if we had had the distribution power of a deregulated Internet just, say, five years earlier when computer components were more thoroughly (or at least openly) documented. We might have had a GPLed OS, freely available, a lot sooner.

    A lot of folks credit Microsoft for taking away the need for hacking your own drivers, your own interfaces for hardware. IMHO, that's just a spin of the opinion that Microsoft has pushed hardware manufacturers to produce drivers for hardware rather than documenting interfaces. Yeah, the pre-Windows DOS world was a mess. But for folks who want to use OSs like Linux, and run head-first into undocumented hardware, it's a pain.

    --
    Stating on Slashdot that I like cheese since 1997.
  9. My favorite comment by Robin+Hood · · Score: 3
    I don't know about anyone else, but the comment from sys.c was my favorite:

    /*
    * This needs some heave [sic] checking ...
    * I just haven't get the stomach for it. I also don't fully
    * understand sessions/pgrp etc. Let somebody who does explain it.
    */

    For some reason, as I was reading that comment, I saw the "I haven't got the stomach for it" part first, then I saw the "heave" checking line. In that context...

    Linus, 3 AM: Whew, that's done. I'll check it in the morning, I'm going to bed.
    Linus, 10 AM: Ugh, where's my coffee?
    Linus, 11 AM: Ahh, that's better. Now let's take a look at what I wrote last night. Yikes, that's ugly. Shouldn't have looked at that on an empty stomach... I think I'm going to be sick...
    Linus runs to the bathroom to do a little "heave" checking..
    Linus, 11:15 AM: Better write a comment to remind myself not to do that again...

    Well, that's how I pictured it anyway. :-)
    -----
    The real meaning of the GNU GPL:

    --
    The real meaning of the GNU GPL:
    "The Source will be with you... Always."
  10. I don't comment my code by goingware · · Score: 3
    I don't commend my code hardly at all, believing that if it needs comments, I haven't done my job well enough of making the code clear.

    Note that this is a distinctly different attitude than figuring you must be incompetent if you need comments in the code you're maintaining.

    Part of the reason I got to be this way is that a boss pointed out that comments are often not maintained as well as the code, and over time can actually come to be misleading. For that reason, it is best to code clearly (ie, use meaningful variable names and such).

    While this does tend to reduce the opportunity to put jokes in the source, I heard the following appeared in some pascal source written by an Apple employee:

    procedure GetDown( AndBoogie: OneMoreTime );

    Mike

    Tilting at Windmills for a Better Tomorrow
    --
    -- Could you use my software consulting serv
  11. Re:Post your own comments by DanaL · · Score: 3

    A friend of mine, while trying to update some ancient (truly ancient) Cobol code, ran across a comment that went something like...

    "I don't know what this block of code does. It seems to serve no purpose, but if I remove it, the program stops working."

    I've been waiting for my chance to borrow it :)

  12. the strangest comments i have ever seen.... by drew · · Score: 4

    a friend of mine was writing a simple assembler in Perl for a class project he was working on. the assembler consisted of two parts, the first being the preprocessor that would strip out comments and replace labels with addresses and such, and th second part being the actual assembler.

    each part worked perfectly fine by itself, but for some reason the assembler as a whole was not working. finally he was fed up enough that in the middle of the program he wrote the preprocessed assembly out to a file and then read it all back in before continuing on with the program. it worked!!! this of course made no sense whatsoever, since he was merely writing the contents of an array to a fil and reading the exact same data back in. but for some reason that made the difference in whether or not the program would run successfully.

    being rather confused at this point, he commented out the lines that he had just added to the program and ran it again. lo and behold, it still worked. but when he rmoved those lines entirely, it stopped working.

    in the end, he turned in the project with the code in the middle still in place, commented out, preceded with a comment about how utterly strange it was and a warning that the commented code should not be removed for any reason...

    only time i've ever seen comments affect the actuall execution of a program.....

    --
    If I don't put anything here, will anyone recognize me anymore?
  13. You're misreading... by slothbait · · Score: 3

    I'm pretty sure that Linus isn't implying that this code will *never* need to be changed in subsequent versions. Rather, these are comments intended for the original small circle of people who downloaded Linux v0.1 (the first public release).

    Those guys were all hard-core hackers too. They didn't just download, untar and make, they got into the guts and tweaked, often to customize the kernel for *their* hardware. Remember the comment about > 8 MB of memory? Linux 0.1 was written for *Linus's* 386. Not i386. He was hacking on the only box he had, and he expected that others would have to tweak the kernel to get it to work well on their boxes.

    With this on everyone's minds, Linus put in this comment saying that he felt this portion of code was better tuned and more scalable than most of the kernel, and so users of v0.1 probably wouldn't need to get their hands dirty in it.

    Recall back then this stuff was all for the personal use of a few hackers. When they tweaked the kernel for their particular hardware, they would submit those tweaks to be folded into Linus's code and only *then* did Linux start to expand from "only running on Linus's PC".

    --Lenny

  14. Re:What else do you all put into your code? by Nagash · · Score: 5

    I put this in an assignment for an Artificial Intelligence course. It was a Java applet that implemented the A-star search algorithm that we had to modify. The code was pure garbage, and the teaching assistant that marked it was also the one who picked it off the web in order for us to modify it. I was not amused. So, I stated my position in a rather forward manner...


    // what the hell is with this magic number crap?
    // /me slaps original programmer around with a hammer.

    ...

    // This is a butt ugly hack, but given the utterly shit
    // code that surrounds it, it should feel right at home.

    ...

    // I don't know why I had to set a number to tell me what
    // finishCell to use, but I did. I simply do not have the
    // time to wade my way through this crap program to figure it
    // out. I got better things to do, like pull my fingernails
    // out and then bathe my hand in lye.

    ...

    // I added this awful, awful hack. I am ashamed to have written code like this.


    I also wrote a letter to the prof and TA on behalf of the other multitudes of students who thought the same thing I did. Needless to say, I got a bad mark (didn't care anyway) and the TA hates me now. Turns out they really do read the comments! =)

    Woz

  15. "magic happens" by Malk-a-mite · · Score: 3
    " /* I know - shouldn't do this, but .. */ "

    I feel better now, these words have gotten me in more trouble than anything else.

    Malk-a-mite

  16. Comments are a time capsule. by Mija+Cat · · Score: 4

    Comments in code are like a time capsule, from one programmer to another. They communicate what the code does, but also the mood of the author.

    My first coding job was cleaning and adding "improvements" to some anchient and nasty C code.
    Some of the comments described the previous programmers' marital problems, opinions on co-workers, etc.
    It made a sucky job more bearable.

    Meow!

    --
    Yes, that's really my e-mail. Don't change a thing.
  17. this is a dumb comment i knew someone would make by Hollins · · Score: 5

    Why didn't you post Linus' entire comment?

    For those with more memory than 8 Mb - tough luck. I've
    * not got it, why should you :-) The source is here. Change
    * it. (Seriously - it shouldn't be too difficult. Mostly
    * change some constants etc. I left it at 8Mb, as my machine
    * even cannot be extended past that (ok, but it was cheap :-)
    * I've tried to show which constants to change by having
    * some kind of marker at them (search for "8Mb"), but I
    * won't guarantee that's all :-( )

    Bill Gates didn't include source code and encourage others to change it. He wasn't saying it in jest, and he was not referring to an Alpha release.

    All this making you the bigger idiot.

  18. Can Someone Answer This.... by Carnage4Life · · Score: 5

    from sched.c:

    /*
    * 'schedule()' is the scheduler function. This is GOOD CODE! There
    * probably won't be any reason to change this, as it should work well
    * in all circumstances (ie gives IO-bound processes good response etc).

    Okay can anyone tell me how many times they have thought the exact same thing about their only for somebody else to suggest a scenario or even worse use it "improperly" and find a bug. I think I'm up to several dozen times... :-)


  19. The value of a manual by Woodmeister · · Score: 3
    ...snip...

    /*Don't know why, and I haven't tested it on a drive with
    * more than 8 heads, but that is what the bios-listings seem to imply. I
    * just love not having a manual.

    */

    Tell me about it. One of the things I used to love about purchasing computer parts years ago were the schematics, programming info, etc.....

    I used to own a Tandy Color Computer 3 years ago, and it was quite the little workhorse. Small, very modular (tho this was problem if you had floppy,HD,RS-232,controllers,etc... -- thing got messy), and was remarkably easy to program. It had fairly advanced HW for the time (decent MMU; better graphics than CGA and on par with EGA), and was much cheaper than an full 'IBM PC' (remember when?).

    One of the killers of this little jewel was the PC/MSDOS hedgemony (later to become Intel/Windows) of software. Many users such as myself were interested in electronics and interfacing, and we loved to use our CoCo's for neat'n'easy projects. This required us to write our own software, interface with hardware at the driver level, and do other hacks to get things to our satisfaction. When we needed to use available hardware for whatever reason, nothing beat a useful manual to help make life much easier. Nothing worse than stabbing in the dark.

    Ahh. My CoCo. I truly loved that machine. Anyone else here a former CoCo addict?
    --
    You're still using Windows?

    --

    Quando Omni Flunkus Moritati
    -Possum Lodge Motto
  20. I like this linux source comment by tap · · Score: 5

    It's from the driver for the cmd640 IDE chipset.

    * This file provides support for the advanced features and bugs
    * of IDE interfaces using the CMD Technologies 0640 IDE interface chip.
    *
    * These chips are basically fucked by design, and getting this driver
    * to work on every motherboard design that uses this screwed chip seems
    * bloody well impossible. However, we're still trying.

  21. commenting forms community by griffjon · · Score: 4

    I wonder how much this early commenting helped form the Linux programmer community and shape it's atmmosphere early on? Getting the self abasing and also highly informative comments delivered to an audience of peers (...even if you weren't a peer, it made you feel like one to read those comments)

    --
    Returned Peace Corps IT Volunteer
  22. VB 3.0 took time to execute comments by divec · · Score: 3

    While we're at it, I thought I'd point the above out. I remember calibrating delay loops by putting things like REM : REM : REM : REM : REM in. I mean, y'd expect it to cause a delay when running interpreted, but not in the compiled version. I suspect that VB "executable" files probably just had a stub at the beginning that loaded a DLL to interpret the (obfuscated?) code within the rest of the "executable".

    --

    perl -e 'fork||print for split//,"hahahaha"'