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


Groups > comp.lang.forth > #46620

Re: string-stack.4th

From Andrew Haley <andrew29@littlepinkcloud.invalid>
Subject Re: string-stack.4th
Newsgroups comp.lang.forth
References (9 earlier) <b67d0308-b176-4d24-8357-980842c2d6eb@googlegroups.com> <c5b9a927-cc34-4040-80e4-f8a5ad99ef98@googlegroups.com> <a634ea74-bef2-4fce-abb3-93d5b445ea0e@googlegroups.com> <5a9dd21c-5b85-45be-bbee-c444cb8243d8@googlegroups.com> <ec39f01d-2e8a-4b54-bbe0-71ecac9d5edc@googlegroups.com>
Message-ID <lqWdnWga0vsSHJbKnZ2dnUU7-R_NnZ2d@supernews.com> (permalink)
Date 2016-04-11 05:50 -0500

Show all headers | View raw


Mark Wills <markwills1970@gmail.com> wrote:
> Not related, but this looks really cool, and I'm going to read it later:
> Vol XI no. 1
> FORTH NEEDS THREE MORE STACKS - AYMAN ABU-MOSTAFA
> Standard Forth uses the return stack for a number of disparate
> tasks: that is bad programming at best, confusing and error-prone at
> worst. This article suggests an aux stack for loop parameters and
> temporary storage. And a method of handling conditionals without
> branching allows use of conditionals outside colon definitions; this
> is done with a condition stack and a case stack.

IMO this is misguided.  Forth design in embedded systems (its
traditional field of use) has tended to use small tasks, each one
dedicated to doing a single job.This has turned out to be a useful
design principle as long as when it is applied consistently.  And by
small, I mean really small: maybe each task is only a few words long.
The super-lightweight multi-tasker originally from Moore himself, then
from others at Forth, Inc. is designed to make this work well even on
very small systems.

It's not hard to partition memory for arrays of small tasks if each
one has a data stack, a return stack, and a user area.  If you have
five stacks it gets to be difficult, not to mention rather space-
inefficient.

Andrew.

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


Thread

string-stack.4th hughaguilar96@gmail.com - 2016-03-03 21:42 -0800
  Re: string-stack.4th hughaguilar96@gmail.com - 2016-03-03 21:54 -0800
  Re: string-stack.4th hughaguilar96@gmail.com - 2016-03-04 18:01 -0800
    Re: string-stack.4th Mark Wills <markwills1970@gmail.com> - 2016-03-05 02:52 -0800
      Re: string-stack.4th hughaguilar96@gmail.com - 2016-03-05 15:17 -0800
        Re: string-stack.4th foxaudioresearch@gmail.com - 2016-03-06 08:50 -0800
          Re: string-stack.4th foxaudioresearch@gmail.com - 2016-03-06 10:54 -0800
            Re: string-stack.4th hughaguilar96@gmail.com - 2016-03-06 14:08 -0800
              Re: string-stack.4th "HAA" <someone@microsoft.com> - 2016-03-07 10:30 +1100
                Re: string-stack.4th foxaudioresearch@gmail.com - 2016-03-06 16:45 -0800
                Re: string-stack.4th hughaguilar96@gmail.com - 2016-03-06 19:09 -0800
                Re: string-stack.4th Albert van der Horst <albert@spenarnc.xs4all.nl> - 2016-03-07 12:27 +0000
                Re: string-stack.4th hughaguilar96@gmail.com - 2016-03-07 22:44 -0800
                Re: string-stack.4th JennyB <jennybrien@googlemail.com> - 2016-03-11 03:47 -0800
                Re: string-stack.4th hughaguilar96@gmail.com - 2016-03-09 22:27 -0800
                Re: string-stack.4th Coos Haak <chforth@hccnet.nl> - 2016-03-10 11:05 +0100
                Re: string-stack.4th hughaguilar96@gmail.com - 2016-03-10 09:28 -0800
                Re: string-stack.4th Coos Haak <chforth@hccnet.nl> - 2016-03-11 00:10 +0100
                Re: string-stack.4th hughaguilar96@gmail.com - 2016-03-10 22:42 -0800
                Re: string-stack.4th Coos Haak <chforth@hccnet.nl> - 2016-03-11 12:29 +0100
                Re: string-stack.4th JennyB <jennybrien@googlemail.com> - 2016-03-12 01:33 -0800
                Re: string-stack.4th hughaguilar96@gmail.com - 2016-03-12 16:56 -0800
                Re: string-stack.4th "WJ" <w_a_x_man@yahoo.com> - 2016-04-22 09:55 +0000
                Re: string-stack.4th "WJ" <w_a_x_man@yahoo.com> - 2016-04-22 10:00 +0000
                Re: string-stack.4th "WJ" <w_a_x_man@yahoo.com> - 2016-03-11 06:24 +0000
                Re: string-stack.4th hughaguilar96@gmail.com - 2016-03-21 23:26 -0700
                Re: string-stack.4th franck.bensusan@gmail.com - 2016-03-10 10:42 -0800
                Re: string-stack.4th hughaguilar96@gmail.com - 2016-03-10 23:00 -0800
                Re: string-stack.4th hughaguilar96@gmail.com - 2016-04-10 20:23 -0700
                Re: string-stack.4th stephen@mpeforth.com (Stephen Pelc) - 2016-04-11 09:45 +0000
                Re: string-stack.4th hughaguilar96@gmail.com - 2016-04-11 20:00 -0700
                Re: string-stack.4th Mark Wills <markwills1970@gmail.com> - 2016-04-11 03:16 -0700
                Re: string-stack.4th Mark Wills <markwills1970@gmail.com> - 2016-04-11 03:47 -0700
                Re: string-stack.4th Andrew Haley <andrew29@littlepinkcloud.invalid> - 2016-04-11 05:50 -0500
                Re: string-stack.4th Raimond Dragomir <raimond.dragomir@gmail.com> - 2016-04-11 04:21 -0700
                Re: string-stack.4th Andrew Haley <andrew29@littlepinkcloud.invalid> - 2016-04-11 06:36 -0500
                Re: string-stack.4th hughaguilar96@gmail.com - 2016-04-11 20:34 -0700
                Re: string-stack.4th hughaguilar96@gmail.com - 2016-04-11 20:20 -0700
                Re: string-stack.4th hughaguilar96@gmail.com - 2016-06-03 05:53 -0700
              Re: string-stack.4th Mark Wills <markwills1970@gmail.com> - 2016-03-08 11:29 -0800

csiph-web