Skip to content

Instantly share code, notes, and snippets.

Eli Rose erose

Block or report user

Report or block erose

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
erose / crash-the-haskell-typechecker.hs
Created Dec 9, 2019
The simplest way I know of to crash/hang the Haskell typechecker using UndecidableInstances.
View crash-the-haskell-typechecker.hs
-- Inspired by and
-- See the latter for a well-paced
-- introduction to what's going on in general.
-- Allows one type parameter to a class to be fully determined by the type of another.
{-# LANGUAGE FunctionalDependencies #-}
-- The head of an instance declaration may mention arbitrary nested types.
{-# LANGUAGE FlexibleInstances #-}
erose /
Last active Oct 29, 2019
Recurse Center application code -- symbolic differentiation
from typing import *
import sys
import re
def differentiate(expression: List[str], with_respect_to: str) -> List[str]:
# We do the differentiation in one pass, then simplify the result.
first_pass = [_differentiate_single_term(t, with_respect_to) for t in expression]
simplified = _simplify_expression(first_pass)
return simplified
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
items: [
{time: moment()},
{time: moment().subtract(1, 'day')},
sortProperties: ['time'],
sortedItems: Ember.computed.sort('items', 'sortProperties'),
erose / adapters.application.js
Created May 10, 2017
ObjectProxy DS.HasMany
View adapters.application.js
import Adapter from "ember-data/adapters/json-api";
export default Adapter.extend();
erose / decrypt_cookie.rb
Created Apr 24, 2017
Decrypt a Rails 5 session cookie
View decrypt_cookie.rb
You can’t perform that action at this time.