What is a RollingFileLogger

2022-12-26 Thread forcefaction
There is the `logrotate` tool on many *nix systems and i think the RollingFIleLogger is supposed to mimick some of it's functionality. What it does is explained in detail in `man logrotate`. The purpose is, as Cnerd says, to periodically check the current log file and `rotate` to a new one if ce

How to make variables declared inside static blocks available?

2022-12-24 Thread forcefaction
Many thanks :) I didn't realize i can use a `static` block as an expression.

How to make variables declared inside static blocks available?

2022-12-24 Thread forcefaction
Should have mentioned which nim version i use: Nim Compiler Version 1.9.1 [Linux: amd64] Compiled at 2022-12-22 Copyright (c) 2006-2022 by Andreas Rumpf git hash: 18c115c8d0b38e6dbb7fae5bdda94bfca1a0ecef active boot switches: -d:release Run

How to make variables declared inside static blocks available?

2022-12-24 Thread forcefaction
I'm trying to read a csv file at compile-time and convert it into a const table. I found [this old thread](https://forum.nim-lang.org/t/2708). The code i'm using is as follows: import std/[parseutils, strutils, tables] static: let v1 = "data.csv".slurp.splitLines