F# Casts (@FSharpCasts) header
F# Casts (@FSharpCasts) profile picture

Quickly demonstrating the F# language and tools.

Northern Virginia
Joined February 2017
Photo by F# Casts (@FSharpCasts)Photo by F# Casts (@FSharpCasts)Photo by F# Casts (@FSharpCasts)Photo by F# Casts (@FSharpCasts)Photo by F# Casts (@FSharpCasts)Photo by F# Casts (@FSharpCasts)Photo by F# Casts (@FSharpCasts)Photo by F# Casts (@FSharpCasts)Photo by F# Casts (@FSharpCasts)Photo by F# Casts (@FSharpCasts)
Hello #fsharp Twitter! Did learning F# or some other functional programming seem to “unlock” something for you? If you have a story or comment about how it changed your trajectory or outlook, I’d love to hear from you. Reply in the comments or send me a DM.
8
5
1
18
4,509
Davos was between Mon Jan 20 - Fri Jan 24, which probably meant he was back in the office Mon Jan 27th. On that day, cases had averaged a ~50% compounded daily growth rate for 10 days. I created a spreadsheet on Jan 27th to track the growth and I'm just a programmer.
1
50
Awesome feature @linqpad - just hightlight the code and press CTRL+SHIFT+B to benchmark with BenchmarkDotNet
4
38
2
213
15,439
Replying to @WillEhrendreich
In my head, I think I’m working toward that goal but I’m spiking backwards to learn how the Fable compiler works by modifying a working transpiler. But I would love to use the Roslyn SDK to translate C# to the Fable AST or to push it to something Fantomas. What would you do?
1
27
Spent this afternoon making basic F# classes and record types transpile to C# classes and record types.
1
2
396
Happy New Year!
4
430
Github Copilot works surprising very well with F#
7
2
39
BTW, Thank you for pointing this out. I'm not a fan of mixing exceptions with Result types, let alone replacing exceptions with Result types. They're two different animals and both deserve thoughtful consideration.
3
Part 2 - Using Cantor's unpairing function to map integers to our calculator language. (A recursive type) It's getting closer to being a total function. But what if we used unbounded bigints?
3
5
Replying to @Thoriumi @sforkmann
I assumed that was obvious. The goal was to show you don't have to *always* return values in expressions, you can throw a runtime error.
1
Generate: Int → Lang ???? Can we define a small recursive language and then map the set of integers to example instances of our language?
1
2
5
When two total functions (these should be uint, not int) map to each other in a special way, they can create a bijection. For this demo, we uniquely map the set of integers to a pair of integers and back.
3
10
Turning partial functions into total functions
2
12
32
F# is a pretty good at working with generics. If you see 'a or 'b or 'c (etc) in your function signature, it means you're defining a generic function. Maybe you did it on purpose, or maybe didn't give the F# compiler enough to infer the types you wanted.
7
1
23
Today's F# cast is brought to you by our "wheel watching" friends at @FriedFsharp!
1
3
11
Watching @shanselman video on @bletchleypark made me think - I have an hour on the train, let's port my own #fsharp Enigma emulator to @safe_stack! @FableCompiler is truly fantastic and makes this easy.
2
12
1
39
Replying to @FSharpCasts
@FSharpCasts : #fsharp + #vim : Introduce Parameter (Up) checkout the full readme : github.com/cboudereau/vsvimr…
1
3