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 2 of 5 — ← Prev page 1 [2] 3 4 5  Next page →


#13520

FromMark Wills <markrobertwills@yahoo.co.uk>
Date2012-07-04 05:20 -0700
Message-ID<7d231011-5c2a-4492-a24a-db5de87ac648@5g2000vbf.googlegroups.com>
In reply to#13518
On Jul 4, 12:53 pm, Andrew Haley <andre...@littlepinkcloud.invalid>
wrote:
> Mark Wills <markrobertwi...@yahoo.co.uk> wrote:
> > On Jul 4, 11:01?am, Andrew Haley <andre...@littlepinkcloud.invalid>
> > wrote:
>
> >> So you need it. But in what memory-constrained embedded system do you
> >> actually need ENVIRONMENT?
>
> > That's irrelevant. It's in CORE. Therefore, if I wanted to call my
> > system ANS94 compliant (and I would like to) then I need to implement
> > it, one way or the other.
>
> Yes.  But it doesn't have to be in memory if it's not needed.  So the
> argument that "it wastes memory" is nonsense.
>
> Andrew.

It wastes memory when it's in memory. Clearly.

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


#13523

FromstephenXXX@mpeforth.com (Stephen Pelc)
Date2012-07-04 12:31 +0000
Message-ID<4ff4348a.84782861@192.168.0.50>
In reply to#13512
On Wed, 4 Jul 2012 04:00:56 -0700 (PDT), Mark Wills
<markrobertwills@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, 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]


#13525

FromAndrew Haley <andrew29@littlepinkcloud.invalid>
Date2012-07-04 08:07 -0500
Message-ID<u_ydnShKJPya3WnSnZ2dnUVZ8q6dnZ2d@supernews.com>
In reply to#13523
Stephen Pelc <stephenXXX@mpeforth.com> wrote:
> 
> I note also that the majority of portable libraries do not use
> ENVIRONMENT? at all. Outside compliance testing, it is very rarely
> used.

Consider, for example, the (now deprecated) practice of keeping
floating-point values on the stack.  It's extremely hard to write
portable code, i.e. code that does not know how many cells a
floating-point value occupies.  If you've gone to the trouble to write
code that is portable to such a system, there's little point providing
two versions.  An environment query for FLOATING-STACK isn't much use:
all you can do is ABORT if it returns zero.

IMO similar reasoning applies to most of the environmental queries:
they are of little practical use.  If the maximum size of a counted
string or the size of the data stack or the size of a cell are too
small, what are you going to do?

I strongly object, though, to the notion that ENVIRONMENT? is
expensive to implement.  It was specially designed to have almost zero
cost.

Andrew.

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


#13530

FromMark Wills <markrobertwills@yahoo.co.uk>
Date2012-07-04 07:16 -0700
Message-ID<358ca526-ed25-4671-93d3-a25211e3662f@5g2000vbf.googlegroups.com>
In reply to#13525
On Jul 4, 2:07 pm, Andrew Haley <andre...@littlepinkcloud.invalid>
wrote:
>
> IMO similar reasoning applies to most of the environmental queries:
> they are of little practical use.  If the maximum size of a counted
> string or the size of the data stack or the size of a cell are too
> small, what are you going to do?
>

Exit gracefully, like any other 'grown up' programming language,
rather than produce garbage results, or, worse, crash.

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


#13544

FromstephenXXX@mpeforth.com (Stephen Pelc)
Date2012-07-04 17:22 +0000
Message-ID<4ff47bab.102992172@192.168.0.50>
In reply to#13530
On Wed, 4 Jul 2012 07:16:42 -0700 (PDT), Mark Wills
<markrobertwills@yahoo.co.uk> wrote:

>Exit gracefully, like any other 'grown up' programming language,
>rather than produce garbage results, or, worse, crash.

I'm rather fond of the maxim:
"Crash early and crash often, then you will fix your bugs."

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]


#13528

