CS 330 Homework 2 – Trois Voix
See the PDF. I used https://ccrma.stanford.edu/courses/422/projects/WaveFormat/ when trying to understand the WAV protocol. You may find others helpful—post links in the comments.
CS 330 Homework 1 – Freql
See the PDF.
CS 330 Lecture 2 – Shell Scripts and Redirection
Agenda shell builtin variables interpolation custom variables reusing output meday custom scripts PATH permissions change extension 1+ files at a time command-line arguments resizing a bunch of images with convert checking for mail STDIN and STDOUT and STDERR output redirection pipes subshells The Unix way Doug McIlroy said: This is the Unix philosophy: Write programs that do […]
CS 330 Lecture 1 – Shello
Agenda meta shell basics echo, cat, bc, head, tail, cut, grep man pages paths changing working directories shell builtin variables tab completion interpolation custom variables reusing output PATH command-line arguments Who are you? Name? Where from? Last unassigned book you read? If not computers, what? Setting your shell I’m not certain what your shell program is. […]
CS 330 – Programming Languages
Information Syllabus Enrollment: 49 RSS feed Lectures Homeworks Exams
CS 330 – Programming Languages
Information Syllabus Enrollment: 43 RSS feed Lecture Homework Post mortems
CS 330 Lecture 40 – Shell scripting, or Why I love Linux
Agenda shell scripting programs are methods speed and terseness caters to file manipulation globbing loops I/O redirection some problems resizing a bunch of images comparing two directories change extensions on a bunch of files checking for new mail sending spam finding big files preparing code for blog posts Code shrinken.sh #!/bin/sh mkdir -p dialup_friendlies for […]
CS 330 Lecture 39 – Logic programming
Agenda atoms and variables facts and rules a path in a graph? Prolog’s DFS algorithm even or odd? member? sorted? notmember? hascycle? Code pdb.pl lang(scheme). lang(c). static(c). staticlang(X) :- lang(X), static(X). /* Graph stuff */ edge(a, b). edge(b, e). edge(b, d). edge(c, d). path(X, Y) :- edge(X, Y). path(X, Y) :- edge(X, Z), path(Z, Y). […]
CS 330 Lecture 38 – Gollygeo, a complete ANTLR/C++ project
Agenda not much for today an extended example! no haiku even Gollygeo We want to write a little geography quizzer. The player is dropped into a country and must identify its capital and neighbors before she can leave. To win (an education), the player must clear all countries. The author/level designer can draft up “maps” […]
CS 330 Lecture 37 – Sundries
Agenda more on hijacking a language applicative- vs. normal-order evaluation writing an if macro macros in C dangers of normal-order evaluation of expressions with side-effects list ranges list comprehensions lazy evaluation TODO http://www.cse.chalmers.se/~rjmh/Papers/whyfp.pdf http://www.haskell.org/haskellwiki/Why_Haskell_matters Code macros.ss (define myif (lambda (predicate? true-expr false-expr) (cond (predicate? 1) (else 0)))) (define-syntax spiffy (syntax-rules () ((spiffy predicate? true-expr false-expr) […]