Re: encapsulating directory operations

Liste des GroupesRevenir à cl c 
Sujet : Re: encapsulating directory operations
De : mutazilah (at) *nospam* gmail.com (Paul Edwards)
Groupes : comp.lang.c
Date : 23. May 2025, 00:16:59
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <100ob9f$3n9m3$1@dont-email.me>
References : 1 2 3
User-Agent : Microsoft Outlook Express 6.00.2800.1106
"Keith Thompson" <Keith.S.Thompson+u@gmail.com> wrote in message
news:87bjrkxonr.fsf@nosuchdomain.example.com...

Hi Keith.

I can now see a series of disconnects.

But hopefully now I can articulate the issue.

"Paul Edwards" <mutazilah@gmail.com> writes:
"Keith Thompson" <Keith.S.Thompson+u@gmail.com> wrote in message
news:87a575zvmb.fsf@nosuchdomain.example.com...
Hi Keith.
>
First - thanks a lot of teasing out an unstated assumption.
>
I am often operating on a set of assumptions. But I don't
list them upfront because I don't actually know what
they are.
>
Are you sure - given the constraints - that a different interface
isn't appropriate?
>
I have not said or implied that the POSIX directory interface is the
only appropriate one.  It does have the considerable advantage that it
already exists.
>
My advice is to study and understand existing solutions before
inventing
your own.  I can't offer meaningful advice on what's appropriate for
your language.
>
I have now been given two pointers. Common Lisp,
and C++ 17. Do you have any comment based on
your knowledge of those?
>
You've been given at least three; you didn't mention POSIX.

No. That's not a language standard. Only in Common Lisp
and C++ 17, so far mentioned, has the actual language
standard - rightly or wrongly - another outstanding question -
was it right or not? - covered directories.

The POSIX interface (readdir et al) happens to be the one I'm most
familiar with.  In fact it's pretty much the only one I'm familiar with.
I have no comment on the others.
>
As I've said before, I don't think your idea of doing directory access
via fopen() is practical.

Sure. You explained that operations on directories are
different from operations on files, and it would nominally
be wrong to shoehorn directory access into a FILE
stream.

I didn't see anyone dispute that.

Although having said that - if FILE is a misnomer and really
means STREAM - perhaps directory access is also a stream,
and some streams require additional operations, e.g. streamMkdir().

Changing existing library implementations is not significantly easier
than changing existing compiler implementations.  There are open source
implementations of both.
>
And here you have managed to tease out the unstated assumption.
>
I can and do use closed-source compilers like Microsoft C 6.0
and Visual Studio 2022.
>
They produce fantastic code.
>
But I bring my own library to the table - PDPCLIB. I basically
never use Microsoft's library. Or Watcom or anyone else.
>
If you're going to stick with existing C90 compilers, it seems
to me that all you need for your purposes is an add-on library.

Here's the first disconnect.

Yes - I already have an add-on library - that's the folder.c and
folder.h I referenced in the beginning. And unistd.h would be
another.

But neither of these are in C23. Nor were they in C90.
I want a slight variation to BOTH of those standards,
and for the next ISO standard - C30 or whatever -
to include that slight variation.

(I didn't previously state this, because I wasn't aware
of it, again)

Apparently PDPCLIB is that library.

No. PDPCLIB is just one of many, many C90-compliant
libraries.

All your talk of defining
a new language based on C90 (whether you call it C90+, or C91,
or whatever), as far as I can tell, is not useful.

I apologize for not having the ability to express myself.
I can only see in hindsight what the issues are.

In this case, the plan is that my "add-on library", is so
small, and so useful, and hopefully so popular, that it
gets standardized into a theoretical C30, as well as
existing C90 libraries - including but not limited to
PDPCLIB - updated to include this new feature, that,
in hindsight, should have existed even in K&R C.

C has *always* been designed to work with libraries in addition to
the standard library.  POSIX is just one example.  Win32 is another.
And there are countless other libraries, large and small.  You don't
want to change the core language (Section 6 of the standard).
You don't need to change the standard library (Section 7); you can

Disconnect. I didn't say "need". The word is "want".

either use it as it's defined or ignore it.  You can create and
document your own library that does whatever you want.  It doesn't
have to be a "standard".

Disconnect. Not "have" - "want".

 It's just a library. It may or may not
