# various questions

## peter_easthope@gulfnet.pinc.com — 2000-05-11 15:55:49

    Sorren, why are you creating a new language and

    writing the compiler?  If you have explained already

    perhaps you can just point me back to the message.

    Have any of you folks used J?  The concatination here

    is reminiscent of J.

    wtanksley@... said,

    wt> the syntax I used depended on strings, while

    yours depends on "symbols".

    I know what a string is.  What is a "symbol"?

    Brent Kirby mentioned,

    bk> Count upward, beginning at 0, skipping multiples of five

    Sorren replied,

    sr> 0 [dup 5 % 0 = [dup puti] [] if 1 +] spin

    In case anyone is interested, this is it in J without division.

    J evaluates each line from right to left. (OK, it wasn't my

    choice.)

    screen=. (1!:2)&2  NB. Display the argument as a side effect;

    NB. equivalent to puti.

    si=. screen@>:     NB. screen after increment

    count=. (>:@si@si@si@si)^:_

    count 0

    ^: means "apply the function on the left the number of times

    given on the right".  _ is "infinity".  Hence ^:_ is equivalent to

    your spin.  The four lines above can be condensed to these two.

    si=. (1!:2)&2@>:

    ((>:@si@si@si@si)^: _) 0

    wt> ... more thinking about continuations.

    What is a continuation?

    Thanks,       Peter E.

## srenner@mail.ru — 2000-05-11 17:39:05

    --- In concatenative@egroups.com, peter_easthope@g... wrote:

     > Sorren, why are you creating a new language and

    > writing the compiler?  If you have explained already

    > perhaps you can just point me back to the message.

    >

    > Have any of you folks used J?  The concatination here

    > is reminiscent of J.

    >

    > wtanksley@b... said,

    > wt> the syntax I used depended on strings, while

    > yours depends on "symbols".

    >

    > I know what a string is.  What is a "symbol"?

    >

    > Brent Kirby mentioned,

    > bk> Count upward, beginning at 0, skipping multiples of five

    >

    > Sorren replied,

    > sr> 0 [dup 5 % 0 = [dup puti] [] if 1 +] spin

     Well, I DIDN'T write that last line. It was either iepos or tanksley.

    Probably the bit about writing a new language and compiler isn't

    correctly aimed at me either. However, it might be, because I am

    implementing Joy in Oberon. So I will answer: "because I am not

    intelligent enough to understand how a virtual machine works without

    writing one."

    I think that what I wrote yesterday is complete. That is, it will need

    some operations and combinators besides dup and i, and a scanner so it

    can parse input into programs, and more literal types. Characters and

    strings should be easy. Joy also has a set type. Oberon has a set type

    too, though I have never used it. Probably one will map to the other.

    There will need to be a dictionary mapping names of ops to ops, for

    the scanner at least.

    Here is an idea: multiple Joy threads that communicate through a

    global store of variables that can be bound only once, like Mozart Oz.

    It would mean adding "variables", but only global ones, so each VM

    (thread) would be no heavier than it would be in pure Joy.

    sr

    "Hitting today's nail with the hammer of tomorrow. On the head.

    egrollard.com"