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 - Kazimir Majorinc

#1
Whither newLISP? / Is true symbol?
June 24, 2014, 10:34:12 PM
> (symbol? 'true)

true

> (symbol? (eval 'true))

nil


> (= 'true (eval 'true))

true




Is it bug or feature? I'd expect that true is always symbol.
#2
So, what can you actually DO with newLISP? / Pentaquine
January 19, 2014, 01:55:37 AM
https://github.com/rvantonder/pentaquine">https://github.com/rvantonder/pentaquine
#3
I know little about differences between various RnRS Schemes, but it appears that everyone, including Shutt, claim that fexprs are the most important issue in Kernel.
#4
Happy new year to everyone.
#5
newLISP in the real world / Re: newLISP on Rockets
October 24, 2012, 08:21:18 AM
http://www.whois.com/whois/newlisponrockets.com">http://www.whois.com/whois/newlisponrockets.com
#6
http://newlispfanclub.alh.net/forum/memberlist.php?mode=viewprofile&u=804">Wendal's https://github.com/wendal/lua-newlisp">Lua-Newlisp github project and http://wendal.net/">blog with http://wendal.net/category/lisp">few related posts.
#7
Partrick Lerner recently published http://dmtg.me.uk/category/programming/lisp/">two posts related to http://www.newlisp.org/">Newlisp on http://dmtg.me.uk/">Do mind the gap blog.



(I posted it in wrong subforum few hours ago.)
#8
It would be nice to have some function that returns list of the caller functions, similarly like (sys-info 3) returns the level of recursion. Although it sounds quite 'dangerous' it can actually provide some debugging facilities, i.e. functions could react if called by someone they do not appreciate.
#9
How about this one for beginning:



(define-macro (myinc p0)(set p0 (+ (eval p0) 1)))
#10
No, I'll not be there.
#11
More details at:



http://ozk.unizd.hr/els2012/">http://ozk.unizd.hr/els2012/
#12
newLISP in the real world / Re: Set Operations
March 07, 2012, 05:40:10 PM
I agree about union, not because it is particularly missing, but because it is low hanging fruit.
#13
Whither newLISP? / Re: Compose for NewLISP?
January 28, 2012, 06:00:31 AM
In this particular case you can check expand in manual.
#14
Yes, that macro is intended to be used on different way.



(foreach i '(1 2 3 4) (println (* i i)))



In the meantime you can use following (as Ted suggested):



(setf foreach map)

(foreach (fn(x)(println(* x x))) '(1 2 3 4))




In Scheme, map and for-each are the same, just 'return value' of for-each isn't specified. It can be the same as result of map (at least according to R6RS).



You cannot macroexpand in Newlisp, since Newlisp macros are actually fexprs, they do not expand. In many cases you can replace external eval with println; in that case macro call will print what was intended to be evaluated.



(define-macro (foreach _foreachx _foreachlst)(println (list 'dolist (list _foreachx _foreachlst) (append (list 'begin) (args)))))
#15
Thanx, I join to good wishes.