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


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

RFD: Quotations V2 update

Started by"Alex McDonald" <blog@rivadpm.com>
First post2015-08-04 11:05 +0100
Last post2015-08-05 09:53 +0100
Articles 5 on this page of 45 — 9 participants

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


Contents

  RFD: Quotations V2 update "Alex McDonald" <blog@rivadpm.com> - 2015-08-04 11:05 +0100
    Re: RFD: Quotations V2 update Mark Wills <markwills1970@gmail.com> - 2015-08-04 04:09 -0700
      Re: RFD: Quotations V2 update Lars Brinkhoff <lars.spam@nocrew.org> - 2015-08-04 13:35 +0200
        Re: RFD: Quotations V2 update "Alex McDonald" <blog@rivadpm.com> - 2015-08-04 13:54 +0100
          Re: RFD: Quotations V2 update "Alex McDonald" <blog@rivadpm.com> - 2015-08-04 14:01 +0100
      Re: RFD: Quotations V2 update "Alex McDonald" <blog@rivadpm.com> - 2015-08-04 13:38 +0100
        Re: RFD: Quotations V2 update Mark Wills <markwills1970@gmail.com> - 2015-08-04 07:37 -0700
    Re: RFD: Quotations V2 update anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-08-04 14:23 +0000
      Re: RFD: Quotations V2 update "Alex McDonald" <blog@rivadpm.com> - 2015-08-04 16:09 +0100
        Re: RFD: Quotations V2 update anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-08-04 15:38 +0000
          Re: RFD: Quotations V2 update Bernd Paysan <bernd.paysan@gmx.de> - 2015-08-04 22:30 +0200
            Re: RFD: Quotations V2 update "Alex McDonald" <blog@rivadpm.com> - 2015-08-04 23:09 +0100
              Re: RFD: Quotations V2 update Bernd Paysan <bernd.paysan@gmx.de> - 2015-08-05 01:45 +0200
                Re: RFD: Quotations V2 update anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-08-05 07:23 +0000
                  Re: RFD: Quotations V2 update "Alex McDonald" <blog@rivadpm.com> - 2015-08-05 09:55 +0100
            Re: RFD: Quotations V2 update Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2015-08-05 12:03 +0100
              Re: RFD: Quotations V2 update "Alex McDonald" <blog@rivadpm.com> - 2015-08-05 13:50 +0100
                Re: RFD: Quotations V2 update anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-08-05 16:07 +0000
                Re: RFD: Quotations V2 update Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2015-08-05 20:23 +0100
    Re: RFD: Quotations V2 update Bernd Paysan <bernd.paysan@gmx.de> - 2015-08-04 22:00 +0200
      Re: RFD: Quotations V2 update "Alex McDonald" <blog@rivadpm.com> - 2015-08-04 21:07 +0100
    Re: RFD: Quotations V2 update Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2015-08-04 21:53 +0100
      Re: RFD: Quotations V2 update "Alex McDonald" <blog@rivadpm.com> - 2015-08-04 23:22 +0100
        Re: RFD: Quotations V2 update Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2015-08-05 12:38 +0100
          Re: RFD: Quotations V2 update "Alex McDonald" <blog@rivadpm.com> - 2015-08-05 13:41 +0100
            Re: RFD: Quotations V2 update anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-08-05 12:46 +0000
              Re: RFD: Quotations V2 update Bernd Paysan <bernd.paysan@gmx.de> - 2015-08-06 02:12 +0200
                Re: RFD: Quotations V2 update "Alex McDonald" <blog@rivadpm.com> - 2015-08-06 14:16 +0100
                Re: RFD: Quotations V2 update anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-08-06 13:46 +0000
      Re: RFD: Quotations V2 update anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-08-05 08:15 +0000
        Re: RFD: Quotations V2 update Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2015-08-05 20:31 +0100
          Re: RFD: Quotations V2 update peter.m.falth@gmail.com - 2015-08-05 14:41 -0700
            Re: RFD: Quotations V2 update "Elizabeth D. Rather" <erather@forth.com> - 2015-08-05 18:39 -1000
              Re: RFD: Quotations V2 update peter.m.falth@gmail.com - 2015-08-05 23:22 -0700
          Re: RFD: Quotations V2 update anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-08-06 13:19 +0000
            Re: RFD: Quotations V2 update Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2015-08-07 22:28 +0100
              Re: RFD: Quotations V2 update Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2015-08-07 22:34 +0100
                Re: RFD: Quotations V2 update anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-08-08 15:53 +0000
                  Re: RFD: Quotations V2 update Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2015-08-11 21:16 +0100
              Re: RFD: Quotations V2 update anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-08-08 15:39 +0000
                Re: RFD: Quotations V2 update Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2015-08-10 12:55 +0100
                  Re: RFD: Quotations V2 update anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-08-10 12:08 +0000
    Re: RFD: Quotations V2 update hughaguilar96@gmail.com - 2015-08-04 18:09 -0700
      Re: RFD: Quotations V2 update "Alex McDonald" <blog@rivadpm.com> - 2015-08-05 09:22 +0100
      Re: RFD: Quotations V2 update "Alex McDonald" <blog@rivadpm.com> - 2015-08-05 09:53 +0100

Page 3 of 3 — ← Prev page 1 2 [3]


#41259

FromGerry Jackson <gerry@jackson9000.fsnet.co.uk>
Date2015-08-10 12:55 +0100
Message-ID<mqa3c0$nlg$1@dont-email.me>
In reply to#41210
On 08/08/2015 16:39, Anton Ertl wrote:
> \ 1)
> : comp-[: postpone [: ; \ compilation semantics
> : foo [ comp-[: ." hello" ;] ] ;
> foo execute \ should print "hello"
>
> \ 2)
> : [int-[:] ['] [: execute ; immediate \ interpretation semantics
> ] [int-[:] ." hello" ;] [ execute \ should print "hello"
>
> \ 3)
> : compile, compile, ; \ give it proper interpretation semantics
> : int-[: [ ' [: compile, ] ; \ interpretation semantics
> int-[: ." hello" ;] execute \ should print "hello"
>
>> >Assuming your example 3 has a missing " after <." hello> my system works
>> >for 1 and 3 but for 2 it doesn't leave an xt on the stack to be
>> >EXECUTEd. That's because I hadn't allowed for ] to be executed before a
>> >quotation.
> What is the problem?
>

Simply that ;] restored STATE and compiled the xt as a literal if the 
restored value of STATE was <>0. In example 2 it was <>0 so the xt 
wasn't left on the stack to be executed. The bug has been corrected.

If interpreted [: has to behave like :NONAME then it and ;] has to 
handle these cases

[: ... ;]                \ Simple example, restored state = 0
] [: ... ;] [            \ Your example 2, restored state <> 0
[: ... [: ... ;] ... ;]  \ Nested with restored state <> 0 and inside
                          \ an interpreted quotation

That made me wonder if your examples should be included in the Forth 
2012 test suite, but of course they can't as being state-smart is not 
invalid and the standard doesn't know about SET-COMPILER.

-- 
Gerry

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


#41261

Fromanton@mips.complang.tuwien.ac.at (Anton Ertl)
Date2015-08-10 12:08 +0000
Message-ID<2015Aug10.140835@mips.complang.tuwien.ac.at>
In reply to#41259
Gerry Jackson <gerry@jackson9000.fsnet.co.uk> writes:
>On 08/08/2015 16:39, Anton Ertl wrote:
>> \ 1)
>> : comp-[: postpone [: ; \ compilation semantics
>> : foo [ comp-[: ." hello" ;] ] ;
>> foo execute \ should print "hello"
...
>That made me wonder if your examples should be included in the Forth 
>2012 test suite, but of course they can't as being state-smart is not 
>invalid and the standard doesn't know about SET-COMPILER.

Test cases 2 and 3 should not be included, if the interpretation
semantics of [: are undefined.  However, test case 1 should work for
the current specification IMO.  If we want to exclude it (do we?  I
don't), we should change the specification accordingly.

STATE-smartness is not necessary for the current specification.  If
your system supports dual-xt words, you can provide interpretation
semantics for "[:".  If your system does not support that feature,
just make "[:" immediate.

- 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 2015: http://www.mpeforth.com/euroforth2015/euroforth2015.htm

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


#41112

Fromhughaguilar96@gmail.com
Date2015-08-04 18:09 -0700
Message-ID<6a8c245d-c4a2-4969-bb2d-bc46d97e13e7@googlegroups.com>
In reply to#41088
On Tuesday, August 4, 2015 at 3:05:55 AM UTC-7, Alex McDonald wrote:
> There has been some discussion about providing higher-order or
> embedded functions that are able to refer to their parent's locals
> during their execution. This is a middle ground between the proposal
> here and full closures that (almost always) require garbage
> collection, and it would permit execution of the quotation in the
> execution scope of the parent; in the BAR example above, if the
> quotation was executed prior to the return of BAR to its caller.
> 
> There are two schools of thought.
> 
> 1. Define [: ;] such that a standard program may not access
>    local variables of the outer definition inside the quotation.
> 
> 2. Permit such a feature, but restrict valid execution of the
>    quotation to the lifetime of the parent's execution.
> 
> Solution 2 requires some form of locals frame, and may be excessively
> complex to implement; it appears to have few advantages over
> the simpler quotations as proposed here.

It is not complex to implement: http://www.forth.org/FMITE.txt

It has the advantage of allowing people to write general-purpose data-structures. The idea is that the higher-order function iterates through the data-structure and executes the quotation for every node in the data-structure, and the quotation communicates information about the data back to the parent function via the parent function's local variables.

> Additional contributors; Hugh Aguilar and Gerry Jackson.

I don't want my name associated with Forth-200x in any way.

You seem to think that I'm like you --- that I want the prestige of having my name listed as a contributor to Forth-200x, and that I am willing to tell whatever lie Leon Wagner demands in exchange --- but I will never do this.

Anybody who allows their name to be associated with Forth-200x has sold out their integrity to Forth Inc. That is a very disgraceful and shameful thing to do --- it would be much better if, when Forth-200x is released, there are no contributors at all other than Forth Inc. --- much more honest this way.

Like all sleazy sales-people, Elizabeth Rather engages continually in name-dropping. She routinely says that Chuck would do such and such. How does she know? Is she a mind-reader? Charles Moore (I don't know him so well as to call him "Chuck") said that ANS-Forth is 100 times more complicated than necessary, yet his name is listed in the peanut-gallery portion of the ANS-Forth document. Similarly, in 1993 Ray Duncan said that the word-list construct in ANS-Forth was "brain-dead," and he abandoned Forth when ANS-Forth became the standard, yet his name is also listed in the peanut-gallery portion of the ANS-Forth document. Now Elizabeth Rather's stooge Alex McDonald is trying to get my name listed in the peanut-gallery portion of the Forth-200x document --- apparently the Forth-200x committee are very desperate to make Forth-200x appear to be a grass-roots effort rather than just a product of Forth Inc., and so they strive to include the names of Forth programmers even if they do not support Forth-200x --- this is a disgusting and loathsome marketing tactic.

I will sue you for libel if you put my name in the Forth-200x document --- you are trying to disgrace me by dragging me down to your level of incompetence and implying that I am one of Leon Wagner's sycophants --- I won't tolerate such an insult.

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


#41119

From"Alex McDonald" <blog@rivadpm.com>
Date2015-08-05 09:22 +0100
Message-ID<mpsh1c$mcd$1@dont-email.me>
In reply to#41112
on 05/08/2015 02:09:01,  wrote:
> On Tuesday, August 4, 2015 at 3:05:55 AM UTC-7, Alex McDonald wrote:

> 
>> Additional contributors; Hugh Aguilar and Gerry Jackson.
> 
> I don't want my name associated with Forth-200x in any way.
> 
> I will sue you for libel if you put my name in the Forth-200x document

I'm not sure how you might win a libel case, since any sensible jury
would note that your reputation is in such poor standing that it is not
possible to damage it further.

However, it's a modest and easily fulfilled request. But please -- no
whining later that you were "kicked off" or "ignored" or "stigmatized".

I will be removing your name from the next version of the RfD. Anton Ertl
reads clf, and as the chair of the Forth200x committee I'm sure he'll be
only too happy to direct the committee to expunge your name from every
part of the discussion and documentation.



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


#41120

From"Alex McDonald" <blog@rivadpm.com>
Date2015-08-05 09:53 +0100
Message-ID<mpsirp$skh$1@dont-email.me>
In reply to#41112
on 05/08/2015 02:09:01,  wrote:
> On Tuesday, August 4, 2015 at 3:05:55 AM UTC-7, Alex McDonald wrote:
>> There has been some discussion about providing higher-order or
>> embedded functions that are able to refer to their parent's locals
>> during their execution. This is a middle ground between the proposal
>> here and full closures that (almost always) require garbage
>> collection, and it would permit execution of the quotation in the
>> execution scope of the parent; in the BAR example above, if the
>> quotation was executed prior to the return of BAR to its caller.
>>
>> There are two schools of thought.
>>
>> 1. Define [: ;] such that a standard program may not access
>>    local variables of the outer definition inside the quotation.
>>
>> 2. Permit such a feature, but restrict valid execution of the
>>    quotation to the lifetime of the parent's execution.
>>
>> Solution 2 requires some form of locals frame, and may be excessively
>> complex to implement; it appears to have few advantages over
>> the simpler quotations as proposed here.
> 
> It is not complex to implement: http://www.forth.org/FMITE.txt
> It has the advantage of allowing people to write general-purpose
> data-struc tures. The idea is that the higher-order function iterates
> through the data -structure and executes the quotation for every node
> in the data-structure, and the quotation communicates information
> about the data back to the pare nt function via the parent function's
> local variables.
> 

You should note that any compiler writer that wants to support such a
feature is free to do so. Should this RfD make it into Forth200x, any
program that uses the feature you propose will be non- standard. But
that's fine since that has always been the case; the many compilers that
support quotations are currently in the same situation, which is why
there is a standardisation proposal.

You've also made it clear over the years that you want nothing to do with
Forth200x or any of its participants, whom you universally hold in low
regard. Therefore I won't be mentioning your latest comments in the RfD,
and will be removing this specific section unless I hear that there is
another proposer for it that wants it discussed.

[toc] | [prev] | [standalone]


Page 3 of 3 — ← Prev page 1 2 [3]

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


csiph-web