Prolog
I wasn't here for a long time because I felt disapointed by Nim. I'll put it nicely (for you): For a while I used D but finally largely returned to ADA - and D turned out to be a clusterfuck; while as a language it's nice (modulo the braces), practically it was so cumbersome and useless that I gave up on it. Just two examples: code that compiled and worked fine on linux failed with a ridiculous error on FreeBSD (with setting timeout socket option), and their LSP (serve.d) didn't even compile, at least not on FreeBSD. So I returned to ADA because it just works and also has a decent, not bloat-monstrous IDE.
Return to Nim
While I had gotten increasingly unhappy with Nim I didn't forget it and my hopes for it. Recently came across some projects that IMO pretty much begged for being done in Nim. So I returned, installed v2.2.4 - and found myself in the middle of a clusterfuck. One of the culprits: nimlsp. Trying nimble install failed because it couldn't find nimsuggest. Compiling it also failed. The fact that it needs an "emergency brake" at 4 GB RAM doesn't help either. Now, ladies and gentlemen, maybe I'm a pampered spoiled brat, but IMO a properly working and easily buildable LSP is an absolute MUST, especially for not exactly small projects. And the problem IMO isn't just with both the nimble build and compilation failing, nope, it goes deeper and creates an impression of Nim that should be avoided by all means. It actually starts with the question why the hell one needs to nimble it. Why doesn't it come by default with the compiler build? So as to avoid wasting a few MB if someone doesn't want nimlsp? Hardly, after all I had to find out that my standard build took over 2 GB on my disk (due to c_code I think).
Do you guys WANT to make it cumbersome and hard to use Nim?
A few more remarks, related:
Nim doesn't offer 1 but multiple (I almost wrote 'plethora') web servers/server frameworks. I appreciate that, especially after seeing that D pretty much only had 'vibed', a somewhat oldish it seems, on offer which to add insult to injury seems to be not exactly fast. But, sorry to spoil the party, I don't give a flying fuck about many projects, most of them anyway abandoned, half cooked, experimental, etc., if the BASICS arent rock solid and easy to build/get/included! I get it, Nim always is in developement, and that's absolutely a good thing in my books, IF there also always is a stable not too old version available (which seems to be the case). But frankly, e.g. ever changing memory management doesn't inspire trust, especially not with a language outside the mainstream. Don't get me wrong, I appreciate and value A. Rumpf's striving for better, faster, less error prone etc. memory management! But, sorry, I don't want to serve as lab rat, I want a stable versions that is easy to use and provides at least most of the "goodies". And most importantly, if a new version doesn' compile my, say 3 year old, code that begging for a death sentence in my eyes.
Can I please, pretty please, get a working troublefree Nim + environment (e.g. LSP, package tool, etc.)? If yes, I'll stay, if not I'll leave and bite what I consider to be ADA's only major drawback, strings/text, and a bit less comfort than Nim promises.
Sorry for my rant-like thread but I had to get this off my back. Because I remember well liking Nim a lot and having high hopes for it.
Oh, and: I still need a working LSP for Nim, one that actually builds without jumping through weird loops. Please.
My 2 cents:
nimlsp: project from PMunch https://github.com/PMunch/nimlsp
nimlangserver: official Nim Language Server https://github.com/nim-lang/langserver
while I agree that tooling generally doesn't work easily out of the box and it can get worse when applying it on larger projects, there are some sweet spots and it does work if you learn how to tame it. Please consider understanding how lsp work before expecting turn-key solutions.
Peace
Can I please, pretty please, get a working troublefree Nim + environment (e.g. LSP, package tool, etc.)?
Assuming you're not, as you say, a pampered spoiled brat, maybe you'd like to be a part of this happening? Donate and open a priority ticket, https://nim-lang.org/donate.html
Why doesn't it come by default with the compiler build? So as to avoid wasting a few MB if someone doesn't want nimlsp?
nimlsp is a third-party package. There's an "official" langserver but it's not bundled by default because it's just not good enough.
Nim doesn't offer 1 but multiple (I almost wrote 'plethora') web servers/server frameworks.
Like any other language? There's only one server in the standard library. Though, you're probably better off using something more actively developed from the community packages.
But frankly, e.g. ever changing memory management doesn't inspire trust
Nim 2.0 is more than 2 years old and arc/orc were available and actively used long before that. Things hardly changed for the regular users since then.
Regarding the state of the LSP+nimsuggest I don't know the situation exactly but I bet it boils down to lack of resources and people involved in development + probably some required changes to the compiler to support it being done the right way.
When I started running a background loop bumping nimsuggest processes' oom_score my life got much calmer, though it's hardly a great user experience :D
Well, I finally got it to work. By installing a VM and doing the whole shebang again but this time using choosenim (which I dislike for diverse reasons). Then I scp'd it to another box from which finally I scp'd it to my development box.
If I didn't already like Nim and that effort and jumping through weird loops would have been required by any other kind of new to me language I'd have left it - as I did with D for similar reasons.
TL;DR I stand by what I wrote above.
Re. memory management: I get your point - as well as the fact that as lead developer of Nim your point of view hardly is that of "just any user" - and my main worry in that regard boils down to the last years suggesting an expectation ("it'll change again ..."). That said, the current official situation in that regard (arc/orc) is OK.
I understand you're being a bit confrontational to provoke discussion
Nope, that wasn't "confrontational to provoke discussion", it was ranting and venting, but not for myself only. The driving force behind it was disapointment that one of my major hopes, Nim, is in such a state.
nimlsp is a third-party package. There's an "official" langserver but it's not bundled by default because it's just not good enough.
You see, that's basically one of my major points: I do not care. All I see is whether it works easily and well or not, period. Of course a project in development goes through changes and hardly can be 100% OK and working, that's OK. But lots of cruft, half cooked stuffed, more or less dead and/or unusable crap, etc. is not OK. One major reason (although, granted, not re. myself) is this: what's the experience of a new Nim user and I mean one who actually wants and needs to get work done, not someone basically just playing with "hey, another language, cool!".
IMO the border between acceptable and not acceptable is at the very least something like a tag like "tested, fully working", "still alpha/beta" and "don't care just experimenting".
Btw, another important point is docs, a very major weakness of very many foss projects. My point of view has evolved to "no reasonably complete and helpful doc? Keep your crap!" And yes, IMO that is one of the major plus points with "official" Nim. Usually it's reasonably documented. But there is way too much worthless crap that nimble lists/offers as if it were reasonable packages (and no, I don't mean nimlsp by that; it's documentation is far from good quality and complete but it's not crap).
["web servers/server frameworks]" - Like any other language? There's only one server in the standard library. Though, you're probably better off using something more actively developed from the community packages.
Regarding the state of the LSP+nimsuggest I don't know the situation exactly but I bet it boils down to lack of resources and people involved in development + probably some required changes to the compiler to support it being done the right way.
Then I have to say: congrats, you have a half cooked thing in between a toy and a tool here, sorry (and I really am sorry!)
To be fair I'll tell you my reference: does it work with Kate (as opposed to the vscode abomination) and does it meet TODAY's expectations? (e.g. an properly working LSP.).
When I started running a background loop bumping nimsuggest processes' oom_score my life got much calmer, though it's hardly a great user experience :D
Frankly the fact that nimlsp has an "emergency brake" at 4GB RAM due to nimsuggest seeming to be so shoddy, almost frightens me - and yes, IMO it colors off on Nim.
I'll close with something I find important and stating it clearly may help to not get my intentions wrong: When I have a reasonable dev-environment working I really like to develop in Nim. What I said yeasr ago still holds true for me: I think that A. Rumpf created something great, even brilliant (he, not Nim), although today I'd complement that with the question whether he still is guided by Wirth, Meyer, Ichbiah, Dijkstra, I'm not so sure.
Anyway thanks for the discussion and being open-minded enough to recognize that loving something sometimes may show in what seems to be a harsh view.
this time using choosenim (which I dislike for diverse reasons)
You might like grabnim Also, choosenim was known to cause problems with nimsuggest (OOM, too many processes). Not sure if they're all fixed or not.
Switching to grabnim solved 90% of my problems with Nim's LSP.
In my experience Neovim + nimlangserver is pretty stable even on 4GB RAM linux system. And installation is not that bad: "nimble install --useSystemNim nimlangserver", system nim flag is needed to avoid compiling Nim 2.0.8 as a dependency (obv slow).
I’ve never used an LSP client for Nim before, but I’m starting to regret that. Now that I know about nimlangserver I’d like to try it. But since I develop in a podman container. My question is how the LSP server would communicate with the GUI. I assume I’d need to map the container’s ports to the host, maybe I will try it later.
Yesterday, I tested GNOME Builder as a lightweight alternative to VS Code. It’s roughly on par with Kate in terms of features, but since it relies on per-language plugins, and there isn’t one for Nim, you’re stuck with basic ctags integration. I tried following this forum post to get it working, but for some reason, there's still no autocompletion/jump to definition for Nim. Has anyone run into this issue or found a fix?
I think your frustrations are grounded, and all the things you've touched on could be in a better state. Though compared to the majority of things in the software and programming world, their state is ok. Not an excuse to stop improving things of course.
At the same time, I think the problems you're facing are tangential to nim. What are you trying to achieve? Write some throw-away scripts? Maybe python would be a better idea. For most interesting things the difficulty of overcoming most of the issues you're facing, like installing nim and finding the proper webserver framework, is negligible in comparison to the difficulty of actually doing the thing.
nimlsp (or nimsuggest actually?) could be faster and more stable, but then again, do you really need the IDE experience that badly? Why?
At the same time, I think the problems you're facing are tangential to nim.
Probably a question of perspective. When looking at a new language and in particular when using a language for work I've come to intentionally look at it from a "stupid, a bit pampered newbie". Simple reason: A language universe that isn't consistent (quality!), inviting, and easy to install and use is wasting its users time (modulo "wow, a new language, I'll play a bit with it" kind of users).
You see, I started in hardcore mode myself, using an editor similar to vim, frowning on "luxury", etc. But as I'm a professional I had to recognize and learn that fighting with a compiler and/or significant tools around it not only made my work-life harder but also meant wasting time. A major second factor is the fact that I get older and that the software world gets ever bigger and more complex. Besides, nowadays one usually doesn't use books to lookup details.
Maybe my current (self-set) task is a good example for why I consider a LSP important: I have to (or at least want to) work with a quite large source code base and as tools like sourcetrail are quite rare and usually don't support Nim (and many other languages) Kate's 'outline' view - which relies on LSP - is very helpful to "jump around" in said code base (KDE have some kind of visualizer in the works but a) it'll be C/C** focused and b) isn't available yet.
Let me close with a positive example: ADA + its IDE. That is the experience I'm looking for and enjoy, and also find productive. Easy to install (caveat: said from an experienced perspective, maybe less perfect for a newbie) easy and even comfortable to use, complete, good docu and good consistent quality. That said, I do not expect that from Nim, and I recognize, even appreciate that Nim is somewhat fluent, i.e. in steady development.
Finally, when I encountered a problem with a certain library I asked in their forum how to know what's just a toy or experimental or otherwise basically worthless (for actual use) and what's a serious and actually useable and working fine one. The - doubtlessly meant friendly! - statement from one of their developers to "just ask in the forum" basically was a major reason for me to leave D. I'll certainly not waste my time to collect such advice (plus, of bloody course loads of mere personal opinions) and to learn who actually knows and whose comments should be skipped.
Short version: It's OK that niimble lists tons of libs/packages/etc of very different state and quality - but it's definitely not OK to offer no way to find production quality and/or verified ones, via at least tags, vs. junk, experimental stuff etc.
A language to be usable for production can't afford to not discern between "written for my own entertainment/fun" and "written for serious use and for the community (and ideally documented and maintained)".
Thank you to all for the discussion and constructive tips.
Well Nim is not a new language...
I know, and that's why I'd expect some stable version "just working. Period", incl. "just working, period) LSP and other (nowadays) basic tools as well as a set of reasonable maintained and documented libs.
That would be Nimony for you which was designed from first principles, including incremental, parallel builds, plugins replacing macros and editor support is builtin, not as a server but as a command line tool. It's a special Lisp under the hood so that tools can be written on top of it that can be as primitive as "hack based on regex that actually works".
It's so new that it's completely unfinished (unusable?), enjoy!
Thanks, no, for the time being. I'd love to be able to enjoy working in Nim though. In fact I'm a bit worried wondering whether Nim gets the attention and love it needs, if you (I not so wildly guess) are focused on Nimony.
(And yes, of course (?) nimlsp, although installed exactly like its author describes, threw another hissy fit due to not seeing some nim.cfg in some location ...). But, good news: I finally somehow got it working.
Whatever, my trust in Nim is good enough to seriously try using it again. Thank you, A. Rumpf, and all who constructively engaged in this thread!
Well Nimony will become Nim 3.0, so I didn't really abandon Nim's development. It's just that I hope it becomes useful long before it becomes Nim 3.0...
As for your expectations, they are "just" unrealistic: You "just" want things that work:
Of course, you didn't claim all these points, but in total, that is "just" what people want and we are incompetent fools for not providing it.
that is "just" what people want and we are incompetent fools for not providing it.
I never considered you a fool! Nor, btw do I expect perfection.
The expectations are the source of your frustrations. It is as if nim is a commercial product you've paid shitload of money for, that touted all the awesome things and didn't deliver.
A typical FOSS response and, pardon me, shortsighted. I'm polite enough to not turn that nonsense around and - following your own "logic" - to not say that hence FOSS has no quality at all.
Whatever, have a nice weekend everyone.
That is some fine rigid thinking, ripe with labels and stereotypes, making you infer words and meanings from my comment that aren't there.
I don't know why you think you're entitled to something, maybe you are. But the entitlement does seem to bring you emotional distress. If you didn't cling to it, you'd be able to improve your skills and overcome the limitations of the tools you're trying to use, and maybe even improve them.