Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - ssqq

#31
some newLISP builtin function is destructive, If user want design destructive function, how to make it?



for every argument passed into user function is value, not reference only if value is stored in a functor.
#32
I found '() is not nil or true? value:



> (nil? '())
nil
> (true? '())
nil
> (empty? '())
true
> (list? '())
true
> (= '() '())
true


for nil and true is only bool value in newLISP, so everything should be judged with nil? or true?
#33
thanks, I get it use 10.6.0, I would try it use 10.7.0.



when I use 10.7.0 it is ok.
#34
Anything else we might add? / Re: Strange reader
July 05, 2016, 09:35:04 PM
I think this is a bug.



symbol table should permit "fn" or "lambda" as name.
#35

> (define a:a)
ERR: context expected in function define : a
> (define b:b)
ERR: context expected in function define : b
> (define c:c)
ERR: context expected in function define : c
> (define d:d)
ERR: context expected in function define : d
> (define e:e)
ERR: context expected in function define : e
> (define f:f)
nil
#36
YAML is suit for view, C and C++ YAML LIB have been upgrade to 1.1.



http://pyyaml.org/wiki/LibYAML">//http://pyyaml.org/wiki/LibYAML



Anyone could test it in newlisp.
#37
Website is so quickly, If give some compare data with other website framework. I think maybe Google would interest with it.
#38
I think first lambda expression should is 'lambda:



> (first (lambda (x y) (+ x y)))
lambda
> (first (fn (x y) (+ x y)))
fn
> 'lambda
lambda
> 'fn
fn
> (cons 'fn '((x y) (+ x y)))
(fn (x y) (+ x y))


Why newLISP use args as first elements of lambda expression?

Why could not quote *lambda* and *fn*?
#39
Anything else we might add? / add function defined?
July 06, 2015, 01:44:33 AM
I think newlisp  should add function *defined?*, for all not defined variable is *nil*.




> (defined? 'var) ; --> nil
> (set 'var nil)
> (defined? 'var) ; --> true
> (delete 'var)
> (defined? 'var) ; --> nil

#40
I like newLISP.



If put the source code to github. maybe more people could participate in this Project.



If Add some function used 'Test` in newLISP core like this:


        ( is (expression args) result, messsage))
                 ( ok expression-is-true message)


Then could add some test-case in core. So many people could see sample in source code.



Add Core-Module-List in newLIsp.com, with registered download address, then We could write code to download module, install it then test it automatically.
#41
I write a tool for checking un-declare symbol of newLISP code, it need improve more.



https://github.com/songzan/Spp/blob/master/strict.lsp">https://github.com/songzan/Spp/blob/master/strict.lsp



If you want test it, pls link it first (or change default *main-args* number):



On Winxp:



       > newlisp -x strict.lsp strict.exe

       > strict your-script.lsp



On Linux:



      > newlisp -x strict.lsp strict

      > chmod 755 strict

      > ./strict your-script.lsp



1. all un-declare symbol would output an warning.

2. all un-used symbol declared with *local*, *let*, *letn*, *letex* would output an warning.

3. all symbol declared with *set* or *setq* in *lexical scope* would throw an warning.



todo:



1. could not check the symbols *import* from C module

2. could not check *other* context symbols.

3. could not check symbol created with *new* or *bind*.

4. warning message have not the line number and pos message.



welcome give me some suggest.
#42
When I use the key of *up* *down* *right* *left* in REPL with Ubuntu 14.04 shell:




ssqq@X61:~$ newlisp
newLISP v.10.6.0 32-bit on Linux IPv4/6 UTF-8, options: newlisp -h

> ^[[D^[[C^[[B^[[A^[[A^[[C



I try other shell or ssh tool, same problem. If I missed some compiler file when built newLISP?
#43
newLISP in the real world / eval context symbol error
January 09, 2015, 04:28:53 AM
I found if *eval* a symbol, then *eval* the context symbol with this symbol prefix would throw a error.



> (eval 'c)
nil
> (eval 'c:var)
ERR: context expected in function eval : c
> (context 'c)
c
> (eval 'c:var)
nil
#44
yes, When we import some module, imported symbols list is useful, when it is not useable, delete it from symbols table also is a good habbit.
#45
Hi, I write a newLISP syntax check tool with perl6.



https://github.com/songzan/Spp/blob/master/Newlisp.p6">//https://github.com/songzan/Spp/blob/master/Newlisp.p6



Could pass with all lsp file with contribute package.



found following error:



module/unix.lsp line: 59
   (import library "getuid")`
end char is *`*.