Re: Independent Euphoria Interpreter

new topic     » goto parent     » topic index » view thread      » older message » newer message

Matt Lewis wrote:

> c.k.lester wrote:
> > 
> > How close are we to this?
> > 
> >     <a
> >     href="http://rapideuphoria.wiki.sourceforge.net/nix+config">http://rapideuphoria.wiki.sourceforge.net/nix+config</a>
> 
> I've started a new branch in svn to work on this concept.  As I started 
> coding (haven't had much time for that lately) I came up with lots of 
> questions, and updated the wiki.
> 
> My questions are about supporting multiple files, and little implementation
> details like that.  I'd suggest that those who are interested in the topic
> keep current with the wiki, and update it or post discussion there (we can
> talk about it here, too, but it's nice to have all of that stuff in a 
> central location).
> 
> svn URL for the branch:
> <a
> href="https://rapideuphoria.svn.sourceforge.net/svnroot/rapideuphoria/branches/nix">https://rapideuphoria.svn.sourceforge.net/svnroot/rapideuphoria/branches/nix</a>

Some comments about the updated page.

On the page it currently reads:
| Specifying a config file on the command line would preclude looking in
| the other places.

Yes, this will provide maximal flexibility.

And:
| Should more than one file be allowed? A system wide file could be stored
| in /etc/... and each user could have their own for additional directories
| (presumably in their home directory structure somewhere).

What does that question mean?
Should more than one file be allowed to be specified on the command line?
No, it should be only allowed to specify either 0 or 1 config file on
the command line.
Should more than one file be allowed to exist on the hard disk?
Yes, that's why a smart search order is very important.

On the page it also reads:
| A nominal search order might be (and this would also define the order in which
| directories are searched):
|
|   * command line switches (based on the order encountered on the command line)
|         o -c command line switch
|         o -i command line switch (a specific directory)
|   * ~/.euinc.conf or %APPDATA%\euphoria\euinc.conf
|   * euinc.conf local to the interpreter (mainly for a portable config)
|   * /etc/euphoria/euinc.conf %ALLUSERSPROFILE%\euphoria\euinc.conf (the
system-wide config)

Can you please elaborate on this?
Why two different switches for specifying a config file??

The order in this list is not good:
A 'euinc.conf' file local to the interpreter/translator should have the
2nd priority, i.e. such a config file should be more important than a
user-specific config file in say %APPDATA%\euphoria\.
All portable applications that I know, do follow this search order.

E.g. when I have Euphoria on my USB drive, and I visit a friend who has
Eu installed on his PC, and I want to show one of my programs to him by
running it from my USB drive, then the program on the USB drive should
use the config file on the USB drive, and not any config file on my
friend's hard disk. That's the reason why this search order is important.

So the search order should be:
1) config file specified on the command line
2) config file in the same directory as the interpreter/translator
3) user-specific "typical" config directory on the hard disk
4) "typical" system-wide config directory on the hard disk

Regards,
   Juergen

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu