Live data from Hacker News

JavaScript for Data Science

js4ds.org

11–20 of 83 posts

Re: JavaScript for Data Science

#11
Data science is not a standardized term, however I don't get what specifically makes this text relevant for the domain of data science... For some data science projects one could surely use javascript, however in mamy cases one misses important libraries, for purposes such as statistical analysis, data manipulation, machine learning, ...

Re: JavaScript for Data Science

#12

I don’t want to repeat the old and tired JavaScript hate, but this just isn’t a great idea. I’d suggest that there are 3 important primitives for data science: flexible numeric types, fast math/algorithm libraries, and data manipulation being easy. JavaScript doesn’t really have any of these. Numbers are 64bit floats only - no integers, no big numbers. There aren’t equivalents to Numpy/Pandas/Scikit Learn, and the la…

Other than the fact we have BigInts now, we also have

* tensorflowjs, which runs on GPUs https://www.tensorflow.org/js and

* danfo, which aims to be a pandas equivalent for JS: https://danfo.jsdata.org/

Given the powerful interactive visualisation capabilities available in JS, its only a matter of time until JS becomes a serious contender IMO.

Re: JavaScript for Data Science

#13

I don’t want to repeat the old and tired JavaScript hate, but this just isn’t a great idea. I’d suggest that there are 3 important primitives for data science: flexible numeric types, fast math/algorithm libraries, and data manipulation being easy. JavaScript doesn’t really have any of these. Numbers are 64bit floats only - no integers, no big numbers. There aren’t equivalents to Numpy/Pandas/Scikit Learn, and the la…

JavaScript has plenty of libraries covering the basics. Here a few:

https://github.com/nicolaspanel/numjs

https://www.npmjs.com/package/fast-math

https://smartbear.com/de/blog/2013/four-serious-math-librari...

That's not the problem. The problem is mindshare and network effects. When analyzing why Python is used one way and JS another we're tempted to retroactively rationalize this with something fundamental about the language. There's nothing fundamental about it. It's just happenstance. Python was around longer as a general purpose script, and it filled that niche. JS is relatively new as a script outside the browser.

Re: JavaScript for Data Science

#14

I don’t want to repeat the old and tired JavaScript hate, but this just isn’t a great idea. I’d suggest that there are 3 important primitives for data science: flexible numeric types, fast math/algorithm libraries, and data manipulation being easy. JavaScript doesn’t really have any of these. Numbers are 64bit floats only - no integers, no big numbers. There aren’t equivalents to Numpy/Pandas/Scikit Learn, and the la…

the only thing that used to be a problem is the number type. Libraries are ecosystem problem, not inherent to the language.

Re: JavaScript for Data Science

#15
post #12

I don’t want to repeat the old and tired JavaScript hate, but this just isn’t a great idea. I’d suggest that there are 3 important primitives for data science: flexible numeric types, fast math/algorithm libraries, and data manipulation being easy. JavaScript doesn’t really have any of these. Numbers are 64bit floats only - no integers, no big numbers. There aren’t equivalents to Numpy/Pandas/Scikit Learn, and the la…

Other than the fact we have BigInts now, we also have * tensorflowjs, which runs on GPUs https://www.tensorflow.org/js and * danfo, which aims to be a pandas equivalent for JS: https://danfo.jsdata.org/ Given the powerful interactive visualisation capabilities available in JS, its only a matter of time until JS becomes a serious contender IMO.

> Other than the fact we have BigInts now

performance-wise, BigInts are terrible. Tried to use them, made things about a hundred times slower.

Re: JavaScript for Data Science

#16
post #8

I don’t want to repeat the old and tired JavaScript hate, but this just isn’t a great idea. I’d suggest that there are 3 important primitives for data science: flexible numeric types, fast math/algorithm libraries, and data manipulation being easy. JavaScript doesn’t really have any of these. Numbers are 64bit floats only - no integers, no big numbers. There aren’t equivalents to Numpy/Pandas/Scikit Learn, and the la…

> Numbers are 64bit floats only - no integers, no big numbers. That is not true. BigInt has been available for a bit already. MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe... Availability: https://caniuse.com/bigint I don't want to argue for or against using JS for "data science" (I myself used R for that but I use JS a lot for other things), just a clarification on this one concrete claim.

> That is not true. BigInt has been available for a bit already.

performance-wise, BigInts are terrible. Tried to use them, made things about a hundred times slower. What JS needs are 64 bit integer types, and some form of typing system that allows differentiating between various number types.

Re: JavaScript for Data Science

#17

I know that data science is a broad and somewhat vague term but this - We will cover: Core features of modern JavaScript Programming with callbacks and promises Creating objects and classes Writing HTML and CSS Creating interactive pages with React Building data services Testing Data visualization Combining everything to create a three-tier web application - this isn't data science.

nobody ever writes books assuming you know how to use the language, I suppose it decreases customer base.

Re: JavaScript for Data Science

#18

I don’t want to repeat the old and tired JavaScript hate, but this just isn’t a great idea. I’d suggest that there are 3 important primitives for data science: flexible numeric types, fast math/algorithm libraries, and data manipulation being easy. JavaScript doesn’t really have any of these. Numbers are 64bit floats only - no integers, no big numbers. There aren’t equivalents to Numpy/Pandas/Scikit Learn, and the la…

the reason to force data science is that same as the reason to develop libraries in languages for tasks which that language might otherwise seem not well suited to, that there is a large userbase of the language who know how to use it and would like to explore using that language for doing other things than it is normally used for. You may of course suggest that they should just learn a new language, but the history of computing shows that solutions for using languages to new purposes they might not seem suited for happens whenever such a purpose arises.

Re: JavaScript for Data Science

#20
post #13

I don’t want to repeat the old and tired JavaScript hate, but this just isn’t a great idea. I’d suggest that there are 3 important primitives for data science: flexible numeric types, fast math/algorithm libraries, and data manipulation being easy. JavaScript doesn’t really have any of these. Numbers are 64bit floats only - no integers, no big numbers. There aren’t equivalents to Numpy/Pandas/Scikit Learn, and the la…

JavaScript has plenty of libraries covering the basics. Here a few: https://github.com/nicolaspanel/numjs https://www.npmjs.com/package/fast-math https://smartbear.com/de/blog/2013/four-serious-math-librari... That's not the problem. The problem is mindshare and network effects. When analyzing why Python is used one way and JS another we're tempted to retroactively rationalize this with something fundamental about th…

The first repo has one core contribitor who hasn't been active since June 2018.

https://github.com/nicolaspanel/numjs/graphs/contributors

I sincerely believe it is possible for JavaScript to be a viable language ecosystem, but there is dire need for cohesion, collaboration, and longevity. As it stands, there are so many potentially viable projects strewn across the NPM landscape like old, discarded toys.

I'm not aware of an initiative, let alone ethos, in the JS community that comes anywhere close to something like NumFocus.

https://numfocus.org/

Post reply on HN