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
Scala 2.10 and possible scala.concurrent.Future interlop
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
  23 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
 
Reuben Doetsch  
View profile  
 More options Nov 5 2012, 8:56 am
From: Reuben Doetsch <hjas...@gmail.com>
Date: Mon, 5 Nov 2012 05:56:13 -0800 (PST)
Local: Mon, Nov 5 2012 8:56 am
Subject: Scala 2.10 and possible scala.concurrent.Future interlop

Hey Dispatchers,

I have been using a lot of reboot and also a lot of scala 2.10 ( macro love
). I would love to use both together and have some questions / areas for
thought about scala 2.10 support and possible changes to reboot.

Areas to Consider

A few areas to consider when building / starting to use reboot in 2.10;

a.) The reboot implementation of Promise is really nice but I am concerned
that when you what to use scala 2.10 using the name Promise will be
confusing since Scala 2.10 has a version of Promise (which is more the
write-only side), which is not consistent with Dispatch Promise (which
mirrors more the concept of Future in Scala). Obviously this is semantics,
but could make a difference in both maintaining compatiblity and making it
easier to migrate late.
b.) Use scala implementation of future while at the same time maintaining
the same interlope for pre-2.10 people.  

Proposal

What I propose ( and I have coded, but open to coding anything which
everyone agrees on since I want this to be part of main reboot since I
think dispatch is the defacto solution for HTTP requests in scala):

-Rename Promise[T] to Future[T]. I think that conceptually the 2.10 futures
are very similar to dispatch promises and I think using the scala standard
naming is easiest. This also makes it easier to conditionally compile code
for both 2.10 and 2.9, 2.8, since only code in one or two files has to
change.

2.9
- For scala 2.9 and down keep all the same code but rename Promise to Future

2.10.0

- For 2.10 create a conditionally compiled execution.scala which returns
scala.concurrent.Future instead of a dispatch.Future
- Create an scala.concurrent.Future pimp which adds the methods missing in
scala.concurrent.Future
   - left
   - right
   - flatten
   - overrided toString

The rest of the code should not have to change. The only possible issues
are that a few of the method signiatures are slightly different in scalas
Future.

I think this solution does the following:

 - Creates a rather easy migration path from pre-2.10 to 2.10 (by keeping
the same name and adding pimps for methods used)
 - Only have to maintain 1-2 files for pre-2.10 and 2.10 (promise.scala and
execution.scala right now)

I will anemable to do all necessary changes (both to the library and to the
documentation) if people would be up for this.

Other Options

- Make dispatch.Future extend Future and then nothing needs to change from
one version to the other
    - This slightly complicates the solution and makes it more annoying as
the scala future library changes
- Have an explicit from dispatch.Promise to scala.concurrent.Future
   - Performance wise this is not great

I also implemented both of the above, but the naming confusion and
inconsistency proved too much of a problem ( it kept auto importing
scala.concurrent.Promise ) and I didn't want to add a layer of indirection
unnecessarily if all standard libraries implement scala.concurrent ( a la
akka ).

Any feedback would be greatly appreciated and would love to discuss the
possibilities surrounding this further.

Thanks,

Reuben


 
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.
Nathan Hamblen  
View profile  
 More options Nov 5 2012, 10:42 am
From: Nathan Hamblen <nat...@technically.us>
Date: Mon, 05 Nov 2012 10:42:19 -0500
Local: Mon, Nov 5 2012 10:42 am
Subject: Re: Scala 2.10 and possible scala.concurrent.Future interlop
Hi Reuben, could you link to your fork with the changes?

As far as the naming goes, I don't feel very strongly about it. The use
of "promise" in Dispatch predates sip-14; the popular consensus, as I
observed it,  was that a promise is a future that composes without
blocking. I was pretty surprised when the sip was published and it
followed a different convention. 9 months later, here we are still.

Since the term is used throughout the Dispatch code and documentation I
wasn't going to change it but, if you're volunteering to do that in a
backwards compatible way, that's great. (Please replace all "promise"
puns in the docs with "future" puns. Just kidding. Sort of.) We'll merge
and release with it as soon as 2.10 final is released.

Nathan

On 11/05/2012 08:56 AM, Reuben Doetsch 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.
Reuben Doetsch  
View profile  
 More options Nov 6 2012, 7:39 am
From: Reuben Doetsch <hjas...@gmail.com>
Date: Tue, 6 Nov 2012 04:39:40 -0800 (PST)
Local: Tues, Nov 6 2012 7:39 am
Subject: Re: Scala 2.10 and possible scala.concurrent.Future interlop

Cleaning everything up and will post later today


 
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.
Reuben Doetsch  
View profile  
 More options Nov 6 2012, 12:20 pm
