Lisp HUG Maillist Archive

LW load paths

Is there something akin to Emacs' load-path that I can do in the .lispworks file to expose various packages I've made and just #'load or #'require by name instead of by full path?

While I've been programming Lisp for quite some time (hobbyist), I've never done "full" development of something major. Perhaps the above question is rendered moot by just saving an image or using quicklisp, etc, but ATM I'm hoping there's just a simple thing like:

(push #p"~/Projects/lisp-stuff/" *load-paths*)

I've been looking through the docs, sample .lispworks and configure.lisp files and not seeing anything. Thanks in advance.

Jeff M.

Re: LW load paths

On Sep 27, 2012, at 19:52 , Jeff Massung <massung@gmail.com> wrote:
> Is there something akin to Emacs' load-path that I can do in the .lispworks file to expose various packages I've made and just #'load or #'require by name instead of by full path?
> 
> While I've been programming Lisp for quite some time (hobbyist), I've never done "full" development of something major. Perhaps the above question is rendered moot by just saving an image or using quicklisp, etc, but ATM I'm hoping there's just a simple thing like:
> 
> (push #p"~/Projects/lisp-stuff/" *load-paths*)
> 
> I've been looking through the docs, sample .lispworks and configure.lisp files and not seeing anything. Thanks in advance.
> 
> Jeff M.

My advice is that you should just go for quicklisp. Assuming that you have created asdf definitions for your own code, compiling/loading a module is as simple as 

(ql:quickload :my-project)

As a bonus, quicklisp will also pull in all of your dependencies for you, and if there are dependencies that quicklisp does not know about, you can add these manually into a place where quicklisp will find them (the same place that you'll have to place your own code - ~/quicklisp/local-projects).



_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Re: LW load paths

Jeff Massung wrote on Thu, 27 Sep 2012 12:52:07 -0500 21:52:

| Is there something akin to Emacs' load-path that I can do in the
| .lispworks file to expose various packages I've made and just #'load or
| #'require by name instead of by full path?

Maybe lw:current-pathname can fit. (If *load-pathname* is not enough.)
--
Sincerely,
Dmitriy Ivanov
lisp.ystok.ru

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Re: LW load paths

On 27 Sep 2012, at 18:52, Jeff Massung wrote:

> Is there something akin to Emacs' load-path that I can do in the .lispworks file to expose various packages I've made and just #'load or #'require by name instead of by full path?

I don't think LW has anything by default.  I mostly agree with whoever said "use Quicklisp": it really is the answer to this I think.

However I have some stuff which lets you install things in one or more directory trees and then provides a wrapper around require which will search for them.  It assumes you use structured module names (though if they're flat it will work, they just will all end up in a smaller subset of directories).

A version of this lives here: http://www.tfeb.org/lisp/implementation-hax.html, but it looks as if it's out of date.  If you are interested I will merge across the current version.  It's all quite old now, and is historically entangled with a bunch of other stuff (defining new colon commands in LW, and the definition of some that I used), but it could be extracted if you wanted it standalone, perhaps.

--tim

So, for instance, at the command level (and with verbosity cranked up):

CL-USER 3 > :require "ORG.TFEB.HAX.COLLECTING" :pretend t :verbose t
Looking for module "ORG.TFEB.HAX.COLLECTING"
Probing TFB:LIB;MODULES;ORG;TFEB;HAX;COLLECTING;COLLECTING-LOADER.LISP
 as     /Users/tfb/lib/lw/modules/org/tfeb/hax/collecting/collecting-loader.lisp
 from (:host
       "TFB"
       :directory
       (:absolute "LIB" "MODULES")
       :name
       "*-LOADER"
       :type
       "LISP")
Probing TFB:LIB;MODULES;ORG;TFEB;HAX;COLLECTING-LOADER.LISP
 as     /Users/tfb/lib/lw/modules/org/tfeb/hax/collecting-loader.lisp
 from (:host
       "TFB"
       :directory
       (:absolute "LIB" "MODULES")
       :name
       "*-LOADER"
       :type
       "LISP")
Probing TFB:LIB;MODULES;ORG;TFEB;HAX;COLLECTING;LOADER.LISP.NEWEST
 as     /Users/tfb/lib/lw/modules/org/tfeb/hax/collecting/loader.lisp
 from (:host
       "TFB"
       :directory
       (:absolute "LIB" "MODULES")
       :name
       "LOADER"
       :type
       "LISP")
Probing TFB:LIB;MODULES;ORG;TFEB;HAX;COLLECTING;COLLECTING.LISP
 as     /Users/tfb/lib/lw/modules/org/tfeb/hax/collecting/collecting.lisp
 from (:host
       "TFB"
       :directory
       (:absolute "LIB" "MODULES")
       :name
       "*"
       :type
       "LISP")
Probing TFB:LIB;MODULES;ORG;TFEB;HAX;COLLECTING.LISP
 as     /Users/tfb/lib/lw/modules/org/tfeb/hax/collecting.lisp
 from (:host
       "TFB"
       :directory
       (:absolute "LIB" "MODULES")
       :name
       "*"
       :type
       "LISP")
Probing CLEY:LIB;MODULES;ORG;TFEB;HAX;COLLECTING;COLLECTING-LOADER.LISP
 as     /Local/packages/lispworks/lib/modules/org/tfeb/hax/collecting/collecting-loader.lisp
 from (:host
       "CLEY"
       :directory
       (:absolute "LIB" "MODULES")
       :name
       "*-LOADER"
       :type
       "LISP")
Probing CLEY:LIB;MODULES;ORG;TFEB;HAX;COLLECTING-LOADER.LISP
 as     /Local/packages/lispworks/lib/modules/org/tfeb/hax/collecting-loader.lisp
 from (:host
       "CLEY"
       :directory
       (:absolute "LIB" "MODULES")
       :name
       "*-LOADER"
       :type
       "LISP")
Probing CLEY:LIB;MODULES;ORG;TFEB;HAX;COLLECTING;LOADER.LISP.NEWEST
 as     /Local/packages/lispworks/lib/modules/org/tfeb/hax/collecting/loader.lisp
 from (:host
       "CLEY"
       :directory
       (:absolute "LIB" "MODULES")
       :name
       "LOADER"
       :type
       "LISP")
Probing CLEY:LIB;MODULES;ORG;TFEB;HAX;COLLECTING;COLLECTING.LISP
 as     /Local/packages/lispworks/lib/modules/org/tfeb/hax/collecting/collecting.lisp
 from (:host
       "CLEY"
       :directory
       (:absolute "LIB" "MODULES")
       :name
       "*"
       :type
       "LISP")
Probing CLEY:LIB;MODULES;ORG;TFEB;HAX;COLLECTING.LISP
 as     /Local/packages/lispworks/lib/modules/org/tfeb/hax/collecting.lisp
 from (:host
       "CLEY"
       :directory
       (:absolute "LIB" "MODULES")
       :name
       "*"
       :type
       "LISP")
Found /Local/packages/lispworks/lib/modules/org/tfeb/hax/collecting.xfasl
Would load "ORG.TFEB.HAX.COLLECTING" from /Local/packages/lispworks/lib/modules/org/tfeb/hax/collecting.xfasl
"ORG.TFEB.HAX.COLLECTING"




_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Updated at: 2020-12-10 08:36 UTC