Skip to content

Instantly share code, notes, and snippets.

View brainfuck.py
'''https://en.wikipedia.org/wiki/Brainfuck#Commands'''
import sys, mit
mit.State().globalize(globals())
def ass_inc(): ass(LIT_1); ass(ADD)
def ass_dec(): ass(LIT_1); ass(NEGATE); ass(ADD)
def ass_dup(): ass(LIT_0); ass(DUP);
def ass_over(): ass(LIT_1); ass(DUP);
def ass_loadb(): ass(LIT_0); ass(LOAD);
View keybase.md

Keybase proof

I hereby claim:

  • I am rrthomas on github.
  • I am rrt (https://keybase.io/rrt) on keybase.
  • I have a public key whose fingerprint is 2409 3F01 6FFE 8602 EF44 9BB8 4C8E F3DA 3FD3 7230

To claim this, I am signing this object:

@rrthomas
rrthomas / gist:7837e2bd90de80f2ca6b
Created Sep 19, 2014
PEG.js for numeric part of Metapolator's formula language
View gist:7837e2bd90de80f2ca6b
/*
* Parser for Metapolator CPS formula language
*/
{
var unaryOperators = {
'-': 'negate'
};
function $_(operator, right) {
@rrthomas
rrthomas / structure.js.diff
Created Sep 15, 2014
Show where things go wrong
View structure.js.diff
--- structure-orig.js 2014-09-15 23:38:55.631539473 +0100
+++ structure.js 2014-09-15 23:39:18.012519232 +0100
@@ -72,241 +72,243 @@
]
}
]
- }
- },
- {
- name: "master 2",
@rrthomas
rrthomas / structure.js
Last active Aug 29, 2015
Fixed up to be syntactically correct
View structure.js
app.controller("MetapolatorController", function($scope) {
$scope.project = {
projectName: "untitled document",
display: {
mode: ["glyphview", "paragraph", "", ""],
fontsize: 40,
lineHeight: 36
},
parameters: [
{
@rrthomas
rrthomas / Userscript to add Roman numerals to Facebook
Created Sep 6, 2013
A userscript for Greasemonkey to add Roman numerals to Facebook, intended for Latin users
View Userscript to add Roman numerals to Facebook
// ==UserScript==
// @name Roman numerals for Facebook
// @namespace http://userscripts.org
// @description Convert numbers on Facebook to Roman numerals (for Latin language setting)
// @include http*://*facebook.com/*
// @grant none
// @version 1
// ==/UserScript==
// Tweaked from http://stackoverflow.com/questions/9083037/convert-a-number-into-a-roman-numeral-in-javascript
View ggo-mode.el
;;; ggo-mode.el --- Gengetopt major mode
;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2013
;; Matthew K. Junker
;; Author: Matthew K. Junker <junker@alum.mit.edu>
;; Package-Version: 20130521
;; Keywords: extensions, convenience, local
;; This file is free software; you can redistribute it and/or modify
You can’t perform that action at this time.