Search found 64 matches
- Mon Oct 13, 2008 12:47 pm
- Forum: Common Lisp
- Topic: The library situation (warning: mini-rant)
- Replies: 24
- Views: 44060
Re: The library situation (warning: mini-rant)
Perhaps it is more of an issue with OS X; McCLIM builds for me under Linux, same with most of the ASDF-Install libraries I have, though sometimes in building I get an error and choosing the retry installation restart works. Additionally, for distributing software to end users, if you are sending the...
- Mon Oct 13, 2008 10:30 am
- Forum: Common Lisp
- Topic: Efficiency, Delayed Computation and Lambda
- Replies: 3
- Views: 8654
Re: Efficiency, Delayed Computation and Lambda
What will probably happen in most implementations is that the lambdas will become compiled closures, which a closure being simply a code vector and an environment. The code vector is going to be constant, so all what you are consing are the environments, which in most cases will probably not be too ...
- Mon Oct 13, 2008 10:23 am
- Forum: Common Lisp
- Topic: Tree expression shortener; seperator
- Replies: 10
- Views: 29075
Re: Tree expression shortener; seperator
What it seems that you want here are reader macros. The possible problem then is that it might make the underlying tree harder to see.
- Sun Oct 12, 2008 9:51 am
- Forum: Common Lisp
- Topic: How to convert this Scheme code ?
- Replies: 4
- Views: 10621
Re: How to convert this Scheme code ?
[edit] SBCL gave quite unhelpful (to a newbie like myself, anyway) advice as well... is debugging Lisp always so tricky? Are you talking about something like this for PAIR-POW (from the first post)? ; in: LAMBDA NIL ; ((RESULT (PAIR-POW P (TRUNCATE (/ N 2))))) ; ; caught ERROR: ; illegal function c...
- Sat Oct 11, 2008 12:55 pm
- Forum: Common Lisp
- Topic: Please help my head get around 'deftype'
- Replies: 23
- Views: 43487
Re: Please help my head get around 'deftype'
For functions you could do something like this: (defmacro defun* (name limited-lambda-list &body body) "Like defun, but saves type information. Special lambda lists (&optional, &key, etc.) not supported Lambda list treated like that of defmethod; ((integer a) b (integer c)) would yi...
- Fri Oct 10, 2008 10:41 am
- Forum: Common Lisp
- Topic: Beginner question
- Replies: 4
- Views: 10001
Re: Beginner question
Function PARSE-INTEGERJasper wrote:]
Hmm, is there an read-integer-from-string and such? (year "'hax0519") -> 'HAX ; 4
- Mon Oct 06, 2008 9:29 pm
- Forum: Common Lisp
- Topic: How to turn function into a list?
- Replies: 11
- Views: 24380
Re: How to turn function into a list?
In the CL reference appendix, I found a function that can change a function into a list of strings format: (defun h(x) (* 2 x)) H CL-USER> (function-lambda-expression 'h) (LAMBDA (X) (DECLARE (SYSTEM::IN-DEFUN H)) (BLOCK H (* 2 X))) #(NIL NIL NIL NIL ((DECLARATION OPTIMIZE DECLARATION))) H CL-USER>...
- Mon Oct 06, 2008 7:34 pm
- Forum: Common Lisp
- Topic: Poll: Which Lisp implementations do you use?
- Replies: 32
- Views: 94750
Re: Poll: Which Lisp implementations do you use?
I just tried out ClozureCL on Linux-x86 (from trunk), and I like it so far. Compiler is fast, the code produced in reasonably fast, smaller initial image than SBCL. After loading McCLIM and the demos, ROOM showed it was using only ~28 megs (while SBCL would use ~56 megs). The output from some of its...
- Sat Oct 04, 2008 4:21 pm
- Forum: Common Lisp
- Topic: How to turn function into a list?
- Replies: 11
- Views: 24380
Re: How to turn function into a list?
Thanks Dan, Having browsed through 'Painters and Hackers' by Paul Graham I decided to try Lisp and picked up 'Ansi Common Lisp' by PG. I was excited to read in the first chapter about Lisp programming being 'real time.' What I took that to probably mean, was something like being able to use the REP...
- Sun Sep 28, 2008 1:57 pm
- Forum: Common Lisp
- Topic: Please help my head get around 'deftype'
- Replies: 23
- Views: 43487
Re: Please help my head get around 'deftype'
You can do #1 with a SATISFIES type. You create a predicate function, say something-list-p, then the type would be (satisfies something-list-p).
Unfortunately, it probably wouldn't help the compiler and it has to run the function each time you want to check an object for that type...
Unfortunately, it probably wouldn't help the compiler and it has to run the function each time you want to check an object for that type...