ForthNet@willett.UUCP (ForthNet articles from GEnie) (03/21/90)
Date: 03-18-90 (18:15) Number: 3043 (Echo) To: ALL Refer#: NONE From: BILL MCCARTHY Read: HAS REPLIES Subj: NEW RELEASE OF HS/FORTH Status: PUBLIC MESSAGE HS/Forth 4.11 arrived this week with the updated FOOPS and the new FORTRAN package called FORTE. I haven't had a chance to review the FOOPS package other than to note that the documentation is up to 8 pages and although there is a TST file demonstrating the creation and use of objects, no sample application is yet provided (such as Turbo Pascal's FORMS package for generating input forms - one of the messiest parts of programming). To load FORTE, you must be in INTEGERS mode and have not loaded RSTACK. There is a nasty bug in the package. FORTRAN.HSF defines (or redefines, if STRINGS is loaded) the word $+ incorrectly (it doesn't leave an address on the stack) but the usage is OK for this modified definition. In DOFTH.HSF, $+ is defined correctly but the usage is for the incorrectly defined $+. This later inconsistency probably won't show up, because DOFTH.HSF is loaded after FORTRAN.HSF (so $+ won't be redefined correctly). You can fix this problem by correcting the definition of $+ and modifying the usages or by calling it something else, such as F$+ and changing $+ to F$+ throughout FORTRAN.HSF and DOFTH.HSF. Once I got things going, my first test was for SPEED! I executed the code a=(b+c)/(d+e) 25,000 times in FORTE with REAL*8 precision and against the R80VARs approach with and without optimizing. To round out the test, I also repeated in FPC (8 bytes), Turbo Pascal (Extended 10 byte) and Turbo C (long double 10 byte). Results: Times in secs 386/16 PC FORTE 34.88 270.34 VARs No Opt 1.31 6.47 VARs Optimized 1.04 4.88 FPC-3.50 3.30 20.65 Turbo Pascal .99 4.61 Turbo C 1.04 4.67 Simply pitiful. ----- This message came from GEnie via willett through a semi-automated process. Report problems to: 'uunet!willett!dwp' or 'willett!dwp@gateway.sei.cmu.edu'
ForthNet@willett.UUCP (ForthNet articles from GEnie) (03/21/90)
Date: 03-19-90 (16:13) Number: 3046 (Echo) To: BILL MCCARTHY Refer#: 3043 From: STEVE PALINCSAR Read: 03-19-90 (23:03) Subj: NEW RELEASE OF HS/FORTH Status: PUBLIC MESSAGE Bill, I passed your comments and benchmark tests on to Jim Callahan at HS/Forth. He has the following comments: 1. Indeed, as you point out, FORTRAN must be loaded before RSTACK. However, he thinks if you're going to be loading fortran you will not be loading rstack anyway. 2. The $+ bug you've mentioned has now been fixed. 3. Regarding the timings, there is indeed a speed penalty in using FORTE. However Jim says you have selected a worst case scenario to test. In any test that used logs, exponentials or trig functions, those would dominate the test and would strongly affect timing. In addition, he says FORTE is more for convenience in entering formulas than for speed in processing. If you seriously needed to crunch 25,000 times you'd be much better off using optimized VARs -- as you have demonstrated. He also said you might very well be able to optimize the FORTE code. He did go on to say that future releases would probably increase the speed in the fortran package. It's interesting to note in your benchmarks (this is me now, not Jim) the three-fold advantage HS has over F-PC without optimization. Also interesting to see how close the timing is for optimized HS vs turbo pascal: those timings are so close as to be essentially identical. ----- This message came from GEnie via willett through a semi-automated process. Report problems to: 'uunet!willett!dwp' or 'willett!dwp@gateway.sei.cmu.edu'
ForthNet@willett.UUCP (ForthNet articles from GEnie) (03/22/90)
Date: 03-20-90 (21:48) Number: 56 (Echo) To: BILL MCCARTHY Refer#: 55 From: JULIAN NOBLE Read: NO Subj: FORTE Status: PUBLIC MESSAGE Dear Mr. McCarthy, I have checked your timings and of course you are correct. The code produced by the FORTRAN module of FORTE is slow compared with working directly with the co-processor. There are several reasons for this: 1. In order to optimize FORTRAN, you need to know the types of variables at compile time. 2. The IFSTACK module, that manages the software floating stack, has not been optimized. All the memory transfers are bytewise, e.g. And a lot of memory thrashing is needed. Think of the IFSTACK (which is the main bottleneck -- the generic operators produce relatively little speed penalty) as a pedagogic tool and/or a convenience. The proper way to do it would be to extend the hardware stack on the 80x87 chip into memory. Unfortunately, as Palmer and Morse note in The 8087 Primer, the instruction set gives no hooks for easily extending the 80x87 stack. All the approaches I have tried so far have been pretty cumbersome. So FORTE is not intended to produce optimized code. If you need speed, you hand-code the inner loops. FORTE lets you do quick-and-dirty cal- culations easily, a la interpreted BASIC. I am rewriting FORTE to reduce its code size and workspace. I will put some effort into the generic data stack manager to reduce the speed penalty, if people are interested. Best regards, Julian V. Noble (bitnet JVN@VIRGINIA) ----- This message came from GEnie via willett through a semi-automated process. Report problems to: 'uunet!willett!dwp' or 'willett!dwp@gateway.sei.cmu.edu'
ForthNet@willett.UUCP (ForthNet articles from GEnie) (03/23/90)
Date: 03-21-90 (23:38) Number: 58 (Echo) To: BILL MCCARTHY Refer#: 54 From: JULIAN NOBLE Read: NO Subj: MCCARTHY'S TIMINGS Status: PUBLIC MESSAGE Dear Mr. McCarthy, I have done some further research into timings, etc. Based on clocks, I estimated the minimum time for 25,000 repeats of a=(b+c)/(c+d) to be 0.63 sec on the 16 MHz 80386/87 combo. When I hand-coded this (10-byte) precision) in assembler, I found the running time (adjusted for clock speed) on my machine to be 0.69 sec, really very close to the estimate. If Turbo Pascal and Turbo C can really come that close to the minimum machine code execution time, they have achieved something no other com- piler writer has ever claimed to be able to do. And, in fact, I doubt they have done it. I bet these compilers removed the invariant expression from the loop! (I know their optimizations include this, and it is almost impossible to turn it off. You can check it by -- say -- incrementing one of the variables by 1 each time around (or use the in- dex as a variable).) Nevertheless, you convince me that the overhead in the IFSTACK is too great for it to be used to execute the generated FORTH code. I have some ideas that ought to improve things, and will upload a modified IFSTACK file when it is ready. But finally, I really never intended FORTE to produce production code. If you want to program in FORTRAN, get a FORTRAN compiler. My intent, as stated clearly in my Computers in Physics and upcoming JFAR articles was to add formula translation to FORTH as a matter of convenience. Finally, thank you for your comments. I appreciate the feedback and bug reports. Sincerely yours, Julian V. Noble ----- This message came from GEnie via willett through a semi-automated process. Report problems to: 'uunet!willett!dwp' or 'willett!dwp@gateway.sei.cmu.edu'
ForthNet@willett.UUCP (ForthNet articles from GEnie) (03/24/90)
Date: 03-23-90 (00:02) Number: 59 (Echo) To: BILL MCCARTHY Refer#: 54 From: BILL MCCARTHY Read: NO Subj: NEW RELEASE OF HS/FORTH Status: PUBLIC MESSAGE Dear Mr. Noble, >> If Turbo Pascal and Turbo C can really come that close ... Well, Julian, here's a cleaned up screen dump of my Pascal code from the Turbo Debugger: PASTEST.56: for i:=1 to 25000 do cs:00CB C70666000100 mov word ptr [0066],0001 cs:00D1 EB04 jmp PASTEST.57 (00D7) cs:00D3 FF066600 inc word ptr [0066] PASTEST.57: a := (b+c) / (d+e); cs:00D7 CD372E0200 fld tbyte ptr[0002] cs:00DC CD372E0C00 fld tbyte ptr[000C] cs:00E1 CD3AC1 faddp st(1),st cs:00E4 CD372E1600 fld tbyte ptr[0016] cs:00E9 CD372E2000 fld tbyte ptr[0020] cs:00EE CD3AC1 faddp st(1),st cs:00F1 CD3AF9 fdivp st(1),st cs:00F4 CD373E6800 fstp tbyte ptr[0068] cs:00F9 CD3D fwait cs:00FB 813E6600A861 cmp word ptr [0066],61A8 cs:0101 75D0 jne 00D3 As you can see, it really does perform the loop 25,000 times and, except for the looping method (which would be much faster using the CX register), is very clean code. Turbo C also executed the full workload. >> If you want to program in FORTRAN, get a FORTRAN compiler. I don't want to program in FORTRAN! What I'd like to have is a capability to have an algebraic parsing capability. I read the text of your upload and understood it to be pedagogical in nature rather than a blazing number cruncher. However, I did expect the commercial product from Harvard Softworks to be on more of a par with the FLOATING package (yes, even with the hardware limit). I've been converting one of my old PL/I algebraic parsers to HS/Forth. It won't be anywhere as flexible as your FORTE but it will give me the performance I'm seeking (since I don't need imaginary numbers and will support only temporary real, there is no need for a "smart" stack). BTW, the 387 manual from Intel seems to suggest that it has all the hooks for an extended virtual hardware stack. Since I haven't heard of anyone implementing such an interrupt handler, I'm skeptical. Looking forward to your upgrades, Bill McCarthy ----- This message came from GEnie via willett through a semi-automated process. Report problems to: 'uunet!willett!dwp' or 'willett!dwp@gateway.sei.cmu.edu'
ForthNet@willett.pgh.pa.us (ForthNet articles from GEnie) (10/05/90)
Date: 09-29-90 (17:28) Number: 3864 (Echo) To: IAN WATTERS Refer#: 3862 From: STEVE PALINCSAR Read: NO Subj: HS/Forth Status: PUBLIC MESSAGE I like HS/Forth very much. It has very full support for DOS functions, files, things like that. And since that's the sort of thing I use a lot, I consider it well-furnished and fully equipped (as opposed to those belonging to the minimalist school, who would think of it as obese). The"native mode," however. If you're asking about relative performance, HS/Forth is quite fast, and has a rather unusual elective, the Optimizer, that allows _extremely easy_ generation of machine code without having to use the assembler. That's a real plus for me, because I know absolutely zero about assembler. ----- This message came from GEnie via willett through a semi-automated process. Report problems to: dwp@willett.pgh.pa.us or uunet!willett!dwp
ForthNet@willett.pgh.pa.us (ForthNet articles from GEnie) (11/28/90)
Date: 11-25-90 (18:54) Number: 293 of 293 To: ALL Refer#: NONE From: STEVE PALINCSAR Read: (N/A) Subj: PROGRAMMER'S SHOP CAT. Status: PUBLIC MESSAGE Conf: FORTH (58) Read Type: GENERAL (+) I just received a copy of the Programmer's Shop catalog in the mail the other day (probably came from a PC Mag. subscriber mailing list). I was surprised to find that HS/Forth is listed in the catalog, and is available at a discount price. If I remember right, this firm advertises in Dr. Dobbs, and used to list PC/Forth. At least it's encouraging to see that forth isn't totally invisible in the "mainstream" marketplace... PCRelay:VIRGIN -> #448 The Virginia Connection 4.10a15 The Virginia Connection (CASA) 703-648-1841 <<<>>> ----- This message came from GEnie via willett through a semi-automated process. Report problems to: dwp@willett.pgh.pa.us or uunet!willett!dwp
ForthNet@willett.pgh.pa.us (ForthNet articles from GEnie) (01/24/91)
Date: 01-19-91 (07:02) Number: 924 of 948 To: J.BLACK13 [JOHN BLACK] Refer#: NONE From: STEVE PALINCSAR Read: NO Subj: SMALL EXE FILES Status: PUBLIC MESSAGE Conf: FORTH (58) Read Type: GENERAL (+) When you TURNKEY an HS/FORTH application, you can make a rather small sized EXE file if you relocate the system segments so that you move the LISTS segment down into the free space on top of the CODES segment, and leave FORTHS and any empty user-defined segments on top. When you TURNKEY everything on top of the last used bytes (plus anything you reserved for space for shelling out to DOS) in the LISTS segment get discarded, and are not saved as part of the memory image. --- ~ R108A:MetroLink: Data Bit NETWork * Alexandria, VA * (703) 719-9648 PCRelay:DCINFO -> #16 MetroLink (tm) International Network 4.10 DC Info Exchange MetroLink International Hub <<<>>> ----- This message came from GEnie via willett. You cannot Reply to the author using email. Please post a follow-up article, or use any instructions the author may have included (USMail addresses, telephone #, whatever). Report problems to: dwp@willett.pgh.pa.us or uunet!willett!dwp
ForthNet@willett.pgh.pa.us (ForthNet articles from GEnie) (05/06/91)
Category 1, Topic 31 Message 31 Sat May 04, 1991 D.POPE7 [Dan Pope] at 12:50 EDT I'd like to elaborate on a comment I made at the May 2 FIGGY BAR regarding HS/Forth. I'm a Forth novice, intrigued by the language, interested in learning it for my own edification if nothing else. I have downloaded several PD/Shareware version and have used MasterForth on the Apple IIe. With each of these I ran into annoying little gotchas that interfered with my enjoyment of learning Forth. I finally purchased a student version of HS/Forth from Harvard Softworks; so far I'm very pleased with what I've received. It came with the book FORTH: A TEXT AND REFERENCE by Kelly & Spies (which I like better than STARTING FORTH). There is also a well organized 450+ page tutorial and reference manual written by Kelly & Callahan. The tutorial/reference is keyed to the text and came in a solid loose-leaf binder and slip cover. This version of Forth is designed specifically for PC/MS-DOS systems which suites me fine. Apparently HS/Forth does not completely comply with either FORTH-79 or FORTH-83 but you can make it compatible by loading extensions. There are also extensions for strings, dynamic strings, quadruple-length numbers, floating point arithmetic, trig functions, arrays, extra stacks, vectors, graphics, sound effects and DOS calls; also, compilers, metacompilers and debugging tools that I don't understand yet. I eventually want to play around with graphics and it looks like this system will let me to do that. HS/Forth can store text on disks in three ways; as regular continuous MS-DOS text files (which I prefer), as text files broken up into Forth blocks, or as blocks placed directly on the disk in traditional Forth manner. There are editors for handling each of these options. There is an easy to learn "Tiny- File Editor" that's great for experimenting or you can shell out to any other MS-DOS compatible editor. I can't comment on the suitability of HS/Forth as a development environment but as a Forth learning tool so far I'd say it's the greatest thing since colored margarine (gave away my age there). I noticed that in the last issue of FD, Harvard Softworks was not advertising a student version. Maybe someone else knows if it is still available, or their phone number is (513)748-0390. Dan Pope Flint Michigan ----- This message came from GEnie via willett. You *cannot* reply to the author using e-mail. Please post a follow-up article, or use any instructions the author may have included (USMail addresses, telephone #, etc.). Report problems to: dwp@willett.pgh.pa.us _or_ uunet!willett!dwp