On 11/27/2015 4:08 PM, 'Pascal Jasmin' via Programming wrote:
Are you saying that if I define

floor =: (<. : (<.@]))"0 _ 0

that it does not have integrated rank support?

Yes, that's what we're saying. Integrated Rank Support is an interpreter feature.


The criticism about english and documentation seems hollow to me.  I don't say 
that Nuvoc is useless because it hasn't been implemented in 150 languages.  An 
ability to read the dictionary in English is essential to learn J, and code 
typically uses english shaddows from profile.ijs.  Making foreign language 
cover verbs including autotranslating the english ones is straightforward, and 
answers that part of the criticism.  Using the exact names from the dictionary 
(what I'm refering to as autodocumentation because the exact same place you 
would look up i. is where iota will be explained.) seems like an elegant way to 
ease a shallow learning curve on the process.
You're right about English's being required to read J docs, but that is a regrettable fact, not an advantage to build on.

The J language itself does not use English. Having cover names in different languages would only make things worse, by making beginners' code meaningless outside their own language. If they have to use a lingua franca, it might as well be J rather than JayForBeginners.

[I want to reiterate that I think the idea has merit to steepen the learning curve, but only the bottom fifth of it. That could be a help: if you realize that users are going to use the names only as a beginning crutch, you don't have to worry about things like performance so much.]


I have my doubts about the mnemonic value of using the Dictionary names. We've all seen the names a hundred times; now take this quiz:

1. What is the rank of:

Appose
At
Atop
Bond
Compose

2. Describe the difference between Appose and Compose in words, and explain why the names were chosen.

3. Use the word Ravel in a sentence, and explain why it is a good name for (, y).

4. Does (x Residue y) calculate x(mod y) or y(mod x), and why is it that way?

5. Describe the action of (; y) and explain why Raze is a good name for it.

6. In ItemAmend, does an Item Amend something, or is an Item being Amended, or is something else happening?

7. Why is the name Agenda appropriate, if only one item on the agenda is actually executed? Are the rest tabled?

8. How does the name MemberOfInterval describe the action of (x E. y)?

9. What direction do the diagonals defined by Oblique run?

10. Select a more mnemonic name than Tally for (# y).


The entire criticism could be applied to "you should never assign a verb to any 
name"

Change it to "you should never assign a primitive to any name" and I'd agree - except for beginners.

Henry Rich





----- Original Message -----
From: Raul Miller <rauldmil...@gmail.com>
To: Programming forum <programm...@jsoftware.com>
Sent: Friday, November 27, 2015 3:27 PM
Subject: Re: [Jprogramming] dyadic J

On Thu, Nov 26, 2015 at 4:12 PM, 'Pascal Jasmin' via Programming
<programm...@jsoftware.com> wrote:
The only disadvantage I recognize is the point about special code.
It would be interesting to go over the reasons you do not recognize
the other disadvantages.

As to your other points, because the primitives are tacit, I believe there is 
integrated rank support.

   floor b. 0
0 _ _
You might want to read
http://www.jsoftware.com/pipermail/general/1998-October/000041.html

All verbs have rank support, even verbs which contain explicit
definitions. However, for some combinations of primitives, the
interpreter takes special steps - bypassing the default implementation
of rank support with something more efficient.

English is needed to read dictionary, and all of the primitives are the monad 
dictionary entries, so everything is autodocumented.
In my experience, documentation is difficult and autodocumentation
quickly falls victim to entropy. It sounds great, but most examples I
have seen become incredibly useless in practice. It's possible to work
around this with manual effort, but the effort involved often seems to
be greater than the effort of simply doing it manually in the first
place. Where automation shines is replicating the useful manual
efforts.

The advantage bigger than the one you mentioned is better seeing the intent of 
code.
Agreed.

Thanks,


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

Reply via email to