NIR: Nim Intermediate Representation

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

Nutrient – The #1 PDF SDK Library, trusted by 10K+ developers
Other PDF SDKs promise a lot - then break. Laggy scrolling, poor mobile UX, tons of bugs, and lack of support cost you endless frustrations. Nutrient’s SDK handles billion-page workloads - so you don’t have to debug PDFs. Used by ~1 billion end users in more than 150 different countries.
www.nutrient.io
featured
CodeRabbit: AI Code Reviews for Developers
Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
coderabbit.ai
featured
  1. langserver

    The Nim language server implementation (based on nimsuggest)

    As recommended by michaelsbradley below, I installed https://github.com/nim-lang/langserver. I'm using coc.nvim (https://github.com/neoclide/coc.nvim) so I followed the instructions here from nim langserver https://github.com/nim-lang/langserver#vimneovim and seems to be working well!

  2. Nutrient

    Nutrient – The #1 PDF SDK Library, trusted by 10K+ developers. Other PDF SDKs promise a lot - then break. Laggy scrolling, poor mobile UX, tons of bugs, and lack of support cost you endless frustrations. Nutrient’s SDK handles billion-page workloads - so you don’t have to debug PDFs. Used by ~1 billion end users in more than 150 different countries.

    Nutrient logo
  3. 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).

  4. vscode-nim

    You may fare better hooking VSCode to nimlangserver:

    https://github.com/saem/vscode-nim#nim-lanugage-server-integ...

  5. platonic

    > Ya I don't think this is a good definition of dependent type - the prototypical example of a dependent type is a k-length vector.

    Yah that's why I qualified my statement as dependent type like setup as I don't know a good definition of dependent types which I really grok and I've only briefly dabbled in it. It'd be awesome if you could point out a good resource showing a clear example / simple proof.

    Well I started working on statically typed vector concepts [1]. The compiler can't do `proc concat[N,M: static int](v1: Vector[N], v2: Vector[M}): Vector[N+M]` and it fails. It might be able to be implemented via a macro like `proc concat(v1: Vector[N], v2: Vector[M}): typeFromSumOf(N,M)`, but I haven't tried yet.

    Also just using static ints would require specific values at some point to work I think. Whereas you'd really want "induction" of some sort. Maybe a SAT solver would be required at that point? There's DrNim [2] which does tie Z3 but it's sorta dormant.

    > Um yes this is literally what I was asking with respect to top ⊤.

    Ah, I didn't know what you meant by top T.

    > ya the negation is interesting - I wonder how it's implemented.

    Nim's VM runs from Nim AST, so probably running it as a VM expression.

    1: https://github.com/elcritch/platonic

  6. nimscripter

    Quick and easy Nim <-> Nimscript interop

    > What does this mean? There's a runtime VM or compile time VM?

    Compile time VM. It's used to run macros / templates / concepts. You can also run most code at compile time in a `static` block except for stuff that needs C calls. You can also compile the VM into a program and use it as a runtime VM (see https://github.com/beef331/nimscripter) which I do in my GUI lib. NIR should enable the compile time VM to run faster too, and possibly use JIT'ed code.

  7. nimlsp

    Language Server Protocol implementation for Nim

    Downloading https://github.com/PMunch/nimlsp using git

  8. coc-ccls

    CCLS (C/C++) extension for coc.nvim

    As recommended by michaelsbradley below, I installed https://github.com/nim-lang/langserver. I'm using coc.nvim (https://github.com/neoclide/coc.nvim) so I followed the instructions here from nim langserver https://github.com/nim-lang/langserver#vimneovim and seems to be working well!

  9. CodeRabbit

    CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.

    CodeRabbit logo
  10. cps

    Continuation-Passing Style for Nim 🔗

    There has been a more-or-less working CPS implementation for Nim for a few years now,

    https://github.com/nim-works/cps

    https://github.com/nim-works/cps/tree/master/docs

    Nobody seems to care though, as it has gained no traction at all and it has been mostly ignored by the core team.

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

Did you know that Nim is
the 47th most popular programming language
based on number of references?