Search found 94 matches
- Sat Dec 10, 2011 9:05 pm
- Forum: Common Lisp
- Topic: Implementing "last" with do*
- Replies: 19
- Views: 24408
Re: Implementing "last" with do*
((equal (list-length lista) 1) ;; <== when there is just one element left ==> stop Just a note. The first step is getting something that works; this function presumably does this. A fairly important second concern is the efficiency of the code you produced. This particular line will, in most if not...
- Thu Dec 08, 2011 9:55 pm
- Forum: Common Lisp
- Topic: Triangular Recursion Function
- Replies: 1
- Views: 3902
Re: Triangular Recursion Function
I feel like you have some serious misconceptions of how you are supposed to be interacting with your Lisp. What do you mean "debug window"? I gotta tell you that I am pretty puzzled right now. I suppose your question... How do I evaluate (triangular 6) ? ...is most simply answered by, type...
- Wed Dec 07, 2011 10:00 pm
- Forum: Common Lisp
- Topic: Newbie in Lisp
- Replies: 12
- Views: 15168
Re: Newbie in Lisp
I don't. But your project sounds fairly video game-ish, which probably means you are going to want something like OpenGL at some level, you also might think about SDL. Many interfaces for these libraries are available for your Lisp implementation. The way you should install them is using Quicklisp (...
- Wed Dec 07, 2011 11:30 am
- Forum: Common Lisp
- Topic: Newbie in Lisp
- Replies: 12
- Views: 15168
Re: Newbie in Lisp
CLisp works perfectly fine without Cygwin. Like I said, I haven't been windows side in a long while. Please elaborate. I assume that you mean the one that works via/was built with MinGW? I looked at the download links again and found that version, but it is a bit hidden. Ok, Ive downloaded CYGwin a...
- Tue Dec 06, 2011 11:23 am
- Forum: Common Lisp
- Topic: Newbie in Lisp
- Replies: 12
- Views: 15168
Re: Newbie in Lisp
The download links are the entire right hand column. If you are using Windows, look under Cygwin, although I hear that others have gotten it running other ways. The Cygwin install method basically goes like this: Install Cygwin, it will ask what other software you want to install during the setup, c...
- Mon Dec 05, 2011 2:36 pm
- Forum: Common Lisp
- Topic: Cordic Program, troubles
- Replies: 7
- Views: 9032
Re: Cordic Program, troubles
Oh, I see, you are using prefix, the only thing is that CL is fully parenthesized. That means "* a b" needs to be written as (* a b). This is actually a departure from RPN where every function is of fixed airity. So, whereas you might do something like " 3 4 5 * * " in RPN to get...
- Mon Dec 05, 2011 12:02 pm
- Forum: Common Lisp
- Topic: Cordic Program, troubles
- Replies: 7
- Views: 9032
Re: Cordic Program, troubles
Okay, found your error. You appear to have tried to use infix notation. As it stands I'm not sure what you want to do, but you can't do "(- c0 * d s0)": ... (loop as i below 23 do (cond ((> z0 0) (setq z1 (- z0 (svref vec i))) ;; This isn't right (setq c1 (- c0 * d s0)) (setq s1 (+ s0 * d ...
- Sun Dec 04, 2011 10:00 pm
- Forum: Common Lisp
- Topic: Cordic Program, troubles
- Replies: 7
- Views: 9032
Re: Cordic Program, troubles
Hmmm... is it really true that learning Lisp will help with RPL programming? Maybe learning Forth, but Lisp? Anyway, to get you started, the error you are getting, ">: ANG is not a real number", is using "real" in the mathematic sense. It means that the data that symbol ANG conta...
- Sat Dec 03, 2011 1:46 pm
- Forum: Common Lisp
- Topic: a comparison sort function..
- Replies: 7
- Views: 8775
Re: a comparison sort function..
This is a good point and something Lispers need to constantly keep in mind. CL is a pass by-reference language. I believe most Lisps, including Scheme, are pass by reference for various reasons inherent in basically all computer science, actually (the only exception I can think of is NewLisp). Take ...
- Sat Dec 03, 2011 12:38 pm
- Forum: Common Lisp
- Topic: New to lisp, help with function
- Replies: 1
- Views: 2932
Re: New to lisp, help with function
You absolutely do not need recursion to write this function. For instance you could do something like this: (defun multiple-of-three-lengths? (list) (loop for el in list for i from 1 always (= (length el) (* 3 i)))) Or mess around with the various MAP* functions and probably the EVERY function. Is t...