development version newLISP 8.7.11

Started by Lutz, February 05, 2006, 10:11:40 AM

Previous topic - Next topic

Lutz

This is the last development release before the 8.8.0 beta.



For change notes and files see: http://newlisp.org/downloads/development/">http://newlisp.org/downloads/development/



Lutz

pjot

#1
Testing this release on Tru64Unix delivered 1 problem:


Quote
pamela> make

./build



Discovered True64 Unix, please read doc/TRU64BUILD

cc -ieee -xtaso -pedantic -c -O2 -DSOLARIS -DTRU64 -D_POSIX_PII_SOCKET newlisp.c

cc: Warning: newlisp.c, line 514: In this statement, the referenced type of the pointer value "mainArgs" is "long pointer to signed char", which is not compatible with "short pointer to signed char". (ptrmismatch)

MainArgs = mainArgs;

^


The pointer referenced to has another format, because Tru64Unix always regards the arguments to main as a long pointer. I propose the following code change in 'newlisp.c':



489 #ifndef WINCC
490 #ifdef TRU64
491 #pragma pointer_size long
492 #endif
493 char ** MainArgs;
494 #ifdef TRU64
495 #pragma pointer_size short
496 #endif
497 #endif


Sorry for the ugly macro nesting here. However, everything runs fine now:


Quote
pamela> make

./build



Discovered True64 Unix, please read doc/TRU64BUILD

cc -ieee -xtaso -pedantic -c -O2 -DSOLARIS -DTRU64 -D_POSIX_PII_SOCKET newlisp.c

cc -ieee -xtaso -pedantic -c -O2 -DSOLARIS -DTRU64 -D_POSIX_PII_SOCKET nl-symbol.c

cc -ieee -xtaso -pedantic -c -O2 -DSOLARIS -DTRU64 -D_POSIX_PII_SOCKET nl-math.c

cc -ieee -xtaso -pedantic -c -O2 -DSOLARIS -DTRU64 -D_POSIX_PII_SOCKET nl-list.c

cc -ieee -xtaso -pedantic -c -O2 -DSOLARIS -DTRU64 -D_POSIX_PII_SOCKET nl-liststr.c

cc -ieee -xtaso -pedantic -c -O2 -DSOLARIS -DTRU64 -D_POSIX_PII_SOCKET nl-string.c

cc -ieee -xtaso -pedantic -c -O2 -DSOLARIS -DTRU64 -D_POSIX_PII_SOCKET nl-filesys.c

cc -ieee -xtaso -pedantic -c -O2 -DSOLARIS -DTRU64 -D_POSIX_PII_SOCKET nl-sock.c

cc -ieee -xtaso -pedantic -c -O2 -DSOLARIS -DTRU64 -D_POSIX_PII_SOCKET nl-import.c

cc -ieee -xtaso -pedantic -c -O2 -DSOLARIS -DTRU64 -D_POSIX_PII_SOCKET nl-xml.c

cc -ieee -xtaso -pedantic -c -O2 -DSOLARIS -DTRU64 -D_POSIX_PII_SOCKET nl-web.c

cc -ieee -xtaso -pedantic -c -O2 -DSOLARIS -DTRU64 -D_POSIX_PII_SOCKET nl-matrix.c

cc -ieee -xtaso -pedantic -c -O2 -DSOLARIS -DTRU64 -D_POSIX_PII_SOCKET nl-debug.c

cc -ieee -xtaso -pedantic -c -O2 -DSOLARIS -DTRU64 -D_POSIX_PII_SOCKET tru64.c

cc -ieee -xtaso -pedantic -c -O2 -DSOLARIS -DTRU64 -D_POSIX_PII_SOCKET pcre.c

cc 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 tru64.o pcre.o -taso -lm -lrt -ldb -lbsd -Lffi-tru64-4.0 -lffi -o newlisp

strip newlisp


Also all tests pass:


Quote
pamela> ./qa_dot



Testing built-in functions ...



!              !=             $              %              &              

*              +              -              /              <              

<<             <=             =              >              >=            

>>             NaN?           ^              abs            acos          

add            address        amb            and            append        

