Search found 613 matches
- Sun Feb 08, 2009 1:43 pm
- Forum: Common Lisp
- Topic: problem with &rest
- Replies: 8
- Views: 14550
Re: problem with &rest
What do you mean by "limits"? The variable is bound to the list of remaining arguments, and within the body of a function it acts as any other variable. In any case, I would suggest iterative solution, maybe like this (if I understand what you want correctly): (defun app-sym (&rest arg...
- Tue Feb 03, 2009 12:21 pm
- Forum: Common Lisp
- Topic: Is there any Library for Feed-Parsing
- Replies: 6
- Views: 9640
Re: Is there any Library for Feed-Parsing
I am reviving quite an old thread, but perhaps this will become useful to someone: Recently I became interested in the so called Semantic Web, which led me to Redland library, one component of which is Raptor parser, which claims to parse "RSS tag soup including all versions of RSS, Atom 1.0 an...
- Tue Feb 03, 2009 11:36 am
- Forum: The Lounge
- Topic: General question about Garbage Collection
- Replies: 12
- Views: 24589
Re: General question about Garbage Collection
So what I am wondering since a long time now is, whether it is possible to create a system-wide garbage-collector. I dont want to do this, and I am sure, if it was possible, someone else would have done it, but I just wonder, why it is not possible. It is not impossible, and has been done in the pa...
- Sun Jan 25, 2009 11:15 pm
- Forum: Common Lisp
- Topic: pos+ function from Paul Graham's "ANSI Common Lisp"
- Replies: 12
- Views: 22684
Re: pos+ function from Paul Graham's "ANSI Common Lisp"
Most Common Lisp packages are gathered in CLiki and perhaps cl-user . Also, the Maxima Computer Algebra System is written in CL and open source, and it might be useful for your described problem domain. Although I read that its code is old, obviously complex, and hence not very readable for someone ...
- Sun Jan 25, 2009 12:01 pm
- Forum: Common Lisp
- Topic: pos+ function from Paul Graham's "ANSI Common Lisp"
- Replies: 12
- Views: 22684
Re: FP
That's functional programming :P You can write code like that for lots of applications. It tends to be a little slower and more memory-intensive than imperative code, but once you get used to FP, hard programs can actually be both fun and easy. Note that using a package like SERIES you can write th...
- Fri Jan 23, 2009 10:49 am
- Forum: Common Lisp
- Topic: Retrieving slot names from class
- Replies: 10
- Views: 16206
Re: Retrieving slot names from class
My point was that iterating over all slots in a class is not actually that useful for any non-contrived objective, except serialization/persistence, for which there are libraries already. Which means that this is not a problem one should worry about. Anything that would require it can be either done...
- Fri Jan 23, 2009 10:30 am
- Forum: Common Lisp
- Topic: Retrieving slot names from class
- Replies: 10
- Views: 16206
Re: Retrieving slot names from class
I would approach the example in the "don't do that" way ;) That is, printing all slots in an object instance is not very useful for anything other than debugging, and debugging is better done when thinking more about verbs than nouns. And if state of some particular object is important, th...
- Fri Jan 23, 2009 9:56 am
- Forum: Common Lisp
- Topic: Retrieving slot names from class
- Replies: 10
- Views: 16206
Re: Retrieving slot names from class
From what I have seen there are two solutions to this kind of problems. Well, maybe three, since the first thing you should consider is thinking not in terms of objects, but generic functions, or protocols in general. Doing the same operation on every slot in an object should be pretty rare, because...
- Fri Jan 23, 2009 9:45 am
- Forum: Common Lisp
- Topic: Strange error in CLISP
- Replies: 1
- Views: 4099
Re: Strange error in CLISP
I believe that compiling in CLISP should be done only with already debugged code, since compiling loses most information leading to cryptic errors, like the one you describe. What happens here I think is (format ...) getting compiled to local function of one argument TEST-1, which is different from ...
- Thu Jan 22, 2009 10:59 pm
- Forum: Common Lisp
- Topic: Retrieving slot names from class
- Replies: 10
- Views: 16206
Re: Retrieving slot names from class
There is MetaObject Protocol, which is not a standard, but a common extension. Unfortunately, most implementations have subtle (or not so subtle) differences in their implementations of it, but fortunately there is http://common-lisp.net/project/closer/closer-mop.html , which is a compatibility libr...