Hey guys,
I finally released choosenim. Let me know what you think and whether it works for you:
https://github.com/dom96/choosenim
It should make the installation of Nim and management of multiple versions of it much easier.
Just downloaded it and started using it. I think some usage documentation is in order, but looks like you've already started on that.
I figured out how to use it fairly easily just by using the --help flag. Seems to work really well on my Ubuntu 16.04 LTS machine.
Just a note regarding the instruction to add the export path to .profile: This didn't work for me. Not sure why(my shell config may be screwed up). I added the to my .bashrc instead and it worked just fine. My previous nim install was linked through .bashrc as well. You may want to add .bashrc as a second option for a user to try if adding the path to .profile doesn't work. Not everyone knows how the $PATH works(myself included sort of).
The tool I've been waiting for is here! Thank you!
An interesting issue I had while installing was this:
$ curl https://nim-lang.org/choosenim/init.sh -sSf | sh
choosenim-init: Downloading choosenim-0.1.0_linux_amd64
Prompt: Symlink for 'nimble' detected in '/home/username/.nimble/bin'. Can I remove it? [y/N]
Error: unhandled exception: EOF reached [EOFError]
Answer: %
I had nimble installed via nimble, so simply running nimble uninstall nimble worked fine, but I'm not sure what was up with the weird EOFError.Thank you guys for the nice messages :)
@scriptkiddy Will add .bashrc in there, I was hoping systems were at least consistent with this... too bad heh.
@hcorion the only way I see that error happening is if you pressed Ctrl+D in your terminal, any chance you did that?
@dom96 I got the same error as @hcorion originally. Linux Mint 18, Bash. It prompts you to remove it but you never get the option to hit y/N. Tries to read from a non-available stdin maybe?
Great work! Any interest in changing the syntax to "choosenim head" instead of "choosenim #head". I end up having to quote the head as you describe in the doc, which seems kind of unnecessary.
Great that we finally have such a tool! One minor issue:
andrea@lafcadio:~$ choosenim update "#head"
Updating #head
Error: unhandled exception: key not found: #head [KeyError]
@dom96, that's a nice tool to have in the set; thanks for working on it.
On OS X, the install using curl ends in an error:
Prompt: Symlink for 'nimble' detected in '/Users/bpr/.nimble/bin'. Can I remove it? [y/N]
Error: unhandled exception: EOF reached [EOFError]
Answer:
I never entered anything at the prompt.
@hcorion @johns @bpr I think I might have an idea of what the error might be. Because the sh file is piped to sh, the commands have no stdin attached. I recall seeing a workaround for that in Rustup's init script, looks like I'll need to implement something similar. Thanks for the reports!
Great work! Any interest in changing the syntax to "choosenim head" instead of "choosenim #head". I end up having to quote the head as you describe in the doc, which seems kind of unnecessary.
I can add that, sure. But devel is already the same as #devel which is the same as #head.
One minor issue:
Looks like a bug, thanks!
Can't use it, it returns 403. Maybe my network is contaminated and every time I access this forum, I have to input captha.
For windows executable, it's only for 32bit?
@mashingan what returns 403?
For now it's 32bit only. Support for 64bit will come.
@dom, ah, sorry, I forgot mentioning it's the return status when I curl ing the init.sh
curl https://nim-lang.org/choosenim/init.sh -o init.sh
The problem is in my network, not the choosenim itself.
All issues mentioned here should be fixed, let me know if everything works now :)
I think choosenim should be the official way to install Nim recommended on the site. I love it already, it's so damn convenient compared to using native package managers!
The only mild inconvenience I can see right now is that choosenim can't update itself. And maybe the lack of docs. Otherwise it's awesome.
No to temper you enthusiasm, but I think this is a serious issue https://github.com/dom96/choosenim/issues/13
EDIT actually, the bug only happens if ~/.nimble/lib exists, so it is not much of an issue after all