Version 0.20.2 released

2019-07-17 Thread treeform
[https://nim-lang.org/blog/2019/07/17/version-0202-released.html](https://nim-lang.org/blog/2019/07/17/version-0202-released.html) Thank you everyone for getting this out!

Re: wNim - Nim's Windows GUI Framework

2019-07-17 Thread Neil_H
wFontDialog tested, and its brilliant keep up the great work and don't forget the Print Dialog ;-)

Re: Hyphens Not Allowed in Nim Filenames? [Invalid Module Name]

2019-07-17 Thread Araq
We could actually allow hyphens too, the module name would be `foo-bar` Run (always inside backticks).

Re: Hyphens Not Allowed in Nim Filenames? [Invalid Module Name]

2019-07-17 Thread treeform
I don't allowing hyphens in filenames is a good idea.

Re: Hyphens Not Allowed in Nim Filenames? [Invalid Module Name]

2019-07-17 Thread chr
Technically, yes: `__import__('foo-bar')` But it's almost certainly not considered good style. And I don't think I've ever seen it done in practice. For example, where I work, in a large codebase that uses hyphen-delimited filenames for C++ code, my team breaks that convention to use

Re: Nim v0.20.0 is here (1.0 RC)

2019-07-17 Thread miran
After a month of hard work, our second release candidate of Nim 1.0 is ready — Nim v0.20.2: [https://nim-lang.org/blog/2019/07/17/version-0202-released.html](https://nim-lang.org/blog/2019/07/17/version-0202-released.html)

Re: Nim Repository Template for GitHub

2019-07-17 Thread Araq
> From an exchange with @Araq, I learned that the best practice is to always > set Git to normalize EOLs to LF, even under Windows OS: Hey, wait a second, I didn't say that! I said git shouldn't touch the newlines.

Re: Passing a Variable as Part of Args to execProcess

2019-07-17 Thread madra
Aha. That worked a treat I'd thought the TaintedString error was telling me I was creating a "tainted string" when building the command. And the reason I'd omitted the let outp = was that it looked like that was assigning the result of the command to a varible so it could be used later on –and

Re: Passing a Variable as Part of Args to execProcess

2019-07-17 Thread leorize
You're missing the important part in that example: let outp = Run The way you're doing it is correct, but `execProcess` returns a `TaintedString`

Re: Hyphens Not Allowed in Nim Filenames? [Invalid Module Name]

2019-07-17 Thread dom96
Does Python allow you to _[import](https://forum.nim-lang.org/postActivity.xml#import) a module with a hyphen?

Passing a Variable as Part of Args to execProcess

2019-07-17 Thread madra
Another day, another bit of tinkering with some of my old Python scripts to try and get my head round Nim. This is an old script I had which takes a list of [IMHO] junk processes and kills them on my OSX laptop. [For the purposes of testing I'm just using Finder and Dock as placeholders, as

Re: Hyphens Not Allowed in Nim Filenames? [Invalid Module Name]

2019-07-17 Thread madra
Thanks all. > Neither Python, C or C++ allow hyphens in filenames AFAIK. Python certainly does. The project in question was one of my old Python scripts I'm trying to rewrite, while learning Nim. And the original project-wee.py file runs fine.

Re: Hyphens Not Allowed in Nim Filenames? [Invalid Module Name]

2019-07-17 Thread mratsim
Neither Python, C or C++ allow hyphens in filenames AFAIK.

Re: Hyphens Not Allowed in Nim Filenames? [Invalid Module Name]

2019-07-17 Thread Araq
You can use `--out:project-wee` to set the binary name.

Re: Hyphens Not Allowed in Nim Filenames? [Invalid Module Name]

2019-07-17 Thread roel
>From >[https://nim-lang.org/docs/manual.html#modules](https://nim-lang.org/docs/manual.html#modules): > "A valid module name can only be a valid Nim identifier (and thus its > filename is identifier.nim)." And hyphens are not allowed in identifiers.

Hyphens Not Allowed in Nim Filenames? [Invalid Module Name]

2019-07-17 Thread madra
I've just been working on a standalone file. Let's call it project.nim. Compiles and runs no problem. However, when I adapted the code to make it a bit more compact and saved the leaner version as project-wee.nim it refuses to compile with: $ nim c -r project-wee.nim Hint:

Re: wNim - Nim's Windows GUI Framework

2019-07-17 Thread Ward
@Neil_H: Added several class, including wFontDialog. Check out the lastest version. @mratsim, @mratsim: Thanks a lot.

Re: Fortran bindings

2019-07-17 Thread andrea
I use some Fortran bindings to the LAPACK library in [neo]([https://github.com/unicredit/neo/blob/master/neo/dense.nim#L1086)](https://github.com/unicredit/neo/blob/master/neo/dense.nim#L1086\)). Here I make use of a [fortran

Re: Source Code Protection

2019-07-17 Thread mratsim
Everything that works with C/C++ should work with Nim. You can also use templates instead of procs so that everything is a giant `main()` with goto control flow all over the place that is a pain to disassemble.

Re: Fortran bindings

2019-07-17 Thread mratsim
It doesn't seem too hard: [https://www.hoffman2.idre.ucla.edu/c-fortran-interop](https://www.hoffman2.idre.ucla.edu/c-fortran-interop)/