home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!dtix!darwin.sura.net!jvnc.net!yale.edu!ira.uka.de!math.fu-berlin.de!informatik.tu-muenchen.de!pazsan
- From: pazsan@Informatik.TU-Muenchen.DE (Bernd Paysan)
- Newsgroups: comp.lang.forth
- Subject: Re: Block versus file
- Message-ID: <1992Sep14.175419.20951@Informatik.TU-Muenchen.DE>
- Date: 14 Sep 92 17:54:19 GMT
- References: <dak.716483390@messua>
- Sender: news@Informatik.TU-Muenchen.DE (USENET Newssystem)
- Organization: Technische Universitaet Muenchen, Germany
- Lines: 39
- Originator: pazsan@hphalle5g.informatik.tu-muenchen.de
-
-
- Well, I have thougth quite a long time about the screen vs. stream
- problem. I do not agree withsome of David's points.
-
- DK>Any block structure imposed artificially on the
- DK>top of the file system will be SLOWER than fully utilizing the
- DK>file system.
-
- Almost every file system HAS a block structure below it, and in many
- cases, blocks are a 2^n bytes chunck with n integer and n<=10. So reading
- a Forth block (1K) is straigt forward, unbufferd and faster than
- arbitrary reading (while "arbitrary" means: less than block size). Even
- for my stream file interface I read and write blocks of 2^n bytes (where
- n depends on what I found useful). With scanning for line ends stream
- file interpretation is SLOWER than block file interpretation, although
- less blocks are to read. Now, it's not much slower, so it doesn't hurt.
- (and don't blame my scanner: I get 80 000 nl/min through it).
-
- The editor problem: One feature of my Forth (and of F83) I like very
- much is VIEW. Now VIEW from Forth to an external editor is easy. But I
- don't like to leave my editor while I do edit compile debug. So I have
- an editor window, a dialog window and I can do VIEW out of the editor
- (and eventually open a new window). If you do incremental coding,
- Screens are very nice. You can load each screen seperate. Files tend to
- grow, screens are limited (the average stream file is about 200 lines
- long in my system). And there is another nice feature: consistence. If I
- edit and load from the forth window, I don't have to care about saving
- (I should save if I crash the system, either). If I edit and load a text
- window, I have either to load from the text buffer (requires strictly an
- embedded editor) or I have to save (I must remember).
-
- So summarize: I tend to convert complete source into stream files,
- because they are smaller and most screens are nearly full, so if I had
- to do small changes, I have room to expand. And I tend to do very small
- things in stream files, too, because small stream files feel like one
- screen (and they don't waste screen 0).
- --
- Bernd Paysan
- "Keep it stupid simple!"
-