[IndexedDB] Promises (WAS: Seeking pre-LCWD comments for Indexed Database API; deadline February 2)

2010-02-18 Thread Jeremy Orlow
On Wed, Jan 27, 2010 at 9:46 PM, Kris Zyp wrote: > > * Use promises for async interfaces - In server side JavaScript, most > projects are moving towards using promises for asynchronous interfaces > instead of trying to define the specific callback parameters for each > interface. I believe the ad

Re: [IndexedDB] Promises (WAS: Seeking pre-LCWD comments for Indexed Database API; deadline February 2)

2010-02-18 Thread Joseph Pecoraro
On Feb 18, 2010, at 4: 31AM, Jeremy Orlow wrote > Very interesting. The general concept seems promising and fairly flexible. > You can easily code in a similar style to normal async/callback semantics, > but it seems like you have a lot more flexibility. I do have a few questions > though. >

Re: [IndexedDB] Promises (WAS: Seeking pre-LCWD comments for Indexed Database API; deadline February 2)

2010-02-18 Thread Kris Zyp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 2/18/2010 5:31 AM, Jeremy Orlow wrote: > On Wed, Jan 27, 2010 at 9:46 PM, Kris Zyp > wrote: > > * Use promises for async interfaces - In server side JavaScript, > most > projects are moving towards using prom

Re: [IndexedDB] Promises (WAS: Seeking pre-LCWD comments for Indexed Database API; deadline February 2)

2010-03-01 Thread Jeremy Orlow
Thanks for the pointers. I'm actually pretty sold on the general idea of promises, and my intuition is that there won't be a very big resource penalty for using an API like this rather than callbacks or what's currently specced. At the same time, it seems as though there isn't much of a standard

Re: [IndexedDB] Promises (WAS: Seeking pre-LCWD comments for Indexed Database API; deadline February 2)

2010-03-02 Thread Jeremy Orlow
On Mon, Mar 1, 2010 at 9:52 PM, Jeremy Orlow wrote: > Thanks for the pointers. I'm actually pretty sold on the general idea of > promises, and my intuition is that there won't be a very big resource > penalty for using an API like this rather than callbacks or what's currently > specced. At the

Re: [IndexedDB] Promises (WAS: Seeking pre-LCWD comments for Indexed Database API; deadline February 2)

2010-03-02 Thread Kris Zyp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 3/1/2010 2:52 PM, Jeremy Orlow wrote: > Thanks for the pointers. I'm actually pretty sold on the general > idea of promises, and my intuition is that there won't be a very > big resource penalty for using an API like this rather than > callbacks

Re: [IndexedDB] Promises (WAS: Seeking pre-LCWD comments for Indexed Database API; deadline February 2)

2010-03-03 Thread Jeremy Orlow
On Wed, Mar 3, 2010 at 4:49 AM, Kris Zyp wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > > > On 3/1/2010 2:52 PM, Jeremy Orlow wrote: > > Thanks for the pointers. I'm actually pretty sold on the general > > idea of promises, and my intuition is that there won't be a very > > big re

Re: [IndexedDB] Promises (WAS: Seeking pre-LCWD comments for Indexed Database API; deadline February 2)

2010-03-03 Thread Jeremy Orlow
On Wed, Mar 3, 2010 at 11:01 AM, Jeremy Orlow wrote: > On Wed, Mar 3, 2010 at 4:49 AM, Kris Zyp wrote: > >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA1 >> >> >> >> On 3/1/2010 2:52 PM, Jeremy Orlow wrote: >> > Thanks for the pointers. I'm actually pretty sold on the general >> > idea of p

Re: [IndexedDB] Promises (WAS: Seeking pre-LCWD comments for Indexed Database API; deadline February 2)

2010-03-03 Thread Jeremy Orlow
Erm... s/differed/deferred/g On Wed, Mar 3, 2010 at 4:58 PM, Jeremy Orlow wrote: > On Wed, Mar 3, 2010 at 11:01 AM, Jeremy Orlow wrote: > >> On Wed, Mar 3, 2010 at 4:49 AM, Kris Zyp wrote: >> >>> -BEGIN PGP SIGNED MESSAGE- >>> Hash: SHA1 >>> >>> >>> >>> On 3/1/2010 2:52 PM, Jeremy Or

Re: [IndexedDB] Promises (WAS: Seeking pre-LCWD comments for Indexed Database API; deadline February 2)

2010-03-03 Thread Kris Zyp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 3/3/2010 4:01 AM, Jeremy Orlow wrote: > On Wed, Mar 3, 2010 at 4:49 AM, Kris Zyp > wrote: > [snip] > > > The promises would only have a > "then" method which would take in an > > > onsuccess and onerror callb

Re: [IndexedDB] Promises (WAS: Seeking pre-LCWD comments for Indexed Database API; deadline February 2)

