Roger Hui <[EMAIL PROTECTED]> wrote:
> The number of words in y is the sum of:
>
> - #;:y
> - recursively, the number of words in t if the
> following occurs in y
> ".t
> 6!:2 t
> 7!:2 t
> m : t
These can be somewhat difficult to quantify if t
is not a constant, but an evaluated expression.
What about:
". a.{~ 256#.^:_1 [ someverylongextendedintegerconstant
While this specific example could (say) measure the
length of the constant, the length might not be so obvious
if someone is using a more obfuscated method of creating
the executable string.
Also, there is nothing to stop someone from creating a
simple interpreter of some language other than J
(which avoids ". 6!:2 7!:2 and :) but also takes a program
string encoded as arbitrarily long character strings, or
arbitrarily large extended integers. (Of course, this
would only apply to problems much larger than this
particular one, as such an interpreter would likely be
larger than the solution itself).
No matter what formal mechanical metric is chosen,
someone clever will be able to find an example
that will grossly violate its spirit, while adhering to its letter.
I like your suggestion (from a subsequent message)
that suggested using informal metrics instead.
-- Mark D. Niemiec <[EMAIL PROTECTED]>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm