config files: Nimscript and Nim compiler documentation inconsistency

2021-09-21 Thread Araq
IIRC like so: switch("arm.linux.gcc.exe", "valueHere") Run

config files: Nimscript and Nim compiler documentation inconsistency

2021-09-18 Thread auxym
Does config.nims have a mechanism for defining cross-compiling toolchains? Eg the `arm.linux.gcc.exe` as defined here:

config files: Nimscript and Nim compiler documentation inconsistency

2020-09-21 Thread cblake
Lol. :-) I think it's popular, though I haven't used it much myself.

config files: Nimscript and Nim compiler documentation inconsistency

2020-09-21 Thread Araq
Years of mysery for me... :-)

config files: Nimscript and Nim compiler documentation inconsistency

2020-09-21 Thread cblake
We should probably at least change the stdlib to use all `foo.nims` instead of `foo.nim.cfg`. (Often people take "guidance" from stdlibs when new to any programming language.) Not that it's high priority, but it has been years of nims now.. :)

config files: Nimscript and Nim compiler documentation inconsistency

2020-09-21 Thread Araq
Yeah well, everything that it has been said is correct. :-) I'm looking forward to the day where we only have `.nims` files left but with a different internal implementation that isn't a pita to work with... Tried to do that and failed so far.

config files: Nimscript and Nim compiler documentation inconsistency

2020-09-21 Thread cblake
@slonik_az \- I see. I did not see the definition of project as just the .nim file and interpreted "project" more as the wider world does more often as some kind of filesystem directory/folder. Good catch and sorry for the noise. As said, I suspect ignoring the old style `.cfg` is the right choi

config files: Nimscript and Nim compiler documentation inconsistency

2020-09-21 Thread slonik_az
Thanks to the power of Nim's templates one can use cmdline options syntax in Nimscript files like --threads:on # expands to switch("threads", "on") Run I really do not see any use for `*.cfg` files and will rely on NimScript `*.nims` exclusively for my own projec

config files: Nimscript and Nim compiler documentation inconsistency

2020-09-21 Thread slonik_az
@cblake wrote: > Not mentioned anywhere I saw in the linked to manual, but often useful, you > can use either foo.nims or foo.nim.cfg to adjust compile flags for compiling > just foo. Actually the Nimscript doc states this exactly: > A project can also have a project specific configuration fil

config files: Nimscript and Nim compiler documentation inconsistency

2020-09-21 Thread Clonk
I didn't know you could do that in `nim.cfg`. I stand corrected. I assumed `nim.cfg` is the ancestor of `config.nims` and has been kept for background compatibility and to avoid breaking a lot of package.

config files: Nimscript and Nim compiler documentation inconsistency

2020-09-21 Thread cblake
The `nim.cfg` language is slightly less spartan than what @Clonk says. It has (`@if`, `@else`, `@elif`, `@end`) conditionals and strings, comments, and environment variable expansion (`$home`), and maybe a little bit more. `config/nim.cfg` in the Nim distro (or `/usr/lib/nim/config/nim.cfg` or s

config files: Nimscript and Nim compiler documentation inconsistency

2020-09-21 Thread Clonk
My understanding of it is that nim.cfg is just a list of flag passed to the compiler. The list of existing flags exists in the compiler documentation On the other hand config.nims is a nimscript that is automatically executed upon compilation It can be used

config files: Nimscript and Nim compiler documentation inconsistency

2020-09-20 Thread slonik_az
Even after googling I was unable to find any systematic description of the format used in `nim.cfg` files, bummer. Is there anything in `nim.cfg` that cannot be achieved with Nimscript `config.nims` files? In other words, as a new Nim user, can I safely ignore `nim.cfg` in favor of Nimscript ba

config files: Nimscript and Nim compiler documentation inconsistency

2020-09-20 Thread slonik_az
I noticed that the Nimscript manual and the Nim compiler manual both talk about Configuration Files. But Nimscipt doc mostly refer to `config.nims` and `$project.nims` while Nim compil