1. Re: [GEN] Random Thoughts, Item 7 FORTH still exists
- Posted by Undetermined origin c/o LISTSERV administrator Oct 16, 2000
- 418 views
FORTH is alive and well and strangely related to euphoria. Forth exists for Windows and Linux and it is one of the only interpreted languages that runs even faster than euphoria. qsheme is a fast scheme written with a ForthLike interpreter. Here are some results of running fib(30) 3 times on my computer. qscheme 2.92 <-- very good euphoria 2.46 <-- better gforth 1.86 <-- best euphoria to c 0.93 <-- good boost for only $29.00 C 0.18 <-- no suprise there. These are three of the fastest interpreters in the world and I bet that qscheme and gforth work in a similar way to euphoria. If I was smarter I would write a euphoria to qscheme or gforth translator. Forth looks like this:- : fib dup 2 < if drop 1 else dup 1 recurse swap 2 - recurse + then ; scheme looks like this :- ( define ( fib n) (if ( <= 2 n ) 1 ( + ( fib ( - n 1 )) ( fib ( - n 2 )) ) ) ) Think I'll stick with euphoria. An important feature of Forth is that it is Interactive, you can try things in a console without having to write whole programs, I miss that with euphoria.