Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Nonsense. Space is blue and birds fly through it. -- Heisenberg


devel / comp.arch / Paper about ISO C

SubjectAuthor
* Paper about ISO Cclamky
+- Re: Paper about ISO CBGB
+* Re: Paper about ISO CDavid Brown
|+* Re: Paper about ISO CBGB
||+* Re: Paper about ISO CMitchAlsup
|||+* Re: Paper about ISO CMitchAlsup
||||`* Re: Paper about ISO CBranimir Maksimovic
|||| `* Re: Paper about ISO CGeorge Neuner
||||  +- Re: Paper about ISO CBranimir Maksimovic
||||  `* Re: Paper about ISO CEricP
||||   `* Re: Paper about ISO CIvan Godard
||||    `* Re: Paper about ISO CEricP
||||     `* Re: Paper about ISO CMitchAlsup
||||      +* Re: Paper about ISO CBGB
||||      |`* Re: Paper about ISO CStephen Fuld
||||      | +* Re: Paper about ISO CIvan Godard
||||      | |+* Re: addressing and protection, was Paper about ISO CJohn Levine
||||      | ||+* Re: addressing and protection, was Paper about ISO CMitchAlsup
||||      | |||+- Re: addressing and protection, was Paper about ISO CJohn Levine
||||      | |||+* Re: addressing and protection, was Paper about ISO CIvan Godard
||||      | ||||`- Re: addressing and protection, was Paper about ISO CQuadibloc
||||      | |||`- Re: addressing and protection, was Paper about ISO CBill Findlay
||||      | ||`* Re: addressing and protection, was Paper about ISO CQuadibloc
||||      | || +- Re: addressing and protection, was Paper about ISO CStephen Fuld
||||      | || `- Re: addressing and protection, was Paper about ISO CBranimir Maksimovic
||||      | |`* Re: addressing and protection, was Paper about ISO CEricP
||||      | | +* Re: addressing and protection, was Paper about ISO CStefan Monnier
||||      | | |`- Re: addressing and protection, was Paper about ISO CEricP
||||      | | `* Re: addressing and protection, was Paper about ISO CIvan Godard
||||      | |  +* Re: addressing and protection, was Paper about ISO CBGB
||||      | |  |+* Re: addressing and protection, was Paper about ISO CMitchAlsup
||||      | |  ||`* Re: addressing and protection, was Paper about ISO CBGB
||||      | |  || `* Re: addressing and protection, was Paper about ISO CJohn Dallman
||||      | |  ||  +* Re: addressing and protection, was Paper about ISO CMitchAlsup
||||      | |  ||  |+- Re: addressing and protection, was Paper about ISO CBGB
||||      | |  ||  |+* Re: addressing and protection, was Paper about ISO CThomas Koenig
||||      | |  ||  ||`* Re: addressing and protection, was Paper about ISO CBGB
||||      | |  ||  || `* Re: addressing and protection, was Paper about ISO CAnton Ertl
||||      | |  ||  ||  `- Re: addressing and protection, was Paper about ISO CBGB
||||      | |  ||  |`* Re: addressing and protection, was Paper about ISO CQuadibloc
||||      | |  ||  | +- Re: addressing and protection, was Paper about ISO CQuadibloc
||||      | |  ||  | `- Re: addressing and protection, was Paper about ISO CBGB
||||      | |  ||  `- Re: addressing and protection, was Paper about ISO CBGB
||||      | |  |`* Re: addressing and protection, was Paper about ISO CJohn Dallman
||||      | |  | +* Re: addressing and protection, was Paper about ISO CThomas Koenig
||||      | |  | |`* Re: addressing and protection, was Paper about ISO CMitchAlsup
||||      | |  | | `* Re: addressing and protection, was Paper about ISO CThomas Koenig
||||      | |  | |  +* Re: addressing and protection, was Paper about ISO CMitchAlsup
||||      | |  | |  |+* Re: addressing and protection, was Paper about ISO CStefan Monnier
||||      | |  | |  ||+- Re: addressing and protection, was Paper about ISO CChris M. Thomasson
||||      | |  | |  ||+* Re: addressing and protection, was Paper about ISO CMitchAlsup
||||      | |  | |  |||`- Re: addressing and protection, was Paper about ISO CThomas Koenig
||||      | |  | |  ||+* Re: addressing and protection, was Paper about ISO CThomas Koenig
||||      | |  | |  |||`* Re: addressing and protection, was Paper about ISO CEricP
||||      | |  | |  ||| `- Re: addressing and protection, was Paper about ISO CMitchAlsup
||||      | |  | |  ||`- Re: addressing and protection, was Paper about ISO CJohn Dallman
||||      | |  | |  |`- Re: addressing and protection, was Paper about ISO CThomas Koenig
||||      | |  | |  `* Re: addressing and protection, was Paper about ISO CIvan Godard
||||      | |  | |   +- Re: addressing and protection, was Paper about ISO CBGB
||||      | |  | |   `* Re: addressing and protection, was Paper about ISO CStephen Fuld
||||      | |  | |    +* Address space consumption (was: addressing and protection, was Paper about ISO CStefan Monnier
||||      | |  | |    |`- Re: Address space consumption (was: addressing and protection, wasMitchAlsup
||||      | |  | |    +* Re: addressing and protection, was Paper about ISO CMitchAlsup
||||      | |  | |    |`- Re: addressing and protection, was Paper about ISO CThomas Koenig
||||      | |  | |    `* Re: addressing and protection, was Paper about ISO CGeorge Neuner
||||      | |  | |     `* Re: addressing and protection, was Paper about ISO CStephen Fuld
||||      | |  | |      +* Re: addressing and protection, was Paper about ISO CMichael S
||||      | |  | |      |`* Re: addressing and protection, was Paper about ISO CTerje Mathisen
||||      | |  | |      | `- Re: addressing and protection, was Paper about ISO CMichael S
||||      | |  | |      `* Re: addressing and protection, was Paper about ISO CStefan Monnier
||||      | |  | |       +* Re: addressing and protection, was Paper about ISO CBGB
||||      | |  | |       |`* Re: addressing and protection, was Paper about ISO CJohn Levine
||||      | |  | |       | +* Re: addressing and protection, was Paper about ISO CBGB
||||      | |  | |       | |`* Re: addressing and protection, was Paper about ISO CStephen Fuld
||||      | |  | |       | | `* Re: addressing and protection, was Paper about ISO CBGB
||||      | |  | |       | |  `* Re: addressing and protection, was Paper about ISO CJohn Levine
||||      | |  | |       | |   +- Re: addressing and protection, was Paper about ISO CBGB
||||      | |  | |       | |   +- Re: addressing and protection, was Paper about ISO Cclamky
||||      | |  | |       | |   `* Re: addressing and protection, was Paper about ISO CGeorge Neuner
||||      | |  | |       | |    +* Re: addressing and protection, was Paper about ISO CBGB
||||      | |  | |       | |    |`* Re: addressing and protection, was Paper about ISO CGeorge Neuner
||||      | |  | |       | |    | +* Re: addressing and protection, was Paper about ISO CBGB
||||      | |  | |       | |    | |+* Re: addressing and protection, was Paper about ISO CIvan Godard
||||      | |  | |       | |    | ||+* Re: educational computation, was addressing and protection, was Paper about ISO John Levine
||||      | |  | |       | |    | |||`* Re: educational computation, was addressing and protection, was PaperIvan Godard
||||      | |  | |       | |    | ||| `- Re: educational computation, was addressing and protection, was PaperTerje Mathisen
||||      | |  | |       | |    | ||`* Re: addressing and protection, was Paper about ISO CBGB
||||      | |  | |       | |    | || `* Re: addressing and protection, was Paper about ISO CMitchAlsup
||||      | |  | |       | |    | ||  +- Re: addressing and protection, was Paper about ISO CBGB
||||      | |  | |       | |    | ||  `- Re: addressing and protection, was Paper about ISO CDavid Brown
||||      | |  | |       | |    | |+- Re: addressing and protection, was Paper about ISO CBGB
||||      | |  | |       | |    | |`* Re: addressing and protection, was Paper about ISO CMitchAlsup
||||      | |  | |       | |    | | +* Re: addressing and protection, was Paper about ISO CBGB
||||      | |  | |       | |    | | |+- Re: addressing and protection, was Paper about ISO CIvan Godard
||||      | |  | |       | |    | | |`* Re: addressing and protection, was Paper about ISO CMitchAlsup
||||      | |  | |       | |    | | | +* Re: addressing and protection, was Paper about ISO CIvan Godard
||||      | |  | |       | |    | | | |+* Re: addressing and protection, was Paper about ISO CMitchAlsup
||||      | |  | |       | |    | | | ||`- Re: addressing and protection, was Paper about ISO CJimBrakefield
||||      | |  | |       | |    | | | |`* Re: addressing and protection, was Paper about ISO CTerje Mathisen
||||      | |  | |       | |    | | | | `* Re: addressing and protection, was Paper about ISO CTim Rentsch
||||      | |  | |       | |    | | | |  `- Re: addressing and protection, was Paper about ISO CTerje Mathisen
||||      | |  | |       | |    | | | +* Re: addressing and protection, was Paper about ISO CBGB
||||      | |  | |       | |    | | | `- Re: addressing and protection, was Paper about ISO CTerje Mathisen
||||      | |  | |       | |    | | `- Re: addressing and protection, was Paper about ISO CAnne & Lynn Wheeler
||||      | |  | |       | |    | `- Re: addressing and protection, was Paper about ISO CMitchAlsup
||||      | |  | |       | |    `* Re: what is cheap these days, addressing and protection, was Paper about ISO CJohn Levine
||||      | |  | |       | +* Re: addressing and protection, was Paper about ISO CStephen Fuld
||||      | |  | |       | +* Re: addressing and protection, was Paper about ISO CMichael S
||||      | |  | |       | `* Re: addressing and protection, was Paper about ISO CMichael S
||||      | |  | |       +* RAM size (was: addressing and protection, was Paper about ISO C)Anton Ertl
||||      | |  | |       `- Re: addressing and protection, was Paper about ISO CTerje Mathisen
||||      | |  | +* Re: addressing and protection, was Paper about ISO CMitchAlsup
||||      | |  | `* Re: addressing and protection, was Paper about ISO CJohn Levine
||||      | |  +* Re: addressing and protection, was Paper about ISO CMitchAlsup
||||      | |  `* Re: addressing and protection, was Paper about ISO CJohn Levine
||||      | `* Re: Paper about ISO CBGB
||||      `- Re: Paper about ISO CEricP
|||+* Re: Paper about ISO CBranimir Maksimovic
|||+* Re: Paper about ISO CThomas Koenig
|||+* Re: Paper about ISO Cantispam
|||`- Re: Paper about ISO CQuadibloc
||+* Re: Paper about ISO CThomas Koenig
||`* Re: Paper about ISO CDavid Brown
|+* Re: Paper about ISO CThomas Koenig
|`* Re: Paper about ISO CVictor Yodaiken
`* Re: Paper about ISO CKent Dickey

Pages:123456789101112131415161718192021222324252627282930313233
Re: Paper about ISO C

<e5212a44-95b1-4b12-86ca-8ba8b162e6b8n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21005&group=comp.arch#21005

  copy link   Newsgroups: comp.arch
X-Received: by 2002:ac8:7e96:: with SMTP id w22mr12022069qtj.28.1634080714788;
Tue, 12 Oct 2021 16:18:34 -0700 (PDT)
X-Received: by 2002:aca:da82:: with SMTP id r124mr5605642oig.175.1634080714573;
Tue, 12 Oct 2021 16:18:34 -0700 (PDT)
Path: rocksolid2!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.arch
Date: Tue, 12 Oct 2021 16:18:34 -0700 (PDT)
In-Reply-To: <sk53ab$m2n$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:291:29f0:75a1:b5f4:fd81:a583;
posting-account=H_G_JQkAAADS6onOMb-dqvUozKse7mcM
NNTP-Posting-Host: 2600:1700:291:29f0:75a1:b5f4:fd81:a583
References: <87fstdumxd.fsf@hotmail.com> <sjni60$97d$1@dont-email.me>
<afb9352d-8ba7-4521-b741-280e0206e255n@googlegroups.com> <sjugcv$jio$1@dont-email.me>
<cb6bbb41-398f-4e2a-9a19-08bc4582b291n@googlegroups.com> <sk261q$me9$1@newsreader4.netcologne.de>
<86zgrentbk.fsf@linuxsc.com> <sk4ji0$c7t$1@dont-email.me> <b5abb6b3-a138-4505-8472-5b0483a4ef02n@googlegroups.com>
<sk53ab$m2n$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <e5212a44-95b1-4b12-86ca-8ba8b162e6b8n@googlegroups.com>
Subject: Re: Paper about ISO C
From: MitchAl...@aol.com (MitchAlsup)
Injection-Date: Tue, 12 Oct 2021 23:18:34 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 119
 by: MitchAlsup - Tue, 12 Oct 2021 23:18 UTC

On Tuesday, October 12, 2021 at 5:47:41 PM UTC-5, BGB wrote:
> On 10/12/2021 4:46 PM, MitchAlsup wrote:
> > On Tuesday, October 12, 2021 at 1:18:42 PM UTC-5, BGB wrote:
> >> On 10/12/2021 10:42 AM, Tim Rentsch wrote:
> >>> Thomas Koenig <tko...@netcologne.de> writes:
> >>>
> >>>> Victor Yodaiken <victor....@gmail.com> schrieb:
> >>>>
> >>>>> Can you cast a pointer to a different type? Sure.
> >>>>>
> >>>>> Can you dereference it?
> >>>>
> >>>> No.
> >>>
> >>> This statement is wrong, or at best much overstated. There are
> >>> plenty of situations where a C pointer value converted to a
> >>> different type may be safely and portably dereferenced.
> >>> Certainly that isn't always true, but it isn't always false
> >>> either.
> >>>
> >> Yeah. For some types of code it is desirable to be able to cast and
> >> dereference a pointer as whatever type matches what one wants to do with it.
> > <
> > During my career I went to so many meetings about memory referencing
> > and how this/that machine was good/bad, I stabilized my thinking about
> > referencing memory into the camp of::
> > a) memory is Inherently misaligned,
> > b) you can't do anything about making that go away,
> > c) you can make the HW capable of delivering near zero overhead to misalignment;
> > THAT: you should simply design the machine as inherently misaligned.
> > <
> > And at this point, If you create/cast a pointer to something, you CAN
> > dereference it. Whether it is profitable or not is up to the programmer.
> Granted.
>
> Nearly all access in BJX2 is misaligned-safe by default, with a few
> partial exceptions which don't significantly effect code generation for
> the most part (mostly effecting the handling of constant displacements
> and MOV.X and similar).
> >>
> >> Requiring something like, say, using "memcpy()" to mash bits from one
> >> format to another and hoping the compiler is smart and reliable enough
> >> to make this "not suck" is a crap solution, IMHO.
> > <
> > Requiring a trip through memory to get from FP-register to int-register
> > is similarly stupid !! {Note: my restrained hand, here.}
> > <
> > SIMD-register to int-register or FP-register probably remains necessary--
> > because SIMD is not the same (or similar size) as int or FP.
> Granted, but these is no way to express this in (standard) C.
> There are compiler intrinsics for this case in BGBCC.
>
> In effect, it is mostly how much extra overhead one wants to impose on
> transferring a value from one register to another.
>
> Meanwhile, the ASM programmer can make use of both integer and FP
> operations using GPRs.
>
>
> This was also a partial incentive for building dynamic typing into
> BGBCC, besides it being needed for my BS2 language: the compiler can do
> all this a lot more efficiently than leaving it up to user code.
>
> In theory, it could also allows for a fairly lightweight JavaScript FFI
> if C code can more directly access JS data and environments without
> needing an awkward and convoluted wrapper API.
>
> Even if, yeah, one probably doesn't want to use dynamic typing when
> avoidable for normal code, in my tests, the performance overhead of
> using dynamic typing is actually surprisingly modest though (as-in,
> "doesn't ruin performance quite as bad as one might intuitively expect
> given it turns pretty much every operator into a runtime call").
>
>
> Full hardware support is unlikely, but it is possible that a few special
> cases can be useful, such as a combined "Morton shuffle and Logical
> Shift Right" operator and similar, or a "Table-Switch with Unsigned
> Saturate".
>
> Say:
> ADD R4, -64, R3
> BRUSS.L 180, R3
> BRA4B .L_case_64
> BRA4B .L_case_65
> ...
> BRA4B .L_case_242
> BRA4B .L_case_243
> BRA4B .L_case_default
<
ADD R4,R3,#-64
TJMP R4,#179
.halfword L_case_64-., L_case_65-.
.......
.halfword L_case_242-.,L_case_243-.
default::
<
If all the labels are within 1024 bytes of the TJMP instruction, then the
table can be comprised of byte offsets (instead of halfword offsets, shown).
<
No-one can transfer control into the table and get anything other than a
fault.
>
> Where, any value outside the range of 0..179 goes to 180, while
> otherwise branching to (PC+Rn*4).
>
> Mostly this is because dynamically-typed runtime-support code internally
> tends to make fairly heavy use of "switch()".
>
> At present, this would be done more like:
> ADD R4, -64, R3
> CMPHI 179, R3
> BT .L_case_default
> BRA.L R3
> BRA4B .L_case_64
> BRA4B .L_case_65
> ...
> BRA4B .L_case_242
> BRA4B .L_case_243
>
Similar TJMP sequence as above.

Re: Paper about ISO C

<6cp9J.178546$rl3.3143@fx45.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21006&group=comp.arch#21006

  copy link   Newsgroups: comp.arch
Path: rocksolid2!news.neodome.net!feeder1.feed.usenet.farm!feed.usenet.farm!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!news-out.netnews.com!news.alt.net!fdc2.netnews.com!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx45.iad.POSTED!not-for-mail
Newsgroups: comp.arch
From: branimir...@icloud.com (Branimir Maksimovic)
Subject: Re: Paper about ISO C
References: <87fstdumxd.fsf@hotmail.com> <sjni60$97d$1@dont-email.me>
<afb9352d-8ba7-4521-b741-280e0206e255n@googlegroups.com>
<sjugcv$jio$1@dont-email.me>
<cb6bbb41-398f-4e2a-9a19-08bc4582b291n@googlegroups.com>
<sk437c$672$1@dont-email.me>
<05cec163-5093-4c96-a8f3-393890d820abn@googlegroups.com>
<zKm9J.48984$6u6.15617@fx03.iad>
<e6467993-5340-4668-9d35-305b5a6a1a41n@googlegroups.com>
User-Agent: slrn/1.0.3 (Darwin)
Lines: 59
Message-ID: <6cp9J.178546$rl3.3143@fx45.iad>
X-Complaints-To: abuse@usenet-news.net
NNTP-Posting-Date: Tue, 12 Oct 2021 23:51:30 UTC
Organization: usenet-news.net
Date: Tue, 12 Oct 2021 23:51:30 GMT
X-Received-Bytes: 3755
 by: Branimir Maksimovic - Tue, 12 Oct 2021 23:51 UTC

On 2021-10-12, MitchAlsup <MitchAlsup@aol.com> wrote:
> On Tuesday, October 12, 2021 at 4:03:29 PM UTC-5, Branimir Maksimovic wrote:
>> On 2021-10-12, MitchAlsup <Mitch...@aol.com> wrote:
>> > On Tuesday, October 12, 2021 at 8:39:58 AM UTC-5, David Brown wrote:
>> >> On 11/10/2021 20:04, Victor Yodaiken wrote:
>> >> > On Sunday, October 10, 2021 at 5:48:01 AM UTC-5, David Brown wrote:
>> >> >
>> >> >> The idea of C being a "high-level assembler" is right there in
>> >> >> section 1, "Introduction".
>> >> >>
>> >> >
>> >> > There is something about high level assembler in the introduction -
>> >> > it is a QUOTE from the C Rationale. If you honestly interpreted it as
>> >> > a claim that C was supposed to be a complete replacement for all
>> >> > assembly languages, then maybe you need new glasses.
>> >> >
>> >> I know that what you wrote was a quotation from a C Rationale document.
>> >> Clearly I did not interpret it as you suggest - you cannot complain
>> >> that I have exaggerated your writings and then do /exactly/ the same
>> >> thing yourself! The difference, however, is that I was doing so as a
>> >> criticism of your argument - you appear to be doing so as some kind of
>> >> revenge.
>> >>
>> >>
>> >> But do I take it that you agree with me that C is not a "high-level
>> >> assembly"?
>> >>
>> >> A vital characteristic of assembly, as a programming language, is that
>> >> the generated code does /exactly/ what you order, no more and no less,
>> >> without re-ordering, optimising, removing or adding anything. C is not
>> >> a language remotely like that, never has been, never will be.
>> ><
>> > You have obviously never used a good macro assembler............
>> >>
>> Macros in assembler are different, you just define macro, that's all :P
>> No surprises...
><
> Macros in assembler can perform a variety of tests to determine the sequence
> of code emitted. In the DEC assemblers, when you "call" an assembly macro,
> it pops the macro off the symbol table list. This enables an ADD macro to
> look at its parameters, and when acceptable, emit an ADD instruction.
><
> After this phase, the assembler performs code scheduling and sometimes
> peephhole optimizations.
><
> We used to use the DEC macro facility to choose between 18-bit offsets
> and loading from constant pools on the PDP-10, and what some might
> call some "heinous" stuff in the PDP-11 macro facility. I had several macros
> that were more than 100 lines of ASM long, typically producing exactly
> 1 instruction.
Oh, it's more like small compiler then assembler. I am used to x86
assemblers which are nowhere near that. Thank for info,
Branimir.

--

7-77-777
Evil Sinner!
with software, you repeat same experiment, expecting different results...

Re: Paper about ISO C

<C7q9J.45174$tA2.43354@fx02.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21007&group=comp.arch#21007

  copy link   Newsgroups: comp.arch
Path: rocksolid2!i2pn.org!weretis.net!feeder8.news.weretis.net!ecngs!feeder2.ecngs.de!178.20.174.213.MISMATCH!feeder1.feed.usenet.farm!feed.usenet.farm!peer03.ams4!peer.am4.highwinds-media.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx02.iad.POSTED!not-for-mail
Newsgroups: comp.arch
From: branimir...@icloud.com (Branimir Maksimovic)
Subject: Re: Paper about ISO C
References: <87fstdumxd.fsf@hotmail.com> <sjni60$97d$1@dont-email.me>
<afb9352d-8ba7-4521-b741-280e0206e255n@googlegroups.com>
<sjugcv$jio$1@dont-email.me>
<cb6bbb41-398f-4e2a-9a19-08bc4582b291n@googlegroups.com>
<sk437c$672$1@dont-email.me>
<0d336dad-0078-4783-9d13-635d1d061704n@googlegroups.com>
<f94c96c4-af61-4a60-b182-db213690c340n@googlegroups.com>
User-Agent: slrn/1.0.3 (Darwin)
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Lines: 40
Message-ID: <C7q9J.45174$tA2.43354@fx02.iad>
X-Complaints-To: abuse@usenet-news.net
NNTP-Posting-Date: Wed, 13 Oct 2021 00:54:58 UTC
Organization: usenet-news.net
Date: Wed, 13 Oct 2021 00:54:58 GMT
X-Received-Bytes: 2927
 by: Branimir Maksimovic - Wed, 13 Oct 2021 00:54 UTC

On 2021-10-12, MitchAlsup <MitchAlsup@aol.com> wrote:
> On Tuesday, October 12, 2021 at 4:19:34 PM UTC-5, victor....@gmail.com wrote:
>> On Tuesday, October 12, 2021 at 8:39:58 AM UTC-5, David Brown wrote:
>>
>> > But do I take it that you agree with me that C is not a "high-level
>> > assembly"?
>> The first paragraph of the paper ---- The C programming language [33] is the
>> first, and, so far,only widely successful programming language that provides
>> operating system developers with a high-level language alternative to
>> assembler (compare to [42]). C’s success was predicated on its design: a
>> small language, close to the machine yet with a great deal of flexibility
>> for experienced programmers. The Rationale for the C standard [9] cited C’s
>> capability to function as a "high-level assembler" and explained that"many
>> operations are defined to be how the target machine’s hardware does it
>> rather than by a general abstract rule" but C also has traditional
>> attributes of an ALGOL style programming language. -----
>>
>> Note, among other phrases: 1) a high-level language alternative to assembler
>> 2) C also has traditional attributes of an ALGOL style programming language.
> 2.1) without nesting of {blocks, subroutines, data} 2.2) without strict
> typing 2.3) without allocating dynamic arrays on the stack

Have they ditched VLA?

2.4) without
> do-end .....
>>
>> Read better.
>< C only smells a bit like Algol, I don't even consider it in the Algol family
>unlike {Pascal, ADA, Jovial, Simula } < There is an ADA operating system
>within USA-DOD entirely written in ADA, with handfulls of ASM (similar to
>C<->UNIX)
iWhat's the fuss about ADA, never had a feel a need to learn it, to me
pretty borring syntax. Perhaps because {} is less verbose then BEGIN/END :P

--

7-77-777
Evil Sinner!
with software, you repeat same experiment, expecting different results...

Re: Paper about ISO C

<C9q9J.45175$tA2.15958@fx02.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21008&group=comp.arch#21008

  copy link   Newsgroups: comp.arch
Path: rocksolid2!i2pn.org!weretis.net!feeder8.news.weretis.net!news.uzoreto.com!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!feeder1.feed.usenet.farm!feed.usenet.farm!peer02.ams4!peer.am4.highwinds-media.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx02.iad.POSTED!not-for-mail
Newsgroups: comp.arch
From: branimir...@icloud.com (Branimir Maksimovic)
Subject: Re: Paper about ISO C
References: <87fstdumxd.fsf@hotmail.com> <sjni60$97d$1@dont-email.me>
<afb9352d-8ba7-4521-b741-280e0206e255n@googlegroups.com>
<sjugcv$jio$1@dont-email.me>
<cb6bbb41-398f-4e2a-9a19-08bc4582b291n@googlegroups.com>
<sk261q$me9$1@newsreader4.netcologne.de> <86zgrentbk.fsf@linuxsc.com>
<sk4ji0$c7t$1@dont-email.me>
<b5abb6b3-a138-4505-8472-5b0483a4ef02n@googlegroups.com>
<sk53ab$m2n$1@dont-email.me>
User-Agent: slrn/1.0.3 (Darwin)
Lines: 103
Message-ID: <C9q9J.45175$tA2.15958@fx02.iad>
X-Complaints-To: abuse@usenet-news.net
NNTP-Posting-Date: Wed, 13 Oct 2021 00:57:06 UTC
Organization: usenet-news.net
Date: Wed, 13 Oct 2021 00:57:06 GMT
X-Received-Bytes: 4940
 by: Branimir Maksimovic - Wed, 13 Oct 2021 00:57 UTC

On 2021-10-12, BGB <cr88192@gmail.com> wrote:
> On 10/12/2021 4:46 PM, MitchAlsup wrote:
>> On Tuesday, October 12, 2021 at 1:18:42 PM UTC-5, BGB wrote:
>>> On 10/12/2021 10:42 AM, Tim Rentsch wrote:
>>>> Thomas Koenig <tko...@netcologne.de> writes:
>>>>
>>>>> Victor Yodaiken <victor....@gmail.com> schrieb:
>>>>>
>>>>>> Can you cast a pointer to a different type? Sure.
>>>>>>
>>>>>> Can you dereference it?
>>>>>
>>>>> No.
>>>>
>>>> This statement is wrong, or at best much overstated. There are
>>>> plenty of situations where a C pointer value converted to a
>>>> different type may be safely and portably dereferenced.
>>>> Certainly that isn't always true, but it isn't always false
>>>> either.
>>>>
>>> Yeah. For some types of code it is desirable to be able to cast and
>>> dereference a pointer as whatever type matches what one wants to do with it.
>> <
>> During my career I went to so many meetings about memory referencing
>> and how this/that machine was good/bad, I stabilized my thinking about
>> referencing memory into the camp of::
>> a) memory is Inherently misaligned,
>> b) you can't do anything about making that go away,
>> c) you can make the HW capable of delivering near zero overhead to misalignment;
>> THAT: you should simply design the machine as inherently misaligned.
>> <
>> And at this point, If you create/cast a pointer to something, you CAN
>> dereference it. Whether it is profitable or not is up to the programmer.
>
> Granted.
>
> Nearly all access in BJX2 is misaligned-safe by default, with a few
> partial exceptions which don't significantly effect code generation for
> the most part (mostly effecting the handling of constant displacements
> and MOV.X and similar).
>
>
>>>
>>> Requiring something like, say, using "memcpy()" to mash bits from one
>>> format to another and hoping the compiler is smart and reliable enough
>>> to make this "not suck" is a crap solution, IMHO.
>> <
>> Requiring a trip through memory to get from FP-register to int-register
>> is similarly stupid !! {Note: my restrained hand, here.}
>> <
>> SIMD-register to int-register or FP-register probably remains necessary--
>> because SIMD is not the same (or similar size) as int or FP.
>
> Granted, but these is no way to express this in (standard) C.
> There are compiler intrinsics for this case in BGBCC.
>
> In effect, it is mostly how much extra overhead one wants to impose on
> transferring a value from one register to another.
>
> Meanwhile, the ASM programmer can make use of both integer and FP
> operations using GPRs.
>
>
> This was also a partial incentive for building dynamic typing into
> BGBCC, besides it being needed for my BS2 language: the compiler can do
> all this a lot more efficiently than leaving it up to user code.
>
> In theory, it could also allows for a fairly lightweight JavaScript FFI
> if C code can more directly access JS data and environments without
> needing an awkward and convoluted wrapper API.
>
> Even if, yeah, one probably doesn't want to use dynamic typing when
> avoidable for normal code, in my tests, the performance overhead of
> using dynamic typing is actually surprisingly modest though (as-in,
> "doesn't ruin performance quite as bad as one might intuitively expect
> given it turns pretty much every operator into a runtime call").
>
>
> Full hardware support is unlikely, but it is possible that a few special
> cases can be useful, such as a combined "Morton shuffle and Logical
> Shift Right" operator and similar, or a "Table-Switch with Unsigned
> Saturate".
>
> Say:
> ADD R4, -64, R3
> BRUSS.L 180, R3
> BRA4B .L_case_64
> BRA4B .L_case_65
> ...
> BRA4B .L_case_242
> BRA4B .L_case_243
> BRA4B .L_case_default
>
Isnt it much better just to index into table
and jump?

--

7-77-777
Evil Sinner!
with software, you repeat same experiment, expecting different results...

Re: macro assemblers, was Paper about ISO C

<_bq9J.45176$tA2.1635@fx02.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21009&group=comp.arch#21009

  copy link   Newsgroups: comp.arch
Path: rocksolid2!i2pn.org!weretis.net!feeder8.news.weretis.net!feeder1.feed.usenet.farm!feed.usenet.farm!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!news-out.netnews.com!news.alt.net!fdc2.netnews.com!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx02.iad.POSTED!not-for-mail
Newsgroups: comp.arch
From: branimir...@icloud.com (Branimir Maksimovic)
Subject: Re: macro assemblers, was Paper about ISO C
References: <87fstdumxd.fsf@hotmail.com> <sk437c$672$1@dont-email.me>
<05cec163-5093-4c96-a8f3-393890d820abn@googlegroups.com>
<zKm9J.48984$6u6.15617@fx03.iad> <sk53fa$1tig$1@gal.iecc.com>
User-Agent: slrn/1.0.3 (Darwin)
Lines: 34
Message-ID: <_bq9J.45176$tA2.1635@fx02.iad>
X-Complaints-To: abuse@usenet-news.net
NNTP-Posting-Date: Wed, 13 Oct 2021 00:59:38 UTC
Organization: usenet-news.net
Date: Wed, 13 Oct 2021 00:59:38 GMT
X-Received-Bytes: 2217
 by: Branimir Maksimovic - Wed, 13 Oct 2021 00:59 UTC

On 2021-10-12, John Levine <johnl@taugh.com> wrote:
> According to Branimir Maksimovic <branimir.maksimovic@icloud.com>:
>>>> A vital characteristic of assembly, as a programming language, is that
>>>> the generated code does /exactly/ what you order, no more and no less,
>>>> without re-ordering, optimising, removing or adding anything. C is not
>>>> a language remotely like that, never has been, never will be.
>>><
>>> You have obviously never used a good macro assembler............
>>
>>Macros in assembler are different, you just define macro, that's all :P
>>No surprises...
>
> I'm not getting the impression you've not done a lot of programming in assemblers
> with strong macro languages.
You are absolutelly right. I just speak from my experience :P

Someone else mentioned PDP-10 MACRO, but take a
> look at HLASM (the oddly named High Level Assembler) for IBM mainframes. They
> have macros that with one parameter generate a block of arguments to a call, with
> a different parameter generate the call that uses the arguments, and by default
> generates both.
>
> https://www-01.ibm.com/servers/resourcelink/svc00100.nsf/pages/zOSV2R3sc264940/$file/asmr1023.pdf
>
iThanks I'll look into. Problem is that nowadays, only HLL are advertised and we assembler
Hackers have to relly on individual efforts, just simple home made assemblers :P

--

7-77-777
Evil Sinner!
with software, you repeat same experiment, expecting different results...

Re: Paper about ISO C

<smq9J.65851$md6.31572@fx36.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21010&group=comp.arch#21010

  copy link   Newsgroups: comp.arch
Path: rocksolid2!i2pn.org!aioe.org!news.dns-netz.com!news.freedyn.net!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!news-out.netnews.com!news.alt.net!fdc2.netnews.com!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx36.iad.POSTED!not-for-mail
Newsgroups: comp.arch
From: branimir...@icloud.com (Branimir Maksimovic)
Subject: Re: Paper about ISO C
References: <87fstdumxd.fsf@hotmail.com> <sjni60$97d$1@dont-email.me>
<afb9352d-8ba7-4521-b741-280e0206e255n@googlegroups.com>
<sjugcv$jio$1@dont-email.me>
<cb6bbb41-398f-4e2a-9a19-08bc4582b291n@googlegroups.com>
<sk261q$me9$1@newsreader4.netcologne.de> <86zgrentbk.fsf@linuxsc.com>
<sk4ji0$c7t$1@dont-email.me>
<b5abb6b3-a138-4505-8472-5b0483a4ef02n@googlegroups.com>
<sk53ab$m2n$1@dont-email.me>
<e5212a44-95b1-4b12-86ca-8ba8b162e6b8n@googlegroups.com>
User-Agent: slrn/1.0.3 (Darwin)
Lines: 133
Message-ID: <smq9J.65851$md6.31572@fx36.iad>
X-Complaints-To: abuse@usenet-news.net
NNTP-Posting-Date: Wed, 13 Oct 2021 01:10:48 UTC
Organization: usenet-news.net
Date: Wed, 13 Oct 2021 01:10:48 GMT
X-Received-Bytes: 6164
 by: Branimir Maksimovic - Wed, 13 Oct 2021 01:10 UTC

On 2021-10-12, MitchAlsup <MitchAlsup@aol.com> wrote:
> On Tuesday, October 12, 2021 at 5:47:41 PM UTC-5, BGB wrote:
>> On 10/12/2021 4:46 PM, MitchAlsup wrote:
>> > On Tuesday, October 12, 2021 at 1:18:42 PM UTC-5, BGB wrote:
>> >> On 10/12/2021 10:42 AM, Tim Rentsch wrote:
>> >>> Thomas Koenig <tko...@netcologne.de> writes:
>> >>>
>> >>>> Victor Yodaiken <victor....@gmail.com> schrieb:
>> >>>>
>> >>>>> Can you cast a pointer to a different type? Sure.
>> >>>>>
>> >>>>> Can you dereference it?
>> >>>>
>> >>>> No.
>> >>>
>> >>> This statement is wrong, or at best much overstated. There are
>> >>> plenty of situations where a C pointer value converted to a
>> >>> different type may be safely and portably dereferenced.
>> >>> Certainly that isn't always true, but it isn't always false
>> >>> either.
>> >>>
>> >> Yeah. For some types of code it is desirable to be able to cast and
>> >> dereference a pointer as whatever type matches what one wants to do with it.
>> > <
>> > During my career I went to so many meetings about memory referencing
>> > and how this/that machine was good/bad, I stabilized my thinking about
>> > referencing memory into the camp of::
>> > a) memory is Inherently misaligned,
>> > b) you can't do anything about making that go away,
>> > c) you can make the HW capable of delivering near zero overhead to misalignment;
>> > THAT: you should simply design the machine as inherently misaligned.
>> > <
>> > And at this point, If you create/cast a pointer to something, you CAN
>> > dereference it. Whether it is profitable or not is up to the programmer.
>> Granted.
>>
>> Nearly all access in BJX2 is misaligned-safe by default, with a few
>> partial exceptions which don't significantly effect code generation for
>> the most part (mostly effecting the handling of constant displacements
>> and MOV.X and similar).
>> >>
>> >> Requiring something like, say, using "memcpy()" to mash bits from one
>> >> format to another and hoping the compiler is smart and reliable enough
>> >> to make this "not suck" is a crap solution, IMHO.
>> > <
>> > Requiring a trip through memory to get from FP-register to int-register
>> > is similarly stupid !! {Note: my restrained hand, here.}
>> > <
>> > SIMD-register to int-register or FP-register probably remains necessary--
>> > because SIMD is not the same (or similar size) as int or FP.
>> Granted, but these is no way to express this in (standard) C.
>> There are compiler intrinsics for this case in BGBCC.
>>
>> In effect, it is mostly how much extra overhead one wants to impose on
>> transferring a value from one register to another.
>>
>> Meanwhile, the ASM programmer can make use of both integer and FP
>> operations using GPRs.
>>
>>
>> This was also a partial incentive for building dynamic typing into
>> BGBCC, besides it being needed for my BS2 language: the compiler can do
>> all this a lot more efficiently than leaving it up to user code.
>>
>> In theory, it could also allows for a fairly lightweight JavaScript FFI
>> if C code can more directly access JS data and environments without
>> needing an awkward and convoluted wrapper API.
>>
>> Even if, yeah, one probably doesn't want to use dynamic typing when
>> avoidable for normal code, in my tests, the performance overhead of
>> using dynamic typing is actually surprisingly modest though (as-in,
>> "doesn't ruin performance quite as bad as one might intuitively expect
>> given it turns pretty much every operator into a runtime call").
>>
>>
>> Full hardware support is unlikely, but it is possible that a few special
>> cases can be useful, such as a combined "Morton shuffle and Logical
>> Shift Right" operator and similar, or a "Table-Switch with Unsigned
>> Saturate".
>>
>> Say:
>> ADD R4, -64, R3
>> BRUSS.L 180, R3
>> BRA4B .L_case_64
>> BRA4B .L_case_65
>> ...
>> BRA4B .L_case_242
>> BRA4B .L_case_243
>> BRA4B .L_case_default
><
> ADD R4,R3,#-64
> TJMP R4,#179
> .halfword L_case_64-., L_case_65-.
> .......
> .halfword L_case_242-.,L_case_243-.
> default::
><

Yeah, that's it !
> If all the labels are within 1024 bytes of the TJMP instruction, then the
> table can be comprised of byte offsets (instead of halfword offsets, shown).
><
> No-one can transfer control into the table and get anything other than a
> fault.
>>

Agreed 150% :P

>> Where, any value outside the range of 0..179 goes to 180, while
>> otherwise branching to (PC+Rn*4).
>>
>> Mostly this is because dynamically-typed runtime-support code internally
>> tends to make fairly heavy use of "switch()".
>>
>> At present, this would be done more like:
>> ADD R4, -64, R3
>> CMPHI 179, R3
>> BT .L_case_default
>> BRA.L R3
>> BRA4B .L_case_64
>> BRA4B .L_case_65
>> ...
>> BRA4B .L_case_242
>> BRA4B .L_case_243
>>
> Similar TJMP sequence as above.

--

7-77-777
Evil Sinner!
with software, you repeat same experiment, expecting different results...

Re: Paper about ISO C

<sk5cp7$26i$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21011&group=comp.arch#21011

  copy link   Newsgroups: comp.arch
Path: rocksolid2!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: sfu...@alumni.cmu.edu.invalid (Stephen Fuld)
Newsgroups: comp.arch
Subject: Re: Paper about ISO C
Date: Tue, 12 Oct 2021 18:29:09 -0700
Organization: A noiseless patient Spider
Lines: 50
Message-ID: <sk5cp7$26i$1@dont-email.me>
References: <87fstdumxd.fsf@hotmail.com> <sjni60$97d$1@dont-email.me>
<afb9352d-8ba7-4521-b741-280e0206e255n@googlegroups.com>
<sjugcv$jio$1@dont-email.me>
<cb6bbb41-398f-4e2a-9a19-08bc4582b291n@googlegroups.com>
<sk437c$672$1@dont-email.me>
<0d336dad-0078-4783-9d13-635d1d061704n@googlegroups.com>
<f94c96c4-af61-4a60-b182-db213690c340n@googlegroups.com>
<C7q9J.45174$tA2.43354@fx02.iad>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 13 Oct 2021 01:29:11 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="112560758639a371c624c69262596e59";
logging-data="2258"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/aGFpDv1barsa7qReAdqYfGlzUCH8Sh9M="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.2.0
Cancel-Lock: sha1:ailZ4NTpzUPsafYY2TyrnKL+BOo=
In-Reply-To: <C7q9J.45174$tA2.43354@fx02.iad>
Content-Language: en-US
 by: Stephen Fuld - Wed, 13 Oct 2021 01:29 UTC

On 10/12/2021 5:54 PM, Branimir Maksimovic wrote:
> On 2021-10-12, MitchAlsup <MitchAlsup@aol.com> wrote:
>> On Tuesday, October 12, 2021 at 4:19:34 PM UTC-5, victor....@gmail.com wrote:
>>> On Tuesday, October 12, 2021 at 8:39:58 AM UTC-5, David Brown wrote:
>>>
>>>> But do I take it that you agree with me that C is not a "high-level
>>>> assembly"?
>>> The first paragraph of the paper ---- The C programming language [33] is the
>>> first, and, so far,only widely successful programming language that provides
>>> operating system developers with a high-level language alternative to
>>> assembler (compare to [42]). C’s success was predicated on its design: a
>>> small language, close to the machine yet with a great deal of flexibility
>>> for experienced programmers. The Rationale for the C standard [9] cited C’s
>>> capability to function as a "high-level assembler" and explained that"many
>>> operations are defined to be how the target machine’s hardware does it
>>> rather than by a general abstract rule" but C also has traditional
>>> attributes of an ALGOL style programming language. -----
>>>
>>> Note, among other phrases: 1) a high-level language alternative to assembler
>>> 2) C also has traditional attributes of an ALGOL style programming language.
>> 2.1) without nesting of {blocks, subroutines, data} 2.2) without strict
>> typing 2.3) without allocating dynamic arrays on the stack
>
> Have they ditched VLA?
>
> 2.4) without
>> do-end .....
>>>
>>> Read better.
>> < C only smells a bit like Algol, I don't even consider it in the Algol family
>> unlike {Pascal, ADA, Jovial, Simula } < There is an ADA operating system
>> within USA-DOD entirely written in ADA, with handfulls of ASM (similar to
>> C<->UNIX)
> iWhat's the fuss about ADA, never had a feel a need to learn it, to me
> pretty borring syntax. Perhaps because {} is less verbose then BEGIN/END :P
>

