<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>F# on Marko Apfel</title><link>http://blog.marko-apfel.de/topics/f%23/</link><description>Recent content in F# on Marko Apfel</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Tue, 14 Jul 2015 17:15:00 +0200</lastBuildDate><atom:link href="http://blog.marko-apfel.de/topics/f%23/index.xml" rel="self" type="application/rss+xml"/><item><title>F#, ArcGIS Runtime and error “Cannot create unknown type '{http://schemas.esri.com/arcgis/runtime/2013}MapView'”</title><link>http://blog.marko-apfel.de/posts/f-sharp-arcgis-runtime-and-error-cannot-create-unknown-type-http-schemas-esri-com-arcgis-runtime-2013-mapview/</link><pubDate>Tue, 14 Jul 2015 17:15:00 +0200</pubDate><guid>http://blog.marko-apfel.de/posts/f-sharp-arcgis-runtime-and-error-cannot-create-unknown-type-http-schemas-esri-com-arcgis-runtime-2013-mapview/</guid><description>&lt;p&gt;By playing with F# and ArcGIS Runtime I tried to re-create a sample C# project to F#.&lt;/p&gt;
&lt;p&gt;For the WPF part I used the Visual Studio extension &lt;a href="https://visualstudiogallery.msdn.microsoft.com/e0907c99-bb04-4eb8-9692-9333d5ff4399"&gt;F# Empty Windows App (WPF)&lt;/a&gt; and &lt;a href="https://visualstudiogallery.msdn.microsoft.com/ad49fd5c-930c-4fe6-a30e-2d0d6778c565"&gt;F# Windows App (WPF, MVVM)&lt;/a&gt; the NuGet packages &lt;a href="https://www.nuget.org/packages/FSharp.ViewModule.Core/"&gt;FSharp.ViewModule.Core&lt;/a&gt; and &lt;a href="https://www.nuget.org/packages/FsXaml.Wpf/"&gt;FsXaml for WPF&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Visual Studio – Getting compilation error “The type 'XAML' is not defined.”</title><link>http://blog.marko-apfel.de/posts/visual-studio-getting-compilation-error-the-type-xaml-is-not-defined/</link><pubDate>Thu, 09 Jul 2015 06:34:00 +0200</pubDate><guid>http://blog.marko-apfel.de/posts/visual-studio-getting-compilation-error-the-type-xaml-is-not-defined/</guid><description>&lt;p&gt;During compilation of the &lt;a href="https://visualstudiogallery.msdn.microsoft.com/e0907c99-bb04-4eb8-9692-9333d5ff4399"&gt;F# Empty Windows App (WPF)&lt;/a&gt; I got that error (check the output pane carefully).&lt;/p&gt;
&lt;p&gt;&lt;a href="https://gwb.blob.core.windows.net/mapfel/Windows-Live-Writer/Getting_5F69/image_6.png"&gt;&lt;figure&gt;
 &lt;img src="http://blog.marko-apfel.de/posts/visual-studio-getting-compilation-error-the-type-xaml-is-not-defined/image-thumb-2.png" alt="image" loading="lazy" decoding="async" title="image"&gt;&lt;figcaption&gt;image&lt;/figcaption&gt;&lt;/figure&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;To solve this issue you have to thrust of the XAML Type Provider of this project. This you can do via the Visual Studio options:&lt;/p&gt;</description></item><item><title>Productive work environments for F# development (under windows)</title><link>http://blog.marko-apfel.de/posts/productive-work-environments-for-f-sharp-development-under-windows/</link><pubDate>Sat, 04 May 2013 07:30:00 +0200</pubDate><guid>http://blog.marko-apfel.de/posts/productive-work-environments-for-f-sharp-development-under-windows/</guid><description>&lt;h1 id="ides-editors-"&gt;IDEs, Editors, ..&lt;/h1&gt;
