Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Life. Don't talk to me about life. -- Marvin the Paranoid Android


devel / comp.lang.c / Re: you think rust may *DE*throne c?

SubjectAuthor
* you think rust may outthrone c?fir
`* Re: you think rust may outthrone c?Blue-Maned_Hawk
 +- Re: you think rust may outthrone c?jak
 +* Re: you think rust may outthrone c?fir
 |`- Re: you think rust may outthrone c?fir
 +* Re: you think rust may outthrone c?rek2 hispagatos
 |`* Re: you think rust may outthrone c?Kaz Kylheku
 | `* Re: you think rust may outthrone c?Kalevi Kolttonen
 |  +* Re: you think rust may outthrone c?Scott Lurndal
 |  |`* Re: you think rust may outthrone c?Kalevi Kolttonen
 |  | +- Re: you think rust may outthrone c?Kaz Kylheku
 |  | +* Re: you think rust may outthrone c?Bart
 |  | |`* Re: you think rust may outthrone c?Kalevi Kolttonen
 |  | | +* Re: you think rust may outthrone c?Bart
 |  | | |+* Re: you think rust may outthrone c?Kalevi Kolttonen
 |  | | ||`* Re: you think rust may outthrone c?Kaz Kylheku
 |  | | || `- Re: you think rust may outthrone c?Kalevi Kolttonen
 |  | | |`* Re: you think rust may outthrone c?David Brown
 |  | | | `* Re: you think rust may outthrone c?Kalevi Kolttonen
 |  | | |  +* Re: you think rust may outthrone c?David Brown
 |  | | |  |`* Re: you think rust may outthrone c?Kaz Kylheku
 |  | | |  | `- Re: you think rust may outthrone c?Kalevi Kolttonen
 |  | | |  `* Re: you think rust may outthrone c?Kaz Kylheku
 |  | | |   `* Re: you think rust may outthrone c?Kalevi Kolttonen
 |  | | |    `* Re: you think rust may outthrone c?David Brown
 |  | | |     +* Re: you think rust may outthrone c?Scott Lurndal
 |  | | |     |`- Re: you think rust may outthrone c?Keith Thompson
 |  | | |     `* Re: you think rust may outthrone c?Keith Thompson
 |  | | |      +- Re: you think rust may outthrone c?David Brown
 |  | | |      `* Re: you think rust may outthrone c?Malcolm McLean
 |  | | |       `* Re: you think rust may outthrone c?David Brown
 |  | | |        `* Re: you think rust may outthrone c?Malcolm McLean
 |  | | |         `* Re: you think rust may outthrone c?David Brown
 |  | | |          +- Re: you think rust may outthrone c?fir
 |  | | |          +* Re: you think rust may outthrone c?fir
 |  | | |          |`* Re: you think rust may outthrone c?fir
 |  | | |          | `- Re: you think rust may outthrone c?fir
 |  | | |          `* Re: you think rust may outthrone c?Ben Bacarisse
 |  | | |           `* Re: you think rust may outthrone c?Bart
 |  | | |            +* Re: you think rust may outthrone c?Ben Bacarisse
 |  | | |            |`* Re: you think rust may outthrone c?Malcolm McLean
 |  | | |            | +* Re: you think rust may outthrone c?David Brown
 |  | | |            | |+* Re: you think rust may outthrone c?Malcolm McLean
 |  | | |            | ||+* Re: you think rust may outthrone c?David Brown
 |  | | |            | |||+* Re: you think rust may outthrone c?Ben Bacarisse
 |  | | |            | ||||`* Re: you think rust may outthrone c?Tim Rentsch
 |  | | |            | |||| `- Re: you think rust may outthrone c?Ben Bacarisse
 |  | | |            | |||`* Re: you think rust may outthrone c?Bart
 |  | | |            | ||| +- Re: you think rust may outthrone c?Malcolm McLean
 |  | | |            | ||| `- Re: you think rust may outthrone c?David Brown
 |  | | |            | ||`- Re: you think rust may outthrone c?Scott Lurndal
 |  | | |            | |`* Re: you think rust may outthrone c?Kaz Kylheku
 |  | | |            | | +- Re: you think rust may outthrone c?David Brown
 |  | | |            | | `* Re: you think rust may outthrone c?jak
 |  | | |            | |  `* Re: you think rust may outthrone c?Kaz Kylheku
 |  | | |            | |   +- Re: you think rust may outthrone c?jak
 |  | | |            | |   `- Re: you think rust may outthrone c?Tim Rentsch
 |  | | |            | `* Re: you think rust may outthrone c?Ben Bacarisse
 |  | | |            |  `* Re: you think rust may outthrone c?Malcolm McLean
 |  | | |            |   +- Re: you think rust may outthrone c?David Brown
 |  | | |            |   `- Re: you think rust may outthrone c?Ben Bacarisse
 |  | | |            `* Re: you think rust may outthrone c?David Brown
 |  | | |             `* Re: you think rust may outthrone c?fir
 |  | | |              +* Re: you think rust may outthrone c?Chris M. Thomasson
 |  | | |              |`* Re: you think rust may outthrone c?David Brown
 |  | | |              | +* Re: you think rust may outthrone c?Chris M. Thomasson
 |  | | |              | |+* Re: you think rust may outthrone c?Chris M. Thomasson
 |  | | |              | ||+- Re: you think rust may outthrone c?Chris M. Thomasson
 |  | | |              | ||+* Re: you think rust may outthrone c?Ben Bacarisse
 |  | | |              | |||`- Re: you think rust may outthrone c?Chris M. Thomasson
 |  | | |              | ||`- Re: you think rust may outthrone c?fir
 |  | | |              | |`- Re: you think rust may outthrone c?Bart
 |  | | |              | `- Re: you think rust may outthrone c?Chris M. Thomasson
 |  | | |              `* Re: you think rust may outthrone c?fir
 |  | | |               `* Re: you think rust may outthrone c?Bart
 |  | | |                +* Re: you think rust may outthrone c?Keith Thompson
 |  | | |                |+* Re: you think rust may outthrone c?Bart
 |  | | |                ||+* Re: you think rust may outthrone c?Ben Bacarisse
 |  | | |                |||`* Re: you think rust may outthrone c?Bart
 |  | | |                ||| +- Re: you think rust may outthrone c?Kaz Kylheku
 |  | | |                ||| +* Re: you think rust may outthrone c?Ben Bacarisse
 |  | | |                ||| |+* Re: you think rust may outthrone c?David Brown
 |  | | |                ||| ||+- Re: you think rust may outthrone c?Bart
 |  | | |                ||| ||`* Re: you think rust may outthrone c?Ben Bacarisse
 |  | | |                ||| || `* Re: you think rust may outthrone c?David Brown
 |  | | |                ||| ||  `* Re: you think rust may outthrone c?Ben Bacarisse
 |  | | |                ||| ||   +* Re: you think rust may outthrone c?David Brown
 |  | | |                ||| ||   |`* Re: you think rust may outthrone c?Ben Bacarisse
 |  | | |                ||| ||   | `* Re: you think rust may outthrone c?David Brown
 |  | | |                ||| ||   |  `- Re: you think rust may outthrone c?Ben Bacarisse
 |  | | |                ||| ||   `* Re: you think rust may outthrone c?Kaz Kylheku
 |  | | |                ||| ||    `- Re: you think rust may outthrone c?Ben Bacarisse
 |  | | |                ||| |+* Re: you think rust may outthrone c?Bart
 |  | | |                ||| ||+* Re: you think rust may outthrone c?Ike Naar
 |  | | |                ||| |||`- Re: you think rust may outthrone c?Bart
 |  | | |                ||| ||+* Re: you think rust may outthrone c?David Brown
 |  | | |                ||| |||`* Re: you think rust may outthrone c?Bart
 |  | | |                ||| ||| `- Re: you think rust may outthrone c?David Brown
 |  | | |                ||| ||`* Re: you think rust may outthrone c?Ben Bacarisse
 |  | | |                ||| || +- Re: you think rust may outthrone c?Kaz Kylheku
 |  | | |                ||| || +* Re: you think rust may outthrone c?Malcolm McLean
 |  | | |                ||| || `* Re: you think rust may outthrone c?Bart
 |  | | |                ||| |`* Re: you think rust may outthrone c?Scott Lurndal
 |  | | |                ||| `* Re: you think rust may outthrone c?Keith Thompson
 |  | | |                ||`- Re: you think rust may outthrone c?Keith Thompson
 |  | | |                |`* Re: you think rust may outthrone c?Kaz Kylheku
 |  | | |                `* Re: you think rust may outthrone c?fir
 |  | | +* Yeah, C is harder than many programming languages. Your point? (Was: you think Kenny McCormack
 |  | | +* Re: you think rust may outthrone c?Po Lu
 |  | | `* Re: you think rust may outthrone c?Kaz Kylheku
 |  | +* Re: you think rust may outthrone c?David Brown
 |  | `- Re: you think rust may outthrone c?Po Lu
 |  `* Re: you think rust may outthrone c?Anton Shepelev
 `* Re: you think rust may outthrone c?Bonita Montero

Pages:123456789101112131415161718192021222324252627282930313233343536373839
Re: you think rust may *DE*throne c?

<ub360v$cvgb$2@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27432&group=comp.lang.c#27432

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED.108.175.226.73!not-for-mail
From: lew.pitc...@digitalfreehold.ca (Lew Pitcher)
Newsgroups: comp.lang.c
Subject: Re: you think rust may *DE*throne c?
Date: Thu, 10 Aug 2023 17:16:16 -0000 (UTC)
Organization: The Pitcher Digital Freehold
Message-ID: <ub360v$cvgb$2@dont-email.me>
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
<909acf23-ef0e-44c7-9ebf-89846e50e871n@googlegroups.com>
<p_uAM.489417$mPI2.398490@fx15.iad>
<e5d7b49e-3472-4b70-8c52-d21243725d15n@googlegroups.com>
<87zg31ezu5.fsf@bsb.me.uk> <uavpcf$3t64r$1@dont-email.me>
<87bkffg6qz.fsf@bsb.me.uk> <ub1840$3q1k$1@dont-email.me>
<87zg2zej54.fsf@bsb.me.uk> <Hr6BM.359405$xMqa.20823@fx12.iad>
<87il9ndiz9.fsf@bsb.me.uk> <HJ7BM.25894$Wk53.19314@fx01.iad>
<20230810090521.27@kylheku.com> <yH8BM.430010$TCKc.359327@fx13.iad>
<542c60aa-a3bb-43ed-8e34-5340d65ed10en@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 10 Aug 2023 17:16:16 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="108.175.226.73";
logging-data="425483"; mail-complaints-to="abuse@eternal-september.org"
User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508
git://git.gnome.org/pan2)
 by: Lew Pitcher - Thu, 10 Aug 2023 17:16 UTC

On Thu, 10 Aug 2023 10:12:47 -0700, Michael S wrote:

> On Thursday, August 10, 2023 at 7:59:25 PM UTC+3, Scott Lurndal wrote:
>> Kaz Kylheku <864-11...@kylheku.com> writes:
>> >On 2023-08-10, Scott Lurndal <sc...@slp53.sl.home> wrote:
>> >> Ben Bacarisse <ben.u...@bsb.me.uk> writes:
>> >>>sc...@slp53.sl.home (Scott Lurndal) writes:
>> >>>
>> >>>> Ben Bacarisse <ben.u...@bsb.me.uk> writes:
>> >>>>>Bart <b...@freeuk.com> writes:
>> >>>>
>> >>>>>> If working with Linux and you need -lm, then 'make prog' won't work. That's
>> >>>>>> just a fact.
>> >>>>>
>> >>>>>2+2 = 4. That's just a fact.
>> >>>>
>> >>>> Indeed, and it is a fact for _any_ library containing optional functionality
>> >>>> that is needed by the application.
>> >>>
>> >>>That's only true in a circular way. Why are the math functions
>> >>>considered optional? Why not, for example, consider the IO functions
>> >>>optional so that any program that includes <stdio.h> has to link with
>> >>>-lio? (I know the history -- that's not what I'm asking.)
>> >>>
>> >>>There's even a division that could be justified by the standard. Any
>> >>>program that uses functions not required in a freestanding
>> >>>implementation could be obliged to link with -lhosted, but requiring -lm
>> >>>is just a historical barnacle.
>> >>
>> >> Yes, it's historical, and an artifact of small memory systems and
>> >> archive libraries.
>> >>
>> >> None the less, would you also expect that -lopenssl, -lncurses, -lpthread,
>> >> -ldl, -lrt, -lz, etc. should also be automatically appended by the compiler
>> >> driver (cc)?
>> >
>> >This is entirely feasible, technologically.
>> >
>> >As a pretty simple hack, header files for these libraries could
>> >declare the "soname" that is required to call their functions.
>> >
>> >The compiler would attach that to the declarations made in those
>> >headers and then if any of those symbols are referenced, append
>> >the -l<soname> to the linker line.
>> >
>> >In the Microsoft Visual C/C++ world, a source file can indicate that it
>> >needs a particular DLL, so that it doesn't have to be specified on the
>> >command line.
>> Ah, yes. DLL hell. Something that has not yet been an issue for
>> unix/linux, and hopefully never will.
>
> In my personal experience DLL hell on Linux is innumerably worse
> than it ever was on Windows.
> On Windows, at worst one can put needed versions of DLLs in the
> same directory with exe and things will work.
> On Linux, I found no ways short of static link to cause binaries compiled
> on newer Debian to run on LTS variant of Ubuntu. And that's with Debian
> and Ununtu, two distros that are rather close relatives. I wonder what is
> going to happen if try unrelated distros.

Then, I've got to say, "You are doing it wrong."
But, as this is comp.lang.c and not comp.unix.programmer, I won't elaborate
on my comment here.
--
Lew Pitcher
"In Skills We Trust"

Re: you think rust may *DE*throne c?

<3e1ea2a5-6431-492b-8847-f353929b3b6cn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27433&group=comp.lang.c#27433

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:ad4:4f45:0:b0:635:49d7:5445 with SMTP id eu5-20020ad44f45000000b0063549d75445mr34778qvb.7.1691688454948; Thu, 10 Aug 2023 10:27:34 -0700 (PDT)
X-Received: by 2002:a63:aa4f:0:b0:563:9e04:52b with SMTP id x15-20020a63aa4f000000b005639e04052bmr610804pgo.6.1691688454501; Thu, 10 Aug 2023 10:27:34 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!feeder.usenetexpress.com!tr3.iad1.usenetexpress.com!69.80.99.14.MISMATCH!border-1.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Thu, 10 Aug 2023 10:27:34 -0700 (PDT)
In-Reply-To: <ub360v$cvgb$2@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=199.203.251.52; posting-account=ow8VOgoAAAAfiGNvoH__Y4ADRwQF1hZW
NNTP-Posting-Host: 199.203.251.52
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com> <909acf23-ef0e-44c7-9ebf-89846e50e871n@googlegroups.com> <p_uAM.489417$mPI2.398490@fx15.iad> <e5d7b49e-3472-4b70-8c52-d21243725d15n@googlegroups.com> <87zg31ezu5.fsf@bsb.me.uk> <uavpcf$3t64r$1@dont-email.me> <87bkffg6qz.fsf@bsb.me.uk> <ub1840$3q1k$1@dont-email.me> <87zg2zej54.fsf@bsb.me.uk> <Hr6BM.359405$xMqa.20823@fx12.iad> <87il9ndiz9.fsf@bsb.me.uk> <HJ7BM.25894$Wk53.19314@fx01.iad> <20230810090521.27@kylheku.com> <yH8BM.430010$TCKc.359327@fx13.iad> <542c60aa-a3bb-43ed-8e34-5340d65ed10en@googlegroups.com> <ub360v$cvgb$2@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <3e1ea2a5-6431-492b-8847-f353929b3b6cn@googlegroups.com>
Subject: Re: you think rust may *DE*throne c?
From: already5...@yahoo.com (Michael S)
Injection-Date: Thu, 10 Aug 2023 17:27:34 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 92
 by: Michael S - Thu, 10 Aug 2023 17:27 UTC

On Thursday, August 10, 2023 at 8:16:31 PM UTC+3, Lew Pitcher wrote:
> On Thu, 10 Aug 2023 10:12:47 -0700, Michael S wrote:
>
> > On Thursday, August 10, 2023 at 7:59:25 PM UTC+3, Scott Lurndal wrote:
> >> Kaz Kylheku <864-11...@kylheku.com> writes:
> >> >On 2023-08-10, Scott Lurndal <sc...@slp53.sl.home> wrote:
> >> >> Ben Bacarisse <ben.u...@bsb.me.uk> writes:
> >> >>>sc...@slp53.sl.home (Scott Lurndal) writes:
> >> >>>
> >> >>>> Ben Bacarisse <ben.u...@bsb.me.uk> writes:
> >> >>>>>Bart <b...@freeuk.com> writes:
> >> >>>>
> >> >>>>>> If working with Linux and you need -lm, then 'make prog' won't work. That's
> >> >>>>>> just a fact.
> >> >>>>>
> >> >>>>>2+2 = 4. That's just a fact.
> >> >>>>
> >> >>>> Indeed, and it is a fact for _any_ library containing optional functionality
> >> >>>> that is needed by the application.
> >> >>>
> >> >>>That's only true in a circular way. Why are the math functions
> >> >>>considered optional? Why not, for example, consider the IO functions
> >> >>>optional so that any program that includes <stdio.h> has to link with
> >> >>>-lio? (I know the history -- that's not what I'm asking.)
> >> >>>
> >> >>>There's even a division that could be justified by the standard. Any
> >> >>>program that uses functions not required in a freestanding
> >> >>>implementation could be obliged to link with -lhosted, but requiring -lm
> >> >>>is just a historical barnacle.
> >> >>
> >> >> Yes, it's historical, and an artifact of small memory systems and
> >> >> archive libraries.
> >> >>
> >> >> None the less, would you also expect that -lopenssl, -lncurses, -lpthread,
> >> >> -ldl, -lrt, -lz, etc. should also be automatically appended by the compiler
> >> >> driver (cc)?
> >> >
> >> >This is entirely feasible, technologically.
> >> >
> >> >As a pretty simple hack, header files for these libraries could
> >> >declare the "soname" that is required to call their functions.
> >> >
> >> >The compiler would attach that to the declarations made in those
> >> >headers and then if any of those symbols are referenced, append
> >> >the -l<soname> to the linker line.
> >> >
> >> >In the Microsoft Visual C/C++ world, a source file can indicate that it
> >> >needs a particular DLL, so that it doesn't have to be specified on the
> >> >command line.
> >> Ah, yes. DLL hell. Something that has not yet been an issue for
> >> unix/linux, and hopefully never will.
> >
> > In my personal experience DLL hell on Linux is innumerably worse
> > than it ever was on Windows.
> > On Windows, at worst one can put needed versions of DLLs in the
> > same directory with exe and things will work.
> > On Linux, I found no ways short of static link to cause binaries compiled
> > on newer Debian to run on LTS variant of Ubuntu. And that's with Debian
> > and Ununtu, two distros that are rather close relatives. I wonder what is
> > going to happen if try unrelated distros.
> Then, I've got to say, "You are doing it wrong."

That's possible. But discovering how to do it right is certainly not easy.

> But, as this is comp.lang.c and not comp.unix.programmer, I won't elaborate
> on my comment here.

I'd just say that if Gnu/Linux was not a mess then people would not need to
invent containers etc. And VMs will be far less popular.
And I feel like shared libraries are very big part of the mess.
On the other hand, the Linux proper, the kernel, is likely the least problematic.

> --
> Lew Pitcher
> "In Skills We Trust"

Re: you think rust may *DE*throne c?

<3v9BM.62260$VPEa.1580@fx33.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27434&group=comp.lang.c#27434

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx33.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: you think rust may *DE*throne c?
Newsgroups: comp.lang.c
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com> <uavpcf$3t64r$1@dont-email.me> <87bkffg6qz.fsf@bsb.me.uk> <ub1840$3q1k$1@dont-email.me> <87zg2zej54.fsf@bsb.me.uk> <Hr6BM.359405$xMqa.20823@fx12.iad> <87il9ndiz9.fsf@bsb.me.uk> <HJ7BM.25894$Wk53.19314@fx01.iad> <20230810090521.27@kylheku.com> <yH8BM.430010$TCKc.359327@fx13.iad> <542c60aa-a3bb-43ed-8e34-5340d65ed10en@googlegroups.com> <ub360v$cvgb$2@dont-email.me> <3e1ea2a5-6431-492b-8847-f353929b3b6cn@googlegroups.com>
Lines: 18
Message-ID: <3v9BM.62260$VPEa.1580@fx33.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Thu, 10 Aug 2023 17:54:07 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Thu, 10 Aug 2023 17:54:07 GMT
X-Received-Bytes: 1692
 by: Scott Lurndal - Thu, 10 Aug 2023 17:54 UTC

Michael S <already5chosen@yahoo.com> writes:
>On Thursday, August 10, 2023 at 8:16:31=E2=80=AFPM UTC+3, Lew Pitcher wrote=
>:

>> But, as this is comp.lang.c and not comp.unix.programmer, I won't elabora=
>te=20
>> on my comment here.=20
>
>I'd just say that if Gnu/Linux was not a mess then people would not need to
>invent containers etc.

Say what? Containers are there for easy deployment and primarily
for security sandboxing, not because of some soi disant linux 'dll hell'.

>And I feel like shared libraries are very big part of the mess.

Feelings aren't reality.

Re: Making accountants cross (wa Re: you think rust may outthrone c?)

<ub39cl$ev2j$4@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27435&group=comp.lang.c#27435

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chris.m....@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c
Subject: Re: Making accountants cross (wa Re: you think rust may outthrone c?)
Date: Thu, 10 Aug 2023 11:13:40 -0700
Organization: A noiseless patient Spider
Lines: 75
Message-ID: <ub39cl$ev2j$4@dont-email.me>
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
<uag05n$nmu5$1@dont-email.me> <uagcgc$ppbn$1@dont-email.me>
<87fs50ulog.fsf@bsb.me.uk> <uagpni$rt71$1@dont-email.me>
<87r0ohrvg0.fsf@bsb.me.uk> <uamlh1$1tr9i$1@dont-email.me>
<875y5tkptn.fsf@bsb.me.uk> <uans1e$26toe$1@dont-email.me>
<87cyzzkfxh.fsf@nosuchdomain.example.com> <uap5e6$2gd8e$1@dont-email.me>
<87350vke4n.fsf@nosuchdomain.example.com> <uap73l$2gktp$1@dont-email.me>
<87y1initxx.fsf@nosuchdomain.example.com> <uapf90$2ht0t$1@dont-email.me>
<87leenirja.fsf@nosuchdomain.example.com> <uaqdst$2q82c$1@dont-email.me>
<8M4AM.510037$TPw2.337804@fx17.iad> <uaqqou$2sa5t$1@dont-email.me>
<87wmy6j37n.fsf@bsb.me.uk>
<ad304448-30f9-4630-83c2-7d19c026fa31n@googlegroups.com>
<87r0oej0rt.fsf@bsb.me.uk> <ub2sp5$d6sv$1@dont-email.me>
<20230810091601.978@kylheku.com> <ub350r$cvgb$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 10 Aug 2023 18:13:41 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="a38189c842f654cfc23a7d20e4af9ad2";
logging-data="490579"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/6ftTdDVlQHYI4XweeB+y8Rn/foVSBy6k="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Cancel-Lock: sha1:TcE8D4BgSYAHtYwKE1hHaGwTxF4=
Content-Language: en-US
In-Reply-To: <ub350r$cvgb$1@dont-email.me>
 by: Chris M. Thomasson - Thu, 10 Aug 2023 18:13 UTC

On 8/10/2023 9:59 AM, Lew Pitcher wrote:
> On Thu, 10 Aug 2023 16:31:31 +0000, Kaz Kylheku wrote:
>
>> On 2023-08-10, Vir Campestris <vir.campestris@invalid.invalid> wrote:
>>> On 07/08/2023 17:05, Ben Bacarisse wrote:
>>>> Hmm... With statically allocated strings, or using malloc and therefore
>>>> requiring free call not shown?
>>>>
>>>> I would rather do this: anywhere a type is defined, I'd define a FMT_xxx
>>>> macro:
>>>>
>>>> typedef float salary_t;
>>>> #define FMT_SALARY "f"
>>>>
>>>> typedef unsigned long int payrollid_t;
>>>> #define FMT_PAYROLLID "lu"
>>>>
>>>> so that one can write
>>>>
>>>> printf("Hello %s your salary is %" FMT_SALLARY
>>>> ", your payrollid %" FMT_PAYROLLID "\n",
>>>> employee.name, employee.salary, employee.payrollid);
>>>>
>>>> -- Ben.
>>>
>>> Ben, if you put floating points in money accountants get upset.
>>>
>>> Three employees are paid $100.00, so it adds up to $300.
>>>
>>> Deduct $20 from each, and it's $240.
>>>
>>> Use floating point and sooner or later it won't add up.
>>
>> Use floating-point *naively* and the truncation errors will accumulate
>> to the point of making at least a one cent difference, screwing up the
>> accounting.
>>
>> Use floating-point intelligently and that won't happen.
>>
>>> You can't have a third of a cent.
>>
>> That is neither here nor there.
>>
>> You can't have a third of a cent in accounting, because accounting is
>> decimal based, at least with US dollars and similar currencies,
>> where you don't have beasties like sixths of a dollar.
>
> Actually, many currencies (including the US Dollar) allow for measurements
> in the thousandths of a dollar, and such calculations are common in both
> stock brokerage pricing (a broker may charge, say, 5 mils per share on
> bulk trades, earning $5.00 for every 1000 shares bought/sold) and property
> tax calculation.
>
>> "Third of a cent" is a financial quantity nobody works with, in any
>> representation of dollars.
>
> Except for those who work with money as a commodity, stock brokers,
> municipal property tax assessors, and a wide variety of others. Consider,
> at this moment, I see that 1 Japanese Yen will buy 0.0069 US Dollars.
> How inconvenient would it be if programmers just took the position that
> there are no fractions of a US dollar lower than 1 cent, and that 1 Yen,
> therefore, purchases $0.00 USD?
>
>> And even if they did, floating point
>> could handle it just fine, if everyone agreed that around 15
>> digits of precision is good enough.
>
> For very small and very large sums of money, most banking systems
> will stay /very/ far away from floatingpoint in any form. Better
> to do (expensive) fixed-precision math and get exact answers than
> to do (cheaper) floatingpoint math and get the final /financial/
> answer wrong. That's how banks fail, and programmers get rich
> from rounding errors (watch the movie "Office Space").

Or SuperMan 3... ;^)

