• 0 SET-ORDER why?

    From Krishna Myneni@21:1/5 to All on Tue Jun 25 18:25:15 2024
    Why is 0 a valid argument to SET-ORDER (from the optional Search-Order
    word set)? It can leave a Forth system in a non-recoverable state.

    ---
    16.6.1.2197

    SET-ORDER ( widn . . . wid1 n – – )
    Set the search order to the word lists identified by widn . . . wid1. Subsequently, word list wid1 will be searched first, and word list widn searched last.

    If n is zero, empty the search order.

    If n is minus one, set the search order to the implementation-defined
    minimum search order. The minimum search order shall include the words FORTH-WORDLIST and SET-ORDER.

    A system shall allow n to be at least eight.
    ---

    Sentences are separated for emphasis: "If n is zero, empty the search
    order." Why?

    In kForth (32/64), the sequence

    0 SET-ORDER

    leaves the Forth system in a non-recoverable state, and I have to use
    Ctrl-C to break out back to the OS shell. This appears to be true in
    Gforth as well, although Gforth traps Ctrl-C, so maybe one has to kill
    the process from another shell.

    See the examples below.

    -- Krishna Myneni


    === kForth example ===
    kForth-64 v 0.4.5 (Build: 2024-03-30)
    Copyright (c) 1998--2023 Krishn
  • From minforth@21:1/5 to All on Wed Jun 26 01:19:27 2024
    IMO, it is a simple security mechanism against other users
    breaking out of an application program and taking control
    of the shell.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Ertl@21:1/5 to Krishna Myneni on Wed Jun 26 07:49:10 2024
    Krishna Myneni <krishna.myneni@ccreweb.org> writes:
    Why is 0 a valid argument to SET-ORDER (from the optional Search-Order
    word set)? It can leave a Forth system in a non-recoverable state.

    So what? There are lots of ways to put a Forth system in a
    non-recoverable state.

    Sentences are separated for emphasis: "If n is zero, empty the search
    order." Why?

    Why not? It's what I would expect from 0 SET-ORDER anyway.

    Is your question: "What potential uses does an empty search order
    have?" ?

    I have seen postings that suggest to use EVALUATE for converting
    untrusted input into a number. There is of course no security
    precautions in these postings, but at the very least one could empty
    the search order before the EVALUATE and restore it after the EVALUATE
    (with the EVALUATE being wrapped with CATCH). I thought about writing
    out the source code, but the main things that would demonstrate is how inconvenient GET-ORDER and SET-ORDER with their arbitrary number of
    stack items are, and how inconvenient the arbitrary number of stack
    items produced by EVALUATE is.

    Of course, with recognizer sequences, the better way is to use a
    recognizer sequence that only contains the number recognizers you
    want, no need to mess with the search order.

    In kForth (32/64), the sequence

    0 SET-ORDER

    leaves the Forth system in a non-recoverable state, and I have to use
    Ctrl-C to break out back to the OS shell. This appears to be true in
    Gforth as well, although Gforth traps Ctrl-C, so maybe one has to kill
    the process from another shell.

    In Gforth you can leave the text interpreter in the traditional Unix
    way of doing Ctrl-D at the start of a line.

    Restoring an empty search order to some more usable default by the
    system CATCH handler would be a potential convenience feature, but I
    have not experienced an empty search order as a problem yet, and I
    don't remember users asking for such a feature, either. And it would
    only catch

    0 SET-ORDER

    but not the functionally equivalent

    WORDLIST 1 SET-ORDER

    So why nerf one and not the other?

    - anton
    --
    M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
    comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
    New standard: https://forth-standard.org/
    EuroForth 2024: https://euro.theforth.net

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From albert@spenarnc.xs4all.nl@21:1/5 to minforth on Wed Jun 26 11:12:09 2024
    In article <5c21b9a70973cda8da6fac285f5b2137@www.novabbs.com>,
    minforth <minforth@gmx.net> wrote:
    IMO, it is a simple security mechanism against other users
    breaking out of an application program and taking control
    of the shell.

    I don't think so. The requirement to have FORTH-WORDLIST and SET-ORDER
    means that you run the system normally after using this, including the
    repl QUIT.
    The intention of the standard that the minimum search order contains
    a method to get the system under control. `FORTH' is way better than manipulations with wordlists.
    I cheated in ciforth. FORTH puts the FORTH-WORDLIST on top and is
    a regular vocabulary/namespace.
    In fact it is equivalent to
    : FORTH GET-ORDER 1+ >R FORTH-WORDLIST R> SET-ORDER ;

    So the ONLY namespace contains prefixes (handles numbers and strings)
    and the word FORTH to recover.
    FORTH and ONLY are named wordlist/ vocabularies.

    To seal off in ciforth you can do:
    'FORTH HIDDEN ONLY
    From now on only numbers and strings are recognized.

    Groetjes Albert
    --
    Don't praise the day before the evening. One swallow doesn't make spring.
    You must not say "hey" before you have crossed the bridge. Don't sell the
    hide of the bear until you shot it. Better one bird in the hand than ten in
    the air. First gain is a cat purring. - the Wise from Antrim -

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From albert@spenarnc.xs4all.nl@21:1/5 to Anton Ertl on Wed Jun 26 11:18:42 2024
    In article <2024Jun26.094910@mips.complang.tuwien.ac.at>,
    Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
    Krishna Myneni <krishna.myneni@ccreweb.org> writes:
    Why is 0 a valid argument to SET-ORDER (from the optional Search-Order
    word set)? It can leave a Forth system in a non-recoverable state.

    So what? There are lots of ways to put a Forth system in a
    non-recoverable state.

    Sentences are separated for emphasis: "If n is zero, empty the search >>order." Why?

    Why not? It's what I would expect from 0 SET-ORDER anyway.

    0 SET-ORDER puts the minimum search order in place.
    Then there are FORTH-WORDLIST and SET-ORDER present to get
    the system under control. Am I mistaken?

    <SNIP>
    - anton

    Groetjes Albert
    --
    Don't praise the day before the evening. One swallow doesn't make spring.
    You must not say "hey" before you have crossed the bridge. Don't sell the
    hide of the bear until you shot it. Better one bird in the hand than ten in
    the air. First gain is a cat purring. - the Wise from Antrim -

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Krishna Myneni@21:1/5 to minforth on Wed Jun 26 05:54:37 2024
    On 6/25/24 20:19, minforth wrote:
    IMO, it is a simple security mechanism against other users
    breaking out of an application program and taking control
    of the shell.

    That seems like a security concern for people who generate executables
    and don't want users returning to the Forth shell, which would be useful
    to commercial vendors who don't want users to have the full capability
    of the Forth environment.

    ISTM such a use does not warrant formal standardization in a language,
    if that was the intent of specifically providing a way to disable the
    Forth shell.


    --
    Krishna

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Krishna Myneni@21:1/5 to albert@spenarnc.xs4all.nl on Wed Jun 26 06:13:37 2024
    On 6/26/24 04:18, albert@spenarnc.xs4all.nl wrote:
    In article <2024Jun26.094910@mips.complang.tuwien.ac.at>,
    Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
    Krishna Myneni <krishna.myneni@ccreweb.org> writes:
    Why is 0 a valid argument to SET-ORDER (from the optional Search-Order
    word set)? It can leave a Forth system in a non-recoverable state.

    So what? There are lots of ways to put a Forth system in a
    non-recoverable state.

    Sentences are separated for emphasis: "If n is zero, empty the search
    order." Why?

    Why not? It's what I would expect from 0 SET-ORDER anyway.

    0 SET-ORDER puts the minimum search order in place.
    Then there are FORTH-WORDLIST and SET-ORDER present to get
    the system under control. Am I mistaken?


    According to Anton's interpretation you are mistaken.

    0 SET-ORDER empties the search order, which is commonly taken to be
    understood as nothing exists in the search order. Of course this
    contradicts the notion in the standard of a "minimum search order which contains the words FORTH-WORDLIST and SET-ORDER".

    --
    Krishna

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From minforth@21:1/5 to All on Wed Jun 26 10:36:51 2024
    You described -1 SET-ORDER , whereas 0 SET-ORDER empties.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Krishna Myneni@21:1/5 to Anton Ertl on Wed Jun 26 05:56:51 2024
    On 6/26/24 02:49, Anton Ertl wrote:
    Krishna Myneni <krishna.myneni@ccreweb.org> writes:
    Why is 0 a valid argument to SET-ORDER (from the optional Search-Order
    word set)? It can leave a Forth system in a non-recoverable state.

    So what? There are lots of ways to put a Forth system in a
    non-recoverable state.
    ...

    By design? No.

    --
    Krishna

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Gerry Jackson@21:1/5 to Ruvim on Thu Jun 27 05:14:06 2024
    On 26/06/2024 14:36, Ruvim wrote:
    One possible use case:

      : turnkey ( -- ) 0 set-order
        also Target definitions
        also Minimal also
      ;

    ALSO duplicates the wordlist at the head of the search order. If the
    search order is empty there is nothing to duplicate. Therefore ALSO
    applied to an empty search order ought to be an ambiguous condition.

    Presumably the above definition works because a target wordlist replaces whatever garbage ALSO leaves in the search order. So the definition
    might as well have 0 1 SET-ORDER instead of 0 SET-ORDER ALSO.
    Or better still TARGET-WORDLIST 1 SET-ORDER. Either removes the above justification for 0 SET-ORDER.

    But having said that it is better for 0 SET-ORDER to do what is natural
    instead of yet another ambiguous condition.

    Another possible use case:

    : s-to-n ( addr u -- n )
    depth >r
    get-order n>r 0 set-order
    ['] evaluate ['] execute-interpreting catch
    nr> set-order
    depth 1- r> <> if -12 throw then
    ;

    This is a better use case e.g. if BASE is greater than decimal 10
    converting an alphanumeric string to a number could clash with a word in
    the dictionary. Having an empty search order eliminates that possibility.

    Incidentally another possibility is that if ['] EVALUATE is replaced in
    the above definition with ['] SOME-RECOGNISER, that could be the basis
    for an ANS/FORTH 2012 compatible way of implementing recognisers. If the recogniser fails restore the search order and try again.

    --
    Gerry

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From albert@spenarnc.xs4all.nl@21:1/5 to do-not-use@swldwa.uk on Thu Jun 27 11:05:27 2024
    In article <v5ioud$2ii4l$1@dont-email.me>,
    Gerry Jackson <do-not-use@swldwa.uk> wrote:
    On 26/06/2024 14:36, Ruvim wrote:
    One possible use case:

      : turnkey ( -- ) 0 set-order
        also Target definitions
        also Minimal also
      ;

    ALSO duplicates the wordlist at the head of the search order. If the
    search order is empty there is nothing to duplicate. Therefore ALSO
    applied to an empty search order ought to be an ambiguous condition.

    Presumably the above definition works because a target wordlist replaces >whatever garbage ALSO leaves in the search order. So the definition
    might as well have 0 1 SET-ORDER instead of 0 SET-ORDER ALSO.
    Or better still TARGET-WORDLIST 1 SET-ORDER. Either removes the above >justification for 0 SET-ORDER.

    But having said that it is better for 0 SET-ORDER to do what is natural >instead of yet another ambiguous condition.

    Another possible use case:

    : s-to-n ( addr u -- n )
    depth >r
    get-order n>r 0 set-order
    ['] evaluate ['] execute-interpreting catch
    nr> set-order
    depth 1- r> <> if -12 throw then
    ;

    This is a better use case e.g. if BASE is greater than decimal 10
    converting an alphanumeric string to a number could clash with a word in
    the dictionary. Having an empty search order eliminates that possibility.

    Incidentally another possibility is that if ['] EVALUATE is replaced in
    the above definition with ['] SOME-RECOGNISER, that could be the basis
    for an ANS/FORTH 2012 compatible way of implementing recognisers. If the >recogniser fails restore the search order and try again.

    I'm more and more convinced that the ciforth solution to make ONLY
    a wordlist and stick all the number stuff (plus strings, say denotations) there is ideal.
    Add the rule that you simply cannot the remove the minimal search order,
    which may perfect sense.
    The only non-ISO aspect is that FORTH-WORDLIST and SET-ORDER is missing.
    This is just as well, implementing SET-ORDER politically correctly
    would bloat the ciforth kernel with 20%, at least that is my impression
    from the discussion here.

    And besides shuffling the wordlists searched for is a terrible idea.
    I have not seen a use case for that.
    Think of python. If you import all with *, at least the underlying
    assumption is that the libraries contain no conflicting names
    such that the order doesn't matter. Imagine that you can somehow
    "unimport integral *" .
    The idea from ENVRIONMENT that was supposed to find out portably what facilities are to be loaded. No sensible use case.

    A sensible use of wordlist is e.g.
    ALSO INLINING
    INCLUDE modulo.frt
    PREVIOUS
    This adds INLINING to the search order to have all the operators of
    modulo calculations automatically inlined: +m -m *m ^m .
    Then back off.
    Or adding the ASSEMBLER namespace temporarily to add code words.

    Or a word like IMPORT that makes an alias from a named wordlist
    into the current wordlist (assuming current=context).

    --
    Gerry


    Groetjes Albert
    --
    Don't praise the day before the evening. One swallow doesn't make spring.
    You must not say "hey" before you have crossed the bridge. Don't sell the
    hide of the bear until you shot it. Better one bird in the hand than ten in
    the air. First gain is a cat purring. - the Wise from Antrim -

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From minforth@21:1/5 to All on Thu Jun 27 13:00:10 2024
    One should not forget that the linear search-order concept has
    a long history (CONTEXT et al) and has served mostly well for
    many small Forth applications. So be gracious towards some
    ambiguities.

    More modern languages with a wider application spectrum need
    more elaborated namespace management. Should anyone invest brain
    and time into a novel Forth namespace management concept, search
    trees (instead of today's global search-order list) would be a
    good place to start with.

    This would facilitate early binding, modules, public/private
    library handling etc. Of course these things are not new and
    already there, but without common basis - and so everyone is
    cooking their own soup.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Krishna Myneni@21:1/5 to Gerry Jackson on Thu Jun 27 14:09:52 2024
    On 6/26/24 23:14, Gerry Jackson wrote:
    On 26/06/2024 14:36, Ruvim wrote:
    One possible use case:

       : turnkey ( -- ) 0 set-order
         also Target definitions
         also Minimal also
       ;

    ALSO duplicates the wordlist at the head of the search order. If the
    search order is empty there is nothing to duplicate. Therefore ALSO
    applied to an empty search order ought to be an ambiguous condition.

    Presumably the above definition works because a target wordlist replaces whatever garbage ALSO leaves in the search order. So the definition
    might as well have 0 1 SET-ORDER instead of 0 SET-ORDER ALSO.
    Or better still TARGET-WORDLIST 1 SET-ORDER. Either removes the above justification for 0 SET-ORDER.


    Good analysis showing that

    1) The definition of TURNKEY is flawed.

    2) 0 SET-ORDER is not necessary.


    But having said that it is better for 0 SET-ORDER to do what is natural instead of yet another ambiguous condition.

    Another possible use case:

        : s-to-n ( addr u -- n )
          depth >r
          get-order n>r 0 set-order
            ['] evaluate ['] execute-interpreting catch
          nr> set-order
          depth 1- r> <> if -12 throw then
        ;

    This is a better use case e.g. if BASE is greater than decimal 10
    converting an alphanumeric string to a number could clash with a word in
    the dictionary. Having an empty search order eliminates that possibility.


    This use case is convoluted and there may be a better of dealing with
    the anticipated problem. If not, we should consider what's missing in
    Forth allowing us to solve the problem more directly.


    No one has pointed to a need for 0 SET-ORDER in interpretation state,
    and there is no to undo its use in interpretation state in a standard. Furthermore an empty search order contradicts the concept of a minimum
    search order.

    The solutions are:

    1) leave everything as is, and live with the contradiction and the
    hazard of performing 0 SET-ORDER in interpretation state.

    2) make SET-ORDER state-smart, and live with the contradiction. This
    will potentially break code.

    3) disallow zero as an argument to SET-ORDER e.g. throw an error for zero.

    Am I missing any other options?

    Personally, I favor 3) -- throwing an error when zero is an argument to SET-ORDER.

    --
    Krishna

    Personally


    2)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Krishna Myneni@21:1/5 to Krishna Myneni on Thu Jun 27 14:22:18 2024
    On 6/27/24 14:09, Krishna Myneni wrote:
    On 6/26/24 23:14, Gerry Jackson wrote:
    On 26/06/2024 14:36, Ruvim wrote:
    One possible use case:

       : turnkey ( -- ) 0 set-order
         also Target definitions
         also Minimal also
       ;

    ALSO duplicates the wordlist at the head of the search order. If the
    search order is empty there is nothing to duplicate. Therefore ALSO
    applied to an empty search order ought to be an ambiguous condition.

    Presumably the above definition works because a target wordlist
    replaces whatever garbage ALSO leaves in the search order. So the
    definition might as well have 0 1 SET-ORDER instead of 0 SET-ORDER ALSO.
    Or better still TARGET-WORDLIST 1 SET-ORDER. Either removes the above
    justification for 0 SET-ORDER.


    Good analysis showing that

    1) The definition of TURNKEY is flawed.

    2) 0 SET-ORDER is not necessary.


    But having said that it is better for 0 SET-ORDER to do what is
    natural instead of yet another ambiguous condition.

    Another possible use case:
    ;
    ;    : s-to-n ( addr u -- n )
    ;      depth >r
    ;      get-order n>r 0 set-order
    ;        ['] evaluate ['] execute-interpreting catch
    ;      nr> set-order
    ;      depth 1- r> <> if -12 throw then
    ;    ;

    This is a better use case e.g. if BASE is greater than decimal 10
    converting an alphanumeric string to a number could clash with a word
    in the dictionary. Having an empty search order eliminates that
    possibility.


    This use case is convoluted and there may be a better of dealing with
    the anticipated problem. If not, we should consider what's missing in
    Forth allowing us to solve the problem more directly.


    No one has pointed to a need for 0 SET-ORDER in interpretation state,
    and there is no to undo its use in interpretation state in a standard. Furthermore an empty search order contradicts the concept of a minimum
    search order.

    The solutions are:

    1) leave everything as is, and live with the contradiction and the
    hazard of performing 0 SET-ORDER in interpretation state.

    2) make SET-ORDER state-smart, and live with the contradiction. This
    will potentially break code.

    3) disallow zero as an argument to SET-ORDER e.g. throw an error for zero.

    Am I missing any other options?

    Personally, I favor 3) -- throwing an error when zero is an argument to SET-ORDER.


    Edits:

    No one has pointed to a need for 0 SET-ORDER in interpretation state,
    and there is no standard way to undo its use in interpretation state.

    3) disallow zero as an argument to SET-ORDER e.g. throw an error for
    zero. This will break existing code where zero is an argument to SET-ORDER.

    Any idea of frequency of usage for 0 SET-ORDER . I don't believe I have
    ever used it in a definition.

    --
    KM

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Gerry Jackson@21:1/5 to Krishna Myneni on Thu Jun 27 23:08:19 2024
    On 27/06/2024 20:22, Krishna Myneni wrote:
    On 6/27/24 14:09, Krishna Myneni wrote:
    On 6/26/24 23:14, Gerry Jackson wrote:
    On 26/06/2024 14:36, Ruvim wrote:
    One possible use case:

       : turnkey ( -- ) 0 set-order
         also Target definitions
         also Minimal also
       ;

    ALSO duplicates the wordlist at the head of the search order. If the
    search order is empty there is nothing to duplicate. Therefore ALSO
    applied to an empty search order ought to be an ambiguous condition.

    Presumably the above definition works because a target wordlist
    replaces whatever garbage ALSO leaves in the search order. So the
    definition might as well have 0 1 SET-ORDER instead of 0 SET-ORDER ALSO. >>> Or better still TARGET-WORDLIST 1 SET-ORDER. Either removes the above
    justification for 0 SET-ORDER.


    Good analysis showing that

    1) The definition of TURNKEY is flawed.

    2) 0 SET-ORDER is not necessary.


    But having said that it is better for 0 SET-ORDER to do what is
    natural instead of yet another ambiguous condition.

    Another possible use case:
    ;
    ;    : s-to-n ( addr u -- n )
    ;      depth >r
    ;      get-order n>r 0 set-order
    ;        ['] evaluate ['] execute-interpreting catch
    ;      nr> set-order
    ;      depth 1- r> <> if -12 throw then
    ;    ;

    This is a better use case e.g. if BASE is greater than decimal 10
    converting an alphanumeric string to a number could clash with a word
    in the dictionary. Having an empty search order eliminates that
    possibility.


    This use case is convoluted and there may be a better of dealing with
    the anticipated problem.


    It has been a real problem, years ago I compiled some preset data in Hex (before the $ prefix was standardised). Something like A5 c, 13 c, D0 c, ... and the application worked on a number of systems and then crashed on
    another standard system. On investigation I found that D0 was a defined
    word in that system - hence a crash. OK the $ prefix solves that but not
    the general problem e.g. BASE = #24 say

    If not, we should consider what's missing in
    Forth allowing us to solve the problem more directly.


    No one has pointed to a need for 0 SET-ORDER in interpretation state,
    and there is no to undo its use in interpretation state in a standard.
    Furthermore an empty search order contradicts the concept of a minimum
    search order.

    The solutions are:

    1) leave everything as is, and live with the contradiction and the
    hazard of performing 0 SET-ORDER in interpretation state.

    I favour this, there are other ways of achieving the effect of
    0 SET-ORDER in interpretation mode, for example

    1) WORDLIST 1 SET-ORDER

    2) Using PREVIOUS on a search order of FORTH-WORDLIST only (assuming FORTH-WORDLIST contains PREVIOUS)

    3) ...

    I suspect trying to ban every possibility isn't worth it


    2) make SET-ORDER state-smart, and live with the contradiction. This
    will potentially break code.

    3) disallow zero as an argument to SET-ORDER e.g. throw an error for
    zero.

    Am I missing any other options?

    Personally, I favor 3) -- throwing an error when zero is an argument
    to SET-ORDER.


    Edits:

    No one has pointed to a need for 0 SET-ORDER in interpretation state,
    and there is no standard way to undo its use in interpretation state.

    3) disallow zero as an argument to SET-ORDER e.g. throw an error for
    zero. This will break existing code where zero is an argument to SET-ORDER.

    Any idea of frequency of usage for 0 SET-ORDER . I don't believe I have
    ever used it in a definition.

    --
    KM


    --
    Gerry

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Gerry Jackson@21:1/5 to dxf on Thu Jun 27 23:10:14 2024
    On 27/06/2024 04:19, dxf wrote:
    No need to specify useless behaviours. u=0 in REPRESENT wasn't specified as the TC couldn't imagine a use for it. Which was just as well as there was
    a use for it the TC apparently overlooked.

    What was this use of REPRESENT

    --
    Gerry

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Krishna Myneni@21:1/5 to Gerry Jackson on Thu Jun 27 18:44:24 2024
    On 6/27/24 17:08, Gerry Jackson wrote:
    On 27/06/2024 20:22, Krishna Myneni wrote:
    ...
    The solutions are:

    1) leave everything as is, and live with the contradiction and the
    hazard of performing 0 SET-ORDER in interpretation state.

    I favour  this, there are other ways of achieving the effect of
    0 SET-ORDER in interpretation mode, for example

    1) WORDLIST 1 SET-ORDER

    2)  Using PREVIOUS on a search order of FORTH-WORDLIST only (assuming FORTH-WORDLIST contains PREVIOUS)

    3) ...

    I suspect trying to ban every possibility isn't worth it


    Since SET-ORDER is a standardized word and changing its behavior would
    break existing code, it's not the right approach anyway. The options
    2--3 are really for suggesting another word which has the behavior of
    SET-ORDER except for the zero arg case.

    --
    Krishna

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From albert@spenarnc.xs4all.nl@21:1/5 to krishna.myneni@ccreweb.org on Fri Jun 28 10:04:00 2024
    In article <v5kde0$2sasd$1@dont-email.me>,
    Krishna Myneni <krishna.myneni@ccreweb.org> wrote:
    On 6/26/24 23:14, Gerry Jackson wrote:
    On 26/06/2024 14:36, Ruvim wrote:
    One possible use case:

       : turnkey ( -- ) 0 set-order
         also Target definitions
         also Minimal also
       ;

    ALSO duplicates the wordlist at the head of the search order. If the
    search order is empty there is nothing to duplicate. Therefore ALSO
    applied to an empty search order ought to be an ambiguous condition.

    Presumably the above definition works because a target wordlist replaces
    whatever garbage ALSO leaves in the search order. So the definition
    might as well have 0 1 SET-ORDER instead of 0 SET-ORDER ALSO.
    Or better still TARGET-WORDLIST 1 SET-ORDER. Either removes the above
    justification for 0 SET-ORDER.


    Good analysis showing that

    1) The definition of TURNKEY is flawed.

    2) 0 SET-ORDER is not necessary.


    But having said that it is better for 0 SET-ORDER to do what is natural
    instead of yet another ambiguous condition.

    Another possible use case:

        : s-to-n ( addr u -- n )
          depth >r
          get-order n>r 0 set-order
            ['] evaluate ['] execute-interpreting catch
          nr> set-order
          depth 1- r> <> if -12 throw then
        ;

    This is a better use case e.g. if BASE is greater than decimal 10
    converting an alphanumeric string to a number could clash with a word in
    the dictionary. Having an empty search order eliminates that possibility.


    This use case is convoluted and there may be a better of dealing with
    the anticipated problem. If not, we should consider what's missing in
    Forth allowing us to solve the problem more directly.


    No one has pointed to a need for 0 SET-ORDER in interpretation state,
    and there is no to undo its use in interpretation state in a standard. >Furthermore an empty search order contradicts the concept of a minimum
    search order.

    The solutions are:

    1) leave everything as is, and live with the contradiction and the
    hazard of performing 0 SET-ORDER in interpretation state.

    2) make SET-ORDER state-smart, and live with the contradiction. This
    will potentially break code.

    3) disallow zero as an argument to SET-ORDER e.g. throw an error for zero.

    Am I missing any other options?

    4) Use wordlists as a pure stack. Also ASSEMBLER .. PREVIOUS.
    Define the minumum search order as only handling numbers and other constants. Declare SET-ORDER and GET-ORDER obsolete.


    Personally, I favor 3) -- throwing an error when zero is an argument to >SET-ORDER.

    --
    Krishna

    Personally


    2)
    --
    Don't praise the day before the evening. One swallow doesn't make spring.
    You must not say "hey" before you have crossed the bridge. Don't sell the
    hide of the bear until you shot it. Better one bird in the hand than ten in
    the air. First gain is a cat purring. - the Wise from Antrim -

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Ertl@21:1/5 to Krishna Myneni on Fri Jun 28 15:50:45 2024
    Krishna Myneni <krishna.myneni@ccreweb.org> writes:
    On 6/26/24 02:49, Anton Ertl wrote:
    Krishna Myneni <krishna.myneni@ccreweb.org> writes:
    Why is 0 a valid argument to SET-ORDER (from the optional Search-Order
    word set)? It can leave a Forth system in a non-recoverable state.

    So what? There are lots of ways to put a Forth system in a
    non-recoverable state.
    ...

    By design? No.

    Does it matter?

    If the user accidentially puts the Forth system in a non-recoverable
    state, there is no difference between "by design" (e.g., 0 SET-ORDER)
    and "by doing non-standard things".

    If the user intentionally puts the Forth system in a non-recoverable
    state (e.g., <https://www.complang.tuwien.ac.at/forth/gforth/Docs-html/Crash-Course-Tutorial.html>),
    it does not matter, either.

    - anton
    --
    M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
    comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
    New standard: https://forth-standard.org/
    EuroForth 2024: https://euro.theforth.net

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From albert@spenarnc.xs4all.nl@21:1/5 to ruvim.pinka@gmail.com on Fri Jun 28 21:45:38 2024
    In article <v5m2po$3811n$2@dont-email.me>,
    Ruvim <ruvim.pinka@gmail.com> wrote:
    On 2024-06-27 08:14, Gerry Jackson wrote:
    On 26/06/2024 14:36, Ruvim wrote:
    One possible use case:

       : turnkey ( -- ) 0 set-order
         also Target definitions
         also Minimal also
       ;

    ALSO duplicates the wordlist at the head of the search order. If the
    search order is empty there is nothing to duplicate. Therefore ALSO
    applied to an empty search order ought to be an ambiguous condition.

    Agree. This code is formally incorrect.

    An ambiguous condition should be declared for ALSO
    when the search order is empty.

    I collect such cases at ><https://github.com/ForthHub/standard-evolution/issues/5>

    Then a proposal should be prepared.



    Presumably the above definition works because a target wordlist replaces
    whatever garbage ALSO leaves in the search order. So the definition
    might as well have 0 1 SET-ORDER instead of 0 SET-ORDER ALSO.
    Or better still TARGET-WORDLIST 1 SET-ORDER. Either removes the above
    justification for 0 SET-ORDER.

    As I later discovered, this "turnkey" is from Gforth, and it was corrected: ><https://github.com/forthy42/gforth/blob/ba915873/cross.fs#L4570>


    But having said that it is better for 0 SET-ORDER to do what is natural
    instead of yet another ambiguous condition.

    Another possible use case:

        : s-to-n ( addr u -- n )
          depth >r
          get-order n>r 0 set-order
            ['] evaluate ['] execute-interpreting catch
          nr> set-order
          depth 1- r> <> if -12 throw then
        ;

    There is a mistake (due to additions in my old example)

    A corrected variant:

    : s-to-n ( addr u -- x )
    depth >r
    get-order n>r 0 set-order
    ['] evaluate ['] execute-interpreting catch
    nr> set-order throw
    depth 1+ r> <> if -12 throw then
    ;



    This is a better use case e.g. if BASE is greater than decimal 10
    converting an alphanumeric string to a number could clash with a word in
    the dictionary. Having an empty search order eliminates that possibility.

    Incidentally another possibility is that if ['] EVALUATE is replaced in
    the above definition with ['] SOME-RECOGNISER, that could be the basis
    for an ANS/FORTH 2012 compatible way of implementing recognisers. If the
    recogniser fails restore the search order and try again.


    My position is that no recognizer can have side effects (other then
    items on the data stack and/or floating-point stack).

    I second that. Moreover the items would have to be the same in
    interpret and compilation mode.
    At least as a starting point, otherwise Forth degenerates to a
    tangled web of special purpose interpreters.

    Although, this approach can be used to *implement* SOME-RECOGNISER.


    --
    Ruvim
    --
    Don't praise the day before the evening. One swallow doesn't make spring.
    You must not say "hey" before you have crossed the bridge. Don't sell the
    hide of the bear until you shot it. Better one bird in the hand than ten in
    the air. First gain is a cat purring. - the Wise from Antrim -

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Krishna Myneni@21:1/5 to Anton Ertl on Sat Jun 29 09:17:33 2024
    On 6/28/24 10:50, Anton Ertl wrote:
    Krishna Myneni <krishna.myneni@ccreweb.org> writes:
    On 6/26/24 02:49, Anton Ertl wrote:
    Krishna Myneni <krishna.myneni@ccreweb.org> writes:
    Why is 0 a valid argument to SET-ORDER (from the optional Search-Order >>>> word set)? It can leave a Forth system in a non-recoverable state.

    So what? There are lots of ways to put a Forth system in a
    non-recoverable state.
    ...

    By design? No.

    Does it matter?


    Yes, it matters. Not everyone uses Forth to develop and use turnkey applications. Some of us rely on the Forth environment itself as the application interface, where definitions in a precise search order *are*
    the interface. Inadvertently emptying the search order and violating the
    notion of a minimum search order would mean loss of data from a lengthy computation or data acquisition.

    --
    Krishna

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Krishna Myneni@21:1/5 to albert@spenarnc.xs4all.nl on Sat Jun 29 09:09:31 2024
    On 6/28/24 03:04, albert@spenarnc.xs4all.nl wrote:
    In article <v5kde0$2sasd$1@dont-email.me>,
    Krishna Myneni <krishna.myneni@ccreweb.org> wrote:
    ...
    The solutions are:

    1) leave everything as is, and live with the contradiction and the
    hazard of performing 0 SET-ORDER in interpretation state.

    2) make SET-ORDER state-smart, and live with the contradiction. This
    will potentially break code.

    3) disallow zero as an argument to SET-ORDER e.g. throw an error for zero. >>
    Am I missing any other options?

    4) Use wordlists as a pure stack. Also ASSEMBLER .. PREVIOUS.
    Define the minumum search order as only handling numbers and other constants. Declare SET-ORDER and GET-ORDER obsolete.


    The whole Search Order word set is clunky and has a cobbled together
    feel about it. It is also difficult to integrate a named modules system
    into which provides Public/Private definitions into the standard words
    e.g. making ORDER list the names of the modules isn't easy.

    A stack model for the search order may be the way to go. It would be
    more intuitive to Forth users than having to remember ONLY ALSO PREVIOUS
    etc.

    Currently the standard defines what a minimum search order should
    contain but then promptly disregards it by standardizing 0 SET-ORDER.
    This is dangerous in interpretation mode, and, while it may have uses in compilation mode, within a definition where the prior search order can
    be restored (or not), the notion of a well-defined minimum search order
    should be a strong guarantee to the Forth programmer and not allowed to
    be violated easily.

    --
    Krishna

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From albert@spenarnc.xs4all.nl@21:1/5 to krishna.myneni@ccreweb.org on Sun Jun 30 12:22:35 2024
    In article <v5p4ir$3utd9$1@dont-email.me>,
    Krishna Myneni <krishna.myneni@ccreweb.org> wrote:
    On 6/28/24 03:04, albert@spenarnc.xs4all.nl wrote:
    In article <v5kde0$2sasd$1@dont-email.me>,
    Krishna Myneni <krishna.myneni@ccreweb.org> wrote:
    ...
    The whole Search Order word set is clunky and has a cobbled together
    feel about it. It is also difficult to integrate a named modules system
    into which provides Public/Private definitions into the standard words
    e.g. making ORDER list the names of the modules isn't easy.

    A stack model for the search order may be the way to go. It would be
    more intuitive to Forth users than having to remember ONLY ALSO PREVIOUS
    etc.

    Currently the standard defines what a minimum search order should
    contain but then promptly disregards it by standardizing 0 SET-ORDER.
    This is dangerous in interpretation mode, and, while it may have uses in >compilation mode, within a definition where the prior search order can
    be restored (or not), the notion of a well-defined minimum search order >should be a strong guarantee to the Forth programmer and not allowed to
    be violated easily.

    I have taken the liberty to replace VOCABULARY with NAMESPACE in ciforth. NAMESPACE is a named wordlist that pushes itself to the search order.
    If you formulate it an archaic way, "ALSO is put in the body of the
    CREATE DOES> word NAMESPACE."
    In fact in this approach, `ALSO is all but superfluous.
    It is from the time, one had merely two slots for wordlists.
    Wordlist's , namespaces that have itself no name, are so akward.

    --
    Krishna

    Groetjes Albert
    --
    Don't praise the day before the evening. One swallow doesn't make spring.
    You must not say "hey" before you have crossed the bridge. Don't sell the
    hide of the bear until you shot it. Better one bird in the hand than ten in
    the air. First gain is a cat purring. - the Wise from Antrim -

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Krishna Myneni@21:1/5 to dxf on Sun Jun 30 11:10:17 2024
    On 6/29/24 21:21, dxf wrote:
    On 30/06/2024 12:17 am, Krishna Myneni wrote:
    On 6/28/24 10:50, Anton Ertl wrote:
    Krishna Myneni <krishna.myneni@ccreweb.org> writes:
    On 6/26/24 02:49, Anton Ertl wrote:
    Krishna Myneni <krishna.myneni@ccreweb.org> writes:
    Why is 0 a valid argument to SET-ORDER (from the optional Search-Order >>>>>> word set)? It can leave a Forth system in a non-recoverable state.

    So what?  There are lots of ways to put a Forth system in a
    non-recoverable state.
    ...

    By design? No.

    Does it matter?


    Yes, it matters. Not everyone uses Forth to develop and use turnkey applications. Some of us rely on the Forth environment itself as the application interface, where definitions in a precise search order *are* the interface. Inadvertently emptying the
    search order and violating the notion of a minimum search order would mean loss of data from a lengthy computation or data acquisition.

    Under what circumstances is 0 SET-ORDER executed inadvertently?


    One example: assume you have a value containing the number of wordlists

    0 value Nwid

    and it is not properly set. Then doing,

    wid1 wid2 ... widn Nwid SET-ORDER

    --
    KM

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Krishna Myneni@21:1/5 to Krishna Myneni on Sun Jun 30 11:16:35 2024
    On 6/30/24 11:10, Krishna Myneni wrote:
    On 6/29/24 21:21, dxf wrote:
    ...
    Under what circumstances is 0 SET-ORDER executed inadvertently?


    One example: assume you have a value containing the number of wordlists

    0 value Nwid

    and it is not properly set. Then doing,

    wid1 wid2 ... widn Nwid SET-ORDER


    Beyond any particular case in which 0 SET-ORDER might occur, I am more concerned with the fact that the standard does not guarantee a minimum
    search order, from which it is useful to recover the search order
    including it and the Forth word list. At the core, this is really the
    problem.

    --
    Krishna

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From minforth@21:1/5 to All on Sun Jun 30 17:38:17 2024
    FORTH-WORDLIST 1 SET-ORDER should bring you "back to life".
    IOW the question is whether FORTH-WORDLIST and SET-ORDER
    should be findable even when the search-order is empty.
    Probably classified as "implementation-defined option".

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Krishna Myneni@21:1/5 to minforth on Sun Jun 30 13:31:36 2024
    On 6/30/24 12:38, minforth wrote:
    FORTH-WORDLIST 1 SET-ORDER should bring you "back to life".
    IOW the question is whether FORTH-WORDLIST and SET-ORDER
    should be findable even when the search-order is empty.
    Probably classified as "implementation-defined option".

    The minimum search order contains FORTH-WORDLIST and SET-ORDER per the standard. The question is whether or not the standard should actually
    guarantee that this is always true.

    It seems nonsensical to say there are zero wordlists in the search
    order, but FORTH-WORDLIST and SET-ORDER are still findable.

    --
    KM

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From albert@spenarnc.xs4all.nl@21:1/5 to minforth on Sun Jun 30 20:25:10 2024
    In article <bf66af7e3abb6d49d1e6ff2935802477@www.novabbs.com>,
    minforth <minforth@gmx.net> wrote:
    FORTH-WORDLIST 1 SET-ORDER should bring you "back to life".
    IOW the question is whether FORTH-WORDLIST and SET-ORDER
    should be findable even when the search-order is empty.
    Probably classified as "implementation-defined option".

    This is a practical necessity in a Forth. I opt for
    ONLY FORTH
    That results in the search order: ONLY FORTH
    The word FORTH is in the ONLY wordlist i.e. minimal search order.
    ONLY screens off all wordlists that may be present in the search order
    and in ciforth it is itself a wordlist.

    ONLY FORTH is a pretty surefire way to get the system in a
    defined situation. This is almost traditional, albeit not standard.

    Compared to ciforth
    ORDER : ONLY FORTH
    in gforth ONLY FORTH results in
    ORDER : Root FORTH
    in swiftforth it is the same, but the Root is not shown by ORDER
    unless directly after ONLY.

    vfxlin has an extra wordlistm but likewise you can get the system
    under control with `` ONLY FORTH ''
    ORDER: ROOT EXTERNALS FORTH

    Groetjes Albert
    --
    Don't praise the day before the evening. One swallow doesn't make spring.
    You must not say "hey" before you have crossed the bridge. Don't sell the
    hide of the bear until you shot it. Better one bird in the hand than ten in
    the air. First gain is a cat purring. - the Wise from Antrim -

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From minforth@21:1/5 to All on Sun Jun 30 20:37:12 2024
    My "implementation-defined option" 0 SET-ORDER locks everyone out.
    Too bad if you and I are one of them.

    I want it that way. I don't like backdoors unless I created them
    on purpose.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Krishna Myneni@21:1/5 to minforth on Sun Jun 30 20:49:06 2024
    On 6/30/24 15:37, minforth wrote:
    My "implementation-defined option" 0 SET-ORDER locks everyone out.
    Too bad if you and I are one of them.

    I want it that way. I don't like backdoors unless I created them
    on purpose.

    If the community has no issue with retaining 0 SET-ORDER then the
    standard's wording should be revised to say that the minimum search
    order is the empty search order, i.e. zero wordlists.

    --
    KM

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From mhx@21:1/5 to Krishna Myneni on Mon Jul 1 07:06:42 2024
    Krishna Myneni wrote:

    If the community has no issue with retaining 0 SET-ORDER then the
    standard's wording should be revised to say that the minimum search
    order is the empty search order, i.e. zero wordlists.

    IMHO, the committee should refrain from adding restrictions
    that only serve to make systems 'not standard' because of non-issues.

    -marcel

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Krishna Myneni@21:1/5 to mhx on Mon Jul 1 05:06:54 2024
    On 7/1/24 02:06, mhx wrote:
    Krishna Myneni wrote:

    If the community has no issue with retaining 0 SET-ORDER then the
    standard's wording should be revised to say that the minimum search
    order is the empty search order, i.e. zero wordlists.

    IMHO, the committee should refrain from adding restrictions
    that only serve to make systems 'not standard' because of non-issues.

    -marcel

    Would you please state more clearly how this is related to the present discussion? There is no proposal to add restrictions.

    Currently we are discussing the merits and pitfalls of 0 SET-ORDER. I am suggesting that a change in the wording of the standard is needed to
    avoid the inference that a minimum search order is always present which provides specific words listed in the standard.

    --
    Krishna

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Krishna Myneni@21:1/5 to Ruvim on Mon Jul 1 05:13:39 2024
    On 7/1/24 04:02, Ruvim wrote:
    On 2024-07-01 05:49, Krishna Myneni wrote:
    On 6/30/24 15:37, minforth wrote:
    My "implementation-defined option" 0 SET-ORDER locks everyone out.
    Too bad if you and I are one of them.

    I want it that way. I don't like backdoors unless I created them
    on purpose.

    If the community has no issue with retaining 0 SET-ORDER then the
    standard's wording should be revised to say that the minimum search
    order is the empty search order, i.e. zero wordlists.


    Do you mean it's confusing that the search order can contain fewer word
    lists than the implementation defined "minimum search order"?

    And if the term "minimum search order" is renamed to "small search
    order" (as an example), will this solve the problem?



    I wonder if the original proposal for SET-ORDER meant to say "minimal"
    instead of "minimum", for argument -1, thereby leading to the inference
    that the words FORTH-WORDLIST and SET-ORDER always be present in the
    search order. We need to check where else in the standard the term
    "minimum search order" appears.

    For the specification of SET-ORDER with argument -1 replacing "minimum"
    with "minimal" would avoid some confusion.

    --
    Krishna

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From albert@spenarnc.xs4all.nl@21:1/5 to krishna.myneni@ccreweb.org on Mon Jul 1 13:39:44 2024
    In article <v5tvgj$11700$2@dont-email.me>,
    Krishna Myneni <krishna.myneni@ccreweb.org> wrote:
    On 7/1/24 04:02, Ruvim wrote:
    On 2024-07-01 05:49, Krishna Myneni wrote:
    On 6/30/24 15:37, minforth wrote:
    My "implementation-defined option" 0 SET-ORDER locks everyone out.
    Too bad if you and I are one of them.

    I want it that way. I don't like backdoors unless I created them
    on purpose.

    If the community has no issue with retaining 0 SET-ORDER then the
    standard's wording should be revised to say that the minimum search
    order is the empty search order, i.e. zero wordlists.


    Do you mean it's confusing that the search order can contain fewer word
    lists than the implementation defined "minimum search order"?

    And if the term "minimum search order" is renamed to "small search
    order" (as an example), will this solve the problem?



    I wonder if the original proposal for SET-ORDER meant to say "minimal" >instead of "minimum", for argument -1, thereby leading to the inference
    that the words FORTH-WORDLIST and SET-ORDER always be present in the
    search order. We need to check where else in the standard the term
    "minimum search order" appears.

    For the specification of SET-ORDER with argument -1 replacing "minimum"
    with "minimal" would avoid some confusion.

    I have a minimal system and opt out of the "optional search order wordset".
    So SET-ORDER is not present.
    What gives?


    --
    Krishna


    --
    Don't praise the day before the evening. One swallow doesn't make spring.
    You must not say "hey" before you have crossed the bridge. Don't sell the
    hide of the bear until you shot it. Better one bird in the hand than ten in
    the air. First gain is a cat purring. - the Wise from Antrim -

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From albert@spenarnc.xs4all.nl@21:1/5 to mhx on Mon Jul 1 13:35:01 2024
    In article <4e7f4e42b851ec0d57352d552ad48929@www.novabbs.com>,
    mhx <mhx@iae.nl> wrote:
    Krishna Myneni wrote:

    If the community has no issue with retaining 0 SET-ORDER then the
    standard's wording should be revised to say that the minimum search
    order is the empty search order, i.e. zero wordlists.

    IMHO, the committee should refrain from adding restrictions
    that only serve to make systems 'not standard' because of non-issues.
    +1


    -marcel
    --
    Don't praise the day before the evening. One swallow doesn't make spring.
    You must not say "hey" before you have crossed the bridge. Don't sell the
    hide of the bear until you shot it. Better one bird in the hand than ten in
    the air. First gain is a cat purring. - the Wise from Antrim -

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From sjack@21:1/5 to albert@spenarnc.xs4all.nl on Tue Jul 2 14:29:17 2024
    albert@spenarnc.xs4all.nl wrote:
    I have a minimal system and opt out of the "optional search order wordset". So SET-ORDER is not present.
    What gives?


    I long back opt out the search order wordset. It just gave me
    management concerns. I use SCRs instead and keep requrements
    external to the files. Life has been much smoother since.

    --
    me

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Krishna Myneni@21:1/5 to dxf on Tue Jul 2 20:04:43 2024
    On 7/1/24 06:02, dxf wrote:
    On 1/07/2024 8:13 pm, Krishna Myneni wrote:
    On 7/1/24 04:02, Ruvim wrote:
    On 2024-07-01 05:49, Krishna Myneni wrote:
    On 6/30/24 15:37, minforth wrote:
    My "implementation-defined option" 0 SET-ORDER locks everyone out.
    Too bad if you and I are one of them.

    I want it that way. I don't like backdoors unless I created them
    on purpose.

    If the community has no issue with retaining 0 SET-ORDER then the standard's wording should be revised to say that the minimum search order is the empty search order, i.e. zero wordlists.


    Do you mean it's confusing that the search order can contain fewer word lists than the implementation defined "minimum search order"?

    And if the term "minimum search order" is renamed to "small search order" (as an example), will this solve the problem?



    I wonder if the original proposal for SET-ORDER meant to say "minimal" instead of "minimum", for argument -1, thereby leading to the inference that the words FORTH-WORDLIST and SET-ORDER always be present in the search order. We need to check where
    else in the standard the term "minimum search order" appears.

    For the specification of SET-ORDER with argument -1 replacing "minimum" with "minimal" would avoid some confusion.

    In the rationale A.16 the phrase "default search order" is used along with an explanation.


    I'm searching at the Forth 2012 standard document and I don't find
    "default search order" anywhere within it. Worse, I find the phrase,
    "primitive search-order" used at the beginning of A.16, here and only
    here. There is no explanation of what constitutes a primitive search order.

    The phrase "minimum search order" is used five times in the document:
    -- 16.4.1.1 Implementation-defined options
    -- twice in the specification of SET-ORDER
    -- twice in the specification of ONLY

    In both the specification of SET-ORDER and ONLY, the standard states,
    "The minimum search order shall include the words FORTH-WORDLIST and SET-ORDER."

    --
    Krishna

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Krishna Myneni@21:1/5 to Ruvim on Tue Jul 2 20:17:23 2024
    On 7/2/24 08:42, Ruvim wrote:
    On 2024-07-01 14:13, Krishna Myneni wrote:
    On 7/1/24 04:02, Ruvim wrote:
    On 2024-07-01 05:49, Krishna Myneni wrote:
    ...
    I wonder if the original proposal for SET-ORDER meant to say "minimal"
    instead of "minimum", for argument -1, thereby leading to the
    inference that the words FORTH-WORDLIST and SET-ORDER always be
    present in the search order. We need to check where else in the
    standard the term "minimum search order" appears.

    In Forth-94:

      <http://lars.nocrew.org/dpans/dpans16.htm>
      <http://lars.nocrew.org/dpans/dpansa16.htm>
      <http://lars.nocrew.org/dpans/a0002.htm>



    For the specification of SET-ORDER with argument -1 replacing
    "minimum" with "minimal" would avoid some confusion.

    Wiktionary says that they are synonyms: <https://en.wiktionary.org/wiki/minimum#Adjective>


    That seems to be the case with the Oxford dictionary as well. My
    understanding of minimum is the smallest possible, and minimal implies a
    small size (but not necessarily the smallest).

    So, who knows what they were thinking when the standard was written
    because the clear statement that "the minimum search order shall include
    the words ...", which appears in the spec for SET-ORDER and for ONLY
    clears contradicts the allowance for 0 SET-ORDER.

    The language needs to be fixed.

    I remember when I was implementing the Search Order word set in kForth,
    the phrase "the minimum search order shall include the words ..." but
    the contradiction with 0 SET-ORDER didn't register with me at the time.

    --
    Krishna

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From albert@spenarnc.xs4all.nl@21:1/5 to dxforth@gmail.com on Wed Jul 3 11:59:38 2024
    In article <6684b834$1@news.ausics.net>, dxf <dxforth@gmail.com> wrote:
    On 3/07/2024 11:04 am, Krishna Myneni wrote:
    On 7/1/24 06:02, dxf wrote:
    On 1/07/2024 8:13 pm, Krishna Myneni wrote:
    On 7/1/24 04:02, Ruvim wrote:
    On 2024-07-01 05:49, Krishna Myneni wrote:
    On 6/30/24 15:37, minforth wrote:
    My "implementation-defined option" 0 SET-ORDER locks everyone out. >>>>>>> Too bad if you and I are one of them.

    I want it that way. I don't like backdoors unless I created them >>>>>>> on purpose.

    If the community has no issue with retaining 0 SET-ORDER then the standard's wording should be revised to say that the minimum search
    order is the empty search order, i.e. zero wordlists.


    Do you mean it's confusing that the search order can contain fewer word lists than the implementation defined "minimum search order"?

    And if the term "minimum search order" is renamed to "small search order" (as an example), will this solve the problem?



    I wonder if the original proposal for SET-ORDER meant to say "minimal" instead of "minimum", for argument -1, thereby leading to the
    inference that the words FORTH-WORDLIST and SET-ORDER always be present in the search order. We need to check where else in the standard the
    term "minimum search order" appears.

    For the specification of SET-ORDER with argument -1 replacing "minimum" with "minimal" would avoid some confusion.

    In the rationale A.16 the phrase "default search order" is used along with an explanation.


    I'm searching at the Forth 2012 standard document and I don't find "default search order" anywhere within it. Worse, I find the phrase,
    "primitive search-order" used at the beginning of A.16, here and only here. There is no explanation of what constitutes a primitive search
    order.

    The phrase "minimum search order" is used five times in the document:
    -- 16.4.1.1 Implementation-defined options
    -- twice in the specification of SET-ORDER
    -- twice in the specification of ONLY

    In both the specification of SET-ORDER and ONLY, the standard states, "The minimum search order shall include the words FORTH-WORDLIST and
    SET-ORDER."

    What is one expected to do with 'FORTH-WORDLIST and SET-ORDER'? It's information like this
    that's lacking, leaving it to the user's imagination. Nor will one get clarification from
    200x since by this time principal users have a vested interest in leaving things ambiguous.


    At least to me this is clear.
    FORTH-WORDLIST 1 SET-ORDER
    is supposed to get Forth under control.
    Traditionally done with
    ONLY FORTH

    Groetjes Albert
    --
    Don't praise the day before the evening. One swallow doesn't make spring.
    You must not say "hey" before you have crossed the bridge. Don't sell the
    hide of the bear until you shot it. Better one bird in the hand than ten in
    the air. First gain is a cat purring. - the Wise from Antrim -

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Gerry Jackson@21:1/5 to Ruvim on Thu Jul 4 07:26:36 2024
    On 28/06/2024 11:20, Ruvim wrote:
    On 2024-06-27 08:14, Gerry Jackson wrote:
    On 26/06/2024 14:36, Ruvim wrote:
    One possible use case:

       : turnkey ( -- ) 0 set-order
         also Target definitions
         also Minimal also
       ;

    ALSO duplicates the wordlist at the head of the search order. If the
    search order is empty there is nothing to duplicate. Therefore ALSO
    applied to an empty search order ought to be an ambiguous condition.

    Agree. This code is formally incorrect.

    An ambiguous condition should be declared for ALSO
    when the search order is empty.

    I collect such cases at <https://github.com/ForthHub/standard-evolution/issues/5>

    Then a proposal should be prepared.

    Another ambiguous condition that should be added is the execution of DEFINITIONS when the search order is empty

    --
    Gerry

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anthony Howe@21:1/5 to Ruvim on Sat Sep 21 15:37:21 2024
    On 2024-07-01 05:02, Ruvim wrote:
    And if the term "minimum search order" is renamed to "small search order" (as an
    example), will this solve the problem?

    Minimum functional search order?

    --
    Anthony C Howe
    achowe@snert.com BarricadeMX & Milters http://nanozen.snert.com/ http://software.snert.com/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anthony Howe@21:1/5 to Ruvim on Sun Sep 22 14:02:56 2024
    On 2024-09-22 13:52, Ruvim wrote:
    On 2024-09-21 23:37, Anthony Howe wrote:
    On 2024-07-01 05:02, Ruvim wrote:
    And if the term "minimum search order" is renamed to "small search order" (as
    an example), will this solve the problem?

    Minimum functional search order?

    I like `functional`.



    Good idea!

    Similar variants:
      - minimum usable search order
      - minimum operable search order
      - minimum operative search order
      - minimum operational search order

    And this one -----^ `operational`

    But I think as long as the wording makes clear its not the empty set, pick something nice and use consistently should be good.

    --
    Anthony C Howe
    achowe@snert.com BarricadeMX & Milters http://nanozen.snert.com/ http://software.snert.com/

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