Skip to content

Instantly share code, notes, and snippets.


Don Syme dsyme

View GitHub Profile
View gist:19ffe7f268b39c34b927f2f06e936270
KernelBase.dll!00007ffc3943a308() Unknown
vcruntime140d.dll!00007ffbd2fdb1f0() Unknown
torch_cpu.dll!defaultErrorHandlerFunction(const char * msg, void * data) Line 27 C++
torch_cpu.dll!_THError(const char * file, const int line, const char * fmt, ...) Line 54 C++
[External Code]
torch_cpu.dll!c10::KernelFunction::callUnboxed<at::Tensor,at::Tensor const &,at::Tensor const &>(const c10::OperatorHandle & opHandle, const at::Tensor & <args_0>, const at::Tensor & <args_1>) Line 66 C++
torch_cpu.dll!c10::Dispatcher::callUnboxedWithDispatchKey<at::Tensor,at::Tensor const &,at::Tensor const &>(const c10::OperatorHandle & op, c10::DispatchKey dispatchKey, const at::Tensor & <args_0>, const at::Tensor & <args_1>) Line 221 C++
torch_cpu.dll!c10::Dispatcher::callUnboxed<at::Tensor,at::Tensor const &,at::Tensor const &>(const c10::OperatorHandle & op, const at::Tensor & <args_0>, const at::Tensor & <args_1>) Line 229 C++
torch_cpu.dll!c10::OperatorHandle::callUnboxed<at::Tensor,at::Tensor const &,at::T
View gist:9606cd38002295eb7ff1f28c3155df80
namespace FSharpBug9201
module CreateLockup =
//let inline castInternal< ^a, ^b when (^a or ^b) : (static member createFrom : ^a -> ^b)> (v: ^a): ^b =
// ((^a or ^b) : (static member createFrom : ^a -> ^b) v)
//let inline cast x: TestItemSeq =
// castInternal x
View gist:47a6fd35ef8c3e2433043cc95384e28a
View Traversable.fs
module FSharpPlus.Controlxx
let inline CallReturn< ^M, ^R, 'T when (^M or ^R) : (static member Return : unit -> ('T -> ^R))> () =
((^M or ^R) : (static member Return : unit -> ('T -> ^R)) ())
let inline CallApply< ^M, ^I1, ^I2, ^R when (^M or ^I1 or ^I2) : (static member Apply : ^I1 * ^I2 -> ^R)> (input1: ^I1, input2: ^I2) =
((^M or ^I1 or ^I2) : (static member Apply : ^I1 * ^I2 -> ^R) input1, input2)
let inline CallMap< ^M, ^F, ^I, ^R when (^M or ^I or ^R) : (static member Map : ^F * ^I -> ^R)> (mapping: ^F, source: ^I) : ^R =
((^M or ^I or ^R) : (static member Map : ^F * ^I -> ^R) mapping, source)
View foo.fs
let checkMethodImplIsPartialMatchForInterfaceMethod (minfo: MethInfo) (mimpl: ILMethodImpl) =
minfo.IsFinal &&
minfo.IsInterfaceMethod &&
mimpl.OverrideBy.ArgCount = List.sum minfo.NumArgs &&
mimpl.OverrideBy.GenericArity = minfo.GenericArity
let GetIntrinsicInterfaceOverrideMethodSetsUncached ((optFilter, ad, allowMultiIntfInst), m, ty) =
assert optFIlter.IsSome
assert isInterfaceTy g ty
View gist:924686f34bb103344213f8f5f4bbc721
namespace DiffSharp
open DiffSharp.Backend
open DiffSharp.Util
[<CustomEquality; CustomComparison>]
type Tensor =
| Tensor of primalRaw:RawTensor
| TensorF of primal:Tensor * derivative:Tensor * nestingTag:uint32
| TensorR of primal:Tensor * derivative:(Tensor ref) * parentOperation:TensorOp * fanout:(uint32 ref) * nestingTag:uint32
View gist:5dd08c84ad7bdee3ad556af742172eda
type Node<'T>() =
abstract Value: 'T
abstract Name: string
let TipNode<'T>(name:string, value: 'T) =
{ new Node<'T>() with
override _.Value = value
override _.Name = name
override _.ToString() = name }
View gist:1567b963da03463ac4edc3e594ff9f62
module Blittable
type System.SByte with
static member IsBlittableMarker = ()
type System.Byte with
static member IsBlittableMarker = ()
type System.Int16 with
static member IsBlittableMarker = ()
dsyme / gist:ff9e39cfff879f49dea2a95afdc4b12f
Created Feb 7, 2020
Signature dump for FSharp.COmpiler.Private.dll 07/02/2020
View gist:ff9e39cfff879f49dea2a95afdc4b12f
Microsoft (R) F# Compiler version for F# 4.7
Copyright (c) Microsoft Corporation. All Rights Reserved.
namespace FSComp
type internal SR =
private new : unit -> SR
static member
ArgumentsInSigAndImplMismatch : a0:System.String * a1:System.String ->
int * string
static member
View gist:70e367bfaaeee33c23fc2212eeaab459
member inline x.With(?tag: obj, ?command: unit -> unit, ?commandCanExecute: bool, ?iconOverride: Fabulous.XamarinForms.InputTypes.Image, ?isEnabled: bool,
?textOverride: string, ?name: string, ?automationId: string, ?classId: string, ?effects: ViewElement list,
?menu: ViewElement, ?styleId: string, ?children: ViewElement list, ?text: string, ?accelerator: string,
?iconImageSource: Fabulous.XamarinForms.InputTypes.Image, ?isDestructive: bool, ?toolbarItemOrder: Xamarin.Forms.ToolbarItemOrder, ?priority: int, ?tapped: unit -> unit,
?contextActions: ViewElement list, ?height: float, ?completed: string -> unit, ?horizontalTextAlignment: Xamarin.Forms.TextAlignment, ?keyboard: Xamarin.Forms.Keyboard,
?label: string, ?labelColor: Xamarin.Forms.Color, ?placeholder: string, ?textChanged: Xamarin.Forms.TextChangedEventArgs -> unit, ?onChanged: Xamarin.Forms.Toggl
You can’t perform that action at this time.