Maintenance Release newLISP v.10.1.1

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

Maintenance Release newLISP v.10.1.1

Post by Lutz »

• This stable maintenance release has minor feature enhancements and bug fixes

Release notes: http://www.newlisp.org/downloads/newLIS ... lease.html
Downloads: http://www.newlisp.org/index.cgi?page=Downloads

Ps: the release notes contain 10.1.1 tags for the new and fixed stuff

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

Post by newdep »

Thats actualy quite an addon this 10.1.1 release, nice enhancements..thanks..

Also the manual in the new format it looks very good..
.. nice character-set and clean layout.. smooth!
-- (define? (Cornflakes))

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

NAN and/or INF

Post by newdep »

consistent it is ;-)

> (sqrt -1)
nan
> (sqrt (div -1 0))
inf



> (inf? (sqrt -1))
nan
> (inf? (div -1 0))
true
>
-- (define? (Cornflakes))

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

Post by newdep »

PS: Actualy

> (inf? (sqrt -1))
nan

should be nil ! and not nan..As "Infinite" isn't equal to "Not A Number"
-- (define? (Cornflakes))

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

Post by Lutz »

Its seems to happen only on Windows, but is fine on MAC OSX, FreeBSD and Linux returning 'nil', on Windows all operations on NaN return NaN ... will investigate.

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

Post by newdep »

Aaa yes your right.. I was indeed working on Windows with this one..

But then Its probably OS dependent and not easy to change because the
OS itself in some cases returns NaN instead of Inf...
-- (define? (Cornflakes))

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

Post by Lutz »

But this will be fixed in the next version.

There is currently an old catch-all #ifdef WIN_32 for all operations on NaN values, which can now be eliminated. It was necessary for older compilers on Windows.

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

Post by cormullion »

Talking of NaN, when I went round the supermarket yesterday I noticed that a few of the printed labels showed £Nan.p for the price per 100gm value. I like the way the error worked all the way through to the label printer OK...

Lutz: that new find option looks cool!

Also, on the documentation page of newlisp.org, could you consider slowly migrating some of the entries under Tutorials to point to the docuwiki version, since I probably won't be updating the older versions now, and they're already showing their age... :)

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

Post by newdep »

Now I keep seeing NaN's everywhere..
I just ordered 2 Garlic NaN's at the Indian Takeaway ;-)
-- (define? (Cornflakes))

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

Post by pjot »

The Makefile for 64bit Linux 'makefile_linuxLP64' seems to have a problem... below an changed version so it works with my 64bit Ubuntu 9.04 Linux.
# makefile for newLISP 64bit v.10.x.x on 64 bit LINUX tested on Intel Core Duo 2
#
# Note, that readline support may require different libraries on different OSs
#

OBJS = newlisp.o nl-symbol.o nl-math.o nl-list.o nl-liststr.o nl-string.o nl-filesys.o \
nl-sock.o nl-import.o nl-xml.o nl-web.o nl-matrix.o nl-debug.o pcre.o

CFLAGS = -m64 -Wall -pedantic -Wno-uninitialized -Wno-strict-aliasing -Wno-long-long -c -O2 -g -DNEWLISP64 -DLINUX

CC = gcc

default: $(OBJS)
# $(CC) $(OBJS) -m32 -g -lm -ldl -lreadline -o newlisp # for UBUNTU Debian
# $(CC) $(OBJS) -m32 -g -lm -ldl -lreadline -ltermcap -o newlisp # slackware
# $(CC) $(OBJS) -m32 -g -lm -ldl -lreadline -lncurses -o newlisp # other Linux Dist
$(CC) $(OBJS) -g -o newlisp -ldl -lm
strip newlisp

.c.o:
$(CC) $(CFLAGS) $<

$(OBJS): primes.h protos.h makefile_linuxLP64
For the other targets you can see a problem as the Makfeile is using both -m32 and -m64. In that situation, linking never succeeds.

Peter

TedWalther
Posts: 608
Joined: Mon Feb 05, 2007 1:04 am
Location: Abbotsford, BC
Contact:

Post by TedWalther »

Thanks for the bug report. I'm looking at incorporating automatic flag setting in the alternative configure file.

Can you post a diff, so I can see which lines you changed?

The following command should work:

Code: Select all

