Re: std::pair, std::make_pair, std::find, std::distance in Nim?

2019-02-22 Thread mashingan
You can iterate and check manually like var intpair = newseq[(int, int)]() texture: int lightmap: int for thepair in intpair: if thepair[0] == texture and thepair[1] == lightmap: doSomething((texture, lightmap)) Run or you can

Problem getting the element type of a generic container

2019-02-22 Thread juanv
This is a type to represent lazy ranges parametrized by the container type: type Range[V] = object v: V slice: Slice[int] var r: Range[seq[int]] = Range[seq[int]](v: @[0, 10, 20, 30, 40], slice: 2..3) # r represents the range [20, 30] var x :

Re: Geometry Library

2019-02-22 Thread r3c
Im looking forward to replace glm with vmath, because its oure and more portable.

std::pair, std::make_pair, std::find, std::distance in Nim?

2019-02-22 Thread r3c
Hi, I have block of code in C++ like this: ++ std::vector> TL; int texture, lightmap; auto p = std::make_pair(texture, lightmap); // make pair auto it = std::find(TL.begin(), TL.end(), p);// iterator int pos = std::distance(TL.begin(), it); //

Re: Nim Language group in London

2019-02-22 Thread juancarlospaco
Start one!, would be cool to have groups all around the world, even if small ones. :D

Nim Language group in London

2019-02-22 Thread graforlock
Hello everyone, Is anyone interested in having a Nim meetup group in London? Or maybe it already exists?

Re: importcpp for defines

2019-02-22 Thread cdome
const GLUT_RGB = 0 Run or var myvar {.importcpp: "GLUT_RGB", header: "XXX".}: cint Run

Re: Is nim-lang recognized world wide.?

2019-02-22 Thread Arrrrrrrrr
Hello there, I'm the President of the Republic of Bodabe, in South Africa (you may remember me from the news as the first african president who makes computer programs). The people from this country recognize and acknowledge the advantages of the nim programming language. We are very grateful

importcpp for defines

2019-02-22 Thread tbutton
there is some kind of #define in some cpp file eg: #define GLUT_RGB 0 Run How to import this definition using importcpp?