VMS vs. UNIX file system

Brandon S. Allbery allbery at ncoast.UUCP
Fri Sep 23 08:42:15 AEST 1988


As quoted from <179 at arnold.UUCP> by dave at arnold.UUCP (Dave Arnold):
+---------------
| In article <3597 at encore.UUCP>, bzs at encore.UUCP (Barry Shein) writes:
| > The problem with the Unix "unstructured" approach is that either you
| > use some of the (very few) library routines (dbm is a major one, so
| > are the object deck readers in SYSV) or you roll your own, each
| > application will have its own way of storing data (compare termcap
| > with passwd with inittab with crontab with ...) often not terribly
| > well documented or efficient (agreed, often efficiency is a poor
| > excuse for obscurity.)
| 
| This is not a problem.  It's not often that your application requires
| you to "Roll your own".  And you get a very simple filesystem.
+---------------

This all ties together with the terminfo-vs.-termcap discussion.  Actually, I
have written an interpreted terminfo (as part of the "tgraph" compatibility
package for SVR2 curses); it is slow, but that's mainly because of laziness.
It should be quite possible to write it to work quickly, with the same
longer name usage *but* *extensible* unlike terminfo.

Just as byte-stream file systems are more general and more useful than typed
file systems, simple, general, FAST "access method" routines on top of the
stream file systems are better than either typed file systems or roll-your-
own access methods.  (Example:  COFF, or the new format perhaps, could
easily be generalized to make a "resource library file" similar to Macintosh
resource forks.  Which would make "ld" a general utility rather than just an
object relocation editor.)

Termcap's obscurity and outright bugs (skip a backslash or expand a tab to
spaces and the whole file goes to pot) make it a rather bad access method;
while fixed versions (such as the Gnu version) handle the bugs, it's still
harder to understand those two-character capnames than terminfo capnames.
The interpretive terminfo-style reader is a step in the right direction.  I
also have a terminfo-like routine (currently implemented via yacc, so it's
REALLY slow) which supports typed arrays.

On the other hand, termcap/info doesn't solve all problems; it's senseless
to complain about termcap and passwd not having the same format, they're
keyed and used differently.  Passwd uses yet another SIMPLE, GENERAL format,
which is easily manipulated even at the shell level.  Crontab is actually a
simple variant of that format, and perhaps should be merged, but the
existing tools can very easily deal with both.  (After all, there's really a
difference only in that a colon is used as passwd's field separator, while
crontab uses a tab.  Interpretation of fields varies, but that's going to
happen anyway in a real-world database situation.)

++Brandon
-- 
Brandon S. Allbery, uunet!marque!ncoast!allbery			DELPHI: ALLBERY
	    For comp.sources.misc send mail to ncoast!sources-misc
"Don't discount flying pigs before you have good air defense." -- jvh at clinet.FI



More information about the Comp.unix.wizards mailing list