2010-03-04 Thread Jeremy Orlow
On Wed, Mar 3, 2010 at 8:48 PM, Kris Zyp wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > > > On 3/3/2010 4:01 AM, Jeremy Orlow wrote: > > On Wed, Mar 3, 2010 at 4:49 AM, Kris Zyp > > wrote: > > [snip] > > > > > > The promises would only have a > >

Re: [IndexedDB] Promises (WAS: Seeking pre-LCWD comments for Indexed Database API; deadline February 2)

2010-03-04 Thread Jeremy Orlow
On Thu, Mar 4, 2010 at 2:37 PM, Jeremy Orlow wrote: > On Wed, Mar 3, 2010 at 8:48 PM, Kris Zyp wrote: > >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA1 >> >> >> >> On 3/3/2010 4:01 AM, Jeremy Orlow wrote: >> > On Wed, Mar 3, 2010 at 4:49 AM, Kris Zyp > > > wrote: >

Re: [IndexedDB] Promises (WAS: Seeking pre-LCWD comments for Indexed Database API; deadline February 2)

2010-03-04 Thread Mark S. Miller
On Thu, Mar 4, 2010 at 6:37 AM, Jeremy Orlow wrote: > You are quite right! I misunderstood how this part of promises worked. > > Is there excitement about speccing promises in general? > Yes. The starting point for a lot of the commonjs promises work is Tyler's ref_send promise library, documen

Re: [IndexedDB] Promises (WAS: Seeking pre-LCWD comments for Indexed Database API; deadline February 2)

2010-03-04 Thread Kris Zyp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 3/4/2010 10:35 AM, Mark S. Miller wrote: > On Thu, Mar 4, 2010 at 6:37 AM, Jeremy Orlow > wrote: > > You are quite right! I misunderstood how this part of promises > worked. > > Is there excitement about speccing pro

Re: [IndexedDB] Promises (WAS: Seeking pre-LCWD comments for Indexed Database API; deadline February 2)

2010-03-04 Thread Aaron Boodman
On Thu, Feb 18, 2010 at 4:31 AM, Jeremy Orlow wrote: > On Wed, Jan 27, 2010 at 9:46 PM, Kris Zyp wrote: >> >> * Use promises for async interfaces - In server side JavaScript, most >> projects are moving towards using promises for asynchronous interfaces >> instead of trying to define the specific

Re: [IndexedDB] Promises (WAS: Seeking pre-LCWD comments for Indexed Database API; deadline February 2)

2010-03-04 Thread Jeremy Orlow
On Thu, Mar 4, 2010 at 5:46 PM, Kris Zyp wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > > > On 3/4/2010 10:35 AM, Mark S. Miller wrote: > > On Thu, Mar 4, 2010 at 6:37 AM, Jeremy Orlow > > wrote: > > > > You are quite right! I misunderstood how this p

Re: [IndexedDB] Promises (WAS: Seeking pre-LCWD comments for Indexed Database API; deadline February 2)

2010-03-04 Thread Kris Zyp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 3/4/2010 11:08 AM, Aaron Boodman wrote: > On Thu, Feb 18, 2010 at 4:31 AM, Jeremy Orlow > wrote: >> On Wed, Jan 27, 2010 at 9:46 PM, Kris Zyp >> wrote: >>> >>> * Use promises for async interfaces - In server side >>> JavaScript, most projects a

Re: [IndexedDB] Promises (WAS: Seeking pre-LCWD comments for Indexed Database API; deadline February 2)

2010-03-04 Thread Nikunj Mehta
On Mar 4, 2010, at 10:23 AM, Kris Zyp wrote: On 3/4/2010 11:08 AM, Aaron Boodman wrote: On Thu, Feb 18, 2010 at 4:31 AM, Jeremy Orlow wrote: On Wed, Jan 27, 2010 at 9:46 PM, Kris Zyp wrote: * Use promises for async interfaces - In server side JavaScript, most projects are moving towards

Re: [IndexedDB] Promises (WAS: Seeking pre-LCWD comments for Indexed Database API; deadline February 2)

2010-03-04 Thread Jeremy Orlow
On Thu, Mar 4, 2010 at 6:46 PM, Nikunj Mehta wrote: > > On Mar 4, 2010, at 10:23 AM, Kris Zyp wrote: > > >> On 3/4/2010 11:08 AM, Aaron Boodman wrote: >> >>> On Thu, Feb 18, 2010 at 4:31 AM, Jeremy Orlow >>> wrote: >>> On Wed, Jan 27, 2010 at 9:46 PM, Kris Zyp wrote: > >

Re: [IndexedDB] Promises (WAS: Seeking pre-LCWD comments for Indexed Database API; deadline February 2)

