Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!usc!cs.utexas.edu!uunet!willett!ForthNet From: ForthNet@willett.UUCP (ForthNet articles from GEnie) Newsgroups: comp.lang.forth Subject: Non-Forth systems/languages. Message-ID: <524.UUL1.3#5129@willett.UUCP> Date: 22 Feb 90 01:57:04 GMT Organization: Latest link in the ForthNet chain. (Pgh, PA) Lines: 69 Date: 02-20-90 (21:10) Number: 2936 (Echo) To: L.ZETTEL Refer#: 2926 From: ZAFAR ESSAK Read: NO Subj: NON-FORTH SYSTEMS/LANGUAG Status: PUBLIC MESSAGE To: Len Zettel (GEnie Category 3, topic 16, msg ??) Re: Streams. Thankyou for your response to my earlier message. LZ> streams tend to impel you to..."Begin at the beginning, go LZ> through to the end, then stop". LZ> otherwise, depending on the capabilities of your operating LZ> system, you may have troubles. LZ> Certainly, backing up in a pure stream is usually less LZ> convenient than putting the water back in the hose. LZ> Long streams of stuff needing wholesale programmable LZ> modification just don't happen to me that often. In addition to the usefulness of streams when modifying long strings of stuff streams can also be very useful in the implementation of a database, where random access is the primary method of access. The implementation used of Streams in Forth was developed by Dan Phillips and fully documented with source in a proposal to the ANSI Committee and uploaded to the Forth Net. Maybe the benefits are the result of the implementation used, but I don't think that's all there is to it. The ability for "backing up" or resetting the stream pointer is a necessity and the syntax is as readable as BLOCK I/O. e.g. d1 ( old place ) >dseek d1 ( old place ) 1024 UM/MOD BLOCK + There may be some performance penalty for the stream as compared to the block approach depending on the implementation. Another advantage Streams offer is not having to remember the "boundaries" of blocks when data extends over from one to another. Certainly not a trivial requirement when data is variable length. Also the ability to switch streams at any time is required and can be provided by having "Stream Stacks" or using some other method of explicitly identifying the stream. What I find most enticing about Streams is the versatility of a few simple words such as IN ( --c) OUT ( c--) INPUT ( adr,n--) and OUTPUT ( adr,n--). LZ> As a long time admirer of the beauty in Kernighan and Plauger's LZ> Software Tools, I have now and again contemplated implementing LZ> them in Forth. Having not read this I guess it is going to require a trip to the library or bookstore. In the meantime, can you provide a brief summary of what you are refering to. Thanks, Zafar. --- * Via Qwikmail 2.01 NET/Mail : British Columbia Forth Board - Burnaby BC - (604)434-5886 ----- This message came from GEnie via willett through a semi-automated process. Report problems to: 'uunet!willett!dwp' or 'willett!dwp@gateway.sei.cmu.edu'