Live data from Hacker News

Brain.js

github.com

31–40 of 56 posts

Re: Brain.js

#31
post #15

Earlier quoted context omitted.

I'm aware of tensorflow.js, but what really struck me with brain.js was this snippet from the very beginning of the readme file: how to approximate the XOR function using brain.js const net = new brain.NeuralNetwork(config); net.train([{input: [0, 0], output: [0]}, {input: [0, 1], output: [1]}, {input: [1, 0], output: [1]}, {input: [1, 1], output: [0]}]); const output = net.run([1, 0]); // [0.987] This is how you win…

Great point. This is why I used p2.js for javascript game physics over franken-emscripten Box2d ports. The readme and source code are extremely accessible ( https://github.com/schteppe/p2.js#sample-code ). When I was trying to optimize my collision detection, I stepped in to p2.js source to read narrowphase vs broadphase implementations. Last I used Box2d, I was reading c++ pdf documentation.

Really cool example!

Re: Brain.js

#32

Earlier quoted context omitted.

> if you are serious about getting into data science or AI Then you won't be using Javascript anyways. Like you said, Python is the way to go: PyTorch, TF, PyMC3, scikit-learn, etc.

There are several firms that I personally know of that use alternative languages for building production systems around AI. My two largest clients have systems built in Typescript and Java. If you are going to work in this field you have to know Python as it is a common language for practitioners, but the language choice for production systems is driven by many factors. Python is almost never an appropriate choice fo…

> but the language choice for production systems is driven by many factors. Python is almost never an appropriate choice for building production systems

And JS is? Even with TS papering over the top of it, JS is not really an ideal language for this. If you want a type system, performance and ease of use, why not write it in Julia?

Re: Brain.js

#33

A 19-part interactive neural network course that uses brain.js was posted to HN last week: https://scrimba.com/g/gneuralnetworks

I just went through the 19-part interactive neural network and this is the best tutorial for beginners I've encountered. Each video is And doing all the examples directly on the browser creates a very low barrier to entry as a front end developer.

Re: Brain.js

#34
post #24
post #17

Earlier quoted context omitted.

What happened to the author? I'm not aware of the history...

What happened was essentially bullies. I think it is apparent now that the library and, more importantly, the idea of a data first neural network architecture in javascript isn't going away.

What do you mean by "data-first"? What other forms could a JS NN architecture take?

Re: Brain.js

#35
JS nails it again even with Neuron Networks. What saddens me in latest years is the direction of library development, where people put more focus on Python instead of Javascript. Javascript is universal, you can reuse your code in both browser, native apps and server. Python ? I don't think so. My dream of "getting the job done" is a universal language, universal ecosystem/libraries. We need universal developers, no need for full-stack developers anymore.

Re: Brain.js

#36
post #22

Earlier quoted context omitted.

For reference, NodeJS support for GPUs will only drop under version 2, so if you're planning on GPU acceleration, this is not for you.

This is Robert, the lead developer for brain.js. Ty for the plug! I was going to mention this, nice to see people listening and helping spread the word. Working on it hard guys! When spare time cannot be had, just stay up late, and get up early!

This is tangential, but I highly disapprove of any encouragement to stay up late. Sleep is incredibly important for the entirety of the body. It's always better to get well-rested over a small amount more work done (which you'll eventually lose anyway since you won't be well-rested).

Re: Brain.js

#37

JS nails it again even with Neuron Networks. What saddens me in latest years is the direction of library development, where people put more focus on Python instead of Javascript. Javascript is universal, you can reuse your code in both browser, native apps and server. Python ? I don't think so. My dream of "getting the job done" is a universal language, universal ecosystem/libraries. We need universal developers, no…

Wholeheartedly concur with this. As a career programmer of 25 years, using most modern languages including python in both personal and professional work.

This reminds me of how academia used to promote Pascal in schools when the community and industry had clearly embraced C and then C++ as the dominant compiled language.

Re: Brain.js

#38

JS nails it again even with Neuron Networks. What saddens me in latest years is the direction of library development, where people put more focus on Python instead of Javascript. Javascript is universal, you can reuse your code in both browser, native apps and server. Python ? I don't think so. My dream of "getting the job done" is a universal language, universal ecosystem/libraries. We need universal developers, no…

I am a full stack developer using python for everything but what's in my HTML pages. And I'd replace that javascript with python as soon as it would be viable. Javascript is fine for what it is, but the idea of it as a universal language is gross.

Re: Brain.js

#39

JS nails it again even with Neuron Networks. What saddens me in latest years is the direction of library development, where people put more focus on Python instead of Javascript. Javascript is universal, you can reuse your code in both browser, native apps and server. Python ? I don't think so. My dream of "getting the job done" is a universal language, universal ecosystem/libraries. We need universal developers, no…

I am a full stack developer using python for everything but what's in my HTML pages. And I'd replace that javascript with python as soon as it would be viable. Javascript is fine for what it is, but the idea of it as a universal language is gross.

Good luck porting your Python code into other environments in case you need to.

Re: Brain.js

#40

JS nails it again even with Neuron Networks. What saddens me in latest years is the direction of library development, where people put more focus on Python instead of Javascript. Javascript is universal, you can reuse your code in both browser, native apps and server. Python ? I don't think so. My dream of "getting the job done" is a universal language, universal ecosystem/libraries. We need universal developers, no…

Yeah! Making poorly designed and "weakly" typed language with enormous WTF's as a universal language! I think if they put more effort on webassembly, market share and library support for js will have a huge dropout. For more universal language how about have a actual sane language other than javascript or even python?
Post reply on HN