FromMark Wills <markrobertwills@yahoo.co.uk>
Date2012-07-04 07:12 -0700
Message-ID<bbc84a4c-3109-4582-91d1-744af7673ae8@m10g2000vbn.googlegroups.com>
In reply to#13523
>
> I note also that the majority of portable libraries do not use
> ENVIRONMENT? at all. Outside compliance testing, it is very rarely
> used.
>

Does that not therefore lend weight to the argument that it belongs
somewhere other than CORE?

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


#13532

FromAndrew Haley <andrew29@littlepinkcloud.invalid>
Date2012-07-04 09:47 -0500
Message-ID<4sOdnbFXydIAymnSnZ2dnUVZ8gOdnZ2d@supernews.com>
In reply to#13528
Mark Wills <markrobertwills@yahoo.co.uk> wrote:
>>
>> I note also that the majority of portable libraries do not use
>> ENVIRONMENT? at all. Outside compliance testing, it is very rarely
>> used.
> 
> Does that not therefore lend weight to the argument that it belongs
> somewhere other than CORE?

Not really, because it tells you what wordsets are present, so
logically speaking it can't be anywhere other than CORE, if it's to be
anywhere at all.  What query would you use to tell you if ENVIRONMENT?
was present?

Andrew.

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


#13539

FromMark Wills <markrobertwills@yahoo.co.uk>
Date2012-07-04 08:14 -0700
Message-ID<fb08b3ea-6350-4ca4-a1c1-5a693d6008b3@n5g2000vbb.googlegroups.com>
In reply to#13532
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...

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


#13542

FromAndrew Haley <andrew29@littlepinkcloud.invalid>
Date2012-07-04 11:53 -0500
Message-ID<q-OdnaKzRqK46GnSnZ2dnUVZ8sydnZ2d@supernews.com>
In reply to#13539
Mark Wills <markrobertwills@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.

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


#13547

FromstephenXXX@mpeforth.com (Stephen Pelc)
Date2012-07-04 17:37 +0000
Message-ID<4ff47e37.103644568@192.168.0.50>
In reply to#13542
On Wed, 04 Jul 2012 11:53:57 -0500, Andrew Haley
<andrew29@littlepinkcloud.invalid> wrote:

>What would you gain if ENVIRONMENT? were not in CORE ?

The vendors went through this with ANS. There was a perception
by users that a compliant system must contain all of CORE and
many other word sets. 18 years after the release of ANS, we
still have to say that you can supply source.

The users should be listened to. It seems foolish that a 
now controversial word of no practical use should remain 
in CORE.

"Simplify and add lightness."

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]


#13557

FromAlex McDonald <blog@rivadpm.com>
Date2012-07-04 12:46 -0700
Message-ID<785b3683-2e97-4234-8dba-e4a4e09509d1@q2g2000vbv.googlegroups.com>
In reply to#13547
On Jul 4, 6:37 pm, stephen...@mpeforth.com (Stephen Pelc) wrote:
> On Wed, 04 Jul 2012 11:53:57 -0500, Andrew Haley
>
> <andre...@littlepinkcloud.invalid> wrote:
> >What would you gain if ENVIRONMENT? were not in CORE ?
>
> The vendors went through this with ANS. There was a perception
> by users that a compliant system must contain all of CORE and
> many other word sets. 18 years after the release of ANS, we
> still have to say that you can supply source.
>
> The users should be listened to. It seems foolish that a
> now controversial word of no practical use should remain
> in CORE.
>
> "Simplify and add lightness."

Colin Chapman.

>
> 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

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


#13560

FromBernd Paysan <bernd.paysan@gmx.de>
Date2012-07-04 21:59 +0200
Message-ID<jt27bq$mcb$1@online.de>
In reply to#13547
Stephen Pelc wrote:
> The users should be listened to. It seems foolish that a
> now controversial word of no practical use should remain
> in CORE.

Indeed.

If we want to retain some of its functionality, we should define it as 
how people actually implement it:  There's a vocabulary with a certain 
name (environment or such), and all the queries go there as definitions 
in this vocabulary.  However, looking at what we actually use in Gforth 
reveals that there are just three environment queries we use: gforth, 
os-class and os-type.  And these are Gforth extensions, not standard 
queries :-).  There is really very litte in the environmental queries 
which is of actual use.  And when it's of actual use (like min/max-int, 
or /pad and /hold), it is not in a form where you can easily use it, 
i.e. in this case it should just be a word (constant) with that name.  
Source (two's complement, for heaven's sake!  Everything else died, 
fortunately!):

