Skip to contentSkip to conversation

Not a typewriter

DISCUSSION [email protected] 11 participants 13 messages May 11, 2001 – May 14, 2001

lore
Share & tools
lore
#0 lore raw
Quoted 2 lines · Hacksaw

Heaven help us when tradition is more important than clarity.

If clarity is the most important consideration, then other things should be changed as well. For instance, the command we use to search for text strings in files should be called "textsearch." That's a lot more clear than "grep."

Quoted 3 lines

Typewriter has always been wrong. I'd agree that "Not a teletypewriter" would suffice.

But the original message said "typewriter." (The "wrongness" is part of its charm.) If the wording is going to be changed, then it's better to abandon the tradition altogether and use one of the more descriptive and "correct" messages you and others have proposed.

Quoted 4 lines

On the other hand "Inappropriate ioctl for device" is also not very clear.

I'd like to see "Not a serial or character device" or "Not a serial device" if that's more appropriate. Something like that...

My point is that someone who sees the "typewriter" message and doesn't understand it will have to dig a bit to find out what it means. Finding it almost certainly will involve uncovering some of the history and folklore of Unix. In the "Intro to Unix" classes I've taught over the years, I've always made a point of explaining the background of things like this -- such as the relation of grep to the g/re/p expression of ed, ex and vi; where biff got its name; what the letters stand for in awk; why creat doesn't end in an "e;" and so forth. I tell the class that Unix has quirky, eccentric, whimsical elements because many of the things in it were written by quirky, eccentric, or whimsical people. The comment at the bottom of some versions of the tunefs man page (such as the HP-UX version) is an example I like to use: "You can tune a file system, but you can't tune a fish." I tell them they'll understand the Unix way of thinking faster if they approach it with an inquisitive, playful spirit rather than as a stuffy business system. It's supposed to be correct; it's supposed to be efficient; but it's also supposed to be fun, and sometimes the fun is worth sacrificing a little of the other qualities in trivial areas.

I guess what I'm trying to say is that "Life With Unix" should be required reading for anyone who goes near a Unix (or Linux) system.

Wayne

#1 lore raw
Quoted 6 lines · On Fri, 11 May 2001 [email protected] wrote:
Quoted 2 lines

Heaven help us when tradition is more important than clarity.

If clarity is the most important consideration, then other things should be changed as well. For instance, the command we use to search for text strings in files should be called "textsearch." That's a lot more clear than "grep."

it's not clear to me that that textsearch is a more accurate description than Get Regular ExPression

#2 lore raw
In reply to [email protected]
Quoted 2 lines

If clarity is the most important consideration, then other things should be changed as well. For instance, the command we use to search for text strings

in

Quoted 1 line

files should be called "textsearch." That's a lot more clear than "grep."

Well, I can't disagree. Unix's biggest turn off was the stupid command names. It's a big reason why Unixoid systems aren't more commonplace. I only learned it because I was stuck at a desk with a Wyse terminal. Otherwise I probably would have played with the Autocad machines more. Once I understood the basics, I understood the power of the system.

However, I was a CS major, smart, and a voracious reader.

-----

I have often thought of an alternate naming scheme that would apply to the most basic utilities. With command completion longer names become less annoying.

But first we need a better help system. The absolute most stupid convention of Unix is the man command. The fact that SCCS before, and now Bash usurp the keyword "help" is beyond the pale.

Quoted 1 line

If the wording is going to be changed, then it's better to abandon the

tradition

I say abandon tradition when tradition doesn't serve. Arcane messages prevent understanding, arbitrary command names sometimes can't be avoided. The process is annoying at best, and painful on Linux systems where the documentation isn't unified, and is often incomplete.

A beautiful example that came up on my RedHat 6.2 system:
[From ppd_file_new_from_filep(3)]

ENOTTY no idea what these errors are. Probably PPD parse errors.

I run into things like this all the time.

"Textsearch" is better than grep, except sometimes you aren't searching through text. "Search" is more general. "Find" would be even better.

I wish that find had the functions of grep as well, ala the MacOS "find", which can (these days) search for files names and attributes, and also search for things inside files.

