# Re: [stack] Type systems and Joy

## David R W Denny — 2000-05-22 06:07:41

    On Mon, 22 May 2000, you wrote:

     > Is Joy an elephant? Are we the blind men?

    >

    > "[foo]" does not mean "push 'foo' onto the stack". It means "push

    > '[foo]' onto the stack." '[1]' already means something: to suggest

    > that it should mean what '1' means now, and that we shouldn't use the

    > latter, is so wrong.

    >

    > The difficulty may be this: [x] always means "push [x] onto the

    > stack", but x means "push x onto the stack" if x is an integer, but

    > not if x is 'dup'.

    >

    > sr

     My one cent::

    you are going to distinguish, in general terms, between an instance of an

    object named in your code, and an instance of a named object whose name

    is itself known to be an instance of an object named in the code ??

    could be put more simply (fx value of data item 1 , versus value of (local)

    data item pointed to by data item 1) - but not sure of local terminology - no

    intention to offend ;-)>

    *grin* from the same body of stories comes the one where the king has I think a

    dry throat, and each successive doctor (by appointment or otherwise) gives a

    remedy whose intention is to counteract the preceding remedy.... as can be

    imagined, the poor king is in a bit of a mess at the end of it all ;-)>

    Best Wishes

    David

    --

    Take Care, Take It Easy

    Dave Denny:r2d2:Croydon, UK

    ama sua, ama qhella, ama llulla <Quechua>

## srenner@mail.ru — 2000-05-22 15:06:04

    > you are going to distinguish, in general terms, between an instance

     of an

     > object named in your code, and an instance of a named object whose

     name

     > is itself known to be an instance of an object named in the code ??

    >

    > could be put more simply (fx value of data item 1 , versus value of

     (local)

     > data item pointed to by data item 1) - but not sure of local

     terminology - no

     > intention to offend ;-)>

    >

    > Dave Denny:r2d2:Croydon, UK

     I don't understand. Instance? Named object? Object? Code? Instance of

    a named object whose name is itself known to be an instance of object

    named in the code? Joy is linear, has no names, and can be implemented

    without using a dictionary.

    sr

    sr

## wtanksley@bigfoot.com — 2000-05-22 17:25:45

    From: srenner@... [mailto:srenner@...]

     >Is Joy an elephant? Are we the blind men?

     It would seem that way :-).

     >The difficulty may be this: [x] always means "push [x] onto the

    >stack", but x means "push x onto the stack" if x is an integer, but

    >not if x is 'dup'.

     You state the problem well.  Literals are a special case, and this fact

    makes many things more complicated in Forth.

     >sr

     -Billy

## wtanksley@bigfoot.com — 2000-05-22 17:37:03

    From: David R W Denny [mailto:david@...]

     >you are going to distinguish, in general terms, between an

    >instance of an

    >object named in your code, and an instance of a named object

    >whose name

    >is itself known to be an instance of an object named in the code ??

     Could you repost this, in different words?  I don't understand this

    paragraph, although I can completely parse it.  The paragraph after it I

    can't even parse.

     >David

     -Billy

## Massimo Dentico — 2000-05-22 19:20:34

    wtanksley@... wrote:

     >

    > From: srenner@... [mailto:srenner@...]

    >

    > >Is Joy an elephant? Are we the blind men?

    >

    > It would seem that way :-).

    >

    > >The difficulty may be this: [x] always means "push [x] onto the

    > >stack", but x means "push x onto the stack" if x is an integer, but

    > >not if x is 'dup'.

    >

    > You state the problem well.  Literals are a special case, and this fact

    > makes many things more complicated in Forth.

    >

    > >sr

    >

    > -Billy

     A proposal without much thought (perhaps wrong).

    If X is not an integer could be "push X onto the stack,

    remove from the stack and evaluate it":

    (*1*) X   == X i    (* "i" means evaluate *)

    (*2*) joy == i      (* in http://www.latrobe.edu.au/www/philosophy/phimvt/j10int.html *)

    (*3*) X   == X joy  (* from 1 and 2 *)

    mmm .. if X is an integer is probably the same (depending on the

    semantics of "joy").

    I don't have a strong mathematical background but this seems

    to mean that a Joy program is the fixed point of the equation 3

    or that the meaning of X is the evaluation of X under the "joy"

    combinator (the interpreter of Joy).

    Is it useful and correct this point of view?

    --

    Massimo Dentico