RE: [stack] Re: Quoting
Billy Tanksley — 2001-09-05 18:23:54
From: Jack Waugh [mailto:
waugh@...]
>Both. In Joy, the literals 1, 2, 3, etc., in addition to
>representing numbers, also _are_ stack transformers that leave
>themselves on the stack if executed.
>But whereas you can say [2] i, you can't say 2 i. Hmm.
Formally, you can't do that with functions anyhow -- i is defined only for
quotations, not functions.
-Billy
Manfred von Thun — 2001-09-06 06:29:06
On Wed, 5 Sep 2001, Billy Tanksley wrote:
> From: Jack Waugh [mailto:waugh@...]
>
> >Both. In Joy, the literals 1, 2, 3, etc., in addition to
> >representing numbers, also _are_ stack transformers that leave
> >themselves on the stack if executed.
>
> >But whereas you can say [2] i, you can't say 2 i. Hmm.
>
> Formally, you can't do that with functions anyhow -- i is defined only for
> quotations, not functions.
>
> -Billy
Yes. One can always say
2 [] cons i
of course, which puts the 2 back onto the stack. Hence
2 [] cons i == 2
But the following is true ONLY if what is on top of the stack
is a literal, e.g. a number, char, set, list, boolean:
[] cons i == id
Hope this clarifies something.
- Manfred
md9slj@mdstud.chalmers.se — 2001-09-06 09:37:21
--- In concatenative@y..., Manfred von Thun <phimvt@l...> wrote:
>
> On Wed, 5 Sep 2001, Billy Tanksley wrote:
>
> > From: Jack Waugh [mailto:waugh@a...]
> >
> > >Both. In Joy, the literals 1, 2, 3, etc., in addition to
> > >representing numbers, also _are_ stack transformers that leave
> > >themselves on the stack if executed.
Aha !
> > >But whereas you can say [2] i, you can't say 2 i. Hmm.
> >
> > Formally, you can't do that with functions anyhow -- i is defined
only for
> > quotations, not functions.
Of course. [ blah ] puts a quotation on the stack and i interprets the
*quotation* as a program fragment.
> > -Billy
>
> Yes. One can always say
> 2 [] cons i
> of course, which puts the 2 back onto the stack. Hence
> 2 [] cons i == 2
> But the following is true ONLY if what is on top of the stack
> is a literal, e.g. a number, char, set, list, boolean:
> [] cons i == id
> Hope this clarifies something.
Yes. I hadn't thought of the possibility that what the word 2 puts on
the stack *is* the word 2, instead I thought that it put the
integer 2 (not directly expressible and non-equal to the word 2).
> - Manfred
(no author) — 2001-09-06 23:54:08
> I'm so glad that you are still here with us. I had seen your name
> on the conference list, of course. Your offer to give a paper is
> of course most welcome. In case anybody else also wants to give a
> paper on Joy, you should divide the job in some way or another.
> I'll be glad to held in whatever way is possible. In particular,
> you are welcome to "snarf" (I believe that is a technical term)
> as much from the Joy papers as you like. I'll write again with
> some suggestions, but that will be after the weekend.
I don't have much time for writing at the moment (I still have to
write my own paper), so if you could help with that, that would be
excellent. I was thinking mostly of an introduction to the language
and some of the interesting correspondences with Forth; other Forthers
on the group are best placed to help with that (Billy?). Anyway, I've
suggested the idea to the program chair, Peter Knaggs, too.
Manfred von Thun — 2001-09-10 01:43:15
On Thu, 6 Sep 2001
md9slj@... wrote:
> --- In concatenative@y..., Manfred von Thun <phimvt@l...> wrote:
> >
> > On Wed, 5 Sep 2001, Billy Tanksley wrote:
> Of course. [ blah ] puts a quotation on the stack and i interprets the
> *quotation* as a program fragment.
>
> > > -Billy
> >
> > Yes. One can always say
> > 2 [] cons i
> > of course, which puts the 2 back onto the stack. Hence
> > 2 [] cons i == 2
> > But the following is true ONLY if what is on top of the stack
> > is a literal, e.g. a number, char, set, list, boolean:
> > [] cons i == id
> > Hope this clarifies something.
>
> Yes. I hadn't thought of the possibility that what the word 2 puts on
> the stack *is* the word 2, instead I thought that it put the
> integer 2 (not directly expressible and non-equal to the word 2).
All of the above holds for all literals, so instead of 2 you could have
1) a truth value: true false
2) a character: 'A 'x '!
3) a set: {2 6 31} {4} {}
4) a string: "Hello world" "?#%$" "dup *" ""
5) a list or quoation: [1 4 12345] [] [{9} {17 18}] [peter paul]
[dup *] [[] cons] ...
- Manfred
Manfred von Thun — 2001-09-10 03:44:51
On Fri, 7 Sep 2001
rrt@... wrote:
> <Pine.PMDF.3.96.1010906170130.538974807A-100000@...>
> User-Agent: Wanderlust/2.6.0 (Twist And Shout) SEMI/1.14.3 (Ushinoya)
> FLIM/1.14.3 (=?ISO-8859-4?Q?Unebigory=F2mae?=) APEL/10.3 MULE XEmacs/21.4
> (patch 4) (Artificial Intelligence) (i686-pc-linux)
> MIME-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya")
> Content-Type: text/plain; charset=US-ASCII
>
> > I'm so glad that you are still here with us. I had seen your name
> > on the conference list, of course. Your offer to give a paper is
> > of course most welcome. In case anybody else also wants to give a
> > paper on Joy, you should divide the job in some way or another.
> > I'll be glad to held in whatever way is possible. In particular,
> > you are welcome to "snarf" (I believe that is a technical term)
> > as much from the Joy papers as you like. I'll write again with
> > some suggestions, but that will be after the weekend.
>
> I don't have much time for writing at the moment (I still have to
> write my own paper), so if you could help with that, that would be
> excellent. I was thinking mostly of an introduction to the language
> and some of the interesting correspondences with Forth; other Forthers
> on the group are best placed to help with that (Billy?). Anyway, I've
> suggested the idea to the program chair, Peter Knaggs, too.
The conference prospectus asks for 8 pages. My initial draft would be:
Pages Content From
1 Introduction (Joy synopsis) + Forth correspondence
2 Arithmetic (Tutorial)
3 Other types "
4 Combinators "
5 Sample progs " or from elsewhere
6 Substitutivity (Math Found)
7 No environment (Joy FAQ) + Forth ?
8 Algebra (Algebra) + Forth ?
If you like, I shall cobble together a (probably too long)
selection from those papers in HTML. You can then shorten it
and turn it into one of the required formats.
Does that sound acceptable?
- Manfred