Re: Do you have a better way to remove element from a array?

2024-08-10 Thread mw via Digitalmars-d-learn
On Thursday, 5 February 2015 at 14:09:10 UTC, bearophile wrote: Tobias Pankrath: Works as designed: http://dlang.org/phobos/std_algorithm.html#.remove Unfortunately it's one of the worst designed functions of Phobos: https://issues.dlang.org/show_bug.cgi?id=10959 Bye, bearophile Hit this

Re: Event struct via registers

2024-08-10 Thread claptrap via Digitalmars-d-learn
On Saturday, 10 August 2024 at 08:18:54 UTC, Vitaliy Fadeev wrote: On Saturday, 10 August 2024 at 08:06:42 UTC, IchorDev wrote: Is your application highly performance critical? Many input event + many internal ui events -> many calls * many objects. Yes, I like the fast, responsive interface

Re: Getting started

2024-08-10 Thread Ian via Digitalmars-d-learn
On Saturday, 10 August 2024 at 18:11:25 UTC, Sergey wrote: On Saturday, 10 August 2024 at 16:50:11 UTC, Ian wrote: How do I get started with Windows desktop programming in D? Any recommended IDEs? (I have decent experience with C/C++) Hi Ian. Many people who previously worked with Visual Stud

Re: Event struct via registers

2024-08-10 Thread Basile B. via Digitalmars-d-learn
On Saturday, 10 August 2024 at 07:46:46 UTC, Vitaliy Fadeev wrote: ## Trouble 1 Pass the structure through registers ? [...] How to implement on D? You dont need to pass whole event. The obvious design for this kind of things is that you declare a local event that's an union of all possibl

Re: Getting started

2024-08-10 Thread Sergey via Digitalmars-d-learn
On Saturday, 10 August 2024 at 16:50:11 UTC, Ian wrote: How do I get started with Windows desktop programming in D? Any recommended IDEs? (I have decent experience with C/C++) Hi Ian. Many people who previously worked with Visual Studio like VisualD. For others one of the best support is in Vi

Re: Recommendations on porting Python to D

2024-08-10 Thread IchorDev via Digitalmars-d-learn
On Wednesday, 24 April 2024 at 19:50:45 UTC, Chris Piker wrote: is anyone aware of any tools that generate an abstract syntax tree which could then be converted to somewhat equivalent D code? Just keep in mind that dependence on such a method might cause you to overlook potential higher level

Re: Event struct via registers

2024-08-10 Thread Vitaliy Fadeev via Digitalmars-d-learn
On Saturday, 10 August 2024 at 08:29:20 UTC, Vitaliy Fadeev wrote: On Saturday, 10 August 2024 at 08:10:10 UTC, Vitaliy Fadeev wrote: On Saturday, 10 August 2024 at 08:04:10 UTC, Vitaliy Fadeev wrote: On Saturday, 10 August 2024 at 07:46:46 UTC, Vitaliy Fadeev wrote: ## Trouble 1 Pass the str

Re: Event struct via registers

2024-08-10 Thread Vitaliy Fadeev via Digitalmars-d-learn
On Saturday, 10 August 2024 at 08:10:10 UTC, Vitaliy Fadeev wrote: On Saturday, 10 August 2024 at 08:04:10 UTC, Vitaliy Fadeev wrote: On Saturday, 10 August 2024 at 07:46:46 UTC, Vitaliy Fadeev wrote: ## Trouble 1 Pass the structure through registers ? ## Trouble 2 Wrap the registries in a s

Re: Event struct via registers

2024-08-10 Thread Vitaliy Fadeev via Digitalmars-d-learn
On Saturday, 10 August 2024 at 08:04:10 UTC, Vitaliy Fadeev wrote: On Saturday, 10 August 2024 at 07:46:46 UTC, Vitaliy Fadeev wrote: ## Trouble 1 Pass the structure through registers ? ## Trouble 2 Wrap the registries in a structure ? How to implement on D? I try: ... But i have 0 in r3.

Re: Build fully static library by the compiler?

2024-08-10 Thread Denis Feklushkin via Digitalmars-d-learn
On Friday, 9 August 2024 at 22:32:21 UTC, Alex Bryan wrote: Point is that D can be not a main language of the project and it is unconvient to extract by somehow paths to phobos and druntime at last stages of project build. ldc2 has the --static option, though, looking from ldc2 --help I'm no

Re: Event struct via registers

2024-08-10 Thread IchorDev via Digitalmars-d-learn
On Saturday, 10 August 2024 at 07:46:46 UTC, Vitaliy Fadeev wrote: ## Trouble 1 Pass the structure through registers ? ## Trouble 2 Wrap the registries in a structure ? ## Use case I need to pass different events: `Draw_Event`, `Mouse_Move_Event`, `...` I need to pass an event to many objec

Re: Event struct via registers

2024-08-10 Thread Vitaliy Fadeev via Digitalmars-d-learn
On Saturday, 10 August 2024 at 07:46:46 UTC, Vitaliy Fadeev wrote: ## Trouble 1 Pass the structure through registers ? ## Trouble 2 Wrap the registries in a structure ? How to implement on D? I try: ``` import std.stdio; void main() { Event_1 event_1; event (event_1);