To me, the big advantage of Ada (it's a woman's name, not an acronym -
hence not all caps) is that its syntax makes it easier to write correct
programs, and harder, though of course not impossible, to make the kind
of errors this thread has been talking about.

But others here are far more qualified to discuss this than I am.

--
- Stephen Fuld
(e-mail address disguised to prevent spam)

Re: Paper about ISO C

<apr9J.205378$Kv2.138883@fx47.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21012&group=comp.arch#21012

  copy link   Newsgroups: comp.arch
Path: rocksolid2!i2pn.org!weretis.net!feeder6.news.weretis.net!4.us.feeder.erje.net!2.eu.feeder.erje.net!feeder.erje.net!news.uzoreto.com!news-out.netnews.com!news.alt.net!fdc2.netnews.com!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx47.iad.POSTED!not-for-mail
Newsgroups: comp.arch
From: branimir...@icloud.com (Branimir Maksimovic)
Subject: Re: Paper about ISO C
References: <87fstdumxd.fsf@hotmail.com> <sjni60$97d$1@dont-email.me>
<afb9352d-8ba7-4521-b741-280e0206e255n@googlegroups.com>
<sjugcv$jio$1@dont-email.me>
<cb6bbb41-398f-4e2a-9a19-08bc4582b291n@googlegroups.com>
<sk437c$672$1@dont-email.me>
<0d336dad-0078-4783-9d13-635d1d061704n@googlegroups.com>
<f94c96c4-af61-4a60-b182-db213690c340n@googlegroups.com>
<C7q9J.45174$tA2.43354@fx02.iad> <sk5cp7$26i$1@dont-email.me>
User-Agent: slrn/1.0.3 (Darwin)
Lines: 20
Message-ID: <apr9J.205378$Kv2.138883@fx47.iad>
X-Complaints-To: abuse@usenet-news.net
NNTP-Posting-Date: Wed, 13 Oct 2021 02:21:58 UTC
Organization: usenet-news.net
Date: Wed, 13 Oct 2021 02:21:58 GMT
X-Received-Bytes: 1562
 by: Branimir Maksimovic - Wed, 13 Oct 2021 02:21 UTC

On 2021-10-13, Stephen Fuld <sfuld@alumni.cmu.edu.invalid> wrote:
> To me, the big advantage of Ada (it's a woman's name, not an acronym -
> hence not all caps) is that its syntax makes it easier to write correct
> programs, and harder, though of course not impossible, to make the kind
> of errors this thread has been talking about.
>
> But others here are far more qualified to discuss this than I am.
>
OK, I'll try it, it, but on macOS I can't have compiler, let alone
IDE support :P
>
>
>

