Dan Bron <[EMAIL PROTECTED]> wrote:
> I found 34 foriegns whose nameclass wasn't verb.  In fact, 
> it turned out
> they were all adverbs:
> 
>  0  600
>  1  480
>  2  360
>  3  240
>  4  120
>  5    0
>  5  993
>  5  994
>  6 _120
>  6  873
>  6  874
>  7 _240
>  7  753
>  7  754
>  8 _360
>  8  633
>  8  634
>  9 _480
>  9  513
>  9  514
> 10  393
> 10  394
> 12  153
> 12  154
> 13   33
> 13   34
> 14  _87
> 14  _86
> 15 _207
> 15 _206
> 16 _327
> 16 _326
> 17 _447
> 17 _446

> I thought at first that the arguments to  !:  might 
> have to be single bytes,
> and the negative numbers might just represent "wraparound" (i.e. 
> they'reidentical into their complementary positive bytes) but 
> that's clearly not
> the case.

Close. It appears that !: is implemented something like:
 !: =: 2 : 'if. 11=m do. n windowsdriver else. [EMAIL PROTECTED](n+120*m) end.'
For example, images of 5!:0 occur at m!:(600-120*m) for all m except 11,
from _17895692 to 17895703 (larger values overflow (600-120*m))

(What I find amazing is that it only took about 5 minutes of CPU to
exhaustively search the entire range!)

Removing duplicates, this reduces the above list to three unique adverbs:

>  5    0
> 13   33
> 13   34

Some experimentation yields the following results:

   P =: 13!:33
   [:P          NB. This returns 1 for all verbs, including undefined names
1

   Q =: 13!:34
   f =: 0 Q     NB. Domain error for verbs and all m except 0 or 1
   f
0!:
   4!:0 <'f'    NB. Looks like a conjunction, tastes like a verb
3
   5!:1<'f'     NB. Gerund representation behaves as if !: is an adverb
+------------+
|+--+-------+|
||!:|+-----+||
||  ||+-+-+|||
||  |||0|0||||
||  ||+-+-+|||
||  |+-----+||
|+--+-------+|
+------------+
   g =: ((0 Q)`'')@.0
   g            NB. Converting to gerund and back changes form
!:0
   4!:0 <'g'    NB. Converted form tastes the way it looks
1
   '/' 5 g      NB. Converted form behaves the way it looks
/

> *:  I can't think of a reason to "hide" an undocumented 
> foreign in a
> deprecated family, when it can be hidden just as effectively 
> within its
> "natural" (functionally related) family.

That is assuming that the hiding is deliberate.
Often, code that exists in one version of a program is deprecated,
but some stubs still survive unnoticed for many subsequent versions
before being finally removed.

-- Mark D. Niemiec <[EMAIL PROTECTED]>

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

Reply via email to