Search found 64 matches

by qbg
Sat Jun 06, 2009 10:11 am
Forum: Common Lisp
Topic: Slew of DLL Dependencies
Replies: 2
Views: 2338

Re: Slew of DLL Dependencies

My gut feeling is that this is the kind of thing you could make your system definition tool handle, that is tell it that A.dll depends on C.dll and D.dll, etc., and it should be able to load them in the right order.
by qbg
Wed May 13, 2009 9:40 am
Forum: Common Lisp
Topic: HELP HELP postfix calculator that takes postfix expressions
Replies: 1
Views: 1758

Re: HELP HELP postfix calculator that takes postfix expressions

For the calculations, implement at stack machine. Numbers are pushed on the stack, operations pop their arguments and push their result.

For the translation, do the same thing but make the operators push the resulting list instead.
by qbg
Fri May 01, 2009 2:23 pm
Forum: Common Lisp
Topic: Can someone give me some ideas on how to solve this problem?
Replies: 2
Views: 2110

Re: Can someone give me some ideas on how to solve this problem?

Okay, so you are given the structure the data is given to you. Your two main options here are use it as is, or convert it to another form for your use, and then convert back. Either way, it may be useful to break down the problem of adding two polynomials by defining a function, say add-term-to-poly...
by qbg
Tue Apr 07, 2009 9:16 am
Forum: Common Lisp
Topic: between defun and defmacro
Replies: 3
Views: 3323

Re: between defun and defmacro

In this case, (defmacro leopard (dog cat) `(if ,dog "war is over" ,cat)) will do what you want here: (let ((x "happy old year")) (leopard (> 4.99 5) x)) ;; it should give: "happy old year" Though it only works because you don't need to know anything about the variable 'x' at macroexpansion time.
by qbg
Tue Mar 31, 2009 9:20 pm
Forum: Common Lisp
Topic: more newbie help...
Replies: 10
Views: 8306

Re: more newbie help...

gugamilare wrote:
Harleqin wrote:It seems that you are exactly "reinventing" the NTHCDR function.
On the other hand, by his description, he wants to create a function that like butlast, but with reversed order of arguments.
I think you mean LAST there.
by qbg
Wed Mar 25, 2009 7:52 pm
Forum: Common Lisp
Topic: OT: CL use and sources
Replies: 3
Views: 3163

Re: OT: CL use and sources

If you want to embed Common Lisp into a C/C++ program, you could take a look at ECL, which is LGPL.
by qbg
Sun Mar 08, 2009 10:37 am
Forum: Common Lisp
Topic: pushing links, not elements
Replies: 15
Views: 14392

Re: pushing links, not elements

Jasper wrote: Lastly, is there an argumentize-list ((&rest arguments) list &body body) macro? Here it makes and sets variables based on arguments, which are just like that defmacros.
You mean like DESTRUCTURING-BIND?
by qbg
Sat Mar 07, 2009 8:28 pm
Forum: Common Lisp
Topic: pushing links, not elements
Replies: 15
Views: 14392

Re: pushing links, not elements

Cool, didn't think of that, how does that compare performance-wise? You happen to know how loop/dolist do references? Well, it would have to allocate a closure upon creation, and do a function call and comparison for reading/setting, instead of just setting a memory location like you would with a l...
by qbg
Fri Mar 06, 2009 9:11 pm
Forum: The Lounge
Topic: Qt and Lisp...a great opportunity?
Replies: 18
Views: 25810

Re: Qt and Lisp...a great opportunity?

There have been various stabs in the past to make a Qt binding for CL. Writing a Qt binding is likely going to be more difficult than writing a GTK binding; Qt is C++, so that can add some complications. There is also the MOC you may want to deal with. Having the wrapper be lispy would be nice too...
by qbg
Fri Mar 06, 2009 8:55 pm
Forum: Common Lisp
Topic: pushing links, not elements
Replies: 15
Views: 14392

Re: pushing links, not elements

You can create/hack pointers and references in. For example, you could do something like: (untested) (defmacro make-pointer (variable) (let ((op (gensym)) (value (gensym))) `(lambda (,op &optional ,value) (if (eql ,op 'set) (setf ,variable ,value) ,variable)))) (defun deref (pointer) (funcall pointe...