Re: Update all installed nimble packages

2019-02-13 Thread zarican
It is great that nim has nimble, the package manager for nim. Its ability to create a project template and publish is also useful. I believe in the near future we will see much more packages in it. Saying that I observe an ambiguity on the term "update" for nimble packages. If I understood corr

Re: Error when test if a large number is prime!

2019-02-13 Thread treeform
So there is a bunch of implementation for big numbers. See here: [https://github.com/nim-lang/needed-libraries/issues/34](https://github.com/nim-lang/needed-libraries/issues/34)

Error when test if a large number is prime!

2019-02-13 Thread mrhdias
When test if a large number is prime I get the following error: prime.nim(12, 14) Error: number out of range: '12548798547123658478' Nim is fast for scientific computing and I enjoy writing code in Nim, but I am a Nim newbie! How to make this work for big numbers? import math

Re: can not run nimedit

2019-02-13 Thread juancarlospaco
`--nilseqs:on` Cant say more because I dunno which Nim version are you using.

Re: Fuzzy matching on table keys

2019-02-13 Thread lqdev
Well, it sort of did. When implementing the `hash` method however, I realized it's not that simple, and decided to use something like this: import tables type FnSignatureTable = ref object signatures: TableRef[string, seq[FnSignature]] Run Then I

Re: Unexpected async behaviour?

2019-02-13 Thread dawkot
Thanks for help.

Re: Mix of varags & seq confusion

2019-02-13 Thread mratsim
openarray matches with seq and arrays varargs matches with seq, arrays and variadic arguments like foo(1, 2, 3) You can only hint the compiler if they are in different files like fileA and fileB, you can use fileA.test and fileB.test

Re: Update all installed nimble packages

2019-02-13 Thread zarican
Thanks @gemath, These are really nice points to consider. * regarding excluding the compiler and nimble, does nimble update those? * I updated the code to perform `nimble refresh` too . * adding the interpreter line works on both linux and macOS. It has to be entered manually though. * I

Re: Mix of varags & seq confusion

2019-02-13 Thread teras
So, for me to understand. * The reason the last call does not work, is because there's a implicit matched conversion from seq => openArray => varags ? * I couldn't find a clear documentation, which types are converted to which, especially for these data types. Is there one anywhere? * Is t

Re: Update all installed nimble packages

2019-02-13 Thread mratsim
I've been complaining to @dom96 at FOSDEM about the missing "nimble update" command ;)

Re: Update all installed nimble packages

2019-02-13 Thread gemath
Thanks, nice work! A few things to consider: * For people who use choosenim like me, it would be nice if compiler and nimble could be excluded from the list of packages to be updated. * An initial `nimble refresh` would make sure that the package list is up-to-date before updating. * Under

Re: Mix of varags & seq confusion

2019-02-13 Thread gemath
In this example proc test(names:varargs[string]) = for n in names: echo n echo "" test "hello", "world" test @["hello", "world"] Run both calls work. The first call passes string arguments, they are implicitly converted to an `open