April 16
On Saturday, 16 April 2022 at 19:33:16 UTC, a11e99z wrote:
> On Saturday, 16 April 2022 at 17:29:41 UTC, Adam D Ruppe wrote:
>> On Saturday, 16 April 2022 at 17:17:57 UTC, Tobias Pankrath wrote:
>>> You have a pointer to the Windows API you mention? Do you mean overlapped io?
>> Yes. WriteFileEx and associated things.
> https://docs.microsoft.com/en-us/troubleshoot/windows/win32/asynchronous-disk-io-synchronous#asynchronous-io-still-appears-to-be-synchronous

If your point is that the Windows API is both easy to use and performs well for the majority of cases, I agree. When data is issued from a cache, it is faster to just issue the answer and saves you from an allocation down the line since you can keep the buffer in the pool.

Of course, there are some cases where you need to do extra tuning, but the api makes it possible.

Maybe in theory we could invent something better, but for one, it is going to need to be built on what the operating system provides anyway, and really, when it comes to api design, you're often in good shape copying something that is widely used in the real world - even if it is less than perfect, at least its quirks are well documented.
April 16

On Saturday, 16 April 2022 at 19:20:25 UTC, IGotD- wrote:


On Saturday, 16 April 2022 at 16:25:16 UTC, Paul Backus wrote:


Why wait for Phobos to get its act together? Put it up on dub and we can start playing around today.

Because it should be an official async Phobos interface that other libraries can use. There already exist async libraries which are half done and maintained. Also you shouldn't be forced to pull some third party library for basic IO functionality.

A library can be "official" and "first party" without being part of Phobos. For example, it could be owned by the Github dlang organization, and have its documentation hosted on dlang.org alongside the official standard library docs.

There are substantial advantages to putting a library on dub rather than in Phobos, including the ability to release breaking changes using semantic versioning, and the ability to release updates independently of Phobos's release schedule.

As far as "half done and maintained" goes...the people writing and maintaining libraries on dub and the people writing and maintaining Phobos modules are, for the most part, the same people. If they couldn't do a good enough job to satisfy you on dub, what makes you think they'll do a better job in Phobos?

April 18
On Saturday, 16 April 2022 at 13:08:51 UTC, Adam D Ruppe wrote:
> On Saturday, 16 April 2022 at 10:19:22 UTC, IGotD- wrote:
>> Is there any planning or work to move Phobos towards natively asynchronous IO? Right now most IO is synchronous like you would expect from an API from the 90s.
> Windows 95 included native asynchronous I/O (and it is quite pleasant to use, this is probably what the api should be based on). These things aren't as new as you think lol
> But I don't think there's any plans for Phobos at all.

Could you give link to read more about it?
Next ›   Last »
1 2