Re: Announcing libasync, a cross-platform D event loop

2015-07-11 Thread Suliman via Digitalmars-d
There's a path in the DWFileChange change structure, you can access it with change.path. You'll have to put it in a path parser to access the filename, such as std.path Could you give an example of usage? And where DWFileChange structure is located? I do not see it in watcher.d

Re: Announcing libasync, a cross-platform D event loop

2015-06-30 Thread Etienne via Digitalmars-d
On Sunday, 28 June 2015 at 15:09:25 UTC, Suliman wrote: On Saturday, 27 September 2014 at 18:21:18 UTC, Etienne wrote: On 2014-09-27 2:13 PM, Etienne wrote: engine (I have an ASN1 library in the works as well). It's nearly finished, it will allow BER/DER serialization to take place from

Re: Announcing libasync, a cross-platform D event loop

2015-06-30 Thread Suliman via Digitalmars-d
On Saturday, 27 September 2014 at 18:21:18 UTC, Etienne wrote: On 2014-09-27 2:13 PM, Etienne wrote: engine (I have an ASN1 library in the works as well). It's nearly finished, it will allow BER/DER serialization to take place from UDAs and native types at compile-time:

Re: Announcing libasync, a cross-platform D event loop

2015-06-30 Thread Etienne via Digitalmars-d
On Sunday, 28 June 2015 at 16:32:24 UTC, Suliman wrote: You can see an example in libasync.tests thanks! I have got few questions g_cbCheck = new shared bool[19]; what does it do? AsyncDirectoryWatcher g_watcher = new AsyncDirectoryWatcher(getThreadEventLoop()); Am I right understand that

Re: Announcing libasync, a cross-platform D event loop

2015-06-30 Thread Etienne Cimon via Digitalmars-d
On Sunday, 28 June 2015 at 16:57:44 UTC, Suliman wrote: Also next code that I take from example after run absolutely do not do nothing: This code will register a directory watcher in the working directory, on the thread's event loop, and then use timers to create file/folder activity to

Re: Announcing libasync, a cross-platform D event loop

