I wrote:
> The subsequent six values in the original arrays,
>
>> 0 0 0 9223372036854775807 9223372036854775807 9223372036854775807
>
> have been the same in all verbs I’ve inspected so far, and look like
> sentinels to me (3 3 # 0, 2^64-1): three pairs of mins and maxes?
Ok, the 9223372036854775807 9223372036854775807 9223372036854775807 are the
ranks of the verb: monadic rank, left dyadic rank, right dyadic rank
(9223372036854775807 is the maximum value of a signed int on a 64-bit machine,
and apparently is how _ is represented, though that leads to other confusing
questions).
I’m still working through this, but it appears verbs are represented by the
struct V [1]:
typedef struct {AF f1,f2;A f,g,h;I flag,mr,lr,rr,fdep;C id;} V;
I’m still not entirely clear on what AF is, because I’ve forgotten most of the
little C I once knew. Here’s how I think it’s defined:
typedef A (*AF)();
But anyway it looks like f1 is the definition of the monad, and f2 is the
definition of the dyad. That may be what those two mystery integers in the
original data dump were (6443034000 6443033120 in your example, the ones right
before the pointer to what I’m speculating is the “name” of the verb).
Then you have the 3 fields f, g, and h, whose function I haven’t determined yet.
Then you have the flags field, which seems out of place to me, from the data
dumps we’re looking at; I’d expect it to precede all the rest of that stuff.
Then you have the 3 ranks, discussed above.
Then you have the “id” field, which I think is primarily used for primitives.
I’m not sure what the id value would be for user-defined verbs (it’s of type
char, so it has a maximum of 256 possible values, most of which are already
pre-defined [2]). In my recent investigations, this field had a value of 126,
or ‘~’, but I’m not sure if this is accidental or has some other meaning.
-Dan
[1] typedef of V (jtype.h, line 316):
https://github.com/openj/core/blob/18fd23bbdc2f50770eb3047e978cd5e4e3b47039/jtype.h#L316
[2] Interpretations of the V->id field (jc.h, line 4 onwards):
https://github.com/openj/core/blob/18fd23bbdc2f50770eb3047e978cd5e4e3b47039/jc.h#L4
<https://github.com/openj/core/blob/18fd23bbdc2f50770eb3047e978cd5e4e3b47039/jc.h#L4>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm