Live data from Hacker News

I enjoy using the Nim programming language at Reddit

old.reddit.com

11–20 of 22 posts

Re: I enjoy using the Nim programming language at Reddit

#11
post #5
post #4

Earlier quoted context omitted.

Nothing is without the cons. I would say: * Libraries: there is no NPM ecosystem to get anything you need. * Stack-overflow: If you looking for a aswers there might not be anyone who encounters it before. You might have to dig really deep to find some thing. * Some times you might run into a compiler bug usually related with performance of the generated code. Like it generates correct code bug it's slow for no reason…

For the ecosystem, https://nimble.directory/ is listing quite a few packages. It's still nowhere near the size of the JavaScript ecosystem, but it's a good start.

Unlike JavaScript libraries, Nim libraries seem to be a lot more sane and self contained. No left-pad nonsense or downloading 20 dependences.

Re: I enjoy using the Nim programming language at Reddit

#12
post #2

It's great to hear Nim in production stories! > I feel like Nim made me fall in love with programming again. Same. It's just so frictionless and productive , and you know your code will run on basically any platform in a nice, efficient, self contained executable. For me it's a language of sensible defaults. Speed and safety first, and opt-in machine level control. Want to target that obscure microcontroller? No worr…

It's less that "Reddit uses NIM" but rather one guy at Reddit uses NIM to do work. I see tech debt on the horizon.

Re: I enjoy using the Nim programming language at Reddit

#13
It's cool to read that treeform is using Nim at reddit (and helps explain why he's so prolific!). I see the same question sometimes asked "what is Nim's killer feature", "what is Nim better at than other languages" and the answer given is usually "there is no killer feature, Nim is great at lots of stuff!". But I would argue Nim's killer feature is pragmatism. I think it's the most pragmatic language I've come across.

I love that I feel like I'm writing a cross between a dynamic scripting language and a functional language, but that nothing is off limits. I can still dive into memory management if I want to, yet I'm not forced to deal with a cliff of complexity up front. I'd be happy to choose Nim for command line tools, server code, or games and I can't think of another language where this is the case for me.

I've started writing some small internal tools in Nim for work. The language is approachable for other devs who "aren't into languages" to pick up if needed, but I can also share binaries with them so they can just use the tools without needing to set up an env.

Re: I enjoy using the Nim programming language at Reddit

#14

What really seems to characterize Nim is its ability to be used as glue language between different codes. C/C++/objective-c/javascript interoperability is native, python interoperability seems to be pretty good. It makes me think a lot to python before it exploded in popularity with machine learning and education

Yeah definitely. Unlike Python though it's fast and light on memory, so once you have a prototype it's often already performant enough to be developed into a final product. Things like that save a lot of time and money in the long run.

Re: I enjoy using the Nim programming language at Reddit

#15
post #2

It's great to hear Nim in production stories! > I feel like Nim made me fall in love with programming again. Same. It's just so frictionless and productive , and you know your code will run on basically any platform in a nice, efficient, self contained executable. For me it's a language of sensible defaults. Speed and safety first, and opt-in machine level control. Want to target that obscure microcontroller? No worr…

It's less that "Reddit uses NIM" but rather one guy at Reddit uses NIM to do work. I see tech debt on the horizon.

> It's less that "Reddit uses NIM" but rather one guy at Reddit uses NIM to do work.

They are the same thing. No one is saying Reddit bases their entire infrastructure on Nim. The point is just that the language is being successfully used in a business context.

This might not be important to you if you're not a user of the language, but for people that are, it is significant for two reasons: 1) it shows it's 'good enough' to do analytics & data processing for a large, data heavy company and 2) creates confidence/proof it can be used in a business context.

As for technical debt, I doubt that's the case. The post mentions internal tools and processing, these kind of things are often not subject to high developer churn.

Besides, Nim has a pretty easy to read syntax that's similar to Python. People who have talked about onboarding developers to the language (such as https://youtu.be/5wljNaPkU7M?t=586) say it has been fairly straightforward to train for if desired.

Re: I enjoy using the Nim programming language at Reddit

#16
post #4
post #3

Nim is interresting. Its easy to read (and write) about pros. But what are cons?

Nothing is without the cons. I would say: * Libraries: there is no NPM ecosystem to get anything you need. * Stack-overflow: If you looking for a aswers there might not be anyone who encounters it before. You might have to dig really deep to find some thing. * Some times you might run into a compiler bug usually related with performance of the generated code. Like it generates correct code bug it's slow for no reason…

Note the async stack traces have gotten better recently! They mostly report like other stack traces now. I actually forgot I was using async for a bit. Theres still some bugs I think.

Re: I enjoy using the Nim programming language at Reddit

#17
post #9

What really seems to characterize Nim is its ability to be used as glue language between different codes. C/C++/objective-c/javascript interoperability is native, python interoperability seems to be pretty good. It makes me think a lot to python before it exploded in popularity with machine learning and education

I started using python around 2005 and Nim does have that feel of early python. Nothing was set in stone and the fields were open. Lots of optimism.

No post body was provided.

Re: I enjoy using the Nim programming language at Reddit

#18

It's cool to read that treeform is using Nim at reddit (and helps explain why he's so prolific!). I see the same question sometimes asked "what is Nim's killer feature", "what is Nim better at than other languages" and the answer given is usually "there is no killer feature, Nim is great at lots of stuff!". But I would argue Nim's killer feature is pragmatism. I think it's the most pragmatic language I've come across…

I hope I won't start yet another flamewar.. Have you tried D?

It's also a language I'd call pragmatic.

Re: I enjoy using the Nim programming language at Reddit

#19
post #4
post #3

Nim is interresting. Its easy to read (and write) about pros. But what are cons?

Nothing is without the cons. I would say: * Libraries: there is no NPM ecosystem to get anything you need. * Stack-overflow: If you looking for a aswers there might not be anyone who encounters it before. You might have to dig really deep to find some thing. * Some times you might run into a compiler bug usually related with performance of the generated code. Like it generates correct code bug it's slow for no reason…

> there is no NPM ecosystem

That's a pro, not a con!

Re: I enjoy using the Nim programming language at Reddit

#20
post #3

Nim is interresting. Its easy to read (and write) about pros. But what are cons?

A lot of the cons are a matter of personal taste, such as the whitespaced block (like python), or the weird variable case management (only the case of the first letter is case sensitive and the variable are underscore insensitive). The biggest objective cons are the small community, and possibly for some people the usage of a GC The GC can be not used but I don't know if it's really practical since it's not something…

So memory safety is a cons point now?
Post reply on HN