let variable is not gc safe

2022-07-29 Thread jrfondren
Another option, if this is a microservice where changes in configuration can come with a recompilation: const SERVER_HOST* {.strdefine.} = "localhost" SERVER_PORT* {.intdefine.} = 5000 proc test {.gcsafe.} = echo (SERVER_HOST, SERVER_PORT) when isM

Ctrie in Nim for concurrent iterators?

2022-07-29 Thread Araq
> Unfortunately those use cases are often interesting ones (for me that's low > level, bare metal, or low latency data shuffling) and solutions like striped > locks aren't ideal either. I'm quite familiar with RCU. I remain skeptical though. It's not all that clear to me that a kernel really ne

Effect system: filtering tags

2022-07-29 Thread r3c
"Safety" is a mindset, not a language feature or concept. C# started with the "unsafe" keyword, then Rust came up and they use it as a selling argument. Just look at the kind of people it attracts :/ There is no "Safety"

Fidgets!

2022-07-29 Thread kobi
Great, I'm happy you're continuing this endeavor, I feel many in the community want a proper way to write gui apps in Nim.

Compiler error on Windows that doesn't occur on Mac/Linux

2022-07-29 Thread drkameleon
I can confirm the rule that... only when you properly format a question is it that you actually spot the problem: I now realized that the error was _not_ coming from the MPFR port, but from a totally different file (a "helper" module actually) and yes, in that case, I do have Windows-specific co

Compiler error on Windows that doesn't occur on Mac/Linux

2022-07-29 Thread drkameleon
I have started porting MPFR () to Nim and so far it's working rather fine: (there is a lot of commented-out code, mostly from the GMP port since they are too similar, and

Ctrie in Nim for concurrent iterators?

2022-07-29 Thread elcritch
> While you iterate new entries are being added. Since it's threadsafe and > lockfree there is no real bug here, the linked list supports this traversal. > But what are the actual semantics? Of course the semantics are tricky and I don't like lockless lists, but they're used a lot in kernel lan