This file contains hidden or 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
| use "lib:SDL2" | |
| use "lib:SDL2main" | |
| use "time" | |
| use "debug" | |
| use @SDL_Init[I32](flags: U32) | |
| use @SDL_CreateWindow[Pointer[_SDLWindow val] ref](title: Pointer[U8] tag, x: I32, y: I32, w: I32, h: I32, flags: U32) | |
| use @SDL_CreateRenderer[Pointer[_SDLRenderer val] ref](window: Pointer[_SDLWindow val] box, index: I32, flags: U32) | |
| use @SDL_DestroyRenderer[None](renderer: Pointer[_SDLRenderer val] box) | |
| use @SDL_DestroyWindow[None](window: Pointer[_SDLWindow val] box) |
This file contains hidden or 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
| use "itertools" | |
| use "promises" | |
| use "collections" | |
| use "debug" | |
| class val ComputationResult | |
| let input : USize | |
| let output : USize | |
| new create(input' : USize, output' : USize) => |
This file contains hidden or 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
| use "files" | |
| use "collections" | |
| use "format" | |
| primitive NoOp | |
| fun noop() => | |
| let a = "noop" | |
| primitive FileReader | |
| fun read_file_lines(path : String, env : Env) : List[String]? => |
This file contains hidden or 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
| use "collections" | |
| primitive ErrorHelper | |
| fun orNone[A](getter : {(): A?}): (A | None) => | |
| try | |
| getter()? | |
| else | |
| None | |
| end | |
This file contains hidden or 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
| using System; | |
| using System.IO; | |
| using System.Runtime.InteropServices; | |
| using System.Text; | |
| namespace ConsoleApp3 | |
| { | |
| class Program | |
| { | |
| const string dllPath = @"C:\DEV\Escapi\escapi\target\debug\escapi_rust.dll"; |
This file contains hidden or 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
| //F# Compiler for F# 4.0 (Open Source Edition), Mono 4.2.1 | |
| open System | |
| let u : byte = (byte) 0b11110000 | |
| let highMask : byte = (byte) 0b11110000 | |
| let lowMask : byte = (byte) 0b00001111 | |
| let uHigh : byte = u &&& highMask |
This file contains hidden or 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
| let nv21ToPPM() = | |
| let clampBetween0And255 v = | |
| if v < 0.0 then | |
| 0.0 | |
| else if v >= 255.0 then | |
| 255.0 | |
| else | |
| v | |
| let width = 1280 |
This file contains hidden or 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
| https://jsfiddle.net/undwk7g2/ |
This file contains hidden or 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
| #r "../fsharp-formatting/RazorEngine.dll" | |
| #r "../fsharp-formatting/FSharp.MetadataFormat.dll" | |
| #r "../fsharp-formatting/FSharp.CodeFormat.dll" | |
| #r "../fsharp-formatting/FSharp.Formatting.Common.dll" | |
| #load "../fsharp-formatting/FSharp.Formatting.fsx" | |
| open FSharp.MetadataFormat | |
| open System.IO |
This file contains hidden or 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
| https://ellie-app.com/v3HGgh8cyra1/0 |