help with channels and threads

2024-04-03 Thread ggibson
> you'd likely need to increment workID count when submitting a task and not > after checking tryRecv For anyone else reading this, we're talking past each other here I suspect, because the code does do the right thing once an `initLock` is added. What happens for submission is it only submits

help with channels and threads

2024-04-02 Thread ggibson
SOLVED So, after much debugging... Always use `initLock` on your locks. Don't ever forget it otherwise the lock will "work" without actually doing what it's supposed to. You might also need `deinitLock` then.

help with channels and threads

2024-04-01 Thread ggibson
> The logic in your loop will try and submit... Ah good catch with the `while workID < NSUBMISSIONS` submission loop, Thank you! I tried too hard to make a tidy minimal example and introduced this bug thinking I could get rid of my break condition for cleanliness. Edited the code and output abo

help with channels and threads

2024-04-01 Thread ggibson
I've spent a few days on this and boiled this down to a minimal example. Can an expert with Nim parallelism please tell me where I'm going wrong here? Output changes from run to run (is stochastic) but I did not intend that and do not see how this can be. Here are several runs in a row of a very

os:windows but nim puts 'lpthread'

2024-03-28 Thread ggibson
tl;dr I can compile, but it's gross and I'm guessing there's a better way. I have a multithreaded app that I am compiling to each OS. For Windows, I have this extra step that I'm sure has a better answer. When I compile to windows, nim throws an error passed from the C compiler that basically 'l

newSeq() named inconsistently?

2024-03-24 Thread ggibson
For this reason I was often confused learning nim if `init` implied I should pass a value to be initialized C-style, or if it instead actually created something for me. I know there's the existing low-level memory function of the same name, but I like the idea of a version of Nim that uses these

static checking of strings

2024-02-23 Thread ggibson
RFC is Request for Comment is a discussion of what could be. In Nim types are checked at compile time, so any procs or funcs you write accepting these types will fail to compile if the array datatype or lengths don't match what is being passed to them. Conversion from user input to this datatyp

static checking of strings

2024-02-23 Thread ggibson
I think strong types and arrays provide everything you need already. No need for fancy concepts (yet?). type V4 = array[4, byte] V6 = array[8,V4] proc print(val: V4|V6) = echo val proc toV4[T](val: openArray[T]): array[4, byte] = for i,c in v

How to use Weave isReady?

2024-02-22 Thread ggibson
To put a bow on this thread for now. C++ speed parity achieved! I've rewritten my code without any threadpool library, relying only on creating 1 thread per core requested, and having those threads block/wait using Channels of a simple enum type `[Ready, Begin, Quit]`. The main host thread then

How to use Weave isReady?

2024-02-22 Thread ggibson
Interestingly, in a test that runs many work items for a total of about 10 seconds with 1 thread, my Nim implementation is only about 1% slower than the C++ one, if that even statistically holds up. However, scaling this to 4 threads suddenly my Nim implementation is 2x slower than C++. Investig

How to use Weave isReady?

2024-02-21 Thread ggibson
@mratsim this is just what I was looking for. Fantastic work and thank you for sharing your library. At one point I thought I had run into a bug in your library, but found it was more that I was using excessive locks, and everything resolved when I used the `prologue/loop/epilogue` paradigm corr

How to use Weave isReady?

2024-02-15 Thread ggibson
Thank you so much, @mratsim, both for the explanations and the impressive work on Weave itself. That makes more sense now about how I was misunderstanding and misusing Weave. > What errors do you get? For `-d:useMalloc` I will now go back and try your suggestions before jumping to conclusions.

How to use Weave isReady?

2024-02-15 Thread ggibson
I'd appreciate any guidance here. My use case is having thousands of tasks, using the multiprocessor like a worker pool to churn through jobs, but each running task has a huge amount of memory and context data structures that take up a lot of space, and are slow to allocate. So for this reason I

How do I get the process ID of the current program?

2024-02-06 Thread ggibson
That looks involved. Just dropping this here because the thread got revived without mentioning this.

A custom '=destroy' hook which takes a 'var T' parameter is deprecated

2024-01-12 Thread ggibson
How are you able to use finalizers? Shouldn't those be replaced with destroy hooks to be Nim 2 compatible? At least that's what I ran into doing a similar update recently.

`nph` opinionated formatter v0.3

2024-01-10 Thread ggibson
Isn't developer-specific preference -- such as two vs four space tabbing -- a developer-specific problem? I imagine `nph`, much like python's `black` to be used like a pre-git-commit automatic step to standardize code. Doesn't much matter what it's standardized to. This frees you up to display a

Custom constructors

2024-01-10 Thread ggibson
I'll assume for better or worse you are familiar with C++. Let's translate to C++ so it becomes obvious how Nim works differently. let d = 176.Dollar Run in c++ would be auto d = static_cast(176); // maybe dragons! Run in c++ what you wante

Mastering Nim 2.0

2024-01-07 Thread ggibson
Also curious about this. I bought the paperback v1.

NIR

2023-11-04 Thread ggibson
1 viewtypes 2 IC 3 REPL To me, the last lang features I look forward to are view types (easier performance gains) and concepts (creates a more friendly std lib) then after that, as so many others have pointed out the tooling and good libraries will be important. To me they depend on nailing dow

tell me the library for windows to download files with a progress bar

2023-06-07 Thread ggibson
There's a PR for `puppy` that adds DL progress info. Working for windows and Linux last I tried, but not osx. Even after looking at a similar Rust lib I have no clue how to interface with the osx side and it needs help. If you're in a pinch you can just compile it for what you need for windows,

How to ref value types in tables?

2023-01-30 Thread ggibson
Ohh, right, when indexing strings and seqs, pointers can be indexed in the raw. That's handy. @Araq, lol what a tease.

How to ref value types in tables?

2023-01-29 Thread ggibson
Thank you both! I somehow missed `withValue`, though I wish it didn't feel like "here's a weird Nim quirk that gets around a weird Nim quirk." I guess if `withValue` can become canonical for container element mutable access then great.

How to ref value types in tables?

2023-01-29 Thread ggibson
What are all the options for modifying the value in a table? As folks familiar with Nim will know, strings and sequences are value types, and thus cannot be copied for modification into a var through the usual `mgetOrPut` workflow. Example. The focus is on efficiently modifying values stored in

How to incrementally convert a C or C++ project?

2023-01-15 Thread ggibson
@Araq thanks for the response and reasoning. I think what you suggest may hold true for C projects, but what about C++? I admit I should have made my demonstration in C++ because that's actually the situation I'm more curious about, but I made C more out of habit for simplicity. Yes you're righ

How to incrementally convert a C or C++ project?

2023-01-13 Thread ggibson
... with the least friction? Incremental adoption was in my mind one of Nim's strong points, but I don't actually know what that workflow looks like. Ignoring a build system at the moment, below is one approach. I'd love to hear more ideas. Incremental adoption is where the intended design of t

Ideas for useful/cute little GUI programs?

2022-08-21 Thread ggibson
@dom96 Does this address what you were thinking for a choosenim gui?

Convert Python codes to Nim codes

2022-08-19 Thread ggibson
For the slicing syntax, try the simpler option of the previously suggested `collect` together with `countUp`, which supports strided for, like python's `range`.

Need some direction on macros.

2022-08-19 Thread ggibson
I once had to overcome the same thing for scraping a site that used a rotating cipher of obfuscating links through various js schemes. My solution was overkill, but future proof - embed the entire v8 js engine, evaluate the code, then extract what was necessary. It's an option. This was before d

`mixin` ignores `when` branching

2022-08-04 Thread ggibson
Is this supposed to work? I couldn't find an issue about it. No matter the `when` branch, the `mixin` is always used. #tokens.nim proc getToken*(): string = "123456" #main.nim import tokens template login(): bool = when not defined(release): mixin g

withColor template in "THE BOOK"

2022-08-04 Thread ggibson
Here's an example of something that makes new variables injected into scope, instead of the same variable over and over again. You can adapt it this technique to achieve what you are looking for. template makeVar(varname: untyped; varvalue: typed) = let `varname` {.inject.} =

composite type bug? Order makes difference.

2022-08-01 Thread ggibson
What a wonderful detailed reply - Thank you! I lacked the correct terminology to find the prior issues reported.

composite type bug? Order makes difference.

2022-08-01 Thread ggibson
The following fails, unless the ordering of `tuple|string` is reversed. Verifying here before submitting an issue. type Group = tuple|string proc tryit(container: Group): auto = container echo tryit( (0,1,2)) echo tryit( "012") Run Error:

