ateatutorial manuelbärenz 15.januar2020 · setup quickintroductiontorhine let’shack!...

73
Setup Quick introduction to Rhine Let’s hack! After the tutorial Rhine - FRP with type level clocks A tea tutorial Manuel Bärenz 15. Januar 2020

Upload: others

Post on 10-Sep-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Rhine - FRP with type level clocksA tea tutorial

Manuel Bärenz

15. Januar 2020

Page 2: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

cabal updategit clone https://github.com/turion/rhine-tutorial/cd rhine-tutorialcabal sandbox initcabal install --only-dependenciescabal configurecabal buildcabal run rhine-tutorial

Read documentation on http://hackage.haskell.org/package/rhine(version 0.1.0.0)!

Page 3: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Synchronous arrowized FRP

Dunai (Iván Pérez, Henrik Nilsson, MB)data MSF m a b = MSF (a -> m (b, MSF m a b))

-- Control.Arrow(>>>) :: MSF m a b -> MSF m b c -> MSF m a c(***) :: MSF m a b -> MSF m c d -> MSF m (a,c) (b,d)arr :: (a -> b) -> MSF m a b

-- only dunaiarrM :: (a -> m b) -> MSF m a b

MSF (Reader Double) is a replacement for FRP.Yampa.SF.Other monads allow for concise FRP paradigms:

State, Reader and Writer give global state variables.List gives branching computations.Either gives control flow!

Support for (entering and leaving) monad transformers.

Page 4: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Synchronous arrowized FRP

Dunai (Iván Pérez, Henrik Nilsson, MB)data MSF m a b = MSF (a -> m (b, MSF m a b))

-- Control.Arrow(>>>) :: MSF m a b -> MSF m b c -> MSF m a c(***) :: MSF m a b -> MSF m c d -> MSF m (a,c) (b,d)arr :: (a -> b) -> MSF m a b

-- only dunaiarrM :: (a -> m b) -> MSF m a b

MSF (Reader Double) is a replacement for FRP.Yampa.SF.Other monads allow for concise FRP paradigms:

State, Reader and Writer give global state variables.List gives branching computations.Either gives control flow!

Support for (entering and leaving) monad transformers.

Page 5: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Synchronous arrowized FRP

Dunai (Iván Pérez, Henrik Nilsson, MB)data MSF m a b = MSF (a -> m (b, MSF m a b))

-- Control.Arrow(>>>) :: MSF m a b -> MSF m b c -> MSF m a c(***) :: MSF m a b -> MSF m c d -> MSF m (a,c) (b,d)arr :: (a -> b) -> MSF m a b

-- only dunaiarrM :: (a -> m b) -> MSF m a b

MSF (Reader Double) is a replacement for FRP.Yampa.SF.Other monads allow for concise FRP paradigms:

State, Reader and Writer give global state variables.List gives branching computations.Either gives control flow!

Support for (entering and leaving) monad transformers.

Page 6: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Synchronous arrowized FRP

Dunai (Iván Pérez, Henrik Nilsson, MB)data MSF m a b = MSF (a -> m (b, MSF m a b))

-- Control.Arrow(>>>) :: MSF m a b -> MSF m b c -> MSF m a c(***) :: MSF m a b -> MSF m c d -> MSF m (a,c) (b,d)arr :: (a -> b) -> MSF m a b

-- only dunaiarrM :: (a -> m b) -> MSF m a b

MSF (Reader Double) is a replacement for FRP.Yampa.SF.

Other monads allow for concise FRP paradigms:

State, Reader and Writer give global state variables.List gives branching computations.Either gives control flow!

Support for (entering and leaving) monad transformers.

Page 7: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Synchronous arrowized FRP

Dunai (Iván Pérez, Henrik Nilsson, MB)data MSF m a b = MSF (a -> m (b, MSF m a b))

-- Control.Arrow(>>>) :: MSF m a b -> MSF m b c -> MSF m a c(***) :: MSF m a b -> MSF m c d -> MSF m (a,c) (b,d)arr :: (a -> b) -> MSF m a b

