Example implementing SQLite extension in Nim

2022-04-03 Thread Isofruit
This looks insanely cool, I just stumbled over the thread. I never even had the idea to do this, but if you can make it work well-ish, I'll likely also try my hand. I'd love nothing more to be able to build something for this tiny database that I've fallen in love with given how much it can do.

Control+C and procs launched with execCmd

2022-04-03 Thread teras
To answer my own question, and maybe to help future people on this forum. It seems that with `execCmd` this is not possible. My guess is, since it is forwarding the standard input to the child process, this also forwards the "break" event. I managed to solve this using a different approach. I a

net: recv/readLine: How receive more one line or not waiting for fill buffer size?

2022-04-03 Thread thegrapevine
Good! Using newSocket(buffered=false) works very well.

[Karax] "include" statement doesn't work correctly inside karax DSL

2022-04-03 Thread ynfle
How a DSL be done then? Wouldn't everything be expanded?

Times - Intended use and difference between DateTime and Time

2022-04-03 Thread volodymyr
Thank you, @Symb0lica, for your advice! It makes complete sense to me! Finally I found the `Time => DateTime` conversion via `inZone()`, `local()`, and `utc()` functions. Defaulting to `Time` is reasonable as well. Thank you!

net: recv/readLine: How receive more one line or not waiting for fill buffer size?

2022-04-03 Thread sls1005
Use `newSocket(buffered=false)` if you don't want it to be blocked.

net: recv/readLine: How receive more one line or not waiting for fill buffer size?

2022-04-03 Thread shirleyquirk
How many bytes are available is not a fixed number when dealing with byte streams, it can change at any time. You can use the version of [recv with a timeout](https://nim-lang.org/docs/net.html#recv%2CSocket%2Cstring%2Cint%2Cint) and a suitably large number Or mess about with ioctl and FIONREA