5 ms·
> but if e.g. what you wrote derives most of its business logic from its configuration, or the usecase is so generic changes aren't gonna be a thing for a while
by dijksterhuis 2y ago
> but if e.g. what you wrote derives most of its business logic from its configuration, or the usecase is so generic changes aren't gonna be a thing for a while, why not
there’s also the fairly easy cross compilation to bear in mind.
i built a container entrypoint binary via python to stick in all our containers at last job.
getting that to cross compile was going to be a bunch of pain i wasn’t willing to go down for a simple “download files from S3, run a sub process, upload files to S3” pre-execution wrapper.
digital ocean infra + self hosted gitlab —> no readily available windows instances.
so everyone had to use linux to dev these containers with wine+mono.
being able to cross compile would have been brilliant here. i made the decision to not do this in rust for future maintenance reasons. but then people avoided using this thing because they couldn’t run on windows :/
(i know there’s that paid for package but the license fee is mind boggling from what i remember).
- hu3 2y agoperhaps Go could have been a good solution for simple, cross-compiled code.
- dijksterhuis 2y agofrom what i looked at, go was a bit more complicated than rust for cross compilation. but it was still a lot less complicated than sorting it out for python. dunno. was at least two years since i looked at it, but i remember rust coming out on top in my mind. unfortunately the same maintenance issue applied -- it was a python / R shop so no-one else would have been able to change the code once i left.
- hu3 2y agoAFAIK Go has one of, if not the easiest cross compilation stories. This is all it takes to build a linux arm64 binary: env GOOS=linux GOARCH=arm64 go build your_program You can even run that from Windows and it will just work. This is how you list all possible targets: go tool dist list If you want to generate binaries for many linux distros, you can even use a simple bash script: #!/usr/bin/bash archs=(amd64 arm64 ppc64le ppc64 s390x) for arch in ${archs[@]} do env GOOS=linux GOARCH=${arch} go build -o your_program_${arch} done
- dijksterhuis 2y agothats definitely not the commands the guide i looked at had lol looks on par with rust then. go is the next one for me to dive into when im doing fiddling with rust audio stuff. regardless, wouldn’t have worked at last job as no-one knew go either. would have been easier probably to get someone in, but i spent a year trying to get one new hire to no avail, so doubtful.
- hu3 2y agofair enough
- pjmlp 2y agoAsterisk: As long as it is pure Go code.