damn tweaks2
[lambda.git] / damn.mdwn
index ea42a57..1342254 100644 (file)
--- a/damn.mdwn
+++ b/damn.mdwn
@@ -45,7 +45,7 @@ and that evaluates to an ordered pair, and Scheme displays that ordered pair as
 
 There is an underlying reason why parentheses are used both when displaying the ordered pair, and also to mean "apply this function to these arguments." However, at this point, you may well see this as a confusing overloading of parentheses to fill different syntactic roles.
 
-Now what about the elements of our ordered pairs. Why do we say `(cons 'the 'man)`. Why are those single quotes there? Well, if you just said `(cons the man)`, Scheme would understand `the` and `man` to be variables, and it would complain that you hadn't bound these variables to any values. We don't want to build an ordered pair out of the values possessed by variables `the` and `man`. Instead, we want to just make up some dummy value THE to stand for the meaning of an object-language determiner, and some dummy value MAN to stand for the meaning of an object-language noun phrase. The notation `'the` is Scheme's way of representing a dummy, atomic value. Note there is no closing single quote, only a prefixed one. Scheme calls these dummy atomic values "symbols." That term is a bit misleading, because the symbol `'the` is not the same as the variable `the`. Neither is it the same as what's called the string `"the"`. The latter is a structured value, composed out of three character values. The symbol `'the`, on the other hand, is an atomic value. It has no parts. (The notation the programmer uses to designate this atomic value has four characters, but the value designated itself has no parts.) If you think this is all somewhat confusing, you're right. It gets easier with practice.
+Now what about the elements of our ordered pairs. Why do we say `(cons 'the 'man)`. Why are those single quotes there? Well, if you just said `(cons the man)`, Scheme would understand `the` and `man` to be variables, and it would complain that you hadn't bound these variables to any values. We don't want to build an ordered pair out of the values possessed by variables `the` and `man`. Instead, we want to just make up some primitive value THE to stand for the meaning of an object-language determiner, and some primitive value MAN to stand for the meaning of an object-language noun phrase. The notation `'the` is Scheme's way of designating a primitive atomic value. Note there is no closing single quote, only a prefixed one. Scheme calls these primitive atomic values "symbols." That term is a bit misleading, because the symbol `'the` is not the same as the variable `the`. Neither is it the same as what's called the string `"the"`. The latter is a structured value, composed out of three character values. The symbol `'the`, on the other hand, is an atomic value. It has no parts. (The notation the programmer uses to designate this atomic value has four characters, but the value designated itself has no parts.) If you think this is all somewhat confusing, you're right. It gets easier with practice.
 
 `'the` can also be written `(quote the)`. This is even more confusing, because here the `the` is not interpreted as a variable. (Try `(let* ((the 3)) (quote the))`.) If you come across this, just read `(quote the)` as a verbose (and perhaps misleading) way of writing `'the`, not as the application of any function to any value.
 
@@ -86,15 +86,16 @@ and that we can think of as the tree:
 
 Okay, let's get back to "damn."
 
-We start by defining `damn` as a "thunk" that when applied to 0 arguments returns a trivial adjectival meaning, which we'll designate with the dummy symbol `'id`.
+We start by defining `damn` as a "thunk" that when applied to zero arguments returns a trivial adjectival meaning, which we'll designate with the primitive symbol `'id`.
 
 What's a "thunk"?
 
-Remember, in Scheme you can have functions that take 1 value, and also functions that take 2 values, and also functions that take 0 values. The last ones are called "thunks." The thunk is not identical to the value it returns. For instance:
+Remember, in Scheme you can have functions that take one value, and also functions that take two values, and also functions that take zero values. The last ones are called "thunks." The thunk is not identical to the value it returns. For instance:
 
        (lambda () 3)
 
