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


Groups > comp.lang.forth > #13469 > unrolled thread

ENVIRONMENT?

Started byMark Wills <markrobertwills@yahoo.co.uk>
First post2012-07-03 05:03 -0700
Last post2012-07-04 08:37 -0700
Articles 20 on this page of 86 — 11 participants

Back to article view | Back to comp.lang.forth


Contents

  ENVIRONMENT? Mark Wills <markrobertwills@yahoo.co.uk> - 2012-07-03 05:03 -0700
    Re: ENVIRONMENT? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-07-03 07:45 -0500
    Re: ENVIRONMENT? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-07-03 15:29 +0000
      Re: ENVIRONMENT? Mark Wills <markrobertwills@yahoo.co.uk> - 2012-07-04 01:52 -0700
        Re: ENVIRONMENT? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-07-04 04:12 -0500
          Re: ENVIRONMENT? Mark Wills <markrobertwills@yahoo.co.uk> - 2012-07-04 02:37 -0700
            Re: ENVIRONMENT? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-07-04 05:01 -0500
              Re: ENVIRONMENT? Mark Wills <markrobertwills@yahoo.co.uk> - 2012-07-04 03:54 -0700
                Re: ENVIRONMENT? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-07-04 06:52 -0500
                  Re: ENVIRONMENT? Mark Wills <markrobertwills@yahoo.co.uk> - 2012-07-04 05:21 -0700
                  Re: ENVIRONMENT? Mark Wills <markrobertwills@yahoo.co.uk> - 2012-07-04 05:19 -0700
                    Re: ENVIRONMENT? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-07-04 07:42 -0500
                      Re: ENVIRONMENT? Mark Wills <markrobertwills@yahoo.co.uk> - 2012-07-04 06:47 -0700
                        Re: ENVIRONMENT? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-07-04 09:42 -0500
                          Re: ENVIRONMENT? Mark Wills <markrobertwills@yahoo.co.uk> - 2012-07-04 08:06 -0700
                            Re: ENVIRONMENT? Bernd Paysan <bernd.paysan@gmx.de> - 2012-07-04 22:05 +0200
                          Re: ENVIRONMENT? Mark Wills <markrobertwills@yahoo.co.uk> - 2012-07-04 08:14 -0700
                            Re: ENVIRONMENT? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-07-05 16:48 +0000
              Re: ENVIRONMENT? Mark Wills <markrobertwills@yahoo.co.uk> - 2012-07-04 04:00 -0700
                Re: ENVIRONMENT? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-07-04 06:53 -0500
                  Re: ENVIRONMENT? Mark Wills <markrobertwills@yahoo.co.uk> - 2012-07-04 05:20 -0700
                Re: ENVIRONMENT? stephenXXX@mpeforth.com (Stephen Pelc) - 2012-07-04 12:31 +0000
                  Re: ENVIRONMENT? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-07-04 08:07 -0500
                    Re: ENVIRONMENT? Mark Wills <markrobertwills@yahoo.co.uk> - 2012-07-04 07:16 -0700
                      Re: ENVIRONMENT? stephenXXX@mpeforth.com (Stephen Pelc) - 2012-07-04 17:22 +0000
                  Re: ENVIRONMENT? Mark Wills <markrobertwills@yahoo.co.uk> - 2012-07-04 07:12 -0700
                    Re: ENVIRONMENT? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-07-04 09:47 -0500
                      Re: ENVIRONMENT? Mark Wills <markrobertwills@yahoo.co.uk> - 2012-07-04 08:14 -0700
                        Re: ENVIRONMENT? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-07-04 11:53 -0500
                          Re: ENVIRONMENT? stephenXXX@mpeforth.com (Stephen Pelc) - 2012-07-04 17:37 +0000
                            Re: ENVIRONMENT? Alex McDonald <blog@rivadpm.com> - 2012-07-04 12:46 -0700
                            Re: ENVIRONMENT? Bernd Paysan <bernd.paysan@gmx.de> - 2012-07-04 21:59 +0200
                              Re: ENVIRONMENT? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-07-05 02:36 -0500
                            Re: ENVIRONMENT? BruceMcF <agila61@netscape.net> - 2012-07-04 13:31 -0700
                              Re: ENVIRONMENT? Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-07-05 02:06 +0000
                            Re: ENVIRONMENT? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-07-05 02:33 -0500
                              Re: ENVIRONMENT? stephenXXX@mpeforth.com (Stephen Pelc) - 2012-07-05 12:12 +0000
                                Re: ENVIRONMENT? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-07-05 07:50 -0500
                                  Re: ENVIRONMENT? stephenXXX@mpeforth.com (Stephen Pelc) - 2012-07-05 14:15 +0000
                                Re: ENVIRONMENT? Bernd Paysan <bernd.paysan@gmx.de> - 2012-07-05 15:31 +0200
                                  Re: ENVIRONMENT? stephenXXX@mpeforth.com (Stephen Pelc) - 2012-07-05 14:33 +0000
                                    Re: ENVIRONMENT? Bernd Paysan <bernd.paysan@gmx.de> - 2012-07-06 00:43 +0200
                                      Re: ENVIRONMENT? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-07-06 15:37 +0000
                                  Re: ENVIRONMENT? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-07-05 09:46 -0500
                          Re: ENVIRONMENT? Mark Wills <markrobertwills@yahoo.co.uk> - 2012-07-04 12:44 -0700
                  Re: ENVIRONMENT? Mark Wills <markrobertwills@yahoo.co.uk> - 2012-07-04 07:08 -0700
                    Re: ENVIRONMENT? stephenXXX@mpeforth.com (Stephen Pelc) - 2012-07-04 17:31 +0000
                      Re: ENVIRONMENT? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-07-05 16:44 +0000
                    Re: ENVIRONMENT? "Elizabeth D. Rather" <erather@forth.com> - 2012-07-04 08:30 -1000
                  Re: ENVIRONMENT? Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-07-05 02:43 +0000
            Re: ENVIRONMENT? "Elizabeth D. Rather" <erather@forth.com> - 2012-07-04 08:16 -1000
        Re: ENVIRONMENT? BruceMcF <agila61@netscape.net> - 2012-07-04 11:57 -0700
          Re: ENVIRONMENT? Mark Wills <markrobertwills@yahoo.co.uk> - 2012-07-04 12:33 -0700
            Re: ENVIRONMENT? BruceMcF <agila61@netscape.net> - 2012-07-04 13:04 -0700
              Re: ENVIRONMENT? Mark Wills <markrobertwills@yahoo.co.uk> - 2012-07-04 13:28 -0700
              Re: ENVIRONMENT? Mark Wills <markrobertwills@yahoo.co.uk> - 2012-07-04 13:36 -0700
                Re: ENVIRONMENT? "Elizabeth D. Rather" <erather@forth.com> - 2012-07-04 10:49 -1000
                  Re: ENVIRONMENT? Mark Wills <markrobertwills@yahoo.co.uk> - 2012-07-04 13:58 -0700
                    Re: ENVIRONMENT? stephenXXX@mpeforth.com (Stephen Pelc) - 2012-07-04 22:07 +0000
                      Standards Body Attendance (was Re: ENVIRONMENT?) Alex McDonald <blog@rivadpm.com> - 2012-07-05 05:21 -0700
                        Re: Standards Body Attendance (was Re: ENVIRONMENT?) stephenXXX@mpeforth.com (Stephen Pelc) - 2012-07-05 15:44 +0000
                          Re: Standards Body Attendance (was Re: ENVIRONMENT?) Alex McDonald <blog@rivadpm.com> - 2012-07-06 10:35 -0700
                Re: ENVIRONMENT? Coos Haak <chforth@hccnet.nl> - 2012-07-04 22:50 +0200
                Re: ENVIRONMENT? BruceMcF <agila61@netscape.net> - 2012-07-04 16:30 -0700
            Re: ENVIRONMENT? Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-07-05 02:33 +0000
        Re: ENVIRONMENT? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-07-06 15:48 +0000
          Re: ENVIRONMENT? Mark Wills <markrobertwills@yahoo.co.uk> - 2012-07-06 11:47 -0700
            Re: ENVIRONMENT? BruceMcF <agila61@netscape.net> - 2012-07-06 14:07 -0700
          Re: ENVIRONMENT? Bernd Paysan <bernd.paysan@gmx.de> - 2012-07-06 23:55 +0200
    Re: ENVIRONMENT? Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-07-03 18:24 +0000
      Re: ENVIRONMENT? Mark Wills <markrobertwills@yahoo.co.uk> - 2012-07-04 01:55 -0700
        Re: ENVIRONMENT? Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-07-05 00:19 -0700
      Re: ENVIRONMENT? Mark Wills <markrobertwills@yahoo.co.uk> - 2012-07-04 02:29 -0700
        Re: ENVIRONMENT? Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-07-04 15:53 +0000
        Re: ENVIRONMENT? Coos Haak <chforth@hccnet.nl> - 2012-07-04 18:03 +0200
        Re: ENVIRONMENT? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-07-06 15:42 +0000
          Re: ENVIRONMENT? Mark Wills <markrobertwills@yahoo.co.uk> - 2012-07-06 11:41 -0700
            Re: ENVIRONMENT? BruceMcF <agila61@netscape.net> - 2012-07-06 14:14 -0700
            Re: ENVIRONMENT? Bernd Paysan <bernd.paysan@gmx.de> - 2012-07-06 23:51 +0200
            Re: ENVIRONMENT? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-07-07 09:24 +0000
    Re: ENVIRONMENT? Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-07-03 21:46 -0700
      Re: ENVIRONMENT? Mark Wills <markrobertwills@yahoo.co.uk> - 2012-07-04 02:04 -0700
        Re: ENVIRONMENT? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-07-04 04:30 -0500
        Re: ENVIRONMENT? Mark Wills <markrobertwills@yahoo.co.uk> - 2012-07-04 02:32 -0700
        Re: ENVIRONMENT? Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-07-04 16:00 +0000
          Re: ENVIRONMENT? Mark Wills <markrobertwills@yahoo.co.uk> - 2012-07-04 08:37 -0700