--

7-77-777
Evil Sinner!
with software, you repeat same experiment, expecting different results...

Re: Paper about ISO C

<sk5ngm$og9$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21013&group=comp.arch#21013

  copy link   Newsgroups: comp.arch
Path: rocksolid2!news.neodome.net!news.mixmin.net!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: sfu...@alumni.cmu.edu.invalid (Stephen Fuld)
Newsgroups: comp.arch
Subject: Re: Paper about ISO C
Date: Tue, 12 Oct 2021 21:32:22 -0700
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <sk5ngm$og9$1@dont-email.me>
References: <87fstdumxd.fsf@hotmail.com> <sjni60$97d$1@dont-email.me>
<afb9352d-8ba7-4521-b741-280e0206e255n@googlegroups.com>
<sjugcv$jio$1@dont-email.me>
<cb6bbb41-398f-4e2a-9a19-08bc4582b291n@googlegroups.com>
<sk437c$672$1@dont-email.me>
<0d336dad-0078-4783-9d13-635d1d061704n@googlegroups.com>
<f94c96c4-af61-4a60-b182-db213690c340n@googlegroups.com>
<C7q9J.45174$tA2.43354@fx02.iad> <sk5cp7$26i$1@dont-email.me>
<apr9J.205378$Kv2.138883@fx47.iad>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 13 Oct 2021 04:32:22 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="112560758639a371c624c69262596e59";
logging-data="25097"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX184dDgq7n8P2VRHD8aTTOTt8cib4EtL/mM="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.2.0
Cancel-Lock: sha1:6+k2jtQVNtf3o0sm9xvCDK2D2JQ=
In-Reply-To: <apr9J.205378$Kv2.138883@fx47.iad>
Content-Language: en-US
 by: Stephen Fuld - Wed, 13 Oct 2021 04:32 UTC

On 10/12/2021 7:21 PM, Branimir Maksimovic wrote:
> On 2021-10-13, Stephen Fuld <sfuld@alumni.cmu.edu.invalid> wrote:
>> To me, the big advantage of Ada (it's a woman's name, not an acronym -
>> hence not all caps) is that its syntax makes it easier to write correct
>> programs, and harder, though of course not impossible, to make the kind
>> of errors this thread has been talking about.
>>
>> But others here are far more qualified to discuss this than I am.
>>
> OK, I'll try it, it, but on macOS I can't have compiler, let alone
> IDE support :P

Again, others are more qualified than I am to comment, but it appears
that GNAT (GNU Ada compiler) is available on MacOS.

--
- Stephen Fuld
(e-mail address disguised to prevent spam)

Re: Paper about ISO C

<isnh1jFn9pnU1@mid.individual.net>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21017&group=comp.arch#21017

  copy link   Newsgroups: comp.arch
Path: rocksolid2!news.neodome.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: niklas.h...@tidorum.invalid (Niklas Holsti)
Newsgroups: comp.arch
Subject: Re: Paper about ISO C
Date: Wed, 13 Oct 2021 10:43:46 +0300
Organization: Tidorum Ltd
Lines: 23
Message-ID: <isnh1jFn9pnU1@mid.individual.net>
References: <87fstdumxd.fsf@hotmail.com> <sjni60$97d$1@dont-email.me>
<afb9352d-8ba7-4521-b741-280e0206e255n@googlegroups.com>
<sjugcv$jio$1@dont-email.me>
<cb6bbb41-398f-4e2a-9a19-08bc4582b291n@googlegroups.com>
<sk437c$672$1@dont-email.me>
<0d336dad-0078-4783-9d13-635d1d061704n@googlegroups.com>
<f94c96c4-af61-4a60-b182-db213690c340n@googlegroups.com>
<C7q9J.45174$tA2.43354@fx02.iad>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net oyI0MX9NjbllOe2gEExNlgCSmSDZ+sOqfl2t1jJps/ns2K+IFj
Cancel-Lock: sha1:54MKM4R/WC7fKWVAPf1OhEy4la8=
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0)
Gecko/20100101 Thunderbird/78.13.0
In-Reply-To: <C7q9J.45174$tA2.43354@fx02.iad>
Content-Language: en-US
 by: Niklas Holsti - Wed, 13 Oct 2021 07:43 UTC

On 2021-10-13 3:54, Branimir Maksimovic wrote:

> What's the fuss about ADA, never had a feel a need to learn it,

Since you ask, here are a some reasons to be interested in Ada:

- "Conclusion: development costs of C exceed those of Ada":
http://archive.adaic.com/intro/ada-vs-c/cada_art.html

- "Why Ada succeeds where C fails":
http://archive.adaic.com/projects/atwork/trains.html

- "Our research showed that Ada’s evolution has made it an increasingly
compelling option for engineering organizations":
https://www.adacore.com/uploads/techPapers/Controlling-Costs-with-Software-Language-Choice-AdaCore-VDC-WP.PDF

> to me pretty borring syntax. Perhaps because {} is less verbose then
> BEGIN/END :P

Maybe boring, but designed for readability and robustness at the
possible cost of brevity.

Re: Paper about ISO C

<_ox9J.87698$ol1.33401@fx42.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21023&group=comp.arch#21023

  copy link   Newsgroups: comp.arch
Path: rocksolid2!news.neodome.net!news.uzoreto.com!newsreader4.netcologne.de!news.netcologne.de!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx42.iad.POSTED!not-for-mail
Newsgroups: comp.arch
From: branimir...@icloud.com (Branimir Maksimovic)
Subject: Re: Paper about ISO C
References: <87fstdumxd.fsf@hotmail.com> <sjni60$97d$1@dont-email.me>
<afb9352d-8ba7-4521-b741-280e0206e255n@googlegroups.com>
<sjugcv$jio$1@dont-email.me>
<cb6bbb41-398f-4e2a-9a19-08bc4582b291n@googlegroups.com>
<sk437c$672$1@dont-email.me>
<0d336dad-0078-4783-9d13-635d1d061704n@googlegroups.com>
<f94c96c4-af61-4a60-b182-db213690c340n@googlegroups.com>
<C7q9J.45174$tA2.43354@fx02.iad> <sk5cp7$26i$1@dont-email.me>
<apr9J.205378$Kv2.138883@fx47.iad> <sk5ngm$og9$1@dont-email.me>
User-Agent: slrn/1.0.3 (Darwin)
Lines: 29
Message-ID: <_ox9J.87698$ol1.33401@fx42.iad>
X-Complaints-To: abuse@usenet-news.net
NNTP-Posting-Date: Wed, 13 Oct 2021 09:11:22 UTC
Organization: usenet-news.net
Date: Wed, 13 Oct 2021 09:11:22 GMT
X-Received-Bytes: 2040
 by: Branimir Maksimovic - Wed, 13 Oct 2021 09:11 UTC

On 2021-10-13, Stephen Fuld <sfuld@alumni.cmu.edu.invalid> wrote:
> On 10/12/2021 7:21 PM, Branimir Maksimovic wrote:
>> On 2021-10-13, Stephen Fuld <sfuld@alumni.cmu.edu.invalid> wrote:
>>> To me, the big advantage of Ada (it's a woman's name, not an acronym -
>>> hence not all caps) is that its syntax makes it easier to write correct
>>> programs, and harder, though of course not impossible, to make the kind
>>> of errors this thread has been talking about.
>>>
>>> But others here are far more qualified to discuss this than I am.
>>>
>> OK, I'll try it, it, but on macOS I can't have compiler, let alone
>> IDE support :P
>
> Again, others are more qualified than I am to comment, but it appears
> that GNAT (GNU Ada compiler) is available on MacOS.
>

Yes, but is only for x86, does not builds for my M1.
Interrestingly except gforth (without extensions)
there is no forth for M1, as well.
>
>

--

7-77-777
Evil Sinner!
with software, you repeat same experiment, expecting different results...

Re: Paper about ISO C

<utx9J.49150$6u6.9410@fx03.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21025&group=comp.arch#21025

  copy link   Newsgroups: comp.arch
Path: rocksolid2!news.neodome.net!feeder5.feed.usenet.farm!feeder1.feed.usenet.farm!feed.usenet.farm!newsreader4.netcologne.de!news.netcologne.de!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx03.iad.POSTED!not-for-mail
Newsgroups: comp.arch
From: branimir...@icloud.com (Branimir Maksimovic)
Subject: Re: Paper about ISO C
References: <87fstdumxd.fsf@hotmail.com> <sjni60$97d$1@dont-email.me>
<afb9352d-8ba7-4521-b741-280e0206e255n@googlegroups.com>
<sjugcv$jio$1@dont-email.me>
<cb6bbb41-398f-4e2a-9a19-08bc4582b291n@googlegroups.com>
<sk437c$672$1@dont-email.me>
<0d336dad-0078-4783-9d13-635d1d061704n@googlegroups.com>
<f94c96c4-af61-4a60-b182-db213690c340n@googlegroups.com>
<C7q9J.45174$tA2.43354@fx02.iad> <isnh1jFn9pnU1@mid.individual.net>
User-Agent: slrn/1.0.3 (Darwin)
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Lines: 33
Message-ID: <utx9J.49150$6u6.9410@fx03.iad>
X-Complaints-To: abuse@usenet-news.net
NNTP-Posting-Date: Wed, 13 Oct 2021 09:16:10 UTC
Organization: usenet-news.net
Date: Wed, 13 Oct 2021 09:16:10 GMT
X-Received-Bytes: 2202
 by: Branimir Maksimovic - Wed, 13 Oct 2021 09:16 UTC

On 2021-10-13, Niklas Holsti <niklas.holsti@tidorum.invalid> wrote:
> On 2021-10-13 3:54, Branimir Maksimovic wrote:
>
>> What's the fuss about ADA, never had a feel a need to learn it,
>
>
> Since you ask, here are a some reasons to be interested in Ada:
>
> - "Conclusion: development costs of C exceed those of Ada":
> http://archive.adaic.com/intro/ada-vs-c/cada_art.html
>
> - "Why Ada succeeds where C fails":
> http://archive.adaic.com/projects/atwork/trains.html
>
> - "Our research showed that Ada’s evolution has made it an increasingly
> compelling option for engineering organizations":
> https://www.adacore.com/uploads/techPapers/Controlling-Costs-with-Software-Language-Choice-AdaCore-VDC-WP.PDF
>
>
>> to me pretty borring syntax. Perhaps because {} is less verbose then
>> BEGIN/END :P
>
> Maybe boring, but designed for readability and robustness at the
> possible cost of brevity.
Great, but there must be more effort in ads for ADA, as C
is everywhere available, while behind ADA is lack of support :(

--

7-77-777
Evil Sinner!
with software, you repeat same experiment, expecting different results...

Re: Paper about ISO C

<sk6el9$vaa$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21029&group=comp.arch#21029

  copy link   Newsgroups: comp.arch
Path: rocksolid2!news.neodome.net!weretis.net!feeder8.news.weretis.net!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.arch
Subject: Re: Paper about ISO C
Date: Wed, 13 Oct 2021 13:07:21 +0200
Organization: A noiseless patient Spider
Lines: 53
Message-ID: <sk6el9$vaa$1@dont-email.me>
References: <87fstdumxd.fsf@hotmail.com> <sjni60$97d$1@dont-email.me>
<afb9352d-8ba7-4521-b741-280e0206e255n@googlegroups.com>
<sjugcv$jio$1@dont-email.me>
<cb6bbb41-398f-4e2a-9a19-08bc4582b291n@googlegroups.com>
<sk261q$me9$1@newsreader4.netcologne.de> <86zgrentbk.fsf@linuxsc.com>
<sk4ji0$c7t$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 13 Oct 2021 11:07:22 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="36092c05819f63e8c184d9134533a877";
logging-data="32074"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18gEJpcbnTKlKmGS6ETj4uihLLnARPyQ4Q="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:XIAdk35CW1+CZ5xW9AZS4rL1CLE=
In-Reply-To: <sk4ji0$c7t$1@dont-email.me>
Content-Language: en-GB
 by: David Brown - Wed, 13 Oct 2021 11:07 UTC

On 12/10/2021 20:18, BGB wrote:
> On 10/12/2021 10:42 AM, Tim Rentsch wrote:
>> Thomas Koenig <tkoenig@netcologne.de> writes:
>>
>>> Victor Yodaiken <victor.yodaiken@gmail.com> schrieb:
>>>
>>>> Can you cast a pointer to a different type?  Sure.
>>>>
>>>> Can you dereference it?
>>>
>>> No.
>>
>> This statement is wrong, or at best much overstated.  There are
>> plenty of situations where a C pointer value converted to a
>> different type may be safely and portably dereferenced.
>> Certainly that isn't always true, but it isn't always false
>> either.
>>
>
> Yeah. For some types of code it is desirable to be able to cast and
> dereference a pointer as whatever type matches what one wants to do with
> it.
>

He didn't say it was "desirable", he said it is possible (in a fully
defined, safe and portable way).

