Re: Example of extracting a .tar.gz to a plain text file

2019-01-22 Thread shashlick
Choosenim uses @dom96's untar package. [https://github.com/dom96/choosenim/blob/master/src/choosenim/utils.nim#L75](https://github.com/dom96/choosenim/blob/master/src/choosenim/utils.nim#L75) [https://github.com/dom96/untar](https://github.com/dom96/untar) There's also nimarchive which can do

Example of extracting a .tar.gz to a plain text file

2019-01-22 Thread kaushalmodi
Hello, Can someone give an example of uncompressing + untarring a .tar.gz file (without call `execProcess` and likes, but instead using the zlib and tar libraries)? I ended up on

change string iteration start?

2019-01-22 Thread Murktinez
I want to iterate a string using the for loop which I can do let s = ".something" for c in s #no problem Run but I want to start after the first character which I can also do let s = ".something" for c in s[1..

Nim not suited for building static libraries?

2019-01-22 Thread dandev
I am trying to build a static library using Nim and plan to use that lib in Nim and C applications. I passed the `--app:staticlib --noMain --header:myheader.h` flags when building the nim file for the static library. However, the static library can not be linked in a second Nim application due

Re: generic instantiation with object inheritance

2019-01-22 Thread rayman22201
Yeah. I didn't expect it to be this broken either. I think this part of the compiler hasn't gotten as much love because inheritance and run time dispatch is not really favored by the community. The nim "blessed" way has always been variant types instead. I do hope some of these issues get

Re: generic instantiation with object inheritance

2019-01-22 Thread e
Thanks, @rayman22201 \-- I was just exploring, and knowing that Nim is broken with methods and generics is enough for me, though disappointing.

Re: generic instantiation with object inheritance

2019-01-22 Thread rayman22201
I was noodling with your gist. This seems to be a bug with multimethods and generics. possibly related to this bug: [https://github.com/nim-lang/Nim/issues/88](https://github.com/nim-lang/Nim/issues/88) or this bug:

Re: Speeding up Python with Nim

2019-01-22 Thread bpr
> The full Nim language can be used with --gc:regions For a while the language manual mentioned user defined regions, and now that section is gone. IIRC I asked before about this and you'd said that the user defined region stuff would be subsumed by destructors. Does my recollection agree with

Re: "Nim needs better documentation" - share your thoughts

2019-01-22 Thread miran
And now for a slightly longer answer: > 1\. It is not the number of digits after the decimal point, it is the number > of digits. You made the sentence longer, which restrict it truth value to > output in scientific notation. I didn't change anything there except put the capital letter in the

Re: "Nim needs better documentation" - share your thoughts

2019-01-22 Thread miran
PRs welcome ;)

Re: "Nim needs better documentation" - share your thoughts

2019-01-22 Thread Stefan_Salewski
> A quick recap what has been done in the last week. I already took a short look at the math docs some days ago. When you really are interested in high quality you may think about these 3 points: https://nim-lang.github.io/Nim/math.html MaxFloat64Precision = 16

Re: "Nim needs better documentation" - share your thoughts

2019-01-22 Thread miran
A quick recap what has been done in the last week. Nim now has improved documentation for the following **10** modules, and you can view their documentation on [this link](https://nim-lang.github.io/Nim/lib.html): * strutils, sequtils, tables, math, parseutils, base64, sha1, uri, lists,

Re: Speeding up Python with Nim

2019-01-22 Thread Araq
> I can not really believe that using Nim from Python is that easy for such use > cases, I would even assume that Nim may make it more difficult than C/C++ as > Nim has its own GC which may interfere with Pythons own Garbage Collector. > Maybe I am wrong -- would be great. There is good news,

Re: Module typeinfo, can't access field by name. Bug or not?

2019-01-22 Thread GULPF
That won't work when `Foo` has multiple fields of different types, since `v` might not be the correct type. Something like this works however: type Foo = object field: int str: string proc `[]`(x: Foo, s: string, T: type): T = for n, v in

Re: Nimgame 2

2019-01-22 Thread Vladar
And thank you for developing one of the top-tier programming languages in the world =)

Re: Module typeinfo, can't access field by name. Bug or not?

2019-01-22 Thread timpaine
The best part which will be egtting the oevrall valuable to it and the most part is that user want tohttps://errorcode0x.com/fixed-firefox-couldnt-load-xpcom/ know the solution that enable to enhance it