This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define construct-environment | |
Globals -> [do | (global-load-sequence Globals)]) | |
(define global-load-sequence | |
[] -> [] | |
[Name | Names] -> [[set Name (construct-value (value Name))] | |
| (global-load-sequence Names)]) | |
(define atom? | |
X -> (or (boolean? X) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The following is in Node, but Firefox has the same behavior | |
$ node --version | |
v0.10.26 | |
tinker:~ greg$ node | |
> var x = {"z": 0, "2": 1, "0": 2, "a": 3, "-3": 4, "b": 5, "-5": 6, "1": 7} | |
undefined | |
> Object.keys(x) | |
[ '0', | |
'1', | |
'2', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Send the paste-buffer to the open command | |
bind u run-shell "tmux show-buffer | xargs open" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scala.collection.immutable.Queue | |
val q = Queue(1, 2, 3) | |
// When pattern matching against a sequence, the sequence wildcard _* | |
// can be used as the last pattern and will match an arbitrary number of | |
// elements. To bind the matched sequence to a variable, use the form | |
// `x @ _*`: | |
val restSeq = q match { case Queue(x, xs @ _*) => xs } | |
// --> rest: Seq[Int] = Queue(2, 3) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
= Some document | |
== Huzzah | |
[source,ruby] | |
---- | |
# This should be ruby code | |
1.times do | |
puts "hello world" | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Testing KLamba specification compliance of: | |
Shen 2010, copyright (C) 2010 Mark Tarver | |
released under the Shen license | |
www.shenlanguage.org, version 11 | |
running under Common Lisp, implementation: CLisp | |
port 1.5 ported by Mark Tarver | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Atoms: | |
a string | |
is self-evaluating | |
a symbol | |
is self-evaluating | |
may include any of the legal characters for symbol | |
may begin with any legal character other than a digit | |
may not begin with a digit | |
numbers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Hash | |
# Returns a new hash that does not contain the specified keys | |
# | |
# {:a => 1, :b => 2, :c =>3, :d => 4}.without(:a, :b) | |
# => {:c=>3, :d=>4} | |
def without(*keys) | |
dup.tap { |h| keys.each { |k| h.delete(k) } } | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gspurrie-mn:proj% rvm use ruby-1.8.7@rspec_bug --create | |
Using /Users/gspurrie/.rvm/gems/ruby-1.8.7-p352 with gemset rspec_bug | |
gspurrie-mn:proj% gem install bundler | |
Fetching: bundler-1.0.21.gem (100%)1.0.21.gem | |
Successfully installed bundler-1.0.21 | |
1 gem installed | |
Installing ri documentation for bundler-1.0.21... | |
Installing RDoc documentation for bundler-1.0.21... | |
gspurrie-mn:proj% gem install rails |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gspurrie-mn:~% rvm --version | |
rvm 1.6.2 by Wayne E. Seguin ([email protected]) [https://rvm.beginrescueend.com/] | |
gspurrie-mn:~% rvm install ree-1.8.6 | |
Installing Ruby Enterprise Edition from source to: /Users/gspurrie/.rvm/rubies/ree-1.8.6-20090610 | |
ree-1.8.6-20090610 - #fetching (ruby-enterprise-1.8.6-20090610) | |
ree-1.8.6-20090610 - #extracting ruby-enterprise-1.8.6-20090610 to /Users/gspurrie/.rvm/src/ree-1.8.6-20090610 | |
ree-1.8.6-20090610 - #installing | |
Removing old Rubygems files... |
NewerOlder