how to update macro nim1.2 to nim1.6.6?

2022-07-25 Thread ggibson
This is a known issue.

how to update macro nim1.2 to nim1.6.6?

2022-07-25 Thread ggibson
Elegantbeef helped me out to determine a smaller actual MRE. macro DefineAndInstance = genast(): type MyObject = object var myParams* = MyObject() Run Error inconsistent typing for reintroduced symbol 'myParams`gensym1': previous typ

how to update macro nim1.2 to nim1.6.6?

2022-07-25 Thread ggibson
I have this macro that seems to work in older versions of Nim. What am I missing? Nim complains of `inconsistent typing for reintroduced symbol 'paramsGlobal' previous type was: object; new type is: object` MRE below, where the macro creates a new type, then instances that type with `var`. My a

how to create structures based on user types/fields?

2022-07-17 Thread ggibson
Okay, thanks. Along these lines, why is it that strings in a `static` block aren't static? My macros are complaining that the strings in my set I'm passing in 1 at a time aren't static, so I can't build the AST I want. I guess my method outlined above doesn't fully work.

how to create structures based on user types/fields?

2022-07-16 Thread ggibson
Users of my software will create some custom types inheriting from a Base type. I want to automatically detect the fields of all derived types, find the joined unique set, and create some special types and procs based on the names of the fields of that set. I'm not sure how best to do this. I'v

Win nim included dlls fail to load

2022-06-09 Thread ggibson
But, after more reflection, I was able to use the string `uncompress` proc on single file raw data to unzip gz files. Yay! Thanks for the dialog.

Win nim included dlls fail to load

2022-06-09 Thread ggibson
I would love to only use zippy -- it's fantastic! -- but I need to be unzipping `.gz` files, too, and I didn't see that zippy could support gzip that was not in a tar ball. I'm sure there's just some weird Visual Studio compiler thing I'm missing.

Win nim included dlls fail to load

