Live data from Hacker News

Nim: Scripting Ease in a Compiled Language

junglecoder.com

51–60 of 169 posts

Re: Nim: Scripting Ease in a Compiled Language

#51

What're compile times like?

Do you mean compile times for Nim or a project? It's accurate to test it yourself since it's free.

Projects of any note are notoriously hard to test for yourself since they often use build systems. Golang is nice in this respect, pretty easy and fast.

Re: Nim: Scripting Ease in a Compiled Language

#52
post #3

Is there anyone using Nim either in side projects or in production that can comment on how they like it? I keep hearing about Nim and it sounds interesting, but I'm not sure I have the mental capacity right now to do a deep dive into the language and build something with it. I'd like to at some point soon though.

I use Nim in production. I been using it for more than 1 year in production. I like it. For me, it started out as a faster python that prevents typos. But it has really grown on me. I really like that I can share libs on server (compiling to c) and client side (compiling to plain javascript). Basically any C library is also a Nim library with a tiny wrapper. That's a huge ecosystem! I also like how Nim can integrate…

ditto! docker and kubernetes are solutions to problems that shouldn't be there in the first place!

Re: Nim: Scripting Ease in a Compiled Language

#53
post #48

You know the language has potential when the top comments on HN are all about syntax. To generate more talking points, somebody ought to write an inverse of dumpLisp: https://nim-lang.org/docs/macros.html#dumpLisp.m%2Cuntyped

I am confused if you this is an honest opinion or if you are saying with a touch of sarcasm. If it is the latter, a winking smiley or "" or "/s" would have been nice to avoid triggering Poe's Law.

In my honest opinion, discussion on syntax is a distraction. One of the reasons I like Lisp/Clojure is that there is very little syntax. I can just focus on my problem and writing good code.

Re: Nim: Scripting Ease in a Compiled Language

#54

One thing I find annoying about Nim is the case insensitivity [0]. There was no strong reason for this "feature" and literally no mainstream language does it. Moreover it makes code search a pain. [0] https://nim-lang.org/docs/manual.html#lexical-analysis-ident...

VB.net is case-insensitive, and probably more popular than you think[1]. I think that case insensitivity actually does make sense when working with symbolic identifiers. I've seen justifications for "Foo" and "foo" being distinct symbols; personally, I find that playing with casing like that reduces my ability to read code quickly. Case insensitivity does have its downsides, but usually it's not as noticeable in VB.n…

With a tool which removes case inconsistency, it's almost like a language which is case-sensitive.

Re: Nim: Scripting Ease in a Compiled Language

#55

Looks cool already but is it easy to cross-compile? I can copy a Python script from my Linux machine and run it on both Mac and Windows PCs. Can Nim build executables for other platforms nearly as easy?

cross-compiling to ARM embedded was surprisingly simple

Re: Nim: Scripting Ease in a Compiled Language

#56

How do data scientists feel about Nim? It feels very pythony, but way faster - could be a really cool language for them, similar to what Julia is trying to be. Curious if anyone in a DS role has tried it out. I'm certainly tempted to try it out, I'm sure I'm losing lots of performance in parts of my analytics pipeline due to Python being garbage slow.

Nim is used by leading data scientists. Eg.: https://github.com/mratsim/Arraymancer

Re: Nim: Scripting Ease in a Compiled Language

#57
post #47

How do data scientists feel about Nim? It feels very pythony, but way faster - could be a really cool language for them, similar to what Julia is trying to be. Curious if anyone in a DS role has tried it out. I'm certainly tempted to try it out, I'm sure I'm losing lots of performance in parts of my analytics pipeline due to Python being garbage slow.

The options in python to speed up your code are vast without really having to do much, on a fundamental level. My outdated experience with Nimrod told me that it was a tad too opinionated E.g. Everything is a string in dbs is mentioned in the article. It was an interesting language, for me it felt like a stepping stone to something better. But the docs were really bad,

"Nimrod" experience is quite outdated. There have been great improvements in documentation in the last year.

Re: Nim: Scripting Ease in a Compiled Language

#58

Is Nim stable? I have vague memories that some parts of its runtime had some deep issues that weren't yet resolved, like maybe around concurrency? I see the language is at 1.0 now, does it have a stable, solid, dependable implementation and runtime?

I don't have vague memories. I use it everyday on production code on server and embedded. I find it stable, solid, dependable.

Re: Nim: Scripting Ease in a Compiled Language

#59
Author of the article here, feel free to ask me anything if you're wanting to understand something about the article, or about Nim. I am not the author of Nim.

I also want to point out that Nim does have an IRC channel (#nim) on freenode, which was helpful for understanding some of these things.

Re: Nim: Scripting Ease in a Compiled Language

#60

What're compile times like?

For me, I'm seeing compile times averaging around 5-10 seconds, with outlier builds taking up to 40 seconds if the files in question aren't cached.

It feels faster than Go, but I think part of that is down to Nim's compile output being verbose by default.

Post reply on HN