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


Groups > comp.lang.forth > #54849

Re: Dynamic programming in Forth

Path csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From "David N. Williams" <williams@umich.edu>
Newsgroups comp.lang.forth
Subject Re: Dynamic programming in Forth
Date Tue, 14 Feb 2017 08:19:06 -0500
Organization University of Michigan
Lines 31
Message-ID <o7v00u$lo7$1@dont-email.me> (permalink)
References <3cc99bb7-98df-41b6-a313-2e64e8a83e5c@googlegroups.com> <e5ff5dcb-6ac9-46db-9975-ee3bd71926bb@googlegroups.com>
Reply-To williams@umich.edu
Mime-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding 7bit
Injection-Date Tue, 14 Feb 2017 13:17:18 -0000 (UTC)
Injection-Info mx02.eternal-september.org; posting-host="0123cef3fc566fdee7f02670565b82a4"; logging-data="22279"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+82jLroWfYjVbunZH2l+Gc"
User-Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.7.1
In-Reply-To <e5ff5dcb-6ac9-46db-9975-ee3bd71926bb@googlegroups.com>
Cancel-Lock sha1:X9Cd4r6mqE/8GcY4tlH34f9g/dc=
Xref csiph.com comp.lang.forth:54849

Show key headers only | 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