[Openmcl-devel] Best practice for writing a loader (def-pathname blues)

Gary King gwking at metabang.com
Mon Jan 16 14:39:17 PST 2006


Hi Peter,

If you're needs get more complex, you might want to look at a "system  
definition facility". This is a fancy name for something that groups  
your source together and lets you operate on them somewhat  
"intelligently". Because the CL standard didn't specify a system  
definition facility, there are many in existence. Two well-known  
examples are MK-Defsystem (http://www.cliki.net/mk-defsystem) and  
Another System Definition Facility (ASDF) (http://www.cliki.net/ 
asdf). Both of these have some documentation and sample files.

Good luck,

On Jan 16, 2006, at 5:42 AM, Peter Braroe wrote:

> Hi all!
>
> Thus is a oldbie post: I am trying to write a loader for a small  
> project to
> work. I looked at some old code (written for Allegro CL 1.22! :-)  
> that uses:
>
>
> (def-logical-pathname "path" "Machintosh HD:MyDir")
>
> And then
>
> (load "path;myfile")
>
> However this does not seem to work these days!
>
> Question: What is the correct "best practice" way to write a loader  
> today?
> Anyone have some elegant example code out there?
>
> I found some uses of (make-pathname ... ) but is that the way to go?
>
> The make-pathname command seems to stipulate that one defines the  
> filetype
> also and what if I want to load other files containing data from  
> the same
> directory - do I have to define two pathnames then?
>
> And what about packages - do I need to define which package a file  
> belongs
> to in every file (like java)?
>
> And if I use packages do I always need to do export/use-package and  
> such to
> be able to call my functions(methods)
>
> Hope this makes sense to someone and that this is not too annoyingly
> obvious!
>
> It's always amusing too see when doing something new that the  
> difficult
> stuff is best documented and the easy big picture stuff (that one  
> always is
> clueless about) is hard to find answers too!
>
> Thanks beforehand all!
>
> /Peter
>
>
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel


-- 
Gary Warren King
metabang.com
http://www.metabang.com/





More information about the Openmcl-devel mailing list