Re: Can 'graphics' be a file descriptor?

Liste des GroupesRevenir à cl c 
Sujet : Re: Can 'graphics' be a file descriptor?
De : wyniijj5 (at) *nospam* gmail.com (wij)
Groupes : comp.lang.c
Date : 02. Jan 2025, 08:16:27
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <08be9710b964a1b236ba75a2fbec97c9a7ea6297.camel@gmail.com>
References : 1 2 3 4
User-Agent : Evolution 3.54.2 (3.54.2-1.fc41)
On Wed, 2025-01-01 at 14:33 -0800, Keith Thompson wrote:
wij <wyniijj5@gmail.com> writes:
On Wed, 2025-01-01 at 01:29 -0800, Keith Thompson wrote:
[...]
A file *descriptor* is a small integer referring to some file-like
entity, used with open/close/read/write.  There's no such thing in
standard C; it's a POSIX concept.
[...]
I would like to have opinions about the idea "graphics being a file
descriptor".  The implement is irrevent for the discussion. Some
imagination is required.
 
Why do you insist on referring to "file descriptors"?  That's a specific
term with a specific meaning: a small integer value used in POSIX I/O
(not in standard C).

I do not insist anything. I would just like to have an opinion on the idea
"graphics being a file descriptor".

If you mean FILE* pointers, the discussion might have some relevance to
C.  If you really mean POSIX file descriptors, comp.unix.programmer
might be a better place.

In one scenario, I can take that as 'the opinion'.

Sure, you could have a graphics system where a program interacts with
the display by reading and writing to FILE* pointers.  You'd have to
encode the operations and returned data as streams of bytes.  I'm not
convinced there would be much advantage.

FILE* is full of 'upgrade' enough not to consider (technically this is only my 
30 year ago opinion. Nowadays, it becomes more complicated, seemingly only
functions to support old software in the name of 'standard'. In the confinement,
you are doomed not going too far, which should not be the goal of 'standard').
With file descriptor, there is at least mmap. The concern might be that 'the
display' may not simply be a range of memory (this is not a strong enough
reason for me). But this may still be fine, we can have option of I/O by read/
write or by mmap. These are hardware things. I had implemented a simple GUI in
DOS (DOS4G) and 3D rendering pipeline based on plain 'frame buffer'. That
experience tell me the idea "graphics being a file descriptor" is plausible
except I don't feel comfortable with this idea after these years. What involved
can be huge (desktop, graphics terminal, matrix, AI, parallel computing), but 
I think from C's point of view (building OS), something to draw image should be 
simpler and discussable, at least just opinion should be fine.



Date Sujet#  Auteur
1 Jan 25 * Can 'graphics' be a file descriptor?18wij
1 Jan 25 +- Re: Can 'graphics' be a file descriptor?1Lawrence D'Oliveiro
1 Jan 25 `* Re: Can 'graphics' be a file descriptor?16Keith Thompson
1 Jan 25  `* Re: Can 'graphics' be a file descriptor?15wij
1 Jan 25   +* Re: Can 'graphics' be a file descriptor?4bart
1 Jan 25   i+* Re: Can 'graphics' be a file descriptor?2wij
2 Jan 25   ii`- Re: Can 'graphics' be a file descriptor?1bart
1 Jan 25   i`- Re: Can 'graphics' be a file descriptor?1Lawrence D'Oliveiro
1 Jan 25   `* Re: Can 'graphics' be a file descriptor?10Keith Thompson
2 Jan 25    +- Re: Can 'graphics' be a file descriptor?1Alexis
2 Jan 25    +- Re: Can 'graphics' be a file descriptor?1Lawrence D'Oliveiro
2 Jan 25    `* Re: Can 'graphics' be a file descriptor?7wij
2 Jan 25     `* Re: Can 'graphics' be a file descriptor?6Keith Thompson
2 Jan 25      `* Re: Can 'graphics' be a file descriptor?5BGB
3 Jan 25       +* Re: Can 'graphics' be a file descriptor?2Lew Pitcher
3 Jan 25       i`- Re: Can 'graphics' be a file descriptor?1BGB
3 Jan 25       +- Re: Can 'graphics' be a file descriptor?1Lawrence D'Oliveiro
3 Jan 25       `- Re: Can 'graphics' be a file descriptor?1Chris M. Thomasson

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal