Raul Miller wrote (Jan.6):

> Not that this uses the mechanism you advocate, but:
>    adv1=: (]`[`)(`:0)
>    1 2 3 +adv1 4 5 6
> 4 5 6
> 1 2 3
> 5 7 9

> J's mechanisms for defining tacit adverbs, while not
> totally general, do seem useful for most simple cases.

Thank you for the extra example.   The only difference
of opinion I might have with you is over the "most" and
I only wish I had time just now to try to find some of
the other simple examples that I felt forced me to use
explicit code.

> But what's not clear, to me, is what benefits your
> proposed mechanism has.  I mean, other than
> being different from 1 :'' and 2 :'' forms in that you
> do not have the quotes and stuff.  (The requirement
> that the mechanism not use quotes seems totally
> arbitrary, to me, so I am looking for some other
> reason for this approach).

Well, I don't see that as arbitrary.  Let me explain
in a little more detail.  I taught very simple tacit J
to first semester first year students for quite a few
years as a small part of an introductory unit.  More
recently I taught much more extensive tacit J to an
honours class called Functional Programming, which
is where I first became aware of the difficulty of
writing operations tacitly and simply.

When I was retired completely from teaching, I
decided that tacit J should be made available to
children and their teachers, and to non-computing
people with an interest in numbers.  That was
when I started writing a book on using tacit J to
generate integer sequences, a focus I thought
to be appropriate.  I even had Wiley wanting to
publish the book, which I had showed them in
outline with early parts filled in.  I gave this
away when I found myself having repeatedly
to resort to 1 : and 2 : explicit expressions for
which I had to put the explanation in a footnote
explaining that they should just use it and not
try to understand it.   There was just no way
to make such explanations part of the carefully
staged development of tacit J that I had designed
the book around.  However, something like my
suggested [. and ]. could be fitted in because
its texture is like that of [ and ] which fitted in
delightfully well.

Remember that the people I was trying to reach
were not programmers, nor people who would
want to be programmers.  I was very careful not
to talk about programming at all, but to treat
tacit J and its interpreter as a kind of
supercalculator.  That's why I couldn't launch into
the 1 : '...' and 2 : '...' forms.

I hope this makes my requirement and my suggested
way to satisfy it clearer.  Sorry to have to have given
such a long explanation, but the shorter ones didn't
seem to get the message over.

> Hypothetically speaking, you could change J's
> session manager so that if it sees [. or ]. on a
> line, it will find the rightmost copula on that
> line, and replace whatever follows with an
> appropriate 1 :'' or 2 :'' expression, as appropriate.
> For extra credit, you could do the reverse when
> displaying lines.

But what I wanted was for the reader of my book
to be able to go to go to JSoftware.com and load
a vanilla copy of the J software.  Then, if my book
got them sucked in they would have all the other
resources of JSoftware to help them along.

It would be counterproductive for me to supply
the modified session manager you suggest, even
if I knew how to do so.  As it is, I gave detailed
advice on how to get a friendly school pupil to
help with getting J down and working if they found
trouble trying to do it for themselves.


Neville Holmes, P.O.Box 404, Mowbray 7248, Tasmania
Normal e-mail: [EMAIL PROTECTED]


      Make the switch to the world's best email. Get the new Yahoo!7 Mail now. 
www.yahoo7.com.au/worldsbestemail


----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to