If I want to make package-code completely unreadable, in a way that the end-user can only call my functions, but has no way to re-engineer my definitions, how would I do that?
I know I can use Encode
to make scrambled code which, quoting the doc, cannot be converted back by any Mathematica function. But even with an encoded package, the user could look at the definitions of my functions. So I should add some attributes: Protected, ReadProtected, Locked
.
Would that be enough? Has someone experience with this?
Additional question: How do I distribute this? In the Workbench one has to process all Documentation files and can then create a .zip or a .tgz from its package, but there are unencoded files used. Do I have to encode the files by a script or is there already a solution?
DumpSave[]
which allows you to write definitions into a file that is not quite human-readable... $\endgroup$ – J. M. will be back soon♦ Feb 10 '12 at 7:38DumpSave
d files are possibly not readable on another system. It's the same point which @Szabolcs had in his "data storage question" $\endgroup$ – halirutan♦ Feb 10 '12 at 7:41