On 19 May 2011 17:29, Martin Buchmann <martin.buchmann@...> wrote:
> Hi all,
>
> Sorry for asking a real newbie question but I am somehow lost. I want to pack some of my helper functions in such a way that sbcl loads them at startup. I think the most easiest way could be to pack it in my .sbclrc file. But I want to store them in their own package. If have found a lot of information about defpackage, require, adsf and quicklisp but at the moment I am not seeing the light at the end of the tunnel. I do not want to create a complex system definition. I just want to tell sbcl to load a file at startup (or it's compiled version) and have all the definitions available in their own namespace. Maybe I will later have different kinds of helper functions for list manipulation, macro programming, general shortcuts, etc., and I want a sound basis to prevent any conflict to third party functions and macros, etc.
>
> In emacs lisp I would just add the resulting file in the load-path and use require to make my definitions available. Is there something like a load-path definition in cl or sbcl which I could adjust locally to my needs?
>
> Thanks for any hint
> Martin
>
>
If your stuff fits in a single file, your .sbclrc could be:
(load "/path/to/my/stuff.lisp")
If your stuff is many files, make it into an ASDF system, and use:
(require :asdf)
(asdf:load-system :my-stuff :verbose nil)
Store your stuff in one of the pre-configured paths, or add your thing
to the ASDF configuration. See the ASDF manual if you have problems
with that.
[ François-René ÐVB Rideau | Reflection&Cybernethics | http://fare.tunes.org ]
You know your children are growing up when they stop asking you where they
came from and refuse to tell you where they’re going.
|