Page 3 of 5 — ← Prev page 1 2 [3] 4 5  Next page →


#13608

FromstephenXXX@mpeforth.com (Stephen Pelc)
Date2012-07-05 14:33 +0000
Message-ID<4ff5a1fa.178335538@192.168.0.50>
In reply to#13606
On Thu, 05 Jul 2012 15:31 +0200, Bernd Paysan <bernd.paysan@gmx.de>
wrote:

>Yes, this is a suggestion.  This has currently no common practice (even 
>VFX with its long-year usage of text macros doesn't provide Forth and OS 
>name as predefined macros).  This should not go into the standard now.  

I agree.

At present MPE uses the word VFXFORTH ( -- ) as an identifier for use
with [DEFINED] and friends. Below that is a set of constants (one per
system) to identify CPU and operating system. For example, on Windows
  TARGET_386_WINDOWS
returns -1. The reasons for this arrangement are lost in the mists
of time. Given the number of CPUs and operating systems around, the
use of strings to identify these is quite reasonable, e.g.
  s" OSX 10.6"
to identify the operating system and minimum version required.
  s" x86 486 NDP387"
to identify the instruction set and requirements. I really must
explore this for ARM and Cortex - even ARM get confused.

>We probably should sit together and work out a set of reasonable macros 
>to write libraries, like %rd% for relative to current file, and %lib% 
>for the system's library (to load those parts of the system that are 
>distributed as source code, like the floating point stuff in VFX), 
>%forth% and %os% for Forth and OS name.

