Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Nick Cox <njcoxstata@gmail.com> |
To | "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |
Subject | Re: st: View source code of mata function from library mataado |
Date | Tue, 26 Nov 2013 18:20:17 +0000 |
Here is another reason: Although the name of a Mata function may be visible to you if in turn that function calls undocumented functions or other code, then StataCorp would (I guess) keep quiet about that. Nick njcoxstata@gmail.com On 26 November 2013 18:08, Nick Cox <njcoxstata@gmail.com> wrote: > Clearly if Mata code is also available as source code then not being > able to understand the object code is immaterial. > > The rest is much easier to understand than you imply. > > 1. StataCorp is in business and chooses to keep all of its C code > secret as a matter of protecting its most vital asset. > > This is a matter not only of considering other businesses in > competition with StataCorp but also of considering anybody who might > want to borrow or steal code for their own purposes, e.g. to release > Rata as a free clone of Stata. > > This extends also to some of StataCorp's Mata code. Quite where the > company draws the line is no doubt a delicate question but it could > easily include any code that involves anything clever that the company > does not want to see exposed. There could be more mundane reasons > e.g. code that is not documented well or is too complicated for users > to understand without detailed explanation or that users would ask > questions about that StataCorp does not want to answer. > > 2. As far as user-programmers are concerned, the decisions are in > detail different but can be loosely similar. For example, people might > have obligations to their employers not to disclose full details of > code developed while an employee or wish to keep original algorithms > veiled until they have been published. > > FWIW, all the Mata code I ever make public is fully explicit but I > imply no criticism of anyone who is obliged to, or chooses to, work > otherwise. > > In short, Stata is not R. Noone ever said it was all open code. > > As Wittgenstein almost said in the Tractatus, whereof one does not > want to speak, thereof one can be silent > > Nick > njcoxstata@gmail.com > > > On 26 November 2013 17:48, Matthieu Stigler > <matthieu.stigler@graduateinstitute.ch> wrote: >> Dear Nick >> >> Thanks for your answer! Note however that in a very similar case, the >> function panelsetup in mlib lmatabase (see mata: mata which >> panelsetup), it is possible to see the source code! >> viewsource panelsetup.mata >> >> so it seems that while (some) functions in the STATA mlib lmatabase >> can be accessed, functions in STATA package lmataado would be hidden? >> That seems very weird, I can't understand why STATA developers would >> like to hide their code? >> >> Thanks! >> >> Matthieu >> -------------- >> Matthieu Stigler >> Researcher >> Centre for Finance and Development, http://graduateinstitute.ch/cfd >> >> THE GRADUATE INSTITUTE | GENEVA >> Institut de hautes études internationales et du développement >> Graduate Institute of International and Development Studies >> Tel: (+41 22) 908 59 51 >> >> >> >> 2013/11/26 Nick Cox <njcoxstata@gmail.com>: >>> No; this is not surprising. -viewsource-, as its name implies, is for >>> viewing source code. Anything in an .mlib is object code. Regardless >>> of whether it is visible to you, no human can make sense of it. >>> >>> Mata programmers aren't obliged to make their source code available >>> and there could be good reasons not to do that. >>> >>> Nick >>> njcoxstata@gmail.com >>> >>> >>> On 26 November 2013 15:08, Matthieu Stigler >>> <matthieu.stigler@graduateinstitute.ch> wrote: >>>> Hi >>>> >>>> I would like to see the source code of the mata function >>>> _iv_kclass_wrk, contained in the mataado.mlib library. However, when >>>> typing: >>>> viewsource _iv_kclass_wrk.mata >>>> >>>> I get an error message. This is surprising since: >>>> : mata which _iv_kclass_wrk >>>> _iv_kclass_wrk(): lmataado >>>> : end >>>> >>>> confirms this function exists and is in lmataado. How is it possible >>>> to inspect the source code? It does not look like viewsource/source >>>> have optional arguments to precise the mlib library location? >>>> >>>> note this question is very similar to: >>>> http://www.stata.com/statalist/archive/2013-01/msg01387.html >>>> >>>> which remained apparently unanswered? >>>> >>>> Thanks a lot! >>>> >>>> Matthieu >>>> * >>>> * For searches and help try: >>>> * http://www.stata.com/help.cgi?search >>>> * http://www.stata.com/support/faqs/resources/statalist-faq/ >>>> * http://www.ats.ucla.edu/stat/stata/ >>> * >>> * For searches and help try: >>> * http://www.stata.com/help.cgi?search >>> * http://www.stata.com/support/faqs/resources/statalist-faq/ >>> * http://www.ats.ucla.edu/stat/stata/ * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/