Re: you think rust may *DE*throne c?

<20230810110112.359@kylheku.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27436&group=comp.lang.c#27436

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 864-117-...@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c
Subject: Re: you think rust may *DE*throne c?
Date: Thu, 10 Aug 2023 18:16:35 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 110
Message-ID: <20230810110112.359@kylheku.com>
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
<909acf23-ef0e-44c7-9ebf-89846e50e871n@googlegroups.com>
<p_uAM.489417$mPI2.398490@fx15.iad>
<e5d7b49e-3472-4b70-8c52-d21243725d15n@googlegroups.com>
<87zg31ezu5.fsf@bsb.me.uk> <uavpcf$3t64r$1@dont-email.me>
<87bkffg6qz.fsf@bsb.me.uk> <ub1840$3q1k$1@dont-email.me>
<87zg2zej54.fsf@bsb.me.uk> <Hr6BM.359405$xMqa.20823@fx12.iad>
<87il9ndiz9.fsf@bsb.me.uk> <HJ7BM.25894$Wk53.19314@fx01.iad>
<20230810090521.27@kylheku.com> <yH8BM.430010$TCKc.359327@fx13.iad>
Injection-Date: Thu, 10 Aug 2023 18:16:35 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c8ceb3884c73c57508aac2a066fd132c";
logging-data="498702"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+DjIdt6cAgGQeLEI0YurkIgQHFIW9stWU="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:Xbcjbp4ORASztUrfzrR7IwzqMG4=
 by: Kaz Kylheku - Thu, 10 Aug 2023 18:16 UTC

On 2023-08-10, Scott Lurndal <scott@slp53.sl.home> wrote:
> Kaz Kylheku <864-117-4973@kylheku.com> writes:
>>On 2023-08-10, Scott Lurndal <scott@slp53.sl.home> wrote:
>>> Ben Bacarisse <ben.usenet@bsb.me.uk> writes:
>>>>scott@slp53.sl.home (Scott Lurndal) writes:
>>>>
>>>>> Ben Bacarisse <ben.usenet@bsb.me.uk> writes:
>>>>>>Bart <bc@freeuk.com> writes:
>>>>>
>>>>>>> If working with Linux and you need -lm, then 'make prog' won't work. That's
>>>>>>> just a fact.
>>>>>>
>>>>>>2+2 = 4. That's just a fact.
>>>>>
>>>>> Indeed, and it is a fact for _any_ library containing optional functionality
>>>>> that is needed by the application.
>>>>
>>>>That's only true in a circular way. Why are the math functions
>>>>considered optional? Why not, for example, consider the IO functions
>>>>optional so that any program that includes <stdio.h> has to link with
>>>>-lio? (I know the history -- that's not what I'm asking.)
>>>>
>>>>There's even a division that could be justified by the standard. Any
>>>>program that uses functions not required in a freestanding
>>>>implementation could be obliged to link with -lhosted, but requiring -lm
>>>>is just a historical barnacle.
>>>
>>> Yes, it's historical, and an artifact of small memory systems and
>>> archive libraries.
>>>
>>> None the less, would you also expect that -lopenssl, -lncurses, -lpthread,
>>> -ldl, -lrt, -lz, etc. should also be automatically appended by the compiler
>>> driver (cc)?
>>
>>This is entirely feasible, technologically.
>>
>>As a pretty simple hack, header files for these libraries could
>>declare the "soname" that is required to call their functions.
>>
>>The compiler would attach that to the declarations made in those
>>headers and then if any of those symbols are referenced, append
>>the -l<soname> to the linker line.
>>
>>In the Microsoft Visual C/C++ world, a source file can indicate that it
>>needs a particular DLL, so that it doesn't have to be specified on the
>>command line.
>
> Ah, yes. DLL hell. Something that has not yet been an issue for
> unix/linux, and hopefully never will.

While DLLs have some issues, there are some aspects of DLL's that
are better than shared libraries on Linux.

The Unix people hit on a good idea in their C language implementation:
that when a file contains an #include "..." directive, where the
.... is a relative path name, it is resolved relative to the directory
of that file which is invoking #include syntax is found.

Windows does a similar thing for DLL's. A program can be shipped
with its DLLs, which are easily found because they are in the
same directory.

This would be a huge improvement for shared libs. It's incredible
that the developers of the ELF stuff didn't notice how
nice #include is. Nobody every has to set a weird enviornment
variable to get "foo.c" to find "foo.h".

DLLs are lacking in some technology like symbol versioning, linking
in any direction (DLL cannot attach to symbols exported by executable)
and such. Plus the use of clunky .lib files taht SO's don't require,
and __decl(dllexport) and other cruft. (That pragma mechanism by
which a source file indicates a needed DLL doesn't need a .lib file
though, IIRC).

"DLL hell", I think referred to the historic situation whereby programs
on Windows, were neglecting to take advantage of the ability to find
their own libs in the same directory, but stupidly installing DLLs in
the system folder. If that is done for some popular run-time DLL,
like a MSVC redistributable run-time, then that caused problems
because there were different version of it under a different name.

If you install your .EXE and .DLL files in one directory, there is no
"DLL Hell".

And Microsoft has a much better backwards compatibility track record
in their system DLL's like user32.dll and kernel32.dll, than pretty much
any FOSS environment.

Windows programs from the 1990's still have a good chance of running on
new Windows, even though they need DLLs.

Linux? LOL. Maybe something statically linked. Or not? (The "a.out"
executable format has been removed, right?)

In the 1990'ws, Linux had shared libraries that were made by
disassembling code, and using text editing. The libraries were not
relocatable: they were globally assigned addresses. Nothing from that
era will run today.

Only a few core libraries in the Linux ELF world actually do proper
versioning. Some just issue a new version whenever they make a breaking
change, and if that is not installed, old binaries cannot run.

But that's okay, because you just get newly recompiled everything
from your mother ship distro.

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca

Re: you think rust may *DE*throne c?

<20230810111734.913@kylheku.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27437&group=comp.lang.c#27437

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 864-117-...@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c
Subject: Re: you think rust may *DE*throne c?
Date: Thu, 10 Aug 2023 18:18:18 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 23
Message-ID: <20230810111734.913@kylheku.com>
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
<uavpcf$3t64r$1@dont-email.me> <87bkffg6qz.fsf@bsb.me.uk>
<ub1840$3q1k$1@dont-email.me> <87zg2zej54.fsf@bsb.me.uk>
<Hr6BM.359405$xMqa.20823@fx12.iad> <87il9ndiz9.fsf@bsb.me.uk>
<HJ7BM.25894$Wk53.19314@fx01.iad> <20230810090521.27@kylheku.com>
<yH8BM.430010$TCKc.359327@fx13.iad>
<542c60aa-a3bb-43ed-8e34-5340d65ed10en@googlegroups.com>
<ub360v$cvgb$2@dont-email.me>
<3e1ea2a5-6431-492b-8847-f353929b3b6cn@googlegroups.com>
<3v9BM.62260$VPEa.1580@fx33.iad>
Injection-Date: Thu, 10 Aug 2023 18:18:18 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c8ceb3884c73c57508aac2a066fd132c";
logging-data="498702"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/W69rCxDy9WKix5o6uA8APTJY1K2GnttI="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:7JBIcLvYF4oWkr6pe66PW1s6v4o=
 by: Kaz Kylheku - Thu, 10 Aug 2023 18:18 UTC

