comparison ch03.roff @ 51:49cf68506b5d

Spell checking.
author markus schnalke <meillo@marmaro.de>
date Sun, 20 May 2012 11:40:19 +0200
parents d3a02f5e63b3
children 814c33b96d89
comparison
equal deleted inserted replaced
50:a446f89cc5d9 51:49cf68506b5d
4 .P 4 .P
5 bar 5 bar
6 6
7 .H1 "Removal of Code Relicts 7 .H1 "Removal of Code Relicts
8 .P 8 .P
9 The code base of mmh originates from the late 70s, had been extensively 9 The code base of mmh originates from the late Seventies,
10 worked on in the mid 80s, and had been partly reorganized and extended 10 had been extensively
11 in the 90s. Relicts of all those times had gathered in the code base. 11 worked on in the mid Eighties, and had been partly reorganized and extended
12 in the Nineties. Relicts of all those times had gathered in the code base.
12 My goal was to remove any ancient code parts. One part of the task was 13 My goal was to remove any ancient code parts. One part of the task was
13 converting obsolete code constructs to standard constructs, the other part 14 converting obsolete code constructs to standard constructs, the other part
14 was dropping obsolete functions. 15 was dropping obsolete functions.
15 .P 16 .P
16 As I'm not even thirty years old and have no more than seven years of 17 As I'm not even thirty years old and have no more than seven years of
17 Unix experience, I needed to learn about the history in retroperspective. 18 Unix experience, I needed to learn about the history in retrospective.
18 Older people likely have used those ancient constructs themself 19 Older people likely have used those ancient constructs themselves
19 and have suffered from their incompatiblities and have longed for 20 and have suffered from their incompatibilities and have longed for
20 standardization. Unfortunately, I have only read that others had done so. 21 standardization. Unfortunately, I have only read that others had done so.
21 This put me in a much more difficult positions when working on the old 22 This put me in a much more difficult positions when working on the old
22 code. I needed to recherche what other would have known by heart from 23 code. I needed to recherche what other would have known by heart from
23 experience. All my programming experience comes from a time past ANSI C 24 experience. All my programming experience comes from a time past ANSI C
24 and past POSIX. Although I knew about the times before, I took the 25 and past POSIX. Although I knew about the times before, I took the
25 current state implicitely for granted most of the time. 26 current state implicitly for granted most of the time.
26 .P 27 .P
27 Being aware of 28 Being aware of
28 these facts, I rather let people with more historic experience solve the 29 these facts, I rather let people with more historic experience solve the
29 task of converting the ancient code constructs to standardized ones. 30 task of converting the ancient code constructs to standardized ones.
30 Luckily, Lyndon Nerenberg focused on this task at the nmh project. 31 Luckily, Lyndon Nerenberg focused on this task at the nmh project.
154 .DS 155 .DS
155 comp \-editor prompter 156 comp \-editor prompter
156 .DE 157 .DE
157 the resulting behavior is similar to 158 the resulting behavior is similar to
158 .Pn mailx . 159 .Pn mailx .
159 Appearently, 160 Apparently,
160 .Pn prompter 161 .Pn prompter
161 hadn't been touched lately. Otherwise it's hardly explainable why it 162 hadn't been touched lately. Otherwise it's hardly explainable why it
162 still offered the switches 163 still offered the switches
163 .Sn \-erase \fUchr\fP 164 .Sn \-erase \fUchr\fP
164 and 165 and
169 with the standard tool 170 with the standard tool
170 .Pn stty . 171 .Pn stty .
171 172
172 .U2 "Vfork and Retry Loops 173 .U2 "Vfork and Retry Loops
173 .P 174 .P
174 MH creates many processes, which is a concequence of the toolchest approach. 175 MH creates many processes, which is a consequence of the tool chest approach.
175 In earlier times 176 In earlier times
176 .Fu fork() 177 .Fu fork()
177 had been an expensive system call, as the process's whole image needed 178 had been an expensive system call, as the process's whole image needed
178 to be duplicated. One common case is replacing the image with 179 to be duplicated. One common case is replacing the image with
179 .Fu exec() 180 .Fu exec()
192 almost as fast as 193 almost as fast as
193 .Fu vfork() 194 .Fu vfork()
194 in the cases when they can be exchanged. 195 in the cases when they can be exchanged.
195 With 196 With
196 .Fu vfork() 197 .Fu vfork()
197 being more errorprone and hardly faster, it's preferable to simply 198 being more error-prone and hardly faster, it's preferable to simply
198 use 199 use
199 .Fu fork() 200 .Fu fork()
200 instead. 201 instead.
201 .P 202 .P
202 Related to the costs of 203 Related to the costs of
203 .Fu fork() 204 .Fu fork()
204 is the probability of its success. 205 is the probability of its success.
205 Today on modern systems, the system call will succeed almost always. 206 Today on modern systems, the system call will succeed almost always.
206 In the 80s on heavy loaded systems, as they were common at 207 In the Eighties on heavy loaded systems, as they were common at
207 universities, this had been different. Thus, many of the 208 universities, this had been different. Thus, many of the
208 .Fu fork() 209 .Fu fork()
209 calls were wrapped into loops to retry to fork several times in 210 calls were wrapped into loops to retry to fork several times in
210 short intervals, in case of previous failure. 211 short intervals, in case of previous failure.
211 In mmh, the program aborts at once if the fork failed. 212 In mmh, the program aborts at once if the fork failed.
221 In fundamental difference, I believe that mmh should be a MUA but 222 In fundamental difference, I believe that mmh should be a MUA but
222 nothing more. I believe that all-in-one mail systems are not the way 223 nothing more. I believe that all-in-one mail systems are not the way
223 to go. There are excellent specialized MTAs, like Postfix; 224 to go. There are excellent specialized MTAs, like Postfix;
224 there are specialized MDAs, like Procmail; there are specialized 225 there are specialized MDAs, like Procmail; there are specialized
225 MRAs, like Fetchmail. I believe it's best to use them instead of 226 MRAs, like Fetchmail. I believe it's best to use them instead of
226 providing the same function ourself. Doing something well requires to 227 providing the same function ourselves. Doing something well requires to
227 focus on this particular aspect or a small set of aspects. The more 228 focus on this particular aspect or a small set of aspects. The more
228 it is possible to focus, the better the result in this particular 229 it is possible to focus, the better the result in this particular
229 area will be. The limiting resource in Free Software community development 230 area will be. The limiting resource in Free Software community development
230 usually is human power. If the low development power is even parted 231 usually is human power. If the low development power is even parted
231 into multiple development areas, it will hardly be possible to 232 into multiple development areas, it will hardly be possible to
247 files. 248 files.
248 The tool might be useful, but it should not be shipped with mmh. 249 The tool might be useful, but it should not be shipped with mmh.
249 .P 250 .P
250 .Pn rcvtty 251 .Pn rcvtty
251 was removed because its usecase of writing to the user's terminal 252 was removed because its usecase of writing to the user's terminal
252 on receival of mail is hardly wanted today. If users like to be 253 on receiving of mail is hardly wanted today. If users like to be
253 informed of new mail, then using the shell's 254 informed of new mail, then using the shell's
254 .Ev MAILPATH 255 .Ev MAILPATH
255 variable or different (graphical) notifications are likely more 256 variable or different (graphical) notifications are likely more
256 appealing. Writing directly to other terminals is hardly ever wanted 257 appealing. Writing directly to other terminals is hardly ever wanted
257 today. If though one wants to have it this way, the standard tool 258 today. If though one wants to have it this way, the standard tool
288 there's no need to check for new mail before incorporating it. 289 there's no need to check for new mail before incorporating it.
289 .P 290 .P
290 .Pn msh 291 .Pn msh
291 was removed because the tool was in conflict with the original 292 was removed because the tool was in conflict with the original
292 philosophy of MH. It provided an interactive shell to access the 293 philosophy of MH. It provided an interactive shell to access the
293 features of MH. One major feature of MH is being a toolchest. 294 features of MH. One major feature of MH is being a tool chest.
294 .Pn msh 295 .Pn msh
295 wouldn't be just another shell, taylored to the needs of mail 296 wouldn't be just another shell, tailored to the needs of mail
296 handling, but one large program to have the MH tools built in. 297 handling, but one large program to have the MH tools built in.
297 It's main use was for accessing Bulletin Boards, which have seized to 298 It's main use was for accessing Bulletin Boards, which have seized to
298 be popular. Removing 299 be popular. Removing
299 .Pn msh , 300 .Pn msh ,
300 together with the truly obsolete programs 301 together with the truly obsolete programs
309 .P 310 .P
310 Historically, MH provided exactly one draft message, named 311 Historically, MH provided exactly one draft message, named
311 .Fn draft 312 .Fn draft
312 and 313 and
313 being located in the MH directory. When starting to compose another message 314 being located in the MH directory. When starting to compose another message
314 before the former one was sent, the user had been questioned wether to use, 315 before the former one was sent, the user had been questioned whether to use,
315 refile or replace the old draft. Working on multiple drafts at the same time 316 refile or replace the old draft. Working on multiple drafts at the same time
316 was impossible. One could only work on them in alteration by refiling the 317 was impossible. One could only work on them in alteration by refiling the
317 previous one to some directory and fetching some other one for reediting. 318 previous one to some directory and fetching some other one for reediting.
318 This manual draft management needed to be done each time the user wanted 319 This manual draft management needed to be done each time the user wanted
319 to switch between editing one draft to editing another. 320 to switch between editing one draft to editing another.
411 .Fn 6 412 .Fn 6
412 \(en, if that one 413 \(en, if that one
413 is removed too, then the backup of the former message gets overwritten. 414 is removed too, then the backup of the former message gets overwritten.
414 Thus, the ability to restore removed messages does not only depend on 415 Thus, the ability to restore removed messages does not only depend on
415 the ``sweeping cron job'' but also on the removing of further messages. 416 the ``sweeping cron job'' but also on the removing of further messages.
416 This is undesireable, because the real mechanism is hidden from the user 417 This is undesirable, because the real mechanism is hidden from the user
417 and the concequences of further removals are not always obvious. 418 and the consequences of further removals are not always obvious.
418 Further more, the backup files are scattered within the whole mail 419 Further more, the backup files are scattered within the whole mail
419 storage, instead of being collected at one place. 420 storage, instead of being collected at one place.
420 .P 421 .P
421 To improve the situation, the profile entry 422 To improve the situation, the profile entry
422 .Pe rmmproc 423 .Pe rmmproc
423 (previously named 424 (previously named
424 .Pe Delete-Prog ) 425 .Pe Delete-Prog )
425 was introduced, very early. 426 was introduced, very early.
426 It could be set to any command, which would care for the mail removal 427 It could be set to any command, which would care for the mail removal
427 instead of taking the default action, described above. 428 instead of taking the default action, described above.
428 Refiling the to-be-removed files to some wastebin folder was a common 429 Refiling the to-be-removed files to some garbage folder was a common
429 example. Nmh's man page 430 example. Nmh's man page
430 .Mp rmm(1) 431 .Mp rmm(1)
431 proposes 432 proposes
432 .Cl "refile +d 433 .Cl "refile +d
433 to move messages to the wastebin and 434 to move messages to the garbage folder and
434 .Cl "rm `mhpath +d all` 435 .Cl "rm `mhpath +d all`
435 the empty the wastebin. 436 the empty the garbage folder.
436 Managing the message removal this way is a sane approach. It keeps 437 Managing the message removal this way is a sane approach. It keeps
437 the removed messages in one place, makes it easy to remove the backup 438 the removed messages in one place, makes it easy to remove the backup
438 files, and, most important, enables the user to use the tools of MH 439 files, and, most important, enables the user to use the tools of MH
439 itself to operate on the removed messages. One can 440 itself to operate on the removed messages. One can
440 .Pn scan 441 .Pn scan
445 There's no more 446 There's no more
446 need to use 447 need to use
447 .Pn mhpath 448 .Pn mhpath
448 to switch over from MH tools to Unix tools \(en MH can do it all itself. 449 to switch over from MH tools to Unix tools \(en MH can do it all itself.
449 .P 450 .P
450 This apporach matches perfect with the concepts of MH, thus making 451 This approach matches perfect with the concepts of MH, thus making
451 it powerful. Hence, I made it the default. And even more, I also 452 it powerful. Hence, I made it the default. And even more, I also
452 removed the old backup prefix approach, as it is clearly less powerful. 453 removed the old backup prefix approach, as it is clearly less powerful.
453 Keeping unused alternative in the code is a bad choice as they likely 454 Keeping unused alternative in the code is a bad choice as they likely
454 gather bugs, by not being constantly tested. Also, the increased code 455 gather bugs, by not being constantly tested. Also, the increased code
455 size and more conditions crease the maintenance costs. By strictly 456 size and more conditions crease the maintenance costs. By strictly
586 .Pn show 's 587 .Pn show 's
587 simple approach and 588 simple approach and
588 .Pn mhl 's 589 .Pn mhl 's
589 limited display facilities couldn't cope with the task any longer. 590 limited display facilities couldn't cope with the task any longer.
590 Instead of extending these tools, new ones were written from scratch 591 Instead of extending these tools, new ones were written from scratch
591 and then added to the MH toolchest. Doing so is encouraged by the 592 and then added to the MH tool chest. Doing so is encouraged by the
592 toolchest approach. The new tools could be added without interfering 593 tool chest approach. The new tools could be added without interfering
593 with the existing ones. This is great. It allowed MH to be the 594 with the existing ones. This is great. It allowed MH to be the
594 first MUA to implement MIME. 595 first MUA to implement MIME.
595 .P 596 .P
596 The new MIME features were added in form of the single program 597 The new MIME features were added in form of the single program
597 .Pn mhn . 598 .Pn mhn .