Everytime I have to use some python script I fucking groan. God, what a pain in the ass python is...

    • captcha [any]
      ·
      2 years ago

      Holy shit I hate python tooling so much. I jump at every new possible package manager for python but find out that its still shit because of PyPI. Pretty sure the only reliable way to test python code is to always run it in docker images.

        • captcha [any]
          ·
          2 years ago

          Docker is good actually as it can effectively quarantine terrible build systems and spares your machine from global dependency installs just to test out some code. Its just something new you need to learn like git.

          only does C, C++, and Go

          How does this spare you from docker? All these languages have terrible if existent build systems.

          • alexandra_kollontai [she/her]
            ·
            2 years ago

            Concepts of docker are good, its tooling is shit especially for hobbyists. I've found it works much better for corporate stuff than for individuals.

            • Sinonatrix [comrade/them]
              ·
              2 years ago

              Idk if related abstractions like Toolbox (as used in Fedora Silverblue) are totally ready, but they seem like interesting progress for lowering the barrier of entry to paravirtualize builds

              • alexandra_kollontai [she/her]
                ·
                2 years ago

                I've used toolbox and it doesn't seem like it's possible to package up a "system state" and distribute that as your application.

                Toolbox is just a wrapper over podman (which copies the docker cli api) anyway.

                • Sinonatrix [comrade/them]
                  ·
                  2 years ago

                  I don't think deployment is intended, just making it easier for the developer to isolate dependencies they need.

            • captcha [any]
              ·
              2 years ago

              Go's build system was good when it first came out but everything has gotten wildly better since. Rust's cargo at the moment is the gold standard AFAIK. The main issue with go's build system was $GOPATH. Go would insist on installing all dependencies globally onto the GOPATH. Meaning, if I was working on two different projects using different versions of the same dependency I would have to maintain an entirely separate GOPATH. Maybe go has stopped doing that recently but that's what I last saw.

              Most build systems now allow dependency versioning per project by default and if they're good will cache builds of the same version between projects.

              I'm mostly upset because if I dont have a GOPATh set and I install a go project from source it will make a ~/go folder without asking me.

                • captcha [any]
                  ·
                  2 years ago

                  oh thank god, I've been scared to get back into go because of it.

                  If you like C, C++ and Go then you'll like Rust as its a better attempt to dethrone C than Go was. The basic types, struct, enum, and trait are the most elegant and least burdensome system I've seen yet. But that borrow checker though really can be an obstacle. Everything must be safe. It can get really weird when doing async stuff but your getting safe async code for a lot easier than other languages.

                  • PissPoorGrandpig [none/use name]
                    ·
                    2 years ago

                    I adore Rust. The borrow checker can be a pain, but ~95% of the time you can simply read the compilation error and it will tell you exactly how to fix the problem. I think I had more issue with lifetimes at first, when I was trying to add too much state to my structs, but even that only takes a couple of weeks of hobby programming to learn really.

                    I'd love to get a job writing rust instead of stupid php like my current job :sadness:

                      • PissPoorGrandpig [none/use name]
                        ·
                        2 years ago

                        it's much better than it used to be, but it's still not great. We enforce strong typing with phpstan static analysis, use enums everywhere (no magic strings), use a decent ORM w/ functional collection syntax, use proper SOLID principles, full test coverage, have everything in decent CI etc., so in general it's a passable language at this point. Slow, but passable.

            • userse31 [he/him]
              hexagon
              ·
              2 years ago

              As someone who codes in javascript, your 100% correct.

      • crime [she/her, any]
        ·
        2 years ago

        Yup. I've found that Poetry is decent as far as python package management goes (takes a lot of cues from ruby's bundler, which imo is the gold standard for package managers) but like you said it still suffers from pypi issues

        • captcha [any]
          ·
          2 years ago

          I moved from pipenv to poetry only to find it marginally better. It will still stall out if you try to install too many things and PyPI tells you to fuck off like pipenv did. pdm is the current train I'm on as it hasn't stalled out on me yet but in time I'm sure it will.

      • ButtBidet [he/him]
        ·
        2 years ago

        The newer versions of Pycharm have improved it a lot. Granted Pycharm had iffy package installing until quite recently.

      • Sinonatrix [comrade/them]
        ·
        2 years ago

        I haven't done anything very intricate in python, but is the built-in virtual environment not enough to lock dependencies? I'd probably rather docker for a serious project, but venv takes way less infrastructure.

        • captcha [any]
          ·
          2 years ago

          The problem comes from PyPI and resolving dependencies of your dependencies. I dont fully understand it but it sounds like PyPI has to execute code from your dependency to determine its dependencies and sometimes that process will stall out. Also if you're resolving some sort of dependency hell and constantly doing poetry install PyPI might block you.

    • ppb [none/use name]
      ·
      2 years ago

      I believe you are overlooking one of the most important aspects of a programming language, how easy it is for randos to make hello worlds. :very-smart: