Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Async/await - .NET compatible implementation
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Marek Gibek  
View profile  
 More options Jun 18 2012, 1:36 pm
From: Marek Gibek <gib...@gmail.com>
Date: Mon, 18 Jun 2012 10:36:40 -0700 (PDT)
Local: Mon, Jun 18 2012 1:36 pm
Subject: Async/await - .NET compatible implementation

I've just watched "Philip Laureano - I Can't Believe It's Not Roslyn" video
(http://vimeo.com/43612919) and I am thrilled. Really!! Meta programming in
.NET is what I needed since I started using WPF. So after watching the move
I was so excited.

But I didn't want to learn new language as I'm using C# at work. And I
started investigating Roslyn. But I was using VS 2012 RC and liked new
await/async language features. Roslyn doesn't implement them yet. Nemerle
too (not that await/async like .NET's 4.5 feature - *Nemerle's
concurrency.n uses Threads which is very different - and in my opinion less
flexible/efficient* - correct me if I'm wrong). But Nemerle is ready too
use. But not in VS 2012. So I thought maybe use Roslyn and I won't have to
learn new language. Or maybe I will use any existing C# parser and do C#
compile-time transformations myself. But after trying to use syntax unknown
for VS and I saw that it would work well without integration with editor
and intellisense - too much trouble. I was torn - none of the solutions was
ideal. I wanted to give a try to Roslyn, but then it refused installing :)
Grrrr....

So here I am. Maybe that's better. Maybe I will appreciate another
Nemerle's features. I will give it a try at least. Do I have any choice? :)
It's the first not mainstream language that attracted my attention. As you
see it can give me the fastest access to metaprogramming in .NET. I hope
that the integration with VS 2012 is planned in a near future....

As I said one reason of my indecision was async/await functionality. I
wanted it all :) And hey! Roslyn couldn't give me it now. But Nemerle - why
not? It's true it is targetting only .NET 4.0 now. But there is Microsoft's
AsyncTargettingPack for .NET 4.0. It requires VS2012 compiler, true. But
Nemerle is an extensible compiler. And compiled async code uses standard
.NET 4.0 features. There is state-machine struct underneath. Rest is
included in AsyncTargettingPack dll.

And now my question is:

         Is anyone working on this async/await featue compatible with .NET
4.5 async/await for Nemerle?

Because if not, I would like to try myself. It sounds so interesting that I
cannot resist. To make it clear - I'm not saying that I will accomplish
anything!! I even don't know the basics of the language, yet. First I need
to learn it. And I can do it only in my free time (which is very short).
And it is not a trivial macro to write. Especially when it takes loops and
try/catch statements into account. Maybe I will give up in a middle. Who
knows. But I know that if its done it will not need any change when
migrating to .NET 4.5. And it can be compatible with other .NET's async
code.

         Is there any interest for that kind of functionality?

         Can I count on your help in difficult situations? :)

         I think the macro possible. But I don't know the language yet. Do
you know any obstacles? For example - will I have any troubles with
generating private structs nested in classes, attributes for methods,
goto's and labels for state machine?

         I don't know Nemerle design goals. Is it the preffered way to
implement it as macro? How the future versions of Nemerle and Nemerle's C#
compiler (that is a big question for me) will handle this async/await
functionality? Will the code be shared or different for both compilers?
Will it be a macro or what?

Ok. But before anything else I'm going to start learning the basics :))

Best Regards,
Marek Gibek


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
gerrcrazzy  
View profile  
 More options Jun 19 2012, 3:24 am
From: gerrcrazzy <gerrcra...@gmail.com>
Date: Tue, 19 Jun 2012 00:24:41 -0700 (PDT)
Local: Tues, Jun 19 2012 3:24 am
Subject: Re: Async/await - .NET compatible implementation

You need more recent macro library named "Computation Expressions" (github<https://github.com/rsdn/nemerle/tree/master/snippets/ComputationExpre...>,
wiki <https://github.com/rsdn/nemerle/wiki/Computation-Expression-macro>,
samples<https://github.com/rsdn/nemerle/blob/master/snippets/ComputationExpre...>).
But even in this library implementation of "async" feature is different
with C# (author say's it's closer to F# async).

About a year ago in russian forum one man asked: "Do you plan implement
async/await from future versions of C#?" and answer was: "No, we are
already have Computation Expressions".

If you still want to start learn Nemerle here<https://github.com/IlyaGerasimets/Sandbox/wiki>is english version of Vladislav Chistyakov articles for beginners
(translation currently in progress).


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Marek Gibek  
View profile  
 More options Jun 19 2012, 6:48 am
From: Marek Gibek <gib...@gmail.com>
Date: Tue, 19 Jun 2012 03:48:31 -0700 (PDT)
Local: Tues, Jun 19 2012 6:48 am
Subject: Re: Async/await - .NET compatible implementation

Thank you!! It is a very helpful answer.

I didn't know about new "Computation Expressions". It's much better than
"concurrency.n" macro. First of all it is now not only about threads but
also introduces ExecutionContext. It looks very similar to C#'s approach (I
don't know F# but I did a quick test and F#'s async is not compatible with
C#'s await out of a box too). So similar that this will be a very good
start point for me.

I don't agree with a statement from forum that if we already have
Computation Expressions we don't want to be compatible with C#. I need that
compatibility :) I cannot cheat myself that I will use only Nemerle's
assemblies even in my own solutions. Many 3rd party libraries will be
created (C#'s async/await isn't in production yet). And I want to integrate
with them easily. And with my own code. And vice versa. It's unavoidable in
the near future, I think.

So here I am :). And I see now that the integration may be easier than I
initially thought.  It's because "Computation Expressions" looks powerful
enough. Maybe I don't need to generate exactly the same state machine at IL
level as C#'s compiler does *). Maybe all AST transformations are already
written :) Maybe the only thing I need to do is to introduce IAwaitable
support. It would be great!

