Poll

Do you like Python?

Yes, I love it.
22 (24.2%)
Yes, I like it.
24 (26.4%)
No, I don't like it
17 (18.7%)
No, I hate it.
14 (15.4%)
No opinion, indiferent
11 (12.1%)
I refuse to answer
3 (3.3%)

Total Members Voted: 90

Author Topic: Python becomes the most popular language  (Read 96988 times)

0 Members and 2 Guests are viewing this topic.

Offline Just_another_Dave

  • Regular Contributor
  • *
  • Posts: 192
  • Country: es
Re: Python becomes the most popular language
« Reply #200 on: November 01, 2021, 12:46:43 pm »
Ok, Python is an interpreted language and therefore it is slower than C. Everybody agree with that.
But despite that, there is an ever-increasing growth of interpreted languages ​​vs. compiled languages.
Perhaps the increased speed of computers and a need for greater flexibility in programming aid in this change.

Some languages can be interpreted and compiled offering the best of both worlds. In fact there’s a C++ interpreter developed by CERN
 

Offline tszaboo

  • Super Contributor
  • ***
  • Posts: 7391
  • Country: nl
  • Current job: ATEX product design
Re: Python becomes the most popular language
« Reply #201 on: November 01, 2021, 01:28:02 pm »
Ok, Python is an interpreted language and therefore it is slower than C. Everybody agree with that.
But despite that, there is an ever-increasing growth of interpreted languages ​​vs. compiled languages.
Perhaps the increased speed of computers and a need for greater flexibility in programming aid in this change.

Some languages can be interpreted and compiled offering the best of both worlds. In fact there’s a C++ interpreter developed by CERN

just saying:
Quote
Numba translates Python functions to optimized machine code at runtime using the industry-standard LLVM compiler library. Numba-compiled numerical algorithms in Python can approach the speeds of C or FORTRAN.

You don't need to replace the Python interpreter, run a separate compilation step, or even have a C/C++ compiler installed. Just apply one of the Numba decorators to your Python function, and Numba does the rest.
 

Offline Just_another_Dave

  • Regular Contributor
  • *
  • Posts: 192
  • Country: es
Re: Python becomes the most popular language
« Reply #202 on: November 01, 2021, 01:42:59 pm »
Ok, Python is an interpreted language and therefore it is slower than C. Everybody agree with that.
But despite that, there is an ever-increasing growth of interpreted languages ​​vs. compiled languages.
Perhaps the increased speed of computers and a need for greater flexibility in programming aid in this change.

Some languages can be interpreted and compiled offering the best of both worlds. In fact there’s a C++ interpreter developed by CERN

just saying:
Quote
Numba translates Python functions to optimized machine code at runtime using the industry-standard LLVM compiler library. Numba-compiled numerical algorithms in Python can approach the speeds of C or FORTRAN.

You don't need to replace the Python interpreter, run a separate compilation step, or even have a C/C++ compiler installed. Just apply one of the Numba decorators to your Python function, and Numba does the rest.

I have to try numba. It seems a great tool

I’ve used Nuitka in the past for compiling python to machine code, which is great but it can’t be used with jupyter notebooks
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26907
  • Country: nl
    • NCT Developments
Re: Python becomes the most popular language
« Reply #203 on: November 01, 2021, 01:45:49 pm »
Ok, Python is an interpreted language and therefore it is slower than C. Everybody agree with that.
The real answer is: it depends. If you are going to put an algorithm together from scratch using basic Python language constructs then it will be slower. If you use Python as a conduit to push data between blocks of native binary code (libraries), then it will be just as fast (or maybe even faster if the creator of the library used some neat optimising tricks).
.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline tszaboo

  • Super Contributor
  • ***
  • Posts: 7391
  • Country: nl
  • Current job: ATEX product design
Re: Python becomes the most popular language
« Reply #204 on: November 01, 2021, 02:05:50 pm »
Ok, Python is an interpreted language and therefore it is slower than C. Everybody agree with that.
But despite that, there is an ever-increasing growth of interpreted languages ​​vs. compiled languages.
Perhaps the increased speed of computers and a need for greater flexibility in programming aid in this change.

