From 1b45955f0feaf96c4fa8111cf39dd0a0ee1411ec Mon Sep 17 00:00:00 2001 From: Jim Pryor Date: Wed, 15 Sep 2010 11:48:38 -0400 Subject: [PATCH] damn tweaks11 Signed-off-by: Jim Pryor --- damn.mdwn | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/damn.mdwn b/damn.mdwn index f25308a8..33912ffd 100644 --- a/damn.mdwn +++ b/damn.mdwn @@ -159,7 +159,7 @@ But then we'd get: '((the . man) . (read . (the . ((side-effect . bad) . book)))) -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. +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. Let's use continuations @@ -167,7 +167,7 @@ Let's use continuations 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 paper cited at the top. For a simple in-class demonstration, we tried to do the following. +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, here's what we tried to do. (call/cc (lambda (k) ...)) @@ -196,7 +196,7 @@ We get something like this: "bad" '((the . man) . (read . (the . (id . book)))) -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`. +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 @@ -248,7 +248,7 @@ It's not immediately clear how to do it with "undelimited" continuations, of the The idea here is we capture the continuation that the thunk `(damn)` has when it gets evaluated. This continuation is bound to the variable `k`. We supply `'id` as an argument to that continuation. When the main, at-issue tree is all built, then we return a pair `((side-effect bad) AT-ISSUE-TREE)`. -However, this doesn't work. The reason is that an undelimited continuation represents the future of the evaluation of `(damn)` *until the end of the computation*. So when `'id` is supplied to `k`, we go back to building the at-issue tree until we're finished *and that's the end of the computation*. We never get to go back and evaluate the context `(cons (cons 'side-effect 'bad) ...)`. +However, this doesn't work. The reason is that an undelimited continuation represents the future of the evaluation of `(damn)` *until the end of the computation*. So when `'id` is supplied to `k`, we go back to building the at-issue tree until we're finished *and that's the end of the computation*. We never get to go back and evaluate the context `(cons (cons 'side-effect 'bad) <>)`. With undelimited continuations @@ -380,7 +380,7 @@ We won't do much to explain this. We'll just leave it for you to chew on. (list "main content" 'i (list 'like (list 'the (damn1) 'boy))) ; '("main content" i (like (the (("side effect" bad) . id) boy))) -; However, the context (list 'the ... 'boy) is now being asked to operate +; However, the context (list 'the <> 'boy) is now being asked to operate ; on an element (("side effect" bad) . id), and it may complain it doesn't ; know what that is. It knows how to use 'id to get (list 'the 'id 'boy), ; and how to use 'bad to get (list 'the 'bad 'boy), but we're supposed to -- 2.11.0