Use LUA for ingame computers

I probably should have pointed out, that it uses the new ‘invokedynamic’ instruction from JDK 7. The problem ‘before invokedynamic’ was, that you had to use reflection to call methods and make those methods always rely on the same type: Object. And reflection isn’t very fast compared to a normal method call.

So does dyn.js - clue in the name! :wink: Not tried it yet. Be interesting to see how it compares with Nashorn. At least you don’t need JDK8.

I’m not even sure Nashorn needs JDK 8. The demo from some time ago where nashorn was shown first, was running with JDK 7. invokedynamic is from JDK 7.

Also, nashorn uses a library from one of their members, which is called ‘Dynalink’. So I guess this is a project very similar to dyn.js.

Aye, FWIW, you can “script” in JavaScript in Java 6 and 7 also, just ask for the “javascript” engine instead of “nashorn”. I believe it uses some older Rhino version.