Some languages can be interpreted and compiled offering the best of both worlds. In fact there’s a C++ interpreter developed by CERN

just saying:
Quote
Numba translates Python functions to optimized machine code at runtime using the industry-standard LLVM compiler library. Numba-compiled numerical algorithms in Python can approach the speeds of C or FORTRAN.

You don't need to replace the Python interpreter, run a separate compilation step, or even have a C/C++ compiler installed. Just apply one of the Numba decorators to your Python function, and Numba does the rest.

I have to try numba. It seems a great tool

I’ve used Nuitka in the past for compiling python to machine code, which is great but it can’t be used with jupyter notebooks
The basic concept is that you use functions available in numpy arrays for example
When you write the Numba orerators, you will fix the variable type. So when you call A+B it doesn't have to look up which types of A and B is, just uses the "int" A+B for example. And doesn't check for NaN for example.
It varies how much it speeds up the code. I never found a real use case for it, the added code complexity and error messages made the entire process cumbersome. I rather wait for the computer to finish calculations.
That being said the longest I had to wait for python to finish computing was maybe 30 minutes. Machine learning in torch. Good luck writing that in C.
 
The following users thanked this post: Just_another_Dave

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4039
  • Country: nz
Re: Python becomes the most popular language
« Reply #205 on: November 01, 2021, 02:23:43 pm »
If you want to use your time useful, then join the python core development team. You get to program in C and develop these menial tasks by hand.

I joined the core RISC-V ISA development team. The Python development team will have to make do without me.

Quote
Other than posting here, saying: " Look it is slow for things that you are not meant to do".

Not meant to do? According to who?

If the Python designers didn't want us to use assignment statements with arithmetic, ifs and loops, and array and structure access ... then why did they provide them?
 

Offline Just_another_Dave

  • Regular Contributor
  • *
  • Posts: 192
  • Country: es
Re: Python becomes the most popular language
« Reply #206 on: November 01, 2021, 02:27:25 pm »
Ok, Python is an interpreted language and therefore it is slower than C. Everybody agree with that.
But despite that, there is an ever-increasing growth of interpreted languages ​​vs. compiled languages.
Perhaps the increased speed of computers and a need for greater flexibility in programming aid in this change.

Some languages can be interpreted and compiled offering the best of both worlds. In fact there’s a C++ interpreter developed by CERN

just saying:
Quote
Numba translates Python functions to optimized machine code at runtime using the industry-standard LLVM compiler library. Numba-compiled numerical algorithms in Python can approach the speeds of C or FORTRAN.

You don't need to replace the Python interpreter, run a separate compilation step, or even have a C/C++ compiler installed. Just apply one of the Numba decorators to your Python function, and Numba does the rest.

I have to try numba. It seems a great tool

I’ve used Nuitka in the past for compiling python to machine code, which is great but it can’t be used with jupyter notebooks
The basic concept is that you use functions available in numpy arrays for example
When you write the Numba orerators, you will fix the variable type. So when you call A+B it doesn't have to look up which types of A and B is, just uses the "int" A+B for example. And doesn't check for NaN for example.
It varies how much it speeds up the code. I never found a real use case for it, the added code complexity and error messages made the entire process cumbersome. I rather wait for the computer to finish calculations.
That being said the longest I had to wait for python to finish computing was maybe 30 minutes. Machine learning in torch. Good luck writing that in C.

It seems quite interesting for implementing circuit optimization programs. I normally use matlab for that and I was considering switching to julia or Ada (probably the last one due to its memory management capabilities, which is one of the major problems we usually have), but it is nice to know another alternative
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6264
  • Country: fi
    • My home page and email address
Re: Python becomes the most popular language
« Reply #207 on: November 01, 2021, 04:49:23 pm »
No, Python is not only other tool. Is more popular than the other tools.
Why do you believe popularity matters?
 
The following users thanked this post: george.b

Offline PicuinoTopic starter

  • Frequent Contributor
  • **
  • Posts: 730
  • Country: 00
    • Picuino web
Re: Python becomes the most popular language
« Reply #208 on: November 01, 2021, 04:54:30 pm »
I think being the most popular of all languages ​​must be for some reasons.
That is precisely what I want to know with this thread.
« Last Edit: November 01, 2021, 05:33:12 pm by Picuino »
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14481
  • Country: fr
Re: Python becomes the most popular language
« Reply #209 on: November 01, 2021, 05:35:33 pm »
Once you have tried Python you will use it again.
Now that is just silly.

Python is only a tool among tools.

No, Python is not only other tool. Is more popular than the other tools.

That doesn't mean anything here. In what context, for what purpose, compared to what other tools? And what does popularity even mean? (As we have already pointed out.)

Just silly is having a simple, useful, free, ubiquitous and popular tool and not wanting to use it.

Uh. That's the silliest and boderline propagandist claim I've ever read.

As someone said, if all you have is a hammer, you'll see nails everywhere.
I'll add to this that if all you see are hammers, you'll tend to ignore any other existing tool whatever they are and whoever uses them.

So, who are you exactly to tell us what we should or should not be using?
 

Offline PicuinoTopic starter

  • Frequent Contributor
  • **
  • Posts: 730
  • Country: 00
    • Picuino web
Re: Python becomes the most popular language
« Reply #210 on: November 01, 2021, 05:49:52 pm »
I am not saying that you should use Python. I do not gain or lose anything with it. Python is not a trademark of a commercial company is just open source. Nobody makes money advertising Python and I think  Python is sold alone.
What I'm saying is that I think once you use Python, it's such a useful tool, that you tend to keep using it. That is what has happened to me and that is why I think it will happen to others.

I know and use many other tools, but now we are not talking about them.

In this case you seem annoying that Python is a good tool. Why?

Edit:
I am expressing my opinion without offending anyone. You are not just giving your opinion but you are making a personal attack. Does it bother you that others give their opinion freely?
« Last Edit: November 01, 2021, 06:06:22 pm by Picuino »
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6264
  • Country: fi
    • My home page and email address
Re: Python becomes the most popular language
« Reply #211 on: November 01, 2021, 06:22:17 pm »
I think being the most popular of all languages ​​must be for some reasons.
That is precisely what I want to know with this thread.
That something is popular has everything to do with humans and marketing, and very little to nothing to do with technical merit.

If it were otherwise, advertisements and branding would be a complete waste of money.  From the commercial business world, we can immediately see the opposite is true: you can make almost anything popular by branding and marketing.  This applies to scientists, engineers, and developers just as much as it does to everyone else: just go look at the Test Equipment forum here for examples.

The same is blatantly obvious at even Q&A sites like StackOverflow and StackExchange network, where popularity, and verifiable correctness of answers, are only very loosely coupled.  Often, the most popular answer is not the correct one.

In the world of humans, image and appearance rules; the content and character is most often irrelevant.
 

Offline PicuinoTopic starter

  • Frequent Contributor
  • **
  • Posts: 730
  • Country: 00
    • Picuino web
Re: Python becomes the most popular language
« Reply #212 on: November 01, 2021, 06:35:36 pm »
That is the case for example of VHS vs Beta video. In the end, the worst of the two formats won.
But in this case it is not a trademark and there is no advertisements. It is counterintuitive for an interpreted language to reach such popularity in a world where speed is so prized.
Most users of programming languages ​​are knowledgeable and smart people who simply do not get carried away simply by popularity reasons to use a language.

My case is not an example because I am an occasional, non-professional user of Python. But there are many professional teams using this language for reasons that go beyond Microsoft or other brand advertising.

Edit:
https://medium.com/@trungluongquang/why-python-is-popular-despite-being-super-slow-83a8320412a9
« Last Edit: November 01, 2021, 06:38:08 pm by Picuino »
 

Offline PicuinoTopic starter

  • Frequent Contributor
  • **
  • Posts: 730
  • Country: 00
    • Picuino web
Re: Python becomes the most popular language
« Reply #213 on: November 01, 2021, 06:49:24 pm »
As already mentioned, Perl has better libraries and fewer incompatibilities. Ruby outperforms Python in several ways. All of them are Open Source, however only one reaches first place in popularity.
It may be due to the support of the language by Google. But Google has chosen Python years ago for reasons other than ads or popularity.
Because Python is an Open Source project, it does not belong to any company, like Linux.
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6264
  • Country: fi
    • My home page and email address
