Search found 20 matches

by [email protected]
Mon Feb 13, 2012 6:51 am
Forum: Common Lisp
Topic: Lisp Job on Elance
Replies: 3
Views: 6137

Re: Lisp Job on Elance

I love how he says that the entire class of practitioners of a programing language are uncommunicative in a posting so rife with grammatical errors I had to check to see what country it was from. It was from the US, so no leeway given...
by [email protected]
Fri Feb 10, 2012 2:00 pm
Forum: Common Lisp
Topic: Get a list of variables currently in scope
Replies: 6
Views: 7583

Re: Get a list of variables currently in scope

(defun test-conditions (state) (process results (list (list "Test 1 Name" (lambda (state) <<<run tests on state return a value>>>)) (list "Test 2 Name" (lambda (state) <<<run tests on state return a value>>>)) (list "Test 3 Name" (lambda (state) <<<run tests on state r...
by [email protected]
Thu Feb 09, 2012 2:58 pm
Forum: Common Lisp
Topic: Get a list of variables currently in scope
Replies: 6
Views: 7583

Re: Get a list of variables currently in scope

Thanks. At least I am asking hard questions now! There must be a cleaner way to implement this. I will keep thinking.
by [email protected]
Thu Feb 09, 2012 8:42 am
Forum: Common Lisp
Topic: Get a list of variables currently in scope
Replies: 6
Views: 7583

Get a list of variables currently in scope

Is there a way to get a list of all of the symbols currently in scope? For example (defun test-conditions (state) (let ((test-1 (list "Test 1 Name" (lambda (state) <<<run tests on state return a value>>>))) (test-2 (list "Test 2 Name" (lambda (state) <<<run tests on state return ...
by [email protected]
Sat Feb 04, 2012 8:11 am
Forum: Common Lisp
Topic: Controlling the P in REPL
Replies: 6
Views: 7939

Re: Controlling the P in REPL

I thought so, but I wasn't sure :) I'm curious, are you implementing AKS primality test? No, I am mostly trying to learn how to optimize integer arithmetic in LISP. I am working my way through the EulerProject problems. Primality testing is very integer arithmetic intensive and serves as a good lea...
by [email protected]
Fri Feb 03, 2012 12:15 pm
Forum: Common Lisp
Topic: Controlling the P in REPL
Replies: 6
Views: 7939

Re: Controlling the P in REPL

Let me present another criticism to your code. I don't know what your objective is, but, if you are trying to implement prime-list efficiently, you are not doing a good job because your algorithm is highly inneficient. I recommend you to implement the Sieve of Eratosthenes . You are correct. If the...
by [email protected]
Thu Feb 02, 2012 12:42 pm
Forum: Common Lisp
Topic: Controlling the P in REPL
Replies: 6
Views: 7939

Re: Controlling the P in REPL

For controlling the printer output see variables in the printer dictionary , especially in this case *print-level*/*print-length* . You could also wrap the form inside TIME with something, I personally wrap large list-generating function with LENGTH as a simple consistency check. You could write a ...
by [email protected]
Thu Feb 02, 2012 11:27 am
Forum: Common Lisp
Topic: Controlling the P in REPL
Replies: 6
Views: 7939

Controlling the P in REPL

I am evaluating algorithms that produce large lists (larger than I want to scroll through in a SLIME buffer). For example, I have a function: (defun prime-list (n m) (declare (optimize (speed 0) (debug 0) (safety 0))) (declare (type fixnum n) (type fixnum m)) (let ((primes (loop for i from ((lambda ...
by [email protected]
Wed Feb 01, 2012 11:16 am
Forum: Common Lisp
Topic: Passing &key arguments through to lower levels
Replies: 2
Views: 4410

Re: Passing &key arguments through to lower levels

Thank you. I will remember the code tags in the future.
by [email protected]
Sat Jan 28, 2012 9:43 pm
Forum: Common Lisp
Topic: Passing &key arguments through to lower levels
Replies: 2
Views: 4410

Passing &key arguments through to lower levels

I want to extend adjoin, but want to maintain it full flexibility. So somehow I need to pass any keyword arguments that come in through to a call to adjoin I make in my version: (defun my-adjoin (item list &key key test test-not) (do-something (adjoin item list WHAT-DO-I-PUT-HERE?))) Or is this ...