Interface C++ objects with `wasMoved`?

2023-02-05 Thread sls1005
As I can remember, calling `wasMoved` without calling `=destroy` first will cause memory leak. I guess it nil-ifies the reference without freeing the memory, as it's intend to be used on an object that's already destroyed, preventing it from being destroyed twice. I also make use of this for in

Interface C++ objects with `wasMoved`?

2023-02-05 Thread elcritch
> I will share my experience with threading/channels It's certainly broken > right now. You can verify that easily by running the example (including the > clang ThreadSanitizer with Thanks, are you using the standard channel impl? I'm using the `threading/channels` implementation, and it's work

Possible way for easy android app creation without JAVA!

2023-02-05 Thread curioussav
Oh boy, this guy has all kinds of fun stuff. VR app running on meta quest in just c I may have to try replicating that one in just nim

Possible way for easy android app creation without JAVA!

2023-02-05 Thread curioussav
Hey everyone, the topic of writing android apps has come up before over the years. Goes without saying but it's a hard problem. I did just find a cool project here: and I'm wondering if this looks promising. It looks like a pretty active project so If w

what's with deepCopy?

2023-02-05 Thread foxoman
>From Nim 1.4 release blog post: Known incompatibilities and gotchas Deepcopy If you use system.deepCopy in your code, you need to enable it via --deepCopy:on on the command line. This is a band-aid and a better solution for this will arrive in the future. The reason for this opt-in switch is t

what's with deepCopy?

2023-02-05 Thread auxym
Correct, that won't copy children refs. Which is why deepcopy is useful. But I've also found myself wondering why deepcopy needs a separate compiler option and what are the tradeoffs involved. I hope araq or someone else familiar with ARC internals will be able to shed some light.

Interface C++ objects with `wasMoved`?

2023-02-05 Thread planetis
I am not an expert but since none replied so far, I will share my experience with threading/channels It's certainly broken right now. You can verify that easily by running the example (including the clang ThreadSanitizer with --cc:clang -t:"-fsanitize=thread" -l:"-fsanitize=thread"

Idiomatic way of creating named closures

2023-02-05 Thread mode80
Your use of closure inside blocks is really cool and more than I gathered was possible from the manual. Thanks for sharing.

what's with deepCopy?

2023-02-05 Thread treeform
Don't you need to copy all of the refs too? Or does that some how does it too?

what's with deepCopy?

2023-02-05 Thread sls1005
Then you do this: proc myDeepCopy[T](src: ref T): ref T = new(result) result[] = src[] proc myDeepCopy[T](dst, src: ref T) = dst[] = src[] Run

NimForUE

2023-02-05 Thread jmgomez
NimForUE got featured in [https://www.youtube.com/watch?v=Cdr4-cOsAWA&t=2s&ab_channel=Gamefromscratch](https://www.youtube.com/watch?v=Cdr4-cOsAWA&t=2s&ab_channel=Gamefromscratch) I also uploaded a new vid: On the development side I have a WIP of the virtual functi

what's with deepCopy?

2023-02-05 Thread mode80
I found myself needing a deep copy of a ref object, and reached for the aptly named deepCopy proc in System. But then I got the error: "for --gc:arc|orc 'deepcopy' support has to be enabled with --deepcopy:on" I suppose I'll turn it on, but it seems like there must be a performance trade-off?

Nim for Beginners video series discussion thread

2023-02-05 Thread Kiloneie
Nim for Beginners Object Variants Part 2 is now live at: This video goes into more detail and depth of the subject, with comparisons with Inheritance.

Nim v2: what would you change?

2023-02-05 Thread yeabsira
i would create class, object oriented like java as a featcher