Search found 388 matches

by Kazimir Majorinc
Wed Jun 25, 2014 5:34 am
Forum: Whither newLISP?
Topic: Is true symbol?
Replies: 4
Views: 6686

Is true symbol?

> (symbol? 'true)
true
> (symbol? (eval 'true))
nil

> (= 'true (eval 'true))
true


Is it bug or feature? I'd expect that true is always symbol.
by Kazimir Majorinc
Sat Jan 19, 2013 9:26 am
Forum: Anything else we might add?
Topic: John Shutt's blog Structural Insight.
Replies: 2
Views: 3859

Re: John Shutt's blog Structural Insight.

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.
by Kazimir Majorinc
Thu Jan 03, 2013 10:17 am
Forum: newLISP in the real world
Topic: -=((( HAPPY NEW YEAR 2013 )))=-
Replies: 8
Views: 4932

Re: -=((( HAPPY NEW YEAR 2013 )))=-

Happy new year to everyone.
by Kazimir Majorinc
Mon May 28, 2012 4:10 pm
Forum: So, what can you actually DO with newLISP?
Topic: Patrick Lerner's blog
Replies: 1
Views: 5240

Patrick Lerner's blog

Partrick Lerner recently published two posts related to Newlisp on Do mind the gap blog.

(I posted it in wrong subforum few hours ago.)
by Kazimir Majorinc
Sat Apr 14, 2012 3:19 pm
Forum: Whither newLISP?
Topic: In-place parameter substitution
Replies: 8
Views: 10105

Re: In-place parameter substitution

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.
by Kazimir Majorinc
Sat Apr 14, 2012 12:43 am
Forum: Whither newLISP?
Topic: In-place parameter substitution
Replies: 8
Views: 10105

Re: In-place parameter substitution

How about this one for beginning:

(define-macro (myinc p0)(set p0 (+ (eval p0) 1)))
by Kazimir Majorinc
Thu Mar 08, 2012 1:40 am
Forum: newLISP in the real world
Topic: Set Operations
Replies: 4
Views: 2649

Re: Set Operations

I agree about union, not because it is particularly missing, but because it is low hanging fruit.
by Kazimir Majorinc
Sat Jan 28, 2012 2:00 pm
Forum: Whither newLISP?
Topic: Compose for NewLISP?
Replies: 3
Views: 6707

Re: Compose for NewLISP?

In this particular case you can check expand in manual.
by Kazimir Majorinc
Fri Dec 30, 2011 9:22 pm
Forum: newLISP in the real world
Topic: What is the direct equivalent of for-each(Scheme) in newlisp
Replies: 6
Views: 3575

Re: What is the direct equivalent of for-each(Scheme) in new

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 ...
by Kazimir Majorinc
Sun Dec 25, 2011 12:47 pm
Forum: Anything else we might add?
Topic: Merry Christmas to all forum members!
Replies: 2
Views: 3286

Re: Merry Christmas to all forum members!

Thanx, I join to good wishes.
by Kazimir Majorinc
Sun Dec 25, 2011 12:34 pm
Forum: newLISP in the real world
Topic: Is there the name conflict of lambda in newlisp?
Replies: 11
Views: 5341

Re: Is there the name conflict of lambda in newlisp?

The conflict might happen only if you pass "free variable" around; that is the case with (lambda()(setf a 3)) but not with (lambda()(let((a 4))(setf a 3))). As long as one does not pass free variables around he is safe. The problem most frequently occurs with Newlisp macros (actually, fexprs). These...
by Kazimir Majorinc
Sat Dec 24, 2011 12:34 pm
Forum: newLISP in the real world
Topic: Is there the name conflict of lambda in newlisp?
Replies: 11
Views: 5341

Re: Is there the name conflict of lambda in newlisp?

Newlisp uses dynamic scope. That means that application of (lambda()(setq a 30)) doesn't refer to binding of a on the place of definition of (lambda()(setq a 30)) , in this case in myfun , but on binding of a in the place of application , i.e. in myfun2 . It is how it was in original, McCarthy 's Li...
by Kazimir Majorinc
Tue Dec 20, 2011 9:23 pm
Forum: newLISP in the real world
Topic: Function composition?
Replies: 4
Views: 2770

Re: Function composition?

I wrote the post "Composition of functions and macros" on my blog.

((composition 'f1 ... 'fn) _ _ _) = (f1 (f2 ... (fn _ _ _)))

If there was no significant change from February 2010, you should be able to cut and paste whole post in your editor and it should work.
by Kazimir Majorinc
Tue Dec 13, 2011 5:05 am
Forum: newLISP and the O.S.
Topic: Will Newlisp run on Win 7 64 bit?
Replies: 3
Views: 3737

Re: Will Newlisp run on Win 7 64 bit?

Yes, it does.
by Kazimir Majorinc
Tue Nov 15, 2011 11:35 pm
Forum: newLISP in the real world
Topic: variable capture?
Replies: 14
Views: 36343

Re: variable capture?

My experience is that dynamic scope almost never causes the problems. I think it happened to me something like two times in last four years, and then I fixed it easily. I have two functions in my library, protect1 and protect2 I'm using to check whether that is the case. I write something like (defi...
by Kazimir Majorinc
Thu Sep 01, 2011 8:56 am
Forum: Whither newLISP?
Topic: Proposal: forever & doforever
Replies: 0
Views: 4836

Proposal: forever & doforever

(forever ...) := (while true ...)
(doforever(i) ...) := (begin (setf i 0)(while true (++ i) ...)).

Probably (dotimes(i 9223372036854775807)...) is good enough for doforever.
by Kazimir Majorinc
Thu Aug 18, 2011 7:11 am
Forum: newLISP newS
Topic: blog post about newLISP
Replies: 2
Views: 3340

Re: blog post about newLISP

Newlisp is recently mentioned in positive context in following blog posts as well:

http://blog.fogus.me/2011/08/14/perlis-languages/
http://dorophone.blogspot.com/2011/08/s ... nsion.html
by Kazimir Majorinc
Mon Jul 04, 2011 12:17 am
Forum: Whither newLISP?
Topic: Why do you use sym?
Replies: 1
Views: 4551

Why do you use sym?

I'm trying to make review of situations where sym is useful. I use it for generation of expressions processed by programs. For example, here: http://kazimirmajorinc.blogspot.com/2011/01/enumeration-of-lambda-expressions.html for alpha-conversion, i.e. prevention of symbol clashes when calling macros...
by Kazimir Majorinc
Wed Jun 22, 2011 3:24 pm
Forum: Whither newLISP?
Topic: Tail call optimization
Replies: 3
Views: 5678

Re: Tail call optimization

No.