脚本语言 newLISP 10.6.1 开发版发布了!

wendal
 wendal
发布于 2014年09月17日
收藏 9

newLISP 10.6.1 开发版发布了,此版本现已提供下载,主要就是 Bug 修复,同时还添加几个小方法,兼容 newLISP  10.6.0 版本。

新功能和改进

  • A new function (collect exp) reapeatedly evaluates exp and collects results in a list until evaluation yields nil.

  • Some PCRE regular expression options can now be given as either numbers or letters. Multiple letter optiosn can be combined in a string. This affects all functions using regular expressions. See the regexfunction for details.

  • The regex function now gives offset and length in number of UTF-8 characters when PCRE UTF8 option2048 or "u" is specified.

  • A second syntax pattern for copy allows copying a newLISP cell from a memory address. This is useful when interfacing with C-language code.

  • The get-string function now takes one or two additional optional parameters for two new syntax patterns. The new patterns allow creating string buffers from memory address locations limited by size or a limit string. Using special limit strings, UTF16 and UTF32 strings of unknown size can be copied. This is useful when interfacing with C-language code.

  • The macro? predicate now also can be used on symbols to test if a symbol was created using the macrofunction.

  • A wrong UDP option in net-connect or net-listen will now throw an error message. Previously wrong UDP options were ignored.

Bug 修复

  • rotate on a (copy str) expression corrupted memory.

  • The flt function now returns an unsigned integer on all platforms. Previusly on 32-bit versions a signed integer was returned.

  • The crc32 function will not sign-extend on 32-bit newLISP.

  • The protected? function did not recognize macro symbols as protected.

newLISP是一个类似Lisp语言的、用于一般用途的脚本语言。它具有 LISP 语言所有的魔力,但更容易学习和使用。 newLISP是友好的,快速和简小的。大部分您需要的功能都将已经内置。

下面是一段示例代码:

(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)
))
本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处,尊重他人劳动共创开源社区。
转载请注明:文章转载自 OSCHINA 社区 [http://www.oschina.net]
本文标题:脚本语言 newLISP 10.6.1 开发版发布了!
加载中

最新评论(6

佑海
佑海
若练此功,挥刀自宫
iyangyuan
iyangyuan
好像是人工智能语言吧。。。
玛雅录屏
玛雅录屏
沙发
凤阳马超
凤阳马超
括号实在反人类, 能改成python那样的缩进就好了
firebroo
firebroo
还是喜欢scheme
quanwei9958
quanwei9958
沙发,有什么用处,,说具体点
返回顶部
顶部