Ask HN: Does anyone use Nim language in production?
Yes, my startup Object AI uses Nim code in production.  We have in-house implementations of machine learning, computer vision &amp; image processing code in Nim, using a library called &quot;Nim-Pymod&quot; to integrate with Python&#x27;s Numpy: <a href="https:&#x2F;&#x2F;github.com&#x2F;jboy&#x2F;nim-pymod" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;jboy&#x2F;nim-pymod</a><p>(As you can see, I was one of the authors of that library in a previous startup.  We haven&#x27;t worked on Nim-Pymod in a while, alas -- I&#x27;ve been focused on the new startup! -- but Nim-Pymod is sufficient for our needs right now.)<p>Our webserver main-loops are in Python; our number-crunching ML&#x2F;CV&#x2F;img-proc code is Python extension modules written in Nim.<p>As a C++ &amp; Python programmer, I&#x27;m a huge fan of Nim, which to me combines the best of both languages (such as Python&#x27;s clear, concise syntax &amp; built-in collection types, with C++&#x27;s powerful generics &amp; zero-cost abstractions), with some treats from other languages mixed in (such as Lisp-like macros and some Ruby-like syntax).  I find Nim much more readable than C or C++, especially for Numpy integration.  I also find Nim much more efficient to code in than C or C++ (in terms of programmer time).<p>And Nim is a very extensible language, which enables Nim-Pymod to be more than just a wrapper.  For example:<p>1. Nim-Pymod uses Nim macros (which are like optionally-typed Lisp macros rather than text-munging C preprocessor macros) to auto-generate the C boilerplate functions around our Nim code to create Python extension modules.<p>2. Nim-Pymod provides statically-typed C++-like iterators to access the Numpy arrays; these iterators include automatic inline checks to catch the usual subtle array-access errors.  Nim macros are themselves Nim code, which can be controlled via globals, which in turn can be set by compiler directives; by compiling the Nim code in &quot;production&quot; mode rather than &quot;debug&quot; mode after testing, we can switch off the slowest of these checks to get back to direct-access speed without needing to make any code changes.  (And of course Nim&#x27;s static typing catches type errors at compilation time regardless of the compilation mode.)<p>3. Nim exceptions have an informative stack trace like Python exceptions do, and Nim-Pymod converts Nim exceptions into Python exceptions at the interface, preserving the stack trace, meaning you have a Python stack trace all the way back to the exact location in your Nim code.<p>Earlier on in our development of Nim-Pymod, there were some occasional headaches with Nim due to its in-development status.  Occasionally the Nim syntax would change slightly and that would break our code (boo).  We&#x27;ve also debugged a few problems in the Nim standard library.  I suppose these problems are an unfortunate consequence of Nim having a small set of core devs contributing their time (rather than being supported by Microsoft, Sun, Google or Mozilla).  Fortunately, these problems seem to have stabilised by now.<p>The Nim standard library is reasonably large, somewhere between C++ STL (data structures &amp; algos) &amp; Python stdlib (task-specific functionality).  I recall that the stdlib could use some standardisation for uniformity, but I haven&#x27;t been watching it closely for the last year or so.<p>Third party libraries are not abundant, aside from a handful of prolific Nim community-members who have produced dozens of fantastic libraries (eg, <a href="https:&#x2F;&#x2F;github.com&#x2F;def-" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;def-</a> , <a href="https:&#x2F;&#x2F;github.com&#x2F;dom96" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;dom96</a> , <a href="https:&#x2F;&#x2F;github.com&#x2F;fowlmouth" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;fowlmouth</a> , <a href="https:&#x2F;&#x2F;github.com&#x2F;yglukhov" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;yglukhov</a> ).<p>I&#x27;m happy to answer any other questions about using Nim in production!