← Back to context

Comment by svara

5 days ago

The counterargument used to be, the heavy lifting will be offloaded to python modules written in C, like numpy.

Which was true, but maybe not the strongest argument. Why not use a faster language in the first place?

But it's different now. There's huge classes of problems where pytorch, jax &co. are the only options that don't suck.

Good luck competing with python code that uses them on performance.

> Why not use a faster language in the first place?

Well for the obvious reason that there isn't really anything like a Jupyter notebook for C. I can interactively manipulate and display huge datasets in Python, and without having to buy a Matlab license. That's why Python took off in this area, really

  • I believe I heard that argument since before jupyter became popular.

    Usually it was accompanied by saying that the time needed to write code is often more important than the time it takes to run, which is also often true.

    All that said, jupyter is probably part of python's success, although I'm not the only one who actively avoids it and views it as a bit of a code smell.

    • I love Jupyter! What I don’t love is people writing large projects in a workbook, then asking how to run it as-is in production so they can continue to iterate on it in that form.

      It’s not impossible, but neither is it the sort of thing you want to encourage.

  • I agree - Jupyter notebook is really the key feature Python has that makes it attractive for research/scientific computing. I would say the REPL too but until very recently it was extremely shoddy so I doubt many people did any serious work in it.

    • > I would say the REPL too but until very recently it was extremely shoddy

      Can you elaborate? I've been using the Python REPL for more than two decades now, and I've never found it to be "shoddy". Indeed, in pretty much every Python project I work on, one of the first features I add for development is a standard way to load a REPL with all of the objects that the code works with set up properly, so I can inspect them.

      2 replies →

    • The predecessors were really popular before it too - MATLAB in engineering in particular, Mathematica also popular in Physics and Maths departments particularly where the symbolic functionality was more useful. I used both in academia and IPython (later renamed Jupyter) was clearly a natural extension of those but open source, and without the baggage of MATLAB (only one function definition per file, etc.)

>Which was true, but maybe not the strongest argument. Why not use a faster language in the first place?

Because most faster languages sucks donkeys balls when it comes to using them quickly and without ceremony. Never mind trying to teach non-programmers (e.g. physics, statistics, etc people) them...