Skip to content

Instantly share code, notes, and snippets.

@lynaghk
lynaghk / SketchSystems.spec
Last active August 7, 2018 17:28
# Test parallel spec.
# Test parallel spec.
Search Inactive
touch search bar -> Search Active
Search Active&
touch cancel -> Search Inactive
touch result -> View Result
text input -> Loading
@lynaghk
lynaghk / sudoku.als
Created July 18, 2018 11:39
Solving sudoku in alloy
enum V {v1, v2, v3, v4, v5, v6, v7, v8, v9}
sig Cell {
val: V,
row: V,
col: V
}
pred disjointSubgrid[rows: set V, cols: set V]{
@lynaghk
lynaghk / SketchSystems.spec
Created July 2, 2018 12:24
LoadingAnimation
LoadingAnimation
Loading
next -> AlmostDone
AlmostDone
next -> Finished
Finished
next -> App
App
@lynaghk
lynaghk / 0_readme.md
Last active June 27, 2018 11:13
Solving water pouring puzzle with Alloy

Water pouring puzzle

Given a 5 quart jug, a 3 quart jug, and unlimited supply of water, can you measure exactly 4 quarts? (The jugs are irregularly shaped, so you can't eyeball half the volume or anything like that.)

The solution involves pouring water between the jugs.

I wanted to see if I could solve this puzzle with Alloy. My first attempt (specific.als) hardcodes the two jugs as named relations. It solves the puzzle (finds a counterexample) in about 500ms.

@lynaghk
lynaghk / SketchSystems.spec
Last active June 19, 2018 11:25
Commenting
Commenting
# Comments are associated with the state/transition directly below them.
# Hover over the red circle in the diagram to read the comment as a tooltip.
A
B
C
@lynaghk
lynaghk / SketchSystems.spec
Created June 18, 2018 14:01 — forked from ryanlucas/SketchSystems.spec
Embedding Figma frames
Embedding Figma frames
Shop
click Tickets -> Tickets
Tickets
click Shop -> Shop
JSX example
@lynaghk
lynaghk / SketchSystems.spec
Created June 8, 2018 14:46
# A sketch with characters beyond ASCII
# A sketch with characters beyond ASCII
матрёшка
closed
α -> open
open
β -> closed
@lynaghk
lynaghk / First State.jpg
Last active June 7, 2018 11:43
My Awesome Sketch6
First State.jpg
@lynaghk
lynaghk / SketchSystems.spec
Last active May 31, 2018 15:05
My Awesome Sketch
My Awesome Sketch
First State
some event -> Second State
Second State