I agree, but when will bigForth (and gForth) get text macros?

>The problem I see with this approach is that it requires again a special 
>feature (SUBSTITUTE), which is of course obtional.  For comfortable use, 
>it also requires that file words pass their strings through SUBSTITUTE 
>(VFX does, others don't).

Just try it and you'll never go back.

Stephen

-- 
Stephen Pelc, stephenXXX@mpeforth.com
MicroProcessor Engineering Ltd - More Real, Less Time
133 Hill Lane, Southampton SO15 5AF, England
tel: +44 (0)23 8063 1441, fax: +44 (0)23 8033 9691
web: http://www.mpeforth.com - free VFX Forth downloads

[toc] | [prev] | [next] | [standalone]


#13625

FromBernd Paysan <bernd.paysan@gmx.de>
Date2012-07-06 00:43 +0200
Message-ID<jt559v$44v$1@online.de>
In reply to#13608
Stephen Pelc wrote:
>>We probably should sit together and work out a set of reasonable
>>macros to write libraries, like %rd% for relative to current file, and
>>%lib% for the system's library (to load those parts of the system that
>>are distributed as source code, like the floating point stuff in VFX),
>>%forth% and %os% for Forth and OS name.
> 
> I agree, but when will bigForth (and gForth) get text macros?

bigForth had text macros for quite a while, and since the way this file 
is written is pretty generic (just depending on the string library), I 
now copied it over to Gforth and cleaned up the generic delimiter (we 
only need one particular delimiter, no need to be generic).

>>The problem I see with this approach is that it requires again a
>>special
>>feature (SUBSTITUTE), which is of course obtional.  For comfortable
>>use, it also requires that file words pass their strings through
>>SUBSTITUTE (VFX does, others don't).
> 
> Just try it and you'll never go back.

Probably.  At the moment, Gforth's file IO primitives (i.e. the relevant 
OPEN-FILE) are written in C, and can't easily access SUBSTITUTE.

-- 
Bernd Paysan
"If you want it done right, you have to do it yourself"
http://bernd-paysan.de/

[toc] | [prev] | [next] | [standalone]


#13639

Fromanton@mips.complang.tuwien.ac.at (Anton Ertl)
Date2012-07-06 15:37 +0000
Message-ID<2012Jul6.173710@mips.complang.tuwien.ac.at>
In reply to#13625
Bernd Paysan <bernd.paysan@gmx.de> writes:
>Probably.  At the moment, Gforth's file IO primitives (i.e. the relevant 
>OPEN-FILE) are written in C, and can't easily access SUBSTITUTE.

It's easy to write an OPEN-FILE that calls SUBSTITUTE before calling
the primitive, but I don't think it's a good idea.

- 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: http://www.forth200x.org/forth200x.html
   EuroForth 2012: http://www.euroforth.org/ef12/

[toc] | [prev] | [next] | [standalone]


#13609

