🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.micro.atari
Article #2116

Re: TDI Modula-2, languages

#2116
From: franco
Date: Wed, 15 Jan 1986 22:16
26 lines
1992 bytes
There is also a public domain XLISP and PROLOG (built on top of it).
Also, Dragon has released a demo version of their FORTH which I belive
does everything the full blown FORTH does except file transfer.  I have
found that demo very useful - I have learned to program in FORTH using
it and I have been able to judge the speed of FORTH through benchmark
programs.  Incidentally, I have found that FORTH is about 100 times faster
than ST BASIC.  For example, the following program computes the 26th
fibonacci number in 25 seconds: (recursive program - for benchmark)

: FIB 0 SWAP -1 * SWAP BEGIN SWAP FIRST SEC OVER 0 = UNTIL SWAP DROP ;
: FIRST BEGIN 1+ DUP 1+ DUP -3 > UNTIL ;
: SEC + -1 * OVER 0 > IF BEGIN + OVER 0 > NOT UNTIL THEN ;

This example also helped convince me that I should not be programming in
FORTH.  Incidentally, if anyone has a less cumbersome way to write a
FORTH program for fibonacci please send it to me.  (I know there is a 
fast iterative solution to fibonacci - this is uninteresting as a benchmark -
I would like to know of a better recursive solution - what I have done above
is use the sign bit to indicate whether search is proceeding to the "left"
or to the "right".  Surely there is a better way - what would happen if
there were a middle son to be expanded?  Would I have to use another stack
word to save the "return address"?)

John Franco
franco@indiana
Technical Details
Message-ID: <500031@iuvax.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!cbosgd!ihnp4!inuxc!iubugs!iuvax!franco
References: <456@ssc-bee.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: Notesfiles; site iuvax.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!cbosgd!ihnp4!inuxc!iubugs!iuvax!franco
From: franco@iuvax.UUCP
Newsgroups: net.micro.atari
Subject: Re: TDI Modula-2, languages
Message-ID: <500031@iuvax.UUCP>
Date: Wed, 15-Jan-86 17:16:00 EST
Article-I.D.: iuvax.500031
Posted: Wed Jan 15 17:16:00 1986
Date-Received: Sun, 19-Jan-86 03:40:07 EST
References: <456@ssc-bee.UUCP>
Lines: 26
Nf-ID: #R:ssc-bee:-45600:iuvax:500031:000:1392
Nf-From: iuvax!franco    Jan 15 17:16:00 1986