diff oldfile newfile > file.patch

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

Post by pjot »

The only thing you have to do is removing all '-m32' entries.

Peter

TedWalther
Posts: 608
Joined: Mon Feb 05, 2007 1:04 am
Location: Abbotsford, BC
Contact:

Post by TedWalther »

Ok. Can you try using configure-alt, and then type make?

Let me know if the alternative configure script generates a correct Makefile for you.

Ted

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

Post by newdep »

newlisp 10.1.1 compiles in the gcc 335 evironment with readline support on OS2
The 'spawn part doesnt work deu to use of mmap inside newlisp which isnt
still not supported in the OS2 port of gcc.


configure and configure-alt return errors.

makefile_os2 contains no tabs

primes.c needs this adjustement but its in the way of win32.

#ifndef OS2
{"spawn", p_spawn, 0},
{"sync", p_sync, 0},
{"abort", p_abort, 0},
{"send", p_send, 0},
{"receive", p_receive, 0},
{"share", p_share, 0},
#endif

Ill check gcc440 and publish on my page the precompiled version.
-- (define? (Cornflakes))

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

Post by pjot »

Can you try using configure-alt, and then type make?
This 'configure-alt' works fine.
peter@solarstriker:~/installation/newlisp-10.1.1$ ./configure-alt

Detected Operating System LINUX
Detected memory model LP64, using memory model LP64
UTF-8 is enabled
readline support is disabled

To enable readline support, use the --enable-readline option, and specify the
proper libraries to link by setting the RLFLAGS variable when running
configure. Also if necessary, use the INCLUDES variable to specify where the
readline header files are."


Type "make" to build your newlisp binary.

If that doesn't work, type "make help"
peter@solarstriker:~/installation/newlisp-10.1.1$ vim Makefile
peter@solarstriker:~/installation/newlisp-10.1.1$ make
make -f makefile_configure
make[1]: Entering directory `/home/peter/installation/newlisp-10.1.1'
gcc -m64 -Wall -pedantic -Wno-long-long -Wno-strict-aliasing -O2 -c -DNEWCONFIG newlisp.c
gcc -m64 -Wall -pedantic -Wno-long-long -Wno-strict-aliasing -O2 -c -DNEWCONFIG nl-symbol.c
gcc -m64 -Wall -pedantic -Wno-long-long -Wno-strict-aliasing -O2 -c -DNEWCONFIG nl-math.c
gcc -m64 -Wall -pedantic -Wno-long-long -Wno-strict-aliasing -O2 -c -DNEWCONFIG nl-list.c
gcc -m64 -Wall -pedantic -Wno-long-long -Wno-strict-aliasing -O2 -c -DNEWCONFIG nl-liststr.c
gcc -m64 -Wall -pedantic -Wno-long-long -Wno-strict-aliasing -O2 -c -DNEWCONFIG nl-string.c
gcc -m64 -Wall -pedantic -Wno-long-long -Wno-strict-aliasing -O2 -c -DNEWCONFIG nl-filesys.c
gcc -m64 -Wall -pedantic -Wno-long-long -Wno-strict-aliasing -O2 -c -DNEWCONFIG nl-sock.c
gcc -m64 -Wall -pedantic -Wno-long-long -Wno-strict-aliasing -O2 -c -DNEWCONFIG nl-import.c
gcc -m64 -Wall -pedantic -Wno-long-long -Wno-strict-aliasing -O2 -c -DNEWCONFIG nl-xml.c
gcc -m64 -Wall -pedantic -Wno-long-long -Wno-strict-aliasing -O2 -c -DNEWCONFIG nl-web.c
gcc -m64 -Wall -pedantic -Wno-long-long -Wno-strict-aliasing -O2 -c -DNEWCONFIG nl-matrix.c
gcc -m64 -Wall -pedantic -Wno-long-long -Wno-strict-aliasing -O2 -c -DNEWCONFIG nl-debug.c
gcc -m64 -Wall -pedantic -Wno-long-long -Wno-strict-aliasing -O2 -c -DNEWCONFIG pcre.c
gcc -m64 -Wall -pedantic -Wno-long-long -Wno-strict-aliasing -O2 -c -DNEWCONFIG nl-utf8.c
gcc newlisp.o nl-symbol.o nl-math.o nl-list.o nl-liststr.o nl-string.o nl-filesys.o nl-sock.o nl-import.o nl-xml.o nl-web.o nl-matrix.o nl-debug.o pcre.o nl-utf8.o -m64 -lm -ldl -o newlisp
strip newlisp
make[1]: Leaving directory `/home/peter/installation/newlisp-10.1.1'
Thanks,
Peter