FromAndrew Haley <andrew29@littlepinkcloud.invalid>
Date2012-07-05 09:46 -0500
Message-ID<L8KdnX2XuIZINWjSnZ2dnUVZ8mqdnZ2d@supernews.com>
In reply to#13606
Bernd Paysan <bernd.paysan@gmx.de> wrote:
> Stephen Pelc wrote:
>> Bernd is suggesting that text macros for Forth and OS names may be
>> useful. Although SUBSTITUTE is new in the standard, text macros for
>> Forth have been in use for nearly 20 years.
> 
> Yes, this is a suggestion.  This has currently no common practice
> (even VFX with its long-year usage of text macros doesn't provide
> Forth and OS name as predefined macros).  This should not go into
> the standard now.  We probably should sit together and work out a
> set of reasonable macros to write libraries, like %rd% for relative
> to current file, and %lib% for the system's library (to load those
> parts of the system that are distributed as source code, like the
> floating point stuff in VFX), %forth% and %os% for Forth and OS
> name.
> 
> The problem I see with this approach is that it requires again a
> special feature (SUBSTITUTE), which is of course obtional.  For
> comfortable use, it also requires that file words pass their strings
> through SUBSTITUTE (VFX does, others don't).
> 

It would be a lot less engineering work simply to have a word that
loads a bunch of constants which can then be queried.  Much more
Forthly, IMO.

Andrew.

[toc] | [prev] | [next] | [standalone]


#13564

FromMark Wills <markrobertwills@yahoo.co.uk>
Date2012-07-04 12:44 -0700
Message-ID<78ec2d82-9952-458a-926d-1152dd3ccb84@6g2000vbv.googlegroups.com>
In reply to#13542
On Jul 4, 5:53 pm, Andrew Haley <andre...@littlepinkcloud.invalid>
wrote:
> Mark Wills <markrobertwi...@yahoo.co.uk> wrote:
> > On Jul 4, 3:47?pm, Andrew Haley <andre...@littlepinkcloud.invalid>
> > wrote:
> > What query would you use to tell you if ENVIRONMENT? was present?
>
> > Hmmm... I think I would try:
>
> > : ENV? ( -- t/f)
> >  [ ' ENVIRONMENT? LITERAL ] ;
>
> > : foo ... ... ENV? NOT ABORT" ENVIRONMENT? not supported" ;
>
> > How's that? Works on my home-brew...
>
> Well, yes, so now we have two ways of doing an environmental query,
> where we had one.  Doesn't look like much of a win to me.
>
> Let me try again, because this doesn't make sense.
>
> You don't want ENVIRONMENT? in CORE.
>
> Why not?  Because it wastes memory.
>
> But the CORE wordset doesn't need to be in memory.  You can supply
> part of it as source.
>
> Why else do you not want ENVIRONMENT? in CORE ?
>
> What would you gain if ENVIRONMENT? were not in CORE ?
>
> Andrew.

Okay, I had a good look at the standard this evening at Forthworks.com
(difficult to do at work). I see in section 3 that words, including
core words, can be supplied in source form. I therefore can see your
argument that it's not such a mega issue - just load if you need it.

Putting the way the word works (accepting a string) to one side, I
still maintain that implementing only a subset of the strings listed
in 3.2.6 is a contravention.

If the TC rule against me, then I'll eat a plate of humble pie, with
lashings of twat sauce.

The TC might also want to determine if ENVIRONMENT? should remain in
CORE, be moved elsewhere, or simply deprecated in the forth-coming
(see what I did there?) 200x edition.

[toc] | [prev] | [next] | [standalone]


#13529

FromMark Wills <markrobertwills@yahoo.co.uk>
Date2012-07-04 07:08 -0700
Message-ID<bfa31081-9651-41e2-adac-dc804e51a64e@j9g2000vbk.googlegroups.com>
In reply to#13523
On Jul 4, 1:31 pm, stephen...@mpeforth.com (Stephen Pelc) wrote:
> On Wed, 4 Jul 2012 04:00:56 -0700 (PDT), Mark Wills
>
> <markrobertwi...@yahoo.co.uk> wrote:
> >I guess I'm making two arguments:
>
> >1) It's a carbuncle
> >2) It shouldn't be in CORE.
>
> >It's bizarre that words such as :NONAME are in the optional CORE EXT
> >wordset, but ENVIRONMENT is considered CORE!
>
> 1) Yes, it is a carbuncle but it's there.
> 2) I agree, make a proposal.
>
> What you really are missing is that it is compliant to supply part of
> a system as source code. So supplying ENVIRONMENT? as
>   : environment?  ( caddr len -- 0 ) 2drop false ;
> is compliant. I realise that documentation is much less fun than
> writing code, but it is your choice.
>
> ANS94 was written by people, and people get tired and cranky. Private
> conversation among the vendors indicates that users do not like
> ENVIRONMENT? in part because there is no portable way to extend the
> environment after compiling new facilities. The choice is either to
> add some more words (not a popular solution) or to mandate that the
> implementation uses a wordlist. Since most systems use a vocabulary
> called ENVIRONMENT this is not a big imposition.
>
> I note also that the majority of portable libraries do not use
> ENVIRONMENT? at all. Outside compliance testing, it is very rarely
> used.
>
> Stephen
>
> --
> Stephen Pelc, stephen...@mpeforth.com
> MicroProcessor Engineering Ltd - More Real, Less Time
> 133 Hill Lane, Southampton SO15 5AF, England
> tel: +44 (0)23 8063 1441, fax: +44 (0)23 8033 9691
> web:http://www.mpeforth.com- free VFX Forth downloads

At the very least, I would venture that
  : environment?  ( caddr len -- 0 ) 2drop false ;
goes against the spirit of the standard (though I personally think it
is a violation).

To implement as above means it's simply useless. I can't determine the
cell width of the implementation that I am running, I can't determine
the data stack size. Nothing. So what's the point of it?

Surely, you implement it as described, with all the strings shown in
3.2.6? Surely just complying with the stack signature isn't enough?
Can you cite any other words from the standard where one may choose
what facets of a particular word are/are not implemented?

Are we saying that most (all?) other Forth systems simply skip over
this inconvenient carbuncle and return a false regardless of the
query? If so, not only does that serve to validate and reinforce the
point(s) that I am making, but it also makes a mockery of the
standard.

[toc] | [prev] | [next] | [standalone]


#13546

FromstephenXXX@mpeforth.com (Stephen Pelc)
Date2012-07-04 17:31 +0000
Message-ID<4ff47c04.103081529@192.168.0.50>
In reply to#13529
On Wed, 4 Jul 2012 07:08:35 -0700 (PDT), Mark Wills
<markrobertwills@yahoo.co.uk> wrote:

>Are we saying that most (all?) other Forth systems simply skip over
>this inconvenient carbuncle and return a false regardless of the
>query?

Desktop systems don't really care about a bit more RAM, so MPE
and most other vendors implemented ENVIONMENT? fully a very
long time ago, and only look at the code when someone moans
about it - nobody has done yet.

Standalone embedded systems have no need for ENVIRONMENT?
so typically do not include it. Umbilical systems could,
but MPE have never bothered and nobody has asked for it.

>If so, not only does that serve to validate and reinforce the
>point(s) that I am making, but it also makes a mockery of the
>standard.

Returning 0 (unknown) is just a hack that satisfies the
words of the standard. ENVIRONMENT? is another "kewl idea"
of its time. The "kewl idea" had no common practice and
proved of little value except to force people to document
part of their systems.

ENVIRONMENT? serves to show that there's a reason why ANS
and other standards committees reject most ideas with no
common practice.

Stephen

-- 
Stephen Pelc, stephenXXX@mpeforth.com
MicroProcessor Engineering Ltd - More Real, Less Time
133 Hill Lane, Southampton SO15 5AF, England
tel: +44 (0)23 8063 1441, fax: +44 (0)23 8033 9691
web: http://www.mpeforth.com - free VFX Forth downloads

[toc] | [prev] | [next] | [standalone]


#13617

Fromanton@mips.complang.tuwien.ac.at (Anton Ertl)
Date2012-07-05 16:44 +0000
Message-ID<2012Jul5.184446@mips.complang.tuwien.ac.at>
In reply to#13546
stephenXXX@mpeforth.com (Stephen Pelc) writes:
>Desktop systems don't really care about a bit more RAM, so MPE
>and most other vendors implemented ENVIONMENT? fully a very
>long time ago, and only look at the code when someone moans
>about it - nobody has done yet.

