Joey K Tuttle (Mon May 28 00:52:42 HKT 2007) wrote:
...
I agree with Raul that you have a wayward ' in your j expression.
    'a b c' =. 2!:2 '/usr/bin/perl -n -e  "print" '
    a
2556
etc etc...
1)
The problem isn't the wayward quote - running the expression above also
causes j to vanish.
When this happens the system produces messages and a memory dump.
Depending whether I am running jconsole of jw, the message starts:
*** glibc detected *** jconsole" double free or corruption (!prev): <an address>
*** glibc detected *** java" double free or corruption (!prev): <an address>
etc..
(I am running Ubuntu 7.04 64bit)


2)
Re Joey's:
   'Where does this go?' 1!:2 b
   1!:1 c
|limit error
|       1!:1 c

Would using the expression 1!:11 c have made any difference?

3)
Yes - the motive would be to use pipes to connect to unix processes...
but I take care before assuming that there is always a performance gain:
For example setting hostexpr =: 'cat filename | tr -d "\n\r" '
and comparing
time 'data =: (2!:0) hostexpr'
time 'data =: CRLF -.~ (1!:1) <filename'
I learnt that, for a 190Meg file, j is nearly 3x faster than the host.

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

Reply via email to