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
0 votes
1 answer
21 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 ...
user avatar
1 vote
0 answers
29 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 ...
user avatar
0 votes
0 answers
14 views

Compile Time check for validity of given field name

I am writing a web application and for those purposes I use an ORM called "norm". Norm allows you to write object types that represent tables in your database. E.g. this: ...
user avatar
0 votes
1 answer
47 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 ...
user avatar
2 votes
0 answers
64 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 ...
user avatar
2 votes
1 answer
51 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 ...
user avatar
6 votes
0 answers
43 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 ...
user avatar
  • 61
5 votes
2 answers
187 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 ...
user avatar
  • 203
5 votes
0 answers
170 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 ...
user avatar
  • 2,255
2 votes
0 answers
84 views

Wrapper for Nimrod

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