Release newLISP v.10.1.0

Started by Lutz, June 22, 2009, 05:52:24 AM

Previous topic - Next topic

Lutz

• improved concurrency support on multi core CPUs with new messsaging API

• many other changes and additions



for release notes see: http://www.newlisp.org/downloads/newLISP-10.1-Release.html">http://www.newlisp.org/downloads/newLIS ... lease.html">http://www.newlisp.org/downloads/newLISP-10.1-Release.html

for downloads see: http://www.newlisp.org/index.cgi?page=Downloads">http://www.newlisp.org/index.cgi?page=Downloads

Lutz

#1
The 10.1.0 Users Manual and Reference in PDF format can now be accessed from here:



http://www.newlisp.org/index.cgi?Documentation">http://www.newlisp.org/index.cgi?Documentation

itistoday

#2
Awesome, congrats, I can't wait till I get a chance to take a look into the new changes.
Get your Objective newLISP groove on.

Jeff

#3
Lutz,



This is wonderful. I love send and receive. Any chance of getting a flag on receive to block for a message?



Couple of bugs:

1) docs - send's docs use (sys-info 4) instead of (sys-info 6) for the parent pid

2) if spawn is called with a single argument (if, for example, I forgot - hypothetically of course; this would *never* happen - to put a symbol in and instead just put an expression to spawn), the interpreter exits with a bus error.



Jeff
Jeff

=====

Old programmers don\'t die. They just parse on...



http://artfulcode.net\">Artful code

Lutz

#4
Thanks Jeff and Itistoday



-  it always says (sys-info -4), which is indexing from the back. This is encouraged to write compatible code for future versions, which insert new system stats after position 5. I looked through the docs, but couldn't find a (sys-info 4), I think I always have put the -4 (minus 4).



- the 'spawn' missing arg. error is already fixed in this morning's 10.1.0 version.

Lutz

#5
... blocking is easy using 'until', just look into the examples, most of them do blocking send/receive. Using 'until' makes it easy to interleave other code when waiting, and also stands out visually. I want to reserve an optional parameter for a timeout value argument in the future. That would then serve a double purpose, and would be used in both 'send' and 'receive'.

Jeff

#6
Re sys-info - my mistake. Regarding blocking, that can easily be accomplished using until and sleep; the only problem is finding the appropriate polling rate.



Are there any plans for asynchronous callbacks?
Jeff

=====

Old programmers don\'t die. They just parse on...



http://artfulcode.net\">Artful code

Lutz

#7
QuoteAre there any plans for asynchronous callbacks?


you can do callbacks now:


; receiver process pidR listens and evaluates

(define (foo a b c)
...
)

(while true
(if (receive pidS msg)
(eval msg))
)


the sender would send expressions, which then get evaluated in the receivers environment. E.g. you could send:


; sender process pidS

(send pidR '(foo 1 2 3))


this would then call the function foo in the receiver. The proxy example in the documentation is doing a similar thing (last example).

newdep

#8
great release Lutz, very nice changes and enhancements..

though I need to catch up again ;-) ... nice nice nice release..
-- (define? (Cornflakes))

newdep

#9
Hi Lutz / Ted,



Below the correct makefiles for linux slackware/utf8 and the N810 Maemo Linux makefile also listed..Sorry im a bit late ;-)





First the linux slackware makefile which included 'readline' + 'termcap' and not 'readline' + 'ncurses' as default..


# makefile for newLISP v.10.x.x on LINUX with readline support
#
# 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 = -m32 -Wall -pedantic -Wno-uninitialized -c -O2 -g -DLINUX
CFLAGS = -m32 -Wall -pedantic -Wno-strict-aliasing -Wno-long-long -c -O2 -g -DREADLINE -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 # for slackware
#   $(CC) $(OBJS) -m32 -g -lm -ldl -lreadline -lncurses -o newlisp
#   $(CC) $(OBJS) -m32 -g -lm -ldl -o newlisp
    strip newlisp

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

$(OBJS): primes.h protos.h makefile_linux




oke here is the slackware linux_utf makefile:


# makefile for newLISP v.10.x.x on LINUX with readline and UTF-8 support
#
# 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 nl-utf8.o pcre.o

CFLAGS = -m32 -Wall -pedantic -Wno-strict-aliasing -Wno-long-long -c -O2 -g -DREADLINE -DSUPPORT_UTF8 -DLINUX

CC = gcc


default: $(OBJS)
#   $(CC) $(OBJS) -m32 -g -lm -ldl -lreadline -o newlisp
    $(CC) $(OBJS) -m32 -g -lm -ldl -lreadline -ltermcap -o newlisp