Quoted 2 lines

My point is that someone who sees the "typewriter" message and doesn't understand it will have to dig a bit to find out what it means.

All well and good if you have the time. If you are in a business or academic settings, the learning curve is an important part of the total cost of ownership.

--------

Ob. LKML: Error messages from the kernel should be examined with this in mind. The more clear that error message is, the less likely we'll see a question about it here.

#3 lore raw
Quoted 1 line · Hacksaw

Well, I can't disagree. Unix's biggest turn off was the stupid command names.

I agree partially with that, but as someone who's used DCL in VMS, I can say meaningful names are no better. People don't want to type SHOW DIRECTORY or CREATE /DIRECTORY /PERMISSIONS=blah blah.. and when given DCL, once people understand how to create logical names (the equiv of aliases in unix) they alias the above verbose garbage down to 2-4 letter cryptic looking names. I don't know anyone who has used VMS for more than 3 months who hasn't done the above. Problem is that everyone chooses their own cryptic shortcuts from everyone else. At least in UNIX, the short cryptic names are the same everywhere, and you can alias them to larger names if you like.

------------------------------------------------------------------------
Signature poll: I'm planning on getting a 12 or 16 port autosensing 10/100 ethernet switch soon for home use, and am interested in hearing others recommendations on what to buy. Cost isn't as important as is functionality and quality. Any suggestions appreciated.
------------------------------------------------------------------------

#4 lore raw
In reply to [email protected]
Quoted 22 lines · On Fri, 11 May 2001 11:07:45 -0500, [email protected] wrote:

On 05/10/2001 at 06:20:34 PM Hacksaw <[email protected]> wrote:

My point is that someone who sees the "typewriter" message and doesn't understand it will have to dig a bit to find out what it means. Finding it almost certainly will involve uncovering some of the history and folklore of Unix. In the "Intro to Unix" classes I've taught over the years, I've always made a point of explaining the background of things like this -- such as the relation of grep to the g/re/p expression of ed, ex and vi; where biff got its name; what the letters stand for in awk; why creat doesn't end in an "e;" and so forth. I tell the class that Unix has quirky, eccentric, whimsical elements because many of the things in it were written by quirky, eccentric, or whimsical people. The comment at the bottom of some versions of the tunefs man page (such as the HP-UX version) is an example I like to use: "You can tune a file system, but you can't tune a fish." I tell them they'll understand the Unix way of thinking faster if they approach it with an inquisitive, playful spirit rather than as a stuffy business system. It's supposed to be correct; it's supposed to be efficient; but it's also supposed to be fun, and sometimes the fun is worth sacrificing a little of the other qualities in trivial areas.

Quoted 2 lines

I guess what I'm trying to say is that "Life With Unix" should be required reading for anyone who goes near a Unix (or Linux) system.

David N. Smith, an IBM researcher, wrote that we should preserve the past for the criticism of the future.

john alvord

#5 lore raw
In reply to [email protected]
Quoted 6 lines · On Fri, 11 May 2001 [email protected] wrote:
Quoted 2 lines

Heaven help us when tradition is more important than clarity.

If clarity is the most important consideration, then other things should be changed as well. For instance, the command we use to search for text strings in files should be called "textsearch." That's a lot more clear than "grep."

gnuregularexpressionparser?

Quoted 1 line

why creat doesn't end in an "e;" and so forth. I tell the

What is the reason for that? Also wondered why it is resolv.conf and not resolve.conf or resolver.conf...

Were they afraid that "e" being the most widely used letter in the English language was going to war out thir xpnsiv kyboards if thy usd it all th tim?

;o)

Quoted 2 lines

I guess what I'm trying to say is that "Life With Unix" should be required reading for anyone who goes near a Unix (or Linux) system.

I agree. ;o)

------------------------------------------------------------------------
Signature poll: I'm planning on getting a 12 or 16 port autosensing 10/100 ethernet switch soon for home use, and am interested in hearing others recommendations on what to buy. Cost isn't as important as is functionality and quality. Any suggestions appreciated.
------------------------------------------------------------------------

