Also, here is the list of all videos from NDC Oslo 2017:
I find it useful to have assert
statements in my code. It has several benefits:
- Self documents code expectations
- Establishes boundary checks between component
- Helps to pinpoint problems by failing fast, especially when you just started dealing with a new library
- Here is a good summary on using assertions.
In a dream world all this can be addressed by sophisticated type system but we all know it’s not going to happen any time soon.
This blog created for F# Advent 2016 (English)
Full source code can be found here
- 2016-12-10
- New performance test - Anthony Lloyd (@AnthonyLloyd) suggested that I compare against Prime.Vmap.
This article is an entry in the 2019 F# Advent Calendar in English. Thanks to Sergey Tihon for organizing it, as always!
Note: This belongs on my blog, but some things are broken there right now, probably due to changes to GitHub Pages in recent years, so I'm publishing this here for now to at least get a reliable output.
The F# community, while small compared to those of many other languages, is known to be exceedingly open and helpful to beginners. I experienced this myself when I started learning the language nearly six years ago, and people (especially the F# MVPs) were always quick and eager to answer my newbie questions on Twitter, or wrote extensive answers on Stack Overflow or Code Review. Havi
import java.lang.reflect.* | |
import kotlin.reflect.KClass | |
import kotlin.reflect.KType | |
import kotlin.reflect.KTypeProjection | |
import kotlin.reflect.KVariance | |
import kotlin.reflect.full.createType | |
// --- Interface --- | |
inline fun <reified T : Any> getKType(): KType = |
I got inspired to answer the questions posed to F# experts on "Why F#?". I have no claims to be an F# expert but I thought the questions were interesting.
I believe I started to look at F# around 2008. I am a language-curious person and was at the time working as a .NET developer so I naturally was excited when discovering F#.
How long did it take before you could code real world apps as much or more productively as in C#?
Welcome to my blog post for #FsAdvent 2016.
If you're using a relational database, as your application grows in size, at some point you may find yourself looking for an SQL parser. This can give you lots of leverage, for example allowing you to:
- Do permission checks on queries before executing them
- Rewrite incorrect or inefficient queries
A few years ago when I read the presentation motivating the design behind Nessos Streams I was struck by the beauty of simplistic push streams.
type PushStream<'T> = ('T -> bool) -> bool
LINQ (in .NET) is a pull stream, ie we pull values out of the stream by calling MoveNext
+ Current
. One of the problems with pull streams is the constant checking "Are we done?" at each level in the stream.
Thanks to Sergey Tihon for running F# Weekly and F# Advent.
Thanks to manofstick for trying out the code and coming with invaluable feedback. Cistern.ValueLinq is very impressive.
There were many interesting improvements in F#6 but one in particular caught my eye, the attribute InlineIfLambda
.