Nonce error might be a good idea.

The right fix might be for f. and 5!:5 not to create the m : 0 form, but instead m : (string expression).

This problem arises because a name containing $: gets replaced by an explicit definition when it is fixed.

This needs some thought.

Henry Rich

On 5/14/2020 8:53 PM, Raul Miller wrote:
It sounds like you are saying that the current implementation of f. is
where the problem is.

Conceptually, there will be intermediate results somewhere which are
malformed. And I guess that identifying those are what makes this
difficult.

It has bothered me for years that the 5!:5 representation of
multi-line explicit definitions is not suitable for use by ".
expressions, and also cannot be nested inside other explicit
definitions -- I keep wanting a 5!:something that instead gives a
boxed representation for those explicit definitions.

Maybe, for now, just throw a nonce error instead of trying to nest
multi-line explicit definitions? If this is what I think it is, the
proper solution for this issue would need -- let's call it 5!:7 -- a
linear representation which is very much like 5!:5 except that
5!:7<'s' would produce something like '4 :(''0'';''0'')' instead of
52 32 58 32 48 10 48 10 48 10 41{a. (which gives the 5!:5 result).

Thanks,


--
Raul

On Thu, May 14, 2020 at 5:57 PM Henry Rich <[email protected]> wrote:
This may be hard to fix.  I have added it to the crash list. The problem
boils down to:

Setup:
     s =: 4 : 0
0
0
)
i =: 0&$: : s

Now:
     i&> f.
3 : 0 :(4 : 0)&>
x 0&$: :(4 : 0)
0
0
) y
)
0&$: :(4 : 0)
0
0
) y
)

This is a malformed result and will hang waiting for input if you
execute it.

You got there because you executed

((setdiag_mt_~ ;&_1)~ idmat_mt_@#)&>/@}:

on a scalar (which was given in a catch.), which executed u/ on an empty
list, which looked for a neutral of u, which tried to execute
(((setdiag_mt_~ ;&_1)~ idmat_mt_@#)&> f.)
which failed as shown above.

Henry Rich



On 5/13/2020 4:01 AM, Igor Zhuravlov wrote:
Problem script is pasted below, it's a minimal version I was able to achieve.

The session log from the clean install is:

# start of session log
user2@host2:~/j901> ./jconsole.sh
     load 'pacman'
     'update' jpkg ''
Updating server catalog...
Local JAL information was last updated: 13 May 2020 17:26:38
Installed addons are up to date, 115 addons are not yet installed.
The base library is up to date.
     'install' jpkg 'math/mt math/lapack2'
Installing 5 packages
Downloading general/misc...
Installing general/misc...
Downloading math/lapack2...
Installing math/lapack2...
Downloading math/misc...
Installing math/misc...
Downloading math/mt...
Installing math/mt...
Done.
Installed addons are up to date, 111 addons are not yet installed.
The base library is up to date.
     JVERSION
Engine: j901/j64/linux
Release-e: commercial/2020-01-29T10:38:14
Library: 9.01.23
Platform: Linux 64
Installer: J901 install
InstallPath: /home/user2/j901
Contact: www.jsoftware.com
     9!:14 ''
j901/j64/linux/release-e/commercial/www.jsoftware.com/2020-01-29T10:38:14
     load '~user/temp/hang.ijs'
     testptsvE_mt_ (j./ 2 5 5 ?@$ 0) ; (j./ 2 5 3 ?@$ 0)
0
1
# hangs here, process was killed manually
# end of session log

NB. === start of script ~user/temp/hang.ijs ===
load 'math/mt'
load 'math/lapack2'

coclass 'mt'

tmonad2=: 2 : 0
'`vgety vgeto vrcond vferr vberr'=. n
try. argy=. vgety y catch. argy=. _. end.
try. 't s'=. timespacex 'ret=. ' , m , ' argy' catch. t=. s=. ret=. _. end.
try. out=. vgeto ret catch. out=. _. end.
try. rcond=. y vrcond out catch. rcond=. _ end.
try. ferr=. y vferr out catch. ferr=. _. end.
try. berr=. y vberr out catch. berr=. _. end.
EMPTY
)

dptsv=: 3 : 0
echo '0'
'd e'=. y
echo '1'
assert. isreal_jlapack2_ d NB. hangs here
echo '2'
d ; e
)

testptsvE=: 3 : 0
vvv=: ((setdiag_mt_~ ;&_1)~ idmat_mt_@#)&>/@}:
('dptsv' tmonad2 (((diag ; _1&diag)@(0&{::))`]`0:`_1:`(1: vvv))) y
EMPTY
)
NB. === end of script ===

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

--
This email has been checked for viruses by AVG.
https://www.avg.com

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

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

Reply via email to