#6 lore raw
Quoted 1 line · Mike A. Harris

On Fri, 11 May 2001 [email protected] wrote:

[...]

Quoted 1 line
Quoted 1 line

why creat doesn't end in an "e;" and so forth. I tell the

The old C compiler/old Unix linker guaranteed 6 chars in an external symbol name only, and C functions got an underscore prepended: _creat. I guess this is the reason for this wart. As to why 6 chars only, I'd guess some data structure in the linker was laid out that way. Machines had a few dozen Kbs of RAM then, space was precious.

Quoted 2 lines

What is the reason for that? Also wondered why it is resolv.conf and not resolve.conf or resolver.conf...

Old FS handled only 14 chars in names, but that clearly isn't the reason here (11 chars). Some other operating system perhaps?

Quoted 3 lines

Were they afraid that "e" being the most widely used letter in the English language was going to war out thir xpnsiv kyboards if thy usd it all th tim?

Funny conspiracy suscpicion, that... ;-)

Signature · 2 lines
Horst von Brand                             [email protected]
Casilla 9G, Vin~a del Mar, Chile                               +56 32 672616
#7 lore raw
Quoted 5 lines · Horst von Brand
Quoted 1 line · Mike A. Harris

On Fri, 11 May 2001 [email protected] wrote:

[...]

Quoted 7 lines
Quoted 1 line
Quoted 1 line

why creat doesn't end in an "e;" and so forth. I tell the

The old C compiler/old Unix linker guaranteed 6 chars in an external symbol name only, and C functions got an underscore prepended: _creat. I guess this is the reason for this wart. As to why 6 chars only, I'd guess some data structure in the linker was laid out that way. Machines had a few dozen Kbs of RAM then, space was precious.

IIRC, the 6 character linker requirement came from when the Bell Labs folk ported the C compiler the IBM mainframe world, not from the early UNIX (tm) world. During the original ANSI C meetings, I got the sense from the IBM rep, that part of the problem was the linker was owned by the OS folk, and not the language group, and it was hard to make a business case why the linker should be extended to handle newer languages (since it was a different office that was responsible). The 6 character limit came from the fact that the linker actually supported 8 characters, but the first 2 characters were used to denote different products (I recall IBM stuff all tended to be IE....). The VMS folk also had a similar problem (but there they had a 31 character, one case limit), though by the end of the process, the linker had been moved into the languages group in that case.

The mainframe linker is also why the 1989 C standard required there to be only one definition of a global variable (ie, only one module can say "int x;" while others must say "extern int x"), even though the UNIX compilers have traditionally used the common model (ie, "int x" creates a common relocation, so that if there is no other non-common definition, the linker will create one). Evidently, the mainframe linker decided to put each unique common variable on its own page.

I vaguelly recall that somebody went back to Ritchie & Thompson and asked if they could go back in time and make one change, what would it be. Ritchie's answer was to make default chars be unsigned instead of signed (since it really messes up internation character support), and Thompson's answer was to spell "create" with an trailing e.

Quoted 5 lines
Quoted 2 lines

What is the reason for that? Also wondered why it is resolv.conf and not resolve.conf or resolver.conf...

Old FS handled only 14 chars in names, but that clearly isn't the reason here (11 chars). Some other operating system perhaps?

I would imagine you should ask the Berkely folks, since the TCP/IP support all came from there, and not Bell Labs.

Quoted 5 lines
Quoted 3 lines

Were they afraid that "e" being the most widely used letter in the English language was going to war out thir xpnsiv kyboards if thy usd it all th tim?

Funny conspiracy suscpicion, that... ;-)

Signature · 4 lines
Michael Meissner, Red Hat, Inc.  (GCC group)
PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886, USA
Work:	  [email protected]		phone: +1 978-486-9304
Non-work: [email protected]	fax:   +1 978-692-4482
#8 lore raw
Quoted 3 lines

IIRC, the 6 character linker requirement came from when the Bell Labs folk ported the C compiler the IBM mainframe world, not from the early UNIX (tm) world. During the original ANSI C meetings, I got the sense from the IBM rep,

6 character linker name limits are very old. Honeywell L66 GCOS3/TSS which I had the dubious pleasure of experiencing and which is a direct derivative of GECOS and thus relevant to the era like many 36bit boxes uses 6 char link names

Why - well because 6 BCD characters fit in a 36bit word and its a single compare to check symbol matches

#9 lore raw

--------- Received message begins Here ---------

Quoted 11 lines
Quoted 4 lines

IIRC, the 6 character linker requirement came from when the Bell Labs folk ported the C compiler the IBM mainframe world, not from the early UNIX (tm) world. During the original ANSI C meetings, I got the sense from the IBM rep,

6 character linker name limits are very old. Honeywell L66 GCOS3/TSS which I had the dubious pleasure of experiencing and which is a direct derivative of GECOS and thus relevant to the era like many 36bit boxes uses 6 char link names

Why - well because 6 BCD characters fit in a 36bit word and its a single compare to check symbol matches

well... actually it was 6 bit "ascii" computed from: (char - ' '). Depends entirely on architecture, and implementation. EBCD/6Bit/7Bit and EBCDIC were supported on the Honeywell systems.

-------------------------------------------------------------------------
Jesse I Pollard, II
Email: [email protected]

Any opinions expressed are solely my own.

#10 lore raw
In reply to Alan Cox
Followup to:  <[email protected]>
By author:    Jesse Pollard <[email protected]>
In newsgroup: linux.dev.kernel
Quoted 5 lines

well... actually it was 6 bit "ascii" computed from: (char - ' '). Depends entirely on architecture, and implementation. EBCD/6Bit/7Bit and EBCDIC were supported on the Honeywell systems.

There was also a genuine ASCII-6 encoding. It didn't look much like ASCII-7 as far as I remember.

-hpa

Signature · 3 lines
<[email protected]> at work, <[email protected]> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt
#11 lore raw
In reply to Michael Meissner
Quoted 10 lines · Alan Cox
Quoted 3 lines

IIRC, the 6 character linker requirement came from when the Bell Labs folk ported the C compiler the IBM mainframe world, not from the early UNIX (tm) world. During the original ANSI C meetings, I got the sense from the IBM rep,

6 character linker name limits are very old. Honeywell L66 GCOS3/TSS which I had the dubious pleasure of experiencing and which is a direct derivative of GECOS and thus relevant to the era like many 36bit boxes uses 6 char link names

Why - well because 6 BCD characters fit in a 36bit word and its a single compare to check symbol matches

Another old system that I recall was the CDC Cyber systems, which when I encountered them used 6-bit 'bytes' (the null byte meaning ':' in some cases, and null in others). The linker resolved names to 7 characters, so it could fit the name (42 bits) + an 18 bit address into a single 60 bit word.

One of the most useful rules of the GNU coding standards is that it asks people to avoid putting arbitrary limits in their code:

For example, Unix utilities were generally optimized to minimize memory use; if you go for speed instead, your program will be very different. You could keep the entire input file in core and scan it there instead of using stdio. Use a smarter algorithm discovered more recently than the Unix program. Eliminate use of temporary files. Do it in one pass instead of two (we did this in the assembler).

Or, on the contrary, emphasize simplicity instead of speed. For some applications, the speed of today's computers makes simpler algorithms adequate.

Or go for generality. For example, Unix programs often have static tables or fixed-size strings, which make for arbitrary limits; use dynamic allocation instead. Make sure your program handles NULs and other funny characters in the input files. Add a programming language for extensibility and write part of the program in that language.

Signature · 4 lines
Michael Meissner, Red Hat, Inc.  (GCC group)
PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886, USA
Work:	  [email protected]		phone: +1 978-486-9304
Non-work: [email protected]	fax:   +1 978-692-4482
#12 lore raw
In reply to Mike A. Harris
Quoted 1 line

why creat doesn't end in an "e;" and so forth. I tell the

Some time back, Ken Thompson was asked, if he had it to do over again, what changes he would make to Unix. The only thing he could think of: spell it "create()".

Signature · 1 line
/Jonathan Lundell.