Computer Old Farts Forum
 help / color / mirror / Atom feed
From: scj at yaccman.com (Steve Johnson)
Subject: [COFF] Editor Scripts
Date: Fri, 06 Jul 2018 11:27:06 -0700	[thread overview]
Message-ID: <9dadecbf12b9f0d8debe8fd7c8984401766fbb0a@webmail.yaccman.com> (raw)
In-Reply-To: <9f88f490-6d7f-e12d-bde2-e3410acd7a65@spamtrap.tnetconsulting.net>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 3102 bytes --]

What I used editor scripts for before utilities like sed came along
was primarily in what would now be called refactoring.
A common pattern for me was fo have a function foo that  took two
arguments and I wanted to add another argument.
Recall in those days that the arguments to a function had no type
information   foo( x, y ) would be followed by int x in the body of
the function.
Also, htere were no function prototypes.   So a very common error
(and a major motivation for writing Lint) was finding functions that
were
called inconsistently across the program.  

If I wanted to add an argument to foo, the first thing I would do is
run an editor script, something like

    1,$s/foo/old_foo/g
     w
     q

and apply it to all my source and header files.   Then I'd verify
that the resulting files compiled and ran.

Then I would take the definition of foo (now called old_foo), and
change it to its new form, with the
extra arguments, and rename it to foo.   Then I would grep my source
files for old_foo and change the
calls as needed.   Compiling would find any that I missed, so I
could fix them.

Sounds like a lot of work, but if you did it nearly every day it went
smoothly.

ed lent itself to scripts.  It was all ascii and line oriented.  
With glass teletypes came editors like vi.  Suddenly, a major
fraction of the letters typed were involved in moving a cursor
alone.  Also, vi wasn't as good at doing regular expressions as ed,
especially when lines were being joined   (this was later fixed). 
So editor scripts went from daily  usage to something that felt
increasingly alien.   The fact that you ccould see the code being
changed was good, but find the lines to change across a couple of
dozen files was much more time consuming...

Steve

PS:  There are IDEs that make quickly finding the definitions of a
function from its uses, or vice versa, much easier now.  But I think
it falls short of being an abstraction mechanism the way editor
scripts were...  In particular, you can't put such mouse clicks into
a file and run them on a bunch of tiles...

----- Original Message -----
From: "Grant Taylor" <gtaylor at tnetconsulting.net>
To:<coff at minnie.tuhs.org>
Cc:
Sent:Fri, 6 Jul 2018 10:10:24 -0600
Subject:Re: [COFF] Other OSes?

 On 07/05/2018 10:04 PM, Greg 'groggy' Lehey wrote:
 > It's really difficult to compare with Unix. I've tried several
times 
 > over the years, and I still haven't come to any conclusion.

 The impression that I got while reading your description made me
think 
 of distributed systems that use message bus(es) to communicate
between 
 applications on different distributed systems. Or at least the same 
 distributed IPC idea, just between parts of a single system, no (what
is 
 typically TCP/IP over Ethernet) network between them.

 Does that even come close? Or have I completely missed the boat?

 -- 
 Grant. . . .
 unix || die


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/coff/attachments/20180706/36f8fdf7/attachment.html>


  reply	other threads:[~2018-07-06 18:27 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-05  5:56 [COFF] Other OSes? wkt
2018-07-05  6:29 ` spedraja
2018-07-05  6:40 ` bakul
2018-07-05 15:23   ` clemc
2018-07-05 20:49     ` scj
2018-07-05 21:25       ` david
2018-07-06 15:42         ` gtaylor
2018-07-05 22:38       ` ralph
2018-07-05 23:11       ` bakul
2018-07-06  0:06         ` lm
2018-07-06 15:49           ` gtaylor
2018-07-06  0:52       ` tytso
2018-07-06  5:59         ` ralph
2018-07-06 15:59           ` gtaylor
2018-07-06 16:10             ` ralph
2018-07-06 16:47               ` gtaylor
2018-07-06 15:57         ` gtaylor
2018-07-06 15:38       ` gtaylor
2018-07-09  1:56         ` tytso
2018-07-09  3:25           ` gtaylor
2018-07-09  3:35             ` crossd
2018-07-09  3:43               ` gtaylor
2018-07-09  3:52                 ` imp
2018-07-09 11:32                   ` perry
2018-07-09 11:50                     ` perry
2018-07-09 11:34                 ` crossd
2018-07-09  5:23             ` tytso
2018-07-09 12:52               ` clemc
2018-07-09 13:06                 ` [COFF] PiDP Obsolesces Guaranteed clemc
2018-07-09 14:39                 ` [COFF] Other OSes? tytso
2018-07-09 14:46                   ` clemc
2018-07-09 11:24           ` perry
2018-07-05 22:51   ` ewayte
2018-07-08 20:31   ` perry
2018-07-08 20:53     ` perry
2018-07-09  2:44     ` crossd
2018-07-10  5:30       ` bakul
2018-07-16 14:49         ` crossd
2018-07-16 16:59           ` [COFF] Capabilities (was " bakul
2018-07-06  0:55 ` [COFF] " crossd
2018-07-06  5:42   ` bakul
2018-07-09  2:51     ` crossd
2018-07-10  5:41       ` bakul
2018-07-06  4:04 ` grog
2018-07-06 16:10   ` gtaylor
2018-07-06 18:27     ` scj [this message]
2018-07-06 19:04       ` [COFF] Editor Scripts gtaylor
2018-07-08 20:50 ` [COFF] Other OSes? perry
2018-07-08 23:27   ` bakul
2018-07-09  0:00     ` grog
2018-07-09  0:13       ` perry
2018-07-09  0:05     ` crossd
2018-07-09  0:56       ` lm
2018-07-09  2:23         ` crossd
2018-07-09  0:11     ` perry
2018-07-09  0:19       ` crossd
2018-07-09  2:00         ` bakul
2018-07-09  3:02           ` [COFF] Origination of awful security design [COFF, COFF] bill
2018-07-09 13:10           ` [COFF] Other OSes? david
2018-07-09 13:17           ` perry
2018-07-09 13:13         ` perry

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=9dadecbf12b9f0d8debe8fd7c8984401766fbb0a@webmail.yaccman.com \
    --to=coff@minnie.tuhs.org \
    /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).