Skip to content

Instantly share code, notes, and snippets.

View jozefg's full-sized avatar

daniel gratzer jozefg

View GitHub Profile
@chrisdone
chrisdone / Drawing.hs
Last active October 7, 2017 09:12
Drawing language: first attempt
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -Wall #-}
-- Set your font to a monospace font which makes this character the same as the line-height: │
--
-- Otherwise, you'll see an ugly gap between connected lines if the
-- line-height of the font is high.
--
-- Example fonts:
--
@bishboria
bishboria / springer-free-maths-books.md
Last active October 3, 2024 09:17
Springer made a bunch of books available for free, these were the direct links
@jonsterling
jonsterling / lists.jonprl
Last active August 26, 2015 05:38
an example theory of lists in jonprl
||| Some handy notation:
Infix 2 "∈" := member.
||| First we define the option/maybe type constructor
Operator option : (0).
Postfix 10 "?" := option.
[A ?] =def= [A + unit].
Theorem option-wf : [{A:U{i}} A? ∈ U{i}] {
unfold <option>; auto
signature OPERATIONS =
sig
type 'a t
val default : unit -> 'a t
val enrich : ('b -> 'a option) -> 'b t * 'a t -> 'b t
end
structure UnitOperations : OPERATIONS =
struct
type 'a t = unit
@thedouglenz
thedouglenz / wiki.php
Last active August 29, 2015 14:18
Wikipedia information from the command line
#!/usr/bin/env php
<?php
/*
* A program to grab a quick summary of some topic from Wikipedia.
* Usage: wiki <subject>
*
* subject can contain spaces if, for example, it is more than one word.
* Examples
* `wiki cherry bomb`
* `wiki Hercules`
@plaidfinch
plaidfinch / SOP.hs
Last active August 29, 2015 14:12
Playing with sums of products
{-# LANGUAGE GADTs #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE FlexibleContexts #-}
@chrisdone
chrisdone / typing.md
Last active August 18, 2024 09:54
Typing Haskell in Haskell

Typing Haskell in Haskell

MARK P. JONES

Pacific Software Research Center

Department of Computer Science and Engineering

Oregon Graduate Institute of Science and Technology