It just happened again. I typed "nimble update jester" and what does Nimble do? It tries to update its package list with the non-default URL "jester". That's bad. It should be an alias for "nimble install jester" or perhaps "nimble install jester@#head".
The old "nimble update" should become "nimble refresh".
Anybody out there who agrees with me? ;-)
Wholeheartedly agree.
(Not trying to be inflammatory, just generating enough characters for this to post :))
Yes, I fully agree. That was one of the reasons why I started this one thread about Nimbles low level command set.
Like I said before, I would even prefer if a user does not have to care about refreshing the package list. Every time you look up or install a package, you basically want to query the most recent package list anyway. Every now and then a user will forget to refresh and they will be confused that they could not find a certain package (at least that's what happened to me a lot). Similarly I cannot tell my students that they can build my projects simply using nimble build -- they have no idea how nimble works, so I have to tell them to nimble update && nimble build to make sure they refresh their package list. Since the time of a refresh is almost negligible when installing a package, it would make sense to just have auto-refresh.
Alright, nimble update pkg will become an alias to nimble install pkg@#head.
Unless somebody can come up with a good reason why nimble should be consistent with other package managers :)
Unless somebody can come up with a good reason why nimble should be consistent with other package managers
Consistency makes it intuitive to use. Easy to use makes people love it. Universe wont implode if its different but consistency will add one more nice thing to it.
Wouldn't this make more sense:
nimble update - to update package lists
nimble upgrade - to upgrade the package lists
oops I made a typo I need more coffee! I meant:
nimble update - to update package lists
nimble upgrade - to upgrade packages / a specific package
I think it its a good idea to change the command name, but another option would be to change the url parameter from a positional parameter to a keyword parameter, i.e.:
nimble update --url jester
That way, doing:
nimble update jester
Would be an error "unknown argument" our "missing argument".
+1 for what softinio wrote. In case the user executes "nimble update <pkgname>" nimble could complain "update is used to update the available packages list. If you want to use a non-standard package source please use --url <url>"
https://en.wikipedia.org/wiki/Principle_of_least_astonishment
nimble update jester
> Would be an error "unknown argument" our "missing argument".
Why oh why do we have to care about apt-get and brew? What is so wrong with nimble update jester actually updating jester? Isn't that even moreso according to the "principle of least astonishment"? (Which is always only brought up to justify some archaic Unix stuff anyway.)
My two cents:
I prefer the name change. apt-get is a REALLY bad example to use. This is way better.
The thing is, yes, the way it works now (or was working, if you changed it already) IS the same way other things (like apt) work, AND those other things are confusing. I have definitely been confused by that with apt before.
Its kind of like there are a lot of not-so-great decisions for names and other basic and non-basic engineering decisions out there, and they get propagated for 'consistency' or whatever.
I think that Nim is breaking form with that tradition of bad names and not-so-great engineering decisions. So making the update mean update is a step forward, and Nim has already established that it doesn't hold to established less-than-ideal forms.
I think he had to default to coding it that way otherwise everyone would have said it wasn't the way other package systems worked, but it will be better if we break form. Some people will actually complain its not 'normal' but we will just explain that Araq decided things should make sense. Heh.
Afaik it is at least apt-get brew cabal ... and still I agree that Nim(ble) can do it as Nim(ble) wants... My bikeshed is rainbow colored anyway.
npm does it "better" doesn't it? Maybe this can be a prototype.
Yep npm is one of the ones where update means update.
I am actually a Node programmer. I would like to see Nim get thousands of packages like Node although npm has 188k packages which is too many. ES6 is not bad. The only big issue for me with Node is it wastes quite a lot of memory (the extra CPU cycles I don't usually notice even though it can be a lot). So I am planning/hoping on switching to Nim at some point, especially since the inventor of JavaScript essentially deprecated JavaScript when he backed web assembly. Don't try to tell that to most web/Node devs though.