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
  • Joker@piefed.social
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 day ago

    The point is it’s a dumb, old argument that apparently hasn’t affected adoption of the language. Python is immensely useful and significant whitespace is a big, fat nothingburger. It’s just silly to still be debating it after all these years. The time for that was like 30 years ago.

    • hornywarthogfart@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      1
      ·
      17 hours ago

      Yeah, it’s like going to a restaurant and only judging the food by the restaurant’s decor. It is arguing something that doesn’t matter and most people get over it after they’ve worked in a number of languages.

      It just doesn’t matter and instead adds noise to the language feedback loop for something that isn’t changing and isn’t a problem to begin with.