F# in MonoDevelop and cross-platform web sites & screencasts
About a week ago, I attended the F# in Education workshop in Boston. It was a great event with many interesting people around. I believe that the workshop was very exciting for everyone who is interested in F#, but uses Mac or Linux. The F# team recently made some effort to improve the F# support on Mono (meaning mainly Mac and Linux). The recent November 2010 CTP update contains several bugfixes that make it possible to use F# on Mono 2.8. Another great thing that happened at the workshop is the open source release of F# (see also blog post by Miguel with a post-check-in photo). At the workshop, I also announced my contribution to the cross-platform F# story, a project that I've been working on recently - the F# language binding for MonoDevelop.
I promised to make it available as soon as possible after the workshop. As usually, things take longer, than one would like, but I'm finally ready to announce the initial (beta) version of the plugin. The screenshot on the right shows some of the features of the F# language binding. As you can see, there is an F# Interactive tool window, syntax highlighting as well as IntelliSense auto-completion.
If you're interested in trying it out, here are links to the repository (you can use it to install the language binding from the MonoDevelop Add-ins manager) and source code. The F# plugin needs to be able to locate F# installation and it also requires more F# assemblies to be installed in the GAC, so you may as well want to read the instructions before trying it :-).
- Project homepage at the Functional Variations web site has more information about the project as well as detailed installation instructions.
- I also created a web page that contains information about installing F# on Mac and Linux which explains how to install F#, such that the MonoDevelop plugin can find it.
- The source code is available in the F# cross-platform packages and samples project at CodePlex
(under the Apache 2.0 license). You can find it in the
- Online repositiory with a MonoDevelop package is available at: http://functional-variations.net/addin.
(If you're a hacker, the easiest way to get it working is to add
FSharp.Compiler*to GAC and set
FSHARP_COMPILER_BINenvironment variable to F# installation location)
If you want to see some interesting uses of the F# MonoDevelop plugin, you can also watch
talk at the F# in Education event. In one demo, I used F# on Mac to play with a simple, composable
functional 3D library. In another example I demonstrated how to asynchronously process stock
prices on Linux. The last demo, showing my
match! extension didn't work all that well, because
I had too many virtual machines running, but I'll blog about
match! again sooner or later!
Cross-platform F# screencasts
To show how working with F# feels on other platforms, I created two screencasts. You can find them in the screencasts section on the Functional Variations web site (I'll add all future screencasts there). The first screencast is quite basic and it shows the installation of F# and command line version of F# Interactive and compiler. The second screencast is more exciting. It shows how the F# plugin for MonoDevelop works in two common scenarios...
This screencast shows how to start using F# on Linux. It demonstrates:
- How to install F# on Linux from a ZIP file available at fsharp.net
- How to install additional scripts and tools from F# cross-platform samples and packages
- Working with command line tools distributed as part of F#
- Using F# Interactive to create and evolve a simple Gtk# user interface
- Writing an application Gtk# and compiling it from command line
See the F# plugin for MonoDevelop in action! This screencast shows:
- How to install the F# MonoDevelop plugin from an online repository
- Writing F# Script Files (
fsx) and using F# Interactive pad
- Creating and compiling standalone F# projects and using Windows Forms libraries in MonoDevelop
- The screencast also demonstrates IntelliSense features provided by the addin, such as identifier completion, tool tips and background parsing and type-checking.
Functional Variations and Functional Teaching
As you probably noticed, most of the cross-platform materials, screencasts and the F# MonoDevelop plugin are hosted at Functional Variations web site. This is another project that I was working on recently. The main purpose of the web site is to provide a home for various academic and cross-platform materials related to F#. Said simply, the web page should be a home for everything that's related to F# and doesn't quite fit to the official Visual F# Development Centre, which is focused mostly on professional developers.
The web site currently has two sections related to academic uses of F# and two sections related to using F# in cross-platform environment:
- Functional Teaching is a section dedicated to teaching F# language at universities, using F# to teach functional programming concepts and similar. It also has links to several F# videos.
- Functional Variations is a section dedicated to academic research related to F#. Currently, it lists some academic publications and projects that are either about F# or use F#. In the future, I'd like to provide more information about the F# open source release and how to use it for creating various research projects.
- CrossPlatform F# contains information about installing and using F# on Linux and Mac. In the future, this should also include some information (or links) about the open source F# release.
- F# for MonoDevelop is the home for the F# MonoDevelop plugin. Currently, it contains installation instructions, but I'd also like to add some information for those who are interested in contributing to the project.
The web site uses a simple wiki based on the ASP.NET wiki control with Markdown and is quite easy to edit. However, it can be edited only by registered users. To prevent spammers from attacking the web site (and random people on the internet from posting nonsense there), there is (currently) no public registration. However, I'll be very happy to create a user account to anyone from the F# community who would be interested in contributing to the web site (either by adding relevant links or by writing some new material). Finally, if you have some materials that could be linked from any of the web pages (e.g. on your blog or somewhere else), let me know!
The web site is a bit "beta" version, but I'm in touch with people from the Microsoft External Research, who seem to be quite interested in taking the web sites to a "next level", so stay tuned...
- RE: F# in MonoDevelop and cross-platform web sites & screencasts by Michael Kazarian (11/17/2010 10:34:07 AM)
- RE: F# in MonoDevelop and cross-platform web sites & screencasts by Tomas (11/17/2010 12:58:29 PM)
@Michael: I do not currently plan to create DEB package for the plugin - AFAIK, MonoDevelop plugins are usually distributed via online repositories. It would be nice to add the plugin to http://addins.monodevelop.com
- RE: F# in MonoDevelop and cross-platform web sites & screencasts by Jake (11/18/2010 4:25:58 AM)
I also had to GAC FSharp.Compiler.Shared.Server to get this to work. And code completion does not appear to be working, but it compiles! SWEET.
- RE: F# in MonoDevelop and cross-platform web sites & screencasts by Jake (11/18/2010 4:37:04 AM)
looks like its throwing an error when it tries to complete it
[F#] [Exception] [Worker] Reported error: Microsoft.FSharp.Compiler.ErrorLogger+Error (Exception of type 'Microsoft.FSharp.Compiler.ErrorLogger+Error' was thrown.)
[F#] [Exception] [Worker] Compile error (218): Unable to read assembly '/home/myuser/Projects/TestApp/TestApp/FSharp.Core.dll'
not sure why its looking for Core in the projects directory...
I can provide you with a more detailed error if you need it.
- RE: F# in MonoDevelop and cross-platform web sites & screencasts by Tomas (11/18/2010 10:11:25 PM)
@Jake: You need to follow the installation instructions at: http://functional-variations.net/monodevelop. It seems that F# plugin is not able to find the F# installation (which is explained in the instructions).