From: Reuben Doetsch <hjas...@gmail.com>
Date: Tue, 6 Nov 2012 09:20:27 -0800 (PST)
Local: Tues, Nov 6 2012 12:20 pm
Subject: Re: Scala 2.10 and possible scala.concurrent.Future interlop

So I am almost finished coding the solution but we have another naming
issue.

The issue is that there already exists an either method in
scala.concurrent.Future so I think we should rename Future[T].either to
something else now. I will also change in all the documentation, etc...
Let's call it toEither or futureEither or something along those lines?

Any preferences?

Reuben


 
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.
Nathan Hamblen  
View profile  
 More options Nov 6 2012, 2:38 pm
From: Nathan Hamblen <nat...@technically.us>
Date: Tue, 06 Nov 2012 14:38:15 -0500
Local: Tues, Nov 6 2012 2:38 pm
Subject: Re: Scala 2.10 and possible scala.concurrent.Future interlop
On 11/06/2012 12:20 PM, Reuben Doetsch wrote:

> So I am almost finished coding the solution but we have another naming
> issue.

> The issue is that there already exists an either method in
> scala.concurrent.Future so I think we should rename Future[T].either to
> something else now.

For some values of "already". :) scala.concurrent.Future.either was not
even in the last SIP-14 draft that I read. But, great, there it is:

 > The either combinator creates a new future which either holds the
result of this future or the argument future, whichever completes first,
irregardless of success or failure.

This is some strangely bad naming considering there is a type called
scala.Either. I'm going to have to think about what to do. I'm not ready
to commit to a breaking change that is also a step back in readability.
I don't suppose there is any chance of talking sense to the SIP creators?

Nathan

I will also change in all the documentation, etc...


 
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.
Reuben Doetsch  
View profile  
 More options Nov 8 2012, 8:33 pm
From: Reuben Doetsch <hjas...@gmail.com>
Date: Thu, 8 Nov 2012 17:33:02 -0800 (PST)
Local: Thurs, Nov 8 2012 8:33 pm
Subject: Re: Scala 2.10 and possible scala.concurrent.Future interlop

Just sent an email to the SIPs mailing list and CC'd you.


 
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.
Nathan Hamblen  
View profile  
 More options Nov 8 2012, 11:10 pm
From: Nathan Hamblen <nat...@technically.us>
Date: Thu, 08 Nov 2012 23:09:58 -0500
Local: Thurs, Nov 8 2012 11:09 pm
Subject: Re: Scala 2.10 and possible scala.concurrent.Future interlop

Thanks, we'll see what happens!


 
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.
Reuben Doetsch  
View profile  
 More options Nov 9 2012, 7:50 am
From: Reuben Doetsch <hjas...@gmail.com>
Date: Fri, 9 Nov 2012 04:50:56 -0800 (PST)
Local: Fri, Nov 9 2012 7:50 am
Subject: Re: Scala 2.10 and possible scala.concurrent.Future interlop

Check out the sip
thread https://groups.google.com/forum/?fromgroups=#!topic/scala-sips/VRlDgX...
and since you have more klout with the scala community than me would love
your input into the discussion.

Reuben


 
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.
Daniel Sobral  
View profile  
 More options Nov 9 2012, 7:51 am
From: Daniel Sobral <dcsob...@gmail.com>
Date: Fri, 9 Nov 2012 04:51:38 -0800 (PST)
Local: Fri, Nov 9 2012 7:51 am
Subject: Re: Scala 2.10 and possible scala.concurrent.Future interlop

I think it's unlikely anything will change there. I raised the issue
before, though I did not go after that method's name, since I did not think
of anything better, and did not feel strongly against it.

Now, I'm pretty much a newbie user of Dispatch, but I'll put in my two
cents. I personally prefer the name Future over the name Promise, but I
think adhering to the convention set forth by Scala 2.10 is even more
important.

As for the class/implicit stuff, I prefer that 2.10's Future be used, with
missing methods added through a pimp. That will make it possible to combine
Dispatch futures with futures returned by other libraries. I have a use
case with Scala I/O right now, for instance.

As for a new name for either, I think toEither would be best, as it follows
2.10's Try "toOption" naming convention.


 
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.
Reuben Doetsch  
View profile  
 More options Nov 9 2012, 7:53 am
From: Reuben Doetsch <hjas...@gmail.com>
Date: Fri, 9 Nov 2012 04:53:10 -0800 (PST)
Local: Fri, Nov 9 2012 7:53 am
Subject: Re: Scala 2.10 and possible scala.concurrent.Future interlop

If Nathan can't conceive them to do anything (which I assume we won't ), I
am +1 for toEither (still annoying since used so heavily throughout the
example, and probably existing code ).

