#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Options

# Functional reactive programming (FRP)

Started a new wiki page on functional reactive programming. If any programmers (scheme, javascript, haskell,agda) have any mileage to try out some of the existing packages that might be very useful (at least to me) :). Haskell already has 34 FRP libraries.

• Options
1.
edited March 2014

So would this sort of language be good for implementing discrete-time dynamical systems like "timed Petri nets"?

Comment Source:<img src = "http://math.ucr.edu/home/baez/emoticons/thumbsup.gif" alt = ""/> So would this sort of language be good for implementing discrete-time dynamical systems like "timed Petri nets"?
• Options
2.
edited March 2014

If a model involves interaction then FRP is the popular choice among functional programmers. It's all about temporal values.

type Behaviour a = Time -> a

where a is polymorphic.

For category theorists, FRP can be defined in terms of spans (see Jelsch).

I had the idea that FRP is related to Girard's geometry of interaction. I've just found that +Evan Czaplicki has referred to GoI in a paywalled paper which is good, because Elm is one of the few Haskell packages which I managed to build out of the box and is entirely web oriented with no dependencies on native graphics engines. I consider those to have been obsoleted by the cloud.

I've built as many examples as I can currently get to build. This is the main problem I find in trying to use research software to do anything useful :(.

I'll be posting them, including ones from the Petri net wiki page listing, over the next few days and weeks.

:)

Comment Source:If a model involves interaction then FRP is the popular choice among functional programmers. It's all about temporal values. type Behaviour a = Time -> a where *a* is polymorphic. For category theorists, FRP can be defined in terms of spans (see Jelsch). I had the idea that FRP is related to Girard's [geometry of interaction](http://en.wikipedia.org/wiki/Geometry_of_interaction). I've just found that +Evan Czaplicki has referred to GoI in a paywalled paper which is good, because Elm is one of the few Haskell packages which I managed to build out of the box and is entirely web oriented with no dependencies on native graphics engines. I consider those to have been obsoleted by the cloud. I've built as many examples as I can currently get to build. This is the main problem I find in trying to use research software to do anything useful :(. I'll be posting them, including ones from the Petri net wiki page listing, over the next few days and weeks. :)
• Options
3.
edited May 2014

I've started pushing FRP javascript demos to my github repo.

David Tanzer has listed some project briefs people have mentioned over the past years which I need to review as my next step. Wants, preferences or priorities anybody?

Working models in Fay and Elm include:

For people not used to github sort of issues. These demos will not run in situ on github - you just see the source code. I'll put them on my server.

I've also build the Aivika examples which run simulation experiments and chart their results automatically. These include monte carlo, bass diffusion, furnace equilibrium, workflow optimisation etc. and will try and push them asap.

My main issue now is how to get javascript files onto instiki. I have no idea if this can be done Andrew Stacey? There are destructions for how to do this with javascript on wordpress so models on the blog shouldn't be much of a problem.

Comment Source:I've started pushing FRP javascript demos to [my github repo](https://github.com/jimstutt). [[David Tanzer]] has listed some project briefs people have mentioned over the past years which I need to review as my next step. Wants, preferences or priorities anybody? Working models in Fay and Elm include: * [harmonic ring oscillator](https://github.com/jimstutt/FRP/blob/master/Fay/examples/oscillator.html) A delayed oscillator is a proposed project. * [sun and earth 2D elliptical orbit](https://github.com/jimstutt/FRP/blob/master/Elm/Intermediate/SunNEarth.html) A 3D version demonstrating obliquity and precession is a possibility. For people not used to github sort of issues. These demos will not run in situ on github - you just see the source code. I'll put them on my server. I've also build the Aivika examples which run simulation experiments and chart their results automatically. These include monte carlo, bass diffusion, furnace equilibrium, workflow optimisation etc. and will try and push them asap. My main issue now is how to get javascript files onto instiki. I have no idea if this can be done [[Andrew Stacey]]? There are destructions for how to do this with javascript on wordpress so models on the blog shouldn't be much of a problem.
• Options
4.
edited May 2014

To upload files to the Wiki, see

http://www.azimuthproject.org/azimuth/show/How+to#images

It seems best to make an extra edit after you've finished.

Comment Source:To upload files to the Wiki, see [http://www.azimuthproject.org/azimuth/show/How+to#images](http://www.azimuthproject.org/azimuth/show/How+to#images) It seems best to make an extra edit after you've finished.
• Options
5.

Tnx Graham.

Comment Source:Tnx Graham.
• Options
6.
edited May 2014

I tried that and I don't see how it can be made to work? I want to upload a javascript file to the server to be referenced from an html file. Instiki has a file tag and an include syntax but this just displays the original file on the source site; so as far as I can see this is a runtime upload and is not stored permanently on the site.

I could embed the javascript inline in an html page but this isn't very elegant and referencing an external site is fragile.

Comment Source:I tried that and I don't see how it can be made to work? I want to upload a javascript file to the server to be referenced from an html file. Instiki has a file tag and an include syntax but this just displays the original file on the source site; so as far as I can see this is a runtime upload and is not stored permanently on the site. I could embed the javascript inline in an html page but this isn't very elegant and referencing an external site is fragile.
• Options
7.
edited May 2014

When I follow the instructions, I get a dialog box in which I can select a file on my computer (which is not a server) and this file is uploaded to somewhere permanent inside the Wiki. As an example, I used this method to upload an image to David Tanzer's Blog - The stochastic resonance program (part 1), and it ended up here: http://www.azimuthproject.org/azimuth/files/bistable_v2.png

Comment Source:When I follow the instructions, I get a dialog box in which I can select a file on my computer (which is not a server) and this file is uploaded to somewhere permanent inside the Wiki. As an example, I used this method to upload an image to David Tanzer's [[Blog - The stochastic resonance program (part 1)]], and it ended up here: [http://www.azimuthproject.org/azimuth/files/bistable_v2.png](http://www.azimuthproject.org/azimuth/files/bistable_v2.png)
• Options
8.
edited May 2014

Hi Graham,

Your example is for a static .png image resource where the destructions say colon pic. The instiki syntax also has colon file as a construct.

But I want to embed a Javascript file in a wiki web page. I want the syntax (ignoring non-alphanumerics as I don't know how to escape them ) less than script type="text/javascript" src="RSLatch.js" greater than Run my javascript by clicking on this html link lessthan backslash a backslash greater than to work as advertised.

I think Jaques Distiller's Ruby system is brilliant for nLab and academic latex. I think the limitations need to be discussed for running interactive models on the wiki.

Sorry if I haven;t explained the problem properly.

Tnx again.

Comment Source:Hi Graham, Your example is for a static .png image resource where the destructions say *colon pic*. The instiki syntax also has *colon file* as a construct. But I want to embed a Javascript file in a wiki web page. I want the syntax (ignoring non-alphanumerics as I don't know how to escape them ) *less than* script type="text/javascript" src="RSLatch.js" *greater than* Run my javascript by clicking on this html link *lessthan backslash a backslash* greater than to work as advertised. I think Jaques Distiller's Ruby system is brilliant for nLab and academic latex. I think the limitations need to be discussed for running interactive models on the wiki. Sorry if I haven;t explained the problem properly. Tnx again.
• Options
9.

OK, that's beyond me. I think if you start a discussion with category technical, Andrew Stacey will see it.

Comment Source:OK, that's beyond me. I think if you start a discussion with category technical, Andrew Stacey will see it.
• Options
10.

I'll try that, tnx. I know nothing about Ruby on Rails.

Comment Source:I'll try that, tnx. I know nothing about Ruby on Rails.