Page 1 of 1

development release newLISP v.9.3.11

Posted: Mon Apr 28, 2008 10:13 am
by Lutz
• a fix for 'push' and other bugfixes

• new functions for customizing newLISP's interactive shell

• better HTTP request pre-processing

for files and changes notes: http://www.newlisp.org/download/development

Posted: Mon Apr 28, 2008 11:43 am
by HPW
The source does contains lots of *.java.bak and a newlisp-gs.nsi.bak!
Are that files needed?

Posted: Mon Apr 28, 2008 12:34 pm
by Lutz
They are not needed and can be removed.

Posted: Mon Apr 28, 2008 1:27 pm
by Lutz
A Debian installer package made and tested on UBUNTU Linux, v8.04 has been added for the 9.3.11 newLISP development rlelease: http://www.newlisp.org/download/development

Posted: Mon Apr 28, 2008 1:38 pm
by cormullion
Great! Thanks for the new functions. These look really useful.

By the way - MacOS X users may have to remove the newlisp package from the /Library/Receipts folder:
You cannot install newLISP 9.3.11 on this volume. A newer version of this software already exists on this volume.
I've just started playing with prompt-event:

Code: Select all

> (prompt-event date)
$prompt-event
Mon Apr 28 14:28:30 2008_
Cool!

An obvious error that I made was to supply an expression:

Code: Select all

> (prompt-event (string (date) ": "))

ERR: invalid parameter : (string (date))
... loops for ever?
Although it's the wrong thing to do, some idiot like me will do it.

Like the manual too! Looks like you've got it sorted... :)

Posted: Mon Apr 28, 2008 1:52 pm
by Lutz
You cannot install newLISP 9.3.11 on this volume. A newer version of this software already exists on this volume.
click on "uninstall" in the disk image, it will remove the receipt for you.
An obvious error that I made was to supply an expression:
not at all ;-), you can supply an expression, but it must be enclosed in a function:

Code: Select all

(prompt-event (fn () (string (date) ": ")))
see here: http://www.newlisp.org/downloads/develo ... ompt-event

Posted: Mon Apr 28, 2008 4:31 pm
by hsmyers
The link to prompt-event under Reflection and customization doesn't seem to work. This would be the link in the manual proper, not the sidebar.

--hsm

Posted: Mon Apr 28, 2008 9:27 pm
by newdep
Thanks a lot lutz! ;-)

Posted: Wed Apr 30, 2008 10:50 am
by pjot
(sys-info) is documented as follows:
0 - Number of LISP cells
1 - Maximum number of LISP cells constant
2 - Number of symbols
3 - Evaluation/recursion level
4 - Environment stack level
5 - Maximum call stack constant
6 - Pid of running newLISP process
8 - Version number as an integer constant
9 - Operating system constant
However:
newLISP v.9.3.11 on Linux IPv4, execute 'newlisp -h' for more info.

> (sys-info 0)
369
> (sys-info 1)
268435456
> (sys-info 3)
1
> (sys-info 4)
0
> (sys-info 5)
2048
> (sys-info 6)
2782
> (sys-info 7)
9311
> (sys-info 8)
1
> (sys-info 9)

ERR: list index out of bounds in function sys-info
BTW: why was the numbering shifted? Previously (sys-info 6) returned the newLisp version.

Peter

Posted: Wed Apr 30, 2008 11:09 am
by Lutz
The numbering in the manual is wrong, the 7 is skipped, only goes 0 to 8. The pid of the running newLISP is new and was inserted third to last.





ps: If you use -1 and -2 for version and flavor you will be safe for past and future versions. New fields will always be entered before the two last onces.

Posted: Wed Apr 30, 2008 4:16 pm
by cormullion
From an older thread:
cormullion wrote:I just noticed that some of my code now credits newLISP version 5239 or similar, instead of 9300... :))

Has (sys-info) changed such that asking for the version now returns the PID... I know it's changed in the development releases, but didn't realise that all existing uses might return different numbers...

Is this going to stay - will I have to change all existing code that relies on this?
lutz wrote:There is an unstated (until today) contract that new stuff in 'sys-info' will always be inserted somewhere before the last 2 values, which are also the only static once in all the list for the same newlisp executable or library.

If you use (sys-info -2) for your version number and (sys-info -1) for the compile flavor (libray, UTF-8, IPv6), you are safe for all past, present and future versions.
This contract is probably stated in the manual now ... :)

Perhaps the version is too useful and important to be just another field. Like 'ostype', could it be a 'variable' as well?