-is a thunk that returns the integer 3. If we bind the variable `t` to that thunk, then `t` is a function (Scheme will call it a "procedure") not an integer. Whereas `(t)` is an integer not a function.
+is a thunk that returns the integer 3. If we bind the variable `t` to that thunk, then `t` is a function (Scheme will display it as`#<procedure>`)
+not an integer. Whereas `(t)` is an integer not a function.
 
 There's no reason yet on hand for us to make `damn` be a thunk. For present purposes, we could also just define `damn` to be the symbol `'id`. But what we're going to go on to do does require us to make `damn` be a thunk. The reason for that is to postpone the evaluation of some expressions until the continuations we want to operate on are in place.
 
@@ -117,7 +118,7 @@ and we get back:
        ((the . man) . (read . (the . (id . book))))
 
 
-Now we want to get some expressive meaning into damn. So we might try:
+Now we want to get some affective meaning into damn. So we might try:
 
 
        (define damn (lambda () 'bad))
@@ -134,27 +135,30 @@ gives us:
 
        ((the . man) . (read . (the . (bad . book))))
 
-Which is not quite what we're looking for. We don't want to contribute the normal adjectival meaning of "bad" to the proposition asserted. Instead we want "bad" to be contributed as a linguistic move on the side. We might try:
+Which is not quite what we're looking for. We don't want to contribute the normal adjectival meaning of "bad" to the proposition asserted. Instead we want badness to be a side-issue linguistic contribution. We might try:
 
        (define damn (lambda () (cons 'side-effect 'bad)))
 
 But then we'd get:
 
-
        ((the . man) . (read . (the . ((side-effect . bad) . book))))
 
-And the context `(the . ( ... . book))` presumably doesn't know how to interact with side-effects. That's precisely the problem we're trying to solve.
+and we said at the outset that the context `(the . ( ... . book))` shouldn't need to know how to interact with affective meanings. That's precisely the problem we're trying to solve.
 
 
 A promising way to handle this is with **continuations**, which you will get much more familiar with as this seminar progresses. Don't worry about not understanding what's going on quite yet. This is just an advertisement that's supposed to provoke your imagination.
 
-Chris and others have applied the apparatus of continuations to the analysis of expressives in the papers linked above. For a simple in-class demonstration, we tried to do this.
+Chris and others have applied the apparatus of continuations to the analysis of expressives in the paper cited at the top. For a simple in-class demonstration, we tried to do the following.
 
-`(call/cc (lambda k ...))` is Scheme's way of writing: bind the continuation of this very complex expression to k and evaluate the `...`.
+       (call/cc (lambda k ...))
 
-So now we define `damn` like this:
+is Scheme's way of saying:
+       
+>      bind the continuation of this very complex expression to k and evaluate the `...`
 
 
+So now we define `damn` like this:
+
        (define damn (lambda () (call/cc (lambda (k) (print "bad") (k 'id)))))
 
 Now when we do:
@@ -169,7 +173,7 @@ we get something like this:
 
        <bold>"bad"</bad> ((the . man) . (read . (the . (id . book))))
 
-Yay! The expressive meaning has jumped out of the compositional evaluation of the main sentence, and the context `(the . (... . book))` only has to deal with the trivial adjectival meaning `'id`.
+Yay! The affective meaning has jumped out of the compositional evaluation of the main sentence, and the context `(the . (... . book))` only has to deal with the trivial adjectival meaning `'id`.
 
 **But.** As came out in discussion, the `print` we're using here already constitutes a kind of side-effect mechanism of its own. If you say:
 
@@ -183,11 +187,11 @@ you'll see something like:
 
        <bold>"hi"</bad> 5
 
-So the demonstration we tried in class was pedagogically flawed. It didn't properly display how continuations represent a minimally effective apparatus for representing expressive content. In fact, continuations were still doing the work, but it wasn't the explicit continuations we were writing out for you. It was instead continuations implicit in the `print` operation.
+So the demonstration we tried in class was pedagogically flawed. It didn't properly display how continuations are a minimally effective apparatus for representing affective meaning. In fact, continuations were still doing the work, but it wasn't the explicit continuations we were writing out for you. It was instead continuations implicit in the `print` operation.
 
 So a better demonstration would do without any device like `print` that already incorporates continuations implicitly. Any continuation-manipulation should be fully explicit.
 
-Instead of representing the side-issue expressive contribution by printing "bad", let's instead try to build a pair of side-effect contributions and main-issue assertion. Then what we want would be something like:
+Instead of representing the side-issue affective contribution by printing "bad", let's instead try to build a pair of side-effect contributions and main-issue assertion. Then what we want would be something like:
 
        ((side-effect . bad) . ((the . man) . (read . (the . (id . book)))))
 
@@ -199,7 +203,7 @@ Only we want to get this from the evaluation of:
                                          (cons (damn) 
                                                'book))))
 
-where `(damn)` doesn't have widest scope. And we don't want to have to recruit all the other semantic material into accepting and passing along a possible expressive argument.
+where `(damn)` doesn't have widest scope. And we don't want to have to recruit all the other semantic material into accepting and passing along a possible affective argument.
 
 How to do this?
 
@@ -250,7 +254,7 @@ Evaluating that gives us:
        ((the . man) . (read . (the . (id . book))))
 
 
-Now to pair that with an expressive side-issue content, we'd instead define `damn` as:
+Now to pair that with an affective side-issue content, we'd instead define `damn` as:
 
        (require racket/control) ; this tells Scheme to let us use shift and reset
        (define damn (lambda () (shift k (cons (cons 'side-effect 'bad) (k 'id)))))
@@ -318,13 +322,13 @@ We won't do much to explain this. We'll just leave it for you to chew on.
 
 
 ; Now if we use damn0, our compositional semantics will work OK but
-; we don't yet have any expressive contribution:
+; we don't yet have any affective contribution:
 
        (list "main content" 'i (list 'like (list 'the (damn0) 'boy)))
        ; '("main content" i (like (the id boy)))
 
 
-; If we use damn1, we've added in the expressive side-effect:
+; If we use damn1, we've added in the affective side-effect:
 
        (list "main content" 'i (list 'like (list 'the (damn1) 'boy)))
        ; '("main content" i (like (the (("side effect" bad) . id) boy)))