Sorry if this is a silly question, but what is the use case for this?
post
Next step: convert docker to nspawn/portable sysd services
I really appreciate your marketing. You're good at this.
I wish I knew what the hell you're talking about, but I sure am smiling big for you what ever it does. LOL I know what Kubernetes is. But after that, it's all Greek to me. Best of good fortune in..........whatever you're doing. /s
Great now i can Kompose convert my converted helm charts!
okay the moment I saw Python I just closed it
I mean, it's yaml manipulation. It was either python or perl, but i wasn't fucking with perl, i'm insane not mad (or the other way around)
Perl is perfect for curses you have no intention of maintaining. You can pack more dark magic per line.
Perl is way crazier than Python that’s for sure. Don’t get me wrong, it’s a nice project, Python gets you there really fast because the la gauge is loosely coupled, just that when it’s failing it’s blowing up on all ends & it’s not so deterministic, meaning what you run on machine-a will be exactly the same on machine-b.
Curious what you would use instead? I can only think of one wrong answer and that's Jsonnet.
Would’ve written a Golang program and spit-out a binary for everyone to execute on any machine.
No dependency problems, it’s portable, it’s deterministic — all that you need. Everything is packed in that binary, dependencies, your core logic.
You can create static binaries that bundle the python interpreter and dependencies.
It's the onefile option in pyinstaller: https://pyinstaller.org/en/stable/usage.html#cmdoption-F
You can also do it with C. Or Csharp. Or many other programming languages. It's not a feature unique to Go, it's just that Go can only create static binaries.
not only, you can go ahead and run a Go program as is, without compiling as well 😆
TIL about the onefile, 10x for sharing, can you guarantee that runs everywhere?
go run works by compiling the program to a temporary executable and then executing that.
can you guarantee that runs everywhere
It seems to depend on glibc versions, if that's what you are asking. You can force it to be more static by using a static musl python or via other tools. Of course, a binary for Linux only runs on Linux and the same for Windows and Mac. But yeah.
Also it should be noted that go binaries that use C library dependencies are not truly standalone, often depending on glibc in similar ways. Of course, same as pyinstaller, you can use musl to make it more static.
all 36 comments