development release version 9.0.7

Notices and updates
Locked
Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

development release version 9.0.7

Post 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

cormullion
Posts: 2038
Joined: Tue Nov 29, 2005 8:28 pm
Location: latiitude 50N longitude 3W
Contact:

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

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post 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

newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

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

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post 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

newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

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

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post 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

Locked