Search found 613 matches
- Mon Jan 19, 2009 1:11 am
- Forum: Common Lisp
- Topic: [newbie] evaluating a list as an expression
- Replies: 5
- Views: 8516
Re: [newbie] evaluating a list as an expression
However, in the ultimate program, the expressions sent to this function will contain only logical functions (AND, OR, and NOT), so compiling will probably do more harm than good in this case. Is there a way to get this to work without using COMPILE or EVAL? For constricted languages like that an in...
- Sun Jan 18, 2009 2:17 am
- Forum: Common Lisp
- Topic: [newbie] evaluating a list as an expression
- Replies: 5
- Views: 8516
Re: [newbie] evaluating a list as an expression
First, why are you even trying to do that? It is generally recommended that you don't use EVAL, or for that matter PROGV, unless you know exactly what you are doing. And what are you trying to achieve anyway? PROGV establishes dynamic bindings, and I can't tell if this is what you want... in any cas...
- Fri Jan 16, 2009 5:13 am
- Forum: Common Lisp
- Topic: A "declare" form returned by macro
- Replies: 19
- Views: 33775
Re: A "declare" form returned by macro
In my opinion, if it is not clear on a glance what arguments the function accepts, then it is either too long or the arguments are badly named. At least for simple types, and more complex things are best put into CLOS objects and operated upon with generic functions, which have something quite close...
- Wed Jan 14, 2009 12:49 pm
- Forum: Common Lisp
- Topic: Implication problem
- Replies: 3
- Views: 5825
Re: Implication problem
I hear that more and more places are dropping Lisp as a teaching language and replacing it with Python/Ruby, or in the worst case go all Java all the way, although those don't really qualify as computer science in my opinion. I studied physics anyway, and what programming there is is mostly C++/Fort...
- Wed Jan 14, 2009 2:16 am
- Forum: Common Lisp
- Topic: Implication problem
- Replies: 3
- Views: 5825
Re: Implication problem
This sounds like homework, which I suppose is a good thing because it means that someone somewhere is teaching Lisp ;) Anyway, what you want here is backward chaining . How much Lisp do you know? It is hard to give just a bit of code without giving a full solution, and that is usually counterproduct...
- Sun Jan 11, 2009 4:49 am
- Forum: Common Lisp
- Topic: Crosscompiling Linux->Windows
- Replies: 7
- Views: 16473
Re: Crosscompiling Linux->Windows
I'm going to do all my development on Linux. I hate working on Windows. Currently, there is only one reason I can't recompile CL code on SBCL running on Windows: I'm unable to install anything using asdf-install on Windows. It just doesn't work (out-of-the-box). Note that asdf-install doesn't reall...
- Sun Jan 11, 2009 4:36 am
- Forum: The Lounge
- Topic: How does defmacro expansion in Scheme and Common Lisp work?
- Replies: 2
- Views: 6378
Re: How does defmacro expansion in Scheme and Common Lisp work?
First, Scheme, as a language, doesn't have defmacro. I have never really looked into Scheme, but this is usually brought up as one of more important differences between Scheme and CL, that Scheme has a system of pattern substitution hygienic macros, which are more complex, but avoid variable capture...
- Sat Jan 03, 2009 10:35 am
- Forum: Common Lisp
- Topic: Sorting big arrays
- Replies: 2
- Views: 8002
Re: Sorting big arrays
I would guess that sorting in Perl is implemented in C, so high performance there is not that surprising. I might be wrong, but this seems typical for scripting languages. In any case I believe the problem is the cost of funcalling the predicate, which additionally loses context. That is, note that ...
- Wed Dec 31, 2008 4:05 pm
- Forum: Common Lisp
- Topic: REPL problems in Lisp
- Replies: 12
- Views: 16675
Re: REPL problems in Lisp
I think SICP (http://mitpress.mit.edu/sicp/full-text/book/book.html) goes a bit into evaluation and quoting... see for example chapter 4.1 The Metacircular Evaluator. Note that SICP uses a variant of Scheme, but concepts are similar.
Happy new year.
Happy new year.
- Wed Dec 31, 2008 12:51 pm
- Forum: Common Lisp
- Topic: REPL problems in Lisp
- Replies: 12
- Views: 16675
Re: REPL problems in Lisp
I say again: by separating the (write (eval (read))) expression by hand you are injecting additional evaluation. (read-from-string "'(a b)") will result in an object whose printable/readable syntax is '(A B), but you cannot just write (eval '(a b)) and expect it to work, because it will be...