Re: vecctor items iterator

2019-02-07 Thread miran
> sorry, I solved the problem For the sake of somebody else who will have a similar problem in the future, don't just say that, also write how did you solve it.

Re: vecctor items iterator

2019-02-07 Thread tbutton
sorry, I solved the problem, thanks you all so much!

Re: vecctor items iterator

2019-02-07 Thread tbutton
ok, it works, thanks so much, but now there is error, where c++ compiler cant convert NI* to unsigned int - type from another cpp file. how change type in for loop, and what is type NI*?

Re: Unexpected async behaviour?

2019-02-07 Thread dom96
Please try it without the `asyncDo` template, that's extraordinary enough to possibly be causing a compiler bug.

Examples to access Numpy Array Data using Nimpy

2019-02-07 Thread zarican
Hi, After some attempts and great tips from @mratsim on my previous thread "An Attempt to Access NumPy Array Data rom Nim" (Sorry for "rom -> from"), I created a repo [https://github.com/zaferarican/nimpy_numpy_examples](https://github.com/zaferarican/nimpy_numpy_examples) where I put two

Caller line numbers in templates?

2019-02-07 Thread zielmicha
Still haven't found a solution :( . (looking for it today again, I've only found my old post)

Re: vecctor items iterator

2019-02-07 Thread demotomohiro
I don't know this is the best way to make `iterator mitems*[T](a: var Vector[T]):var T` works, but this code works. It looks like nim just replace calling `proc `[]`*[T](this:var Vector[T]; index: int): var T` to `v[i]`. `std::vector[T]::operator[ ](size_type pos)` returns reference to a

Re: vecctor items iterator

2019-02-07 Thread mratsim
This is how i wrap C++ vectors: type CppVector* {.importcpp"std::vector", header: "", byref.} [T] = object proc newCppVector*[T](): CppVector[T] {.importcpp: "std::vector<'0>()", header: "", constructor.} proc newCppVector*[T](size: int): CppVector[T]

Re: vecctor items iterator

2019-02-07 Thread mashingan
items iterator is for immutable object, for mutable one, use mitems

Re: vecctor items iterator

2019-02-07 Thread tbutton
Well, I made a `..<`. What should I do now?