Skip to content

Instantly share code, notes, and snippets.

View kierdavis's full-sized avatar

Kier Davis kierdavis

View GitHub Profile
@kierdavis
kierdavis / kier-and-jacobs-game.txt
Created July 20, 2012 23:04
Sketchpad for some Roguelike game
ASCII grid based (but not necessarily restricted to the command-line)
Steampunk/industrial theme
Base library: SDL (https://github.com/banthar/Go-SDL)
Available colours:
These are the 16 standard colours available to the command line (termbox, ANSI escapes etc).
"Proper" (but more complex) libraries like SDL can use more colours but we want to restrict it
to these to keep it simple and retro.
@kierdavis
kierdavis / me-with-templates.squirtle
Created July 10, 2012 22:17
Prototype of template
template OnlineAccount(?label, ?accountName, ?accountServiceHomepage, ?accountProfilePage) is {
a foaf:OnlineAccount
rdfs:label ?label
foaf:accountName ?accountName
foaf:accountServiceHomepage ?accountServiceHomepage
foaf:isPrimaryTopicOf ?accountProfilePage
}
me { a foaf:Person
foaf:account OnlineAccount("My del.icio.us account", "kierdavis",
@kierdavis
kierdavis / me.squirtle
Created July 10, 2012 22:03
Squirtle syntax example
name <http://kierdavis.com/data/me> as me
name <http://kierdavis.com/data/projects> as projects
me { a foaf:Person
foaf:name "Kier Davis"
foaf:nick "kier", "kierdavis"
foaf:homepage <http://kierdavis.com/>
foaf:age 15
foaf:birthday "02-15"
foaf:mbox <mailto:[email protected]>
@kierdavis
kierdavis / DCPU-16.v
Created April 19, 2012 17:42
DCPU-16 implementation in Verilog
/*
General state machine operation:
ST_FETCH - Load instruction word
ST_LOADAREF - Decode operand_a into a_type and a_value components
ST_LOADA - Load a using a_type and a_value
ST_LOADB - Decode operand_b and load b
ST_DECODE - Distribute to ST_opcode
ST_opcode - Modify b, using a
ST_STORE - Store b into a's location using a_type and a_value
*/
@kierdavis
kierdavis / gist:1034725
Created June 19, 2011 20:42
Simple Brainf*ck Single-Digit Adder
++++++++++[>++++++>+++<<-]>++...>++.[-]<[-]<,>++++++[<-------->-]++++++++++[>+>++++++>+++<<<-]>.>++...>++.[-]<[-]<[-]<,>++++++[<-------->-]<[<+>-]++++++++++[>+>++++++++>+++++++++++>++++++++++>+++>++++++<<<<<<-]>.>++++.>+.+++++.>---.<--------.>>++.<++++++++.++++++++++.>>--.<.>[-]<[-]<[-]<[-]<[-]<[-]<++++++[<++++++++>-]<.