Search found 406 matches
- Wed Apr 11, 2012 2:03 pm
- Forum: Common Lisp
- Topic: Where is an input-output stream
- Replies: 2
- Views: 5814
Re: Where is an input-output stream
So, what you want is a virtual file? I think the only way to do that would be to use Gray Streams or Simple Streams. I did it a while ago using the compatibility library Flexi-Streams using in-memory streams, but it ended not working quite the way I expected it to. I hope you have more luck with it ...
- Sat Mar 17, 2012 1:39 pm
- Forum: Common Lisp
- Topic: Need a *general purpose* way to APPLY macros and special ops
- Replies: 9
- Views: 13082
Re: Need a *general purpose* way to APPLY macros and special
Make sure this will actually be needed in whatever you are doing. Premature optimization might be bad, but premature generalization is just as bad. Both might draw you away from what you are actually trying to achieve.
- Fri Mar 16, 2012 7:23 am
- Forum: Common Lisp
- Topic: Need a *general purpose* way to APPLY macros and special ops
- Replies: 9
- Views: 13082
Re: Need a *general purpose* way to APPLY macros and special
Why would it need to involve eval? Obviously I don't know the precise steps involved, but special operators can be called at runtime, so it's just a matter of bindings... so the compiler/intepreter is not build to handle late(r) bindings for special ops? Is that the issue? I don't particularly care...
- Mon Mar 12, 2012 3:49 pm
- Forum: Common Lisp
- Topic: Another question about Macro vs. Function
- Replies: 5
- Views: 8613
Re: Another question about Macro vs. Function
You need to write SWAP-OPERATORS as a macro as well.
The macro solution have one limitation: you can only use expressions that you know at compile-time. If you want to generate an expression at run-time, the macros won't work.
The macro solution have one limitation: you can only use expressions that you know at compile-time. If you want to generate an expression at run-time, the macros won't work.
- Sun Mar 11, 2012 2:01 pm
- Forum: Common Lisp
- Topic: Another question about Macro vs. Function
- Replies: 5
- Views: 8613
Re: Another question about Macro vs. Function
I think the better way to implement this is to use EVAL like the first version of the function TABLE in P46. And, yes, I think this is a legitimate use of EVAL, because what you want is to evaluate expressions and see the result of the evaluation.
- Sun Mar 11, 2012 6:40 am
- Forum: Common Lisp
- Topic: Another question about Macro vs. Function
- Replies: 5
- Views: 8613
Re: Another question about Macro vs. Function
Hi all, while fiddling about the 99 Lisp Problems (P46, e.g. [1]) I ran into a situation where I was able to implement a simple solution based on a macro while I am failing getting it done by a function. This gives me a bad feeling and I would love to have someone more experienced comment on my sol...
- Sat Mar 10, 2012 12:37 pm
- Forum: The Lounge
- Topic: Hi everyone!
- Replies: 6
- Views: 15703
Re: Hi everyone!
Welcome, d3v
- Wed Mar 07, 2012 6:57 pm
- Forum: The Lounge
- Topic: the 8 puzzle
- Replies: 3
- Views: 10566
Re: the 8 puzzle
It's not about a simetry, it's about the possible states that you can reach. There are 9! possible states, but half of those states are not reachable.
Wikipedia explains this.
Wikipedia explains this.
- Mon Mar 05, 2012 3:31 pm
- Forum: Common Lisp
- Topic: LISP code for intel 386
- Replies: 1
- Views: 3944
Re: LISP code for intel 386
You'll have to be more specific. If what you want is to compile or execute Common Lisp code, what you need is a Lisp implementation. You'll find a list of implementation here.
- Fri Mar 02, 2012 3:14 am
- Forum: Common Lisp
- Topic: Create a method dynamically for an instance of a class
- Replies: 4
- Views: 6589
Re: Create a method dynamically for an instance of a class
If you want to define methods at run-time, you can use MOP (Metaobject Protocol) via closer-mop.