For some interpretation of "implemented fully".  Most of the wordset
queries are missing (in VFX 4.30), maybe others.

- 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: http://www.forth200x.org/forth200x.html
   EuroForth 2012: http://www.euroforth.org/ef12/

[toc] | [prev] | [next] | [standalone]


#13552

From"Elizabeth D. Rather" <erather@forth.com>
Date2012-07-04 08:30 -1000
Message-ID<oc6dnfamwbFHFmnSnZ2dnUVZ_uGdnZ2d@supernews.com>
In reply to#13529
On 7/4/12 4:08 AM, Mark Wills wrote:
...
> At the very least, I would venture that
>    : environment?  ( caddr len -- 0 ) 2drop false ;
> goes against the spirit of the standard (though I personally think it
> is a violation).
>
> To implement as above means it's simply useless. I can't determine the
> cell width of the implementation that I am running, I can't determine
> the data stack size. Nothing. So what's the point of it?
>
> Surely, you implement it as described, with all the strings shown in
> 3.2.6? Surely just complying with the stack signature isn't enough?
> Can you cite any other words from the standard where one may choose
> what facets of a particular word are/are not implemented?
>
> Are we saying that most (all?) other Forth systems simply skip over
> this inconvenient carbuncle and return a false regardless of the
> query? If so, not only does that serve to validate and reinforce the
> point(s) that I am making, but it also makes a mockery of the
> standard.

No, we're saying that the system implementer can make a judgement 
regarding the intended use of the system and provide an ENVIRONMENT? 
that's appropriate to that use. An open Forth programming system on a PC 
might choose to provide a full implementation, whereas a 
"memory-constrained embedded system" would not.

This facility had a strong lobby (of which I was not a member) back in 
the day. As others have noted, it hasn't proven particularly useful, and 
it may be a good idea for the current standards body to take another look.

Cheers,
Elizabeth

-- 
==================================================
Elizabeth D. Rather   (US & Canada)   800-55-FORTH
FORTH Inc.                         +1 310.999.6784
5959 West Century Blvd. Suite 700
Los Angeles, CA 90045
http://www.forth.com

"Forth-based products and Services for real-time
applications since 1973."
==================================================

[toc] | [prev] | [next] | [standalone]


#13580

FromAlbert van der Horst <albert@spenarnc.xs4all.nl>
Date2012-07-05 02:43 +0000
Message-ID<m6o27q.arz@spenarnc.xs4all.nl>
In reply to#13523
In article <4ff4348a.84782861@192.168.0.50>,
Stephen Pelc <stephenXXX@INVALID.mpeforth.com> wrote:
<SNIP>
>
>I note also that the majority of portable libraries do not use
>ENVIRONMENT? at all. Outside compliance testing, it is very rarely
>used.

An important remark.

>
>Stephen

Groetjes Albert

--
-- 
Albert van der Horst, UTRECHT,THE NETHERLANDS
Economic growth -- being exponential -- ultimately falters.
albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

[toc] | [prev] | [next] | [standalone]


#13551

From"Elizabeth D. Rather" <erather@forth.com>
Date2012-07-04 08:16 -1000
Message-ID<7fudndr-sv0TFWnSnZ2dnUVZ_sqdnZ2d@supernews.com>
In reply to#13508
On 7/3/12 11:37 PM, Mark Wills wrote:
> On Jul 4, 10:12 am, Andrew Haley <andre...@littlepinkcloud.invalid>
...
>> "A system need not provide all words in executable form. The
>> implementation may provide definitions, including definitions of words
>> in the Core word set, in source form only."
>>
>> Your complaint that ENVIRONMENT? wastes memory in an embedded system
>> is not valid.
>>
>> Andrew.- Hide quoted text -
>>
>> - Show quoted text -
>
> Of course it's valid. If you have a memory constrained embedded
> system, and you wish you use ENVIRONMENT?, then you need the behemoth
> that ENVIRONMENT? is. Whether it's included at start-up, or loaded
> from source is irrelevant to the point I was making: It's fat and ugly!

Andrew's point is that it's your choice whether you want to invest the 
resources necessary to support a meaningful ENVIRONMENT? or not. They're 
your resources. Most embedded systems aren't open programming 
environments for which ENVIRONMENT? would be useful, so a stub is 
perfectly appropriate. Either choice is compliant.

Cheers,
Elizabeth

-- 
==================================================
Elizabeth D. Rather   (US & Canada)   800-55-FORTH
FORTH Inc.                         +1 310.999.6784
5959 West Century Blvd. Suite 700
Los Angeles, CA 90045
http://www.forth.com

"Forth-based products and Services for real-time
applications since 1973."
==================================================

[toc] | [prev] | [next] | [standalone]


#13553

