Re: Nim for Windows: MinGW vs TDM-GCC

2017-07-14 Thread Demos
fwiw stephan t lavavej, who is one of the maintainers of msvc's c++ standard library (with the most apropos name ever) offers a mingw distro with gcc (currently) 7.1.0 and a bunch of recent libraries. we could probably use his build scripts to produce a very minimal gcc. Anyway it's at

Re: In-Memory Database

2017-07-14 Thread euant
There are semi-official Redis bindings here: [https://github.com/nim-lang/redis](https://github.com/nim-lang/redis) Redis would probably be my recommended approach, as it can do replication and all sorts of fancy things. The semi-official just recently got async support too.

Re: How do fellow new comers deal with optional parenthesis dropping?

2017-07-14 Thread evacchi
> > # a.f() == f(a)==> I don't use it. Unnecessary parentheses hurt > readability. Note that in languages such as Eiffel, this is normal. > personally, I like the Scala convention: * if it does side effects, and/or mutate state, then use parens: f.read()

Re: In-Memory Database

2017-07-14 Thread Krux02
Well there are [tables](https://nim-lang.org/docs/tables.html#initTable,int) all in memory, just not very persistent

Import from parent directories

2017-07-14 Thread sontung
Hello dear friends. I can import from subdirectories so: import subdir/some_module , or so: import subdir.some_module I can import from parent directory so: import ../some_module I can import from parent directory and it's subdirectory so: import ../subdir_of_parent/some_module But I can't use

Re: Advance Nimble configs?

2017-07-14 Thread Lando
> Compile my public nim files to make sure they are all syntactically correct. > Again, the hurdle appears to be identifying the files. If by "public nim files" you mean files exposed for import by other packages, nimble seems to have a rule for this: put all non-public files in a source

Re: In-Memory Database

2017-07-14 Thread cdome
Do nimble search There are definately bindings for redis and several others.

Re: Advance Nimble configs?

2017-07-14 Thread andrea
I think what you can do is write the logic in a `.nims` file and then import it in various nimble build files. Still, there is no way to make this a **dependency** of your build script - this would require nimble to be recursive, which currently isn't.

Re: Converting Nim string to c void*

2017-07-14 Thread jangko
variations to convert C pointer to Nim string, and perhaps faster too: proc fromCString(p: pointer, len: int): string = result = newString(len) for i in 0..

Re: In-Memory Database

2017-07-14 Thread sky_khan
I dont know any of them on that list but are you aware of that you can use sqlite as in-memory database by just using ":memory:" as database name?

Re: Advance Nimble configs?

2017-07-14 Thread Nycto
Talking to myself, here. But what the heck. > It doesn't look like I can read a file from nimscript? Is that correct? This is not correct. readFile and writeFile both work. lines, however, did not, which was the source of my confusion. But it does leave me with one final problem: How do I

In-Memory Database

2017-07-14 Thread alfrednewman
Hello, Is there any In-Memory Database project around for Nim ? Or any wrapper available for any of these [https://githubreviews.com/explore/databases/popular-in-memory](https://githubreviews.com/explore/databases/popular-in-memory) ? TIA

Re: Advance Nimble configs?

2017-07-14 Thread Nycto
I've answered a few of my own questions by digging through Nimble. * Listing files in your nimble config doesn't use the os module, it uses the functions from the [nimscript module directly](https://nim-lang.org/0.17.0/nimscript.html#listFiles,string) * Overriding the nimble build exit code

Re: How do fellow new comers deal with optional parenthesis dropping?

2017-07-14 Thread Krux02
hmm, I am a bit surprised, I would have guessed the following parsing rule: echo b, c d, e f g, h echo(b, c(d, e(f(g, h # <--- I expected this echo(b, c(d), e(f(g)), h) # but hey it's this