Search found 8 matches

by seetho
Thu Jan 15, 2009 1:47 pm
Forum: newLISP newS
Topic: Inconsistent syntax of "case"
Replies: 21
Views: 15569

Now that is very interesting! Why does letex create a variable that seems to get evaluated? Functions are left associative so, the letex expression gets evaluated first, so all y gets substituted and evaluated to its final value before case get evaluated, and by then it sees the final value there a...
by seetho
Wed Jan 14, 2009 4:07 pm
Forum: newLISP newS
Topic: Inconsistent syntax of "case"
Replies: 21
Views: 15569

Actually, there is a problem, because in if statetement, it is not only result of the evaluation of then-branch and else-branch that matters, but side effects matter as well. So, in your mental model, it is not enough that processor #1 decides which result it will use (#3 or #4), it is important th...
by seetho
Wed Jan 14, 2009 2:39 pm
Forum: newLISP newS
Topic: Inconsistent syntax of "case"
Replies: 21
Views: 15569

However, I think in newLISP that if the first argument evaluates to true, then the second argument is never processed (lazy evaluation), thereby saving the computation time, etc., that would be required for that evaluation. Let's just say the 2nd argument "did not need to be" evaluated instead of "...
by seetho
Wed Jan 14, 2009 12:12 pm
Forum: newLISP newS
Topic: Inconsistent syntax of "case"
Replies: 21
Views: 15569

At first look, the IF statement is really puzzling if you stubbornly insist that everything in a list is evaluated (sequentially), but then if you look again carefully as DrDave mentions it still is consistent. If you think in terms of everything being processed in parallel then it may easier to ima...
by seetho
Tue Jan 13, 2009 6:14 pm
Forum: newLISP newS
Topic: Inconsistent syntax of "case"
Replies: 21
Views: 15569

Hi cormullion, Your tutorial is a great help in my learning newLISP. I count programming as one of my hobbies since my first VIC-20 - ok some of you know my age group now ;) I think that whatever number of rules that govern a programming language, be it 3 or 30, the most important thing is consisten...
by seetho
Tue Jan 13, 2009 9:00 am
Forum: newLISP newS
Topic: Inconsistent syntax of "case"
Replies: 21
Views: 15569

Hi Lutz,

Now it makes more sense that you are calling it "constants". It naturally comes to mind that constants should not be evaluated. Maybe it should be called "const-switch" instead of "exp-switch" in the manual. Just my humble opinion.

Thanks for clearing it up.
by seetho
Tue Jan 13, 2009 3:12 am
Forum: newLISP newS
Topic: Inconsistent syntax of "case"
Replies: 21
Views: 15569

Inconsistent syntax of "case"

I'm going through Cormullion's Introduction to newLISP. Everything was going down really smoothly. The syntax was very consistent and simple (in a good way) and everything governed by the 3 simple rules, until I came to the case statement example. Syntax consistency was what drew me to newLISP in th...
by seetho
Thu Jan 08, 2009 2:57 pm
Forum: newLISP in the real world
Topic: Small error in source and documentation of smtp.lsp
Replies: 1
Views: 1588

Small error in source and documentation of smtp.lsp

Hi, I was just poking around the modules documentation and noticed that there was a small error: (load "/usr/share/modules/newlisp/smtp.lsp") I think it should read (load "/usr/share/newlisp/modules/smtp.lsp") instead. The error is also in the source file. I'm new to newLISP and to this forum so I'm...