help-octave
[Top][All Lists]
Advanced

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

Re: binary versions of functions


From: Brian Blais
Subject: Re: binary versions of functions
Date: Thu, 14 Oct 2004 16:55:25 -0400
User-agent: Mozilla Thunderbird 0.8 (X11/20040913)

> On Oct 10, 2004, at 7:49 PM, Brian Blais wrote:
>
>> If not, can anyone think of some way I could distribute
>> working code, but not have the source readable?
>
>
>

Paul Kienzle wrote:
Octave does not have a virtual machine but instead interprets code by walking the parse tree, so enterprising students would always be able to create a modified version to decrypt the binary functions. Of course, students who take the initiative to work around whatever code obfuscation you put in place probably don't need to cheat in the first place, so maybe simple solutions aren't so bad.

Yeah, I was thinking that a simple solution would be fine.

A quick solution that I wrote was to convert a .m file into ascii numbers, and save the result as a string variable as a .mat file. I can load the variable, and eval the particular string (without actually converting back to characters). It's not perfect, but it will probably keep most students out of the source.

Turning your code into a C++ extension doesn't help. Even assuming the m-file to C++ translators were far enough along for your purpose, the GPL requires that you distribute the source for any oct-file that you supply.

I think there must be an exception to code distributed within a class, for educational purposes. I am all in favor of open information, and the GPL, but within a class you don't necessarily want to disclose all immediately.


You could use the parallel octave code from octave-forge. Put a version of octave on a server which has you private functions available. Students could send octave commands to the server and get back the results. You would have to remove a number of commands from the interpreter for this to be secure, such as type, file_in_loadpath, fopen, system, and maybe some others.

Interesting solution, but a bit involved for my purposes. I also don't want to count on the net being up, or that the students have access to it.

thanks for the ideas!


                        Brian Blais

--
-----------------

            address@hidden
            http://web.bryant.edu/~bblais



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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