Skip to content

Instantly share code, notes, and snippets.

View ds300's full-sized avatar
🏳️‍🌈

David Sheldrick ds300

🏳️‍🌈
View GitHub Profile
@ds300
ds300 / gist:6763496
Created September 30, 2013 13:02
Illustration of AST Visitor pattern. (This is bad java, just to give you an idea of how things fit together)
public abstract class BaseAST {
public abstract void accept(Visitor v);
}
public abstract class Visitor {
public abstract void visitBinOpNode(Expression lhs,
Op op,
Expression rhs);
public abstract void visitIdentNode(String ident);
}
@ds300
ds300 / gist:5758662
Last active December 18, 2015 08:59
JuggleGraph tips
# let's start with this:
siteswaplist = []
while len(siteswap) > 0:
if siteswap[0] == "a":
siteswaplist.append(10)
siteswap = siteswap[1:]
if siteswap[0] == "b":
siteswaplist.append(11)
siteswap = siteswap[1:]
@ds300
ds300 / 18-07-2012
Created July 18, 2012 13:02
error report
<?xml version="1.0" encoding="UTF-8" ?>
<testsuite failures="0" time="1.319" errors="1" skipped="0" tests="8" name="uk.ac.susx.mlcl.byblo.commands.ExternalCountCommandTest">
<properties>
<property name="java.runtime.name" value="Java(TM) SE Runtime Environment"/>
<property name="sun.boot.library.path" value="/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Libraries"/>
<property name="java.vm.version" value="20.8-b03-424"/>
<property name="awt.nativeDoubleBuffering" value="true"/>
<property name="gopherProxySet" value="false"/>
<property name="mrj.build" value="11M3720"/>
<property name="java.vm.vendor" value="Apple Inc."/>