On 2023-08-10, Scott Lurndal <scott@slp53.sl.home> wrote:
> Michael S <already5chosen@yahoo.com> writes:
>>On Thursday, August 10, 2023 at 8:16:31=E2=80=AFPM UTC+3, Lew Pitcher wrote=
>>:
>
>>> But, as this is comp.lang.c and not comp.unix.programmer, I won't elabora=
>>te=20
>>> on my comment here.=20
>>
>>I'd just say that if Gnu/Linux was not a mess then people would not need to
>>invent containers etc.
>
> Say what? Containers are there for easy deployment and primarily
> for security sandboxing, not because of some soi disant linux 'dll hell'.

Is there a big difference between "not easy deployment" and "dll hell"?

Containers replace shared library hell with container hell.

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca

Re: Making accountants cross (wa Re: you think rust may outthrone c?)

<20230810111828.872@kylheku.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27438&group=comp.lang.c#27438

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 864-117-...@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c
Subject: Re: Making accountants cross (wa Re: you think rust may outthrone c?)
Date: Thu, 10 Aug 2023 18:26:50 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 100
Message-ID: <20230810111828.872@kylheku.com>
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
<uag05n$nmu5$1@dont-email.me> <uagcgc$ppbn$1@dont-email.me>
<87fs50ulog.fsf@bsb.me.uk> <uagpni$rt71$1@dont-email.me>
<87r0ohrvg0.fsf@bsb.me.uk> <uamlh1$1tr9i$1@dont-email.me>
<875y5tkptn.fsf@bsb.me.uk> <uans1e$26toe$1@dont-email.me>
<87cyzzkfxh.fsf@nosuchdomain.example.com> <uap5e6$2gd8e$1@dont-email.me>
<87350vke4n.fsf@nosuchdomain.example.com> <uap73l$2gktp$1@dont-email.me>
<87y1initxx.fsf@nosuchdomain.example.com> <uapf90$2ht0t$1@dont-email.me>
<87leenirja.fsf@nosuchdomain.example.com> <uaqdst$2q82c$1@dont-email.me>
<8M4AM.510037$TPw2.337804@fx17.iad> <uaqqou$2sa5t$1@dont-email.me>
<87wmy6j37n.fsf@bsb.me.uk>
<ad304448-30f9-4630-83c2-7d19c026fa31n@googlegroups.com>
<87r0oej0rt.fsf@bsb.me.uk> <ub2sp5$d6sv$1@dont-email.me>
<20230810091601.978@kylheku.com> <ub350r$cvgb$1@dont-email.me>
Injection-Date: Thu, 10 Aug 2023 18:26:50 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c8ceb3884c73c57508aac2a066fd132c";
logging-data="498702"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX186V+CD1a7BzBLlPF2frNcZeoSS/cwHyHU="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:9VLvndpZInYYmpiPJRpqo+oxeEI=
 by: Kaz Kylheku - Thu, 10 Aug 2023 18:26 UTC

On 2023-08-10, Lew Pitcher <lew.pitcher@digitalfreehold.ca> wrote:
> On Thu, 10 Aug 2023 16:31:31 +0000, Kaz Kylheku wrote:
>
>> On 2023-08-10, Vir Campestris <vir.campestris@invalid.invalid> wrote:
>>> On 07/08/2023 17:05, Ben Bacarisse wrote:
>>>> Hmm... With statically allocated strings, or using malloc and therefore
>>>> requiring free call not shown?
>>>>
>>>> I would rather do this: anywhere a type is defined, I'd define a FMT_xxx
>>>> macro:
>>>>
>>>> typedef float salary_t;
>>>> #define FMT_SALARY "f"
>>>>
>>>> typedef unsigned long int payrollid_t;
>>>> #define FMT_PAYROLLID "lu"
>>>>
>>>> so that one can write
>>>>
>>>> printf("Hello %s your salary is %" FMT_SALLARY
>>>> ", your payrollid %" FMT_PAYROLLID "\n",
>>>> employee.name, employee.salary, employee.payrollid);
>>>>
>>>> -- Ben.
>>>
>>> Ben, if you put floating points in money accountants get upset.
>>>
>>> Three employees are paid $100.00, so it adds up to $300.
>>>
>>> Deduct $20 from each, and it's $240.
>>>
>>> Use floating point and sooner or later it won't add up.
>>
>> Use floating-point *naively* and the truncation errors will accumulate
>> to the point of making at least a one cent difference, screwing up the
>> accounting.
>>
>> Use floating-point intelligently and that won't happen.
>>
>>> You can't have a third of a cent.
>>
>> That is neither here nor there.
>>
>> You can't have a third of a cent in accounting, because accounting is
>> decimal based, at least with US dollars and similar currencies,
>> where you don't have beasties like sixths of a dollar.
>
> Actually, many currencies (including the US Dollar) allow for measurements
> in the thousandths of a dollar, and such calculations are common in both
> stock brokerage pricing (a broker may charge, say, 5 mils per share on
> bulk trades, earning $5.00 for every 1000 shares bought/sold) and property
> tax calculation.
>
>> "Third of a cent" is a financial quantity nobody works with, in any
>> representation of dollars.
>
> Except for those who work with money as a commodity, stock brokers,
> municipal property tax assessors, and a wide variety of others. Consider,
> at this moment, I see that 1 Japanese Yen will buy 0.0069 US Dollars.
> How inconvenient would it be if programmers just took the position that
> there are no fractions of a US dollar lower than 1 cent, and that 1 Yen,
> therefore, purchases $0.00 USD?

BUt that isn't 1/3; it is 69/10000, representing a decimal value that
has been truncated to 4 digits.

It has two significant figures in it. IEEE double has 13 more
to approximate it.

..0069 in IEEE double is actually 0.00689999999999999988, if
we render it to 18 digits.

>> And even if they did, floating point
>> could handle it just fine, if everyone agreed that around 15
>> digits of precision is good enough.
>
> For very small and very large sums of money, most banking systems
> will stay /very/ far away from floatingpoint in any form.

For very small? Can you elaborate on it. IEEE double can go to 1E-308,
right, and beyond that with subnormals.

> Better
> to do (expensive) fixed-precision math and get exact answers than
> to do (cheaper) floatingpoint math and get the final /financial/

Better to know what you're doing so you can make either one
sit up and beg, and avoid rolling over.

> answer wrong. That's how banks fail, and programmers get rich
> from rounding errors (watch the movie "Office Space").

Proof by comedy movie, okay.

Companies fail by taking away the red stapler from the reclusive nerd.

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca

Re: Making accountants cross (wa Re: you think rust may outthrone c?)

<ub3acf$ev2j$6@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27439&group=comp.lang.c#27439

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chris.m....@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c
Subject: Re: Making accountants cross (wa Re: you think rust may outthrone c?)
Date: Thu, 10 Aug 2023 11:30:39 -0700
Organization: A noiseless patient Spider
Lines: 12
Message-ID: <ub3acf$ev2j$6@dont-email.me>
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
<uag05n$nmu5$1@dont-email.me> <uagcgc$ppbn$1@dont-email.me>
<87fs50ulog.fsf@bsb.me.uk> <uagpni$rt71$1@dont-email.me>
<87r0ohrvg0.fsf@bsb.me.uk> <uamlh1$1tr9i$1@dont-email.me>
<875y5tkptn.fsf@bsb.me.uk> <uans1e$26toe$1@dont-email.me>
<87cyzzkfxh.fsf@nosuchdomain.example.com> <uap5e6$2gd8e$1@dont-email.me>
<87350vke4n.fsf@nosuchdomain.example.com> <uap73l$2gktp$1@dont-email.me>
<87y1initxx.fsf@nosuchdomain.example.com> <uapf90$2ht0t$1@dont-email.me>
<87leenirja.fsf@nosuchdomain.example.com> <uaqdst$2q82c$1@dont-email.me>
<8M4AM.510037$TPw2.337804@fx17.iad> <uaqqou$2sa5t$1@dont-email.me>
<87wmy6j37n.fsf@bsb.me.uk>
<ad304448-30f9-4630-83c2-7d19c026fa31n@googlegroups.com>
<87r0oej0rt.fsf@bsb.me.uk> <ub2sp5$d6sv$1@dont-email.me>
<20230810091601.978@kylheku.com> <ub350r$cvgb$1@dont-email.me>
<20230810111828.872@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 10 Aug 2023 18:30:39 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="a38189c842f654cfc23a7d20e4af9ad2";
logging-data="490579"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+pwe6c39Wp8pL3BlwgQx4t1qC6UnraSLM="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Cancel-Lock: sha1:jmq1oU10oon7ZbMEoq6hLnXBXQI=
In-Reply-To: <20230810111828.872@kylheku.com>
Content-Language: en-US
 by: Chris M. Thomasson - Thu, 10 Aug 2023 18:30 UTC

On 8/10/2023 11:26 AM, Kaz Kylheku wrote:
> On 2023-08-10, Lew Pitcher <lew.pitcher@digitalfreehold.ca> wrote:
[...]
> Proof by comedy movie, okay.
>
> Companies fail by taking away the red stapler from the reclusive nerd.

Indeed! Can be dangerous. Highly unstable person:

https://youtu.be/pQMuSotWCEs?t=44

Ouch! ;^o

Re: you think rust may *DE*throne c?

<87v8dmd5pm.fsf@bsb.me.uk>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27441&group=comp.lang.c#27441

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ben.use...@bsb.me.uk (Ben Bacarisse)
Newsgroups: comp.lang.c
Subject: Re: you think rust may *DE*throne c?
Date: Thu, 10 Aug 2023 21:04:37 +0100
Organization: A noiseless patient Spider
Lines: 59
Message-ID: <87v8dmd5pm.fsf@bsb.me.uk>
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
<uab5ja$3mc91$1@dont-email.me> <uabeq1$3nigh$1@dont-email.me>
<uabobj$3oias$1@dont-email.me> <uaduf0$54pp$1@dont-email.me>
<uajaqg$1bc41$4@dont-email.me> <uajfq3$1cesi$1@dont-email.me>
<uat7t4$3cco6$1@dont-email.me> <uat9ca$3cjmt$1@dont-email.me>
<uatjcp$3ec7b$1@dont-email.me> <uatlrr$3epln$1@dont-email.me>
<uatr2m$3fla4$1@dont-email.me>
<909acf23-ef0e-44c7-9ebf-89846e50e871n@googlegroups.com>
<p_uAM.489417$mPI2.398490@fx15.iad>
<e5d7b49e-3472-4b70-8c52-d21243725d15n@googlegroups.com>
<87zg31ezu5.fsf@bsb.me.uk> <uavpcf$3t64r$1@dont-email.me>
<87bkffg6qz.fsf@bsb.me.uk>
<1b31e9c0-0162-4bce-8cf9-69f6704ca429n@googlegroups.com>
<87o7jfdjf5.fsf@bsb.me.uk>
<ceb751b1-bce0-4f2e-b207-7bb7bacfd207n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="1e9312cf9931c060dc623a19d6d4488d";
logging-data="529522"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1803WvMQc5rOmIwy3MY9ykvVcJcc9uz5aU="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:L7vLWiEc0/hhydeJgdSx+34uPyg=
sha1:uzFSq1JEo06WfAQvAN3XVmyC/bw=
X-BSB-Auth: 1.5702b3e055132886cdf7.20230810210437BST.87v8dmd5pm.fsf@bsb.me.uk
 by: Ben Bacarisse - Thu, 10 Aug 2023 20:04 UTC

Michael S <already5chosen@yahoo.com> writes:

> On Thursday, August 10, 2023 at 6:08:45 PM UTC+3, Ben Bacarisse wrote:
>> Michael S <already...@yahoo.com> writes:
>>
>> > On Thursday, August 10, 2023 at 2:01:55 AM UTC+3, Ben Bacarisse wrote:
>> >> Bart <b...@freeuk.com> writes:
>> >>
>> >> > On 09/08/2023 03:04, Ben Bacarisse wrote:
>> >> >> Malcolm McLean <malcolm.ar...@gmail.com> writes:
>> >> >>
>> >> >>> On Tuesday, 8 August 2023 at 18:32:21 UTC+1, Scott Lurndal wrote:
>> >> >>>>
>> >> >>>> 1) Using a make variable in the rule for '.c' -> '.o' and setting the
>> >> >>>> variable to the name of the compiler:
>> >> >>>>
>> >> >>>> CC=bcc
>> >> >>>> ...
>> >> >>>> %.o: %.c
>> >> >>>> @$(QUIET) || echo " COMPILE $<"
>> >> >>>> $(HUSHCOMPILE)$(CC) $(CFLAGS) -MMD -MP -o $@ -c $<
>> >> >>>>
>> >> >>> Exactly,
>> >> >>> Bart is right.
>> >> >>
>> >> >> You are deliberately ignoring the context. Bart wants gcc prog.c to
>> >> >> write to prog, but in the computer world I inhabit, you do that with
>> >> >> make prog.
>> >> >
>> >> > This is a good example of double standards.
>> >> >
>> >> > I've complained in the past about having to supply the .c extension to a
>> >> > /C/ compiler.
>> >> >
>> >> > Now here make does not need an extension.
>> >>
>> >> I call it consistency. A compiler is given the file to process, make is
>> >> given the file to build (AKA "make").
>> >
>> > I disagree.
>> OK, but your disagreement is about something else.
>> > Consistent design, a.k.a. principle of minimal surprise, would be for
>> > basal utility 'make' to have no built-in rules. On top of it, system
>> > can supply one or more extended utilities, probably implemented as
>> > shell scripts, that do have built-in rules.
>>
>> So you also disagree with Bart whose compiler has a built-in rule about
>> what file extension to assume. You probably won't bring that up, though.
>>
> Compiler and generic build utility are not in the same boat.
> It is less surprising to have defaults in compiler than to have built-in
> implicit rules in generic build utility.

I'm not sure I'd call it surprising as such but it's certainly
intellectually cleaner to have none and some invocation that loads a
standard set.

--
Ben.

Re: you think rust may *DE*throne c?

<tacBM.86688$uEkc.1340@fx35.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27442&group=comp.lang.c#27442

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx35.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: you think rust may *DE*throne c?
Newsgroups: comp.lang.c
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com> <uatr2m$3fla4$1@dont-email.me> <909acf23-ef0e-44c7-9ebf-89846e50e871n@googlegroups.com> <p_uAM.489417$mPI2.398490@fx15.iad> <e5d7b49e-3472-4b70-8c52-d21243725d15n@googlegroups.com> <87zg31ezu5.fsf@bsb.me.uk> <uavpcf$3t64r$1@dont-email.me> <87bkffg6qz.fsf@bsb.me.uk> <1b31e9c0-0162-4bce-8cf9-69f6704ca429n@googlegroups.com> <87o7jfdjf5.fsf@bsb.me.uk> <ceb751b1-bce0-4f2e-b207-7bb7bacfd207n@googlegroups.com> <87v8dmd5pm.fsf@bsb.me.uk>
Lines: 61
Message-ID: <tacBM.86688$uEkc.1340@fx35.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Thu, 10 Aug 2023 20:56:57 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Thu, 10 Aug 2023 20:56:57 GMT
X-Received-Bytes: 3625
 by: Scott Lurndal - Thu, 10 Aug 2023 20:56 UTC

Ben Bacarisse <ben.usenet@bsb.me.uk> writes:
>Michael S <already5chosen@yahoo.com> writes:
>
>> On Thursday, August 10, 2023 at 6:08:45 PM UTC+3, Ben Bacarisse wrote:
>>> Michael S <already...@yahoo.com> writes:
>>>
>>> > On Thursday, August 10, 2023 at 2:01:55 AM UTC+3, Ben Bacarisse wrote:
>>> >> Bart <b...@freeuk.com> writes:
>>> >>
>>> >> > On 09/08/2023 03:04, Ben Bacarisse wrote:
>>> >> >> Malcolm McLean <malcolm.ar...@gmail.com> writes:
>>> >> >>
>>> >> >>> On Tuesday, 8 August 2023 at 18:32:21 UTC+1, Scott Lurndal wrote:
>>> >> >>>>
>>> >> >>>> 1) Using a make variable in the rule for '.c' -> '.o' and setting the
>>> >> >>>> variable to the name of the compiler:
>>> >> >>>>
>>> >> >>>> CC=bcc
>>> >> >>>> ...
>>> >> >>>> %.o: %.c
>>> >> >>>> @$(QUIET) || echo " COMPILE $<"
>>> >> >>>> $(HUSHCOMPILE)$(CC) $(CFLAGS) -MMD -MP -o $@ -c $<
>>> >> >>>>
>>> >> >>> Exactly,
>>> >> >>> Bart is right.
>>> >> >>
>>> >> >> You are deliberately ignoring the context. Bart wants gcc prog.c to
>>> >> >> write to prog, but in the computer world I inhabit, you do that with
>>> >> >> make prog.
>>> >> >
>>> >> > This is a good example of double standards.
>>> >> >
>>> >> > I've complained in the past about having to supply the .c extension to a
>>> >> > /C/ compiler.
>>> >> >
>>> >> > Now here make does not need an extension.
>>> >>
>>> >> I call it consistency. A compiler is given the file to process, make is
>>> >> given the file to build (AKA "make").
>>> >
>>> > I disagree.
>>> OK, but your disagreement is about something else.
>>> > Consistent design, a.k.a. principle of minimal surprise, would be for
>>> > basal utility 'make' to have no built-in rules. On top of it, system
>>> > can supply one or more extended utilities, probably implemented as
>>> > shell scripts, that do have built-in rules.
>>>
>>> So you also disagree with Bart whose compiler has a built-in rule about
>>> what file extension to assume. You probably won't bring that up, though.
>>>
>> Compiler and generic build utility are not in the same boat.
>> It is less surprising to have defaults in compiler than to have built-in
>> implicit rules in generic build utility.
>
>I'm not sure I'd call it surprising as such but it's certainly
>intellectually cleaner to have none and some invocation that loads a
>standard set.

