Search found 406 matches

by gugamilare
Fri Nov 30, 2012 12:29 pm
Forum: Common Lisp
Topic: macro expansion within macro
Replies: 5
Views: 14780

Re: macro expansion within macro

Macro forms are expanded only at places where a function call may be placed. Since (COND (COND-CLAUSE (= C 8) 1)) didn't work if COND-CLAUSE was a function it also doesn't work if its a macro. That is not really the problem. The problem in this case is that the interpreter/compiler macroexpands CON...
by gugamilare
Mon Aug 27, 2012 8:58 pm
Forum: Common Lisp
Topic: IF + user input
Replies: 3
Views: 9160

Re: IF + user input

There are two function which can help you:

http://www.lispworks.com/documentation/ ... y_or_n.htm
by gugamilare
Wed Aug 15, 2012 9:48 pm
Forum: The Lounge
Topic: Hello Lispers :)
Replies: 1
Views: 9513

Re: Hello Lispers :)

Wellcome, kmruiz :)

If you are looking for Lisp projects, common-lisp.net and cl-user are full of them. Github has a lot of (mostly small) Lisp projects.

Fell free to hang around ;)
by gugamilare
Tue Jul 24, 2012 9:24 am
Forum: Common Lisp
Topic: Lisping in style
Replies: 5
Views: 14774

Re: Lisping in style

Is an ELT access O(1) on an array? Yes. Is AREF faster than ELT? If not, why would you use it? It depends on the compiler. If the compiler knows that the sequence is a vector, it can substitute ELT with AREF. Some compilers can infer the type of the object (e.g. SBCL) depending on the code around i...
by gugamilare
Mon Jul 23, 2012 9:57 pm
Forum: Common Lisp
Topic: Lisping in style
Replies: 5
Views: 14774

Re: Lisping in style

Well, sorry for not seeing your code before, I didn't have time to answer your question. There are few things that I can comment on. If your intention is only to work with lists, then using ELT is not quite the best idea. As a general rule, it's more convenient to access the elements in a row (e.g. ...
by gugamilare
Thu Jun 21, 2012 9:47 pm
Forum: Common Lisp
Topic: Passing values by reference
Replies: 12
Views: 29774

Re: Passing values by reference

learningcommonlisp wrote:Well I think this is wrong nevertheless as a literal list is modified here...
Yes, indeed, that doesn't work.
by gugamilare
Tue Jun 12, 2012 5:07 pm
Forum: Homework
Topic: Function to "push" a list to the right or left
Replies: 1
Views: 8835

Re: Function to "push" a list to the right or left

Try using the function append ;)
by gugamilare
Mon Jun 11, 2012 8:15 pm
Forum: Homework
Topic: Why don't my solutions work? Specifics inside.
Replies: 2
Views: 10682

Re: Why don't my solutions work? Specifics inside.

You need to check whether the argument X given is NIL, in which case you should return NIL.
by gugamilare
Fri May 04, 2012 11:40 am
Forum: Common Lisp
Topic: Structs in arrays
Replies: 3
Views: 8590

Re: Structs in arrays

Code: Select all

(button-x (aref your-vector position))
or

Code: Select all

(slot-value (aref your-vector position) 'x)
(BTW, Common Lisp is case-insensitive, so 'X' and 'x' refer to the same symbol.
by gugamilare
Fri Apr 27, 2012 10:05 am
Forum: Other Tools
Topic: .
Replies: 5
Views: 33259

Re: Text Editors with CL syntax aides

If you like shining colorful editors, there is Cusp, a plugin for Eclipse.