Skip to content

Instantly share code, notes, and snippets.

View liamoc's full-sized avatar

Liam O'Connor liamoc

View GitHub Profile
[{"contents":[0,"A Holbert PL Semantics Exercise"],"tag":"Heading"},{"contents":"This is a series of small exercises designed to help you get familiar with Holbert. So that you will not need to type cumbersome prefix notation, we define some syntax here.","tag":"Paragraph"},{"contents":[2,"_/\\_","LeftAssoc"],"tag":"SyntaxDecl"},{"contents":[1,"_\\/_","LeftAssoc"],"tag":"SyntaxDecl"},{"contents":[5,"not_","NonAssoc"],"tag":"SyntaxDecl"},{"contents":[0,"_BExp","NonAssoc"],"tag":"SyntaxDecl"},{"contents":[0,"_IExp","NonAssoc"],"tag":"SyntaxDecl"},{"contents":[1,"if_then_else_","LeftAssoc"],"tag":"SyntaxDecl"},{"contents":[0,"_Bool","NonAssoc"],"tag":"SyntaxDecl"},{"contents":[0,"_eval_","NonAssoc"],"tag":"SyntaxDecl"},{"contents":[0,"_eval","NonAssoc"],"tag":"SyntaxDecl"},{"contents":[0,"_|->_","NonAssoc"],"tag":"SyntaxDecl"},{"contents":[0,"_~=_","NonAssoc"],"tag":"SyntaxDecl"},{"contents":[0,"let_in_","NonAssoc"],"tag":"SyntaxDecl"},{"contents":[1,"The Language I of Boolean Decisions"],"tag":"Heading"},{"cont

A few thoughts below about this anonymous person threatening two female academics in my area. Roopsha for complaining about discrimination at Perdue where she was denied tenure (for speaking up?) and Talia for vocally supporting her.

I think this person is awful and feel for both Roopsha and Talia for receiving such threats. Opinion aside, they are pointing to potential problems in the tenure system and potential harms that can come from complaining about sexism and discrimination.

This could be valuable information. From an information theoretic perspective, information identifying the reasons for systems not to operate as we want them is valuable in learning how to improve the systems. With that said, what are the shortages this person identified?

First, they are describing a potentially problematic structure communities that can cause major harm in speaking up. Namely, small communities with lots of friendships (conflicts of interest) and how in such structure criticising powerful entities could result

  1. Install rosetta, command line tools, etc.
  2. install gnu tar, gnu coreutils and bash from brew.
  3. compile this dylib https://github.com/yairchu/macos11-haskell-workaround
  4. clone ghcjs 8.6 branch and submodules
  5. install ghc 8.6 and cabal-install 2.4 with ghcup
  6. Edit the ghcup ghc wrapper script to add the dylib to DYLD_INSERT_LIBRARIES before invoking ghc
  7. Edit the ./ghc/aclocal.m4 and remove the underscore before AC_
  8. Edit the ./utils/makePackages.sh to use the brew-installed bash
  9. Run the makePackages script
  10. Run cabal install, have a cup of tea
@liamoc
liamoc / Fun.lean
Last active October 5, 2022 07:09
section
parameters {α : Type}
variable [ a_dec : decidable_eq α]
include a_dec
open nat
definition replicate (a : α) : ℕ → list α
| 0 := []
| (succ n) := a :: replicate n
module bugreport where
open import Data.Nat
open import Data.Bool hiding (_≟_)
open import Relation.Nullary
⸤_⸥ : {A : Set} → Dec A → Bool
⸤ yes _ ⸥ = true
⸤ no _ ⸥ = false
@liamoc
liamoc / gist:d1295c91607e5bc9d2db
Created September 27, 2015 13:22
Quickcheck properties
Tests
basics
arbitrary instance: wf(l): OK (0.04s)
+++ OK, passed 5000 tests.
take, drop
take
commutativity: take n ∘ take m ≡ take m ∘ take n: OK (1.57s)
+++ OK, passed 5000 tests.
accumulativity: take m ∘ take n ≡ take (m ⊓ n): OK (1.54s)
+++ OK, passed 5000 tests.
@liamoc
liamoc / 2048.el
Created April 16, 2014 17:39
Graphical enhancement to 2048-game.el.
;;; 2048.el --- play 2048 in Emacs (updated graphical version)
;; A mild extension for graphical improvements on the 2048-game.el
;; by Liam O'Connor to the game 2048 implemented in emacs by
;; Zachary Kafner
;; Copyright 2014 Zachary Kanfer
;; Author: Zachary Kanfer <zkanfer@gmail.com>
;; Version: 2014.03.27
@liamoc
liamoc / FakeWebFramework.hs
Created October 2, 2012 09:34
Fake Haskell routing DSL
{-# LANGUAGE GADTs, KindSignatures #-}
module FakeWebFramework (add , notActuallyAWebFramework, get, Handler', link) where
import UrlPath
import Control.Monad.Writer
import Data.Maybe
maybeRead :: (Read a) => String -> Maybe a
maybeRead s = case reads s of
[(x, "")] -> Just x
@liamoc
liamoc / gist:3643591
Created September 5, 2012 19:58
Type-safe sum types in C
// needs -fnested-functions. Can be done without, but makes the whole thing a lot more cumbersome
// and less useful.
#include <stdio.h>
#define my_data_alts ( void (*A)(int) , void (*B)(int, int) , void (*C)(char, int) )
#define make_my_data(n) void n my_data_alts
typedef void (*my_data) my_data_alts;
void show(my_data match) {
@liamoc
liamoc / gist:3187282
Created July 27, 2012 10:18
Yaml example
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Data.Yaml
import System.Environment
import Control.Applicative
data Whatever = Foo { courses :: [String], required :: Int } deriving Show
instance FromJSON Whatever where