Skip to content

Instantly share code, notes, and snippets.

@matthewcrews
matthewcrews / Crews_Odin_Newsletter_Interview.md
Last active February 10, 2025 10:42
Odin Newsletter Interview

An interview with Crews, formerly known as Fast F#.

Q: What can you say about how you discovered Odin, and what appealed to you about it?

A: First off, it's an honor to be interviewed for the newsletter and thank you for inviting me! Scheduling and Planning Optimization have been my obsession since I can remember. There's actually a joke in my family that I've been doing it since before I was born. My mom was working on her PhD when she was pregnant with me and was taking classes on Operations Research, the science of planning and scheduling, so I've been exposed to this area of work since before I was born. For context, I don't see myself as a developer. Professionaly, I started life as a Chemical Engineer and then moved to Industrial Engineering when I saw that the main problems faced by companies are planning and scheduling. Learning to write code was just a by product of wanting to solve these problems. This means I am language agnostic. I really don't care what language people use.

I think you ne

@matthewcrews
matthewcrews / gist:57e83a709d31a6c7fffdd293654c5709
Created January 4, 2024 19:16
Serialize/Deserialize Binary
open System
open Microsoft.FSharp.Core.LanguagePrimitives
type Weibull_Parameters =
{
Scale: float
Shape: float
}
// Writes the bytes of the parameters to the buffer and returns to new offset for writing
// more data.

Questions

  1. Where did your journey into software begin?
  2. What various jobs did you have on your journey before you arrived at F#?
  3. What value do you think OO languages have? What is the good we can take from them?
  4. When did you discover F#?
  5. What were the challenges for you when you learned F#?
  6. What do you think is the key benefit to coding in a functional style?
  7. Where do you think F# shines in comparison to other functional-first programming languages?
  8. What has life been like as an F# developer?
  9. At what point did you decide to strike out on your own with Compositional IT?
#r "nuget: MessagePack"
open System.IO
open System.Runtime.InteropServices
open MessagePack
open System
[<Struct; MessagePackObject>]
type Chicken =
{
{
"[odin]": {
"editor.tabSize": 4,
"editor.insertSpaces": false,
"editor.detectIndentation": false
},
"files.autoSave": "afterDelay",
"FSharp.addFsiWatcher": true,
"FSharp.fsiExtraParameters": [
"--optimize+",
open System
open System.Buffers
open System.Collections.Generic
open BenchmarkDotNet.Running
open BenchmarkDotNet.Attributes
[<Struct>]
type Entry =
{
I : int
type All = All
type SliceIndex2D<'a, 'b when 'a : equality and 'b : equality>(values: seq<'a * 'b>) =
let values = Array.ofSeq values
member s.Item
with get (k1: 'a, _: All) =
values
|> Seq.filter (fun (a, _) -> a = k1)

Tractor: A CLR Language for Numerical Computation

The original intention of the dotnet was to provide a runtime for many programming languages to run on. Two factors have kept that vision from fruition: tying .NET Framework to Windows and the dominance of C#.

Dotnet can now run on almost any modern system. A significant push has been made toward performance features for C# and the CLR. The intention is to close the performance gap between systems-level programming languages (C, C++, Rust, Zig, and Odin, to name a few) and what can be achieved on the dotnet platform.

A general-purpose language like C# and F# must support

Guiding Principles

@matthewcrews
matthewcrews / settings.json
Created September 1, 2022 21:23
VS Code Settings
{
"workbench.colorTheme": "GDScript",
"editor.tokenColorCustomizations": {
"[Dracula Soft]": {
"textMateRules": [
{
"scope": "keyword.fsharp",
"settings": {
"foreground": "#65d6ff8b",
}
open System
open System.Collections
open System.Collections.Generic
module private Helpers =
let inline computeBucketAndMask (itemKey: int<'Item>) itemCount =
if (uint itemKey) >= (uint itemCount) then
raise (IndexOutOfRangeException (nameof itemKey))