By Anton Tayanovskyy on Thursday, June 5, 2014 — 0 comments

WebSharper: What's New (June 2014) Core team

Mono, Mac and Linux

Since February, we worked on supporting WebSharper development, and not just deployment, on Mono, Mac and Linux. Most of the code works fine, but unfortunately Mono support for MSBuild with XBuild leaves much to be desired, and Xamarin team is in no hurry to fix or respond to this - see [] and [] - as they do not see XBuild/MSBuild compatibility as a priority.

Fortunately, we were able to find workarounds to avoid buggy XBuild features, by moving most build logic to F# code invoked via XBuild/MSBuild plugins. There is now some preliminary support for building on Mono and using MonoDevelop or Xamarin Studio 4.2, with 5.0 support and project turnaround between all IDEs (Visual Studio, XS/MD, CloudSharper) coming soon.


We are working with Microsoft Research to improve WebSharper performance on numeric code for applications such as numeric biology. As part of this work, we created an experimental compiler from an F# subset to ASM.js. So far, the prototype failed to provide speedups on current benchmarks, but came quite close. As the experiments continue, we are considering more approaches, such as integrating loop-invariant code motion into the optimizer, or perhaps even taking advantage of LLVM IR and existing passes written for it.

Visualization and Extensions

Andras Janko has done interesting work lowering the barrier to using Sencha Architect UI design tool from WebSharper with Type Providers.

D3.js binding received an update and multiple improvements. There are also now a few more samples of using this wonderful library with WebSharper.

Leaflet.js now also has a WebSharper binding.

Single-Page Applications and Reactive DOM

There are some lively discussions on better SPA support with the IntelliFactory team - Andras Janko, Loic Denuziere and Simon Fowler who is joining us for a summer internship. We are evaluating Facebook React, Angular JS, and D3.js and looking how we can do better in a typed language, in particular how to better integrate dataflow and data binding. If the prototypes work out, WebSharper is likely to obtain a new powerful front-end combinator library by the end of this summer.

By Loïc Denuzière on Tuesday, June 3, 2014 — 0 comments

CloudSharper Core team

We are releasing CloudSharper alpha, a bugfix version after yesterday's bigger release. As usual, some of the fixes require you to download the latest local component.

Change log:

  • 398: Show user's login on website pages.
  • 414: Local CloudSharper crash on create workspace on mono.
  • 417: Login and registration: add waiting text
  • 416: Error executing task WebSharperTask
  • 418: Middle-clicking a tab to close it doesn't work on Firefox
  • 420: NullReferenceException when building msbuild Library/Library.fsproj on WebSharper template

Known issues and workarounds:

  • On mono, running a build on a solution (Ctrl+B) that contains WebSharper projects fails. We are investigating this issue; in the meantime you can directly build the project itself by typing msbuild MyProject/MyProject.fsproj in the console (Ctrl+E).

Happy coding!

By Loïc Denuzière on Monday, June 2, 2014 — 0 comments

CloudSharper 0.9.11 Core team

We just released version 0.9.11 of CloudSharper alpha. The main highlights are:

  • Better version compatibility management. If you are trying to use CloudSharper with a local component that is not the latest, you will see either an error or a warning, depending on whether your local component is protocol-compatible with the current CloudSharper.
  • A user interface for NuGet package management, accessible by right-clicking the folder of a project and selecting "Manage packages".
    Note that this only installs the package into the /packages folder; modifying the project file to add references, as Visual Studio does, will be added in an upcoming release.

Here is the full change log:

  • #386: Add protocol version negociation on websocket connect
  • #388: CloudSharper.Console.exe not in
  • #389: Code completion tooltips show "(Loading description...)" most of the time
  • #399: Using the same type provider in several workspaces confuses the code service
  • #400: On disconnect, offer to reconnect immediately instead of waiting 30s
  • #401: Better deal with projects that failed to load in the code service
  • #403: Code service: when a standalone fs file becomes integrated in a project, clear errors on it
  • #404: Registration form - no feedback on success
  • #405: NuGet window: typing <enter> in search input should trigger the search
  • #406: Writing packages.config omits the <?xml ... ?> line
  • #407: Nuget manager: exception when reading the installed packages
  • #409: Wrong packages in package.config
  • #410: WebSharper template fixes

Happy coding!

By Loïc Denuzière on Thursday, May 22, 2014 — 1 comment

WebSharper Binding for Leaflet released Core team

We are happy to announce the release of a WebSharper binding for Leafletjs, a library that makes it easy to display and work with maps such as OpenStreetMap. It is available on NuGet, and the sources are on Github.

Here is a sample to show you how easy it is to work with Leaflet in WebSharper:

