From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 References: In-Reply-To: From: Tyga Date: Wed, 5 Sep 2018 09:30:22 +1000 Message-ID: To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary="0000000000005deb3d0575140bbd" Subject: Re: [9fans] Is Plan 9 C "Less Dangerous?" Topicbox-Message-UUID: e0e89b4a-ead9-11e9-9d60-3106f5b1d025 --0000000000005deb3d0575140bbd Content-Type: text/plain; charset="UTF-8" Ha HA ! Good one ! I believe that the core of the problem with the C language is that is based upon abstracting the PDP-11 instruction set. CPUs, such as Intel/AMD x64 are vastly more complex so "optimising" C compilers are trying to make something simple take advantage of something far more complex. Perhaps we should call them "complexifying" compilers. Generally, model-to-model transformations (which is effectively what compilers do under the covers) are easier to define when we transform from a higher level of abstraction to a lower level of abstraction. As folks in the MBSE field explain it, trying to put a pig together from sausages. On Wed, 5 Sep 2018 at 09:20, Charles Forsyth wrote: > Plan 9 C implements C by attempting to follow the programmer's > instructions, which is surprisingly useful in systems programming. > The big fat compilers work hard to find grounds to interpret those > instructions as "undefined behaviour". > > > On Sun, 2 Sep 2018 at 17:32, Chris McGee wrote: > >> Hi All, >> >> I'm reading this article about how they are going through the giant >> heaping pile of Linux kernel code and trying to come up with safer >> practices to avoid the "dangers" of C. The prevailing wisdom appears to be >> that things should eventually be rewritten in Rust some day. >> >> https://lwn.net/SubscriberLink/763641/c9a04da2a33af0a3/ >> >> I'm curious how the Plan 9 C compiler fits into this story. I know that >> it was designed to avoid many of the pitfalls of standard C. Does it try to >> address some of these dangers or is it focused on making code more readable >> so that problems are more apparent? >> >> How does everyone feel about the Plan 9/9front kernel? Have they gone >> through hardening/testing exercises over the years? I'm curious what tools >> are available to help discover bugs. >> >> Cheers, >> Chris >> > --0000000000005deb3d0575140bbd Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Ha HA !=C2=A0 Good one !

I believe that= the core of the problem with the C language is that is based upon abstract= ing the PDP-11 instruction set.=C2=A0 CPUs, such as Intel/AMD x64 are vastl= y more complex so "optimising" C compilers are trying to make som= ething simple take advantage of something far more complex.=C2=A0 Perhaps w= e should call them "complexifying" compilers.

Generally, model-to-model transformations (which is effectively what = compilers do under the covers) are easier to define when we transform from = a higher level of abstraction to a lower level of abstraction.=C2=A0 As fol= ks in the MBSE field explain it, trying to put a pig together from sausages= .

On Wed, 5 Sep = 2018 at 09:20, Charles Forsyth <charles.forsyth@gmail.com> wrote:
Plan 9 C implements C by attempting to follow t= he programmer's instructions, which is surprisingly useful in systems p= rogramming.
The big fat compilers work hard to find grounds to interpre= t those instructions as "undefined behaviour".


On Sun, 2 Sep 2018 = at 17:32, Chris McGee <newton688@gmail.com> wrote:
Hi All,

I'm read= ing this article about how they are going through the giant heaping pile of= Linux kernel code and trying to come up with safer practices to avoid the = "dangers" of C. The prevailing wisdom appears to be that things s= hould eventually be rewritten in Rust some day.

https://lwn.net/SubscriberLink/763641/c9a04da2a33af0a3/
<= div>
I'm curious how the Plan 9 C compiler fits into this= story. I know that it was designed to avoid many of the pitfalls of standa= rd C. Does it try to address some of these dangers or is it focused on maki= ng code more readable so that problems are more apparent?

How does everyone feel about the Plan 9/9front kernel? Have they go= ne through hardening/testing exercises over the years? I'm curious what= tools are available to help discover bugs.

Cheers= ,
Chris
--0000000000005deb3d0575140bbd--