FromBruceMcF <agila61@netscape.net>
Date2012-07-04 11:57 -0700
Message-ID<089ec209-fcb3-40aa-8952-0dbe7ba77d94@j25g2000yqn.googlegroups.com>
In reply to#13498
On Jul 4, 4:52 am, Mark Wills <markrobertwi...@yahoo.co.uk> wrote:
> On Jul 3, 4:29 pm, an...@mips.complang.tuwien.ac.at (Anton Ertl)
> wrote:
>
>
>
>
>
>
>
>
>
> > Mark Wills <markrobertwi...@yahoo.co.uk> writes:
> > >Why on earth does ENVIRONMENT accept a string? Why couldn't it simply
> > >be a numeric value?
>
> > >It's annoying that ENVIRONMENT? is part of ANS Core, yet it's a rather
> > >sizeable routine, because of the strings that need to be stored in a
> > >lookup table etc. This is a real pain for embedded/memory constrained
> > >systems.
>
> > A very simple implementation of ENVIRONMENT?:
>
> > : environment? ( ( c-addr u -- false | i*x true )
> >   2drop false ;
>
> > - 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:http://www.forth200x.org/forth200x.html
> >    EuroForth 2012:http://www.euroforth.org/ef12/

> Which makes a mockery of the ENVIRONMENT? word, which
> kind of proves my point.

How does it "make a mockery" of ENVIRONMENT? ~ if the defaults applied
when ENVIRONMENT? does not respond to a particular string are the
minimum Forth94 guarantees, then those will often by the exactly right
defaults for a minimalist system.

And if there are a few values you really do want to return, because
you have different models that vary on those points, you can return
just those:

: ENVIRONMENT? ( ca u -- 0 | i*x TRUE )
   2DUP S" ADDRESS-UNIT-BITS" COMPARE 0= IF
      2DROP 18 TRUE EXIT THEN
   2DUP S" CORE" COMPARE 0= IF
      2DROP TRUE TRUE EXIT THEN
   2DROP FALSE ;

[toc] | [prev] | [next] | [standalone]


#13555

FromMark Wills <markrobertwills@yahoo.co.uk>
Date2012-07-04 12:33 -0700
Message-ID<d4f60fa4-52a2-45ec-a9a4-3e436d8fde67@d6g2000vbe.googlegroups.com>
In reply to#13553
On Jul 4, 7:57 pm, BruceMcF <agil...@netscape.net> wrote:
> On Jul 4, 4:52 am, Mark Wills <markrobertwi...@yahoo.co.uk> wrote:
>
>
>
>
>
>
>
>
>
> > On Jul 3, 4:29 pm, an...@mips.complang.tuwien.ac.at (Anton Ertl)
> > wrote:
>
> > > Mark Wills <markrobertwi...@yahoo.co.uk> writes:
> > > >Why on earth does ENVIRONMENT accept a string? Why couldn't it simply
> > > >be a numeric value?
>
> > > >It's annoying that ENVIRONMENT? is part of ANS Core, yet it's a rather
> > > >sizeable routine, because of the strings that need to be stored in a
> > > >lookup table etc. This is a real pain for embedded/memory constrained
> > > >systems.
>
> > > A very simple implementation of ENVIRONMENT?:
>
> > > : environment? ( ( c-addr u -- false | i*x true )
> > >   2drop false ;
>
> > > - 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:http://www.forth200x.org/forth200x.html
> > >    EuroForth 2012:http://www.euroforth.org/ef12/
> > Which makes a mockery of the ENVIRONMENT? word, which
> > kind of proves my point.
>
> How does it "make a mockery" of ENVIRONMENT? ~ if the defaults applied
> when ENVIRONMENT? does not respond to a particular string are the
> minimum Forth94 guarantees, then those will often by the exactly right
> defaults for a minimalist system.
>
> And if there are a few values you really do want to return, because
> you have different models that vary on those points, you can return
> just those:
>
> : ENVIRONMENT? ( ca u -- 0 | i*x TRUE )
>    2DUP S" ADDRESS-UNIT-BITS" COMPARE 0= IF
>       2DROP 18 TRUE EXIT THEN
>    2DUP S" CORE" COMPARE 0= IF
>       2DROP TRUE TRUE EXIT THEN
>    2DROP FALSE ;

Do I really have to spell it out? Again?

It makes a mockery of the standard because what is the point of
specifying the behaviour of a word, if the the programmer can simply
override the bits that are inconvenient to him?

Let me put it another way. Any user of a system should have a
*reasonable expectation* that if a word is defined in his system he
can consult the standard in order to learn how to expect it to behave.
Imagine his surprise/disappointment to learn that for every string he
passes, valid or not, it simply returns FALSE. What's the point of
writing it all down in the standard if the implementor can simply say
"Nah. Don't like it, not doing it."

Then, to add insult to injury, he promotes his system as a standard
compliant system.

> And if there are a few values you really do want to return, because
> you have different models that vary on those points, you can return
> just those:

Please point me to the relevant text, in either the definition of
ENVIRONMENT? or in the list of strings that says "You can just
implement the ones you want, and leave out the rest, or implement none
of them".

[toc] | [prev] | [next] | [standalone]


#13561

FromBruceMcF <agila61@netscape.net>
Date2012-07-04 13:04 -0700
Message-ID<d417f3e7-cb91-48b3-9426-75d124138db5@h10g2000yqn.googlegroups.com>
In reply to#13555
On Jul 4, 3:33 pm, Mark Wills <markrobertwi...@yahoo.co.uk> wrote:
> > How does it "make a mockery" of ENVIRONMENT? ~ if the defaults applied
> > when ENVIRONMENT? does not respond to a particular string are the
> > minimum Forth94 guarantees, then those will often by the exactly right
> > defaults for a minimalist system.

> Do I really have to spell it out? Again?

When have you spelled it out?

> It makes a mockery of the standard because what is the point of
> specifying the behaviour of a word, if the the programmer can simply
> override the bits that are inconvenient to him?

That is not spelling it out, that is asking a rhetorical question
based on the false assumption that giving a FALSE return to an
ENVIRONMENT? query is somehow overirding the behavior of the word.

> Let me put it another way. Any user of a system should have a
> *reasonable expectation* that if a word is defined in his system he
> can consult the standard in order to learn how to expect it to behave.

Yes, and someone who consults the Forth94 standard will know that no
implementation is *required* to register the answer for any particular
environmental query, and so will expect that they have to provide a
default value for those ENVIRONMENT queries that return FALSE.

> Imagine his surprise/disappointment to learn that for every string he
> passes, valid or not, it simply returns FALSE. What's the point of
> writing it all down in the standard if the implementor can simply say
> "Nah. Don't like it, not doing it."

Your hypothetical someone *has consulted the Forth standard*, and so
they already *know that* the response to any particular environmental
query may well be "don't have an answer on hand". So why would they be
surprised?

> Please point me to the relevant text, in either the definition of
> ENVIRONMENT? or in the list of strings that says "You can just
> implement the ones you want, and leave out the rest, or implement none
> of them".

From the behavior of ENVIRONMENT?

"If the system treats the attribute as unknown, the returned flag is
false"

From the normative discussion following the list of environmental
queries:

"If an environmental query (using ENVIRONMENT?) returns false (i.e.,
unknown) in response to a string, subsequent queries using the same
string may return true."

What did you take it to mean when it told you that the system is
allowed TO TREAT an attribute AS unknown?

Really, it ought to be obvious from the "known?" flag return at the
top of the ENVIRONMENT? query that there is no guarantee that every
compliant implementation has a response provided for your particular
query.

One of the more most useful to return is ADDRESS-UNIT-BITS which
allows you to work out if it is byte addressing or not, if the cell is
a binary exponential wide, which allows a variety of shortcuts. It can
be inferred by starting with true and downshifting until you hit 0,
but having it available makes scripts that rely on it start up
quicker, since they don't have to lay down a market, compile the
exploration code, run it, then execute the marker to clean up after
themselves.

One would normally expect "big" implementations to implement
environmental queries as a matter of course and minimal, space-
constrained implementations to implement few or none, since for space-
constrained systems you won't have so much code loading at once and
tailoring it to the system at hand is less of a burden. But if you
have both minimal 16bit and 32bit systems, ADDRESS-UNIT-BITS can be
handy for a common codebase for both.

[toc] | [prev] | [next] | [standalone]


#13565

FromMark Wills <markrobertwills@yahoo.co.uk>
Date2012-07-04 13:28 -0700
Message-ID<5ee1fff8-d6e7-4792-b80b-9fe5a74d53e4@q29g2000vby.googlegroups.com>
In reply to#13561
On Jul 4, 9:04 pm, BruceMcF <agil...@netscape.net> wrote:
> Yes, and someone who consults the Forth94 standard will know that no
> implementation is *required* to register the answer for any particular
> environmental query, and so will expect that they have to provide a
> default value for those ENVIRONMENT queries that return FALSE.

I disagree. I don't see text to that effect anywhere. Nor do I believe
that the meaning of the text can be twisted, as you are doing, in
order to mean that.

[toc] | [prev] | [next] | [standalone]


#13567

FromMark Wills <markrobertwills@yahoo.co.uk>
Date2012-07-04 13:36 -0700
Message-ID<330115d9-24d9-4814-8a47-669aa1569d40@a8g2000vbk.googlegroups.com>
In reply to#13561
On Jul 4, 9:04 pm, BruceMcF <agil...@netscape.net> wrote:
> On Jul 4, 3:33 pm, Mark Wills <markrobertwi...@yahoo.co.uk> wrote:
>
> > > How does it "make a mockery" of ENVIRONMENT? ~ if the defaults applied
> > > when ENVIRONMENT? does not respond to a particular string are the
> > > minimum Forth94 guarantees, then those will often by the exactly right
> > > defaults for a minimalist system.
> > Do I really have to spell it out? Again?
>
> When have you spelled it out?
>
> > It makes a mockery of the standard because what is the point of
> > specifying the behaviour of a word, if the the programmer can simply
> > override the bits that are inconvenient to him?
>
> That is not spelling it out, that is asking a rhetorical question
> based on the false assumption that giving a FALSE return to an
> ENVIRONMENT? query is somehow overirding the behavior of the word.
>
> > Let me put it another way. Any user of a system should have a
> > *reasonable expectation* that if a word is defined in his system he
> > can consult the standard in order to learn how to expect it to behave.
>
> Yes, and someone who consults the Forth94 standard will know that no
> implementation is *required* to register the answer for any particular
> environmental query, and so will expect that they have to provide a
> default value for those ENVIRONMENT queries that return FALSE.
>
> > Imagine his surprise/disappointment to learn that for every string he
> > passes, valid or not, it simply returns FALSE. What's the point of
> > writing it all down in the standard if the implementor can simply say
> > "Nah. Don't like it, not doing it."
>
> Your hypothetical someone *has consulted the Forth standard*, and so
> they already *know that* the response to any particular environmental
> query may well be "don't have an answer on hand". So why would they be
> surprised?

They don't anything. That's why they are reading the standard. All
they know is, according to the standard, ENVIRONMENT? should return
the bit size of a cell when queried with ADDRESS-UNIT-SIZE and your
system returns 0.

"Oh" he thinks. "This system is bugged. I'll go use something else."



>
> > Please point me to the relevant text, in either the definition of
> > ENVIRONMENT? or in the list of strings that says "You can just
> > implement the ones you want, and leave out the rest, or implement none
> > of them".
>
> From the behavior of ENVIRONMENT?
>
> "If the system treats the attribute as unknown, the returned flag is
> false"
>
> From the normative discussion following the list of environmental
> queries:
>
> "If an environmental query (using ENVIRONMENT?) returns false (i.e.,
> unknown) in response to a string, subsequent queries using the same
> string may return true."
>
> What did you take it to mean when it told you that the system is
> allowed TO TREAT an attribute AS unknown?
>
Well, firstly, the entire sentence is gobbledy-gook. If I pass
"ENGLAND" and it returns false, why would it return true on a
subsequent try? That is how I read that sentence. Total rubbish.

