Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

<Skyhook> Where is 'bavaria' proper? I thought it was austria. -- Seen on #Linux


devel / comp.compilers / Re: Do people build things using little languages any more?

SubjectAuthor
* Do people build things using little languages any more?Roger L Costello
`- Re: Do people build things using little languages any more?Kaz Kylheku

1
Do people build things using little languages any more?

<22-07-002@comp.compilers>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=490&group=comp.compilers#490

  copy link   Newsgroups: comp.compilers
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end
From: costello@mitre.org (Roger L Costello)
Newsgroups: comp.compilers
Subject: Do people build things using little languages any more?
Date: Mon, 4 Jul 2022 14:11:03 +0000
Organization: Compilers Central
Lines: 29
Sender: news@iecc.com
Approved: comp.compilers@iecc.com
Message-ID: <22-07-002@comp.compilers>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 8bit
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970";
logging-data="29128"; mail-complaints-to="abuse@iecc.com"
Keywords: design, question
Posted-Date: 04 Jul 2022 13:31:21 EDT
X-submission-address: compilers@iecc.com
X-moderator-address: compilers-request@iecc.com
X-FAQ-and-archives: http://compilers.iecc.com
Accept-Language: en-US
Content-Language: en-US
 by: Roger L Costello - Mon, 4 Jul 2022 14:11 UTC

Hi Folks,

I am reading the "Little Languages and Tools" book. (I can't remember who, on
this list, recommended the book, but whoever it was thank you! It is an
awesome book!)

The first chapter was written by Jon Bentley. Incredible writer! The thing
that struck me most from reading his chapter is that writing little tools
(using little languages such as AWK, Lex, Yacc, pic (picture language),
scatter (scatter plot language), troff, sed) and then assembling them together
via pipes, e.g.,

scatter infile | pic | troff >outfile

is a powerful way to quickly get robust tools implemented.

My impression is that this style of development is no longer in vogue. Today's
developers want to use big languages like Java and Python and implement large,
monolithic tools/application.

That's sad.

To my way of thinking the old style of development is far superior.

But perhaps I am wrong. Perhaps today's developers are implementing
tools/applications using the old style. What say you? Do you use the old style
of implementing tools/applications?

/Roger

Re: Do people build things using little languages any more?

<22-07-003@comp.compilers>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=491&group=comp.compilers#491

  copy link   Newsgroups: comp.compilers
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end
From: 480-992-1380@kylheku.com (Kaz Kylheku)
Newsgroups: comp.compilers
Subject: Re: Do people build things using little languages any more?
Date: Tue, 5 Jul 2022 01:57:27 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 44
Sender: news@iecc.com
Approved: comp.compilers@iecc.com
Message-ID: <22-07-003@comp.compilers>
References: <22-07-002@comp.compilers>
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970";
logging-data="53679"; mail-complaints-to="abuse@iecc.com"
Keywords: design
Posted-Date: 05 Jul 2022 10:43:52 EDT
X-submission-address: compilers@iecc.com
X-moderator-address: compilers-request@iecc.com
X-FAQ-and-archives: http://compilers.iecc.com
 by: Kaz Kylheku - Tue, 5 Jul 2022 01:57 UTC

On 2022-07-04, Roger L Costello <costello@mitre.org> wrote:
> Hi Folks,
>
> I am reading the "Little Languages and Tools" book. (I can't remember who, on
> this list, recommended the book, but whoever it was thank you! It is an
> awesome book!)
>
> The first chapter was written by Jon Bentley. Incredible writer! The thing
> that struck me most from reading his chapter is that writing little tools
> (using little languages such as AWK, Lex, Yacc, pic (picture language),
> scatter (scatter plot language), troff, sed) and then assembling them together
> via pipes, e.g.,
>
> scatter infile | pic | troff >outfile

The problem with this is that, for instance, I can't use a clever
troff macro to generate input foir scatter or pic, because they
are earlier in the pipeline. Unless maybe I cob together some
sort of multi-pass hack.

The Lisp macro approach for small domain languages is superior;
all macros are expanded by the same code walker, and can nest
with each other.

Pipes are wasteful; everything has to convert to the character level and
be sent to the operating system (several buffer copies), and then
lexically analyzed again.

How pic should have been designed is not as a separate pipeline element
that just recognizes some pic commands and produces "pic-free" output
fed to troff, but as a utility program which provides services invoked
by a package of pic macros executed by troff.

Like say you just want something simple, like use troff's .if/.el to
conditionally select a picture. Because pic runs first, it will be
oblivious to the conditional and wastefully process the picture
specification in both branches.

That might even be a nonstarter: say that you want the pic code to
refer to some files, but only the files for the taken branch of the
..if/.el actually exist.

Speaking of macros, pic wastefully implements its own macro language,
and one which is quite different from the troff one.

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor