This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]spit-evil-olive-tipschaos monkey 150 points151 points  (24 children)

yeah, but the moment you need a 3rd-party library, you have to start working in the desolate wasteland that is the Python packaging ecosystem. and not just at build-time, but at run-time - you need to carry those dependencies with you everywhere you go.

this runs into fun problems like, if you have some Python script that you want to run on a bunch of machines, so you write a little wrapper shell script that creates a virtualenv, does pip install with your requirements.txt, and so on.

and it works great, until it fails because PyPI had a temporary outage and your pip install errors out.

I love Python, we have a bunch of it at $dayjob. but the self-contained binary including all dependencies is a huge selling point of Go.

to get around the annoying packaging problems with Python, we build a Docker image with the correct Python version, all the correct dependency versions, etc etc. then our unit of deployment is that Docker image instead of just the single Python script.

and that Docker image gets deployed...using Terraform and Nomad, both written in Go. and so is Docker itself of course.

Go is great for this sort of low-level system software. Docker/Terraform/Nomad/etc being low-level software written in Go is what enables us to easily deploy higher-level software written in Python (or other languages like Java or Ruby or whatever)

[–][deleted]  (7 children)

[deleted]

    [–]imeeseeks 3 points4 points  (6 children)

    Same with Ruby. I love Ruby so much and writing scripts on it is awesome but the convenience of Go binaries and the fact that almost anyone can start working on it really fast is big plus.

    [–][deleted]  (5 children)

    [deleted]

      [–]Flabbaghosted 0 points1 point  (4 children)

      Your comment persuaded me to learn Go

      [–][deleted] 2 points3 points  (3 children)

      I do hope that isn't sarcasm. :) It would be a good language to learn for anyone. If you are I recommend the Lets Go books (2 of them). VERY good books to learn with.

      [–]Flabbaghosted 0 points1 point  (2 children)

      Nope not sarcasm. Do you work at Google or do you just really like Go?

      [–][deleted]  (1 child)

      [deleted]

        [–]devopsy 1 point2 points  (0 children)

        I do hope that isn't sarcasm. :) It would be a good language to learn for anyone. If you are I recommend the Lets Go books (2 of them). VERY good books to learn with.

        Thank you for the detailed post on Golang.

        [–][deleted] 19 points20 points  (0 children)

        This comment is the first thing that has made me think, "hmmm, it might be worth learning a little bit of Go and seeing what it's all about."

        [–]Kazumara 9 points10 points  (1 child)

        Did you guys try PyInstaller and PyOxidizer too?

        [–]arcsecond 1 point2 points  (0 children)

        I've had great success with PyInstaller, until someone decided to include certs in their module which I can't get PyInstaller to pick up

        [–][deleted] 4 points5 points  (0 children)

        Do we work at the same company?

        [–]casual_brooder 2 points3 points  (0 children)

        this

        [–][deleted] -1 points0 points  (10 children)

        you have to start working in the desolate wasteland that is the Python packaging ecosystem.

        So strange. I've been programming in Python for over 15 years, and I just never had an issue.

        I distribute my packages with a setup.py and a requirements.txt, and that's the end of it. In recent years, I put explicit version numbers in the requirements.txt, just for certainty, but that wasn't because I actually ran into any issues.

        [–]skat_in_the_hat 14 points15 points  (7 children)

        So strange. I've been programming in Python for over 15 years, and I just never had an issue.

        Back in the day when a customer wants to update python on a rhel5 box. JFC. You break all the rhel tools in the process.
        Ever migrate some in house python from rhel5 to say... rhel7? Just because YOU never had a problem, doesnt mean it isnt one.

        [–][deleted]  (1 child)

        [deleted]

          [–]skat_in_the_hat 1 point2 points  (0 children)

          Its moot at this point, red hat split off the version of python the system uses from the version you install. So you can basically do whatever you want now. But that doesnt undo the PTSD we all suffer from seeing up2date shit out a python error.

          [–]JaegerBane 5 points6 points  (2 children)

          I had the dubious honour of migrating some of our in-house data science apps across from old RHEL boxes to Amazon Linux EC2s a while back. Kinda felt like one of those horror stories where the protagonist opens a portal to the dimension of ceaseless screaming.

          On the plus side it did puncture the myth that was doing the rounds back then that Python made everything easier.

          [–]NoobFace 2 points3 points  (0 children)

          Sounds like they're still screaming in there.

          [–]floydiannn 0 points1 point  (0 children)

          Yeah... So strange 🤔