If you start out with "int * p", then you can do:

const int * p1 = (const int *) p;
int x = *p1;

char * p1 = (char *) p;
int x = *p1; // You get the first byte

short * p1 = (short *) p;
int * p2 = (int *) p1;
int x = *p2;

These are just a few examples where casting a pointer to a different
type, then dereferencing it, is fine. There are many others (such as
using structs, unions, arrays, uintptr_t, etc.).

But equally there are many casts where the cast itself is fully defined
(or almost fully, depending on alignments), but dereferencing would not
be defined behaviour.

It is not the casting that is the problem - it is the accessing of the
object via an lvalue of an incompatible type that is not covered by one
of the other clauses in 6.5p7.

Re: Paper about ISO C

<sk6hl5$p56$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21031&group=comp.arch#21031

  copy link   Newsgroups: comp.arch
Path: rocksolid2!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.arch
Subject: Re: Paper about ISO C
Date: Wed, 13 Oct 2021 13:58:29 +0200
Organization: A noiseless patient Spider
Lines: 76
Message-ID: <sk6hl5$p56$1@dont-email.me>
References: <87fstdumxd.fsf@hotmail.com> <sjni60$97d$1@dont-email.me>
<afb9352d-8ba7-4521-b741-280e0206e255n@googlegroups.com>
<sjugcv$jio$1@dont-email.me>
<cb6bbb41-398f-4e2a-9a19-08bc4582b291n@googlegroups.com>
<sk261q$me9$1@newsreader4.netcologne.de> <86zgrentbk.fsf@linuxsc.com>
<sk4ji0$c7t$1@dont-email.me>
<b5abb6b3-a138-4505-8472-5b0483a4ef02n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 13 Oct 2021 11:58:29 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="36092c05819f63e8c184d9134533a877";
logging-data="25766"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+3wGRYY0EPbDN2Me4350pzgLhYGLSJHIg="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:86uIPfFTfYXtrYUP6izPvYBZe6w=
In-Reply-To: <b5abb6b3-a138-4505-8472-5b0483a4ef02n@googlegroups.com>
Content-Language: en-GB
 by: David Brown - Wed, 13 Oct 2021 11:58 UTC

On 12/10/2021 23:46, MitchAlsup wrote:
> On Tuesday, October 12, 2021 at 1:18:42 PM UTC-5, BGB wrote:
>> On 10/12/2021 10:42 AM, Tim Rentsch wrote:
>>>
>> Yeah. For some types of code it is desirable to be able to cast and
>> dereference a pointer as whatever type matches what one wants to do with it.
> <
> During my career I went to so many meetings about memory referencing
> and how this/that machine was good/bad, I stabilized my thinking about
> referencing memory into the camp of::
> a) memory is Inherently misaligned,
> b) you can't do anything about making that go away,
> c) you can make the HW capable of delivering near zero overhead to misalignment;
> THAT: you should simply design the machine as inherently misaligned.
> <
> And at this point, If you create/cast a pointer to something, you CAN
> dereference it. Whether it is profitable or not is up to the programmer.

That is a perfectly reasonable viewpoint. It is not, however, the
viewpoint taken by the C language standards - no matter how you might
object. Disagreeing with them does not change reality.

>>
>> Requiring something like, say, using "memcpy()" to mash bits from one
>> format to another and hoping the compiler is smart and reliable enough
>> to make this "not suck" is a crap solution, IMHO.
> <
> Requiring a trip through memory to get from FP-register to int-register
> is similarly stupid !! {Note: my restrained hand, here.}
> <
That is why good compilers do not make the trip through memory.

float int_to_float(int x) {
float f;
memcpy(&f, &x, sizeof(x));
return f;
}

int_to_float:
movd xmm0, edi
ret

Requiring a /logical/ trip through memory is inconvenient too. That is
why C also allows type-punning unions:

float int_to_float2(int x) {
union { int i; float f; } u = { x };
return u.f;
}

int_to_float2:
movd xmm0, edi
ret

Sometimes, however, it would be nice if you could use pointer syntax
directly and access other data types in a simpler manner. That is why
gcc has an extension to specify precisely that:

float int_to_float3(int x) {
typedef __attribute__ ((__may_alias__)) float float_a;
int y = x;
float_a * fp = (float_a *) &y;
return *fp;
}

However, I agree with BGB that it is a shame there is no good, simple,
method that is safe and also efficient on all compilers. Generally,
poorer quality compilers will generate inefficient code when dealing
with memcpy and perhaps also unions - but such compilers don't do TBAA
and so dereferencing converted pointers typically "works". (However,
they rarely /document/ and /guarantee/ that it will work.)

Re: Paper about ISO C

<sk6jhc$k6t$1@newsreader4.netcologne.de>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21037&group=comp.arch#21037

  copy link   Newsgroups: comp.arch
Path: rocksolid2!i2pn.org!paganini.bofh.team!news.dns-netz.com!news.freedyn.net!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2001-4dd7-f01f-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de!not-for-mail
From: tkoe...@netcologne.de (Thomas Koenig)
Newsgroups: comp.arch
Subject: Re: Paper about ISO C
Date: Wed, 13 Oct 2021 12:30:36 -0000 (UTC)
Organization: news.netcologne.de
Distribution: world
Message-ID: <sk6jhc$k6t$1@newsreader4.netcologne.de>
References: <87fstdumxd.fsf@hotmail.com> <sjni60$97d$1@dont-email.me>
<afb9352d-8ba7-4521-b741-280e0206e255n@googlegroups.com>
<sjugcv$jio$1@dont-email.me>
<cb6bbb41-398f-4e2a-9a19-08bc4582b291n@googlegroups.com>
<sk437c$672$1@dont-email.me> <jwvee8qgxk0.fsf-monnier+comp.arch@gnu.org>
Injection-Date: Wed, 13 Oct 2021 12:30:36 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2001-4dd7-f01f-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de:2001:4dd7:f01f:0:7285:c2ff:fe6c:992d";
logging-data="20701"; mail-complaints-to="abuse@netcologne.de"
User-Agent: slrn/1.0.3 (Linux)
 by: Thomas Koenig - Wed, 13 Oct 2021 12:30 UTC

Stefan Monnier <monnier@iro.umontreal.ca> schrieb:

> And the problem is that as soon as you use `<` on pointers to different
> objects you run the risk of firing rockets, even though `<` is supposed
> to be a pure function returning a boolean.
>
> I'm fine with a C standard that says that which boolean is returned is
> undefined (and I'm even willing to let it be not-quite-pure and not
> always return the same value when called with the same two pointers),

I believe "nasal demons" is the more traditional way to call this :-)
> but firing rockets is a bit excessive here, don't you think?
> There should also be a "quality of implementation" note stating that on
> systems where it makes sense, `<` should be pure and obey the expect
> rules like anti-symmetry etc...

QOI belongs to the compiler, not to the standard.

There is also the restriction on the complexity, which makes

#! /bin/sh
echo "Program to complex, aborting" 1>&2

a valid C compiler according to the standard.

Re: Paper about ISO C

<sk6jqt$k6t$2@newsreader4.netcologne.de>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21038&group=comp.arch#21038

  copy link   Newsgroups: comp.arch
Path: rocksolid2!news.neodome.net!2.eu.feeder.erje.net!feeder.erje.net!news.uzoreto.com!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2001-4dd7-f01f-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de!not-for-mail
From: tkoe...@netcologne.de (Thomas Koenig)
Newsgroups: comp.arch
Subject: Re: Paper about ISO C
Date: Wed, 13 Oct 2021 12:35:41 -0000 (UTC)
Organization: news.netcologne.de
Distribution: world
Message-ID: <sk6jqt$k6t$2@newsreader4.netcologne.de>
References: <87fstdumxd.fsf@hotmail.com> <sjni60$97d$1@dont-email.me>
<afb9352d-8ba7-4521-b741-280e0206e255n@googlegroups.com>
<sjugcv$jio$1@dont-email.me>
<cb6bbb41-398f-4e2a-9a19-08bc4582b291n@googlegroups.com>
<sk437c$672$1@dont-email.me> <jwvee8qgxk0.fsf-monnier+comp.arch@gnu.org>
<86v922nspo.fsf@linuxsc.com>
Injection-Date: Wed, 13 Oct 2021 12:35:41 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2001-4dd7-f01f-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de:2001:4dd7:f01f:0:7285:c2ff:fe6c:992d";
logging-data="20701"; mail-complaints-to="abuse@netcologne.de"
User-Agent: slrn/1.0.3 (Linux)
 by: Thomas Koenig - Wed, 13 Oct 2021 12:35 UTC

Tim Rentsch <tr.17687@z991.linuxsc.com> schrieb:

> AFAIAA none of flags used in compiling programs like the Linux
> kernel render the implementation non-conforming, and if the
> implementation is conforming then by definition the language
> being compiled is C.

One of the weaker points of the C standard.

I can with some justification claim that gfortran is a conforming
C implementation. Let's test:

$ cat hello.c
#include <stdio.h>

int main()
{ printf ("Hello, world!\n");
return 0;
} $ gfortran hello.c
$ ./a.out
Hello, world!

Yet, gfortran also compiles this:

$ cat hello.f
PROGRAMME MAIN
WRITE (*,1000)
1000 FORMAT (11HHELLO WORLD)
END
$ gfortran hello.f
$ ./a.out
HELLO WORLD
$

So, is the program hello.f C?

Re: Paper about ISO C

<sk6jvj$k6t$3@newsreader4.netcologne.de>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21039&group=comp.arch#21039

  copy link   Newsgroups: comp.arch
Path: rocksolid2!i2pn.org!paganini.bofh.team!news.dns-netz.com!news.freedyn.net!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2001-4dd7-f01f-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de!not-for-mail
From: tkoe...@netcologne.de (Thomas Koenig)
Newsgroups: comp.arch
Subject: Re: Paper about ISO C
Date: Wed, 13 Oct 2021 12:38:11 -0000 (UTC)
Organization: news.netcologne.de
Distribution: world
Message-ID: <sk6jvj$k6t$3@newsreader4.netcologne.de>
References: <87fstdumxd.fsf@hotmail.com> <sjni60$97d$1@dont-email.me>
<afb9352d-8ba7-4521-b741-280e0206e255n@googlegroups.com>
<sjugcv$jio$1@dont-email.me>
<cb6bbb41-398f-4e2a-9a19-08bc4582b291n@googlegroups.com>
<sk437c$672$1@dont-email.me>
<0d336dad-0078-4783-9d13-635d1d061704n@googlegroups.com>
<f94c96c4-af61-4a60-b182-db213690c340n@googlegroups.com>
<C7q9J.45174$tA2.43354@fx02.iad> <sk5cp7$26i$1@dont-email.me>
<apr9J.205378$Kv2.138883@fx47.iad> <sk5ngm$og9$1@dont-email.me>
<_ox9J.87698$ol1.33401@fx42.iad>
Injection-Date: Wed, 13 Oct 2021 12:38:11 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2001-4dd7-f01f-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de:2001:4dd7:f01f:0:7285:c2ff:fe6c:992d";
logging-data="20701"; mail-complaints-to="abuse@netcologne.de"
User-Agent: slrn/1.0.3 (Linux)
 by: Thomas Koenig - Wed, 13 Oct 2021 12:38 UTC

Branimir Maksimovic <branimir.maksimovic@icloud.com> schrieb:
> On 2021-10-13, Stephen Fuld <sfuld@alumni.cmu.edu.invalid> wrote:
>> On 10/12/2021 7:21 PM, Branimir Maksimovic wrote:
>>> On 2021-10-13, Stephen Fuld <sfuld@alumni.cmu.edu.invalid> wrote:
>>>> To me, the big advantage of Ada (it's a woman's name, not an acronym -
>>>> hence not all caps) is that its syntax makes it easier to write correct
>>>> programs, and harder, though of course not impossible, to make the kind
>>>> of errors this thread has been talking about.
>>>>
>>>> But others here are far more qualified to discuss this than I am.
>>>>
>>> OK, I'll try it, it, but on macOS I can't have compiler, let alone
>>> IDE support :P
>>
>> Again, others are more qualified than I am to comment, but it appears
>> that GNAT (GNU Ada compiler) is available on MacOS.
>>
>
> Yes, but is only for x86, does not builds for my M1.
> Interrestingly except gforth (without extensions)
> there is no forth for M1, as well.

AFAIK, there will be M1 support in gcc 12. Interestingly enough,
it was the lack of a Fortran compiler which mostly drove demand
for this port.

Re: Paper about ISO C

<sk6kgl$k6t$4@newsreader4.netcologne.de>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21040&group=comp.arch#21040

  copy link   Newsgroups: comp.arch
Path: rocksolid2!news.neodome.net!feeder5.feed.usenet.farm!feeder1.feed.usenet.farm!feed.usenet.farm!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2001-4dd7-f01f-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de!not-for-mail
From: tkoe...@netcologne.de (Thomas Koenig)
Newsgroups: comp.arch
Subject: Re: Paper about ISO C
Date: Wed, 13 Oct 2021 12:47:17 -0000 (UTC)
Organization: news.netcologne.de
Distribution: world
Message-ID: <sk6kgl$k6t$4@newsreader4.netcologne.de>
References: <87fstdumxd.fsf@hotmail.com> <sjni60$97d$1@dont-email.me>
<afb9352d-8ba7-4521-b741-280e0206e255n@googlegroups.com>
<sjugcv$jio$1@dont-email.me>
<cb6bbb41-398f-4e2a-9a19-08bc4582b291n@googlegroups.com>
<sk261q$me9$1@newsreader4.netcologne.de> <86zgrentbk.fsf@linuxsc.com>
Injection-Date: Wed, 13 Oct 2021 12:47:17 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2001-4dd7-f01f-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de:2001:4dd7:f01f:0:7285:c2ff:fe6c:992d";
logging-data="20701"; mail-complaints-to="abuse@netcologne.de"
User-Agent: slrn/1.0.3 (Linux)
 by: Thomas Koenig - Wed, 13 Oct 2021 12:47 UTC

Tim Rentsch <tr.17687@z991.linuxsc.com> schrieb:
> Thomas Koenig <tkoenig@netcologne.de> writes:
>
>> Victor Yodaiken <victor.yodaiken@gmail.com> schrieb:
>>
>>> Can you cast a pointer to a different type? Sure.
>>>
>>> Can you dereference it?
>>
>> No.
>
> This statement is wrong, or at best much overstated.

You are right there.

However, modern compiler technology offers an alternative:
memcpy is now very well optimized, and what appears to
be moving data around is in fact optimized away.

AFAIK, this is then implementation-defined behavior, not
undefined behavior.

Re: Paper about ISO C

<sk6kjs$kfj$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21041&group=comp.arch#21041

  copy link   Newsgroups: comp.arch
Path: rocksolid2!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.arch
Subject: Re: Paper about ISO C
Date: Wed, 13 Oct 2021 14:48:59 +0200
Organization: A noiseless patient Spider
Lines: 62
Message-ID: <sk6kjs$kfj$1@dont-email.me>
References: <87fstdumxd.fsf@hotmail.com> <sjni60$97d$1@dont-email.me>
<afb9352d-8ba7-4521-b741-280e0206e255n@googlegroups.com>
<sjugcv$jio$1@dont-email.me>
<cb6bbb41-398f-4e2a-9a19-08bc4582b291n@googlegroups.com>
<sk437c$672$1@dont-email.me> <jwvee8qgxk0.fsf-monnier+comp.arch@gnu.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 13 Oct 2021 12:49:00 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="36092c05819f63e8c184d9134533a877";
logging-data="20979"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18F2dSGVXC2TJ0maOtrMumKHW4aCrHxs7o="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:TQC1eqzMt0gthbNtYBBkkkRwAIE=
In-Reply-To: <jwvee8qgxk0.fsf-monnier+comp.arch@gnu.org>
Content-Language: en-GB
 by: David Brown - Wed, 13 Oct 2021 12:48 UTC

On 12/10/2021 16:02, Stefan Monnier wrote:
>> Eh, no. If that was the point of the article, it's wrong. Plain and
>> simple. This is easily demonstrated by the fact that pretty much all
>> modern operating systems /are/ written almost entirely in C.
>
> Well, maybe a language closely related to C, but not really C.
> That's why they need special flags passed to the compiler before the
> result is usable.
>
>> You can compare them for equality (if they are of compatible types, or
>> one is a null pointer), not for relation, unless they are part of the
>> same object. This makes sense, because C does not require a single
>> linear address space - and there are real targets (with real OS's,
>> written in C) that have independent address spaces.
>
> And the problem is that as soon as you use `<` on pointers to different
> objects you run the risk of firing rockets, even though `<` is supposed
> to be a pure function returning a boolean.

"<" is a pure function, but not a /complete/ function in C. That is,
there are inputs for which it guarantees a defined output (defined by
the C standards and/or an implementation), and for anything else, it is
garbage in, garbage out. Sometimes the garbage out is the explosive kind.

This concept has been understood since the beginning of programmable
computers:

"""
On two occasions I have been asked [by members of Parliament], 'Pray,
Mr. Babbage, if you put into the machine wrong figures, will the right
answers come out?' I am not able rightly to apprehend the kind of
confusion of ideas that could provoke such a question.
"""

>
> I'm fine with a C standard that says that which boolean is returned is
> undefined (and I'm even willing to let it be not-quite-pure and not
> always return the same value when called with the same two pointers),
> but firing rockets is a bit excessive here, don't you think?

I'm not really very keen on this "give me an answer, I don't care if it
is right" idea. I am much happier, when possible, to get "I refuse to
compile this program because you've made a mistake".

Compilers don't usually fire rockets - contrary to what some people seem
to imagine, they don't go out of their way to cause trouble when someone
makes a mistake in their code. They aim to make the most efficient code
on the assumption that you give valid inputs to the various functions,
operators, etc., of the language, and that you don't care what happens
if the inputs are invalid. Very often that gives you the "naïve"
results even on invalid inputs, but sometimes it can give unexpected
effects.

> There should also be a "quality of implementation" note stating that on
> systems where it makes sense, `<` should be pure and obey the expect
> rules like anti-symmetry etc...
>

Why? When is it useful? About the only case I can think of is when
implementing memmove(), and that is part of the system library and can
use any implementation-specific trick or extension it wants.

Re: Paper about ISO C

<sk6kqt$or0$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21042&group=comp.arch#21042

  copy link   Newsgroups: comp.arch
Path: rocksolid2!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.arch
Subject: Re: Paper about ISO C
Date: Wed, 13 Oct 2021 14:52:44 +0200
Organization: A noiseless patient Spider
Lines: 14
Message-ID: <sk6kqt$or0$1@dont-email.me>
References: <87fstdumxd.fsf@hotmail.com> <sjni60$97d$1@dont-email.me>
<afb9352d-8ba7-4521-b741-280e0206e255n@googlegroups.com>
<sjugcv$jio$1@dont-email.me>
<cb6bbb41-398f-4e2a-9a19-08bc4582b291n@googlegroups.com>
<sk437c$672$1@dont-email.me> <jwvee8qgxk0.fsf-monnier+comp.arch@gnu.org>
<86v922nspo.fsf@linuxsc.com> <jwva6je9ouo.fsf-monnier+comp.arch@gnu.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 13 Oct 2021 12:52:45 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="36092c05819f63e8c184d9134533a877";
logging-data="25440"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX193GNoWWKrHZEmtbm4ZeviVC44zIWEQ4WU="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:2iAU16x8PqRVYwEPGJ6p7Thq4a4=
In-Reply-To: <jwva6je9ouo.fsf-monnier+comp.arch@gnu.org>
Content-Language: en-GB
 by: David Brown - Wed, 13 Oct 2021 12:52 UTC

