sugar.nim is a part of the stdlib in devel version of nim. to get you need to
build the latest version of nim(0.18.1).
you need to put the echo in a static block so it's run at compile time:
when nimvm:
static:
echo "compiling..."
else:
echo "running..."
Run
i would think that nimvm being true means that the vm is running that section
of code. static blocks don't tell you anything about your code except that it
run at compile time instead of normal run time.
`static: echo "compiling..." proc display[T](message: T) = when not (T is
string): {.fatal: "T is not a string".} echo message # works
display[string]("hello") # fatal error, compilation aborted # display[int](5) `
Run
that may be true, but the question is where you get that BTC.
the for loop is iterating over the array and not the ranges in the array. afaik
you can't iterate over two ranges like that in nim.
you'll need a cross compiling toolchain. afaik mingw can't compile from windows
to linux, although it works the other way around.
if your errors are from exceptions then just find where your exceptions are
being thrown and wrap them in a `try: #[your code here]# except: discard`.
what platform are you own?
you can just do:
gcc.path = "/usr/bin"
gcc.exe = "arm-linux-gcc"
gcc.linkerexe = "arm-linux-gcc"
Run
but it's less flexible.
can't you just do this?
# a.nim
macro implementRecur*(n: untyped): untyped =
## Allows functions to refer to themself by calling ``recur()``
## To suppress this behavior, annotate the function with
``{.literalRecur.}``
...
# b.nim
import a
it's called semantic versioning or semver for short.
12 matches
Mail list logo