<?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 Kunjan Dalal on Medium]]></title>
        <description><![CDATA[Stories by Kunjan Dalal on Medium]]></description>
        <link>https://medium.com/@kunjee?source=rss-175514c70991------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*tU1yhVEwLTpbE40Duyd-vQ.png</url>
            <title>Stories by Kunjan Dalal on Medium</title>
            <link>https://medium.com/@kunjee?source=rss-175514c70991------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 15 Nov 2026 19:41:23 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kunjee/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[Shades of F#]]></title>
            <link>https://medium.com/@kunjee/shades-of-f-10d5c6da3076?source=rss-175514c70991------2</link>
            <guid isPermaLink="false">https://medium.com/p/10d5c6da3076</guid>
            <category><![CDATA[dotnet]]></category>
            <category><![CDATA[dotnet-core]]></category>
            <category><![CDATA[fsharp]]></category>
            <category><![CDATA[functional-programming]]></category>
            <dc:creator><![CDATA[Kunjan Dalal]]></dc:creator>
            <pubDate>Sun, 27 Oct 2019 00:00:00 GMT</pubDate>
            <atom:updated>2019-11-11T08:01:48.524Z</atom:updated>
            <content:encoded><![CDATA[<p>I am writing after a long time for F#. And this would be a little bit controversial post. Take it with a pinch of salt.</p><p>Recently I got a call from some company who wants me to do some job in F#, for its client. The client took my interview and told that its client wants to do some work in F#. Things were going <em>smoothly</em> until the interviewer asked me that I should be writing F# code following standard and design patterns.</p><p>I just went to pause, as my brain trying to search Functional Programming Design Patterns. It gave me <a href="https://twitter.com/ScottWlaschin">Scott Wlaschin’s</a> famous answer. In functional programming every design pattern is function. But can’t give that answer to the client’s operator for sure. So, I gave the other best possible answer.</p><blockquote><em>You are asking about F# code like Python or F# code like Haskell?</em></blockquote><p>The contract didn’t get converted but this post does.</p><h4>Let’s start with first shade. F# like typed Python.</h4><p>If you are old enough to know and write code with <em>Visual Studio 2012</em> then go back to that time, and try to remember good talks you have seen to learn F#.</p><p>Here are few of my favorites</p><ul><li><a href="https://channel9.msdn.com/Blogs/pdc2008/TL11">The Best Introduction to F# by Luca Bolognese</a>, people might point you to many different resources for getting started with F#. But this video is still the best one to get started. Trust me on that.</li><li><a href="https://www.youtube.com/watch?v=vNiyDbcfJDE">“How machine learning helps cancer research” by Amazing Dr.Evelina Gabasova</a>, one of the gifted speaker in F# and machine learning community. Not only she is a good speaker, but she is also a damn good person, guru, and wonderful friend.</li><li><a href="https://www.youtube.com/watch?v=uyW4WZgwxJE">Parallel and Asynchronous Programming with F# by Father of F# Don Syme</a>. If you still think Don Syme is human, then go watch this video. He is not, you can tell from the way he pulls this talk and way he codes.</li><li><a href="https://www.youtube.com/watch?v=PrmF%206a0iTXk">Building a Better SQL Type Provider with Ross McKinlay</a>. This guy bend language to practically a level where language has to tell, enough is enough man.</li><li><a href="https://www.youtube.com/watch?v=oWfYnN0I73U">Game Programming in FSharp with Andrea Magnorsky</a>. I call her and Ross <em>the Dragon Masters</em>. You think FP is slow, think again. Dragon Master Andrea gonna prove you wrong.</li><li><a href="https://www.youtube.com/watch?v=H9uzJFM2Hl0">Xamarin Evolve 2014: Mobile App Development in F# — Rachael Reese, Firefly Logic</a> — Long before fabulous born, F# was working with Xamarin. If I remember correctly Rachael gave the first talk about it.</li></ul><p>There are common things you can abstract away from it</p><ul><li>Functions (obviously)</li><li>Forward Pipe (Best thing in language)</li><li>Type Providers</li></ul><p>There were no Result Type, Elevated world, not even Railways. Even I have to ask on Stack Overflow, just to do multiple validations on an entity.</p><p>The language was so simple and beautiful. Tooling was good enough, at least it works most of the time. Don’t crash on my lap just because I have opened any big project. People are way more friendly then compare to now for sure. Good old days.</p><p>Python gets traction from the Data Science community because of its simplicity. It is too good to write algorithms, especially when you have definite input and output.</p><p>Here, F# just adds more power to this. You have types and type providers, you can write simple functions to process data, join them using forward pipes. It was too much fun then, I tend to convert every damn thing to forward pipe. Overdoing it sometimes but it was fun. This is the F# I loved the most. I still like this kind of programming, no specific types, few record types to define input and output and all the functions. Files and modules are always there to help in case of separation. So, nice and so Python-like.</p><p>Let’s see some code. I am demoing famous world bank data example (from their docs only).</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ad1964c21fb87706436fd986f7491fd3/href">https://medium.com/media/ad1964c21fb87706436fd986f7491fd3/href</a></iframe><p>So, what’s wrong with this approach. Practically nothing, but real-world problems (especially in web, distributed system, mobile, etc) kind of need something more. It needs some more design and architecture to hold big applications together.</p><p>But don&#39;t we already have design patterns for ages? Can&#39;t it be applied to F#.</p><p>F# is functional first language running on .Net. And it does support object-oriented programming. Here comes second <em>shade</em> of F#.</p><h4>F# as better C#.</h4><p>If someone likes me coming from C#, this might be a natural transaction. Try to map whatever you learn in C# to F#. I also wrote a couple of articles long back explaining how you can use traditional object-oriented design patterns in F#.</p><p>Here is how a typical C# class looks like.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c615cd4db9f8b37ae76bb7f851cd822d/href">https://medium.com/media/c615cd4db9f8b37ae76bb7f851cd822d/href</a></iframe><p>and here equivalent beautiful F# code</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3a31dd78ab2bcabaf6e304e2dcb752d5/href">https://medium.com/media/3a31dd78ab2bcabaf6e304e2dcb752d5/href</a></iframe><p>You can make a little bit terser without going more functional</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d4e7d0ef63c7dc5f923e07863f6b35d9/href">https://medium.com/media/d4e7d0ef63c7dc5f923e07863f6b35d9/href</a></iframe><p>Look how beautiful F# code looks. I did write immutable C# code so I don’t have to write mutable F# code.</p><p>Let’s push F# code to the little more functional end. Here we have a small example from Railway Oriented Programming.</p><p>We are defining kind of domain with two different styles.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c0f3cb75e7e6f4b2bc0c6d1526674135/href">https://medium.com/media/c0f3cb75e7e6f4b2bc0c6d1526674135/href</a></iframe><p>let’s do the same thing with class</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fe27dce6741ee658490aa0ddfb87e5f9/href">https://medium.com/media/fe27dce6741ee658490aa0ddfb87e5f9/href</a></iframe><p>Pick your choice, both give the almost same result on the consumer side.</p><p>But with this, we are moving more towards Haskell. Languages like Haskell, Scala have something called HKT or Higher Kind Types backed into language.</p><p>F# as a language by design lacks features like HKT.</p><blockquote><em>For a long time I didn’t know HKT means Higher Kind Types. And the even longer amount of time I took to understand it.</em></blockquote><p>There is a discussion going on how useful it is? So, it depends on choice of elders but F# at the time of writing this blog doesn’t have HKT.</p><p>It still doesn’t hold anyone to push your F# code more towards Haskell.</p><h4>Here is the final shade. F# more like Haskell.</h4><p>If you like to skip all the IO and monad stuff, just pause this blog here and watch this <a href="https://www.youtube.com/watch?v=bK-Tz-GLfOs">video</a> by Scott W.</p><p>You can gradually grow your system to push towards Haskell. A Little help to LIFT your code will surely be useful. Read Functional Programming for Fun and Profit&#39;s <a href="https://fsharpforfunandprofit.com/posts/recipe-part2/">Railway oriented programming</a> post. Written by <a href="https://twitter.com/ScottWlaschin">Scott Wlaschin&#39;s</a></p><p>Or you can use a wonderful library like <a href="http://fsprojects.github.io/FSharpPlus/">F# plus</a></p><p>Let’s check out the validation example, I have taken from docs of F# plus. So, you can build upon that.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e91a60ffb8c27a7b38dd2230e7873e4b/href">https://medium.com/media/e91a60ffb8c27a7b38dd2230e7873e4b/href</a></iframe><p>This style of coding is very helpful when you are designing a big IO based system. This way you easily separate logic from execution.</p><blockquote><em>I did purposefully skip heavy functional concepts here. Concepts and patterns based on Algebra, Category Theory, Monads, etc. It’s good and important to know them. But that is totally out the scope for this blog. So, maybe next time.</em></blockquote><p>F# is a very flexible language, and one can bend it as one like. Write down in comment what is your shade of F#?</p><p><em>Originally published at </em><a href="https://kunjan.in/2019/10/shades-of-fsharp/"><em>https://kunjan.in</em></a><em> on October 27, 2019.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=10d5c6da3076" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Functional Programming Adventures in 2019]]></title>
            <link>https://medium.com/fuzzycloud/functional-programming-adventures-in-2019-4b16fbb8356a?source=rss-175514c70991------2</link>
            <guid isPermaLink="false">https://medium.com/p/4b16fbb8356a</guid>
            <category><![CDATA[elm]]></category>
            <category><![CDATA[fsharp]]></category>
            <category><![CDATA[xamarin-forms]]></category>
            <category><![CDATA[functional-programming]]></category>
            <category><![CDATA[scala-programming]]></category>
            <dc:creator><![CDATA[Kunjan Dalal]]></dc:creator>
            <pubDate>Fri, 11 Jan 2019 10:27:45 GMT</pubDate>
            <atom:updated>2019-01-11T10:27:45.569Z</atom:updated>
            <content:encoded><![CDATA[<p>I like to start with wishing all the readers <em>A Very Happy New Year…</em> I wish 2019 for you will be too much fun and less of issues.</p><p>Speaking of issues, will going to talk about Functional Programming. Because if you are coding with Functional Programming you normally get fewer errors. I love them for those reasons.</p><p>In this post also as the title suggests I will be going to talk about Functional Programming only. There will be no code though, but mostly in a meta sense.</p><h3>Fable</h3><p>As we are talking about Functional Programming we have to talk about <a href="https://fable.io/">Fable</a>. My current favorite tech. It nicely converts F# to JavaScript. Also, have a wonderful ecosystem. I am lucky enough to be part of it, and also maintaining <a href="https://github.com/kunjee17/awesome-fable">awesome-fable</a>. I am using it in multiple projects since more than a year. It is very much battle ready for putting in a big or very big project. I will talk about projects later. But let us talk about a few other announcements.</p><h3>Green Print</h3><p>If you take Blue and mix with Yellow what will you get? It is Green. Here is <a href="https://github.com/kunjee17/greenprint">Green Print</a> project. It is a thin wrapper around <a href="https://blueprintjs.com/">Blueprint Js</a>. So, the blueprint can be used with Fable Elmish. Blueprint is UI library built for a desktop heavy web application. All the namespaces are in Fable fashion, Fable.Blueprint.*. It is still a work in progress though. I did port core and icons but others are still pending.</p><p>I love <a href="https://github.com/MangelMaxime/Fulma">Fulma</a> so I did take that project and make Green Print from it. I am using a library in a project for work. I will be adding to it to open source project as well. It is kind of working. The thing here is, BluePrint is quite a big library so I can’t test all elements with all features. Docs are also pending so there is a chance of few corner issues. But here I need community’s help to make feature ready as fast as possible. Fine tune the API or working on docs. It is the same as Fulma but bit different. Check out Blueprint JS and see if that matters to you. I’ll be happy if that can be useful to anyone.</p><h3>Fabulous</h3><p><a href="https://fsprojects.github.io/Fabulous/">Fabulous</a> is a fabulous library for cross-platform mobile development. It is a wrapper around Xamarin.Forms with Elmish in it. I was so pumped up when it first launched, tried and made a couple of apps with it. Nothing fancy but was having fun around. There were a few things I was not happy about.</p><ul><li>The list is quite jumpy</li><li>Not happy with the performance in android</li><li>I felt there is too much wire up I need to do</li><li>Live reload didn’t work for multiple files in the project</li></ul><blockquote><em>But</em></blockquote><h3>FabScaffold</h3><p>Recently I created application with Fabulous within a week. Polishing UI did take a week more. I will write more about it in separate write up once I launch a application. Coming very soon. For now I rip apart my application and created a scaffold from it.</p><p>Here is the project called <a href="https://github.com/kunjee17/FabScaffold">FabScaffold</a>. It is having almost everything to get you started. It also provides an architecture to grow your next business application. Go for it. I have solved all mentioned issues other than live-reload for multiple files in a project.</p><blockquote><em>Fabulous has same limitations what Xamarin.Forms have. Back end plugins gonna work as it should and for UI you might need a wrapper for few and few gonna work as it is. But it is too good without all that Xaml around.</em></blockquote><h3>Machine Learning Monday</h3><p>I have started <em>Machine Learning Monday</em> a few months back. But due to year ending can’t continue. But will going to continue from next week. Coming Monday I will be reviewing <a href="https://www.packtpub.com/big-data-and-business-intelligence/f-machine-learning">F# for Machine Learning Essentials</a>. Got this book from Sudipta Mukherjee himself. It would be fun. So, stay tuned.</p><h3>Sad state of F# &amp; Moving Forward</h3><p>This is a little bit personal. Some might find it rant but please don’t mind. I started my consulting gig <a href="https://fuzzycloud.in/">Fuzzy Cloud</a> last year. There are a couple of people other than me. Sole motive behind starting my own gig was to do more work in F#. Be it consulting or training. It is such a sweet language and having a wonderful community around it. I did get a continues contract work a year before. But last year was not so good. Not only it is hard to find work in F#, but people also keep asking for other languages like Scala or Haskell. There is not enough buzz or work in F#. Even in a functional conference when people speak about Haskell, Scala, Elixir in the same breath they always skip F#. Even in twitter account <em>Functional Works</em> skips F# quite a couple of time. Even though I learn those languages, I am all in for F#.</p><blockquote><em>I should not fall in love of language (it is just a tool). But what one should do when language is so delightful.</em></blockquote><p>I am still going to try a few more months if I get good work in F#. Else I need to keep it for my hobby projects, only. I will be working more towards Scala, Rust, and Kotlin. Haskell and Swift are also there but I m kind of undecided on those.</p><blockquote><em>I am available for F# related training and work if anyone interested or having a remote position open.</em></blockquote><h3>Speaking</h3><p>In 2019 I will try to speak at more conferences. As of now <em>F# exchange</em> is top of my mind. Please suggest good conference if you think they are good and don’t mind fresh speakers.</p><h3>Languages</h3><p>Because of my for history I never liked English that much. Also, never bothered about it. But I guess I need to improve on that. Also, want to learn German as well. People says it is very close to Sanskrit. May be I can learn both. If you know how to get started with German better than Google search then please let me know.</p><blockquote><em>If someone is confused about history and English they can read about </em><a href="https://en.wikipedia.org/wiki/Bengal_famine_of_1943"><em>Bengal Famine 1943</em></a><em> a very recent incident.</em></blockquote><p>I will also try to write more compared to the last couple of years. There are many things I like to share but never get enough time to write. With that, I am closing it. Happy New Year once again to everyone.</p><p><em>Originally published at </em><a href="https://kunjan.in/2019/01/functional-programming-adventures-in-2019/"><em>https://kunjan.in/2019/01/functional-programming-adventures-in-2019/</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4b16fbb8356a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/fuzzycloud/functional-programming-adventures-in-2019-4b16fbb8356a">Functional Programming Adventures in 2019</a> was originally published in <a href="https://medium.com/fuzzycloud">FuzzyCloud</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Machine Learning Monday]]></title>
            <link>https://medium.com/@kunjee/machine-learning-monday-3d3724feab56?source=rss-175514c70991------2</link>
            <guid isPermaLink="false">https://medium.com/p/3d3724feab56</guid>
            <category><![CDATA[microsoft]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[fsharp]]></category>
            <category><![CDATA[dotnet-core]]></category>
            <dc:creator><![CDATA[Kunjan Dalal]]></dc:creator>
            <pubDate>Thu, 01 Nov 2018 03:13:48 GMT</pubDate>
            <atom:updated>2018-11-01T03:13:48.070Z</atom:updated>
            <content:encoded><![CDATA[<p>October 29, 2018 in <a href="https://kunjan.in/categories/technical">Technical</a>, <a href="https://kunjan.in/categories/machine-learning">Machine Learning</a></p><p>Few days back I did a poll that which new shiny library I should be trying. Here is result of that</p><h3>Kunjan Dalal on Twitter</h3><p>I am thinking of trying one of the #MachineLearning - #DeepLearning library. Which one I should be trying? It should be fun and if possible can be used with #fsharp and / or #dotnet core. I ll share my experience in blog / video. Please RT.</p><p>As per popular demand I should be trying <a href="https://www.microsoft.com/net/apps/machinelearning-ai/ml-dotnet">ML.Net</a>. It is recently open sourced library from Microsoft for Machine Learning. It was started with all the C# examples. But lately there have been many F# samples.</p><blockquote>So, obviously my first choice is to do with F#.</blockquote><p>First, few good things about ML.Net</p><ul><li>Still in 0.6 version so a lot can improve (I like to try bleeding edge stuff)</li><li>Quite a good things coming in, including <a href="https://dotnet.github.io/infer/">Infer.net</a></li><li>Here are the lines from ML.Net blog Over time, ML.NET will enable other ML scenarios like recommendation systems, anomaly detection, and other approaches, like deep learning, by leveraging popular deep learning libraries like TensorFlow, Caffe2, and CNTK, and general machine learning libraries like Accord.NET.</li></ul><p>I will be looking deep into the library as well. But for now there are too many questions then answers</p><ul><li>I couldn’t find how internals of it works?</li><li>How all the calculations part being done?</li><li>Is there any options for GPU processing or it will leverage power of dependent library like TensorFlow or CNTK ?</li><li>How it compares to Keras? As that is also doing similar things.</li></ul><p>For now I have given a <a href="https://github.com/dotnet/machinelearning-samples/pull/79">PR</a> to make F# things more F# like. Nothing major but little bit clean up to make code more functional. Hope that gets approved. And I will be digging more into library.</p><p>Will try to have new article on F# in Machine Learning or Machine Learning in general every Monday. So, till next Monday stay tuned.</p><p><em>Originally published at </em><a href="https://kunjan.in/2018/10/machine-learning-monday/"><em>https://kunjan.in/2018/10/machine-learning-monday/</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3d3724feab56" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Native Script — Angular Once Again]]></title>
            <link>https://medium.com/fuzzycloud/native-script-angular-once-again-718d0c86cd65?source=rss-175514c70991------2</link>
            <guid isPermaLink="false">https://medium.com/p/718d0c86cd65</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[nativescript]]></category>
            <category><![CDATA[single-page-applications]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <dc:creator><![CDATA[Kunjan Dalal]]></dc:creator>
            <pubDate>Wed, 31 Oct 2018 12:47:44 GMT</pubDate>
            <atom:updated>2018-10-31T12:47:44.847Z</atom:updated>
            <content:encoded><![CDATA[<h3>Native Script — Angular Once Again</h3><p>Angular 1 was good, very good specifically in its timezone. But after that they lost control on versioning and I lost control on Angular.</p><p>I did port Angular 1.0 to 2.0 which was kind of weird experience because both are completely different. While 1.0 is old school two way binding stuff; 2.0 was more of react rip off or catching up with react.</p><p>But it reach 7.0 (<em>that was fast</em>) , after a long time I was reading announcement <a href="https://blog.angular.io/version-7-of-angular-cli-prompts-virtual-scroll-drag-and-drop-and-more-c594e22e7b8c">blog</a> and amazed the with progress angular made.</p><p>Specifically how they joining force with <a href="https://docs.nativescript.org/code-sharing/intro">NativeScript</a>. NativeScript allows use of Angular since ages but the ways code sharing is happening now; was never there before. There is a whole blog about it <a href="https://blog.angular.io/apps-that-work-natively-on-the-web-and-mobile-9b26852495e7">here</a>.</p><p>Two things is here to stay, SPA and mobile application (android and iOS both). For the application suitable for a single page application in most cases it also suitable for a mobile application.</p><p>Most of the time people just put SPA in mobile using Cordova/ phonegap and hope that things just works. It did work for a start but soon you gonna miss native performance.</p><p>Here there are many option to create Native application, Native Script is one of them, I will not go in to the other options, but current integration of Angular and Native Script provide a wonderful opportunity for Green and Brown Field projects to add Native Mobile App support to SPA. It is having around 70% code sharing between angular and NS. Trust me that is not bad at all, look at it this way</p><blockquote>70% code share means you are saving 70% of project time. That is equivalent to saving 70% of project budget.</blockquote><p>Native Script was slow, but again it was. It is quite fast as of now, almost inline with Xamarin Forms or React Native. So, this is kind of best of both world and a option one should not miss if they are working in or looking into Angular.</p><p>Looking for help regarding this? Reach us out at <a href="https://fuzzycloud.in/contact">FuzzyCloud</a> .</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=718d0c86cd65" width="1" height="1" alt=""><hr><p><a href="https://medium.com/fuzzycloud/native-script-angular-once-again-718d0c86cd65">Native Script — Angular Once Again</a> was originally published in <a href="https://medium.com/fuzzycloud">FuzzyCloud</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[First Step in Open Source World]]></title>
            <link>https://medium.com/fuzzycloud/first-step-in-open-source-world-997bfb466c71?source=rss-175514c70991------2</link>
            <guid isPermaLink="false">https://medium.com/p/997bfb466c71</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[ionic]]></category>
            <category><![CDATA[mobile]]></category>
            <category><![CDATA[angularjs]]></category>
            <dc:creator><![CDATA[Kunjan Dalal]]></dc:creator>
            <pubDate>Tue, 16 Oct 2018 08:00:46 GMT</pubDate>
            <atom:updated>2018-10-16T08:00:46.469Z</atom:updated>
            <content:encoded><![CDATA[<p>People who knows me must be knowing one fact, that I am big admire of Open Source Software. Not because it is free or something but it do provide opportunity to understand software craft.</p><p>I always believe that be it paid or free, if and whenever possible tools, languages and compilers should be open source. There may be some drawbacks about this but getting a good community support is way better to ease out cons.</p><p>Even from day zero at Fuzzy Cloud, I always wanted my fellow friends to make mark in open source, till date I can’t drive them by example. But not any more. We are open sourcing internal application.</p><p>You can find <a href="https://github.com/fuzzycloud/raahi">github link here</a>. It is Proof Of Concept; we did few days back to check out <a href="https://beta.ionicframework.com/docs/">Ionic 4</a>. I must say I am very impressed with results, we did create quite a good amount of screens covering every aspect of application. Requirement was to create application that can compare flight prices and hotel prices with single app. And within 2–3 weeks we are almost ready with UI part of it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xHwjQTslsAiIbWMFL75OVg.png" /><figcaption>Home Screen of Raahi App</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EvEYqLid_zcqvTO38iJP4Q.png" /><figcaption>Hotel Listing</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2QeAAwJzMxHfqFmtvBS5XA.png" /><figcaption>Flight listing</figcaption></figure><p>App is developed with Angular 6 but can be developed with any of your favorite framework. Yes, you heard me right, Ionic 4 is not attached with Angular anymore. But it did provide quite a good support for same. There are still many missing pieces to make native ready mobile apps but things are getting ready for better. Eagerly waiting for final release of Ionic 4.</p><p>Do have a look, and if you are thinking of having a word about it please don’t hesitate to <a href="https://fuzzycloud.in/contact">contact us</a>. Looking forward to it.</p><p>Until next time happy coding.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=997bfb466c71" width="1" height="1" alt=""><hr><p><a href="https://medium.com/fuzzycloud/first-step-in-open-source-world-997bfb466c71">First Step in Open Source World</a> was originally published in <a href="https://medium.com/fuzzycloud">FuzzyCloud</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Current state of Web Programming in F#]]></title>
            <link>https://medium.com/fuzzycloud/current-state-of-web-programming-in-f-cb5125e21dfd?source=rss-175514c70991------2</link>
            <guid isPermaLink="false">https://medium.com/p/cb5125e21dfd</guid>
            <category><![CDATA[fsharp]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[microsoft]]></category>
            <category><![CDATA[fable]]></category>
            <category><![CDATA[dotnet]]></category>
            <dc:creator><![CDATA[Kunjan Dalal]]></dc:creator>
            <pubDate>Tue, 24 Jul 2018 18:10:59 GMT</pubDate>
            <atom:updated>2018-07-25T17:34:43.152Z</atom:updated>
            <content:encoded><![CDATA[<p>There was a time nothing much happening in Web in regards of F#. It was treated as general purpose language for something you can use to do batch jobs, back end tasks.</p><p>As far as I remember I never felt issue in using F# library in C# or vice verse. Obviously there were always a problems to make things work and my initial F# questions on <a href="https://stackoverflow.com/search?q=user:859490+[f%23]">Stack Overflow</a> were mostly about inter-portability. But at the end of day in most of the cases it works without much of an issue. Today is different and we will going to talk about current state of F# for Web programming.</p><blockquote>Just to give you a gist, F# was never a Mathematician’s, Data Scientist’s only language but now it is showing that it is as general purpose as any other language if not more.</blockquote><h3>History Lessons</h3><p>I never wanted to include this section. But as written by George Santayana <strong><em>“Those who cannot remember the past are condemned to repeat it.”; </em></strong>I have put this section in article. This article is nothing but telling everyone that I am getting old now. It is bit of F# history and my history with F#.</p><h4>Intro to F#</h4><p>My introduction to F# is kind of because I wanted to learn how things work if I want to develop something related to finance. One thing led to another and I started learning F# using <strong>tryfsharp. </strong>Good old days of <strong>Silverlight</strong>. At that time Visual Studio not officially supporting F#. You need to install tools separately and install it for F# support. Forget about any other template. I don’t even remember there were much people using it. I distinctly remember Tomas, Evelina, Don and few more. As my most of the experience in Web, at that time also I wanted to use F# in Web Programming. I was using it by adding separate library project of F# in C# Web Project; it did work. But still something was missing. <em>A complete F# Web Project.</em></p><h4>F# on Heroku</h4><p>I was able to run F# web application (self host using <a href="https://servicestack.net/">ServiceStack</a> ) on <a href="https://www.heroku.com/">Heroku</a> back in days. It was listed under official guide for F# for web programming. My first bit of glory in F# world. I did spend couple of sleepless night to run that. And when it runs it was pure <strong><em>aha</em></strong> moment. I never got that much excited after that.</p><p>That was year 2013. You can still find the code <a href="https://github.com/kunjee17/ServiceStackHeroku">here</a>. It is old code but it works and served as a reference for a long time. Now, F# org site is going under a make over; I hope it stays in new site as well, as <em>historical monument</em>.</p><p>This was the time when one has to play with GUIDs if they want pure F# web application. I did added my bits to make this thing easier via creating templates for Web Application for <a href="https://marketplace.visualstudio.com/items?itemName=DanielMohl.FServiceStack">Visual Studio 2012 and 2013</a>. We do have templates for all the web framework available in Dot Net Full Framework. And yes there was no <em>dot net core . </em>Even though we still make things working on Azure with Kudu deployment.</p><p>Yes, I have been doing F# even before VSCode and Ionide , before paket and Fake was popular and way before Fable was there. Sometimes I do miss good old days of fixing Visual Studio and fsproj file.</p><h3>Always a Hero</h3><p>Even though things are not good enough, F# was always a hero. It works and it works way better.</p><p>Have a look at <a href="http://kunjan.in/2014/03/signalr-nancy-with-fsharp-hosted-on-azure/">this</a>, I was able to write beautiful <a href="http://nancyfx.org/">Nance</a> + <a href="https://www.asp.net/signalr">SignalR</a> code in F# and deploy it to Azure.</p><p>Same thing with <a href="http://kunjan.in/2014/06/signalr-servicestack-with-fsharp-hosted-on-azure/">ServiceStack</a> and SignalR. Code looks way better in this. But still people were not picking up as option.</p><p>Until this time around when effort to bring F# to web increased multi-fold.</p><h3>Web and F# — Right Now</h3><h4>Web Sharper</h4><p>Oldest F# <a href="https://websharper.com/">specific project</a> to write F# on client and server side. It comes with commercial support and it is super awesome, always has been. Let’s see simple example of it.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f5c920dadafed727585c5665c35db62b/href">https://medium.com/media/f5c920dadafed727585c5665c35db62b/href</a></iframe><h4>ServiceStack with F#</h4><p><a href="https://servicestack.net/">ServiceStack</a> is one of the most favorite web framework in early days to write API with F#. V3 is still available for free while V4 is now comes with commercial license. But this is one of the best framework I have worked with. Very much natural fit to functional language like F#. I can tell that after working with plenty of .Net web framework including WCF. It works with dotnet core, have plugins for almost everything and anything. It also has light weight ORM called <a href="https://github.com/ServiceStack/ServiceStack.OrmLite"><strong>OrmLite</strong></a><strong>. </strong>And that too; works with F# without any issue. It is my personal favorite for production projects. Let’s see the code.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/45b51a357214f596e1a95c8adf9267f7/href">https://medium.com/media/45b51a357214f596e1a95c8adf9267f7/href</a></iframe><h4>NancyFx with F#</h4><p>Whenever I want to write <em>sweet</em> code with C#, <a href="http://nancyfx.org/">NancyFx</a> was and is always and first choice. Things become <em>sweeter</em> when it comes to F#. Here is <em>Hello World</em> from NancyFx.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/166fae7569e550430edd64163c60c797/href">https://medium.com/media/166fae7569e550430edd64163c60c797/href</a></iframe><h4>ASP.Net MVC and Web API</h4><p>Asp.Net MVC and Web API worked with F# since their inception. And it worked without more of any issue because of F#’s great support of CLR and OOP side of it. At the max sometimes just to make tooling happy we need to keep C# project around as wrapper and push client related stuff like JS, CSS and Razor in C# project and other things can be moved to F# project. Dot Net Core and Dot Net Core project templates have made things even more easier for getting started with F#.</p><blockquote>I will skip those sample as F# community is kind having love — hate relationship with Microsoft Backed projects.</blockquote><p>Above all are C# web frameworks, which holds the fort till new F# specific framework comes on horizon.</p><h4>Suave</h4><p><a href="https://suave.io/">Suave</a> is first one in town. First F# specific framework, with its own server implementation; if my memory serves me right. Just like Nancy it was micro framework and one can get up and running in minimum possible code. Let’s have a look at code.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0049140ae69e51a69e2e96108a912461/href">https://medium.com/media/0049140ae69e51a69e2e96108a912461/href</a></iframe><h4>Giraffe</h4><p>When dot net core arrived. It was natural to have F# code that works on asp net core. But <a href="https://github.com/giraffe-fsharp/Giraffe">Giraffe</a> goes one step ahead with wrapper that makes natural to write F# code on top of asp net core.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/eccf2ce182415efb7bc69f43856edee6/href">https://medium.com/media/eccf2ce182415efb7bc69f43856edee6/href</a></iframe><h4>Freya</h4><p><a href="https://freya.io/">Freya</a> take different approach then above two as web framework. It is composition based concurrent framework. Here you start creating <em>machines </em>that takes care of executing requests. Have a look at below code. Understanding Freya in details is definitely out of scope for this article so may be next time.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/63ee8eb9884cfea77de994d663e8a387/href">https://medium.com/media/63ee8eb9884cfea77de994d663e8a387/href</a></iframe><h4>Saturn</h4><p>I have always missed RoR like web framework. Asp.net MVC was there but never gave quite a feel. After <a href="https://phoenixframework.org/">phoenix</a> came to Elixir, I wanted something for F# too. And then one fine night, I did see <a href="https://saturnframework.org/">Saturn</a> in sky. It is traditional MVC framework build on top of Giraffe. It comes with batteries (generators). Definitely a choice for some old school projects. Have a look at the code.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d19fde2d9c3be0461ea41f2c19931187/href">https://medium.com/media/d19fde2d9c3be0461ea41f2c19931187/href</a></iframe><h3>Fable</h3><blockquote>Fable is best thing happen to F# after F# it self.</blockquote><p>It is F# to JavaScript transpiler. Just like WebSharper but don’t bound you to specific library. Completely free and Open Source. No strings attached.</p><p>It will take more than a article to write about <a href="http://fable.io/">Fable</a>. Here is simple code in F# with respective generated JavaScript code.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4199f9f89fffb4894cc5efdb93ba20b5/href">https://medium.com/media/4199f9f89fffb4894cc5efdb93ba20b5/href</a></iframe><blockquote>You can always stared or watched <a href="https://github.com/kunjee17/awesome-fable">awesome-fable</a> list for any Fable related stuff.</blockquote><p>We did come a long way ahead, and I was lucky enough to be part of it. Currently F# works on Dot Net Full Framework and Dot Net Core. Visual Studio and Visual Studio for Mac supports it by default. VS Code, Atom, Vim and other editors supports via plugins. You can build not only back end but beautiful front end using F#.</p><h3>SAFE</h3><p>Every technology have their abbreviation stack. It is basically combination of different technologies. So, how can F# stays behind. SAFE is same thing, combination of different technology to achieve one single goal; <em>build a web application </em>using F# everywhere. Have a look at how to start with <a href="https://safe-stack.github.io/docs/intro/">SAFE stack and different option we have in SAFE template</a>.</p><h3>Fuzzy Cloud</h3><p>After working in different technology for front end, back end, mobile, IOT and Cloud etc. I finally decided branch out. I have been consulting on F# project for last year as day job. So, after closing that I am / we are ready for new assignment. At Fuzzy Cloud we are happy to assist you for F#, Type Script, Front End, Back End, Cloud related projects. Be it Green Field or Brown Field. Just drop a message and we can talk about it.</p><p>We are officially supporting <a href="https://safe-stack.github.io/docs/support/">SAFE stack,</a> along with two other wonderful consultancy.</p><p>Just drop a message at <a href="https://fuzzycloud.in/">FuzzyCloud</a> site or drop a mail at <strong><em>kunjan.dalal [at] fuzzycloud [dot] in .</em></strong> You can always follow me at <a href="https://twitter.com/kunjee/">twitter</a> or at medium <a href="https://medium.com/u/175514c70991">Kunjan Dalal</a>.</p><p>Love to here from you. Happy Coding.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cb5125e21dfd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/fuzzycloud/current-state-of-web-programming-in-f-cb5125e21dfd">Current state of Web Programming in F#</a> was originally published in <a href="https://medium.com/fuzzycloud">FuzzyCloud</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Epic Mahabharata]]></title>
            <link>https://medium.com/fuzzycloud/epic-adventure-using-f-17ac32fb539d?source=rss-175514c70991------2</link>
            <guid isPermaLink="false">https://medium.com/p/17ac32fb539d</guid>
            <category><![CDATA[fsharp]]></category>
            <category><![CDATA[naturallanguageprocessing]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[nlp]]></category>
            <dc:creator><![CDATA[Kunjan Dalal]]></dc:creator>
            <pubDate>Mon, 17 Jul 2017 08:05:41 GMT</pubDate>
            <atom:updated>2017-07-17T08:58:10.097Z</atom:updated>
            <content:encoded><![CDATA[<p>Many people heard of it but few lucky get chance to read it. Or even fewer know thing in detail about it. As per global source of truth <a href="https://en.wikipedia.org/wiki/Mahabharata">Wikipedia</a> It is “longest <em>poem</em> ever written” in human history. It has around 1.8 million words in total. It is roughly 10 times the length of Iliad and Odyseey combined.</p><p>So, what is there in it? We can say everything. Love stories to stories about war to stories about revenge. Philosophy to military tactics. Policies on tax, rules of espionage, watch over enemies and how to find the most able people and make them ministers. Theory karma which is part of Gita, which is part of Mahabharata. Yog (not to confuse with physical Yoga people do) explained in Mahabharata and so do life, death and life after death. A tale where God not solve problems for you but guide you to solution, enable you face the problems. A story where God is not forefather but a friend who is always there for you.</p><p>A story where even God accept curse with due respect given by a mother. A story where story teller him self not only narrate the story but also integral part of it. A tale stays same but meaning of it keep changing to every reader. A story which has spiral of different small stories consisting further different stories. A infinite source of knowledge, wisdom and fun.</p><p>I can go on and on; but let’s come back to F#.</p><h3>Natural Language Processing</h3><p>Understanding the human language, words and sentiments always is exciting. Specially using your favourite programming language. Processing old epic books is always fun, as it not only tells about history / mythology but take back to your heritage and culture. So, This part is from my Mentorship program (more details at the end). An article born from <em>home work</em> I got recently.</p><p>I don’t know the complexity level of it. It totally depends on reader. But results are indeed too good.</p><h3>Let the fun Begin</h3><p>First thing is to find out source in English (As it is easy to compare with data sets.). <a href="https://www.gutenberg.org/">Project Gutenberg</a> is good place to find some license free text. If you like to do code with this article then get your favourite book from site or you can always download if <a href="https://github.com/kunjee17/mahabharata/tree/master/txt_data">from my project</a>.</p><p>That is whole Mahabharata in four text files. So, I did some manual labour to separate the books from it. You can find them <a href="https://github.com/kunjee17/mahabharata/tree/master/books">here</a>. There are total 18 books (sub books are not separated).</p><p>Let’s start with simple File IO.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/09258be6aa70eaebaeba2d15021e9ff8/href">https://medium.com/media/09258be6aa70eaebaeba2d15021e9ff8/href</a></iframe><p>That’s quite a lot terms for small piece of code. Now, we are one step behind to become data scientist.</p><p>Let’s find the unique terms and frequency of them.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f46d043cf073932bf1517133ace40e79/href">https://medium.com/media/f46d043cf073932bf1517133ace40e79/href</a></iframe><p>see another line and we are done. We are now official data scientists.</p><p>Go ahead and try for other books also. If you are feeling lazy you can check out <a href="http://kunjan.in/mahabharata/book-details">results here</a> or see below.</p><p>For Terms:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Sv_98JOcD9wNe5OThUGANw.png" /></figure><p>For Unique Terms:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q1e4QgHN6SaC-zvPYxEzfw.png" /></figure><p>For Unique Terms per Terms</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QXYQUILlRG_L_FNOd2ijjg.png" /></figure><p>What next? Let’s do the sentiment analysis of all this books and compare them with each others.</p><h3>Sentiment Analysis</h3><h3>Whaaat?</h3><p>Analysis done to find out the tone of given text. Here we are having books. Basically using this we can find out that books is more joyful to read or tilted towards sadness. How many surprise elements book do have. It is useful to understand conversation, if it is more towards positive end or negative end.</p><h3>Coding bits</h3><p>It will make more sense while comparing.</p><p>As everything else in F# here we also start with type and start putting things in it. Let’s call it Book type. Because why not.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7eb4271b1195f23506340c26dcb77585/href">https://medium.com/media/7eb4271b1195f23506340c26dcb77585/href</a></iframe><p>Now, for a second keep this aside. We need more details or here data to find out sentiments. Data with which we can compare our book terms. So, we will be using two data sets. For emotions we will be using <a href="http://saifmohammad.com/WebPages/NRC-Emotion-Lexicon.htm">this</a> and for positive / negative ratings we will be using <a href="http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6010">this</a>.</p><p>Here are what they look like.</p><p>Emotion Lexicon:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/944/1*fDgo5YQUjCXkYWPD-fAVyg.png" /></figure><p>And Word with Ratings:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/194/1*zAidLws3w-kGsQiKWH6KnA.png" /></figure><p>Traditional way to pull data out of CSV file is for -&gt; for -&gt; for loops. But we are in F# land, we will be using csv Type Provider. Let&#39;s pull data out of CSV and shape it in types.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0167f095e8109e7a3d056bd054b07c85/href">https://medium.com/media/0167f095e8109e7a3d056bd054b07c85/href</a></iframe><p>Here is the thing about this data. Emotion column is also specifying the emotion, not always but they are there. So, we need them too. That is reason for that extra calcution we are doing. Here for every emotion found we are adding 1 else it is 0.</p><p>If you can see I am not comparing with string but with concrete F# term. It is because in data we are having “anticip” for “anticipation”. Now, in future if we add another data to this collection and they have “anticipation” then it will add extra case for same result. So, it would be better to encapsulate them away. And clean way to do that using Active patterns.</p><p>Here is missing piece of code.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9286767dce74086fde44f4adf1ef9b07/href">https://medium.com/media/9286767dce74086fde44f4adf1ef9b07/href</a></iframe><p>As we are having more than 7 cases, we will be using partial Active Patterns and join them in match statement.</p><p>Same can be done for word with Positive and Negative ratings.</p><p>Here is code for same.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/66453c419c9bb4b14ebc4e274a03594c/href">https://medium.com/media/66453c419c9bb4b14ebc4e274a03594c/href</a></iframe><p>Great. Now stage is set to convert books made of terms to books made of numbers. Let’s create for one book and then we will loop it for our array.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/61c09e598b215052be1fbdd06532dda8/href">https://medium.com/media/61c09e598b215052be1fbdd06532dda8/href</a></iframe><p>Single function and it’s done. That’s it. What we are doing in that? Creating our Book type.</p><p>Terms and Unique Terms were extracted away.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/baf543d2bc58d91259d970a4a88934cf/href">https://medium.com/media/baf543d2bc58d91259d970a4a88934cf/href</a></iframe><p>Little bit complicated looking part is where we are trying to find Sentiment Index for book. So, first step is clean up the word set. That is the reason we are using unique terms. All terms are not present in data set we are having. So, there is need to take common terms. Again no more loops and conditions. They are two sets we need common terms so just intersect it. One line without performance over head. Now find out Sentiment details for that word and to get for book just fold it and do the sum of it. Done.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3493404072b7aaa2a6114e2b12c93236/href">https://medium.com/media/3493404072b7aaa2a6114e2b12c93236/href</a></iframe><p>So, we are having all the data in memory. In our case in FSI / REPL.</p><p>As we are official data scientist we required that we see things in Graph format. So, first let’s conver things to JSON and write to disk so we can use it.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/dede4ac1243f76e1bb48f7209a5aa7b0/href">https://medium.com/media/dede4ac1243f76e1bb48f7209a5aa7b0/href</a></iframe><p>Here I am using <a href="https://github.com/Microsoft/fsharplu/wiki/fsharplu.json">Fsharplu.Json</a>, do check their <a href="https://blogs.msdn.microsoft.com/dotnet/2016/12/13/project-springfield-a-cloud-service-built-entirely-in-f/">project story</a>.</p><p>Now, once JSON is ready we can easily use to show in graph using any graph library.</p><blockquote><em>Here I did little cheating and wrote some dirty JavaScript. A good practise would be to write code in </em><a href="http://fable.io/"><em>Fable</em></a><em>. So, I will not show code of JavaScript part.</em></blockquote><p>You can find book wise graphs <a href="http://kunjan.in/mahabharata/bookwise-sentiment">here</a> and transformed analysis <a href="http://kunjan.in/mahabharata/sentiment-wise">here</a> which is sentiment wise. Or Check out few of them below.</p><p>Book Wise:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8S9ywors7z7ROyaU2nXolA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M9lSFK5S0QNXoKg8YSifPg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TsZujl7ch2g5EDBxw6u0Jg.png" /></figure><p>Sentiment Wise:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mnHk1HZexBNhEuw_oNWGaw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2hFpEeoroGb2LWwSKHOPxg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jIH2xJhwe0Cha8aNCdBiiQ.png" /></figure><p>Same can be done for positive and negative word set. (DYI for you.)</p><h3>Reading the Graphs &amp; Experience</h3><p>One thing needed to be understand here. Data set are created by human, code is written by human and code is executed by dumb computer. So, there is and always will be little bit manual tweaking. As language is topic with perception. One need to understand culture / history of those words from where they are coming. Graphs should be read in that context only. Let me put an example here.</p><p>Check out word frequency graph <a href="http://kunjan.in/mahabharata/word-frequency">here</a>. Pick any graph. Here I am taking three graphs to compare.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nbPrIuZI2R6dFGnYe9VN8g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jfR270RN4o0tpDRn07yQZw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sTHq4zfHYfdcb7ZPH2Ex5g.png" /></figure><p>“Great” would be always first. And “Fire” will come in last five always. In normal western literature “Great” word used as adverb for person or thing. But in Indian or Mahabharata context they use it to address someone. Like Hey, Great worrier Arjuna. A poetic way of saying things. Looks good but also make word totally useless in context of understanding phrase. This issue can be solved with Inverse Document Frequency but again it is an extra effort. Same goes for word &quot;Fire&quot;. It is having negative value in normal context but in this specific context it is not that negative. Fire God and Fire it self (yagna) are positive. It is very much contextual.</p><p>But again generating graph is much more <em>data sciencey</em> to explain.</p><h3>What’s Next</h3><p>Next step would be doing more detailed analysis of this Epic. Compare number / analysis with original context of books. Try to push number as near as possible to words. And probably extract some good NLP library from it.</p><p>All books are divided in sub-books <a href="http://kunjan.in/mahabharata/index">telling different stories</a>. Wiki links are added in Table list. If you are interested then check them out.</p><p><a href="https://github.com/kunjee17/mahabharata/blob/master/Mahabharata/Lesson1.fsx">Complete script file for this article is available over github</a>.</p><p>Download your favourite books and have fun with graphs.</p><h3>Thanks Note</h3><p>Special Thanks to people without whom this project may not exist.</p><p><a href="http://rachelree.se/">Rachel Reese</a> — For arranging this season of <a href="http://fsharp.org/mentorship/">Mentorship program</a>.</p><blockquote><em>Mentorship program : In simple words. It is a program where Mentor and Mentee are tagged with each other. And they have hour / week to teach / learn some topic specific to F#. As highly technical people things looks little old school but the effect that flesh and blood can create nothing else can. No books or no recorded videos. 45–60 minutes can cover more than one can cover in month or two using deal material. It is always good to have someone there alive in front of you whom you can ask questions. Again that is all my preference and what I like about this program.</em></blockquote><p><a href="http://www.roundcrisis.com/">Andrea</a> — For last season of Mentorship program.</p><p><strong><em>My lovely fiancée for not only allowing me but also encouraging me to give extra time to this.</em></strong></p><p><a href="https://twitter.com/tirthpandya">Saheb</a> to be my phone a friend for any kind of machine learning and data science queries.</p><p><a href="http://devdutt.com/">Devdutt</a>, my current favourite mythologist. Author of two of my favourite books <a href="http://devdutt.com/books/jaya-3.html">Jaya</a> and <a href="http://devdutt.com/books/my-gita.html">My Gita</a> in this genre</p><h3>Note to my Mentor</h3><p>Words can’t explain how much grateful I am to have <a href="http://evelinag.com/">Evelina Gabasova</a> as my mentor or may be guru would make much more sense in current context. After a long time I can have kid’s curiosity and innocence to ask anything and everything to her. And she is always there with answer and ever smiling face. Always pushing extra mile to beat the time zone differences.</p><p>In Mahabharata, Krishna narrate Gita to Arjuna in middle of war field; empowering him with eternal knowledge. Just like that,</p><blockquote><em>Hey, </em><strong><em>Great Evelina</em></strong><em>, I am no Arjuna but you are always been my Krishne. Guiding my way in the flood of data. It is always good to have you around. Be as mentor and as friend. Please be there always.</em></blockquote><h3>Closing</h3><p>I like to close with few of my favourite picture describing war moments of Mahabharata</p><p><strong>Krishna narrating Gita to Arjuna</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kgeQRjWZEOk_fA9u3__YfA.jpeg" /></figure><p><strong>Krishna driving Arjuna in war field</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p-mPedyIktbhQ_vlvqPj4Q.jpeg" /></figure><p><strong>Krishna, Arjuna and Bhisma three great warriors but helpless in front of time (situation)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P1wPcLSx3uejHeujdl5mSg.jpeg" /></figure><p><em>Originally published at </em><a href="http://kunjan.in/2016/12/epic-adventure-using-fsharp/"><em>kunjan.in</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=17ac32fb539d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/fuzzycloud/epic-adventure-using-f-17ac32fb539d">Epic Mahabharata</a> was originally published in <a href="https://medium.com/fuzzycloud">FuzzyCloud</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>