On 12/10/2021 18:42, Stefan Monnier wrote:
> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> (Btw, if you choose to respond to this posting and quote some of
>> what I have said but do not give an attributing citation, then
>> you're an asshole.)
>
> Not sure what I was thinking when I wrote that, sorry,
>

I would not have put it quite like Tim, but I suspect a lot of people
here (including me) would prefer that you followed standard Usenet
posting, quoting and attributing conventions. The conventions were
developed for good reasons.

Re: Paper about ISO C

<sk6l8h$1hc$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21043&group=comp.arch#21043

  copy link   Newsgroups: comp.arch
Path: rocksolid2!i2pn2.org!i2pn.org!aioe.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.arch
Subject: Re: Paper about ISO C
Date: Wed, 13 Oct 2021 15:00:01 +0200
Organization: A noiseless patient Spider
Lines: 52
Message-ID: <sk6l8h$1hc$1@dont-email.me>
References: <87fstdumxd.fsf@hotmail.com> <sjni60$97d$1@dont-email.me>
<afb9352d-8ba7-4521-b741-280e0206e255n@googlegroups.com>
<sjugcv$jio$1@dont-email.me>
<cb6bbb41-398f-4e2a-9a19-08bc4582b291n@googlegroups.com>
<sk437c$672$1@dont-email.me>
<05cec163-5093-4c96-a8f3-393890d820abn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 13 Oct 2021 13:00:01 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="36092c05819f63e8c184d9134533a877";
logging-data="1580"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/JUnCWH0UM+nRrNFFlx9o6CFW5fcL/tqM="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:pf9i+yeYX5pgb/MdiQ3drW0cG84=
In-Reply-To: <05cec163-5093-4c96-a8f3-393890d820abn@googlegroups.com>
Content-Language: en-GB
 by: David Brown - Wed, 13 Oct 2021 13:00 UTC

On 12/10/2021 16:48, MitchAlsup wrote:
> On Tuesday, October 12, 2021 at 8:39:58 AM UTC-5, David Brown wrote:
>> On 11/10/2021 20:04, Victor Yodaiken wrote:
>>> On Sunday, October 10, 2021 at 5:48:01 AM UTC-5, David Brown wrote:
>>>
>>>> The idea of C being a "high-level assembler" is right there in
>>>> section 1, "Introduction".
>>>>
>>>
>>> There is something about high level assembler in the introduction -
>>> it is a QUOTE from the C Rationale. If you honestly interpreted it as
>>> a claim that C was supposed to be a complete replacement for all
>>> assembly languages, then maybe you need new glasses.
>>>
>> I know that what you wrote was a quotation from a C Rationale document.
>> Clearly I did not interpret it as you suggest - you cannot complain
>> that I have exaggerated your writings and then do /exactly/ the same
>> thing yourself! The difference, however, is that I was doing so as a
>> criticism of your argument - you appear to be doing so as some kind of
>> revenge.
>>
>>
>> But do I take it that you agree with me that C is not a "high-level
>> assembly"?
>>
>> A vital characteristic of assembly, as a programming language, is that
>> the generated code does /exactly/ what you order, no more and no less,
>> without re-ordering, optimising, removing or adding anything. C is not
>> a language remotely like that, never has been, never will be.
> <
> You have obviously never used a good macro assembler............

Macro assemblers do not re-order, optimise, add or remove code. When
you "call" a macro, you get exactly the code the macro specifies, just
as if you had written it by hand. The same applies if you use loops,
abbreviations, etc.

I don't write much assembly these days - a few lines of inline assembly
is usually sufficient for my needs. But I used to do a lot of assembly
programming, mostly on small microcontrollers, and made a lot of use of
macros.

However, there /are/ some assemblers that will do a little optimisation
and re-arrangement, so I was somewhat imprecise. It's not uncommon for
processors to have relative branch instructions of different lengths,
and some toolchains will optimise these - you use a generic form in the
assembly, and when linking the smallest form is used. Some are even
smarter in handling conditional branches over longer distances. And for
some targets, such as MIPS, assemblers can do delay slot re-ordering
optimisations.

Re: Paper about ISO C

<jwv8ryxozc6.fsf-monnier+comp.arch@gnu.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21044&group=comp.arch#21044

  copy link   Newsgroups: comp.arch
Path: rocksolid2!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: monn...@iro.umontreal.ca (Stefan Monnier)
Newsgroups: comp.arch
Subject: Re: Paper about ISO C
Date: Wed, 13 Oct 2021 09:00:36 -0400
Organization: A noiseless patient Spider
Lines: 9
Message-ID: <jwv8ryxozc6.fsf-monnier+comp.arch@gnu.org>
References: <87fstdumxd.fsf@hotmail.com> <sjni60$97d$1@dont-email.me>
<afb9352d-8ba7-4521-b741-280e0206e255n@googlegroups.com>
<sjugcv$jio$1@dont-email.me>
<cb6bbb41-398f-4e2a-9a19-08bc4582b291n@googlegroups.com>
<sk437c$672$1@dont-email.me>
<jwvee8qgxk0.fsf-monnier+comp.arch@gnu.org>
<sk6kjs$kfj$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: reader02.eternal-september.org; posting-host="5bf4fbe8e3d5a8bd3487f44331d96a25";
logging-data="7758"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18xqD0EH8r1P/CcIRlY2tzk"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
Cancel-Lock: sha1:eExxZB5mBIxppXImhNQA4gFDiw0=
sha1:RkrAo/cQRSGw38e66t3KnkEiT20=
 by: Stefan Monnier - Wed, 13 Oct 2021 13:00 UTC

>> There should also be a "quality of implementation" note stating that on
>> systems where it makes sense, `<` should be pure and obey the expect
>> rules like anti-symmetry etc...
> Why? When is it useful?

It's quite handy to store objects in a binary tree.

Stefan

Re: Paper about ISO C

<87lf2xhy9b.fsf@hotmail.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21045&group=comp.arch#21045

  copy link   Newsgroups: comp.arch
Path: rocksolid2!i2pn.org!aioe.org!xcrumNapWYKcczN4Ruh1Kw.user.46.165.242.75.POSTED!not-for-mail
From: cla...@hotmail.com
Newsgroups: comp.arch
Subject: Re: Paper about ISO C
Date: Wed, 13 Oct 2021 16:04:16 +0300
Organization: Aioe.org NNTP Server
Message-ID: <87lf2xhy9b.fsf@hotmail.com>
References: <87fstdumxd.fsf@hotmail.com> <sjni60$97d$1@dont-email.me>
<afb9352d-8ba7-4521-b741-280e0206e255n@googlegroups.com>
<sjugcv$jio$1@dont-email.me>
<cb6bbb41-398f-4e2a-9a19-08bc4582b291n@googlegroups.com>
<sk437c$672$1@dont-email.me>
<jwvee8qgxk0.fsf-monnier+comp.arch@gnu.org>
<86v922nspo.fsf@linuxsc.com> <sk6jqt$k6t$2@newsreader4.netcologne.de>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: gioia.aioe.org; logging-data="4581"; posting-host="xcrumNapWYKcczN4Ruh1Kw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
Cancel-Lock: sha1:UZ1AoMEEzIcJykeH5ZlLR0uJEdo=
X-Notice: Filtered by postfilter v. 0.9.2
 by: cla...@hotmail.com - Wed, 13 Oct 2021 13:04 UTC

Thomas Koenig <tkoenig@netcologne.de> writes:

> Tim Rentsch <tr.17687@z991.linuxsc.com> schrieb:
>
>> AFAIAA none of flags used in compiling programs like the Linux
[..]

>
> So, is the program hello.f C?

https://www.ioccc.org/1986/applin/hint.html

Re: macro assemblers, was Paper about ISO C

<sk6o4f$o7r$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21047&group=comp.arch#21047

  copy link   Newsgroups: comp.arch
Path: rocksolid2!news.neodome.net!news.mixmin.net!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.arch
Subject: Re: macro assemblers, was Paper about ISO C
Date: Wed, 13 Oct 2021 15:49:03 +0200
Organization: A noiseless patient Spider
Lines: 32
Message-ID: <sk6o4f$o7r$1@dont-email.me>
References: <87fstdumxd.fsf@hotmail.com> <sk437c$672$1@dont-email.me>
<05cec163-5093-4c96-a8f3-393890d820abn@googlegroups.com>
<zKm9J.48984$6u6.15617@fx03.iad> <sk53fa$1tig$1@gal.iecc.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 13 Oct 2021 13:49:04 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="36092c05819f63e8c184d9134533a877";
logging-data="24827"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Z9YLBQ0Kc3thlprTEDdO5ToC0YGn23gc="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:ddYhdhJnSvKVW/k8bRhAvpnNAfI=
In-Reply-To: <sk53fa$1tig$1@gal.iecc.com>
Content-Language: en-GB
 by: David Brown - Wed, 13 Oct 2021 13:49 UTC

On 13/10/2021 00:50, John Levine wrote:
> According to Branimir Maksimovic <branimir.maksimovic@icloud.com>:
>>>> A vital characteristic of assembly, as a programming language, is that
>>>> the generated code does /exactly/ what you order, no more and no less,
>>>> without re-ordering, optimising, removing or adding anything. C is not
>>>> a language remotely like that, never has been, never will be.
>>> <
>>> You have obviously never used a good macro assembler............
>>
>> Macros in assembler are different, you just define macro, that's all :P
>> No surprises...
>
> I'm not getting the impression you've not done a lot of programming in assemblers
> with strong macro languages. Someone else mentioned PDP-10 MACRO, but take a
> look at HLASM (the oddly named High Level Assembler) for IBM mainframes. They
> have macros that with one parameter generate a block of arguments to a call, with
> a different parameter generate the call that uses the arguments, and by default
> generates both.
>
> https://www-01.ibm.com/servers/resourcelink/svc00100.nsf/pages/zOSV2R3sc264940/$file/asmr1023.pdf
>

This kind of thing is stretching the definition of what /I/ would call a
"macro". I think "High Level Assembler" is probably more accurate.

However, while this kind of thing makes it /hard/ to determine exactly
what machine code you get in the end, it is still fully determined by
the source code alone (including the definitions of the macros as part
of the source). You don't choose different optimisation levels, and you
don't have different results generated by different tools or different
versions. Is that not correct?

Re: Paper about ISO C

<sk6ok2$22b$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=21048&group=comp.arch#21048

  copy link   Newsgroups: comp.arch
Path: rocksolid2!news.neodome.net!news.mixmin.net!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.arch
Subject: Re: Paper about ISO C
Date: Wed, 13 Oct 2021 15:57:22 +0200
Organization: A noiseless patient Spider
Lines: 34
Message-ID: <sk6ok2$22b$1@dont-email.me>
References: <87fstdumxd.fsf@hotmail.com> <sjni60$97d$1@dont-email.me>
<afb9352d-8ba7-4521-b741-280e0206e255n@googlegroups.com>
<sjugcv$jio$1@dont-email.me>
<cb6bbb41-398f-4e2a-9a19-08bc4582b291n@googlegroups.com>
<sk437c$672$1@dont-email.me>
<0d336dad-0078-4783-9d13-635d1d061704n@googlegroups.com>
<f94c96c4-af61-4a60-b182-db213690c340n@googlegroups.com>
<C7q9J.45174$tA2.43354@fx02.iad> <sk5cp7$26i$1@dont-email.me>
<apr9J.205378$Kv2.138883@fx47.iad> <sk5ngm$og9$1@dont-email.me>
<_ox9J.87698$ol1.33401@fx42.iad>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 13 Oct 2021 13:57:22 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="36092c05819f63e8c184d9134533a877";
logging-data="2123"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18bxSquScFDLaZ3LAoL/vGRtEjvEZMQTDE="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:LyrLSdh7xSJfg0xBbIdCQOWogx8=
In-Reply-To: <_ox9J.87698$ol1.33401@fx42.iad>
Content-Language: en-GB
 by: David Brown - Wed, 13 Oct 2021 13:57 UTC

On 13/10/2021 11:11, Branimir Maksimovic wrote:
> On 2021-10-13, Stephen Fuld <sfuld@alumni.cmu.edu.invalid> wrote:
>> On 10/12/2021 7:21 PM, Branimir Maksimovic wrote:
>>> On 2021-10-13, Stephen Fuld <sfuld@alumni.cmu.edu.invalid> wrote:
>>>> To me, the big advantage of Ada (it's a woman's name, not an acronym -
>>>> hence not all caps) is that its syntax makes it easier to write correct
>>>> programs, and harder, though of course not impossible, to make the kind
>>>> of errors this thread has been talking about.
>>>>
>>>> But others here are far more qualified to discuss this than I am.
>>>>
>>> OK, I'll try it, it, but on macOS I can't have compiler, let alone
>>> IDE support :P
>>
>> Again, others are more qualified than I am to comment, but it appears
>> that GNAT (GNU Ada compiler) is available on MacOS.
>>
>
> Yes, but is only for x86, does not builds for my M1.
> Interrestingly except gforth (without extensions)
> there is no forth for M1, as well.

I think that is mainly due to Apple's determination to stop people using
Apple devices for any development other than Apple applications using
Apple's tools and paying Apple's fees (for whatever they can get away
with). I can appreciate that an M1 machine gives you a lot of
processing power in a small and low-power device, but they seem to be
competing with Windows in their battle to make programmers' and small
developers' lives as inconvenient as possible.

Maybe they'll make an Ada front-end to clang, and call it "gnat" to
confuse their users like they did with their C compiler.

Pages:123456789101112131415161718192021222324252627282930313233
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor