Re: [stack] comments - 7
stevan apter — 2000-08-02 12:13:31
----- Original Message -----
From: <phimvt@...>
To: <concatenative@egroups.com>
Sent: Tuesday, August 01, 2000 11:30 PM
Subject: [stack] comments - 7
> I'm still a long way behind, sorry - Manfred
>
> 1. "Joy in Avail"
> This was an impressive sequence of contributions: Mark's Joy in
> Avail, and Stevan's Joy on K. I had looked briefly at K before,
> and I did now have a look at the Avail web page.
> I only had one nagging question about Stevan's K version:
> The definitions look like e.g.
> shunt : I"[swons] step"
> Never mind the colon instead of ==. But do the I and the two double
> quotes mean that the body of this definition is stored as a string
> of characters which has to be rescanned character by character every
> time the shunt function is called?
thanks manfred.
the answer is, no. joy programs are represented as k lists. I is
the k function which parses programs in joy notation, represented
as strings, into lists.
in my implementation, there are three ways shunt can be defined:
1. in the joy.k script, as
shunt:(,`swons;`step)
2. in the joy.k script, as
shunt:I"[swons]step"
3. in a joy script, e.g. std.joy, as
shunt == [swons] step
in the current version, i've eliminated forms 1 and 2 in favor of 3,
so the k script which implements joy contains only k functions.
as far as performance in concerned, i would expect conk/joy-in-k to
show a profile no different from what we observe in k generally:
scalar operations are about 30 times slower than c, while vector
operations are somewhat faster than c.
>