Compile time evaluation in Nim, Zig, Rust and C++

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

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.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • RFCs

    A repository for your Nim proposals. (by nim-lang)

  • I say this as a fellow language developer: Nim is impressive as hell!

    I'm particularly excited about their region isolation [0]. A lot of new languages are exploring it, and it has a lot of potential to change the way we program over the next decade.

    [0] https://github.com/nim-lang/RFCs/issues/244

  • shady

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

  • You can do a lot with Nim at compile time, check out my talk on Nim Metaprogramming not just for FizzBuzz, but real world applications: https://fosdem.org/2022/schedule/event/nim_metaprogramming/

    I am working an a macro to compile Nim code into GLSL. So not only can you write Nim to C or Nim to JS, it can also (in limited way) do Nim to GLSL GPU Shaders. See here: https://github.com/treeform/shady

    I am also working on a macro system similar to SWIG, where using a some macros one can write a Nim library and generate wrappers for your NIM library for many languages like C, Python, JS, Ruby. See here: https://github.com/treeform/genny

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

    Nim wrapper for Zephyr

  • It's funny how something like Zig's comptime of C++'s constexpr get 90% of the way to solving most compile time issues, but can't knock out that last 10%. Compile time database types sound like one of those cases. F# had a feature for compile time types via "type providers". It seemed _really_ cool at first, but in practice is was a bit fragile.

    Though on the other hand I'm using compile Nim code to parse CMake files and provide static types for configuration values. It's super easy in Nim between macros and const's. Here's a ~170 lines of code where I'm compile time checking that my Nim code can compile time check against the current build configuration of Zephyr RTOS https://github.com/EmbeddedNim/nephyr/blob/main/src/zephyr_c...

  • 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).

  • The lambdas are terrible in nim, you currently have to `import sugar` for bandaid fix.

    Nim is in progress to fix them, see here: https://github.com/nim-lang/Nim/pull/11992

    I don't see why people can't admit to shortcomings in languages? I like Nim a lot, doesn't mean I'm blind to where it falls short or needs improvement...

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

  • The nim website and the downloads are insecure

    1 project | /r/nim | 11 Dec 2023
  • NIR: Nim Intermediate Representation

    1 project | /r/hackernews | 2 Oct 2023
  • Ask HN: How long does it take to find a job?

    1 project | news.ycombinator.com | 9 Aug 2023
  • Nim lang version 2 released

    1 project | news.ycombinator.com | 1 Aug 2023
  • Nim for Python Programmers

    1 project | news.ycombinator.com | 11 Jul 2023