Div [Attr.Style "height: 600px;"]
|>! OnAfterRender (fun div ->

    // Create the map
    let map = Leaflet.Map(div.Body)

    // Add the tiles from OpenStreetMap.
    // We provide the URL templates and copyright attributions for OpenStreetMap
    // and Mapbox as constants, so you don't waste time looking them up.
                Attribution = Leaflet.TileLayer.OpenStreetMap.Attribution)))

    // Set the initial view (latitude, longitude and zoom).
    map.SetView((47.49883, 19.0582), 14)

    // Add a marker at the position of our office.
        let m = Leaflet.Marker((47.4952, 19.07114))
        // Show a popup when the marker is clicked.

    // Add events to show the mouse position in another div named `coordinates'.
    map.On_mousemove(fun map ev ->
        coordinates.Text <- "Position: " + ev.Latlng.ToString())
    map.On_mouseout(fun map ev ->
        coordinates.Text <- "")

A meatier sample on the WebSharper website will follow soon. Happy coding!

By András Jankó on Tuesday, May 20, 2014 — 0 comments

Sencha Architect type provider for WebSharper updated Core team

This release makes it even more convenient to build Ext JS and Sencha Touch applications with WebSharper.

See the updated documentation and sample pages.

Changes to the Sencha Architect type provider:

  • Tools on a panel with an itemId have provided getter properties.
  • Optional Inherit = true argument on the type provider. This makes the wrapper types inherit their component class. Switching to this makes the .self property unnecessary in most of the cases, but you can still use it for upcast. On the downside, generated getter properties for items are harder to find in IntelliSense as they are mixed with the members of the component class. This has no effect on generated JavaScript code.
  • Parser fixes.

Recent changes to the Ext JS/Sencha Touch bindings:

  • Breaking change: Function arguments that are not documented in the Sencha docs are now typed EcmaScript.Function in the binding. Adding an As cast may be required to older code.
  • All config objects have an inlined .With method defined with two overloads. It can add a single key-value pair or copy all the fields from another config object.

By Loïc Denuzière on Friday, May 16, 2014 — 0 comments

CloudSharper Local alpha Core team

This minor release of CloudSharper alpha focuses on a few long-standing bug fixes, as well as the addition of the "Search and replace" functionality in the editor.

The communication protocol has been altered slightly, so don't forget to update your local component by downloading it here!

Here is the full change log:

  • #366: Correctly propagate webserverport from CloudSharper.Console.exe.config.
  • #372: Refresh workspace list after creating a workspace.
  • #373: Show messages in build window when projects are first loaded. This should hopefully dissipate confusion when trying to build immediately after opening a workspace and the message "Error: project file invalid" showed up.
  • #375: Add CodeMirror search. When the editor is focused, you can now search and/or replace text inside it. Here is the list of keyboard shortcuts:

    • Ctrl+F (Cmd+F on mac): start a search.
    • Ctrl+G (Cmd+G on mac): find the next match for the current search.
    • Shift+Ctrl+G (Shift+Cmd+G on mac): find the previous match for the current search.
    • Shift+Ctrl+F (Cmd+Option+F on mac): replace interactively.
    • Shift+Ctrl+R (Shift+Cmd+Option+F on mac): replace all.
  • #377: Add "Forgot your password?" form.

Happy coding!

By Adam Granicz on Thursday, May 15, 2014 — 0 comments

Program F# with CloudSharper everywhere Core team

Are you an F# user on Mac OS or Linux, looking for the easiest way to develop multi-project F# solutions with full code assistance and type checking? Would you like to use F# Interactive for developing and testing parts of your web applications interactively? Would you like to benefit from the multitude of web libraries in your development environment? Well, if yes - look no further, CloudSharper, the world's most versatile online IDE has arrived to Mac and Linux!

Here are a couple screenshots showing CloudSharper in action on Mac OS and Linux (click on them to view the full-size image):

We will going full force to bring you even more awesome features to kickstart your F# development experience on the web, so register your free CloudSharper account, use it in your everyday work, and tell us what you think.

Happy coding!

By Anton Tayanovskyy on Thursday, May 15, 2014 — 0 comments

Dangers of react and VirtualDom Core team

This is a brain dump from a Twitter/IRC discussion with @panesofglass and @bryanedds. So there is this brand-new thing called Facebook React and hype wave about Virtual DOM. I only skimmed this library, but here are some reasons why I remain sceptical: Identity! Typical DOM trees are a lot more than the markup. They are full of pieces of state that are *opaque* - abstract types, and *mutable*. This is especially true if you use 3rd-party libraries, but even with vanilla DOM, input tag, once r[...]
>> Read the full article on
By Loïc Denuzière on Monday, May 12, 2014 — 0 comments