append-file    apply          args           array          array-list    

array?         asin           assoc          atan           atan2          

atom?          base64-dec     base64-enc     bayes-query    bayes-train    

begin          beta           betai          binomial       case          

catch          ceil           change-dir     char           chop          

close          command-line   cond           cons           constant      

context        context?       copy-file      cos            count          

cpymem         crc32          crit-chi2      crit-z         current-line  

date           date-value     debug          dec            def-new        

define         define-macro   delete         delete-file    device        

difference     directory      directory?     div            do-until      

do-while       dolist         dotimes        dotree         dump          

dup            empty?         encrypt        ends-with      env            

erf            error-event    error-number   error-text     eval          

eval-string    exec           exit           exp            expand        

explode        factor         fft            file-info      file?          

filter         find           first          flat           float          

float?         floor          flt            for            fork          

format         fv             gammai         gammaln        get-char      

get-float      get-int        get-integer    get-string     get-url        

global         if             ifft           import         inc            

index          int            integer        integer?       intersect      

invert         irr            join           lambda?        last          

legal?         length         let            letn           list          

list?          load           log            lookup         lower-case    

macro?         main-args      make-dir       map            match          

max            member         min            mod            mul            

multiply       name           net-accept     net-close      net-connect    

net-error      net-eval       net-listen     net-local      net-lookup    

net-peek       net-peer       net-ping       net-receive    net-receive-from

net-receive-udp net-select     net-send       net-send-to    net-send-udp  

net-service    net-sessions   new            nil?           normal        

not            now            nper           npv            nth            

nth-set        number?        open           or             pack          

parse          peek           pipe           pmt            pop            

post-url       pow            pretty-print   primitive?     print          

println        prob-chi2      prob-z         process        push          

put-url        pv             quote          quote?         rand          

random         randomize      read-buffer    read-char      read-file      

read-key       read-line      ref            regex          remove-dir    

rename-file    replace        replace-assoc  reset          rest          

reverse        rotate         save           search         seed          

seek           select         semaphore      sequence       series        

set            set!           set-locale     set-nth        setq          

sgn            share          signal         silent         sin            

sleep          --- sleep duration: 1000 ---

slice          sort           source         sqrt          

starts-with    string         string?        sub            swap          

sym            symbol         symbol?        symbols        sys-error      

sys-info       tan            throw          throw-error    time          

time-of-day    timer          title-case     trace          trace-highlight

transpose      trim           true?          unique         unless        

unpack         until          upper-case     wait-pid       while          

write-buffer   write-char     write-file     write-line     xml-error      

xml-parse      xml-type-tags  |              ~              



Testing contexts as objects and scoping rules ...





ALL FUNCTIONS FINISHED SUCCESSFULL



total time: 4428

newLISP v.8.7.11 on Tru64Unix, execute 'newlisp -h' for more info.



> ring...




Thanks for fixing the BUILD script and the underflow trouble!



Peter

Lutz

#2
... no problem, I will add this



Lutz

HPW

#3
Thanks very much for the string optimisation!

(Your math is conservativ on the performance)



8.710

> (time(dotimes (x 10000)(setq a(string a x "Bla"))))
18173


8.711

> (time(dotimes (x 10000)(setq a(string a x "Bla"))))
1274
> (length a)
68893


The newLISP/neobook interface (like all other DLL-interfaces) will benefit from this much, because it is string-based!
Hans-Peter

HPW

#4
Then I want to compare with append:



> (setq a "")
""
> (time(dotimes (x 10000)(setq a(append a (string x) "Bla"))))
249
> (length a)
68890
> (setq a "")
""
> (time(dotimes (x 10000)(setq a(string a x "Bla"))))
1311
> (length a)
68890


What causes that?
Hans-Peter

Lutz

#5
'string' has to do more work when converting non-string types to strings, while append just appends existing strings. The optimization was just for string data types passed to 'string' for other datatypes it still has to to the work. 'append' blindy assumes that everything is a string or throws an error if not.



Lutz

HPW

#6
Thanks for the detailed explanation.

So the newLISP-programmer can choose what fit best.

He only has to know such details.
Hans-Peter