12 ms·
I compiled eval once for fun.
by knolan 6y ago
I compiled eval once for fun.
- willis936 6y agoA friend of mine did that. They were able to run arbitrary .m files from an executable. As far as I know, this doesn't violate any terms of use. I wonder what keeps someone from just downloading the freely available MATLAB runtime and running a compiled eval wrapper and suddenly have a freely available version of MATLAB. Also just because eval can be compiled doesn't mean it should. It will forever be a security risk and I will not write code that uses it in good conscious. Fortunately, Mathworks has provided good alternatives. My personal favorite has been variable field names. It really opens up a lot of elegant coding. https://www.mathworks.com/help/matlab/matlab_prog/string-evaluation.html https://www.mathworks.com/help/matlab/matlab_prog/string-eva...