This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SRTP: Statically Resolved Type Parameters | |
// https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/generics/statically-resolved-type-parameters | |
// SRTP Allows for pulling members out of types that where the member is named and typed the same | |
// In this example SRTP will be used to pull out the 'First: string' and 'Last: string' members | |
// from different types | |
// One example of SRTP in the F# Base Class Library is the (+) operator. | |
// You'll see that it has this type signature: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
var module = WebAssembly.instantiateStreaming(fetch("linked_list.wasm"), {}); | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module WebGPU | |
// <ItemGroup> | |
// <PackageReference Include="Silk.NET.GLFW" Version="2.20.0" /> | |
// <PackageReference Include="Silk.NET.WebGPU" Version="2.20.0" /> | |
// <PackageReference Include="Silk.NET.WebGPU.Native.WGPU" Version="2.20.0" /> | |
// <PackageReference Include="Silk.NET.Windowing" Version="2.20.0" /> | |
// </ItemGroup> | |
open Microsoft.FSharp.NativeInterop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module rec threejs | |
#nowarn "3390" // disable warnings for invalid XML comments | |
#nowarn "0044" // disable warnings for `Obsolete` usage | |
open System | |
open Fable.Core | |
open Fable.Core.JS | |
open Browser.Types |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open Microsoft.FSharp.NativeInterop | |
open Silk.NET.Maths | |
open Silk.NET.Windowing | |
open Silk.NET.Input; | |
open Silk.NET.OpenGL | |
open System | |
let VertexShaderSource = """ | |
#version 330 core //Using version GLSL version 3.3 | |
layout (location = 0) in vec4 vPos; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module LensPatternElmish.Client.Main | |
open Elmish | |
open Bolero | |
open Bolero.Html | |
open Bolero.Templating.Client | |
type eLens<'a, 'model> = unit -> 'a * ('a -> 'model) | |
type updater<'b, 'a> = 'b -> 'a -> 'a * Cmd<'b> | |
let inline delegateTo (elens: eLens<'a, 'model>) (update: updater<'b, 'a>) (msgType: 'b -> 'msg) (msg: 'b) : 'model * Cmd<'msg> = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Thank you git-moss for your Push4Bitwig script, as this was greatly helpful in learning how to | |
// control the LEDs/respond to input from the push. https://github.com/git-moss/Push4Bitwig | |
loadAPI(1); | |
load('Helpers.js'); | |
host.defineController('WobbleSoft', 'Snake', '1.0', 'ebef3e20-6967-11e4-9803-0800200c9a66'); | |
host.defineMidiPorts(1, 1); | |
host.addDeviceNameBasedDiscoveryPair (['Ableton Push User Port'], ['Ableton Push User Port']); |