Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Emotions are alien to me. I'm a scientist. -- Spock, "This Side of Paradise", stardate 3417.3


devel / comp.unix.shell / PostScript as a unix shell tool

SubjectAuthor
o PostScript as a unix shell toolluser- -droog

1
PostScript as a unix shell tool

<498739e9-eec9-45a9-8a3a-77dc1d0a17ean@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=4840&group=comp.unix.shell#4840

  copy link   Newsgroups: comp.unix.shell
X-Received: by 2002:ac8:5b01:: with SMTP id m1mr40485201qtw.313.1641235025718;
Mon, 03 Jan 2022 10:37:05 -0800 (PST)
X-Received: by 2002:ac8:5c11:: with SMTP id i17mr40657877qti.669.1641235025512;
Mon, 03 Jan 2022 10:37:05 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.unix.shell
Date: Mon, 3 Jan 2022 10:37:05 -0800 (PST)
Injection-Info: google-groups.googlegroups.com; posting-host=97.87.183.68; posting-account=G1KGwgkAAAAyw4z0LxHH0fja6wAbo7Cz
NNTP-Posting-Host: 97.87.183.68
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <498739e9-eec9-45a9-8a3a-77dc1d0a17ean@googlegroups.com>
Subject: PostScript as a unix shell tool
From: mijo...@yahoo.com (luser- -droog)
Injection-Date: Mon, 03 Jan 2022 18:37:05 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 29
 by: luser- -droog - Mon, 3 Jan 2022 18:37 UTC

[separately posted to comp.lang.postscript bc gg won't crosspost]

I cooked up this little example for a thread in comp.lang.forth
about "RPN languages of the future".

$ cat toolbag.ps
%!
<<
/each-line { 1 dict begin {proc src}{exch def}forall
src type /stringtype eq { /src src (r) file store } if
{ src 1024 string readline {proc}{pop exit} ifelse } loop
end }
/contains { search { pop pop pop true }{ pop false } ifelse }
/map { 1 index xcheck 3 1 roll [ 3 1 roll forall ] exch {cvx} if }
/reduce { exch dup first exch rest 3 -1 roll forall }
/first { 0 get }
/rest { 1 1 index length 1 sub getinterval }
>> begin

$ gsnd -q -dNOSAFER toolbag.ps -c '[(toolbag.ps){(a)contains{1}{0}ifelse}each-line]{add}reduce = quit'
6 $ gsnd -q -dNOSAFER toolbag.ps -c '[(toolbag.ps){(a)contains{1}if}each-line]length = quit'
6

Perhaps an

$ alias gsq='gsnd -q -dNOSAFER'

would help, too.

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor