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 96259 times)

0 Members and 1 Guest are viewing this topic.

Offline Just_another_Dave

  • Regular Contributor
  • *
  • Posts: 192
  • Country: es
Re: Python becomes the most popular language
« Reply #75 on: October 21, 2021, 09:11:00 pm »
I used Tkinter once at work for developing a tool to control a testbench and it was a relatively good experience. There were many examples in forums and communicating with the board by usb was really easy. However, packaging the app was not a particularly good experience until I found Nuitka, whose developer helped me a lot by solving really quickly every problem I had and answering my questions. I highly recommend using it as it’s an awesome tool that not only is able to package everything into a single executable but, additionally, improves the performance of the program by compiling it to native code (it is a python to C transpiler).

Nevertheless, I have now switched to Godot, which is programmed in a python-like language and provides a really good experience editing the UI (I find WYSIWYG GUI building more natural than describing it using a programming language). It also supports loading libraries written in most programming languages (both, interpreted and compiled) and the program can be exported as a desktop, web and mobile application without changing almost anything
 

Offline RoGeorge

  • Super Contributor
  • ***
  • Posts: 6183
  • Country: ro
Re: Python becomes the most popular language
« Reply #76 on: October 21, 2021, 10:17:26 pm »
As a hobby programmer, I struggle each time when it comes to add a GUI to a Python program.

You made me curious about Godot, but google tells me that's a game engine, and the UI design has way too many details and parameters to define for a normal window with buttons.

What I would like is to find a drag&drop WYSIWYG like the Forms editor that used to be in the Microsoft's VB5.  You were drag and dropping windows, tabs and buttons, and a template code was automatically built for each button, and graphic elements were triggering events to be linked later with my code to be executed.

The forms editor was looking similar with this:


http://rb.thevbzone.com/l_intro.htm

Is there anything similar, drag&drop GUI forms designer for Python?
If not, what to use to create a GUI with buttons and menus for a Python code?
« Last Edit: October 21, 2021, 10:24:47 pm by RoGeorge »
 

Online Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6233
  • Country: fi
    • My home page and email address
Re: Python becomes the most popular language
« Reply #77 on: October 22, 2021, 07:46:57 am »
Is there anything similar, drag&drop GUI forms designer for Python?
Yes, but it depends on which windowing toolkit you want to use.

If you want to use tkinter, which is included in Python, you can use e.g VisualTK, an interactive web page that lets you build a simple window with buttons and text fields and such, that shows you the corresponding source code in Python.

For wxWidgets (wxPython), there are several, including wxFormBuilder. wxFormBuilder supports both code generation and XRC import/export.

For Qt, there is Qt Designer.  See here for a quick description for how it is used with Python.

For Gtk+, there is Glade. See here for a quick description for how it is used with Python.

