Skip to content
0:00 / 0:00

#reflex#frp#functionalreactiveprogramming

Reflex: Practical Functional Reactive Programming (FRP) in Haskell (part 1)

NYC Haskell User's Group

1.7K subscribers • 23 videos on Hallway

YouTube
  • Recommended by 2 people: 1 on Lobsters and 1 in engineering communities.
  • Presented by Ryan Trinkle
  • Linked in the descriptionryantrinkle/try-reflex
  • May be out of date. The tools, versions or practices it shows have likely moved on.

Intermediate. Assumes working knowledge.

18K views11 years ago2 recommendations

Programming languagesWeb developmentHaskellFunctional programmingVue, Svelte, Angular and others

Ryan Trinkle introduces Reflex, a deterministic and efficient functional reactive programming library for Haskell and GHCJS, with live examples.

Ryan Trinkle presents his new library, Reflex, a deterministic, efficient, higher-order Functional Reactive Programming (FRP) system. FRP is a radically new paradigm for writing interactive software: Instead of writing event loops or callbacks, programmers compose interactive applications using ordinary pure functional programming methods. The unique design of Reflex gives it the power and flexibility necessary to handle complex large-scale applications. Reflex can be compiled to binary using GHC or JavaScript using GHCJS. Ryan Trinkle has been CTO of a successful Haskell-based startup, founder of an exclusively-Haskell software development company, and co-founder of the New York Haskell Meetup. New York Haskell Meetup, March 25th, 2015 Meetup Link: meetup.com/NY-Haskell/events/221142235/ Slides: reflex-nyhug.obsidian.systems Github: github.com/ryantrinkle/try-reflex Part 2: youtube.com/watch?v=3qfc9XFVo2c

Why it's here

2 people recommend this

What people say. Recommended as a practical introduction to the Reflex functional reactive programming library, featuring a live-coded tweet stream integration.

u/mightybytein r/haskell • Recommends

Reflex: Practical Functional Reactive Programming (part 1)

mightybyteon Lobsters • Recommends

Reflex: Practical Functional Reactive Programming (part 1) This is part one of a two-part talk that goes through practical examples and gives a nice intro for what it's like to use the reflex FRP library. He walks through the process of integrating a live tweet stream right into the presentation which shows audience tweets on-screen in real time.

u/mightybytein r/haskell • Mentions

On “"Hask" anything! The thread where you ask and we try to answer!”

GHCJS is definitely not dying. It's actually recently become more commercially viable. The reflex FRP library has a reflex-dom package for building web GUIs that uses GHCJS. There's a great presentation about it here. All the live code in that presentation was compiled from Haskell with GHCJS.

u/mightybytein r/haskell • Mentions

On “How to figure out which FRP library to use?”

FRP allows you to build reactive things more composably. Functions of the form `MonolithicState -> MonolithicState` aren't very composable. This video has one of the best descriptions I've seen.

u/BethArin r/haskell • Mentions

On “Elm / Purescript etc frontend + Haskell backend (Yesod or just Warp etc) -- Meteor like framework?”

Take a look at Reflex as well: link to this video

u/catscatscatin r/haskell • Mentions

On “Newbie question: What is currently the most recommended way of writing a web app in Haskell?”

You may get a glimpse of what it is capable of via this presentation of the author: ~~link to this video Edit: Actually, this seems to be a higher quality version of the same talk given at a later time: link to this video

u/Tekmoin r/haskell • Mentions

On “Yesod + ? for reactive web programming.”

I'm not an expert on this, but I think this is what reflex is for. The author has given a couple of talks on the library, too: * link to this video * link to this video

u/mightybytein r/haskell • Mentions

On “[Help] Haskell & Javascript”

I'd recommend trying it with the reflex FRP library. Ryan Trinkle has really streamline the process of getting up and running with his try-reflex repo. Even if you don't need substantial reactive functionality that still might be the easiest way to get started. But if you're building GUIs, then I'm guessing you'll probably want FRP sooner rather than later. Check out Ryan's talk at the NY Haskell Meetup for a nice introduction to reflex.

u/FagPipein r/haskell • Mentions

On “Just Found Out about Reflex-FRP. is it worth looking into and learning?”

This beginner friendly tutorial: Queensland FRP This talk by the creator here and part 2 This talk here Reading resources/tutorials: Building a calculator Realworld reflex/obelisk Quickstart resources Various other talks and resources

u/ryantrinklein r/haskell • Mentions

On “What is the most hands-on way to learn Haskell?”

Why don't you take a look at Reflex, a library I wrote for doing GUI programming in clear Haskell style? I've got a tutorial that will get you writing GUI apps in a few minutes, and you can compile them down to either JavaScript or native Linux applications. I've also given a talk on Reflex, which you might find interesting.

u/jamlotharin r/haskell • Mentions

On “What Gui libray do you use/recommend”

+1 for a library designed for NixOS :-) The videos: - link to this video - link to this video Found here https://github.com/ryantrinkle/reflex

u/mightybytein r/haskell • Mentions

On “What's the best way to create GUI for Haskell program?”

If a web gui fits your needs, then the reflex FRP system has its reflex-dom API that makes building interactive web GUIs quite nice. See this video for an overview.

u/liberalogicain r/haskell • Mentions

On “Using applicative functors for reactive web interfaces: purescript-flare”

Reflex is pretty cool! Have a look: project, link to this video, slides

u/mightybytein r/haskell • Mentions

On “How's your experience with full stack haskell been?”

Not really. :( I've also had trouble finding anything useful on GHCJS. The good news though is that if you use reflex-dom, you don't need to do very much with GHCJS directly. And in the few cases that I've needed to, I can often find some similar code elsewhere in reflex-dom that I can copy. To get started with reflex, I'd recommend watching some of these talks by Ryan Trinkle: [video (slides here) http://www.infoq.com/presentations/functional-techniques-complexity [video