Hi Skip,
I will indeed do as you suggest. It's a good idea and I totally agree
that it is up to me to convince everyone.
In the meantime, you gave me the following example to convert. I have
done my best. If I have not made a mistake with my lack of J experience, I
would be surprised. You said:
> 3 (<:@[ <.[ <.@(] * [ % [: >./ ]) (- <./)@]) i. 21
> 0 0 0 0 0 0 0 1 1 1 1 1 1 1 2 2 2 2 2 2 2
> How would S simplify this tacit expression?
Here we go, starting from your expression:
3 ( <:@[ <.[ <.@(] * [ % [: >./ ]) (- <./)@]) i. 21 29
Let's replace all "]" and "[" by y and x for the moment and take away the
arguments.
( <:@x <.x <.@(y * x % [: >./ y) (- <./)@y)
The parenthesis of the fork aren't needed, nor is the "@:" to the right of
it.
( <:@x <.x <.@(y * x % [: >./ y) - <./y)
The cap isn't needed since verbs are monadic if they have a verb to their
left in a right to left system.
( <:@x <.x <.@(y * x % >./ y) - <./y)
The next "@" is acting as a parenthesis that makes certain that the "x<." is
used before the subtraction, so we can replace it with parentheses.
( <:@x <.(x <.(y * x % >./ y)) - <./y)
The last "@" symbol is also acting as a parenthesis to ensure that the
monadic verb "<:" acts on x before it is input to the dyadic verb on its
right, so that we can parenthesize it and remove the "<@"
( (<:x) <.(x <.(y * x % >./ y)) - <./y)
Thus this must be the equivalent explicit expression. To turn it into
revised tacit form, replace all "x"s with "[" and all "y"s with "]". Now we
have converted current tacit form to a revised tacit form we can put the
arguments back.
3 ( (<:[) <.([ <.(] * [ % >./ ])) - <./]) i. 21
Right to left tends to generate more parentheses - but it is much easier to
convert to tacit form and once you understand right to left, that's the only
rule you have to learn, apart from replacing x and y with [ and ] to turn
into tacit and vice versa to return.
I expect you to find mistakes, but it's an attempt.
Don
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm