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


Groups > comp.lang.forth > #25853

Re: Forth for education

From "Rod Pemberton" <dont_use_email@nohavenotit.com>
Newsgroups comp.lang.forth
Subject Re: Forth for education
Date 2013-09-20 16:39 -0400
Organization Aioe.org NNTP Server
Message-ID <op.w3p80uvk0e5s1z@localhost> (permalink)
References (15 earlier) <DpmdnXlTEptCwaTPnZ2dnUVZ_tadnZ2d@supernews.com> <op.w3l0a9co0e5s1z@localhost> <l1d4na$7dn$1@dont-email.me> <op.w3mv77yw0e5s1z@localhost> <LNmdnStRZ6fPwqfPnZ2dnUVZ_uqdnZ2d@supernews.com>

Show all headers | View raw


On Wed, 18 Sep 2013 22:20:02 -0400, Elizabeth D. Rather  
<erather@forth.com> wrote:

> On 9/18/13 3:10 PM, Rod Pemberton wrote:
>> On Wed, 18 Sep 2013 17:08:00 -0400, Gerry Jackson
>> <gerry@jackson9000.fsnet.co.uk> wrote:
>>> On 18/09/2013 14:41, Rod Pemberton wrote:
>>>> On Wed, 18 Sep 2013 03:57:19 -0400, Andrew Haley
>>>> <andrew29@littlepinkcloud.invalid> wrote:
...

>>>> Don't you think four decades of conversation on what's the best
>>>> way to implement control-flow in Forth is enough?  When it's not how
>>>> to implement control-flow, it's how to use DOES> ...  Etc., Forth is
>>>> cryptic, Forth has no syntax.
>>>
>>> Nonsense. Of course Forth has some syntax, [...]
>>
>> Forth has no official syntax.  It has some defacto syntax.
>>
>> E.g., brackets [ ] to distinguish compile-time and run-time
>> versions of the same Forth word.  : (colon) and ; (semis)
>> could also be viewed as syntax since they separate much
>> of an immediate stream of executing words from words that
>> are being compiled.  Etc.
>
> You appear to be contradicting Wikipedia's definition of syntax (which  
> is consistent with other definitions elsewhere). Brackets are a naming  
> convention, not syntax (since they have no operational effect) and : and  
> ; are commands in the language, also not syntax. You seem to be  
> confusing syntax with punctuation.
>

Please pay more attention to what was written.  I clearly stated that
"Forth has no official syntax."  How could I possibly be confusing syntax
with punctuation when I know full well Forth has neither?  What does
"defacto" mean to you?  It means to "act like" here.  Since Forth
doesn't have any syntax, except for space, the appearance of syntax is
the closest Forth can get to actual syntax.  Yes, an appearance of some
syntax has developed over time, as cited, IMO.

>>> [...] if there were no syntax how could a Forth interpreter make any
>>> sense of a Forth program.
>>
>> Each Forth word has an action or many.  The entire action is independent
>> of other words, although correct execution may depend on data provided
>> by other Forth words or on the stacks, etc.
>
> Yes, how is that different from what Gerry said?
>

Syntax isn't required in Forth to take action, which is especially true
for interpreted Forths.  It can be less so for other designs.

>>> At the grammar level control structures such as IF ... ELSE ...
>>> THEN clearly form part of Forth's syntax -
>>
>> Not so.
>>
>>> if there is no terminating THEN, the structure is wrong.
>>
>> Really? Says who or what?
>>
>> Which standard or document do you think requires that?
>>
>> Hint:
>>
>> fig-Forth doesn't say that.
>> F-79 doesn't say that.
>> F-83 doesn't say that.
>> ANS doesn't say that either.
>
> Yes, it does:
>
> 6.1.1700 	IF 	CORE
> Interpretation: Interpretation semantics for this word are undefined.
>
> Compilation: ( C: -- orig )
> Put the location of a new unresolved forward reference orig onto the  
> control flow stack. Append the run-time semantics given below to the  
> current definition. The semantics are incomplete until orig is resolved,  
> e.g., by THEN or ELSE.
>
> Run-time: ( x -- )
> If all bits of x are zero, continue execution at the location specified  
> by the resolution of orig.
>
> See: 3.2.3.2 Control flow stack, 6.1.1310 ELSE, 6.1.2270 THEN.
>