depend on features of the C90 standard library.

No. It IS C90+.

The implementation of that library might have to be modified for
different target systems.

Of course. The language library standard simply says what is required.

I have: "support both ASCII and EBCDIC escape characters".  It's not
something I've ever needed to do, so I have not spent time or effort
deciding how to do it.
>
The C90 committee was forced to consider that. That's why
'A' to 'Z' are not guaranteed to be consecutive, but '0' to '9' are.
>
Without either ASCII or EBCDIC mentioned in the C90 standard.
>
I was specifically talking about the ESCAPE character, which the C90
committee ignored.

Sure. Sorry - loose language. They were forced - begrudingly
from what I think I remember I read - to consider the mainframe
implications. And most couldn't understand why the mainframe
was so complicated, with record formats etc.

Regardless, that's what I'm after - a decision on how to do it.
If you personally don't want to spend the time and effort and/or
make a decision, that's fine - I'm hoping someone in the group
will do that, and perhaps when they propose a solution you will
chime in and say "no, that's not a good idea for xyz reason".
>
In one of your library's headers:
>
extern const char ESCAPE;
>
In the corresponding *.c file:
>
const char ESCAPE = ('z' - 'a' == 25 ? '\x1b' : '\x27');
>
Change the name if you prefer.

Disconnect. Not what I prefer. What the theoretical committee decides.

This is intended to be in the official ISO C standard for the next
1 million years.

Actually influencing ISO is a separate exercise.

It probably won't involve coercion.

But coercion wouldn't be required if the C90+ committee comes
up with something reasonable.

That's the goal. Something reasonable.

There's no portable way for the preprocessor to know whether the
target character set is ASCII, EBCDIC, or something else, but
can it be determined at compile time with a constant expression.

There is no need for portability. Every theoretical vendor
will implement it for their particular platform.

It is the standard itself that is portable. Not the implementation.

Note that this will likely fail if the target character set is not
based on either ASCII or EBCDIC.  That's not likely to be relevant
in the real world, and apparently you've decided for some reason
not to care about the possibility.

I haven't really decided such a thing.

You can probably say that I have decided that future versions
of C will only work on character sets that include an ESC
character.

I (tentatively) don't want to be forever tied to the past. There
are some ancient platforms where you can't really implement
C at all, from what I saw of the description.

It's enough for me that the ASCII character set exists, but not
necessarily at those code points. There are EBCDIC equivalents
for every ASCII character. There are a couple of extra
printable EBCDIC characters. And I more-or-less wish to
ban their use. If such wording can be put into the standard
in a nice way. Like. "if you use the cent symbol, results are
undefined". Just warn people off. So sticklers for the standard -
like me - will not go anywhere near it.

I can't think of any other way to control an ASCII/EBCDIC
ANSI X3.64 terminal without language/library support.
>
But there's no such thing.
[...]
>
There is - I produce one myself (via emulation) - do you
want me to give you a link? Proven against real mainframe
hardware (despite the claims that my software will never
run on a real mainframe).
>
So there's one emulator that nobody other than you uses?
>
Ok, fine, whatever.

Even if there were 0 emulators, the argument would be
exactly the same as if 90% of the planet used it.

And if I am one day elected president of the USA, at the
same time as Chancellor of Germany, and a few other
places, you may well find 90% of the planet using it (or
at least, having it on their system).

That's a work in progress. And the progress of that is
completely irrelevant to the technical question - from my
point of view, anyway. That's exactly what argument
ad populum is all about.

BFN. Paul.



