websockets server example won't compile: type mismatch:

2017-12-09 Thread luked2
I'm trying to compile the websockets example. But it fails to compile. [https://github.com/niv/websocket.nim/blob/master/websocket/server.nim](https://github.com/niv/websocket.nim/blob/master/websocket/server.nim) Compiling that example code (after adding a call to server.serve(cb) at the end) i

Re: Do we have a RTree or R*Tree for Nim?

2017-12-09 Thread Stefan_Salewski
Currently I favour to let the shape of the code as it is. One question arise: Would it make sense to rewrite code like this [https://github.com/StefanSalewski/RTree/blob/master/rtree.nim#L305](https://github.com/StefanSalewski/RTree/blob/master/rtree.nim#L305) for j in 1 ..< n.numEn

Re: How to clean up native resources properly.

2017-12-09 Thread twetzel59
My use case is probably a game. I think I will use a mix of finalizers and explicit cleanup.

lzma headers

2017-12-09 Thread smitty
subset including file/string compression/decompression funcs: git clone [https://github.com/freevryheid/nim-lzma.git](https://github.com/freevryheid/nim-lzma.git)

Re: Timeout

2017-12-09 Thread qqtop
Thanks, that clears it up. I only was focused on the middle error message as it seemed to pertain to the issue at hand . As always reading docs is a real challenge...

Re: Do we have a RTree or R*Tree for Nim?

2017-12-09 Thread Stefan_Salewski
Yes, maybe I will try object variants. But they also have some disadvantages: Size is always determinated by largest variant, and additional space is consumed by discriminator. To get clean, simple code I would have to make each array element an object variant, with a common member bounding box.

Re: Timeout

2017-12-09 Thread Stefan_Salewski
Compiles fine with Nim Compiler Version 0.17.3 (2017-11-17) [Linux: amd64] Copyright (c) 2006-2017 by Andreas Rumpf git hash: 416aa921fa0cfefda5f3ee30329c8378f2e2008a active boot switches: -d:release

Re: Help wrapping C library in Nim using const char*

2017-12-09 Thread Udiknedormin
Compiles just fine for my Nim 0.17.2.

Re: Do we have a RTree or R*Tree for Nim?

2017-12-09 Thread Udiknedormin
Use object variants, they're exactly for cases like that --- the number of variants is fixed.