Live data from Hacker News

A Programming Language Underdog

totallywearingpants.com

41–50 of 238 posts

Re: A Programming Language Underdog

#41
post #12
post #5

Earlier quoted context omitted.

This might sound strange but Nim is good for everything. From writing backend services to creating web apps running on the client side. I've built emulators, CLI apps, a full blown forum and much more in it. It's particularly great for systems programming tasks that require high performance and zero dependencies. For example, Status is currently writing an Ethereum 2.0 sharding client for resource-restricted devices[…

Interesting claim. For me, D has the best C++ interoperability. Small test which D failed: Create a std::vector in Nim. Create some Foo objects and append them. Pass the vector to C++, create some Foo objects there and append them as well.

I think this is possible. I'm boarding a flight right now but I'll try to get back to you with an example later :)

Re: A Programming Language Underdog

#42
post #24

I find the framing of “no big backers” kind of weird, considering they do have one big backer in a crypto currency startup that is providing the overwhelming majority of its funding. Sure it’s not the big coffers of Google, but it’s concerning that the entire language seemingly depends on the fates and desires of an incredibly volatile field. https://nim-lang.org/sponsors.html

A total investment of $19k probably doesn't qualify as a "big backer" when comparing to things like swift and typescript.

Re: A Programming Language Underdog

#44
post #34
post #5

Earlier quoted context omitted.

This might sound strange but Nim is good for everything. From writing backend services to creating web apps running on the client side. I've built emulators, CLI apps, a full blown forum and much more in it. It's particularly great for systems programming tasks that require high performance and zero dependencies. For example, Status is currently writing an Ethereum 2.0 sharding client for resource-restricted devices[…

Is it the best? I read Rust is basically a safer drop-in replacement for C.

Learning rust is difficult, and takes time. It's debatable whether it's worth it, but a learning a new paradigm (automatic memory management via borrow checking) hardly qualifies as a drop in replacement if you don't know how to use it already.

Re: A Programming Language Underdog

#45

I read the article. Still no idea what Nim is good for and why it's better than some other language.. and for which use cases?

A year ago I've started experimenting with Nim as a "faster Python" — put some declarations, change some keywords and you're ready to go — your "compiled Python" is now ~30x faster.

Recently I've used Nim for the first time for an official project at my job (at university). Instead of doing a simulation with Python+Numpy, I've decided to do it with Nim, and just plot the results with matplotlib. The whole experience was very pleasant.

Speaking of interoperability with Python, there is a great Nim library called Nimpy [0], which makes possible to use Nim as a more pleasant Cython — you can keep writing Python, and just use Nim for the intensive/slow stuff.

[0] https://github.com/yglukhov/nimpy

Re: A Programming Language Underdog

#46

Earlier quoted context omitted.

It has no algebraic data types and pattern matching.

Someone wrote pattern matching as a macro - nim is pretty powerful.

Do you have a reference for that immediately to hand, or should I search for it ...

Re: A Programming Language Underdog

#47
Interesting!

Minus: yet another proprietary package manager, bypassing the operating system's software management subsystem (operational maintainability)

Plus: finally a language which compiles to binary executable machine code.

Plus: transpiles to multiple "backend" languages (but transpilers incur a performance penalty).

Plus: can link with shared object libraries, thus having instantaneous integration choices with an enormous corpus of existing software.

Plus: can turn off garbage collection, which is ideal for command line programs designed to be chained with the shell pipe mechanism.

Re: A Programming Language Underdog

#49
post #24

I find the framing of “no big backers” kind of weird, considering they do have one big backer in a crypto currency startup that is providing the overwhelming majority of its funding. Sure it’s not the big coffers of Google, but it’s concerning that the entire language seemingly depends on the fates and desires of an incredibly volatile field. https://nim-lang.org/sponsors.html

It is not only that the companies pushing those languages have lots of money, it's that they already have lots of users. Often, they publish their language as if it were an "upgrade" from what they were already using, with an even greater chance of success if it is compatible with existing ecosystem.

On the other hand, a language like Nim is starting from scratch. They don't have a specific target audience. There is so much competition in that crowded space that languages which are roughly on par in features and use similar paradigms are fighting for the attention of the geeks who would actually take the time to look, rather than it being bestowed upon them by the people already providing their tools.

Languages are not general purpose in the truest sense. They have their own little ecosystems where they're expected to be used and their proponents are often bubbled in that ecosystem. It's easier to migrate to a new language in your ecosystem than to move to a new ecosystem. Someone just hoping to solve a specific task will pick the tool that has an established history of being practical in that domain and won't take risks with new languages.

Anyway, language choice is often about what's fashionable than what's worthwhile. Did we get stuck with Javascript because of it's superior features or big company backing it? People want to learn whatever is de rigueur, often to improve their job prospects. Does having Nim on your resume give you an edge?

Personally, I've looked at Nim and find it interesting, but not novel enough that I feel I need to use it. What are the killer features that only Nim provides and you feel you can't do without them after using it?

Post reply on HN