By András Jankó on Tuesday, September 16, 2014 — 1 comment

2048 game with F# + WebSharper Core team

This small logic game written in JavaScript+HTML5 has spawned quite a lot of variants. There is a site called Make Your Own 2048 where you can switch the original's numbers to any text or image and share your creation. However, modifying the game logic requires some programming knowledge and sometimes bigger rework of the original JavaScript code.

Try it live

My goal with an F#-based version was to have an easily overriden game rules class to enable writing a new variant in a few lines of code. In CloudSharper, you can write and play your variant right in your browser window. Clone this shared workspace and look for the file Variants.fs for editing. Build the project and open index.html and switch to Document/Split view for easiest testing, or use the Workspace/Deploy locally (Ctrl+D) menu option.

Clone in CloudSharper

Currently the grid size and the tiles' appearance can't be customized, but expect this demo to be expanded to show off more features coming to CloudSharper.

By Loïc Denuzière on Friday, September 12, 2014 — 0 comments

CloudSharper released Core team

Just a few hours after releasing CloudSharper, we are back with a handful of small enhancements:

  • #528: Solution context menu improvements.
  • #529: Fix the encoding of CloudSharper.exe output in the console.
  • #530: Allow selecting which solution or project to build with Ctrl+B. This item is highlighted in the Solution tree with a bold face.

  • #531: Extension API: select the file passed to FileDialog, if any.
  • Fix login with Github, and show a nicer interface to create or associate an account from a login provider.

Happy coding!

By Loïc Denuzière on Friday, September 12, 2014 — 0 comments

CloudSharper 0.9.19 released Core team

CloudSharper 0.9.19 is out! Here are some highlights:

  • Workspaces are now capable of managing zero, one or several solutions, instead of just one. No solution file is created when you first create a workspace, but it can be automatically created when you create a project containing a project file; this behavior is customized by the combobox in the "New project" window.
  • Configuration of listening urls and ports has slightly changed, both in CloudSharper.Console.exe.config if you use the console and on the CloudSharper.exe command line options. There is now a serveip to decide on which IP the various servers (Websockets, static files, sitelets) should listen, and a *port option for each of these servers.

Here is the full change log:

  • #444: Support multiple solution files in a workspace
  • #484: Missing files marked in the Solution view
  • #514: Problem adding existing files to a project
  • #515: Update project file when renaming a project item
  • #516: "Loading custom editors" stays on forever if the user has custom editors without js dependencies
  • #517: CloudSharper workspace filename do not refresh
  • #518: Support no solution files in a workspace
  • #523: NuGet dll reference gets removed when updating another package
  • #525: The New Project... dialog fails to show up
  • #526: Fix detecting http server failure to listen
  • #527: Project file updating in solution tree

Happy coding!

By András Jankó on Thursday, September 4, 2014 — 0 comments

WebSharper released Core team


  • Fixes to Math.atan2, String.Replace, Observable.pairwise and Observable.scan proxies.
  • Observable functions propagate exceptions originating in mapping/folding functions properly.
  • ParamArray in a constructor by WIG translates correctly.
  • WIG now correctly sets the full names of generic types so that the same type name with different number of type arguments can be used.

Possible breaking changes

Bounds checks are introduced on Array functions to match .NET behavior so they no longer return undefined values which could lead to hard to find bugs. This breaks previous code which uses the Array type as a sparse array. For using JavaScript operations on Arrays, casting to EcmaScript.Array or using the .ToEcma() extension method is recommended.

Additions to WebSharper Interface Generator

  • Support for indexed properties. Examples:

    "item" =@ T<obj> |> Indexed T<int> // has inline "$this[$index]"
    "prop" =@ T<obj> |> Indexed T<int> // has inline "$this.prop[$index]"

    A property named "item" is handled specially for creating the default inline, the object itself gets indexed.

  • Support for type constraints. Example:

    Generic - fun b -> "test" => (b |> WithConstraint [ T<System.Collections.IEnumerable> ]) ^-> T<unit>

    The WithConstraint function destructively sets the constraints on the type parameter. Use it anywhere but only once inside the function passed to the Generic helper.

By Loïc Denuzière on Monday, September 1, 2014 — 0 comments

CloudSharper released Core team

It's release time again! CloudSharper is out with a new feature: workspace-less fsi.

You can now run F# Interactive without having a workspace open, which is quite convenient for quick exploratory programming. Note that your fsi session will be reset as soon as you open a workspace.

You can also dock the interactive window to the right of the main tabset, making it easier to work interactively with a script or a documentation page.

This release also fixes a critical issue where the MSBuild agent on mono would throw an exception when trying to start a build.

As usual, here is the complete change log:

  • #467: Check subprotocol for GlobalCommands too
  • #474: Fix newlines in console output of foreign commands
  • #478: Show the CloudSharper version number on the dashboard
  • #490: Enable fsi in workspace-less scenarios
  • #499: Add "Find in solution explorer" and "Find in file explorer" to tab context menu
  • #503: Dialog layout on viewport resize
  • #504: Fix the new-ws command
  • #505: Fix styling of the FPish account association page
  • #507: Fix exception thrown by the MSBuild agent on mono when triggering a build
  • #509: Correctly connect to a local component running on another machine
  • #510: Allow docking the interactive window

