Skip to content

Instantly share code, notes, and snippets.

@EricFromCanada
EricFromCanada / tigerbrew-node-config.command
Last active Feb 25, 2019
Configure an OS X system as a Tigerbrew test node.
View tigerbrew-node-config.command
#!/bin/bash
# ====================================================================
# tigerbrew-node-config.command
#
# Configure an OS X system as a Tigerbrew test node.
# Assumes that Developer Tools & Remote Desktop Client are installed.
# Only tested on 10.4 and 10.5 so far.
#
# @EricFromCanada
@EricFromCanada
EricFromCanada / gist:9941779
Created Apr 2, 2014
Extends and simplifies the built-in XML type
View gist:9941779
// THE XML_TREE TRAIT
define xml_tree_trait => trait {
provide attr() => {
local(out = map)
with attr in .attributes
do #out->insert(#attr->name = #attr->value)
return #out
}
@EricFromCanada
EricFromCanada / pi_generator.lasso
Created Nov 6, 2013
Using Lasso to generate π to 800 places, including the decimal point. Based off Dik T. Winter's C implementation of Beeler et al. 1972, Item 120 (http://crypto.stanford.edu/pbc/notes/pi/code.html).
View pi_generator.lasso
#!/usr/bin/lasso9
define generatePi => {
yield currentCapture
local(r = array(), i, k, b, d, c = 0, x)
with i in generateSeries(1, 2800)
do {
#r->insert(2000)
}