where to do line editing?

Brandon S. Allbery allbery at ncoast.UUCP
Sat Aug 20 09:44:59 AEST 1988


As quoted from <1259 at ficc.UUCP> by peter at ficc.UUCP (Peter da Silva):
+---------------
| Clipboards, in UNIX, can just be files. UNIX file I/O is very fast and
| efficient, thanks to some smart buffering. When you clip something, it
| can just do a regular save to a file named, oh, ~/clip. Make it an
| environment variable ($CLIPBOARD=~/clip). This way you don't have to
| duplicate code, and your clipboards are no longer volatile.
| 
| What's wrong with his picture?
+---------------

The use of a file implies that only one program is running at a time.  This
is UN*X, though -- all processes in a pipeline run concurrently.  ~/clip
would be utterly mangled.

I still think pipes/sockets are better.  The "clipboard" should exist, but
it should be more like the Mac "scrapbook" instead.  Including the ability to
store multiple resources.

+---------------
| > The best one can do with pipes
| > is implement the equivalent of MacBinary protocol on top of them, which is
| > doable but slows things down and makes the code bigger.
| 
| Why does it make the code bigger? Your program presumably has save and
| restore capability. Just have it save in IFF.
+---------------

Because MacBinary isn't a save/restore protocol, it's something that
currently sits on top of Xmodem and Kermit so they can transmit both
resources and data without using multiple files.

Can IFF handle CODE resources?  I can put one into the Clipboard with
ResEdit.  Most other Mac programs don't toss machine code around, though --
but imagine an interactive linker under Unix which allowed you to link in
subroutines through the clipboard as well as from files.  And it could be
done dynamically as well, if the resources were handled similarly to shared
libraries.

++Brandon
-- 
Brandon S. Allbery, uunet!marque!ncoast!allbery			DELPHI: ALLBERY
	    For comp.sources.misc send mail to ncoast!sources-misc



More information about the Comp.unix.wizards mailing list