Announcement

Collapse
No announcement yet.

Python 3.13 Beta 2 Released For Testing The Experimental JIT & Other New Features

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #21
    Originally posted by uid313 View Post
    No in JavaScript and C# you don't need to declare any event loop. In C# you can even top-level awaits (without having to place the await inside a async function).
    As I said, javascript is event-loop based, that's the reason you don't need to bring up an event loop facility to handle async/await. That's pretty natural, since javascript born as a companion language for interactivity to hypertext documents. It does not mean it is good or bad, it means that it was suited for that intent.
    Currently the event loop based programming came out the web realm because many programmers learn to program in that domain and want to transpose the same patterns elsewhere, which does not always bring valid products as much as you don't want to program an operating system in Python or an text editor in bash. Yet, if you want to program a text editor in Python, or use C/Rust for an operating system, then they would be rather fine.

    Originally posted by uid313 View Post
    In other languages it is very common to deserialize JSON into a class. It is very friendly to use a class too rather than have to deal with lookups in a dictionary using key strings.
    I have learned the hard way that what "the other languages" do is not automatically a good idea. Many times things are brought in for "simplicity" and "ease the life of programmers". Those things should be the purpose of libraries, not the core fundamentals of a formal language.

    Having to deal with PHP, Python and Javascript every day, I see that Python is by far the most tidy and precise language in the league.

    Originally posted by uid313 View Post
    urllib is a nightmare to use, it is very tricky to use unlike fetch in JavaScript or HttpClient in .NET, or third-party Python libraries such as requests and httpx. It also doesn't support async.
    Don't understand actually. HTTP has lot of complexity behind the scene, but the basic usage of urllib in Python and fetch in Javascript is easy in both cases.
    When your necessity becomes more complex, both the constructs become more complex to handle, but I find it quite normal because the more complexity you hide, the less features you access.

    About the missing async support in urllib, that's something I don't really have an opinion. If I have to choose, I prefer much more the threaded model and explicit synchronization rather than async/await.

    Comment


    • #22
      Originally posted by Kemosabe View Post
      Yes, thank god. Remove all that old crap. I hope this includes the abomination called argparse one day.
      Just force all these lazy people doing only the bare minimum to update their crap.
      Spoken like a true script kid using toys.

      Python is probably the only interpreted language that people can't update to the latest non-major version without breaking something. Did you know pytorch (one of the most famous libs for AI) doesn't even work with python 3.13 (or heck I think even 3.12)?

      Don't you find it funny cloud services like Colab are still using Python 3.10 despite having most updated libraries?

      Fuck off with your shitty opinions. Absolute nightmare compatibility language. Worse than dependency hell.

      Comment


      • #23
        Originally posted by muncrief View Post
        I have no idea how Python ever became so popular, as it's primary purpose seems to be continually breaking anything that uses it.

        There are so many examples, and articles covering breakage because of Python changes, that it's mind boggling. For me the latest one is Kodi, as Python changed and caused it to hang on exit so it hasn't been usable on Linux for months.

        And to add insult to injury, the Python devs simply don't care. And take many months, or never, remedy these backwards compatibility problems.

        Of course part of the blame must be attributed to any developers who continue to use it, as the backwards compatibility problems with Python have been legendary for quite some time. On the other hand many, like the Kodi devs, have so much code that relies on Python that it would take a fundamental rewrite of the entire codebase to eject it.

        So all I can do is warn anyone starting a new project to not use Python. And hopefully within a decade or so it will simply fade away.
        Amen.

        Comment


        • #24
          Originally posted by blackshard View Post

          It looks like you see breaking with previous versions as a sadic approach from developers. On the contrary, it is mostly to remove the cruft and leftovers and avoid keeping backward compatibility forever carrying on misbehaving code. Python 2.x to Python 3.x was a major jump, but minor version upgrades were not so dramatic. Recently I had to bump a complex project that also carried some native C libraries from Python 3.7 to Python 3.11 and it wasn't so difficult, nor it took so much fixing time.

          Perhaps if so many parts of Kodi (plugins, I guess) were not in Python, it would not have had the success it has.

          Nowadays javascript is one of the most trendy language, but it has a horrible compatibility legacy to require the "use strict"; statement to deprecate most of the nonsense it carried for years and it still carries around (scope mayhem, variable declaration, messy prototipical inheritance, "classes" are in reality functions, several way to declare a function with minor differences, etc...)

          If you take a look to the elegance of the Python standard libraries instead, you see a very tidy set of functionalities (take the datetime module as an example) based upon a fairly simple language.
          I've never had so many issues with anything else than Python. And I mean for code that is not mine, so please shut it with "update your legacy code".

          I'm trying to use Python, for build systems, build scripts (some projects use it), AI training, AI inference, etc. Other people's code.

          ALL OF THESE HAVE GIVEN ME DEPENDENCY/BREAKAGE NIGHTMARES AT SOME POINT.

          And no, it's not just me, literally by far the most breaking shit I see posted as bugs in such projects, is because of Python. Not Javascript, not ANY OTHER LANGUAGE. It's JUST Python. AI projects in particular are FULL of bug reports/complaints of Python errors that are due to dependency/breakage.

          I have friends who aren't programmers and don't know how to code at all. But when they look at a project and see it's written in Python they simply close the tab. That's how bad it is. Even for users.

          Comment


          • #25
            Originally posted by Weasel View Post
            I've never had so many issues with anything else than Python. And I mean for code that is not mine, so please shut it with "update your legacy code".

            I'm trying to use Python, for build systems, build scripts (some projects use it), AI training, AI inference, etc. Other people's code.

            ALL OF THESE HAVE GIVEN ME DEPENDENCY/BREAKAGE NIGHTMARES AT SOME POINT.

            And no, it's not just me, literally by far the most breaking shit I see posted as bugs in such projects, is because of Python. Not Javascript, not ANY OTHER LANGUAGE. It's JUST Python. AI projects in particular are FULL of bug reports/complaints of Python errors that are due to dependency/breakage.

            I have friends who aren't programmers and don't know how to code at all. But when they look at a project and see it's written in Python they simply close the tab. That's how bad it is. Even for users.
            Perhaps you didn't deal with nodejs and the npm dependencies mayhem, but anyway...

            I don't know what to say about your Python libraries, everyone codes as bad as he/she wants. Whenever you use external libraries, maybe not exactly well-maintained, it's easy it happens whenever you upgrade the environment.

            But hey, I'm not Python lawyer here, so if that's your experience, I respect that. My experience is radically different, so I can't say where the difference lies.

            Comment


            • #26
              Originally posted by tenchrio View Post
              Tell me you never wrote anything in Python without telling me you ever wrote anything in Python.
              Python is fast to code and by design results in good indentation so easy to read. Due to it being an interpreted language you also don't need to recompile while testing.
              I am currently writing a Blender extension and I can just test parts of the code by pasting it into the Blender Python console.

              I also use it at my job if I need a quick and dirty short term solution to a problem that would be too much work by hand, but won't see enough of a repeat to justify it programming in one of the other languages that we use (e.g. cleaning up a CSV, import in pandas, apply my function on rows, export to csv, import into database right in time for lunch).


              Literally every programming language deprecates functions and Python doesn't just come out of nowhere with them either.
              You get warned first if you are using deprecated functions or types, e.g. distutils was proposed to be deprecated in 2020, marked as deprecated in Python 3.10 (Oct 2021) but was only removed in Python 3.12 ( October 2023), there was ample time and documentation available to phase it out of projects. If a project didn't than it was entirely the developer of that library/program's fault and apparently nobody seemed to care about the deprecation warning for 2 years.


              It won't and backwards compatibility problems being "legendary" with Python is quite the statement to make considering it is obvious you don't program in Python yourself.
              The biggest compatibility problem came from Python 2.7 to Python 3.x, which took over 10 years (2010 to 2020) before finally Python 2.7 was EOL and people were forced to rewrite for Python 3.X. Kodi switched barely 2 months before the Python 2 EOL (most distros either shipped both or only Python3), Python 3.0 to 3.8 were released before Kodi made the switch, so if the compatibility problem was truly as "legendary" as you said, they had ample time to switch to a different scripting language as all the addons would be incompatible regardless.

              And despite Python3 being around and kicking for over a decade, meaning there should have been ample time for the "backwards compatibility problem" to become "legendary" after the 2.7 breakage yet we still see new programs/applications use Python in some way or form, especially now with AI were it is easy to get access to powerful libraries like TensorFlow or Pytorch. It is also still the most popular language on Github in 2023 and 2024. So yeah, seems like it isn't that much of an issue for actual developers.
              I don't need to code in Python to know that it's constantly breaking software that uses it. In the case of Kodi the latest release of Python simply introduced a thread locking problem that hadn't been there before. It has nothing to do with using deprecated functions or any other change in Kodi, a Python update simply broke it. And as others have commented on this thread, and on many other forums I've seen over the years, this type of breakage is a common issue.

              I'm a retired hardware/firmware/software R&D engineer and typically used assembly, C, or C++ for firmware/software projects so my comments are purely from an end user viewpoint, not that of a developer. However as I said if I were to design something that required some type of rapid development language it certainly wouldn't be Python, as in my experience it has a long history of arbitrarily breaking software that uses it.

              Comment


              • #27
                Originally posted by uid313 View Post

                Yeah, Python is fast enough for me, and I guess for most people for most things. Of course some people really need high-performance but then you need to use the right tool for the job, so in that case there are other languages available.
                You talk like you were the only one in
                charge how things work (maybe you work in a 3 persons company). In many big companies, you have no power on how python is used. If it’s heavily overused when C++ would have been a better choice, you can not rewrite everything yourself and in such case (99 percent), you can only cross your fingers the code runs faster.

                Comment


                • #28
                  Originally posted by muncrief View Post
                  I don't need to code in Python to know that it's constantly breaking software that uses it.
                  Plenty of software were I didn't hear it breaking things like Blender, Krita etc etc​
                  In fact so far you only mentioned Kodi and that is the only software that even got mentioned in this entire thread.

                  Originally posted by muncrief View Post
                  In the case of Kodi the latest release of Python simply introduced a thread locking problem that hadn't been there before. It has nothing to do with using deprecated functions or any other change in Kodi, a Python update simply broke it. And as others have commented on this thread, and on many other forums I've seen over the years, this type of breakage is a common issue.
                  I assume that you are referring to this issue from Friday May 3rd, the problem seems to be solely in Python 3.12 and already has a pull request going to fix it since Monday May 6th (so much for the claims they don't attempt to fix anything). Not all addons seem to be affected and it is addon specific, not Kodi itself so Kodi still works with that version of Python and so do certain addons. Mind you that the pull request is also a backport of code already present in Python 3.13. So no a python update didn't break Kodi, it broke addons.

                  And did you seriously just attempted Argumentum ad populum with Software? There is plenty of morons here on Phoronix claiming all types of bullshit, doesn't make it true in the slightest.

                  Originally posted by muncrief View Post
                  I'm a retired hardware/firmware/software R&D engineer and typically used assembly, C, or C++ for firmware/software projects so my comments are purely from an end user viewpoint, not that of a developer. However as I said if I were to design something that required some type of rapid development language it certainly wouldn't be Python, as in my experience it has a long history of arbitrarily breaking software that uses it.
                  You mentioned one program and only 1 time it broke. That not a long history that is a mild inconvenience and in this day and age with multiple container solutions being shipped with a distro, its barely even a problem for end users (be it Ubuntu snaps or PopOs Flatpaks), you are exaggerating your claim and worst of all are giving advice for a field you didn't even partake in nor are going to. All of this doesn't take away any of Python's strength like readability, easy to code, easy to learn and a large amount of libraries to fit your needs which matter a lot more in rapid development.

                  Comment


                  • #29
                    Originally posted by Weasel View Post
                    Spoken like a true script kid using toys.

                    Python is probably the only interpreted language that people can't update to the latest non-major version without breaking something. Did you know pytorch (one of the most famous libs for AI) doesn't even work with python 3.13 (or heck I think even 3.12)?

                    Don't you find it funny cloud services like Colab are still using Python 3.10 despite having most updated libraries?

                    Fuck off with your shitty opinions. Absolute nightmare compatibility language. Worse than dependency hell.
                    why the fuck do u even care about them using latest version huh its literally irrelevant u must b one of those frustrated wannabe devs who just wants everything to work magically pytorch is just an example but there are dozens of libs broken with latest versions suck it up and deal with it u sound like an idiot cloud services dont care abt updating if it breaks everything wtf do you even know python's stability issues r well known so stop acting high and mighty

                    Comment


                    • #30
                      Originally posted by blackshard View Post
                      Never thought it was a good idea to deserialize data into a class, which carries executable methods.
                      A class is a class, json does not carry objects, pickle do.
                      Classes are a part of Object Oriented Programming used to represent objects and JSON (JavaScript Object Notation) is just a human readable and easily storable format. For better or worse JSON is the format chosen to be sent over the internet or the output of many web APIs. It would make sense at this point for every API to support loading JSON as a native format. (Though there is a push to have APIs directly output HTML again server side with HTMLX).
                      Last edited by CTown; 09 June 2024, 04:15 PM.

                      Comment

                      Working...
                      X