Thanks for showing me the strange behaviour for (compare 1 2)! I've made a small modification to print the types when they are not equal, so that it explains why it is so.
The recursive anonymous function thing really confuses me . I'll have to look into it more .
Search found 61 matches
- Thu Nov 05, 2009 9:50 pm
- Forum: Common Lisp
- Topic: Compare - Examine Object Equality
- Replies: 4
- Views: 5426
- Thu Nov 05, 2009 7:45 pm
- Forum: Common Lisp
- Topic: Runtime compilation strategy
- Replies: 10
- Views: 14017
Re: Runtime compilation strategy
Not that I've got any experience, but instead of generating assembly directly, why not use something like http://llvm.org/, and benefit from all of the optimisers and things in that project It mentions some type of run-time compilation too.
- Tue Nov 03, 2009 4:36 am
- Forum: Common Lisp
- Topic: Compare - Examine Object Equality
- Replies: 4
- Views: 5426
Compare - Examine Object Equality
Hey, I've got this function I think some people might be interested in. I've put it into Lisp Paste: http://paste.lisp.org/+1X85 , and below: (defun compare (a b &optional (out-stream t)) "This function compares a and b for equality. The third argument is where to output the result." (...
- Tue Oct 13, 2009 9:03 pm
- Forum: Common Lisp
- Topic: Optimal boolean expressions evaluation
- Replies: 6
- Views: 8416
Re: Optimal boolean expressions evaluation
This makes me want to be able to tell if a particular form is a mutating/side-effect one or not. I suppose it would be kinda cool to have a compiler macro for this kind of thing.
- Tue Sep 15, 2009 5:35 pm
- Forum: The Lounge
- Topic: Dynamic lisp - dynamic databases?
- Replies: 3
- Views: 7063
Re: Dynamic lisp - dynamic databases?
You raise good points. Thanks for the reply, findinglisp. It seems that there are (at least) two types/categories of persistence: One is like the internet, or the automobile example, which seem reminiscent of cellular bodies, ant colonies (nature seems to have a lot of these), and distributed human ...
- Tue Sep 15, 2009 4:26 pm
- Forum: Common Lisp
- Topic: Combining Two Dissimlar Classes Slots
- Replies: 3
- Views: 4485
Re: Combining Two Dissimlar Classes Slots
My pleasure . It's nice to be able to help out - and I'm gradually getting more proficient with Lisp..........
- Mon Sep 14, 2009 7:48 pm
- Forum: Common Lisp
- Topic: Combining Two Dissimlar Classes Slots
- Replies: 3
- Views: 4485
Re: Combining Two Dissimlar Classes Slots
It jogged my memory, and I found change-class . HTH (defclass aa () ((name :initarg :name :accessor name))) (defclass bb () ((name :initarg :name :accessor name) (c :initarg :c))) (defparameter ana (make-instance 'aa :name :jimmy)) (change-class ana 'bb) ana (name ana) Notice that name still has the...
- Tue Sep 01, 2009 6:03 pm
- Forum: The Lounge
- Topic: Dynamic lisp - dynamic databases?
- Replies: 3
- Views: 7063
Dynamic lisp - dynamic databases?
Has anyone seen or worked on a system that must run all of the time, and could change underlying databases while it is running (and logging/reading/updating)? I would think that the dynamic nature of Lisp would lend itself to that kind of solution. I could almost see a system that has an old DB, and...
- Thu May 07, 2009 8:57 pm
- Forum: Common Lisp
- Topic: Archaic Code Contest in Common Lisp
- Replies: 14
- Views: 19153
Re: Archaic Code Contest in Common Lisp
As an idea for a secure interpreter, how about create a checking program/function/macro that checks to see if the submitted code contains any 'non-secure' function/macro calls? That might be easier than trying to saw off big chunks of lisp.
- Sun Mar 08, 2009 9:01 pm
- Forum: Common Lisp
- Topic: A procedure to extract atoms from a list
- Replies: 11
- Views: 23517
Re: A procedure to extract atoms from a list
How about this? Define a function to map over a tree in a way analogous to mapc, say we call it maptree, and then use it with pushnew:
Code: Select all
(let ((result nil))
(maptree #'(lambda (item)
(when (atom item)
(pushnew item result)))
your-tree)
result)