News

Microsoft Aims F# at Machine Learning

Microsoft has updated its open source, cross-platform F# language for functional programming, adding new functionality and positioning it to tackle machine learning projects in the future.

In announcing the F# 4.6 update to the 14-year-old language, Microsoft detailed new features such as Anonymous Record types and previewed future work including the release of F# 5.0 and .NET Core 3.0, along with F# Interactive on .NET Core.

It then explained the third big milestone coming up: F# for machine learning. Although F# can already be used for Microsoft's ML.NET machine learning framework (just updated itself to release candidate status), there's more machine learning functionality in the works.

"Finally, we're also devoting significant time in developing a compelling offering for using F# to do machine learning. In addition to being supported on ML.NET, we're working towards a world-class experience when using F# and TensorFlow," Microsoft said.

The TensorFlow.FSharp GitHub project says it's a work in progress that features two components:

  • TensorFlow.FSharp: An F# API for TensorFlow
  • FM: A prototype of a DSL "F# for AI Models." This currently executes using TensorFlow.FSharp but could have additional backends such as DiffSharp.

"TensorFlow shape checking and shape inference tie quite nicely into the F# type system and tools, which we feel is a differentiator when compared to using Python, Swift, or Scala," the March 29 F# 4.6 announcement post continued. "This is still an active research area, but over time we expect the experience to become quite solid as F# Interactive experiences on .NET Core also shape up."

F# Interactive (fsi.exe) is used to run F# code interactively at the console, or to execute F# scripts.

As far as F# 4.6, Microsoft said the primary focus of the update is to boost performance, especially for medium-to-large sized solutions. Part of that work involved removing a workaround to a previous IntelliSense bug that actually "resulted in horrible performance characteristics."

"Other work included significant reductions in cache sizes, significant reductions in allocations when processing format strings, removing ambient processing of identifiers for suggestions when encountering a compile error, removing LOH allocations for F# symbols when they are finished being typechecked, and removing some unnecessary boxing of value types that are used in lots of IDE features," Microsoft said.

F# coders should also be aware of the increased cadence of F# tooling, including F# tools for Visual Studio, that will correspond to Visual Studio releases. "With this in mind, you can think of the Visual Studio 2019 release and future updates as a continuous evolution of F# tooling," Microsoft said.

The F# development process relies heavily upon open source community volunteers, and Microsoft noted that F# 4.6 was developed entirely through the open requests for comments (RFC) process, with F# 4.6 RFCs and FSharp.Core 4.6.0 RFCs available on GitHub.

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Microsoft Revamps Fledgling AutoGen Framework for Agentic AI

    Only at v0.4, Microsoft's AutoGen framework for agentic AI -- the hottest new trend in AI development -- has already undergone a complete revamp, going to an asynchronous, event-driven architecture.

  • IDE Irony: Coding Errors Cause 'Critical' Vulnerability in Visual Studio

    In a larger-than-normal Patch Tuesday, Microsoft warned of a "critical" vulnerability in Visual Studio that should be fixed immediately if automatic patching isn't enabled, ironically caused by coding errors.

  • Building Blazor Applications

    A trio of Blazor experts will conduct a full-day workshop for devs to learn everything about the tech a a March developer conference in Las Vegas keynoted by Microsoft execs and featuring many Microsoft devs.

  • Gradient Boosting Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the gradient boosting regression technique, where the goal is to predict a single numeric value. Compared to existing library implementations of gradient boosting regression, a from-scratch implementation allows much easier customization and integration with other .NET systems.

  • Microsoft Execs to Tackle AI and Cloud in Dev Conference Keynotes

    AI unsurprisingly is all over keynotes that Microsoft execs will helm to kick off the Visual Studio Live! developer conference in Las Vegas, March 10-14, which the company described as "a must-attend event."

Subscribe on YouTube