Skip to content
View uKanren.scala
* An implementation of microKanren (and probably most of miniKanren), with
* a few extras. Currently, it supports:
* - The essential core of microKanren: Unify, Fresh, Disjunction, Conjunction
* - Standard terms: Variables, Atoms, TermCons, EmptyTerm.
* - An implicit conversion from type T to Atom[T]. This makes writing programs
* much easier.
* - A decent reifier, which converts terms to strings.
View fizzbuzz.s
// FizzBuzz in x86 assembly - written on 32-bit Linux using the GNU ASsembler
.asciz "Fizz"
.asciz "Buzz"
.asciz "\n"
// strtoa stores its data here. Since FizzBuzz runs 1-100, it won't need more than 3 bytes
View crowd.html
<canvas id="canvas" width="600" height="600">
</canvas> </br>
Method: <input id="algorithm" type="text"> </input> <br/>
Timestep (Hz): <input id="timestep" type="text"> </input> <br/>
<input id="start_stop" type="button" value="Start" onclick="run()"> </input> <br/>
View usm
set -u
USAGE='Usage: usm COMMAND ...
usm help
usm init
usm copy-script
usm set-current SOFTWARE VERSION
This implements a fairly simple expression language via a Pratt-style parser.
The language supports fairly standard floating point literals, such as:
Converts a tree of wiki pages into a tree of HTML pages.
from collections import defaultdict
import configparser
import glob
import itertools
import os, os.path
import re
import shutil
# This is free and unencumbered software released into the public domain.
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commercial, and by any
# means.
# In jurisdictions that recognize copyright laws, the author or authors
# of this software dedicate any and all copyright interest in the
# software to the public domain. We make this dedication for the benefit
Inserts C code directly into Python files, which can then be dynamically linked
in and called via ctypes.
import atexit
import ctypes
import os
import shlex
import sys
import tempfile
View curses.js
* An implementation of an API similar to ncurses, but which instead runs on
* HTMl5 canvas.
* Specifically, this is designed to duplicate the following elements of ncurses:
* - Basic text printing
* - Colors
* - Handling window hierarchies, which respect their parents bounds (so that
* drawing doesn't occur outside of a window's boundaries). They have their own
View mop.js
* A small meta-object protocol for describing a Python-like class system in
* Javascript.
* In this MOP, objects are (at bottom) represented as a mapping of three things:
* - a list of parent classes
* - a list representing the object's MRO
* - a mapping of attribute names to attributes
Something went wrong with that request. Please try again.