what is the fascination with Python ? ( CAUTION semi-programming rant )
-
this is not a python problem. Where's the boss?
Charlie Gilley “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759 Has never been more appropriate.
on holiday apparently. :-) (I've just been told in the last couple of hours)
-
on holiday apparently. :-) (I've just been told in the last couple of hours)
-
I do not get the proliferation of Python "software" , mainly because almost every time I "update / upgrade " Ubuntu I see lots of Python activities. If it is so popular, why it needs "updating / upgrading " ?
In case somebody hasn't already posted it: The pope recommends Python (https://www.bbc.com/news/technology-67209806 Admittedly a bit strange that the holy see recommends a snake. pibbur
-
I do not get the proliferation of Python "software" , mainly because almost every time I "update / upgrade " Ubuntu I see lots of Python activities. If it is so popular, why it needs "updating / upgrading " ?
Python is a very simple language compared to C#, C++, Java, etc. Last I checked, C# had over 30 Generics. Really, you only need the three that Python has: Dictionary, List, Queue and the C# ones are specialized variation on those. There is a lot of that, maybe called language bloat. I like C#, but could live with Python easily enough.
-
I have realized that if Russia wanted to invade Europe, it would be in August. :)
Charlie Gilley “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759 Has never been more appropriate.
YEP!!!! I'm also working on a project that includes a large number of French folks, and damn I've been sat twiddling my thumbs for most of the last 2 weeks, and probably the next 4 too. 😂😂😂😂😂😂
-
I do not get the proliferation of Python "software" , mainly because almost every time I "update / upgrade " Ubuntu I see lots of Python activities. If it is so popular, why it needs "updating / upgrading " ?
I use Python because it has a HUGE library of math, data plotting and other functions. Many of these libraries are in C/C++ or Fortran, so run fast, and have a long legacy or are actively maintained, so are reliable. I also use Python for machine learning where most of the work is data or method exploration and the immediate running of code cells (in Jupyter, for instance) allows fast iteration of the code. On the other hand, I wouldn't use Python for a time-critical real-time system, although I have used it to interface with Arduino's and data acquisition boards. However, Python is not that much slower than compiled languages unless the run-time is very long. Even then, if the code is solving big matrices then most of the time is in Fortran anyway. From my understanding, the reduction in speed in Python is mainly to do with it not being a typed language: the interpreter has to figure out the data type on the fly. I'm not sure why this has to be since best coding practice is to use type-hints, which can be statically checked, but are ignored by the interpreter. I don't see why type-hints, if present, can't be used by the interpreter to enforce typing. As to the comments about using white-space for formatting, I was already indenting to make the code readable so ; and {} are redundant to me and now seem like clutter whenever I work in C/C++/Java/PHP.
-
I think it needs updating precisely because it's being used. New language features are added, etc. C# is onto version 10 or something now, so it's not just Python. My problem with Python is I believe that all my source code should be visible to the naked eye. Python breaks that rule by making whitespace part of the source code. That inspires violence in me. So I don't use it. And when I tell other people why they shouldn't use it, particularly for embedded systems, I just show them this: How fast is Python? - MicroPython versus C++ - YouTube[^] It even covers the issue of lack of decent python bindings for good libraries.
Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix
Gack, I can't even imagine considering using Python for embedded work. About the only interpreter-ish language I'd consider for embedded work is Forth. I'd worked a bit with the guys from Forth Inc. years ago and they seemed to do a lot of embedded stuff with their version of Forth. The majority of my embedded career was C/C++. Pretty much every processor I worked with had a C/C++ compiler available.
-
Lots of libraries, good for non-programmers to solve problems for academia, IT folks to automate stuff, non-programmers to program and programmers to do one off stuff. The AI stuff done by Chris uses python because there is a lot of image AI stuff available. I would guess that his alternative is a lot of time spent with C++ or C# or assembler. Don't know. I do know it works very well with BlueIris. I automated some backup stuff via a python script that uses robocopy to copy stuff to NAS and removable, sends emails based on results and then uses powershell to eject the removable. Why would I want to use something else? Well, most of it was done previously with VBScript. If you decide to hate python, you can easily jump all over the white space thing and the rules for tabs and spaces (piling on is fun). If you just want to solve a problem, you don't care. I tested some scripts for syslog servers, then converted to C# with some GUI. Handy and easy with all the libraries. Haters will hate, fanboys will worship, the rest of us just use whatever tool we think will get the job done. Applies to everything. Well, I did hate Fortran back in the day. :)
>64 It’s weird being the same age as old people. Live every day like it is your last; one day, it will be.
I second this. Python scripts are easy enough to write and quick enough to execute that we can iteratively automate stuff that would not otherwise be automated. Because Python libraries are available to do almost everything, we now have a series of Python-based solutions where previously we had C, C++, Java and even Pascal.
-
theoldfool wrote:
Lots of libraries, good for non-programmers to solve problems for academia, IT folks to automate stuff, non-programmers to program and programmers to do one off stuff.
As if that is something particular to Python? When you have to go outside the language itself to defend it, then I start questioning the language qualities. Isn't the language itself the essential when evaluating a language? It is OK after pointing out seven essential qualities of the language, not commonly found in other languages, to add: 'Besides, the ecosystem around the language is really strong, with lots of good languages'. Without stating a single unique (or rarely found) quality of the language itself, I might as well go looking for other ecosystems, preferably those adapted to several languages. It reminds me of the old Internet stack - OSI stack wars, essential in the 1990s: Neither during the network wars nor later have I found any person willing to argument in favor of the qualities of the Internet protocols as such. Sure, it was more widespread. Sure, you could get the specs for free. Sure, half of the protocol acronyms started with 'S', for 'Simple', suggesting that if a 3rd year college student couldn't implement it as a homework assignment, then the feature was not included in the protocol. (That has changed in recent years, though - there are reasons why TCP is provided with the OS!) Lots of other ecosystem arguments were brought fort in favor of Internet, but never the quality of the protocol design. I like dotNET for being language agnostic. You can create a library in any language for which there is a dotNET compiler - and that compiler is independent of the CPU, instruction set, addressing modes etc. An voila! The library is available for any other dotNET application development, regardless of programming language! A small reservation: As far as I know, Python is available for dotNet. I wouldn't at all be surprised if it requires its own Python libraries and can_not_ utilize standard dotNet libaries. That would be in the typical Python style - Python people traditionally insist on having their own sandbox, completely unwilling to make adaptions to the myriad of great libraries out there, and doing nothing to make these allegedly super great Python libraries available to anyone else. If you want to play in our sandbox, you must play Python, or get away from us and our sandbox!
Rel
trønderen wrote:
When you have to go outside the language itself to defend it, then I start questioning the language qualities.
By 'qualities' do you mean syntax? Or something else?
-
YEP!!!! I'm also working on a project that includes a large number of French folks, and damn I've been sat twiddling my thumbs for most of the last 2 weeks, and probably the next 4 too. 😂😂😂😂😂😂
Story from long ago, I worked in a division in the US that was owned by Belgians. One Wednesday, there was a problem discovered and we worked 10 hour days and through the weekend, because it was described as a "high visibility emergency." We fixed the problem and called them on Monday. Turns out there was only one person there (to answer phones). The tech staff had all left for their August holiday, even the guy screaming the week before. Hmm, guess who never got special service or sympathy from that point on?
Charlie Gilley “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759 Has never been more appropriate.
-
trønderen wrote:
When you have to go outside the language itself to defend it, then I start questioning the language qualities.
By 'qualities' do you mean syntax? Or something else?
How far do you draw 'syntax'? Lots of aspects are consequences of the syntax, but can be identified as distinct qualities of their own - and if you like, you may reply: But that is just syntax! Let me pop a few elements off the top of my head: 'Readability': Semantics are easily discernible from the printed representation. 'Easily' here means that you need as little background study as possible to understand the symbols to see their meaning. You can discuss a COBOL program with an accountant, but probably not a C++ program to perform the same task! 'Explicitness': The source code should make those elements (conditions, actions, ...) that are significant to the application solution stand out clearly, without drowning in red tape, irrelevant (to the problem solution) punctuation and other 'noise' mandated by syntax. 'Naturalness': Established linguistic elements should as far as possible retain their established semantics when adopted by a language. This in particular applies to keywords - if you use another term when explaining the code to a non-programmer than the keyword, then the keyword is poorly chosen. Similar applies to all sorts of punctuation; they should have the established meaning. 'Consistency': Doing similar operations (e.g. on different data types) in similar ways. Doing identical operations in different implementations gives identical results. 'Unambiguousness': Preferably in a 'natural' way, so that a minimum of 'unnatural' syntax is required. (Take parenthesizing of logical conditions: Lots of languages follow natural languages, with no parentheses, other languages have a syntax that would be ambiguous without them.) 'Conciseness': To obtain a certain well defined effect, a single syntactic element should be required to invoke it. For more complex effects, a minimum of syntactical elements should be required. 'Safety': Errors that could be detected before the program is run should be detected before the program is run. If an error occurs at run time, it should have minimum disastrous effects. 'Environmental friendliness': If a partial solution is available from outside, it should be possible to adapt it as part of the total solution, with as few limitations (e.g. to the implementation language of the imported module) as possible. It should be possible to develop partial solution in this language for use in other total solutions, even if they are developed in other languages. 'Completeness': The basic mechanisms (data structures, flow, sync
-
Python is a very simple language compared to C#, C++, Java, etc. Last I checked, C# had over 30 Generics. Really, you only need the three that Python has: Dictionary, List, Queue and the C# ones are specialized variation on those. There is a lot of that, maybe called language bloat. I like C#, but could live with Python easily enough.
-
trønderen wrote:
you could just type and run, no waiting for compilation.
Yup. Type. Run. And if you by happenchance execute the new code you just typed, discover the syntax errors at runtime instead of compile-time! :laugh:
Latest Articles:
A Lightweight Thread Safe In-Memory Keyed Generic Cache Collection Service A Dynamic Where Implementation for Entity FrameworkYep, instant gratification. All code has to be converted, somehow to machine code. Pay me now or pay me later.
A home without books is a body without soul. Marcus Tullius Cicero PartsBin an Electronics Part Organizer - Release Version 1.4.0 (Many new features) JaxCoder.com Latest Article: EventAggregator
-
I think it needs updating precisely because it's being used. New language features are added, etc. C# is onto version 10 or something now, so it's not just Python. My problem with Python is I believe that all my source code should be visible to the naked eye. Python breaks that rule by making whitespace part of the source code. That inspires violence in me. So I don't use it. And when I tell other people why they shouldn't use it, particularly for embedded systems, I just show them this: How fast is Python? - MicroPython versus C++ - YouTube[^] It even covers the issue of lack of decent python bindings for good libraries.
Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix
Quote:
My problem with Python is I believe that all my source code should be visible to the naked eye. Python breaks that rule by making whitespace part of the source code. That inspires violence in me. So I don't use it.
Could not be in more agreement.
FormerBIOSGuy
-
trønderen wrote:
When you have to go outside the language itself to defend it, then I start questioning the language qualities.
By 'qualities' do you mean syntax? Or something else?
Maybe I misunderstood your intention. Did you mean to ask about those elements that are distinct from the language and itself, but is part of the ecosystem in which the language is used? I certainly may value the qualities of an ecosystem. As I mentioned in another post: The dotNet ecosystem allows you to develop different modules (for the same end result) in different languages; you pick the one best suited for the task. E.g. defining a dialog layout is a lot easier in the XAML language than in C#. That is an ecosystem quality, regardless of the qualities of XAML or C# as two of the languages in that ecosystem. Availability of well known, well tested, highly recognized libraries is most certainly a positive quality of an ecosystem - more strongly, of course when the library functions you need are provided. Libraries are examples of reusability, which is a positive quality, and if a library is reusable across a large family of languages, that raises its value. Having the option to study the inner workings of a library function, e.g. through the source code, may represent a positive value to some user groups. Having the option to close your solutions' inner workings may represent a value to some user groups. So may the option to e.g. sign your solutions, protect use of them with a license key etc. - but note that this may conflict with other qualities. A high quality development environment, with good editors, debuggers, test facilities, library management facilities etc. is also an important ecosystem quality. The support availability and quality is an important quality. Qualifications for giving good support includes the ability to talk the customer's language, and understand his problem. Good documentation that can be easily understood by the target group, is a part of support quality of the ecosystem. And then you have those ecosystem properties that may be qualities or dis-qualities. The general helpfulness of people using a certain ecosystem does have an effect on my perceived quality of the environment. So, if you have an excellent ecosystem with all of these qualities at a high level, can you then throw in any programming language, regardless of how rotten the syntax is, with rock bottom score on most of the language qualities I listed in my previous post? Well, you may try. It may seriously degrade the users' perception of the ecosystem qualities, if the pure coding part sets them bitching and swearing. That goes the other way, too: An excellent program language definition
-
In case somebody hasn't already posted it: The pope recommends Python (https://www.bbc.com/news/technology-67209806 Admittedly a bit strange that the holy see recommends a snake. pibbur
So good protestants will stop using Python? :) We face another iteration of the Holy Wars. :sigh:
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.