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
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
My use case is probably a game. I think I will use a mix of finalizers and
explicit cleanup.
subset including file/string compression/decompression funcs: git clone
[https://github.com/freevryheid/nim-lzma.git](https://github.com/freevryheid/nim-lzma.git)
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...
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.
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
Compiles just fine for my Nim 0.17.2.
Use object variants, they're exactly for cases like that --- the number of
variants is fixed.