Nim FAQ

2022-02-22 Thread leeooox
excellent FAQ list, I added it in my bookmark. :)

To get the PCRE version by executing Nim

2022-02-22 Thread mardiyah
How do we find out the PCRE version by executing Nim command statement or on terminal CLI ?

Calling nim-server-code from javascript

2022-02-22 Thread Niminem
Check out my tiny library It makes client/server communication seamless, similar to how you mention

Calling nim-server-code from javascript

2022-02-22 Thread Hobbyman
OK thanks! I'll look into it!

Calling nim-server-code from javascript

2022-02-22 Thread Hobbyman
Hello all, The question is: Is there a way to run a proc from a module based only on the strings that represent the identifiers? Something like: allmodules("mymodule").moduleprocs("myproc")(param1, param2) Or if that is impossible only: moduleprocs("myproc")(param1, param2) Background. I use

New programming for beginners/intermediate

2022-02-22 Thread reversem3
I found a Udemy course Currently going though it, no it's not mine and no I don't know the author. Great for those looking for beginner videos besides the youtube ones.

Concatenation of seq and array?

2022-02-22 Thread sls1005
You're right. The `sink` version should work.

Concatenation of seq and array?

2022-02-22 Thread Hlaaftana
Nim grows the cap exponentially AFAIK. And you can just do `s.add(a)` which would only reallocate once, the same thing as creating a new seq, given that it requires a regrow.

Concatenation of seq and array?

2022-02-22 Thread sls1005
If the length of the array is many times the length of the seq, it has to reallocate again and again. In such a case, `newSeqOfCap(len(s) + len(a))` will be more efficient.

Concatenation of seq and array?

2022-02-22 Thread Hlaaftana
I don't get why it would be inefficient. What is the alternative to just using `add`?

Concatenation of seq and array?

2022-02-22 Thread sls1005
proc `&`[T](s: sink seq[T], a: openArray[T]): seq[T] = for t in a: s.add t return s Run

Catch exceptions without crashing app

2022-02-22 Thread Cnerd
Ok i'll try that. thanks