Ask HN: Does anyone use Nim language in production?
31–40 of 86 posts
Re: Ask HN: Does anyone use Nim language in production?
#32Judging by the upvotes there is a lot of interest in hearing answers to this question and yet there are few comments so far. I will share my thoughts but keep in mind that I am (extremely) biased as I am one of the core Nim devs. > How has your experience been compared to your previous tech? Previous to using Nim I was primarily using Python. This was a few years ago now, but recently I was working on a project in Py…
Yes indeed. I for instance can not wait Kotlin-native to materialize because... Because Kotlin has a usable IDE already. Nim is a great language, although rough on the edges. Add lack of libraries or need of wrapper generation to the equation, also add lack of a decent IDE.. I am privileged enough to have liberty of picking my battles so one of my requirements for getting work done is to also feel a pleasure doing it. Writing nim code in a notepad which has some IDE features that may or may not work (auto-complete from nimsuggest is really iffy, in source code of compiler especially) is suboptimal. Add debugging experience which due to various reasons is not greatest.. It is hard to justify using Nim over c++ or python. It is a shame though because language is really nice and with some polish it could be a great alternative to already established languages. Keeping fingers crossed for some brave soul coming forward and making IntelliJ plugin for nim.
Re: Ask HN: Does anyone use Nim language in production?
#33Yes, my startup Object AI uses Nim code in production. We have in-house implementations of machine learning, computer vision & image processing code in Nim, using a library called "Nim-Pymod" to integrate with Python's Numpy: https://github.com/jboy/nim-pymod (As you can see, I was one of the authors of that library in a previous startup. We haven't worked on Nim-Pymod in a while, alas -- I've been focused on the new…
Is there any way to ensure type checking for the exposed interfaces in runtime? Let's say, exposing a function to the host language (C or Javascript) which accepts a String and then passing an integer in the host language.
Did you ever use the javascript backend? How is the experience having a shared code base among very different platforms?
How does interfacing to existing libraries look like? Any examples out there?
Does it really compile to C/C++ or just binary? If it compiles to code, then is it possible to write libraries for mobile platforms as well?
Re: Ask HN: Does anyone use Nim language in production?
#34Re: Ask HN: Does anyone use Nim language in production?
#35Judging by the upvotes there is a lot of interest in hearing answers to this question and yet there are few comments so far. I will share my thoughts but keep in mind that I am (extremely) biased as I am one of the core Nim devs. > How has your experience been compared to your previous tech? Previous to using Nim I was primarily using Python. This was a few years ago now, but recently I was working on a project in Py…
> It produces fast dependency-free binaries It does use glibc, right?
I think it's moderately flexible to what is used because it transpiles to c first (afaik?)
Re: Ask HN: Does anyone use Nim language in production?
#36Earlier quoted context omitted.
Wouldn't it have been better to just enforce one style over all nim code?
Seconded. Being able to insert an underscore and have the code still compile sounds like a strange design choice to me. dom96, could you write more on this?
It's definitely weird and I personally could take it or leave it. But don't let it dissuade you from trying the language.
The idea behind this feature is to let you choose which style you want to write code in.
Re: Ask HN: Does anyone use Nim language in production?
#37Earlier quoted context omitted.
Identifiers are "style-insensitive", so case changes and single underscore insertions don't actually change the identifier. There is exhaustive tooling such as nimgrep and ide support built into the compiler (such as find symbol at point equivalents) for helping when a convention is different. It is a strong philosophical position, but it does allow style consistency across a code base even when dealing with foreign…
Wouldn't it have been better to just enforce one style over all nim code?
Re: Ask HN: Does anyone use Nim language in production?
#38Earlier quoted context omitted.
Happy to hear that you found my answer balanced :) > What would you say are the advantages of Nim over a language like Go? I see a lot of similar "value add" statements. In all fairness I haven't given Go a proper try. But my main problems with it, based on what I've seen of it, are the following: * Lack of generics * Lack of exceptions * I prefer the Python-like syntax of Nim * Metaprogramming in Nim is fun and powe…
> Lack of exceptions Go does support multiple return values, commonly (T, error). If you think about it for a while, you will realize a exception is just a type of return value. Regarding generics, the more I used golang, the less I had a need for generics. Also, there is solutions if you insist, such as https://github.com/cheekybits/genny
Sure, and Nim supports multiple return values too. But having to handle this extra value at every function call seems like it would get old really fast. I don't want to worry about every single exception when I am prototyping for example. Also, without stack traces, how do I know where an error comes from?
> Regarding generics, the more I used golang, the less I had a need for generics. Also, there is solutions if you insist, such as https://github.com/cheekybits/genny
Indeed, like I said, I haven't used it much so perhaps I would be able to live without generics. It is still very nice that Nim offers them though.
Re: Ask HN: Does anyone use Nim language in production?
#39Earlier quoted context omitted.
Than you. I currently work in python, so your answer is relateable. What do you think is the best resource to start learning Nim? Edit: I just found from your profile, you are tha author of vim in action! I suppose that is where I start!
Edit edit: nim in action :)
Be sure to join us on IRC/Gitter as well if you have questions: https://nim-lang.org/community.html#chat-rooms
Re: Ask HN: Does anyone use Nim language in production?
#40Earlier quoted context omitted.
> It produces fast dependency-free binaries It does use glibc, right?
The little bit of nim I've done used musl rather than glibc. I think it's moderately flexible to what is used because it transpiles to c first (afaik?)