TedWalther
Posts: 608
Joined: Mon Feb 05, 2007 1:04 am
Location: Abbotsford, BC
Contact:

Post by TedWalther »

I see in your log you ran vim before running the makefile. Did you have to change anything?

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

Post by pjot »

No, just checking how the generated Makefile looks like. It is an old habit of me to use 'vim' for every tiny task. My bad.

Peter

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

Post by HPW »

After testing a while the latest 10.1.1 I ran into problem with (source ...) or (print ...)

Code: Select all

	(device(open CallBackFilename "a"))
	(println)
	(setq MbiVarStr(source 'CADT_WOINT_BG 'CADT_WOINT_HG 'CADT_WOINT_TG 'CADT_WOINT_NIS_DAT 'CADT_WOINT_SCI_DAT 'CADT_WOINT_WPL_DAT 'CADT_WOINT_WPR_DAT 'CADT_WOINT_BLV_DAT 'CADT_WOINT_BLL_DAT 'CADT_WOINT_BLR_DAT 'CADT_WOINT_BLH_DAT 'CADT_WOINT_FRO_DAT 'CADT_WOINT_ZUB_DAT 'CADT_WOINT_WUF_DAT 'CADT_WOINT_NL_VAR 'CADT_WOINT_NB_VAR 'CADT_WOINT_NB_RAD 'CADT_WOINT_NB_VIS 'CADT_WOINT_NB_ENA))
	(print MbiVarStr)
	(close (device))
When reaching symbol CADT_WOINT_FRO_DAT the contained assoc-list is broken and source-string generating stopped.
So either in (source ..) or in (print ...) is a problem.
Switching back to 10.1.0 does work OK.

Any changes there?
Hans-Peter

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

Post by HPW »

And why is the size of the DLL so different?

newLISP 10.1.0 238 KB
newLISP 10.1.1 254 KB

??
Hans-Peter

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

Post by Lutz »

None of the routines involved, including internal helpers, have changed for 'source' and 'print' between 10.1.0 and 10.1.1.

My MinGW MSYS and GCC version have been updated from 10.1.0 to 10.1.1 which probably is responsible for the size of the DLLs and may be responsible for the problem you have with 'source' or 'print'.

I made Win32 installer of 10.1.1 with the old environment and have send you a private message with the address, where you can pick it up.

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

Post by HPW »

I will try it out.
Thanks.

Hans-Peter
Hans-Peter

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

Post by HPW »

This time I test with the EXE.
My code to reproduce the problem:

Code: Select all

(set 'CADT_WOINT_BG "200000")

(set 'CADT_WOINT_HG "250000")

(set 'CADT_WOINT_TG "7800")

(set 'CADT_WOINT_NIS_DAT '(
  (("Artnr" "O0005") ("RaumAr" "INNIS") ("ErfArt" "CADAS") ("HoeheL" "250000") ("HoeheM" 
    "250000") 
   ("HoeheR" "250000") 
   ("HoeheF" "250000") 
   ("BreitU" "200000") 
   ("BreitM" "200000") 
   ("BreitO" "200000") 
   ("BreitF" "200000") 
   ("Tiefe" "7800") 
   ("AufscL" "0") 
   ("AufscR" "0") 
   ("OffsetX" "0"))))

(set 'CADT_WOINT_SCI_DAT '(
  (("Artnr" "O9402") ("Breite" "200000") ("AnzTu" "2TUER") ("AnzES" "4ESTO") ("AnzMS" 
    "OHNE") 
   ("AnscLi" "WAND") 
   ("AnscRe" "WAND") 
   ("OffsetX" "0") 
   ("OffsetZ" "0") 
   ("UPOS_LISP" "((setq CADT_WOINT_WANDZOFF \"2500\"))"))))

(set 'CADT_WOINT_WPL_DAT '(
  (("Artnr" "O9550") ("FueFvo" "M01") ("FueFhi" "M01") ("Varian" "L") ("Hoehe" "246000") 
   ("OffsetX" "0") 
   ("OffsetY" "-4050") 
   ("OffsetZ" "0") 
   ("UPOS_LISP" "((setq CADT_WOINT_EINBAU \"LAUFV\"))"))))

(set 'CADT_WOINT_WPR_DAT '(
  (("Artnr" "O9550") ("FueFvo" "M01") ("FueFhi" "M01") ("Varian" "R") ("Hoehe" "246000") 
   ("OffsetX" "200000") 
   ("OffsetY" "-250") 
   ("OffsetZ" "0") 
   ("UPOS_LISP" "((setq CADT_WOINT_EINBAU \"LAUFH\"))"))))

(set 'CADT_WOINT_BLV_DAT nil)

(set 'CADT_WOINT_BLL_DAT nil)

(set 'CADT_WOINT_BLR_DAT nil)

(set 'CADT_WOINT_BLH_DAT nil)

(set 'CADT_WOINT_FRO_DAT '(
  (("Artnr" "O7154") ("FueFvo" "M01") ("FueFhi" "M01") ("ProArl" "GRILV") ("ProAul" 
    "DIPRV") 
   ("ProArr" "GRILV") 
   ("ProAur" "ABDEP") 
   ("Laufar" "OBENL") 
   ("Buerst" "OHNE") 
   ("StopLi" "OHNE") 
   ("StopRe" "OHNE") 
   ("FarbSt" "") 
   ("Anschl" "NACHR") 
   ("Hoehe" "244700") 
   ("Breite" "98250") 
   ("OffsetX" "3500") 
   ("OffsetY" "-4300") 
   ("OffsetZ" "1300")) 
  (("Artnr" "O7154") ("FueFvo" "M01") ("FueFhi" "M01") ("ProArl" "ABSCH") ("ProAul" 
    "ABDEP") 
   ("ProArr" "GRILV") 
   ("ProAur" "DIPRV") 
   ("Laufar" "OBENL") 
   ("Buerst" "BUERL") 
   ("StopLi" "OHNE") 
   ("StopRe" "OHNE") 
   ("FarbSt" "") 
   ("Anschl" "NACHL") 
   ("Hoehe" "244700") 
   ("Breite" "98250") 
   ("OffsetX" "98250") 
   ("OffsetY" "-500") 
   ("OffsetZ" "1300"))))

(set 'CADT_WOINT_ZUB_DAT nil)

(set 'CADT_WOINT_WUF_DAT nil)

(set 'CADT_WOINT_NL_VAR '(
  ("AnordnungAuswahl" "O22ZL") 
  ("AufschlagLi" 0) 
  ("AufschlagRe" 0) 
  ("BlendenV" "") 
  ("BlendenH" "") 
  ("BlendenHoe" "BlendenHoe56") 
  ("BlenFv" "M01") 
  ("BlenFh" "M01") 
  ("FueFvo" "M01") 
  ("FueFhi" "M01") 
  ("FuelF1" nil) 
  ("FuelF2" nil) 
  ("FuelF3" nil) 
  ("FueF1H" nil) 
  ("FueF2H" nil) 
  ("FueF3H" nil) 
  ("LaufSchiene" "LaufSchieneD2") 
  ("LaufUnten" "") 
  ("NischBreite" 2000) 
  ("NischBreiteU" 2000) 
  ("NischBreiteM" 2000) 
  ("NischBreiteO" 2000) 
  ("NischHoehe" 2500) 
  ("NischHoeheL" 2500) 
  ("NischHoeheM" 2500) 
  ("NischHoeheR" 2500) 
  ("TuerAnordnung" "AnordnungNI") 
  ("TuerAnzahl" "TuerAnzahl2") 
  ("Tuerart" "TuerartS") 
  ("Tuervar" "TuervarE") 
  ("WandansFh" "M01") 
  ("WandansFv" "M01") 
  ("WandansL" "Checked") 
  ("WandansR" "Checked")))

(set 'CADT_WOINT_NB_VAR '(
  ("Anordnung" "O22ZL") 
  ("AufschlagLi" "0") 
  ("AufschlagRe" "0") 
  ("BlendenH" "") 
  ("BlendenHoeObj" "") 
  ("BlendenV" "") 
  ("FRO_Breite" "982.5") 
  ("FRO_Hoehe" "2447.0") 
  ("FrontArtnr" "O7154") 
  ("GesamtBreite" "2000.0") 
  ("LaufSchieneObj" "LaufSchieneD2") 
  ("LaufUntenObj" "") 
  ("LaufUntenPicFile" "") 
  ("NischBreite" "2000") 
  ("NischBreiteM" "2000") 
  ("NischBreiteO" "2000") 
  ("NischBreiteU" "2000") 
  ("NischHoehe" "2500") 
  ("NischHoeheL" "2500") 
  ("NischHoeheM" "2500") 
  ("NischHoeheR" "2500") 
  ("TuerAnordnung" "1") 
  ("TuerAnordnungL" "1") 
  ("TuerAnordnungR" "1") 
  ("TuerAnzahlObj" "") 
  ("TuerartObj" "TuerartS") 
  ("TuervarObj" "TuervarE") 
  ("WandansL" "Checked") 
  ("WandansR" "Checked")))

(set 'CADT_WOINT_NB_RAD '(
  ("BlendenHoe" 0) 
  ("LaufSchiene" 1) 
  ("LaufUnten" nil) 
  ("TuerAnzahl" 1) 
  ("Tuerart" 0) 
  ("Tuervar" 0)))

(set 'CADT_WOINT_NB_VIS '(
  ("AufschlagLi" "False") 
  ("AufschlagRe" "False") 
  ("GWandansFv" "True") 
  ("GWandansFh" "True") 
  ("GFueFvo" "True") 
  ("GFuelFv" "False") 
  ("GFueFhi" "False") 
  ("GFuelFh" "False") 
  ("GBlenFv" "False") 
  ("GBlenFh" "False")))

(set 'CADT_WOINT_NB_ENA '(
  ("LaufSchieneD1" "True") 
  ("LaufSchieneD2" "True") 
  ("LaufSchieneB1" "True") 
  ("LaufSchieneB2" "True") 
  ("LaufUntenA" "False") 
  ("LaufUntenL" "False") 
  ("LaufUntenF" "False") 
  ("WandansL" "True") 
  ("WandansR" "True") 
  ("CWandansFh" "False") 
  ("TuerAnzahl1" "False") 
  ("TuerAnzahl2" "True") 
  ("TuerAnzahl3" "False") 
  ("TuerAnzahl4" "True") 
  ("BArtikelListe" "True") 
  ("BExit" "True") 
  ("BWeiter" "True")))


  (device(open "c:\\tmp\\nl_testout.lsp" "a"))
  (println)
  (setq MbiVarStr(source 'CADT_WOINT_BG 'CADT_WOINT_HG 'CADT_WOINT_TG 'CADT_WOINT_NIS_DAT 'CADT_WOINT_SCI_DAT 'CADT_WOINT_WPL_DAT 'CADT_WOINT_WPR_DAT 'CADT_WOINT_BLV_DAT 'CADT_WOINT_BLL_DAT 'CADT_WOINT_BLR_DAT 'CADT_WOINT_BLH_DAT 'CADT_WOINT_FRO_DAT 'CADT_WOINT_ZUB_DAT 'CADT_WOINT_WUF_DAT 'CADT_WOINT_NL_VAR 'CADT_WOINT_NB_VAR 'CADT_WOINT_NB_RAD 'CADT_WOINT_NB_VIS 'CADT_WOINT_NB_ENA)) 
  (print MbiVarStr)
  (close (device))
So the new version fail with this and the version made with the old enviroment works.
So they are not completly compatible.
Hans-Peter

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

Post by HPW »

The new version seems to fail with a amount of 2050 Bytes of source string.
Hans-Peter

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

Post by Lutz »

The new version of MinGW GCC seems to limit to 2048 characters. You can show this with the following simple program on Win32 (v 10.1.1):

Code: Select all

(setq atxt (string (sequence 1 1000)))
(println atxt)

(write-file "text.txt" atxt )

(exit)
it will cut of at about 500 for the display but save it in full length. I may have to go back to the older GCC when on Win32, if I cannot work around this.

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

Post by Lutz »

A release update 10.1.2 for Win32 only has been posted here to correct this problem:

http://www.newlisp.org/downloads/newlis ... gs-132.exe

Locked