Skip to content

Instantly share code, notes, and snippets.

View robsimmons's full-sized avatar

Robert J. Simmons robsimmons

View GitHub Profile
@robsimmons
robsimmons / rope.ts
Created September 25, 2017 16:20
Typescript discriminated unions example (ropes)
// A non-empty rope is either a leaf (string) or a node with two children
// that are both non-empty ropes
interface Tagged<T> {
tag: T;
}
type RopeNode =
| Tagged<"node"> & {
left: RopeNode;
right: RopeNode;
@robsimmons
robsimmons / main.ts
Last active June 13, 2018 21:12
Typescript issue
import { hammock } from "@calculemus/oli-hammock";
//import * as widgets from "@calculemus/oli-widgets";
import { Set } from "immutable";
type box = { value: string; correct: boolean };
const emp = { value: "", correct: false };
function renderBox(box: box, id: string) {
$(`#${id}`).val(box.value);
if (box.value === "" || box.correct) {
#### First proof I wrote ####
Given ~A & ~B
[ Suppose A | B
[ Suppose A
~A # By conjunction elimination left with (2)
F ] # By negation elimination with (5) and (4)
[ Suppose B
~B # By conjunction elimination right with (2)
F ] # By negation elimination with (8) and (7)
F ] # By disjunction elimination with (3), (4-6), (7-9)
@robsimmons
robsimmons / word-obscurity-dump-1-2023-01-29.csv
Last active January 29, 2023 18:28
First public data dump from the word obscurity project, http://obscure.lamdera.app
first_word second_word first_much_more_familiar first_more_familiar about_the_same second_more_familiar second_much_more_familiar
a axion 1 0 0 0 0
a chase 1 0 0 0 0
a decal 1 0 0 0 0
a desire 1 0 0 0 0
a dowry 0 0 1 0 0
a drying 1 0 1 0 0
a grandfathers 1 0 0 0 0
a grate 2 0 0 0 0
a halve 1 0 0 0 0
Programming Language Checklist
by Colin McMillen, Jason Reed, and Elly Fong-Jones, 2011-10-10.
For the Dusa programming language, https://dusa.rocks/docs
You appear to be advocating a new:
[ ] functional [ ] imperative [ ] object-oriented [ ] procedural [ ] stack-based
[ ] "multi-paradigm" [ ] lazy [x] eager [ ] statically-typed [x] dynamically-typed
[x] pure [ ] impure [ ] non-hygienic [ ] visual [ ] beginner-friendly
[ ] non-programmer-friendly [ ] completely incomprehensible