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."
/*
:)
* 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?
You can also search the linux-kernel mailing list archives for some lively debates about "cleaning up the language in the kernel source"...
It was the person from Intel who invented the 1MB limit for the i8086/88 processor.
checking for XF86VidModeQueryExtension in -lXxf86vm... yes ./config.cache
checking for mass_quantities_of_bass_ale in -lFridge... no
checking for mass_quantities_of_any_ale in -lFridge... no
Warning: No ales were found in your refrigerator.
We highly suggest that you rectify this situation immediately.
updating cache
Obviously I should have used "configure --without-ads".......
$ find
Absolutely. I actually started using the thing back when it was new, and I was so much cooler than any of the other second graders because I knew how to use a computer and they didn't. It wasn't a CoCo1, because nobody had thought that there was going to be a CoCo2 yet. I remember how exciting it was when we upgraded from 4 kB and Color Basic to 16 kB and Extended Color Basic.
The old CoCo tape "drive" also taught me the importance of backing up vital data. For those who don't know, the CoCo had a very cheesy interface that let you use your regular home tape player and audio casettes as a storage medium. Unfortunately, the results were (as you'd expect) really poor. Whenever you wrote a program that you wanted to keep, you always had to make at least 10 copies onto the damn tape because you knew that they were going to degrade like anyting and that way you had a chance to recover one copy and make 10 more.
There's no point in questioning authority if you aren't going to listen to the answers.
I don't know. I find that real comments from real code can be tremendously amusing. One of my all time favorites was:
What person that's worked to modify someone else's code hasn't felt that way at one time or another?
There's no point in questioning authority if you aren't going to listen to the answers.
ACs are on the loose!
:-)
Who dunnit?
It must have been Emmett...
My last job I had to maintain someone else's downright weird Perl - not ordinary obfuscated Perl, mind you, this was Perl written by someone who obviously grew up in Visual Basic. His comments were few and far between, and when he DID comment, it was not much more understandable than the code it accompanied.
:-)
At one point I left a comment something like this:
# Todd, please don't comment if the code is clearer without it.
Too bad he'll never see it.
~ radiographite: art by john shepard
Yeah, my first CoCo 1 had a problem with the SAM chip overheating (memory control chip; kinda like the chipset I suppose?), but then I discovered running it with the case off and that nasty silver shielding taken off exposed it to the open air, so it ran without screwing up. What was really wicked was when it did overheat. The machine rarely locked up; instead, random locations of memory would be overwritten by random values. Well, it did lock up sometimes; when a critical ROM BASIC data value was overwritten. It was neat fooling with the computer and then 20 minutes later, watching the screen go slowly berzerk and realize that there were only minutes left until I had to restart it... and lose all my program =(. Opening the case solved that and I was happy. However I fucked the thing up when I started poking at the circuits with a screwdriver, short-circuiting pins on a chip, and eventually I did it to the CPU and it went. Made me SO sad for like a couple weeks until I got a CoCo 2... whee!
the real at&t mix
Slightly amusing comments I've found in my own code:
# They painted the office today and the fumes are getting to
# me. Don't be surprised at anything you find in the code
# from here down.
In code claiming to be a "complete rewrite" from the previous version:
# This section stolen from the previous version
# I have a feeling this is very wrong.
# This code would require about eight seconds to optimize, I just haven't
# done it yet.
(I've had plenty of chances in the last 2 years to optimize that code.)
# No. I refuse to document this.
# This actually subverts some optimizations later on, but maybe it'll add up okay
# in the end.
if ($notready)
{
# Kosh: "You are not ready for immortality."
...
# Done parsing silliness.
# Let's be even bruter with the brute force.
# Stupid design? Well, that or read the main list twice.
# Yowza.
# It's a dumb idea. I will fix it. When I figure out how.
# That's poorly named.
In code that was later commented out:
# is this smart or stupid?
I must have decided later it wasn't smart...
# Now to run through the loop again. I smell an optimization coming.
# Augh! A reference!
# Let's just use the 32-bit numbers. To hell with Y2K bugs, let's go to S2B - the
# 2 billion second bug.
# There's only one universe, so no args (yet)...
# Got 'im.
# Just pretend for the moment it works.
# Nasty mean vicious nested foreach
# Whew! Several trips through the datafile later...
# This next part makes me wish I'd commented it the first time.
(Followed by uncommented code, apparently written in a hurry.)
# silliness!
# Let's GET IT ON!
# cheap-ass code to calculate days between two dates
Some code that did weird (and probably unnecessary) date calculations contained these cryptic comments:
# now has a Y1K9 bug and thus cannot be used in years before 1900.
# It also now has a year 11734883 bug - that's when (yr*366) > 2^32.
In some particularly weird code we converted to Y2K ready in 1997:
# If you need this to work past 2100, come thaw me out.
~ radiographite: art by john shepard
Then I'd say it's more like a specification, not a standard. :)
/. peeve #274: The word is neither "walla" nor "whala", it's voila. Phonics is a tool of the devil.
The whole damn thing is [AFAIK] available on the COTSE website. I saw it there the one time I browsed through it; entirely HTML, tho...no plain text
have become the core business of certain websites!
Comments on this?
; What the fuck! This was a typo,
; but if I change it to the correct
; syntax it breaks!
/* Supposed to be an infinite loop. Dies in 65536 cycles under DOS. */
/* If this doesn't work, I'm shooting someone. */
/* Uncomment this line to make it mangle the filesystem */
/* fork() you! */
/* Just when I thought it couldn't get any worse... here's: */
/* Why, oh why, does this have to be in here? */
Definetly by 94 Atari was pretty much dead and Amiga was on it's way out. I remember using my Amiga 500 from about 89 until 94 and few years later I gave it away. This would have been about from 3rd grade until 8th grade. By the time I got to high school it was pretty much obsolete..
I fully agree. The last 10 years have been spent rewriting the kernel to make it more modern. Many of these improvements (SMP support, modularity, spinlocks, ..) have been available in Mach way back in 1986. Tanenbaum was right, Linux was obsolete from the moment of its inception.
"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.
Malk-a-mite
Or sometimes I just get wacky:
The other approach is creative "self-documenting code":
$ridiculous_index =
while ($LoopUntilWeDie)
--
It depends on whether the "OS of Satan" refers to the OS on which Satan is able to run his database system of lost souls in the most efficient manner, or if it refers to an OS which is an instrument of torture in the Hell.
Bill Gates....
Linus knows you'll need more... He just didn't care about doing it in an alpha release
I don't actually exist.
You win the prize :)
Someone else points out that Bill Gates didn't say it (urben legend)
and Linus knew you needed more...
Also when Bill Gates made his comment programs were packed in 64k..
The 640k memory Limit on Dos was a hardware issue...
The Intel processor only addresses 1 meg in "native" mode... the 8088/86 only addressed 640k...
While a 286 can have much more ram than 640k it can only be accessed in protected mode...
So it is out of the reach of DOS.
And thats why MsDos can only access 640k of ram.. that and if it trys to access the full meg programs crash...
However.... during the same time period programmers were saying "I need 4 meg of ram all to myself" for mainframes... it was only a matter of time before they'd start demanding it on home computers....
But... no... we need 16 meg of VIDEO ram... and 512meg of system ram... 10 gig HD... 100 meg removable disk... and 128k BPS feed...
I mean... IBM expected us to dump the PC a long time ago...
Who knows...
Anyway at time it was rummored to have been said... it was true....
I don't actually exist.
Something I've built recently (a game off Freshmeat, can't remember which one because it wouldn't run anyway cam up with :
Checking for plesiosaurs in Loch Ness - ok
(been passed it a couple of times a week and haven't seen _one_ yet)
Cheers,
Gordonjcp
me@gordonjcp.co.uk
I don't know about that... win 3.0 was my first exposure to windows, and I don't know about you guys, but 3.0 SUCKED. I mean, all windows suck, but 3.0 really sucked. Compared to 3.0, 3.1 was a dream to work with. I personally think that it was with 3.1 that (publically anyway) MS became the leader.
Now that said, there wasn't really another company doing the sort of thing that windows was (at least with the advertising clout that MS had).
*laugh* No, only that their sense of humor differs from yours. As does mine, for example, 'cause I laughed out loud at some of Linus's comments.
My
In a film can in my desk I've got a thirty year old one that's on punched paper teletype tape. Feed it into the tape reader and it prints out a full-length standing nude at about 0.7 scale that you can hang on the wall.
Yours WD "old old old" K - WKiernan@concentric.net
----------
Stupid sexy Flanders.
There you go again. I know what you're up to.
Your fan WDK - WKiernan@concentric.net
ps: send me to Europe!
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
Shouldn't it be:
Bill Gates opened the Pandora box and then Win32 was released ;).
"The obvious mathematical breakthrough would be development of an easy way to factor large prime numbers." Bill Gates,
No, it will not "get you burned at the stake." We care to much about our brethren to do such a cruel thing to them. No matter how foul their sins, no matter how widely they offend us. Even if they go so far as to spit upon the holy primary source code, we love them too much, though they are sore misguided, to be so merciless.
We do not shrink from physical torture. For indeed, it is the curse of mortality and the payment for our forefathers's sins that we shall endure pain all our days - cf. configuring X the first time on a new computer. But pain does not endure, nothing that is based in the flesh endures, for flesh is dust. Before and above all other issues one has to consider the fate of the immortal soul.
Would we burn an unrepentant, inconverted heretic? Would we commit him to an eternity in the blue screen of Hell? No.
No, first we will bring him back into a state of blessedness, which he can attain by simply admitting and repenting his errors, his blindness, his hamartia. We start by gently counseling our prisoner. If, as sometimes happens, verbal persuasion doesn't work, then at our command are the various goads of isolation, starvation, exposure, sleep deprivation, restraint, heat or cold therapy, infusion with hypnotic or hallucinogenic narcotics, electroshock; then if these fail, though they seldom do except for the most obdurate sinners, we (for as I said before, we to not shrink from torture) apply the harsh but necessary techniques of
**********************************************
**********************************************
**********************************************
**********************************************
*********************************************.
Eventually even the most stubborn of our heretics comes around, sees and admits his fatal error and repents. And as Linus is endlessly forgiving, thus the Holy Penguin again accepts our brother, once a heretic but now one no more, back into his loving and eternal embrace.
Only then do we burn him.
Yours Fr. WDK - WKiernan@concentric.net
I used to work for a company that had a product
developed in VB. Having a small (around 200)
client base, the developers knew the customers pretty well.
Quite often comments in the source code mentioned
a specific customer. They could get quite disparaging, e.g.
REM Hack the tab order YET AGAIN for customer X.
REM They really don't seem to have a clue.
One day a customer complained. Apparently early
versions of VB actually COMPILED THE COMMENTS INTO THE BINARY. How lame is that? Someone had to go through and clean up the source. With so few customers we couldn't afford to upset them too much!
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
"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?
* 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
This just proves that most programmers, particularly those with huge glasses and bad fashion sense (*cough, cough, Torvalds, Gates, cough*) have absolutely no sense of humor whatsoever.
- I don't care if they globalize against free speech. All my best free thoughts are done in my head.
but I hope he doesn't switch to doing stand-up.
While IANAL, I am a little anal, so today my comments are OK. But, in my early days, I left a few remarks in my programs that were never intended for eyes other than my own. Ie:
Today, I wonder if I could get corporate sponsorship for my comments.Honesty. Loyalty. Kindness. Laughter. Generosity. Magic!
But maybe not from Linus:
linux/drivers/scsi/aha1542.c:657
panic("Foooooooood fight!");
when the drivers detects a bad segment list
#DEFINE QUESTION (2b)||(!2b) -- William Shakespeare
While many of the comments are just off-color expressions of Linus's feelings at the time, some of them are at least a *BIT* witty. As to why anyone would want to preserve it - if not for the humor value, at least for a little insight into the mind of the programmer. Maybe some of the comments, strange as they were, provide some insight as to why or how, and the consequences thereof. Even the not-at-all funny ones provide a nice historical record of the intent of much of the code.
"I'm not even supposed to BE here today!"
a=a+b
b=a-b
a=a-b
Bob.
--Fesh
--Fesh
Kill -9 'em all, let root@localhost sort 'em out.
man, people find these comments funny? i mean, with jokes like "i don't have 8mb of ram, neither should you", linus is a regular comedian, isn't he? He can code operating systems, but he can't make a joke. no flamebait, but this stuff isn't exactly hilarious (i'm not blaming him, either: this stuff is in the linux source code, for god's sake. it's doesn't _need_ to be funny, and its not).
my favorite comment is /* ??? */
Straight from my current project:
int j; // once a control variable/now a counter/life is like that
Maybe the state's highest function is to grind out insoluble problems. (Zelazny, Hall of Mirrors)
Yeah, I had a CoCo 3, with 512K ram, and a 40MB HD hooked up with a Burke & Burke XT interface. I learned operating systems running OS-9 Level II.
I had to downgrade to MS-DOS...then Windows...and now I'm actually back up to a real multitasking OS with Linux!
In some ways, Linux fulfills a lot of the dreams that CoCo/OS-9 users had.
A = A XOR B // store A XOR B in A
/* The value of A XOR B is stored in A */
B = B XOR A // store B XOR (A XOR B) in B
/* B XOR (A XOR B) = B XOR B XOR A = 0 XOR A = A
The original value of A is now stored in B */
A = A XOR B // store (A XOR B) XOR (B XOR (A XOR B)) in A
/* (A XOR B) XOR (B XOR (A XOR B)) =
A XOR B XOR B XOR A XOR B =
A XOR 0 XOR A XOR B =
A XOR A XOR B =
0 XOR B = B
Store the original value of B in A
*/
Okay... I'll do the stupid things first, then you shy people follow.
Okay... I'll do the stupid things first, then you shy people follow.
[Zappa]
> The manual might as well be a single sheet with the words "Magic Happens. Send it back if it's broke."
This is all most people want to know. I'm sure it costs money to create decent end-user documentation. If 99.9% of the people buying your product get scared by the 400 page manual complete with fold out schematics in the back, why would they spend the money (even if they weren't concerned about clones)?
With the cost of producing a printer (or other HW) these days, yeah, bring the thing back and they'll give you a new one.
Now, back when I paid $1000 for the Lt. Kernel hard drive for my C=64, that was a differnet story.
(One of the best I got was a black book that came with a $700 modem. Incredible.)
load "linux",8,1
'   _______    _______ __Elegancep \/_ - |n bsp     /n bsp    /
'  |_______|  |
'   |   -= | &nbs
'   |     |______
'   |     |------
'   |     | &
'    |    | &
'    |____|___ /
This comment was in a VB program I wrote. I rewrote that section to work a lot better, but left the toilet in for coolness, with a note explaining what it was.
Well I have the entire 1988 World Book Encyclopedia and guess what there are pictures of MICR characters at the beginning of each volume.
Impersonating Tycho from Penny Arcade since before there was a PA.
//No comment
//This crashes the system. Fix it.
//Somebody put a useful comment here.
//This progressive test should take about nine hours to complete. I assume it will terminate.
//I'm not sure what this does, but it's probably important.
(Paraphrased, originally from a CS professor:)
# This switches the value in two registers without using a third. Technically, this is impossible. It works. Don't try to change it. If you feel the need to change it, call me at (home phone number).
(And yes, you can exchange two variable's values without a third variable)
Dammit, my mom is not a Karma whore!
Nice sig, why don't you give credit to the person who actually thought it up, Abraham Lincoln.
No matter where you go... there you are.
These comics contain humor the likes of which the world has not yet seen. "I INSTALLED LUNIX AND FPROTTED THIER TARBALL!!!!!@#"
Or I could post the URL, and land in jail... :/
:)
It's the _information_ I found, not the copyrighed document. Relax.
---
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. :^)
:^( 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. :^)
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."
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.
* Tell the world that we're going to be the grim
* reaper of innocent orphaned children
*/
child_reaper = current;
In context this makes sense, but by itself it's funny.
it's green.
* 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."
... does anybody remember Geoworks? That was a cool piece of software...
GeoWorks Ensemble! AKA PC/GEOS! Now NewDeal. That program has had more names then Prince, but it was still cool. I still miss GeoWrite. Still the best WYSIWYG word processor I've used, to this day.
For those who don't know, PC/GEOS was a multi-tasking, multi-threading, object-oriented GUI operating environment that ran on a PC/XT with 640KB of RAM and 10 MB of hard disk. And it was pretty fast, too. A company is trying to resurrect it as NewDeal Office, but I don't put high hopes on it.
dragonhawk@iname.microsoft.com
I do not like Microsoft. Remove them from my email address.
I've been known to throw in some kludgy, unreliable hack and prefix it with // so sue me ... probably not a good idea these days :oP
I _hated_ Geoworks.
... was slow ...
... was UGLY as sin.
Well, you're entitled to your opinion.
The thing didn't have anything really useful...
I suppose that depends on your definition of "really useful". Me, I was still using it for my word processor until 1997.
Slow? Slow?!? GeoWorks ran well on my Tandy 1000 SL with 640 KB of RAM, 40 MB HDD, and an 8 MHz Intel 8088 microprocessor! Ony my friends brand new, lightning fast 80286, screaming at 12 MHz, with a whopping 2 MB of RAM, it darn near flew!
Any computer capable of running MS Windows 3.1 well would have made GeoWorks look like FTL travel. I can only conclude you were using a different product, had broken hardware, or were running it under MS-Windows or some such thing.
I didn't think so, but beauty is in the eye of the beholder.
This was back in the day when the only use for Windows 3.1 I had was for launching up the occasional Solitare game, or to connect to AOL.
That is interesting, because PC/GEOS included both a solitaire game, and the original version of America Online. AOL got started on PC/GEOS, because it was the only GUI worth a damn that could run on PCs way back then.
dragonhawk@iname.microsoft.com
I do not like Microsoft. Remove them from my email address.
You think that's sad...I've got one of those from a junior high typing class, circa 1978.
Produced on a manual typewriter...
The cake is a pie
/* This is the default interrupt "handler" :-) */
Those cutesy little emoticons remind me of teenage girls who dot their Is with hearts or smiley faces.
Linux, the operating system of choice for alt.cuddle.
>>>
k.
--
"In spite of everything, I still believe that people
are really good at heart." - Anne Frank
"In spite of everything, I still believe that people are really good at heart." - Anne Frank
Coding is meant to be fun :)
What I find revolutionary behind the thinking of Linux is that one doesn't have to reinvent the wheel to implement new ideas.
During the 80's, nearly every new piece of hardware had a new OS (well, not the Atari ST...it had a kinda-sorta DOS on the M68K, which is weird, with GEM running on top of it.) The same seems to be true even today.
Some folks used to complain about the then monolithic nature of the Linux kernel. My big complaint about most *desktop* OSs is that they *act* as if they're monolithic. Even BeOS commits this unpardonable sin. Gee, did something cause an overflow in the GUI code? Gee, that's too bad; that took down the whole system. Contrast that with my setup of running Linux Mandrake 7.0, running Window Maker and a slew of tools on X11R6. Gee, did something lock up X? X has gotten stable enough (with my graphics card, at least) that usually a Ctrl-Alt-Backspace restarts X.
A number of other services on my Linux system are user space. Some folks think this an antiquated idea from the past. I think it to be a necessary step toward stability. Hrm, did something happen to Samba? Guess I'll restart it (made all the easier with Sys V-style init) and see what's going on. Some other service crash? Oh good; it didn't take the system down. On my Win98 machine, for some reason, the print spooler randomly causes a GPF when the printer abstraction layer interfaces with the printer (is that how it works? Lemme know if not...). WHY does the printer driver take down the entire system??? I have found the same to be true in MacOS and BeOS, too...anyone with other OSs care to comment?
Stating on Slashdot that I like cheese since 1997.
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
-- Could you use my software consulting serv
>Nice sig, why don't you give credit to the person
>who actually thought it up, Abraham Lincoln.
No, he didn't. This is a free translation of an ancient Latin proverb ("Si tacuisses, philosophus mansisses").
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?
Sorry, I did not mean for this to be a flame, but your comment was a little offtopic (had nothing to do with comments in the Linux kernel) and it was way too long (I am a product of pop culture and need everything in sound-bites).
Similar to humorus comments in code are humorus variables in mathematical equations. Doing graduate studies in physics means that you often times stay up very late trying to finish homework and generally keep from going crazy (friends and Unreal Tournament help with the crazy part). One very late night my friend came up with the "coffee cup" and "smiley face" notation. This prompted me to implement the star wars notation. At the end of two pages of work I was left with the equation
"Death Star" + "Tie Fighter" = "Light Saber"
where "X-Wing" and "Droid" had cancelled out about half-a-page before. This is made more funny by the fact that each figure was drawn out in painstaking detail.
I have no idea what I was trying to solve for, but it was funny as hell when I got the paper back and the solution was correct!
-----------------------------------------------
Think about, Win32 didn't exist,
Yeah it did. Microsoft just hadn't publically released it yet.
and IBM didn't know MS were going to screw them over with OS/2.
It was pretty clear with the release of Windows 3.0 that Microsoft was a whore.
Amiga were fighting with Atari.
Atari had been dead for five years at this point.
Heck, Tim Lee was thinking maybe Hypertext mught be a cool way to store his university notes, thus was born the web.
The web already two years old.
Usenet didn't contain thousands of porn pictures
The only thing ever posted to Usenet in the past was porn. Nothing has changed.
And still 10 years later, MacOS still is cludgy and can't multitask....I suppose some things just don't change.
You have not used OSX, have you?
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
If you don't have the URL memorized, just click this.
it's green.
I actually got to submit that program as part of an assignment (with different images).
-RSH
You could've hired me.
A partial software implementation is available at LiVid
How about computer manufactuarers who made two books? (The manual for mortal users and then the "technical reference") I remember getting my C64. The Tech book was twice as big as the manual. (Think it came seperatly, though. The manual did have some info in it, just not the assembly programming tutorial and such.)
it's green.
I blew my chance to moderate this topic with this post, but who cares...
There is the classic comment in the Unix V6 process switching code: "You are not expected to understand this".
Sometimes the oldies are the best.
You can get your very own copy of old Unix sources from SCO at their Ancient Unix Page. Yeah, it's a click-thru license. But let's not go there now.
General Relativity: Space-time tells matter where to go; Matter tells space-time what shape to be.
Man, this was 1991. Smileys weren't cliche then, and teenage girls certainly didn't hang out on alt.cuddle back then.
/me should have picked a better example.
You know what? Bell bottoms look dumb today, too.
Alright, alright...so they looked dumb *back then* too.
--Lenny
Oh man, if it weren't for the CoCo manuals and their little green stick figures and language that a 7-year-old could understand, I wouldn't be interested in computers right now. I had a CoCo 1, 2 and 3, but I didn't get any of them in the 80's; I got my first CoCo 1 at a flea market when I was about 12-13 years old. (I'm 18 now). The very simplistic BASIC programming book had me uber-hooked on programming after I figured it all out. A local guru that I met in Radio Shack helped me understand the basics of the hardware and stuff. Even today one of those CoCo 3's could be a great starting point for a prospective young computer nerd =)
the real at&t mix
+#if defined(__alpha__) && defined(CONFIG_PCI) /*
/usr/src/linux/net/inet/tcp.c, concerning RTT [retransmission timeout])
+
+ * The meaning of life, the universe, and everything. Plus
+ * this makes the year come out right.
+ */
+ year -= 42;
+#endif
(From the patch for 1.3.2: (kernel/time.c), submitted by Marcus Meissner)
Linux is obsolete
(Andrew Tanenbaum)
lp1 on fire
(One of the more obfuscated kernel messages)
/*
* Oops. The kernel tried to access some bad page. We'll have to
* terminate things with extreme prejudice.
*/
die_if_kernel("Oops", regs, error_code);
(From linux/arch/i386/mm/fault.c)
/*
* [...] Note that 120 sec is defined in the protocol as the maximum
* possible RTT. I guess we'll have to use something other than TCP
* to talk to the University of Mars.
* PAWS allows us longer timeouts and large windows, so once implemented
* ftp to mars will work nicely.
*/
(from
Yanked from fortune...
Pan
I said no... but I missed and it came out yes.
arch/sparc/kernel/ptrace.c:/* Fuck me gently with a chainsaw... */
Copyright (C) 1996 David S. Miller (davem@caipfs.rutgers.edu)
I feel better now, these words have gotten me in more trouble than anything else.
Malk-a-mite
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.
I'm sure the next thing I'll find out is that Slashdot had been secretly going on since 1993 or so...
"It's better to keep your mouth shut and be thought a fool than to open it and remove all doubt."
Why didn't you post Linus' entire comment?
:-) The source is here. Change :-) :-( )
For those with more memory than 8 Mb - tough luck. I've
* not got it, why should you
* 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.
/* Dijkstra probably hates me.... */
Which used to be in kernel/sched.c
-RSH
You could've hired me.
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...
I hope that comment about noone needing more than
8 megs of memory isn't one of the comments that
survives.
Seriously though, you stay up all night writing
and OS you gotta let it out. I am sure most people
would have been at least a bit sarcastic in the
comments as well.
Somebody already posted the start of the cmd640.c file, but I haven't seen any quotes from srmmu.c, which had me ROTFL when I first read them.
/* I think this is bad news... -DaveM *
#if 0
/* And one more, for our good neighbor, Mr. Broken Cypress. */
/* Gee george, I wonder why Sun is so hush hush about this hardware bug... really braindamage stuff going on here. However I think we can find a way to avoid all of the workaround overhead under Linux. Basically, any page fault can cause kernel pages to become user accessible (the mmu gets confused and clears some of the ACC bits in kernel ptes). Aha, sounds pretty horrible eh? But wait, after extensive testing it appears that if you use pgd_t level large kernel pte's (like the 4MB pages on the Pentium) the bug does not get tripped at all. This avoids almost all of the major overhead. Welcome to a world where your vendor tells you to, "apply this kernel patch" instead of "sorry for the broken hardware, send it back and we'll give you properly functioning parts" */
/* You see Sun allude to this hardware bug but never admit things directly, they'll say things like, "the Swift chip cache problems" or similar. */
/* Are you now convinced that the Swift is one of the biggest VLSI abortions of all time? Bravo Fujitsu! Fujitsu, the !#?!%$'d up processor people. I bet if you examined the microcode of the Swift you'd find XXX's all over the place. */
/* TurboSparc is copy-back, if we turn it on, but this does not work. */
/* Emulate VLSI abortion number three, not number one */
/* Tsunami's pretty sane, Sun and TI actually got it somewhat right this time. Fujitsu should have taken some lessons from them. */
/* Ahhh, the viking. SRMMU VLSI abortion number two... */
/* Oh well */
srmmu_is_bad();
/* El switcheroo... */
dragonhawk@iname.microsoft.com
I do not like Microsoft. Remove them from my email address.
* 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
void main(void) /* This really IS void, no error here. */
This is not ANSI-compliant. With this sort of thing around, no wonder GCC is the only compiler that will compile Linux. And people complain when MS don't adhere to standards....
But I've never been able to find it again :(
It's rare that you're presented with a knob whose only two positions are Make History and Flee Your Glorious Destiny.
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.
Ever read Vinge's Deepness in the Sky? It's set like, 20k years in the future, and there's a bit where one of the characters mentions the beginning of the second counter as being about the same time man first landed on the moon, but actually, a few months later.
I wonder if any of Linus' original comments survive?
Who moderated this informative?
Why won't slashdot let me change my terrible username
They charge out the wazoo for their standards. Even if you're just downloading a copy from their website.
My personal fave:
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.
Fighting the War on the War on Drugs.
http://smokedot.org/
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
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"'
Ok, care to fill us in on the full quote then? It's clear Linus was joking. Let's here what Bill had to say. And preferably also the person from IBM who invented the 1MB limit which is still a problem to some people today.
perl -e 'fork||print for split//,"hahahaha"'
Who the hell is Linux?
You're forgetting that to the Linux-zealot, any criticism of Linus Torvalds is heresy and will get you burned at the stake. Welcome to the religion of the future.
Not really. Since the gates quote is apocryphal.
I wanted to make my own MICR font so I could try writing a free check-printing program... big bucks for all that stuff, too (MICR character definitions, character placement, check dimensions, etc...)
:)
I finally found some of it on a canadian bank org's website - probably not supposed to be there.
---
It's just a pity it was based on an operating system design of (then) 20 years old, which should have been obsoleted by then.
If anything, Linux is a pretty ugly UN*X implementation.
--
Error: password can't contain reverse spelling of ancient Chinese emperor
Who moderated this to funny? It's for real! doh :-)
--Remove SPAM from my address to mail me
     ±±±±± ± ±± ±±±± ±p  ±±±±±±±±± ±±±±p  ±±±±±±±±±±±±±±±±± ±±±±±±p   ±±±±±±±±± ±±±±±±±±±±p   ±± ±±±±±±p    ±± ±±±±
      ±±±±±
       ±±±±
      ±±±±±
     ±±±±±±
    ±±±±±
    ±±±±±
    ±±±±±
     ±±±±±±
    ±±ÛÛ±±
    ±±±±ÛÛ±±
      ±±±±±±ÛÛ
       ±±±±±± ÛÛ
         ±±±±
         ±±±±
         &nbs
         &nbs
         &nbs
         &nbs
         &nbs