Date Sujet#  Auteur
20 May07:06 * encapsulating directory operations128Paul Edwards
20 May08:27 +* Re: encapsulating directory operations18Lawrence D'Oliveiro
20 May10:33 i`* Re: encapsulating directory operations17Paul Edwards
21 May01:10 i `* Re: encapsulating directory operations16Lawrence D'Oliveiro
21 May01:23 i  `* Re: encapsulating directory operations15Paul Edwards
21 May04:37 i   `* Re: encapsulating directory operations14Lawrence D'Oliveiro
21 May11:00 i    +* Re: encapsulating directory operations3Paul Edwards
22 May07:49 i    i`* Re: encapsulating directory operations2Lawrence D'Oliveiro
22 May08:02 i    i `- Re: encapsulating directory operations1Kaz Kylheku
22 May00:51 i    `* Re: encapsulating directory operations10James Kuyper
22 May06:04 i     `* Re: encapsulating directory operations9Lawrence D'Oliveiro
22 May19:13 i      `* Re: encapsulating directory operations8James Kuyper
22 May23:46 i       `* Re: encapsulating directory operations7Lawrence D'Oliveiro
23 May00:07 i        `* Re: encapsulating directory operations6James Kuyper
23 May00:15 i         `* Re: encapsulating directory operations5Kaz Kylheku
23 May00:26 i          +* Re: encapsulating directory operations2Paul Edwards
23 May01:44 i          i`- Re: encapsulating directory operations1Kaz Kylheku
23 May01:10 i          `* Re: encapsulating directory operations2James Kuyper
23 May03:08 i           `- Re: encapsulating directory operations1Kaz Kylheku
20 May10:18 +* Re: encapsulating directory operations56Keith Thompson
20 May10:33 i+* Re: encapsulating directory operations12Richard Heathfield
20 May10:45 ii+- Re: encapsulating directory operations1Paul Edwards
20 May12:42 ii+- Re: encapsulating directory operations1David Brown
20 May14:55 ii+* Re: encapsulating directory operations7Kaz Kylheku
20 May15:05 iii`* Re: encapsulating directory operations6Richard Heathfield
20 May15:09 iii +* Re: encapsulating directory operations2Muttley
20 May15:15 iii i`- Re: encapsulating directory operations1Paul Edwards
20 May15:48 iii `* Re: encapsulating directory operations3Paul Edwards
20 May16:02 iii  `* Re: encapsulating directory operations2Richard Heathfield
20 May16:28 iii   `- Re: encapsulating directory operations1Paul Edwards
23 May13:43 ii`* Re: encapsulating directory operations2Tim Rentsch
23 May14:27 ii `- Re: encapsulating directory operations1Richard Heathfield
20 May10:36 i`* Re: encapsulating directory operations43Paul Edwards
20 May13:23 i +* Re: encapsulating directory operations39David Brown
20 May14:47 i i`* Re: encapsulating directory operations38Paul Edwards
20 May15:37 i i +* Re: encapsulating directory operations10Richard Heathfield
20 May16:11 i i i`* Re: encapsulating directory operations9Paul Edwards
20 May16:43 i i i `* Re: encapsulating directory operations8Richard Heathfield
20 May22:15 i i i  +* Re: encapsulating directory operations2Paul Edwards
20 May23:50 i i i  i`- Re: encapsulating directory operations1Kaz Kylheku
21 May02:11 i i i  +- Re: encapsulating directory operations1Lawrence D'Oliveiro
21 May03:40 i i i  `* Re: encapsulating directory operations4James Kuyper
21 May05:50 i i i   `* Re: encapsulating directory operations3Richard Heathfield
21 May09:06 i i i    `* Re: encapsulating directory operations2David Brown
21 May09:27 i i i     `- Re: encapsulating directory operations1Richard Heathfield
20 May17:19 i i `* Re: encapsulating directory operations27David Brown
20 May17:43 i i  +* Re: encapsulating directory operations6Richard Heathfield
20 May18:14 i i  i+* Re: encapsulating directory operations4Kaz Kylheku
20 May18:20 i i  ii`* Re: encapsulating directory operations3Richard Heathfield
20 May19:50 i i  ii +- Re: encapsulating directory operations1Richard Heathfield
20 May20:34 i i  ii `- Re: encapsulating directory operations1Kaz Kylheku
21 May09:09 i i  i`- Re: encapsulating directory operations1David Brown
20 May17:51 i i  +- Re: encapsulating directory operations1Kaz Kylheku
20 May18:09 i i  +* Re: encapsulating directory operations2Richard Heathfield
20 May19:34 i i  i`- Re: encapsulating directory operations1Richard Heathfield
20 May22:41 i i  +* Re: encapsulating directory operations4Paul Edwards
20 May23:02 i i  i+- Re: encapsulating directory operations1Keith Thompson
21 May02:05 i i  i`* Re: encapsulating directory operations2Lawrence D'Oliveiro
21 May10:23 i i  i `- Re: encapsulating directory operations1Paul Edwards
20 May22:51 i i  +* Re: encapsulating directory operations9Paul Edwards
21 May05:31 i i  i`* Re: encapsulating directory operations8Richard Heathfield
21 May11:08 i i  i `* Re: encapsulating directory operations7Paul Edwards
21 May11:28 i i  i  +- Re: encapsulating directory operations1Richard Heathfield
21 May16:00 i i  i  `* Re: encapsulating directory operations5David Brown
21 May16:37 i i  i   `* Re: encapsulating directory operations4Richard Heathfield
21 May18:21 i i  i    +- Re: encapsulating directory operations1Michael S
22 May11:37 i i  i    `* Re: encapsulating directory operations2James Kuyper
22 May18:53 i i  i     `- Re: encapsulating directory operations1Kaz Kylheku
20 May23:09 i i  +- Re: encapsulating directory operations1Paul Edwards
21 May09:27 i i  `* Re: encapsulating directory operations3David Brown
21 May11:46 i i   `* Re: encapsulating directory operations2Paul Edwards
21 May15:46 i i    `- Re: encapsulating directory operations1David Brown
21 May01:12 i `* Re: encapsulating directory operations3Lawrence D'Oliveiro
21 May01:25 i  `* Re: encapsulating directory operations2Paul Edwards
21 May02:03 i   `- Re: encapsulating directory operations1Lawrence D'Oliveiro
20 May14:53 +* Re: encapsulating directory operations49Kaz Kylheku
20 May15:12 i`* Re: encapsulating directory operations48Paul Edwards
20 May22:41 i `* Re: encapsulating directory operations47Keith Thompson
20 May23:38 i  `* Re: encapsulating directory operations46Paul Edwards
21 May00:09 i   +* Re: encapsulating directory operations5Paul Edwards
21 May00:22 i   i+- Re: encapsulating directory operations1Keith Thompson
21 May01:18 i   i+* Re: encapsulating directory operations2Kaz Kylheku
21 May01:31 i   ii`- Re: encapsulating directory operations1Paul Edwards
21 May02:02 i   i`- Re: encapsulating directory operations1Lawrence D'Oliveiro
21 May00:18 i   +* Re: encapsulating directory operations31Keith Thompson
21 May00:57 i   i+* Re: encapsulating directory operations23Paul Edwards
21 May06:41 i   ii`* Re: encapsulating directory operations22Keith Thompson
21 May11:41 i   ii +* Re: encapsulating directory operations19Paul Edwards
21 May19:06 i   ii i+* Re: encapsulating directory operations16Keith Thompson
21 May19:22 i   ii ii+- Re: encapsulating directory operations1Keith Thompson
22 May22:10 i   ii ii+* Re: encapsulating directory operations11Paul Edwards
22 May23:32 i   ii iii+* Re: encapsulating directory operations9Keith Thompson
23 May00:16 i   ii iiii+* Re: encapsulating directory operations7Paul Edwards
23 May02:38 i   ii iiiii+- Re: encapsulating directory operations1Keith Thompson
23 May03:28 i   ii iiiii+* Re: encapsulating directory operations2Kaz Kylheku
23 May05:27 i   ii iiiiii`- Re: encapsulating directory operations1Keith Thompson
23 May06:08 i   ii iiiii`* Re: encapsulating directory operations3Janis Papanagnou
23 May06:20 i   ii iiiii `* Re: encapsulating directory operations2Keith Thompson
23 May06:43 i   ii iiiii  `- Re: encapsulating directory operations1Janis Papanagnou
23 May16:09 i   ii iiii`- Re: encapsulating directory operations1Richard Harnden
22 May23:44 i   ii iii`- Re: encapsulating directory operations1Paul Edwards
22 May23:06 i   ii ii`* Re: encapsulating directory operations3Paul Edwards
21 May20:31 i   ii i`* Re: encapsulating directory operations2Kaz Kylheku
22 May22:52 i   ii `* Re: encapsulating directory operations2Paul Edwards
21 May03:21 i   i`* Re: encapsulating directory operations7Kaz Kylheku
21 May03:26 i   +* Re: encapsulating directory operations7James Kuyper
21 May22:19 i   `* Re: encapsulating directory operations2Waldek Hebisch
21 May03:35 +* Re: encapsulating directory operations3Janis Papanagnou
22 May19:34 `- Re: encapsulating directory operations1Bonita Montero

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal