Live data from Hacker News

Homogenization of scientific computing – Python is eating other languages’ lunch

r-bloggers.com

21–30 of 184 posts

Re: Homogenization of scientific computing – Python is eating other languages’ lunch

#21
post #13

Earlier quoted context omitted.

What is simpler than this? x = arange(0, 2*pi, 1e-2) plot(x, sin(x))

This: set xrange [0:2*pi] plot sin(x) EDIT: Yes, this is gnuplot, not R.

However, that is gnuplot (I think), not R code. I have not been clear with my question, since I was talking about this parent comment:

R may still have an advantage when it comes to plotting simplicity

Re: Homogenization of scientific computing – Python is eating other languages’ lunch

#22
post #2

My only question mark from this is matplotlib. I tried it five or six years ago and it seemed clunky to use and install. And worst I couldn't seem to just throw up a plot, I recall there being a lot of settings required. And the plots didn't look good by default you had to fool with fonts, font sizes, etc. Does anyone know if it's improved a lot since then? Otherwise I'm not seeing how it could hold a candle to R's p…

I vastly prefer R's plotting capabilities, even if I don't generally use ggplot2.

Re: Homogenization of scientific computing – Python is eating other languages’ lunch

#23
I know that I use python because of how easy it is to code. I can focus wholly, totally on the logic of my code without ever worrying about if I misplaced a semi-colon or left out some weird punctuation.

Python frees me to code and not worry about things that get in the way of coding. That's why it's eating other language's lunches, the freedom is almost intoxicating.

Re: Homogenization of scientific computing – Python is eating other languages’ lunch

#24
post #13
post #4

Earlier quoted context omitted.

R may still have an advantage when it comes to plotting simplicity. On the Python side, matplotlib is still a bit of a pain, but has improved. Also look at ggplot.py (alpha-ish?) and Bokeh from ContinuumIO

What is simpler than this? x = arange(0, 2*pi, 1e-2) plot(x, sin(x))

For things that only need a one or two line command set, Python and R are probably similar. Once things get a bit more complex, matplotlib may not seem as "friendly" to those used to ggplot.

But this about perspective. Coming from a Python background, I would rather stay in Python and work with matplotlib, seaborn, or even ggplot.py, than try to work my data management code into the R model.

Re: Homogenization of scientific computing – Python is eating other languages’ lunch

#25
post #16

For scientific computing with some R or Matlab/Octave background, I suggest the new language Julia: http://julialang.org/ Scientific computing Python community commonly use version 2.x there is the migration step to version 3.x ahead..

For me, Python has everything I need, among which there are many things that R or Matlab have not. If I should summarize what makes Python so suited for the things I do (and did when I was still doing research) it's the following:

Python is an easy to use scripting language that can be integrated with number-crunching C/C++ code and for which a scientific standard library _with a vibrant community_ exists.

Also, I haven't written a piece of 2.x code in half a year, which is of course only possible because scipy and matplotlib are 3.x ready.

Re: Homogenization of scientific computing – Python is eating other languages’ lunch

#26

Earlier quoted context omitted.

Yeah, I'm a Python convert like the author, though coming mostly from Matlab rather than R, and everyone in my field reacts with surprise when I tell them I prefer Python. They're open-minded, and I'm hoping to convert a few myself, but I don't think the mass migration has happened yet. Regarding your second comment- you're correct of course, but what makes this a "blind spot"? After all, if the user is writing code…

I call it a "bizarre blind spot" because it seems like there's a silent consensus to never talk about this basic fact. It's a bit surreal attending SciPy and hearing all of these people talking about scientific computing in Python when almost every single person in the room spends the vast majority of their time and energy writing C code. I disagree that the separation between implementation and user-land that's enfo…

Fair enough. And interesting, I hadn't thought of some of this.

SciPy users are certainly doing scientific computing in Python, but it is surprising to get that attitude from the developers.

Re: Homogenization of scientific computing – Python is eating other languages’ lunch

#27
As much as I like scikit-learn and pandas, Python likely won't be replacing my R code for quite some time, and I'll continue to hop between the two of then.

R is, first and foremost, a language for statistical analysis, and that's really where it shines. Python is getting better (it used to be "you want to do...what?"), but it doesn't have nearly the package infrastructure R does for advanced statistics. It is, for most statistical computing tasks not even on the radar for a number of my colleagues.

Re: Homogenization of scientific computing – Python is eating other languages’ lunch

#29
post #20

[deleted]

Edit: in response to "why isn't there a movement around using JavaScript for scientific computing", which I thought was an excellent question (which has crossed my mind on occasion).

Typed arrays and real support for integers are crucial features for scientific computing. Although JavaScript recently got some support for typed arrays, they are pretty awkward to use and there still isn't any support for 64-bit integers, let alone even larger types (128-bit). There's also no support for true multidimensional arrays, meaning you're left to simulate them for yourself like in C. Oh, and let's not forget how awful basic things like equality are in JavaScript. Given how awkward numbers, typed arrays and multidimensional arrays are in JS and how essential all of these things are for scientific computing, I think you can see why this hasn't happened.

Re: Homogenization of scientific computing – Python is eating other languages’ lunch

#30

I know that I use python because of how easy it is to code. I can focus wholly, totally on the logic of my code without ever worrying about if I misplaced a semi-colon or left out some weird punctuation. Python frees me to code and not worry about things that get in the way of coding. That's why it's eating other language's lunches, the freedom is almost intoxicating.

It's ironic that you say that, given that if you don't get the whitespace correct, you'll have a syntax error. That's one of the big reason Python rubs me the wrong way: white space is semantic.
Post reply on HN