Ur/Web Examples
Check-in [89123158a3]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:add composable signals libary, providing various lift functions for signals, similar to liftA in Haskell
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:89123158a33345f3ad767691f68daef478bddb4a
User & Date: beyert 2016-08-17 05:03:20
Context
2016-08-17
05:04
tiny updates to documentation check-in: 208f87bd26 user: beyert tags: trunk
05:03
add composable signals libary, providing various lift functions for signals, similar to liftA in Haskell check-in: 89123158a3 user: beyert tags: trunk
04:50
add composable signals libary, providing various lift functions for signals, similar to liftA in Haskell check-in: e1c70eddd2 user: beyert tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to wiki/urweb_examples.wiki.

19
20
21
22
23
24
25








26
27
28
29
30
31
32

A simple demo that generates random numbers using the C FFI, using a time-based seed (delays 10 microseconds at the minimum) to ensure uniqueness.

<h4>pseudoRandomIota/:</h4>

A simple demo that generates a sequence of random numbers over time.  Reuses the time-based production functions from the iota example and the random number generation functions from the pseudoRandom example.  A monadic version of periodic (periodicT) must be used, since we are dealing with transactional values.









<h3>Compatibility</h3>

Ideally, these demos should&hellip;

  *  Run on all major browsers: Firefox, Opera, Chrome, Safari and Internet Explorer.

  *  Compile and run on Ur/Web version 20120807, or newer.  Old versions of Ur/Web must use older revisions from this repository, where appropriate.







>
>
>
>
>
>
>
>







19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40

A simple demo that generates random numbers using the C FFI, using a time-based seed (delays 10 microseconds at the minimum) to ensure uniqueness.

<h4>pseudoRandomIota/:</h4>

A simple demo that generates a sequence of random numbers over time.  Reuses the time-based production functions from the iota example and the random number generation functions from the pseudoRandom example.  A monadic version of periodic (periodicT) must be used, since we are dealing with transactional values.

<h4>jsonRpcUI:</h4>

An experimental demo of a JSON RPC client written in Haskell, called on the Ur/Web server side via the C FFI, which in turn communicates with another network service on the server (most likely, running in Haskell).  The benefit of this approach is that it is fully compliant with transactional semantics, which I believe is desirable for highly stateful applications (eg. that modify the file system, run long-running shell commands, read/write files, send/receive emails, and so on).

<h4>composableSignals:</h4>

Provides lift and map operations for signals, similar to liftA, liftA2, which in Haskell are used to lift functions to applicatives.  To be more specific, I noticed that lifting functions were used to compose wires in examples for the FRP library Netwire.  The intention of this library is exactly the same.  Aside from liftA in Haskell, it provides a similar analog to lift used on a ValueCell in Scala Lift web framework, combineWith in bacon.js, and likely many others, thus giving Ur/Web FRP parity with other systems...

<h3>Compatibility</h3>

Ideally, these demos should&hellip;

  *  Run on all major browsers: Firefox, Opera, Chrome, Safari and Internet Explorer.

  *  Compile and run on Ur/Web version 20120807, or newer.  Old versions of Ur/Web must use older revisions from this repository, where appropriate.