Skip to content

Instantly share code, notes, and snippets.

View elliotpotts's full-sized avatar

Elliot Potts elliotpotts

View GitHub Profile
#include <iostream>
#include <type_traits>
#include <typeindex>
#include <map>
#include <vector>
#include <tuple>
#include <utility>
#include <functional>
#include <memory>
#include <stdexcept>
template <typename T>
struct function_traits : public function_traits<decltype(&T::operator())>{
};
template <typename ClassType, typename ReturnType, typename... Args>
struct function_traits<ReturnType(ClassType::*)(Args...) const> {
static constexpr auto arity = sizeof...(Args);
typedef ReturnType result_type;
template <size_t i>
#version 440
smooth in vec3 out_normal;
out vec4 colour;
void main() {
colour = vec4(out_normal, 1.0);
}

Keybase proof

I hereby claim:

  • I am elliotpotts on github.
  • I am elliotpotts (https://keybase.io/elliotpotts) on keybase.
  • I have a public key whose fingerprint is 6119 1D37 7EA1 0BA6 5120 D9FF F03C 3FEC F23D 5275

To claim this, I am signing this object:

@elliotpotts
elliotpotts / build.log
Created April 27, 2016 11:45
deluge problem
elliot@funbox ~> cat /var/tmp/portage/net-p2p/deluge-1.3.12-r3/temp/build.log
* Package: net-p2p/deluge-1.3.12-r3
* Repository: gentoo
* Maintainer: paolo.pedroni@iol.it k_f@gentoo.org,proxy-maint@gentoo.org
* USE: amd64 elibc_glibc gtk kernel_linux python_targets_python2_7 userland_GNU
* FEATURES: preserve-libs sandbox splitdebug userpriv usersandbox
>>> Unpacking source...
>>> Unpacking deluge-1.3.12.tar.bz2 to /var/tmp/portage/net-p2p/deluge-1.3.12-r3/work
>>> Source unpacked in /var/tmp/portage/net-p2p/deluge-1.3.12-r3/work
>>> Preparing source in /var/tmp/portage/net-p2p/deluge-1.3.12-r3/work/deluge-1.3.12 ...
use std::vec;
enum DerivativeType {
Ordinary,
Partial
}
struct Classification {
order: i32,
linear: bool,
root@badbox:/mnt# btrfs subvolume list old/
ID 259 gen 814756 top level 5 path snapshots
ID 260 gen 816590 top level 259 path snapshots/root_post_install
ID 261 gen 816590 top level 259 path snapshots/root_post_graphical_environment_installed
ID 265 gen 816590 top level 259 path snapshots/nervous_backup
ID 266 gen 816590 top level 259 path snapshots/before_nvidia_proprietary_driver_install
ID 270 gen 816590 top level 259 path snapshots/emacs_almost_done
ID 273 gen 816590 top level 259 path snapshots/before_usb_audio_kernel_recompilation
ID 280 gen 816590 top level 259 path snapshots/before_thunar
ID 293 gen 816590 top level 259 path snapshots/before_wine
(defvar wren-mode-hook nil)
(defvar wren-mode-map
(let ((map (make-sparse-keymap))))
"Keymap for Wren major mode")
;;; Autoload
(add-to-list 'auto-mode-alist '("\\.wren\\'" . wren-mode))
(defconst wren-keyword-regex
module Free
%access public export
data Free : (Type -> Type) -> Type -> Type where
MkFree : f (Free f a) -> Free f a
Pure : a -> Free f a
implementation Functor f => Functor (Free f) where
map f = go where
data FreeA : (Type -> Type) -> Type -> Type where
Ap : f a -> FreeA f (a -> b) -> FreeA f b
Pure : a -> FreeA f a
implementation Functor (FreeA f) where
map f (Pure x) = Pure (f x)
map f (Ap x y) = Ap x ((f .) <$> y) -- y <*> x
implementation Applicative (FreeA f) where
pure = Pure