Nim compile-time

Open-source Nim projects categorized as compile-time

Top 4 Nim compile-time Projects

  • nimja

    typed and compiled template engine inspired by jinja2, twig and onionhammer/nim-templates for Nim.

  • Project mention: nimja VS happyx - a user suggested alternative | libhunt.com/r/nimja | 2023-05-24
  • Unchained

    A fully type safe, compile time only units library. (by SciNim)

  • Project mention: GNU Units | news.ycombinator.com | 2023-08-03

    Anything with a finite (200 is small even) number of units misses the algebraic structure of the problem mentioned in https://news.ycombinator.com/item?id=36988497 wherein multiplying|dividing two things gives you a (potentially) new unit which implies an open ended "space" of units.

    To be concrete (hah!), in C++ a template meta-type with 12 signed integer parameters (6 numerators & 6 denominators for rational exponents of SI base units) might be one way to model it.

    Unlike C++ template stuff, Nim macros (like Lisp macros) makes metaprogramming more like procedural programming - just against abstract syntax trees. I think that helps to shield some of this type complexity from users, but the documentation README https://github.com/SciNim/Unchained does better job than I can in an HN comment.

    Of course, for unit system conversion, the number of dimensions (6 in SI, 3 in CGS/Gaussian) changes. So, for full generality you need compile-time (if you want static type integration/CT errors) linear algebra over a rational field (at least & conventionally) to project|inverse project. That might be theoretically possible in C++. I would think it very un-fun and unlikely to ever have been done. There's probably a Mathematica package, though.

  • 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
  • jason

    JSON done right 🤦 (by disruptek)

  • nim-nimterlingua

    Internationalization at Compile Time for Nim

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020).

Nim compile-time related posts

  • Nim vs Python: json serialization performance

    3 projects | /r/nim | 27 Oct 2021

Index

What are some of the best open-source compile-time projects in Nim? This list will help you:

Project Stars
1 nimja 170
2 Unchained 106
3 jason 63
4 nim-nimterlingua 37

Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com