Skip to content

Instantly share code, notes, and snippets.

View chrisamaphone's full-sized avatar

Chris Martens chrisamaphone

View GitHub Profile
nat : type.
z : nat.
s : nat -> nat.
eq : nat -> nat -> type.
refl : eq N N.
%abbrev foo = [x:nat] refl.
% the above typechecks at
@chrisamaphone
chrisamaphone / pathtiles.lp
Last active October 23, 2023 22:05
loopy-tiles
% Goal: tiles have paths that connect any of 8 corners/midpoints
% of the square.
anchor(up;down;left;right;ul;ur;lr;ll).
#const max=9.
dim(0..max).
% anchor adjacency
adj(up,ur).
adj(ur,right).
#const width=10.
dim(1..width).
tile_type(water;floor;gem;tree;player).
1 {at(X,Y,T) : tile_type(T)} 1
:- dim(X), dim(Y).
#show at/3.
#const width=10.
#const height=10.
#const min_solve_length = 33.
dim(1..width).
tile_type(water;floor;gem;tree;player).
1 {at(X,Y,T) : tile_type(T)} 1
:- dim(X), dim(Y).
#const width=10.
#const height=10.
#const min_solve_length = 33.
dim(1..width).
tile_type(water;floor;gem;tree;player).
1 {at(X,Y,T) : tile_type(T)} 1
:- dim(X), dim(Y).
#const width=10.
#const height=10.
#const min_solve_length = 33.
dim(1..width).
tile_type(water;floor;gem;tree;player).
1 {at(X,Y,T) : tile_type(T)} 1
:- dim(X), dim(Y).
Thirty minute workout, yoga & bodyweight based, no equipment.
5 MINUTES: Warm-up
Start by lying on your back, arms at your sides.
Inhale deeply through your nose, and exhale through your mouth, 3-5 times.
Hug your knees to your chest (keep your head on the mat).
Roll back and forth like a log across your lower back to massage it.
Do any of the following that feel good:
SHRDLU Demo v2.0 log:
Please email this file to santi.ontanon@gmail.com to help improve this game!
63 Qwerty: Hello human!
306 Qwerty: Do you hear me?
393 >hello
475 Qwerty: Good!
521 Qwerty: You are awake
776 Qwerty: Please, do not move
821 Qwerty: I need to do an analysis
@chrisamaphone
chrisamaphone / readme.txt
Created November 13, 2018 03:56
Lasers [main branch] (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
[Metric("Gold to Enemies Ratio")]
public static float GoldToEnemies(object map)
{
ChunkyLevel sl = (ChunkyLevel)map;
int gold = 0;
int enemies = 0;
for (int i = 0; i < sl.tiles.GetLength(0); i++)
{
for (int j = 0; j < sl.tiles.GetLength(1); i++)
{