Of course, if you don't want the built-in implicit rules, system V
make, POSIX make and gnu make support the -r command line option in addition to the
aforementioned .SUFFIXES.

Re: you think rust may *DE*throne c?

<28fee821-781d-4532-9c53-fb8756a000c0n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27443&group=comp.lang.c#27443

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:622a:181d:b0:40f:2230:f11 with SMTP id t29-20020a05622a181d00b0040f22300f11mr829qtc.5.1691703863937;
Thu, 10 Aug 2023 14:44:23 -0700 (PDT)
X-Received: by 2002:a17:902:f682:b0:1bc:95bf:bdc9 with SMTP id
l2-20020a170902f68200b001bc95bfbdc9mr1764plg.13.1691703862431; Thu, 10 Aug
2023 14:44:22 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Thu, 10 Aug 2023 14:44:21 -0700 (PDT)
In-Reply-To: <20230810110112.359@kylheku.com>
Injection-Info: google-groups.googlegroups.com; posting-host=5.172.255.174; posting-account=Sb6m8goAAABbWsBL7gouk3bfLsuxwMgN
NNTP-Posting-Host: 5.172.255.174
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
<909acf23-ef0e-44c7-9ebf-89846e50e871n@googlegroups.com> <p_uAM.489417$mPI2.398490@fx15.iad>
<e5d7b49e-3472-4b70-8c52-d21243725d15n@googlegroups.com> <87zg31ezu5.fsf@bsb.me.uk>
<uavpcf$3t64r$1@dont-email.me> <87bkffg6qz.fsf@bsb.me.uk> <ub1840$3q1k$1@dont-email.me>
<87zg2zej54.fsf@bsb.me.uk> <Hr6BM.359405$xMqa.20823@fx12.iad>
<87il9ndiz9.fsf@bsb.me.uk> <HJ7BM.25894$Wk53.19314@fx01.iad>
<20230810090521.27@kylheku.com> <yH8BM.430010$TCKc.359327@fx13.iad> <20230810110112.359@kylheku.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <28fee821-781d-4532-9c53-fb8756a000c0n@googlegroups.com>
Subject: Re: you think rust may *DE*throne c?
From: profesor...@gmail.com (fir)
Injection-Date: Thu, 10 Aug 2023 21:44:23 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 4001
 by: fir - Thu, 10 Aug 2023 21:44 UTC

czwartek, 10 sierpnia 2023 o 20:16:49 UTC+2 Kaz Kylheku napisał(a):
>
> DLLs are lacking in some technology like symbol versioning, linking
> in any direction (DLL cannot attach to symbols exported by executable)
> and such. Plus the use of clunky .lib files taht SO's don't require,
> and __decl(dllexport) and other cruft. (That pragma mechanism by
> which a source file indicates a needed DLL doesn't need a .lib file
> though, IIRC).
>

