newLISP Fan Club

Forum => newLISP newS => Topic started by: Lutz on April 28, 2008, 03:13:47 AM

Title: development release newLISP v.9.3.11
Post by: Lutz on April 28, 2008, 03:13:47 AM
• 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
Title:
Post by: HPW on April 28, 2008, 04:43:01 AM
The source does contains lots of *.java.bak and a newlisp-gs.nsi.bak!

Are that files needed?
Title:
Post by: Lutz on April 28, 2008, 05:34:04 AM
They are not needed and can be removed.
Title:
Post by: Lutz on April 28, 2008, 06:27:40 AM
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
Title:
Post by: cormullion on April 28, 2008, 06:38:41 AM
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:
QuoteYou 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:


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


Cool!



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


> (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... :)
Title:
Post by: Lutz on April 28, 2008, 06:52:24 AM
QuoteYou 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.


QuoteAn 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:


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

see here: http://www.newlisp.org/downloads/development/newlisp_manual.html#prompt-event
Title:
Post by: hsmyers on April 28, 2008, 09:31:49 AM
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
Title:
Post by: newdep on April 28, 2008, 02:27:30 PM
Thanks a lot lutz! ;-)
Title:
Post by: pjot on April 30, 2008, 03:50:39 AM
(sys-info) is documented as follows:
Quote
  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:
Quote
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
Title:
Post by: Lutz on April 30, 2008, 04:09:48 AM
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.
Title:
Post by: cormullion on April 30, 2008, 09:16:18 AM
From an older thread:


Quote from: "cormullion"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?


Quote from: "lutz"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?