Open spaige opened 11 years ago
How do you plan on specifying this namespace? I am not sure I understand this issue.
Currently, the clotho.run(...) syntax is working and properly handling the language conversion. This example, "PY_relay_to_JS atc" issued from the submit bar will run a python function which in turn runs a javascript function.
Where language conversion may still be problematic is with require/import statements. Since Modules are language specific, they cannot be directly executed within the same scriptengine as the run script. I don't consider this necessarily a problem, but would be cool if that too was language-agnostic.
I still think it makes sense to have a function which takes as arguments a module and function name, and just runs a function of a module with a set of arguments. It would handle language specifics.
‘require' could then simply be a partial application of this function, given the module name. It would be easy to implement this across languages.
From a user's perspective, all that matters is that they can put in native-looking scripts, without tweaks, and it work. The details of how it is implemented is another question. If what Stephanie implements does not satisfy this goal, then we will re-examine it.
On Sun, May 25, 2014 at 7:31 PM, Maxwell Bates notifications@github.comwrote:
I still think it makes sense to have a function which takes as arguments a module and function name, and just runs a function of a module with a set of arguments. It would handle language specifics.
‘require' could then simply be a partial application of this function, given the module name. It would be easy to implement this across languages.
From: J. Christopher Anderson notifications@github.com Reply: CIDARLAB/clotho3 reply@reply.github.com Date: May 25, 2014 at 10:32:54 AM To: CIDARLAB/clotho3 clotho3@noreply.github.com Subject: Re: [clotho3] Scripting language interoperation (#2)
Currently, the clotho.run(...) syntax is working and properly handling the language conversion. This example, "PY_relay_to_JS atc" issued from the submit bar will run a python function which in turn runs a javascript function.
Where language conversion may still be problematic is with require/import statements. Since Modules are language specific, they cannot be directly executed within the same scriptengine as the run script. I don't consider this necessarily a problem, but would be cool if that too was language-agnostic.
— Reply to this email directly or view it on GitHub.
— Reply to this email directly or view it on GitHubhttps://github.com/CIDARLAB/clotho3/issues/2#issuecomment-44153101 .
J. Christopher Anderson, Ph.D. Assistant Professor Department of Bioengineering http://andersonlab.qb3.berkeley.edu/
Office: 512E Energy Biosciences Building (EBB) Lab: 5th Floor EBB
Mailing Address: J. Christopher Anderson University of California, Berkeley 512E Energy Biosciences Building Berkeley, CA 94720
Scripting language instructions in different languages should operate on what is apparently a shared environment of objects eg, if the javascript statment
var x = 5;
is executed, then the python statementx == 5
should evaluate toTrue