7 ms·
Erik Meijer: Duality and the End of Reactive [video]
- noelwelsh 12y agoThe first six minutes alone are worth a listen if you're in a rabble-rousing mood.
- leorocky 12y agoI definitely wouldn't mind watching more of his presentations. He's pretty good.
- selimthegrim 12y agoThere's a classic one where he spends 20 minutes mocking the Gang of Four for not realizing that Iterators and Iterables should have a dual. I'll try and find the link.
- auxon0 12y agoThe GoF wrote, "favor composition over inheritance". That much was right. Unfortunately, they missed the mathematical composition possible that was hidden inside these patterns all along, much simpler and fundamental than the design patterns themselves.
- haberman 12y agoWow, I listened to the first six minutes on your recommendation and was pretty put off. The speaker mocks his audience of Microsoft engineers (like not in fun, he is really saying their culture sucks). He is dismissive of "reactive programming" as nonsense from architecture astronauts, without giving a remotely fair description of what it actually is. His straw-man of "var x = 10; println(x); x = 42; println(x)" is not reactive, because "x" is not a function of other mutable state in the model. I've never heard of reactive programming until five minutes ago, but I can tell this just by reading the Wikipedia excerpts from his own slides (and a little follow-up reading confirms this). I'm all for rabble-rousing, but if you're throwing punches you should know what you're talking about. At 17:30 he makes a joke about a Steve Jobs function that says "iPhone", "iPad", "iCloud", and then "terminates naturally". Holy bad taste. EDIT: others have pointed out that with extra context this is more obviously a self-deprecating and good-natured shtick.
- glassx 12y agoWhen you say that he's mocking Microsoft engineers, is that because of the Visual Basic comments? Because Erik actually enjoys VB and was responsible for adding some features to it. He's a former employee, so there's context... And I don't think he's being dismissive of reactive programming, he's dismissive of that definition, which is too broad. He was one of the main proponents of Reactive programming inside Microsoft.
- haberman 12y ago> When you say that he's mocking Microsoft engineers, is that because of the Visual Basic comments? "In Redmond, like a lot of people talk about code but don't write it, so I think Microsoft can only come back if, you know, they start writing more code." > And I don't think he's being dismissive of reactive programming, he's dismissive of that definition, which is too broad. The definition seems pretty reasonable to me. It immediately resonated with me; it described a principle I had been trying to achieve in some code I was writing recently. The idea of having changes automatically propagate through your model as a data-flow network is a pretty noticeable contrast to other ways of programming. > He was one of the main proponents of Reactive programming inside Microsoft. Yeah I guess I don't have this context. But without it, the talk just rubbed me wrong.
- yarou 12y ago>"In Redmond, like a lot of people talk about code but don't write it, so I think Microsoft can only come back if, you know, they start writing more code." It's like you've never worked at a tech shop with a sales team. Also keep in mind that it wasn't meant to be taken seriously or literally. If his audience wasn't terribly offended by it, why are you?
- auxon0 12y agoErik was fired which is unbelievable; it's like firing Feynman. He obviously wasn't happy with Ballmer or the culture, and frankly neither were most of the MS employees in that audience. Ballmer's gone and suddenly everything MS does is becoming open sourced, for example. "A miracle". And just because quantum might sound cool, naming a razor blade after it doesn't make it quantum physics.
- shaydoc 12y agoi thought it was a good presentation, however, I recently watched a Netflix one, published by Matt Marenghi, which to me was infinitely better. I think the description of events as just another collection, albeit a time based collection flow was nicer ( Observable === Collection + Time ), and also that this collection must have the ability to tell you that it has terminated. https://www.youtube.com/watch?v=XRYN2xt11Ek https://www.youtube.com/watch?v=XRYN2xt11Ek
- brodo 12y agoWatched both talks and the Netfix one is really way better.
- AlexanderDhoore 12y ago(Shameless self-promotion) I just finished by thesis on a new programming language called SolScript, which is reactive and based on "math". It's a hard real-time language for avionics software, BUT it has type inference and duck typing (everything is "symbolic"). SolScript is supposed to look familiar to anyone with a basic knowledge of mathematics. It's also a literate language, because every SolScript file is a Markdown file (and SolScript code is inside Markdown code blocks). [link redacted]
- lomnakkus 12y agoJust had a little glance (I'm on my way out the door), but if it's possible to construct arbitrarily large lists (as seems to be implied by the availability of e.g. "range N" for any N, how can you guarantee that e.g. "sum large_list" can actually terminate within the time bound set by the frequency? Also there seems to be no actual proof of safety of the language's semantics (are the semantics formally specified?), but perhaps I missed it.
- AlexanderDhoore 12y agoThe length of all lists is known at compile-time. So, yes, you can do "sum range hugeNumber", but the compiler will tell you that your program can't be run at the correct frequency. (The possible range of the `hugeNumber` variable is known to the compiler, so it can know the maximum size of the list you are asking.) The compiler can find out the range of numbers and the lengths of lists using static analysis, because SolScript is such a "restricted" language. Functional programmers would probably dump all that information into a type system. We call it "dataflow analysis", but I think the end result is the same. Note that, all of the static analysis is done on the dataflow graph underlying a SolScript program. In the dataflow graph there are no "functions" or "classes"... The static analysis is much simpler because it is done on something more primitive than the language itself.
- DavidSJ 12y agoVery interesting work. Is there a development list or some other way to follow progress?
- hyperion2010 12y agoNow I want to know who was in the audience (esp. the two 'math' guys off to the right).
- pjmlp 12y agoAt very least, these guys http://channel9.msdn.com/Events/Lang-NEXT/Lang-NEXT-2014 http://channel9.msdn.com/Events/Lang-NEXT/Lang-NEXT-2014
- deleted 12y ago[deleted]
- ahvetm 12y agotl;dr: Languages offer ways of composing side effects. Delay is just another side effect and "reactive" isn't that special.
- Pitarou 12y agoI think there's a little more to it than that...
- Pitarou 12y agoTL;DR Reactive programming is ill-defined and over-hyped, so let's talk about types and math instead (plus some not-very-subtle in-jokes about Microsoft). An enumerator is basically a getter with the ability to fail and / or terminate. It might also return a promise rather than a value. An enumerable is a getter that returns an enumerator. We can express all this very cleanly in generic types. And if we take the category-theoretic dual of these types we get the observer and observable types. So who needs reactive? ;-)
- seanmcdirmid 12y agoWhat people really want is managed time.
- skrebbel 12y agoI believe that you're right, but with that attitude "against" an institution like Erik Meijer, you're not gathering many popularity points :-)
- auxon0 12y agoWhat kind of scenario are you thinking of? Rx has virtual time with the use of schedulers that enables you to abstract over time, which is very cool. http://channel9.msdn.com/shows/Going+Deep/Wes-Dyer-and-Jeffrey-Van-Gogh-Inside-Rx-Virtual-Time/ http://channel9.msdn.com/shows/Going+Deep/Wes-Dyer-and-Jeffr...
- seanmcdirmid 12y agoThis isn't really virtual time though, at least as realized by time warp. It's a virtualization of time, for sure, but almost completely unrelated to DR Jefferson's work [1]; no rollback of bad interactions or anything like that. [1] http://dl.acm.org/citation.cfm?id=3988 http://dl.acm.org/citation.cfm?id=3988 Rx is a one trick pony that focuses exclusively on the duality between event streams and data streams. Management of time in any real sense is completely missing from the framework. No continuous bindings, control flow must all be buried as data flow, etc... React is a much better solution for writing reactive programs than Rx.
- cbeach 12y agoI'm confused as to why Erik would want anything to do with MSDN? He slates MS on a regular basis. Also, I suspect very few amongst the YC/HN developer community would touch Microsoft products.
- virtualwhys 12y agoand Scala is now his favorite language, interesting stance to take for a previously prominent member of the Haskell community.
- skrebbel 12y agoHe's an independent consultant now. I suspect the market for companies willing to consider Scala is a lot bigger. If you want statically typed functional programming, but also functional programming that stands a chance of adoption in many environments, then Scala is about your only choice.
- eranation 12y agoAnd Kotlin, and I would dare say Rust.
- skrebbel 12y agoI may be living under a rock, but is Kotlin really used in production a lot? And Rust? Does anyone dare basing production stuff on Rust like now? With breaking changes all the time?
- TheHydroImpulse 12y agoThere's only 3 production deployments of Rust that I know about. It's not recommended to use Rust in production atm.
- stigi 12y agoVariance explained by Martin Odersky in the Functional Programming Principles Course https://class.coursera.org/progfun-004/lecture/83 https://class.coursera.org/progfun-004/lecture/83
- dominotw 12y ago"Reactive is the new agile. Everyone is talking about reactive. Reactive is this, reactive is that" This is the first time I've heard of reactive and read HN everyday. > Java's enumerable( Iterable?) is broken anyone know what how its broken?
- coldtea 12y ago>This is the first time I've heard of reactive and read HN everyday You're not paying enough attention. There were tons of articles on reactive on the front page, at least 1-2 per week, for the last year or so. See also: "functional reactive programming". See also: "React.js". See also: "Om". https://www.google.com/search?q=site%3Anews.ycombinator.com+reactive&oq=site%3Anews.ycombinator.com https://www.google.com/search?q=site%3Anews.ycombinator.com+...
- stusmall 12y agoHe starts talking about that at ~23min. You will probably need to watch the whole video up to there to understand the context and why it is important to him.
- auxon0 12y agoHe's saying people are turning it into a buzz word that is losing it's true meaning, so instead of the buzz word, think of what it's really all about: composing and managing side-effects. Take a look at Google Trends for "Reactive Programming", it spiked over the last year or so,: http://www.google.com/trends/explore#q=reactive%20programming http://www.google.com/trends/explore#q=reactive%20programmin... Take a look on GitHub at all the projects with reactive in the name or descriptions; it's become a buzzword that people use to describe various things that don't have any relationship to the original. Iterable is broken, as Erik said, because it has a hasNext() method, and a next() method, which is a problem because hasNext() causes side-effects to be evaluated. Imagine if the implementation of the iterator has to execute a long running function, or wait for the next value in an observable to be pushed, like an event. So, if call hasNext() twice, then it may cause a side effect so that next() actually has a different result than it would without the side effect. Thus, it is not mathematically, a function, and can't really be used to build monads. So, unfortunately, due to backwards compatibility, Java classes that implement Iterable/Iterator can't automatically get the benefits of list monads etc..., by simply defining a library of operators that take Iterable/Iterators, like C# could with IEnumerable/IEnumerator. In C#, IE only has side effects in the MoveNext() method, which returns true or false if there's another element, and the effect is explicit in the name, which helps. However, more importantly, if you get the value from Current, there is no side effect, and you can do that as many times as you like. With Iterable, if you call next() it moves to the next element. So, it is impossible to get the same value twice with a guarantee of no side effects, and impossible to guarantee mathematically sound composition of Iterables. The interface is broken, and changing it would break nearly every Java program.