&lt;p&gt;Here are my favorites in descend order&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.microsoft.com/visualstudio/eng/downloads#d-express-web"&gt;Visual Studio Express 2012 for Web&lt;/a&gt;
yes! - it allows you free F# development, notably for libraries&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.linqpad.net/"&gt;LINQPad&lt;/a&gt;
again and again a wonderful tool!&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.icsharpcode.net/opensource/sd/"&gt;SharpDevelop&lt;/a&gt;
sometimes a little bit idiosyncratic&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.tryfsharp.org/Learn/getting-started"&gt;Online Scratchpad on TryFSharp.org&lt;/a&gt;
the fastest start …&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id="additional-resources"&gt;Additional resources&lt;/h1&gt;
&lt;p&gt;Maybe the following packages are necessary or in minimum useful:&lt;/p&gt;</description></item><item><title>SharpDevelop, F#, missing “Send to F# Interactive” context menu</title><link>http://blog.marko-apfel.de/posts/sharpdevelop-f-sharp-missing-send-to-f-sharp-interactive-context-menu/</link><pubDate>Wed, 01 May 2013 05:15:00 +0200</pubDate><guid>http://blog.marko-apfel.de/posts/sharpdevelop-f-sharp-missing-send-to-f-sharp-interactive-context-menu/</guid><description>&lt;h1 id="situation-problem"&gt;Situation, Problem&lt;/h1&gt;
&lt;p&gt;During playing a little bit with these &lt;a href="https://github.com/dmitry-a-morozov/fsharp-wpf-mvc-series"&gt;WPF MVC F#&lt;/a&gt; projects inside SharpDevelop I stumbled over the situation, that I could not send F# snippets to the interactive window. The menu was not available.&lt;/p&gt;</description></item><item><title>SharpDevelop, F#, “Please ensure that the F# compiler is installed on your computer.”</title><link>http://blog.marko-apfel.de/posts/sharpdevelop-f-sharp-please-ensure-that-the-f-sharp-compiler-is-installed-on-your-computer/</link><pubDate>Wed, 01 May 2013 04:18:00 +0200</pubDate><guid>http://blog.marko-apfel.de/posts/sharpdevelop-f-sharp-please-ensure-that-the-f-sharp-compiler-is-installed-on-your-computer/</guid><description>&lt;h1 id="situation"&gt;Situation&lt;/h1&gt;
&lt;p&gt;My private machine has Microsoft Visual Studio Express 2012 for Windows Desktop. This Visual Studio edition doesn’t allow to develop with F#. So I installed additionally &lt;a href="http://www.icsharpcode.net/OpenSource/SD/Default.aspx"&gt;SharpDevelop&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;But it took longer as expected to get F# projects running in this environment.&lt;/p&gt;</description></item><item><title>Wie spricht man den Lambda-Operator aus?</title><link>http://blog.marko-apfel.de/posts/wie-spricht-man-den-lambda-operator-aus/</link><pubDate>Wed, 05 May 2010 09:27:00 +0200</pubDate><guid>http://blog.marko-apfel.de/posts/wie-spricht-man-den-lambda-operator-aus/</guid><description>&lt;p&gt;Da gibt es unterschiedliche Auffassungen.&lt;/p&gt;
&lt;p&gt;Im Englischen:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Func f = x =&amp;gt; x * 2;
”x goes to x * 2”
”x maps to x * 2”
”x becomes x * 2”
”x induces x * 2”&lt;/li&gt;
&lt;li&gt;Func test = c =&amp;gt; c.City == &amp;ldquo;London&amp;rdquo;;
&amp;ldquo;c for which c.City equals London&amp;rdquo;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Im Deutschen:&lt;/p&gt;</description></item><item><title>F# and ArcObjects, Part 3</title><link>http://blog.marko-apfel.de/posts/f-sharp-and-arcobjects-part-3/</link><pubDate>Fri, 26 Mar 2010 13:15:00 +0100</pubDate><guid>http://blog.marko-apfel.de/posts/f-sharp-and-arcobjects-part-3/</guid><description>&lt;p&gt;Today i played a little bit with IFeature-sequences and piping data.
The result was a calculator of the bounding box around all features in a feature class.&lt;/p&gt;
&lt;p&gt;Maybe a little bit dirty, but for learning was it OK. ;-)&lt;/p&gt;</description></item><item><title>F# and ArcObjects, Part 2</title><link>http://blog.marko-apfel.de/posts/f-sharp-and-arcobjects-part-2/</link><pubDate>Thu, 25 Mar 2010 14:49:00 +0100</pubDate><guid>http://blog.marko-apfel.de/posts/f-sharp-and-arcobjects-part-2/</guid><description>&lt;p&gt;After accessing one feature now i iterate through all features of a feature class:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;open System;;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;#I &amp;#34;C:\Program Files\ArcGIS\DotNet&amp;#34;;;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;#r &amp;#34;ESRI.ArcGIS.System.dll&amp;#34;;;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;#r &amp;#34;ESRI.ArcGIS.DataSourcesGDB.dll&amp;#34;;;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;#r &amp;#34;ESRI.ArcGIS.Geodatabase.dll&amp;#34;;;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;open ESRI.ArcGIS.esriSystem;;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;open ESRI.ArcGIS.DataSourcesGDB;;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;open ESRI.ArcGIS.Geodatabase;;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;let aoInitialize = new AoInitializeClass();;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;let status = aoInitialize.Initialize(esriLicenseProductCode.esriLicenseProductCodeArcEditor);;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;let workspacefactory = new SdeWorkspaceFactoryClass();;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;let connection = &amp;#34;SERVER=okul;DATABASE=p;VERSION=sde.default;INSTANCE=sde:sqlserver:okul;USER=s;PASSWORD=g&amp;#34;;;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;let workspace = workspacefactory.OpenFromString(connection, 0);;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;let featureWorkspace = (box workspace) :?&amp;gt; IFeatureWorkspace;;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;let featureClass = featureWorkspace.OpenFeatureClass(&amp;#34;Praxair.SFG.BP_L_ROHR&amp;#34;);;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;let queryFilter = new QueryFilterClass();;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;let featureCursor = featureClass.Search(queryFilter, true);;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;let featureCursorSeq (featureCursor : IFeatureCursor) = 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; let actualFeature = ref (featureCursor.NextFeature())
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; seq {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; while (!actualFeature) &amp;lt;&amp;gt; null do
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; yield actualFeature
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; do actualFeature := featureCursor.NextFeature()
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; };;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;featureCursorSeq featureCursor
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;|&amp;gt; Seq.iter (fun feature -&amp;gt; Console.WriteLine ((!feature).OID));;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description></item><item><title>F# and ArcObjects, Part 1</title><link>http://blog.marko-apfel.de/posts/f-sharp-and-arcobjects-part-1/</link><pubDate>Thu, 25 Mar 2010 10:58:00 +0100</pubDate><guid>http://blog.marko-apfel.de/posts/f-sharp-and-arcobjects-part-1/</guid><description>&lt;p&gt;After having a first look on F# its time to ask: How could i use F# with ArcObjects.&lt;/p&gt;
&lt;p&gt;So my first steps was to do something with a feature in a F# interactive session.
And these are my first code lines:&lt;/p&gt;</description></item><item><title>Integrating F# in SharpDevelop</title><link>http://blog.marko-apfel.de/posts/integrating-f-sharp-in-sharpdevelop/</link><pubDate>Wed, 24 Mar 2010 13:10:00 +0100</pubDate><guid>http://blog.marko-apfel.de/posts/integrating-f-sharp-in-sharpdevelop/</guid><description>&lt;p&gt;After installing SharpDevelop 4 the F# Interactive could not be activated.&lt;/p&gt;
&lt;p&gt;In my case the correct folder for the F# installation must by specified in die application config file.
So i opened SharpDevelop.exe.config and set this entry in the appSettings section:&lt;/p&gt;</description></item></channel></rss>