Date: Thu, 5 Sep 2024 13:21:51 -0700 From: Bakul Shah <bakul@iitbombay.org> To: Tomek CEDRO <tomek@cedro.info> Cc: Alan Somers <asomers@freebsd.org>, FreeBSD Hackers <freebsd-hackers@freebsd.org> Subject: Re: The Case for Rust (in any system) Message-ID: <4634B979-4EB9-41AE-A9FE-14ACC9A4324A@iitbombay.org> In-Reply-To: <CAFYkXj=4Un-P-heT=GV%2B-B2gH0CX6Nq9KdM6ELwHED4qxiJVkQ@mail.gmail.com> References: <CAOtMX2iCNX5OkdeghnbmcMrO0UYWwm4zfxFSZGznOznu%2Bmh5rA@mail.gmail.com> <CAFYkXj=4Un-P-heT=GV%2B-B2gH0CX6Nq9KdM6ELwHED4qxiJVkQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sep 5, 2024, at 11:34=E2=80=AFAM, Tomek CEDRO <tomek@cedro.info> = wrote: >=20 > wow! this is undeniable argument even for someone who opposes the idea = (like me) :-) Not really! Showing that a present system has issues does not imply in any way that a proposed new system (or major change) will fix the said problems! This is a common fallacy that people fall for. Many people. Many many people :-) Nor does it say anything about the cost & disruption of making such a change, or how long will it take for the change to realize the promise. I did a quick check to see how code size has increased (just focusing on the kernel): Snapshot LoC R2.1.0: 464163 R3.1.0: 1036969 R4.1.0: 1364739 R5.1.0: 2183960 R6.1.0: 2718891 R7.1.0: 3396813 R8.1.0: 4029778 R9.1.0: 5436430 R10.1.0: 6268965 R11.1.0: 7902854 R12.1.0: 8216741 R13.1.0: 8900711 R14.1.0: 9769864 current: 9899932 (as of this morning) On average about 775K lines are added per release, with a couple of increases over a million. So even if *all* the new code that gets added is in Rust and is totally bugfree, it will take a further 12-13 years before the bugprone C code goes down to 50%. [By then Rust may not longer be a hot language but that is for another thread (or async/await)] The point being, even if you add Rust, there is a long term need to "do better" in the C code. > maybe this is time to simply crate a new Open-Source OS from scratch = written in Rust? >=20 > manual rewrite of existing code seems too complex from a technical = standpoint. sometimes it's just easier to start from scratch? This would be about as quixotic as DARPA's TRACTOR program (TRanslate All C code TO Rust)! No such AI exists today. Any auto translated code needs to be hand checked. I suspect you're better off teaching the AI about the common code bugs in C and how to fix them or at least detect them.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4634B979-4EB9-41AE-A9FE-14ACC9A4324A>