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.Buffers; | |
| using System.Runtime.CompilerServices; | |
| // ReSharper disable ParameterHidesMember | |
| sealed unsafe class NativeMemoryManager<T> : MemoryManager<T> | |
| where T : unmanaged | |
| { | |
| byte* pointer; |
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
| /// <summary> | |
| /// Disposable static functions | |
| /// </summary> | |
| public static class Disposable | |
| { | |
| /// <inheritdoc /> | |
| /// <summary> | |
| /// Create new deferred context | |
| /// </summary> |
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.Collections; | |
| using System.Collections.Generic; | |
| using System.Diagnostics; | |
| using System.Linq; | |
| SortedHashSet<int> values = []; | |
| Console.WriteLine("Start"); |
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.Numerics; | |
| Print(13u); | |
| Print(12L); | |
| Print<short>(2); | |
| Print<UInt128>(2); | |
| static void Print<T>(T p) |
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
| type Variable = string | |
| type Label = string | |
| type Value = | |
| | Static of int | |
| | Var of Variable | |
| type Pred = | |
| | Always | |
| | Gt of Value * Value |
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
| open System | |
| // Phantom Type usage for generic values | |
| // a generic type argument that is never used by the containing type. | |
| // Definition of Id wrapper | |
| [<Struct>] | |
| type Id<'T> = | |
| private | |
| | Id of Guid | |
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.Linq; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| foreach(var x in 0..5) | |
| Console.Write($"{x}, "); | |
| Console.WriteLine(); | |
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.Buffers; | |
| using System.Runtime.CompilerServices; | |
| using Backdash.Core; | |
| // ReSharper disable ParameterHidesMember | |
| namespace Backdash.Data; | |
| sealed unsafe class NativeMemoryManager<T> : MemoryManager<T> | |
| where T : unmanaged | |
| { |
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
| open System | |
| open System.Threading | |
| type Atom<'t> = | |
| private | |
| { mutable CurrentValue: 't } | |
| member this.Value = this.CurrentValue | |
| [<RequireQualifiedAccess>] |
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
| open System.Net.Sockets | |
| open System.Net | |
| open System | |
| open System.Text | |
| open System.Threading | |
| let localPort = 8800 | |
| let serverPort = 8888 | |
| let serverUri = Uri("http://localhost") |