And I am very grateful for the link to translation of Vladislav articles.
Yes, I still want to learn Nemerle! I would missed them otherwise (as they
are in sandbox yet) and they look very promising.

Thanks again,
Marek Gibek

*) Maybe it would be a little bit faster. Microsoft has rewritten this
state machine code at least for three times. But it's not my priority.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
VladD2  
View profile  
 More options Jun 20 2012, 1:34 am
From: VladD2 <v...@rsdn.ru>
Date: Wed, 20 Jun 2012 09:34:52 +0400
Local: Wed, Jun 20 2012 1:34 am
Subject: Re: [nem-forum] Re: Async/await - .NET compatible implementation

http://nemerle.org/wiki/index.php?title=ComputationExpression_macro

Vlad Chistyakov
www.rsdn.ru

19.06.2012 14:48 пользователь "Marek Gibek" <gib...@gmail.com> написал:у

> Thank you!! It is a very helpful answer.

> I didn't know about new "Computation Expressions". It's much better than

"concurrency.n" macro. First of all it is now not only about threads but
also introduces ExecutionContext. It looks very similar to C#'s approach (I
don't know F# but I did a quick test and F#'s async is not compatible with
C#'s await out of a box too). So similar that this will be a very good
start point for me.

> I don't agree with a statement from forum that if we already have

Computation Expressions we don't want to be compatible with C#. I need that
compatibility :) I cannot cheat myself that I will use only Nemerle's
assemblies even in my own solutions. Many 3rd party libraries will be
created (C#'s async/await isn't in production yet). And I want to integrate
with them easily. And with my own code. And vice versa. It's unavoidable in
the near future, I think.

> So here I am :). And I see now that the integration may be easier than I

initially thought.  It's because "Computation Expressions" looks powerful
enough. Maybe I don't need to generate exactly the same state machine at IL
level as C#'s compiler does *). Maybe all AST transformations are already
written :) Maybe the only thing I need to do is to introduce IAwaitable
support. It would be great!

> And I am very grateful for the link to translation of Vladislav articles.

Yes, I still want to learn Nemerle! I would missed them otherwise (as they
are in sandbox yet) and they look very promising.

> Thanks again,
> Marek Gibek

> *) Maybe it would be a little bit faster. Microsoft has rewritten this

state machine code at least for three times. But it's not my priority.

> On Tuesday, June 19, 2012 9:24:41 AM UTC+2, gerrcrazzy wrote:

>> You need more recent macro library named "Computation Expressions"

(github, wiki, samples). But even in this library implementation of "async"
feature is different with C# (author say's it's closer to F# async).

>> About a year ago in russian forum one man asked: "Do you plan implement

async/await from future versions of C#?" and answer was: "No, we are
already have Computation Expressions".

>> If you still want to start learn Nemerle here is english version of

Vladislav Chistyakov articles for beginners (translation currently in
progress).


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Marek Gibek  
View profile  
 More options Jun 20 2012, 11:32 am
From: Marek Gibek <gib...@gmail.com>
Date: Wed, 20 Jun 2012 08:32:16 -0700 (PDT)
Local: Wed, Jun 20 2012 11:32 am
Subject: Re: Async/await - .NET compatible implementation
OMG! This is so fascinating! I cannot stop reading before I will know
everything about monads, closures etc. I always thought that
functional programming is for mathematicians for solving abstract
problems only and have no practical value for me. You have no idea how
happy I am that Roslyn doesn't support what I wanted yet and I decided
to give Nemerle a try.

Computation Expressions gives me all I need. Only little changes will
be needed. I think I will be able to achieve my goals in the very
first week of Nemerle's discovery. And that will take me so long,
because I want to fully understand what happens under the hood :)
That's the power of this language! So complicated task and monads will
do it :) Of course I will share my results with community. The truth
is that authors of Computation Expressions did all the work for me.

As a .NET developer I don't understand why I never heard of this
language. I need to propagate it more here in Cracow. I think that the
reason why it is like this is because most people treat it as a
curiosity.

Best Regards,
Marek Gibek

On Jun 20, 7:34 am, VladD2 <v...@rsdn.ru> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Marek Gibek  
View profile   Translate to Translated (View Original)
 More options Jun 25 2012, 3:23 pm
From: Marek Gibek <gib...@gmail.com>
Date: Mon, 25 Jun 2012 12:23:16 -0700 (PDT)
Local: Mon, Jun 25 2012 3:23 pm
Subject: Re: Async/await - .NET compatible implementation

First version of .NET's Task-based Asynchronous Pattern for Nemerle 1.1 is
ready and can be downloaded from here:
https://sites.google.com/site/gibekm/downloads/nemerle/asyncawait

Marek


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »