• 'append', 'first', 'last', 'rest', 'slice' (and implicit slicing) now also available for arrays
• bug fixes
For files and changes notes see here:
http://newlisp.org/downloads/development/
This development release is feature complete for release version 9.0 due in October:
http://newlisp.org/index.cgi?page=Preview_90
Lutz
Quote
20% speed up for append on strings and join
Sounds very good.
I wonder that such old, basic commands still have potential for optimization.
As always very wellcomed!!
There seems something broken in 8.9.10!
It is definatly broken between 8.9.9 and 8.9.10 since my test with my contest-app works in 8.9.9 and no more in 8.9.10.
Since I delete my 8.9.9 distribution file I rolled back to 8.900 major release and tried to track it down to a smaller sample.
My testfile Test8910.lsp:
(define-macro (defun _func-name _arguments)
(set _func-name (append
'(lambda )
(list _arguments)
(args))))
(defun CADT:WOINT_ML ( artnr return)
(cond
((=(slice artnr 0 2) "O0")
(setq return "(setq slspc (string "woint/o/def/"))(ls "O0XXX" nil)")
)
)
return
)
; Testcall
;(CADT:WOINT_ML "O0002")
Test on both versions:
newLISP v.8.9.0 on Win32 MinGW.
> (CADT:WOINT_ML "O0002")
"(setq slspc (string "woint/o/def/"))(ls "O0XXX" nil)"
>
newLISP v.8.9.10 on Win32 MinGW.
> (CADT:WOINT_ML "O0002")
list or number expected : "O0002"
Using the editor and examine the loaded source show differences in namspace CADT
;newLISP 8900 (loaded Test8910.lsp) namespace MAIN
(define-macro (defun _func-name _arguments)
(set _func-name (append '(lambda ) (list _arguments) (args))))
;newLSIP 8910 (loaded Test8910.lsp) namespace MAIN
(define-macro (defun _func-name _arguments)
(set _func-name (append '(lambda ) (list _arguments) (args))))
;newLISP 8900 (loaded Test8910.lsp) namespace CADT
(define (WOINT_ML MAIN:artnr MAIN:return)
(cond
((= (slice MAIN:artnr 0 2) "O0") (setq MAIN:return "(setq slspc (string "woint/o/def/"))(ls "O0XXX" nil)")))
MAIN:return)
;newLSIP 8910 (loaded Test8910.lsp) namespace CADT
(Set 'WOINT_ML '(
(MAIN:artnr MAIN:return)
(cond
((= (slice MAIN:artnr 0 2) "O0") (setq MAIN:return "(setq slspc (string "woint/o/def/"))(ls "O0XXX" nil)")))
MAIN:return))
What wrong here?
(in TK and DLL version)
A lambda list looses its lambda attributes when appending to it in 8.9.10. This bug was introduced when speeding up 'append' in 8.9.9:
; v.8.9.9
> (append '(lambda) '((x) (+ x x)))
(lambda (x) (+ x x))
; v 8.9.10
> (append '(lambda) '((x) (+ x x)))
((x) (+ x x))
This is fixed in 8.9.11 available here: http://newlisp.org/downloads/development/
binaries for Win32 and Mac OS X will not be available until later this week.
Lutz
Hi Lutz,
In your file 'qa-net' I see you execute the command 'killall' for Unix platforms. However, 'killall' in Tru64Unix means something else:
Quote
killall(8) killall(8)
NAME
killall - Terminates all processes started by the user, except the calling
process
SYNOPSIS
/usr/sbin/killall [- | [-]signal_name | -signal_number]
/usr/sbin/killall -l
DESCRIPTION
This command provides a convenient means of killing all processes created
by the shell that you control. When started by the superuser, the killall
command kills all processes that can be terminated, except those processes
that started it, the kernel processes, and processes 0 and 1(init).
As you can see, not a very wise thing to do. I made that mistake once as user 'root', and had to walk to the machine to physically power it off and on again. :-)
There is no equivalent for the Linux 'killall' in Tru64Unix, where you can specify the processname. Maybe it's best to do a 'ps -ef|grep newlisp' and kill the corresponding PID's individually.
Peter
Thanks for telling me before I try this on some remote Solaris machines ;).
I wonder if this would work on Tru64
(dolist (pid (map int (exec "ps | grep newlisp")))
(exec (string "kill " pid)))
Lutz
Thanks for the quick fix in 8.9.11!
So it was time to try compiling MinGW again. ;-)
After successfull compiling DLL and EXE the test run fine again.
;-)
You trick:
(dolist (pid (map int (exec "ps | grep newlisp")))
(exec (string "kill " pid)))
...does not work always, as sometimes the PID of the newlisp process executing this command may be killed first (I have some other newLisp process open in another terminal):
Quote
$ ./newlisp
newLISP v.8.9.11 on Tru64Unix, execute 'newlisp -h' for more info.
> (dolist (pid (map int (exec "ps | grep newlisp"))) (exec (string "kill " pid)))
Terminated
The newLisp process in the other terminal still runs...
Also maybe we need a 'kill -9' in order to force a kill in case of a hanging newLisp proces??
Peter
U must run "ps|grep newlisp|grep -v grep"
This is the FAQ ;-)
heee pjot I thought that you where bussy ;-) How is it possibly to integrate and integratie.. I mean integrate big machines and integratie newlisp in one and the same time frame ;-)...heheh... good luck in Paris... Greetings From Munchen.
Lutz,
For 8.9.11 on Debian "etch" I got many of
nl-string.c: In function 'p_char':
nl-string.c:203: warning: dereferencing type-punned pointer will break strict-aliasing rules
nl-string.c:207: warning: dereferencing type-punned pointer will break strict-aliasing rules
messages. I don't know their's meaning and, possible this is a result of yesterday gcc update.
Now I have gcc version 4.1.2 20060901 (prerelease) (Debian 4.1.1-13)
(Unfortunatenly, I don't remember the number of the old one)
gcc version 3.3.5 (Debian 1:3.3.5-13) under "sarge" compiles cleanly.
Nevertheless newlisp on both systems comliles and runs successfully, so, just FYI.
I've been getting that too, with the last few releases.
$ gcc --version
gcc (GCC) 4.1.1
The newLISP CELL structure is 64-bit aligned for the ->aux member, so this warning can be discarded.
I would like to include the correct -Wno-xxxx option in the makefiles to suppress this warning, but any GCC compiler before version 4.1.1 then will complain about a 'wrong' command line option :(
Anybody else with a suggestion to suppress this warning?
Lutz
Try this in makefile_linux:
CFLAGS = -Wall -pedantic -Wno-uninitialized -Wno-strict-aliasing -Wno-long-long -c -O2 -g -DLINUX
This option is also available on GCC v. 4.0
Lutz
ps: and seems to be available on 3.5.5 too, it will be added to the Linux makefiles
Quote
U must run "ps|grep newlisp|grep -v grep"
This is the FAQ ;-)
DMI, you are right, this works fine, of course :-)
Thanx
Peter