This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Ficu where | |
import Text.Parsec | |
( anyChar, | |
char, | |
noneOf, | |
oneOf, | |
between, | |
choice, | |
many1, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
proc convShape() {} | |
iter regions(dom: domain(2,int), k: int, stride: int) { | |
const (h,w) = convShape(dom.shape,k,stride,padding=0); | |
for (i,j) in {0..#h,0..#w} { | |
yield dom[i * k * stride..#k,j * k * stride..#k]; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INCLUDE Irvine32.inc | |
; #define MAX_ITER 45 | |
; int main() { | |
; int n; | |
; int m; | |
; int tmp; | |
; int i; | |
; i = 0; | |
; n = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Control.Applicative ( Alternative(empty, (<|>)) ) | |
newtype Branch s a = Branch (s -> [(a,s)]) | |
branch :: (s -> [(a,s)]) -> Branch s a | |
branch = Branch | |
run :: Branch s a -> (s -> [(a,s)]) | |
run (Branch f) = f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const float rt = sqrt(2.); | |
float anim(float speed) { | |
return (.5*sin(iTime * speed)) + 0.5; | |
} | |
const vec3 paint = vec3(0.17, 0.55, 0.70); | |
void mainImage( out vec4 fragColor, in vec2 fragCoord ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Prelude hiding (lookup) | |
import Control.Monad (join) | |
import Data.Functor ((<&>)) | |
type Name = String | |
data Type | |
= TLit Name | |
| TFun Type Type |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifdef GL_ES | |
precision mediump float; | |
#endif | |
uniform sampler2D u_buffer0; | |
uniform sampler2D u_buffer1; | |
uniform vec2 u_resolution; | |
uniform vec2 u_mouse; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Generated from my lambda calculus implementation in Haskell | |
;; Iain: plz read this https://eecs490.github.io/notes/theory.html | |
(lambda (f) ((lambda (x) (f (x x))) (lambda (x) (f (x x))))) | |
(lambda (f) (lambda (x) (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (f (x)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const sharp = require('sharp'); | |
const fs = require('fs').promises; | |
const SVG = require('@svgdotjs/svg.js'); | |
const main = async () => { | |
const buffer = await fs.readFile(__dirname + '/dist/img/sprites/svg/bella-day.svg'); | |
// sharp(buffer).resize().toFormat('png').toFile('bella.png'); | |
const bufferString = buffer.toString(); | |
const draw = SVG.SVG(); | |
const out = draw.svg(bufferString); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(([http, fs]) => fs.readdir([__dirname, 'public'].join('/')) | |
.then(names => names.map(name => fs.readFile([__dirname, 'public', name].join('/')) | |
.then(contents => [name, contents]))) | |
.then(promises => Promise.all(promises)) | |
.then(pairs => [new Map(), pairs]) | |
.then(([assets, pairs]) => [assets, pairs.map(pair => assets.set(...pair))].shift()) | |
.then(assets => [ | |
assets, | |
[...assets.keys()] |
NewerOlder