Re: Is there some kind of Blocking Queue for D?

2025-07-13 Thread Steven Schveighoffer via Digitalmars-d-learn
On Saturday, 12 July 2025 at 23:55:39 UTC, Ali Çehreli wrote: On 7/11/25 11:36 PM, Bienlein wrote: > Unhappily class MessageBox is private and therefore cannot be reused. Ah! :) That's one more data point against 'private', that little feature that helps with nothing. I don't know what langua

Re: Is there some kind of Blocking Queue for D?

2025-07-13 Thread H. S. Teoh via Digitalmars-d-learn
On Sat, Jul 12, 2025 at 06:35:42PM -0600, Jonathan M Davis via Digitalmars-d-learn wrote: > On Saturday, July 12, 2025 5:55:39 PM Mountain Daylight Time Ali Çehreli via > Digitalmars-d-learn wrote: [...] > > Meanwhile, engineers like you suffer because of 'private'. I pick > > engineering over 'p

Re: Is there some kind of Blocking Queue for D?

2025-07-13 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, July 13, 2025 5:00:12 AM Mountain Daylight Time Bienlein via Digitalmars-d-learn wrote: > On Sunday, 13 July 2025 at 00:35:42 UTC, Jonathan M Davis wrote: > > > Whereas I think that using private makes perfect sense when you > > want something to be an implementation detail. Exposing it

Re: Is there some kind of Blocking Queue for D?

2025-07-13 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, July 13, 2025 8:38:08 AM Mountain Daylight Time H. S. Teoh via Digitalmars-d-learn wrote: > On Sat, Jul 12, 2025 at 06:35:42PM -0600, Jonathan M Davis via > Digitalmars-d-learn wrote: > > On Saturday, July 12, 2025 5:55:39 PM Mountain Daylight Time Ali Çehreli > > via Digitalmars-d-le

Re: Is there some kind of Blocking Queue for D?

2025-07-13 Thread Ali Çehreli via Digitalmars-d-learn
On 7/12/25 5:35 PM, Jonathan M Davis wrote: > On Saturday, July 12, 2025 5:55:39 PM Mountain Daylight Time Ali Çehreli via Digitalmars-d-learn wrote: >> On 7/11/25 11:36 PM, Bienlein wrote: >> >> > Unhappily class MessageBox is private and therefore cannot be reused. >> >> Ah! :) That's one

Re: Is there some kind of Blocking Queue for D?

2025-07-13 Thread Renato Athaydes via Digitalmars-d-learn
On Saturday, 12 July 2025 at 23:55:39 UTC, Ali Çehreli wrote: On 7/11/25 11:36 PM, Bienlein wrote: The only thing 'private' achieves is this: You don't want your users to be disappointed when they go out of their way to use features that they are advised not to use, and those features behave

Re: Is there some kind of Blocking Queue for D?

2025-07-13 Thread Bienlein via Digitalmars-d-learn
On Sunday, 13 July 2025 at 00:35:42 UTC, Jonathan M Davis wrote: Whereas I think that using private makes perfect sense when you want something to be an implementation detail. Exposing it means that you have to deal with someone using it, you have to design its API for public use, and you can'

Re: Is there some kind of Blocking Queue for D?

2025-07-13 Thread Guillaume Piolat via Digitalmars-d-learn
On Thursday, 10 July 2025 at 09:22:30 UTC, Bienlein wrote: Hello, I'm looking for some kind of blocking queue for D, that is if the queue is empty the thread doing a take on the queue is blocked until an item has been added to the queue. Couldn't find anything in the standard library. Thank

Re: result of FFT

2025-07-13 Thread Guillaume Piolat via Digitalmars-d-learn
On Tuesday, 8 July 2025 at 18:11:27 UTC, Matthew wrote: What do the 4096 resulting complex numbers represent Bin 0 is energy at 0Hz Bin 1 to 2047 are energy at (bin * samplingRate / 4096) hz Bin 2048 is energy at Nyquist frequency Bin 2049 to 4095 are the energy for negative frequencies and co

Re: Is there some kind of Blocking Queue for D?

2025-07-13 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, July 13, 2025 1:45:01 PM Mountain Daylight Time Ali Çehreli via Digitalmars-d-learn wrote: > On 7/12/25 5:35 PM, Jonathan M Davis wrote: > > On Saturday, July 12, 2025 5:55:39 PM Mountain Daylight Time Ali > Çehreli via Digitalmars-d-learn wrote: > Anything can be a part of the impleme