What means, e.g., ('';'/')"_ 
Author Message
 What means, e.g., ('';'/')"_


Nollaig MacKenzie writes on Thursday, June 15:

Quote:
> I've only fiddled with J before. Now I intend to learn it. Sometimes
> the interpreter can be a teacher; when I can't figure out a way of
> writing a function 'tacitly', I try the ' ... x. ... y. ... ' form
> with 13 :, hoping for something illuminating. Mostly I can figure out
> what the interpreter gives, but this one is a puzzle:
>    addsla=. 13 : 'y. ,&.> (y. e. TFN) { a:,<''/'''
>    addsla
> ] ,&.> (] e. (;:'*.+.*:+:<><:>:=~:')"_) { ('';'/')"_
> ... addsla works, but what do those ' "_ ' mean?

The dictionary the entry for " on page 165 says that the form  
m"n  where m and n are nouns, produces a constant function with
value m and rank n.  Therefore,  m"_  is a constant function with
infinite rank.

Facilities in J Version 2 makes the 13 : translator rather
straightforward.  Juxtaposing the argument and the result:

y. ,&.> (y. e. TFN                      ) { a:,<''/'''
]  ,&.> (]  e. (;:'*.+.*:+:<><:>:=~:')"_) { ('';'/')"_

One can observe that:  y. is translated to the ] verb.  (x. would
be translated to [ if there had been any x.)  Nouns are translated
to constant functions.  And forks are employed to preserve the
sequence of functions in the original sentence.

The noun phrases in the result are the handiwork of the linear
representation used in the display.  The LR contains heuristics
which attempt to provide a pleasing display.  Even though I
specified the heuristics, I am often (pleasantly) surprised by
what it does with various nouns.



Mon, 01 Dec 1997 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. What means, e.g., ('';'/')"_ ?

2. stream('file','c','seek ='x) problem

3. Wanted: Hints'n'Tips'n'Bits'n'Bobs

4. '"""' and linefeed characters

5. There is an 'U'|'X'|'W'|'Z'|'-' in an arithmetic operand

6. Privates and their 'true' meaning

7. What does 'spaghetti' mean

8. Sory I meant '/'

9. "'Snakeymathtem'": Virus?

10. LabView 5.1.1, 'Failure: "linker.c", line 1825': Please Help

11. About ''"CooL": low-level macros considered useful

12. python -c "help('while')"

 

 
Powered by phpBB® Forum Software