Re: Synchronisation help

2024-01-03 Thread Anonymouse via Digitalmars-d-learn
On Tuesday, 2 January 2024 at 18:01:55 UTC, Jonathan M Davis wrote: [...] That clarifies a lot. If nothing else, I realise now I can't have `opBinaryRight(string op : "in")` the way I had hoped. What I have now probably doesn't cover 100% of every use-case, but it should do for my scope.

Re: sokol-d: Static Struct

2024-01-03 Thread Matheus Catarino via Digitalmars-d-learn
On Wednesday, 3 January 2024 at 18:57:44 UTC, ryuukk_ wrote: I managed to compile your project, ``sgl_context`` is working for me, it renders and roate [...] Wow! Cube and blend work, too? And on my machine it doesn't rotate, just like I initially posted. I had to remove this from

Re: sokol-d: Static Struct

2024-01-03 Thread ryuukk_ via Digitalmars-d-learn
On Wednesday, 3 January 2024 at 17:50:19 UTC, Matheus Catarino wrote: On Saturday, 30 December 2023 at 20:20:50 UTC, ryuukk_ wrote: I suspect you have a typo in one of your definition I debugged some existing bindings, and despite any user-level errors (via code) there's some conflict

Re: sokol-d: Static Struct

2024-01-03 Thread Matheus Catarino via Digitalmars-d-learn
On Saturday, 30 December 2023 at 20:20:50 UTC, ryuukk_ wrote: I suspect you have a typo in one of your definition I debugged some existing bindings, and despite any user-level errors (via code) there's some conflict between ABIs. In fact, it's mentioned by sokol's author below: I've been

Re: Pick a class at random

2024-01-03 Thread H. S. Teoh via Digitalmars-d-learn
On Wed, Jan 03, 2024 at 04:50:57PM +, axricard via Digitalmars-d-learn wrote: > I have an interface that is implemented by many classes, and I want to > pick one of these implementations at random. There are two more > constraints : first the distribution is not uniform, all classes can >

Pick a class at random

2024-01-03 Thread axricard via Digitalmars-d-learn
I have an interface that is implemented by many classes, and I want to pick one of these implementations at random. There are two more constraints : first the distribution is not uniform, all classes can define the chance they have to be picked (this is reflected by the function 'weight()'