Sunday, December 10, 2017

[ADVENT 2017] Current state of F# 4.x tooling and IDE ecosystem on December 2017

Hi my dear blog readers!

Thanks to Sergey Tihon for organizing this community-driven advent blog gathering in this year-end of 2017!

sergey_tihon_advent2017

So here we are, on the edge of 2017. There are lots of advances in F# toolings and ecosystem, including the nature of open source ecosystem that has been available since the beginning of F# in VS 2010. When I say F# toolings. I’m not limiting myself to F# tooling in Visual Studio. Toolings in my context is tooling in Visual Studio, Visual Studio Code, and new contender/competitor of Visual Studio IDE, Jetbrains Rider.

F# state

Most advances in F# itself are without IDE. These are the current state of F# itself:

  1. F# supports .NET Core 2.0/.NET Standard 2.0 TFM development. This is also in sync with tooling support, starting with VS 2017 15.5.0, but I suggest you to install 15.5.1 update. (Please read my notes below)
  2. F# implements async interop with C#/VB async correctly, especially those xxxTask function such as Async.StartAsTask. See https://www.visualstudio.com/en-us/news/releasenotes/vs2017-relnotes#fsharp
  3. F# now supports goto definition correctly. I know this is quite IDE-related, but it needs some reworks on existing F# compiler. Thanks to relentless community support of F# contributors, especially Saul and Vasily Kirichenko. These are the PRs related to “go to definition” works: https://github.com/Microsoft/visualfsharp/pulls?q=is%3Apr+%22go+to+definition%22+is%3Aclosed 
  4. Also now goto definition can go from F# to C#/VB.

