6 ms·
If Numpy, Pandas, etc. were wrappable from JavaScript this could have easily been titled "Why I use Node.js for High Performance Scientific Computing". The "Py
by boulos 11y ago
If Numpy, Pandas, etc. were wrappable from JavaScript this could have easily been titled "Why I use Node.js for High Performance Scientific Computing".
The "Python" here isn't particularly material to the result, it's mostly a wrapper around C. Toss in Cython, and now you've really gone outside the bounds of "I'm just using 'Python' for HPC!".
I agree some of the tooling and niceties are beyond a doubt best in breed with Python, but it's disingenuous to equate this to "writing HPC code in Python". If you had written a RPython to Verilog translator that produced an FPGA of your algorithm would you call that "using Python"?
- vegabook 11y agoNumpy can basically be considered to be part of the standard library for Python so I'd say using it still qualifies as "using Python". Pandas is newer but is graduating to that level of ubiquity too.
- wesm 11y agoCompletely bizarre attitude (creator of pandas here).
- vog 11y agoNot disagreeing with you, but would you mind elaborating on that?
- wesm 11y agoClaiming that using wrapped libraries written in another programming language (LAPACK, anyone?) is an inauthentic usage of the language (here, Python) is pedantic and unhelpful. C is just a wrapper for assembly, then, right?
- deleted 11y ago[deleted]
- lmm 11y agoSometimes it's not - sometimes LAPACK is written in C. Sometimes your C is just a wrapper around FORTRAN and people should take this fact seriously: modern FORTRAN is often a better option than C for numerical workloads.
- wesm 11y agoI never stated what language LAPACK was written in.
- sukulaku 11y agoWhy is it bizarre? His point is that the article shouldn't make it sound like "Python is fast", because the speed actually comes from the libraries that have been implemented in C.
- wesm 11y agoBy bizarre I mean impractical and unhelpful. What's the point of programming at all if we cannot leverage abstractions to make ourselves more productive? I believe what the article says is that "Python has tools that enable a savvy user to achieve better results with less effort". Python is extremely popular in HPC settings (including supercomputers) for this reason. I see nothing disingenuous.
- sukulaku 11y agoWell, the word "bizarre" has a commonly understood meaning, but you somehow decided to use it to mean something completely different. That's a bit bizarre :P But the article is titled: "Why I Still Use Python for High Performance Scientific Computing", and it gives the impression that Python - the language - is fast enough for HPSC. In reality, the reason why he "still" uses Python is that the libraries are fast enough for HPSC. But that's not what people see when reading posts like this. The message they see is that "Python is fast", not that some of its 3rd-party libraries are fast. But I should probably stop repeating myself here.
- andreasvc 11y agoFirst, there's no reason to only associate "Python" with "the language", it is an environment, ecosystem, etc. It's not interesting to narrowly focus on the efficiency of the interpreter. Second, it is an inherent feature of the design of CPython that its C API allows tight integration with external libraries in C. Cython does not just glue C and Python together, it does this in a way which makes the integration easier and safer than doing it by hand (e.g., generating correct reference counting code). All of this is a direct benefit of Python and its scientific ecosystem.
- JustSomeNobody 11y agoThank you for pandas.
- Scarblac 11y ago> If Numpy, Pandas, etc. were wrappable from JavaScript But they aren't, of course. For science, the fact that so many great libraries are available and they all use Numpy arrays as base datatype (from image processing to GIS to machine learning etc etc) is a real strength of Python and I doubt another lanuage is going to achieve that any time soon.
- cdavid 11y agoPython in science is more than mere wrapping: it gives you new level(s) of abstractions, unrivalled in any other generic programming language AFAIK. If it were mere wrapping, other languages would have been able to catch up fairly quickly after all. Big parts of numpy (and to a lesser degree pandas) are not in python, but lots of libraries on top of it are mostly python (scikit learn, scikits image, etc.). It is no more wrapping than lisp is wrapping the C VM.
- megalodon 11y agoI'm currently working on bringing BLAS [1] and LAPACK [2] to JavaScript. And here is a matrix/vector library with some of the BLAS functions implemented [3]. [1] https://github.com/mateogianolio/nblas https://github.com/mateogianolio/nblas [2] https://github.com/mateogianolio/nlapack https://github.com/mateogianolio/nlapack [3] https://github.com/mateogianolio/vectorious/tree/opt-cblas https://github.com/mateogianolio/vectorious/tree/opt-cblas
- superbatfish 11y agoYou clearly do not understand software.
- drpaulbrewer 11y agoShameless plug... If you want to import, export, tabulate, edit, plot and analyze CSV data in browser-side Javascript, here's something I wrote to paste numericJS, jqPlot, lzstring, and various html5 storage and file handling features together. https://github.com/DrPaulBrewer/html5csv https://github.com/DrPaulBrewer/html5csv