Re: Independent Euphoria Interpreter

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

Juergen Luethje wrote:
> 
> 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.

Yeah, that wasn't terribly coherent.  I was basically proposing something,
and asking for comments, because I'm not sure it's the right way.  Could
you elaborate on why only one file on the command line?  

My thought on this is that we're basically going to maintain a sequence of 
directories in which to look for include files.  Every time we encounter a 
new directory [not already in the sequence] we'll append it.  When we try 
to find an include file, we'll just use this list to try to open the file.

So it's not as though any of the files will step on each other with 
contradictory settings or anything.  Here's a question for you, since you
brought it up. :)

When we talk about 'relative paths' are you saying relative to the 
interpreter?  Does that only make sense for the local conf file?  It seems
like you'd almost have to.  What do relative paths mean for the other files?

> |   * 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)
> 
> Can you please elaborate on this?
> Why two different switches for specifying a config file??

One is a config file (using the -c switch), and another is passing a 
directory right there on the command line.  It's 'inspired' by C compilers, 
which do a similar thing with the -i switch (typically).

> 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

Good points.  I'll update the wiki.

Matt

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

Search



Quick Links

User menu

Not signed in.

Misc Menu