-- only dunaiarrM :: (a -> m b) -> MSF m a b

MSF (Reader Double) is a replacement for FRP.Yampa.SF.Other monads allow for concise FRP paradigms:

State, Reader and Writer give global state variables.List gives branching computations.Either gives control flow!

Support for (entering and leaving) monad transformers.

Page 8: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Synchronous arrowized FRP

Dunai (Iván Pérez, Henrik Nilsson, MB)data MSF m a b = MSF (a -> m (b, MSF m a b))

-- Control.Arrow(>>>) :: MSF m a b -> MSF m b c -> MSF m a c(***) :: MSF m a b -> MSF m c d -> MSF m (a,c) (b,d)arr :: (a -> b) -> MSF m a b

-- only dunaiarrM :: (a -> m b) -> MSF m a b

MSF (Reader Double) is a replacement for FRP.Yampa.SF.Other monads allow for concise FRP paradigms:

State, Reader and Writer give global state variables.

List gives branching computations.Either gives control flow!

Support for (entering and leaving) monad transformers.

Page 9: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Synchronous arrowized FRP

Dunai (Iván Pérez, Henrik Nilsson, MB)data MSF m a b = MSF (a -> m (b, MSF m a b))

-- Control.Arrow(>>>) :: MSF m a b -> MSF m b c -> MSF m a c(***) :: MSF m a b -> MSF m c d -> MSF m (a,c) (b,d)arr :: (a -> b) -> MSF m a b

-- only dunaiarrM :: (a -> m b) -> MSF m a b

MSF (Reader Double) is a replacement for FRP.Yampa.SF.Other monads allow for concise FRP paradigms:

State, Reader and Writer give global state variables.List gives branching computations.

Either gives control flow!Support for (entering and leaving) monad transformers.

Page 10: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Synchronous arrowized FRP

Dunai (Iván Pérez, Henrik Nilsson, MB)data MSF m a b = MSF (a -> m (b, MSF m a b))

-- Control.Arrow(>>>) :: MSF m a b -> MSF m b c -> MSF m a c(***) :: MSF m a b -> MSF m c d -> MSF m (a,c) (b,d)arr :: (a -> b) -> MSF m a b

-- only dunaiarrM :: (a -> m b) -> MSF m a b

MSF (Reader Double) is a replacement for FRP.Yampa.SF.Other monads allow for concise FRP paradigms:

State, Reader and Writer give global state variables.List gives branching computations.Either gives control flow!

Support for (entering and leaving) monad transformers.

Page 11: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Synchronous arrowized FRP

Dunai (Iván Pérez, Henrik Nilsson, MB)data MSF m a b = MSF (a -> m (b, MSF m a b))

-- Control.Arrow(>>>) :: MSF m a b -> MSF m b c -> MSF m a c(***) :: MSF m a b -> MSF m c d -> MSF m (a,c) (b,d)arr :: (a -> b) -> MSF m a b

-- only dunaiarrM :: (a -> m b) -> MSF m a b

MSF (Reader Double) is a replacement for FRP.Yampa.SF.Other monads allow for concise FRP paradigms:

State, Reader and Writer give global state variables.List gives branching computations.Either gives control flow!

Support for (entering and leaving) monad transformers.

Page 12: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Synchronous arrowized FRP

