IMHO, node is a better target than dotnet clr. Having fan running on node is a plus for us :)
Ilove:=Sun 16 Jun 2019
When I said nodejs I only means the ability to run on the nodejs vm and (optionally) interop with javascript. I doesn't mean integration with npm and become just another language transpile to js. I prefer pure fan code and fanr :)
go4Sun 16 Jun 2019
There is already a NodeRunner in compilerJs pod.
Ilove:=Sun 16 Jun 2019
Oh, I just not discovered this, thanks.
SlimerDudeMon 17 Jun 2019
NodeRunner is for running Fantom classes annotated with @Js but the purpose of such is for creating Fantom javascript that runs in a browser; NodeJs is not a server target so there is no support core IO features such as Files.
Gone are the days of vanilla javascript!
Ilove:=Thu 20 Jun 2019
So my question remains. NodeJS is such an amazing platform. Will you support it?
andyThu 20 Jun 2019
NodeRunner is for running Fantom classes annotated with @Js but the purpose of such is for creating Fantom javascript that runs in a browser
Thats not quite true :)
Yes NodeRunner (and previously "RhinoRunner") strictly speaking was created to support running unit tests for our browser runtime -- but there is nothing preventing anyone from taking the platform further.
Just like in the browser -- all you need is a way to (1) load the js dependencies, and (2) invoke an entry point function -- and you're off to the races :)
The core runtime will of course work fine -- but I bet there is probably a fairly small set of extensions you would need to flush out to make it functional on server/desktop systems. Some of that work may be in there -- I recall adding local File support at one point or another (that may have been for Rhino though).
Networking and general I/O is probably the other big one. That might be better suited for an downstream pod until it stabilizes and then look at how we'd merge it back into core.
I started to explore Electron + Fantom a while back -- at the time I was forking a JVM process and running Wisp -- but would really like to just run the Fantom stack directly on nodejs engine.
Ilove:= Sun 16 Jun 2019
IMHO, node is a better target than dotnet clr. Having fan running on node is a plus for us :)
Ilove:= Sun 16 Jun 2019
When I said nodejs I only means the ability to run on the nodejs vm and (optionally) interop with javascript. I doesn't mean integration with npm and become just another language transpile to js. I prefer pure fan code and fanr :)
go4 Sun 16 Jun 2019
There is already a NodeRunner in compilerJs pod.
Ilove:= Sun 16 Jun 2019
Oh, I just not discovered this, thanks.
SlimerDude Mon 17 Jun 2019
NodeRunner
is for running Fantom classes annotated with@Js
but the purpose of such is for creating Fantom javascript that runs in a browser; NodeJs is not a server target so there is no support core IO features such as Files.Gone are the days of vanilla javascript!
Ilove:= Thu 20 Jun 2019
So my question remains. NodeJS is such an amazing platform. Will you support it?
andy Thu 20 Jun 2019
Thats not quite true :)
Yes NodeRunner (and previously "RhinoRunner") strictly speaking was created to support running unit tests for our browser runtime -- but there is nothing preventing anyone from taking the platform further.
Just like in the browser -- all you need is a way to (1) load the js dependencies, and (2) invoke an entry point function -- and you're off to the races :)
The core runtime will of course work fine -- but I bet there is probably a fairly small set of extensions you would need to flush out to make it functional on server/desktop systems. Some of that work may be in there -- I recall adding local File support at one point or another (that may have been for Rhino though).
Networking and general I/O is probably the other big one. That might be better suited for an downstream pod until it stabilizes and then look at how we'd merge it back into core.
I started to explore Electron + Fantom a while back -- at the time I was forking a JVM process and running Wisp -- but would really like to just run the Fantom stack directly on nodejs engine.