Ken Sharp <ken.sh...@artifex.com> writes:

> On 17/03/2025 16:43, David Kastrup wrote:
>
>>> Well nothing ever is, is it ? On-going maintenance is part of the
>>> deal. The problem here is that you want us to take on that task.
>>
>> That is the point of an API: provide a stable interface to defined
>> functionality that doesn't need to change along with changes in the
>> implementation.
>
> And the code in pdf2dsc.ps wasn't using an API, nor is the code in the
> 'dsc' file.

The code in the DSC file conformed to the same structure over decades.
That's what made it effectively be an API, a specification that one
could confine oneself to cater to and that continued working.

> Both are simply using chunks of the old PDF interpreter, again
> undocumented and so surely not part of an API.

Sigh.  It was completely irrelevant what the DSC contained as long as it
contained the respective page comments and was structured into start,
page sections, and end.

How the stuff between the DSC comments looked was irrelevant to us.  All
that mattered were the "entry points".

That is what an API is about.  At least in that respect there was a wide
latitude between what versions of Ghostscript could be paired with what
versions of preview-latex.

> The pdf2dsc.ps file was a utility, hence why it was in 'lib'. Not what
> I would describe as an 'API'. Code in here doesn't form part of
> Ghostscript, but might be usefully used with it.

Again, where the pdf2dsc.ps file was or how it was categorized was
irrelevant to us.  The interface preview-latex uses is the pdf2dsc
command line utility.

> I removed it because it was misleading, used old deprecated code, and
> didn't appear to work.

Everything apart from "didn't appear to work" would not appear to affect
our use.

>> That separates maintenance of the calling code from maintenance of
>> the called code and provides dependable spheres of responsibility.
>>
>> We cannot perform that task for Ghostscript.
>
> Not asking you to, but you want us to maintain a utility which you
> rely on ?

One conclusion from this discussion appears to be that there isn't _any_
interface to Ghostscript's PDF page rendering functionality that people
are supposed to depend on, and that having such an interface would not
be viewed as a comprehensible desire.  Which in turn is a puzzlement to
me.

I am sure I must be misunderstanding something on a fundamental level
here.

> I'll create a new program which produces a 'dsc' file that works as I
> think it should and you can all shout at me afterwards.

With luck, there will be no incentive to.

-- 
David Kastrup

Reply via email to