There is considerable improvement in j601 on this issue, but I'm still
surprised at the seemingly small limit. Here are some tests -
---------------- clipped from Darwin session ------------------
iMg5:~/Desktop/test jkt$ cat mkfiles # #! script to create ARGV files
#! /usr/local/bin/ja
localverbs =: 3 : 'may be defined here'
3 : 0 ARGV
try. NB. catch errors.
'call parms stin' =: getargs 'no fancy parms...' NB. parms e.g.
-a10 <-> (,'a');'10'
if. ((0 = #stin) *. 3 > # call) do.
stderr 'Usage: ',(;1{call), ' argument list',NL
exit 2
else.
NB. Do the work here
fwrite"1 ~ ": 1000 + ,. i. ". >2{y.
stdout NL,~ version ''
end.
catch.
stderr 13!:12 '' NB. at the very least...
end.
exit 0
)
iMg5:~/Desktop/test jkt$ cat atest # #! script to simply show
count/size of ARGV
#! /usr/local/bin/ja
localverbs =: 3 : 'may be defined here'
3 : 0 ARGV
try. NB. catch errors.
'call parms stin' =: getargs 'no fancy parms...' NB. parms e.g.
-a10 <-> (,'a');'10'
if. ((0 = #stin) *. 3 > # call) do.
stderr 'Usage: ',(;1{call), ' argument list',NL
exit 2
else.
NB. Do the work here
stdout NL,~ ": (# y.), 7 !: 5<'y.'
end.
catch.
stderr 13!:12 '' NB. at the very least...
end.
exit 0
)
iMg5:~/Desktop/test jkt$ ./mkfiles 5
j601/beta/2006-05-20/22:30
Running in: Darwin
iMg5:~/Desktop/test jkt$ ls -l
total 56
-rw-r--r-- 1 jkt jkt 4 May 30 22:41 1000
-rw-r--r-- 1 jkt jkt 4 May 30 22:41 1001
-rw-r--r-- 1 jkt jkt 4 May 30 22:41 1002
-rw-r--r-- 1 jkt jkt 4 May 30 22:41 1003
-rw-r--r-- 1 jkt jkt 4 May 30 22:41 1004
-rwxr-xr-x 1 jkt jkt 441 Apr 23 12:27 atest
-rwxr-xr-x 1 jkt jkt 470 May 30 22:36 mkfiles
iMg5:~/Desktop/test jkt$ ./mkfiles 407
j601/beta/2006-05-20/22:30
Running in: Darwin
iMg5:~/Desktop/test jkt$ ./atest
Usage: ./atest argument list
iMg5:~/Desktop/test jkt$ ./atest 1*
409 28224
iMg5:~/Desktop/test jkt$ ./mkfiles 408
j601/beta/2006-05-20/22:30
Running in: Darwin
iMg5:~/Desktop/test jkt$ ./atest 1*
Segmentation fault
iMg5:~/Desktop/test jkt$
-------------------- End of Darwin clip -------------------
Sorry about all the "extra clutter" in the scripts, but they
are the templates that I use to create such things and someone
reading this may find them interesting or have questions about
them. One question I have is that I expected the use of y. in
the definitions to fail in j601/beta/2006-05-20/22:30 - but they
seem to work OK at least in Darwin.
The limitation of 407 (4 character named) files is about 4 times
what it used to be - here is a test in the most up to date Linux
system I currently have on my own machines -
[EMAIL PROTECTED] test]$ ./mkfiles 138
j504/2005-03-16/15:30
Running in: Linux
[EMAIL PROTECTED] test]$ ./atest 1*
140 9984
[EMAIL PROTECTED] test]$ ./mkfiles 139
j504/2005-03-16/15:30
Running in: Linux
[EMAIL PROTECTED] test]$ ./atest 1*
Segmentation fault
[EMAIL PROTECTED] test]$
So the limit used to be something less than 10 Kbytes of argument -
but seems only to have increased to some 28 Kbytes in j601n. This
doesn't seem like as much "headroom" as I would expect...
- joey
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm