newLISP Fan Club

Forum => newLISP newS => Topic started by: Jeff on July 29, 2008, 11:21:36 AM

Title: Module manager
Post by: Jeff on July 29, 2008, 11:21:36 AM
I added a module manager, uh, module, to Artful Code.  It lets you define dependencies between modules so that they are only loaded once.  All of the Artful Code modules' dependencies are added as well (http://static.artfulcode.net/newlisp/dependencies.lsp).



http://static.artfulcode.net/newlisp/nlmod.lsp.html
Title:
Post by: Tim Johnson on August 02, 2008, 06:13:07 PM
Haven't had time to look at it thoroughly, and won't for a couple of days,

but have been using something similar since I started using newlisp.

(blocks accidental redundant loads) - I consider blocking of redundant loads

to be absolutely essential, and I also wrote (do mod reload) to

cause an explicit reload......

I'll look at your code soon, I know there is a bug in mine...

thanks

tim
Title:
Post by: ale870 on August 04, 2008, 08:27:27 AM
I think that is a great improvement for newLisp.

I will try to check it as soon as possible. If it works well, I think it could be even included in the official newLisp distribution!
Title:
Post by: tom on August 04, 2008, 06:32:43 PM
oops, replied to the wrong thread, sorry.
Title:
Post by: Tim Johnson on August 06, 2008, 12:19:02 PM
The link below is literally the first working code that I wrote in newlisp.

http://www.johnsons-web.com/demo/newlisp/init.lsp

Two public functions are:

modules

do

'modules loads a list of libraries, can be symbols, if so - coerced

to a string and ".lsp" appended.

Theoretically :-) a library can be only loaded once, blocking

redundant loads. - If one does not use 'load

'do can override this by passing a 'reload argument that evaluates

to true.

Comments welcome, haven't had time to check out Jeff's work, I think

that he takes a more sophisticated approach.

thanks

tim