I’ve been researching programming languages to find a good, high level language that compiles to a single binary that is preferably pretty small. After tons of research, I landed on Nim and used it to make a quick txt parser for a project I’m doing.

Nim seems absolutely fantastic. Despite being sold as a systems programming language, it feels like Python without any of its drawbacks (it’s fast, statically typed, etc.) - and the text parser I made is only a 50kb binary!

Has anyone here tried Nim? What’s your experience with it? Are there any hidden downsides aside from being kinda unpopular?


Bonus: I want to give a shoutout to how easy it is to open a text file and parse it line-by-line in this language. Look at how simple and elegant this syntax is:

import os

if paramCount() == 0:
  quit("No file given as argument", 1)

let filepath = paramStr(1)

if not fileExists(filepath):
  quit("File not found: " & filepath, 1)

for line in lines(filepath):
  echo line
  • FizzyOrange@programming.dev
    link
    fedilink
    arrow-up
    4
    arrow-down
    1
    ·
    2 days ago

    Rust is fairly well known for not having footguns (except async Rust at least) and for not being a headache.

    I guess it can be more complex than something like Python or Typescript though. I would say that extra complexity is not a big deal compared to the pain you’ll have to deal with working with a language as niche as Nim though.

        • TehPers@beehaw.org
          link
          fedilink
          English
          arrow-up
          2
          ·
          2 days ago

          uv is love. uv is life.

          I’m still trying to get people at work to use it. It’s one of the few tools out there that takes Python from intolerable spaghetti to readable and maintainable.

            • TehPers@beehaw.org
              link
              fedilink
              English
              arrow-up
              1
              ·
              2 days ago

              conda isn’t much of an alternative to pip. It’s more of an alternative to venv. Unless you’re referring to conda’s dependency management, which I’ve admittedly never used.

              And until pip uninstall foo uninstalls unused transitive dependencies too, you’ll have to drag me back.