View sieve.fsx
#!/usr/bin/env fsharpi
#I "../../../.nuget/packages/hopac/0.3.21/lib/net45/"
#I "../../../.nuget/packages/hopac.extras/0.3.1/lib/net45"
#r "Hopac.Extras"
#r "Hopac.Platform"
#r "Hopac.Core"
#r "Hopac"
open System
View _error
./2.5-sync-messages.fsx
Unhandled exception: System.ArgumentException: Cannot resolve method System.Object Specialize[b]() because the declaring type of the method handle FSI_0001+Buffer+full@31-1[a] is generic. Explicitly provide the declaring type to GetMethodFromHandle.
at System.Reflection.MethodBase.GetMethodFromHandle (System.RuntimeMethodHandle handle) [0x00072] in <ab2f5ad0f8c84dfe97dfd6a06a64cf44>:0
at System.Reflection.Emit.GenericTypeParameterBuilder.InternalResolve () [0x00019] in <ab2f5ad0f8c84dfe97dfd6a06a64cf44>:0
at System.Reflection.Emit.TypeBuilderInstantiation.InternalResolve () [0x0001e] in <ab2f5ad0f8c84dfe97dfd6a06a64cf44>:0
at System.Reflection.Emit.ConstructorOnTypeBuilderInst.RuntimeResolve () [0x00000] in <ab2f5ad0f8c84dfe97dfd6a06a64cf44>:0
at System.Reflection.Emit.ModuleBuilder.RuntimeResolve (System.Object obj) [0x00080] in <ab2f5ad0f8c84dfe97dfd6a06a64cf44>:0
at FSI_0001+Buffer.empty@29[a,b] (Hopac.Ch`1[T] insCh, Hopac.Ch`1[T] remCh, Microsoft.FSharp.Core.Unit unitVa
View 2.1-lock-and-wait.fs
#!/usr/bin/env fsharpi
#I "../../../.nuget/packages/hopac/0.3.21/lib/net45/"
#r "Hopac.Platform"
#r "Hopac.Core"
#r "Hopac"
open System.Collections.Generic
open Hopac
View utils.fs
// true if p for any two in hs
let exhaust p (hs:_ list) =
let rec outer (o:int) =
let rec inner (i:int) =
if i = hs.Length then
false
else
p hs.[o] hs.[i] || inner (i+1)
if o = hs.Length - 1 then
View day1.fsx
open System
let input = "64971395968289825957777798234951578482268493996619135916436993343536643184775448866196536355798516621935871473931837138238829615119536157121613192515849244146184468732492331538135833157157761378964916648615223794591798797779389173986514973475599324136188633692653848227112475535957279145133584253489319269355865999117198384928548913942142593363861488441589693891499273249219245863648452322824453233158758477955278854466725357732464991527411592461175834567618344398299273396637349838568596576892924147798372792127982672797687255631542843479916175973493265982993456233938532811965682348395485642736589262772816352472146793844994335819263226235485459363583155935224744397594514416318356372356289135785936796412628944598213552353592311358931641762348363163756929194178299221388951371452534246856334938527188422168554999653433376573124389566262482992498297168544382536682792358943525451421148964948237487643454968278545969888552167325893941325515819652569623645791144759994744966554255425148684738882357
View CameraBall.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using VRTK;
public class CameraBall : MonoBehaviour {
public VRTK_SDKManager sdk;
public VRTK_InteractGrab grabbing;
View script.cs
using System.Collections.Generic;
using UnityEngine;
class LiveScript : BaseScript
{
protected TKObject cube;
void Start()
{
cube = lctk.CreateObject(PrimitiveType.Cube);
View gist:20fafce3c63fa7797189a013fd74eca7
# Probably needs to be moved to fsharp
if pkg-config FSharp.Core
then
export FSharpTargetsPath="$(dirname $(pkg-config FSharp.Core --variable=Libraries))/Microsoft.FSharp.Targets"
fi
View gist:c2d54b6a90b5940ec12b7b85a74e3418
#> cat `which fsautocomplete`
#! /nix/store/g6l32ncr8vlpprlmv9kgr4qksx929cbj-bash-4.4-p12/bin/bash -e
export MONO_PATH="/nix/store/8a5l0w4ywnfgc6xbvr7jcvkas7j6mvjg-FSharp.AutoComplete-0.18.2/lib/mono/4.5"
exec "/nix/store/p305z9r6mv628zh4p55r805ncd2bsx9h-mono-4.0.4.1/bin/mono" "/nix/store/8a5l0w4ywnfgc6xbvr7jcvkas7j6mvjg-FSharp.AutoComplete-0.18.2/lib/dotnet/FSharp.AutoComplete/fsautocomplete.exe" "${extraFlagsArray[@]}" "$@"
#> ls /nix/store/8a5l0w4ywnfgc6xbvr7jcvkas7j6mvjg-FSharp.AutoComplete-0.18.2/
bin lib
#> ls /nix/store/8a5l0w4ywnfgc6xbvr7jcvkas7j6mvjg-FSharp.AutoComplete-0.18.2/lib
dotnet pkgconfig
View gist:cd48b52e6ef33f3eb092e3ef7a7841ce
#> echo "$(nix-build '<nixpkgs>' -A dotnetPackages.FSharpAutoComplete)/lib/mono/4.5"
/nix/store/4v9xjgvdv1g8a1i2681ljl75v4v88myj-FSharp.AutoComplete-0.18.2/lib/mono/4.5
#> cat `which fsautocomplete` | grep exec
exec "/nix/store/lhcxz06s79pi7s24845r00jxwaclz1k3-mono-4.0.4.1/bin/mono" "/nix/store/4v9xjgvdv1g8a1i2681ljl75v4v88myj-FSharp.AutoComplete-0.18.2/lib/dotnet/FSharp.AutoComplete/fsautocomplete.exe" "${extraFlagsArray[@]}" "$@"