JaroslavTulach: /* Speed */ - 2020-07-15 14:52:54

Speed

←Older revision Revision as of 14:52, 15 July 2020
Line 7: Line 7:
=== Speed ===
=== Speed ===
-
[[GraalVM] includes as fast as [[V8]] implementation of [[JavaScript]]. Predicted [http://www.slideshare.net/ThomasWuerthinger/2014-0424-graal-modularity presentation about next generation Nashorn] many years ago...
+
[[GraalVM]] includes as fast as [[V8]] implementation of [[JavaScript]]. Predicted [http://www.slideshare.net/ThomasWuerthinger/2014-0424-graal-modularity presentation about next generation Nashorn] many years ago...

JaroslavTulach: /* Speed */ - 2020-07-15 14:52:41

Speed

←Older revision Revision as of 14:52, 15 July 2020
Line 7: Line 7:
=== Speed ===
=== Speed ===
-
Yeah, so far [[V8]] is faster than [[Nashorn]], but let me point you to [http://www.slideshare.net/ThomasWuerthinger/2014-0424-graal-modularity presentation about next generation Nashorn] virtual machine to see where the speed will come from...
+
[[GraalVM] includes as fast as [[V8]] implementation of [[JavaScript]]. Predicted [http://www.slideshare.net/ThomasWuerthinger/2014-0424-graal-modularity presentation about next generation Nashorn] many years ago...

JaroslavTulach at 14:51, 15 July 2020 - 2020-07-15 14:51:09

←Older revision Revision as of 14:51, 15 July 2020
Line 1: Line 1:
-
[https://avatar-js.java.net/ AvatarJS] is a re-implementation of [[NodeJS]] on top of the [[JVM]]. [[JDK]]8 comes with [[Nashorn]] and that is certainly better [[JavaScript]] virtual machine than old [[Rhino]]. However [[NodeJS]] is not just [[JavaScript]], it also contains a lot of native bindings. What can be done with those?
+
[https://avatar-js.java.net/ AvatarJS] was an attempt to re-implement [[NodeJS]] on top of the [[JVM]]. These days just download [[GraalVM]] and you'll get [[JavaScript]] and [[Java]] for free. Compatibility is guaranteed.
-
 
+
-
 
+
-
=== Get [[AvatarJS]] ===
+
-
 
+
-
Well, just download [[AvatarJS]] binaries and you are set to go. One could get the [[AvatarJS]] libraries from maven.java.net (as of Feb 17, 2014):
+
-
 
+
-
* The JAR: https://maven.java.net/index.html#nexus-search;quick~avatar-js
+
-
* The native library: https://maven.java.net/index.html#nexus-search;quick~libavatar-js
+
-
 
+
-
To bind them together I renamed the libraries:
+
-
 
+
-
<source lang="bash">
+
-
avatar-js.jar
+
-
libavatar-js-linux-x64.so
+
-
libavatar-js.so -> libavatar-js-linux-x64.so
+
-
 
+
-
# and then I could execute them as
+
-
java -Djava.library.path=. -jar avatar-js.jar
+
-
</source>
+
-
 
+
-
=== Compatibility ===
+
-
 
+
-
Compatibility was tested on http://www.manning-source.com/books/cantelon/code_Node.js.zip sources. As of Mar 18, 2014 the 2/chat/ example works.
+
-
 
+
-
The 8 example is using '''const''' keyword in mongodb NodeJS modules (reported and fixed as https://bugs.openjdk.java.net/browse/JDK-8027933 on May 2nd, 2014). One can either replace the '''const''' with '''var''' or get latest [[Nashorn]] build.
+
-
 
+
-
Then the application starts, but crashes. The single line fix is documented on the [https://avatar-js.java.net/ AvatarJS] main page: inserting "if (options.locals)" was enough to fix the problem. Then the application started.
+
=== Tooling ===
=== Tooling ===
-
The [[NetBeans]] tooling (including excellent debugging, see [[Nashorn]]) is being developed at http://hg.netbeans.org/core-main/file/32b5ebff07b4/avatar_js.project
+
The [[NetBeans]] tooling (including excellent debugging, see [[Nashorn]]).
-
 
+
-
I know that [[Tim Boudreau]] has module with good [[NodeJS]] support as well and I let him put here a link once he also supports [[AvatarJS]].
+
=== Speed ===
=== Speed ===
Yeah, so far [[V8]] is faster than [[Nashorn]], but let me point you to [http://www.slideshare.net/ThomasWuerthinger/2014-0424-graal-modularity presentation about next generation Nashorn] virtual machine to see where the speed will come from...
Yeah, so far [[V8]] is faster than [[Nashorn]], but let me point you to [http://www.slideshare.net/ThomasWuerthinger/2014-0424-graal-modularity presentation about next generation Nashorn] virtual machine to see where the speed will come from...

JaroslavTulach: /* Compatibility */ - 2014-05-06 12:12:03

Compatibility

←Older revision Revision as of 12:12, 6 May 2014
Line 22: Line 22:
=== Compatibility ===
=== Compatibility ===
-
Compatibility is being tested on http://www.manning-source.com/books/cantelon/code_Node.js.zip sources. As of Mar 18, 2014 the 2/chat/ example works.
+
Compatibility was tested on http://www.manning-source.com/books/cantelon/code_Node.js.zip sources. As of Mar 18, 2014 the 2/chat/ example works.
The 8 example is using '''const''' keyword in mongodb NodeJS modules (reported and fixed as https://bugs.openjdk.java.net/browse/JDK-8027933 on May 2nd, 2014). One can either replace the '''const''' with '''var''' or get latest [[Nashorn]] build.
The 8 example is using '''const''' keyword in mongodb NodeJS modules (reported and fixed as https://bugs.openjdk.java.net/browse/JDK-8027933 on May 2nd, 2014). One can either replace the '''const''' with '''var''' or get latest [[Nashorn]] build.
-
Then the application starts, but crashes. The single line fix is documented on the [https://avatar-js.java.net/ AvatarJS] main page: inserting "if (options.locals)" was enough to fix the problem. Then the application started.
+
Then the application starts, but crashes. The single line fix is documented on the [https://avatar-js.java.net/ AvatarJS] main page: inserting "if (options.locals)" was enough to fix the problem. Then the application started.
=== Tooling ===
=== Tooling ===

JaroslavTulach: /* Get AvatarJS */ - 2014-05-06 12:11:39

Get AvatarJS

←Older revision Revision as of 12:11, 6 May 2014
Line 9: Line 9:
* The native library: https://maven.java.net/index.html#nexus-search;quick~libavatar-js
* The native library: https://maven.java.net/index.html#nexus-search;quick~libavatar-js
-
To bind them together I renamed to libraries:
+
To bind them together I renamed the libraries:
<source lang="bash">
<source lang="bash">

JaroslavTulach at 12:10, 6 May 2014 - 2014-05-06 12:10:49

←Older revision Revision as of 12:10, 6 May 2014
Line 1: Line 1:
-
[[AvatarJS]] is a re-implementation of [[NodeJS]] on top of the [[JVM]]. [[JDK]]8 comes with [[Nashorn]] and that is certainly better [[JavaScript]] virtual machine than old [[Rhino]]. However [[NodeJS]] is not just [[JavaScript]], it also contains a lot of native bindings. What can be done with those?
+
[https://avatar-js.java.net/ AvatarJS] is a re-implementation of [[NodeJS]] on top of the [[JVM]]. [[JDK]]8 comes with [[Nashorn]] and that is certainly better [[JavaScript]] virtual machine than old [[Rhino]]. However [[NodeJS]] is not just [[JavaScript]], it also contains a lot of native bindings. What can be done with those?
Line 19: Line 19:
java -Djava.library.path=. -jar avatar-js.jar
java -Djava.library.path=. -jar avatar-js.jar
</source>
</source>
 +
 +
=== Compatibility ===
 +
 +
Compatibility is being tested on http://www.manning-source.com/books/cantelon/code_Node.js.zip sources. As of Mar 18, 2014 the 2/chat/ example works.
 +
 +
The 8 example is using '''const''' keyword in mongodb NodeJS modules (reported and fixed as https://bugs.openjdk.java.net/browse/JDK-8027933 on May 2nd, 2014). One can either replace the '''const''' with '''var''' or get latest [[Nashorn]] build.
 +
 +
Then the application starts, but crashes. The single line fix is documented on the [https://avatar-js.java.net/ AvatarJS] main page: inserting "if (options.locals)" was enough to fix the problem. Then the application started.
 +
 +
=== Tooling ===
 +
 +
The [[NetBeans]] tooling (including excellent debugging, see [[Nashorn]]) is being developed at http://hg.netbeans.org/core-main/file/32b5ebff07b4/avatar_js.project
 +
 +
I know that [[Tim Boudreau]] has module with good [[NodeJS]] support as well and I let him put here a link once he also supports [[AvatarJS]].
 +
 +
=== Speed ===
 +
 +
Yeah, so far [[V8]] is faster than [[Nashorn]], but let me point you to [http://www.slideshare.net/ThomasWuerthinger/2014-0424-graal-modularity presentation about next generation Nashorn] virtual machine to see where the speed will come from...

JaroslavTulach at 11:59, 6 May 2014 - 2014-05-06 11:59:22

←Older revision Revision as of 11:59, 6 May 2014
Line 1: Line 1:
[[AvatarJS]] is a re-implementation of [[NodeJS]] on top of the [[JVM]]. [[JDK]]8 comes with [[Nashorn]] and that is certainly better [[JavaScript]] virtual machine than old [[Rhino]]. However [[NodeJS]] is not just [[JavaScript]], it also contains a lot of native bindings. What can be done with those?
[[AvatarJS]] is a re-implementation of [[NodeJS]] on top of the [[JVM]]. [[JDK]]8 comes with [[Nashorn]] and that is certainly better [[JavaScript]] virtual machine than old [[Rhino]]. However [[NodeJS]] is not just [[JavaScript]], it also contains a lot of native bindings. What can be done with those?
 +
 +
 +
=== Get [[AvatarJS]] ===
 +
 +
Well, just download [[AvatarJS]] binaries and you are set to go. One could get the [[AvatarJS]] libraries from maven.java.net (as of Feb 17, 2014):
 +
 +
* The JAR: https://maven.java.net/index.html#nexus-search;quick~avatar-js
 +
* The native library: https://maven.java.net/index.html#nexus-search;quick~libavatar-js
 +
 +
To bind them together I renamed to libraries:
 +
 +
<source lang="bash">
 +
avatar-js.jar
 +
libavatar-js-linux-x64.so
 +
libavatar-js.so -> libavatar-js-linux-x64.so
 +
 +
# and then I could execute them as
 +
java -Djava.library.path=. -jar avatar-js.jar
 +
</source>

JaroslavTulach: New page: AvatarJS is a re-implementation of NodeJS on top of the JVM. JDK8 comes with Nashorn and that is certainly better JavaScript virtual machine than old Rhino. How... - 2014-05-06 11:56:26

New page: AvatarJS is a re-implementation of NodeJS on top of the JVM. JDK8 comes with Nashorn and that is certainly better JavaScript virtual machine than old Rhino. How...

New page

[[AvatarJS]] is a re-implementation of [[NodeJS]] on top of the [[JVM]]. [[JDK]]8 comes with [[Nashorn]] and that is certainly better [[JavaScript]] virtual machine than old [[Rhino]]. However [[NodeJS]] is not just [[JavaScript]], it also contains a lot of native bindings. What can be done with those?