2010-03-04 Thread Kris Zyp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 3/4/2010 11:46 AM, Nikunj Mehta wrote: > > On Mar 4, 2010, at 10:23 AM, Kris Zyp wrote: > >> >> On 3/4/2010 11:08 AM, Aaron Boodman wrote: > [snip] >>> >>> * There is nothing preventing JS authors from implementing a >>> promise-style API on top

Re: [IndexedDB] Promises (WAS: Seeking pre-LCWD comments for Indexed Database API; deadline February 2)

2010-03-04 Thread Nikunj Mehta
On Mar 4, 2010, at 10:55 AM, Kris Zyp wrote: On 3/4/2010 11:46 AM, Nikunj Mehta wrote: > > On Mar 4, 2010, at 10:23 AM, Kris Zyp wrote: > >> >> On 3/4/2010 11:08 AM, Aaron Boodman wrote: > [snip] >>> >>> * There is nothing preventing JS authors from implementing a >>> promise-style API

Re: [IndexedDB] Promises (WAS: Seeking pre-LCWD comments for Indexed Database API; deadline February 2)

2010-03-05 Thread Jeremy Orlow
On Thu, Mar 4, 2010 at 7:44 PM, Nikunj Mehta wrote: > > On Mar 4, 2010, at 10:55 AM, Kris Zyp wrote: > > On 3/4/2010 11:46 AM, Nikunj Mehta wrote: >> > >> > On Mar 4, 2010, at 10:23 AM, Kris Zyp wrote: >> > >> >> >> >> On 3/4/2010 11:08 AM, Aaron Boodman wrote: >> > [snip] >> >>> >> >>> *

Re: [IndexedDB] Promises (WAS: Seeking pre-LCWD comments for Indexed Database API; deadline February 2)

2010-03-05 Thread Aaron Boodman
On Fri, Mar 5, 2010 at 4:54 AM, Jeremy Orlow wrote: > For what it's worth, regardless of the answers to the above questions, I > think we should switch to a callback based model.  It's great to use events > when natural to do so, but this is a very unnatural use.  It provides > artificial limitati

Re: [IndexedDB] Promises (WAS: Seeking pre-LCWD comments for Indexed Database API; deadline February 2)

2010-03-11 Thread Shawn Wilsher
On 3/5/2010 4:54 AM, Jeremy Orlow wrote: For what it's worth, regardless of the answers to the above questions, I think we should switch to a callback based model. It's great to use events when natural to do so, but this is a very unnatural use. It provides artificial limitations (only one requ

Re: [IndexedDB] Promises (WAS: Seeking pre-LCWD comments for Indexed Database API; deadline February 2)

2010-03-12 Thread Jeremy Orlow
On Fri, Mar 12, 2010 at 1:05 AM, Shawn Wilsher wrote: > On 3/5/2010 4:54 AM, Jeremy Orlow wrote: > >> For what it's worth, regardless of the answers to the above questions, I >> think we should switch to a callback based model. It's great to use >> events when natural to do so, but this is a ver

Re: [IndexedDB] Promises (WAS: Seeking pre-LCWD comments for Indexed Database API; deadline February 2)

2010-03-12 Thread Kris Zyp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 3/12/2010 3:17 AM, Jeremy Orlow wrote: > On Fri, Mar 12, 2010 at 1:05 AM, Shawn Wilsher > wrote: > > On 3/5/2010 4:54 AM, Jeremy Orlow wrote: > > For what it's worth, regardless of the answers to the above

Re: [IndexedDB] Promises (WAS: Seeking pre-LCWD comments for Indexed Database API; deadline February 2)

2010-03-12 Thread Jeremy Orlow
On Fri, Mar 12, 2010 at 3:04 PM, Kris Zyp wrote: > > Seems like there is a false dichotomy here. I don't think anyone has > suggested non-event based API. If the IndexedDB is going to have an > asynchronous interface, clearly the results of operations should be > made available through events (me

Re: [IndexedDB] Promises (WAS: Seeking pre-LCWD comments for Indexed Database API; deadline February 2)

2010-03-12 Thread Jeremy Orlow
On Fri, Mar 12, 2010 at 3:23 PM, Jeremy Orlow wrote: > On Fri, Mar 12, 2010 at 3:04 PM, Kris Zyp wrote: > >> >> Seems like there is a false dichotomy here. I don't think anyone has >> suggested non-event based API. If the IndexedDB is going to have an >> asynchronous interface, clearly the resul

RE: [IndexedDB] Promises (WAS: Seeking pre-LCWD comments for Indexed Database API; deadline February 2)

2010-03-30 Thread Pablo Castro
On Fri, Mar 12, 2010 at 7:26 AM, Jeremy Orlow wrote: On Fri, Mar 12, 2010 at 3:23 PM, Jeremy Orlow wrote: On Fri, Mar 12, 2010 at 3:04 PM, Kris Zyp wrote: >> I believe computer science has clearly >> observed the fragility of passing callbacks to the initial function >> since it conflates the