#   $(CC) $(OBJS) -m32 -g -lm -ldl -lreadline -lncurses -o newlisp
#   $(CC) $(OBJS) -m32 -g -lm -ldl -o newlisp
    strip newlisp

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

$(OBJS): primes.h protos.h makefile_linux_utf8





This is the Nokia n810 Maemo Linux ARMEL makefile plain:

called 'makefile_maemo', no readline support yet but will get there because i need that badly ;-)





# makefile for newLISP v.10.x.x on LINUX MAEMO ARMEL
#
# 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 = -Wall -pedantic -Wno-uninitialized -c -O2 -g -DLINUX
CFLAGS =  -Wall -pedantic -Wno-strict-aliasing -Wno-long-long -c -O2 -g -DLINUX

CC = gcc


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

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

$(OBJS): primes.h protos.h makefile_maemo







here is the Nokia N810 linux maemo utf8 makefile:

called makefile_maemo_utf8


# makefile for newLISP v.10.x.x on MAEMO ARMEL LINUX with readline and UTF-8 support
#
# 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 nl-utf8.o pcre.o

CFLAGS = -Wall -pedantic -Wno-strict-aliasing -Wno-long-long -c -O2 -g -DSUPPORT_UTF8 -DLINUX

CC = gcc


default: $(OBJS)
#    $(CC) $(OBJS)  -g -lm -ldl -lreadline -o newlisp
#    $(CC) $(OBJS)  -g -lm -ldl -lreadline -lncurses -o newlisp
     $(CC) $(OBJS)  -g -lm -ldl -o newlisp
     strip newlisp

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

$(OBJS): primes.h protos.h makefile_maemo_utf8






On the Linux ARMEL there is currently only GCC 2.5 running higher

version is in test progress by the Meamo people..



The ./configure script from 10.1.0 runs on the slackware only when

the default makefile_linux is adjusted to use 'termcap' + 'readline'.



The ./configure script doesnt run on Maemo Linux.

As the ./configure script seeks for "linux" which it is. it doesnt support

the -m32 setting. So compilation on the N810 is done manualy by

make clean; make -f makefile_maemo_utf8





the command 'arch' can be used to check your Processor Architecture,

which can then be used in the configure script perhpas...



If you need more info let me know...





PS: Actualy there could also be a makefile_generic which only includes the '$(CC) $(OBJS)  -g -lm -ldl -o newlisp' because that almost always

works on any Unix machine...This also saves extras makefiles, specials not included ofcourse..Not to confuse with the makefile_universal ;-)
-- (define? (Cornflakes))

Lutz

#10
This seems to be the story for readline support on Linux/UNIX



- UBUNTU linux, Mac OS X: -libreadline

- Slackware Linux: -libreadline -ltermcap

- Some other Linux UNIX: -libreadline -lncurses



this is just libraries, but you also need the package libreadline5-dev (this is the name on UBUNTU) which contains the headerfiles readline.h and history.h included during the build.



Also, I am replacing now the old configure with Ted's configure, but the old makefile_xxxx's still will be there and can be used. This is how it will work starting 10.1.1:



For the new Ted method (standard GNU sequence):



./configure

make



For the old method using the built-in makefiles, either:



make



or picking a specific makefile:



make -f makefile_xxx



Between builds always: make clean

And after the build (GNU standard): make check

Or the same: make test



Note that Ted's configure script does not require the GNU autoconf tools, and doesn't have any other external dependencies.

TedWalther

#11
Thanks Lutz.



I looked into how GNU autotools figures out libreadline.  Somehow they actually search for unresolved symbols in all the libraries until they find a library that has them.  Seems like a complicated subsystem, but it does work.



What I have in mind is a little simpler; have a small test program (test-readline), and compile it first with -lreadline, then -lreadline -lncurses, then -lreadline -ltermcap.  At each step, if compile succeeds, then we go with the value used.



If there is something out there that uses -lreadline -lterminfo, then I'll add that test in too.  But if we can't compile the test program, then we have to bail out with a message saying "Libraries specified are incorrect, or you need to set the -L flag."



Ted
Cavemen in bearskins invaded the ivory towers of Artificial Intelligence.  Nine months later, they left with a baby named newLISP.  The women of the ivory towers wept and wailed.  \"Abomination!\" they cried.

TedWalther

#12
For the -m32 flag not working on older gcc, do we know exactly when that support was added? which version of gcc?  Then I can do gcc --version and disable it for older versions.



Ted
Cavemen in bearskins invaded the ivory towers of Artificial Intelligence.  Nine months later, they left with a baby named newLISP.  The women of the ivory towers wept and wailed.  \"Abomination!\" they cried.

m35

#13
Oh I see the problem. You should be using the -m35 flag.



;D



Ok, I'm done, carry on.