News for hackers. Stuff that matters.
Re:Scripting API now in public beta by benbristow on Saturday December 08, 2018 @02:06PM (#18636892)
Looks like the JavaScript API is ES5. Wonder if they've any plans to support ES6+?
Re:Scripting API now in public beta by snek on Saturday December 08, 2018 @11:31PM (#18639305)
They're using ChakraCore, with support for ES6+. you can use all your favourite `const` and `let` and `function*` etc.
Re:Scripting API now in public beta by edwinyzh on Sunday December 09, 2018 @05:27AM (#18640192)
Glad to hear that!
Re:Scripting API now in public beta by solarkraft on Sunday December 09, 2018 @12:30AM (#18639518)
Oh, just after it was announced obsolete?
Re:Scripting API now in public beta by brink on Saturday December 08, 2018 @02:07PM (#18636900)
Probably won't be long before a minecraft babel plugin exists.
Re:Scripting API now in public beta by danShumway on Saturday December 08, 2018 @02:27PM (#18637024)
Any existing babel setup will already work, you don't need to wait. That being said, I'd be kind of surprised if this doesn't actually support ES6.

How likely is it that the Minecraft team built their own Javascript interpreter rather than setting up bindings to an existing one?

Re:Scripting API now in public beta by yoklov on Saturday December 08, 2018 @02:37PM (#18637068)
Might use Rhino or something, since it’s on the JVM
Re:Scripting API now in public beta by SquareWheel on Saturday December 08, 2018 @02:38PM (#18637075)
Bedrock edition is in C++, isn't it?
Re:Scripting API now in public beta by pjmlp on Saturday December 08, 2018 @05:01PM (#18637788)
Yes, they ported it to C++ due to game consoles and mobiles support.

Creating a couple of Java AOT compilers from scratch wasn't properly part of their idea how to best make use of resources.

Re:Scripting API now in public beta by solarkraft on Sunday December 09, 2018 @12:31AM (#18639521)
I wonder whether the landscape looks different today, with Oracle's Graal efforts.
Re:Scripting API now in public beta by pjmlp on Sunday December 09, 2018 @05:28AM (#18640199)
Not really.

Java AOT compilers to native code have been available since early 2000's, as long as companies are willing to pay for them.

However there have been very little attempts to support Java on game consoles, apart from ajile's attempt [0].

Targeting game consoles is similar to bare metal programming, even when a thin OS is present and doesn't bound well with a programming model that abstracts what the hardware is capable of.

As for iOS support, there are a couple of options like CodenameOne, GluonVM and RoboVM.

And for UWP only CodenameOne.

So there isn't really an option that would make sense from business point of view.

Hence why porting the game engine into a programming language that is available out of the box in all SDKs was a much more pragmatic option.

[0] https://www.geek.com/games/new-development-kit-brings-java-t...

Re:Scripting API now in public beta by knownunown on Saturday December 08, 2018 @07:56PM (#18638525)
It uses V8.