<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Edgar Sánchez on Medium]]></title>
        <description><![CDATA[Stories by Edgar Sánchez on Medium]]></description>
        <link>https://medium.com/@edgarsanchezg?source=rss-accf824383c5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*qcr2xLYBWLkmh2Q9.</url>
            <title>Stories by Edgar Sánchez on Medium</title>
            <link>https://medium.com/@edgarsanchezg?source=rss-accf824383c5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 15 Nov 2026 19:45:00 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@edgarsanchezg/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Hey F#, load me this CSV file into a table!]]></title>
            <link>https://medium.com/@edgarsanchezg/hey-f-load-me-this-csv-file-into-a-table-14c60a3b0842?source=rss-accf824383c5------2</link>
            <guid isPermaLink="false">https://medium.com/p/14c60a3b0842</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[fsharp]]></category>
            <category><![CDATA[type-providers]]></category>
            <category><![CDATA[database]]></category>
            <dc:creator><![CDATA[Edgar Sánchez]]></dc:creator>
            <pubDate>Wed, 02 Aug 2017 17:18:39 GMT</pubDate>
            <atom:updated>2017-08-02T17:18:39.370Z</atom:updated>
            <content:encoded><![CDATA[<p>So here’s the thing: I’ve got this CSV file, nothing fancy, but still it has got integers, decimals, strings, and dates in it, now I need to load its contents into a relational table, like in MariaDB for example, on Linux if you don’t mind :-)</p><p>Let’s begin with the spoilers, we are going to do this :-P</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/981/1*7PjjugGGqDedtRO4YHXLEw.png" /></figure><p>Yep, the bulk of the job will be done by seven lines of code, but let’s go tiny step by tiny step. To perform this feat we are going to use two different type providers:</p><ol><li><a href="https://fsharp.github.io/FSharp.Data/library/CsvProvider.html">CSV Type Provider</a>, which reads a sample .CSV file, creating classes that represent a row and its columns, and functions that load files with similar structure returning a collection of well-typed objects.</li><li><a href="http://fsprojects.github.io/SQLProvider/">SQLProvider</a>, which let us work against a relational database as illustrated in <a href="https://medium.com/@edgarsanchezg/accessing-a-relational-db-with-f-type-providers-7263d88aa640">this previous post</a>.</li></ol><p>To begin with we have to create a folder, then a project inside it, and get these three packages: SQLProvider, MySQLData, and FSharp.Data. You can find detailed instructions on how to do this in steps 1 to 3 of <a href="https://medium.com/@edgarsanchezg/accessing-a-relational-db-with-f-type-providers-7263d88aa640">this post</a> (if you haven’t done it yet, this is a good time to follow that step-by-step guide). You should end up with a structure similar to this one:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/1*QHuwMIIOZdeiYOblX53QYg.png" /></figure><p>Let me explain the “nice trick”: sometimes <a href="https://fsprojects.github.io/Paket/"><em>Paket</em></a>, our package manager, is too eager, downloading library flavors for (too) many .NET Framework versions, line 1 <em>framework: auto-detect </em>in the <em>paket.dependencies</em> file, forces Paket to restrict itself to the framework versions actually present in my machine, so this is an optional step that, at least in my case, saves downloading a bunch of extra files.</p><p>Now back to our job, and there is one last configuration task to do before getting into the coding fun: as we are going to create a stand-alone executable, we need to be able to compile the project -in previous posts I have only used <em>.fsx</em> script files-, to accomplish this we will use <a href="https://fake.build/"><em>Fake</em></a>, a project builder á la C <em>make</em>, only functional and written in F# of course. Fake relies on the <em>.fsproj</em> project file to guide its work so we need to add the appropriate libraries to it, in order to do so:</p><ol><li>Press <em>Ctrl-Shift-P</em>, enter <em>F#</em>, and choose the <em>F#: Add Reference</em> option</li><li>Select <em>LoadCsv.fsproj</em> from the list (or whatever the name of your project is)</li><li>Enter <em>FSharp.Data</em></li><li>Repeat the same steps but now enter <em>SQLProvider</em></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/530/1*kHZSDXhV_t-Lp6Ogy3Ks-g.png" /></figure><p>If you want, just as a sanity check, you can open the <em>LoadCsv.fsproj</em> file and somewhere close to the bottom you should see references to the libraries, something like the image below, if they’re there, we’re good, smile, close it, and forget about it :-)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/986/1*MsMqq0iemDZ6F2vYCGH-Ag.png" /></figure><p>Now, onto data folders and files, as we said when we first mentioned the CSV Type Provider, it needs a sample .CSV file, so we create a <em>data</em> folder <strong>inside</strong> the <em>LoadCsv</em> folder, and there we create the <em>paymentsSample.csv</em> file (by the way, you can find the <a href="https://gist.github.com/edgarsanchez/43b372ad7f3c0a5d655dc5498f1e4a67">files related to this blog post here</a>).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/319/1*WAyhBJGisvBC0LlffoJQUw.png" /></figure><p>And we are finally ready to code! When we created the <em>LoadCsv</em> project, a <em>LoadCsv.fs</em> file was also created, this is our main (and only :-) ) source code file, it’ll be just a few lines long, and the gist of it is:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cdSfkByzBLNe4h-Y7qfvhA.png" /></figure><p>As I mentioned before, you can find the <a href="https://gist.github.com/edgarsanchez/43b372ad7f3c0a5d655dc5498f1e4a67">source code here</a>, but I really suggest you to type in the code yourself in order to get a feeling for the language and the environment. Some relevant comments:</p><ol><li>Lines 7 to 9 just initialize some constants for the SQL provider, of particular note is <em>ResPath</em>, the path to the folder containing the MySQL assembly.</li><li>Lines 11 and 12 create the type providers, here’s where the magic happens. <em>Payments</em> will know all about the .csv file contents, <em>DbProvider</em> will know all about the <em>sales</em> database.</li><li>The <em>loadCsv</em> function does all the hard work: line 16 reads the whole .csv file found at <em>path</em>, so that <em>payments</em> is bound to a collection of objects with four properties (<em>Id, Name, Amount, Date</em>) each, <em>context</em> is our gateway to the <em>sales</em> database.</li><li>At line 18 we take the lines already read from the .csv file and let the <em>iter()</em> function process each one with a lambda (OK, OK, just a function with no name :-) ), where <em>p</em> is already an object with properties for every field in the line</li><li>At line 20 we create a new database row with the funnily named function <em>``Create(Amount, Date, Name)``</em> (yep, that’s its name, automatically created by the SQL provider), in line 21 we also set the primary key, that unfortunately is not a parameter for the <em>Create()</em> function :-( so we have to do it by hand, and in a mutable way also -a sin in the functional world but that’s what happens when you mess with external repositories. Mind you: the new row has not been committed to the database yet.</li><li>Finally in line 22 we submit <strong>all</strong> the new rows to the database in one big transaction.</li></ol><p>Just not to be too lame, we surround everything with some very basic exception control, and that’s pretty much it, 15 lines of code for the whole thing is not that bad, right? Let’s run it!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/840/1*qY-JgBUyXbHy41mq5KjOBQ.png" /></figure><p>Beware of micro-benchmarks, but still: eight something seconds to load 10,000 records to a table is not bad, especially in my so-so laptop :-)</p><p>I know this has already become a long post, but one last thing may be bugging some of you: what if the .csv file had one million lines? Do we really want a one-million-inserts transaction at line 22? May be a small enhancement is in order:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fppJ-9JpDS6IAb_Fpf-iYQ.png" /></figure><p>Just two small changes:</p><ol><li>At line 19 we use the <em>iteri()</em> functions which gives us an additional parameter: a counter of how many lines have been processed already</li><li>Then at line 22 we submit the new rows every 500 lines, a far shorter database transaction</li></ol><p>And that’s it, I hope this gave you an idea of how much you can achieve with just a few lines of F#, as usual all feedback is welcomed!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=14c60a3b0842" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Accessing a relational DB with F# type providers]]></title>
            <link>https://medium.com/@edgarsanchezg/accessing-a-relational-db-with-f-type-providers-7263d88aa640?source=rss-accf824383c5------2</link>
            <guid isPermaLink="false">https://medium.com/p/7263d88aa640</guid>
            <category><![CDATA[type-providers]]></category>
            <category><![CDATA[vscode]]></category>
            <category><![CDATA[fsharp]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[database]]></category>
            <dc:creator><![CDATA[Edgar Sánchez]]></dc:creator>
            <pubDate>Thu, 20 Jul 2017 04:47:45 GMT</pubDate>
            <atom:updated>2017-07-20T04:47:45.491Z</atom:updated>
            <content:encoded><![CDATA[<p>This is going to be a very simple step-by-step guide on how to use an F# type provider to access information in a relational database, specifically MySQL or MariaDB, in Linux. The goal is to get you set up with a working environment so that you can follow more detailed tutorials and examples. A couple of prerequisites:</p><ol><li>An F# development environment similar to the one we <a href="https://medium.com/@edgarsanchezg/four-easy-steps-for-installing-f-in-ubuntu-linux-88122323f12b">set up here</a>: Mono runtime, F# 4.1 compiler, and VS Code with Ionide extensions.</li><li>Also you need the <a href="https://downloads.mariadb.org/mariadb/repositories/#mirror=edatel&amp;distro=Ubuntu&amp;distro_release=xenial--ubuntu_xenial&amp;version=10.2">MariaDB engine installed</a> and working, with its usual <em>test</em> database.</li></ol><p>Once you are past this, we can start our step-by-step:</p><p><strong>First:</strong> Open a terminal, create a folder, get into it, and start VS Code with a <em>code .</em> command.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/479/1*YguzKzslOn-3GssMVOyBFA.jpeg" /></figure><p><strong>Second:</strong> Once VS Code is started up, press <em>Ctrl-Shift-P</em> to open the command bar, type <em>F#</em> and then select the <em>F#: New Project</em> option.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/621/1*itHELRKNsIXHKddWTYRPqg.jpeg" /></figure><p>In the option bar that appears at the top select the <em>console Console Application</em> option, then press <em>Enter</em> to use the current folder as the parent for the project we are creating, and finally type <em>helloDB</em> as the name of our brand new F# project.</p><p>If everything went fine, a confirmation will be displayed and an initial structure with three folders and a couple of files will be shown, like so:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/553/1*ZrChTQsqrFcu4OlcZh1xoA.jpeg" /></figure><p><strong>Third:</strong> Now we are going to download the two packages that we need to work with MariaDB (or MySQL) from F#:</p><ol><li>Press <em>Ctrl-Shift-P</em> to open the command bar and then type <em>Paket</em>, select the <em>Paket: Add Nuget Package</em> option, and in the text box that appears at the top enter <em>SqlProvider</em>, this is the F# type provider for working with several relational databases (more information <a href="http://fsprojects.github.io/SQLProvider/">here</a>).</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/678/1*Ab-FqkXChMSuQOdovTnnwQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/722/1*yIC4sqhTjJzykpP9K8ZT4Q.jpeg" /></figure><p>2. For the second library, press <em>Ctrl-Shift-P</em> again, type <em>Paket</em>, select the <em>Paket: Add Nuget Package</em> option, and in the text box enter <em>MySql.Data. </em>This is the .NET library for working with a MySQL (or MariaDB) database engine.</p><p>As a sanity check, open the <em>paket.dependencies</em> file by clicking on it, the file should contain these two lines (the order or exact location isn’t important):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/731/1*3CHEI2fdQh-efeuEx55Afw.jpeg" /></figure><p><strong>Fourth:</strong> Now we are finally ready to enter some F# code, let’s create a script file so we can work line by line: <em>right-click</em> on the <em>helloDB</em> folder and choose the <em>New File</em> option from the pop-up menu, then type <em>learning.fsx</em> as the name of the new script file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/473/1*R2nwlr0zwNk8wYbkFEwwBg.jpeg" /></figure><p><strong>Fifth:</strong> Create a SQL data provider by typing these 6 lines of code:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/910/1*rrtgDkgFNgoTYhdUkv6rkw.jpeg" /></figure><p>Some relevant comments:</p><ol><li>The first line instructs the F# environment to go ahead and load that assembly, so that we can use the functions defined in it in our code, as usual in Linux be careful with the casing</li><li>The <em>open</em> at line 3 is similar to a C# <em>using</em> or a Java <em>import</em></li><li>The <em>Literal</em> attribute makes <em>ConnString</em> and friends string constants available at compile time (far before runtime), this is a requisite for the type provider to do its magic while we type code</li><li>Line 12 is the kicker, risky and magical stuff happens as soon as you hit <em>Enter</em> at the end of that line:<br>a) The F# environment tries to connect immediately to the <em>test</em> database, if the DB server or the database is not available, or the credentials are wrong, <strong>a compilation error is fired</strong>, this is the risky part<br>b) If the connection goes well, <em>SQLDataProvider</em> is ready to explore the database structure and <strong>generate on the fly, as we keep entering code, classes that represent tables, rows, columns, etc.</strong> This is the magical part</li><li>A keen eye would observe that while in line 1 the path <em>../packages/…</em>starts with two dots, in line 9 the path <em>./packages/…</em> starts with just one dot. This is indeed an inconsistency, I ignore if it’s caused by the VS Code extensions, a bug in SQLDataProvider, or something else, but at least we have a workaround that works consistently :-)</li></ol><p><strong>Sixth:</strong> Now the real fun begins, we define a context object that is our gateway to the database, through it we can navigate the database with Intellisense and all, even to the point of primary keys!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/852/1*ZUbI4ZLP6FI02YsGMa82LA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/449/1*pvZ64Qw7D4rGV2JqMXglew.jpeg" /></figure><p><strong>Seventh:</strong> Now I am pushing into information that is really better explained at the <a href="http://fsprojects.github.io/SQLProvider/#Example">SQLProvider site</a>, but just to be a little complete we can create a new row and save it to the DB table:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/418/1*jG8Qh3mOxdmJJia5p87ZXg.jpeg" /></figure><p>As I said at the beginning of the article: this was a step-by-step guide with a really simple escenario, the goal being setting up your Linux F# environment so that you can start using the SQL type provider for some real work. Come to think of it, may be a future post with examples showing some fancy queries, joins and the like, is in order B-)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7263d88aa640" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How O-O does even look like in F#?]]></title>
            <link>https://medium.com/@edgarsanchezg/f-is-a-first-functional-language-but-being-multi-paradigm-it-can-handle-classes-objects-fd9ede7a2cc9?source=rss-accf824383c5------2</link>
            <guid isPermaLink="false">https://medium.com/p/fd9ede7a2cc9</guid>
            <category><![CDATA[functional-programming]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[object-oriented]]></category>
            <category><![CDATA[fsharp]]></category>
            <dc:creator><![CDATA[Edgar Sánchez]]></dc:creator>
            <pubDate>Tue, 11 Jul 2017 13:06:45 GMT</pubDate>
            <atom:updated>2017-07-16T01:56:37.167Z</atom:updated>
            <content:encoded><![CDATA[<p>F# is a first-functional language but, being multi-paradigm, it can handle classes, objects, inheritance, methods, etc. Since many of my friends are used to languages like Java or C# (or even C++), the question of whether you can do object-orientation with F# arises frequently, so much so that I’m going to try and show you some examples on how to do it. I have to say right out of the bat that they are going to be (very) simplistic examples, but I hope they will give you a realistic idea of how to write O-O F# anyway. I’m going to use the typical scenario of a <em>Vehicle</em> class from which a <em>Car</em> class descends. For starters, let’s see how to define color as an enumeration (we do use enumerations, right?) and position as an immutable object (the specific coordinates (0.24,-78.5) do not change, if a vehicle moves its position changes obviously, but it does so by receiving <strong>new coordinates</strong>). The Java version:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/408/1*pR2Bg5GSXM1KZhxK0_Qt5A.jpeg" /></figure><p>Someone may say that <em>longitude</em> and <em>latitude</em> should have getters, but since a <em>Position</em> instance doesn’t change (hence the <em>final</em> in the field declarations), defining and using a getter seems excessive and I don’t want to make Java look longer than necessary. Now the F # version:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/453/1*GszIgOqvGga2WqVn2eg75w.jpeg" /></figure><p>The <em>enum</em> syntax is different, but the equivalence is clear. <em>Position</em> does bring some new ideas: what we are seeing is a <em>record</em> declaration, a simple object type that only has properties, which are also immutable (like Java’s <em>final</em> fields), this could look like a very narrow case, but as F# favors using immutable elements, it happens much more frequently than in your average O-O code.</p><p>Now on for something with more meat to it -with apologies to my vegan friends :-) The <em>Vehicle</em> class, which is abstract, has a few fields, a constructor and a method. The Java version:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/375/1*REdoyfTw2632a_5p740fNQ.jpeg" /></figure><p>As is usually the case, the <em>Color</em>, <em>Position</em>, and <em>Speed</em> fields, together with its getter and setter declarations take up much of the space; the constructor initializes a couple of those fields via its respective setters, as recommended in Java; finally, the <em>Accelerate</em> method increases the speed and returns the new value, of course we could, we should, have much more logic there but that’s not the focus of this article. Now the F# version:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/580/1*yg3VAmSSKR1vcZ1eUzsdRw.jpeg" /></figure><p>Right at the first line, it is kind of odd the usage of the <em>AbstractClass</em> attribute to signal that we are dealing with an abstract class (hey! No one said everything was going to be obvious around here :-) ), with that over let’s deal with more salient details:</p><ol><li>The parentheses just after the class name indicate that the default constructor has no arguments (aha, yes, those “()” are our <em>Vehicle()</em> constructor declaration ;-))</li><li><em>Color</em>, <em>Position</em>, and <em>Speed</em> are properties with invisible fields behind them, with automatically generated getters and setters, similar to those of the Java version</li><li>That <em>{length = 0.0; latitude = 0.0}</em> code instantiates a <em>Position</em> object, in effect it is the equivalent of <em>new Position (0, 0)</em></li><li>The <em>Accelerate</em> method has one argument, no parentheses around it needed, no <em>return</em> keyword required either: the very last evaluated expression, in this case <em>this.Speed</em>, is returned</li><li>Finally, there’s no need for any type declaration, all those <em>Color</em>, <em>Position</em>, <em>float-&gt; float</em>, and the like in light grey, are visual hints created by the compiler, nothing that I had to type in.</li></ol><p>All in all, we’re talking about <strong>32 Java lines vs. 8 F#<em> </em>lines</strong> to express the exact same thing. A 75% savings of lines to read and understand is pretty good, isn’t it? :-)</p><p>We are almost done, <em>Car</em> is a class inherited from <em>Vehicle</em> that adds a field, immutable just to illustrate the way such thing are done, and a method. The Java version:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/356/1*IuREkcz8pxP_f4WY39m88g.jpeg" /></figure><p><em>Brand</em> is a property initialized inside the constructor that doesn’t change afterwards; the constructor receives two parameters: <em>brand </em>which is mapped to a local field and <em>color </em>which is mapped to an ancestor field via its setter; Finally, the <em>PullHandBrake</em> method slows down the car to 0 (I did say that this was going to be a simplistic example, right? :-)) using the ancestor’s methods and getters, nothing earth-shattering here. Now, the F # version:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/385/1*UETaxV6XGBDIFNdzSmCNxg.jpeg" /></figure><p><em>Car</em> descends from <em>Vehicle</em>, the syntax is obvious, but again we have some interesting details:</p><ol><li>The <em>()</em> after <em>Vehicle </em>signal which ancestor constructor will be called as part of a <em>Car</em> object instantiation, so it causes the same effect as a Java <em>super()</em> call</li><li>The <em>Car</em> constructor itself takes two parameters, which are used in two different places: a) Inside the <em>do</em> statement, where the default constructor logic is placed; b) At the <em>Brand</em> property initialization <em>Brand: string = brand</em>, which by the way has no setter, making it immutable.</li><li>The value returned by <em>PullHandBrake</em> is the same as in Java, but I like to think that there is less noise here :-)</li></ol><p>Here we had only a 50% savings in code lines but still not that bad, eh?</p><p>I hope that these (very) simple examples made it clear that F# can be as O-O as Java or C#, but remember: it is a good idea to try to be functional first and only when it doesn’t come natural to go back to O-O, otherwise what would have been the point of moving to a functional language? Any comments?</p><p>Update 1: You can get the F# and Java code samples <a href="https://gist.github.com/edgarsanchez/3bb607e6d8b2ffd64dd9006179fdb285">here</a>.</p><p>Update 2: <a href="http://foundation.fsharp.org/?recruiter_id=7169">Join the functional movement!</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fd9ede7a2cc9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Four easy steps for installing F# on Ubuntu Linux]]></title>
            <link>https://medium.com/@edgarsanchezg/four-easy-steps-for-installing-f-in-ubuntu-linux-88122323f12b?source=rss-accf824383c5------2</link>
            <guid isPermaLink="false">https://medium.com/p/88122323f12b</guid>
            <category><![CDATA[fsharp]]></category>
            <category><![CDATA[functional-programming]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Edgar Sánchez]]></dc:creator>
            <pubDate>Mon, 03 Jul 2017 01:39:16 GMT</pubDate>
            <atom:updated>2017-07-16T01:10:10.684Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>First:</strong> Configure Ubuntu so it recognizes the Mono repository, an open source Linux implementation of .NET Framework.</p><p><a href="http://www.mono-project.com/download/#download-lin-ubuntu">Download | Mono</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/786/1*fFQhHffWm1QIhYXwaoyEBw.jpeg" /></figure><p><strong>Second:</strong> Install F#, this step first installs Mono and then F# proper, so it takes a few minutes, have a little patience :-)</p><p><a href="http://fsharp.org/use/linux/#ubuntu">Use F# on Linux | The F# Software Foundation</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/631/1*uGe-kjSZ1Lj0coGZCPU43g.jpeg" /></figure><p>You could start writing F# code already albeit using the command-line tools so…</p><p><strong>Third:</strong> Install Visual Studio Code, a developer’s open source editor, you download a .deb package, and then double-click it.</p><p><a href="https://code.visualstudio.com/">Visual Studio Code - The open source AI code editor</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/608/1*2odDH0BrvxMQ24HOAQ1FaQ.jpeg" /></figure><p><strong>Fourth (and last): </strong>Launch Visual Studio Code (writing <em>code</em> at a command line will do), then install the ionide plug-ins: F#, Fake (a build utility, like C make, but written in F# itself), and Paket (a packet manager, like maven, npm, or nuget, equally written in F#).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/363/1*Yl04Red4XH_dqt1WMVW4gQ.jpeg" /></figure><p>And you’re all set! You can now experience coding in a functional language on a lightweight open source environment :-)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*9e-FomjNVDkEbfcyW1PleQ.jpeg" /></figure><p><a href="http://foundation.fsharp.org/?recruiter_id=7169">Join the functional movement!</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=88122323f12b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>