Re: TLS variable for only one thread

2025-02-19 Thread Jonathan M Davis via Digitalmars-d-learn
On Wednesday, February 19, 2025 11:24:36 PM MST IchorDev via Digitalmars-d-learn wrote: > On Saturday, 15 February 2025 at 10:09:39 UTC, Jonathan M Davis > wrote: > > I think that you need to be clearer about what you're trying to > > do. If a module-level variable is not shared, __gshared, or > >

Re: Looking for a simple GUI library that works with Vulkan on SDL2

2025-02-19 Thread IchorDev via Digitalmars-d-learn
On Wednesday, 19 February 2025 at 15:21:19 UTC, Danny Arends wrote: I've tried several different bindings to IMgui, however, none seem to work and seem abandoned to me (the most recent updated one 'bindbc-imgui' was updated 3 years ago). Actually, I have been working on an update to BindBC-ImG

Re: TLS variable for only one thread

2025-02-19 Thread IchorDev via Digitalmars-d-learn
On Saturday, 15 February 2025 at 10:09:39 UTC, Jonathan M Davis wrote: I think that you need to be clearer about what you're trying to do. If a module-level variable is not shared, __gshared, or immutable, then each thread gets a completely separate variable, and no other thread has access to t

Re: How to pass an InputRange of dchars to a function that wants an Input range of chars?

2025-02-19 Thread Jonathan M Davis via Digitalmars-d-learn
On Wednesday, February 19, 2025 7:48:48 PM MST Jonathan M Davis via Digitalmars-d-learn wrote: > So you should probably either just make your code operate on ranges of > dchar, or you'll need to wrap your ranges using byChar or byCodeUnit in > order to get ranges of char. All range-based functions

Re: How to pass an InputRange of dchars to a function that wants an Input range of chars?

2025-02-19 Thread monkyyy via Digitalmars-d-learn
On Wednesday, 19 February 2025 at 20:46:24 UTC, realhet wrote: On Wednesday, 19 February 2025 at 19:08:07 UTC, bauss wrote: On Wednesday, 19 February 2025 at 18:13:24 UTC, realhet wrote: ... std.conv.to can convert for you. Thx! I tried .map!(to!dchar) instead of .byChar and it still fai

Re: How to pass an InputRange of dchars to a function that wants an Input range of chars?

2025-02-19 Thread Jonathan M Davis via Digitalmars-d-learn
On Wednesday, February 19, 2025 11:13:24 AM MST realhet via Digitalmars-d-learn wrote: > Hello, > > The problematic line is at the very bottom. > > I only managed to make it run by precedding the .byChar with > .text, but that is unwanted because it would convert the whole > InputRange. > > How ca

Re: help with prime pairs code

2025-02-19 Thread Salih Dincer via Digitalmars-d-learn
On Friday, 31 January 2025 at 20:05:54 UTC, Jabari Zakiya wrote: I'm converting Ruby code to D and am running into issues. Would appreciate what needs to be done to get it to compile/run correctly. First of all, I see that you don't use reserve() at all in arrays. Since I work on a mobile pla

Re: How to pass an InputRange of dchars to a function that wants an Input range of chars?

2025-02-19 Thread realhet via Digitalmars-d-learn
On Wednesday, 19 February 2025 at 19:08:07 UTC, bauss wrote: On Wednesday, 19 February 2025 at 18:13:24 UTC, realhet wrote: ... std.conv.to can convert for you. Thx! I tried .map!(to!dchar) instead of .byChar and it still failed. But then I deleted the constraints where I detect if the

Re: How to pass an InputRange of dchars to a function that wants an Input range of chars?

2025-02-19 Thread bauss via Digitalmars-d-learn
On Wednesday, 19 February 2025 at 18:13:24 UTC, realhet wrote: ... std.conv.to can convert for you.

Re: Looking for a simple GUI library that works with Vulkan on SDL2

2025-02-19 Thread bauss via Digitalmars-d-learn
On Wednesday, 19 February 2025 at 15:59:38 UTC, ryuukk_ wrote: Forgot to mention: nanogui from drug007: https://github.com/drug007/nanogui Fluid from arta: https://forum.dlang.org/thread/wwdqjlrlbzyvodmkt...@forum.dlang.org minigui from adam: https://arsd-official.dpldocs.info/arsd.minigui.ht

How to pass an InputRange of dchars to a function that wants an Input range of chars?

2025-02-19 Thread realhet via Digitalmars-d-learn
Hello, The problematic line is at the very bottom. I only managed to make it run by precedding the .byChar with .text, but that is unwanted because it would convert the whole InputRange. How can I do this dchar->char conversion on only the required number of chars? (The kwSearch function wi

Re: Looking for a simple GUI library that works with Vulkan on SDL2

2025-02-19 Thread ryuukk_ via Digitalmars-d-learn
Forgot to mention: nanogui from drug007: https://github.com/drug007/nanogui Fluid from arta: https://forum.dlang.org/thread/wwdqjlrlbzyvodmkt...@forum.dlang.org minigui from adam: https://arsd-official.dpldocs.info/arsd.minigui.html

Re: Looking for a simple GUI library that works with Vulkan on SDL2

2025-02-19 Thread ryuukk_ via Digitalmars-d-learn
On Wednesday, 19 February 2025 at 15:21:19 UTC, Danny Arends wrote: Hey all, I am looking to integrate a GUI library like IMgui / Nuklear into my app that uses Vulkan within SDL2 for rendering so that it can run on Windows, Linux, and Android (https://github.com/DannyArends/CalderaD). I've

Looking for a simple GUI library that works with Vulkan on SDL2

2025-02-19 Thread Danny Arends via Digitalmars-d-learn
Hey all, I am looking to integrate a GUI library like IMgui / Nuklear into my app that uses Vulkan within SDL2 for rendering so that it can run on Windows, Linux, and Android (https://github.com/DannyArends/CalderaD). I've tried several different bindings to IMgui, however, none seem to wor

Re: help with prime pairs code

2025-02-19 Thread Sergey via Digitalmars-d-learn
On Wednesday, 19 February 2025 at 02:25:03 UTC, Salih Dincer wrote: have much time right now, I only saw 1 improvement. Below the GCD filter will give the same list (lhr[]). SDB@79 It is giving different result