I can quote too.  Where?  Where does it say that THEN or ELSE is
*required* to terminate an IF ?  AFAICT, nowhere.  "e.g." means
"for example", i.e., it's citing two, THEN and ELSE , of many
possible ways to terminate an IF .  The requirement is
"semantics are incomplete until orig is resolved" not what
resolves it.

>> fig-Forth comes the closest, saying that THEN an alias for ENDIF is
>> "only" supposed to be used with IF.  ANS is the least specific.
>
> Seems clear to me.
>

AFAICT, that's only true if you're presumptive or inject meaning.

>> However, there is no constraint in the stack parameters for any of
>> them that would actually require a Forth implementor to only allow
>> THEN to be used with an IF or ELSE.  THEN can function correctly
>> as long as the stack parameters are valid.  E.g., I could define
>> the "WADADABOOP" control-flow to work correctly with and be
>> terminated by THEN.  If someone implements THEN to require a matching
>> IF , they've added additional functionality not required, perhaps
>> for safety.  I.e., if so, then they've created syntax, but it's not
>> officially required.
>
> Forth's syntax is flexible. There are a limited number of officially  
> sanctioned ways to terminate an IF, but it's clear that WADADABOOP would  
> be non-standard.
...

> Where in Wikipedia's definition (or any other) does it say that if there  
> is more than one way to use tokens to
> form a phrase it isn't syntax?
>

Why must I cite Wikipedia when Forth's own standards say so?  A space
is the only defined syntax.  You're switching from one argument early
on to the exact opposite here.

>>> If all control structures, colon definitions, variable definitions
>>> etc are considered there is quite a bit of syntax.
>>
>> Of course, that's not official syntax, but, yes, that is a trivial
>> amount of defacto syntax.
>
> Oh, well, then, "official" syntax vs. "defacto" syntax. Where do you  
> find that definition?
>

Where do you find the definition of any syntax other than space?

>>> The conclusion is that Forth has a *lot* of syntax and so the
>>> statement "Forth has no syntax" is a load of bollocks.
>>
>> I think you're confusing and conflating much.
>
> And I think you're inventing your own definition of syntax for
> the sole purpose of "proving" your point.
>

I did no such thing.  You misunderstood earlier where cited up above.
And, throughout this post you went from saying Forth has syntax
to saying it doesn't.  At least I was clear, I thought, that Forth
has developed an appearance of syntax for certain things, even
though it has no syntax.


Rod Pemberton

