newLISP Fan Club

Forum => Anything else we might add? => Topic started by: konrad on September 07, 2007, 04:44:21 AM

Title: Autoloading
Post by: konrad on September 07, 2007, 04:44:21 AM
One thing I have missed coming from python is the ability to have load find

modules for me, rather than having to know where they are on they are on the filesystem.



Writing somthing like this is easy. The question however is what should the searchpath be?



currently I'm using:





"."

"./modules"

"/home/USER/.newlisp/modules"

"/usr/local/share/newlisp/modules"

"/usr/share/newlisp/module"





is there any kind of general consensus on this. Along the same lines is there any sites which index and list the available newLisp modules, somthing along the lines of the kind of master repostories that Perl and Python have ?



PS the code I wrote is quite unix specific but I do plan to share it once I work out a good home for it, either google code or sourceforge would is likely at the moment.
Title:
Post by: Jeff on September 07, 2007, 05:05:46 AM
You might want to write a function that determines the default newlisp directory based on the os environment, and then use that by itself and with /modules tacked on.  That would be more extensible.
Title:
Post by: konrad on September 07, 2007, 03:46:08 PM
At the moment I have a Context with a paths symbol that evaluates to a list.

you are correct in that this symbol should be set based on the current platform.