I quite like using Atom with Nim and find that it works nicely overall. Recently I thought that installing nimsuggest may improve my experience even more and quickly realized that to install nimsuggest I would need to previously install the package manager nimble. This was the downfall of my workflow. Despite trying every possible combination of suggested solutions listed within this issue (https://github.com/nim-lang/nimble/issues/220) I was never able to successfully install the package manager. I should say that I installed Nim using Homebrew, which is the recommended method on a Mac, and followed all of the standard installation instructions for nimble on the site.
I really like Nim and want to use it more for various projects. I realize that Nim isn't yet 1.0 and so perhaps I'm expecting too much at this stage, but I do believe that these are standard tools of the language and not 3rd party tools (please correct me if I'm wrong). One of the positive points of having previously used Go was how easily each of the standard tools are integrated. Actually, I had a similarly positive experience with the standard tools of Crystal-lang. Is it possible to incorporate nimsuggest and nimble in the installation of Nim itself, saving the user the frustration of trying to integrate the tooling after the initial Nim install? What would be the disadvantages to this, if any?
Despite trying every possible combination of suggested solutions listed within this issue (https://github.com/nim-lang/nimble/issues/220) I was never able to successfully install the package manager.
That's obviously a bug. I have personally tested this installation and got confirmation from another user that it was now working (that's why the issue is now closed). Please provide more information so that we can diagnose your problems.
Is it possible to incorporate nimsuggest and nimble in the installation of Nim itself, saving the user the frustration of trying to integrate the tooling after the initial Nim install? What would be the disadvantages to this, if any?
Sure, it's possible and we will do so in the future. But the problems you are experiencing should be diagnosed and fixed anyway.
The fact is, using homebrew is not the recommended way to install Nim on a Mac.
If you can, just install Nim using nim-vm. Then you should have a easier time with Nimble.
If you want nimble on homebrew, that is really something you should ask to the mantainer of the Nim recipe for homebrew
@dom96, I appreciate this likely is a bug and certainly understand that it should be reported to the nimble project. But this wasn't really the point of my initial post. My point is that it seems like this bug is the result of the way that Nim and nimble integrate (or don't in my case) and that this could be avoided entirely if the nimble were simply distributed with Nim, much like Go or Crystal. I just wanted to know if there were be any disadvantages to applying this model to Nim that I was unaware of. From a user's perspective, this would surely simplify things greatly.
@andrea, I'm not sure why I had the impression that Homebrew was the recommended way but I certainly appreciate you pointing out that this is not the case. I have never heard of nim-vm before now but will give it a go. Thanks for the suggestion. I don't think that I'm asking for nimble to be on homebrew so much as I am asking whether nimble could be tightly integrated into Nim itself. In this way, it wouldn't matter if I had installed Nim using Homebrew or any other method, Nimble would be available to me.
Yes I loved "script" for Atom (coming from coderunner originally I am used to a versatile runner). But I hated that I could not copy & paste from "Terminal" (on OSX). Which I made an issue for at the component maintainer. I use "runner" with VSCode and my own little bash script which has some additional functionality like scanning the Nim-Source for additional commands to run. It also knows how to run jsnode or php targets and stuff. I quickly made a gist with that: https://gist.github.com/oderwat/cc0941fa64785426eee92ccdcdb1921a
If you look at the examples in our repository of NimZend (https://github.com/metatexx/nimzend) you find how I use that script to quickly create different compile and test settings such that I do not need to leave the editor for those tasks.
Example:
# nim build -d:php56 -d:phpinfo --verbosity:1 --hints:off
# run nim tests -d:php56
# !nim build -d:php70 -d:phpinfo --verbosity:1 --hints:off
# !run nim tests -d:php70
# !run php7r dl("nim7.so"); echo ">".nim_say("World")."<".PHP_EOL;
# !run php7r dl("nim7.so"); echo ">".nim_add(123, 111)."<".PHP_EOL;
... code ...
The "runner" script still has some flaws like making it hard to send ctrl+c to a script though. I think we may get even better stuff soon as there is now a real terminal integrated with the new insider builds of VSCode. I guess this will eventually allow running the code easily in this terminal!
May I also recommend my "rainbow-indent" extension? It makes reading indentation based source-code much more convenient in my opinion: https://marketplace.visualstudio.com/items?itemName=oderwat.indent-rainbow
Hi OderWat,
This is really helpful. I'll certainly look into it. I'm also interested in the indentation extension. I guess it's been a long while since I last looked at VSCode and apparently things have moved forward a fair bit.
May I also recommend my "rainbow-indent" extension?
I like these grey bars better :-) (Hope you can see it, maybe a bit too dark still.)