Skip to content

Instantly share code, notes, and snippets.

View jakobrs's full-sized avatar

Jakob Rødal Skaar jakobrs

View GitHub Profile
@jakobrs
jakobrs / serialise.lua
Last active November 24, 2019 16:41
"serialise" and print Lua values, including tables
local function find(tbl, val)
for i, v in ipairs(tbl) do
if v == val then
return i
end
end
end
function serialiseC(out, a, useColours, simplified)
local dont = {}
@jakobrs
jakobrs / bisectionresults.txt
Created October 27, 2019 08:48
Everest bisection results
# Result of git bisect between commits 6967212 (good) and 1247f3a^ (bad)
74eb377606893e47402220af74684a762cd11960 is the first bad commit
commit 74eb377606893e47402220af74684a762cd11960
Author: Maik Macho <[email protected]>
Date: Mon Jun 24 12:34:39 2019 +0200
Switch to NuGet where possible
Celeste.Mod.mm/Celeste.Mod.mm.csproj | 52 +-
@jakobrs
jakobrs / log.txt
Created October 27, 2019 10:15
Everest log
Controller 0: PS4 Controller
IGLDevice: OpenGLDevice
OpenGL Device: AMD Radeon Pro 560 OpenGL Engine
OpenGL Driver: 2.1 ATI-3.0.68
OpenGL Vendor: ATI Technologies Inc.
MojoShader Profile: glsl120
FULLSCREEN
CELESTE : 1.3.1.2
(27/10/2019 11:12:48) [Everest] [Info] [core] Booting Everest
(27/10/2019 11:12:48) [Everest] [Info] [core] VersionCelesteString: 1.3.1.2 [Everest: 0-dev]
@jakobrs
jakobrs / scottencoding.hs
Last active November 24, 2019 18:44
Scott encoding of naturals with reduction
{-# LANGUAGE RankNTypes #-}
-- You can safely ignore the types. They're necessary for the
-- program to compile, but they don't change the behaviour of
-- the program in any way.
newtype Nat = Nat (forall a. a -> (Nat -> a) -> a)
-- zero = \x y -> x
zeroN :: Nat
zeroN = Nat (\x y -> x)
@jakobrs
jakobrs / scottaststuff.hs
Last active November 25, 2019 13:52
Scott encoding ... again
data Expr = Var Int | Application Expr Expr | Abstraction Int Expr deriving (Show, Eq, Ord)
zeroExpr :: Expr
zeroExpr = Abstraction 0 (Abstraction 1 (Var 0))
succExpr :: Expr -> Expr
succExpr num = Abstraction 0 (Abstraction 1 (Application (Var 1) num))
isScottNum :: Expr -> Bool
isScottNum (Abstraction a (Abstraction b (Var c))) | a == c && a /= b = True -- Zero
@jakobrs
jakobrs / log.txt
Created November 29, 2019 15:52
Hadrian log
1/rts/build/c/Interpreter.o.d
| Run Cc FindCDependencies Stage1: rts/ProfilerReport.c => _build/stage1/rts/build/c/ProfilerReport.o.d
| Run Ghc CompileCWithGhc Stage1: rts/StgPrimFloat.c => _build/stage1/rts/build/c/StgPrimFloat.o
| Run Ghc CompileCWithGhc Stage1: rts/ProfilerReport.c => _build/stage1/rts/build/c/ProfilerReport.o
| Run Ghc CompileCWithGhc Stage1: rts/Hash.c => _build/stage1/rts/build/c/Hash.o
| Run Cc FindCDependencies Stage1: rts/Linker.c => _build/stage1/rts/build/c/Linker.o.d
| Run Cc FindCDependencies Stage1: rts/Inlines.c => _build/stage1/rts/build/c/Inlines.o.d
| Run Cc FindCDependencies Stage1: rts/sm/Scav.c => _build/stage1/rts/build/c/sm/Scav.o.d
| Run Cc FindCDependencies Stage1: rts/linker/M32Alloc.c => _build/stage1/rts/build/c/linker/M32Alloc.o.d
| Run Cc FindCDependencies Stage1: rts/posix/TTY.c => _build/stage1/rts/build/c/posix/TTY.o.d
@jakobrs
jakobrs / b.hs
Last active December 27, 2019 14:01
Parametricity as erasure
{-
"Goal": translate this to Idris
Name Meaning
forall Parametric universal
pi Nonparametric universal
exists Parametric existential
sigma Nonparametric existential
@jakobrs
jakobrs / 0001-Add-basic-argument-handling.patch
Created February 2, 2020 19:32
Adds basic argument handling to VVVVVV
From 4c74fd47290cb0c4f00c700943a5b47e1651b013 Mon Sep 17 00:00:00 2001
From: jakobrs <[email protected]>
Date: Sat, 1 Feb 2020 12:12:54 +0100
Subject: [PATCH] Add basic argument handling
---
desktop_version/src/FileSystemUtils.cpp | 13 +++-
desktop_version/src/FileSystemUtils.h | 2 +-
desktop_version/src/main.cpp | 88 +++++++++++++++++++++++--
3 files changed, 94 insertions(+), 9 deletions(-)
@jakobrs
jakobrs / configuration.nix
Created February 6, 2020 16:06
Example NixOS config
{ config, pkgs, ... }:
{
imports = [ <nixpkgs/nixos/modules/installer/virtualbox-demo.nix> ];
networking.firewall.enable = false;
# Enables the SSH Daemon
services.openssh.enable = true;
services.openssh.forwardX11 = true; # Adds X11Forwarding yes to /etc/ssh/sshd_config
From 85ba6429ea2718349d4516037a739b1b30303ffb Mon Sep 17 00:00:00 2001
From: jakobrs <[email protected]>
Date: Sat, 8 Feb 2020 09:31:20 +0100
Subject: [PATCH 1/2] vvvvvv: factor vvvvvv-bin out of vvvvvv
---
pkgs/games/vvvvvv/default.nix | 94 ++++++++++++++++++++++-----------
pkgs/top-level/all-packages.nix | 4 +-
2 files changed, 66 insertions(+), 32 deletions(-)