Earlier quoted context omitted.
I'm unsatisfied with the current situation too, but it's a hard problem. You can either go full container (which means no BSD, and having to deal with Docker or Kubernetes and all the associated woes), or fallback to native packages which are a huge PITA to build, deploy and use. I think that Nix and Guix have part of the solution: have a way to build fully independent packages that can be easily installed. But I'm n…
Just curious, what’s the benefit of using FreeBSD versus Debian/Ubuntu?
The simplicity of single-file Golang deployments
181–190 of 232 posts
Re: The simplicity of single-file Golang deployments
#182Earlier quoted context omitted.
> The fact that it produces a single static binary is one of the nicest things about golang. Not only that it can also cross compile for different architecture and operating systems.
I made a cool program for Go projects that will compile all the supported OS and ARCH combos for your code. Please try it :) I use it for everything I make now. Just do `release --name "mycoolprogram" --version "0.1.0"` and it will output all of your labeled release binaries for every platform your code supports. check it out! [0] You can see it at work here for this simple markdown blog generator I made, which sport…
Re: The simplicity of single-file Golang deployments
#183Earlier quoted context omitted.
> The fact that it produces a single static binary is one of the nicest things about golang. Not only that it can also cross compile for different architecture and operating systems.
So I always assumed this was the case for other compiled languages. Is this something special in Golang and/or recently created languages?
Re: The simplicity of single-file Golang deployments
#184Earlier quoted context omitted.
I made a cool program for Go projects that will compile all the supported OS and ARCH combos for your code. Please try it :) I use it for everything I make now. Just do `release --name "mycoolprogram" --version "0.1.0"` and it will output all of your labeled release binaries for every platform your code supports. check it out! [0] You can see it at work here for this simple markdown blog generator I made, which sport…
looks a heck of a lot simpler than goreleaser! I love goreleaser but it gets outrageously complicated.
Re: The simplicity of single-file Golang deployments
#185Earlier quoted context omitted.
Not wrong; at the same time, I'm becoming less convinced this is relevant. Seems many security updates have to do with code paths that are not used in a large number of applications. Similarly, many of them are fixes on features that even more apps didn't want/need, but they got when they updated to get the last round of security fixes. :( The docker world is a neat example of this. The stories of ${absurdly high per…
The problem is having to wait for all those applications to push updates when a vulnerability is found in a common library
I can be confident I will be able to build >90% of go programs by cloning the repo and calling go build.
Re: The simplicity of single-file Golang deployments
#186The fact that it produces a single static binary is one of the nicest things about golang. This used to be easy with C (on BSD & Linux) a long time ago, but then everything started to depend on various shared libs, who then depend on other libs, then things started to even dlopen libs behind your back so they didn't even show up in ldd, etc. Sigh.
IME, using musl, compiling static binaries written in C is as easy as it was before glibc changes and as it has always has been on NetBSD. I compile static binaries written in C every day on Linux. I never encountered any problems compiling static binaries on BSD.
Re: The simplicity of single-file Golang deployments
#187Earlier quoted context omitted.
Assets of any kind can be embedded in the executable and accessed via the embed.FS interface. This makes it trivial to bundle up all dependencies if desired.
Embedding your assets like this isn't always an improvement. For example, I work on a site with a Go server and static content pages, and I like that I can update one of the pages and see the change instantly without having to re-compile the entire server binary just to get the new files included.
Re: The simplicity of single-file Golang deployments
#188Earlier quoted context omitted.
If only they would decide what to do with plugin package, not use SCM paths for packages and decide to eventually support enumerations instead of iota dance (Pascal style would be enough. Maybe 10 more years.
type Kind enum { Simple, Complex, Emacs, } const kindStrings [Kind]string = { "simple", "complex", "emacs", } func (k Kind) String() string { return kindStrings[k] } func t() { var a = Kind.Emacs - Kind.Simple // a has type int and value 2 var b = Kind.Simple + Kind.Emacs // type error var c = Kind.Simple + 1 // type error var d = len(Kind) // d has type int and value 3 for k := range Kind { fmt.Printf("%v\n", k) //…
The parent is likely lamenting that Go doesn't enforce compile-time value constraints on enumerated sets like some languages do, but many other languages don't ether. Not even Typescript does. If Typescript doesn't find it important to have such value constraints, Go most certainly never will.
Re: The simplicity of single-file Golang deployments
#189Earlier quoted context omitted.
> I don't see what's special or better about compiling everything into a single binary, apart from fetishizing the executable format. Indeed. If you think of the docker image itself as an executable format like PE or ELF, this becomes clearer. Rather than targeting the OS API, which has completely the wrong set of security abstractions because it's built around "users", it defines a new API layer. > "I can deploy by…
AWS Lambda is basically cgi-bin. Except, of course, they re-branded it as an exciting new technology, which I think was a clever move on their part.
Whereas lambda will stay running for a period of receiving requests.
Re: The simplicity of single-file Golang deployments
#190Earlier quoted context omitted.
> The fact that it produces a single static binary is one of the nicest things about golang. Not only that it can also cross compile for different architecture and operating systems.
So I always assumed this was the case for other compiled languages. Is this something special in Golang and/or recently created languages?