-1 Constant max-u
max-u 1 rshift Constant max-n
max-n invert Constant min-n
max-u dup 2Constant max-ud
max-u max-n 2Constant max-d
0 min-n 2Constant min-d

IIRC, the thing we actually want for portable libraries and their 
system-specific harnesses is that the name of the Forth system is 
defined as Forth word, and (with substitute %xxx% expansion) also as 
macro, so that I could simply write

require %rel%/%forth%-harness.fs

which will load gforth-harness.fs or vfxforth-harness.fs in the current 
loaded directory, without using some complicated [IFDEF] statement, 
which needs to maintained everytime you add a new harness.

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

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


#13592

FromAndrew Haley <andrew29@littlepinkcloud.invalid>
Date2012-07-05 02:36 -0500
Message-ID<qJmdnYf8roBp3mjSnZ2dnUVZ8gOdnZ2d@supernews.com>
In reply to#13560
Bernd Paysan <bernd.paysan@gmx.de> wrote:

> IIRC, the thing we actually want for portable libraries and their 
> system-specific harnesses is ...

Well, hold on.  The problem last time was that the TC invented a new
system to handle queries.  This system didn't have any precedent, but
was liked by some of the TC.  Let's not do that again.

Andrew.

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


#13566

FromBruceMcF <agila61@netscape.net>
Date2012-07-04 13:31 -0700
Message-ID<75eab42c-1a0b-4194-bc78-516e64ea611c@f14g2000yqe.googlegroups.com>
In reply to#13547
On Jul 4, 1:37 pm, stephen...@mpeforth.com (Stephen Pelc) wrote:

> The users should be listened to. It seems foolish that a
> now controversial word of no practical use should remain
> in CORE.

I prefer immediate compilation constants ... [16bit] [32bit] [64bit]
[twos] [char=byte] ... and [HAS?] which executes the word if found and
returns FALSE if not.

ENVIRONMENT? can speed up the definition of some of those constants,
but as Bernd shows, a lot of the range constants can be readily
computed on the fly for two-complement machines and, indeed, could be
as easily computed on the fly for one's complement machines. If a ones
complement machine was built (I'm assuming with a FPGA) it could very
well preload those constants so that a standard library script
wouldn't go about redefining them using the two's complement versions.

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


#13578

FromAlbert van der Horst <albert@spenarnc.xs4all.nl>
Date2012-07-05 02:06 +0000
Message-ID<m6o0jh.ag5@spenarnc.xs4all.nl>
In reply to#13566
In article <75eab42c-1a0b-4194-bc78-516e64ea611c@f14g2000yqe.googlegroups.com>,
BruceMcF  <agila61@netscape.net> wrote:
>On Jul 4, 1:37=A0pm, stephen...@mpeforth.com (Stephen Pelc) wrote:
>
>> The users should be listened to. It seems foolish that a
>> now controversial word of no practical use should remain
>> in CORE.
>
>I prefer immediate compilation constants ... [16bit] [32bit] [64bit]
>[twos] [char=3Dbyte] ... and [HAS?] which executes the word if found and
>returns FALSE if not.

I find ?16 ?32 ?64 ?LI ?WI useful. They abandon the input
source unless it is a 16/32/64 Linux MSwindows system.
Suppose we have a facility of a few lines that has an
implementation for msdos 16 bits ( index line has ?MS ?16 )
linux 32 bits ( index line has ?LI ?32 ) and a default
that always work (index line only identifies the facility).

This particular useful in combination with WANT.

>
>ENVIRONMENT? can speed up the definition of some of those constants,
>but as Bernd shows, a lot of the range constants can be readily
>computed on the fly for two-complement machines and, indeed, could be
>as easily computed on the fly for one's complement machines. If a ones
>complement machine was built (I'm assuming with a FPGA) it could very
>well preload those constants so that a standard library script
>wouldn't go about redefining them using the two's complement versions.

In my book I'd haved to introduce ?1C and ?2C and two screens
starting with
( ?1C MAX-INT MAXUINT ... )

( ?2C MAX-INT MAXUINT ... )

implementation fits in one screen easily.
Usage is `` WANT MAX-INT ''
Ignoring one complement it is even easier, just one screen.

Bottom line, everybody has invented something better than
ENVIRONMENT? by now.

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]


#13591

FromAndrew Haley <andrew29@littlepinkcloud.invalid>
Date2012-07-05 02:33 -0500
Message-ID<qJmdnYT8roDb3mjSnZ2dnUVZ8gOdnZ2d@supernews.com>
In reply to#13547
Stephen Pelc <stephenXXX@mpeforth.com> wrote:
> On Wed, 04 Jul 2012 11:53:57 -0500, Andrew Haley
> <andrew29@littlepinkcloud.invalid> wrote:
> 
>>What would you gain if ENVIRONMENT? were not in CORE ?
> 
> The vendors went through this with ANS. There was a perception by
> users that a compliant system must contain all of CORE and many
> other word sets. 18 years after the release of ANS, we still have to
> say that you can supply source.

A perception by some users: to be precise, that subset who don't
carefully read the standard.

> The users should be listened to. It seems foolish that a now
> controversial word of no practical use should remain in CORE.

Sure, but that does not answer my question.

Andrew.

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


#13598

FromstephenXXX@mpeforth.com (Stephen Pelc)
Date2012-07-05 12:12 +0000
Message-ID<4ff57f7a.169503104@192.168.0.50>
In reply to#13591
On Thu, 05 Jul 2012 02:33:26 -0500, Andrew Haley
<andrew29@littlepinkcloud.invalid> wrote:

>Sure, but that does not answer my question.

This is Usenet. So my response is
1) Which question?
2) Wrong questions
3) Is there a problem to solve?

As far as I can tell, ENVIRONMENT? is redundant and no one will
miss it.

Current common practice in libraries is to identify the Forth and O/S
from the contents of the dictionary, or to require the user to specify
them. Increasingly, Forths identify themselves by providing a NOOP
word, e.g. MPE provides VFXFORTH. This approach was certainly
suggested by Forth-83.

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.

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]


#13603

FromAndrew Haley <andrew29@littlepinkcloud.invalid>
Date2012-07-05 07:50 -0500
Message-ID<SMOdnR0RsMEVEGjSnZ2dnUVZ8k-dnZ2d@supernews.com>
In reply to#13598
Stephen Pelc <stephenXXX@mpeforth.com> wrote:
> On Thu, 05 Jul 2012 02:33:26 -0500, Andrew Haley
> <andrew29@littlepinkcloud.invalid> wrote:
> 
>>Sure, but that does not answer my question.
> 
> This is Usenet. So my response is
> 1) Which question?

The one you trimmed, obviously:

>>What would you gain if ENVIRONMENT? were not in CORE ?

> As far as I can tell, ENVIRONMENT? is redundant and no one will
> miss it.

No argument there.

Andrew.

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


#13607

FromstephenXXX@mpeforth.com (Stephen Pelc)
Date2012-07-05 14:15 +0000
Message-ID<4ff5a0fd.178082535@192.168.0.50>
In reply to#13603
On Thu, 05 Jul 2012 07:50:16 -0500, Andrew Haley
<andrew29@littlepinkcloud.invalid> wrote:

>> This is Usenet. So my response is
>> 1) Which question?
>
>The one you trimmed, obviously:
>
>>>What would you gain if ENVIRONMENT? were not in CORE ?

If it goes somewhere else, nothing.

If removed, less maintenance - removing useless code is always good.

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]


#13606

FromBernd Paysan <bernd.paysan@gmx.de>
Date2012-07-05 15:31 +0200
Message-ID<jt44ul$q31$1@online.de>
In reply to#13598
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).

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

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


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

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


csiph-web