Welcome to hubFS: THE place for F# Sign in | Join | Help

F# 1.9.3 Release Candidate (1.9.3.7) is now available

Dr. Don Syme and the F# team have provided a "stabilization" release of F#.  It looks like they are starting a "cleanup" in preparation of becoming a product.  Woo Hoo!

Dr. Syme's full post is here.

The release notes are here.

Download it as an MSI or ZIP.

 

Using F# with R

On the F# list server over at Microsoft Research, there was a question posted by Lars Johnson about using F# with R.  For whatever reason, I'm not able to post to that list server.  I'm not very good with list servers, so I'll post up my usage here and hope that someone could post this back to the list server or notify Lars.

For those that don't know, R is an analytics tool with an emphasis on rich statistical toolboxes.  It was first produced at the old AT&T Bell Labs and was later commercialized by Stat-Sci (later to become Insightful) as S-Plus.  R remains free and in the public domain.

In the list server thread, Juergen Van Gael mentioned two approaches for possible integration - RSOAP and R(D)COM.  This post is for usage of R with R(D)COM with F#.  The RSOAP approach is a little more involved, so I chose the R(D)COM path here.  As its name implies, R(D)COM is a wrapper for R for usage with COM and DCOM.  It was written by Thomas Baier and Erich Neuwirth.

My environment for use of F# with R on a Windows platform:

1.  Windows XP SP2
2.  .NET 2.0 - 2.0.50727
3.  Visual Studio 2005 with SP1 - 8.0.50727.762 (SP.050727-7600)
4.  F# 1.9.2.9
5.  R 2.6.0 - http://cran.us.r-project.org/
6.  R(D)COM 2.50_pl1 - http://rcom.univie.ac.at/

Note that VS2005 is not necessary as this could be done with the .NET Framework and F#.

After the above installation, we need to make an R(D)COM .NET wrapper so that F# or any .NET application can see the R(D)COM server.  For this, I opened a VS2005 command prompt (dos window with the VS2005 environment variables properly set up).  In that window, perform the following two steps.  After you complete these steps, the command window is no longer needed.

1.  Change directory to the default installation for the R(D)COM binaries.  "cd C:\Program Files\R\(D)COM Server\bin".
2.  Create the .NET interop wrapper.  "TlbImp STATCONNECTORSRV.exe /out:Interop.STATCONNECTORSRVLib.dll".  Note that while this is a standard operation for .NET with COM, Robert Pickering's book "Foundations of F#" covers COM usage with F# (and other interoperability) in Chapter 13.

Next, open up a copy of fsi and interact with the following code.



//-----------------------------
#light
// attach a copy of the R(D)COM dll for statistics connections.
#r @"C:\Program Files\R\(D)COM Server\bin\Interop.STATCONNECTORSRVLib.dll"
// open the namespace
open Interop.STATCONNECTORSRVLib

// Create a connection instance
let SCCForR = new StatConnectorClass()
// Initialize that instance for usage with R
SCCForR.Init("R")
// Sample statements to modify the R environment.

// create an R variable named abc and assign it the value of 5
SCCForR.SetSymbol("abc", 5)

// Retrieve the value of the R variable named abc and assign that value to the F# value valueForabc
let valueForabc = SCCForR.GetSymbol("abc")

// Evaluate an expression in R and assign that value to an F# value aTestEvaluation
let aTestEvaluation = SCCForR.Evaluate("8 * sin(4)")

// Close the R connection
SCCForR.Close()
//-----------------------------

Note that the value for valueForabc should be 5.  The value for aTestEvaluation should be -6.054419962.  Also note that this sample does NOT clean up the COM object assigned to SCCForR.  It only closes the connection to R.

This sample interop code was modified from the example given in the R(D)COM package.  There are many other possibilities for R(D)COM, especially in the rich graphics libraries that R has to offer.

Don Syme on Channel 9

