


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
An introduction to a thumbtack jump game and emacs tutorial. The thumbtack jump game involves arranging thumbtacks on a board and jumping them according to certain rules to leave only one thumbtack in the center. The emacs tutorial covers the basics of scheme programming, including self-evaluating expressions (numbers, booleans, and strings) and compound expressions (combinations and special forms). Students will learn about the evaluator, symbol table, and name/value table, as well as simple and compound expressions. Useful for university students studying computer science or programming.
Typology: Slides
1 / 4
This page cannot be seen from the preview
Don't miss anything!
Lecture 1: Introduction and Basic Scheme
We were handed a piece of cardboard with 32 thumbtacks arranged in a cross pattern with one hole left empty in the very center. The object was to have only one thumbtack left in the middle of the cardboard after executing thumbtack jumps (similar in rules to jumping pieces on a checkerboard; no diagonal jumps, only in the cardinal directions, and the jumped tacks get removed). O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O Below is a list of supplied smaller moves to aid us in the bigger puzzle. The circles represent the thumbtacks, while the dots represent holes in the board. Jumps may only be executed using the spaces shown.
Macros
The “T”
Find patterns: which pattern when; composition of patterns simplifies problems.
There was a similar game on the back of the board. We were instructed to use the “T” macro and another macro listed below the image of the puzzle:
Additional Macro:
Emacs The mode line is the black highlighted line that has the characters **Edwin: scheme The minibuffer is the region where emacs asks questions and gets answers. The first in-class assignment was saved under class1.scm Some commands not listed in the handout (Edwin-cheat.txt), also commands that were mentioned out loud and may still be listed in handout:
Saving file C-x, C-s Asterisks indicate that the file has been modified since it was last saved Undo C–x, u Switching buffers C–x, b Evaluate C-x, C-e Escape Whatever C-g Emacs Tutorial C-h, t <= worth looking try out
Value
Scheme
Expression – text input by the programmer and sent to the evaluator (with C-x, C-e) Value – result computed by the evaluator when it works on an expression
For every expression, there is a rule to evaluate it and produce a value. Almost every expression has a value (excepting cases covered by 6.001).
Two types of expressions: simple and compound.
(if #t 1 2) if true-ish, then 1, else 2 (not #f)
(if 3 1 2) => 1 (if 0 1 2) => 1 (if + 1 2) => 1
Experiments with names:
Name value foo 4
fooÆ 4 bar Æ fo Æerror Not in table, produces error D debug, q quit