Spot the memory leak when using Chronos and Chronos/threadsync.ThreadSignalPtr

2024-05-20 Thread Isofruit
First up, thanks a ton for making me aware of "onThreadDestruction", I was very much not aware and am a huge fan of more explicit hooks like that. I'll include that going forward for sure. Next up, regarding the ThreadDispatcher: > Looking at the log you provided in the GitHub issue, the intern

find field value object in seq and declared object in seq

2024-05-20 Thread ingo
Thank you both. Enough to fiddle with. The goal is to find the index of the first occurrence of Box(food: value), if at all. Like `seq.find(value)` Cheers.

Spot the memory leak when using Chronos and Chronos/threadsync.ThreadSignalPtr

2024-05-20 Thread Zerbina
Looking at the log you provided in the GitHub issue, the internal per-thread dispatcher (which is a `ref` object) is what causes the leak, as `.threadvar`'s aren't destroyed on thread exit. * * * Not directly related to the leak, but the way you're using `cleanupThread` doesn't guarantee that

find field value object in seq and declared object in seq

2024-05-20 Thread Isofruit
Not entirely sure what exactly you want findInObjSeq to do. Is this supposed to return you a count? An Index? An instance from the list? Either way, if you want to get past this entirely without macros you will need to make use of the `when` keyword instead of "if". And also the fieldpairs iter

find field value object in seq and declared object in seq

2024-05-20 Thread janAkali
>From your example it seems that you want to count quantity of specified items >in seq. You can do this easily with `sequtils.countIt`: import std/sequtils echo c1.content.countIt(it.food == true) # 3 Run If you don't need a count and only want to check if item is

Spot the memory leak when using Chronos and Chronos/threadsync.ThreadSignalPtr

2024-05-20 Thread Isofruit
I'm writing this here as well as on the issue tracker () in the hopes that maybe somebody with more experience can see the problem. So I'm playing around with a multithreading lib that has a while-loop going on another thread that has an asyn

find field value object in seq and declared object in seq

2024-05-20 Thread ingo
How does one find out whether a field in an object in an array exists? The commented out `echo declared(c1.content[0].thing)` errors. How do I find whether a value in a field of an object in an array exists using a proc, or template? The commented out code shows my failure. type

How to catch exceptions in Chronos raised by asyncCheck'd Futures?

2024-05-20 Thread Isofruit
The answer after chatting with arne about it in the corresponding github issue () : You don't catch them. If `waitFor` ing somewhere triggers an exception (aka the event-loop being worked through triggers an exception) then you're risking resource leakag

Naylib - yet another raylib wrapper becomes available

2024-05-20 Thread planetis
A little heads up, v5.1.2 is a release that tracks the upstream 5.1-dev version, it was a while since the last version and we needed a refresh. And in this release I decided to finally remove the raylib git submodule that takes ages to clone. Now the C header files are distributed with naylib an

Working with sequences

2024-05-20 Thread Zoom
const a = [1, 2, 3] b = [-1, 2, 5] c = [1, -2, 4] s = [a, b, c] block original: var x, y, z: seq[int] for arr in s: x.add(arr[0]) y.add(arr[1]) z.add(arr[2]) echo [min(x), min(y), min(z)] #(-1, -2, 3)

HappyX web framework got a new sponsor

2024-05-20 Thread mabon
HappyX looks great, but it always causes Nimbuggest and Nimlsp crashes in vscode. I have tried all known nim and nimlsp extensions, but none are available. Am I the only one who has encountered this situation?

Super-weird error with builds on latest Windows runner (Github)

2024-05-20 Thread ringabout
Well, LinenoiseCompletions* {.bycopy, importc: "linenoiseCompletions".} = object len*: csize_t cvec*: cstringArray Run Shouldn't `importc: linenoiseCompletions` be used? It doesn't seem to be a Nim bug to me

https://www.facebook.com/Twin.Elements.CBD.Gummies.Official.Page/

2024-05-20 Thread Burama026
Twin Elements CBD Gummies:- Elements CBD Gummies is an overhaul that broadcasts to address the essential avocation behind sexual issues, instead of different enhancements or medications that fundamentally address the delaye

Nim on the go: Smartphone, termux and ... "no" docs.

2024-05-20 Thread warnersmith43
That's a cool way to learn Nim! Especially impressive considering you didn't have mobile internet. Leveraging the offline resources like the docs and standard library source code sounds really effective. Nim's focus on readability and a clean syntax [1] probably made those resources easier to d

Working with sequences

2024-05-20 Thread allanmax3321
You're absolutely right, there's a more efficient way to find the minimums in Nim! Here's how you can achieve the same result without creating temporary sequences: Using fold: The fold function in Nim allows you to accumulate a value based on each element in a sequence. Here's how you can use

Expert Tips for Maximizing the Effects of Pure Fuel Keto ACV Gummies in 2024

2024-05-20 Thread carlcpack
Get Pure Fuel Keto ACV Gummies on the official website. 🔥✅Use this Link to Get OriginalPure Fuel Keto ACV Vision Support Here: Pure Fuel Keto ACV Gummies :- Ultimately, the important thing to any powerful weight loss or health app