# Re: [stack] XY or K or joy or ...

## stevan apter — 2005-08-21 02:00:23

    k isn't a concatenative language.  we just wind up talking about it.

    i have no idea why.  :)

    factor isn't pure - it has side-effects.  the intention of the author

    (although i should probably let him speak for himself) is to provide

    a practical alternative to lisp and scheme which is also concatenative.

    XY is a toy language (what some people call a "research" language.)

    john cowan is doing a joy implementation in chicken scheme, which will

    adhere 100% to manfred's spec, but be easier to extend and (he hopes)

    faster.

    as far as i know, manfred continues to explore the application of

    joy to problems in logic, computer science, and math.

     ----- Original Message -----

    From: "icpdesign" <taoufik.dachraoui@...>

    To: <concatenative@yahoogroups.com>

    Sent: Saturday, August 20, 2005 6:34 PM

    Subject: [stack] XY or K or joy or ...

    Sometimes ago I read about joy and i liked the ideas behind the language very much, but i

    did not spend a lot of time on it though. Today I found that there is many efforts put for

    other languages (K, XY,Factor ...), WHY?

    What is the status of joy as of today?

    Thank you

    Taoufik

    Yahoo! Groups Links

## Greg Buchholz — 2005-08-22 15:53:26

    --- stevan apter <sa@...> wrote:

     > john cowan is doing a joy implementation in chicken scheme, which will

    > adhere 100% to manfred's spec, but be easier to extend and (he hopes)

    > faster.

     FWIW, I toyed with a compiler (written in Haskell) for a Joy-like

    language which targets Scheme (Chicken and DrScheme).  You can see the

    approach I have taken by grabbing a copy at...

        http://sleepingsquirrel.org/almost/almost-joy.tar

    ...There's a large similarity between Joy and Scheme which makes writing

    the compiler and primitives especially easy.  I wonder if anyone has a

    good comprehensive test suite of Joy programs, what with all the

    different implementations floating around.

    Greg Buchholz

    From the Almost-Joy README...

        Almost-Joy is similar to regular Joy, but with the restriction that

    lists are separate from quoted programs.  Quotations are introduced with

    square brackets as normal.  Lists are introduced with parenthesis.  You

    can't execute lists (i.e. applying the "i" combinator to a list is an

    error) and you can't apply list oriented functions like "cons" and "map"

    to quoted programs.  Use the "comp" word to compose two quotations.  And

    you can't automatically reflect data items on the stack back into

    quotations (although adding a word to do that operation wouldn't be

    hard).  I still havn't decided if separating lists and quotations is the

    best idea.  I could be convinced otherwise.  Comments in the source are

    not yet allowed.

        The Almost-Joy compiler takes a (*.joy) file and creates a Scheme

    program which can be compiled with the Chicken scheme compiler, or

    executed under the DrScheme environment (should be portable to Bigloo

    with minor modification to the "joy_header.scm" file).  About 85% of the

    functions in the Joy manual...

        http://www.latrobe.edu.au/philosophy/phimvt/joy/plain-manual.html

    ...have been implemented in Almost-Joy.  (Although some functions might

    have Scheme semantics instead of Joy semantics).  Here's an example of

    the quadratic equation in Almost-Joy...

    quadratic  ==

            [ ( [ pop pop 2 * ]

                [ pop 0 swap - ]

                [ swap dup * rollup * 4 * - sqrt ] )

              [i] map ] ternary unlist

            [ ( [ + swap / ]

                [ - swap / ] )

              [i] map ]

            ternary ;

    2 -4 -6 quadratic showstack

    ____________________________________________________

    Start your day with Yahoo! - make it your home page

    http://www.yahoo.com/r/hs

## phimvt@lurac.latrobe.edu.au — 2005-08-26 07:20:26

    On Mon, 22 Aug 2005, Greg Buchholz wrote:

    [..]

    > FWIW, I toyed with a compiler (written in Haskell) for a Joy-like

    > language which targets Scheme (Chicken and DrScheme).  You can see the

    > approach I have taken by grabbing a copy at...

    >

    >     http://sleepingsquirrel.org/almost/almost-joy.tar

    That looks very impressive, Greg. You seem to be an expert on both

    Haskell and Scheme. Now I know whom to ask about these languages...

    >                                            I wonder if anyone has a

    > good comprehensive test suite of Joy programs, what with all the

    > different implementations floating around.

    You could try the many Joy libraries on the Joy site. They are

    all of the form XYZlib.joy

    > Greg Buchholz

    Best wishes for your project, and keep us informed.

      - Manfred

## phimvt@lurac.latrobe.edu.au — 2005-09-02 05:40:20

    Australia extends its sympathy to the U.S. in the wake

    of Katrina's devastation. We share your grief.

    I can only hope that members of this group have not been

    directly affected and not lost any loved ones.

      - Manfred