Skip to content

Instantly share code, notes, and snippets.

@spiveeworks
spiveeworks / graphics.h
Created October 4, 2022 01:21
Simple Vulkan + GLFW Setup
#ifndef SPIVEE_INCLUDE_GRAPHICS_H
#define SPIVEE_INCLUDE_GRAPHICS_H
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define GLFW_INCLUDE_VULKAN
@spiveeworks
spiveeworks / colour_rhombohedron.c
Last active August 17, 2022 09:09
My colour rhombohedron, in ~200 lines of code. Space to pause the animation.
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include <time.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
@spiveeworks
spiveeworks / no type checker.hs
Last active April 22, 2018 13:03
what happens when you write functional code without a type checker
Result:
sigma_elim (bool_elim (\a -> (\b -> (\c -> \d -> (\e -> \f -> \g -> pair true g) c tt d) ((\c -> (\d -> d d) (\d -> c (d d))) (\c -> (\d -> \e -> tt) c tt))) a ((\b -> (\c -> (\d -> (\e -> \f -> (\g -> g) (\g -> \h -> (\i -> i) ((\i -> (\j -> \k -> \l -> (\m -> m) (\m -> \n -> (\o -> (\p -> p) (sigma_elim (bool_elim m n))) (\o -> tt))) e tt f g ((\j -> \k -> j) h)) (\i -> f ((\j -> (\k -> \l -> \m -> pair false m) j tt tt) e))))) ((\e -> (\f -> f f) (\f -> e (f f))) (\e -> (\f -> \g -> tt) e tt)) ((\e -> \f -> \g -> f) ((\e -> (\f -> f f) (\f -> e (f f))) (\e -> (\f -> \g -> tt) e tt)) ((\e -> (\f -> f f) (\f -> e (f f))) (\e -> (\f -> \g -> tt) e tt))) d ((\e -> (\f -> (\g -> (\h -> \i -> (\j -> j) (\j -> \k -> (\l -> l) ((\l -> (\m -> \n -> \o -> (\p -> p) (\p -> \q -> (\r -> (\s -> s) (sigma_elim (bool_elim p q))) (\r -> tt))) h tt i j ((\m -> \n -> m) k)) (\l -> i ((\m -> (\n -> \o -> \p -> pair false p) m tt tt) h))))) ((\h -> (\i -> i i) (\i -> h (i i))) (\h -> (\i -> \j -> tt) h tt)) ((\h ->

Keybase proof

I hereby claim:

  • I am spiveeworks on github.
  • I am spivee (https://keybase.io/spivee) on keybase.
  • I have a public key ASApRE6pUTxdZDbiPWGJs0UGkZtYZnfx_MtRx8hCDuxG9go

To claim this, I am signing this object: