🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.text
Article #987

Re: sorting in troff(nroff)

#987
From: Roland Yap
Date: Tue, 29 Jul 1986 15:29
32 lines
1967 bytes
In article <719@basser.oz>, john@basser.oz (John Mackin) writes:
> In article <320@cord.UUCP> miker@cord.UUCP (Mike Roberson) writes:
> 
> > how can items be sorted in troff(nroff)?
> 
> ...
> 
> The insertion sort took 55 minutes of user-time on our 780 to sort
> a 300 element list; the merge sort does the same list in 17 minutes
> (and a 1000 element list in 72 minutes).  Bear in mind, people, troff
> isn't sort!  The insertion sort is far simpler and is perfectly adequate
> (and considerably faster) for small lists (say up to 20 or so elements
> on a 780).
> 
My feeling that this job would be much better done by a preprocessor to
[nt]roff. While one can write amazing (and convoluted) macros to
do almost anything, it is not really suitable for algorithms with
interation, arrays etc. Anyway as evidenced above it is rather slow!

It is probably quite easy to write a quick and dirty awk filter
as a preprocessor which may optionally call sort to do the dirty
work. Any volunteers?

	Roland.

-----------------------------------------------------------------------------
Roland Yap	           ACSNET,CSNET:roland@moncskermit.oz	
Dept. of Computer Science  ARPA:roland%moncskermit.oz@seismo.arpa	
Monash University          UUCP: ..!seismo!munnari!moncskermit.oz!roland	
Clayton     		  ...!{decvax,pesnta,vax135}!mulga!moncskermit.oz!roland
Australia 3168
                          moncsbruce can also be substituted for moncskermit
Technical Details
Message-ID: <348@moncskermit.oz>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!munnari!moncskermit!roland
References: <320@cord.UUCP> <719@basser.oz>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!munnari!moncskermit!roland
From: roland@moncskermit.oz (Roland Yap)
Newsgroups: net.text
Subject: Re: sorting in troff(nroff)
Message-ID: <348@moncskermit.oz>
Date: Tue, 29-Jul-86 11:29:24 EDT
Article-I.D.: moncsker.348
Posted: Tue Jul 29 11:29:24 1986
Date-Received: Thu, 31-Jul-86 23:52:51 EDT
References: <320@cord.UUCP> <719@basser.oz>
Organization: Comp Sci, Monash Uni, Australia
Lines: 32