development release version 9.0.7

Started by Lutz, December 06, 2006, 03:58:14 PM

Previous topic - Next topic

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/">http://newlisp.org/downloads/



Lutz



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

cormullion

#1
I don't know anything about matrices, so this might be a stupid thing to try:


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...!

Lutz

#2
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

newdep

#3
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...?
-- (define? (Cornflakes))

Lutz

#4
Quote(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:


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


should not return ("@" "@" "@" d) but:


(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:


(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

newdep

#5
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.
-- (define? (Cornflakes))

Lutz

#6
Quotei 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