Search found 209 matches

by Jasper
Sat May 01, 2010 6:51 am
Forum: Common Lisp
Topic: Deriving classes from two, both derived from one same class
Replies: 4
Views: 6647

Deriving classes from two, both derived from one same class

Person A makes defclass class-A Person B does defclass class-B (class-A) Now person adds something: defclass class-A+ (class-A) Person C wants his class-C, but he wasn't stuff from class-A+ and class-B, will defclass class-C (class-B class-A+) work properly, only including A once? If not, could per...
by Jasper
Fri Apr 30, 2010 6:19 am
Forum: The Lounge
Topic: Lisp and other languages banned from Iphone
Replies: 4
Views: 9429

Re: Lisp and other languages banned from Iphone

Yeah, that happened a while ago. Well, i think that is what you get when you accept a party to determine what you can or can't do on your phone, or actually worse, a party that isn't remotely independant either. Unfortunately, i think consumers will gladly keep buying future iShackles regardless, so...
by Jasper
Thu Apr 29, 2010 2:05 pm
Forum: Emacs Lisp
Topic: Display at starting
Replies: 2
Views: 8375

Re: Display at starting

C-x 3, C-x 2, C-x 1 to make it just one again.. A quick lookup the function is split-window-vertically, split-window-horizontally, and delete-window, delete-other-windows to remove it again. C-x o, other-window, switches window. And there is enlarge-window, enlarge-window-horizontally, hmm, really r...
by Jasper
Wed Apr 28, 2010 5:25 am
Forum: Common Lisp
Topic: can we search 2 lists at a time?
Replies: 6
Views: 8480

Re: can we search 2 lists at a time?

Essentially(for default TEST), it assigns a true/false value based on a symbol(about) and clause. If the clause is (OR &rest rest) then it returns true only if one or more of the elements of REST os equal to the symbol, or one of the clauses returns true. Similarly for AND, where all of them mus...
by Jasper
Tue Apr 27, 2010 7:57 am
Forum: Common Lisp
Topic: let bindings & lambda expressions
Replies: 7
Views: 9074

Re: let bindings & lambda expressions

(let ((y (lambda (x) (when x (funcall y (cdr x)))))) (funcall y '(a b c))) Y is not yet defined in the LAMBDA there. It is only defined in the body, or in the case of LET*, subsequent vars and the body. So you cannot make a recursive function with putting the output into a LET from LAMBDA. I assume...
by Jasper
Tue Apr 27, 2010 7:38 am
Forum: Common Lisp
Topic: can we search 2 lists at a time?
Replies: 6
Views: 8480

Re: can we search 2 lists at a time?

Did you see this? I have no idea if that is near your question, but those NOTs and ORs seem to imply it. It is better to refer not to the variables, but to what they are/mean? Or in terms of a function having certain inputs, and what it is to output? I dubbed KB to be called clause; a combination o...
by Jasper
Mon Apr 26, 2010 4:30 am
Forum: Common Lisp
Topic: Why doesn't "cond" or "if" work inside when
Replies: 9
Views: 8411

Re: Why doesn't "cond" or "if" work inside when

I don't think this is best done with LOOP.. How about: (defun clause-says (about clause &key (test #'eql)) (flet ((says (c) ;just a short for clause-says.. (clause-says about c :test test))) (typecase clause (symbol (funcall test about clause)) ((cons (eql or) list) (find-if #'says (cdr clause))...
by Jasper
Fri Apr 23, 2010 7:31 am
Forum: Common Lisp
Topic: Why doesn't "cond" or "if" work inside when
Replies: 9
Views: 8411

Re: Why doesn't "cond" or "if" work inside when

What is it supposed to do? Damned that is a complicated LOOP, can you simplify/break it up? Some notes: SETQ on a nonexistant variable makes a global (or is it special?) variable, LET, function argument variables, DESTRUCTURING-BIND, etcetera all make local variables, and DEFVAR, DEFPARAMETER make s...
by Jasper
Thu Apr 22, 2010 6:40 am
Forum: Common Lisp
Topic: Detele duplicates from list
Replies: 9
Views: 7159

Re: Detele duplicates from list

Try it.. post the attempt. Psuedocode will do. Here is a hint: UNLESS the list is empty(NULL), put together(as in CONS) the FIRST of with: the REST of the list after the duplicates removed(this is the same function you're making at this point.) and the elements being the same to the FIRST of the lis...
by Jasper
Wed Apr 21, 2010 8:13 am
Forum: Common Lisp
Topic: Detele duplicates from list
Replies: 9
Views: 7159

Re: Detele duplicates from list

(send-to-lector #'remove-duplicates)

Anyway, send us your attempts..