Reuben


 
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.
Reuben Doetsch  
View profile  
 More options Nov 9 2012, 7:54 am
From: Reuben Doetsch <hjas...@gmail.com>
Date: Fri, 9 Nov 2012 04:54:12 -0800 (PST)
Local: Fri, Nov 9 2012 7:54 am
Subject: Re: Scala 2.10 and possible scala.concurrent.Future interlop

*convince**


 
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.
Nathan Hamblen  
View profile  
 More options Nov 9 2012, 9:24 am
From: Nathan Hamblen <nat...@technically.us>
Date: Fri, 09 Nov 2012 09:24:19 -0500
Local: Fri, Nov 9 2012 9:24 am
Subject: Re: Scala 2.10 and possible scala.concurrent.Future interlop

If I enter that thread it will turn into an argument over their evident
disregard for the libraries that they expect to implement their common
interface, not having surveyed these libraries in the many months their
SIP has been in formative stages. And that won't go anywhere.

I'll email one of the friendlier people at typesafe and see how that
goes. Thanks again Reuben for discovering the problem.

Nathan

On 11/09/2012 07:54 AM, Reuben Doetsch 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.
Doug Tangren  
View profile  
 More options Nov 9 2012, 9:25 am
From: Doug Tangren <d.tang...@gmail.com>
Date: Fri, 9 Nov 2012 09:24:57 -0500
Local: Fri, Nov 9 2012 9:24 am
Subject: Re: Scala 2.10 and possible scala.concurrent.Future interlop

> On Friday, November 9, 2012 7:53:11 AM UTC-5, Reuben Doetsch wrote:

>> If Nathan can't conceive them to do anything (which I assume we won't ),
>> I am +1 for toEither (still annoying since used so heavily throughout the
>> example, and probably existing code ).

For some reason I thought Exception.Catch defined an `eth` which I was
going to suggest, but I think I was thinking instead of `opt`. Funny
enough, Exception.Catch defines both an either and toEither -
http://www.scala-lang.org/api/current/scala/util/control/Exception$$C...

 
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.
Reuben Doetsch  
View profile  
 More options Nov 30 2012, 10:13 am
From: Reuben Doetsch <hjas...@gmail.com>
Date: Fri, 30 Nov 2012 07:13:31 -0800 (PST)
Local: Fri, Nov 30 2012 10:13 am
Subject: Re: Scala 2.10 and possible scala.concurrent.Future interlop

Status Update on Future rename:

Okay so after I pushed back on the Future team, the either method was
removed in RC3 and so I got everything working and compiling. The only
issue is that the test code coverage requires netty-unfiliterd 2.10 which
in turn requires specs2 2.10 (unfiltered uses specs 1). Do you have plans
to publish a 2.10 unfiltered version or should I rewrite some test suites.

Reuben


 
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.
Nathan Hamblen  
View profile  
 More options Nov 30 2012, 10:33 am
From: Nathan Hamblen <nat...@technically.us>
Date: Fri, 30 Nov 2012 10:33:49 -0500
Local: Fri, Nov 30 2012 10:33 am
Subject: Re: Scala 2.10 and possible scala.concurrent.Future interlop
On 11/30/2012 10:13 AM, Reuben Doetsch wrote:

> Status Update on Future rename:

> Okay so after I pushed back on the Future team, the either method was
> removed in RC3 and so I got everything working and compiling.

Nice work!

> The only
> issue is that the test code coverage requires netty-unfiliterd 2.10
> which in turn requires specs2 2.10 (unfiltered uses specs 1).

Yeah, I've been commenting out a few things to make the Dispatch builds
for 2.10 work.

> Do you
> have plans to publish a 2.10 unfiltered version or should I rewrite some
> test suites.

Certainly... after the release of 2.10. But I'm persuaded that it's
worth making this switch in Dispatch prior to 2.10's release, so I'll
come up with something this weekend to make the build work properly.

Nathan


 
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.
n8han  
View profile  
 More options Dec 3 2012, 2:18 am
From: n8han <nat...@technically.us>
Date: Sun, 2 Dec 2012 23:18:38 -0800 (PST)
Local: Mon, Dec 3 2012 2:18 am
Subject: Re: Scala 2.10 and possible scala.concurrent.Future interlop

On Friday, November 30, 2012 10:33:49 AM UTC-5, n8han wrote:
> On 11/30/2012 10:13 AM, Reuben Doetsch wrote:

> > Do you
> > have plans to publish a 2.10 unfiltered version or should I rewrite some
> > test suites.

> Certainly... after the release of 2.10. But I'm persuaded that it's
> worth making this switch in Dispatch prior to 2.10's release, so I'll
> come up with something this weekend to make the build work properly.

