[HN Gopher] I enjoy using the Nim programming language at Reddit
___________________________________________________________________
I enjoy using the Nim programming language at Reddit
Author : Guzba
Score : 37 points
Date : 2022-11-14 20:41 UTC (2 hours ago)
(HTM) web link (old.reddit.com)
(TXT) w3m dump (old.reddit.com)
| rlipsc wrote:
| 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 worries:
| https://github.com/PMunch/ratel.
|
| Want to use Unreal? Sure: https://github.com/jmgomez/NimForUE.
|
| Want to target the web? Native React support with
| https://github.com/andreaferretti/react.nim or web apps with
| https://github.com/karaxnim/karax.
|
| The list goes on! https://github.com/nim-lang/Nim/wiki/Curated-
| Packages
|
| But, what if you want to use that battle tested C++ library? Nim
| can compile to C++ so you have native ABI FFI!
|
| There's also a lot to be said for automation with AST macros. The
| language is built around them, they're not just a tacked on after
| thought. As a result, it's very easy to do everything from
| removing boilerplate copy pasta errors to creating mini languages
| or even generating APIs from data. This can give you new
| paradigms in approaching solutions for things that are quite
| painful in other languages.
|
| I feel like this language could be a weapon of mass production
| for many businesses once they dip their toes in!
| michal_f wrote:
| Nim is interresting. Its easy to read (and write) about pros. But
| what are cons?
| treeform wrote:
| 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 and minor changes to
| the code make it fast again.
|
| * Relying on OpenSSL especially v3 especially on windows is a
| big problem, but thats more on openSSL i think. I actually
| wrote a library around this that uses platforms HTTP/SSL
| instead: https://github.com/treeform/puppy
|
| * Not having HTTP gzip support in standard library. You can
| always work around with zippy though:
| https://github.com/guzba/zippy
|
| * async stack traces are really hard to read.
|
| * not enough docs around the different ways to do threading.
| There is no one solution some times you want a quick thing,
| some times you are doing CPU tasks other times you are doing
| network tasks (where async is better). But many big languages
| struggle here, there is no one fits all threading solution.
|
| It's definitely not style case insensitivity which everyone
| loves to bike-shed about.
| vanyle wrote:
| 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.
___________________________________________________________________
(page generated 2022-11-14 23:02 UTC)