Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #54576

Re: CASEs compared

Newsgroups comp.lang.forth
Date 2017-01-31 08:12 -0800
References <o6n8ad$191s$1@gioia.aioe.org> <2017Jan30.165616@mips.complang.tuwien.ac.at> <097d4d65-5777-4dae-b1b8-6210d2807fc4@googlegroups.com> <o6p01r$3sb$2@gioia.aioe.org>
Message-ID <fb35470d-27ba-4bc2-8ad6-e05404cd2b79@googlegroups.com> (permalink)
Subject Re: CASEs compared
From hughaguilar96@gmail.com

Show all headers | View raw


On Monday, January 30, 2017 at 8:24:56 PM UTC-7, HAA wrote:
> hughaguilar96@gmail.com wrote:
> > ...
> > Why did he use a linked list? Why not a self-balancing binary-tree? Most likely,
> > because he didn't know how to implement a self-balancing binary-tree.
> 
> Or such effort couldn't be justified on the grounds it would waste resources
> for no material gain.

Didn't you previously say that his linked-list code was 10 times slower than Eaker's CASE construct? But now you say that there would be "no material gain" from using a self-balancing binary-tree. hmmm...

BTW: If this is Rick van Norman, who later got hired by Elizabeth Rather to write SwiftForth for her, then I find it highly humorous that his SWITCH was 10 times slower than Eaker's CASE --- most programmers would have written something that was faster than CASE given the abysmal bad efficiency of CASE --- this van Norman somehow manages to write a SWITCH that is 10 times slower, and this qualifies him to get hired at Forth Inc.! LOL Maybe this is why SwiftForth was a bug-ridden mess, and provided abysmal performance. Idiots!

> > \ <SWITCH is primarily provided for writing VM simulators.
> 
> Which is far away from the everyday applications to which programmers
> will be using Case.  Languages provide for general use.  I don't care for
> the way ANS defined Eaker but as for the choice, I don't fault it.

The reason why my <SWITCH is cumbersome to use, is because it generates a stand-alone colon word rather than being used inside of a colon word, and the table entries can't share local variables --- CASE is better in both regards.

This isn't my fault though! I couldn't fix these problems because of ANS-Forth's stupid limitations --- ANS-Forth should have supported quotations (not Paysan-faked quotations, but real quotations that access the parent function's local variables) and these quotation should have an xt that is known at compile-time so the jump-table can be built. Because of ANS-Forth's stupid and pointless limitations, the <SWITCH that I wrote was the best that could be done.

ANS-Forth is just a total failure! ANS-Forth is really the most retarded language design in the history of computer programming! To a large extent, the reason why all of the ANS-Forth cult members hate my <SWITCH is because it shines a spotlight on the stupidity of ANS-Forth. Every time that anybody writes working code in ANS-Forth, the programmer does so by working around the stupid and pointless limitations of ANS-Forth --- this is why the ANS-Forth cult members hate and fear working ANS-Forth code --- programming in ANS-Forth inevitably shines a spotlight on the stupidity of ANS-Forth design because the code inevitably is a work-around for Elizabeth Rather's idiotic design decisions.

Anyway, writing simulator for a VM seems like a pretty "everyday application" to me. There are great numbers of C programmers who have written a Forth in C and have used SWITCH (that generates a jump-table) as the basis for this. Most, if not all, did this for the purpose of "proving" that C is the "god language" that all other languages are written in, and that Forth is a toy interpreted language roughly comparable to line-number BASIC. They ask the obvious question: "If Forth is a real language, then why is it impossible to write a C interpreter in Forth?"

Also, a big application area for Forth is FPGA custom processors. These obviously need to be simulated on a desktop-computer. How are you going to make money with Forth if you don't build your own FPGA-based Forth processor? I got hired as a Forth programmer for this purpose. I wouldn't have been hired just to write desktop-computer software --- the days of selling desktop-computer software in shrink-wrapped boxes (such as CompUSA used to sell) were well on their way toward non-existence in 1994, and are totally a thing of the past in 2017.

People who think that CASE is adequate are just writing toy programs that have no speed requirements whatsoever. Anton Ertl's students are in this category --- their programs don't have to compete in the real world --- they only compete against their fellow students, who are also at an abysmal performance level. ANS-Forth is a toy language unsuitable for writing commercial software.

The CASE construct in ANS-Forth is utterly retarded! This is totally pointless --- CASE could have easily been written to generate a jump-table so that it would be efficient --- the fact that CASE wasn't written to generate a jump-table is because Elizabeth Rather doesn't know what a jump-table is; there is no other possible explanation.

