Skip to content

Instantly share code, notes, and snippets.

@ryanorendorff
ryanorendorff / python-env-mac-with-pyopencl.nix
Last active Oct 6, 2020
Installing PyOpenCL on Mac OS Catalina
View python-env-mac-with-pyopencl.nix
let
pkgs = import (builtins.fetchTarball {
url =
"https://github.com/NixOS/nixpkgs-channels/archive/nixpkgs-20.03-darwin.tar.gz";
sha256 = "0wci9vylb31wvl3zslw38537dgdvd89w58fvj9acnbv9l378x3hh";
}) { };
packageOverrides = self: super: {
pyopencl = super.pyopencl.overridePythonAttrs (old: rec {
View VectorList.agda
module VectorList where
open import Data.List using (List; sum) renaming ([] to []ᴸ; _∷_ to _∷ᴸ_)
open import Data.Nat using (ℕ)
open import Data.Vec using (Vec; _++_) renaming ([] to []ⱽ; _∷_ to _∷ⱽ_)
infixr 5 _∷ⱽ_
data VectorList (A : Set) : List ℕ Set where
[]ⱽ : VectorList A []ᴸ
_∷ⱽ_ : {n : ℕ} {ns : List ℕ} Vec A n VectorList A ns VectorList A (n ∷ᴸ ns)
@ryanorendorff
ryanorendorff / shell.nix
Created Dec 31, 2019
Nix shell for Agda development with the Agda standard library
View shell.nix
let
pkgs = import (builtins.fetchTarball {
url =
"https://github.com/NixOS/nixpkgs-channels/archive/b0bbacb52134a7e731e549f4c0a7a2a39ca6b481.tar.gz";
sha256 = "15ix4spjpdm6wni28camzjsmhz0gzk3cxhpsk035952plwdxhb67";
}) { };
# The standard library in nixpkgs does not come with a *.agda-lib file, so we
# generate it here.
View gist:2bbbfd428cd9084c1ef46ce6f8ff33b6
xpra start :10 --xvfb="/nix/store/xal8zwgmbmnwcryynq1ac1l18y61364r-xpra-2.3.3/bin/xpra_Xdummy -noreset -novtswitch -nolisten tcp +extension GLX +extension RANDR +extension RENDER -auth $XAUTHORITY -logfile ${XPRA_LOG_DIR}/Xorg.${DISPLAY}.log -configdir ${HOME}/.xpra/xorg.conf.d/$PID -config {xpra-2.3.3.data/data/etc/xpra/xorg.conf}"
# --xvfb=CMD How to run the headless X server. Default:
# 'xpra_Xdummy -noreset -novtswitch -nolisten tcp
# +extension GLX +extension RANDR +extension RENDER
# -auth $XAUTHORITY -logfile
# ${XPRA_LOG_DIR}/Xorg.${DISPLAY}.log -configdir
# ${HOME}/.xpra/xorg.conf.d/$PID -config build/bdist
# .linux-
# x86_64/wheel/xpra-2.3.3.data/data/etc/xpra/xorg.conf'.