I do not interpret it as meaning *any* attribute may be treated as
unknown. I interpret it as any string not in the list is unknown.

[toc] | [prev] | [next] | [standalone]


#13568

From"Elizabeth D. Rather" <erather@forth.com>
Date2012-07-04 10:49 -1000
Message-ID<IPSdnWKUw5fZMWnSnZ2dnUVZ_o6dnZ2d@supernews.com>
In reply to#13567
On 7/4/12 10:36 AM, Mark Wills wrote:
> On Jul 4, 9:04 pm, BruceMcF <agil...@netscape.net> wrote:
...
>>  From the normative discussion following the list of environmental
>> queries:
>>
>> "If an environmental query (using ENVIRONMENT?) returns false (i.e.,
>> unknown) in response to a string, subsequent queries using the same
>> string may return true."
>>
>> What did you take it to mean when it told you that the system is
>> allowed TO TREAT an attribute AS unknown?
>>
> Well, firstly, the entire sentence is gobbledy-gook. If I pass
> "ENGLAND" and it returns false, why would it return true on a
> subsequent try? That is how I read that sentence. Total rubbish.

Why? because in the intervening time after the last time you tried and 
the next, something happened to change the answer. Such as, "I tested 
the availability of <x> and since it wasn't there I loaded the necessary 
file, and now it *is* there."

