Kara-Moon Forum
April 24, 2024, 09:13:58 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: You can go back to the main site here: Kara-Moon site
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Changes to the library paths  (Read 4987 times)
bvdp
Kara-Moon Master
****
Posts: 1437


WWW
« on: March 07, 2012, 09:26:20 PM »

I think I'm not busy enough Smiley

I've just finished reworking the entire library path stuff for mma.

 - The autolib / setautolib stuff is gone.

 - the libpath settings can now include multiple directories (handy if you want the system defaults and your own personal depository)

 - the -g/-G options process though the same libraries as the USE libs. Makes it much more easy and clear for the user.

 - one (unfortunate?) issue is that the MMAIGNORE setting effects a directory, not the sub dirs in that dir. This probably makes sense, but is a change. Not that many are using either MMAIGNORE or have deeply nested dirs.

To sum this up, the start up finds a default libpath (ie /usr/local/mma/lib) and expands the dirs there into a list of locations to search ( /usr/local/mma/lib/stdlib, /usr/local/mma/lib/other, etc). If the user wants more, he can do something like:

   SetLibPath  mymmalib $_LibPath

This inserts the users lib into the mix and the tree is re-read (well, more complicated than that, but that is the result).

I think it's pretty easy and elegant.

Oh, and the -g/-G stuff seems to work find as well under this scheme.

Comments, suggestions, etc. welcome.
Logged

My online life: http://www.mellowood.ca
alexis
Jr. Member
*
Posts: 62


« Reply #1 on: March 07, 2012, 10:21:18 PM »

  SetLibPath  mymmalib $_LibPath

Does this work in .mmarc file as well? Does a macro such as $_LibPath make sense in this kind of file? I'm afraid it will work only in .mma files.

My main concern was:
  • Being able to use standard grooves (in distribution dir) AND personal grooves (dir in home, My documents, ...) in the same data file.
  • Removing dependency to personal grooves dir(s) in data files. This should be user-specific and thus typically be defined in .mmarc file.

Best,

Alexis
Logged
bvdp
Kara-Moon Master
****
Posts: 1437


WWW
« Reply #2 on: March 07, 2012, 11:00:19 PM »

  SetLibPath  mymmalib $_LibPath

Does this work in .mmarc file as well? Does a macro such as $_LibPath make sense in this kind of file? I'm afraid it will work only in .mma files.

Yes, this should be no problem. The .mmarc file(s) are processed before any libpath expansion. Actually, what happens is:

  - as part of the init the base libpath is set
  - mmarc files are read/processed.
  - the .mma file is read.

It's not until an actual call to an automatic groove or a USE that we bother to expand the libpath(s) into their sub-dirs.

Quote
My main concern was:
  • Being able to use standard grooves (in distribution dir) AND personal grooves (dir in home, My documents, ...) in the same data file.
  • Removing dependency to personal grooves dir(s) in data files. This should be user-specific and thus typically be defined in .mmarc file.

Best,

Alexis

Yes, that is the whole idea. It seems to be pretty much working here. But, I want to test more before I try it out on you guys Smiley
Logged

My online life: http://www.mellowood.ca
alexis
Jr. Member
*
Posts: 62


« Reply #3 on: March 08, 2012, 12:26:15 PM »

Quote
Quote
Does this work in .mmarc file as well? Does a macro such as $_LibPath make sense in this kind of file? I'm afraid it will work only in .mma files.

Yes, this should be no problem. The .mmarc file(s) are processed before any libpath expansion. Actually, what happens is:
Good!  Smiley

Quote
Yes, that is the whole idea. It seems to be pretty much working here. But, I want to test more before I try it out on you guys Smiley
OK. I'll also test it under Windows when it's ready.
Logged
bvdp
Kara-Moon Master
****
Posts: 1437


WWW
« Reply #4 on: March 08, 2012, 04:23:59 PM »

I think it's working. The new scheme seems to be much faster in finding grooves and in doing database updates. I'm a bit worried about that Smiley

I'm going to add multiple paths to the include directory as well.

Logged

My online life: http://www.mellowood.ca
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.049 seconds with 19 queries.