Computer Science Experimentation

Friday, May 18, 2012

Tests with F# and RMath.Net


This post reports results experiencing with Rmath.Net.

R (www.r-project.org/) is probably the most widely used statistical software.

The .NET wrapper is available at http://rmath.codeplex.com.

Check the full article at:
https://skydrive.live.com/#!/view.aspx?cid=BDC87EF39B001785&resid=BDC87EF39B001785%21365

F# Charting using FSharpChart Library

 This post  reports the results of experiencing with F# and:




Check the full article at:

https://skydrive.live.com/#!/view.aspx?cid=BDC87EF39B001785&resid=BDC87EF39B001785%21362

Tests with PIT-F# to Javascript Compiler


INTRODUCTION



This post reports several tests done with PIT ( http://pitfw.org ) v0.2.

The first set of examples is the original samples available in the PIT’s web page.
The other examples are collected from books as:

-         JavaScript for Web Developers (Nicholas et al.)
-         Pro HTML5 Programming (Lubbers et al.)
-         The Definitive Guide to HTML5 (Freeman)

Check the full article at:

Sunday, April 22, 2012

Real-time GUI with F# REST server

Introduction
This post presents a real-time Graphical User Interface (GUI) using HTML5 (SVG) client and a F# REST server. It is based on the following previous posts:

* WCF with F# interactive – Data Server example http://caxelrud.blogspot.com/2010/12/wcf-with-f-interactive-data-server.html

* Data and Historian Service using WCF and F# interactive - rev 2 http://caxelrud.blogspot.com/2011/05/data-and-historian-service-using-wcf.html

Graphics

The graphics were created using a web-based drawing tool (WYSIWYG) at http://www.diagram.ly/ and the result was exported as SVG. This tool includes several technical libraries for example the P&ID (Process and Instrumentation Diagram). 

Check the full article at:

https://skydrive.live.com/edit.aspx?cid=BDC87EF39B001785&resid=BDC87EF39B001785%21152#!/view.aspx?cid=BDC87EF39B001785&resid=BDC87EF39B001785%21348

(UNDER CONSTRUCTION ...)

Sunday, March 18, 2012

Real-time Computational Engine with F#

Real-time systems require computational engines to process tasks. These engines usually are connected to data servers.

This paper presents an engine with the following properties:
  • Agents-based computation (components communicate to each other through messages)
  • Agents are state-machines
  • Agents communicate in an asynchronous mode
  • Waiting agents don’t block computer treads (asynchronous programming)
  • Engines live in an interactive environment
  • Engines of agents are distributed allowing messages from remote locations
The advantages of this implementation are:
  • Agents can be created, modified and ended without requiring restarting the process.
  • Uses F# interactive environment (Read, Evaluate, Print Loop (REPL). This allows interaction and modification of agents without stopping the process.
  • Remote clients can send messages to the engine’s agents including creating and ending agents.
  • Remote clients can use several communication protocols, available in WCF, to communicate with the engine including pipes, TCP and HTTP.
  • Asynchronous programming provides great performance and scalability.
Check the the full paper at skydrive.

    Sunday, February 12, 2012

    Web charts and F# services


    Celso Axelrud (interpoaaustin@hotmail.com)

    2/11/2012

    INTRODUCTION


    The following solution shows how to create web pages containing charts. 
    The charts are created using dygraphs JavaScript Visualization Library.
    dygraphs is an open source JavaScript library that produces interactive, zoomable charts of time series. It is designed to display dense data sets and enable users to explore and interpret them (http://dygraphs.com/index.html ).

    An F# script is used to define programmatically a self-hosted server using WCF-REST.
    The service generates sequences of random data.

    EXAMPLE

    This simple example includes a HTML5 page. A button is used to calls a web service that generates time-series data. The data is displayed it on a chart.
    An F# script is used to define programmatically a self-hosted server using WCF-REST.
    The service has the signature http://localhost:8000/charts/Get(X1,X2)
    where X1 is the number of rows and X2 is the number of sequences generated.

    Starting from the current time-stamp, the service adds one day for every row. Random data is generated for the data series.
    Even though the example is quite simple, it is quite generic because it includes all the important parts.

    The client uses HTML5, javascript and jquery. The communication uses AJAX technology.

    Check the full article and code at

    https://skydrive.live.com/?cid=BDC87EF39B001785&id=BDC87EF39B001785%21306#!/view.aspx?cid=BDC87EF39B001785&resid=BDC87EF39B001785%21328



    Saturday, January 28, 2012

    Excel Web Apps web page mash-up using F# services

    Celso Axelrud (interpoaaustin@hotmail.com)
    1/24/2012


    INTRODUCTION

    The following solution shows how to create your own web pages that mash-up Excel Web Apps with other content including web services that can operate, as reading and writing, on the Excel cells.  

    For example, this solution allows continuous update of values on Excel from several data sources providing dynamic behavior for formulas and charts.

    Also, the Excel worksheet, in the dynamic web page, is operational and can be modified by the user including new formulas and charts. Then, it can be saved for future use.

    Details about the Excel Web Apps mash-up are available at http://www.excelmashup.com/.

    The solution allows users to design their web pages in Excel either in personal computer or in the cloud at Skydrive. The Excel workspace can include all features available in the Web Apps including several sheets, formulas and charts.
    The full artircle, including example and source code, is available at: