Kevin Gathukukevgathuku.dev·Sep 17, 2024Building our own zsh_stats command line appIn the previous post we saw how zsh has a nice inbuilt function zsh_stats to get a summarized list of the most commonly used terminal commands. This got me wondering, can we replicate this result ourselves? 🤔 Let’s find out. Language of Choice We wi...Discuss·45 readszsh
Tomohisa Takaokatomohisa.hashnode.dev·Aug 3, 2024Reflections on Using C# Reflection on F# Code.NET, the framework on which C# runs, supports multiple languages, one of which is F#, a functional programming language. We developed Sekiban, an event sourcing CQRS framework, using C#. I have been trying various things for a while, thinking that F...Discuss·146 reads#fsharp
Danyl Novhorodovdanyl.hashnode.dev·Jun 5, 2024Why F# Outshines C# for Startups and Scale-upsAs a CTO, choosing the right programming language for your business can significantly impact your bottom line. If you are looking into Microsoft stack, .NET comes as a way-to-go solution. And it is a no-brainer, it is a rich platform with batteries i...Discuss·11 likes·263 readsF#
Jindřich Ivánekjindraivanek.hashnode.dev·May 30, 2024F# tips weekly #16: Asynchronous memoizeCaching the results of asynchronous functions is a common task. Can we use memoize for it? Let's find out! Memoized Task Surprisingly, task works great with the basic memoize function from Tip #14. If we use a function that returns Task<_>, we get a ...Discuss·1 like·309 readsF# tips weeklyF#
Jindřich Ivánekjindraivanek.hashnode.dev·May 16, 2024Problem with NaN equalityI recently encountered a bug that was caused by a special equality definition on a NaN value. NaN means not-a-number, and it's special floating-point number value, representing result of impossible operation. This issue shows how NaN can introduce ha...Discuss·11 likes·459 reads#fsharp
Jindřich Ivánekjindraivanek.hashnode.dev·May 9, 2024F# tips weekly #15: Recursive memoizeMemoization of a recursive function can be often useful, but has some pitfalls compared to memoization of a simple function. Let's take a detailed look. Standard Memoization Let's use the classical example of computing the n-th item in the Fibonacci ...Discuss·1 like·347 readsF# tips weekly#fsharp
Jindřich Ivánekjindraivanek.hashnode.dev·Apr 25, 2024F# tips weekly #14: MemoizeThe memoize function is my favorite method for solving performance problems. Its significant advantage is that it requires only a slight change in code, which doesn't increase the complexity of the original code. Despite its short implementation, it ...Discuss·1 like·508 readsF# tips weeklyF#
Jindřich Ivánekjindraivanek.hashnode.dev·Apr 18, 2024F# tips weekly #13: OperatorsUsing operators like =, +, && or |> is daily bread of writing F#. Let's look at how they work under the hood. Operator is a function Every operator can be used as standard function by enclosing it in parentheses, for example (+) 1 2 is the same as 1...Discuss·1 like·339 readsF# tips weeklyF#
Fxplorerblog.fxplorer.net·Apr 17, 2024Single file minimum F# Avalonia UI app with notes.After some experimentation, a minimum Avalonia app that can be ran from an .fsx file or a Polyglot Notebook. The Polyglot Notebook can be found at: https://github.com/Fxplorer/Fxplorer_www/blob/main/docs/MinimumFsharpAvaloniaApp.ipynb The .fsx script...Discuss·30 readsXploring Avalonia UI in F##fsharp
Jindřich Ivánekjindraivanek.hashnode.dev·Apr 4, 2024F# tips weekly #12: Recursive active patterns - parser exampleThis week, this article will be a little different. I want to show you that we can use recursive Active Pattern to create an expression parser. While I wouldn't recommend using this instead of a library such as FParsec for parsing, I think it's very ...Discuss·1 like·407 readsF# tips weeklyF#