Deutsch English Français Italiano |
<vl77rg$3e5um$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Lew Pitcher <lew.pitcher@digitalfreehold.ca> Newsgroups: comp.lang.c Subject: Re: Can 'graphics' be a file descriptor? Date: Thu, 2 Jan 2025 23:35:12 -0000 (UTC) Organization: A noiseless patient Spider Lines: 74 Message-ID: <vl77rg$3e5um$1@dont-email.me> References: <d0fcbe9e7b29ce6f9a0604058475b0aa9a23d5cb.camel@gmail.com> <87msgaubjj.fsf@nosuchdomain.example.com> <0bfa49a6d580546ab2db91aeac7627afb19e492d.camel@gmail.com> <87ikqytb9d.fsf@nosuchdomain.example.com> <08be9710b964a1b236ba75a2fbec97c9a7ea6297.camel@gmail.com> <8734i1sz6w.fsf@nosuchdomain.example.com> <vl72s3$3hb2v$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Fri, 03 Jan 2025 00:35:13 +0100 (CET) Injection-Info: dont-email.me; posting-host="71bc76633a3a1e7678164ec3902fbdaf"; logging-data="3610582"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18dhOmFzaG/OzFt3wrgvPI4RKGulrUadDo=" User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2) Cancel-Lock: sha1:0NkEtHFSbxz54JKnc5qs5x0EynA= Bytes: 4070 On Thu, 02 Jan 2025 16:08:57 -0600, BGB wrote: > On 1/2/2025 3:06 PM, Keith Thompson wrote: >> wij <wyniijj5@gmail.com> writes: >>> 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". >> >> So you insist on talking about "file descriptors". >> >> Standard C doesn't have file descriptors. Consider discussing this in >> comp.unix.programmer. >> > > It is also kinda moot... > > If it were "integer handle" or even "integer value in the same numbering > space as file handles", I would be like "yeah, sure, whatever". > > POSIX sockets also share the same numbering space, and some of the same > calls (Windows sockets do not, and many functions gain an WSA prefix and > changes to capitalization and similar). > > > > If one wants it so that read/write/lseek/etc do something useful with > them, this is a different matter. > > What happens then, does one represent a window as a BMP file or > something, which one writes to to update the contents?... This is likely > more overhead than is worthwhile. I refer you to the X11 specifications and example implementation found at x.org X is a networked protocol that performs graphics functions. The network communications used by X, on Unix and unix-like systems, accesses a socket (which others have pointed out is, on Unix a "file descriptor"-like object) Granted, some dislike /how/ X uses network sockets for communication, and X implementations (for Unixish systems) often provide alternatives such as "unix domain sockets" and "shared memory" communications. Still, X has found it "useful" to use these "file descriptor"-like objects to implement "graphics" facilities. [snip] > Other methods, like sockets or local RPC, still likely make more sense. Oh, I'm glad that the techniques and technologies in use for over 30 years gain your (apparently grudging) approval. :-) -- Lew Pitcher "In Skills We Trust"