octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pathdef, savepath, ocaverc and Matlab


From: Shai Ayal
Subject: Re: pathdef, savepath, ocaverc and Matlab
Date: Fri, 4 Jan 2008 22:47:30 +0200

On Jan 4, 2008 10:23 PM, John W. Eaton <address@hidden> wrote:
> On  4-Jan-2008, Ben Abbott wrote:
>
> | Regarding (3), to mock the operation of Matlab as closely as possible,
> | it would be preferred that pathdef.m returns the path after startup/
> | octaverc has been run, but before ~/.octaverc (at least thats's the
> | way Matlab works on my Mac.
> |
> | However, there are some problems/features with that. When savepath.m
> | is executed, Matlab saves the path to the equivalent of startup/
> | octaverc. At least that is the default ... Since all users on my Mac
> | have *write* access to that file, I less than happy about Matlab's
> | default.
>
> Really?  I would have thought that the normal Unixy thing to do would
> have those files owned by some other user and not writeable by
> ordinary users.
>
> Apparently Matlab tries pretty hard to write to the system-wide file.
> Here is what I see on a copy of Matlab at UW:
>
>   >> savepath
>   chmod: changing permissions of 
> `/afs/engr.wisc.edu/apps/matlab-r2007a/toolbox/local/pathdef.m': Read-only 
> file system
>
> I don't have a strong opiniont about whether we should copy this
> behavior or not, but it seems that on a reasonable system, ordinary
> users would not be able to write the system file anyway, so maybe it
> doesn't matter so much.
>
> My conclusion is that savepath is a stupid function and shouldn't be
> used, but if you want to provide it for users who expect Octave to be
> just like Matlab, then maybe it should be 100% bug for bug compatible.

Maybe in this case it's not so terrible not to be matlab compatible.
The main reason octave want's to be compatible with matlab is to allow
sharing of code, and secondary reason is because users expect this. I
think that the savepath function is more of an "interactive" command
and would probably not appear in a lot code. As for users, it's
reasonable that these commands are not compatible -- after all, they
don't complain that the executable name is octave, or that the startup
file is ~/.octaverc

Shai


reply via email to

[Prev in Thread] Current Thread [Next in Thread]