> From: "Raul Miller" <[EMAIL PROTECTED]>
> 
> On 9/20/07, neville holmes <[EMAIL PROTECTED]> wrote:
> > Well, yes, it could be done that way, but surely {.[.}. is
> > significantly simpler and easier to understand than
> > /(@({. ,: }.)) especially for learners and dabblers.
> 
> If I understood [. I might be able to answer this question, but
> before I could be confident that I understood, I would need to
> understand how it works in a large set of circumstances.
> 
> For example:

Off the top of my head:
> 
> What would [.[.[. mean?
   a=.[.[.[.
   2 *a 3
36
   2 (***) 3
36
   2 %a 3
1
   ^a 2
2.6185e6
   (^^^) 2
2.6185e6
> 
> What would +({.[.}.) mean?

   a =. +({.[.}.)
   2 *a 3 4 5
14 17
   2 ,~a 3 4 5
6 7 5
   ,~a 3 4 5
7 9 8 
> 
> What would +(NAME=: {.[.})  mean?
>
I assume, } being a conjunction, that you mean }. rather.

After
   a=.  +(NAME=: {.[.}.)
same as above

> What would +(NAME) mean, after executing the above line?

   +NAME
{.+}.

> What would ({.[.})+({.[.}.) mean?
>
Again, assuming you meant

   a =. ({.[.}.)+({.[.}.)
   *a 2 3 4
12 16
   (({.*}.)+({.*}.))2 3 4
12 16
   2 *d 3 4 5 6
30 48
   2 (({.*}.)+({.*}.)) 3 4 5 6
30 48

This all seems so obvious to me that I suspect I'm doing
something that disobeys the formal syntactical rules, with
which I'm not familiar.  I've only been an occasional J user
since I stopped using it for teaching.   I did start writing
a book to promote J, but, as a strict tacitist, I was frustrated
by having to put apologies for complexity into footnotes
when I was forced to go explicit. 

> > But, because they would coerce a tacit definition to be either
> > a conjunction or an adverb, depending on whether ]. was used
> > or not, and because they mimic and conform to [ and ],
> > they could in effect be used to define a "conjunction" that is a
> > verb/function with four arguments or a formidable conjunction
> > with four operands, for example.  And it would do so simply.
> > Or at least it seems so to me.
> 
> In essence, that's what a conjunction has always been in J,
> though you are correct that currently only explicit definitions
> expose this mechanism to the J programmer.  Tacit conjunctions
> are radically simplified -- in essence, they are limited to only a
> few simple useful cases, to avoid confusing the student.

Well, as I see it, [. and ]. would only take in arguments (in the
old APL sense) when they are used only as operands (in the old
sense) to &, and [ and ] would only take in functions when they
are juxtaposed appropriately to operators (adverbs or
conjunctions).  Defining an adverb (no ]. used) could thus have
three arguments, two arguments and an operand, one argument
and two operands, or three operands. (I realise I'm not using
"argument" and "operand" strictly, and some of these should
be prefixed "as though it were".)  Similarly for conjunctions.

I imagine it might be difficult to have [ as an operand and [. as
an argument, though the idea is fascinating to me.

By the by, having taught tacit J to students for many years, my
experience is that the good students are fascinated by tacit J,
but they become confused and put off when they get in deeper
and you have to tell them they now have to learn explicit J.
That's a hell of a put off, I found.   And I believe that my
suggested use of [. and ]. would avoid this.  It's very
important for tacit J, which is why I keep bringing the idea
forward (in case you hadn't noticed, Roger).
> 
> > As a dilettante tacit-only J-er I am very discouraged that this
> > has not been done.
> 
> I think that's because no one understands how to make it work
> without making things harder to understand.
> 
> Here's another question case for you:
> 
> What would this mean:
>    example=: [. ,
>    0 example
| syntax error
    0 [.&,
0&,

or maybe

   0 example
0&,

This bears on my speculation above about operands and
arguments.



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


      Sick of deleting your inbox? Yahoo!7 Mail has free unlimited storage.
http://au.docs.yahoo.com/mail/unlimitedstorage.html

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

Reply via email to