Requests for J system extensions and enhancements in 2005 (2006, 2007, current).

## numeric constants

when _ inside numeric constants is surrounded by digits it may be ignored by the parser to allow for more readable constants like 1_000_000_000_000x rather than 1000000000000x or 16bffff_ffff_ffff_ffff (ADA had this feature) -- AndrewNikitin 2005-10-16 03:51:15

• I am loath to add more complications to the sub-language of constants. -- RogerHui 2005-10-16 04:44:07

## p:^:_1 on floating point numbers

p:^:_1 should work on floating point arguments. Submitted by Raul Miller 2005-10-15.

• Done for the J 6.01 release. -- RogerHui 2005-10-17 20:38:27

## q: on rational numbers

REQUEST WITHDRAWN -- I'm also wondering whether the domain of dyadic q: could be extended to include rational numbers. For example, _ q: 1r12 should return _2 _1x -- Raul Miller 2005-10-17 03:56:08

• Because numbers in J are analytic, any extension can not just be to the internal rational numbers. We'd then have to handle all the complications to do

with IEEE floating point numbers, including deciding whether 1%7 is 1r7 . Too much trouble when a simple -@(q: %) already does the job. -- RogerHui 2005-10-17 04:58:34

• I think IEEE floating points are special in this context because they're typically approximations. You can only factor numbers which are exact. And, in the general case rationals have a numerator greater than 1. However, if there were something for rationals that works like +. works on complex (is there? If there is, I'm not aware of it), that could be used. Perhaps something like -/@(_&q:)@R: -- Raul Miller 2005-10-17 12:16:49

• 2&x: works analogously to +., e.g. (the following could probably be improved):   (/: /:@:|)@;@(1 _1"_ *&.> <@q:@(2&x:)) 1729r666
_2 _3 _3 7 13 19 _37 -- EwartShaw 2005-10-17 12:52:24

• Hmm... thanks for pointing out 2 x:. Also, I inadvertently (and temporarily) left off the left argument to q: in my previous quip. For the case of monadic q: I'd probably use something like ([: -.&0 _ [: ,"2 (<0 1)"_ |: [: ]`%`:0 [: q: 2: x: ])"0 -- and that could be cleaned up, too. -- Raul Miller 2005-10-17 14:23:03

## f//. speed improvements

f//. on matrices seems very slow, both on booleans and on integers. Perhaps a candidate for special code? -- Konstantin Metlov 2005-10-16

• I have implemented special code for f//. and also f//.@(g/) for certain rank-0 verbs f and g . -- RogerHui 2005-10-20 16:02:31

## gerund with rank

One thing I'm constantly running into is a need to apply gerunds with rank (typically, to apply different verbs to different items of an array). In the withdrawn q: request on the old requests page, I've used (<0 1)"_ |: [: gerunds`:0 to approximate this effect. I wish there were a better way to do this. -- Raul Miller 2005-10-17 14:23:03

• Use 4 : 'x.`:0 y.'" r ; see example below. -- RogerHui 2005-11-11 17:15:12

```   >:`*: (4 : 'x.`:0 y.')"_1 i.2 3
1  2  3
9 16 25```

## #: on big integers

Antibase 2 (or 'binary representation') #: can be made more efficient on (very) extended integers using an intermediate base, e.g.

```   br=: [: (#:@{. , ,@((13#2)&#:@}.)) 8192&#.^:_1
(#: -: br) 10^1000x
1
ts=: 6!:2 , 7!:2@]
ts '#: 10^1000x'
0.159194 9.4263e6
ts 'br 10^1000x'
0.04985 735616```

The speed-up & space reduction might be worthwhile, on #: and other verbs, if this idea were implemented at the nuts & bolts level. -- EwartShaw 2005-10-22 11:52:25

• The top priority for extended precision numbers is a faster multiply; all other efficiency considerations pale in comparison. Perhaps this particular optimization

can be revisited after a faster multiply is implemented. -- RogerHui 2005-11-11 17:25:41

## undocumented foreigns

Please document all the foreigns. The following is a list of foreigns used by the scripts shipped with J (or in addons) which are not documented under '~system/extras/help/dictionary/xmain.htm'. I ignore the GL family (x = 11). -- DanBron 2005-11-10 21:50:38

• All foreigns available to general users are documented. Do not use undocumented foreigns. -- RogerHui 2005-11-11 15:27:18

## dictionary orphan pages

At the moment, '~system/extras/help/dictionary/dtdotu.htm' (t. with a verb argument) is only accessible by traversing ">>" from '~system/extras/help/dictionary/dtdotm.htm' (t. with a noun argument), "<<" from '~system/extras/help/dictionary/dtco.htm' (t:) and some links in the Ndx. This essentially results in a "hidden page" in the DoJ. Please add a link to it like you do for the multiple forms of other operators. Similiarly for other such pages.

-- DanBron 2005-11-10 21:50:38

• This had previously been done for u t. for J 6.01. I know of no "other such pages". -- RogerHui 2005-11-10 22:31:48

## quaternions

Because of their usefulness, J should support quaternions much in the fashion it supports complex numbers. Perhaps using i,j,k in the constant sub-language. +. would give a four-vector result. *. could be a nonce error or could give euler angles. -- Raul Miller 2005-11-12 16:42:28

• A good first step in any such support would be a script of the models in J of the required computations. (Not that I am promising anything re future support.)

-- RogerHui 2005-11-12 16:49:00

• I've placed a preliminary model at System/Requests/Quaternions -- Raul Miller 2005-11-13 19:50:16

System/Interpreter/Requests05 (last edited 2008-12-08 10:45:30 by anonymous)