7 ms·
Nim Community Survey 2021 Results
- lostdog 5y agoI played with Nim a little, and it's a great language. The things that were difficult were 1) Remembering which objects were initialized with "newThing" and which needed "initThing," 2) I never quite figured out what the restrictions on writing an "iterator" are and why, and 3) It's not clear whether a uniform error/exception handling approach has been figured out. I'm also not a fan of canonicalizing variables so you can write them any way you want to, since it harms grepping and the consistency of code. Otherwise, the language was really enjoyable, and code tends to be both surprisingly terse while remaining readable, and fast to compile and run. Being able to turn the GC off is a pretty cool feature, and I love the default "result" variable in functions. Right now it feels like a "better Go," but I always watch any language that gives me hope that I will someday stop having to use C++.
- arc776 5y ago> I'm also not a fan of canonicalizing variables so you can write them any way you want to, since it harms grepping and the consistency of code. Perhaps surprisingly, the opposite is true. You can enforce a style and a library that uses another style doesn't pollute yours and mix it all over the place. There's also `nimgrep` (never needed this in >5 years on this language), or `nimpretty` to normalise styles. > someday stop having to use C++ Nim can compile to C++ so you get ABI compatibility, and control over performance should be just as fine tuned. Nim should be able to run at the same speed as C/C++ since they both offer the same level of hardware access and portability. Depending on your needs it should be possible. > code tends to be both surprisingly terse while remaining readable, and fast to compile and run. This is one of Nim's most powerful features. Easy to read productivity. Prototypes end up being good enough, and it's got the teeth when you need them. The language default is 'fast and safe', all the fancy stuff is opt in when you need it. E.g., variables are put on the stack by default, heap GC is attached to the type rather than instance (static lifetime + RC/optional cycle collector). Variables are initialised to zero, but there's `{.noInit.}`, access raw pointers but with strong typing and construct/destroy hooks, and so on. Things like this: https://nim-lang.org/docs/manual.html#pragmas-linearscanend-pragma https://nim-lang.org/docs/manual.html#pragmas-linearscanend-... and the below computed goto pragma add even more control should you need it. Then there's the god-tier metaprogramming that lets you have optimisations that would be impossibly onerous to write, let alone maintain, manually, and give them the sweetest syntax you like. Full compile time VM in the native language, and type safe AST macros. Just standard Nim code, processing syntax trees with the standard library, say, outputting a framework from some data in a file, or providing a deep learning DSL that generates code for optimised matrix operations. It's like going from 1D to 2D.
- elcritch 5y agoIt’s funny, I totally forget the name canonicalization is there. Compared to the nightmarish and completely unreadable nature of C++ template libraries it’s really a non-issue. But as @arc776 it’s actually handy for making your code based more consistent. Python was always a bit of a pain where different libraries would be either snake or camel case causing your code to have a weird mix.
- alberth 5y agoI wish so badly for there to be a Django/Rails/etc for NIM. (Yes, I'm aware of Jester/Karax be development has slowed down on those)
- melissalobos 5y agoOne of the most surprising things about the survey is that in the editors section, they didn't have anyone using QtCreator, it has had support for Nim for a few years now. It is experimental, but it has worked well for me.
- treeform 5y agoIt might have some thing to do with lower popularity of the QtCreator editor. VS Code is just very popular even for non-Nim.
- dnar2022 5y agoI use QtCreator with Nim and always mention it in surveys,even when there is no option, under Other. It's not best editor, lacks features but for command completion and syntax highlight is good.
- jiyinyiyong 5y agoNim is very attractive to a previous CoffeeScript user like me. I used it to build my own [ClojureScript clone](http://calcit-lang.org/ http://calcit-lang.org/), but finally found I really want ADT and pattern matching, which drove my to Rust. Object variants could support this need. But I was already amazed by those Haskell features.
- deleted 5y ago[deleted]
- k__ 5y agoI still wish for a Rust with Nim syntax.
- arc776 5y agoWhat things do you wish for in Nim from Rust?
- k__ 5y agoLess clutter. I like ML and Python syntax.
- arc776 5y agoThe syntax is what attracts me to Nim too. Why use Rust over Nim in this case? Is it Rust's static lifetime constraints? Is there some feature you would miss if you used Nim instead? Or would you prefer to use Rust because more organisations are using it?
- NotVerstappen 5y agoI think Nim would really take off if there was a good and actively-maintained SDK for a major cloud provider, or even for one of the larger VPS sellers.
- treeform 5y agoI don't think so. I have binding to the google cloud API https://github.com/treeform/googleapi https://github.com/treeform/googleapi (for work) and the digital ocean API https://github.com/treeform/digitalocean https://github.com/treeform/digitalocean (for personal) almost no one uses or cares about it besides me. If there was some pent up demand I would have more issues and PRs.
- arc776 5y agoThanks for making these, I actually had no idea these existed! I don't "need" them now but seeing these gives me ideas for projects and makes future things easier. I wish discovery of community libraries was higher, I'm constantly discovering libraries that do amazing things 'hidden' away. I know there's https://nimble.directory/ https://nimble.directory/ and https://github.com/xflywind/awesome-nim https://github.com/xflywind/awesome-nim but most of the time I end up using a search engine for something specific only if I think of it.
- NotVerstappen 5y agoThanks - I wasn't aware of yours, last time I looked I just found a couple of abandoned and not very user-friendly versions for AWS. I'll take a better look at the DO version specifically as I'd like something equivalent for Vultr and Hetzner.
- yawn 5y agoI picked it up and played with it. I mostly liked what I found. I do web dev and the story there is less compelling than other languages if you're looking for something more than Jester. I may be misremembering, but even though the frameworks are async (some with that atrocious "{.async.}" pragma) the db libs were not.
- mcdermott 5y agoWe can't use Nim at my organization as the binaries it generates are detected as viruses and deleted by CrowdStrike Falcon when I attempt to execute them and results in a visit from our security team. I uploaded one of my binaries to Total Virus for inspection and several AV products mark it as malicious. This was with Nim verson 1.6.2. I created an issue but it was promptly closed as there was already open 6+ month old issue about this. I know it's not the project's fault and that the AV companies need to resolve this, but if this is not resolved it's going to severely limit the viability of Nim, especially in larger companies. I want to use Nim to build tools, but can't until this is resolved.
- Guzba 5y agoIt's interesting. How does one exactly address this? If anyone knows I'm genuinely curious since this seems horrible. (Snark time) Is there someone that gets paid for protection? Maybe a "contribution" to security research efforts at one of these places? Or is there just an "I'm not a virus" flag Nim is forgetting to set.
- skymt 5y agoAV vendors have points of contact to report false positives. They don't always respond quickly, but they're not brick walls. Reliable FPs from a specific toolchain seems like something their team would be especially interested in solving. CrowdStrike's reporting point is an email address on their contact page: https://www.crowdstrike.com/contact-us/ https://www.crowdstrike.com/contact-us/
- Guzba 5y agoOk I sent an email report explaining the issue with additional info. Let's see what happens. Edit: Got a reply: > Thank you for contacting CrowdStrike’s public AV scanner team! If you have not done so yet, please upload a sample of the file in question to Hybrid Analysis at https://www.hybrid-analysis.com/ https://www.hybrid-analysis.com/. Furthermore, please make sure that your request contains the SHA256 hash of the file. I look forward to them no longer flagging one specific Nim binary produced just as an example.