Back to comp.lang.forth | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Forth for education visualforth@rocketmail.com - 2013-09-09 05:16 -0700
  Re: Forth for education Matthias Koch <matthias.koch@hot.uni-hannover.de> - 2013-09-09 14:59 +0200
  Re: Forth for education "Rod Pemberton" <dont_use_email@nohavenotit.com> - 2013-09-10 04:30 -0400
    Re: Forth for education "Elizabeth D. Rather" <erather@forth.com> - 2013-09-10 08:00 -1000
      Re: Forth for education hughaguilar96@yahoo.com - 2013-09-10 21:32 -0700
        Re: Forth for education "Rod Pemberton" <dont_use_email@nohavenotit.com> - 2013-09-11 06:22 -0400
          Re: Forth for education "Alex McDonald" <blog@rivadpm.com> - 2013-09-11 11:52 +0100
            Re: Forth for education Matthias Koch <matthias.koch@hot.uni-hannover.de> - 2013-09-11 14:40 +0200
            Re: Forth for education "Rod Pemberton" <dont_use_email@nohavenotit.com> - 2013-09-12 08:10 -0400
              Re: Forth for education "Alex McDonald" <blog@rivadpm.com> - 2013-09-12 14:20 +0100
                Re: Forth for education "Rod Pemberton" <dont_use_email@nohavenotit.com> - 2013-09-14 22:47 -0400
                Re: Forth for education "Elizabeth D. Rather" <erather@forth.com> - 2013-09-14 17:47 -1000
                Re: Forth for education stephenXXX@mpeforth.com (Stephen Pelc) - 2013-09-15 17:17 +0000
                Re: Forth for education "Alex McDonald" <blog@rivadpm.com> - 2013-09-15 18:52 +0100
                Re: Forth for education "Elizabeth D. Rather" <erather@forth.com> - 2013-09-15 08:11 -1000
                Re: Forth for education "Alex McDonald" <blog@rivadpm.com> - 2013-09-15 19:49 +0100
                Re: Forth for education "Elizabeth D. Rather" <erather@forth.com> - 2013-09-15 09:11 -1000
                Re: Forth for education hughaguilar96@yahoo.com - 2013-09-15 20:38 -0700
                Re: Forth for education "Rod Pemberton" <dont_use_email@nohavenotit.com> - 2013-09-17 17:21 -0400
                Re: Forth for education Spam@ControlQ.com - 2013-09-17 18:01 -0400
                Re: Forth for education "Elizabeth D. Rather" <erather@forth.com> - 2013-09-17 14:31 -1000
                Re: Forth for education hughaguilar96@yahoo.com - 2013-09-17 22:20 -0700
                Re: Forth for education hughaguilar96@yahoo.com - 2013-09-17 22:23 -0700
                Re: Forth for education Bernd Paysan <bernd.paysan@gmx.de> - 2013-09-18 21:56 +0200
                Re: Forth for education Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-09-18 02:57 -0500
                Re: Forth for education "Rod Pemberton" <dont_use_email@nohavenotit.com> - 2013-09-18 09:41 -0400
                Re: Forth for education "Alex McDonald" <blog@rivadpm.com> - 2013-09-18 15:35 +0100
                Re: Forth for education "Rod Pemberton" <dont_use_email@nohavenotit.com> - 2013-09-18 21:02 -0400
                Re: Forth for education "Elizabeth D. Rather" <erather@forth.com> - 2013-09-18 15:42 -1000
                Re: Forth for education "Rod Pemberton" <dont_use_email@nohavenotit.com> - 2013-09-20 15:48 -0400
                Re: Forth for education "Elizabeth D. Rather" <erather@forth.com> - 2013-09-20 11:26 -1000
                Re: Forth for education "Rod Pemberton" <dont_use_email@nohavenotit.com> - 2013-09-20 20:35 -0400
                Re: Forth for education "Alex McDonald" <blog@rivadpm.com> - 2013-09-19 13:45 +0100
                Re: Forth for education "Rod Pemberton" <dont_use_email@nohavenotit.com> - 2013-09-20 16:18 -0400
                Re: Forth for education Alex McDonald <blog@rivadpm.com> - 2013-09-20 14:06 -0700
                Re: Forth for education rickman <gnuarm@gmail.com> - 2013-09-20 17:08 -0400
                Re: Forth for education "Elizabeth D. Rather" <erather@forth.com> - 2013-09-20 12:00 -1000
                Re: Forth for education "Rod Pemberton" <dont_use_email@nohavenotit.com> - 2013-09-20 20:10 -0400
                Re: Forth for education hughaguilar96@yahoo.com - 2013-09-20 23:23 -0700
                Re: Forth for education "Rod Pemberton" <dont_use_email@nohavenotit.com> - 2013-09-21 13:09 -0400
                Re: Forth for education Mark Wills <markrobertwills@yahoo.co.uk> - 2013-09-23 01:55 -0700
                Re: Forth for education Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-09-23 11:40 -0500
                Re: Forth for education albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-09-23 17:45 +0000
                Re: Forth for education anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-09-23 18:47 +0000
                Re: Forth for education albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-09-24 17:00 +0000
                Re: Forth for education Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-09-23 14:51 -0500
                Re: Forth for education albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-09-24 16:50 +0000
                Re: Forth for education Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-09-24 12:02 -0500
                Re: Forth for education Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-09-21 05:21 -0500
                Re: Forth for education "Rod Pemberton" <dont_use_email@nohavenotit.com> - 2013-09-21 14:15 -0400
                Re: Forth for education "Elizabeth D. Rather" <erather@forth.com> - 2013-09-21 08:52 -1000
                Re: Forth for education Paul Rubin <no.email@nospam.invalid> - 2013-09-21 14:23 -0700
                Re: Forth for education Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-09-22 04:53 -0500
                Re: Forth for education hughaguilar96@yahoo.com - 2013-09-22 19:00 -0700
                Re: Forth for education Whammo <sidciavic@gmail.com> - 2013-09-22 21:22 -0700
                Re: Forth for education "Elizabeth D. Rather" <erather@forth.com> - 2013-09-23 08:13 -1000
                Re: Forth for education "Rod Pemberton" <dont_use_email@nohavenotit.com> - 2013-09-25 04:25 -0400
                Re: Forth for education visualforth@rocketmail.com - 2013-09-24 21:38 -0700
                Re: Forth for education Rob Sciuk <rob@controlq.com> - 2013-09-23 12:07 -0400
                Re: Forth for education Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-09-23 11:50 -0500
                Re: Forth for education "Rod Pemberton" <dont_use_email@nohavenotit.com> - 2013-09-25 03:58 -0400
                Re: Forth for education rickman <gnuarm@gmail.com> - 2013-09-26 09:32 -0400
                Re: Forth for education hughaguilar96@yahoo.com - 2013-09-27 19:35 -0700
                Re: Forth for education "Rod Pemberton" <dont_use_email@nohavenotit.com> - 2013-09-28 01:08 -0400
                Re: Forth for education "Rod Pemberton" <dont_use_email@nohavenotit.com> - 2013-09-28 01:09 -0400
                Re: Forth for education "Rod Pemberton" <dont_use_email@nohavenotit.com> - 2013-09-25 03:21 -0400
                Re: Forth for education Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-09-25 04:00 -0500
                Re: Forth for education Brad Eckert <hwfwguy@gmail.com> - 2013-09-25 09:26 -0700
                Re: Forth for education visualforth@rocketmail.com - 2013-09-25 15:14 -0700
                Re: Forth for education Doug Hoffman <glidedog@gmail.com> - 2013-09-26 07:51 -0400
                Re: Forth for education visualforth@rocketmail.com - 2013-09-26 23:36 -0700
                Re: Forth for education rickman <gnuarm@gmail.com> - 2013-09-21 14:40 -0400
                Re: Forth for education Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-09-21 04:46 -0500
                Re: Forth for education Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-09-18 11:41 -0500
                Re: Forth for education Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2013-09-18 22:08 +0100
                Re: Forth for education "Rod Pemberton" <dont_use_email@nohavenotit.com> - 2013-09-18 21:10 -0400
                Re: Forth for education "Elizabeth D. Rather" <erather@forth.com> - 2013-09-18 16:20 -1000
                Re: Forth for education "Rod Pemberton" <dont_use_email@nohavenotit.com> - 2013-09-20 16:39 -0400
                Re: Forth for education Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2013-09-19 12:47 +0100
                Re: Forth for education Spam@ControlQ.com - 2013-09-19 11:30 -0400
                Re: Forth for education Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2013-09-19 16:48 +0100
                Re: Forth for education "Rod Pemberton" <dont_use_email@nohavenotit.com> - 2013-09-20 16:51 -0400
                Re: Forth for education Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2013-09-20 23:17 +0100
                Re: Forth for education rickman <gnuarm@gmail.com> - 2013-09-21 15:19 -0400
                Re: Forth for education "Rod Pemberton" <dont_use_email@nohavenotit.com> - 2013-09-25 03:31 -0400
                Re: Forth for education hughaguilar96@yahoo.com - 2013-09-18 21:12 -0700
                Re: Forth for education Mark Wills <markrobertwills@yahoo.co.uk> - 2013-09-19 01:02 -0700
                Re: Forth for education rickman <gnuarm@gmail.com> - 2013-09-21 15:26 -0400
                Re: Forth for education "Rod Pemberton" <dont_use_email@nohavenotit.com> - 2013-09-20 17:09 -0400
                Re: Forth for education anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2013-09-19 11:28 +0000
                Re: Forth for education Paul Rubin <no.email@nospam.invalid> - 2013-09-18 18:30 -0700
                Re: Forth for education "WJ" <w_a_x_man@yahoo.com> - 2013-09-19 22:51 +0000
                Re: Forth for education rickman <gnuarm@gmail.com> - 2013-09-15 14:06 -0400
                Re: Forth for education Brad Eckert <hwfwguy@gmail.com> - 2013-09-15 19:56 -0700
              Re: Forth for education "Elizabeth D. Rather" <erather@forth.com> - 2013-09-12 08:03 -1000
          Re: Forth for education "Elizabeth D. Rather" <erather@forth.com> - 2013-09-11 08:59 -1000
            Re: Forth for education albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-09-12 10:48 +0000
              Re: Forth for education Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-09-12 08:17 -0500
        Re: Forth for education "WJ" <w_a_x_man@yahoo.com> - 2013-09-13 12:48 +0000
          Re: Forth for education Mark Wills <markrobertwills@yahoo.co.uk> - 2013-09-13 06:33 -0700
          Re: Forth for education m.a.m.hendrix@tue.nl - 2013-09-13 07:25 -0700
          Re: Forth for education visualforth@rocketmail.com - 2013-09-13 21:20 -0700
          Re: Forth for education "WJ" <w_a_x_man@yahoo.com> - 2013-09-15 09:04 +0000
            Re: Forth for education mhx@iae.nl - 2013-09-15 02:57 -0700
        Forth is not interactive "WJ" <w_a_x_man@yahoo.com> - 2013-09-20 03:32 +0000
          Re: Forth is not interactive rickman <gnuarm@gmail.com> - 2013-09-20 01:20 -0400
          Re: Forth is not interactive Whammo <sidciavic@gmail.com> - 2013-09-19 23:41 -0700
            Re: Forth is not interactive "Elizabeth D. Rather" <erather@forth.com> - 2013-09-19 21:45 -1000
              Re: Forth is not interactive "Rod Pemberton" <dont_use_email@nohavenotit.com> - 2013-09-20 04:09 -0400
                Re: Forth is not interactive "Elizabeth D. Rather" <erather@forth.com> - 2013-09-19 22:21 -1000
                WJ, aka William James [was Re: Forth is not interactive] "Alex McDonald" <blog@rivadpm.com> - 2013-09-20 10:55 +0100
                Re: WJ, aka William James [was Re: Forth is not interactive] Mark Wills <markrobertwills@yahoo.co.uk> - 2013-09-20 06:17 -0700
                Re: WJ, aka William James [was Re: Forth is not interactive] rickman <gnuarm@gmail.com> - 2013-09-20 13:19 -0400
                Re: WJ, aka William James [was Re: Forth is not interactive] "Alex McDonald" <blog@rivadpm.com> - 2013-09-20 19:45 +0100
                Re: WJ, aka William James [was Re: Forth is not interactive] rickman <gnuarm@gmail.com> - 2013-09-20 14:53 -0400
              Re: Forth is not interactive Mark Wills <markrobertwills@yahoo.co.uk> - 2013-09-20 01:20 -0700
          Re: Forth is not interactive Howerd <howerdo@yahoo.co.uk> - 2013-09-20 02:35 -0700
            Re: Forth is not interactive Howerd <howerdo@yahoo.co.uk> - 2013-09-20 02:39 -0700
          Re: Forth is not interactive mhx@iae.nl - 2013-09-21 04:05 -0700
          Re: Forth is not interactive albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-09-21 12:43 +0000
    Re: Forth for education stephenXXX@mpeforth.com (Stephen Pelc) - 2013-09-12 14:04 +0000
    Re: Forth for education "Ed" <invalid@invalid.com> - 2013-09-15 18:00 +1000
  Re: Forth for education voidvolker@gmail.com - 2013-09-14 10:41 -0700
    Re: Forth for education "Elizabeth D. Rather" <erather@forth.com> - 2013-09-14 10:53 -1000
  Re: Forth for education "WJ" <w_a_x_man@yahoo.com> - 2013-09-19 22:33 +0000
    Re: Forth for education visualforth@rocketmail.com - 2013-09-19 17:17 -0700
      Re: Forth for education "Rod Pemberton" <dont_use_email@nohavenotit.com> - 2013-09-20 17:44 -0400
        Re: Forth for education "Alex McDonald" <blog@rivadpm.com> - 2013-09-20 23:58 +0100
          Re: Forth for education "Rod Pemberton" <dont_use_email@nohavenotit.com> - 2013-09-20 19:49 -0400
            Re: Forth for education "Alex McDonald" <blog@rivadpm.com> - 2013-09-21 20:33 +0100
              Re: Forth for education "Rod Pemberton" <dont_use_email@nohavenotit.com> - 2013-09-25 03:49 -0400
                Re: Forth for education "Alex McDonald" <blog@rivadpm.com> - 2013-09-25 09:42 +0100
                Re: Forth for education rickman <gnuarm@gmail.com> - 2013-09-26 09:39 -0400
                Re: Forth for education Doug Hoffman <glidedog@gmail.com> - 2013-09-26 10:40 -0400
                Re: Forth for education "Elizabeth D. Rather" <erather@forth.com> - 2013-09-26 08:51 -1000
        Re: Forth for education rickman <gnuarm@gmail.com> - 2013-09-20 22:50 -0400
          Re: Forth for education "Rod Pemberton" <dont_use_email@nohavenotit.com> - 2013-09-21 14:27 -0400
            Re: Forth for education rickman <gnuarm@gmail.com> - 2013-09-21 15:33 -0400
              Re: Forth for education "Rod Pemberton" <dont_use_email@nohavenotit.com> - 2013-09-25 03:37 -0400
        Re: Forth for education Paul E Bennett <Paul_E.Bennett@topmail.co.uk> - 2013-09-21 10:02 +0100

csiph-web