2022-06-08 Thread ggibson
What am I doing wrong? Trying to use std/zip, and `zlib1.dll` is required. When I put `zlib1.dll` and my exe in the same place and run, I get could not load: zlib1.dll (bad format; library may be wrong architecture) Run > What gives? Win11 64-bit. Compiled exe w/ `

changing mingw cross compiler path?

2022-05-30 Thread ggibson
Thanks. I realize now I was assuming `-d:mingw` took care of that. Works well now!

changing mingw cross compiler path?

2022-05-26 Thread ggibson
Hi, I'm using another compiler built on clang that cross compiles to windows. So I'm trying to use it using the 'mingw' define. Is this the right way to go about it? I can't seem to change the mingw path. $ nim c -d:mingw --amd64.windows.gcc.path=$PWD --amd64.windows.gcc.exe=gcc-w

Nim v2: what would you change?

2022-05-20 Thread ggibson
That's a peculiar preference so I hope it is NOT considered for v2. I could imagine arguments going both ways, that multi assignment should have multi calls, or that multi assignment should be copies of 1 call. It seems the more general case to allow multiple calls, and is trivial to work around

How to build a static library after nimble install?

2022-05-19 Thread ggibson
Can you list the full series of commands you wish would yield what you want from start to finish? I don't quite understand why you can't follow the same module pattern as , which downloads a c library and yields bindings to it.

How to build a static library after nimble install?

2022-05-19 Thread ggibson
Maybe add a step in your nims file to build the library? `--app:lib` should do it. This will make different files depending on the OS, as you point out. Then, add a `.nim` source file in your nimble installed module that can be imported. Make this file link with the compiled library that is loca

Why I left the Nim community

2022-05-11 Thread ggibson
Oh, I see. Maybe @zoom was talking about complex refactoring only? I was thinking about the trivial splitting and renaming refactoring listed in the Nim roadmap that seems to still have untouched simpler items I can imagine core drevs being unexcited to work on:

Nim v2: what would you change?

2022-05-11 Thread ggibson
> This coming from one of a handful of core devs is discouraging. I don't think so. Refactoring is actually a decent way for new contributors to do something meaningful while still learning their way around the code base. As long as there are people possibly willing to help, then I would hope th

porting c++ [string]view demo to nim: a puzzle

2022-02-20 Thread ggibson
A friend was very excited about c++ `string_view`, which is now available since c++17, and they shared this demo with me where compiling without `string_view` will yield a runtime of several seconds, and with `string_view` the runtime is 30-60ms. We often chat about nim so I offered to code up t

how to integrate existing react components in karax?

2021-11-16 Thread ggibson
On the off-chance you're not a bot, you deserve a reply. Welcome to the forums! No one is angry with novice questions, however learning how to attempt to answer such questions yourself with a couple seconds of effort is a valuable skill you should try to cultivate. Below is an example of how I w

byaddr tuple unpacking?

2021-11-12 Thread ggibson
Is there any way to get the tuple unpacking version of the following? let a {.byaddr.} = b Run Note: requires `import std/decls`

Best way to turn byte array into int?

2021-11-05 Thread ggibson
Here's what I use. I expanded my types so you can see the raw array. func read(this:var array[SIZE, byte], T:typedesc, pos:Natural = 0):ptr T = result = cast[ptr T](addr this[pos]) Run

Survey Question: flow research

2021-11-04 Thread ggibson
I like `--verbosity:2`! Didn't know this. FYI anyone using it, hints must not be disabled. I empathize with the observations above. In the 5 years I've been using nim personally and professionally, there are certain rough edges that keep me from recommending it to most people, except for the oc

Basic nimterop usage for simple c++ struct?

2021-10-28 Thread ggibson
@ynfle Yes, but I didn't write that. This is the problem. @Araq, ah okay, I'll use c2nim. Thank you for the direction. So far I'm struggling even installing c2nim. I wonder if c2nim does not work yet with `v1.6`? I'll poke at it some more. > nimble update ... › nimble insta

Basic nimterop usage for simple c++ struct?

2021-10-28 Thread ggibson
* I'm wrapping some simple c++ code * I have manual wrapping experience, but am trying to learn nimterop so I can scale to wrapping larger codebases * I'm reading the nimterop docs and API for `cimport` * nimterop seems to break for a simple struct with a vector Questions: * What's t

const loop unrolling, or const to static?

2021-10-24 Thread ggibson
Wow, this took me forever to figure out. Based on the feedback, I decided to abandon the pre-macro for loop and instead pass the whole array. Nim is okay with a const array passed as a `static openArray[string]` and the strings are then blessed with `static` implicitly and all my problems went a

const loop unrolling, or const to static?

2021-10-24 Thread ggibson
Is there any way to create `ident` nodes from all the strings in a constant array?

const loop unrolling, or const to static?

2021-10-24 Thread ggibson
Is there a solution for the following? I've been wresting with this for a few days, and really expected this use of `const` to work. const ArrayOfStrings = compileTimeGeneratedArray() macroTakesAStaticString( ArrayOfStrings[2] ) # works okay! for astring in ArrayOfS

macro to reconstitute const string to type?

2021-10-23 Thread ggibson
@ynfle Thanks - I updated my example to be more clear. I think maybe I could follow your suggestion and try to construct the typedef from the list and inject in global scope, but it's kind of the same problem that I already have.

macro to reconstitute const string to type?

2021-10-23 Thread ggibson
macro struggles here still trying to learn them. How could I check objects against a comile-time defined list of types? My attempt so far is to use a constant list of strings of names that automatically came from some types that were registered. In this example below I've simplified so you can s

block-level change default type of int literals?

2021-09-25 Thread ggibson
Wow, you are fast! I was not looking forward to figuring out how to macro that again. Thank you for mocking that up and sharing. Same curious question as @shirleyquirk, why is `copyNimNode` necessary? I see that the macro `asI` evaluated to `nil` later if it's not used.

block-level change default type of int literals?

2021-09-25 Thread ggibson
I had asked and posted a pragma/macro to handle this a few years ago here, but stupidly didn't save it and can't find it anymore. Does there happen to be a feature I'm not finding in Nim 1.x+ that handles this? desired: proc somefn(input:int):int {.intAs: int32.}: var s =

Weave+ARC WIP or my bug?

2021-09-16 Thread ggibson
Thank you! I did not know about the locking as a bottleneck. I've made a pooling/arena mechanism and it helps as you said. I'm very confused about how to avoid `threadvar`, if I understand you correctly. It sounds like global ID won't be unique, and threadvar is similar to using global ID. So w

how to build devel these days? (pre 1.6)

2021-09-13 Thread ggibson
Thank you! I should've nuked the dir before trying `build_all.sh`.

how to build devel these days? (pre 1.6)

2021-09-13 Thread ggibson
For the past few years I have been trying out devel, always building manually. However, this week it seems my setup is broken, or devel is very broken. After fixing a few errors, I decided something is amiss and to come ask. Errors: * cfg errors with malformed `hint:type:off` seems like it sh

Weave+ARC WIP or my bug?

2021-09-12 Thread ggibson
That would be fantastic for porting! In case you're curious of a user experience with ARC, I'm confused how the custom destructor should actually clear each ref object of my list. I saw some posts that showed using `dispose(node)` but it seems modern dispose is meant for inter-thread freeing on

Weave+ARC WIP or my bug?

2021-09-11 Thread ggibson
Thanks @Araq, I was just beginning to realize this while playing with the destructors, but I'm very glad to get set straight! I agree about linked lists. Unfortunately, linked list is an elegant solution for what I'm doing (tree of life phylogeny simulation stuff). I'll see about using an edge l

Weave+ARC WIP or my bug?

2021-09-11 Thread ggibson
This has nothing to do with Weave. Even remaking the example to use built-in threading mechanisms causes the same symptoms of slowness and crashing when compiled with ARC.

Weave+ARC WIP or my bug?

2021-09-11 Thread ggibson
I didn't find any statements that ARC and Weave don't work together, but they seem to not work together with even a trivial example. Found some older forum discussion by mratsim on the topic Putting `loadBalance(Weave)` in and out makes me think this has

How to make a const array in a proc w/ template?

2021-08-27 Thread ggibson
Thank you! Is there a difference between `static int` and `static[int]`? I've never seen the former.

How to make a const array in a proc w/ template?

2021-08-27 Thread ggibson
Why does the following fail to compile? The "cannot evaluate at compile time" seems wrong to my intuition about what's available here at compile time by using `untyped` and a template. # example that is not compiling template makeArray(SIZE:untyped):untyped = var a:ar

Problem installing nimble via ./koch on linux

2021-05-27 Thread ggibson
Does installing the right header files solve your problem?

How to debug: SIGBUS: Illegal storage access. (Attempt to read from nil?)

2021-05-26 Thread ggibson
This is strange-looking code, because `evaluator` is getting `expr` passed twice. You have `evaluator(expr, self, frame, expr)` (see Uniform Function Call Syntax) Include a minimal but complete working example for better help.

cosmonim hello world - No such file or directory

2021-05-24 Thread ggibson
@Yardanico I'm still poking at this - do you have any compiler insights as to how I could introspect why this isn't working on a particular linux distribution?

cosmonim hello world - No such file or directory

2021-05-16 Thread ggibson
Do you have any hints as to what I might look into in nim compile flags as to why cosmonim might not be working well on a particular linux distribution (Solus Linux)? I tried a fresh VM of both Ubuntu and Solus, and cosmonim yields segfault on solus but runs fine on Ubuntu. However, cosmopolitan

cosmonim hello world - No such file or directory

2021-05-15 Thread ggibson
Progress! Thanks - that helped me excise Wine. Now when running `hello.com` I get the standard linux error. The elf predictably runs fine. bash: ./hello.com: cannot execute binary file: Exec format error Run And now I'm actually stumped.

cosmonim hello world - No such file or directory

2021-05-15 Thread ggibson
I wonder if it's a relic from Wine's installation somehow. I'm trying to research how wine implants itself in the system so the system knows to invoke `/usr/bin/wine` because maybe that is still here for some reason.

cosmonim hello world - No such file or directory

2021-05-14 Thread ggibson
Yes, and thanks for cosmonim! Cool idea. $ git clone https://github.com/Yardanico/cosmonim $ cd cosmonim $ curl -o cosmo.zip https://justine.lol/cosmopolitan/cosmopolitan.zip $ unzip -d cosmopolitan cosmo.zip $ nim c -d:danger --opt:size -o:hello.elf hello.nim $ o

cosmonim hello world - No such file or directory

2021-05-14 Thread ggibson
Anyone have experience with [cosmonim](https://github.com/Yardanico/cosmonim)? I follow the hello world tutorial in their README.md and get this result. bash: ./hello.com: No such file or directory Run I've even tried `bash -c "./hello.com"` Initially I was having a pr

setControlCHook

2021-04-29 Thread ggibson
It's either your code, or your nim version. I'm using 1.5x and a MWE test passed for me. import asynchttpserver, asyncdispatch var server = newAsyncHttpServer() proc cb(req: Request) {.async.} = await req.respond(Http200, "Hello World") var t:Thread[int32]

UFCS and templates

2021-01-20 Thread ggibson
> UFCS can be used if the left argument is something that by itself has a type That is more or less how I think about it when programming Nim. Is that phrasing how you would recommend teaching newcomers about UFCS?

UFCS and templates

2021-01-20 Thread ggibson
What's your workflow to know what you can and cannot use UFCS on? And especially how do you teach newcomers UFCS? I am tempted to err on the side of: * Use an IDE (like alaviss' nvim plugin) that shows you the type of what you're writing, and then * Only use UFCS for procs and funcs and NOTH

Portable binaries with Nim - what works?

2021-01-18 Thread ggibson
@drkameleon my empathies because Apple does not make this easy. In fact, the community has created a repository of old SDKs because Apple fails to make them available () . Even so, this was a pain to figure out since I don't have a mac and yml-push-run-ch

Compile to a single C file?

2020-12-28 Thread ggibson
I've gone down a similar rabbit hole: I don't think this is possible without some significant work integrating the various required generated source files. You can do it by hand, but there's no turn-key solution, and it's not simple to do by hand.

Closure vs object benefit?

2020-12-22 Thread ggibson
Hi, I'm considering using the "tuple of closures" pattern below that Araq suggested ([original post](https://forum.nim-lang.org/t/278#1447)) and I'm reading the [closures section of the manual](https://nim-lang.org/docs/manual.html#procedures-closures). I could discover the answers to my questi

fusion/SharedPtr why []= sig undefined?

2020-12-10 Thread ggibson
Okay, thanks; I'll submit a PR.

fusion/SharedPtr why []= sig undefined?

2020-12-09 Thread ggibson
I was just curious why something as simple as value assignment to a shared pointer is left out of the library? It seems so simple and useful that the omission appears deliberate. Maybe I completely misunderstand something about the library or about nim. Thanks for your time. import

SSL error using httpClient

2020-10-31 Thread ggibson
I had the same issue, maybe. Github was forcefully promoting the connection to https and a certain certificate I didn't know how to handle. I needed a small statically compiled in SSL library so cobbled together an ersatz one from someone else's minimal c library. It's here on github in [one of

listFiles() at compile time?

2020-10-25 Thread ggibson
Wow, yeah that's not documented at all! But that's exactly what I'm looking for - I would have not figured that out possibly for a long time if either of you hadn't pointed it out. Thanks a lot.

design of large modular projects in nim?

2020-10-25 Thread ggibson
Command line works! I'm not sure why my first attempt didn't work - probably my fault. The neovim autocomplete also works for inclusions, but I still can't get VSCode to work. VSCode is the most common among our project developers so I'm hoping to get that one working for them.

design of large modular projects in nim?

2020-10-25 Thread ggibson
Can anyone shed light on how to properly configure VSCode? I already tried it a couple days ago, and autocomplete with nimsuggest fails to process the includes. { // settings.json "nim.project": [ "main.nim" ] } Run

design of large modular projects in nim?

2020-10-25 Thread ggibson
Apparently, [Araq has pointed out](https://forum.nim-lang.org/t/2829#17969) that `nimsuggest` actually does track `includes` properly, but editors do not often make use of this feature. Bummer. But this would enable the 3.B solution, reducing the hoop-jumping by one layer :)

listFiles() at compile time?

2020-10-25 Thread ggibson
Really? That would be fantastic! I'm using 1.5.1 but am still having the original issue. Maybe you can see I'm doing something stupid?

design of large modular projects in nim?

2020-10-25 Thread ggibson
I've been using Nim for work and play for a few years, but I'm still stumped what is the "Nim way" to replace our larger projects. # The Project This is a scientific simulation C++ OOP modular project with user-contributed compilable plugins (but everything is compiled at the same time, so

listFiles() at compile time?

2020-10-25 Thread ggibson
Just confirming, there's no way to listFiles or walkFiles at compile time, correct? This is because `importc` cannot be used at compile time, rendering `walkFiles` and `execProcess` unhelpful. My only workaround is to make a nimscript file with a build action that uses `listFiles` and passes th