3 ms·
Do you think that relying less in C code could be better for Python and it’s community? I mean less focus on being “glue” between C code and more focus con opt
by elnatro 3y ago
Do you think that relying less in C code could be better for Python and it’s community?
I mean less focus on being “glue” between C code and more focus con optimizing the interpreter?
- generichuman 3y agoIt is unlikely people would use Python if it didn't rely on C code. If your ML model takes hours when it can take minutes, or takes days when it can take hours, you will move away. You could move away to another language or a faster interpreter but that's a different discussion. > more focus con optimizing the interpreter This is good but there's an upper bound to performance of interpreted languages. Maybe the Python interpreter could be as fast as V8, but it is unlikely to be fast as JVM. People will need to drop down to C / Fortran for whatever compute intensive work they're doing.
- robertlagrant 3y ago> If your ML model takes hours when it can take minutes, or takes days when it can take hours, you will move away. You could move away to another language or a faster interpreter but that's a different discussion. How much of this is done in Python, vs constructing instructions in Python to run on a GPU at uber speed?
- generichuman 3y agoWidely used libraries for python such as SciPy, PyTorch, TensorFlow, Numpy all drop down to lower level languages (C/C++/Fortran). I haven't seen many people doing ML in Python without one of these libraries, so I'd say it is mostly constructing instructions in Python and offloading the actual intensive work to these libraries (which may or may not run on GPU depending on your hardware).
- wheelerof4te 3y agoIf you asked me, Python not only shouldn't rely on (third-party) C library code, but it shouldn't even be used for cases where pure Python is not optimal.
- steveBK123 3y agoRight, Python is the new Perl and people are misunderstanding what that means.
- wheelerof4te 3y agoPython is Bash++. Always was, always will be.
- steveBK123 3y agoBut as a signifier it’s actually the opposite. Someone that knows bash in 2023 is likely a decent well rounded dev. Python in 2023 doesn’t even imply the ability to program.
- throwaway2037 3y agoOuch. I know the feeling. Is your thinking: If they can program in Bash, they have learned how to program in many other languages, and Bash is their glue to make stuff "schedulable" via crontab, (dreaded) AutoSys, k8s, etc.? For me, learning how to program /OK/ in Bash has been a very difficult journey -- as difficult as Perl and Python, due to insanely weak typing. You are always fighting unknowns when you receive some function parameters. Related: When I search for help on a Python foundation library or built-in funciton, my Google search results are overwhelmed by "learn-to-program"-type of websites. I guess it makes sense: During the gold rush, don't dig for gold, rather sell shovels!
- steveBK123 3y agoLots of schools / boot camps / etc churning out people who "know python" but are not "python devs". Think - data scientists / data analysts / stats / business analysts / etc.. who need to monkey around in some data, and are like slightly more than an Excel power user. On the other hand, no one is doing the same for Bash. You are using Bash because you know how to program something else and need to schedule it / wrap it in a shell script / etc. The fact that someone even knows Bash exists is a filter. Having an idea of where you might need to use it, a second filter. And having successfully done so, a third filter.
- didibus 3y agoCreator of LLVM and Swift is doing just that: https://www.modular.com/mojo https://www.modular.com/mojo