6 ms·
> Nim generates native dependency-free executables, not dependent on a virtual machine, which are small and allow easy redistribution. That's... awesome. I've
by mikenew 7y ago
> Nim generates native dependency-free executables, not dependent on a virtual machine, which are small and allow easy redistribution.
That's... awesome. I've written a handful of little tools and scripts in Python for different (often non-technical) clients to use, but I've never found an easy way to package them up as a "click this icon to run the program" type of thing. If that's a solved problem with Nim I'm pretty much already sold.
- svnpenn 7y agoIt does do that. The only issue you might have is library support, but I have found it to be pretty good. For example Nim has had async HTTP client for a while now, while even Rust is just now getting it. https://nim-lang.github.io/Nim/httpclient https://nim-lang.github.io/Nim/httpclient https://github.com/nim-lang/Nim/commit/783087fd https://github.com/nim-lang/Nim/commit/783087fd
- Thaxll 7y agoThe async lib doesn't supports timeout, meaning not usable in production or any serious workload.
- svnpenn 7y agoNeither does JavaScript fetch, I dont get your point
- PMunch 7y agoI can see where you get that idea from, indeed the httpclient module doesn't have timeout flags for it's async recieve. But the asyncdispatch has a withTimeout procedure that should happily take the Future that you get from an async recieve and give you a timeout for it.
- sametmax 7y agoNuitka (nuitka.net) does that for python, and is very robust and compatible. It works way better than py2exe, cx_freeze, etx, and is cross platform. However, the result, even for small scripts, is not what I would qualify as "small" :) I also like pex (https://github.com/pantsbuild/pex https://github.com/pantsbuild/pex) which allows to bundle a whole venv as a python script. Less heavy than nuitka, doesn't make it stand alone though, but very handy for quick and dirty scripts I want to one shot on my servers. That doesn't remove any merit to nim. Such a cool project.
- Rotareti 7y agoNuitka also improves performance. It has halved the startup time for a command line tool that I wrote.
- vram22 7y ago>Nuitka (nuitka.net) does that for python, and is very robust and compatible. It works way better than py2exe, cx_freeze, etx, and is cross platform. However, the result, even for small scripts, is not what I would qualify as "small" :) How does Nuitka compare for generated executable sizes with PyInstaller? I've used the latter. For small Python scripts, CLI or wxPython, it created EXEs (Windows) in the range of 10 MB in size - with the all-code-in-one-file option.
- PMunch 7y agoAs someone who usually develops in Nim but is now stuck with delivering some Python scripts that runs embedded in a C program I feel your pain.. The first time I had to deploy some Nim code and could just copy a single binary to the target machine and run it was such a good feeling!
- PhilippGille 7y agoGo might be suited for you as well and it has a bigger ecosystem.
- iuuuuu 7y agoNim supports dynamic libraries as well and that is very important for security.
- goodpoint 7y agoA simple tarball would do, or a package or an installer.