I'd like to update the syntax to that of es6, thoughts?
Seems legit. Maybe having an own branch for es6 is a good thing? So tagging different branches is made easier an makes the codebase compatible for older interpreter and users can choose a compatible version as they need.
If we were to do it, I'd first create a new branch, then I'd like to ensure we use something like babel to compile it for compatibility. I'd also like to make part of the build process create a browser specific file, so that rather than doing it manually, it is built in. All of which wouldn't be too complicated.
Once all that clears, then we could merge it into master, and continue on our merry way.
It is here, huzzah!
There's a tool caled lebab by @mohebifar which would be probably useful to convert it automagically and then edit the things that still have to be edited manually (if any). :grin:
very cool!
What would be our strategy for es5/legacy compatibility?
Why not transpile it to es5 with babel as a prepublish step? That seems to be the normal route for modules written in es6+.
I like it!
@IonicaBizau I mostly manually translated it already.
Ready and waiting here: https://github.com/harthur-org/brain.js/pull/28
As soon as this is merged, auto builds are next, then a pr for the recurrent neural network stuff. Just fyi.
Merged!
For publishing I use babel-it which babelifies the files in place when npm publishing.
Would you be up for taking a look at master, and seeing if you can apply your knowledge there?
@robertleeplummerjr Well, pretty much npm i -g babel-it and instead of doing npm publish you do babel-it. 馃榿
rnn, lstm, and gru working 100%, with some simple unit tests and travic-ci build: https://github.com/harthur-org/brain.js/pull/29
Most helpful comment
Why not transpile it to es5 with babel as a prepublish step? That seems to be the normal route for modules written in es6+.