Module manager

Notices and updates
Locked
Jeff
Posts: 604
Joined: Sat Apr 07, 2007 2:23 pm
Location: Ohio
Contact:

Module manager

Post by Jeff »

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
Jeff
=====
Old programmers don't die. They just parse on...

Artful code

Tim Johnson
Posts: 253
Joined: Thu Oct 07, 2004 7:21 pm
Location: Palmer Alaska USA

Post by Tim Johnson »

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

ale870
Posts: 297
Joined: Mon Nov 26, 2007 8:01 pm
Location: Italy

Post by ale870 »

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!
--

tom
Posts: 168
Joined: Wed Jul 14, 2004 10:32 pm

Post by tom »

oops, replied to the wrong thread, sorry.

Tim Johnson
Posts: 253
Joined: Thu Oct 07, 2004 7:21 pm
Location: Palmer Alaska USA

Post by Tim Johnson »

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

Locked