The idiotic design of the CASE construct, just by itself, is reason enough to dismiss ANS-Forth as worthless.

Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

CASEs compared "HAA" <someone@microsoft.com> - 2017-01-30 22:34 +1100
  Re: CASEs compared anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-01-30 15:56 +0000
    Re: CASEs compared hughaguilar96@gmail.com - 2017-01-30 09:57 -0800
      Re: CASEs compared "HAA" <someone@microsoft.com> - 2017-01-31 14:26 +1100
        Re: CASEs compared hughaguilar96@gmail.com - 2017-01-31 08:12 -0800
          Re: CASEs compared "HAA" <someone@microsoft.com> - 2017-02-01 11:39 +1100
            Re: CASEs compared hughaguilar96@gmail.com - 2017-01-31 22:37 -0800
              Re: CASEs compared hughaguilar96@gmail.com - 2017-02-01 12:26 -0800
                Re: CASEs compared hughaguilar96@gmail.com - 2017-02-01 16:50 -0800
                Re: CASEs compared hughaguilar96@gmail.com - 2017-02-01 18:02 -0800
                Re: CASEs compared "HAA" <someone@microsoft.com> - 2017-02-02 21:12 +1100
                Re: CASEs compared hughaguilar96@gmail.com - 2017-02-02 13:46 -0800
                Re: CASEs compared hughaguilar96@gmail.com - 2017-02-02 17:01 -0800
                Re: CASEs compared "HAA" <someone@microsoft.com> - 2017-02-04 12:43 +1100
                Re: CASEs compared hughaguilar96@gmail.com - 2017-02-03 17:52 -0800
                Re: CASEs compared Alex <alex@rivadpm.com> - 2017-02-04 11:10 +0000
                Re: CASEs compared rickman <gnuarm@gmail.com> - 2017-02-02 19:57 -0500
                Re: CASEs compared hughaguilar96@gmail.com - 2017-02-02 17:05 -0800
                Re: CASEs compared rickman <gnuarm@gmail.com> - 2017-02-02 21:55 -0500
                Re: CASEs compared Mark Wills <markwills1970@gmail.com> - 2017-02-03 02:11 -0800
                Re: CASEs compared hughaguilar96@gmail.com - 2017-02-03 10:52 -0800
                Re: CASEs compared hughaguilar96@gmail.com - 2017-02-03 17:38 -0800
                Re: CASEs compared rickman <gnuarm@gmail.com> - 2017-02-03 22:08 -0500
                Re: CASEs compared hughaguilar96@gmail.com - 2017-02-03 21:40 -0800
                Re: CASEs compared rickman <gnuarm@gmail.com> - 2017-02-04 01:16 -0500
                Re: CASEs compared rickman <gnuarm@gmail.com> - 2017-02-03 14:40 -0500
                Re: CASEs compared hughaguilar96@gmail.com - 2017-02-03 17:47 -0800
                Re: CASEs compared rickman <gnuarm@gmail.com> - 2017-02-03 22:04 -0500
                Re: CASEs compared "HAA" <someone@microsoft.com> - 2017-02-04 12:39 +1100
                Re: CASEs compared rickman <gnuarm@gmail.com> - 2017-02-03 23:32 -0500
                Re: CASEs compared "HAA" <someone@microsoft.com> - 2017-02-04 22:50 +1100
                Re: CASEs compared rickman <gnuarm@gmail.com> - 2017-02-04 11:07 -0500
                Re: CASEs compared hughaguilar96@gmail.com - 2017-02-04 08:48 -0800
                Re: CASEs compared Mark Wills <markwills1970@gmail.com> - 2017-02-04 10:01 -0800
                Re: CASEs compared rickman <gnuarm@gmail.com> - 2017-02-04 16:43 -0500
                Re: CASEs compared hughaguilar96@gmail.com - 2017-02-04 18:53 -0800
                Re: CASEs compared "HAA" <someone@microsoft.com> - 2017-02-05 19:12 +1100
    Re: CASEs compared "HAA" <someone@microsoft.com> - 2017-01-31 14:25 +1100
  Re: CASEs compared Elliott Chapin <elliott.chapin@gmail.com> - 2017-02-05 08:25 -0800
    Re: CASEs compared Coos Haak <htrofhc@gmail.com> - 2017-02-06 00:42 +0100
  Re: CASEs compared jacko <jackokring@gmail.com> - 2017-02-16 17:46 -0800
    Re: CASEs compared hughaguilar96@gmail.com - 2017-02-17 09:09 -0800

csiph-web