i dont remember as to this exe, though i remember i was testing it and
those relative usage - when i was writing more than one dll was making
some problems to me.. i dont remember hovever if you cant call functions in exe
though - problem was rather that when you want to compile dll using other dll you need to have the other build (becouse compilaton readed binary dll to check if symbols exist even if
linking is rruntime - this is in fact stupid but this is a consequence of fact that when
you link to a symbol compilers dont know in which of dlls you want to0 link it is,
and it need to put not only symbols but their parent module names in output) ..
it is mighty stupid bcouse you cant compile code that uses the dll that you dont really get
(unles there is some way providing this info on symbold what is the name of the
parent module of them, __declspec(dllimport) are not a problem though

it should be some other extension too like

__something "green fire.dll" //import module name for given symbols
{ __declspec(dllimport) int foo(int a);
__declspec(dllimport) float xx;
}

but i dont know if there is something like that

but besides in practice there are no problems with dlls at least when i use it
is a breat with butter

dlls are very likeable and i tell not a first time that if someone coded in c on windows he must
learn dlls becouse dlls are sorta part of practical c..and its real nice part (ofc it lacks types
encoded and call conventions which would allow to just get rid of headers - check my thread/post on it)

probably it would allow even normal c to get rid of headers as pif everything would just work without headers people just could not include them and tha wouldnt break codes

Re: you think rust may *DE*throne c?

<5a314af7-84f3-40dc-b04a-e5a8b4166aben@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27444&group=comp.lang.c#27444

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:622a:1a87:b0:40f:d6f0:7688 with SMTP id s7-20020a05622a1a8700b0040fd6f07688mr1788qtc.1.1691704611991;
Thu, 10 Aug 2023 14:56:51 -0700 (PDT)
X-Received: by 2002:a63:3408:0:b0:553:b2a0:4ddd with SMTP id
b8-20020a633408000000b00553b2a04dddmr707017pga.2.1691704610987; Thu, 10 Aug
2023 14:56:50 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Thu, 10 Aug 2023 14:56:50 -0700 (PDT)
In-Reply-To: <28fee821-781d-4532-9c53-fb8756a000c0n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=5.172.255.174; posting-account=Sb6m8goAAABbWsBL7gouk3bfLsuxwMgN
NNTP-Posting-Host: 5.172.255.174
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
<909acf23-ef0e-44c7-9ebf-89846e50e871n@googlegroups.com> <p_uAM.489417$mPI2.398490@fx15.iad>
<e5d7b49e-3472-4b70-8c52-d21243725d15n@googlegroups.com> <87zg31ezu5.fsf@bsb.me.uk>
<uavpcf$3t64r$1@dont-email.me> <87bkffg6qz.fsf@bsb.me.uk> <ub1840$3q1k$1@dont-email.me>
<87zg2zej54.fsf@bsb.me.uk> <Hr6BM.359405$xMqa.20823@fx12.iad>
<87il9ndiz9.fsf@bsb.me.uk> <HJ7BM.25894$Wk53.19314@fx01.iad>
<20230810090521.27@kylheku.com> <yH8BM.430010$TCKc.359327@fx13.iad>
<20230810110112.359@kylheku.com> <28fee821-781d-4532-9c53-fb8756a000c0n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <5a314af7-84f3-40dc-b04a-e5a8b4166aben@googlegroups.com>
Subject: Re: you think rust may *DE*throne c?
From: profesor...@gmail.com (fir)
Injection-Date: Thu, 10 Aug 2023 21:56:51 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 5110
 by: fir - Thu, 10 Aug 2023 21:56 UTC

czwartek, 10 sierpnia 2023 o 23:44:31 UTC+2 fir napisał(a):
> czwartek, 10 sierpnia 2023 o 20:16:49 UTC+2 Kaz Kylheku napisał(a):
> >
> > DLLs are lacking in some technology like symbol versioning, linking
> > in any direction (DLL cannot attach to symbols exported by executable)
> > and such. Plus the use of clunky .lib files taht SO's don't require,
> > and __decl(dllexport) and other cruft. (That pragma mechanism by
> > which a source file indicates a needed DLL doesn't need a .lib file
> > though, IIRC).
> >
> i dont remember as to this exe, though i remember i was testing it and
> those relative usage - when i was writing more than one dll was making
> some problems to me.. i dont remember hovever if you cant call functions in exe
> though - problem was rather that when you want to compile dll using other dll you need to have the other build (becouse compilaton readed binary dll to check if symbols exist even if
> linking is rruntime - this is in fact stupid but this is a consequence of fact that when
> you link to a symbol compilers dont know in which of dlls you want to0 link it is,
> and it need to put not only symbols but their parent module names in output) ..
> it is mighty stupid bcouse you cant compile code that uses the dll that you dont really get
> (unles there is some way providing this info on symbold what is the name of the
> parent module of them, __declspec(dllimport) are not a problem though
>
> it should be some other extension too like
>
> __something "green fire.dll" //import module name for given symbols
> {
> __declspec(dllimport) int foo(int a);
> __declspec(dllimport) float xx;
> }
>

ofc "normal c" also has this error becouse when you put symbol names in
normal c header you would in fact also needed to enclose it in module name
and some { } better too

they didnt do this probably as some may say, the obj modules cant have duplicates becouse
in c code you couldnt call a symbol that has duplicates at all..but on assembly/binary level
you totally can as those symbold evenif 10 of them have identycal name are there
just 32 bit adresses each of other value so on binary level there is no problem
with duplicated names of imports

more better adding those enclosing module names just gives something like compile time
or link time checking - you dont mistake where somethig should be, also get better
compile/link errors and also simply could use thet extended headers info to link
without providing this info in commandline

> but i dont know if there is something like that
>
>
> but besides in practice there are no problems with dlls at least when i use it
> is a breat with butter
>
> dlls are very likeable and i tell not a first time that if someone coded in c on windows he must
> learn dlls becouse dlls are sorta part of practical c..and its real nice part (ofc it lacks types
> encoded and call conventions which would allow to just get rid of headers - check my thread/post on it)
>
> probably it would allow even normal c to get rid of headers as pif everything would just work without headers people just could not include them and tha wouldnt break codes

Re: you think rust may *DE*throne c?

<ub3n7j$haft$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27445&group=comp.lang.c#27445

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bc...@freeuk.com (Bart)
Newsgroups: comp.lang.c
Subject: Re: you think rust may *DE*throne c?
Date: Thu, 10 Aug 2023 23:09:57 +0100
Organization: A noiseless patient Spider
Lines: 41
Message-ID: <ub3n7j$haft$1@dont-email.me>
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
<909acf23-ef0e-44c7-9ebf-89846e50e871n@googlegroups.com>
<p_uAM.489417$mPI2.398490@fx15.iad>
<e5d7b49e-3472-4b70-8c52-d21243725d15n@googlegroups.com>
<87zg31ezu5.fsf@bsb.me.uk> <uavpcf$3t64r$1@dont-email.me>
<87bkffg6qz.fsf@bsb.me.uk> <ub1840$3q1k$1@dont-email.me>
<87zg2zej54.fsf@bsb.me.uk> <Hr6BM.359405$xMqa.20823@fx12.iad>
<87il9ndiz9.fsf@bsb.me.uk> <HJ7BM.25894$Wk53.19314@fx01.iad>
<20230810090521.27@kylheku.com> <yH8BM.430010$TCKc.359327@fx13.iad>
<20230810110112.359@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 10 Aug 2023 22:09:55 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="2e57af83912fa92cd513fea0a1b729ed";
logging-data="567805"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+klqB0Q9RGeENZVMi2qmnL3X2S6NAMVDA="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Cancel-Lock: sha1:IEojBJZpq9hJIsFOTV+tyyupjos=
In-Reply-To: <20230810110112.359@kylheku.com>
 by: Bart - Thu, 10 Aug 2023 22:09 UTC

On 10/08/2023 19:16, Kaz Kylheku wrote:
> On 2023-08-10, Scott Lurndal <scott@slp53.sl.home> wrote:
>> Ah, yes. DLL hell. Something that has not yet been an issue for
>> unix/linux, and hopefully never will.
>
> While DLLs have some issues, there are some aspects of DLL's that
> are better than shared libraries on Linux.
>
> The Unix people hit on a good idea in their C language implementation:
> that when a file contains an #include "..." directive, where the
> ... is a relative path name, it is resolved relative to the directory
> of that file which is invoking #include syntax is found.
>
> Windows does a similar thing for DLL's. A program can be shipped
> with its DLLs, which are easily found because they are in the
> same directory.
>
> This would be a huge improvement for shared libs. It's incredible
> that the developers of the ELF stuff didn't notice how
> nice #include is. Nobody every has to set a weird enviornment
> variable to get "foo.c" to find "foo.h".
>
> DLLs are lacking in some technology like symbol versioning, linking
> in any direction (DLL cannot attach to symbols exported by executable)
> and such. Plus the use of clunky .lib files taht SO's don't require,

That depends on compiler. gcc, tcc, bcc can directly link to DLLs. Ones
like MSVC use .lib files (I don't know why they are necessary).

> and __decl(dllexport) and other cruft.

This is C specific and seems to vary by compiler. I could never
understand how that works, and I've never used it.

With gcc generating the DLL, it seems to just export any function that
isn't static. bcc does the same, but tcc is peculiar.

So, how do you control what functions to export from a .so file?

Re: you think rust may *DE*throne c?

<ub3nm7$haft$2@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27446&group=comp.lang.c#27446

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bc...@freeuk.com (Bart)
Newsgroups: comp.lang.c
Subject: Re: you think rust may *DE*throne c?
Date: Thu, 10 Aug 2023 23:17:44 +0100
Organization: A noiseless patient Spider
Lines: 63
Message-ID: <ub3nm7$haft$2@dont-email.me>
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
<909acf23-ef0e-44c7-9ebf-89846e50e871n@googlegroups.com>
<p_uAM.489417$mPI2.398490@fx15.iad>
<e5d7b49e-3472-4b70-8c52-d21243725d15n@googlegroups.com>
<87zg31ezu5.fsf@bsb.me.uk> <uavpcf$3t64r$1@dont-email.me>
<87bkffg6qz.fsf@bsb.me.uk> <ub1840$3q1k$1@dont-email.me>
<87zg2zej54.fsf@bsb.me.uk> <Hr6BM.359405$xMqa.20823@fx12.iad>
<87il9ndiz9.fsf@bsb.me.uk> <HJ7BM.25894$Wk53.19314@fx01.iad>
<20230810090521.27@kylheku.com> <yH8BM.430010$TCKc.359327@fx13.iad>
<20230810110112.359@kylheku.com>
<28fee821-781d-4532-9c53-fb8756a000c0n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 10 Aug 2023 22:17:43 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="2e57af83912fa92cd513fea0a1b729ed";
logging-data="567805"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18i16Y2UOuH4lODhrjn62BvSOWd/2Fsvm4="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Cancel-Lock: sha1:zkDfrzbg6ECxzp+RV25p5rH/YbQ=
In-Reply-To: <28fee821-781d-4532-9c53-fb8756a000c0n@googlegroups.com>
 by: Bart - Thu, 10 Aug 2023 22:17 UTC

On 10/08/2023 22:44, fir wrote:
> czwartek, 10 sierpnia 2023 o 20:16:49 UTC+2 Kaz Kylheku napisał(a):
>>
>> DLLs are lacking in some technology like symbol versioning, linking
>> in any direction (DLL cannot attach to symbols exported by executable)
>> and such. Plus the use of clunky .lib files taht SO's don't require,
>> and __decl(dllexport) and other cruft. (That pragma mechanism by
>> which a source file indicates a needed DLL doesn't need a .lib file
>> though, IIRC).
>>
>
> i dont remember as to this exe, though i remember i was testing it and
> those relative usage - when i was writing more than one dll was making
> some problems to me.. i dont remember hovever if you cant call functions in exe
> though - problem was rather that when you want to compile dll using other dll you need to have the other build (becouse compilaton readed binary dll to check if symbols exist even if
> linking is rruntime - this is in fact stupid but this is a consequence of fact that when
> you link to a symbol compilers dont know in which of dlls you want to0 link it is,
> and it need to put not only symbols but their parent module names in output) ..
> it is mighty stupid bcouse you cant compile code that uses the dll that you dont really get
> (unles there is some way providing this info on symbold what is the name of the
> parent module of them, __declspec(dllimport) are not a problem though
>
> it should be some other extension too like
>
> __something "green fire.dll" //import module name for given symbols
> {
> __declspec(dllimport) int foo(int a);
> __declspec(dllimport) float xx;
> }
>
> but i dont know if there is something like that
>
>
> but besides in practice there are no problems with dlls at least when i use it
> is a breat with butter
>
> dlls are very likeable and i tell not a first time that if someone coded in c on windows he must
> learn dlls becouse dlls are sorta part of practical c..and its real nice part (ofc it lacks types
> encoded and call conventions which would allow to just get rid of headers - check my thread/post on it)
>
> probably it would allow even normal c to get rid of headers as pif everything would just work without headers people just could not include them and tha wouldnt break codes

How would that work? To use a function exported from a DLL, you will
need a function signature, perhaps a set of usertypes, enums and #defines.

All the stuff that normally is provided by a header.

Where would that information come from?

(My own idea was for an interface info to be embedded inside the DLL,
and accessed by calling a special exported function. For C, that could
just return a string containing the normal header code.

But it would need cooperation from the people creating the DLL (who
could be writing in any language, not C).

And from C compilers to delve inside DLL files (and at an early stage
long before linking). Since C compilers can't even shake off
anachronisms like -lm and a.out, I can't see that happening.)

My idea was for my own private use

Re: you think rust may *DE*throne c?

<08e28be9-2867-46be-872c-86bc3418b908n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27447&group=comp.lang.c#27447

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:6214:8ed:b0:641:8c7f:cec2 with SMTP id dr13-20020a05621408ed00b006418c7fcec2mr2555qvb.0.1691708787439;
Thu, 10 Aug 2023 16:06:27 -0700 (PDT)
X-Received: by 2002:a63:3d4b:0:b0:563:fac6:9566 with SMTP id
k72-20020a633d4b000000b00563fac69566mr14546pga.7.1691708786350; Thu, 10 Aug
2023 16:06:26 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Thu, 10 Aug 2023 16:06:25 -0700 (PDT)
In-Reply-To: <ub3nm7$haft$2@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=5.172.255.38; posting-account=Sb6m8goAAABbWsBL7gouk3bfLsuxwMgN
NNTP-Posting-Host: 5.172.255.38
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
<909acf23-ef0e-44c7-9ebf-89846e50e871n@googlegroups.com> <p_uAM.489417$mPI2.398490@fx15.iad>
<e5d7b49e-3472-4b70-8c52-d21243725d15n@googlegroups.com> <87zg31ezu5.fsf@bsb.me.uk>
<uavpcf$3t64r$1@dont-email.me> <87bkffg6qz.fsf@bsb.me.uk> <ub1840$3q1k$1@dont-email.me>
<87zg2zej54.fsf@bsb.me.uk> <Hr6BM.359405$xMqa.20823@fx12.iad>
<87il9ndiz9.fsf@bsb.me.uk> <HJ7BM.25894$Wk53.19314@fx01.iad>
<20230810090521.27@kylheku.com> <yH8BM.430010$TCKc.359327@fx13.iad>
<20230810110112.359@kylheku.com> <28fee821-781d-4532-9c53-fb8756a000c0n@googlegroups.com>
<ub3nm7$haft$2@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <08e28be9-2867-46be-872c-86bc3418b908n@googlegroups.com>
Subject: Re: you think rust may *DE*throne c?
From: profesor...@gmail.com (fir)
Injection-Date: Thu, 10 Aug 2023 23:06:27 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: fir - Thu, 10 Aug 2023 23:06 UTC

piątek, 11 sierpnia 2023 o 00:17:57 UTC+2 Bart napisał(a):
> On 10/08/2023 22:44, fir wrote:
> > czwartek, 10 sierpnia 2023 o 20:16:49 UTC+2 Kaz Kylheku napisał(a):
> >>
> >> DLLs are lacking in some technology like symbol versioning, linking
> >> in any direction (DLL cannot attach to symbols exported by executable)
> >> and such. Plus the use of clunky .lib files taht SO's don't require,
> >> and __decl(dllexport) and other cruft. (That pragma mechanism by
> >> which a source file indicates a needed DLL doesn't need a .lib file
> >> though, IIRC).
> >>
> >
> > i dont remember as to this exe, though i remember i was testing it and
> > those relative usage - when i was writing more than one dll was making
> > some problems to me.. i dont remember hovever if you cant call functions in exe
> > though - problem was rather that when you want to compile dll using other dll you need to have the other build (becouse compilaton readed binary dll to check if symbols exist even if
> > linking is rruntime - this is in fact stupid but this is a consequence of fact that when
> > you link to a symbol compilers dont know in which of dlls you want to0 link it is,
> > and it need to put not only symbols but their parent module names in output) ..
> > it is mighty stupid bcouse you cant compile code that uses the dll that you dont really get
> > (unles there is some way providing this info on symbold what is the name of the
> > parent module of them, __declspec(dllimport) are not a problem though
> >
> > it should be some other extension too like
> >
> > __something "green fire.dll" //import module name for given symbols
> > {
> > __declspec(dllimport) int foo(int a);
> > __declspec(dllimport) float xx;
> > }
> >
> > but i dont know if there is something like that
> >
> >
> > but besides in practice there are no problems with dlls at least when i use it
> > is a breat with butter
> >
> > dlls are very likeable and i tell not a first time that if someone coded in c on windows he must
> > learn dlls becouse dlls are sorta part of practical c..and its real nice part (ofc it lacks types
> > encoded and call conventions which would allow to just get rid of headers - check my thread/post on it)
> >
> > probably it would allow even normal c to get rid of headers as pif everything would just work without headers people just could not include them and tha wouldnt break codes
> How would that work? To use a function exported from a DLL, you will
> need a function signature, perhaps a set of usertypes, enums and #defines..
>
> All the stuff that normally is provided by a header.
>
> Where would that information come from?
>
> (My own idea was for an interface info to be embedded inside the DLL,
> and accessed by calling a special exported function. For C, that could
> just return a string containing the normal header code.
>
> But it would need cooperation from the people creating the DLL (who
> could be writing in any language, not C).
>
> And from C compilers to delve inside DLL files (and at an early stage
> long before linking). Since C compilers can't even shake off
> anachronisms like -lm and a.out, I can't see that happening.)
>
>
>
> My idea was for my own private use
doi
lern how PE format works coz it is really important - not mucnh pleasant to read but important as hell

as how to encode this see a thread named
"new abi proposition (for modules/dynamic libraries)" from a month ago (13 VII)
doing this is not a problem PE (exe/dll) format is open to a section, in fact .iidata import section is just mainly a list of strings with dll names and its symbol names to import - it also has this array of pointers but empty (afair, or other junk) - those names are important as windows links by names - and just fill the pointers with proper values

i mean when i gor my program.exe that uses my green.fire.dll then it works like that::

windows load green.fire.dll into ram, the code for function "SetupWindow5" is placed in some ram area (in program.exe space) dll has export table where "SetupWindow5" exist and offset in dll where asm code for it is stored in that dll ...program.exe also is loaded in ram its import section is then loaded in ram it also has "SetupWindow5" string and correspondant junk pointer which is then fulfilled with real adres, so when i write

call ("green.fire.dll"->SetupWindow5)

then it really is something like call (0x00401034) which pointer is in import section of loaded exe
(whuch was loaded under say 0x00400000) and its value points to sax 0x0050cccc where code oof SetpuWindow5 of dll was loaded

that was digression but imo its important to understend it well

import section is just section in PE/dll file - but it contais literally only module names and symbol names with nothing more (except that junk pointers) - you need just add another section
in dfil file containing calling convention for each function symbol, and possibly also list of argument types and names, and even type definitions

roughly how it should look like i described in that post month ago

i could do it myself as i got my own assembler - and maybe i should becouse if someone else would do that before there is a chance it will do it more bad than i (im not in hurry hovever and it can take me 10 years becouse i got some other obligations and not code to much recent years)

Re: you think rust may *DE*throne c?

<948cea01-ef27-44a3-a18b-82d3cf0538c8n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27448&group=comp.lang.c#27448

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:6214:1630:b0:640:f8cf:9f3c with SMTP id e16-20020a056214163000b00640f8cf9f3cmr2082qvw.9.1691709651632;
Thu, 10 Aug 2023 16:20:51 -0700 (PDT)
X-Received: by 2002:a17:903:2443:b0:1b8:929f:1990 with SMTP id
l3-20020a170903244300b001b8929f1990mr76349pls.6.1691709651337; Thu, 10 Aug
2023 16:20:51 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Thu, 10 Aug 2023 16:20:50 -0700 (PDT)
In-Reply-To: <08e28be9-2867-46be-872c-86bc3418b908n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=5.172.255.38; posting-account=Sb6m8goAAABbWsBL7gouk3bfLsuxwMgN
NNTP-Posting-Host: 5.172.255.38
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
<909acf23-ef0e-44c7-9ebf-89846e50e871n@googlegroups.com> <p_uAM.489417$mPI2.398490@fx15.iad>
<e5d7b49e-3472-4b70-8c52-d21243725d15n@googlegroups.com> <87zg31ezu5.fsf@bsb.me.uk>
<uavpcf$3t64r$1@dont-email.me> <87bkffg6qz.fsf@bsb.me.uk> <ub1840$3q1k$1@dont-email.me>
<87zg2zej54.fsf@bsb.me.uk> <Hr6BM.359405$xMqa.20823@fx12.iad>
<87il9ndiz9.fsf@bsb.me.uk> <HJ7BM.25894$Wk53.19314@fx01.iad>
<20230810090521.27@kylheku.com> <yH8BM.430010$TCKc.359327@fx13.iad>
<20230810110112.359@kylheku.com> <28fee821-781d-4532-9c53-fb8756a000c0n@googlegroups.com>
<ub3nm7$haft$2@dont-email.me> <08e28be9-2867-46be-872c-86bc3418b908n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <948cea01-ef27-44a3-a18b-82d3cf0538c8n@googlegroups.com>
Subject: Re: you think rust may *DE*throne c?
From: profesor...@gmail.com (fir)
Injection-Date: Thu, 10 Aug 2023 23:20:51 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: fir - Thu, 10 Aug 2023 23:20 UTC

piątek, 11 sierpnia 2023 o 01:06:37 UTC+2 fir napisał(a):
> piątek, 11 sierpnia 2023 o 00:17:57 UTC+2 Bart napisał(a):
> > On 10/08/2023 22:44, fir wrote:
> > > czwartek, 10 sierpnia 2023 o 20:16:49 UTC+2 Kaz Kylheku napisał(a):
> > >>
> > >> DLLs are lacking in some technology like symbol versioning, linking
> > >> in any direction (DLL cannot attach to symbols exported by executable)
> > >> and such. Plus the use of clunky .lib files taht SO's don't require,
> > >> and __decl(dllexport) and other cruft. (That pragma mechanism by
> > >> which a source file indicates a needed DLL doesn't need a .lib file
> > >> though, IIRC).
> > >>
> > >
> > > i dont remember as to this exe, though i remember i was testing it and
> > > those relative usage - when i was writing more than one dll was making
> > > some problems to me.. i dont remember hovever if you cant call functions in exe
> > > though - problem was rather that when you want to compile dll using other dll you need to have the other build (becouse compilaton readed binary dll to check if symbols exist even if
> > > linking is rruntime - this is in fact stupid but this is a consequence of fact that when
> > > you link to a symbol compilers dont know in which of dlls you want to0 link it is,
> > > and it need to put not only symbols but their parent module names in output) ..
> > > it is mighty stupid bcouse you cant compile code that uses the dll that you dont really get
> > > (unles there is some way providing this info on symbold what is the name of the
> > > parent module of them, __declspec(dllimport) are not a problem though
> > >
> > > it should be some other extension too like
> > >
> > > __something "green fire.dll" //import module name for given symbols
> > > {
> > > __declspec(dllimport) int foo(int a);
> > > __declspec(dllimport) float xx;
> > > }
> > >
> > > but i dont know if there is something like that
> > >
> > >
> > > but besides in practice there are no problems with dlls at least when i use it
> > > is a breat with butter
> > >
> > > dlls are very likeable and i tell not a first time that if someone coded in c on windows he must
> > > learn dlls becouse dlls are sorta part of practical c..and its real nice part (ofc it lacks types
> > > encoded and call conventions which would allow to just get rid of headers - check my thread/post on it)
> > >
> > > probably it would allow even normal c to get rid of headers as pif everything would just work without headers people just could not include them and tha wouldnt break codes
> > How would that work? To use a function exported from a DLL, you will
> > need a function signature, perhaps a set of usertypes, enums and #defines.
> >
> > All the stuff that normally is provided by a header.
> >
> > Where would that information come from?
> >
> > (My own idea was for an interface info to be embedded inside the DLL,
> > and accessed by calling a special exported function. For C, that could
> > just return a string containing the normal header code.
> >
> > But it would need cooperation from the people creating the DLL (who
> > could be writing in any language, not C).
> >
> > And from C compilers to delve inside DLL files (and at an early stage
> > long before linking). Since C compilers can't even shake off
> > anachronisms like -lm and a.out, I can't see that happening.)
> >
> >
> >
> > My idea was for my own private use
> doi
> lern how PE format works coz it is really important - not mucnh pleasant to read but important as hell
>
> as how to encode this see a thread named
> "new abi proposition (for modules/dynamic libraries)" from a month ago (13 VII)
>
> doing this is not a problem PE (exe/dll) format is open to a section, in fact .iidata import section is just mainly a list of strings with dll names and its symbol names to import - it also has this array of pointers but empty (afair, or other junk) - those names are important as windows links by names - and just fill the pointers with proper values
>
> i mean when i gor my program.exe that uses my green.fire.dll then it works like that::
>
> windows load green.fire.dll into ram, the code for function "SetupWindow5" is placed in some ram area (in program.exe space) dll has export table where "SetupWindow5" exist and offset in dll where asm code for it is stored in that dll ...program.exe also is loaded in ram its import section is then loaded in ram it also has "SetupWindow5" string and correspondant junk pointer which is then fulfilled with real adres, so when i write
>
> call ("green.fire.dll"->SetupWindow5)
>
> then it really is something like call (0x00401034) which pointer is in import section of loaded exe
> (whuch was loaded under say 0x00400000) and its value points to sax 0x0050cccc where code oof SetpuWindow5 of dll was loaded
>
> that was digression but imo its important to understend it well
>
> import section is just section in PE/dll file - but it contais literally only module names and symbol names with nothing more (except that junk pointers) - you need just add another section
> in dfil file containing calling convention for each function symbol, and possibly also list of argument types and names, and even type definitions
>
> roughly how it should look like i described in that post month ago
>
> i could do it myself as i got my own assembler - and maybe i should becouse if someone else would do that before there is a chance it will do it more bad than i (im not in hurry hovever and it can take me 10 years becouse i got some other obligations and not code to much recent years)

and how it would work, simply when compiling with -l"dllname" coimpiler would terat such dll section contents as tidays header... this has this disadvantage you need binary dll to compile into it buts its analog to just have a header, one also could wrote extern declarations by hand and compile without it

Re: you think rust may *DE*throne c?

<b9f17d28-f1ff-42fb-92e7-53b01782b7ffn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27449&group=comp.lang.c#27449

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a37:5a41:0:b0:76c:daf4:2787 with SMTP id o62-20020a375a41000000b0076cdaf42787mr4657qkb.4.1691710694428;
Thu, 10 Aug 2023 16:38:14 -0700 (PDT)
X-Received: by 2002:a17:902:cec1:b0:1bd:b678:4bd6 with SMTP id
d1-20020a170902cec100b001bdb6784bd6mr106875plg.4.1691710693839; Thu, 10 Aug
2023 16:38:13 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Thu, 10 Aug 2023 16:38:13 -0700 (PDT)
In-Reply-To: <08e28be9-2867-46be-872c-86bc3418b908n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=5.172.255.19; posting-account=Sb6m8goAAABbWsBL7gouk3bfLsuxwMgN
NNTP-Posting-Host: 5.172.255.19
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
<909acf23-ef0e-44c7-9ebf-89846e50e871n@googlegroups.com> <p_uAM.489417$mPI2.398490@fx15.iad>
<e5d7b49e-3472-4b70-8c52-d21243725d15n@googlegroups.com> <87zg31ezu5.fsf@bsb.me.uk>
<uavpcf$3t64r$1@dont-email.me> <87bkffg6qz.fsf@bsb.me.uk> <ub1840$3q1k$1@dont-email.me>
<87zg2zej54.fsf@bsb.me.uk> <Hr6BM.359405$xMqa.20823@fx12.iad>
<87il9ndiz9.fsf@bsb.me.uk> <HJ7BM.25894$Wk53.19314@fx01.iad>
<20230810090521.27@kylheku.com> <yH8BM.430010$TCKc.359327@fx13.iad>
<20230810110112.359@kylheku.com> <28fee821-781d-4532-9c53-fb8756a000c0n@googlegroups.com>
<ub3nm7$haft$2@dont-email.me> <08e28be9-2867-46be-872c-86bc3418b908n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b9f17d28-f1ff-42fb-92e7-53b01782b7ffn@googlegroups.com>
Subject: Re: you think rust may *DE*throne c?
From: profesor...@gmail.com (fir)
Injection-Date: Thu, 10 Aug 2023 23:38:14 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: fir - Thu, 10 Aug 2023 23:38 UTC

piątek, 11 sierpnia 2023 o 01:06:37 UTC+2 fir napisał(a):
>
> call ("green.fire.dll"->SetupWindow5)
>
> then it really is something like call (0x00401034) which pointer is in import section of loaded exe
> (whuch was loaded under say 0x00400000) and its value points to sax 0x0050cccc where code oof SetpuWindow5 of dll was loaded
>

more precisely values are for example

Building imports :

912 (0x0390) bytes stored in import section

green.fire.dll
frame_size_x (0x00402354)
frame_size_y (0x00402358)
ClearFrameData (0x0040235c)
frame_bitmap (0x00402360)
RegisterMouseMove (0x00402364)
RegisterLeftMouseButtonDown (0x00402368)
RegisterRightMouseButtonDown (0x0040236c)
RegisterKeyDown (0x00402370)
RegisterOnResize (0x00402374)
RegisterRunFrame (0x00402378)
SetSleepValue (0x0040237c)
SetupWindow3 (0x00402380)

msvcrt.dll
printf (0x00402388)

as as far as i knoe exe is loaded typically under 0x00400000
in my case code first than imports then data (static arrays) ..dll afait must be loaded
somewhere 0x004xxxxx - 0x7ffxxxxx, also heap is probably there

in fact it would be worth to print out thet pointers

exe code may use fixed adresses of jumps and data acces as its just loaded under known adress, dlls must provide fixups as dll must be loaded under varoius adress and need to apply fixups then
(old ollydbg debbugger for windows shows nice info with that data)

Re: you think rust may *DE*throne c?

<988dd185-cb9d-4d8e-b006-92a7cbf4c63en@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27450&group=comp.lang.c#27450

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a37:5883:0:b0:767:1246:6123 with SMTP id m125-20020a375883000000b0076712466123mr4549qkb.12.1691711906965;
Thu, 10 Aug 2023 16:58:26 -0700 (PDT)
X-Received: by 2002:a17:903:4c5:b0:1b6:a2e4:c8f8 with SMTP id
jm5-20020a17090304c500b001b6a2e4c8f8mr676261plb.2.1691711906528; Thu, 10 Aug
2023 16:58:26 -0700 (PDT)
Path: i2pn2.org!i2pn.org!news.1d4.us!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Thu, 10 Aug 2023 16:58:25 -0700 (PDT)
In-Reply-To: <b9f17d28-f1ff-42fb-92e7-53b01782b7ffn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=5.172.255.19; posting-account=Sb6m8goAAABbWsBL7gouk3bfLsuxwMgN
NNTP-Posting-Host: 5.172.255.19
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
<909acf23-ef0e-44c7-9ebf-89846e50e871n@googlegroups.com> <p_uAM.489417$mPI2.398490@fx15.iad>
<e5d7b49e-3472-4b70-8c52-d21243725d15n@googlegroups.com> <87zg31ezu5.fsf@bsb.me.uk>
<uavpcf$3t64r$1@dont-email.me> <87bkffg6qz.fsf@bsb.me.uk> <ub1840$3q1k$1@dont-email.me>
<87zg2zej54.fsf@bsb.me.uk> <Hr6BM.359405$xMqa.20823@fx12.iad>
<87il9ndiz9.fsf@bsb.me.uk> <HJ7BM.25894$Wk53.19314@fx01.iad>
<20230810090521.27@kylheku.com> <yH8BM.430010$TCKc.359327@fx13.iad>
<20230810110112.359@kylheku.com> <28fee821-781d-4532-9c53-fb8756a000c0n@googlegroups.com>
<ub3nm7$haft$2@dont-email.me> <08e28be9-2867-46be-872c-86bc3418b908n@googlegroups.com>
<b9f17d28-f1ff-42fb-92e7-53b01782b7ffn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <988dd185-cb9d-4d8e-b006-92a7cbf4c63en@googlegroups.com>
Subject: Re: you think rust may *DE*throne c?
From: profesor...@gmail.com (fir)
Injection-Date: Thu, 10 Aug 2023 23:58:26 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 30743
 by: fir - Thu, 10 Aug 2023 23:58 UTC

piątek, 11 sierpnia 2023 o 01:39:12 UTC+2 fir napisał(a):

> (old ollydbg debbugger for windows shows nice info with that data)

olly for example shows that nice memory map (when attached to my game protorype
codenamed tusk (turnbased space shooter)

its nice coz it shows what dlls are loaded and where, it also shows
which section occupies how many bytes - the biggest are .bbs it is
zero inicialized static arrays..it shows for example i do not much
optymalised my programs in this aspect (which is kinda bug as in many files
i just declated sbig tatic arrays just to be handy, but its probbaly better to use
realloc seeds and not to go with that static arrays to much
(technically its still no harm as thetre unused and not even physical memory is mapped but
logical areas are wasted)

Memory map
Address Size (Decimal) Owner Section Contains Type Access Initial Mapped as
00010000 00001000 (4096.) 00010000 (itself) Priv 00021004 RW RW
00020000 00001000 (4096.) 00020000 (itself) Priv 00021004 RW RW
0022C000 00001000 (4096.) 00030000 Priv 00021104 RW Guar RW
0022D000 00003000 (12288.) 00030000 stack of main thread Priv 00021104 RW Guar RW
00230000 00003000 (12288.) 00230000 (itself) Map 00041002 R R
00240000 00020000 (131072.) 00240000 (itself) Priv 00021004 RW RW
00340000 00006000 (24576.) 00340000 (itself) Priv 00021004 RW RW
00350000 00003000 (12288.) 00350000 (itself) Map 00041004 RW RW
00360000 00016000 (90112.) 00360000 (itself) Map 00041002 R R \Device\HarddiskVolume1\WINDOWS\system32\unicode.nls
00380000 00041000 (266240.) 00380000 (itself) Map 00041002 R R \Device\HarddiskVolume1\WINDOWS\system32\locale.nls
003D0000 00006000 (24576.) 003D0000 (itself) Map 00041002 R R \Device\HarddiskVolume1\WINDOWS\system32\sorttbls.nls
003E0000 00001000 (4096.) WS2_32 003E0000 (itself) PE header Imag 01001002 R RWE
003E1000 00013000 (77824.) WS2_32 003E0000 .text code,imports,exports Imag 01001002 R RWE
003F4000 00001000 (4096.) WS2_32 003E0000 .data data Imag 01001002 R RWE
003F5000 00001000 (4096.) WS2_32 003E0000 .rsrc resources Imag 01001002 R RWE
003F6000 00001000 (4096.) WS2_32 003E0000 .reloc relocations Imag 01001002 R RWE
00400000 00001000 (4096.) tusk 00400000 (itself) PE header Imag 01001002 R RWE
00401000 00030000 (196608.) tusk 00400000 .text code Imag 01001002 R RWE
00431000 00001000 (4096.) tusk 00400000 .data data Imag 01001002 R RWE
00432000 00004000 (16384.) tusk 00400000 .rdata Imag 01001002 R RWE
00436000 00001000 (4096.) tusk 00400000 .eh_fram Imag 01001002 R RWE
00437000 01966000 (26632192.) tusk 00400000 .bss Imag 01001002 R RWE
01D9D000 00001000 (4096.) tusk 00400000 .idata imports Imag 01001002 R RWE
01D9E000 00001000 (4096.) tusk 00400000 .CRT Imag 01001002 R RWE
01D9F000 00001000 (4096.) tusk 00400000 .tls Imag 01001002 R RWE
01DA0000 00004000 (16384.) tusk 00400000 .rsrc resources Imag 01001002 R RWE
01DB0000 00041000 (266240.) 01DB0000 (itself) Map 00041002 R R \Device\HarddiskVolume1\WINDOWS\system32\sortkey.nls
01E00000 00041000 (266240.) 01E00000 (itself) Map 00041002 R R
01E50000 00001000 (4096.) WS2HELP 01E50000 (itself) PE header Imag 01001002 R RWE
01E51000 00004000 (16384.) WS2HELP 01E50000 .text code,imports,exports Imag 01001002 R RWE
01E55000 00001000 (4096.) WS2HELP 01E50000 .data data Imag 01001002 R RWE
01E56000 00001000 (4096.) WS2HELP 01E50000 .rsrc resources Imag 01001002 R RWE
01E57000 00001000 (4096.) WS2HELP 01E50000 .reloc relocations Imag 01001002 R RWE
01E60000 00004000 (16384.) 01E60000 (itself) Map 00041020 R E R E
01F20000 00002000 (8192.) 01E60000 Map 00041020 R E R E
01F30000 00103000 (1060864.) 01F30000 (itself) Map 00041002 R R
02040000 00001000 (4096.) 02040000 (itself) Priv 00021004 RW RW
02050000 00073000 (471040.) 02050000 (itself) Map 00041020 R E R E
02350000 00001000 (4096.) 02350000 (itself) Priv 00021004 RW RW
02360000 00004000 (16384.) 02360000 (itself) Priv 00021004 RW RW
02370000 00003000 (12288.) 02370000 (itself) Map 00041002 R R \Device\HarddiskVolume1\WINDOWS\system32\ctype.nls
02380000 00001000 (4096.) 02380000 (itself) Priv 00021004 RW RW
02400000 00004000 (16384.) 02400000 (itself) Priv 00021004 RW RW
02410000 00002000 (8192.) 02410000 (itself) Map 00041002 R R
02420000 00001000 (4096.) 02420000 (itself) Map 00041004 RW RW
02430000 00002000 (8192.) 02430000 (itself) Map 00041002 R R
02440000 00003000 (12288.) 02440000 (itself) Priv 00021004 RW RW
02480000 00011000 (69632.) 02480000 (itself) Map 00041002 R R \Device\HarddiskVolume1\WINDOWS\system32\c_1252.nls
024AE000 00001000 (4096.) 024A0000 Priv 00021104 RW Guar RW
024AF000 00001000 (4096.) 024A0000 stack of thread 0000 Priv 00021104 RW Guar RW
024B0000 00002000 (8192.) 024B0000 (itself) Map 00041002 R R
024C0000 0022C000 (2277376.) 024C0000 (itself) Priv 00021004 RW RW
026F0000 00040000 (262144.) 026F0000 (itself) Map 00041002 R R
02730000 00100000 (1048576.) 02730000 (itself) Priv 00021004 RW RW
02A2E000 00001000 (4096.) 02830000 Priv 00021104 RW Guar RW
02A2F000 00001000 (4096.) 02830000 stack of thread 0000 Priv 00021104 RW Guar RW
02C2D000 00001000 (4096.) 02A30000 Priv 00021104 RW Guar RW
02C2E000 00002000 (8192.) 02A30000 stack of thread 0000 Priv 00021104 RW Guar RW
5D520000 00001000 (4096.) COMCTL32 5D520000 (itself) PE header Imag 01001002 R RWE
5D521000 00071000 (462848.) COMCTL32 5D520000 .text code,imports,exports Imag 01001002 R RWE
5D592000 00003000 (12288.) COMCTL32 5D520000 .data data Imag 01001002 R RWE
5D595000 00020000 (131072.) COMCTL32 5D520000 .rsrc resources Imag 01001002 R RWE
5D5B5000 00005000 (20480.) COMCTL32 5D520000 .reloc relocations Imag 01001002 R RWE
64840000 00001000 (4096.) green_fi 64840000 (itself) PE header Imag 01001002 R RWE
64841000 00044000 (278528.) green_fi 64840000 .text code Imag 01001002 R RWE
64885000 00026000 (155648.) green_fi 64840000 .data data Imag 01001002 R RWE
648AB000 00002000 (8192.) green_fi 64840000 .rdata Imag 01001002 R RWE
648AD000 00001000 (4096.) green_fi 64840000 .eh_fram Imag 01001002 R RWE
648AE000 0DDC4000 (232538112.) green_fi 64840000 .bss Imag 01001002 R RWE
72672000 00004000 (16384.) green_fi 64840000 .edata exports Imag 01001002 R RWE
72676000 00002000 (8192.) green_fi 64840000 .idata imports Imag 01001002 R RWE
72678000 00001000 (4096.) green_fi 64840000 .CRT Imag 01001002 R RWE
72679000 00001000 (4096.) green_fi 64840000 .tls Imag 01001002 R RWE
7267A000 00001000 (4096.) green_fi 64840000 .rsrc resources Imag 01001002 R RWE
7267B000 00004000 (16384.) green_fi 64840000 .reloc relocations Imag 01001002 R RWE
72CA0000 00001000 (4096.) msacm32 72CA0000 (itself) PE header Imag 01001002 R RWE
72CA1000 00003000 (12288.) msacm32 72CA0000 .text code,imports,exports Imag 01001002 R RWE
72CA4000 00001000 (4096.) msacm32 72CA0000 .data data Imag 01001002 R RWE
72CA5000 00002000 (8192.) msacm32 72CA0000 .rsrc resources Imag 01001002 R RWE
72CA7000 00001000 (4096.) msacm32 72CA0000 .reloc relocations Imag 01001002 R RWE
72CB0000 00001000 (4096.) wdmaud 72CB0000 (itself) PE header Imag 01001002 R RWE
72CB1000 00005000 (20480.) wdmaud 72CB0000 .text code,imports,exports Imag 01001002 R RWE
72CB6000 00001000 (4096.) wdmaud 72CB0000 .data data Imag 01001002 R RWE
72CB7000 00001000 (4096.) wdmaud 72CB0000 .rsrc resources Imag 01001002 R RWE
72CB8000 00001000 (4096.) wdmaud 72CB0000 .reloc relocations Imag 01001002 R RWE
76380000 00001000 (4096.) COMDLG32 76380000 (itself) PE header Imag 01001002 R RWE
76381000 00030000 (196608.) COMDLG32 76380000 .text code,imports,exports Imag 01001002 R RWE
763B1000 00004000 (16384.) COMDLG32 76380000 .data data Imag 01001002 R RWE
763B5000 00011000 (69632.) COMDLG32 76380000 .rsrc resources Imag 01001002 R RWE
763C6000 00003000 (12288.) COMDLG32 76380000 .reloc relocations Imag 01001002 R RWE
76B20000 00001000 (4096.) WINMM 76B20000 (itself) PE header Imag 01001002 R RWE
76B21000 0001F000 (126976.) WINMM 76B20000 .text code,imports,exports Imag 01001002 R RWE
76B40000 00002000 (8192.) WINMM 76B20000 .data data Imag 01001002 R RWE
76B42000 0000A000 (40960.) WINMM 76B20000 .rsrc resources Imag 01001002 R RWE
76B4C000 00002000 (8192.) WINMM 76B20000 .reloc relocations Imag 01001002 R RWE
76BE0000 00001000 (4096.) PSAPI 76BE0000 (itself) PE header Imag 01001002 R RWE
76BE1000 00004000 (16384.) PSAPI 76BE0000 .text code,imports,exports Imag 01001002 R RWE
76BE5000 00004000 (16384.) PSAPI 76BE0000 .data data Imag 01001002 R RWE
76BE9000 00001000 (4096.) PSAPI 76BE0000 .rsrc resources Imag 01001002 R RWE
76BEA000 00001000 (4096.) PSAPI 76BE0000 .reloc relocations Imag 01001002 R RWE
76C20000 00001000 (4096.) WINTRUST 76C20000 (itself) PE header Imag 01001002 R RWE
76C21000 00029000 (167936.) WINTRUST 76C20000 .text code,imports,exports Imag 01001002 R RWE
76C4A000 00001000 (4096.) WINTRUST 76C20000 .data data Imag 01001002 R RWE
76C4B000 00001000 (4096.) WINTRUST 76C20000 .rsrc resources Imag 01001002 R RWE
76C4C000 00002000 (8192.) WINTRUST 76C20000 .reloc relocations Imag 01001002 R RWE
76C80000 00001000 (4096.) IMAGEHLP 76C80000 (itself) PE header Imag 01001002 R RWE
76C81000 00022000 (139264.) IMAGEHLP 76C80000 .text code,imports,exports Imag 01001002 R RWE
76CA3000 00002000 (8192.) IMAGEHLP 76C80000 .data data Imag 01001002 R RWE
76CA5000 00001000 (4096.) IMAGEHLP 76C80000 .rsrc resources Imag 01001002 R RWE
76CA6000 00002000 (8192.) IMAGEHLP 76C80000 .reloc relocations Imag 01001002 R RWE
773C0000 00001000 (4096.) comctl_1 773C0000 (itself) PE header Imag 01001002 R RWE
773C1000 00091000 (593920.) comctl_1 773C0000 .text code,imports,exports Imag 01001002 R RWE
77452000 00001000 (4096.) comctl_1 773C0000 .data data Imag 01001002 R RWE
77453000 0006A000 (434176.) comctl_1 773C0000 .rsrc resources Imag 01001002 R RWE
774BD000 00006000 (24576.) comctl_1 773C0000 .reloc relocations Imag 01001002 R RWE
77A70000 00001000 (4096.) CRYPT32 77A70000 (itself) PE header Imag 01001002 R RWE
77A71000 00085000 (544768.) CRYPT32 77A70000 .text code,imports,exports Imag 01001002 R RWE
77AF6000 00003000 (12288.) CRYPT32 77A70000 .data data Imag 01001002 R RWE
77AF9000 00008000 (32768.) CRYPT32 77A70000 .rsrc resources Imag 01001002 R RWE
77B01000 00005000 (20480.) CRYPT32 77A70000 .reloc relocations Imag 01001002 R RWE
77B10000 00001000 (4096.) MSASN1 77B10000 (itself) PE header Imag 01001002 R RWE
77B11000 0000E000 (57344.) MSASN1 77B10000 .text code,imports,exports Imag 01001002 R RWE
77B1F000 00001000 (4096.) MSASN1 77B10000 .data data Imag 01001002 R RWE
77B20000 00001000 (4096.) MSASN1 77B10000 .rsrc resources Imag 01001002 R RWE
77B21000 00001000 (4096.) MSASN1 77B10000 .reloc relocations Imag 01001002 R RWE
77BC0000 00001000 (4096.) midimap 77BC0000 (itself) PE header Imag 01001002 R RWE
77BC1000 00003000 (12288.) midimap 77BC0000 .text code,imports,exports Imag 01001002 R RWE
77BC4000 00001000 (4096.) midimap 77BC0000 .data data Imag 01001002 R RWE
77BC5000 00001000 (4096.) midimap 77BC0000 .rsrc resources Imag 01001002 R RWE
77BC6000 00001000 (4096.) midimap 77BC0000 .reloc relocations Imag 01001002 R RWE
77BD0000 00001000 (4096.) MSACM3_1 77BD0000 (itself) PE header Imag 01001002 R RWE
77BD1000 00010000 (65536.) MSACM3_1 77BD0000 .text code,imports,exports Imag 01001002 R RWE
77BE1000 00001000 (4096.) MSACM3_1 77BD0000 .data data Imag 01001002 R RWE
77BE2000 00002000 (8192.) MSACM3_1 77BD0000 .rsrc resources Imag 01001002 R RWE
77BE4000 00001000 (4096.) MSACM3_1 77BD0000 .reloc relocations Imag 01001002 R RWE
77C00000 00001000 (4096.) msvcrt 77C00000 (itself) PE header Imag 01001002 R RWE
77C01000 0004C000 (311296.) msvcrt 77C00000 .text code,imports,exports Imag 01001002 R RWE
77C4D000 00007000 (28672.) msvcrt 77C00000 .data data Imag 01001002 R RWE
77C54000 00001000 (4096.) msvcrt 77C00000 .rsrc resources Imag 01001002 R RWE
77C55000 00003000 (12288.) msvcrt 77C00000 .reloc relocations Imag 01001002 R RWE
77DC0000 00001000 (4096.) ADVAPI32 77DC0000 (itself) PE header Imag 01001002 R RWE
77DC1000 00075000 (479232.) ADVAPI32 77DC0000 .text code,imports,exports Imag 01001002 R RWE
77E36000 00005000 (20480.) ADVAPI32 77DC0000 .data data Imag 01001002 R RWE
77E3B000 0002C000 (180224.) ADVAPI32 77DC0000 .rsrc resources Imag 01001002 R RWE
77E67000 00005000 (20480.) ADVAPI32 77DC0000 .reloc relocations Imag 01001002 R RWE
77E70000 00001000 (4096.) RPCRT4 77E70000 (itself) PE header Imag 01001002 R RWE
77E71000 00083000 (536576.) RPCRT4 77E70000 .text code,imports,exports Imag 01001002 R RWE
77EF4000 00007000 (28672.) RPCRT4 77E70000 .orpc code Imag 01001002 R RWE
77EFB000 00001000 (4096.) RPCRT4 77E70000 .data data Imag 01001002 R RWE
77EFC000 00001000 (4096.) RPCRT4 77E70000 .rsrc resources Imag 01001002 R RWE
77EFD000 00005000 (20480.) RPCRT4 77E70000 .reloc relocations Imag 01001002 R RWE
77F10000 00001000 (4096.) GDI32 77F10000 (itself) PE header Imag 01001002 R RWE
77F11000 00043000 (274432.) GDI32 77F10000 .text code,imports,exports Imag 01001002 R RWE
77F54000 00002000 (8192.) GDI32 77F10000 .data data Imag 01001002 R RWE
77F56000 00001000 (4096.) GDI32 77F10000 .rsrc resources Imag 01001002 R RWE
77F57000 00002000 (8192.) GDI32 77F10000 .reloc relocations Imag 01001002 R RWE
77F60000 00001000 (4096.) SHLWAPI 77F60000 (itself) PE header Imag 01001002 R RWE
77F61000 0006C000 (442368.) SHLWAPI 77F60000 .text code,imports,exports Imag 01001002 R RWE
77FCD000 00001000 (4096.) SHLWAPI 77F60000 .data data Imag 01001002 R RWE
77FCE000 00002000 (8192.) SHLWAPI 77F60000 .rsrc resources Imag 01001002 R RWE
77FD0000 00006000 (24576.) SHLWAPI 77F60000 .reloc relocations Imag 01001002 R RWE
77FE0000 00001000 (4096.) Secur32 77FE0000 (itself) PE header Imag 01001002 R RWE
77FE1000 0000D000 (53248.) Secur32 77FE0000 .text code,imports,exports Imag 01001002 R RWE
77FEE000 00001000 (4096.) Secur32 77FE0000 .data data Imag 01001002 R RWE
77FEF000 00001000 (4096.) Secur32 77FE0000 .rsrc resources Imag 01001002 R RWE
77FF0000 00001000 (4096.) Secur32 77FE0000 .reloc relocations Imag 01001002 R RWE
7C800000 00001000 (4096.) kernel32 7C800000 (itself) PE header Imag 01001002 R RWE
7C801000 00084000 (540672.) kernel32 7C800000 .text code,imports,exports Imag 01001002 R RWE
7C885000 00005000 (20480.) kernel32 7C800000 .data data Imag 01001002 R RWE
7C88A000 0006D000 (446464.) kernel32 7C800000 .rsrc resources Imag 01001002 R RWE
7C8F7000 00006000 (24576.) kernel32 7C800000 .reloc relocations Imag 01001002 R RWE
7C900000 00001000 (4096.) ntdll 7C900000 (itself) PE header Imag 01001002 R RWE
7C901000 0007A000 (499712.) ntdll 7C900000 .text code,exports Imag 01001002 R RWE
7C97B000 00005000 (20480.) ntdll 7C900000 .data data Imag 01001002 R RWE
7C980000 0002E000 (188416.) ntdll 7C900000 .rsrc resources Imag 01001002 R RWE
7C9AE000 00003000 (12288.) ntdll 7C900000 .reloc relocations Imag 01001002 R RWE
7C9C0000 00001000 (4096.) SHELL32 7C9C0000 (itself) PE header Imag 01001002 R RWE
7C9C1000 001FE000 (2088960.) SHELL32 7C9C0000 .text code,imports,exports Imag 01001002 R RWE
7CBBF000 0001D000 (118784.) SHELL32 7C9C0000 .data data Imag 01001002 R RWE
7CBDC000 005E7000 (6189056.) SHELL32 7C9C0000 .rsrc resources Imag 01001002 R RWE
7D1C3000 0001B000 (110592.) SHELL32 7C9C0000 .reloc relocations Imag 01001002 R RWE
7E360000 00001000 (4096.) USER32 7E360000 (itself) PE header Imag 01001002 R RWE
7E361000 00060000 (393216.) USER32 7E360000 .text code,imports,exports Imag 01001002 R RWE
7E3C1000 00002000 (8192.) USER32 7E360000 .data data Imag 01001002 R RWE
7E3C3000 0002B000 (176128.) USER32 7E360000 .rsrc resources Imag 01001002 R RWE
7E3EE000 00003000 (12288.) USER32 7E360000 .reloc relocations Imag 01001002 R RWE
7F6F0000 00007000 (28672.) 7F6F0000 (itself) Map 00041020 R E R E
7FFB0000 00024000 (147456.) 7FFB0000 (itself) Map 00041002 R R
7FFD9000 00001000 (4096.) 7FFD9000 (itself) Priv 00021004 RW RW
7FFDC000 00001000 (4096.) 7FFDC000 (itself) data block of thread Priv 00021004 RW RW
7FFDD000 00001000 (4096.) 7FFDD000 (itself) data block of thread Priv 00021004 RW RW
7FFDE000 00001000 (4096.) 7FFDE000 (itself) data block of thread Priv 00021004 RW RW
7FFDF000 00001000 (4096.) 7FFDF000 (itself) data block of main t Priv 00021004 RW RW
7FFE0000 00001000 (4096.) 7FFE0000 (itself) Priv 00021002 R R


Click here to read the complete article
Re: you think rust may *DE*throne c?

<ub3veb$icj5$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27451&group=comp.lang.c#27451

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!rocksolid2!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: bc...@freeuk.com (Bart)
Newsgroups: comp.lang.c
Subject: Re: you think rust may *DE*throne c?
Date: Fri, 11 Aug 2023 01:30:03 +0100
Organization: A noiseless patient Spider
Lines: 121
Message-ID: <ub3veb$icj5$1@dont-email.me>
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
<909acf23-ef0e-44c7-9ebf-89846e50e871n@googlegroups.com>
<p_uAM.489417$mPI2.398490@fx15.iad>
<e5d7b49e-3472-4b70-8c52-d21243725d15n@googlegroups.com>
<87zg31ezu5.fsf@bsb.me.uk> <uavpcf$3t64r$1@dont-email.me>
<87bkffg6qz.fsf@bsb.me.uk> <ub1840$3q1k$1@dont-email.me>
<87zg2zej54.fsf@bsb.me.uk> <Hr6BM.359405$xMqa.20823@fx12.iad>
<87il9ndiz9.fsf@bsb.me.uk> <HJ7BM.25894$Wk53.19314@fx01.iad>
<20230810090521.27@kylheku.com> <yH8BM.430010$TCKc.359327@fx13.iad>
<20230810110112.359@kylheku.com>
<28fee821-781d-4532-9c53-fb8756a000c0n@googlegroups.com>
<ub3nm7$haft$2@dont-email.me>
<08e28be9-2867-46be-872c-86bc3418b908n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 11 Aug 2023 00:30:03 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="2e57af83912fa92cd513fea0a1b729ed";
logging-data="602725"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX187Fe0AqdtKdv1wQNh1qCb/nbL6jQqR4ac="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Cancel-Lock: sha1:tVt53kifQN+qfINiir+Z+4JePHU=
In-Reply-To: <08e28be9-2867-46be-872c-86bc3418b908n@googlegroups.com>
 by: Bart - Fri, 11 Aug 2023 00:30 UTC

On 11/08/2023 00:06, fir wrote:
> piątek, 11 sierpnia 2023 o 00:17:57 UTC+2 Bart napisał(a):
>> On 10/08/2023 22:44, fir wrote:
>>> czwartek, 10 sierpnia 2023 o 20:16:49 UTC+2 Kaz Kylheku napisał(a):
>>>>
>>>> DLLs are lacking in some technology like symbol versioning, linking
>>>> in any direction (DLL cannot attach to symbols exported by executable)
>>>> and such. Plus the use of clunky .lib files taht SO's don't require,
>>>> and __decl(dllexport) and other cruft. (That pragma mechanism by
>>>> which a source file indicates a needed DLL doesn't need a .lib file
>>>> though, IIRC).
>>>>
>>>
>>> i dont remember as to this exe, though i remember i was testing it and
>>> those relative usage - when i was writing more than one dll was making
>>> some problems to me.. i dont remember hovever if you cant call
functions in exe
>>> though - problem was rather that when you want to compile dll using
other dll you need to have the other build (becouse compilaton readed
binary dll to check if symbols exist even if
>>> linking is rruntime - this is in fact stupid but this is a
consequence of fact that when
>>> you link to a symbol compilers dont know in which of dlls you want
to0 link it is,
>>> and it need to put not only symbols but their parent module names
in output) ..
>>> it is mighty stupid bcouse you cant compile code that uses the dll
that you dont really get
>>> (unles there is some way providing this info on symbold what is the
name of the
>>> parent module of them, __declspec(dllimport) are not a problem though
>>>
>>> it should be some other extension too like
>>>
>>> __something "green fire.dll" //import module name for given symbols
>>> {
>>> __declspec(dllimport) int foo(int a);
>>> __declspec(dllimport) float xx;
>>> }
>>>
>>> but i dont know if there is something like that
>>>
>>>
>>> but besides in practice there are no problems with dlls at least
when i use it
>>> is a breat with butter
>>>
>>> dlls are very likeable and i tell not a first time that if someone
coded in c on windows he must
>>> learn dlls becouse dlls are sorta part of practical c..and its real
nice part (ofc it lacks types
>>> encoded and call conventions which would allow to just get rid of
headers - check my thread/post on it)
>>>
>>> probably it would allow even normal c to get rid of headers as pif
everything would just work without headers people just could not include
them and tha wouldnt break codes
>> How would that work? To use a function exported from a DLL, you will
>> need a function signature, perhaps a set of usertypes, enums and
#defines.
>>
>> All the stuff that normally is provided by a header.
>>
>> Where would that information come from?
>>
>> (My own idea was for an interface info to be embedded inside the DLL,
>> and accessed by calling a special exported function. For C, that could
>> just return a string containing the normal header code.
>>
>> But it would need cooperation from the people creating the DLL (who
>> could be writing in any language, not C).
>>
>> And from C compilers to delve inside DLL files (and at an early stage
>> long before linking). Since C compilers can't even shake off
>> anachronisms like -lm and a.out, I can't see that happening.)
>>
>>
>>
>> My idea was for my own private use
> doi
> lern how PE format works coz it is really important - not mucnh
pleasant to read but important as hell

You really don't need to disect a DLL file to extract some data from it.
A regular interface will do.

For example, for a DLL that exports one function 'add()', add this extra
function:

char* header = "int add(int, int);\n";
char* getheader(void) { return header;}

and create a DLL like 'lib.dll'.

Now, in the compiler that wants to import functions from lib.dll, use
code like this:

#include <stdio.h>
#include <windows.h>

int main(void) {
void* handle;
char* (*fnptr)(void);

handle=LoadLibrary("lib.dll");
if (handle) {
fnptr=GetProcAddress(handle, "getheader");
if (fnptr)
printf("Header = %s\n", fnptr());
}
}

Calling getheader() returns the same string as including a header file
like 'lib.h'.

No need to be delving inside the PE format.

Actually, as written, that 'header' variable is exported also, so you
can directly access that, but I prefer to do it via a function.

And, PE is a terrible, terrible format. Only get into as last resort.

Re: you think rust may *DE*throne c?

<ac12cc42-c391-4628-9efa-91ac321e3852n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27452&group=comp.lang.c#27452

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:6214:14f3:b0:63c:eda9:400a with SMTP id k19-20020a05621414f300b0063ceda9400amr5035qvw.1.1691715520072;
Thu, 10 Aug 2023 17:58:40 -0700 (PDT)
X-Received: by 2002:a17:903:2015:b0:1b8:84d9:dea6 with SMTP id
s21-20020a170903201500b001b884d9dea6mr116476pla.12.1691715519534; Thu, 10 Aug
2023 17:58:39 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Thu, 10 Aug 2023 17:58:38 -0700 (PDT)
In-Reply-To: <ub3veb$icj5$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=5.172.255.215; posting-account=Sb6m8goAAABbWsBL7gouk3bfLsuxwMgN
NNTP-Posting-Host: 5.172.255.215
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
<909acf23-ef0e-44c7-9ebf-89846e50e871n@googlegroups.com> <p_uAM.489417$mPI2.398490@fx15.iad>
<e5d7b49e-3472-4b70-8c52-d21243725d15n@googlegroups.com> <87zg31ezu5.fsf@bsb.me.uk>
<uavpcf$3t64r$1@dont-email.me> <87bkffg6qz.fsf@bsb.me.uk> <ub1840$3q1k$1@dont-email.me>
<87zg2zej54.fsf@bsb.me.uk> <Hr6BM.359405$xMqa.20823@fx12.iad>
<87il9ndiz9.fsf@bsb.me.uk> <HJ7BM.25894$Wk53.19314@fx01.iad>
<20230810090521.27@kylheku.com> <yH8BM.430010$TCKc.359327@fx13.iad>
<20230810110112.359@kylheku.com> <28fee821-781d-4532-9c53-fb8756a000c0n@googlegroups.com>
<ub3nm7$haft$2@dont-email.me> <08e28be9-2867-46be-872c-86bc3418b908n@googlegroups.com>
<ub3veb$icj5$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ac12cc42-c391-4628-9efa-91ac321e3852n@googlegroups.com>
Subject: Re: you think rust may *DE*throne c?
From: profesor...@gmail.com (fir)
Injection-Date: Fri, 11 Aug 2023 00:58:40 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: fir - Fri, 11 Aug 2023 00:58 UTC

piątek, 11 sierpnia 2023 o 02:30:18 UTC+2 Bart napisał(a):
> On 11/08/2023 00:06, fir wrote:
> > piątek, 11 sierpnia 2023 o 00:17:57 UTC+2 Bart napisał(a):
> >> On 10/08/2023 22:44, fir wrote:
> >>> czwartek, 10 sierpnia 2023 o 20:16:49 UTC+2 Kaz Kylheku napisał(a):
> >>>>
> >>>> DLLs are lacking in some technology like symbol versioning, linking
> >>>> in any direction (DLL cannot attach to symbols exported by executable)
> >>>> and such. Plus the use of clunky .lib files taht SO's don't require,
> >>>> and __decl(dllexport) and other cruft. (That pragma mechanism by
> >>>> which a source file indicates a needed DLL doesn't need a .lib file
> >>>> though, IIRC).
> >>>>
> >>>
> >>> i dont remember as to this exe, though i remember i was testing it and
> >>> those relative usage - when i was writing more than one dll was making
> >>> some problems to me.. i dont remember hovever if you cant call
> functions in exe
> >>> though - problem was rather that when you want to compile dll using
> other dll you need to have the other build (becouse compilaton readed
> binary dll to check if symbols exist even if
> >>> linking is rruntime - this is in fact stupid but this is a
> consequence of fact that when
> >>> you link to a symbol compilers dont know in which of dlls you want
> to0 link it is,
> >>> and it need to put not only symbols but their parent module names
> in output) ..
> >>> it is mighty stupid bcouse you cant compile code that uses the dll
> that you dont really get
> >>> (unles there is some way providing this info on symbold what is the
> name of the
> >>> parent module of them, __declspec(dllimport) are not a problem though
> >>>
> >>> it should be some other extension too like
> >>>
> >>> __something "green fire.dll" //import module name for given symbols
> >>> {
> >>> __declspec(dllimport) int foo(int a);
> >>> __declspec(dllimport) float xx;
> >>> }
> >>>
> >>> but i dont know if there is something like that
> >>>
> >>>
> >>> but besides in practice there are no problems with dlls at least
> when i use it
> >>> is a breat with butter
> >>>
> >>> dlls are very likeable and i tell not a first time that if someone
> coded in c on windows he must
> >>> learn dlls becouse dlls are sorta part of practical c..and its real
> nice part (ofc it lacks types
> >>> encoded and call conventions which would allow to just get rid of
> headers - check my thread/post on it)
> >>>
> >>> probably it would allow even normal c to get rid of headers as pif
> everything would just work without headers people just could not include
> them and tha wouldnt break codes
> >> How would that work? To use a function exported from a DLL, you will
> >> need a function signature, perhaps a set of usertypes, enums and
> #defines.
> >>
> >> All the stuff that normally is provided by a header.
> >>
> >> Where would that information come from?
> >>
> >> (My own idea was for an interface info to be embedded inside the DLL,
> >> and accessed by calling a special exported function. For C, that could
> >> just return a string containing the normal header code.
> >>
> >> But it would need cooperation from the people creating the DLL (who
> >> could be writing in any language, not C).
> >>
> >> And from C compilers to delve inside DLL files (and at an early stage
> >> long before linking). Since C compilers can't even shake off
> >> anachronisms like -lm and a.out, I can't see that happening.)
> >>
> >>
> >>
> >> My idea was for my own private use
> > doi
> > lern how PE format works coz it is really important - not mucnh
> pleasant to read but important as hell
> You really don't need to disect a DLL file to extract some data from it.
> A regular interface will do.
>
> For example, for a DLL that exports one function 'add()', add this extra
> function:
>
> char* header = "int add(int, int);\n";
> char* getheader(void) { return header;}
>
> and create a DLL like 'lib.dll'.
>
> Now, in the compiler that wants to import functions from lib.dll, use
> code like this:
>
> #include <stdio.h>
> #include <windows.h>
>
> int main(void) {
> void* handle;
> char* (*fnptr)(void);
>
> handle=LoadLibrary("lib.dll");
> if (handle) {
> fnptr=GetProcAddress(handle, "getheader");
> if (fnptr)
> printf("Header = %s\n", fnptr());
> }
> }
>
> Calling getheader() returns the same string as including a header file
> like 'lib.h'.
>
> No need to be delving inside the PE format.
>
> Actually, as written, that 'header' variable is exported also, so you
> can directly access that, but I prefer to do it via a function.
>
> And, PE is a terrible, terrible format. Only get into as last resort.

you cannot return c code as it must be binary level description language agnostic,
calling code is weird as it imo should be a normal format that you could open on other system then dll is run on
adding a section is normal way and is no specially hard, it is to do in few days (first functioning draft of it, but that would be most work)

Re: you think rust may *DE*throne c?

<20230810180917.69@kylheku.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27453&group=comp.lang.c#27453

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 864-117-...@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c
Subject: Re: you think rust may *DE*throne c?
Date: Fri, 11 Aug 2023 01:14:52 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <20230810180917.69@kylheku.com>
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
<909acf23-ef0e-44c7-9ebf-89846e50e871n@googlegroups.com>
<p_uAM.489417$mPI2.398490@fx15.iad>
<e5d7b49e-3472-4b70-8c52-d21243725d15n@googlegroups.com>
<87zg31ezu5.fsf@bsb.me.uk> <uavpcf$3t64r$1@dont-email.me>
<87bkffg6qz.fsf@bsb.me.uk> <ub1840$3q1k$1@dont-email.me>
<87zg2zej54.fsf@bsb.me.uk> <Hr6BM.359405$xMqa.20823@fx12.iad>
<87il9ndiz9.fsf@bsb.me.uk> <HJ7BM.25894$Wk53.19314@fx01.iad>
<20230810090521.27@kylheku.com> <yH8BM.430010$TCKc.359327@fx13.iad>
<20230810110112.359@kylheku.com> <ub3n7j$haft$1@dont-email.me>
Injection-Date: Fri, 11 Aug 2023 01:14:52 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="f5c92b33059ba4d876d949c7c374bed5";
logging-data="612591"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+MIEarCjxyEufMk84p54vHJx/lwfhMzGA="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:4F97hgu8qpWgOBe0lwQ7FJj7+fw=
 by: Kaz Kylheku - Fri, 11 Aug 2023 01:14 UTC

On 2023-08-10, Bart <bc@freeuk.com> wrote:
> So, how do you control what functions to export from a .so file?

All global symbols are exported by default; like the would be
in a .a archive, only dynamically.

The way to get control over this is to write a version script

https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_mono/ld.html#SEC25

This is given to the linker as another file argument.

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca

Re: you think rust may *DE*throne c?

<bb1608de-81e2-451e-a13d-622d0453f644n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27454&group=comp.lang.c#27454

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:620a:25b:b0:76c:ba55:b086 with SMTP id q27-20020a05620a025b00b0076cba55b086mr5960qkn.9.1691716908372;
Thu, 10 Aug 2023 18:21:48 -0700 (PDT)
X-Received: by 2002:a05:6a00:1489:b0:67d:4073:9e18 with SMTP id
v9-20020a056a00148900b0067d40739e18mr193004pfu.2.1691716908104; Thu, 10 Aug
2023 18:21:48 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Thu, 10 Aug 2023 18:21:47 -0700 (PDT)
In-Reply-To: <ub3veb$icj5$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=5.172.255.215; posting-account=Sb6m8goAAABbWsBL7gouk3bfLsuxwMgN
NNTP-Posting-Host: 5.172.255.215
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
<909acf23-ef0e-44c7-9ebf-89846e50e871n@googlegroups.com> <p_uAM.489417$mPI2.398490@fx15.iad>
<e5d7b49e-3472-4b70-8c52-d21243725d15n@googlegroups.com> <87zg31ezu5.fsf@bsb.me.uk>
<uavpcf$3t64r$1@dont-email.me> <87bkffg6qz.fsf@bsb.me.uk> <ub1840$3q1k$1@dont-email.me>
<87zg2zej54.fsf@bsb.me.uk> <Hr6BM.359405$xMqa.20823@fx12.iad>
<87il9ndiz9.fsf@bsb.me.uk> <HJ7BM.25894$Wk53.19314@fx01.iad>
<20230810090521.27@kylheku.com> <yH8BM.430010$TCKc.359327@fx13.iad>
<20230810110112.359@kylheku.com> <28fee821-781d-4532-9c53-fb8756a000c0n@googlegroups.com>
<ub3nm7$haft$2@dont-email.me> <08e28be9-2867-46be-872c-86bc3418b908n@googlegroups.com>
<ub3veb$icj5$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <bb1608de-81e2-451e-a13d-622d0453f644n@googlegroups.com>
Subject: Re: you think rust may *DE*throne c?
From: profesor...@gmail.com (fir)
Injection-Date: Fri, 11 Aug 2023 01:21:48 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2516
 by: fir - Fri, 11 Aug 2023 01:21 UTC

piątek, 11 sierpnia 2023 o 02:30:18 UTC+2 Bart napisał(a):
> And, PE is a terrible, terrible format. Only get into as last resort.

its somewhat bad/slightly terrible imo..could be simpler but binary formats itself are not much pleasant imo
besides its close to internals and many hackers like this kind of internals
(by jackers i rather mean 'internalists')

i think if some understand what it need to contauin it shows it contains what need to contain (like code dump(block), data dump, importd, exports, reallocks and header containing information like cpu/os type and xection properties..
mainly this header could be simplified coz those sections ere needed)

Re: you think rust may *DE*throne c?

<fc180b44-6c59-4288-be42-d65ce34f5a51n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27455&group=comp.lang.c#27455

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:622a:1307:b0:400:9629:cfad with SMTP id v7-20020a05622a130700b004009629cfadmr5890qtk.13.1691718216673;
Thu, 10 Aug 2023 18:43:36 -0700 (PDT)
X-Received: by 2002:a17:902:ec8c:b0:1ae:6895:cb96 with SMTP id
x12-20020a170902ec8c00b001ae6895cb96mr169390plg.5.1691718216164; Thu, 10 Aug
2023 18:43:36 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Thu, 10 Aug 2023 18:43:35 -0700 (PDT)
In-Reply-To: <988dd185-cb9d-4d8e-b006-92a7cbf4c63en@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=5.172.255.215; posting-account=Sb6m8goAAABbWsBL7gouk3bfLsuxwMgN
NNTP-Posting-Host: 5.172.255.215
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
<909acf23-ef0e-44c7-9ebf-89846e50e871n@googlegroups.com> <p_uAM.489417$mPI2.398490@fx15.iad>
<e5d7b49e-3472-4b70-8c52-d21243725d15n@googlegroups.com> <87zg31ezu5.fsf@bsb.me.uk>
<uavpcf$3t64r$1@dont-email.me> <87bkffg6qz.fsf@bsb.me.uk> <ub1840$3q1k$1@dont-email.me>
<87zg2zej54.fsf@bsb.me.uk> <Hr6BM.359405$xMqa.20823@fx12.iad>
<87il9ndiz9.fsf@bsb.me.uk> <HJ7BM.25894$Wk53.19314@fx01.iad>
<20230810090521.27@kylheku.com> <yH8BM.430010$TCKc.359327@fx13.iad>
<20230810110112.359@kylheku.com> <28fee821-781d-4532-9c53-fb8756a000c0n@googlegroups.com>
<ub3nm7$haft$2@dont-email.me> <08e28be9-2867-46be-872c-86bc3418b908n@googlegroups.com>
<b9f17d28-f1ff-42fb-92e7-53b01782b7ffn@googlegroups.com> <988dd185-cb9d-4d8e-b006-92a7cbf4c63en@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <fc180b44-6c59-4288-be42-d65ce34f5a51n@googlegroups.com>
Subject: Re: you think rust may *DE*throne c?
From: profesor...@gmail.com (fir)
Injection-Date: Fri, 11 Aug 2023 01:43:36 +0000
Content-Type: text/plain; charset="UTF-8"
 by: fir - Fri, 11 Aug 2023 01:43 UTC

watching this map i dont know the details but roughly it seems
- program begins at 4 MB below is 2 MB stack, dlls are putted down 2 GB
and between program and dlls probably there is heap..some other
regions are also mapped but i dont know what it is

Re: you think rust may *DE*throne c?

<UKVPuuMp3KUo8mPWS@bongo-ra.co>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27458&group=comp.lang.c#27458

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: spi...@gmail.com (Spiros Bousbouras)
Newsgroups: comp.lang.c
Subject: Re: you think rust may *DE*throne c?
Date: Fri, 11 Aug 2023 05:42:22 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <UKVPuuMp3KUo8mPWS@bongo-ra.co>
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com> <uatlrr$3epln$1@dont-email.me> <uatr2m$3fla4$1@dont-email.me>
<909acf23-ef0e-44c7-9ebf-89846e50e871n@googlegroups.com> <p_uAM.489417$mPI2.398490@fx15.iad> <e5d7b49e-3472-4b70-8c52-d21243725d15n@googlegroups.com>
<87zg31ezu5.fsf@bsb.me.uk> <uavpcf$3t64r$1@dont-email.me> <87bkffg6qz.fsf@bsb.me.uk>
<ub1840$3q1k$1@dont-email.me> <87zg2zej54.fsf@bsb.me.uk> <Hr6BM.359405$xMqa.20823@fx12.iad>
<87il9ndiz9.fsf@bsb.me.uk> <HJ7BM.25894$Wk53.19314@fx01.iad> <20230810090521.27@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 11 Aug 2023 05:42:22 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="3a8c36ec1363fec05f45e9485a21b02f";
logging-data="792990"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18h7suGfJtCPkZLAwCCPSSX"
Cancel-Lock: sha1:UPc9FrFqZaxl1TNDr6HDahYYfGc=
X-Server-Commands: nowebcancel
In-Reply-To: <20230810090521.27@kylheku.com>
X-Organisation: Weyland-Yutani
 by: Spiros Bousbouras - Fri, 11 Aug 2023 05:42 UTC

On Thu, 10 Aug 2023 16:15:32 -0000 (UTC)
Kaz Kylheku <864-117-4973@kylheku.com> wrote:
> What we could have is that an executable just dynamically links to
> functions in these libraries, and the system automatically finds them at
> load time, without the executable having to specify which libraries.

And how is your scheme different than how it already works in the Unix
world ?

> (Symbolic references would have to be fastidiously versioned since
> if multiple versions of a library were installed, the executable would
> not be indicataing which file it wants, other than through the
> names it needs. And also for another reason: clashing names between
> libraries. But the programmer wouldn't see the library and verison
> qualification on the symbol; that's handled transparently by the
> toolchain.)

Re: you think rust may *DE*throne c?

<20230810230301.714@kylheku.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27459&group=comp.lang.c#27459

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 864-117-...@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c
Subject: Re: you think rust may *DE*throne c?
Date: Fri, 11 Aug 2023 06:07:53 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 26
Message-ID: <20230810230301.714@kylheku.com>
References: <ebb9e01a-6369-4629-8b38-11d28df63693n@googlegroups.com>
<uatlrr$3epln$1@dont-email.me> <uatr2m$3fla4$1@dont-email.me>
<909acf23-ef0e-44c7-9ebf-89846e50e871n@googlegroups.com>
<p_uAM.489417$mPI2.398490@fx15.iad>
<e5d7b49e-3472-4b70-8c52-d21243725d15n@googlegroups.com>
<87zg31ezu5.fsf@bsb.me.uk> <uavpcf$3t64r$1@dont-email.me>
<87bkffg6qz.fsf@bsb.me.uk> <ub1840$3q1k$1@dont-email.me>
<87zg2zej54.fsf@bsb.me.uk> <Hr6BM.359405$xMqa.20823@fx12.iad>
<87il9ndiz9.fsf@bsb.me.uk> <HJ7BM.25894$Wk53.19314@fx01.iad>
<20230810090521.27@kylheku.com> <UKVPuuMp3KUo8mPWS@bongo-ra.co>
Injection-Date: Fri, 11 Aug 2023 06:07:53 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="f5c92b33059ba4d876d949c7c374bed5";
logging-data="796432"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19AgUDrWU89mtHKXCrj4JYQDTklWk1fB78="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:hNAIu2h+uX4ZDVMl7V2VFi/L8Ik=
 by: Kaz Kylheku - Fri, 11 Aug 2023 06:07 UTC

On 2023-08-11, Spiros Bousbouras <spibou@gmail.com> wrote:
> On Thu, 10 Aug 2023 16:15:32 -0000 (UTC)
> Kaz Kylheku <864-117-4973@kylheku.com> wrote:
>> What we could have is that an executable just dynamically links to
>> functions in these libraries, and the system automatically finds them at
>> load time, without the executable having to specify which libraries.
>
> And how is your scheme different than how it already works in the Unix
> world ?

How it differs is that the executable has to nominate the specific
libraries by indicating the library, which came in via the -l option,
and then look for specific symbols from specific libraries that it has
attached.

Under the hood, the semantics is much like dlopen() of specific
liraries to obtain a handle and then doing dlsym(handle, "name")
to look for specific names from specific libs.

Imagine it could specify just symbols, without specifying where
they come from; that's a big difference.

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca


devel / comp.lang.c / Re: you think rust may *DE*throne c?

Pages:123456789101112131415161718192021222324252627282930313233343536373839
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor