Tuesday, September 29, 2009

F# running on the iPhone

I tried F# on the iPhone (via MonoTouch) tonight.  The trivial hello-world code seemed to work just fine.  I used standalone to build the (trivial) fsharp code:

type Foo() =
  do System.Console.WriteLine("This output brought to you by the note F#");
mono ../FSharp- -a Foo.fs

And added a line to instantiate a Foo in FinishedLaunching().

Loaded the resulting dll into MonoDevelop, along with FSharp.Core.dll, and it just worked.  Or at least it worked in the simulator, haven't tried the real device yet.



directhex said...

It should be noted that the F# license is restrictive and doesn't permit this kind of usage

James Moore said...

directhex - why do you say that? I don't see anything in the license that would cause problems. At least for - there may have been earlier F# versions that used more restrictive licenses.

The F# compiler license isn't one of the MS Research licenses that forbids commercial use, FYI.

Jared said...

I would be shocked if the DLLs generated by any compiler have any license issues whatsover. Even the GPLed GCC doesn't generated GPLed-by-default binaries or shared libraries.