F# and GIMP#

December 2, 2007 at 10:04 pm | Posted in GIMP, Programming | 4 Comments

I almost got my first F# plug-in running on GIMP#. It took me some time to get used to the syntax even with a background in functional languages like Lisp and Scheme. Only thing left to figure out is how I can override a C# function that returns an IEnumerable. What I’ve got sofar is:

override x.ListProcedures() : seq<Procedure> =
let procedure = new Procedure()
procedure.MenuPath <- “<Image>/Filters/Generic”
// And now what?

The C# signature of this routine is

protected abstract IEnumerable<Procedure> ListProcedures() ;

Hope to find an answer pretty soon.

Update 3 December 2007: seems that returning an IEnumerable is quite easy (many thanks to Robert Pickering):

[procedure] :> seq<Procedure>

4 Comments »

RSS feed for comments on this post. TrackBack URI

  1. I love these comparisons, keep ’em coming. Hopefully you can figure out the last thing so that we can see how fast F# is🙂

  2. I’m glad you like my comparisons. Apart from F# I think only Ruby (IronRuby or Ruby.NET) is another candidate for a plug-in. Unless there are other .NET languages I have overlooked so far.

  3. Cool, F#…

    If I’m not mistaken, F# is somewhat similar to OCaml?
    Here at work I used to have a lot of fun with that… But exactly the issues you are looking at now seem to be F# specific, so I don’t think I can help you.

    Cheers, Arnaud

  4. Hey Arnaud🙂

    Yep, I think F# was heavily influenced by OCaml. From what I’ve seen so far it’s a pretty cool language. One of the F# guru’s (Robert Pickering) already suggested a solution for the problem I mentioned in my blog. I will try this evening.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.
Entries and comments feeds.

%d bloggers like this: