Re: Providing writable string buffer to a foreign C-function

2017-09-21 Thread Araq
Use something like: var errBuf = newStringOfCap(256) retCode = do_something(..., errBuf.cstring) if retCode < 0: # if the API doesn't tell us about the size ... but it really should! errBuf.setLen(len(cstring(errBuf)) echo "ERROR: ", errBuf

Re: spacemacs / emacs nimsuggest?

2017-09-21 Thread Araq
Run `koch nimsuggest` or `koch tools` to get a working nimsuggest.

Re: Using `string` vs `seq[uint8]` for non-text data

2017-09-21 Thread Araq
Yes, use `seq[byte]` already.

Re: Using `string` vs `seq[uint8]` for non-text data

2017-09-21 Thread def_pri_pub
Sorry to be a bit of a pest, but I want to know if this is the thing I should be doing or not for my Nim code now?

Re: Get a constant passed to a macro call

2017-09-21 Thread Lando
Added some type safety, used _fieldPairs_ instead of _items_ as an iterator: import macros, tables, strutils type SettingsType = tuple[x: int, y: int, Q: float] const ProgramName = "MyProgram" const Settings = (x: 5, y: 3, Q: 12.0) template

WAP Setup Needed for Verizon DSL?

2017-09-21 Thread adrienne224
I'm using a Westell 327 modem/router with WEP that works fine. Looking to go WAP/WAP2. I know how to get to the config screen on the Westell. What do I do from there? Also, how do I generate a random code string for WAP?

Re: Introducing Reel Valley

2017-09-21 Thread yglukhov
@Udiknedormin can you provide your os version, browser version, is your browser 32 or 64 bit, your hardware configuration? Thanks.

Re: .. code-block:: nim

2017-09-21 Thread sflennik
Thank you. I did need to indent my code block.

Re: Cygwin almost perfect... Nimble pathing help

2017-09-21 Thread ollie
s/and paths/any paths/

Re: Cygwin almost perfect... Nimble pathing help

2017-09-21 Thread ollie
You need to be very careful not to mix posix with win32 on cygwin if you want to remain sane. That looks like mingw32 nimble running cygwin git. Using a mingw32 git (or any win32 git binary) should work.

Re: Untyped overloading?

2017-09-21 Thread Udiknedormin
@stisa Yeah, I tried it. The problem is it will still returns the same macro call as an open symbol doesn't exclude recursion. It seems to me I need to get the actual candidates list, not just generate mixin code.

Re: Introducing Reel Valley

2017-09-21 Thread Udiknedormin
@andrea Well, I admit I didn't wait that long. ^^" I just closed the tab after one minute or so.