Skip to content

Instantly share code, notes, and snippets.

View gmorpheme's full-sized avatar

Greg Hawkins gmorpheme

View GitHub Profile
@gmorpheme
gmorpheme / convert_to_yaml.shell
Last active February 21, 2019 13:47
Little (single file or shell) examples of using eucalypt (https://curvelogic.co.uk/eucalypt)
aws ec2 describe-regions | eu

Keybase proof

I hereby claim:

  • I am gmorpheme on github.
  • I am gmorpheme (https://keybase.io/gmorpheme) on keybase.
  • I have a public key ASD6meSaRAfAHUSUwt_AfFZ4fq7G6mnkqb0QoQRqBTezbAo

To claim this, I am signing this object:

@gmorpheme
gmorpheme / cont.clj
Last active August 29, 2015 14:14
Translation of Chapter 3 of Lisp in Small Pieces into Clojure
(ns ^{:doc "Loose translation of evaluator from chapter three
of Lisp in Small Pieces into Clojure."}
lispic.chapter3.cont
(:refer-clojure :exclude [invoke])
(:require [clojure.test :refer [deftest is]]))
(declare evaluate wrong)
(defn wrong [& args]
(println args)
@gmorpheme
gmorpheme / lisp3.clj
Created April 7, 2014 11:26
From Lisp in Small Pieces chapter 2
(ns ^{:doc "The lisp_3 evaluator from ch2 of Lisp in Small Pieces"}
lisp.chapter2.lisp3
(:refer-clojure :exclude [extend]))
(defn wrong [& msgs]
(throw (RuntimeException. (apply str (interpose " " msgs)))))
(defprotocol IEnvironment
(lookup [_ k]
"Retrieve value of k in environment."))
@gmorpheme
gmorpheme / eval.clj
Created March 1, 2014 17:27
Lisp in Small Pieces of Clojure - chapter one
(ns ^{:doc "Evaluator from ch1 of lisp in small pieces. Warning:
NON-IDIOMATIC clojure!"}
lisp.chapter1.eval
(:refer-clojure :exclude [extend]))
(defn wrong [& msgs]
(throw (RuntimeException. (apply str msgs))))
;; -- runtime support, environments are represented as a seq of pairs,
;; -- stored in an atom. Non-idiomatic but faithful to the book.