Now, at F# IDE support:

  1. Ionide (Visual Studio Code extension for F#) gets nice updates! One of the notable feature is automatic project reloading, especially when dealing with F#/.NET Core 2.0 project. This is the latest release notes of Ionide: https://github.com/ionide/ionide-vscode-fsharp/blob/master/RELEASE_NOTES.md
  2. Jetbrains Rider (visual Studio competitor) has provided support for F#. Still, many works need to be done in .NET Core 2.0 full support. Read the original announcement of F# support here: https://blog.jetbrains.com/dotnet/2017/05/08/rider-is-now-also-an-fsharp-ide-adding-fsharp-support/
  3. In Visual Studio 2017 15.5.0: on the installation of a Workload that requires .NET Core 2.0, it will also install F# language support by default. The .NET Core, ASP.NET, and Azure workloads now do this.

Therefore, if you use Visual Studio 2017, it is highly recommended to update or directly use at least 15.5.0 update instead.

NOTE on Visual Studio 2017 15.5.0:

There’s one catch: if you use Xamarin in your worload, the 15.5.0 update on previous version will somehow override Xamarin MonoDroid VSIX packages. Fortunately, on 7th December, there is a fresh maintenance update on 15.5.0, the 15.5.1. This 15.5.1 provides the Xamarin package issue.

Now let’s meet F# and .NET Core using command prompt and in Visual Studio!


F# <3 .NET Core

Now, let’s try F# support for .NET Core.

We could check F# support availability as template, within the .NET Core tool of dotnet.

Using dotnet’s CLI tool, we can display list of templates installed in our .NET Core 2.0 SDK by using new command (parameter that acts as command to execute further) with –l for parameter of new:

dotnet new –l

On .NET Core SDK 2.0.3, run the dotnet above and we will have this list:

dotnet_sdk_203_new

Let’s just focus on Short Name and the Language section on the list:

dotnet_sdk_203_new_languages

So we can compose and create any kinds of project that has F# as language support. The Short Name will be used as new parameter to define what template we’re going to use, the language parameter define the used language.

For example, we can create .NET Core console app with F#:

dotnet new console -n HelloFSharp -lang F#

NOTE: we should use -name parameter to give name to our project, instead of having default name from the template.

Run that in command prompt, we will have the creation of F# .NET Core 2.0 console project:

dotnet_new_console_fsharp

Now let’s look at the content of Program.fs:


// Learn more about F# at http://fsharp.org

open System

[]
let main argv =
    printfn "Hello World from F#!"
    0 // return an integer exit code

Yes, it’s the same as our good old .NET Framework’s F# Console template from VS 2010/2012/2013/2015!

Then we can run it:

dotnet_run_fsharp

We can also provide more granular TFM as the target framework, but this option is only available for classlib template, not for console project template.

For more information, please visit dotnet new docs page: https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-new?tabs=netcore2x

What about Visual Studio 2017?

In Visual Studio 2017 starting from 15.5.0, we now have this:

VS2017_FS_template

YES! We now have F# .NET Core 2.0 fsproj support within Visual Studio 2017!

What are you waiting for? Go code in F# now!

Saturday, October 21, 2017

Participating in Microsoft’s Mission Mars of building chat bot using Bot Framework (as JakartaJS meetup workshop)

As one of Microsoft MVP in Indonesia, I’m often being asked to help other developer community to thrive and also to share knowledge. One sample of this is when I helped Software Architect Indonesia Community (SARCCOM) as speaker for their Meetup event: https://www.meetup.com/Software-Architect-Indonesia/events/242334607/

In early October 2017, I was asked by MS Indonesia to participate in 2 days event: MS Chat bot development training for community leaders and MVP to be trained as trainers, and the second day is helping as trainer assistant for Chat bot development to train for public (for everyone).

First, thanks to Microsoft Indonesia for this opportunity! I’m so glad that I get invited to this event while sharpening my skillset about developing Bot using MS Bot Framework! YES! Open-mouthed smile

It’s interesting to know that this event is part of Microsoft’s Mission Mars series, and usually Mission Mars is often held in outside Indonesia.

The event is held at Sheraton Hotel, Gandaria City, Jakarta, Indonesia.

The chat bot event

So, here is the event:

image

The trainer to train on day 1 is from Microsoft directly from US: Christopher Harrison!

Christopher Harrison is known for his MVA videos! This is also his MVA video on Bot Framework: https://mva.microsoft.com/en-us/training-courses/creating-bots-in-the-microsoft-bot-framework-using-c-17590

FYI, MS Bot Framework landing page is: https://dev.botframework.com/

And the official documentation is at: https://docs.microsoft.com/en-us/bot-framework/ and don’t forget to also contribute to the docs repo. Microsoft is always welcoming contribution to every Docs page of https://docs.microsoft.com/

It’s nice to know that this training is NOT just for MS MVP, but Microsoft Indonesia was inviting other Indonesian community leader such as leader from Python, Javascript, Ruby communities!

As a matter of fact, Microsoft Indonesia helped Jakarta Javascript community to have other workshop for the next day:

image

Therefore it’s always good to know that MS is really open!

The training was on 16th October, and the workshop was on 17th October.


The bot development training

The bot development training was focused as steps, fortunately we could see and try the steps directly from Mission Mars github: https://github.com/MissionMarsFourthHorizon/operation-max

The interesting thing about this sample steps tutorial is written in C# and Node.JS. So .NET is not required, you can choose to have NodeJS to create bot.

These are the pictures from the training day:

20171016_10113120171016_102214

20171016_10250720171016_134913

And here are the pictures of Christopher Harrison, the community leaders, and MVPs (including me, Kiki, Fadhil)

20171016_17252020171016_172756


And then, the next day, we helped Christopher Harrison to train!

Here are the shots after the training for public:

20171017_121556

And I sneak my opportunity to take picture with my APAC MVP Lead, Soyoung Lee:

20171017_110709

And also with my frieds: Irving Hutagalung and Anggita (from Microsoft Indonesia):

20171017_162233

GREAT!!!

Saturday, October 14, 2017

Speaking at MUGI Jakarta Gathering 2017 (October 2017)

Hi my blog 6audiences! Now it’s my speaking time for MUGI (Microsoft User Group Indonesia) community for Jadetabek (Jakarta, Tangerang, Bekasi region) under the umbrella of MUGI Nasional (nationwide). Although MUGI has quite a long hiatus (for about 7 months), we’re now ready to gather again full speed ahead.

Basically MUGI is a community of Microsoft’s product users ranging from MS Office users, Visual Studio developers (including C#/F#/VB/Xamarin/WPF/.NET), IT-pro (Windows Server, Exchange Server, Sharepoint) and other software users such as database developers that use SQL Server.

The event is called MUGI Jakarta Gathering 2017, on 7th October 2017. Thanks to Microsoft Indonesia’s support, we have venue support at Microsoft Indonesia’s office, located at BEJ Indonesia.

Thanks to the works of Hendra and Leo, we have secured some sponsorship fundings from Rhipe, Dell, Infront, Gulver and Omaging. Many thanks, guys!

MUGI_Jakarta_2017October_600_464823086

The speaking sessions are not  just me, there are from IT-pros such as talks from Leonardo, Hendra, and Fazar. Also a power user talk from Abdullah, as lead of MUGI nationwide.

About 2 months ago I have been assigned as MUGI Jadetabek lead, therefore I’m eager to have this meetup more frequent!

I gave talk about C# and Visual Studio 2017, especially what’s new since VS 2015 and VS 2017.

MUGI_Jadetabek_2017Oct_PowerPoint

Yes, C# 7.0 now has REPL, a feature that F# already has since initial release of F# 1.0!

But most of my talk is demo, based on the audience’s requests.

20171007_094257

Here’s some other pictures:

20171007_090714

Here is Abdullah gave talk about Digital Transformation:

20171007_091804

Here’s Leonardo Irawan brought Windows Server 2016:

20171007_111708

And here we had little break in the middle of sessions:

20171007_121606-1

And Hendra in action:

20171007_13022820171007_130536

And we are having a photo session for all audiences and speaker: (Leo did not join)

20171007_154410-1

Thanks for this memorable meetup, guys!

Next, MUGI Jadetabek has plan to have meetups about DevOps in December or no later than January 2018.

Sunday, April 23, 2017

Speaking at Global Azure Bootcamp 2017 in Jakarta

Hi my dear blog readers!

I’m glad to share my experiences when I was speaking on Global Azure Bootcamp in Jakarta, on  22th April, 2017!

This is my first time speaking for Global Azure Bootcamp, many thanks to my Indonesian community DX, Irving Hutagalung and his staff, Debby, and my MUGI best friend Aprizon for giving me the chance to speak at this cool event!

Actually, Global Azure Bootcamp is a global wide event that is held simultaneously at the same day (or one day after) around the world. So there are Global Azure Bootcamp not just in Indonesia, but there were same events (but with separate speakers) in many other countries such as Singapore, Malaysia, Srilanka, Philippines. Mostly organized by Microsoft’s local country DX and MVP, this event is so crucial because it has full supports from Microsoft, including free Azure pass (Azure trial subscription).

global_azure_bootcamp_2017_jakarta

Also thanks to the hard works of Aprizon and his colleagues, we have managed to secure a space for 60 people at IDX Jakarta.

There were many questions and critics as well especially for the lack of adequate documentations about Azure, but now we have a good supports from Indonesia’s support from MIcrosoft’s local support staffs.

My session is about Azure Functions in multiple languages and the implication of having serverless applications. I had demo of Azure Functions using Visual Studio 2015 Update 3 with Azure SDK 2.9.6 and Azure App Services Preview tooling installed.

This Azure App Services tool is essential, because it’s integrated with Visual Studio and supports debugging (through Azure Functions CLI) although it is in preview.

AzureAppServices_VS2015

Here’s Azure Functions ran and debugged locally in Visual Studio:

AzureFunctions_run_local_VS2015

Notice the Azure Functions logo shown in console of Azure Functions CLI Smile

The Azure App Services preview is available to download at:

https://aka.ms/azfunctiontools

NOTE: this tool requires that Azure SDK 2.9.6 preinstalled first on Visual Stuido 2015 Update 3.

 

Global Azure Bootcamp 2017 Jakarta session photos

Here are my session photos:

20170422_143019

20170422_144124

20170422_145153_HDR

Yup, VIsual Studio 2015 was showing many/multiple language template!

Here are others in action: (Aprizon, Leonardo Irawan, Julius Fenata)

20170422_111704

20170422_132557

20170422_153228

Well? Can’t wait to do more on the next Azure Global Bootcamp!

Sunday, March 19, 2017

Current state of Visual Studio releases [March 2017]

HI guys! We all know that Visual Studio 2017 has been released! Not jus that, at the time of the release of Visual Studio 2017, Team Foundation Server 2017 (on-premise) is reaching Update 1. There are also some news about Visual Studio 2017, TFS 2017, and the whole tooling and ecosystem as well.

On Visual Studio releases from January 15 to March 15, 2017, these are the notable news:

  1. Visual Studio 2017 is reaching RTM (or RTW, release to web) on March 7 
  2. Visual Studio Team Foundation Server 2017 is now at Update 1 on March 7
  3. General release of Azure Functions support of F# on March 16

Now, let’s start from the latest.


Visual Studio 2017 is reaching RTM

Yes! Visual Studio is reaching RTM! The launch is 2 days event: March 7 to 8. It was broadcasted live, and this is also the 20th anniversary of Visual Studio since the first release of Visual Studio 97. Yes, Visual Studio is reaching more than maturity, if you follow Visual Studio history itself and also one year of iterations/releases can mean more than one year in actual maturity of a software product!

This is the original page of Visual Studio 2017 launch: https://launch.visualstudio.com/

The plan for the launch is already announced at Visual Studio’s blog team on February 9: https://blogs.msdn.microsoft.com/visualstudio/2017/02/09/visual-studio-2017-launch-event-and-20th-anniversary/

The original version “1” of Visual Studio is released in around early 1997, it is dubbed as Visual Studio 97. The blog shows the VS 97 setup display:

Previous Visual Studio releases has took quite long unpredicted schedule, especially from Visual Studio 6 (also called Visual Studio 98) to Visual Studio .NET. It takes more than 4 years! Since year 2000, one year in software development can mean anything especially when the other IDE competitors such as Eclipse, Netbeans and Jetbrain’s IntelliJ have been racing to have its own unique/distinctive features as competitive advantages.

So we can safely say that the release is not so surprising, because of the previous VS 2017 release candidates from RC1 to RC4. This announcement also has proven that Visual Studio has very tight cadence, and be prepared to see the next release of Visual Studio 2017 for every 18 months!

Visual Studio 2017 is basically contains these remarkable new features:

  1. Installation is defined as “workload”, categorize common scenarios of Windows development, game development, UWP development, Unity development, Data science, etc
  2. This is the initial release of Visual Studio to use CPS as its project system instead of legacy MSBUILD project system. But MSBUILD is still used to build almost all of the project within Visual Studio, especially .NET related projects (including full .NET Framework, .NET Core, .NET Standard)
  3. This is the initial release of Visual Studio to support .NET Standard. This tooling support is supposed to be available in VS 2015 too, but now all of the effort of .NET Standard support is focused on VS 2017.

For a detail list of what’s new in Visual Studio 2017 RTM, I will describe in a separate blog post after this.

Some things in Visual Studio 2017 are still not addressed/solved

Looking at the long history of Visual Studio releases, these are the remaining interesting issues still remain:

  1. Portability of installation of Visual Studio (since the beginning of Visual Studio)
  2. Full support of .NET Native in F# (since VS 2015 Update 3)
  3. Some of the tools are not mature enough, such as tooling for developing Azure Functions in F# (since VS 2015 Update 3)

Now, let’s start to discuss some of those points below.

Portability of Visual Studio installation

There is one thing for sure, Visual Studio cannot beat Eclipse full portability download. This issue is still tracked as feedback in Visual Studio uservoice feedback: https://visualstudio.uservoice.com/forums/121579-visual-studio-ide/suggestions/6669672-wouldn-t-it-be-nice-if-visual-studio-could-work-li

Unfortunately, this feedback has been going under indefinite status of “UNDER REVIEW” for more than 3 years:

VisualStudio_portable_feedback

Look at the number of votes! More than 2000 votes, this means this proposal should be heard and considered. Any rejection to this proposal has to be strongly reasonable, otherwise the unreasonable rejection will bring harm to the Visual Studio community as a whole.

Having a portable installation or setup of Visual Studio means that we should have less worry about installation setup, settings, registry, and many others. This also means that any toolings/extensions for Visual Studio must not depends on registry as well, just like Eclipse ecosystem and Eclipse PDE.

No .NET Native full support for F#

Yes, this is crucial and it’s often overlooked. No full support for .NET Native toolchain means that we cannot develop UWP (Universal Windows Platform, the Windows 10 store application) applications using F#.

This might be a strong statement, but I’ll try to explain this to you:

  • .NET UWP application is usually distributed on Windows Store
  • Any .NET UWP application submission to Windows Store is checked against .NET Native release binary
  • Currently in VS 2015 Update 3 and VS 2017, there is no .NET Native toolchain support to support F# generated IL.
  • Therefore, it can be considered impossible to implement all UWP applications in F#

Fortunately, the whole dev team at Microsoft has been aware of this since VS 2015.

We know that F# tooling and compiler is open source, and there has been heroic efforts by F# community members and MIcrosoft’s F# and other .NET team members to solve this by closing the gaps of F# feature with .NET Native.

One big major setback of .NET Native lack of features is the availability of tailcall optimization.

To track the update of the .NET Native support for F#, this is the GitHub issue link under Microsoft Visual F# repository:

https://github.com/Microsoft/visualfsharp/issues/1096

 


Visual Studio Team Foundation Server 2017 Update 1 is released

Yes! Visual Studio TFS 2017 Update 1 is released at the same time with Visual Studio 2017. It is also mentioned at the launch page.

There is also official announcement from Brian Harry, although it is a little bit late: https://blogs.msdn.microsoft.com/bharry/2017/03/08/team-foundation-server-2017-update-1-available/

This is the official link to the release notes: https://www.visualstudio.com/en-us/news/releasenotes/tfs2017-update1

This Update 1 cannot be ignored, because it has quite tons of new features! In my own personal opinion, these are the most notable additional features of TFS 2017 Update 1:

  1. Personalized welcome page. This is very refreshing and it’s now easier to navigate if we have many team projects.
  2. In the Git support, we can now search for commit in a branch
  3. In the Git support, administrative privileges are now becoming more granular, especially when dealing with repo creation and repo deletion.
  4. In the Git support, we can now have nice preview of markdown editing.

The personalized link of TFS 2017 Update 1is currently the same web page of the page of my own VS Team Service account:

VS2017_TeamService_2017February

All of the team projects you have will be listed based on your customized list, and if you hover on the team project name, it will display all of the additional link such as the Dashboard, Code, Work, Build and Release, Test.

In the PR comments, it’s a welcome addition to see basic editing tool and preview available:

NOTE:

  • on TFS 2015, Build and Release are under separate page.
  • TFS 2015 Update 3 can accommodate markdown in the PR comments, but the basic editing tool is not available.

While this release of TFS 2017 Update 1 is so promising, I believe many companies are not ready yet to move from TFS 2015 Update 3. Because again, the TFS cadence is becoming shorter than before, and now the race to always have updated TFS might be solved by always using the online Team Services, although some companies are not willing to go to this path because their code is very precious.


The official release of Azure Functions support for F#

Yes! Now we can create Azure Functions using F#, although F# support has been previewed before.

Azure Functions is a serverless application, it is actually a simplified model of already existing Azure Web Jobs. But this serverless model means that we are not dealing with the detail of how the function is deployed, on what platforms, and other things. We are only focusing on the correctness of the functions, and how we are executing it.

Azure Functions itself is generally available since November 2016, according to this Azure’s official blog article: https://azure.microsoft.com/en-us/blog/announcing-general-availability-of-azure-functions/

The initial launch of Azure Functions only support C#, Powershell, Bash, Python. At that time, F# support was still in preview and a little bit unstable.

Fortunately support for F# is now officially stable: https://blogs.msdn.microsoft.com/appserviceteam/2017/03/16/azure-functions-f-support-is-now-generally-available/

They also have this picture of love relationship of Azure functions and F#:

This is soooo cool!

I have discussed and presented Azure Functions in F# at the meetup of Lambda Jakarta on March also, and the reaction is so priceless although some of the invited and joined guests weren’t there.

This was the picture of myself presenting and demoing Azure Functions in F#:

LambdaJakarta_2017_March_present

Here’s my Azure Functions sample (edit and test it directly):

AzureFunctions_Demo_LambdaJakarta

I know that the demo is so simple, but this Azure Functions is much more powerful than Amazon AWS Lambda compared to the readiness of toolings and the full Continuous Integration that Azure has.

This is the landing page of Azure Functions: https://azure.microsoft.com/en-us/services/functions/

The Azure Functions template and the inclusions of libraries are open source! This is the official GitHub landing of Azure Functions: https://github.com/Azure/Azure-Functions

We have GitHub’s Azure functions page, and therefore we can contribute as well!

Next blog entry: the full journey of the new features of VS 2017.