Re: Python becomes the most popular language
« Reply #214 on: November 01, 2021, 07:39:58 pm »
But in this case it is not a trademark and there is no advertisements.
You don't think the numerous blog posts and Youtube videos are not marketing?

They are not paid advertisements, but they most definitely have the effect of marketing.  Whether such marketing is designed and intentional, doesn't matter: the effect on humans is still the same.

And no, I did definitely not refer to paid marketing.  I was thinking of those who prefer to work with humans and for humans, doing e.g. Youtube videos, blog posts, tech articles, and so on, who find gentle-learning-curve languages like Python enticing: easy to learn for not-so-technical people, but powerful enough to get stuff done.

It is counterintuitive for an interpreted language to reach such popularity in a world where speed is so prized.
You have that completely wrong.

Humans appreciate effortlessness much more than they appreciate speed or efficiency.

Indeed, those who appreciate anything besides effortlessness are called nerds, gearheads, adrenaline addicts, et cetera.

There are entire programming languages developed for nothing but code golf, but almost nothing devoted to making the most efficient and fast programming language possible.  (Rust, Julia, Go are dedicated to make them as expressive and powerful as possible for humans to use; i.e. as effortless as possible, not as efficient or as fast as possible: the latter are just secondary goals, implemented only when not in conflict with the first.)  This alone proves your intuition wrong.

I'm not saying that there is anything wrong in being this kind of a human; I definitely am myself.  I highly value effortlessness, and only do otherwise in things I like doing, and in things I consider my (social, contractual, or self-assumed) responsibility.  I just believe that being frank/direct and honest about it yields the best results overall, and does the least amount of harm.

Most users of programming languages ​​are knowledgeable and smart people who simply do not get carried away simply by popularity reasons to use a language.
Um.  Where do you live?  Wakanda?  Heaven?  La-la-land?

Most users of programming languages are near-idiots swayed by passing fads, in my experience over the last three decades.  Vast majority, like the rest of humanity, is prone to magical thinking.

"Getting carried away simply by ..." is, in my definition, extremely typical of all programmers; indeed, of all humans who like doing what they do.  Myself most definitely included!



Do note that I am one of the ones who said they do use Python, and even recommend it for others for specific use cases (where I've found it useful); I have no issue with Python.  I do believe I, in general terms, recognize both its strengths and its weaknesses.

My goal here is to 1) show that using these metrics, 'popularity' is irrelevant, no matter how emotionally important it might feel; or shown a counterexample and learn more myself; and 2) that Python is a tool that is well suited for some tasks, and not so well suited for others; and the true strength lies in recognizing the two cases, and in picking a tool that is best suited for the task at hand and the humans involved.
« Last Edit: November 01, 2021, 07:45:07 pm by Nominal Animal »
 
The following users thanked this post: cfbsoftware, mansaxel

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14481
  • Country: fr
Re: Python becomes the most popular language
« Reply #215 on: November 01, 2021, 07:50:03 pm »
It is counterintuitive for an interpreted language to reach such popularity in a world where speed is so prized.
You have that completely wrong.
Humans appreciate effortlessness much more than they appreciate speed or efficiency.

Yep. Actually, almost the opposite of efficiency has been witnessed in computing for the last few decades.
https://en.wikipedia.org/wiki/Wirth%27s_law

Most users of programming languages are near-idiots swayed by passing fads, in my experience over the last three decades.  Vast majority, like the rest of humanity, is prone to magical thinking.

That's right. Which is why for many, the relationship they have with technology looks more like worshipping than engineering.
The very idea that "if I use this one tool that everyone else seems to be using for almost everything, then my project can't fail" is magical thinking.
 
The following users thanked this post: cfbsoftware

Offline Just_another_Dave

  • Regular Contributor
  • *
  • Posts: 192
  • Country: es