CloudSharper Local alpha released Core team

CloudSharper is here! It has been several weeks since the previous release, therefore this version includes several major improvements.

  • CloudSharper is now officially supported on mono. Here are the installation instructions for Ubuntu 14.04:

    • Install the following packages from the Ubuntu repository:
      mono-complete fsharp
    • Download the zip version of CloudSharper Local, available here (or linked on the login page) and extract it in the folder of your choice.
    • To start CloudSharper Local, run the following command:
      mono CloudSharper.exe
  • The F# Intellisense service is now based on the latest FSharp.Compiler.Service, the community-maintained library used by the MonoDevelop and Emacs modes for F#.
  • The F# Interactive service is also based on FSharp.Compiler.Service. This gives us more control over the internals of fsi and allows more reliable extensibility for tools such as our inline charting library and on-the-fly compilation to JavaScript via WebSharper.
  • CloudSharper now manages a solution file per workspace. It is a standard Visual Studio solution file, allowing you to work comfortably on the same workspace with CloudSharper and Visual Studio. Projects are automatically added to it when created with the "Create new project" window, and removed when the .*proj file is deleted.
  • Minimal NuGet package management. CloudSharper checks for any packages.config file in your workspace and automatically installs the corresponding packages. Upcoming versions will provide automatic insertion of the relevant references in project files and a GUI to easily search, install and reference NuGet packages.

The following long-standing bugs have been fixed:

  • On some computers, the CloudSharper Local Console failed to start properly, which forced these users to start CloudSharper.exe from the command line. This is not the case anymore.
  • The installer now properly removes older versions of CloudSharper Local.

Here is the complete change list:

  • #139: "exit 1;;" in F# Interactive gives error message
  • #272: Console doesn't start service properly
  • #305: Projects not in subfolders crash the console
  • #308: CloudSharper.Installer.msi is not removing older versions
  • #309: Use fsi from FSharp.Compiler.Service instead of the current wrapper
  • #313: Context menu on workspaces list
  • #316: Do not ship System.dll, Microsoft.Build.* etc - breaks on Mono
  • #318: FSharp.Core vs
  • #319: Conflicts between MS Build 4.0 and 12.0
  • #323: Mono; stuck at creating Interactive service
  • #324: Mono: downloadTemplate hits NotImplemented
  • #325: Start cs.exe bug
  • #326: Login with FPish redirect needs updating
  • #327: File tabs improvements
  • #329: Solution file support
  • #330: Project references dialog
  • #331: Closing affected file tabs on folder delete
  • #332: AsyncDisposable losing exceptions.
  • #333: bug in portRangeAllocator + AsyncDisposable
  • #334: FSI gets started twice per session
  • #335, #337: Mono: fsi does not print anything to the console
  • #336: CloudSharper.exe spinning CPU
  • #339: MSBuild building/cleaning projects fails on Mono
  • #341: Executing an FSI script fails with fireworks on Mono
  • #342: MSBuild service -- find a solution that works both on Mono and .NET
  • #343: Allow creating an empty workspace without needing to go to azure
  • #345: FSharp.Core v4.3.1.0 not found on Mono
  • #346: Mono / HTML project: Connection Reset when viewing generated HTML
  • #347: Mono: native failure on FSharpInterfaceDataVersionAttribute ctor
  • #349: Completion returns nothing when the project file has been opened
  • #350: Build dependencies missing
  • #351: Completion not working for WebSharper projects (mono + windows)
  • #352: Completion not working after build in Mono
  • #353: Add the latest nuget.exe to the installer and zip
  • #354: Execute NuGet package restore when necessary
  • #355: Add a "NuGet Package Restore" context menu item
  • #357: "Package restore" output should go into Build Messages
  • #358: fsproj changes not getting picked up
  • #363: Triggering msbuild when another build is already running crashes the local component
  • #364: MSBuild service throws an exception if a project file is invalid
  • #365: MSBuild is silent when passed an invalid project file
  • #367: fsi: WebSharper code raises Failed to translate property access
  • #370: Mono: exception when writing to the solution file

Happy coding!

By Anton Tayanovskyy on Friday, April 18, 2014 — 0 comments

Does syntax matter? Or how I started progrmamming. Core team

How I started programming: well there was some Basic, Pascal and PHP, but I started getting serious only after encountering and trying to understand Haskell, while doing grad school for an unrelated subject. Haskell challenged me, somehow. It looked like nothing I have seen before. And playing with it had that feeling of figuring out a puzzle. How I found Haskell: going through the list of languages that Kate or some such editor supported highlighting for. Yeah, I know.. In alphabetic order. [...]
>> Read the full article on