News for hackers. Stuff that matters.
Re:Attempts to make Python fast by rmrfstar on Wednesday October 21, 2020 @11:46AM (#24848948)
Python is the duct tape of programming languages.

Never the best tool if you have strict performance requirements, but so damn versatile it will never go away.

Cython does need better docs though, the steep learning curve means it is under-utilized.

Re:Attempts to make Python fast by johnisgood on Wednesday October 21, 2020 @01:33PM (#24850120)
> Python is the duct tape of programming languages.

For some that glue is Forth. :D

> A guy named Jean-Paul Wippler is considering using Forth as a super glue language to bind Python Perl and Tcl together in a project called Minotaur (http://www.equi4.com/minotaur/minotaur.html).

> Forth is an ideal intermediary language, precisely because it's so agile. Otherwise, it wouldn't have been chosen for OpenFirmware, which when you think about it, is a Forth system that must interface to a potentially wide variety of programming language environments.

Re:Attempts to make Python fast by bydo on Wednesday October 21, 2020 @12:55PM (#24849670)
We said the same thing about Perl for a couple decades.
Re:Attempts to make Python fast by rmrfstar on Wednesday October 21, 2020 @02:01PM (#24850383)
I feel like Python's readability and interoperability with C will give it more staying power.

Is this wishful thinking?

Re:Attempts to make Python fast by user5994461 on Wednesday October 21, 2020 @03:21PM (#24851097)
Python is everywhere. The amount of python code that is written every day is staggering. It will be there 30 years from now doing the same thing and people will be looking at that code like it's COBOL.

Perl is extinct in comparison. It's not been used for any projects anywhere for a long long time.

Re:Attempts to make Python fast by jnxx on Thursday October 22, 2020 @05:07AM (#24856125)
> Perl is extinct in comparison.

Which is a good example that the decrease in use can go a lot faster than you think. Perl was widely used in 2000, and thought to be on par with Python. Similarly Visual Basic which nobody seems to remember any more.

Also, COBOL is simply used because it is uneconomical to rewrite those old programs, not because it is a good language to write new stuff in. But the heavy dependency of Python programs on libraries hosted across the web means that obsolescence can happen a lot faster today; a COBOL program is almost totally self-contained in comparison.

Re:Attempts to make Python fast by user5994461 on Thursday October 22, 2020 @05:28AM (#24856247)
Widely used is relative, Perl at its peak was used in relatively small applications and short scripts.

I worked at the largest US bank and had the unfortunate task to decommission the last Perl software. Doing a lot of archeology there was never much of Perl really, some short scripts here and there. One or two flagship applications in the early 2000 but they were rewritten long ago.

Looking at our python codebase however, that's ten of millions of lines of code covering all types of applications and all aspects of the business. It will still be there 30 years later.

The dependency to the interpreter and external libraries is a problem indeed. They're constantly shifting or getting abandoned under your feet. I wonder how this will be managed eventually.

Re:Attempts to make Python fast by ryl00 on Wednesday October 21, 2020 @12:58PM (#24849711)
Plenty of us still do.
Re:Attempts to make Python fast by hombre_fatal on Wednesday October 21, 2020 @01:24PM (#24849998)
As a former Perl user, I think it's time we finally derank "plenty" into just "handfuls".
Re:Attempts to make Python fast by Foober223 on Wednesday October 21, 2020 @02:01PM (#24850381)
Re:Attempts to make Python fast by hitekker on Wednesday October 21, 2020 @05:09PM (#24852209)
Is this a parody?
Re:Attempts to make Python fast by rurban on Friday October 23, 2020 @01:41PM (#24871928)
You'd never know with Will the Chill.

In the meantime perl11.org went down.

Re:Attempts to make Python fast by edsac_xyzw on Saturday October 24, 2020 @01:40PM (#24880713)
This duct type is the Python native extension api (not python ctypes) which allows creating native code modules (aka libraries) in C or C++ and creating wrappers to existing C or C++ libraries. This escape hatch that enables offloading cpu-intensive computations to high performance libraries written in C, C++ or Fortran. Another benefit of python modules written in C or C++ is that they are not affected by the GIL (Global Interpreter Lock) problem, thus they can take advantage of multi-core and SIMD instructions and achieve higher performance.
Re:Attempts to make Python fast by centimeter on Wednesday October 21, 2020 @12:22PM (#24849317)
And like things made out of duct tape, I’ve never found anything made using python that actually functioned well.
Re:Attempts to make Python fast by NortySpock on Wednesday October 21, 2020 @12:27PM (#24849361)
Did it function well enough for your purposes?

Because I don't need it to be hermetically-sealed perfection, I just need my python code to spit out a good result when I throw it at a problem; nevermind that it took a few seconds to spin up or needs more memory than a perfectly crafted C program.

Re:Attempts to make Python fast by centimeter on Wednesday October 21, 2020 @01:24PM (#24849996)
Most python apps don’t function well enough for my purposes.
Re:Attempts to make Python fast by coldtea on Wednesday October 21, 2020 @04:18PM (#24851653)
Then you have bizarro purposes, because Python is in production all over the world, in business critical, billion at stakes, systems...
Re:Attempts to make Python fast by centimeter on Thursday October 22, 2020 @01:04PM (#24860290)
Or maybe you just have very low standards.
Re:Attempts to make Python fast by coldtea on Thursday October 22, 2020 @06:22PM (#24863912)
What part of "business critical, billions at stake, systems" conveys "low standards"?

And if Google, Amazon, NASA, etc (all places where Python is used heavily), are not high enough for you, what exactly are your standards?

Re:Attempts to make Python fast by centimeter on Sunday October 25, 2020 @01:11AM (#24884005)
> what exactly are your standards

Not dog shit. Just because you can make money slinging dog shit doesn’t make it good

Re:Attempts to make Python fast by entropicdrifter on Wednesday October 21, 2020 @12:28PM (#24849384)
It might never be the best tool for the job, but it has certainly saved lives before: https://confessionsoftheprofessions.com/interesting-facts-of...
Re:Attempts to make Python fast by gameswithgo on Wednesday October 21, 2020 @12:50PM (#24849614)
AlphaZero?