Page 1 of 1

development release version 9.0.7

Posted: Wed Dec 06, 2006 11:58 pm
by Lutz
- fixes a problem with 'nth' in 9.0.6 and a crash of the HTTP server mode on Linux

for files and change notes see here: http://newlisp.org/downloads/

Lutz

ps: the previous 9.0.6 was posted earlier today but retracted shortly after

Posted: Fri Dec 08, 2006 5:12 pm
by cormullion
I don't know anything about matrices, so this might be a stupid thing to try:

Code: Select all

newLISP v.9.0.7 on OSX UTF-8, execute 'newlisp -h' for more info.

> (set 'mat1 '((0 1 0) (1 0 1) (0 0 0)))
((0 1 0) (1 0 1) (0 0 0))
> 
> (invert mat1)
Segmentation fault

>
but it probably shouldn't do that...!

Posted: Fri Dec 08, 2006 5:45 pm
by Lutz
This bug was introduced in 9.0.2, it should return 'nil' on non-invertible matrices. This will be corrected in 9.0.8.

Lutz

Posted: Sun Dec 10, 2006 9:30 pm
by newdep
Hello Lutz,

Is the new set-nth / nth-set also in 9.0.7 officialy?

because im getting a "Segmenation fault" when the <aref> is a very big list
of indexes like ->

(set-nth ( '( a c b d ) '( ...arround 2000... )) "@")

Ofcause the above is not realistic but somewhere in the line of 2000 it pops out..


Norman.


PS:

'nth' now with similar syntax options as 'net-set/set-nth'
new in 'nth':
(nth (L <idx1> <idx2> ...))
(nth (L <aref>)) ; where <aref> is a list of indices
new in 'set=nth', 'nth-set'
(set-nth (L <aref>) <newval>)
(nth-set (L <aref>) <newval>)


That mean that (set-nth ( '(a b c d) '( 0 1 2 )) "@") should return -> ("@" "@" "@" d)

because thats not working...?

Posted: Sun Dec 10, 2006 10:52 pm
by Lutz
(set-nth ( '( a c b d ) '( ...arround 2000... )) "@")
The maximum is 16 and the new nth-set/set-nth wasn't checking that maximum correctly. This is fixed in 9.0.8 and does not occur in release 9.0.

Note that these are not 16 different positions, but nesting levels. So your example:
That mean that (set-nth ( '(a b c d) '( 0 1 2 )) "@") should return -> ("@" "@" "@" d)
should not return ("@" "@" "@" d) but:

Code: Select all

(set-nth ( '(a b c d) '( 0 1 2 )) "@") 
=> ("@" b c d)
only the index 0 is used because 'a' is not a list and the additional indices of 1 and 2 do not apply. Consider this:

Code: Select all

(set-nth ( '((a (x y z)) b c d) '( 0 1 2 )) "@")
=> ((a (x y "@")) b c d)
each index in the list is for an additional nesting level of the list.

Lutz

Posted: Sun Dec 10, 2006 11:20 pm
by newdep
thanks lutz..for clearing that up...

i was confused by (nth (L <aref>)) ; where <aref> is a list of indices... but its clear now...

Norman.

Posted: Sun Dec 10, 2006 11:55 pm
by Lutz
i was confused by (nth (L <aref>)) ; where <aref> is a list of indices... but its clear now...
in both cases: (nth (L <aref>)) and (set-nth (L <aref>) <val>) the meaning of the index list <aref> is the same. In both cases you index into a nested list.

Lutz