Questions tagged [nim]

Nim (formerly Nimrod) is a statically typed, imperative programming language that combines Pascal semantics with a Python-like syntax and extensive support for meta-programming.

Filter by
Sorted by
Tagged with
3 votes
1 answer
36 views

Open the best Reddit posts with Nim

I wanted to try out the Nim language so I wrote a simple program to retrieve the top \$n\$ messages on a given subreddit in a given time frame and open them in the default browser. I would really ...
user avatar
0 votes
1 answer
45 views

How to speed up truncating text to specific word count in nim?

I have a web application, as part of it I regularly have to send out "overviews" of records in a database, which contain shortened excerpts of a description-text of that record. What the ...
Philipp Doerner's user avatar
1 vote
0 answers
95 views

Transferring values from a json-string into an object-instance in nim

While writing a web application I've stumbled upon the following problem: I have a relational database. For each table with n columns I have an object-type (called ...
Philipp Doerner's user avatar
0 votes
1 answer
100 views

Implementing Database Connection Pooling

I am re-implementing a web-application, partially as a learning exercise to learn nim as well as multi-threaded programming. As part of that learning exercise, I want to implement connection pooling ...
Philipp Doerner's user avatar
2 votes
0 answers
79 views

Small language, compiles to register VM bytecode

I am trying to implement a small programming language, in Nim, as a way of improving my (close to non-existent) programming skills. The programming language is intended to have IF-GOTO, variables, and ...
LearningPython's user avatar
2 votes
1 answer
62 views

Tiny attempt at a register machine in Nim

I am attempting to learn the Nim language by making a small and simplistic register machine. It is intended to interpret some basic instructions. The entire parsing lexing process consists of ...
LearningPython's user avatar
6 votes
0 answers
51 views

Drawing a line in any direction with pixels

I am doing an image drawing and rendering library, and would like some feedback on this code, it simply draws a line in any direction. The equation for that is: m = (y2 - y1) / (x2 - x1) b = y1 - m ...
Guest's user avatar
  • 61
5 votes
2 answers
268 views

File encoder/decoder in Nim

I wrote a simple program to encode a local text file with password and decode it back. There is one text file and it is either encoded with a password or is in plain text. I had a version in Python ...
Evgeny's user avatar
  • 203
5 votes
0 answers
185 views

Ring Buffer using templates/macros

I just wrote my first Nim module and was hoping someone with some experience with Nim or similar languages could take a look. In particular I was hoping someone could speak if the use of ...
megawac's user avatar
  • 2,255
2 votes
0 answers
88 views

Wrapper for Nimrod

I am learning Nimrod and needed a few functions from libsndfile. I deviated slightly from libsndfile to use namespace and ...
j-a's user avatar
  • 591