> I do not interpret it as meaning *any* attribute may be treated as
> unknown. I interpret it as any string not in the list is unknown.

Well, it doesn't say "allowed to treat *a string* as unknown," it says 
"allowed to treat *an attribute* as unknown." In other words, it is 
perfectly legal to refuse to answer the question.

Cheers,
Elizabeth

-- 
==================================================
Elizabeth D. Rather   (US & Canada)   800-55-FORTH
FORTH Inc.                         +1 310.999.6784
5959 West Century Blvd. Suite 700
Los Angeles, CA 90045
http://www.forth.com

"Forth-based products and Services for real-time
applications since 1973."
==================================================

[toc] | [prev] | [next] | [standalone]


#13570

FromMark Wills <markrobertwills@yahoo.co.uk>
Date2012-07-04 13:58 -0700
Message-ID<e586d044-21fe-47d9-85af-58f44cc3e4d2@fr28g2000vbb.googlegroups.com>
In reply to#13568
On Jul 4, 9:49 pm, "Elizabeth D. Rather" <erat...@forth.com> wrote:
> Why? because in the intervening time after the last time you tried and
> the next, something happened to change the answer. Such as, "I tested
> the availability of <x> and since it wasn't there I loaded the necessary
> file, and now it *is* there."

Ha! LOL! So *that's* what it means! But that's so obvious it doesn't
need saying. Furthermore, it could have been stated in better English
(IMHO!) if that's what it truly meant!

I understand that a standard is an abstraction, but it should strive
to be as un-amiguous as possible! Still, I understand from others that
the Forth ANS standard is no worse than other ANS standards.

As I've said before, it's difficult to please everyone. I think if I
were on the TC I'd be fighting for the ambiguity to be cleared up as
far as possible! You'd be sick to death of me!

[toc] | [prev] | [next] | [standalone]


#13574

FromstephenXXX@mpeforth.com (Stephen Pelc)
Date2012-07-04 22:07 +0000
Message-ID<4ff4be32.120023472@192.168.0.50>
In reply to#13570
On Wed, 4 Jul 2012 13:58:36 -0700 (PDT), Mark Wills
<markrobertwills@yahoo.co.uk> wrote:

>As I've said before, it's difficult to please everyone. I think if I
>were on the TC I'd be fighting for the ambiguity to be cleared up as
>far as possible!

You just have to turn up! We can only assume that if you do not
turn up, you do not care enough. Talk is cheap, turning up is not.

Stephen

-- 
Stephen Pelc, stephenXXX@mpeforth.com
MicroProcessor Engineering Ltd - More Real, Less Time
133 Hill Lane, Southampton SO15 5AF, England
tel: +44 (0)23 8063 1441, fax: +44 (0)23 8033 9691
web: http://www.mpeforth.com - free VFX Forth downloads

[toc] | [prev] | [next] | [standalone]


#13599 — Standards Body Attendance (was Re: ENVIRONMENT?)

FromAlex McDonald <blog@rivadpm.com>
Date2012-07-05 05:21 -0700
SubjectStandards Body Attendance (was Re: ENVIRONMENT?)
Message-ID<c2137a8a-1487-4c59-9484-802665fe1928@3g2000vbx.googlegroups.com>
In reply to#13574
On Jul 4, 11:07 pm, stephen...@mpeforth.com (Stephen Pelc) wrote:
> On Wed, 4 Jul 2012 13:58:36 -0700 (PDT), Mark Wills
>
> <markrobertwi...@yahoo.co.uk> wrote:
> >As I've said before, it's difficult to please everyone. I think if I
> >were on the TC I'd be fighting for the ambiguity to be cleared up as
> >far as possible!
>
> You just have to turn up! We can only assume that if you do not
> turn up, you do not care enough. Talk is cheap, turning up is not.
>
> Stephen
>
> --
> Stephen Pelc, stephen...@mpeforth.com
> MicroProcessor Engineering Ltd - More Real, Less Time
> 133 Hill Lane, Southampton SO15 5AF, England
> tel: +44 (0)23 8063 1441, fax: +44 (0)23 8033 9691
> web:http://www.mpeforth.com- free VFX Forth downloads

Many standards bodies now allow "virtual attendance". I am on several
where dialin and use of a webex or equivalent is all that is required
to participate; this counts equally towards maintaining voting
membership as does a physical presence.

For dialin there are free-to-moderate services where the call costs
are borne by the attendees rather than the moderator. Alternatively,
Skype can be used; it is free (if occasionally a little less reliable
than a land-line), but has the advantage of video and a number of
collaborative apps for virtual meetings.

Would the TC consider this as a possible solution?

[toc] | [prev] | [next] | [standalone]


Page 3 of 5 — ← Prev page 1 2 [3] 4 5  Next page →

Back to top | Article view | comp.lang.forth


csiph-web