[HN Gopher] Nim Community Survey 2021 Results
___________________________________________________________________
Nim Community Survey 2021 Results
Author : WithinReason
Score : 64 points
Date : 2022-01-14 15:31 UTC (7 hours ago)
(HTM) web link (nim-lang.org)
(TXT) w3m dump (nim-lang.org)
| lostdog wrote:
| I 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 wrote:
| > 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-... 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.
| yawn wrote:
| I 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 wrote:
| We 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.
| ensignavenger wrote:
| Alternatively, you could tell the security team it is a false
| positive, and they can, mark it and report it as such to their
| vendor. Or the company could stop using a defective security
| tool.
| Guzba wrote:
| It'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 wrote:
| AV 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/
| Guzba wrote:
| Ok 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/. 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.
| melony wrote:
| Try adding debug symbols or make a fatter binary. Nim (and to
| a lesser extent Zig) has an emphasis on producing tiny
| binaries. I suspect some of the same optimization outputs
| matches the signatures of malware (which often is written in
| heavily optimised code).
| Guzba wrote:
| I realize you are trying to help, but I find this to be a
| very depressing suggestion. "Make things worse".
| Fortunately I do not need to care about people captured by
| these anti-virus cartel members so I will not do this.
| treeform wrote:
| I don't think there is anything for Nim people todo. Anti virus
| companies run a very simple algorithm, they flag everything
| they have not seen before...
|
| At this point anti virus companies are the virus, slowing down
| peoples computers, mining bitcoin, false advertising, hard to
| cancel payments etc...
| jiyinyiyong wrote:
| Nim is very attractive to a previous CoffeeScript user like me. I
| used it to build my own [ClojureScript clone](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.
| k__ wrote:
| I still wish for a Rust with Nim syntax.
| arc776 wrote:
| What things do you wish for in Nim from Rust?
| odiroot wrote:
| Same here, Rust and/or Golang with a Nim syntax would be my
| favourite.
| The_rationalist wrote:
| scala 3 is much more than this and has a modern syntax
| https://docs.scala-
| lang.org/scala3/guides/migration/tooling-...
| ewuhic wrote:
| I wish for Nim with Rust syntax AND ecosystem.
| WithinReason wrote:
| ADT and pattern matching:
|
| https://news.ycombinator.com/item?id=18560497
| [deleted]
| vosper wrote:
| > Nim is very attractive to a previous CoffeeScript user like
| me
|
| Is modern JS attractive to you as a previous CoffeeScript user?
| A think a lot of why CoffeeScript died is that they brought the
| big features into JS.
| haolez wrote:
| CoffeeScript's syntax make a lot more sense than ES6, and
| CoffeeScript 2 compiles down to ES6 primitives. It's a shame
| that it's usage is pretty low in the industry.
| The_rationalist wrote:
| > I really want ADT and pattern matching I feel like many
| people go to the Rust bandwagon for the wrong reasons while
| mosts would benefit more from a higher level and more
| expressive language such as scala 3
| NotVerstappen wrote:
| I 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 wrote:
| I don't think so. I have binding to the google cloud API
| https://github.com/treeform/googleapi (for work) and the
| digital ocean API 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.
| NotVerstappen wrote:
| Thanks - 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.
| arc776 wrote:
| Thanks 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/ and
| 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.
| melissalobos wrote:
| One 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 wrote:
| It might have some thing to do with lower popularity of the
| QtCreator editor. VS Code is just very popular even for non-
| Nim.
| dnar2022 wrote:
| I 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.
| alberth wrote:
| I 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)
___________________________________________________________________
(page generated 2022-01-14 23:01 UTC)