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


Groups > comp.lang.forth > #54850

Re: Dynamic programming in Forth

Newsgroups comp.lang.forth
Date 2017-02-14 06:03 -0800
References <3cc99bb7-98df-41b6-a313-2e64e8a83e5c@googlegroups.com> <e5ff5dcb-6ac9-46db-9975-ee3bd71926bb@googlegroups.com> <o7v00u$lo7$1@dont-email.me>
Message-ID <97f17def-4eb6-477a-bc87-e5274a2f5deb@googlegroups.com> (permalink)
Subject Re: Dynamic programming in Forth
From lehs <skydda.barnen@gmail.com>

Show all headers | View raw


Den tisdag 14 februari 2017 kl. 14:19:08 UTC+1 skrev David N. Williams:
> 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

I do agree. It's the only way to keep the Forth way of programming, a simple and complete idea of how to manage computing. Other methods would either be more complicated to implement och more complicated to use.

I love it and it makes me productive.

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