this post was submitted on 31 Aug 2025
78 points (97.6% liked)

Programming

22529 readers
221 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
you are viewing a single comment's thread
view the rest of the comments
[–] insomniac_lemon@lemmy.cafe 1 points 5 days ago* (last edited 5 days 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 5 days 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.

[–] insomniac_lemon@lemmy.cafe 2 points 5 days ago

I dunno, do you think it's too rough for prototypes or jam-like games?

Seems to me like many of the issues are likely specific, workaround-able stuff. It's mainly developed by 1 person, so pretty much any type of involvement (even posting issues or showing off projects) could help improve the future of the project.

In some cases you can keep your logic in its own file and not dependent on any engine. For instance I made a (non-game) software demo (number converter) for the 3.X bindings and then easily redid the GUI and rewired it for the 4.X bindings. (similarly I made a polygon-from-text-format parser for Naylib, I could transfer it but Godot has polygon editing so less need there)