Happy coding!

By Loïc Denuzière on Thursday, August 21, 2014 — 0 comments

CloudSharper 0.9.17 released Core team

We just published a bugfix release to CloudSharper Local alpha. This bugfix slightly alters the communication protocol between the web application and the installed component, which is why the version number was bumped to 0.9.17 and upgrading is required.

Change log:

  • #492: On workspace open, only open README.*.md
  • #500: Silent error when deleting a directory
  • #501: Can't delete an open workspace
  • #502: NuGet reference versioning on adding a package

Happy coding!

By Loïc Denuzière on Tuesday, August 19, 2014 — 0 comments

CloudSharper released Core team

We just released CloudSharper, a bugfix release fixing issues both in the GUI and the installed component. It is protocol-compatible, which means that you can still connect to CloudSharper using the local component, but you will not benefit from some of the fixes listed below.

Here is the change log:

  • #479: Use better icons in the solution tree instead of folders.
  • #481: Close/warning on tabs that belong to deleted files.
  • #483: Layout issues in toolbar on Deploy and Split view.
  • #493: Isolate MSBuild in an AppDomain to prevent it from reusing the same WebSharper.Tasks.dll after switching workspaces.
  • #494: Ignore empty lines and comment on code folding.
  • #496: Add "Tools > Nuget sources" menu entry.
  • #497: Add "Tools > Keyboard shortcuts enabled" toggle menu entry.
  • #498: Add a better icon to close/minimize on fsi.

Happy coding!

By Simon Fowler on Tuesday, August 19, 2014 — 1 comment

WebSharper UI.Next Version Community

WebSharper UI.Next Version has been released on NuGet for your experimentation.

This version begins our push toward better handling of input. In particular, the latest version provides views of mouse and keyboard inputs, and combinators to allow snapshots of views and predicated view updates.

View Combinators

    static member SnapshotOn : 'B -> View<'A> -> View<'B> -> View<'B>
    static member UpdateWhile : 'A -> View<bool> -> View<'A> -> View<'A>

The new SnapshotOn combinator allows snapshots to be taken of a view whenever a 'trigger' view updates. This makes it useful for reacting to events, and has helped with our ongoing work to implement Piglets using UI.Next.

The UpdateWhile combinator provides a view which only updates whenever the value of a given predicate view is true.

While we don't provide first-class discrete event streams just yet, such combinators make it possible to emulate them.

You can find more information in the Documentation.

Input Views

The Input module provides views of the mouse and keyboard, such as keys and buttons pressed, and the mouse position. This will be expanded in the near future.

And the rest!

Additionally, there's now support for delayed animation, which is useful when developing visualisations with staggered transitions, and some bugfixes.

You can find samples of the Mouse and Keyboard views, as well as the snapshotting and predicated update functions on the UI.Next website. As ever, if you've been using UI.Next and have any comments, we'd love to hear them.


  • Animation.Concat sometimes caused "undefined is not a function" errors within JavaScript
  • Computation Expression syntax for Views did not compile with WebSharper
By Loïc Denuzière on Friday, August 15, 2014 — 0 comments

CloudSharper 0.9.16 released Core team

CloudSharper 0.9.16 is out, and it's a big one! In addition to a new website design, we are releasing the first of many features to come allowing you to develop extensions to CloudSharper itself. In this first batch, we are focusing on custom editors for a designated file type.

Custom editors

Here is how CloudSharper customization works:

  • Every user has a special workspace, called Customizations Workspace, in which you can develop and store your CloudSharper extensions. To open it, click the "Open your customizations workspace" button on your dashboard.
  • Extensions take the form of assemblies located in designated subfolders of this workspace. For example, custom editors will be located in the "Editors" directory.
  • To make your first custom editor:

    • Create a project in your Customizations Workspace by selecting "CloudSharper Editor" in the New Project window. This project contains a simple editor for .foo files that simply displays a textarea and responds to Save requests from the UI.
    • Build the solution (Ctrl+B). The resulting assembly is automatically copied into the "Editors" folder.
    • Select "Reload local custom editors" from the Tools menu to activate the newly built editor in your current session. (existing editors are activated on startup)
    • Voilà! You can create a file with extension .foo to see your custom editor in action.

Note that if you upload your Customizations Workspace to the cloud, then your extensions will be activated on all machines you use!


Here is the bugfix change log for CloudSharper 0.9.16:

  • #480: Closing tab doesn't check dirty status
  • #482: Deployed apps use the wrong domain in their URL
  • #485: Getting "The documentation page you requested does not exist" on page refresh
  • #487: Add a /doc url to link directly to a documentation page inside the IDE
  • #489: Syncing down meta workspace fails to create missing folders

Happy coding!

By Ryan Riley on Thursday, August 14, 2014 — 0 comments

WebSharper UI Improvements Community

The WebSharper project has been making significant strides of late in the realm of building composable and reactive user interfaces, especially for the purpose of building SPA-style applications. You can find documentation and demos for WebSharper.UI.Next on its new site hosted on GitHub. Team members have also been blogging about how to build UIs with […]
>> Read the full article on