News for hackers. Stuff that matters.
Re:Asynchronous JavaScript at Netflix by mattpodwysocki on Friday May 16, 2014 @05:03PM (#7757898)
This talk has been given a number of times, but keeps getting better, such as at MountainWest JavaScript 2014: https://www.youtube.com/watch?v=XE692Clb5LU

Jafar Husain, and myself (Matthew Podwysocki) will also be giving the talk at QCon NYC in June: https://qconnewyork.com/presentation/end-end-reactive-progra... in addition to a great tutorial that we put together: https://qconnewyork.com/tutorial/functional-programming-js-w...

But, if you're interested in playing with it yourself, we have it listed here: http://reactive-extensions.github.io/learnrx/

Re:Asynchronous JavaScript at Netflix by joshka on Saturday May 17, 2014 @06:06AM (#7759746)
I saw this at Yow! a couple of years ago. Really cool stuff.
Re:Asynchronous JavaScript at Netflix by kitd on Friday May 16, 2014 @12:50PM (#7756422)
Note that Netflix have a Java version here https://github.com/Netflix/RxJava

They certainly have some interesting technology.

Re:Asynchronous JavaScript at Netflix by mason55 on Friday May 16, 2014 @03:20PM (#7757397)
> They certainly have some interesting technology.

I would hope so based on the salaries they pay their engineers

Re:Asynchronous JavaScript at Netflix by nilkn on Friday May 16, 2014 @04:31PM (#7757734)
They pay roughly the same as Google or Facebook, except they put everything into the salary and leave it up to the employee to decide what to do with it. If you want stock options, you can just trade some cash for them (at a reduced rate). So their salaries are higher, but the total compensation is roughly the same.
Re:Asynchronous JavaScript at Netflix by gsoltis on Friday May 16, 2014 @01:47PM (#7756748)
I've been prototyping some bindings to make Firebase work with RxJava / RxJS, since the model seems like a good fit.

If anyone has the time and inclination, I'd love some feedback.

RxJava: https://gist.github.com/gsoltis/86210e3259dcc6998801 RxJS: https://gist.github.com/gsoltis/ee20138502a4764650f2

Also, is ReactiveCocoa what most people would use to do this in ObjC? https://github.com/Reactive-Extensions/Rx.ObjC doesn't seem particularly active.

Re:Asynchronous JavaScript at Netflix by mattpodwysocki on Friday May 16, 2014 @04:57PM (#7757869)
First off, great work! I'm the primary authors of RxJS and made a quick comment on your Firebase interaction. We need to ensure that we minimize the number of handlers created. Comments should be inline! Keep up the great work!
Re:Asynchronous JavaScript at Netflix by eranation on Friday May 16, 2014 @11:30AM (#7755986)
Very interesting. By the way if someone is interested in more details about Reactive programming, there is a great coursera course about it (https://www.coursera.org/course/reactive)
Re:Asynchronous JavaScript at Netflix by RoboTeddy on Friday May 16, 2014 @04:20PM (#7757688)
Here's another javascript FRP library: https://github.com/baconjs/bacon.js (it was inspired by Rx)

I've been using bacon.js in conjunction with Facebook's React to write more of my application declaratively. React automatically updates the DOM when bacon properties change.

Re:Asynchronous JavaScript at Netflix by mattpodwysocki on Friday May 16, 2014 @04:59PM (#7757880)
A number of people have been using React with RxJS as noted here: https://github.com/Reactive-Extensions/FutureJS . We also have native support in RxJS for jQuery/Zepto, Angular and Ember events natively (if of course they are referenced).

As the primary author of RxJS, I'm curious why you chose bacon.js over RxJS.

Anyhow, these architectures go well together!

Re:Asynchronous JavaScript at Netflix by RoboTeddy on Sunday May 18, 2014 @08:24PM (#7765048)
Thanks for making RxJS!

> I'm curious why you chose bacon.js over RxJS

At the time I made the decision, Bacon had documentation and RxJS didn't (at least, not that I could find). I was new to FRP, so that made my decision for me -- I never went back and reconsidered.

Are you aware of any advantages RxJS has over Bacon? It looks a bit more extensive in general, so now I wonder what I'm missing out on :)

Re:Asynchronous JavaScript at Netflix by film42 on Friday May 16, 2014 @04:23PM (#7757705)
The conf talk on youtube by Matt Marenghi [linked in the post] is really awesome. Provides great examples and resources. Really worth 28-min.

Direct Link: https://www.youtube.com/watch?v=XRYN2xt11Ek

Re:Asynchronous JavaScript at Netflix by Strilanc on Friday May 16, 2014 @12:48PM (#7756411)
Really glad to see reactive catching on. It really is a significant improvement over raw events, even in trivial cases.
Re:Asynchronous JavaScript at Netflix by pscsbs on Friday May 16, 2014 @12:39PM (#7756359)
Re:Asynchronous JavaScript at Netflix by shanemhansen on Friday May 16, 2014 @11:09PM (#7759132)
As opposed to... Synchronous javascript?
Re:Asynchronous JavaScript at Netflix by bicknergseng on Friday May 16, 2014 @01:15PM (#7756564)
Opinions on reactive vs promises?
Re:Asynchronous JavaScript at Netflix by alipang on Friday May 16, 2014 @01:23PM (#7756620)
Reactive (event) streams are a generalization of promises in a sense, from a single value to a stream of multiple ones. Both are monads.

Streams are to promises what lists are to maybes (options).

Re:Asynchronous JavaScript at Netflix by mattpodwysocki on Friday May 16, 2014 @05:16PM (#7757960)
Reactive is really good for events which could happen zero to infinite times. The composition model is great for that, because we treat these as collections that you can query just as you would query an Array in JavaScript.

Promises on the other hand, are more for scalar values and composition is rather limited based upon that. However, RxJS plays very well with Promises such as the following: https://gist.github.com/mattpodwysocki/b57cf50a34f22ba39e4f . This really shows where Promises leave off and true good composition starts.