• nest-sys revisited

    From albert@spenarnc.xs4all.nl@21:1/5 to All on Thu Mar 13 17:19:30 2025
    Apologize, for bad mouthing nested-sys in the coroutine discussion.
    (not that I like this concept).

    In the ISO 94 document the concept of nest-sys is indeed needed.
    It is present in the convoluted explanation of DOES>.
    A more reasonable, not overly clever, implementation of the concept of
    a poor man's object is META. Remember: CREATE DOES> words are a data
    structure coupled with a single behaviour, a kind of object.

    This is META.
    \ ( xtb xtd "name" -- ) generate DEA for "name".

    It is most easily explained via an example:

    : CONSTANT CREATE , DOES> @ ;

    META replaces CREATE and DOES> meanwhile not introducing anything
    new.

    The above examples becomes using META :

    :NONAME , ; :NONAME @ ; META CONSTANT

    The specification of META is

    \ ( xtb xtd "name" -- ) generate DEA for "name".

    The dictionary entry (e.g. CONSTANT) identified by "name" does
    the following:

    On compilation :
    (Think `` 12 CONSTANT ORANGUTAN ''
    It parses a name and generates a dictionary entry for it.
    xtb is executed and the base address is retained.

    On execution of the resulting word:
    xtd is executed with on the stack the base address.

    The mystification disappears. Nowhere is nested-sys in sight.

    I prefer { } over :NONAME.

    My favorite is

    { } { } META DATA

    Hint :
    : VARIABLE DATA 0 , ;

    Groetjes Albert
    --
    Temu exploits Christians: (Disclaimer, only 10 apostles)
    Last Supper Acrylic Suncatcher - 15Cm Round Stained Glass- Style Wall
    Art For Home, Office And Garden Decor - Perfect For Windows, Bars,
    And Gifts For Friends Family And Colleagues.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From albert@spenarnc.xs4all.nl@21:1/5 to dxforth@gmail.com on Fri Mar 14 13:46:51 2025
    In article <8d760e814c0d0342eb9beaa0d271a6f1d1271e3a@i2pn2.org>,
    dxf <dxforth@gmail.com> wrote:
    On 14/03/2025 3:19 am, albert@spenarnc.xs4all.nl wrote:
    Apologize, for bad mouthing nested-sys in the coroutine discussion.
    (not that I like this concept).

    In the ISO 94 document the concept of nest-sys is indeed needed.
    ...

    Unavoidable really. Nesting aka subroutine call - the process of
    calling a function and when it completes, returning to the caller -
    is a basic computing concept. In forth 'nest-sys' represents the
    information necessary to facilitate that return. It should not be
    confused with invoking a function i.e. 'xt' EXECUTE.

    I've shown that the concept of nest-sys is avoidable for a language
    that has the capabilities of Forth with a slight reorganisation of
    the CREATE DOES> construction.

    nest-sys is a ghost. You know it must be there, but only an
    implementor has to deal with it. Unless you stick to CREATE DOES>,
    you call this unavoidable, I don't.

    Groetjes Albert.
    --
    Temu exploits Christians: (Disclaimer, only 10 apostles)
    Last Supper Acrylic Suncatcher - 15Cm Round Stained Glass- Style Wall
    Art For Home, Office And Garden Decor - Perfect For Windows, Bars,
    And Gifts For Friends Family And Colleagues.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)