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
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)
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
`--nilseqs:on` Cant say more because I dunno which Nim version are you using.
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
Thanks for help.
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
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
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
I've been complaining to @dom96 at FOSDEM about the missing "nimble update"
command ;)
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
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
12 matches
Mail list logo