newLISP 10.6.3 开发版发布,功能更新和 BUG 修复
newLISP是一个类似Lisp语言的、用于一般用途的脚本语言。它具有 LISP 语言所有的魔力,但更容易学习和使用。 newLISP是友好的,快速和简小的。大部分您需要的功能都将已经内置。
newLISP 10.6.3 发布,此版本是开发版本,包括一些新特性和改进:
组件和改进
-
dolist now also accepts arrays.
-
The net-eval function now returns the evaluation of the last function passed, not the first. The possibility of passing more than one expression in net-eval is not documented.
-
The system variable ostype on MS Windows now reports the string "Windows" not "Win32". Windows now also can be compiled as a 64-bit application.
-
net-eval connection timeout changed to 15 seconds from 60 secconds. The processing timeout while connected can still be set by the user in a net-eval parameter.
-
The environment variable HTTP_AUTHORIZATION has been added to the variables handled in HTTP server mode.
-
In date-value the date and time numbers can now be given in one list instead of separate number parameters using and additional syntax.
-
The date-list function, when given without a parameter, now returns the date list for the current UTC date and time value.
-
The trim function without trim character parameters will now trim all white-space characters, not only spaces.
-
dump now returns the number of cells dumped not true.
-
A new trace syntax (trace int-device) writes all expression entries and exit results to the device given. int-device can be could be an open file or 1 for stdout.
-
The stack trace in error messages now prints the entire espression passed for evaluation, not only the function name.
-
The tmp directory is now defined on newLISP startup. For UNIX this is /tmp, for Windows it is taken from the TMP environment variable or assumed as /tmp. The directory is used by the built-in function share and the built-in HTTPD server.
-
A new newLISP library call (newlispLibConsole 1) forces console output to stdout instead of writing to the return string of newlispEvalStr. The same call also enables console input viastdin.
-
newLISP can now be compiled as a 64-bit executable. Thanks toShigeru Kobayashi for doing most of this work.
Bug 修复
-
date-list crashed for negative values on some Windows versions.
-
The det and mat functions now give an error message when passed the wrong dimensions.
-
HTTP server mode now works correctly with Apache server, when the environment variables NEWLISPDIR and PROGRAMFILES are not defined. Default file paths are assumed for these variables.
-
HTTP only server mode with command-line switch -http did not reject net-eval requests.
-
expand could crash when evaluating binding lists.
-
The 'json-parse' function now handles 64-bit number also in 32-bit versions of newLISP.
下载:http://www.newlisp.org/downloads/development/newlisp-10.6.3.tgz
下面是一段示例代码:
(command-event (fn (s) (local (request) (if (find "?" s) ; is this a query (begin (set 'request (first (parse s "?"))) ; discover illegal extension in queries (if (ends-with request ".exe") (set 'request "GET /errorpage.html") (set 'request s))) (set 'request s)) request) ))