From: "Russ Cox" <rsc@swtch.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] page as a presentation tool
Date: Wed, 5 Nov 2003 05:28:34 -0500 [thread overview]
Message-ID: <E1AHKtu-0009O4-51@t40.swtch.com> (raw)
In-Reply-To: Your message of "Wed, 05 Nov 2003 11:25:47 EST." <200311051625.hA5GPmoY019949@localhost.localdomain>
> I should say I am using whatever version is in the ports tree
> on FreeBSD. Maybe there is a better version. I have noticed
> two ways in which it differs. One is that undo doesn't
> restore the dot. This is pretty annoying since I like to
> use succesive refinement to select text and I make a lot of
> mistakes. The other is the 'x' doesn't work quite as
> advertised in the paper. The relevant passage is
>
> Sam uses a two-pass algorithm for making changes,
> and treats each file as a database against which
> transactions are registered. Changes are not made
> directly to the contents. Instead, when a command
> is started, a `mark' containing a sequence number
> is placed in the transcript Buffer, and each change
> made to the file, either an insertion or deletion or
> a change to the file name, is appended to the end of
> the transcript. When the command is complete, the
> transcript is rewound to the mark and applied to
> the contents.
>
> One reason for separating evaluation from application
> in this way is to simplify tracking the addresses of
> changes made in the middle of a long sequence. The
> two-pass algorithm also allows all changes to apply
> to the original data: no change can affect another
> change made in the same command. This is particularly
> important when evaluating an x command because it
> prevents regular expression matches from stumbling
> over changes made earlier in the execution.
>
> I haven't looked at the source to see whether UNIX sam also uses
> the two pass algorithm, but it is certainly stumbling over changes
> made earlier in the execution.
The one at http://pdos.lcs.mit.edu/~rsc/software/plan9
builds from the current Plan 9 sources, which are really
not very far from the Unix ones. Undo definitely does
restore dot, though I wish samterm scrolled so you could
see it. And x seems to work, though I can't imagine why
it would be too different from the Unix one.
Russ
next prev parent reply other threads:[~2003-11-05 10:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-05 5:27 John Stalker
2003-11-05 0:08 ` Russ Cox
2003-11-05 7:45 ` Fco.J.Ballesteros
2003-11-05 21:55 ` jpc
2003-11-05 6:16 ` Scott Schwartz
2003-11-05 16:25 ` John Stalker
2003-11-05 10:28 ` Russ Cox [this message]
2003-11-05 21:36 ` John Stalker
2003-11-05 21:44 ` Rob Pike
2003-11-06 1:29 ` John Stalker
2003-11-07 7:03 ` okamoto
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1AHKtu-0009O4-51@t40.swtch.com \
--to=rsc@swtch.com \
--cc=9fans@cse.psu.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).