Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

* UNIX is a Trademark of Bell Laboratories.


devel / comp.lang.postscript / Am I writing PostScript wrong?

SubjectAuthor
o Am I writing PostScript wrong?luser droog

1
Am I writing PostScript wrong?

<b43248c6-de22-4c14-8f34-5145c80357edn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=9969&group=comp.lang.postscript#9969

  copy link   Newsgroups: comp.lang.postscript
X-Received: by 2002:a37:b5c3:: with SMTP id e186mr11878630qkf.747.1637894792742;
Thu, 25 Nov 2021 18:46:32 -0800 (PST)
X-Received: by 2002:a05:6830:40b0:: with SMTP id x48mr24500121ott.279.1637894792493;
Thu, 25 Nov 2021 18:46:32 -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.lang.postscript
Date: Thu, 25 Nov 2021 18:46:32 -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: <b43248c6-de22-4c14-8f34-5145c80357edn@googlegroups.com>
Subject: Am I writing PostScript wrong?
From: luser.dr...@gmail.com (luser droog)
Injection-Date: Fri, 26 Nov 2021 02:46:32 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 34
 by: luser droog - Fri, 26 Nov 2021 02:46 UTC

(I asked a similar question in comp.lang.c wrt C)

I've been really hooked on the parser combinator stuff for a while
and I've implemented a dozen or so versions in PostScript. But having
questioned whether I'm writing C wrong by turning it into Lisp,
the question naturally follows: Is my PostScript code too Lisp-y?

I'm regularly relying on my "pairs" and "func" extensions described
here:
https://codereview.stackexchange.com/questions/193520/an-enhanced-syntax-for-defining-functions-in-postscript

And along with these come `combine` and `curry`. So there's a whole
lotta currying going on. But I also noticed that I may be needlessly
creating extra Lisp-ish structures where they aren't needed or helpful.

The big problems with my last round of test cases for the parsers was
due to creating results as cons lists. When I just stopped doing that
and did something more sensible from the PS point of view, the whole
problem smoothed out and fizzled.

But even now, I'm adding extra structure to wrap up the "reply" from
each parser as a single object. PostScript doesn't naturally impose
this restriction. You can just return multiple values by leaving
multiple values. Invisible tuples, so to speak.

So, I might try one more re-write to strip away the structure and
return

<result> <remainder> true
<message> <remainder> false

And that's almost the same as the `token` interface. So, it feels
like the right direction.

Is my lisp showing in other places?

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor