Notes for Kathleen and Vlad.
e.g. we want y
in scope when stopped at x + 1
:
open System | |
let transfers =[| Some (Guid.NewGuid()),DateTime.Now |] | |
let FetchInternalTransfers (includeConfirmeds: bool) (transferStep: string) = | |
task { | |
let totalCount = transfers.Length | |
let! mapPrioritiesTransfers = |
open System | |
open System.Threading | |
open FSharp.Core.CompilerServices.StateMachineHelpers | |
type Cancellable<'T> = | |
| Cancellable of (CancellationToken -> Result<'T, exn>) | |
member inline cf.Invoke(ct: CancellationToken) = | |
ct.ThrowIfCancellationRequested() | |
let (Cancellable f) = cf |
open System | |
open System.Threading | |
type Cancellable<'T> = delegate of CancellationToken -> 'T | |
type CancellableBuilder() = | |
member _.Delay(body: unit -> Cancellable<'T>) = | |
Cancellable(fun ct -> | |
let computation = body() |
[<Sealed>] | |
type LongIdentWithTrivia(lid: LongIdent, dotRanges: range list, ?trivia: IdentTrivia option list) = | |
let triviaStored = | |
match trivia with | |
| None -> ValueNone | |
| Some l when l |> List.forall Option.isNone -> ValueNone | |
| Some l -> ValueSome (Array.ofList l) | |
let getTrivia() = | |
match triviaStored with | |
| ValueNone -> lid |> List.map (fun _ -> None) |
F# 7 | |
1. For FSharp.Core | |
- assembly size reduced by 1MB | |
- resource blob FSharpMetadata containing zipped optdata + sigdata 320KB | |
- (name of this data) | |
- F# 7 compiler reads this blob | |
- extra file FSharp.Core.sigdata in nuget containing unzipped sigdata for consumption by F# 6 compilers |
namespace global | |
open System | |
open System.Collections.Generic | |
/// Naive ArgumentParser - only string arguments right now | |
/// | |
/// Note expects "dotnet fsi vae.fsx <args>" as invocation | |
type ArgumentParser() = | |
let specs = ResizeArray() |
#!/usr/bin/env -S dotnet fsi | |
#r "nuget: DiffSharp-cuda, 1.0.6" | |
#r @"..\bin\Debug\net6.0\fwdsgd.dll" | |
#load "argparse.fsx" | |
open System.IO | |
open DiffSharp | |
open DiffSharp.Model | |
open DiffSharp.Util |
import argparse | |
import torch | |
import numpy as np | |
import pprint | |
import time | |
import os | |
import glob | |
import pprint | |
import sys | |
from torchvision import datasets, transforms |
NonGeneric --> TypeHandle(NonGeneric) | |
--> MethodTable "NonGeneric" ~~~~> System.Type | |
---> vtable NonGeneric::VirtualMethod1 | |
---> ... | |
---> vtable NonGeneric::VirtualMethod2 | |
---> **iimpls** for NonGeneric | |
---> EEClass "NonGeneric" | |