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
#!/usr/bin/env ruby | |
# Requires ImageMagick: `brew install imagemagick` | |
# Requires version.sh from https://gist.github.com/osteslag/1089407 | |
# | |
# Set RGM_STAMP_VERSION_ON_ICONS=1 in your build settings to enable/disable | |
# stamping on Debug/Relase configurations. | |
# | |
# Make base unstamped versions Icon.base.png, &c. in the source tree. The | |
# script will make stamped versions Icon.png, &c. It relies on Xcode to copy |
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
1. 6:36:14 UBC Triathlon Club ( 39:38) | |
2. 6:42:49 ICBC Head Office ( 40:17) | |
3. 6:48:07 HootSuite ( 40:49) | |
4. 6:56:15 Knight Piesold Ltd ( 41:38) | |
5. 7:04:21 Ainsworth Engineered ( 42:27) | |
6. 7:04:29 PMC Sierra ( 42:27) | |
7. 7:05:11 TELUS Lemurs ( 42:32) | |
8. 7:06:34 BGC ENGINEERING ( 42:40) | |
9. 7:07:06 SD#23 SUNRUNNERS ( 42:43) | |
10. 7:10:26 Ledcor Group ( 43:03) |
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 (has-cycle? ls) | |
(define (has-cycle-h tortoise hare) | |
(cond ((null? hare) #f) | |
((null? (cdr hare)) #f) | |
((eq? (car tortoise) (car hare)) #t) | |
(else | |
(has-cycle-h (cdr tortoise) (cddr hare))))) | |
(cond ((null? ls) #f) | |
(else (has-cycle-h ls (cdr ls))))) |
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
;; pure smoke immutable cons | |
(define cons | |
(lambda (x y) | |
(lambda (m) (m x y)))) | |
(define car | |
(lambda (x) | |
(x (lambda (a d) a)))) |
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
;; SICP 3.3.4 - Constraint system | |
(define (for-each-except exception procedure list) | |
(define (loop items) | |
(cond ((null? items) 'done) | |
((eq? (car items) exception) (loop (cdr items))) | |
(else (procedure (car items)) | |
(loop (cdr items))))) | |
(loop list)) |
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 (eval exp env) | |
(cond ((self-evaluating? exp) exp) | |
((variable? exp) (lookup-variable-value exp env)) | |
((quoted? exp) (text-of-quotation exp)) | |
((assignment? exp) (eval-assignment exp env)) | |
((definition? exp) (eval-definition exp env)) | |
((if? exp) (eval-if exp env)) | |
((lambda? exp) (make-procedure (lambda-parameters exp) | |
(lambda-body exp) | |
env)) |
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
diff --git a/metacircular.scm b/metacircular.scm | |
index 20542d1..97632e5 100644 | |
--- a/metacircular.scm | |
+++ b/metacircular.scm | |
@@ -10,26 +10,43 @@ | |
env)) | |
((begin? exp) (eval-sequence (begin-actions exp) env)) | |
((cond? exp) (eval (cond->if exp) env)) | |
- ((application? exp) (apply (eval (operator exp) env) | |
- (list-of-values (operands exp) env))) |
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 (eval exp env succeed fail) | |
((analyze exp) env succeed fail)) | |
(define (analyze exp) | |
(cond ((self-evaluating? exp) (analyze-self-evaluating exp)) | |
((variable? exp) (analyze-variable exp)) | |
((quoted? exp) (analyze-quoted exp)) | |
((assignment? exp) (analyze-assignment exp)) | |
((definition? exp) (analyze-definition exp)) | |
((if? exp) (analyze-if exp)) |
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
diff --git a/nondeterministic.scm b/nondeterministic.scm | |
index 1fab899..52e5b73 100644 | |
--- a/nondeterministic.scm | |
+++ b/nondeterministic.scm | |
@@ -1,5 +1,5 @@ | |
-(define (eval exp env) | |
- ((analyze exp) env)) | |
+(define (eval exp env succeed fail) | |
+ ((analyze exp) env succeed fail)) | |
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
;; SICP 4.4 Query Interpreter | |
;; http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-29.html#%_sec_4.4 | |
;; scheme -load logic.scm | |
;; ================================================== | |
;; 0 table data structure, see 3.3.3 | |
;; ================================================== | |
(define (make-table) | |
(let ((local-table (list '*table*))) |