News for hackers. Stuff that matters.
Re:Learning Go as a Python Developer: The Good and the Bad by 120photo on Monday July 18, 2022 @04:20PM (#32143131)
I tried porting a Python utility I wrote to Go specifically because I did not want people to have to install any 3rd party libraries (in this case just one). If anything I had a much deeper appreciation as to how much Python does for you and just lets you work. I would still like to port someday. For now I can containerize my app but that would still require people to install docker and learn how to use docker.
Re:Learning Go as a Python Developer: The Good and the Bad by deivid on Monday July 18, 2022 @04:30PM (#32143257)
The easiest way to do this is to use shiv[0] if you don't mind asking people to have Python itself installed; if you want a truly "one file bundle" you should use PyInstaller[1] (which bundles a Python interpreter)

[0]: https://shiv.readthedocs.io/en/latest/

[1]: https://pyinstaller.org/en/stable/

Re:Learning Go as a Python Developer: The Good and the Bad by zozbot234 on Monday July 18, 2022 @04:23PM (#32143168)
You don't need docker to bundle an app with custom libraries. You can use AppImage which is pretty much just an ordinary app install rolled into a single file.
Re:Learning Go as a Python Developer: The Good and the Bad by LtWorf on Monday July 18, 2022 @04:41PM (#32143373)
i guess he's not using linux, otherwise python dependencies would be no problem
Re:Learning Go as a Python Developer: The Good and the Bad by zozbot234 on Monday July 18, 2022 @04:43PM (#32143394)
Docker is linux specific. It can only run in a VM on non-linux platforms.
Re:Learning Go as a Python Developer: The Good and the Bad by wizofaus on Monday July 18, 2022 @04:55PM (#32143555)
It requires a linux subsystem, true, but not a fully fledged VM. The subsystem still shares the file system with the primary OS, for a start. And while I haven't tried it, the instructions for installing AppImage on WSL (for example) don't look trivial.
Re:Learning Go as a Python Developer: The Good and the Bad by DenseComet on Monday July 18, 2022 @05:55PM (#32144452)
WSL is a fully fledged VM under the hood, it's just well integrated.
Re:Learning Go as a Python Developer: The Good and the Bad by wizofaus on Monday July 18, 2022 @06:03PM (#32144569)
MS call it a "lightweight utility virtual machine", and "not a traditional VM experience", whatever that means. Docker also works on MacOS, with a basic linux distro running under hypervisor that again, I'm not sure qualifies as a 'fully fledged VM' (at least in terms of user access to it).
Re:Learning Go as a Python Developer: The Good and the Bad by e3bc54b2 on Monday July 18, 2022 @10:57PM (#32147018)
WSL, starting with v2, is a fully fledged virtual machine, and comes with its own built in Linux kernel. The 'lightweight' part is because resource allocation is bit more dynamic than your usual VirtalBox VM. Other than that, there is no difference.