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
#lang racket | |
(require rsound) | |
(require rsound/reverb-typed) | |
(play | |
(rs-filter | |
(rs-read (build-path (collection-path "rsound") "examples" "speaking.wav")) | |
reverb)) |
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
(require rsound) | |
(require 2htdp/image) | |
(require 2htdp/universe) | |
(define (s sec) (* sec 44100)) | |
(define samp (rs-read "/tmp/waaoow-chorus.wav")) | |
;; a world is (make-world nat frames) |
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
(require racket/list) | |
;; a world is (make-world component component component component | |
;; component component component component | |
;; component component component component | |
;; component component component component) | |
(define-struct world (c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 c16)) | |
;; change the c1 field of a world to the new value | |
;; world any -> world |
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
;; TEAM BYTE ME | |
;; int list -> list | |
;; takes a list and a number and returns a list with the length of the number | |
(define (create_list l n) | |
(cond | |
[(= n 0) empty ] | |
[else (cons (first l) (create_list (rest l) (sub1 n))) | |
])) |
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
;; a state is a number | |
;; add the two numbers to the state | |
(define (state-update state a b) | |
(+ state a b)) | |
(define my-state 234) | |
;; either: |
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
(require 2htdp/universe) | |
(require 2htdp/image) | |
;; a 16-bools is a list of booleans of length 16 | |
;world -> world | |
;; a world is (make-world 16-bools) | |
;a world is (make-world boolean boolean boolean boolean) | |
(define-struct world (bools)) |
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
#| | |
_ | |
_____ _____ _ ___ ___ | | | |
| __| ___ ___ ___ ___ _____ ___ ___ | __| ___ |_|| _|| _||_| ___ | |
|__ || . || .'|| _|| -_|| || .'|| | |__ || . || || _|| _| |_ -| | |
|_____|| _||__,||___||___||_|_|_||__,||_|_| |_____|| _||_||_| |_| |___| | |
|_| |_| | |
_____ _ _ _____ _ | |
| __||_| ___ ___ | | | __| _ _ _____ ___ | |_ ___ ___ _ _ | |
| __|| || || .'|| | |__ || | || || . || || . || || | | |
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
#lang racket/base | |
(require test-engine/racket-tests) | |
(require racket/list) | |
;; YIKES! you clearly wrote the function before the tests, because what you have below | |
;; is just nuts. Specifically, you have a table that maps strings to ... tables! | |
;; Let's rewrite those test cases first: | |
(check-expect (add-stat (add-stat (hash) '("a" "b" "c")) '("a" "b" "d")) | |
(hash "a" 2 "b" 2 "c" 1 "d" 1)) |
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
######################### | |
# .gitignore file for Xcode4 / OS X Source projects | |
# | |
# Version 2.0 | |
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects | |
# | |
# 2013 updates: | |
# - fixed the broken "save personal Schemes" | |
# | |
# NB: if you are storing "built" products, this WILL NOT WORK, |
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
device:~/tryrust/build (git)-[master]- clements> /usr/local/bin/rustc /tmp/foo.rs | |
dyld: lazy symbol binding failed: Symbol not found: __ZN10lang_start20haf38a73a4ecfd9abKoeE | |
Referenced from: /usr/local/bin/rustc | |
Expected in: x86_64-apple-darwin/stage1/lib/rustlib/x86_64-apple-darwin/lib/libnative-4e7c5e5c.dylib | |
dyld: Symbol not found: __ZN10lang_start20haf38a73a4ecfd9abKoeE | |
Referenced from: /usr/local/bin/rustc | |
Expected in: x86_64-apple-darwin/stage1/lib/rustlib/x86_64-apple-darwin/lib/libnative-4e7c5e5c.dylib | |
zsh: trace trap /usr/local/bin/rustc /tmp/foo.rs |