A day late and a dollar (or quid) short; 20 lashes with a wet noodle; any other cliche will work as well.  I saw Don Syme's videos on Channel 9 and COMPLETELY neglected to blog about it here on The Hub.  Ok, ok, I'm not doing my usual F# cheerleading.  I just assumed that everyone had seen these and was aware of them.  The reason for my flogging about my missed blogging is that these videos had been released over 45 days ago.

The fearless leader of functional programming on the .NET platform is forever preserved in two (yes, not one, but two) Channel 9 videos:

((Hat tip to secretGeek for posting Don Syme on "Channel 9" (microsoft) to Public Presentations and reminding me; Don mentions this on Sep 14th, 2006 in his blog post F# on Channel 9)).

Welcomes to new registered users, hubFS Maintenance, etc.

I noticed that we just exceeded a total of 100 registered users in the last calendar week.  To all of those who have registered and participate here, welcome and thanks for both stopping by and giving time and effort.  If you are a frequent visitor or want to register here, it is free and only takes a moment to do so.  Look for the links in the upper right hand corner of this page.

I haven't talked much about contributor status, but for any registered user that wants to participate and publish articles here or be more active in F# in the community, I invite you to send me an email os <(@)> jjbresearch.org.  We have the means to host subversion based source repositories (private) and forums and blogs for communications for any F# projects or anything else that improves the state of F# in the community.

Maintenance

I will be doing maintenance on The Hub on Saturday, 08/19/2006 from 1800 through 2200 CDT (GMT -6).  I expect no interruption of service during this period and will have completed backups previous to maintenance.  I ask that if you are active during that time frame to save a copy of your work (that you may enter) should there be any issues and a fallback to the backup is required.

 

posted by optionsScalper | 0 Comments
Filed Under:

F# Articles on ASPToday - 10 day free trial viewing

Frank Antonsen, a programmer in Copenhagen, Denmark, has started a series on F# titled Introducing F# (Part 1).  The articles can be found on ASP Today.  Normally a subscription-based site, ASP Today has a variety of articles in traditional developer topics for the Windows platform.  Because of the emphasis on Functional Programming, Simon Robinson, Editor-In-Chief of ASP Today, felt it would be useful to provide these articles for free for the period from July 5th - July 15th.

It is also important to note that Dr. Don Syme (and here) was a reviewer on this article.

I personally have decided to subscribe to this site as the rates seem reasonable.  I know that the functional programming topics and the F# articles will only be a small portion of the works that are published, but as time progresses, I'd expect to see more breadth on F# stuff.

 

F# Road Trips: Cancellations for San Diego

This is a quick notice that I will NOT be presenting at the Code Camp in San Diego this weekend.  I just sent notifications to the code camp organizers with my apologies.

I have a situation at work that requires attention and while most things could be deferred under normal circumstances, this situation cannot.  Details not withstanding, the deal represents considerable cost to this client and my responsibilities are to this client first and foremost.

 

posted by optionsScalper | 0 Comments
Filed Under:

F# Road Trips: Next stop - San Diego

Ok, so I've started this hubFS thing. It has been a bit of work, but I had fun getting it moving.  The best part now is that I've had a chance to have conversations with a number of people with F# interests from all over the planet.  These are the people that I hope will eventually use their collective passions in F# to make The Hub a great place for F# work.

In the meantime, I've been bitten by the speaking bug and have been giving a few presentations recently.  I recently spoke at the WI .NET User Group, Fox Valley .NET User Group and the Rockford .NET User Group.  I'm hoping to speak at the Chippewa Valley .NET User Group in the coming months.  As an aside, it would seem that every valley in Wisconsin has started a .NET User Group.

But the reason that I'm writing this post is because the prefix "F# Road Trips" will hopefully become a new series on this blog (I'm writing this both on The Hub and on my jjbresearch blogs).  My goal is to go on the road approximately once every month or so and give F# presentations at various code camps and other venues.  I'm currently working through a few different presentations, some of which are already complete:

  1. F#: An Introduction Under an Application of Quantitative Finance
  2. An Introduction to F#
  3. F# and BizTalk 2006: Leveraging functional/imperative/OO programming in the rules engine
  4. F# Functional Programming: Lambdas, closures and other constructs
  5. Interactive Visualization with F#
  6. F# and SQLCLR - Breaking domain encapsulation and placing business logic in SQLCLR with F#
Swarer (XPSD member and self-proclaimed "Ex-ubernerd, recently got himself a life.") and I talk regularly and he mentioned a few weeks ago that the Rock and Roll Code Camp (RRCC) was to take place in San Diego on June 24-25, 2006.  I think his exact words were:  "Dude.  You gotta like, come out and like do this like code camp.  It'll be uummmmm gnarly and stuff and like you can like tell everyone about that F# thing and whoa, we can like totally party and skip out of all of the other sessions especially those agile sessions on TDD and unit testing and stuff." (I cut and pasted that from an MSN IM session).  I also know that after speaking with him, his tagline is not quite correct; he's still doesn't have a life, but he's borrowing someone else's for a little while.

I'm there.  I'm speaking.  I'm doing that F# thing.  I'll be doing the #2, #3, #4 and #5 presentations.from the above list for RRCC.  I'll submit for #6 to RRCC if I can complete my work on it in time to get on the schedule.  If you are going to RRCC, DO NOT MISS #5 - Interactive Visualization with F#.

If you are having a code camp and want to hear about F#, give me a comment here or send me an email.  I'm going to try to do one code camp per month or so, starting in August.  Keep in mind, that the real reason for doing this is to find out where the best .NET parties take place.

---
Note:  I'm doing an impression of Godzilla and NOT evangelizing F# in this picture.
posted by optionsScalper | 0 Comments
Filed Under:

Hubology: Codedrops (and a note on colorized code on The Hub)

There is a new File Folder, Codedrops, for simple code snippets that are submitted by hubFS contributors.  Note that registered users have read and download status, but not rights status on that folder.

In a recent thread, newly registered member Lewis Bruck, asked for the F# code for the FDX demo.  I mention the links to the Codedrops folder for FDX/Webcrawl (F# Team) demos (thanks Don and James) and agree with Lewis that cut and paste of colorized code should be easy.  I quote from that thread:

One more quick item regarding cut and paste on colorized code.

The line breaks that would normally exist would exist as html markup.  That is disallowed in the code colorizer utility that we use (and Scott extended for F#; see Coloring Your Code on The Hub and Hubology: F# source HTML color coding native on The Hub).

I know that this breaks all of the rules for laziness (I actually had to expend effort on this, too), but if you cut and paste the code into Wordpad (or other editing tool) first and then into VS2005, all of the appropriate line breaks remain intact.

Seriously, please make sure you also read my previous comments regarding this colorized code for cut/paste operations.  Line 334 of the code declares an event with a type "event<time>", only the code colorizer sees "<time>" and thinks that it is html markup and removes the "<time>" tag completely as there is no corresponding "</time>" tag.  Good practice if I were rendering regular old HTML, BUT I'M NOT.  So, we are talking with the author of that plugin for changes/workarounds.  I can't complain because the code colorizer is actually a time saver for most of these things and it is FREE.

posted by optionsScalper | 0 Comments
Filed Under:

Hubology: Registration issues should be resolved

Hi all.  We had a few issues with registration and anonymous access after go-live.  Additionally, we had a change in policy in registration and the process for users that visit.

Anonymous access is allowed by default.  If you cannot post to the forums as an anonymous user and wish to do so, send me an email at os <(at)> NOSPAMjjbresearch.org and remove the obvious decorations and NOSPAM in that address or send me a Private Message.

If you'd like to become a registered user, the "join" button in the upper right hand corner is now operational.  If you have difficulties, please again, let me know and I'll work through any issues.  User registration is helpful for people that wish to maintain an identity here.  Please be respectful of others as we are trying to build a base of competence in F# here.

If you'd like to become a hubFS contributor, please let me know.  It is important to know that contributor status for The Hub means that you have a commitment to F# in some form, have community minded works that are useful to others and are willing to help build community here.  I provide blogs to hubFS contributors that are either public (available to everyone here) or private, i.e. available only to The Hub Contributors.

 

posted by optionsScalper | 0 Comments
Filed Under:

The Hub welcomes Robert Pickering as it's latest contributor

I want to give a warm welcome to Robert Pickering as our newest contributor.

Robert is an early adopter of F# and is community-minded regarding F#.  When I opened The Hub in Feb, 2006 for incubation, the first few posts in the Books, Tutorials, links and other resources Forum were F# Wiki and Robert Pickering's tutorials.  Robert has been instrumental in providing great information on F# in public and I expect that he'll continue to do that here as well.

If you have F# code, ideas, information that may be useful in public, stop by the F# Wiki and provide an entry.

Like most of us, Robert has a busy schedule, but he'll be posting to Robert's Strange F# Blog on The Hub and continuing the "Strange" theme from his blog Strange Blog.

 

Welcome - The Hub comes alive

Welcome to The Hub.  As the founder of The Hub, I'm excited to bring to you a community site that will focus solely on F#.

To do that, I cannot act alone.  There are a great many other people that have contributed to make this place what it is and what it will become.  I have invited a great group of contributors to start this place and I hope that there will be compelling works on F# in articles, blogs, forums, code and other works.

If you feel that you have significant contributions to make in F# and would like that to be published on The Hub, please contact me here or email me - os <(at)> NOSPAMjjbresearch.org (remove the NOSPAM).

Please consider yourself welcome here.  Everyone here is passionate about F#.  Get better with F# and share that with others here.  Ask questions and get answers.  Let us know about F# works that are in the field.

---O

 

Hubology: Go-Live

Ok.  I'm in the final stages of the technology part of go-live preparations.  Essentially, this means that I've almost completed the move to the new ISP (I've tested and I now have to pick a point at which to switch over), and have done most of the basic updates to the site.

There are a few updates that I'm working on for the front page, but unless I hear otherwise, those are non-essential for go-live.

I'll expect that I'll send two mass emails to contributors in the next day or so.  One will notify of the intention to go-live with a specified hard-date and two will be a "last-call" for articles for go-live.  I'll be turning off auto-publishing to the front page.  This means that posts will not automatically show up on the front-page news for the site.  If you have a post or an article that should be front-page news, you must manually request this in the post.  To do so, when entering your posts (blog posts only), click on the advanced options tab, look for "Publish to site's aggregate list" and make sure that it is marked "yes".  I'm leaving everyone unmoderated for this syndication, i.e. contributors can choose what they want posted to the front-page news.  Note that your blogs are now public-facing (unless I haven't contacted you) and that your posts will show up in your blogs and on the corresponding RSS feeds.

For everyone that is here and contributing during the incubation period, I want to express my thanks.  I've put in a lot of hard work to make this site what it is.  But many others have put in considerable amounts of time to help as well.  Others have worked hard to build their F# skills and have written articles, posts or otherwise.  All of this work that has been done by everyone here deserves my thanks for making this site what it is.  We are starting small, but we have a very good core team of people to move this forward.  Thanks to everyone for their efforts.

 

posted by optionsScalper | 3 Comments
Filed Under:

CIL and dynamic typing - variant is back

I have heard throught the grapevine that the new ECMA CIL "standard" is about to be released.  I use the word standard because I'm not sure of the right terminology.

I was able to get my hands on a copy of a few pages of the document through a friend of mine and it turns out that CIL will now support dynamic typing.  My source has asked that I not reveal details, but I am allowed to say this:  the Variant datatype is back and it is here to stay.

Evidently, there are a few difficulties to implement this in CIL, but the engineers involved had a breakthrough.  I'm not privy to all of the details (I only have a few pages), but there was some feature that was discovered in generics that allowed for safe void pointers.  My friend stated "We do dynamic loading; why not dynamic typing?"

I haven't been able to confirm this as of yet, but the feature appears to be so important, that the recent PR on the rescheduling of Vista was faked so that this feature could be included in the new operating system.

 

Which mathematician?

True to form, I've always put a picture of a dead mathematician (or someone closely aligned with mathematics in some significant measure) that I admire along with a caption to describe what I admire in their work in my MSN IM picture and caption.

I'll carry that tradition here and starting now, my avatar will be a picture of one of these greats and my signature will reflect the corresponding caption.

I'll not name the mathematician, but feel free to guess.  There is no schedule.  The picture will change every few weeks.

 

Hubology: Last Call for Forum Reorganization before Go-Live

The current public forum structure appears to be overly complex.  I want to do one last reduction.

Post comments on 80 Forums, Are you nuts?, or leave on on this post.

 

posted by optionsScalper | 2 Comments
Filed Under:

Hubology: Go-Live

If you have a pulse and read The Hub, I'd like your input on this discussion for go-live.

 

posted by optionsScalper | 0 Comments
Filed Under:

Hubology: Dashboard Link

When Registered Users and hubFSContributors want to add content on the site here, typically, they need access to the "Control Panel", "Dashboard" to do that work.

CS2.0 does not provide a simple link for this.  I found a post over at CommunityServer.org that addresses this problem User profiles/Dashboard- viewing, editing, searching.. thoughts and suggestions, and have made the change to The Hub.  All registered users should now see an additional link in the upper right corner, "Dashboard", that will take them to their "Control Panel", "Dashboard".

Thanks to mjones for the suggestion.

 

posted by optionsScalper | 0 Comments
Filed Under:

Hubology: The Hub moves to CS2.0RTM

This is just an update to let everyone know that The Hub has now been upgraded to CS2.0RTM.  We were at CS2.0Beta3 and had experienced some issues with caching and funcationality.  If you experience problems here, make sure that you either raise the issue on the forums, or drop me an email (os <( at )> jjbresearch.org).

I have to give a big thank you to Scott Isaacs (sisaacs; the one on the left).  Scott has been my go-to guy to get all of this stuff done and was responsible for making this upgrade happen and happen (hopefully) without incident.

 

posted by optionsScalper | 0 Comments
Filed Under:

CodeDrop: FDX and WebCrawl - Demos from Syme and Margetson

Things have been busy in the Labrary.  Work has a few minor deadlines, but I wanted to let everyone know that the F# Team has posted two demos in the Forums.

I'll do a proper follow up in a day or two to expound on the code and the significance in particular of FDX.

Read about these here:

3D Simulation and Visualization with F# and DirectX (FDX)

Interactive Web Crawling with F#

Code is attached here as I've had a few issues downloading on Don's post (some hubFS admin issues) and will attach a new copy to his posts later as well.  The full source is listed in the forum posts and can be cut and pasted as well (see comments and follow up posts).

A big thanks to dsyme and jmarg for the code.

 

posted by optionsScalper | 0 Comments
Filed Under:
Attachment(s): FDXWebCrawl.zip

hubFS Projects: Reflector F# Addin 0.0.1.4 is now available

This is the first release of the Reflector F# addin.

Details and download are here - Reflector F# Addin 0.0.1.4 is now available.

I'm looking for co-authors, testers and other help on this project.  Please respond in comments here or on the appropriate post on the Reflector F# Addin forum.

Also, so that I set expectations, this is a baseline working assembly with virtually no reflection capabilities.  It has four working features.  We will build out from here.

Also note that since this is not a public project, this will not be posted on The Bank under Software Releases.

posted by optionsScalper | 0 Comments
Filed Under:

Hubology: F# source HTML color coding native on The Hub

Scott Isaacs (sisaacs) and I have been working to get an addin for automatic color coding of F# working here on The Hub.  Scott came up with the idea the other day and he and I worked through all of the details recently.

There is a CS2.0 addin that supports formatting of most source code types, e.g. C#, VB.NET, ASP.NET, SQL, etc. on pages in a CS site (hubFS is a CS2.0 site).  F# is not supported natively by the addin, but the addin does allow for new languages to be added as needed.  So Scott installed the addin, constructed a placeholder for F# in the XML for the addin, created the F# icon for the addin's toolbar (so F# can be used from the Rich Text Editor in CS for ANY authoring).  While he did that, I worked on the first draft of the language elements that were needed in the XML file.  He and I ran tests on a few snippets of code and after a few problems (that Scott found and fixed; someone has to correct my stuff), we are up and running.

Use this stuff.  Pound on it.  Let Scott or I know of problems, bugs, what works, what doesn't, what should be colored differently, etc.  It is important to note that this feature is an HTML render-time feature, i.e.

We will use this internally within The Hub until "go live".  Scott will coordinate with the addin author so that F# is included in native support after that time.  So I am clear, this means that anyone that uses the addin on a CS2.0 site, will have native F# color coding for all F# source code that they mark on their site.

Scott's post to introduce this is My Second F# Code.  The How To's and Snippets post is Coloring Your Code on The Hub.  Scott has the link for the CS2.0 addin (for those that want color coding now and F# color coding soon)

Nice work Scott (and it was fun working with you to make this happen).

[Updated to add]:  This facility supports "post preview" mode in forum post authoring.  It does NOT support post preview mode in blog entry authoring.  For the moment, if you are doing a blog entry, open a temporary post on a forum, markup your F# code, preview it, and then cut and paste it into your blog entry (with the native tags around the code to ensure the above mentioned page render-time formatting).  Scott will contact the addin author to determine if this can be fixed.

 

posted by optionsScalper | 3 Comments
Filed Under:

Hubology: How To's and Snippets

For those of you searching for answers on F#, in code snippets, etc., stop by this forum.

Ask questions, get answers.  Help others get answers.

How To's and Snippets

 

posted by optionsScalper | 0 Comments
Filed Under:

Hubology: New Performance Forum under THCF

I've started a new THCF for those that are interested in F# performance.

hubFS F# Performance Cooperative

Please take some time to read the opening entry carefully.

 

Hubology: Forums Reorganization

Leave opinions here on the current state of the forums and their organization.

I'm going to do a reorganization, but I want to know what everyone's thoughts are before doing so.

 

posted by optionsScalper | 1 Comments
Filed Under:

F# Presentation - WI INETA

The presentation on F# for Wisconsin INETA took place tonight.

I'll let other hubsters that were present give their critiques here, but I believe that the presentation was well received.

The room asked a lot of questions.  I'm an animated speaker and really want to fire up the crowd and get them involved and I think that I made that happen.  In particular, the walkthroughs of the code had many of the people in the room nodding, asking, deciding, etc.

I want to present again.  This presentation needs work and I know where to start to make that happen.

Additionally, I hit a snag with the Sharpe Ratio code (before I presented).  Like the good marketing guy that I am (I have some of that poison in my blood), I "sold the QF in F#" by showing the code without actually running any code.  I was amazed at the response.  Everyone was engaged and asking questions.

For those that didn't know, or didn't catch the joke, the reason that I chose to speak on the Sharpe Ratio was because it was conceived by Noble Economist William F. Sharpe (William F#; ok, groan now).

My files for the presentation are in the zip file F# - An Introduction Under an Application of Quantitative Finance.

Give me some feedback guys, especially those on The Hub that attended.

Updated to add:  hubFS member Matt Terski (awaiting UID assignment) shot a few photos of me here:

Please note that in Matt's Flickr stack, I am directly after Tuscan-Style Garlic-Rosemary Roast Pork Loin.  Given my girth and my daughter's insistence to "hit the gym, Dad", these photos reinforce that point.  pphhhth'yeah, right after I stop by Mr. Terski's for the Roast Pork Loin.

 

More Posts Next page »