Skip to content

Instantly share code, notes, and snippets.

View oubiwann's full-sized avatar
💭
🌌

Duncan McGreggor oubiwann

💭
🌌
View GitHub Profile
@oubiwann
oubiwann / 01-validation.clj
Created October 30, 2012 00:03
Agents in Clojure, Part II
(def read-agent (agent "" :validator string?))

The MUSH Room

Default Content

You are in a large, low-lit, warm room. The floor and walls are soft but firm, with a bit of a bounce. There is a distinctive odor about the place

Exits

@oubiwann
oubiwann / README.md
Last active August 29, 2020 23:35
Setting Up an MIT CADR Machine (emulation)
@oubiwann
oubiwann / medley.md
Last active August 26, 2020 21:39 — forked from grav/medley.md
Getting Interlisp-D running with Medley on Debian 3.1

Interlisp-D / Medley on Debian 3.1

About

The image that runs Interlisp-D and Medley on Linux seems to actually be a Workbench for Lexical Functional Grammar. I can only guess that this is a customisation of the Medley programming environment ...

Steps

  1. Install or download VirtualBox
@oubiwann
oubiwann / README.md
Last active February 11, 2020 14:03
Clojure Components Demo

demo

Clojure Components Demo

Download

$ git clone https://gist.github.com/oubiwann/32a11597ea641fdb1dc6 \
    components-demo
@oubiwann
oubiwann / ring.lfe
Last active December 14, 2019 00:43
Ring Benchmark in Lisp Flavored Erlang
;; The code below was translated from the Erlang ring benchmark hosted
;; at http://benchmarksgame.alioth.debian.org, written by Jiri Isa and
;; optimized by Shun Shino:
;; http://goo.gl/5YOjg3
;;
;; The LFE version split the logic of the above-mentioned Erlang code
;; into more functions for increased clarity.
;;
(defmodule ring
(export
@oubiwann
oubiwann / openstack_foundation_affiliations.py
Created August 1, 2012 18:18
A quick hack to tally OpenStack Member affiliations
from pprint import pprint
from urllib2 import urlopen
from bs4 import BeautifulSoup
soup = BeautifulSoup(urlopen("http://www.openstack.org/community/members/").read())
bullets = soup.find_all("li")
affiliations = [x.text.split("(")[1].split(")")[0].lower().strip()
for x in bullets if "(" in x.text]
@oubiwann
oubiwann / joes-fav.lfe
Last active July 22, 2019 21:59
Joe Armstrong's Favorite Erlang Program... in LFE
(defmodule joes-fav
(export all))
(defun universal-server ()
(receive
((tuple 'become server-function)
(funcall server-function))))
(defun factorial
((0) 1)
@oubiwann
oubiwann / convert.py
Created October 14, 2012 01:27
WMA to MP3 Conversion for Mac OS X
#!/usr/bin/python
import os
import re
import subprocess
import sys
# script configuration
if sys.platform == "darwin":
MPLAYER_PATH = os.path.join(