I changed my mind and published a "2.10" artifact for some modules of
unfiltered 0.6.4, built with RC3. I also pushed some changes to master and
am now able to run the tests against core using 2.10.

The tests hang before all suites are run but that's unrelated, happens on
2.9 as well.

Nathan


 
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.
n8han  
View profile  
 More options Dec 9 2012, 7:38 pm
From: n8han <nat...@technically.us>
Date: Sun, 9 Dec 2012 16:38:22 -0800 (PST)
Local: Sun, Dec 9 2012 7:38 pm
Subject: Re: Scala 2.10 and possible scala.concurrent.Future interlop

Hi Reuben, I'd like to release something prior to Scala 2.10's release if
possible, so people can get used to the new naming. Is your fork ready to
pull?


 
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.
reuben doetsch  
View profile  
 More options Dec 9 2012, 8:16 pm
From: reuben doetsch <reuben.doet...@gmail.com>
Date: Sun, 9 Dec 2012 20:16:02 -0500
Local: Sun, Dec 9 2012 8:16 pm
Subject: Re: Scala 2.10 and possible scala.concurrent.Future interlop

Sorry got sidetracked and releasing a new version of app tomorrow. Will
make sure to make this a priority by early this week ( Monday- Tuesday)

--
Thanks,

Reuben Doetsch
CTO & CoFounder Sportaneous.com


 
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.
Lanny Ripple  
View profile  
 More options Dec 12 2012, 5:36 pm
From: Lanny Ripple <la...@spotinfluence.com>
Date: Wed, 12 Dec 2012 14:36:06 -0800 (PST)
Local: Wed, Dec 12 2012 5:36 pm
Subject: Re: Scala 2.10 and possible scala.concurrent.Future interlop

I'd like to pitch that artifacts be published that track the Scala 2.10
Release Candidates when all this comes together.  We've got a large system
that makes heavy use of Dispatch and I'd like to get ahead of 2.10 testing.

  -ljr


 
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.
langel.gro...@gmail.com  
View profile  
 More options Jan 15, 2:37 pm
From: langel.gro...@gmail.com
Date: Tue, 15 Jan 2013 11:37:49 -0800 (PST)
Local: Tues, Jan 15 2013 2:37 pm
Subject: Re: Scala 2.10 and possible scala.concurrent.Future interlop

Hi!

I have been using dispatch for a while and is a great library! I am really
interested on the state of this change as I'm using Play2.1 as my
development framework and the possibility that dispatch returns
scala.concurrent.Future would make it a great addition to my stack.

Kind regards,

Luis

El lunes, 5 de noviembre de 2012 13:56:13 UTC, Reuben Doetsch escribió:


 
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.
Nathan Hamblen  
View profile  
 More options Jan 15, 2:42 pm
From: Nathan Hamblen <nat...@technically.us>
Date: Tue, 15 Jan 2013 14:42:48 -0500
Local: Tues, Jan 15 2013 2:42 pm
Subject: Re: Scala 2.10 and possible scala.concurrent.Future interlop
On 01/15/2013 02:37 PM, langel.gro...@gmail.com wrote:

> Hi!

> I have been using dispatch for a while and is a great library! I am
> really interested on the state of this change

Hi Luis, this is it:
https://github.com/dispatch/reboot/tree/scala210

There are few files totally commented out because their functionality
has not been ported to the new interface, but it's reasonably close.

A few more pull requests would speed this to completion -- planning
nescala is taking up almost almost all my time lately.

Nathan


 
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.
Luis Ángel Vicente Sánchez  
View profile  
 More options Jan 15, 4:08 pm
From: Luis Ángel Vicente Sánchez <langel.gro...@gmail.com>
Date: Tue, 15 Jan 2013 21:08:16 +0000
Local: Tues, Jan 15 2013 4:08 pm
Subject: Re: Scala 2.10 and possible scala.concurrent.Future interlop

Thank you! I will take a look.
On 15 Jan 2013 19:42, "Nathan Hamblen" <nat...@technically.us> 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.
reuben doetsch  
View profile  
 More options Jan 16, 6:58 pm
From: reuben doetsch <reuben.doet...@gmail.com>
Date: Wed, 16 Jan 2013 18:58:37 -0500
Local: Wed, Jan 16 2013 6:58 pm
Subject: Re: Scala 2.10 and possible scala.concurrent.Future interlop

Add me on chat if you want to discuss how to finish up all the interfaces (
hjas...@gmail.com). Real life has got in the way of this in the last few
weeks, but hopefully I can also add support after a big deadline.

On Tue, Jan 15, 2013 at 4:08 PM, Luis Ángel Vicente Sánchez <

--
Thanks,

Reuben Doetsch
CTO & CoFounder Sportaneous.com


 
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 »