this post was submitted on 31 Aug 2025
76 points (97.5% liked)

Programming

22587 readers
21 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS
 

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
(page 2) 18 comments
sorted by: hot top controversial new old
[–] insomniac_lemon@lemmy.cafe 1 points 1 week ago* (last edited 1 week ago) (1 children)

I haven't done enough to consider myself a programmer, but I could've written your post. It hits a niche that I have long wanted from programming.

You should check out the Godot 4 bindings if you haven't already (gdext-nim, see my post on !nim@programming.dev). There's also one for Raylib (specifically, Naylib).

My biggest functional gripe (that I can say for certain is not just me) was that support for (Bellard's) TCC was dropped. It was nice for quick prototyping, though Clang is a pretty efficient middleground/default.

[–] popcar2@programming.dev 1 points 1 week ago (1 children)

I have looked into the nim GDExtension and it looks nifty. I haven't tried it yet though because it might not be totally ready, some github issues make it sound like it could be a pain to work with.

load more comments (1 replies)
[–] BillyCrystalMeth@slrpnk.net 1 points 1 week ago

Never tried Nim, but I saw this on lobste.rs and thought of you: https://miguel-martin.com/blog/nim2-review

[–] ZILtoid1991@lemmy.world -1 points 1 week ago (6 children)
load more comments (6 replies)
[–] vermaterc@lemmy.ml -5 points 1 week ago (2 children)

What is your use case? Isn't memory cheap nowadays?

load more comments (2 replies)
load more comments
view more: ‹ prev next ›