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


Groups > comp.lang.forth > #54849

Re: Dynamic programming in Forth

From "David N. Williams" <williams@umich.edu>
Newsgroups comp.lang.forth
Subject Re: Dynamic programming in Forth
Date 2017-02-14 08:19 -0500
Organization University of Michigan
Message-ID <o7v00u$lo7$1@dont-email.me> (permalink)
References <3cc99bb7-98df-41b6-a313-2e64e8a83e5c@googlegroups.com> <e5ff5dcb-6ac9-46db-9975-ee3bd71926bb@googlegroups.com>

Show all headers | View raw


On 2/14/17 6:53 AM, lehs wrote:
 > Last year I started this project to incorporate nested sets in Forth,
 > using separate stacks representing sets, in princip, as counted
 > bundles of numbers:
 >
 > n1 ... nk k
 >
 > To be able to form nested sets (also including ordered n-tuples) the
 > bundles are implemented
 >
 > n1 ... nk -2k    for (unordered) sets and
 > n1 ... nk -2k-1  for ordered n-tuples.
 >
 > I'm very pleased with the result as I can program efficiently on a
 > higher level now. Of course the code could be much more efficient
 > using computer scientific state of the art concepts, but this would
 > probably be far more complicated and less general. Using stacks for
 > implementing new data structures in Forth is very easy to do and to
 > use and results in fairly effective code and code writing.
 >
 > By know - except from singles, doubles and floating points - I have
 > stacks for big integers, nested sets and strings and I have no problem
 > with using this. I can remain a productive forther and all the time
 > I'm using my inventions.

I always liked the idea of freely introducing new stacks.  They're easy
to do, convenient to use, and can be implemented relatively efficiently.
As far as I'm concerned, stacks are *the* way to do data types in Forth,
as long as it's not overdone.  :-)

-- David

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


Thread

Re: Dynamic programming in Forth lehs <skydda.barnen@gmail.com> - 2017-02-14 03:53 -0800
  Re: Dynamic programming in Forth "David N. Williams" <williams@umich.edu> - 2017-02-14 08:19 -0500
    Re: Dynamic programming in Forth lehs <skydda.barnen@gmail.com> - 2017-02-14 06:03 -0800
      Re: Dynamic programming in Forth minforth@arcor.de - 2017-02-14 07:44 -0800
        Re: Dynamic programming in Forth Alex <alex@rivadpm.com> - 2017-02-14 16:34 +0000

csiph-web