Arrow syntax{-# LANGUAGE Arrows #-}

verboseSum :: MSF IO Int IntverboseSum = proc n -> do

s <- sumS -< n_ <- arrM print -< "The sum is now " ++ show sreturnA -< s

Page 13: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Clocks

Clock type All relevant properties of the clock, such as ...

When, and how often, the clock should tickWhich monad the clock takes side effects inWhat additional data (besides a time stamp) theclock outputs

Clock value All information needed to run the clock

E.g. physical device address, event socketImplementation choice

Running clock Side-effectful stream of time stamps, tagged withadditional info about the tick.

Page 14: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Clocks

Clock type All relevant properties of the clock, such as ...When, and how often, the clock should tick

Which monad the clock takes side effects inWhat additional data (besides a time stamp) theclock outputs

Clock value All information needed to run the clock

E.g. physical device address, event socketImplementation choice

Running clock Side-effectful stream of time stamps, tagged withadditional info about the tick.

Page 15: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Clocks

Clock type All relevant properties of the clock, such as ...When, and how often, the clock should tickWhich monad the clock takes side effects in

What additional data (besides a time stamp) theclock outputs

Clock value All information needed to run the clock

E.g. physical device address, event socketImplementation choice

Running clock Side-effectful stream of time stamps, tagged withadditional info about the tick.

Page 16: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Clocks

Clock type All relevant properties of the clock, such as ...When, and how often, the clock should tickWhich monad the clock takes side effects inWhat additional data (besides a time stamp) theclock outputs

Clock value All information needed to run the clock

E.g. physical device address, event socketImplementation choice

Running clock Side-effectful stream of time stamps, tagged withadditional info about the tick.

Page 17: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Clocks

Clock type All relevant properties of the clock, such as ...When, and how often, the clock should tickWhich monad the clock takes side effects inWhat additional data (besides a time stamp) theclock outputs

Clock value All information needed to run the clock

E.g. physical device address, event socketImplementation choice

Running clock Side-effectful stream of time stamps, tagged withadditional info about the tick.

Page 18: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Clocks

Clock type All relevant properties of the clock, such as ...When, and how often, the clock should tickWhich monad the clock takes side effects inWhat additional data (besides a time stamp) theclock outputs

Clock value All information needed to run the clockE.g. physical device address, event socket

Implementation choiceRunning clock Side-effectful stream of time stamps, tagged with

additional info about the tick.

Page 19: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Clocks

Clock type All relevant properties of the clock, such as ...When, and how often, the clock should tickWhich monad the clock takes side effects inWhat additional data (besides a time stamp) theclock outputs

Clock value All information needed to run the clockE.g. physical device address, event socketImplementation choice

Running clock Side-effectful stream of time stamps, tagged withadditional info about the tick.

Page 20: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Clocks

Clock type All relevant properties of the clock, such as ...When, and how often, the clock should tickWhich monad the clock takes side effects inWhat additional data (besides a time stamp) theclock outputs

Clock value All information needed to run the clockE.g. physical device address, event socketImplementation choice

Running clock Side-effectful stream of time stamps, tagged withadditional info about the tick.

Page 21: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Clocks

Rhine-- simplified hereclass Clock m cl where

type Time cl -- time stamptype Tag cl -- additional information about tickinitClock :: cl -> MSF m () (TimeInfo cl, Tag cl)

data TimeInfo cl = {...}-- absolute and relative time, tag

Page 22: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Clocks

Rhine-- simplified hereclass Clock m cl where

type Time cl -- time stamptype Tag cl -- additional information about tickinitClock :: cl -> MSF m () (TimeInfo cl, Tag cl)

data TimeInfo cl = {...}-- absolute and relative time, tag

Page 23: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Clocks

A clock produces side effects to...... wait between ticks,... measure the current time,... produce additional data (e.g. events).

Examples of clocksFixed sample rate (e.g. Millisecond n)Events (e.g. Stdin)

Page 24: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Clocks

A clock produces side effects to...... wait between ticks,... measure the current time,... produce additional data (e.g. events).

Examples of clocksFixed sample rate (e.g. Millisecond n)Events (e.g. Stdin)

Page 25: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Clocks

type ClSF m cl a b = MSF (ReaderT (TimeInfo cl) m) a b

Lifting dunai conceptsarrMCl :: (a -> m b) -> SyncSF m cl a b...

Time informationtimeInfo :: ClSF m cl () (TimeInfo cl)

Basic signal processingintegral :: VectorSpace v => ClSF m cl v v...

Page 26: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Clocks

type ClSF m cl a b = MSF (ReaderT (TimeInfo cl) m) a b

Lifting dunai conceptsarrMCl :: (a -> m b) -> SyncSF m cl a b...

Time informationtimeInfo :: ClSF m cl () (TimeInfo cl)

Basic signal processingintegral :: VectorSpace v => ClSF m cl v v...

Page 27: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Clocks

type ClSF m cl a b = MSF (ReaderT (TimeInfo cl) m) a b

Lifting dunai conceptsarrMCl :: (a -> m b) -> SyncSF m cl a b...

Time informationtimeInfo :: ClSF m cl () (TimeInfo cl)

Basic signal processingintegral :: VectorSpace v => ClSF m cl v v...

Page 28: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Clocks

type ClSF m cl a b = MSF (ReaderT (TimeInfo cl) m) a b

Lifting dunai conceptsarrMCl :: (a -> m b) -> SyncSF m cl a b...

Time informationtimeInfo :: ClSF m cl () (TimeInfo cl)

Basic signal processingintegral :: VectorSpace v => ClSF m cl v v...

Page 29: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Exceptions and control flow

ExceptT...data Either e a = Left e | Right anewtype ExceptT e m a = ExceptT (m (Either e a))

...control flow! (Thanks to Paolo Capriotti)-- dunai, rhine (simplified)newtype ClSFExcept m cl a b e

= ClSFExcept (SyncSF (ExceptT e m) cl a b)

instance Monad m => Monad (ClSFExcept m cl a b)

throwOn' :: ClSF (ExceptT e m) cl (Bool, e) ()try :: ClSF (ExceptT e m) cl a b

-> ClSFExcept m cl a b esafely :: ClSFExcept m cl a b Empty -> SyncSF m cl a bsafe :: ClSF m cl a b -> SyncExcept m cl a b e

Page 30: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Exceptions and control flow

ExceptT...data Either e a = Left e | Right anewtype ExceptT e m a = ExceptT (m (Either e a))

...control flow! (Thanks to Paolo Capriotti)-- dunai, rhine (simplified)newtype ClSFExcept m cl a b e

= ClSFExcept (SyncSF (ExceptT e m) cl a b)

instance Monad m => Monad (ClSFExcept m cl a b)

throwOn' :: ClSF (ExceptT e m) cl (Bool, e) ()try :: ClSF (ExceptT e m) cl a b

-> ClSFExcept m cl a b esafely :: ClSFExcept m cl a b Empty -> SyncSF m cl a bsafe :: ClSF m cl a b -> SyncExcept m cl a b e

Page 31: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Exceptions and control flow

ExceptT...data Either e a = Left e | Right anewtype ExceptT e m a = ExceptT (m (Either e a))

...control flow! (Thanks to Paolo Capriotti)-- dunai, rhine (simplified)newtype ClSFExcept m cl a b e

= ClSFExcept (SyncSF (ExceptT e m) cl a b)

instance Monad m => Monad (ClSFExcept m cl a b)

throwOn' :: ClSF (ExceptT e m) cl (Bool, e) ()try :: ClSF (ExceptT e m) cl a b

-> ClSFExcept m cl a b esafely :: ClSFExcept m cl a b Empty -> SyncSF m cl a bsafe :: ClSF m cl a b -> SyncExcept m cl a b e

Page 32: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Exceptions and control flow

Hello World!type SumClock = Millisecond 100

fillUp :: ClSF (ExceptT Double m) SumClock Double ()fillUp = proc x -> do

s <- integral -< x_ <- throwOn' -< (s > 5, s)returnA -< ()

helloWorld :: ClSFExcept IO SumClock () () EmptyhelloWorld = do

try $ arr (const 1) >>> fillUponce_ $ putStrLn "Hello World!"helloWorld

main = flow $ safely helloWorld @@ waitClock

Page 33: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Exceptions and control flow

Clock safetyfastSignal :: ClSF m FastClock () a

slowProcessor :: ClSF m SlowClock a b

clockTypeError = fastSignal >>> slowProcessor

PresentationExamples.hs:67:33: error:• Couldn't match type ‘SlowClock’ with ‘FastClock’

Page 34: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Asynchronous FRP

data Schedule m cl1 cl2

Binary schedulesExecute two different clocks simultaneously.

Can be clock-polymorphic or specific to certain clocks.(No implementation details here.)Some examples:

concurrently :: Schedule IO cl1 cl2schedule :: Schedule (ScheduleT m) cl1 cl2

Page 35: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Asynchronous FRP

data Schedule m cl1 cl2

Binary schedulesExecute two different clocks simultaneously.

Can be clock-polymorphic or specific to certain clocks.(No implementation details here.)Some examples:

concurrently :: Schedule IO cl1 cl2schedule :: Schedule (ScheduleT m) cl1 cl2

Page 36: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Asynchronous FRP

data Schedule m cl1 cl2

Binary schedulesExecute two different clocks simultaneously.

Can be clock-polymorphic or specific to certain clocks.

(No implementation details here.)Some examples:

concurrently :: Schedule IO cl1 cl2schedule :: Schedule (ScheduleT m) cl1 cl2

Page 37: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Asynchronous FRP

data Schedule m cl1 cl2

Binary schedulesExecute two different clocks simultaneously.

Can be clock-polymorphic or specific to certain clocks.(No implementation details here.)

Some examples:

concurrently :: Schedule IO cl1 cl2schedule :: Schedule (ScheduleT m) cl1 cl2

Page 38: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Asynchronous FRP

data Schedule m cl1 cl2

Binary schedulesExecute two different clocks simultaneously.

Can be clock-polymorphic or specific to certain clocks.(No implementation details here.)Some examples:

concurrently :: Schedule IO cl1 cl2schedule :: Schedule (ScheduleT m) cl1 cl2

Page 39: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Asynchronous FRP

data Schedule m cl1 cl2

Binary schedulesExecute two different clocks simultaneously.

Can be clock-polymorphic or specific to certain clocks.(No implementation details here.)Some examples:

concurrently :: Schedule IO cl1 cl2

schedule :: Schedule (ScheduleT m) cl1 cl2

Page 40: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Asynchronous FRP

data Schedule m cl1 cl2

Binary schedulesExecute two different clocks simultaneously.

Can be clock-polymorphic or specific to certain clocks.(No implementation details here.)Some examples:

concurrently :: Schedule IO cl1 cl2schedule :: Schedule (ScheduleT m) cl1 cl2

Page 41: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Asynchronous FRP

data ResamplingBuffer m cla clb a b = ResamplingBuffer{ put :: TimeInfo cla -> a

-> m ( ResamplingBuffer m cla clb a b), get :: TimeInfo clb

-> m (b, ResamplingBuffer m cla clb a b)}

Resampling buffersBuffer data at the boundary between two asynchronous systems.

Can be clock-polymorphic or specific to certain clocks.Some examples

collect :: ResamplingBuffer m cl1 cl2 a [a]fifo :: ResamplingBuffer m cl1 cl2 a (Maybe a)keepLast :: a -> ResamplingBuffer m cl1 cl2 a aLinear interpolation, combinators to build your own. . .

Page 42: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Asynchronous FRP

data ResamplingBuffer m cla clb a b = ResamplingBuffer{ put :: TimeInfo cla -> a

-> m ( ResamplingBuffer m cla clb a b), get :: TimeInfo clb

-> m (b, ResamplingBuffer m cla clb a b)}

Resampling buffersBuffer data at the boundary between two asynchronous systems.

Can be clock-polymorphic or specific to certain clocks.Some examples

collect :: ResamplingBuffer m cl1 cl2 a [a]fifo :: ResamplingBuffer m cl1 cl2 a (Maybe a)keepLast :: a -> ResamplingBuffer m cl1 cl2 a aLinear interpolation, combinators to build your own. . .

Page 43: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Asynchronous FRP

data ResamplingBuffer m cla clb a b = ResamplingBuffer{ put :: TimeInfo cla -> a

-> m ( ResamplingBuffer m cla clb a b), get :: TimeInfo clb

-> m (b, ResamplingBuffer m cla clb a b)}

Resampling buffersBuffer data at the boundary between two asynchronous systems.

Can be clock-polymorphic or specific to certain clocks.

Some examples

collect :: ResamplingBuffer m cl1 cl2 a [a]fifo :: ResamplingBuffer m cl1 cl2 a (Maybe a)keepLast :: a -> ResamplingBuffer m cl1 cl2 a aLinear interpolation, combinators to build your own. . .

Page 44: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Asynchronous FRP

data ResamplingBuffer m cla clb a b = ResamplingBuffer{ put :: TimeInfo cla -> a

-> m ( ResamplingBuffer m cla clb a b), get :: TimeInfo clb

-> m (b, ResamplingBuffer m cla clb a b)}

Resampling buffersBuffer data at the boundary between two asynchronous systems.

Can be clock-polymorphic or specific to certain clocks.Some examples

collect :: ResamplingBuffer m cl1 cl2 a [a]fifo :: ResamplingBuffer m cl1 cl2 a (Maybe a)keepLast :: a -> ResamplingBuffer m cl1 cl2 a aLinear interpolation, combinators to build your own. . .

Page 45: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Asynchronous FRP

data ResamplingBuffer m cla clb a b = ResamplingBuffer{ put :: TimeInfo cla -> a

-> m ( ResamplingBuffer m cla clb a b), get :: TimeInfo clb

-> m (b, ResamplingBuffer m cla clb a b)}

Resampling buffersBuffer data at the boundary between two asynchronous systems.

Can be clock-polymorphic or specific to certain clocks.Some examples

collect :: ResamplingBuffer m cl1 cl2 a [a]

fifo :: ResamplingBuffer m cl1 cl2 a (Maybe a)keepLast :: a -> ResamplingBuffer m cl1 cl2 a aLinear interpolation, combinators to build your own. . .

Page 46: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Asynchronous FRP

data ResamplingBuffer m cla clb a b = ResamplingBuffer{ put :: TimeInfo cla -> a

-> m ( ResamplingBuffer m cla clb a b), get :: TimeInfo clb

-> m (b, ResamplingBuffer m cla clb a b)}

Resampling buffersBuffer data at the boundary between two asynchronous systems.

Can be clock-polymorphic or specific to certain clocks.Some examples

collect :: ResamplingBuffer m cl1 cl2 a [a]fifo :: ResamplingBuffer m cl1 cl2 a (Maybe a)

keepLast :: a -> ResamplingBuffer m cl1 cl2 a aLinear interpolation, combinators to build your own. . .

Page 47: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Asynchronous FRP

data ResamplingBuffer m cla clb a b = ResamplingBuffer{ put :: TimeInfo cla -> a

-> m ( ResamplingBuffer m cla clb a b), get :: TimeInfo clb

-> m (b, ResamplingBuffer m cla clb a b)}

Resampling buffersBuffer data at the boundary between two asynchronous systems.

Can be clock-polymorphic or specific to certain clocks.Some examples

collect :: ResamplingBuffer m cl1 cl2 a [a]fifo :: ResamplingBuffer m cl1 cl2 a (Maybe a)keepLast :: a -> ResamplingBuffer m cl1 cl2 a a

Linear interpolation, combinators to build your own. . .

Page 48: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Asynchronous FRP

data ResamplingBuffer m cla clb a b = ResamplingBuffer{ put :: TimeInfo cla -> a

-> m ( ResamplingBuffer m cla clb a b), get :: TimeInfo clb

-> m (b, ResamplingBuffer m cla clb a b)}

Resampling buffersBuffer data at the boundary between two asynchronous systems.

Can be clock-polymorphic or specific to certain clocks.Some examples

collect :: ResamplingBuffer m cl1 cl2 a [a]fifo :: ResamplingBuffer m cl1 cl2 a (Maybe a)keepLast :: a -> ResamplingBuffer m cl1 cl2 a aLinear interpolation, combinators to build your own. . .

Page 49: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Asynchronous FRP

Asynchronous signal functionsdata SN m cl a b -- Signal networktype family In cltype family Out cl

A clocked reactive programdata Rhine m cl a b

(...basically an SF and a matching clock!)

Execution (reactimation)flow :: Rhine m cl () () -> m ()

Page 50: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Asynchronous FRP

Asynchronous signal functionsdata SN m cl a b -- Signal networktype family In cltype family Out cl

A clocked reactive programdata Rhine m cl a b

(...basically an SF and a matching clock!)

Execution (reactimation)flow :: Rhine m cl () () -> m ()

Page 51: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Asynchronous FRP

Asynchronous signal functionsdata SN m cl a b -- Signal networktype family In cltype family Out cl

A clocked reactive programdata Rhine m cl a b

(...basically an SF and a matching clock!)

Execution (reactimation)flow :: Rhine m cl () () -> m ()

Page 52: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Asynchronous FRP

Synchronous subsystemscl :: MyClocksf :: ClSF m MyClock A BrhineCl :: Rhine m MyClock A BrhineCl = sf @@ cl

Page 53: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Asynchronous FRP

Parallel compositionclL :: MyClockLclR :: MyClockRsfL :: ClSF m MyClockL C DsfR :: ClSF m MyClockR C DschedPar :: Schedule m MyClockL MyClockRrhinePar = sfL @@ clL **@ schedPar @** syncsfR @@ clR

Sequential compositionbuf :: ResamplingBuffer m MyClock (In (..)) B CschedSeq :: Schedule m ...rhineSeq = rhineCl >-- buf -@- schedSeq --> rhineP

Page 54: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Asynchronous FRP

Parallel compositionclL :: MyClockLclR :: MyClockRsfL :: ClSF m MyClockL C DsfR :: ClSF m MyClockR C DschedPar :: Schedule m MyClockL MyClockRrhinePar = sfL @@ clL **@ schedPar @** syncsfR @@ clR

Sequential compositionbuf :: ResamplingBuffer m MyClock (In (..)) B CschedSeq :: Schedule m ...rhineSeq = rhineCl >-- buf -@- schedSeq --> rhineP

Page 55: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

The plan: A tea appRun several tea timers in parallelReactively read tea requests from the console

Any questions before we start hacking?

Page 56: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

The plan: A tea appRun several tea timers in parallelReactively read tea requests from the console

Any questions before we start hacking?

Page 57: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Have fun!

Page 58: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

What Rhine can do

What else you could (easily) do with Dunai and RhineSimple arcade games (SDL, Gloss)Reactive console apps

What should be doable, but I didn’t do yet because of lazynessWebservers, server-side web appsInteractive File I/OGUI programsExternal devices (e.g. Kinect, Wiimote)

What might eventually be feasibleReactive audio synthesis, processing and analysis(performance...)Reactive web apps (GHCJS...)Android, embedded systems (recent GHC...)

Page 59: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

What Rhine can do

What else you could (easily) do with Dunai and RhineSimple arcade games (SDL, Gloss)Reactive console apps

What should be doable, but I didn’t do yet because of lazynessWebservers, server-side web appsInteractive File I/OGUI programsExternal devices (e.g. Kinect, Wiimote)

What might eventually be feasibleReactive audio synthesis, processing and analysis(performance...)Reactive web apps (GHCJS...)Android, embedded systems (recent GHC...)

Page 60: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

What Rhine can do

What else you could (easily) do with Dunai and RhineSimple arcade games (SDL, Gloss)Reactive console apps

What should be doable, but I didn’t do yet because of lazynessWebservers, server-side web appsInteractive File I/OGUI programsExternal devices (e.g. Kinect, Wiimote)

What might eventually be feasibleReactive audio synthesis, processing and analysis(performance...)Reactive web apps (GHCJS...)Android, embedded systems (recent GHC...)

Page 61: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

Comparison to other frameworks

Framework Pro Rhine Contra Rhine

Yampa, dunai Asynchronicity, clocktypes

Performance

Pipes, conduit FRP, clocks Performance?

Most classicalFRP frame-works

No IO built in, clocktypes

?

CλaSH General purpose No compilation to cir-cuits

Page 62: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

More information

Dunai

github.com/ivanperez-keera/dunaiThere’s a link to the article!

Rhine

Article: github.com/turion/rhine#documentationThis tutorial: github.com/turion/rhine-tutorial/Checkout branch final for solutionsDocumentation on hackageSimple examples in github.com/turion/rhine/

Page 63: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

More information

Dunaigithub.com/ivanperez-keera/dunai

There’s a link to the article!

Rhine

Article: github.com/turion/rhine#documentationThis tutorial: github.com/turion/rhine-tutorial/Checkout branch final for solutionsDocumentation on hackageSimple examples in github.com/turion/rhine/

Page 64: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

More information

Dunaigithub.com/ivanperez-keera/dunaiThere’s a link to the article!

Rhine

Article: github.com/turion/rhine#documentationThis tutorial: github.com/turion/rhine-tutorial/Checkout branch final for solutionsDocumentation on hackageSimple examples in github.com/turion/rhine/

Page 65: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

More information

Dunaigithub.com/ivanperez-keera/dunaiThere’s a link to the article!

Rhine

Article: github.com/turion/rhine#documentationThis tutorial: github.com/turion/rhine-tutorial/Checkout branch final for solutionsDocumentation on hackageSimple examples in github.com/turion/rhine/

Page 66: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

More information

Dunaigithub.com/ivanperez-keera/dunaiThere’s a link to the article!

RhineArticle: github.com/turion/rhine#documentation

This tutorial: github.com/turion/rhine-tutorial/Checkout branch final for solutionsDocumentation on hackageSimple examples in github.com/turion/rhine/

Page 67: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

More information

Dunaigithub.com/ivanperez-keera/dunaiThere’s a link to the article!

RhineArticle: github.com/turion/rhine#documentationThis tutorial: github.com/turion/rhine-tutorial/

Checkout branch final for solutionsDocumentation on hackageSimple examples in github.com/turion/rhine/

Page 68: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

More information

Dunaigithub.com/ivanperez-keera/dunaiThere’s a link to the article!

RhineArticle: github.com/turion/rhine#documentationThis tutorial: github.com/turion/rhine-tutorial/Checkout branch final for solutions

Documentation on hackageSimple examples in github.com/turion/rhine/

Page 69: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

More information

Dunaigithub.com/ivanperez-keera/dunaiThere’s a link to the article!

RhineArticle: github.com/turion/rhine#documentationThis tutorial: github.com/turion/rhine-tutorial/Checkout branch final for solutionsDocumentation on hackage

Simple examples in github.com/turion/rhine/

Page 70: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

More information

Dunaigithub.com/ivanperez-keera/dunaiThere’s a link to the article!

RhineArticle: github.com/turion/rhine#documentationThis tutorial: github.com/turion/rhine-tutorial/Checkout branch final for solutionsDocumentation on hackageSimple examples in github.com/turion/rhine/

Page 71: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

What you can do

Use Rhine at the hackathon and win a nice bar of chocolate!

Create issues on github.com/turion/rhine/ and ask for yourmost needed clocks, schedules, resampling buffers etc.!Look at easy to solve issues ongithub.com/ivanperez-keera/dunai!

Page 72: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

What you can do

Use Rhine at the hackathon and win a nice bar of chocolate!Create issues on github.com/turion/rhine/ and ask for yourmost needed clocks, schedules, resampling buffers etc.!

Look at easy to solve issues ongithub.com/ivanperez-keera/dunai!

Page 73: Ateatutorial ManuelBärenz 15.Januar2020 · Setup QuickintroductiontoRhine Let’shack! Afterthetutorial Rhine - FRP with type level clocks Ateatutorial ManuelBärenz 15.Januar2020

Setup Quick introduction to Rhine Let’s hack! After the tutorial

What you can do

Use Rhine at the hackathon and win a nice bar of chocolate!Create issues on github.com/turion/rhine/ and ask for yourmost needed clocks, schedules, resampling buffers etc.!Look at easy to solve issues ongithub.com/ivanperez-keera/dunai!