Search found 29 matches

by sinnatagg
Sat Jun 20, 2015 9:50 am
Forum: Common Lisp
Topic: How do common lisp frameworks deal with packages?
Replies: 3
Views: 10902

Re: How do common lisp frameworks deal with packages?

There are several unit test packages for CL. I use one called five-am.

You can import the symbols you need into a separate test package, there is no need to mess up your original package when running tests.

-a
by sinnatagg
Sat Jul 21, 2012 10:29 am
Forum: Common Lisp
Topic: need help with with-open-file() style macro
Replies: 2
Views: 5792

need help with with-open-file() style macro

Ayup, I'm trying to create a macro binding a symbol in the same manner as with-open-file(): (defmacro with-experiment ((experiment file) &body body) `(let* ((,experiment (read-experiment-file ,file))) ,@body)) This works but I'm a bit worried that "file" is evaluated before "exper...
by sinnatagg
Sun Jul 01, 2012 4:33 am
Forum: Common Lisp
Topic: Questions about how lisp uses memory
Replies: 2
Views: 4949

Re: Questions about how lisp uses memory

I have a few questions. If there is more than one variable with the same value, are there two places in memory with the same value or do they both point to the same address in memory? It is my understanding that this is often the case for numbers and characters, but that you can't rely on it. See t...
by sinnatagg
Thu Jun 21, 2012 1:52 am
Forum: Common Lisp
Topic: Separate lisp and foreign name for cffi defcstruct?
Replies: 3
Views: 6643

Re: Separate lisp and foreign name for cffi defcstruct?

Thanks, I didn't notice that structs aren't exported and is only described in the code.

Any symbol for the struct does indeed work fine.


-a
by sinnatagg
Sat Jun 16, 2012 3:46 am
Forum: Common Lisp
Topic: Separate lisp and foreign name for cffi defcstruct?
Replies: 3
Views: 6643

Separate lisp and foreign name for cffi defcstruct?

Is it possible to assign a separate lisp name for foreign structs in cffi? ie. in LispWorks FLI one can do (fli:define-c-struct (do-foo :foreign-name "do_foo") ...) But as far as I can see there is no similar option for cffi. Is it the case that the defcstruct name can be arbitrary and is ...
by sinnatagg
Sat Jun 16, 2012 3:34 am
Forum: Common Lisp
Topic: difference between cffi mem-ref/mem-aref
Replies: 2
Views: 4633

Re: difference between cffi mem-ref/mem-aref

Thanks, didn't think of looking at the source :oops:


-a
by sinnatagg
Fri Jun 15, 2012 12:28 am
Forum: Common Lisp
Topic: difference between cffi mem-ref/mem-aref
Replies: 2
Views: 4633

difference between cffi mem-ref/mem-aref

What is the difference between these two cffi functions? The fine manual is rather terse about this and I haven't managed to make them do something different yet.


-a
by sinnatagg
Fri Jun 15, 2012 12:26 am
Forum: Common Lisp
Topic: Getting the directory of executable (like GetModuleFileName)
Replies: 10
Views: 17762

Re: Getting the directory of executable (like GetModuleFileN

Thanks for your reply. I'll try out *load-truename* as soon as I can. I am very curious if it is properly bound when using an executable created with saveinitmem. You need to check both *load-truename* and *compile-file-truename* since your code may be either evaluated or compiled. My preferred app...
by sinnatagg
Wed Sep 21, 2011 2:42 am
Forum: Common Lisp
Topic: ASDF and :force t
Replies: 0
Views: 4709

ASDF and :force t

Ayup we generally do "unit" testing and delivery builds in fresh images to avoid old macro definitions and other stale fasl problems. Here we have to use (asdf:operate 'asdf:load-op :blabla :force t) to force recompilation of all the lisp files in our project. But this recompiles all our d...
by sinnatagg
Tue Aug 16, 2011 2:23 am
Forum: Common Lisp
Topic: command line parsing?
Replies: 4
Views: 7224

Re: command line parsing?

Ayup, thanks for you r extensive replies! Coincidentally, this morning I ended up using Getopt for a small script. Your previous post must have planted a seed because I haven't written a Lisp program invokable from the shell for a very long time. It seemed to work well and was simple to get working....