Why I enjoy using the Nim programming language at Reddit.

This page summarizes the projects mentioned and recommended in the original post on /r/RedditEng

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • glfm

    Wrapper of GLFM (OpenGL ES and input for iOS and Android) library for Nim.

  • Cross-platform usually gets you the standard Windows / Linux / macOS, however Nim does not stop there. Nim can even run on mobile iOS and Android and has two different modes for the web - plain JavaScript or WASM.

  • nim_emscripten_tutorial

    Nim emscripten tutorial.

  • Cross-platform usually gets you the standard Windows / Linux / macOS, however Nim does not stop there. Nim can even run on mobile iOS and Android and has two different modes for the web - plain JavaScript or WASM.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • shady

    Nim to GPU shader language compiler and supporting utilities. (by treeform)

  • This includes the GPU! Yep, that’s right. You can write shaders in Nim. This makes shader code much easier to write because you can debug it on the CPU and run it on the GPU. Being able to run the shader on CPU means print statements and unit tests are totally doable.

  • jsony

    A loose, direct to object json parser with hooks.

  • One of the fastest things I have written in Nim is a JSON parsing library. Why is it fast? Well, it uses Nim’s metaprogramming to parse JSON directly into typed objects without any intermediate representations or any unnecessary memory allocations. This means I can skip parsing JSON into a dictionary representation and then converting from the dictionaries to the real typed objects.

  • Panda3D

    Powerful, mature open-source cross-platform game engine for Python and C++, developed by Disney and CMU

  • I used to be a huge Python fan. After working with Python for many years though, I started to get annoyed with more and more things. For example, I wanted to make games with Python and even contributed to Panda3D, but Python is a very slow language and games need to be fast. Then, when making websites, typos in rarely run and tested code like exception handlers would crash in production. Python also does not help with large refactors. Every function is ok with taking anything so the only way to find out if code does not work is to run the code and write more tests. This got old fast.

  • pixie

    Full-featured 2d graphics library for Nim. (by treeform)

  • With Nim, you can continuously optimize and improve the hot spots in your code. For example, in the Pixie graphics library, path filling started with floating point code, switched to floating point SIMD, then to 16-bit integer SIMD. Finally, this SIMD was written for both x86 and ARM.

  • supersnappy

    Dependency-free and performant Nim Snappy implementation.

  • Another example of Nim being really fast is the supersnappy library. This library benchmarks faster than Google’s C or C++ Snappy implementation.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • Nim

    Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority).

  • Hey, I am Andre and I work on internal analytics and data tools here at Reddit. I have worked at Reddit for five years and have used Nim nearly every day during that time. The internal data tool I am working on is written primarily in Nim. I have developed a tiny but powerful data querying language similar to SQL but that is way easier to use for non technical people. I also have written my own visualizations library that supports a variety of charts, graphs, funnels and word clouds. Everything is wrapped with a custom reactive UI layer that uses websockets to communicate with the cluster of data processing nodes on the backend. Everything is 100% Nim. I really enjoy working with Nim and have become a Nim fanatic.

  • Snappy

    A fast compressor/decompressor

  • Another example of Nim being really fast is the supersnappy library. This library benchmarks faster than Google’s C or C++ Snappy implementation.

  • zippy

    Pure Nim implementation of deflate, zlib, gzip and zip.

  • One last example of Nim’s performance is taking a look at zlib. It has been around for so long and is used everywhere. It has to be as fast as possible, right? After all it uses SIMD and is very tight and battle test code. Well, then the Zippy library gets written in Nim and mostly beats or ties with zlib!

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts