Skip to content

Instantly share code, notes, and snippets.

#lang racket
(provide github-action
name
on
push
branches
pull_request
jobs
build
@aymanosman
aymanosman / show-how-equality-induction-works.rkt
Created March 5, 2020 23:55
There seams to be subtle differences between how the two inductive principles are set up in Coq vs Pie
#lang pie
(claim +
(-> Nat Nat
Nat))
(define +
(λ (a b)
(rec-Nat a
b
@aymanosman
aymanosman / use-cur-example.rkt
Created February 23, 2020 20:50
Example of using Cur
#lang cur
(require cur/ntac/base
cur/ntac/standard
cur/ntac/rewrite
cur/stdlib/sugar
cur/stdlib/nat
cur/stdlib/equality)
((ntac
@aymanosman
aymanosman / App.nested-stack.js
Created February 10, 2020 11:41
react-navigation-stack ModalPresentationIOS with nested stacks
import * as React from 'react';
import {View, Text, Button} from 'react-native';
import {NavigationNativeContainer} from '@react-navigation/native';
import {createStackNavigator, TransitionPresets} from '@react-navigation/stack';
function HomeScreen({navigation}) {
return (
<View style={{flex: 1, alignItems: 'center', justifyContent: 'center'}}>
<Text>Home Screen</Text>
<Button
@aymanosman
aymanosman / codesign.sh
Created January 3, 2020 09:43 — forked from Bogdanp/codesign.sh
Codesigning a Racket executable for inclusion in a macOS app
codesign --force \
--timestamp \
--entitlements="$CODE_SIGN_ENTITLEMENTS" \
--sign="$EXPANDED_CODE_SIGN_IDENTITY_NAME" \
-o runtime \
"${PROJECT_DIR}/Resources/core/lib/Racket.framework/Versions/7.5_3m/Racket"
codesign --force \
--timestamp \
--entitlements="$CODE_SIGN_ENTITLEMENTS" \
@aymanosman
aymanosman / chapter-15-Absurd.rkt
Created April 30, 2019 18:08
chapter-15-Absurd.rkt
#lang pie
;; Exercises on Absurd from Chapter 15 of The Little Typer
(claim +
(-> Nat Nat
Nat))
(define +
(λ (a b)
@aymanosman
aymanosman / chapter-15.rkt
Created April 30, 2019 18:08
chapter-15.rkt
#lang pie
(claim =consequence
(-> Nat Nat U))
(define =consequence
(lambda (n m)
(which-Nat n
(which-Nat m
Trivial