Re: Python becomes the most popular language
« Reply #216 on: November 01, 2021, 10:26:23 pm »
It is counterintuitive for an interpreted language to reach such popularity in a world where speed is so prized.
You have that completely wrong.
Humans appreciate effortlessness much more than they appreciate speed or efficiency.

Yep. Actually, almost the opposite of efficiency has been witnessed in computing for the last few decades.
https://en.wikipedia.org/wiki/Wirth%27s_law

I once read a review about Electron js in which the author stated that thanks to that technology we were able to develop software that makes 2021 computers perform like hardware made before 2010
 

Offline cfbsoftware

  • Regular Contributor
  • *
  • Posts: 117
  • Country: au
    • Astrobe: Oberon IDE for Cortex-M and FPGA Development
Re: Python becomes the most popular language
« Reply #217 on: November 02, 2021, 12:00:29 am »
I think being the most popular of all languages ​​must be for some reasons.
That is precisely what I want to know with this thread.
I'm interested in knowing why you want to know? Why is it important to you? What does it matter to you if something is popular?

Mandarin Chinese is the most popular of all spoken languages in the world. Are you interested in learning Mandarin Chinese? If not, why not?

If you think about your possible answers to those questions you might begin to understand why others do not share your enthusiasm for Python.

Chris Burrows
CFB Software
https://www.astrobe.com
 

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4039
  • Country: nz
Re: Python becomes the most popular language
« Reply #218 on: November 02, 2021, 04:07:31 am »
I think being the most popular of all languages ​​must be for some reasons.
That is precisely what I want to know with this thread.
I'm interested in knowing why you want to know? Why is it important to you? What does it matter to you if something is popular?

Mandarin Chinese is the most popular of all spoken languages in the world. Are you interested in learning Mandarin Chinese? If not, why not?

Not a bad example.

Mandarin Chinese has the largest number of native speakers of any language, by a large margin (921 million vs 370 million for English). But English has about 20% more users who *can* speak it (1.348 vs 1.120 billion), and with a much greater geographical spread.

English is useful in many many more situations and places.

Personally, I find Russian the next most interesting language. It's officially the 8th most commonly-spoken language, but in practical terms it's 5th equal with Arabic, Bengali, French, and Portuguese. I would think it's top three (with English and Chinese) for people doing scientific and engineering work.

English is the native language of people in 23% of the Earth's land area. Russian is next at 11%. Chinese is only 6%, behind Arabic, French, Spanish, and Portuguese.
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14481
  • Country: fr
Re: Python becomes the most popular language
« Reply #219 on: November 02, 2021, 06:01:01 pm »
Beyond  that, as I think I said earlier, the dynamics of popularity in general is something that is very hard to fully understand, even harder to predict. It's not restricted to programming tools. Same for music, any kind of trend, brand new products that didn't exist before, etc. Some things succeed, some miserably fail.

Sure once something starts getting popular, it's just a matter of a feedback loop to keep it going, which is the point we've been at with Python for a numbers of years now. But what really starts it, and likewise, what can end it, is still relatively mysterious in many ways. The inherent merits of the thing in question is often only marginal in the equation.

So, while *fully* understanding why some programming language has become popular is a lost cause, believing that the answer lies in its inherent technical merits (and trying to back up this impression every occasion one gets) is, in most cases, wrong. IMHO.
 

Online mfro

  • Regular Contributor
  • *
  • Posts: 210
  • Country: de
Re: Python becomes the most popular language
« Reply #220 on: November 02, 2021, 07:18:30 pm »
I'm at the opinion that Python's success is only partly related just to the language itself.
The whole Python ecosystem - where you'll easily find a package for nearly everything with reasonable quality, mostly good documentation that's well integrated - is unprecedented IMHO and substantially adding to it's popularity
Beethoven wrote his first symphony in C.
 

Offline Marco

  • Super Contributor
  • ***
  • Posts: 6722
  • Country: nl
Re: Python becomes the most popular language
« Reply #221 on: November 02, 2021, 07:56:06 pm »
Perl has better libraries
It's not on the same scale any more. You can argue in some niches Perl is better, but it's been vastly superseded in breadth.
Quote
Ruby outperforms Python in several ways.
With almost no use at all outside its niche, where its fast becoming a legacy language (used by some giants though, so it will stick around for a long long time)

User base and popularity create network effects. Even if a large percentage of the created code is trash, if it pulls in enough people some of it won't be. If it pulls in enough people, enough of the code will be useful that you can only ignore it at your own economic detriment. Hell, Node.JS has some niche frameworks which simply don't exist in other languages and would take ages to recreate. Sometimes getting over your distaste for a language is best for your pocketbook.
 

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4039
  • Country: nz
Re: Python becomes the most popular language
« Reply #222 on: November 02, 2021, 09:28:43 pm »
I'm at the opinion that Python's success is only partly related just to the language itself.
The whole Python ecosystem - where you'll easily find a package for nearly everything with reasonable quality, mostly good documentation that's well integrated - is unprecedented IMHO and substantially adding to it's popularity

I don't think it's either unprecedented or unique.

Perl was there first with a huge library of code for doing almost anything, and easy package manager.

Javascript has I think probably a larger code ecosystem. The package management is about as good. With "Node" you can use JS on the command line. And with Node using v8 to run the JavaScript you get a superb JIT compiler that is many times faster than Python.

Javascript started off pretty crappy but has improved a lot, and you have a choice of improved versions that are compatible with each other e.g. Coffeescript and TypeScript (with type declarations).
 

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4039
  • Country: nz
Re: Python becomes the most popular language
« Reply #223 on: November 02, 2021, 10:38:31 pm »
Just for fun, I converted that sort program to Javascript. Mostly this was just taking the C version, removing all the types, and sprinkling in the odd "function" or "var" keyword and changing rand() to Math.random() and so forth.

On my x86 Linux machine I get:

 0.816 gcc -O qsort.c -o qsort
 1.415 Javascript
 1.760 gcc qsort.c -o qsort
43.380 Python

So that's pretty fast -- faster than people who use C without turning on the optimiser get -- but it is every bit as dynamicy and scripty as Python.

And it's programmed in the C explicit step-by-step way that you're apparently not supposed to do in Python, not using built in higher level things that Javascript does actually have too.

Note that the Javascript time INCLUDES the time to parse the program and compile it to machine code. That's about another 0.040 seconds for the C version.

Here's qsort.js:

Code: [Select]
const ARRAYSIZE = 10000000;

function partition(values, left, right, pivotidx) {
    let pivot = values[pivotidx];
    var temp = values[right];
    values[right] = values[pivotidx];
    values[pivotidx] = temp;
    var storeidx = left;
    for(var idx = left; idx<right; idx++) {
if (values[idx] < pivot) {
            temp = values[idx];
            values[idx] = values[storeidx];
            values[storeidx] = temp;
            storeidx++;
}
    }
   
    temp = values[storeidx];
    values[storeidx] = values[right];
    values[right] = temp;
    return storeidx;
}

function _doquicksort(values, left, right) {
    if (right > left) {
var pivotidx = Math.trunc((left + right) / 2);
pivotidx = partition(values, left, right, pivotidx);
_doquicksort(values, left, pivotidx);
_doquicksort(values, pivotidx + 1, right);
    }
    return values;
}

function quicksort(nums) {
   return _doquicksort(nums, 0, ARRAYSIZE-1);
}
       
var nums = [];
for(var i=0; i<ARRAYSIZE; i++) {
    nums[i] = Math.random();
}

var timeit = Date.now();
nums = quicksort(nums);
timeit = Date.now() - timeit;
console.log("time = %f\n", timeit/1000);

And running it...

Code: [Select]
bruce@rip:~/programs/qsort$ node qsort.js
time = 1.415
« Last Edit: November 02, 2021, 10:52:48 pm by brucehoult »
 
The following users thanked this post: 2N3055, mansaxel

Offline Mattjd

  • Regular Contributor
  • *
  • Posts: 230
  • Country: us
Re: Python becomes the most popular language
« Reply #224 on: November 03, 2021, 01:12:41 am »
I am waiting for 3.11 when the apparently 2x speed up is supposed to be occuring

https://m.slashdot.org/story/385526
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf