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
module Runty | |
UNDENTERS = %w{ elsif end when rescue \} ] ) } | |
class << self | |
def process(str) | |
@istack = [0] | |
ls=str.split(?\n).select{|l|l=~/\w/} | |
ls.each_with_index do |l,i| | |
if indentation(l) > ilvl | |
wind l | |
elsif indentation(l) < ilvl |
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 Data.List | |
import Data.Char | |
import Data.Maybe | |
newtype Form = Form (String -> Bool) | |
(=~) :: String -> Form -> Bool | |
s =~ (Form f) = f s | |
splits :: String -> [(String,String)] |
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
#!/usr/bin/env scheme-script | |
(import (chezscheme)) | |
(define (S i) i) | |
(define (A i) (- i)) | |
(define (T n) (lambda (i) (+ n i))) | |
(define (apply-symmetry s t) | |
(if (pair? t) |
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 <string.h> | |
#include <stdio.h> | |
#include "wgc.h" | |
#define WGC_MEM_POOL_SIZE 1000 | |
#define WGC_REF_POOL_SIZE 256 | |
typedef struct ref { | |
char *data; | |
struct ref *next_root; |
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 Control.Monad | |
import Control.Applicative | |
import Data.List | |
-- "many" takes a datum and distinguishes it as an atom or a combination | |
-- "one" produces a value from an atom | |
-- "from" produces a value from a combination | |
-- "nothing" is the value of an "empty" combination (unit 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
{-# LANGUAGE Rank2Types, FlexibleInstances, MultiParamTypeClasses #-} | |
import Data.Set (Set, fromList, toList, intersection, union, empty, singleton) | |
import Control.Monad | |
import Control.Monad.Identity hiding (fix) | |
type MSet = forall m. (Monoid m, Ord m) => Set m | |
-- what's the math that underlies this ?? |
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
#!/usr/bin/env sh | |
cat <<OK | |
extralegal license * $1 | |
this license imposes no legal constraints on the use, duplication, or | |
modification of the covered material. however, it is the copyright holder's | |
intention that: | |
- any copy made of the material should include a copy of this license; and that |
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
#!/usr/bin/python3 | |
from functools import * | |
import random | |
import uuid | |
import math | |
from PIL import Image, ImageDraw, ImageColor | |
def count(zero, succ, n): | |
x = zero | |
for _ in range(n): |
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
CC := gcc | |
NAME := sixp | |
INSTALLDIR := /usr/local/bin | |
LIB := lib.6p | |
FIB := fib.6p | |
REPL := repl.6p | |
CFLAGS := -Og -g -Wall -Werror -Wpedantic -std=c11 | |
$(NAME): $(NAME).c |