Thanks in advance!
Does such a sandbox exist?
Is there a portable way to install a portable Julia
Is JavaScript actually easy to integrate with Java?
package sample1;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
public class Hello {
public static void main(String... args) throws Throwable {
ScriptEngineManager engineManager =
new ScriptEngineManager();
ScriptEngine engine =
engineManager.getEngineByName("nashorn");
engine.eval("function sum(a, b) { return a + b; }");
System.out.println(engine.eval("sum(1, 2);"));
}
}
Is JavaScript actually easy to integrate with Java?
Hi,
I learned Julia recently, and I must say it has been incredible for scientific work. I am in love with the clean, modern syntax. Props to the developers for their tireless efforts to improve this language even further!
Historically, Lua and Javascript have been the most common choices for scripting languages in larger projects... Lua because it is so easy to integrate with C(++), and Javascript primarily because it is so easy to integrate with Java. I would like Julia to fill this role for one of my current projects, but I have identified some hurdles.
- For now, security is not important because scripts are assumed to be trusted. However, a plan for scripts to eventually be downloaded from the Internet is in the works. I could not find a Julia sandbox, however. Does such a sandbox exist?
- My customers may not necessarily be computer-literate, and I can't expect them to install Julia. Also, due to the rapid pace of Julia development, it may be advantageous to install a portable Julia entirely for this project only. My project currently targets Windows, Linux, and Mac OSX. Is there a portable way to install a portable Julia, or will I have to create separate installation code for each OS?
On Wednesday, August 26, 2015 at 5:17:06 PM UTC, Stefan Karpinski wrote:Is JavaScript actually easy to integrate with Java?Not really..(?) up to recently. Java was just confused with JavaScript in the beginning.
Although it was developed under the name Mocha, the language was officially called LiveScript when it first shipped in beta releases of Netscape Navigator 2.0 in September 1995, but it was renamed JavaScript[11] when it was deployed in the Netscape browser version 2.0B3.[12]
The change of name from LiveScript to JavaScript roughly coincided with Netscape adding support for Java technology in its Netscape Navigator web browser. The final choice of name caused confusion, giving the impression that the language was a spin-off of the Java programming language, and the choice has been characterized as a marketing ploy by Netscape to give JavaScript the cachet of what was then the hot new web programming language.[13][14]
Rhino was added in 2000 (i.e. JavaScript implemented in the JVM), years later.