2015-06-30 Thread Suliman via Digitalmars-d
Hmm, sorry that would be g_evl.loop(10.seconds) or getThreadEventLoop().loop(10.seconds). I use the vibe.d driver most often. I changed paths to hardcoded to prevent issue with them, but next code after run only create hey folder and nothing more. No files in it: { void

Re: Announcing libasync, a cross-platform D event loop

2015-06-30 Thread Etienne Cimon via Digitalmars-d
On Sunday, 28 June 2015 at 17:10:16 UTC, Etienne Cimon wrote: g_evl.run(10.seconds); Hmm, sorry that would be g_evl.loop(10.seconds) or getThreadEventLoop().loop(10.seconds). I use the vibe.d driver most often.

Re: Announcing libasync, a cross-platform D event loop

2015-06-30 Thread Suliman via Digitalmars-d
It's particularity of unit-test blocks, or why function are specified without return type like: g_evl = getThreadEventLoop(); Also next code that I take from example after run absolutely do not do nothing: void main() { auto g_evl = getThreadEventLoop(); auto g_cbCheck =

Re: Announcing libasync, a cross-platform D event loop

2015-06-30 Thread Suliman via Digitalmars-d
Ehm, there is issue on Windows or I am again doing something wrong? void main() { void dirWatcher() { auto g_watcher = new AsyncDirectoryWatcher(getThreadEventLoop()); g_watcher.run({ DWChangeInfo[1] change;

Re: Announcing libasync, a cross-platform D event loop

2015-06-30 Thread suliman via Digitalmars-d
Ok, but code still do exit after it's run. Look like loop is not started

Re: Announcing libasync, a cross-platform D event loop

2015-06-30 Thread Etienne via Digitalmars-d
On Tuesday, 30 June 2015 at 04:38:31 UTC, suliman wrote: Ok, but code still do exit after it's run. Look like loop is not started Yes, you need to watch for the return type which will be false in case of error while(getThreadEventLoop().loop(10.seconds)) continue;

Re: Announcing libasync, a cross-platform D event loop

2015-06-30 Thread Etienne Cimon via Digitalmars-d
On Sunday, 28 June 2015 at 19:34:46 UTC, Suliman wrote: void main() { void dirWatcher() { auto g_watcher = new AsyncDirectoryWatcher(getThreadEventLoop()); g_watcher.run({ DWChangeInfo[1] change; DWChangeInfo[]

Re: Announcing libasync, a cross-platform D event loop

2015-06-30 Thread Etienne Cimon via Digitalmars-d
On Sunday, 28 June 2015 at 18:33:28 UTC, Suliman wrote: Hmm, sorry that would be g_evl.loop(10.seconds) or getThreadEventLoop().loop(10.seconds). I use the vibe.d driver most often. I changed paths to hardcoded to prevent issue with them, but next code after run only create hey folder and

Re: Announcing libasync, a cross-platform D event loop

2015-06-30 Thread Suliman via Digitalmars-d
void main() { void dirWatcher() { auto g_watcher = new AsyncDirectoryWatcher(getThreadEventLoop()); g_watcher.run({ DWChangeInfo[1] change; DWChangeInfo[] changeRef = change.ptr[0..1];

Re: Announcing libasync, a cross-platform D event loop

2015-06-30 Thread Suliman via Digitalmars-d
You can see an example in libasync.tests thanks! I have got few questions g_cbCheck = new shared bool[19]; what does it do? AsyncDirectoryWatcher g_watcher = new AsyncDirectoryWatcher(getThreadEventLoop()); Am I right understand that it's run new eventloop inside AsyncDirectoryWatcher

Re: Announcing libasync, a cross-platform D event loop

2015-06-30 Thread Suliman via Digitalmars-d
Try putting the timers outside the callbacks in the meantime. I'll test it tomorrow when I'm at the office =) Ok. Thanks. I did: dirWatcher(); getThreadEventLoop().loop(10.seconds); destroyAsyncThreads(); same result.

Re: Announcing libasync, a cross-platform D event loop

2015-06-30 Thread Etienne via Digitalmars-d
On Monday, 29 June 2015 at 20:34:11 UTC, Suliman wrote: Ehm, there is issue on Windows or I am again doing something wrong? void main() { void dirWatcher() { auto g_watcher = new AsyncDirectoryWatcher(getThreadEventLoop()); g_watcher.run({

Re: Announcing libasync, a cross-platform D event loop

2014-09-27 Thread Dmitry Olshansky via Digitalmars-d
24-Sep-2014 17:13, Etienne пишет: It's finally here: https://github.com/etcimon/libasync We all know how event loops are the foundation of more popular libraries Qt and Nodejs.. we now have a natively compiling async library entirely written in D. This event library was tested on Win32, Linux

Re: Announcing libasync, a cross-platform D event loop

2014-09-27 Thread Etienne via Digitalmars-d
On 2014-09-27 12:25 AM, Adam Wilson wrote: You mentioned Botan. I already have a C++ = D Wrapper project going over here: https://github.com/ellipticbit/titanium I am working out a bug where the memory corrupts itself when passing data back to D but it works and most of the leg-work is done.

Re: Announcing libasync, a cross-platform D event loop

2014-09-27 Thread Joakim via Digitalmars-d
On Saturday, 27 September 2014 at 17:06:53 UTC, Etienne wrote: On 2014-09-27 12:25 AM, Adam Wilson wrote: You mentioned Botan. I already have a C++ = D Wrapper project going over here: https://github.com/ellipticbit/titanium I am working out a bug where the memory corrupts itself when

Re: Announcing libasync, a cross-platform D event loop

2014-09-27 Thread Etienne via Digitalmars-d
On 2014-09-27 2:07 PM, Joakim wrote: How long do you think that's going to take? What do you plan to do about ongoing C++ patches added to the original C++ botan version? Maybe developing something like Daniel Murphy's DDMD magicport for botan would save you some time from doing it all

Re: Announcing libasync, a cross-platform D event loop

2014-09-27 Thread Etienne via Digitalmars-d
On 2014-09-27 2:13 PM, Etienne wrote: engine (I have an ASN1 library in the works as well). It's nearly finished, it will allow BER/DER serialization to take place from UDAs and native types at compile-time: https://github.com/globecsys/asn1.d

Re: Announcing libasync, a cross-platform D event loop

2014-09-26 Thread Andrej Mitrovic via Digitalmars-d
On 9/24/14, Etienne via Digitalmars-d digitalmars-d@puremagic.com wrote: It's finally here: https://github.com/etcimon/libasync Small nitpick with the spelling: asynchroneous = asynchronous. I personally don't care about spelling but many people tend to (unfortunately) look the other way when

Re: Announcing libasync, a cross-platform D event loop

2014-09-26 Thread Etienne via Digitalmars-d
On 2014-09-26 5:29 AM, Andrej Mitrovic via Digitalmars-d wrote: Small nitpick with the spelling: asynchroneous = asynchronous. I personally don't care about spelling but many people tend to (unfortunately) look the other way when they find typos. Hm, my french messed with my mind on that one

Re: Announcing libasync, a cross-platform D event loop

2014-09-26 Thread Adam Wilson via Digitalmars-d
On Wed, 24 Sep 2014 06:13:31 -0700, Etienne etci...@gmail.com wrote: It's finally here: https://github.com/etcimon/libasync We all know how event loops are the foundation of more popular libraries Qt and Nodejs.. we now have a natively compiling async library entirely written in D. This

Re: Announcing libasync, a cross-platform D event loop

2014-09-25 Thread Jacob Carlborg via Digitalmars-d
On 24/09/14 22:09, Etienne wrote: I've thought about it but it isn't compatible with other BSD platforms and has no docs about using it with kqueue, it ended up looking more complicated and unstable because I could read complaints everywhere I looked. It ended up putting me in a direction where

Re: Announcing libasync, a cross-platform D event loop

2014-09-25 Thread Etienne via Digitalmars-d
On 2014-09-25 2:51 AM, Jacob Carlborg wrote: The only complains I've seen with FSEvents is that it doesn't support notifying about file changes, only directory changes. But that has been fixed in OS X 10.7 so that complain is moot. Good, and according to the stats I've seen, 95% of users are

Re: Announcing libasync, a cross-platform D event loop

2014-09-25 Thread Martin Nowak via Digitalmars-d
On 09/24/2014 06:30 PM, Etienne wrote: This is fantastic! We really need something like this in a Facebook project. That's pleasing to hear, although I'm pretty sure Facebook is far from being the only organization who will benefit from this ;) Who doesn't need something like this?

Re: Announcing libasync, a cross-platform D event loop

2014-09-25 Thread Sean Kelly via Digitalmars-d
On Thursday, 25 September 2014 at 03:29:03 UTC, Zhao Puming wrote: Great work Etienne! will libasync make it into phobos? I certainly hope so. We need async functionality if we're to ever have a decent socket package in Phobos.

Re: Announcing libasync, a cross-platform D event loop

2014-09-25 Thread H. S. Teoh via Digitalmars-d
On Thu, Sep 25, 2014 at 11:48:29PM +, Sean Kelly via Digitalmars-d wrote: On Thursday, 25 September 2014 at 03:29:03 UTC, Zhao Puming wrote: Great work Etienne! will libasync make it into phobos? I certainly hope so. We need async functionality if we're to ever have a decent socket

Re: Announcing libasync, a cross-platform D event loop

2014-09-25 Thread Etienne Cimon via Digitalmars-d
On 2014-09-25 19:34, Martin Nowak wrote: One thing that always bothers me with async libraries is that now every IO class has it async cousin, so there is Socket and AsyncSocket, resolveDNS and asyncResolveDNS. With Fibers and a Scheduler it's actually possible to present the same API to

Announcing libasync, a cross-platform D event loop

2014-09-24 Thread Etienne via Digitalmars-d
It's finally here: https://github.com/etcimon/libasync We all know how event loops are the foundation of more popular libraries Qt and Nodejs.. we now have a natively compiling async library entirely written in D. This event library was tested on Win32, Linux x64, Mac OS x64, with DMD

Re: Announcing libasync, a cross-platform D event loop

2014-09-24 Thread Andrei Alexandrescu via Digitalmars-d
On 9/24/14, 6:13 AM, Etienne wrote: It's finally here: https://github.com/etcimon/libasync This is fantastic! We really need something like this in a Facebook project. Would be appropriate for you to consider making a bid for adding it to Phobos? In that case one issue to address is

Re: Announcing libasync, a cross-platform D event loop

2014-09-24 Thread Szymon Gatner via Digitalmars-d
On Wednesday, 24 September 2014 at 13:13:34 UTC, Etienne wrote: It's finally here: https://github.com/etcimon/libasync We all know how event loops are the foundation of more popular libraries Qt and Nodejs.. we now have a natively compiling async library entirely written in D. This event

Re: Announcing libasync, a cross-platform D event loop

2014-09-24 Thread Etienne via Digitalmars-d
This is fantastic! We really need something like this in a Facebook project. That's pleasing to hear, although I'm pretty sure Facebook is far from being the only organization who will benefit from this ;) Would be appropriate for you to consider making a bid for adding it to Phobos?

Re: Announcing libasync, a cross-platform D event loop

2014-09-24 Thread via Digitalmars-d
On Wednesday, 24 September 2014 at 13:13:34 UTC, Etienne wrote: It's finally here: https://github.com/etcimon/libasync We all know how event loops are the foundation of more popular libraries Qt and Nodejs.. we now have a natively compiling async library entirely written in D. I am very

Re: Announcing libasync, a cross-platform D event loop

2014-09-24 Thread Andrei Alexandrescu via Digitalmars-d
On 9/24/14, 9:30 AM, Etienne wrote: This is fantastic! We really need something like this in a Facebook project. That's pleasing to hear, although I'm pretty sure Facebook is far from being the only organization who will benefit from this ;) Would be appropriate for you to consider

Re: Announcing libasync, a cross-platform D event loop

2014-09-24 Thread Andrei Alexandrescu via Digitalmars-d
On 9/24/14, 6:13 AM, Etienne wrote: It's finally here: https://github.com/etcimon/libasync http://www.reddit.com/r/programming/comments/2hcm9n/announcing_libasync_a_crossplatform_d_event_loop/ Andrei

Re: Announcing libasync, a cross-platform D event loop

2014-09-24 Thread Jacob Carlborg via Digitalmars-d
On 2014-09-24 15:13, Etienne wrote: It's finally here: https://github.com/etcimon/libasync We all know how event loops are the foundation of more popular libraries Qt and Nodejs.. we now have a natively compiling async library entirely written in D. This event library was tested on Win32,

Re: Announcing libasync, a cross-platform D event loop

2014-09-24 Thread Etienne via Digitalmars-d
On 2014-09-24 3:15 PM, Jacob Carlborg wrote: Shouldn't the directory watcher use FSEvents on OS X? I've thought about it but it isn't compatible with other BSD platforms and has no docs about using it with kqueue, it ended up looking more complicated and unstable because I could read

Re: Announcing libasync, a cross-platform D event loop

2014-09-24 Thread ketmar via Digitalmars-d
On Wed, 24 Sep 2014 09:13:31 -0400 Etienne via Digitalmars-d digitalmars-d@puremagic.com wrote: It's finally here: https://github.com/etcimon/libasync We all know how event loops are the foundation of more popular libraries Qt and Nodejs.. we now have a natively compiling async library

Re: Announcing libasync, a cross-platform D event loop

2014-09-24 Thread Zhao Puming via Digitalmars-d
Great work Etienne! will libasync make it into phobos? On Wednesday, 24 September 2014 at 13:13:34 UTC, Etienne wrote: It's finally here: https://github.com/etcimon/libasync We all know how event loops are the foundation of more popular libraries Qt and Nodejs.. we now have a natively