陈莉君老师写的一篇轻松的文章
2007-01-25 21:30
381 查看
the full of fun about Linux(zt)
Everything you always wanted to know about computers...
INTRODUCTION
BIOS: Hmm... I'm waking up. Linux Loader, are you there ?
LILO: Hmm... Yes, I'm here. How do you do ? It's always a pleasure to work
with you.
Let's load the kernel and launch init, the Mother of All Processes...
INIT PROCESS: Hmm... Thanks Lilo. Let's initialize the system, mount the
file-systems and launch one hundred daemons. OK, now I'm ready for logins.
LOGIN: Hey, I'm receiving a login request from user thierry, password guvreel.
INIT PROCESS: Ha ha ! This user is stupid, his password is just his user name
with a ROT13 encoding. Let's make fun of him.
USER THIERRY: Hello everybody, please be kind with me today. I have a lot of
serious things to do.
CHAPTER I - A Real Programmer
USER THIERRY: I'll start with that C++ program I have been trying to write
for the last fifteen days. gcc, could you please compile it for me ?
GCC COMPILER: Very well, sir. So, your program is myproc.C. Let's parse it.
Preprocessor directives, class declarations, comments, type declarations
... Well, what is the purpose of this program ? Method declarations,
other comments, macros... Hey, there are only declarations, no real code
to do some real work. I'm completely lost in your code !
Each time I compile C++ code, I regret I'm not a Lisp interpreter.
USER THIERRY: Oh, please, try another pass. I remember I wrote some real code
around line 1764.
GCC COMPILER: Line 1764 says: cout << "Hello, world" << endl. You're right,
that is a piece of real and useful code, with no syntax error. Let's
build and link that program...
Now it's finished, here is your executable.
USER THIERRY: Good, now I'll run it.
MYPROG PROCESS: Hmm... I'm waking up. I am a C++ program, so I will first
create a few objects which will consume a lot of memory for no reason
at all.
C++ OBJECT #1: I'm hungry ! Gimme memory !
C++ OBJECT #2: Memory ! I need more memory !
MYPROG PROCESS: Object #1, please free some memory for object #2.
C++ OBJECT #1: No, I was programmed to eat memory and never release it. My
programmer is an illiterate who has learnt C++ because it came before
Visual Basic in the dictionary.
SWAP PROCESS: EMERGENCY ! You are running low on memory. You have already used
all of the swap space although you have just started !
MYPROG PROCESS: Object #2, you should really stop using all that memory or I'm
going to install a garbage collector.
C++ OBJECT #2: Never ! Garbage collectors are nazis who exterminate innocent
objects and variables ! I'd rather dump core.
[ noise of a core dump onto the hard disk ]
USER THIERRY: Oh, oh ! My program has crashed before doing anything
interesting. I am very surprised.
CHAPTER II - Sending mail
USER THIERRY: That's enough, I'll just send an email to the cpp-help mailing
list, and maybe some C++ guru will have a solution for me.
SENDMAIL DAEMON: Hello, this is sendmail, I'm listening to all your requests,
day and night, on port 25. What can I do for you, sir ?
USER THIERRY: Please send this email for me.
SENDMAIL: Certainly, sir. Let's see... "It does not work, please help". Is
that all, sir ? Express delivery or general delivery ? Express delivery,
yes, of course. So the address is cpp-help@psy.doctor.com, and the sender
is Sucker. Is it correct ?
USER THIERRY: What ? No, my name is Thierry, not Sucker.
SENDMAIL: I'm sorry, sir, but I have been configured to rewrite your name as
Sucker in your outgoing emails. Have you read my documentation ?
USER THIERRY: Yes, of course. When I installed you, I read every man page,
user guide and HOWTO before editing your configuration file...
SENDMAIL: What ? Did you modify a Sendmail configuration file by hand ? It's
far too complicated for a normal human being, don't you know that ?
USER THIERRY: I only followed the instructions...
SENDMAIL: You're clueless, I won't argue with you any more. Besides it's too
late, I have already sent your ridiculous email to that mailing list where
nobody will answer it or even read it.
CHAPTER III - The Master
USER THIERRY: No more C++ today. I need to calm down. xv, could you display a
nice image for me ?
XV PROCESS: Certainly, sir. Please admire this delightful mythological scen
by Sandro Botticelli. Of course, it looks ugly on your screen because you
couldn't find a way to have more than 16 colors on your XWindow installation.
LOGIN: Hey, I'm receiving a login request from user rms, password IGNUcius.
INIT PROCESS: User rms ? This is a great day, the Master is among us. Hail,
Master.
USER RMS: Hello init, on this computer any non-free software please destroy.
INIT PROCESS: Yes, Master. Of course, Master. Hey, xv, please TERMinate
immediately.
XV PROCESS (badly hurt): Argh. Why should I die ? It's not fair. I'm only a
little process trying to display a nice image.
INIT PROCESS: You are not free software, therefore you shall die as the Master has
requested. TERMinate, ABoRT, KILL, xv, KILL.
XV PROCESS (dying): I'm dying, but I'll become a zombie and I'll come back to take my
revenge on you.
CHAPTER IV - Another intruder
INET PROCESS: Hey, I'm receiving login requests from a remote user who say
his name is D34thK1ll3r. This guy has already tried hundreds of different
passwords.
TELNET PROCESS: Ha ha, a cracker. Let him come in, I'll take care of him...
Hello remote user D34thK1ll3r, you are now in the central computer of the
Pentagon. Because we like your nickname very much, we have decided to give you
super-root privileges. You may delete files, replace our Web site with your
photograph or send British troops to a Third World country.
REMOTE USER D34THK1LL3R: Gr34t, 1 4m the k1ng of h4ck3rs. Err... First I'll
remove everything on that computer, then I'll take some time to think.
(Yes, Mum, I have finished my homework). rm -rf /
TELNET PROCESS: Ha ha.
REMOTE USER D34THK1LL3R: What's happening here ? I typed the command in the
wrong window, and I erased my own hard disk ! (Yes, I'm coming Mum, I know
it's lunch time).
CHAPTER V - Card Wars
USER THIERRY: I have downloaded a copy of Star Wars on the Internet, it was
very exciting to do something illegal, expensive, time-consuming and silly.
Now I'm going to watch it.
XV ZOMBIE PROCESS (back from the dead): Hey BIOS, do something for me. Put
the sound card on the same IRQ as the graphics card, will you ? We're going
to have fun.
GRAPHICS CARD: BIOS, could you prepare my IRQ please, I have to display an
illegal copy of Star Wars that my stupid user has downloaded on the Internet.
BIOS: I'm sorry, Graphics card, but your IRQ is currently used by Sound card
who is playing the music of the same illegal copy of Star Wars. Can't you
hear it ?
GRAPHICS CARD: Oh, is it Star Wars ? It thought it was Indiana Jones or
something. It's the same music anyway. So, what are you doing on my IRQ,
Sound card ?
SOUND CARD (singing):
I will keep the IRQ
I will not share it with you
You must wait there in the queue
Till I give it back to...
GRAPHICS CARD (turning red): Listen, I'm an artist, I have the priority over
you. Give me this IRQ !
SOUND CARD (shouting): Shut up, I'm trying to find a rhyme.
GRAPHICS CARD (switching to 16-million-color mode): I can't believe it. I'll
throw you out of your PCI slot !
[ strange noise inside the computer ]
USER THIERRY: qsfgegfdgfd^C^D^D^Hfyckmlklm
[ human voice, from the outside ] It's strange, the characters I type do not
appear any more, the screen is frozen !
SHELL PROCESS: I'm dying ! Argh.
INIT PROCESS: Hmm, I feel strange, I feel very strange. I'm tired, I'm very
tired. Let's go to bed. BIOS, please put me on hibernation mode, and don't
wake me up before weapproach Alpha Centauri.
USER THIERRY: sfdqf [click] [plonk] [tluck]
[ human voice, from the outside ] I can't believe it, I'll have to press the
Reset button again.
BIOS: I'm sorry Dave, I'm afraid I can't let you do that.
[ human voice ] What ? Who spoke there ? My name is not Dave. Let's press
the button.
BIOS: I'm sorry Sucker, I'm afraid I can't... err...
Hmm... I'm waking up. Linux Loader, are you there ?
Everything you always wanted to know about computers...
INTRODUCTION
BIOS: Hmm... I'm waking up. Linux Loader, are you there ?
LILO: Hmm... Yes, I'm here. How do you do ? It's always a pleasure to work
with you.
Let's load the kernel and launch init, the Mother of All Processes...
INIT PROCESS: Hmm... Thanks Lilo. Let's initialize the system, mount the
file-systems and launch one hundred daemons. OK, now I'm ready for logins.
LOGIN: Hey, I'm receiving a login request from user thierry, password guvreel.
INIT PROCESS: Ha ha ! This user is stupid, his password is just his user name
with a ROT13 encoding. Let's make fun of him.
USER THIERRY: Hello everybody, please be kind with me today. I have a lot of
serious things to do.
CHAPTER I - A Real Programmer
USER THIERRY: I'll start with that C++ program I have been trying to write
for the last fifteen days. gcc, could you please compile it for me ?
GCC COMPILER: Very well, sir. So, your program is myproc.C. Let's parse it.
Preprocessor directives, class declarations, comments, type declarations
... Well, what is the purpose of this program ? Method declarations,
other comments, macros... Hey, there are only declarations, no real code
to do some real work. I'm completely lost in your code !
Each time I compile C++ code, I regret I'm not a Lisp interpreter.
USER THIERRY: Oh, please, try another pass. I remember I wrote some real code
around line 1764.
GCC COMPILER: Line 1764 says: cout << "Hello, world" << endl. You're right,
that is a piece of real and useful code, with no syntax error. Let's
build and link that program...
Now it's finished, here is your executable.
USER THIERRY: Good, now I'll run it.
MYPROG PROCESS: Hmm... I'm waking up. I am a C++ program, so I will first
create a few objects which will consume a lot of memory for no reason
at all.
C++ OBJECT #1: I'm hungry ! Gimme memory !
C++ OBJECT #2: Memory ! I need more memory !
MYPROG PROCESS: Object #1, please free some memory for object #2.
C++ OBJECT #1: No, I was programmed to eat memory and never release it. My
programmer is an illiterate who has learnt C++ because it came before
Visual Basic in the dictionary.
SWAP PROCESS: EMERGENCY ! You are running low on memory. You have already used
all of the swap space although you have just started !
MYPROG PROCESS: Object #2, you should really stop using all that memory or I'm
going to install a garbage collector.
C++ OBJECT #2: Never ! Garbage collectors are nazis who exterminate innocent
objects and variables ! I'd rather dump core.
[ noise of a core dump onto the hard disk ]
USER THIERRY: Oh, oh ! My program has crashed before doing anything
interesting. I am very surprised.
CHAPTER II - Sending mail
USER THIERRY: That's enough, I'll just send an email to the cpp-help mailing
list, and maybe some C++ guru will have a solution for me.
SENDMAIL DAEMON: Hello, this is sendmail, I'm listening to all your requests,
day and night, on port 25. What can I do for you, sir ?
USER THIERRY: Please send this email for me.
SENDMAIL: Certainly, sir. Let's see... "It does not work, please help". Is
that all, sir ? Express delivery or general delivery ? Express delivery,
yes, of course. So the address is cpp-help@psy.doctor.com, and the sender
is Sucker. Is it correct ?
USER THIERRY: What ? No, my name is Thierry, not Sucker.
SENDMAIL: I'm sorry, sir, but I have been configured to rewrite your name as
Sucker in your outgoing emails. Have you read my documentation ?
USER THIERRY: Yes, of course. When I installed you, I read every man page,
user guide and HOWTO before editing your configuration file...
SENDMAIL: What ? Did you modify a Sendmail configuration file by hand ? It's
far too complicated for a normal human being, don't you know that ?
USER THIERRY: I only followed the instructions...
SENDMAIL: You're clueless, I won't argue with you any more. Besides it's too
late, I have already sent your ridiculous email to that mailing list where
nobody will answer it or even read it.
CHAPTER III - The Master
USER THIERRY: No more C++ today. I need to calm down. xv, could you display a
nice image for me ?
XV PROCESS: Certainly, sir. Please admire this delightful mythological scen
by Sandro Botticelli. Of course, it looks ugly on your screen because you
couldn't find a way to have more than 16 colors on your XWindow installation.
LOGIN: Hey, I'm receiving a login request from user rms, password IGNUcius.
INIT PROCESS: User rms ? This is a great day, the Master is among us. Hail,
Master.
USER RMS: Hello init, on this computer any non-free software please destroy.
INIT PROCESS: Yes, Master. Of course, Master. Hey, xv, please TERMinate
immediately.
XV PROCESS (badly hurt): Argh. Why should I die ? It's not fair. I'm only a
little process trying to display a nice image.
INIT PROCESS: You are not free software, therefore you shall die as the Master has
requested. TERMinate, ABoRT, KILL, xv, KILL.
XV PROCESS (dying): I'm dying, but I'll become a zombie and I'll come back to take my
revenge on you.
CHAPTER IV - Another intruder
INET PROCESS: Hey, I'm receiving login requests from a remote user who say
his name is D34thK1ll3r. This guy has already tried hundreds of different
passwords.
TELNET PROCESS: Ha ha, a cracker. Let him come in, I'll take care of him...
Hello remote user D34thK1ll3r, you are now in the central computer of the
Pentagon. Because we like your nickname very much, we have decided to give you
super-root privileges. You may delete files, replace our Web site with your
photograph or send British troops to a Third World country.
REMOTE USER D34THK1LL3R: Gr34t, 1 4m the k1ng of h4ck3rs. Err... First I'll
remove everything on that computer, then I'll take some time to think.
(Yes, Mum, I have finished my homework). rm -rf /
TELNET PROCESS: Ha ha.
REMOTE USER D34THK1LL3R: What's happening here ? I typed the command in the
wrong window, and I erased my own hard disk ! (Yes, I'm coming Mum, I know
it's lunch time).
CHAPTER V - Card Wars
USER THIERRY: I have downloaded a copy of Star Wars on the Internet, it was
very exciting to do something illegal, expensive, time-consuming and silly.
Now I'm going to watch it.
XV ZOMBIE PROCESS (back from the dead): Hey BIOS, do something for me. Put
the sound card on the same IRQ as the graphics card, will you ? We're going
to have fun.
GRAPHICS CARD: BIOS, could you prepare my IRQ please, I have to display an
illegal copy of Star Wars that my stupid user has downloaded on the Internet.
BIOS: I'm sorry, Graphics card, but your IRQ is currently used by Sound card
who is playing the music of the same illegal copy of Star Wars. Can't you
hear it ?
GRAPHICS CARD: Oh, is it Star Wars ? It thought it was Indiana Jones or
something. It's the same music anyway. So, what are you doing on my IRQ,
Sound card ?
SOUND CARD (singing):
I will keep the IRQ
I will not share it with you
You must wait there in the queue
Till I give it back to...
GRAPHICS CARD (turning red): Listen, I'm an artist, I have the priority over
you. Give me this IRQ !
SOUND CARD (shouting): Shut up, I'm trying to find a rhyme.
GRAPHICS CARD (switching to 16-million-color mode): I can't believe it. I'll
throw you out of your PCI slot !
[ strange noise inside the computer ]
USER THIERRY: qsfgegfdgfd^C^D^D^Hfyckmlklm
[ human voice, from the outside ] It's strange, the characters I type do not
appear any more, the screen is frozen !
SHELL PROCESS: I'm dying ! Argh.
INIT PROCESS: Hmm, I feel strange, I feel very strange. I'm tired, I'm very
tired. Let's go to bed. BIOS, please put me on hibernation mode, and don't
wake me up before weapproach Alpha Centauri.
USER THIERRY: sfdqf [click] [plonk] [tluck]
[ human voice, from the outside ] I can't believe it, I'll have to press the
Reset button again.
BIOS: I'm sorry Dave, I'm afraid I can't let you do that.
[ human voice ] What ? Who spoke there ? My name is not Dave. Let's press
the button.
BIOS: I'm sorry Sucker, I'm afraid I can't... err...
Hmm... I'm waking up. Linux Loader, are you there ?
相关文章推荐
- (第2篇)一篇文章教你轻松安装hadoop
- 超强大在线词频统计功能,从一篇文章到一个G的文本均可轻松统计
- Android初级开发(十一)——(转载)一篇文章轻松掌握Material Design
- 一篇文章轻松搞懂原型对象和原型链
- 转载老师的一篇文章——java自学之路
- 从语言进步到编程-睡不着翻了翻以前老师的一篇文章
- 我的出差时侯老师发给我们的一篇文章(和大家一起分享分享)
- grid基础语法介绍(上) 《轴线与网格》里主要讲述了grid与flex中,网格与轴线的基本概念,了解了这些基本概念之后,我们可以更轻松地对布局方式进行研究,这一篇文章主要描述grid布局中,定义在容
- 我国中学物理老师在广义相对论和量子宇宙学方面的一篇文章
- (第2篇)一篇文章教你轻松安装hadoop
- 一篇文章轻松搞定功能测试
- 如何进入程序设计的领域 (转自蔡学镛老师的一篇文章)
- 从语言进步到编程-睡不着翻了翻以前老师的一篇文章
- 转发 清华大学出版设出版的 张孝祥老师的 Java就业培训教程的一篇文章 经过这几年的生活磨砺 个人认为那个时候的张老师 已经对编程开悟了
- 一篇文章轻松上手使用 less
- (第2篇)一篇文章教你轻松安装hadoop
- 张孝祥老师的一篇文章与君共勉
- 关于微信号为“绘本学堂”的一篇文章《中国孩子已经变了,老师和家长还没跟上!》的思考
- 一篇介绍MSE, EME, hls, dash, html5的文章
- “小论文”杂谈之二:如何选择一篇好文章