kriskowal / gtor

A General Theory of Reactivity
MIT License
3.03k stars 109 forks source link

Announcement: Live presentations upcoming #36

Closed kriskowal closed 8 years ago

kriskowal commented 9 years ago

I will be offering three presentations on this General Theory of Reactivity this summer.

Come if you’re interested in event driven programming and talk to me about projects at Uber. http://www.infoq.com/news/2015/03/uber-realtime-market-platform

benjamingr commented 9 years ago

Be sure those talks are recorded :) (and contact meijer if you haven't already)

kriskowal commented 9 years ago

The only means I know to let @headinthebox know that I’ll be on his continent to give this talk on Monday is to mention his Github handle.

Erik, if you catch this, I know this is short notice, but it would be a pleasure to meet you and to apologize for misspelling your name in person.

headinthebox commented 9 years ago

Thanks for the heads-up. I DM-ed you on Twitter. Shoot me an email via emeijer@applied-duality.com. Would love to chat more.

benjamingr commented 9 years ago

@headinthebox Erik it would be great if you could fix this whole concurrency thing in JavaScript, I know it's short notice but it is the most popular language and it is one currently specifying observables, async pull iterators and syntax into the language.

I know you're a busy guy (and I'm a huge fan) but piggybacking on the fact you showed up - JavaScript could really use your help with concurrency :)

Kris is one of the smartest people I know and I'd love to see what you two can come up with :)

headinthebox commented 9 years ago

If the JavaScript folks reach out to me, I am happy to jump in.

kriskowal commented 9 years ago

Twitter appears to be slowly becoming eventually consistent.

headinthebox commented 9 years ago

@kriskowal this Twitter DM thing is broken, let's use proven email technology ;-)

kriskowal commented 9 years ago

@jhusain, I trust that you will take @headinthebox at his word and arrange for him to have a chance to present at TC39.

headinthebox commented 9 years ago

How can I say "no" to @jhusain ;-)

kriskowal commented 9 years ago

@headinthebox My email is kris@cixar.com.

benjamingr commented 9 years ago

@headinthebox this is us reaching out :)

Observables proposal: https://github.com/zenparsing/es-observable Streams proposal: https://github.com/whatwg/streams Promise (Task) cancellation: https://github.com/domenic/cancelable-promise

There are open issues mostly stemming from the fact most people involved don't have the in-depth understanding of the underlying concepts you do nor the experience of pushing them into a programming language and the considerations involved.

There are lots of smart people (like Jafar and Kris) involved in this process and they're learning and it takes time. Your help would have a huge impact on concurrency and data flow problems in JavaScript.

headinthebox commented 9 years ago

Have you see https://queue.acm.org/detail.cfm?id=2747873. One of the reasons I did that work was to show the JS folks that and how it can be done.

benjamingr commented 9 years ago

Oh neat, we have our own async/await on the way, the design decisions you mention there sound very familiar. The promise cancellation proposal currently runs all finally blocks on cancellation.

We had async streams proposals (for observables and for pull iterators). Since yield produces an expression in JavaScript libraries have implemented await semantics with it in the interim. Promises are also a standard part of the language now.

function async(iterable){
    let iterator = iterable();
    return Promise.resolve().then(function run(){ // create empty promise and chain
        let {next, done} = iterator.next();
        if(done) return value;
        return Promise.resolve(value).then(run, e => iterator.throw(e));
    });
}

Which lets us do:

let delay = ms => new Promise(r => setTimeout(r, ms));
async(function*(){
    for(var i = 0; i < 10; i++){
         yield delay(1000);
         console.log("Hi" ,i);
    };
});

I'm very worried about the syntactic addition of async functions, observables and pull streams into the standards - there are so many things to get wrong and so few people who are domain experts :)

kriskowal commented 9 years ago

One of us should probably translate your article on Dart to modern JavaScript.

benjamingr commented 9 years ago

I'll gladly do it with @headinthebox 's blessing if he'd like.

headinthebox commented 9 years ago

Absolutely. Without doubt that will reveal some interesting issues. The actual translation in the Dart compiler is more complex because it has to deal with error, try/finally, ...

jhusain commented 9 years ago

i'm sure the committee would be interested in a presentation from @headinthebox. I know I would be.