5 ms·
i understand that there are subtle differences between minor versions of python, and its batteries. But what about putting it all into a docker image?
by MichaelMoser123 5y ago
i understand that there are subtle differences between minor versions of python, and its batteries. But what about putting it all into a docker image?
- bryanrasmussen 5y agoso instead of choosing a different language without particular problems, add another tool in your chain to manage to handle the problems? Based on the idea choose the right tool for the job it seems python is not right for this job.
- MichaelMoser123 5y agoDon't know what the 'right' tool is. i think it is easier to code up stuff in Python, as compared to golang. I am much more productive in Python, the language is more expressive, imho. An alternative would be to write in Perl5, perl is pretty much fixed, these days (if you insist on not using containers) Try to compile your go tools in year, or two. If think that you will be hard pressed to find the dependent library versions. Packaging is not the strongest part of go. A version in your package translates to a tag in the referenced git repository, now sometimes people do funny things with their repositories, and older tags disappear. Python and Perl5 are better, at packaging. At least you have all of the older library versions on https://pypi.org/ https://pypi.org/ I think, that the decentralized approach to packaging (as used in golang) is far from optimal. Maybe this is all due to the fact, that google is using a mono repository, internally for their own code. So that they are not eating their own 'dog food'. Sorry for ranting, judgements like 'right tools' really get me going..
- travisd 5y ago“Right tool” is not a value judgement. Python is better suited to certain applications, and go is better suited to others (with overlap obviously). This is partially a function of the language itself (eg, statically compiled or not) and partially a function of ecosystem (eg, writing container tools, go is by far the most pragmatic choice and Python for many ML applications). I think GP was just saying that most times, fewer moving parts is better. Avoiding Docker is great if you don’t need it (especially for a CLI tool). Obviously there are trade offs that must be evaluated in the context of a given problem and domain.
- edude03 5y ago> I am much more productive in Python you may be, but the point is that the time you save writing in python is paid multiple times when each person who wants to use your code struggles to install it and get it working.
- Too 5y agoDocker is a mess if you want to read or write any files on the host system. Which is often what you want to do from a cli. Mainly because volumes are mounted as the host user UID, while the container might be running any other user, often root. Quite baffling they haven’t made this easier since it would be a real killer feature unlocking even more potential from containers.
- MichaelMoser123 5y agoright, one possibility is to pipe standard output to an output file. Another use case is running a http server locally, for something that has a graphic ui. Like one of my projects here: https://github.com/mosermichael/s9k https://github.com/mosermichael/s9k
- MichaelMoser123 5y agoyou can mount the users home directory, if file system changes are limited to the current user.