Fwd: Matlab p files

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Fwd: Matlab p files

jbect
Hello,

Someone asked on the help list about running Matlab P-files in Octave.

I tried to answer that in the FAQ :
http://wiki.octave.org/FAQ#How_do_I_run_a_Matlab_P-file_in_Octave.3F.

Just wanted to check here that what I wrote is OK before answering on
the help list...

@++
Julien

Reply | Threaded
Open this post in threaded view
|

Re: Matlab p files

Juan Pablo Carbajal-2
On Wed, May 25, 2016 at 4:56 PM, Julien Bect
<[hidden email]> wrote:

> Hello,
>
> Someone asked on the help list about running Matlab P-files in Octave.
>
> I tried to answer that in the FAQ :
> http://wiki.octave.org/FAQ#How_do_I_run_a_Matlab_P-file_in_Octave.3F.
>
> Just wanted to check here that what I wrote is OK before answering on the
> help list...
>
> @++
> Julien
>
If the code is just obfuscated and not encrypted; that is, it is just
very complex and hard to understand valid matlab commands; then .p
files can be run in octave using the function source

Reply | Threaded
Open this post in threaded view
|

Re: Matlab p files

José Luis García Pallero
2016-05-25 17:30 GMT+02:00 Juan Pablo Carbajal <[hidden email]>:

> On Wed, May 25, 2016 at 4:56 PM, Julien Bect
> <[hidden email]> wrote:
>> Hello,
>>
>> Someone asked on the help list about running Matlab P-files in Octave.
>>
>> I tried to answer that in the FAQ :
>> http://wiki.octave.org/FAQ#How_do_I_run_a_Matlab_P-file_in_Octave.3F.
>>
>> Just wanted to check here that what I wrote is OK before answering on the
>> help list...
>>
>> @++
>> Julien
>>
> If the code is just obfuscated and not encrypted; that is, it is just
> very complex and hard to understand valid matlab commands; then .p
> files can be run in octave using the function source

Apparently, there is a guy who wrote a decoder:
https://sites.google.com/site/sippeyfunlabs/matlab-hacks/please-do-not-secure-your-password-in-matlab-p-code

>



--
*****************************************
José Luis García Pallero
[hidden email]
(o<
/ / \
V_/_
Use Debian GNU/Linux and enjoy!
*****************************************

Reply | Threaded
Open this post in threaded view
|

Re: Matlab p files

jbect
In reply to this post by Juan Pablo Carbajal-2
Le 25/05/2016 17:30, Juan Pablo Carbajal a écrit :
On Wed, May 25, 2016 at 4:56 PM, Julien Bect
[hidden email] wrote:
Hello,

Someone asked on the help list about running Matlab P-files in Octave.

I tried to answer that in the FAQ :
http://wiki.octave.org/FAQ#How_do_I_run_a_Matlab_P-file_in_Octave.3F.

Just wanted to check here that what I wrote is OK before answering on the
help list...

@++
Julien

If the code is just obfuscated and not encrypted; that is, it is just
very complex and hard to understand valid matlab commands; then .p
files can be run in octave using the function source

I guess Mathworks has different definitions of "obfuscated" and "encrypted", then. Their documentation says that it is "obfuscated but not encrypted" (see http://fr.mathworks.com/help/matlab/ref/pcode.html). And yet, the result is not a valid M-file. I guess they refrain from using the term "encryted" because they don't want users to believe that it is securely encryted.

My question regarding the FAQ entry was more specifically about the second part (that I have temporarily removed).  My point was to answer the question "is there any plan to support running Matlab P-files in Octave ?".  I believe(d) that the correct answer would be: running Matlab P-files will never be supported, unless a public specification of Matlab's P-file format is made available...

Actually, I'm not sure at all about the correct answer to this question.  I would like to hear from Octave's core developers about that.
Reply | Threaded
Open this post in threaded view
|

Re: Matlab p files

Mike Miller-4
On Wed, May 25, 2016 at 18:44:53 +0200, Julien Bect wrote:
> Actually, I'm not sure at all about the correct answer to this question.  I
> would like to hear from Octave's core developers about that.

I suspect you may get as many different opinions as there are
developers.

Personally, I think the main motivation for Octave to support Matlab's
syntax at all is to allow users to move their interpreted source code
(in m-file form) from Matlab to the better, free Octave environment,
thereby increasing the "value" of the code.

IMHO, supporting obfuscated Matlab executable files does little to
increase the value of the code. The p-file is still a black box, users
do not have the freedom to study or improve the code.

Even if it works in one version of Octave, there is no guarantee that it
will work in a future version of Octave — not only because the
obfuscation format may change, but because some unrelated behavior may
change and we have no insight into what expressions are actually being
evaluated.

If someone were to ask me whether they can run p-files in Octave, I
would ask why they don't have access to the original m-files. It's
possible there is a legal issue in tandem with the technical issue.

Cheers,

--
mike

Reply | Threaded
Open this post in threaded view
|

Re: Matlab p files

LachlanA
Mike Miller-4 wrote
Personally, I think the main motivation for Octave to support Matlab's
syntax at all is to allow users to move their interpreted source code
(in m-file form) from Matlab to the better, free Octave environment,
thereby increasing the "value" of the code.

IMHO, supporting obfuscated Matlab executable files does little to
increase the value of the code.
I think another large class of users are those who are required to write Matlab code for work / university, and choose to do the development in Octave, typically because of its licence.  That is certainly the class I fall into.

If p-files are callable from standard .m files, then this class of users would certainly benefit from being able to call .p files under Octave, if they are required to use them in Matlab for their work or study.  Having said that, I've never had a need to run .p files anywhere.

Would it be worth having a questionnaire when Octave is installed, asking users to tell us why they choose to use Octave?  That would eliminate a lot of this guesswork.

$0.02,
Lachlan
Reply | Threaded
Open this post in threaded view
|

Re: Matlab p files

jbect
Le 26/05/2016 02:34, LachlanA a écrit :
Mike Miller-4 wrote
Personally, I think the main motivation for Octave to support Matlab's
syntax at all is to allow users to move their interpreted source code
(in m-file form) from Matlab to the better, free Octave environment,
thereby increasing the "value" of the code.

IMHO, supporting obfuscated Matlab executable files does little to
increase the value of the code.
I think another large class of users are those who are required to write
Matlab code for work / university, and choose to do the development in
Octave, typically because of its licence.  That is certainly the class I
fall into.

If p-files are /callable/ from standard .m files, then this class of users
would certainly benefit from being able to call .p files under Octave, if
they are required to use them in Matlab for their work or study.  Having
said that, I've never had a need to run .p files anywhere.

Would it be worth having a questionnaire when Octave is installed, asking
users to tell us why they choose to use Octave?  That would eliminate a lot
of this guesswork.

$0.02,
Lachlan

For the time being, I have simply added the following sentence to the FAQ:

There are no plans to support running P-files produced by Matlab in Octave.

http://wiki.octave.org/FAQ#How_do_I_run_a_Matlab_P-file_in_Octave.3F