Yes, better to avoid all the conversions between int and uint. Nim compiler
does not really like uint, but can use it.
Note that your Nim arithmetics are not identical to C arithmetic. For example
in Nim code you have
uint(k-Kn)
So you use signed values for substraction, and
None of these listings can be compiled. The only thing I can say is that I
would never use `uint` for these kind of computations. Much too prone to silent
over- and underflows.
I have identified a very subtle memory management error that took me weeks to
characterize.
I'm directly translating a working C++ program to Nim. The problem seems to be
that the Nim code erroneously addresses the **seg** array beyonds its bounds,
because the **k** values used to update the
"solved"
Here's my hack, but it would be great to have a good way to specify that you're
in a posix-like environment for pathing despite being on windows, and to use
the cygpath utility as needed.
I modified the source of nimble (src/nimblepkg/download.nim) in the doClone()
function I
Hi there,
I finally got my cygwin+mingw32 environment to build nim. Everything works
nicely except nimble barfs when trying to install anything. Is there a way I
can tell it exactly what path to use or force nimble to use *nix pathing?
Programs I write with nim work with *nix style paths on my
Possible. The compiler dislikes enums that try to outsmart/override its chosen
native representation.
There is little you cannot do with `emit`:
template notSure(x, y) =
{.emit: "kernel<<", x, ", ", y, ">>();".}
notSure(1, 1)
cdome: but one problem - vtrefs are not implemented yet
vtref of concepts will do that. You can define a union type if you want to.
There are other options, I don't see a problem here
Yes, I'm talking about storing different type values in one container, but in a
safer way than by casting/storing raw pointers to values. In some other
languages you can use interfaces for that, but if that's not possible in nim
that would mean this feature is based on a VM?
Probably you're asking about what here is discussed:
[https://forum.nim-lang.org/t/3150](https://forum.nim-lang.org/t/3150); that
is, on storing different (concrete) type values in one container. You have to
choose between casts, object variants, refs to objects + dynamic dispatch
(methods),
No idea what you're talking about.
I see that building csources on termux now works:
pkg install libandroid-glob-dev libandroid-glob git clang nodejs pcre
pcre-dev libsqlite
git clone https://github.com/nim-lang/Nim
cd Nim
git clone --depth 1 https://github.com/nim-lang/csources
cd csources
sh
Ah, I see. I didn't know that I had to import math to get power, and I wasn't
familiar with the syntax of binary operators to be able to interpret the error
message appropriately. Thanks!
Right now it's impossible to use containers based on generic types. Is it going
to change, or is there some alternative?
After some more experimentation I went with his:
task test, "Runs the test suite":
configForTests()
var dir_list = listDirs("test")
dir_list.add("test")
keepItIf(dir_list, it != "test/nimcache")
for dir in dir_list:
for file in listFiles(dir):
I have just uploaded latest version of gintro to github.
The two reported bugs should be fixed now. And automatic memory management
should work for the GTK boxed types also now. Chess board and the demo apps
compile fine with Nim v 0.17.2 on Linux 64 bit. Now we have to do more testing
and
17 matches
Mail list logo