Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: rbowman Newsgroups: comp.os.linux.misc Subject: Re: Fancy-smanchy installers that don't work? Date: 15 Oct 2025 06:31:41 GMT Lines: 30 Message-ID: References: <7dlhrlxmm6.ln2@Telcontar.valinor> <10c908i$3600i$2@dont-email.me> <68ea7364$0$12948$426a74cc@news.free.fr> <10cg2nd$1dscj$5@dont-email.me> <10chrko$1ujff$1@dont-email.me> <1NucnWt3DZqBMHH1nZ2dnZfqnPGdnZ2d@giganews.com> <10cig9g$23kb8$2@dont-email.me> <10cjsig$2gp1i$2@dont-email.me> <34ecncooOcDVeXP1nZ2dnZfqn_WdnZ2d@giganews.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: individual.net ZpjcUJPST3Mnapr74/ZBSQM6+EaIMCUKRTM5OmEytEBPEmYYP1 Cancel-Lock: sha1:vM9qx943/m2A6cHHLtDBIWoR4iY= sha256:xU9VMW2WbHLYpVlA3EPyzZ2dQhdCboabL8LY3gZ1Mo8= User-Agent: Pan/0.162 (Pokrosvk) Xref: csiph.com comp.os.linux.misc:76176 On Tue, 14 Oct 2025 20:01:12 -0400, c186282 wrote: > COMs are a bit weird for my tastes. Lots of languages have their own > takes on them however. > > Hmm ... how to best code something like that in K&R 'C' ? COM is sort of Microsoft's take on Sun's ONC RPC, which uses XDR for serialization. That's all C. You start with a .x definition file which defines the data to be passed with C structs. rpcgen used that to create a header and .c file to link into the program. It's all C data types. Since COM grew from BASIC you wind up with tagged variants and other good stuff. XDR has its drawbacks too. For one it uses network byte order. That gets a little intense with a LAN with only little-endian machines since you have a lot of htonl() and ntohl() calles. Secondly it's a C struct. There may only be data in one field but the entire struct is sent, say 324 bytes of empty space and 9 bytes of data. There have been attempts to improve RPC with XML-RPC, JSON-RPC, and gRPC. With JSON and XML you don't have to send empty fields but you have the overhead of the tags. gRPC is Google's invention. It uses protocol buffers and a interface descriptor language in a .proto file and a tool to create actual code. It smells like XDR to me except you can designate fields as optional.