Qt Designer, Glade, and wxFormBuilder create XML files describing the UI components (as .ui, .glade, and .xrc files, respectively).  These files can be either embedded in your program or Python script, or loaded from an external file.  (The details of connecting the events those components create to your Python methods differs a bit between the three.  It's not complicated, but can be confusing, so is something I recommend reading through and understanding from the tutorials and examples, and remember if you switch between them.)

I'm not sure if FLTK has an UI designer.

All of the above do also support completely programmatic UI creation, too.  In other words, at least tkinter, Qt, Gtk+, and wxWidgets support both defining the UI in separate file(s) using an XML-based format, or programmatically in your own code.  I use code for simple forms using a table-like layout, and the UI XML files for more complex applications.
 
The following users thanked this post: ebclr, mikerj, nfmax, Omega Glory, RoGeorge, Picuino

Online nfmax

  • Super Contributor
  • ***
  • Posts: 1559
  • Country: gb
Re: Python becomes the most popular language
« Reply #78 on: October 22, 2021, 11:16:09 am »
Any recommendation for the GUI toolkit du jour? What plays nicely with Matplotlib, can be easily installed using miniconda, and has Python user community 'momentum' behind it?
 

Offline udok

  • Regular Contributor
  • *
  • Posts: 57
  • Country: at
Re: Python becomes the most popular language
« Reply #79 on: October 22, 2021, 12:14:08 pm »

What I would like is to find a drag&drop WYSIWYG like the Forms editor that used to be in the Microsoft's VB5.  You were drag and dropping windows, tabs and buttons, and a template code was automatically built for each button, and graphic elements were triggering events to be linked later with my code to be executed.


Every version of MS Visual Studio C++, C#, VB has this feature!  You can use it for free.
 

Offline Just_another_Dave

  • Regular Contributor
  • *
  • Posts: 192
  • Country: es
Re: Python becomes the most popular language
« Reply #80 on: October 22, 2021, 01:02:36 pm »
As a hobby programmer, I struggle each time when it comes to add a GUI to a Python program.

You made me curious about Godot, but google tells me that's a game engine, and the UI design has way too many details and parameters to define for a normal window with buttons.

What I would like is to find a drag&drop WYSIWYG like the Forms editor that used to be in the Microsoft's VB5.  You were drag and dropping windows, tabs and buttons, and a template code was automatically built for each button, and graphic elements were triggering events to be linked later with my code to be executed.

The forms editor was looking similar with this:


http://rb.thevbzone.com/l_intro.htm

Is there anything similar, drag&drop GUI forms designer for Python?
If not, what to use to create a GUI with buttons and menus for a Python code?

For a window with just buttons Visual Basic is easier. However, Godot is really useful for developing tools that require manipulating some kind of image, as it includes most of the required functions. Most of the additional options are just used for adapting the UI to different screens in my experience, so it is easier to use than expected for a game engine. As they develop the GUI of the engine using it, I suppose that they care about making it easy to design applications with it

On the other hand, I recently read about a project called Qbasic64 which seems a good replacement for Visual Basic, although I haven’t tested it yet. Another mature alternative is Lazarus, but it uses Pascal instead of Basic. However, both are multi-window applications, which is something I’m not particularly a fan of
 

Offline RoGeorge

  • Super Contributor
  • ***
  • Posts: 6183
  • Country: ro
Re: Python becomes the most popular language
« Reply #81 on: October 22, 2021, 01:07:38 pm »

What I would like is to find a drag&drop WYSIWYG like the Forms editor that used to be in the Microsoft's VB5.  You were drag and dropping windows, tabs and buttons, and a template code was automatically built for each button, and graphic elements were triggering events to be linked later with my code to be executed.


Every version of MS Visual Studio C++, C#, VB has this feature!  You can use it for free.

Well, yes, but in fact no, I'm on Linux now (also VB5 compiler was not free IIRC) ... but wait, actually YES?!?   :-DD

You made me curious and tried to open the oldest project I have with VB5 and a GUI.  It's a TV remote, but from computer.  Briefly, the GUI sends some carefully chosen numbers to a COM port, and at the com port is tied an IR Tx LED, so the TV is tricked to believe it's a genuine RC5 TV remote.

By the file dates, that was back in 2004, on a Windows XP, and guess what?!

I've tried running it today, 17 years later, and apparently it still works!
That's incredible, the exe is only 36 kiB.
And it's executing on a Linux machine!  (Kubuntu 2004 LTS with WINE)

 :o

Online Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6233
  • Country: fi
    • My home page and email address
Re: Python becomes the most popular language
« Reply #82 on: October 22, 2021, 03:14:01 pm »
Any recommendation for the GUI toolkit du jour? What plays nicely with Matplotlib, can be easily installed using miniconda, and has Python user community 'momentum' behind it?
Matplotlib has backends for most windowing toolkits, including both agg and cairo subtypes for Qt, Gtk+, wxWidgets/wxPython, and tkinter (tk).

All four have lots of Python users, but in my opinion, right now (as of 2021) Python 3 + Qt 5 gives the best tools for this stuff.  However, I've never been one to consider 'popularity' or 'momentum', and my opinion is weighed by my own personal preferences, and may have zero value for you because your preferences and needs likely differ.

(Python3+Qt5 does suffer from the fact that there are two separate sets of bindings, python3-pyqt5 (PyQt5) and python3-pyside2 (PySide2), and making a Python program compatible at run time with either one takes a few lines of extra Python code (a bit more if you use .ui files), and a bit of consideration how one uses the Qt5 namespaces –– Qt, QtCore, QtGui, QtWidgets, and QtSvg.)

The tkinter (tk) backend has the fewest dependencies, and is the easiest to get working.

For a fellow scientist who isn't interested in programming per se, but needs to to make better tools for themselves, I'd recommend starting with Python3 and matplotlib, and use the tk/tkinter UI built in to Python (and supported by matplotlib).  Then, if and only if the UI widgets just don't cut it anymore, look into the other toolkits.
Doing a web search for "matplotlib" "tkinter" shows lots of examples and tutorials; and the matplotlib site itself lists a few tutorials.  One needs to trawl through to find the ones best suited for oneself.  Note that matplotlib itself provides simple toolkit-agnostic widgets you can use if you want matplotlib to automatically use the best/first toolkit that is available!

(The textbox example does not mention, unfortunately, that one can provide a dictionary of variables and functions the textbox can utilize to the Python eval() function.  If that dictionary contains '__builtins__':None, then built-ins like "open()" and import facilities cannot be used, only the objects in the global and local dictionaries supplied.  In other words, it's rather easy to include all math functions (without any prefix), some named constants, and '__builtins__':None in the global dictionary, the current values of the variables in the local dictionary, and repeatedly evaluate the (possibly compiled, for speed!) expression safely in Python.  A crafty person can even create their own local dictionary class object, overriding __getattr__ method, to auto-detect what variables the expression uses. Lots of options and power for not much effort!)

In all toolkits, there is a common theme: event-based programming.

Essentially, when you construct your window or windows, you pass control to the toolkit.  The toolkit manages everything, and calls back to your code whenever something interesting happens.  To construct a widget showing an interactive plot, you usually initially tell matplotlib which backend you want to use, and then either pass the widget matplotlib should draw into, or create a "canvas" or figure in matplotlib, and display that in some interactive widget.  Understanding this model, and accepting "loss of full control" by passing the control to the widget toolkit, seems to be the biggest issue among those new to this kind of programming, in my experience!
 
The following users thanked this post: mikerj, nfmax, RoGeorge

Offline udok

  • Regular Contributor
  • *
  • Posts: 57
  • Country: at
Re: Python becomes the most popular language
« Reply #83 on: October 22, 2021, 03:20:33 pm »

Well, yes, but in fact no, I'm on Linux now (also VB5 compiler was not free IIRC) ... but wait, actually YES?!?   :-DD

You made me curious and tried to open the oldest project I have with VB5 and a GUI.  It's a TV remote, but from computer.  Briefly, the GUI sends some carefully chosen numbers to a COM port, and at the com port is tied an IR Tx LED, so the TV is tricked to believe it's a genuine RC5 TV remote.

By the file dates, that was back in 2004, on a Windows XP, and guess what?!

I've tried running it today, 17 years later, and apparently it still works!
That's incredible, the exe is only 36 kiB.
And it's executing on a Linux machine!  (Kubuntu 2004 LTS with WINE)


Cool  ;D

I think that the VB development tools will work too on Linux/Wine.
And there is the Mono project which ports .NET to Linux.
« Last Edit: October 22, 2021, 03:22:51 pm by udok »
 

Offline RoGeorge

  • Super Contributor
  • ***
  • Posts: 6183
  • Country: ro
Re: Python becomes the most popular language
« Reply #84 on: October 23, 2021, 10:19:25 am »
Is there anything similar, drag&drop GUI forms designer for Python?
Yes, but it depends on which windowing toolkit you want to use.

If you want to use tkinter, which is included in Python, you can use e.g VisualTK, an interactive web page that lets you build a simple window with buttons and text fields and such, that shows you the corresponding source code in Python.

For wxWidgets (wxPython), there are several, including wxFormBuilder. wxFormBuilder supports both code generation and XRC import/export.

For Qt, there is Qt Designer.  See here for a quick description for how it is used with Python.

For Gtk+, there is Glade. See here for a quick description for how it is used with Python.

That was very helpful, thank you.   :-+

Gave to each option a brief look and settled to start with Qt (PyQt5 + Qt5 Designer), mainly because I am using KDE Plasma which is based on Qt5, and because Qt Designer was included (found it installed already on my Kubuntu 20.04), but also because there is a commercial version of Qt Designer, so more hopes to be better maintained.

Tkinter seemed tempting, too, as included by default with Python.  Thought the link to a cloud designer excluded that editor (very nice editor, but web based and that's a showstopper, all tools must be locally and able to work offline indefinitely).  Looked for other offline tkinter GUI editors and only found apparently dead projects, with last update 5-10 years ago on sourceforge.

wxWidgets seemed complicated to me, and Gtk+ is the one used with Gnome AFAIK, but I like KDE more, so for now Qt5 it is, and it looks clean and easy to use (well, for a 'Hello World' complexity level they all look great, will see how well it goes for a slightly more complicated project).

So yeah, having fun with some PyQt5 and Qt 5 Designer this weekend, thanks!   :)
« Last Edit: October 23, 2021, 10:22:59 am by RoGeorge »
 
The following users thanked this post: nfmax

Offline SL4P

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
  • There's more value if you figure it out yourself!
Re: Python becomes the most popular language
« Reply #85 on: October 23, 2021, 08:41:35 pm »
My feeling is that Python is the 21st century ‘BASIC’
Easy to teach, convenient, and s-l-o-w.


the next language will be ‘Opinion’ - everybody has one, but it has limited application.
Don't ask a question if you aren't willing to listen to the answer.
 

Online jfiresto

  • Frequent Contributor
  • **
  • Posts: 807
  • Country: de
Re: Python becomes the most popular language
« Reply #86 on: October 24, 2021, 06:36:09 am »
My feeling is that Python is the 21st century ‘BASIC’
Easy to teach, convenient, and s-l-o-w....

I think if you get a chance to use it much, you will find it, alone, is fast enough for a tolerable few things, and if it is not, it is still good for quick prototypes that reduce a project's total costs. At least that has been our experience.
-John
 
The following users thanked this post: newbrain, Jacon

Offline Just_another_Dave

  • Regular Contributor
  • *
  • Posts: 192
  • Country: es
Re: Python becomes the most popular language
« Reply #87 on: October 24, 2021, 08:03:16 am »
My feeling is that Python is the 21st century ‘BASIC’
Easy to teach, convenient, and s-l-o-w....

I think if you get a chance to use it much, you will find it, alone, is fast enough for a tolerable few things, and if it is not, it is still good for quick prototypes that reduce a project's total costs. At least that has been our experience.

It’s also good for automating tasks that require coordinating several programs. For example, Salome uses it for allowing the user automating generating cad models, simulating them using different solvers and, finally, generating the required graphs. Scripting doesn’t need to be that fast to be useful
 
The following users thanked this post: newbrain, MichaelPI, Picuino

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 6460
  • Country: nl
Re: Python becomes the most popular language
« Reply #88 on: October 24, 2021, 08:54:43 am »
Or the new popular micropython microcontrollers. I had to evaluate a sensor IC, used the Pi Pico for it. 5 minutes later, I was logging it's data on uart. If I'm given the same task in C, 2 days later I'm still struggling setting up the GCC compiler into an IDE, or struggling with vendor specific libraries, with no progress on the actual task.
That has nothing to do with the language, everything with the infrastructure.
In the first case RPi dev has done the work for you.
Same goes for an arduino, you could evaluate the sensor in 5 minutes.

I myself have already for ten years my own kind of boards based on stm8 with c compiler and different small boards with standard peripherals like rs232/rs485 interface.
In my SVN I have for each board an minimal config project that I copy, rename and am up and running in 2 minutes to start coding for any sensor IN C.

You just need what you got and I do see the easyness of Python for testcode, quick demos, proof of concepts etc. I use it myself for all ethernet protocols just because C can be quite some overhead (unless you already have it).

So the result of a language becoming more popular is that more OS SW will be available and humankind as a whole can profit by that.

And most important, any language that lowers the barrier for new people to start coding and enjoying is a win-win IMO.
« Last Edit: October 24, 2021, 09:07:55 am by Kjelt »
 

Offline PicuinoTopic starter

  • Frequent Contributor
  • **
  • Posts: 725
  • Country: 00
    • Picuino web
Re: Python becomes the most popular language
« Reply #89 on: October 24, 2021, 11:19:21 am »
My feeling is that Python is the 21st century ‘BASIC’
Easy to teach, convenient, and s-l-o-w.

Slow in what way?
It has always been fast enough in all the applications in which I have used it.
For my, C it is slow because it takes a long time to program a script or a list handling or pattern recognition routines.

Total time = Programming time + Execution time

If it takes you three hours to make a program in c and half an hour to make the same program in Python and you are going to execute it 100 times with an execution time of 10 seconds for C and 20 seconds for Python, which one takes longer?
C total time: 11800 seconds
Python total time: 3800 seconds

do you see what I mean?

Edit:
Furthermore, I have not included the software maintenance time in the equation, which can be 10 times greater than the programming time, and in that field Python has a lot of advantage.
« Last Edit: October 24, 2021, 11:25:04 am by Picuino »
 

Offline xrunner

  • Super Contributor
  • ***
  • Posts: 7512
  • Country: us
  • hp>Agilent>Keysight>???
Re: Python becomes the most popular language
« Reply #90 on: October 24, 2021, 11:25:51 am »

Total time = Programming time + Execution time

If it takes you three hours to make a program in c and half an hour to make the same program in Python and you are going to execute it 100 times with an execution time of 10 seconds for C and 20 seconds for Python, which one takes longer?

Development time vs. run time ... totally irrelevant comparison - apples and oranges.  :palm:
I told my friends I could teach them to be funny, but they all just laughed at me.
 

Offline PicuinoTopic starter

  • Frequent Contributor
  • **
  • Posts: 725
  • Country: 00
    • Picuino web
Re: Python becomes the most popular language
« Reply #91 on: October 24, 2021, 11:32:58 am »
If you have studied some economics you will know what are fixed costs and variable costs.
https://en.wikipedia.org/wiki/Fixed_cost

We are talking about time, not oranges neither apples.
« Last Edit: October 24, 2021, 11:37:29 am by Picuino »
 

Offline udok

  • Regular Contributor
  • *
  • Posts: 57
  • Country: at
Re: Python becomes the most popular language
« Reply #92 on: October 24, 2021, 11:48:43 am »
My feeling is that Python is the 21st century ‘BASIC’
Easy to teach, convenient, and s-l-o-w.

the next language will be ‘Opinion’ - everybody has one, but it has limited application.

I still use bash and awk for my simple scripts.  It works ok, and if bash is not the right
tool or too slow,  i write a simple C command line program in half an hour to do the job.

Regarding speed:

It depends mainly on the programmers skill and on the runtime libraries and not on the
language.

There was a small competition a few months ago to solve a simple text processing problem:
https://www.mikrocontroller.net/topic/517864

Results are (sorted by Megabytes/second):
Code: [Select]
[0]$ cat run_WIN10_50kLines_500Bytes_20210610.log
test_foobar_lua2.lua     Lua     PeakWorkingSet=3.0    Seconds=39.71  MB/sec=28
test_mikro77_hash.gawk   Gawk    PeakWorkingSet=2.8    Seconds=34.29  MB/sec=33
test_mh_python3.py       Python3 PeakWorkingSet=11.0   Seconds=14.89  MB/sec=76
test_hans.exe            CPP     PeakWorkingSet=2.8    Seconds=11.41  MB/sec=99
test_mikro77_n2.exe      CPP     PeakWorkingSet=2.8    Seconds=9.36   MB/sec=120
test_roger.exe           CPP     PeakWorkingSet=2.8    Seconds=7.84   MB/sec=144
test_mikro77_hash.exe    CPP     PeakWorkingSet=2.8    Seconds=7.24   MB/sec=156
test_heinzel.exe         CPP     PeakWorkingSet=2.7    Seconds=7.17   MB/sec=157
test_heinzel2.exe        CPP     PeakWorkingSet=2.7    Seconds=7.18   MB/sec=157
test_mh_yalu_python3.py  Python3 PeakWorkingSet=1103.1 Seconds=7.04   MB/sec=160
test_mikro77_sort.exe    CPP     PeakWorkingSet=2.8    Seconds=6.98   MB/sec=162
test_philipp_strtok_fw.exe C     PeakWorkingSet=11.1   Seconds=4.99   MB/sec=226
test_foobar3.exe         C       PeakWorkingSet=2.4    Seconds=4.65   MB/sec=242
test_philipp_strtok.exe  C       PeakWorkingSet=98.0   Seconds=4.40   MB/sec=256
test_philipp_strtok2.exe C       PeakWorkingSet=10.2   Seconds=4.27   MB/sec=264
test_csharp_roger.exe    C#      PeakWorkingSet=21.6   Seconds=4.13   MB/sec=273
test_foobar2.exe         C       PeakWorkingSet=2.5    Seconds=4.06   MB/sec=278
test_jemand_rust.exe     Rust    PeakWorkingSet=6.7    Seconds=3.07   MB/sec=368
test_mikro77_hash.pl     Perl    PeakWorkingSet=6.9    Seconds=2.73   MB/sec=413
test_native_n2.exe       C       PeakWorkingSet=2.5    Seconds=0.67   MB/sec=1678
test_native_hash.exe     C       PeakWorkingSet=2.5    Seconds=0.41   MB/sec=2743

Perl and Python are both faster than C++ for large data fields (500 Bytes).
This was due the fact that the C++ native libraries are rather slow on Windows,
and Python and Perl have both good performing dictionaries (hash tables).
Note that the fast Python program needs a lot more RAM than the other programs.


If the data field is smaller (10 Bytes),  the picture changes a lot becuause of
the larger overhead for each data field of the scripting languages:

Code: [Select]
[0]$ cat run_Win10_1000kLines_10Bytes_20210526.log
test_foobar_lua2.sh      Lua           Bytes=272      Seconds=23.05  MB/sec=21.5
test_hans.exe            CPP           Bytes=33792    Seconds=16.31  MB/sec=30.4
test_mikro77_hash.pl     Perl          Bytes=470      Seconds=13.77  MB/sec=36.0
test_mikro77_hash.gawk   Gawk          Bytes=184      Seconds=12.26  MB/sec=40.5
test_jemand_rust.exe     Rust          Bytes=1084416  Seconds=10.30  MB/sec=48.2
test_heinzel2.exe        CPP           Bytes=25600    Seconds=10.19  MB/sec=48.7
test_heinzel.exe         CPP           Bytes=25600    Seconds=10.10  MB/sec=49.1
test_mikro77_sort.exe    CPP           Bytes=34304    Seconds=8.27   MB/sec=60.0
test_mh_yalu_python3.sh  Python3       Bytes=534      Seconds=8.05   MB/sec=61.6
test_philipp_strtok.exe  C             Bytes=10752    Seconds=7.88   MB/sec=62.9
test_roger.exe           CPP           Bytes=27136    Seconds=6.98   MB/sec=71.1
test_roger.exe           CPP           Bytes=27136    Seconds=6.94   MB/sec=71.5
test_mikro77_hash.exe    CPP           Bytes=29696    Seconds=6.39   MB/sec=77.6
test_mikro77_n2.exe      CPP           Bytes=25600    Seconds=5.81   MB/sec=85.4
test_foobar3.exe         C             Bytes=10240    Seconds=5.24   MB/sec=94.7
test_foobar2.exe         C             Bytes=10752    Seconds=4.93   MB/sec=100.6
test_csharp_roger.exe    C#            Bytes=127488   Seconds=4.07   MB/sec=121.9
test_native_n2.exe       C,N^2         Bytes=15872    Seconds=2.03   MB/sec=244.3
test_native_hash.exe     C,Simple      Bytes=15872    Seconds=0.83   MB/sec=597.6
« Last Edit: October 24, 2021, 11:56:55 am by udok »
 

Offline xrunner

  • Super Contributor
  • ***
  • Posts: 7512
  • Country: us
  • hp>Agilent>Keysight>???
Re: Python becomes the most popular language
« Reply #93 on: October 24, 2021, 11:55:00 am »
If you have studied some economics you will know what are fixed costs and variable costs.
https://en.wikipedia.org/wiki/Fixed_cost

We are talking about time, not oranges neither apples.

.. and you are going to execute it 100 times with an execution time of 10 seconds for C and 20 seconds for Python, which one takes longer?


 :-DD

If you need the application to tun in 10 seconds for the required purpose, then Python will not even be acceptable no matter how much time it cuts from the development.

My goodness ...  ::)
I told my friends I could teach them to be funny, but they all just laughed at me.
 

Offline PicuinoTopic starter

  • Frequent Contributor
  • **
  • Posts: 725
  • Country: 00
    • Picuino web
Re: Python becomes the most popular language
« Reply #94 on: October 24, 2021, 12:15:05 pm »
If you need the application to tun in 10 seconds for the required purpose, then Python will not even be acceptable no matter how much time it cuts from the development.

If you do not worry about the development time, it will be because you are not the one who should develop it or the one who should pay for it.

I would prefer that you give me arguments and not many laughs without major explanations. Do you have arguments to support your idea?
 
 

Offline xrunner

  • Super Contributor
  • ***
  • Posts: 7512
  • Country: us
  • hp>Agilent>Keysight>???
Re: Python becomes the most popular language
« Reply #95 on: October 24, 2021, 12:21:58 pm »
If you need the application to tun in 10 seconds for the required purpose, then Python will not even be acceptable no matter how much time it cuts from the development.

If you do not worry about the development time, it will be because you are not the one who should develop it or the one who should pay for it.

I would prefer that you give me arguments and not many laughs without major explanations. Do you have arguments to support your idea?

Here again without the entirely applicable laughing:

If you need the application to run in 10 seconds for the required purpose, then Python will not even be acceptable if the code takes 20 seconds execution time no matter how much time it cuts from the development.

Now if you cannot understand a simple requirement restriction such as that then I'll be happy to let others explain it.
« Last Edit: October 24, 2021, 03:12:45 pm by xrunner »
I told my friends I could teach them to be funny, but they all just laughed at me.
 

Offline PicuinoTopic starter

  • Frequent Contributor
  • **
  • Posts: 725
  • Country: 00
    • Picuino web
Re: Python becomes the most popular language
« Reply #96 on: October 24, 2021, 12:38:18 pm »
I use Python to render my static web page with Sphinx.
Normally it takes Sphinx between 5 and 10 seconds to render the new changes introduced in the web page, which takes me several minutes to write, perhaps hours. For me, those 5 or 10 seconds that I have to wait are not too long and saving 3 or 4 seconds would mean nothing.
Also with Python I can better understand the software and make the changes I need, without having to recompile the application.
I know of very few C applications that serve this purpose and I do know many in Python, Ruby or other scripting languajes. Scripting languages ​​may seem slow to some programmers, but they are fast enough for their purpose and very fast when you have to make changes or enhancements to the software.

 

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 6460
  • Country: nl
Re: Python becomes the most popular language
« Reply #97 on: October 24, 2021, 01:05:01 pm »
I use Python to render my static web page
I would not recommend using C for webdevelopment no.
You are in some sort of domain where C does not fit so you should not use it.
But in for instance embedded applications on small microcontrollers you have all kind of restrictions like RAM size,  time constraints, responsiveness to interrupts and tens more.
In those applications C is still king and python is used for other tasks like QT GUI where it does not matter when a user presses a button 20ms later the response is seen instead of 10ms.
So you are looking at it from your domain where C has no place and then think that is the whole world.
In a medium sized car there are more than 100 microcontrollers most running C. In an average house there are more than 80 microcontrollers in domestic devices most running C. Perhaps there is more than web dev  ;)
 
The following users thanked this post: xrunner

Offline PicuinoTopic starter

  • Frequent Contributor
  • **
  • Posts: 725
  • Country: 00
    • Picuino web
Re: Python becomes the most popular language
« Reply #98 on: October 24, 2021, 01:53:22 pm »
I program microcontrollers in C too. And in assembler code in certain cases.

But now, we are talking about the speed of Python. SL4P says that Python is so s-l-o-w:

My feeling is that Python is the 21st century ‘BASIC’
Easy to teach, convenient, and s-l-o-w.

Python may be slower than C in runtime, but that's not a problem because in the total time spent in the program, Python turns out faster than C and is the reason why so many programs run in Python instead of C (for example the renders of web pages)
And in most cases the time spent on Python runtime is negligible.
 

Offline mansaxel

  • Super Contributor
  • ***
  • Posts: 3554
  • Country: se
  • SA0XLR
    • My very static home page
Re: Python becomes the most popular language
« Reply #99 on: October 24, 2021, 02:14:33 pm »
Scripting doesn’t need to be that fast to be useful

Anything that is faster than manually rearranging Excel is useful. The impact of scripting mundane tasks that people do the "emulate paper way" is immense and there is a lot that remains the old way.


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf