This file documents Joy In Euphoria (joie), an interpreter for the concatenative programming language Joy, written in the Euphoria programming language.


ACKNOWLEDGEMENTS

Many thanks to:

STATUS

In this initial release (version 0.10), joie is considered to be alpha status. Implementation of combinators is far from complete. Small sets are not implemented; a big set implementation is used instead. Only inilib.joy has been implemented, and this with some changes discussed below under the heading IMPLEMENTATION-SPECIFIC DETAILS.


REQUIREMENTS

Euphoria version 2.5 is required. It is available from http://rapideuphoria.com. Some user-contributed files available from the same location are used; for convenience these are included in this package.

Euphoria runs on DOS, Windows, Linux and BSD. joie should run on any operating system on which Euphoria itself runs, but has only been tested on the Linux and Windows versions of Euphoria.


INSTALLATION

Assuming Euphoria 2.5 is installed and working, all that is required is to unzip the joie-0.10.zip package. a directory joie-0.10 should be created containing the following files:

CHANGELOG - History of the project (such as it is)

README.html - This file

joy.e - library of core Joy functions

joy.ex - interactive Joy interpreter

inilib.joy - (modified) Joy initial library

print.e - Euphoria library (print functions)

stack.e - Euphoria library (stack implementation)

tables.e - Euphoria library (dictionary implementation)


RUNNING

Under Linux, open a terminal window and make the joie directory the current directory.

Then type the command

exu joy.ex

to start the Joy interpreter without loading inilib.joy, or

exu joy.ex -Linilib

to start the Joy interpreter after loading inilib.joy . Under Windows, use ex or exw instead of exu.


The interactive interpreter outputs a prompt Joy> at which you may type a Joy program. After you press the Enter key, the interpreter saves your input and waits for more input with the ... prompt. If you press the Enter key without entering anything on that line, the interpreter runs the program you entered, then presents the Joy> prompt again. The word quit (followed by two presses of the Enter key) will quit the interpreter.


IMPLEMENTATION-SPECIFIC DETAILS

1. The words to-upper and to-lower from inilib.joy caused a stack underflow error. Prefacing the right hand side with dup fixed it.

2. The time word is implemented differently. Instead of seconds since the epoch, the output of the Euphoria date() function is placed on the stack. The word localtime then converts that to the Joy repesentation of local time.

3. The words localtime-strings, today and now from inilib.joy have been modified to not cause stack underflow. The issue seems to be whether the at word leaves the aggregate it is processing on the stack or consumes that parameter. From the documentation it appears that the aggregate should be consumed.

4. Characters represented as, e.g. '\007 in inilib.joy are replaced simply by 7.

5. The get word (used by the ask word from inilib.joy) is implemented using the Euphoria get() function which accepts any Euphoria object. Numbers or strings may be entered in response to the get word; however, strings should be placed within double quotes. For example:


library inilib.joy is loading

inilib is loaded\n

Stack Empty

Joy>"what is your name?" ask "Hello, " putchars putchars


...



Please what is your name?

"Ray"

Hello, Ray

Joy>