Skip to content

Instantly share code, notes, and snippets.

View infinisil's full-sized avatar

Silvan Mosberger infinisil

  • Tweag
  • Switzerland
View GitHub Profile
github "realm/SwiftLint"
github "antitypical/Result" "2.1.0"
github "drmohundro/SWXMLHash" "2.3.1"
github "scottrhoyt/SwiftyTextTable"
github "jspahrsummers/xcconfigs" "0.9"
github "Carthage/Commandant" "0.10.0"
github "jpsim/SourceKitten" "cbd9625970d968582a218461262a2d70cbb5fb90"
ChooseType : (n : Nat) -> (k : Nat) -> {auto ok : LTE k n} -> Type
ChooseType n Z {ok=LTEZero} = ()
ChooseType n@(S ns) (S ks) {ok=(LTESucc oks)} = Fin n -> ChooseType ns ks
data Choice : (n : Nat) -> (k : Nat) -> Type where
Choose : (n : Nat) -> (k : Nat) -> { auto ok : LTE k n } ->
ChooseType n k -> Choice n k
import Data.Vect
data Choice : (n : Nat) -> (k : Nat) -> Type
Arrows' : Vect n Type -> Type -> Type
Arrows' [] x = x
Arrows' (y :: xs) x = y -> Arrows' xs x
inc : (n : Nat) -> Vect n Nat
inc Z = []
import Data.Vect
ChooseType : (n : Nat) -> (k : Nat) -> {auto ok : LTE k n} -> Type
ChooseType n Z {ok=LTEZero} = ()
ChooseType n@(S ns) (S Z) {ok=(LTESucc oks)} = Fin n
ChooseType n@(S ns) (S ks) {ok=(LTESucc oks)} = (Fin n, ChooseType ns ks)
data Choice : (n : Nat) -> (k : Nat) -> Type where
Choose : (n : Nat) -> (k : Nat) -> { auto ok : LTE k n } ->
ChooseType n k -> Choice n k
#! /nix/store/53h800j8kgpj0a349f7wxa5hgkj1vby2-bash-4.4-p12/bin/bash -e
export PATH=/nix/store/bw2hqjxxji311l847301p4af2q5jvk18-python-2.7.13/bin:/nix/store/km0k2bqy860v6xlvh3lrc8ib6zz21k4a-scyther-1.1.3/bin:/nix/store/dg10h1gcl2xl5hzk46z84hwk5ypzmz47-python2.7-setuptools-30.2.0/bin${PATH:+:}$PATH
exec -a "$0" "/nix/store/km0k2bqy860v6xlvh3lrc8ib6zz21k4a-scyther-1.1.3/src/.scyther-gui.py-wrapped" "${extraFlagsArray[@]}" "$@"
nix-shell --pure -p flex bison python cmake
git clone https://github.com/cascremers/scyther
cd scyther
make
{ stdenv, makeWrapper, pythonPackages }:
let
pkgs = import <nixpkgs> {};
in
with pythonPackages; buildPythonApplication rec {
name = "scyther-${version}";
version = "1.1.3";
src = pkgs.fetchzip {
url = "https://www.cs.ox.ac.uk/people/cas.cremers/downloads/scyther/scyther-linux-v${version}.tgz";
sha256 = "129sm9l2lawdpaw82a21958ni4a8vhn2fjvh3v5gilqz8li59bv5";
@infinisil
infinisil / ipfs.nix
Created May 5, 2017 07:51
nixpkgs/nixos/modules/services/network-filesystems/ipfs.nix
{ config, lib, pkgs, makeWrapper, ... }:
with lib;
let
inherit (pkgs) ipfs;
cfg = config.services.ipfs;
wrapped = writeScriptBin "ipfs" ''
error: Typesafe Activator was removed in 2017-05-08 as the actual package reaches end of life.
See https://github.com/NixOS/nixpkgs/pull/25616
and http://www.lightbend.com/community/core-tools/activator-and-sbt
for more information.
error: no such device: DOROOT.
Searching device memdisk
-- looking for /boot/grubZ.cfg
-- looking for /boot/grub.cfg
-- looking for /grub/grubZ.cfg
-- looking for /grub/grub.cfg
-- looking for /grubZ/grubZ.cfg
-- looking for /grubZ/grub.cfg