Release newLISP v.10.1.0
Release newLISP v.10.1.0
• 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/newLIS ... lease.html
for downloads see: http://www.newlisp.org/index.cgi?page=Downloads
• many other changes and additions
for release notes see: http://www.newlisp.org/downloads/newLIS ... lease.html
for downloads see: http://www.newlisp.org/index.cgi?page=Downloads
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
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.
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
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
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.
- 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.
Last edited by Lutz on Mon Jun 22, 2009 8:59 pm, edited 2 times in total.
... 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'.
you can do callbacks now:Are there any plans for asynchronous callbacks?
Code: Select all
; receiver process pidR listens and evaluates
(define (foo a b c)
...
)
(while true
(if (receive pidS msg)
(eval msg))
)
Code: Select all
; sender process pidS
(send pidR '(foo 1 2 3))
newlisp makefiles
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..
oke here is the slackware linux_utf makefile:
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 ;-)
here is the Nokia N810 linux maemo utf8 makefile:
called 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 ;-)
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..
Code: Select all
# 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:
Code: Select all
# 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 ;-)
Code: Select all
# 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
Code: Select all
# 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))
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.
- 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.
-
- Posts: 608
- Joined: Mon Feb 05, 2007 1:04 am
- Location: Abbotsford, BC
- Contact:
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
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
-
- Posts: 608
- Joined: Mon Feb 05, 2007 1:04 am
- Location: Abbotsford, BC
- Contact: