development release version 8.9.10

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

development release version 8.9.10

Post by Lutz »

• '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

HPW
Posts: 1390
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany
Contact:

Post by HPW »

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!!
Hans-Peter

HPW
Posts: 1390
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany
Contact:

Post by HPW »

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:

Code: Select all

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

Code: Select all

newLISP v.8.9.0 on Win32 MinGW.

> (CADT:WOINT_ML "O0002")
"(setq slspc (string \"woint/o/def/\"))(ls \"O0XXX\" nil)"
> 

Code: Select all

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

Code: Select all

;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)
Hans-Peter

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

Post by Lutz »

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:

Code: Select all

; 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

pjot
Posts: 733
Joined: Thu Feb 26, 2004 10:19 pm
Location: The Hague, The Netherlands
Contact:

Post by pjot »

Hi Lutz,

In your file 'qa-net' I see you execute the command 'killall' for Unix platforms. However, 'killall' in Tru64Unix means something else:
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

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

Post by Lutz »

Thanks for telling me before I try this on some remote Solaris machines ;).

I wonder if this would work on Tru64

Code: Select all

 (dolist (pid (map int (exec "ps | grep newlisp")))
    (exec (string "kill " pid)))
Lutz

HPW
Posts: 1390
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany
Contact:

Post by HPW »

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.
;-)
Hans-Peter

pjot
Posts: 733
Joined: Thu Feb 26, 2004 10:19 pm
Location: The Hague, The Netherlands
Contact:

Post by pjot »

You trick:

Code: Select all

 (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):
$ ./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

Dmi
Posts: 408
Joined: Sat Jun 04, 2005 4:16 pm
Location: Russia
Contact:

Post by Dmi »

U must run "ps|grep newlisp|grep -v grep"
This is the FAQ ;-)
WBR, Dmi

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

Post by newdep »

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

Dmi
Posts: 408
Joined: Sat Jun 04, 2005 4:16 pm
Location: Russia
Contact:

Post by Dmi »

Lutz,

For 8.9.11 on Debian "etch" I got many of

Code: Select all

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.
WBR, Dmi

tom
Posts: 168
Joined: Wed Jul 14, 2004 10:32 pm

Post by tom »

I've been getting that too, with the last few releases.

$ gcc --version
gcc (GCC) 4.1.1

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

Post by Lutz »

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

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

Post by Lutz »

Try this in makefile_linux:

Code: Select all

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

pjot
Posts: 733
Joined: Thu Feb 26, 2004 10:19 pm
Location: The Hague, The Netherlands
Contact:

Post by pjot »

U must run "ps|grep newlisp|grep -v grep"
This is the FAQ ;-)
DMI, you are right, this works fine, of course :-)

Thanx
Peter

Locked