This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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()] |
This file contains hidden or 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 "lib/runtime.glsl" | |
float sierpinski(int x, int y) { | |
return (x & y) == 0 ? 0.0 : 1.0; | |
} | |
void program(inout vec3 color) { | |
vec2 pos = gl_FragCoord; | |
float pixel = sierpinski(int(pos.x), int(pos.y)); | |
color = vec3(pixel); | |
} |
This file contains hidden or 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
data Graph a = Vert a [Graph a] deriving (Show) | |
consStarGraph :: (Num a) => Integer -> a -> Graph a | |
consStarGraph 0 m = Vert m [] | |
consStarGraph n m = Vert m edges where | |
edges = map (\k -> consStarGraph 0 (m + fromInteger k) ) [1..n] | |
addPoint :: Graph a -> Graph a -> Graph a | |
addPoint (Vert m edges) point = Vert m (point : edges) |
This file contains hidden or 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
hashMap.c:60:19: error: ISO C90 forbids mixing declarations and code | |
[-Werror,-Wdeclaration-after-statement] | |
struct hashLink* bkt; | |
^ |
This file contains hidden or 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
/* ENTER YOUR FIRST AND LAST NAME: */ | |
/* TO COMPILE: gcc -Wall -ansi -o prog Group1.c */ | |
/* TO RUN, ENTER SIZE OF BAG */ | |
/* FOR EXAMPLE: ./prog 10 */ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <assert.h> |
This file contains hidden or 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 <stdio.h> | |
#include <assert.h> | |
struct Link { | |
int value; | |
struct Link * next; | |
}; | |
struct ListStack { | |
struct Link * sentinel; |