Search found 78 matches
- Fri Aug 01, 2008 12:39 pm
- Forum: Common Lisp
- Topic: Best program to use lisp on?
- Replies: 17
- Views: 43223
Re: Best program to use lisp on?
Lol, i forgot for a second that the loop macro had a built in destructuring bind.
- Fri Aug 01, 2008 10:15 am
- Forum: Common Lisp
- Topic: Best program to use lisp on?
- Replies: 17
- Views: 43223
Re: Best program to use lisp on?
a great learning utility for lisp is http://gigamonkeys.com/book/ , practical common lisp. once you're a little more advanced, i would suggest reading the free book on lisp (Free download) http://www.paulgraham.com/onlisptext.html Try (defun price-order-total (item-list) (loop for item in item-list ...
- Fri Aug 01, 2008 7:32 am
- Forum: Common Lisp
- Topic: Best program to use lisp on?
- Replies: 17
- Views: 43223
Re: Best program to use lisp on?
You want a compiler/interpeter right? I suppose it depends what you want: the personal edition of lispworks (free, but with limited heap space and 5 hr time limit, among other things) is very easy to use. http://www.lispworks.com/downloads/ In reality, all the 5 hr time limit means is that you have ...
- Thu Jul 31, 2008 8:22 pm
- Forum: Common Lisp
- Topic: define-compiler-macro
- Replies: 11
- Views: 30849
Re: define-compiler-macro
Thx :D But i still don't understand exactly how to shadow the function name with the compiler-macro. Looking at the documentation, it appears you have to (funcall (compiler-macro-function 'name) (name args) nil) where name is the name of the compiler-macro. If i define a function with the same name,...
- Thu Jul 31, 2008 4:38 pm
- Forum: Common Lisp
- Topic: define-compiler-macro
- Replies: 11
- Views: 30849
define-compiler-macro
Does anyone know what define-compiler-macro is useful for? It seems pretty much like a macro, except,according to documentation, "Unlike an ordinary macro, a compiler macro can decline to provide an expansion merely by returning a form that is the same as the original (which can be obtained by ...
- Thu Jul 31, 2008 7:59 am
- Forum: Common Lisp
- Topic: reader macro communicating with a compile-time macro
- Replies: 4
- Views: 9924
Re: reader macro communicating with a compile-time macro
Wow! Thx, guys. I'm boggled by the simplicity (lol) compared to how hard i tried to make it. In this case, maybe one constant variable would be good, such as (let ((program-alternatives (gensym))) (set-dispatch-macro-character #\# #\? (lambda (stream char n) (declare (ignore char n)) `(,program-alte...
- Wed Jul 30, 2008 1:18 pm
- Forum: Common Lisp
- Topic: To learn or not to learn, that is the question
- Replies: 11
- Views: 22900
Re: To learn or not to learn, that is the question
My two cents: Since you mentioned using c instead of lisp, i would just like to mention two things. First, as you might know, most (if not all) lisp implementations have a foreign-function interface that allows one to call c functions. So, this is why one can access opengl from your applications (in...
- Wed Jul 30, 2008 10:52 am
- Forum: Common Lisp
- Topic: reader macro communicating with a compile-time macro
- Replies: 4
- Views: 9924
reader macro communicating with a compile-time macro
So, i'm trying to make a certain macro that functions like this Example: (with-program-cases ((listp x) t) (loop for y = x then #?((cdr y) (1+ y)) until #?((null y) (> y 5)) do(print y))) This should expand into something like this: (cond ((listp x) (loop for y=x then (cdr y) until (null y) do(print...