tag:blogger.com,1999:blog-4100091590694628472.comments2023-05-29T02:47:58.176-04:00Apollo 13 - Tao Liu's blogTaohttp://www.blogger.com/profile/10181624105046973883noreply@blogger.comBlogger61125tag:blogger.com,1999:blog-4100091590694628472.post-85566981398611622502020-05-26T14:57:42.614-04:002020-05-26T14:57:42.614-04:00This has now been resolved. The message is current...This has now been resolved. The message is currently only shown with Explicit layout, see relevant issue (MS Connect has been retired): https://github.com/fsharp/fslang-suggestions/issues/596Abel Braaksmahttps://www.blogger.com/profile/06104291291298841008noreply@blogger.comtag:blogger.com,1999:blog-4100091590694628472.post-68664479744019579452020-03-31T15:24:51.744-04:002020-03-31T15:24:51.744-04:00hi, I am hoping to write a blog post about an Azur...hi, I am hoping to write a blog post about an Azure Linux F# VS Code setup for Exercism or getting started with Bolero. Are you willing to help me out in some way? Would you be willing to do a review of a draft and share your opinion? I'm still kind of new to F#, Azure, and VS Code. I followed you on twitter in case you want to DM there and I'm adding a link to my blog if you prefer to comment on blogger.Jonathan Limhttps://watchingcertainpixels.blogspot.com/2020/03/azure-linux-f-vs-code-development-setup.htmlnoreply@blogger.comtag:blogger.com,1999:blog-4100091590694628472.post-84827553375860778062018-09-28T19:21:26.587-04:002018-09-28T19:21:26.587-04:00Great posting, Eowind. Thanks for sharing the expe...Great posting, Eowind. Thanks for sharing the experience. My project is an internal project and I do not have localization team. I want my dev’s to understand the logic before give translation is another thought. Localization outsourcing can be problematic if logic is not understood. <br /><br />I find my dev’s likes doing some native language stuff as a break. I guess different team has different preference. :)<br /><br />Great feedback and thanks for sharing this to me!Taohttps://www.blogger.com/profile/10181624105046973883noreply@blogger.comtag:blogger.com,1999:blog-4100091590694628472.post-42446080799671422242018-09-28T16:54:25.578-04:002018-09-28T16:54:25.578-04:00Hi there!
Really interesting post!
I ran a perform...Hi there!<br />Really interesting post!<br />I ran a performance comparison of this versus my team way of doing localization with Dictionary lookups<br />http://dreamstatecoding.blogspot.com/2018/09/fsharp-enum-tostring-vs-c-enum.html<br />This gives us also the ability to change localizations at runtime and outsource them without doing code changesEowindhttps://www.blogger.com/profile/07393994040841014328noreply@blogger.comtag:blogger.com,1999:blog-4100091590694628472.post-20656320236413188462017-12-01T15:03:45.470-05:002017-12-01T15:03:45.470-05:00I realize this is old; however, I just wanted to p...I realize this is old; however, I just wanted to point out that piping and function composition are different things used in different situations. When using function composition in its niche, it can help you write code with a nice pipe-like flow that is faster than code which actually uses piping.<br /><br />Function composition allows you to mix logic that runs right now with logic that runs later. That means you can build an efficient, streamlined function without much branching to be used in your tight loops. You can do that without function composition, but it would not have the same nice, unbroken forward flow that composition and piping have. Consider the following examples, and assume we will know classifications "a", "b", and "c" ahead of time for a very large number of values "v". Pardon the stripping of whitespace.<br /><br />type Cases = <br /> | Case1<br /> | Case2<br /> | Case3<br /><br />// Pure piping - nice, unbroken forward flow + sub-optimal execution<br />let version1 a b c v =<br /> match a with<br /> | Case1 -> v * 2.0<br /> | Case2 -> v / 2.0<br /> | Case3 -> v + 2.0<br /> |> fun v -><br /> match b with<br /> | Case1 -> v + 12.0<br /> | Case2 -> v - 9.55<br /> | Case3 -> v * 4.3<br /> |> fun v -><br /> match c with<br /> | Case1 -> v - 10.0<br /> | Case2 -> v - 7.5<br /> | Case3 -> v + 1.5<br /><br />// Composition - nice, unbroken forward flow + streamlined result function<br />let version2 a b c =<br /> match a with<br /> | Case1 -> fun v -> v * 2.0<br /> | Case2 -> fun v -> v / 2.0<br /> | Case3 -> fun v -> v + 2.0<br /> >> match b with<br /> | Case1 -> fun v -> v + 12.0<br /> | Case2 -> fun v -> v - 9.55<br /> | Case3 -> fun v -> v * 4.3<br /> >> match c with<br /> | Case1 -> fun v -> v - 10.0<br /> | Case2 -> fun v -> v - 7.5<br /> | Case3 -> fun v -> v + 1.5<br /><br />// Declaring functions - broken flow + streamlined result function<br />let version3 a b c =<br /> let f1 = <br /> match a with<br /> | Case1 -> fun v -> v * 2.0<br /> | Case2 -> fun v -> v / 2.0<br /> | Case3 -> fun v -> v + 2.0<br /> let f2 =<br /> match b with<br /> | Case1 -> fun v -> v + 12.0<br /> | Case2 -> fun v -> v - 9.55<br /> | Case3 -> fun v -> v * 4.3<br /> let f3 = <br /> match c with<br /> | Case1 -> fun v -> v - 10.0<br /> | Case2 -> fun v -> v - 7.5<br /> | Case3 -> fun v -> v + 1.5<br /> fun v -> v |> f1 |> f2 |> f3<br /><br />Version 1 maintains a nice, unbroken forward flow, but it is inefficient because it contains branching that will be processed within our tight loop on a large set of data.<br /><br />Version 2 maintains a nice, unbroken forward flow, and it is efficient because it returns a function that contains no branching whatsoever. That function can be used in a tight loop with high efficiency.<br /><br />Version 3 does the same thing as version 2, so it is efficient; however, the flow of execution jumps around the code. It is not as easy to read and follow as version 2.<br /><br />Version 2 gives us the best of both worlds in this particular scenario.Anonymous Developerhttps://www.blogger.com/profile/05380592608437122004noreply@blogger.comtag:blogger.com,1999:blog-4100091590694628472.post-82476016125404636602014-07-15T21:11:40.722-04:002014-07-15T21:11:40.722-04:00Did not realize that it can be done in mono develo...Did not realize that it can be done in mono development. Let me google it and find the format. :)Taohttps://www.blogger.com/profile/10181624105046973883noreply@blogger.comtag:blogger.com,1999:blog-4100091590694628472.post-97514042482925582014-07-15T14:19:54.057-04:002014-07-15T14:19:54.057-04:00The XML code for Visual Studio snippets is quite s...The XML code for Visual Studio snippets is quite similar to that of MonoDevelop. It shouldn't be hard to write a simple program to convert between the two.<br /><br />Thank you very much!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4100091590694628472.post-79936864313131879202014-07-13T16:47:07.463-04:002014-07-13T16:47:07.463-04:00I do not think these code snippets can be adopted ...I do not think these code snippets can be adopted by other editor, but feel free to use these snippets. You can also updated them as you wish. Taohttps://www.blogger.com/profile/10181624105046973883noreply@blogger.comtag:blogger.com,1999:blog-4100091590694628472.post-32261454137735463012014-07-13T16:30:51.298-04:002014-07-13T16:30:51.298-04:00Can the snippets you created for Visual Studio be ...Can the snippets you created for Visual Studio be adapted and distributed with another editor? What are the licensing terms of these snippets? Thanks!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4100091590694628472.post-47179993293989478942014-04-30T14:41:16.304-04:002014-04-30T14:41:16.304-04:00Thanks for the great blog. Is there a reason you w...Thanks for the great blog. Is there a reason you would not want to implement the list grouping reversion using Seq.take, .skip and .toList?<br /><br />Thanks.<br /><br /><br />let rec splitList s i = <br /> if List.length s < i then <br /> [List.rev s]<br /> else <br /> let a = Seq.take i s |> Seq.toList<br /> let b = Seq.skip i s |> Seq.toList<br /> [List.rev a] @ (splitList b i)<br /><br />splitList l 3<br /><br />val splitList : s:'a list -> i:int -> 'a list list<br />val it : int list list = [[3; 2; 1]; [6; 5; 4]; [9; 8; 7]; [11; 10]]Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4100091590694628472.post-91805361567051953062014-04-30T14:39:39.473-04:002014-04-30T14:39:39.473-04:00Thanks for the great blog. Is there a reason you w...Thanks for the great blog. Is there a reason you would not want to implement the list grouping reversion using Seq.take, .skip and .toList?<br /><br />Thanks.<br /><br /><br />let rec splitList s i = <br /> if List.length s < i then <br /> [List.rev s]<br /> else <br /> let a = Seq.take i s |> Seq.toList<br /> let b = Seq.skip i s |> Seq.toList<br /> [List.rev a] @ (splitList b i)<br /><br />splitList l 3Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4100091590694628472.post-38456208485394665262014-04-07T11:39:55.831-04:002014-04-07T11:39:55.831-04:00Hi,
thanks for sharing this. I modified your gene...Hi,<br /><br />thanks for sharing this. I modified your genetic algorithm here: https://github.com/fbmnds/fs-random-snippets/blob/master/GeneticAlgorithm.fsx<br /><br />/fb@fbmndshttps://twitter.com/fbmndsnoreply@blogger.comtag:blogger.com,1999:blog-4100091590694628472.post-65144730035121247172014-03-12T16:53:08.914-04:002014-03-12T16:53:08.914-04:00Hi Tao, I just tried the sample and it worked fine...Hi Tao, I just tried the sample and it worked fine. However, when running it with another document than the provided AA.docx it doesn't work, any ideas? More info: http://stackoverflow.com/questions/22363524/cant-get-the-f-word-typeprovider-to-work-for-custom-word-documentschribbenhttps://www.blogger.com/profile/03515450495397986928noreply@blogger.comtag:blogger.com,1999:blog-4100091590694628472.post-55942657646091597242013-11-14T20:32:07.221-05:002013-11-14T20:32:07.221-05:00I get error "unmatched ( " Visual studio...I get error "unmatched ( " Visual studio complains at the first open parenthesis? Then in interactive interpreter it ask for ) closing parenthesis expected. So is not recognizing the Greek-Sigma ment to be an operation. F# code was: let inline ( ∑ ) xs = xs |> Seq.sum <br />let myList = [1..6] <br /> ∑ myList<br />Musahttps://www.blogger.com/profile/11172548314115036838noreply@blogger.comtag:blogger.com,1999:blog-4100091590694628472.post-16283557060471060792013-09-04T12:20:36.246-04:002013-09-04T12:20:36.246-04:00it is ultimate the old aggregation vs. inheritance...it is ultimate the old aggregation vs. inheritance argument, right?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4100091590694628472.post-13135006224441521872013-07-24T09:44:54.706-04:002013-07-24T09:44:54.706-04:00Thanks apollo for the code, really useful ;)Thanks apollo for the code, really useful ;)apollohttp://www.exclusivecosmeticsgroup.pl/noreply@blogger.comtag:blogger.com,1999:blog-4100091590694628472.post-79918025171325035102013-04-17T13:57:25.978-04:002013-04-17T13:57:25.978-04:00Conferences in the autumn:
Strangeloop - Septembe...Conferences in the autumn:<br /><br /><a href="https://thestrangeloop.com/" rel="nofollow">Strangeloop</a> - September 18..20, St Louis<br /><a href="http://icfpconference.org/icfp2013/" rel="nofollow">ICFP</a> - September 25..27, Boston<br /><a href="http://gotocon.com/aarhus-2013/" rel="nofollow">GOTO Aarhus</a> - September 30..October 2, Denmark<br /><a href="http://gotocon.com/berlin-2013/" rel="nofollow">GOTO Berlin</a> - October 17..18, Germany<br /><a href="http://oredev.org/" rel="nofollow">Øredev</a> - November 4..8, SwedenPhilhttps://www.blogger.com/profile/00901041894509497496noreply@blogger.comtag:blogger.com,1999:blog-4100091590694628472.post-44874081825747506932013-03-29T10:24:16.259-04:002013-03-29T10:24:16.259-04:00You should checkout FunScript.. It allows you to w...You should checkout FunScript.. It allows you to write in F# and use typescript definition files to call out to JavaScript modules..Anthony Tarlanohttps://www.blogger.com/profile/00089541345794484144noreply@blogger.comtag:blogger.com,1999:blog-4100091590694628472.post-42442280364131182482013-03-20T11:19:18.158-04:002013-03-20T11:19:18.158-04:00what databinding options are there available in HT...what databinding options are there available in HTML5 ?Nicolashttps://www.blogger.com/profile/03434148024010872285noreply@blogger.comtag:blogger.com,1999:blog-4100091590694628472.post-70175593648329255402013-01-08T08:57:06.193-05:002013-01-08T08:57:06.193-05:00Thanks, this helped me troubleshoot a runtime issu...Thanks, this helped me troubleshoot a runtime issue with FsCheck.Phillip Trelfordhttp://trelford.com/blognoreply@blogger.comtag:blogger.com,1999:blog-4100091590694628472.post-49712426577695712912013-01-07T15:30:26.391-05:002013-01-07T15:30:26.391-05:00Is there any way to get rid of the extra spaces on...Is there any way to get rid of the extra spaces on either side of the replaced text? It looks odd to have "fun delta" show up with three spaces between λ and Δ.<br /><br />let λ Δ = fooB.C.https://www.blogger.com/profile/04048881524085910509noreply@blogger.comtag:blogger.com,1999:blog-4100091590694628472.post-89378589553631551342012-12-27T21:46:11.321-05:002012-12-27T21:46:11.321-05:00Thanks! This just helped me. :)Thanks! This just helped me. :)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4100091590694628472.post-26766292566289423832012-12-22T04:36:12.556-05:002012-12-22T04:36:12.556-05:00Good list, here's a few more I've seen adv...Good list, here's a few more I've seen advertised recently with Functional Programming tracks or dedicated entirely to FP or F#:<br /><br /><a href="http://www.ndcoslo.com/" rel="nofollow">NDC Oslo</a> - June 12..14 see <a href="http://www.ndcoslo.com/Article/News/CFP2013" rel="nofollow">CFP</a> <br /><a href="http://lambdajam.com/" rel="nofollow">Lambda Jam</a> - May 15..17 Brisbane & July 8..10 Chicago<br /><a href="http://skillsmatter.com/event/scala/progressive-f-tutorials-2013" rel="nofollow">Progressive F# Tutorials London</a> - Oct 31..Nov 1 2013Phillip Trelfordhttp://trelford.com/blognoreply@blogger.comtag:blogger.com,1999:blog-4100091590694628472.post-34585447536059576602012-12-06T08:33:18.573-05:002012-12-06T08:33:18.573-05:00This problem is fixed in Visual Studio 2012 Update...This problem is fixed in Visual Studio 2012 Update 1. Recompile your portable profile components after installing.<br /><br />However, a related issue remains for any code that uses an F# "exception" declaration, e.g.<br /><br /> exception BadThing of string<br /><br />This is due to a bug in the F# compiler (which was not updated in VS Update 1, though FSharp.Core.dll was updated). For example, the F# Power Pack code for FsLex/FsYacc uses exception declarations of this kind.<br /><br />The simplest workaround is to replace these definitions by a class definition, e.g.<br /><br />type BadThingException(message:string) = <br /> inherit System.Exception(message)<br /><br />And replace places that catch the exception <br /> try ... with BadThing(msg) -> ...<br /><br />should be replaced by <br /><br /> try ... <br /> with :? BadThingException as e -> <br /> let msg = e.Message <br /> ...<br /><br />After making this change systematically you should be able to proceed.Don Symehttp://blogs.msdn.com/b/dsymenoreply@blogger.comtag:blogger.com,1999:blog-4100091590694628472.post-57857092184471486422012-11-28T16:56:19.553-05:002012-11-28T16:56:19.553-05:00Hey Tao!
Checkout the BKTree implementation in FS...Hey Tao!<br /><br />Checkout the BKTree implementation in FSharpx https://github.com/fsharp/fsharpx/blob/master/src/FSharpx.Core/DataStructures/BKTree.fs the Haskell implementation http://hackage.haskell.org/packages/archive/bktrees/0.2.1/doc/html/src/Data-Set-BKTree.html explicitly documents Levenshtein distance. Sadly our F# BKTree is in need of better documentation for those of us in too much of a hurry to do a literature search.jackfoxyhttps://www.blogger.com/profile/04700282308838786815noreply@blogger.com