TypeTraits for Parameters1114 (5/27/2010 2:38:57 AM) comp.lang.c++.moderated So we have this templated factory for COM objects. A simplistic view
of it would be the following:
template
class Creator
{
public:
// const& arguments
template
static HRESULT Create... jrwats
template function within class template not not resolving?1170 (2/28/2010 6:12:33 PM) comp.lang.c++ I'm trying to write a templated function within a templated class, but
keep getting:
Test.h:31: error: no matching function for call to
=91List::Map(List::blah() [with T =3D int]::Functor)=92
Test.h:45: err... jrwats
Circular slot/member reference when defining class10211 (11/24/2009 5:01:37 PM) comp.lang.lisp So in C++ when class A needs a pointer to class B and likewise class B
needs the same you just do:
// A.h
class B;
class A {
//...
B* pb;
};
// B.h
class A;
class B {
//...
A* pa... jrwats
slime question: sldb-mode slime-goto-source broken?127 (10/17/2009 3:44:52 AM) comp.lang.lisp So I have this simple file 1.lisp with the content: (defun break-me (one two) (print (list one two))) (defun this-will-break () ;; breaks since break-me wants 2 arguments (break-me 1)) at the slime repl ... jrwats
cleaner nested iterate loop?432 (9/27/2009 3:03:42 AM) comp.lang.lisp for anyone familiar with the iterate package, is there a way to do this without nesting iters? A separate construct? (iter (for i on (list 1 2 3 4)) (iter (for j on (cdr i)) (iter (for g on ... jrwats
recursive lambda342 (9/25/2009 4:23:42 PM) comp.lang.lisp so I'll the recursive lambda's I've seen don't solve the keyword problem. My question is it non-trivial? i.e. is the following missing something? (defmacro lambda-rec (name args &body body) "Just like lam... jrwats
reader macros in packages735 (9/24/2009 8:01:50 PM) comp.lang.lisp Hi All, Is it possible to tuck away a reader macro in a defpackage? Does loading a package that defines one do nothing? Or does it alter the reader? Regards, John Watson ... jrwats
Language Shootout explanation?632 (8/11/2009 4:46:16 PM) comp.lang.lisp Here is a link to the comparison between C++ and Lisp. Lisp doesn't fair too bad for most things but then blows up in the k-nucleotide test (15x slower than C++). I took a 10 minute look at the source code an... jrwats
Unsafe bit Math?834 (8/4/2009 2:08:17 PM) comp.lang.lisp So is there any way to tell common lisp that you want the result from the function ash to be an unsigned-byte of bit-size 64 and to truncate it? (defun shift(num offs) (declare (type uint64 num) (... jrwats
Coding challenge! non-destructuve matrix transpose5530 (9/18/2008 3:57:00 AM) comp.lang.lisp Hi all - this is not for a school project or anything (I'm a full- timer at the software company ppl love to hate), but I was trying to do an exercise in the back of ch 6 of Wilensky's book, Comon LISPcraft. A... jrwats(80)
How does #'last do it?!?!821 (9/18/2008 3:45:38 PM) comp.lang.lisp The at the end of this post surprised me (not too much because I figured last would have to be optimized in order for it to be used so frequently). The fact that last does not slow down with larger lists means... jrwats(80)
Coding challenge: Can you make this function more elegant?4028 (12/9/2008 1:29:26 AM) comp.lang.lisp Destructively moves the "best" element (according to the predicate function passed in) to the front of a list. Feel free to improve the code by using other functions, recursion, etc, but it must only visit eac... jrwats(80)
Mutually referential class templates617 (1/17/2009 6:23:46 PM) comp.lang.c++ I would like to have a class template A that takes a class B as it's template parameter and has a static instance ofr it. However that same B class needs to know class A via templatization. See below templat... jrwats(80)
calling constructor from constructor1223 (2/11/2009 4:35:02 AM) comp.lang.c++ So at my work, people are morally opposed to default arguments and prefer function overloading. Put your opinions about that aside for the moment (because I don't have a choice but to bow down to coding standa... jrwats(80)
Unsafe bit Math?834 (8/4/2009 2:08:17 PM) comp.lang.lisp So is there any way to tell common lisp that you want the result from the function ash to be an unsigned-byte of bit-size 64 and to truncate it? (defun shift(num offs) (declare (type uint64 num) (... jrwats(80)
reader macros in packages735 (9/24/2009 8:01:50 PM) comp.lang.lisp Hi All, Is it possible to tuck away a reader macro in a defpackage? Does loading a package that defines one do nothing? Or does it alter the reader? Regards, John Watson ... jrwats(80)
recursive lambda342 (9/25/2009 4:23:42 PM) comp.lang.lisp so I'll the recursive lambda's I've seen don't solve the keyword problem. My question is it non-trivial? i.e. is the following missing something? (defmacro lambda-rec (name args &body body) "Just like lam... jrwats(80)
cleaner nested iterate loop?432 (9/27/2009 3:03:42 AM) comp.lang.lisp for anyone familiar with the iterate package, is there a way to do this without nesting iters? A separate construct? (iter (for i on (list 1 2 3 4)) (iter (for j on (cdr i)) (iter (for g on ... jrwats(80)