From: Tony Williams Subject: Re: Readable forth Date: Fri, 13 Dec 1996 10:18:45 +0000 (GMT) Message-ID: References: <57c0j4$604@majipoor.cygnus.com> <581hls$l3f@psilocin.gnu.ai.mit.edu> <32A89C16.1935@forth.com> <58pai8$np0@psilocin.gnu.ai.mit.edu> <32B0559F.393F@forth.com> <01bbe874$e9209e60$bba20fce@innereye> <32B09231.423A@austin.finnigan.com> X-NNTP-Posting-Host: ledelec.demon.co.uk MIME-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=ISO-8859-1 In article <32B09231.423A@austin.finnigan.com>, Tom Zimmer wrote: > > Gary Chanson wrote: > > > > Elizabeth Rather wrote in article > > <32B0559F.393F@forth.com>... > > > > > > In the meantime, we teach by example: by the code in our products, > > > in our courses and manuals, etc. You did, after all, have a teacher; > > > you weren't rummaging around by yourself figuring it out. > > > > The source code in your products is a very good example of why people > > consider Forth to be unreadable. I've worked with numerous PolyForth > > programmers who trace their bad coding styles to these examples. The first > > thing I do when I start working on one of their programs is to transfer it > > to text files and reformat it so that it's fairly readable. One of my > > clients paid be a lot of money to create a program to automate this process > > for use on a large project (resulting in a program called "Pretty Poly"). > > > Easy guys, one man's (woman's) unreadable code is another's > beautiful elegant masterpiece. > I would mildly support Gary Chanson's comment that the examples in the Polyforth manual, and the manual itself, tend towards being a little obtuse. Forth has a steep initial learning curve. Having a manual with a steep learning curve as well made it quite difficult for me to show prospective punters why they should consider Forth. I've always assumed that's why Leo Brodie came on the scene. Just a comment, not a Flame. -- [Tony Williams, Ledbury, Herefordshire, UK.---Pagewidth=64-----] From: "Jeremy Moller" Subject: TCP/IP and FORTH Date: 13 Dec 1996 16:06:26 GMT Message-ID: <01bbe908$8a92b060$20152ec2@jmoller.cemsys.com> I wonder has anybody ever heard of an implementation of TCP/IP using FORTH code.? ---------------------------------------------------------------------- Jeremy Moller CEM Systems Ltd. Belfast N. Ireland ------------------------------------------------------------------------- From: abooth@cix.compulink.co.uk ("Anthony Booth") Subject: Understanding compiler words. Message-ID: Date: Fri, 13 Dec 1996 15:39:43 GMT X-News-Software: Ameol How should I get to understand the area of compiler words etc? The following snatch of code is from the file FKERNEL.F in Win32Forth: : CHAR ( -- char ) BL WORD 1+ C@ ; : [CHAR] ( -- char ) CHAR [COMPILE] LITERAL ; IMMEDIATE : ' ( -- cfa ) DEFINED 0= ?MISSING ; : ['] ' [COMPILE] LITERAL ; IMMEDIATE : [COMPILE] ' COMPILE, ; IMMEDIATE The word [COMPILE] is defined here after it has been referenced twice. From where do the definitions of [CHAR] and ['] get their version of [COMPILE] ? What would happen if the definitions of [CHAR] and ['] were shifted down to appear below the definition of [COMPILE] ? If anybody could help me identify a textbook or other reference document which can clarify these sorts of compiler areas of Forth, particularly if it is in the spirit of Win32Forth and ANS, I would be grateful. In closing may I express my gratitude to messrs Andrew McKewan and Tom Zimmer for their good work in providing Win32Forth. Tony Booth Streatham London England abooth@cix.compulink.co.uk From: aph@cygnus.co.uk (Andrew Haley) Subject: Re: Readable forth Date: 13 Dec 1996 16:10:24 GMT Message-ID: <58rv5g$4vq@majipoor.cygnus.com> References: <57c0j4$604@majipoor.cygnus.com> <581hls$l3f@psilocin.gnu.ai.mit.edu> <32A89C16.1935@forth.com> <58pai8$np0@psilocin.gnu.ai.mit.edu> <32B0559F.393F@forth.com> <01bbe874$e9209e60$bba20fce@innereye> <32B09231.423A@austin.finnigan.com> Tom Zimmer (tzimmer@austin.finnigan.com) wrote: : Gary Chanson wrote: : > : > Elizabeth Rather wrote in article : > <32B0559F.393F@forth.com>... : > > : > > In the meantime, we teach by example: by the code in our products, : > > in our courses and manuals, etc. You did, after all, have a teacher; : > > you weren't rummaging around by yourself figuring it out. : > : > The source code in your products is a very good example of why people : > consider Forth to be unreadable. I've worked with numerous PolyForth : > programmers who trace their bad coding styles to these examples. The first : > thing I do when I start working on one of their programs is to transfer it : > to text files and reformat it so that it's fairly readable. One of my : > clients paid be a lot of money to create a program to automate this process : > for use on a large project (resulting in a program called "Pretty Poly"). : Easy guys, one man's (woman's) unreadable code is another's : beautiful elegant masterpiece. Perhaps we're coming to the crux of the matter here. I've read a lot of FORTH, Inc's code, and I consider it to be the best code that I've ever seen. In any language. I didn't like it at first; I wondered why it was laid out in such an apparently odd way, with little whitespace. But eventually I learned what the conventions were, and I came to realize that it really was better than what I had been used to. Gary's clients would have done better to keep their money and learn the conventions. IMHO, of course. Andrew. From: anton@a0.complang.tuwien.ac.at (Anton Ertl) Subject: Re: How do QUERY and TIB fit into ANS Forth? Date: 13 Dec 1996 16:33:04 GMT Message-ID: <58s0g0$3qe@news.tuwien.ac.at> References: <849384060.AA00649@ear.co.at> <32A20C99.33082CCC@informatik.tu-muenchen.de> <32a1f478.46786597@nntp.ix.netcom.com> <581of5$a67@news.tuwien.ac.at> <32a468de.1604524@nntp.ix.netcom.com> <58k039$1hb@news.tuwien.ac.at> <32add1bb.14452500@nntp.ix.netcom.com> In article <32add1bb.14452500@nntp.ix.netcom.com>, mirlo@ix.netcom.com (Mirlo) writes: > On 10 Dec 1996 15:37:13 GMT, anton@a0.complang.tuwien.ac.at (Anton > Ertl) wrote: > > >E.g., I was made aware of the problem when a user used a word that > >uses QUERY in a feature of Gforth that uses EVALUATE (interpreting > >Unix command line arguments). The concrete question that arose was: > >Should QUERY overwrite the EVALUATEd string or should it use a > >different buffer. Of course, similar questions arise for other cases. > > > > QUERY must not overwrite the EVALUATEd string. There are two > possibilities: > > 1. If QUERY does not break the input source nesting stack/chain, then > the intent is to defer processing of the remainder of EVALUATE's > string until a later time. This opens up another question: Is such behaviour ANS conforming? The entry for EVALUATE just states that, after setup, EVALUATE interprets; When the parse area is empty, it restores the prior input source specification. I guess that "interpret" means interpreting from the parse area, which is part of the input buffer (according to 2.1). If this is correct, the QUERY, by making the terminal input buffer it writes the input buffer, eliminates any possibility to process the rest of the EVALUATEd string. > 2. If QUERY breaks the input source nesting stack/chain, then you do > not care about the previous contents of the string. You cannot use it > as an input buffer, however, because you do not know the true nature > or size of the buffer. There are systems in which a string compiled > by S" is inserted into the midst of executable code or tokens. If > such a string containing QUERY was used as an input buffer, the QUERY > can overwrite not just the previous string contents, but the running > program as well --> program crash. True. But that does not say that such an implementation would be non-standard (although I don't think it is standard). If it is standard, the programmer has to ensure that such situations don't happen. - anton -- M. Anton Ertl Some things have to be seen to be believed anton@mips.complang.tuwien.ac.at Most things have to be believed to be seen http://www.complang.tuwien.ac.at/anton/home.html From: anton@a0.complang.tuwien.ac.at (Anton Ertl) Subject: Re: Practicality of Prolog in Forth (was Re: THEOREM-PROVER in FORTH wanted ...) Date: 13 Dec 1996 16:48:22 GMT Message-ID: <58s1cm$3qe@news.tuwien.ac.at> References: <32A5D609.66F3@hol.gr> <32A5DCDE.75E0@hol.gr> <58k0jh$1hb@news.tuwien.ac.at> <32AEF4C0.297@netmail.mnet.uswest.com> In article <32AEF4C0.297@netmail.mnet.uswest.com>, "Karen A. Morrissey" writes: > Anton Ertl wrote: > > [...] > > I have also though a bit about this. My conclusion is that Prolog, in > > contrast to most other languages) is not very well suited for using a > > LIFO strategy and an implementation on a stack-based virtual machine > > (like Forth's virtual machine) will suffer performancewise. > > [...] > > I've got a paper somewhere in my files about an implementation of Prolog > in Forth and its performance on one of the Forth machines. I > corresponded briefly with the author. This was circa 1988. > > I recall the performance to be unremarkably good. On a stack machine there's little choice. > The author claimed > that implementing Prolog in Forth was rather easy. I think he > implemented a WAM-like engine. What I meant was that a Prolog implementation based on a stack-based virtual machine interpreter would suffer compared to an implementation based on a register-based virtual machine interpreter (like the WAM) or on other random-access virtual machines. I don't remember the reasons for this conclusion, so perhaps I was wrong. - anton -- M. Anton Ertl Some things have to be seen to be believed anton@mips.complang.tuwien.ac.at Most things have to be believed to be seen http://www.complang.tuwien.ac.at/anton/home.html From: anton@a0.complang.tuwien.ac.at (Anton Ertl) Subject: Re: How do QUERY and TIB fit into ANS Forth? Date: 13 Dec 1996 16:40:04 GMT Message-ID: <58s0t4$3qe@news.tuwien.ac.at> References: <849384060.AA00649@ear.co.at> <32add1bb.14452500@nntp.ix.netcom.com> <58mpbr$huk@sdcc12.ucsd.edu> In article <58mpbr$huk@sdcc12.ucsd.edu>, ir230@sdcc3.ucsd.edu (john wavrik) writes: > Actually, has anyone but me noticed that the ANS-Team members have > dropped out of sight in this newsgroup? (Except for Elizabeth Rather > who frequently contributes product advertisements). Now that you mention it... It's too hot for them here:-) BTW, I just looked up the X3J14 members as listed in the standard, and saw that Wil Baden was no member. So, I apologize for calling him a culprit (although I did it tongue-in-cheek anyway). Perhaps this discussion shows that he was wise when he deviated from the standard in this area. - anton -- M. Anton Ertl Some things have to be seen to be believed anton@mips.complang.tuwien.ac.at Most things have to be believed to be seen http://www.complang.tuwien.ac.at/anton/home.html From: Andrew McKewan Subject: Re: Understanding compiler words. Date: Fri, 13 Dec 1996 10:46:28 -0600 Message-ID: <32B18864.21F1@austin.finnigan.com> References: Reply-To: mckewan@austin.finnigan.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.0 (WinNT; I) Anthony Booth wrote: > > How should I get to understand the area of compiler words etc? > The following snatch of code is from the file FKERNEL.F in Win32Forth: > > : CHAR ( -- char ) > BL WORD 1+ C@ ; > > : [CHAR] ( -- char ) > CHAR [COMPILE] LITERAL ; IMMEDIATE > > : ' ( -- cfa ) > DEFINED 0= ?MISSING ; > > : ['] ' [COMPILE] LITERAL ; IMMEDIATE > > : [COMPILE] ' COMPILE, ; IMMEDIATE > > The word [COMPILE] is defined here after it has been referenced twice. > From where do the definitions of [CHAR] and ['] get their version of > [COMPILE] ? The version used in the definitions of [CHAR] and ['] is defined in the metacompiler (see META.F). This version is in a vocabulary (TRANSITION) that is searched before the target words. This vocabulary is used for all words that will be immediate in the target. We cannot execute any target words, so there must be duplicate definitions that do the same thing in the metacompiler. > What would happen if the definitions of [CHAR] and ['] were shifted down > to appear below the definition of [COMPILE] ? Nothing. The TRANSITION vocabulary is searched before the TARGET, so that the definition in the metacompiler will be found first. > If anybody could help me identify a textbook or other reference document > which can clarify these sorts of compiler areas of Forth, particularly if > it is in the spirit of Win32Forth and ANS, I would be grateful. Metacompiling is not part of any of the Forth standards. The model I use is from F83. Every system seems to do things just a little differently. There are some articles in back issues of Forth Dimensions that might give you some insight. Metacompiling is one of the more difficult concepts to understand in Forth because it looks like normal Forth source, but behaves differently in subtle ways, as you have found. -- Andrew McKewan mckewan@austin.finnigan.com Finnigan Corporation 2215 Grand Avenue Parkway Tel: (512) 251-1574 Austin, TX 78728-3812 Fax: (512) 251-1547 From: znmeb@teleport.com () Subject: Re: How do QUERY and TIB fit into ANS Forth? Date: 13 Dec 1996 20:40:17 GMT Message-ID: <58sevh$njl@maureen.teleport.com> References: <849384060.AA00649@ear.co.at> <32add1bb.14452500@nntp.ix.netcom.com> <58mpbr$huk@sdcc12.ucsd.edu> <58s0t4$3qe@news.tuwien.ac.at> Anton Ertl (anton@a0.complang.tuwien.ac.at) wrote: : In article <58mpbr$huk@sdcc12.ucsd.edu>, ir230@sdcc3.ucsd.edu (john wavrik) writes: : > Actually, has anyone but me noticed that the ANS-Team members have : > dropped out of sight in this newsgroup? (Except for Elizabeth Rather : > who frequently contributes product advertisements). : Now that you mention it... It's too hot for them here:-) Nope -- they're just recovering from FORML :-). -- znmeb@teleport.com (M. Edward Borasky) http://www.teleport.com/~znmeb How to Stop A Folksinger Cold # 2 "Are you going to Scarborough Fair?..." No. From: wilbaden@netcom.com (W.Baden) Subject: Re: How do QUERY and TIB fit into ANS Forth? Message-ID: References: <849384060.AA00649@ear.co.at> <32add1bb.14452500@nntp.ix.netcom.com> <58mpbr$huk@sdcc12.ucsd.edu> <58s0t4$3qe@news.tuwien.ac.at> <58sevh$njl@maureen.teleport.com> Date: Fri, 13 Dec 1996 21:02:57 GMT znmeb@teleport.com wrote: : Anton Ertl (anton@a0.complang.tuwien.ac.at) wrote: : : In article <58mpbr$huk@sdcc12.ucsd.edu>, ir230@sdcc3.ucsd.edu (john wavrik) writes: : : > Actually, has anyone but me noticed that the ANS-Team members have : : > dropped out of sight in this newsgroup? (Except for Elizabeth Rather : : > who frequently contributes product advertisements). : : Now that you mention it... It's too hot for them here:-) : Nope -- they're just recovering from FORML :-). The only ANS members at FORML were John Rible and John Stevenson. -- Procedamus in pace. Wil Baden Costa Mesa, California From: bhoyt@news.voyager.co.nz (Bruce Hoyt) Subject: Re: Understanding compiler words. Date: Sat, 14 Dec 1996 09:47:20 -0500 Message-ID: <43rsyYQUoweS090yn@news.voyager.co.nz> References: In article , abooth@cix.compulink.co.uk ("Anthony Booth") wrote: >How should I get to understand the area of compiler words etc? >The following snatch of code is from the file FKERNEL.F in Win32Forth: > >: CHAR ( -- char ) > BL WORD 1+ C@ ; > >: [CHAR] ( -- char ) > CHAR [COMPILE] LITERAL ; IMMEDIATE > >: ' ( -- cfa ) > DEFINED 0= ?MISSING ; > >: ['] ' [COMPILE] LITERAL ; IMMEDIATE > >: [COMPILE] ' COMPILE, ; IMMEDIATE > >The word [COMPILE] is defined here after it has been referenced twice. >From where do the definitions of [CHAR] and ['] get their version of >[COMPILE] ? Ah the joys of learning about meta-compiling! The trick here is to notice that these words are 'immediate'. They are being used to compile things, in many cases long before they themselves are (re)defined. Of course they are defined in the underlying system that is doing the meta-compiling. But the references you make are just now being defined for the system being built. Since [compile] is immediate, it is acting (rather) than being acted on. It is the version of [compile] in the underlying meta-compiler that is acting. Depending on how your meta-compiler works you may *not* want to redefine [compile] before using it, because then you will be using the new version which may compile things in the wrong place or in the wrong way. Perhaps one should think about first things first: namely, where did the definitions of ':' and ';' come from since they are used many!!! times before they are defined. This is the main problem one has to think through when writing a meta-compiler. ':' has to compile 'docol' (or whatever you call it in your system). If your forth is threaded forth like Win32, then this will require a knowledge of the address of 'docol'. We are meta-compiling (i.e. producing a new fkernel so the 'docol' that is compiled by ':' has to be a new 'docol' generated for the new fkernel. This means making a new ':' to compile the new 'docol' (or else making ':' smart so it can distinguish between interpreting and meta-compiling modes). It is this new ':' which is used to define all the words for fkernel. Later ':' itself is defined but we needed to compile colon definitions long before we could define ':' itself -- thus the bend-over-backwards-and-pick-yourself-up-by-your- bootstraps method. Hope this helps. The best way to learn is to write your own meta-compiler and then you will be forced to think through the issues involved. It is not difficult -- but it does require thinking. -- //----------------------------------- // Bruce Hoyt // email: bhoyt@voyager.co.nz //----------------------------------- From: newberry@lagrange.engin.umich.edu (Byron Lee Newberry) Subject: Best forth for beginner? Date: 13 Dec 1996 23:59:09 GMT Message-ID: <58sqkd$50p@srvr1.engin.umich.edu> Hello, I have been interested in forth for some time now and have finally found the time to start giving it some serious study. I am looking for a good forth system to start with for the DOS or WINDOWS platform. I have played around with thisforth and timbre some. Both seem usable, but I am interested in the comments of some experienced forth users. If it matters I am a mechanical engineering doctoral student and am primarily interested in numerical analysis applications. All advice is appreciated! Byron N. ===================================================================== = Byron L. Newberry = = University of Michigan = = Structural Dynamics and Vibrations = = (313) 936-3824 = = newberry@engin.umich.edu = ===================================================================== From: wilbaden@netcom.com (W.Baden) Subject: Re: How do QUERY and TIB fit into ANS Forth? Message-ID: References: <849384060.AA00649@ear.co.at> <32add1bb.14452500@nntp.ix.netcom.com> <58mpbr$huk@sdcc12.ucsd.edu> <58s0t4$3qe@news.tuwien.ac.at> Date: Fri, 13 Dec 1996 22:07:07 GMT Anton Ertl (anton@a0.complang.tuwien.ac.at) wrote: : BTW, I just looked up the X3J14 members as listed in the standard, and : saw that Wil Baden was no member. So, I apologize for calling him a : culprit (although I did it tongue-in-cheek anyway). Perhaps this : discussion shows that he was wise when he deviated from the standard : in this area. Apology not necessary in any case. I was on the Committee 1987-1989 but dropped out for several reasons. By far the two greatest problems that the Standard has are over-specification and innovation. -- Let us go forth in peace. Wil Baden Costa Mesa, California From: Elizabeth Rather Subject: Re: TCP/IP and FORTH Date: Fri, 13 Dec 1996 15:28:56 -0800 Message-ID: <32B1E6B7.46D3@forth.com> References: <01bbe908$8a92b060$20152ec2@jmoller.cemsys.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.0 (Win95; U) Jeremy Moller wrote: > > I wonder has anybody ever heard of an implementation of TCP/IP using FORTH > code.? Greg Bailey has an extensive implementation, but it runs on his native PC Forth. It is heavily assembler-code intensive, for performance (which is spectacular!). Howie Goodell has interfaced Greg's stuff to one of our older polyFORTH systems. Other customers of our have simply used an off-the-shelf DOS TCP/IP package and called it from polyFORTH using our bridgeFORTH extensions (included with the system). Because this is relatively easy, and there are several such packages available, there has not been a lot of pressure to develop an all-Forth version. It would be a big job. Cheers, Elizabeth -- =============================================== Elizabeth D. Rather 1-800-55-FORTH FORTH Inc. 310-372-8493 111 N. Sepulveda Blvd. Fax: 310-318-7130 Manhattan Beach, CA 90266 http://www.forth.com "Forth-based products and Services for real-time applications since 1973." =============================================== From: Don Groves Subject: Forth and the WWW Date: Fri, 13 Dec 1996 19:33:05 -0800 Message-ID: <32B21FF1.7A7F@pacifier.com> Reply-To: dgroves@pacifier.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.01 (Win95; I) I am new to this newsgroup (this is my first post) so please forgive me if I am repeating an old topic. Since the Internet and WWW has changed, is changing, and will continue to change almost everything about how people use their computers and how software is distributed, has anyone given any thought as to how we might insert Forth into the mix? Given that we probably won't see a Forth-enabled web browser any time soon, how can Forth-based content be distributed over the Internet? I can think of two ways - (1) compile Forth code into Java bytecodes (call it Froth, or Foam, or Fava Beans???); or (2) develop a browser plug-in that implements the Forth Virtual Machine. It seems to me that with either of these techniques we could distribute Forth Applets. Does any of this make sense? Is it doable? Is it already being done? Am I all wet here? My knowledge of Forth/Win95/Mac internals is not good enough to lead a project of this magnitude but I would gladly sign on as a worker bee. Don Groves dgroves@pacifier.com From: kragen@puma.tcs.com (Kragen Sittler) Subject: Re: THEOREM-PROVER in FORTH wanted (based on LAWS OF FORM) Date: 13 Dec 1996 22:02:08 -0800 Message-ID: <58tft0$8qm@puma.tcs.com> References: <32A5D609.66F3@hol.gr> <32A5DCDE.75E0@hol.gr> <32A9AFDB.57AB@engin.umich.edu> In article <32A9AFDB.57AB@engin.umich.edu>, Andrew Jon Sallee wrote: >Dang, > Here we went and spent half of a 4 credit, senior level, class in >"Theory of Computablility" proving there was no algorithm for proving >theorems. Shoot! >Well, back to the drawing board. There are some propositions which can neither be proved nor disproved. Therefore, there is no general procedure for finding out whether a theorem is true or false. There is no general procedure which will tell whether or not a particular proposition is decidable or not. (For the proof of the above two assertions, read Goedel's paper on his Incompleteness Theorem, or the highly readable and entertaining treatment of it in Goedel, Escher, Bach.) There is a general procedure which will prove any provable theorem, obviously. (I'm sure your class discussed this.) Unfortunately, it takes unbounded time, and does not halt on theorems that cannot be proved. Thus it is not an 'algorithm' in the sense in which CS classes generally use the term. The simplest procedure that fits this description is this: do a breadth-first search of all the possible theorems of the system you're proving theorems in. Start with all of the axioms of the system; then, for each axiom, apply each transformation rule, generating a bunch of theorems; then, for each currently known theorem, do the same thing; repeat. This will obviously eventually prove every theorem that can be proved in the formal system. Equally obviously, it will take an unbounded amount of time to prove any particular theorem. (It will also take a ridiculous amount of time to prove anything interesting, but since this is a class about what is *possible*, not what is *reasonable*, we'll ignore that.) There are ways of making this search more reasonable in time. But they don't change its basic properties: 1) Given any proposition, it can't figure out anything about it in bounded time, where "anything" means: it's provable, its opposite is provable, neither it nor its opposite is provable (that is, it's undecidable), whether the question of its undecidability is undecidable, etc. 2) In fact, we may not be able to figure out any of those things at all, even given an infinite amount of time. You can decide to give up after a certain amount of time, or after you stop seeing leads that look very promising. This turns your general procedure into an algorithm, except that sometimes it won't find a proof that exists. So you have an algorithm that proves theorems, except that there are certain theorems it can't prove, even though they're provable. Perhaps you should followup. -- Peace, Kragen +1 408 975 2632 From: "Gary Chanson" Subject: Re: FORTH Fallacy Date: 2 Dec 1996 20:12:36 GMT Message-ID: <01bbe08d$4d945d40$bea10fce@innereye> References: <01bbd4c0$1e4888a0$3edd98ce@icetiger> <56uea0$2uu@news.NL.net> <3295F5F0.41C6@nippper.phx.mcd.mot.com> <01bbd9d9$11ae8040$LocalHost@innereye> <57e3la$l3l@sjx-ixn10.ix..netcom.com> <849440582snz@transcontech.co.uk> <01bbe007$725e5bc0$d1a10fce@innereye> Tony Williams wrote in article > > Don't wish to start an argument, but... > > To my mind the best programmes come from people who understand > the logic of the prob first, long before you get to coding. > > You have to fully understand the user/customer's needs from the > prog and preferably document this in plain english. In fact, > proper documentation gives you the skeleton of the prog in a > pseudo-forth that makes life a lot more secure when you do code. > > That also includes an understanding that there will be > exceptions that you cannot imagine at design-time and therefore > putting in global safe-behaviour, whatever happens. > > The worst proggers are those who fancy themselves are hot-shots. > They will do very clever coding but their overall progs will > run brilliantly only so long as the wind is the right direction. > The first sniff of an unspecified condition= Crash. > > Been there, seen it, worst luck. No argument because I totally agree! -- -GJC --- * Arcane Incantations BBS * Windows95 * Programs - Tools - Support * * 617-899-6672 * DOS * Free Access * From: Mark Flacy Subject: Re: Best forth for beginner? Date: 14 Dec 1996 00:19:42 -0600 Message-ID: References: <58sqkd$50p@srvr1.engin.umich.edu> Well, a very good PD forth for DOS is F-PC (latest version findable at www.taygeta.com). If you're willing to fork out some ducats, I'm sure some of our forth vendors will tell you about their systems. -- \ ---------------------------------------------------------------------- \ Mark A. Flacy | flacy@nortel.com | ESN 445-8347 \ "There's one in every crowd | (214) 685-8347 | Department H231 \ and it's usually me." | | \ ---------------------------------------------------------------------- \ Someday I may speak for Northern Telecom (Nortel). \ Someday pigs may howl at a full moon. \ Expect the latter to occur first. \ ---------------------------------------------------------------------- From: jon@taygeta.com (J. D. Verne) Subject: comp.lang.forth FAQ-lite Supersedes: Date: 14 Dec 96 14:14:14 GMT Expires: 28 Dec 96 07:30:02 Message-ID: Reply-To: faq@taygeta.com (FAQ maintainers list) Summary: A pointer to, and a short description of, the Forth Programming Language FAQ-files posted regularily to comp.lang.forth. Keywords: FAQ FORTH FIG Originator: jon@www.taygeta.com Posted-By: auto-faq 3.3 beta (Perl 5.001) Archive-name: computer-lang/forth-faq-lite Posting-Frequency: Weekly Here is a brief summary and description of the Forth language Frequently Asked Questions files. They are posted monthly to the comp.lang.forth USENET group, and are updated regularily. These files are available for reading, or downloading, at: http://www.taygeta.com/fig.html ftp://ftp.forth.org/pub/Forth/FAQ If the site is slow or busy, please try again, later. ==> forthfaq.1 'general' <== comp.lang.forth Frequently Asked Questions, part 1 of 6 General/Miscellaneous - a brief historical background, a discussion of standards, and an overview of the FAQ - An HTML version is available at: http://www.complang.tuwien.ac.at/forth/faq/faq-general.html ==> forthfaq.2 'online' <== comp.lang.forth Frequently Asked Questions, part 2 of 6 Online Resources - a relatively comprehensive guide to Forth info online - An HTML version is available at: http://www.complang.tuwien.ac.at/forth/forl.html ==> forthfaq.3 'vendors' <== comp.lang.forth Frequently Asked Questions, part 3 of 6 Forth Vendors - a listing of Forth vendors and authors ==> forthfaq.4 'systems' <== comp.lang.forth Frequently Asked Questions, part 4 of 6 Forth Systems: Commercial, Shareware, and Freeware - a large listing of various Forth and Forth-like systems for many different architectures (& budgets...) ==> forthfaq.5 'books' <== comp.lang.forth Frequently Asked Questions, part 5 of 6 Books, Periodicals, and Tutorials - a bibliography of printed resources available for Forth users ==> forthfaq.6 'groups' <== comp.lang.forth Frequently Asked Questions, part 6 of 6 Forth Groups & Organizations - a listing of organizations for the Forth professional, and hobbyist Please direct any comments or queries to . From: "Michael A. Losh" Subject: Re: Best forth for beginner? Date: Sat, 14 Dec 1996 10:10:22 -0500 Message-ID: <32B2C35E.1694@tir.com> References: <58sqkd$50p@srvr1.engin.umich.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.0 (Win95; I) Byron Lee Newberry wrote: > > Hello, > > I have been interested in forth for some time now and have finally > found the time to start giving it some serious study. I am looking > for a good forth system to start with for the DOS or WINDOWS platform. > I have played around with thisforth and timbre some. Both seem > usable, but I am interested in the comments of some experienced forth > users. If it matters I am a mechanical engineering doctoral student > and am primarily interested in numerical analysis applications. > All advice is appreciated! > > Byron N. You will probably get a variety of answers. There are many Forth systems to choose from! Beginners are often encouraged to look a very simple systems to start with, just to avoid the intimidation of a system with thousands of words (callable routines). Simple systems for DOS would be eForth and Pygmy, both of which you can find at the Forth Interest Group (FIG) website: http://www.forth.org/fig.html (home page) ftp://ftp.taygeta.com/pub/Forth/Pygmy/pygmy14.exe (for Pygmy) ftp://ftp.taygeta.com/pub/Forth/Archive/eForth/eforth.zip I have a feeling that you will quickly hit the limitations of these smaller systems in terms of math. Some other DOS and Windows Forth have nice math capabilities, but these systems are much larger and a little more difficult for a beginner to use, but at least the first two of these are fairly well documented: ftp://ftp.taygeta.com/pub/Forth/FPC/fpc36.zip (F-PC, DOS) ftp://ftp.taygeta.com/pub/Forth/Reviewed/wfshr101 (WinForth, Windows 3.1 and higher) ftp://ftp.taygeta.com/pub/Forth/Win32For/w32for33.exe (Win32Forth, Windows 95 and NT) The first and third of these were developed by some of the same people, and are public domain. The second of these, WinForth Shareware 1.01, is not related to Win32Forth, and comes from PC columnist Ray Duncan's Laboratory Microsystems, Inc. I have used F-PC and WinForth quite a bit, and like them both. I have been starting to learn Win32Forth now that I have Windows 95 at home and at work. Please take some time to look around the FIG website. There are many other systems available there, as well as reviewed code for advanced math and numerical analysis called the Forth Scientific Library Project: http://www.forth.org/fsl/sciforth.html Hope this gets you started! Post any questions you have later. Good Luck! -- Mike Losh mlosh@tir.com From: jack@purr.demon.co.uk (Jack Campin) Subject: Re: Readable forth Date: 14 Dec 1996 02:58:53 GMT Message-ID: <2108@purr.demon.co.uk> References: <57c0j4$604@majipoor.cygnus.com> <581hls$l3f@psilocin.gnu.ai.mit.edu> <32A89C16.1935@forth.com> <58pai8$np0@psilocin.gnu.ai.mit.edu> <58q7md$71v@maureen.teleport.com> X-NNTP-Posting-Host: purr.demon.co.uk znmeb@teleport.com () writes: > Mike Coughlin (mikc@gnu.ai.mit.edu) wrote: >: There is a big difference between the style of writing short program >: and a large project. There are no examples of published large Forth >: projects. Thus there is no way to learn to manage the source for a >: big Forth project except to start at zero and flounder around. > There are few examples of published large codes in *any* language. Now, > if you want to spend $xx,xxx on a UNIX source code license ... :-) Fortran/Ada: The NAG library. Pascal: TeX. C: gcc, Gnu Emacs, the X window system, the Exodus storage manager (or whatever it's called now), umpteen language interpreters... SML: Isabelle, HOL. Lisp: NUPRL, OBJ, Macsyma. All systems involving at least tens of person-years of work. (And I know of at least 4 Unix systems out there with free source code). The Forth Scientific Library is a good start in this direction, but a very small one. Our Official Resident Grump has a point, but it's hard to see a quick fix - the systems I list above were mostly created by teams in academia with large chunks of public money. The Forth world doesn't have that sort of cred with the people who run and fund research enterprises using Chinese armies of postgraduates. And there just aren't huge publicly funded research projects in areas where Forth is the ideal platform; or where there are (space, say) the code doesn't get published. (And *that* is odd; I thought NASA had publication of everything it did as part of its remit? why isn't there an ftp site for telemetry and signal-processing Forth code as a result of their work?) ----------------------------------------------------------------------------- Jack Campin jack@purr.demon.co.uk T/L, 2 Haddington Place, Edinburgh EH7 4AE, Scotland (+44) 131 556 5272 --------------------- Save Scunthorpe from Censorship --------------------- From: sfp@mpeltd.demon.co.uk (Stephen Pelc) Subject: Re: TCP/IP and FORTH Date: Sat, 14 Dec 96 17:28:56 GMT Message-ID: <850584536snz@mpeltd.demon.co.uk> References: <01bbe908$8a92b060$20152ec2@jmoller.cemsys.com> Reply-To: sfp@mpeltd.demon.co.uk X-Mail2News-User: sfp@mpeltd.demon.co.uk X-Mail2News-Path: mpeltd.demon.co.uk In article <01bbe908$8a92b060$20152ec2@jmoller.cemsys.com> jmoller@devel.cemsys.com "Jeremy Moller" writes: > I wonder has anybody ever heard of an implementation of TCP/IP using FORTH > code.? There are several. One is from Athena, which covers the full TCP/IP stack. Another has bee developed for MPE, and covers IP, UDP, ARP, RARP, and enough of ICMP for industrial use. It is not yet a full blown product, because we've been rather busy lately. I've heard of others. Please contact us for more details. -- Stephen Pelc, sfp@mpeltd.demon.co.uk MicroProcessor Engineering - More Real, Less Time 133 Hill Lane, Southampton SO15 5AF, England tel: +44 1703 631441, fax: +44 1703 339691 From: Peter Knaggs Subject: Re: Forth and the WWW Date: Sat, 14 Dec 1996 14:10:20 +0000 Message-ID: <32B2B54C.7070@paisley.ac.uk> References: <32B21FF1.7A7F@pacifier.com> Reply-To: pjk@paisley.ac.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.01Gold (Win95; I) To: dgroves@pacifier.com Don Groves wrote: > > Given that we probably won't see a Forth-enabled web browser any time > soon, Try the Web-Book. It uses ShBoom II, a reworking of Chuck's ShBoom chip. > (1) compile Forth code into Java bytecodes (call it Froth, or Foam, > or Fava Beans???); Sun already have one. They supply an OpenFirmware (ie Forth) system with their NC systems, which use a Java CPU. I am sure others are also working on it. Indeed I may even rework my system for bytecode... > (2) develop a browser plug-in that implements the Forth Virtual > Machine. Try Markus Dahm's MOON. You can develop plug-ins with ProForth for Windows very easily, I guess the same is true for Win32Forth but I've never bothered looking. -- Peter Knaggs pjk@paisley.ac.uk http://cis.paisley.ac.uk/forth/index.html http://cis.paisley.ac.uk/scripts/staff.pl/knaggs/about/index.html Ps: On the look out for another job... From: znmeb@news.teleport.com () Subject: Re: THEOREM-PROVER in FORTH wanted (based on LAWS OF FORM) Date: 14 Dec 1996 17:49:32 GMT Message-ID: <58upbc$8nm@maureen.teleport.com> References: <32A5D609.66F3@hol.gr> <32A5DCDE.75E0@hol.gr> George Alex Stathis (hyperlex@hol.gr) wrote: : : BTW, Forth-based Prolog interpreters would also be interesting... This exists! Unfortunately, I don't have the reference here at home, but I'll post it Monday. It was in a classic book on expert systems in Forth. LISP and Prolog constructs were implemented in Forth 83, along with some actual AI examples. I don't remember if there was a theorem prover as well, although I think there was a unification algorithm. -- znmeb@teleport.com (M. Edward Borasky) http://www.teleport.com/~znmeb I support the right to keep and arm bears. From: sfp@mpeltd.demon.co.uk (Stephen Pelc) Subject: Re: Using Forth in systems level programming Date: Sat, 14 Dec 96 17:18:37 GMT Message-ID: <850583917snz@mpeltd.demon.co.uk> References: <58kglc$i65@lex.zippo.com> Reply-To: sfp@mpeltd.demon.co.uk X-Mail2News-User: sfp@mpeltd.demon.co.uk X-Mail2News-Path: mpeltd.demon.co.uk In article <58kglc$i65@lex.zippo.com> cjolley@oz.sunflower.org "Charles A. Jolley" writes: > In article , jfox@netcom.com (Jeff Fox) wrote: > >It is like having a compiler with > >source level debugging that is interactive built into the target, > >but the target will contain just your target code and very tiny > >bit of code to talk to the target compiler system. > > > > Where would I find such a compiler? MPE's Forth cross compilers include this option. For more details contact us at one of addresses below. We'll send you a catalogue. -- Stephen Pelc, sfp@mpeltd.demon.co.uk MicroProcessor Engineering - More Real, Less Time 133 Hill Lane, Southampton SO15 5AF, England tel: +44 1703 631441, fax: +44 1703 339691 From: Bernd Paysan Subject: Re: Readable forth Date: Sat, 14 Dec 1996 01:20:30 +0100 Message-ID: <32B1F2CE.76A65DFA@informatik.tu-muenchen.de> References: <57c0j4$604@majipoor.cygnus.com> <581hls$l3f@psilocin.gnu.ai.mit.edu> <32A89C16.1935@forth.com> <58pai8$np0@psilocin.gnu.ai.mit.edu> <58q7md$71v@maureen.teleport.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.0 (X11; I; Linux 2.1.13 i586) znmeb@teleport.com wrote: > > Mike Coughlin (mikc@gnu.ai.mit.edu) wrote: > > : There is a big difference between the style of writing > : short program and a large project. There are no examples > : of published large Forth projects. Thus there is no way > : to learn to manage the source for a big Forth project except > : to start at zero and flounder around. > > There are few examples of published large codes in *any* language. Now, > if you want to spend $xx,xxx on a UNIX source code license ... :-) I spent $00,000 and got a Linux source code license ;-). And if you want to see more code in one package, get GCC or X... Linux is quite readable, but GCC isn't well structured (you never know where to look at), and since important parts of the code are generated out of other unusual representations, it's difficult to dig in. -- Bernd Paysan "Late answers are wrong answers!" http://www.informatik.tu-muenchen.de/~paysan/ From: Bernd Paysan Subject: Re: Readable forth Date: Sat, 14 Dec 1996 01:24:04 +0100 Message-ID: <32B1F3A4.501263BD@informatik.tu-muenchen.de> References: <57c0j4$604@majipoor.cygnus.com> <581hls$l3f@psilocin.gnu.ai.mit.edu> <32A89C16.1935@forth.com> <58pai8$np0@psilocin.gnu.ai.mit.edu> <58q7md$71v@maureen.teleport.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.0 (X11; I; Linux 2.1.13 i586) znmeb@teleport.com wrote: > > Mike Coughlin (mikc@gnu.ai.mit.edu) wrote: > > : There is a big difference between the style of writing > : short program and a large project. There are no examples > : of published large Forth projects. Thus there is no way > : to learn to manage the source for a big Forth project except > : to start at zero and flounder around. > > There are few examples of published large codes in *any* language. Now, > if you want to spend $xx,xxx on a UNIX source code license ... :-) I spent $00,000 and got a Linux source code license ;-). And if you want to see more code in one package, get GCC or X... Linux is somewhat readable, but GCC isn't well structured (you never know where to look at), and since important parts of the code are generated out of other unusual representations, it's difficult to dig in. And X is just too complex... -- Bernd Paysan "Late answers are wrong answers!" http://www.informatik.tu-muenchen.de/~paysan/ From: peb@transcontech.co.uk ("Paul E. Bennett") Subject: Re: TCP/IP and FORTH Date: Fri, 13 Dec 96 17:44:54 GMT Message-ID: <850499094snz@transcontech.co.uk> References: <01bbe908$8a92b060$20152ec2@jmoller.cemsys.com> Reply-To: peb@transcontech.co.uk X-Mail2News-User: peb@transcontech.co.uk X-Mail2News-Path: tcontec.demon.co.uk In article <01bbe908$8a92b060$20152ec2@jmoller.cemsys.com> jmoller@devel.cemsys.com "Jeremy Moller" writes: > I wonder has anybody ever heard of an implementation of TCP/IP using FORTH > code.? > > ---------------------------------------------------------------------- > Jeremy Moller > CEM Systems Ltd. > Belfast > N. Ireland > ------------------------------------------------------------------------- I understand that MPE have one. I shall have to be asking them about it soon myself. You can contact Steve Pelc of MPE at sfp@mpeltd.demon.co.uk or by phone on +44 (0)1703-631441 or fax on +44 (0)1703-339691. -- Paul E. Bennett Transport Control Technology Ltd. +44 (0)117-9499861 Going Forth Safely From: Chris Jakeman Subject: Conversion Date: Sat, 14 Dec 1996 18:59:53 +0000 Message-ID: X-NNTP-Posting-Host: apvpeter.demon.co.uk MIME-Version: 1.0 Ever noticed that the sequence of hours is .. 11:00am 12:00pm 1:pm .. ? Odd isn't it? I did some conversions from AM and PM to hours since midnight today and ended up with: : Meridian>24Hr ( PMFlag MHours -- 24Hours ) 12 MOD SWAP IF 12 + THEN ; Bye for now _ _______________________| |_____ Chris Jakeman / _Forth_Interest_Group_| |____/ / /_ __ ______ _ _ | | __ at Peterborough / __/ / / / __ / | | | | | |/ / (a cathedral city / / / / / /_/ / | \_| | | < 80 miles north of London) /_/ /_/ /___ / \____| |_|\_\ Where do you come from? / / ______________/ / United Kingdom Voice +44 (0)1733 753489 /_______________/ Chapter From: mirlo@ix.netcom.com Subject: Re: How do QUERY and TIB fit into ANS Forth? Date: Mon, 02 Dec 1996 22:51:16 GMT Message-ID: <32a3558e.4434589@nntp.ix.netcom.com> References: <849578279.AA00658@ear.co.at> X-NETCOM-Date: Mon Dec 02 8:49:13 PM PST 1996 On Tue, 03 Dec 1996 02:56:01 +0100, ehp@ear.co.at (Ewald Pfau) wrote: >m> The X3J14 dpANS-6 Document states that LOAD restores the input source >m> specification as soon as the specified block is parsed. It also >m> explicitly defines THRU in terms of LOAD. The system implementor >m> could avoid the undesirable behaviour by defining LOAD and THRU so >m> that REFILL does not even know that a block is being used: >m> : LOAD ( block# -- ) BLOCK 1024 EVALUATE ; >m> : THRU ( min max -- ) 1 + SWAP DO I LOAD LOOP ; > >REFILL is a no-op while EVALUATing. With the above scenario, I think, that the >demand for a high level language environment should be more reasonable than to >ask for just one more trick to be offered. Your example reminds me of some >special ways of ease of implementation, which end in uncertainties for to work >with it. Yes, yes, the above is a joke. I will attempt to restrain further levity :-) I would never suggest one actually implement LOAD like that, even if it does fit the Standard. In my real implementation, I maintain an internal variable BLKMAX which contains the highest block number to which REFILL should continue, I save and restore BLKMAX when input sources are nested, and I also define : LOAD DUP THRU ; > >It seems, this is a well-specified crash: which range of block numbers is valid >for REFILLing, when having a native block system? Which range is valid when >mapping files to block numbers? > >As I prefer stable working machines, I made up LOAD by DUP THRU. By this, each >THRU statement resembles a file, as seen by use of REFILL. > I agree, this is a hole in the Standard. I do not think it is a real problem, though. It is the responsibility of the system implementor to avoid such a flagrant error in the implementation of LOAD and THRU. If the user creates a situation (using nonstandard words) where REFILL could advance indefinitely through the block file, this indicates a flaw in the program logic, no? In any case, while an an academic or hobbyist system might leave this hole open, a robust production system will be aware of the end of initialized data in the block file (or native block system) and cause REFILL to return false when such a buffer is reached. As for determining valid block numbers when blocks are mapped to files, this is left up to the system implementor. Refer to ANS 11.3.2 - Blocks in files: "An ambiguous condition exists if a requested block number is not currently mapped;" and ANS 11.4.1.1 - Implementation-defined options: "methods for mapping block ranges to files". If you must use this information, you will be creating an implementation dependency in your code. From: Chris Jakeman Subject: Pattern matching Date: Sun, 15 Dec 1996 16:05:00 +0000 Message-ID: <0NjqxJAsGCtyEw$F@apvpeter.demon.co.uk> X-NNTP-Posting-Host: apvpeter.demon.co.uk MIME-Version: 1.0 The FoSM pattern matcher has been upgraded to version 1.1. Find it at ftp://taygeta.com/pub/Forth/Applications/fosm1v1.zip This version is improved with feedback from users of the previous one. The documentation is better organised, it includes a new paper from FORML '96 and some new features. In particular, the NOTE stack can now be accessed using the words >N, N@ and N>. The tutorial now includes an expression evaluator: EVAL 1 + ( 2 * 3 - -4 + (99/4) ) -> 35 Two new patterns have been added for convenience: c a l $Any matches character c against any in string at address a, length l c a l $None " " " " none " " " " " " One bug-fix: $=? has been reworked to avoid 0 C@ which some OSes don't like. The FoSM application below shows how the NOTE stack can be used to calculate a result as an input string is matched to the pattern TimeOfDay. It also shows how a complex set of rules can be implemented in just a few lines of FoSM patterns. Bye for now _ _______________________| |_____ Chris Jakeman / _Forth_Interest_Group_| |____/ / /_ __ ______ _ _ | | __ at Peterborough / __/ / / / __ / | | | | | |/ / (a cathedral city / / / / / /_/ / | \_| | | < 80 miles north of London) /_/ /_/ /___ / \____| |_|\_\ Where do you come from? / / ______________/ / United Kingdom Voice +44 (0)1733 753489 /_______________/ Chapter -------------------------------------------------------------------------------- \ FoSM pattern TimeOfDay to validate and evaluate time of day, eg: \ 1:20 01:20 :80 all evaluate to 80 minutes \ 3: 03: 3:00 03:0 :120 all evaluate to 120 minutes \ 1:00pm 1PM 13:00 :780 all evaluate to 780 minutes \ -1:00 80 3 : 1:60 13pm 14am are all invalid. \ Spaces are not allowed either. \ Accumulate decimal digits : AddDecimal ( Char Total -- NewTotal ) 10 * swap [char] 0 - \ Char>Num for decimals only + ; \ FoSM patterns use << .. >> as a shorthand for : (<<) .. (>>) ; \ FoSM saves integers on its NOTE stack using >N N@ and N>. << Digit dup N> AddDecimal >N \ Accumulate decimal digit. $- 0-9 >> \ Pattern matching "0" to "9". If \ it fails, then N stack is restored. << Digits 0 >N \ Initial value saved on N stack. {{ Digit }} >> \ {{ .. }} for 0 or more digits. << Hours Digits >> \ An alias. << AM s" AM" $=? >> \ Pattern to match "AM" or "am". << PM s" PM" $=? >> \ For AM/PM reject hours outside 1-12. << CheckHours N> N@ swap >N \ Get hours from N stack. Minutes are \ on top. 1 12 1+ within ?? >> \ FoSM ?? back-tracks on fail flag. : AdjustHours ( hhAM/PM -- hhSinceMidnight/Noon ) 12 mod ; \ Allow for sequence 11am, 12pm, 1pm << Meridian { AM CheckHours \ { .. | .. } for AM or PM N> N> AdjustHours >N >N | PM CheckHours N> N> AdjustHours 12 + >N >N } >> \ Convert to 24 hour notation << CheckMinutes N> N@ swap >N \ Get hours from N stack. 0 > IF \ If hour <> 0, N@ 0 60 within ?? THEN >> \ reject mins outside 0-59. << Minutes Digits CheckMinutes >> << TimeOfDay Hours { $ : Minutes \ $ : matches ":" { Meridian } \ { .. } for optional pattern | 0 >N Meridian } \ If ":" missing, add 0 for minutes End \ End ensures all chars are matched ?? \ Length > 1 rejects ":" and "0" N> N> 60 * + >N >> \ Convert Hrs & Mins to minutes CaseOff \ Allow pm and am as well as AM and PM From: "Chris Nelson" Subject: Embedded Forth Revisited Date: 15 Dec 1996 19:15:24 GMT Message-ID: <01bbeabc$324ed900$f48701c7@Zep.onramp.net> First off, I would like to thank those who responded to my initial post and the subsquent threads. I was encouraged that Forth would be a good choice to do some embedded control. With a small budget and the requirement that the system also run other languages, I invested in an 8031 eval board from New Micros. It comes with versions of Forth and Basic which are ROM-able and a C cross compiler. I have not yet had time to do more than print out and skim the documents, but hope to have a chance to run the various enviroments in the next few months. Some small circuit additions will have to occur first. I also will have a chance to test a commercial C enviroment with a more advance eval board from a different company. I may also get a chance to play with another New Micro system with Forth, a 68HC11. As far as the thread on the PostScript clone done in Forth that was over 100,000 lines; I think it was called QuickScript and was eventually sold to Adobe for PostScript2... Happy Holidays to all, And special thanks to Elizabeth and the guys in the UK, Chris Nelson cnelson@onramp.net From: mikc@gnu.ai.mit.edu (Mike Coughlin) Subject: Re: Readable forth Date: 15 Dec 1996 17:31:30 -0500 Message-ID: <591u82$f7f@psilocin.gnu.ai.mit.edu> References: <32A89C16.1935@forth.com> <58pai8$np0@psilocin.gnu.ai.mit.edu> <32B0559F.393F@forth.com> In article <32B0559F.393F@forth.com>, Elizabeth Rather wrote: >There is certainly a crying need for more/better books and articles. >It would be great if you would do one. >In the meantime, we teach by example: by the code in our products, >in our courses and manuals, etc. You did, after all, have a teacher; >you weren't rummaging around by yourself figuring it out. Well of course I didn't have a teacher. I read Starting Forth and the fig listings. What is the answer we see to those who ask how a beginner can learn about Forth? Rummage around thru a PD Forth system source listing. This a poor way to learn anything. Its like learning to swim by being thrown off the end of the dock. Starting Forth is a very good book, but available Forth system listings are not what a beginner needs to see and learn good programming style. >Mike Coughlin wrote: >> There is a big difference between the style of writing >> short program and a large project. There are no examples >> of published large Forth projects. Thus there is no way >> to learn to manage the source for a big Forth project except >> to start at zero and flounder around. >Folks doing their first big C project generally learn a lot from >their colleagues that have "been there, done that." In big Forth >projects folks learn the same way. >And it really isn't very different. Sure its different. There are more published C program listings than anybody can read in a lifetime. You could learn enough to earn your living as a professional programmer without even realizing there were other computer languages besides C. I'd bet there are lots of people in the computer business who will never see a Forth program or meet a Forth programmer. The examples to interest anyone in Forth are rare and hidden. The examples to show computers can be programmed in C are everywhere. You ask me why I don't write a book or publish an article about good Forth styles. The best people to do that are those who have worked on big projects and taught new team members. I've never worked on a large programming project with good management and teams of programmers each looking at only one part of the system. I can't even imagine how anything like that can ever be completed. There has to be one person who understands how everything works to find the bugs. Yet there are companies doing such projects. Once in a while they call me in for a job interview. (None of them have ever used Forth) Before they realize their mistake and apologize for wasting my time, I get to see some of their source code listings (just by accident). The part that strikes me with great force is that these listings are almost entirely comments. So this must be the way they achieve the impossible task of producing working code from teams of programmers. I've noted that Forth programmers are always willing to answer any questions asked on comp.lang.forth. When I ask about good commenting style and Forth programming conventions for large projects and receive no answer, I know it is because there are no programmers who have used Forth on big projects to write about their experience. But someday one of them will show up and be able to post his company's style guidelines or a reference to a published report containing the code he worked on. This is done all the time with other languages, as a search thru the resources of the Internet will easily reveal. I don't know who can provide the tutorial material for Forth to match what is available for other languages. But I do know Forth suffers greatly from its lack. I expect the biggest improvement in the use of Forth can be made in its clarity of commenting style. If programs can be written faster in Forth than in C (which Forth programmers say can be done now) and understood by the next programmer faster in Forth than in C (which all non-Forth programmers tell me is impossible) then we'll be able to really get things done. -- Michael Coughlin mikc@gnu.ai.mit.edu Cambridge, MA USA From: mikc@gnu.ai.mit.edu (Mike Coughlin) Subject: Re: Readable forth Date: 15 Dec 1996 18:31:13 -0500 Message-ID: <5921o1$fde@psilocin.gnu.ai.mit.edu> References: <32B0559F.393F@forth.com> <01bbe874$e9209e60$bba20fce@innereye> <32B09231.423A@austin.finnigan.com> In article <32B09231.423A@austin.finnigan.com>, Tom Zimmer wrote: >Easy guys, one man's (woman's) unreadable code is another's >beautiful elegant masterpiece. >Let him who is without sin cast the first stone. >I am sure I have cast aspersions on lots of other people's code, >but the broader perspective is that everybody elses code is >always unreadable compared to mine. Just ask me :-> No it isn't. If code is unreadable, then that's the way it was written. If there is a requirement that code be readable, then it will be readable. It is just a matter of wanting to do it. If code is unreadable, then there was no requirement to make it anything else. The author didn't give a darn. There is one very simple way to make readable code. Take the code and show it to somebody who didn't write it. Ask what does it do? If they can't answer, do it over. Answer all questions in writing in comments. There have been many books writtten on the readability of programs and the mamagemnt of computer projects. They all say the same thing. Get somebody who didn't write the code to check the code to see if it can be read. Naturally you have to have a computer be able to read the code and check the results to see if the program works as it is supposed to. Well you need a human being to check the code to see if is understandable by another human being. Now who should this person be and what should they check for? Well that is what the art of programming and management is all about. Should it only be necessary for another programmer who has been with the project for a while to understand it? That means the program can be more sparsely commented than if it is suposed to be read by a new hire or be understood by an engineer who is not a programmer. At the very least the programmer's manager should be able to understand it. Of course managers sometimes don't follow this rule; but we know projects aren`t always well managed. >Look at what happens every time a programmer leaves a project. >What happens? I will tell you what happens, the person who >follows rewrites the code. Or at least wants to. Well then your managers are too slow. The code should be inspected while the author is still on the project and changed so the next person does not have to rewrite it. Or maybe there is just no requirement that code be kept after someone leaves. I started using computers when everybody who used them had to be a programmer. The manuals were pretty hard to follow. Then they invented the S-100 bus, Apple ]['s and the IBM-PC. Funny thing happened. A lot of people started saying they weren't going to buy anything with crummy manuals. And guess what? Computer manuals got better. Vastly better. And then you didn't even need to be a programmer to use them. I know manuals, code and program listings can either be clear or muddy. Depends on who's paying for it. I prefer clear myself. The ultimate program documentation is a commented sorce listing. Some of the clearest listings I ever saw were written by teenage assembly programmers for 8-bit home computers. I never thought I'd see any assembly language I could understand until that happened. -- Michael Coughlin mikc@gnu.ai.mit.edu Cambridge, MA USA From: erather@ix.netcom.com Subject: Re: Readable forth Date: Sun, 15 Dec 1996 17:10:42 -0800 Message-ID: <32B4A192.12CF@ix.netcom.com> References: <32A89C16.1935@forth.com> <58pai8$np0@psilocin.gnu.ai.mit.edu> <32B0559F.393F@forth.com> <591u82$f7f@psilocin.gnu.ai.mit.edu> Reply-To: erather@ix.netcom.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-NETCOM-Date: Sun Dec 15 7:11:14 PM CST 1996 X-Mailer: Mozilla 2.0 (Macintosh; U; PPC) Mike Coughlin wrote: > > In article <32B0559F.393F@forth.com>, > Elizabeth Rather wrote: > > >There is certainly a crying need for more/better books and articles. > >It would be great if you would do one. > > >In the meantime, we teach by example: by the code in our products, > >in our courses and manuals, etc. You did, after all, have a teacher; > >you weren't rummaging around by yourself figuring it out. > > Well of course I didn't have a teacher. I read Starting Forth > and the fig listings. What is the answer we see to those who > ask how a beginner can learn about Forth? Rummage around thru > a PD Forth system source listing. This a poor way to learn > anything. Its like learning to swim by being thrown off the end > of the dock. Starting Forth is a very good book, but available > Forth system listings are not what a beginner needs to see and > learn good programming style. As I said, that's why we include extensive source and documentation. > >Mike Coughlin wrote: > >> There is a big difference between the style of writing > >> short program and a large project. There are no examples > >> of published large Forth projects. Thus there is no way > >> to learn to manage the source for a big Forth project except > >> to start at zero and flounder around. > > >Folks doing their first big C project generally learn a lot from > >their colleagues that have "been there, done that." In big Forth > >projects folks learn the same way. > > >And it really isn't very different. > > Sure its different. There are more published C program listings > than anybody can read in a lifetime. You could learn enough to earn > your living as a professional programmer without even realizing > there were other computer languages besides C. I'd bet there are > lots of people in the computer business who will never see a > Forth program or meet a Forth programmer. The examples to > interest anyone in Forth are rare and hidden. The examples > to show computers can be programmed in C are everywhere. I don't think folks learn C by reading published listings. I think they learn in college or on the job, from books, teachers and colleagues. Forth is not taught in college nearly as much as many of us would like, but a great many Forth programmers learn it on the job. There they get to see those listings that have been provided on the job, as well as the manuals that have come with the system. As you note, the quality of listings you find on the job varies widely, in Forth as well as C, and is a reflection mainly of management style and culture. > You ask me why I don't write a book or publish an article > about good Forth styles. The best people to do that are those > who have worked on big projects and taught new team members. > I've never worked on a large programming project with good > management and teams of programmers each looking at only one > part of the system. I can't even imagine how anything like > that can ever be completed. There has to be one person who > understands how everything works to find the bugs. Well, in our current project there's such a person for each major subsystem. > ...Yet there > are companies doing such projects. Once in a while they call > me in for a job interview. (None of them have ever used Forth) > Before they realize their mistake and apologize for wasting > my time, I get to see some of their source code listings (just > by accident). The part that strikes me with great force is that > these listings are almost entirely comments. So this must be the > way they achieve the impossible task of producing working code > from teams of programmers. It certainly helps, although (as has been discussed in c.l.f on previous occasions, the quality of comments is generally more important than the quantity. Too many comments of an unhelpful kind can make the code harder to follow. Our team has followed a culture (bred, individually, in the companies including MPE and FORTH, Inc. participating in the project) of both trying to write clear code and to include helpful comments. All of us have been working with team projects for a long time, and have absorbed the values. The newcomers to the project, as well as a couple of Forth programmers who previously worked solo, have also learned to work this way. > I've noted that Forth programmers are always willing to > answer any questions asked on comp.lang.forth. When I ask > about good commenting style and Forth programming conventions > for large projects and receive no answer, I know it is because > there are no programmers who have used Forth on big projects > to write about their experience. But someday one of them > will show up and be able to post his company's style guidelines > or a reference to a published report containing the code he > worked on. This is done all the time with other languages, > as a search thru the resources of the Internet will easily > reveal. Hello, hello, how many times have I personally responded to your questions? As has Stephen Pelc, Andrew Haley, and a whole bunch of folks who have worked on and around large Forth projects and frequently testify as to their experiences. Your persistent statements "...receive no answer... know there are no programmers who have used Forth on big projects..." is pure denial. > I don't know who can provide the tutorial material for > Forth to match what is available for other languages. But I do > know Forth suffers greatly from its lack. There I entirely agree with you. The problem is that those of us who make our living doing it don't have the time to write about it (and no one to pay us to do it!). > I expect the biggest > improvement in the use of Forth can be made in its clarity of > commenting style. If programs can be written faster in Forth > than in C (which Forth programmers say can be done now) and > understood by the next programmer faster in Forth than in C > (which all non-Forth programmers tell me is impossible) then > we'll be able to really get things done. It will always be easier to read a program in a language you know. Stating a requirement that Forth be more readable to non-Forth programmers than a language those folks already know is silly, and doesn't contribute much. Cheers, Elizabeth From: "Chris Nelson" Subject: Re: Readable forth Date: 16 Dec 1996 03:06:01 GMT Message-ID: <01bbeafd$f31e5f20$f48701c7@Zep.onramp.net> References: <32B0559F.393F@forth.com> <01bbe874$e9209e60$bba20fce@innereye> <32B09231.423A@austin.finnigan.com> <5921o1$fde@psilocin.gnu.ai.mit.edu> Ok guys I'll be your test subject for Readability! I just purchased a small 8031 system that comes with Forth, C, Basic and assembly. It also has sample programs in all those variants that do the exact same functions. Over the next month or so I plan to read, study and run those examples and build a demo program myself that does the same functions in all of these languages. Maybe I'll post the code! So with all these languages running in the same enviroment, it should level the playing field. I find that programs can be difficult to understand in any language, but regardless of the level of comments and construction, some times it just depends what the reader knows. I understand some of the object elements of Java due to dealing with objects in VB. I am starting to really pick up on C due to the fact that so many scripting/command languages use its syntax. One of the simplest to understand but complex programs I have seen is in assembly, where most examples lose me after declaring the macros. I have done decent/good quality Basic programs for years that have been ported by others, but a lot of Basic out there just sucks. The thing about Forth that throws me is it is unlike any of the main stream languages. That's why I got a small system to try it out amoung the one's I know. Kinda like comparative anatomy... Just for background, I am not a full time/expert programer. I have had lots of expeience with Basic, Pascal, and several scripting/ command languages. I have had modest exposure to Java, C, and Z80 assembly. Currently I do some coding, some admin and a little db for a small company. Chris Nelson cnelson@onramp.net From: melody@planet.eon.net (Melody Dorcas) Subject: forth for macintosh Date: Sun, 15 Dec 1996 23:44:38 -0700 Message-ID: Does anyone know of a forth that will work on the macintosh. could you also give me the ftp site for it as well Thanks Wesley From: Mark Flacy Subject: Re: Readable forth Date: 15 Dec 1996 23:47:19 -0600 Message-ID: References: <32A89C16.1935@forth.com> <58pai8$np0@psilocin.gnu.ai.mit.edu> <32B0559F.393F@forth.com> <591u82$f7f@psilocin.gnu.ai.mit.edu> mikc@gnu.ai.mit.edu (Mike Coughlin) writes: [snip] > > You ask me why I don't write a book or publish an article > about good Forth styles. The best people to do that are those > who have worked on big projects and taught new team members. > I've never worked on a large programming project with good > management and teams of programmers each looking at only one > part of the system. I can't even imagine how anything like > that can ever be completed. There has to be one person who > understands how everything works to find the bugs. Yet there > are companies doing such projects. Once in a while they call > me in for a job interview. (None of them have ever used Forth) > Before they realize their mistake and apologize for wasting > my time, I get to see some of their source code listings (just > by accident). The part that strikes me with great force is that > these listings are almost entirely comments. So this must be the > way they achieve the impossible task of producing working code > from teams of programmers. > > I've noted that Forth programmers are always willing to > answer any questions asked on comp.lang.forth. When I ask > about good commenting style and Forth programming conventions > for large projects and receive no answer, I know it is because > there are no programmers who have used Forth on big projects > to write about their experience. But someday one of them > will show up and be able to post his company's style guidelines > or a reference to a published report containing the code he > worked on. This is done all the time with other languages, > as a search thru the resources of the Internet will easily > reveal. No, it means that they don't have the TIME and/or MONEY to write one. > > I don't know who can provide the tutorial material for > Forth to match what is available for other languages. But I do > know Forth suffers greatly from its lack. I expect the biggest > improvement in the use of Forth can be made in its clarity of > commenting style. If programs can be written faster in Forth > than in C (which Forth programmers say can be done now) and > understood by the next programmer faster in Forth than in C > (which all non-Forth programmers tell me is impossible) then > we'll be able to really get things done. You're mixing two problems here. The portion concerning "good Forth styles" IS well within your abilities to research and publish. In fact, I think someone else is working on this right now within this newsgroup. The portion concerning "understandable Forth programs as part of a large project" is a very different problem. To understand the program, you'd have to understand the overall problem and the solution. There's quite a lot of very heavily commented source code here where I work that is incomprehensible without doing a LOT of auxiliary research. It's not a function of the language; it's a function of both problem description and the solution. I've nattered about this before in this newsgroup > > -- > Michael Coughlin mikc@gnu.ai.mit.edu Cambridge, MA USA -- \ ---------------------------------------------------------------------- \ Mark A. Flacy | flacy@nortel.com | ESN 445-8347 \ "There's one in every crowd | (214) 685-8347 | Department H231 \ and it's usually me." | | \ ---------------------------------------------------------------------- \ Someday I may speak for Northern Telecom (Nortel). \ Someday pigs may howl at a full moon. \ Expect the latter to occur first. \ ---------------------------------------------------------------------- . From: krueger@bradley.dbag.ulm.DaimlerBenz.COM (Lars Krueger) Subject: Re: Best forth for beginner? Date: 16 Dec 1996 08:44:15 GMT Message-ID: <59324v$kkd@news.sns-felb.debis.de> References: <58sqkd$50p@srvr1.engin.umich.edu> Cc: newberry@lagrange.engin.umich.edu In <58sqkd$50p@srvr1.engin.umich.edu> Byron Lee Newberry wrote: > Hello, > > I have been interested in forth for some time now and have finally > found the time to start giving it some serious study. I am looking > for a good forth system to start with for the DOS or WINDOWS platform. > I have played around with thisforth and timbre some. Both seem > usable, but I am interested in the comments of some experienced forth > users. If it matters I am a mechanical engineering doctoral student > and am primarily interested in numerical analysis applications. Try Win32Forth. Runs on NT, 95 and 3.1 with Win32s. (I use last of the above.) It supports floating point, and there ist the "Forth Scientific Library" at www.taygeta.com . It's library of mathematical algorithms. I never tried to compile it, but they say it is standard, so it will run. But be warned, there is not much documentation around for Win32Forth. A few examples on Windows-Programming ( Object- orientated.) and that's what is was written for. Last but most important it is 32-bit. > All advice is appreciated! > > Byron N. > -- Lars Krueger mailto:ai108@rz.tu-ilmenau.de mailto:krueger@dbag.ulm.daimlerbenz.com URL: http://www.rz.tu-ilmenau.de/~ai108 "Die Zeit schreitet voran und die Menschheit?" Stanislaw Lec From: znmeb@news.teleport.com () Subject: Re: Conversion Date: 16 Dec 1996 16:31:33 GMT Message-ID: <593th5$962@maureen.teleport.com> References: Chris Jakeman (cjakeman@apvpeter.demon.co.uk) wrote: : Ever noticed that the sequence of hours is .. 11:00am 12:00pm 1:pm .. ? : Odd isn't it? That doesn't sound right to me. AM means 'ante meridian' -- before noon. PM means 'post meridian' -- after noon. So noon should be 12:00m and midnight 12:00pm, shouldn't it?? That's why I use a 24 hour clock :-) -- znmeb@teleport.com (M. Edward Borasky) http://www.teleport.com/~znmeb How do you get an elephant out of a theatre? You can't; it's in their blood! From: "Don Ingram" Subject: Forth for Hitachi SH1 EVB Date: Tue, 17 Dec 1996 06:58:37 +1100 Message-ID: <01bbeb8b.86df8e40$355870a4@ur014234> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Does anyone know of a port to the Hitachi SH1, whether it be commercial or eForth. Alternatively would a lean version of cForth compile on the GNU C compiler supplied with the EVB. Any advice appreciated. Cheers -- Don Ingram Leading Edge Design dingram@m130.aone.net.au Ph +61 79 546074 Fax +61 79 546668 From: "Gary Chanson" Subject: Re: Conversion Date: 16 Dec 1996 19:41:21 GMT Message-ID: <01bbeb89$0b2d84c0$7ca20fce@innereye> References: <593th5$962@maureen.teleport.com> > That doesn't sound right to me. AM means 'ante meridian' -- before > noon. PM means 'post meridian' -- after noon. So noon should be 12:00m > and midnight 12:00pm, shouldn't it?? > > That's why I use a 24 hour clock :-) No. 12:00 PM is ambiguous but 12:01 PM is not. It's clearly after the meridian! -- -GJC --- * Arcane Incantations BBS * Windows95 * Programs - Tools - Support * * 617-899-6672 * DOS * Free Access * From: Felix Franz Subject: Re: forth for macintosh Date: 16 Dec 1996 21:48:51 GMT Message-ID: <594g43$gf9@hades.rz.uni-sb.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit Melody Dorcas wrote: : Does anyone know of a forth that will work on the macintosh. could you : also give me the ftp site for it as well There are several Forth implementations for the mac. The one I use most is called Mops. look at http://www.netaxs.com/~jayfar/mops.html for more infos. If you need ftp, the address is ftp://ftp.taygeta.com/pub/Forth/Mops/Mops281.sea.bin A "smaller" forth is called pocket forth, ist available at: http://chemlab.pc.maricopa.edu/pocket.html Another Forth, very similar to Mops is called Yerk, you can find it on ftp.taygeta.com (I don't know the actual directory). If you want to buy a commercial Forth, take a look at http://www.forth.com They sell a version for 68k named MacForth Plus and a native PowerMac-Forth called PowerMacForth. : Thanks : Wesley Hope that helps felix (fefr@stud.uni-sb.de) From: wilbaden@netcom.com (W.Baden) Subject: Catastrophic Elegance Message-ID: Date: Mon, 16 Dec 1996 23:51:04 GMT At FORML this year Klaus Schleisiek reported on the EuroFORML contest for the most elegant way to crash a system. The winner was: 1 DUP BASE ! . The American entry is: : 0 RANDOM ; where RANDOM has been already defined. Are there any other entries? -- Procedamus in pace. Wil Baden Costa Mesa, California From: Stephen Pelc Subject: Re: Readable forth Date: Mon, 16 Dec 96 21:40:51 GMT Message-ID: <850772451snz@mpeltd.demon.co.uk> References: <32A89C16.1935@forth.com> <58pai8$np0@psilocin.gnu.ai.mit.edu> <32B0559F.393F@forth.com> <591u82$f7f@psilocin.gnu.ai.mit.edu> Reply-To: sfp@mpeltd.demon.co.uk X-Mail2News-User: sfp@mpeltd.demon.co.uk X-Mail2News-Path: relay-7.mail.demon.net!mpeltd.demon.co.uk In article <591u82$f7f@psilocin.gnu.ai.mit.edu> mikc@gnu.ai.mit.edu "Mike Coughlin" writes: > I've noted that Forth programmers are always willing to > answer any questions asked on comp.lang.forth. When I ask > about good commenting style and Forth programming conventions > for large projects and receive no answer, I know it is because > there are no programmers who have used Forth on big projects > to write about their experience. But someday one of them > will show up and be able to post his company's style guidelines > or a reference to a published report containing the code he > worked on. This is done all the time with other languages, > as a search thru the resources of the Internet will easily > reveal. MPE's in-house coding standards are with Marlin Ouverson for possible inclusion in Forth Dimensions. However, they are probably larger than a single issue of Forth Dimensions. Large programs can be written in Forth, have been written in Forth, and are being written in Forth. Coding style is one small but important part of the project management needed for a succesful large project in *any* language. -- Stephen Pelc, sfp@mpeltd.demon.co.uk MicroProcessor Engineering - More Real, Less Time 133 Hill Lane, Southampton SO15 5AF, England tel: +44 1703 631441, fax: +44 1703 339691 From: "Paul E. Bennett" Subject: Re: Readable forth Date: Mon, 16 Dec 96 22:24:43 GMT Message-ID: <850775083snz@transcontech.co.uk> References: <32A89C16.1935@forth.com> <58pai8$np0@psilocin.gnu.ai.mit.edu> <32B0559F.393F@forth.com> <591u82$f7f@psilocin.gnu.ai.mit.edu> Reply-To: peb@transcontech.co.uk X-Mail2News-User: peb@transcontech.co.uk X-Mail2News-Path: relay-7.mail.demon.net!tcontec.demon.co.uk In article <591u82$f7f@psilocin.gnu.ai.mit.edu> mikc@gnu.ai.mit.edu "Mike Coughlin" writes: > I've noted that Forth programmers are always willing to > answer any questions asked on comp.lang.forth. When I ask > about good commenting style and Forth programming conventions > for large projects and receive no answer, I know it is because > there are no programmers who have used Forth on big projects > to write about their experience. But someday one of them > will show up and be able to post his company's style guidelines > or a reference to a published report containing the code he > worked on. This is done all the time with other languages, > as a search thru the resources of the Internet will easily > reveal. Just to help level this situation out I am going to work on producing my own coding standards which will be given this group (and maybe in FD as well) which will be provided with a tool that will assist the documentation aspects. It is one I have been meaning to write for some while now. The tool will be documented and commented the same way I present all my code. As one who has handled some largish projects I think this may be authority enough. Comments from others will be welcome. I am doing this over the Christmas Break. > I don't know who can provide the tutorial material for > Forth to match what is available for other languages. But I do > know Forth suffers greatly from its lack. I expect the biggest > improvement in the use of Forth can be made in its clarity of > commenting style. If programs can be written faster in Forth > than in C (which Forth programmers say can be done now) and > understood by the next programmer faster in Forth than in C > (which all non-Forth programmers tell me is impossible) then > we'll be able to really get things done. Forth can be better for this. It does, however, take a certain amount of discipline. In relation to some of your other comments. Forth is used in many embedded systems, an area I almost exclusively work in, and as such most of the projects are subject to non-disclosure agreements. This makes it extremely difficult for professional Forthers to provide any sensible sized code fragments or examples of coding and documentation style from the best as they are not permitted to share such code with others. In some rare instances some tiny fragment is permitted for publication. These, I am certain, have already appeared in the usual publications. For the rest, no company wants it's best kept secrets publicised to the world, which is what is usually encapsulated in the embeded systems code. -- Paul E. Bennett Transport Control Technology Ltd. +44 (0)117-9499861 Going Forth Safely From: japs@netcom.com (Jim Schneider) Subject: Re: Catastrophic Elegance Message-ID: References: Date: Tue, 17 Dec 1996 01:02:44 GMT In article wilbaden@netcom.com (W.Baden) writes: > >At FORML this year Klaus Schleisiek reported on the EuroFORML >contest for the most elegant way to crash a system. > >The winner was: > >1 DUP BASE ! . > >The American entry is: > >: 0 RANDOM ; > >where RANDOM has been already defined. > >Are there any other entries? >-- >Procedamus in pace. Wil Baden Costa Mesa, California How about: RANDOM EXECUTE (using the previous definition of random) From: japs@netcom.com (Jim Schneider) Subject: announcing 486asm v1.241 for Win32Forth Message-ID: Date: Tue, 17 Dec 1996 00:59:47 GMT I have uploaded the latest version (1.241) of my assembler to my ftp directory on Netcom. The URL is: ftp://ftp.netcom.com/pub/ja/japs/486asm.zip This release fixes a bug involving Scale/Index/Base bytes. I have also removed the file asmwin32.f from the distribution. You have to get that one from the Win32Forth distribution. From: "Bruce R. McFarling" Subject: Re: Conversion Date: Tue, 17 Dec 1996 16:26:32 +1100 Message-ID: References: <593th5$962@maureen.teleport.com> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII In-Reply-To: <593th5$962@maureen.teleport.com> On 16 Dec 1996 znmeb@news.teleport.com wrote: > Chris Jakeman (cjakeman@apvpeter.demon.co.uk) wrote: > : Ever noticed that the sequence of hours is .. 11:00am 12:00pm 1:pm .. ? > : Odd isn't it? > > That doesn't sound right to me. AM means 'ante meridian' -- before > noon. PM means 'post meridian' -- after noon. So noon should be 12:00m > and midnight 12:00pm, shouldn't it?? 12:00:00 (noon) is meridian. 12:00:01 is post meridian 12:00:02 " 12:00:03 " ... 12:00:59 " On average, 12:00 noon is post meridian, 12:00 is *never* ante meridian, and the fraction of the time that 12:00 is meridian tends to zero as the precision of the clock tends to infinity. I think that a well commented seconds since midnight -> 12 hour clock time of day, with the AM/PM done wrong and then corrected, would be a good 01234th. Virtually, Bruce R. McFarling, Newcastle, NSW ecbm@cc.newcastle.edu.au From: Elizabeth Rather Subject: Re: Catastrophic Elegance Date: Mon, 16 Dec 1996 18:58:08 -0800 Message-ID: <32B60C40.2208@forth.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.0 (Win95; U) W.Baden wrote: > > At FORML this year Klaus Schleisiek reported on the EuroFORML > contest for the most elegant way to crash a system. > > The winner was: > > 1 DUP BASE ! . > > The American entry is: > > : 0 RANDOM ; > > where RANDOM has been already defined. > > Are there any other entries? My favorite is 0 >R Cheers, Elizabeth -- =============================================== Elizabeth D. Rather 1-800-55-FORTH FORTH Inc. 310-372-8493 111 N. Sepulveda Blvd. Fax: 310-318-7130 Manhattan Beach, CA 90266 http://www.forth.com "Forth-based products and Services for real-time applications since 1973." =============================================== From: jethomas@ix.netcom.com(Jonah Thomas) Subject: Re: Catastrophic Elegance Date: 17 Dec 1996 07:24:29 GMT Message-ID: <595hrd$50g@dfw-ixnews6.ix.netcom.com> References: X-NETCOM-Date: Tue Dec 17 1:24:29 AM CST 1996 In wilbaden@netcom.com (W.Baden) writes: >At FORML this year Klaus Schleisiek reported on the EuroFORML >contest for the most elegant way to crash a system. >The winner was: >1 DUP BASE ! . >The American entry is: >: 0 RANDOM ; >where RANDOM has been already defined. >Are there any other entries? What about 0 -1 0 FILL : CRASH RECURSE ; 0 -1 TYPE doesn't exactly crash, but on a 32-bit system it might as well. The first of these is the only one I'm reasonably sure of. CRASH might on some systems generate a THROW when the return stack overflows, leading to a recovery. There might be various ways for systems to recover from a bad TYPE . A type-checked system would throw out the signed FILL . You could give it a very large number, but that wouldn't be so elegant. I guess none of mine are as elegant or as universal as the two you quoted. From: regnirps@aol.com Subject: Re: Readable forth Date: 4 Dec 1996 06:58:53 GMT Message-ID: <19961204070000.CAA25823@ladder01.news.aol.com> References: X-Admin: news@aol.com I remember being stunned the first time I saw C and then Forth with hex numbers in lower case. Why? Because an 'A' and an 'a' have completely different representations as characters. Also I was used to choosing any radix I wanted for some special purposes and at least on my systems, A000 and a000 were a lot different. I was set up to use 0 through Z followed by a through z. Weird, I know, none the less, I would prefer the representation of numbers follow the ordinal position in the ascii table when it comes to case, which would mean base 16 always uses upper case. Comments? P.S. How can anybody feel comfortable about mixing case in hex numbers but dislike compound words like ThisCompoundWord ? From: Paul Shirley Subject: Re: Readable forth Date: Mon, 16 Dec 1996 21:53:45 +0000 Message-ID: References: <32A89C16.1935@forth.com> <58pai8$np0@psilocin.gnu.ai.mit.edu> <32B0559F.393F@forth.com> <591u82$f7f@psilocin.gnu.ai.mit.edu> Mime-Version: 1.0 In article , Mark Flacy writes >The portion concerning "understandable Forth programs as part of a large >project" is a very different problem. To understand the program, you'd >have to understand the overall problem and the solution. There's quite a >lot of very heavily commented source code here where I work that is >incomprehensible without doing a LOT of auxiliary research. It's not a >function of the language; it's a function of both problem description and >the solution. I generally find that as time passes my code shrinks. A lot of this is due to realising that work can be done somewhere else (or often is already being done somewhere else) in the program. (Or even that work can simply be avoided when I get really lucky!) Without expanding the commenting there is a very real risk of ending up with a beautifully compact elegant program, which has so many hidden assumptions that individual modules are impossible to really understand *despite* appearing simple and readable. Forth programs start off that way. Its hard to believe that extra commenting is magically not needed just because you write Forth! One purpose of commenting is to establish the context of the code being commented, this should prevent readers having to do 'auxilliary research'. You can usually see *what* a piece of code does, comments are needed to tell the reader *why* it is being done. Paul Shirley: shuffle chocolat before foobar for my real email address From: Elizabeth Rather Subject: Re: Readable forth Date: Mon, 16 Dec 1996 19:06:38 -0800 Message-ID: <32B60E3E.5883@forth.com> References: <32B0559F.393F@forth.com> <01bbe874$e9209e60$bba20fce@innereye> <32B09231.423A@austin.finnigan.com> <5921o1$fde@psilocin.gnu.ai.mit.edu> <01bbeafd$f31e5f20$f48701c7@Zep.onramp.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.0 (Win95; U) Chris Nelson wrote: > > Ok guys I'll be your test subject for Readability! > > I just purchased a small 8031 system that comes > with Forth, C, Basic and assembly. It also has sample programs > in all those variants that do the exact same functions. Over the next > month or so I plan to read, study and run those examples and > build a demo program myself that does the same functions in > all of these languages. Maybe I'll post the code! > ... > > The thing about Forth that throws me is it is > unlike any of the main stream languages. That's why > I got a small system to try it out amoung the one's I know. > Kinda like comparative anatomy... > > Just for background, I am not a full time/expert programer. > I have had lots of expeience with Basic, Pascal, and several scripting/ > command languages. I have had modest exposure to Java, C, and Z80 > assembly. Currently I do some coding, some admin and a little db > for a small company. You don't say where you got your system, but I hope you got some documentation with it. As Mike Coughlin has pointed out, good documentation is important. If you need a good primer on Forth in general, please check out the Forth Interest Group (http://www.forth.org/fig.html). They offer "Starting Forth" a very good primer (though somewhat dated). We sell it as well (phone and web site below). Good luck, and don't hesitate to come back here with your questions (and results!). -- =============================================== Elizabeth D. Rather 1-800-55-FORTH FORTH Inc. 310-372-8493 111 N. Sepulveda Blvd. Fax: 310-318-7130 Manhattan Beach, CA 90266 http://www.forth.com "Forth-based products and Services for real-time applications since 1973." =============================================== From: Elizabeth Rather Subject: Re: forth for macintosh Date: Mon, 16 Dec 1996 19:00:46 -0800 Message-ID: <32B60CDE.B81@forth.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.0 (Win95; U) Melody Dorcas wrote: > > Does anyone know of a forth that will work on the macintosh. could you > also give me the ftp site for it as well We offer a pair of good, relatively inexpensive MacForth systems, one for all Macs and one specially optimized for PowerMacs (and _very_ fast!). Our web site address is below. Cheers, Elizabeth -- =============================================== Elizabeth D. Rather 1-800-55-FORTH FORTH Inc. 310-372-8493 111 N. Sepulveda Blvd. Fax: 310-318-7130 Manhattan Beach, CA 90266 http://www.forth.com "Forth-based products and Services for real-time applications since 1973." =============================================== From: Elizabeth Rather Subject: Re: Best forth for beginner? Date: Mon, 16 Dec 1996 18:55:53 -0800 Message-ID: <32B60BB8.5F62@forth.com> References: <58sqkd$50p@srvr1.engin.umich.edu> <59324v$kkd@news.sns-felb.debis.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.0 (Win95; U) Lars Krueger wrote: > > In <58sqkd$50p@srvr1.engin.umich.edu> Byron Lee Newberry wrote: > > > > I have been interested in forth for some time now and have finally > > found the time to start giving it some serious study. I am looking > > for a good forth system to start with for the DOS or WINDOWS platform. > > I have played around with thisforth and timbre some. Both seem > > usable, but I am interested in the comments of some experienced forth > > users. If it matters I am a mechanical engineering doctoral student > > and am primarily interested in numerical analysis applications. Byron, I note several people have given recommendations for public-domain Forth systems. Some of them are quite good technically, but... > But be warned, there is not much documentation around for > Win32Forth. A few examples on Windows-Programming ( Object- > orientated.) and that's what is was written for. > Last but most important it is 32-bit. > > > All advice is appreciated! If your time is worth money, you may be interested in buying a commercial system. Ours are described in more detail on our web site (URL below). Our Macintosh systems and our 16-bit polyFORTH for DOS are fairly inexpensive, and very full-functioned and well documented. Both include extensive math libraries as well. If you have a funded project, you may be interested in our more powerful 32-bit real-time PC version of polyFORTH, or in ProForth for Windows. We also offer cross-compilers for most microcontrollers used in embedded systems. Please give us a call if we can help you further. Cheers, Elizabeth -- =============================================== Elizabeth D. Rather 1-800-55-FORTH FORTH Inc. 310-372-8493 111 N. Sepulveda Blvd. Fax: 310-318-7130 Manhattan Beach, CA 90266 http://www.forth.com "Forth-based products and Services for real-time applications since 1973." =============================================== From: znmeb@news.teleport.com () Subject: Re: Catastrophic Elegance Date: 17 Dec 1996 15:50:41 GMT Message-ID: <596fgh$6hf@maureen.teleport.com> References: W.Baden (wilbaden@netcom.com) wrote: : : At FORML this year Klaus Schleisiek reported on the EuroFORML : contest for the most elegant way to crash a system. : : The winner was: : : 1 DUP BASE ! . : : The American entry is: : : : 0 RANDOM ; : : where RANDOM has been already defined. : : Are there any other entries? : -- : Procedamus in pace. Wil Baden Costa Mesa, California : BITE-ME-PIG 65535 0 DO DROP LOOP 65535 0 DO 1 LOOP ; : INSULT>INJURY 0 >R ; BITE-ME-PIG INSULT>INJURY -- znmeb@teleport.com (M. Edward Borasky) http://www.teleport.com/~znmeb How to Stop A Folksinger Cold # 4 "Tie me kangaroo down, sport..." Tie your own kangaroo down -- and stop calling me "sport"! From: ir230@sdcc3.ucsd.edu (john wavrik) Subject: Re: Catastrophic Elegance Date: 17 Dec 1996 15:33:56 GMT Message-ID: <596eh4$25s@sdcc12.ucsd.edu> References: <32B60C40.2208@forth.com> Elizabeth Rather writes, > My favorite is 0 >R > > Cheers, > Elizabeth I don't think that is ANS-Standard 8-) John J Wavrik Math Dept - UCSD From: lglisle@aol.com Subject: Re: FAQ file posting and contact info Date: 17 Dec 1996 16:37:13 GMT Message-ID: <19961217163600.LAA06832@ladder01.news.aol.com> References: <5688m5$ek9@ns2.ryerson.ca> X-Admin: news@aol.com Well, I've tried to send Email, but have failed to get through. Jon, are you on line? Has something happened to the auto poster? Did my new copy of FAQ pt 3 get there? Somebody might want to know. ---- L. Greg Lisle, PE Forth Toolsmith & Industrial Automation Consultant L.G.Lisle@ieee.org From: Edward Freeman Subject: Re: forth for macintosh Date: Mon, 16 Dec 1996 23:33:11 GMT Message-ID: <1996121623331175401@zetnet.co.uk> X-Mailer: ZIMACS Version 1.09y16 10003752 In message melody@planet.eon.net (Melody Dorcas) writes: > Does anyone know of a forth that will work on the macintosh. could you > also give me the ftp site for it as well Have you been to comp.lang.forth.mac they should know. -- Eddy From: Chris Stephens Subject: Forth & perl Date: Tue, 17 Dec 1996 19:03:45 +0000 Message-ID: Reply-To: Chris Stephens X-NNTP-Posting-Host: forthinc.demon.co.uk MIME-Version: 1.0 Any forthers tried mixing Forth & perl or simulating perl in forth ? Regards, Chris ----------------------------- Name: Chris Stephens E-mail: comsol@forthinc.demon.co.uk Computer Solutions Ltd. Phone & Fax: +44 01 932 829 460 1a New Haw Road, Addlestone, Surrey, KT15 2BZ England Embedded Software Applications and Tools From: znmeb@teleport.com () Subject: Re: THEOREM-PROVER in FORTH wanted (based on LAWS OF FORM) Date: 17 Dec 1996 21:51:00 GMT Message-ID: <5974k4$m17@maureen.teleport.com> References: <32A5D609.66F3@hol.gr> <32A5DCDE.75E0@hol.gr> <58upbc$8nm@maureen.teleport.com> znmeb@news.teleport.com wrote: : George Alex Stathis (hyperlex@hol.gr) wrote: : : : : BTW, Forth-based Prolog interpreters would also be interesting... : This exists! Unfortunately, I don't have the reference here at home, : but I'll post it Monday. It was in a classic book on expert systems in : Forth. LISP and Prolog constructs were implemented in Forth 83, along : with some actual AI examples. I don't remember if there was a theorem : prover as well, although I think there was a unification algorithm. : -- : znmeb@teleport.com (M. Edward Borasky) http://www.teleport.com/~znmeb : I support the right to keep and arm bears. The bad news: I called TAB Books, now a division of McGraw-Hill, and this book is out of print :-(. It has been since June of 1983. The good news: it contains LISP and Prolog emulations in Forth, including a unification algorithm. It also has some minimum distance classifier code. So if you want to try to track down a copy, here is the reference: Townsend, Carl, Feucht, Dennis (1986), Designing and Programming Personal Expert Systems, TAB Books, Inc, Blue Ridge Summit, PA, ISBN 0-8306-2692-1. The Prolog interpreter is 'only' 60 screens; if I get ambitious I might type it in and see if it will play with F-PC. It's written in F83; I'm sure there are some things in it that will break with ANS Forth. By the way, there are two pages on parallel approaches to unification! -- znmeb@teleport.com (M. Edward Borasky) http://www.teleport.com/~znmeb Coming soon to a theatre near you -- the remake of "War With The Newts"!