Compiling latest Joy
Ocie Mitchell — 2001-09-23 23:36:57
Sorry to post such an elementary question, but I want
to start using the language as soon as possible. I
grabbed the latest tarfile of the Joy sources and was
able to compile OK, but the interpreter gives me
errors when I try to define via the '==' operator:
JOY - compiled at 16:23:04 on Sep 23 2001 (BDW)
Copyright 2001 by Manfred von Thun
foo == dup *
run time error: definition needed for foo
I tried this out on a Solaris box and a Linux box just
to make sure. Am I using this operator correctly?
Are definition allowed at this level?
Thanks for any help,
Ocie Mitchell
__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger.
http://im.yahoo.com
John Cowan — 2001-09-24 01:41:01
Ocie Mitchell scripsit:
> Sorry to post such an elementary question, but I want
> to start using the language as soon as possible. I
> grabbed the latest tarfile of the Joy sources and was
> able to compile OK, but the interpreter gives me
> errors when I try to define via the '==' operator:
Definitions are only recognized between LIBRA (for which DEFINE is
a synonym) and a period, thus:
LIBRA
foo == dup *;
bar == dup +.
Individual definitions are separated by semicolons. This is something
which Manfred's papers don't explain very well.
--
John Cowan
http://www.ccil.org/~cowan cowan@...
Please leave your values | Check your assumptions. In fact,
at the front desk. | check your assumptions at the door.
--sign in Paris hotel | --Miles Vorkosigan
Manfred von Thun — 2001-09-24 04:51:36
On Sun, 23 Sep 2001, John Cowan wrote:
> Ocie Mitchell scripsit:
>
> > Sorry to post such an elementary question,
There is no need to apologise, this one of the reasons
for the mailing group.
> > but I want
> > to start using the language as soon as possible. I
> > grabbed the latest tarfile of the Joy sources and was
> > able to compile OK, but the interpreter gives me
> > errors when I try to define via the '==' operator:
>
> Definitions are only recognized between LIBRA (for which DEFINE is
> a synonym) and a period, thus:
>
> LIBRA
> foo == dup *;
> bar == dup +.
>
> Individual definitions are separated by semicolons.
Thanks for the clarification, John.
> This is something
> which Manfred's papers don't explain very well.
You are right. The only place where the grammar is given is
in the Manual paper. I'll have to expand the Tutorial paper
at least. My apologies to all.
- Manfred
Ocie Mitchell — 2001-09-24 17:00:02
--- Manfred von Thun <
phimvt@...>
wrote:
>
> On Sun, 23 Sep 2001, John Cowan wrote:
>
> > Ocie Mitchell scripsit:
> >
> > > Sorry to post such an elementary question,
>
> There is no need to apologise, this one of the
> reasons
> for the mailing group.
>
> > > but I want
> > > to start using the language as soon as possible.
> I
> > > grabbed the latest tarfile of the Joy sources
> and was
> > > able to compile OK, but the interpreter gives me
> > > errors when I try to define via the '=='
> operator:
> >
> > Definitions are only recognized between LIBRA (for
> which DEFINE is
> > a synonym) and a period, thus:
> >
> > LIBRA
> > foo == dup *;
> > bar == dup +.
> >
> > Individual definitions are separated by
> semicolons.
>
> Thanks for the clarification, John.
>
Yes, this clears a lot of things up. On a related
note, does this mean that you can't programmatically
create a definition? Is this something that is
intentionally not allowed?
Thanks again,
Ocie Mitchell
__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger.
http://im.yahoo.com
John Cowan — 2001-09-24 18:03:22
Ocie Mitchell wrote:
> Yes, this clears a lot of things up. On a related
> note, does this mean that you can't programmatically
> create a definition? Is this something that is
> intentionally not allowed?
Basically no (it would be possible to bypass the
rules by writing out definitions into a file and
then using "include" on the file). Defined words
are essential for modularity, but they are not
actually necessary, since each is replaced
*directly* by its definition. The Joy1 system
does this at run time, but in principle it
could be done at compile time instead
(except for problems with recursion, which
can be eliminated by using combinators instead).
--
Not to perambulate || John Cowan <
jcowan@...>
the corridors ||
http://www.reutershealth.com
during the hours of repose ||
http://www.ccil.org/~cowan
in the boots of ascension. \\ Sign in Austrian ski-resort hotel