Giter Site home page Giter Site logo

es6 it! about brain.js HOT 17 CLOSED

robertleeplummerjr avatar robertleeplummerjr commented on April 28, 2024 5
es6 it!

from brain.js.

Comments (17)

Macil avatar Macil commented on April 28, 2024 3

Why not transpile it to es5 with babel as a prepublish step? That seems to be the normal route for modules written in es6+.

from brain.js.

robertleeplummerjr avatar robertleeplummerjr commented on April 28, 2024 1

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.

from brain.js.

MrIsaacs avatar MrIsaacs commented on April 28, 2024

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.

from brain.js.

robertleeplummerjr avatar robertleeplummerjr commented on April 28, 2024

Once all that clears, then we could merge it into master, and continue on our merry way.

from brain.js.

robertleeplummerjr avatar robertleeplummerjr commented on April 28, 2024

It is here, huzzah!

from brain.js.

IonicaBizau avatar IonicaBizau commented on April 28, 2024

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). 😁

from brain.js.

robertleeplummerjr avatar robertleeplummerjr commented on April 28, 2024

very cool!

from brain.js.

robertleeplummerjr avatar robertleeplummerjr commented on April 28, 2024

What would be our strategy for es5/legacy compatibility?

from brain.js.

robertleeplummerjr avatar robertleeplummerjr commented on April 28, 2024

I like it!

from brain.js.

robertleeplummerjr avatar robertleeplummerjr commented on April 28, 2024

@IonicaBizau I mostly manually translated it already.

from brain.js.

robertleeplummerjr avatar robertleeplummerjr commented on April 28, 2024

Ready and waiting here: #28

from brain.js.

robertleeplummerjr avatar robertleeplummerjr commented on April 28, 2024

As soon as this is merged, auto builds are next, then a pr for the recurrent neural network stuff. Just fyi.

from brain.js.

robertleeplummerjr avatar robertleeplummerjr commented on April 28, 2024

Merged!

from brain.js.

IonicaBizau avatar IonicaBizau commented on April 28, 2024

For publishing I use babel-it which babelifies the files in place when npm publishing.

from brain.js.

robertleeplummerjr avatar robertleeplummerjr commented on April 28, 2024

Would you be up for taking a look at master, and seeing if you can apply your knowledge there?

from brain.js.

IonicaBizau avatar IonicaBizau commented on April 28, 2024

@robertleeplummerjr Well, pretty much npm i -g babel-it and instead of doing npm publish you do babel-it. 😁

from brain.js.

robertleeplummerjr avatar robertleeplummerjr commented on April 28, 2024

rnn, lstm, and gru working 100%, with some simple unit tests and travic-ci build: #29

from brain.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.