Date: Sun, 21 Jan 2024 14:31:56 -0700 From: Warner Losh <imp@bsdimp.com> To: Alan Somers <asomers@freebsd.org> Cc: Poul-Henning Kamp <phk@phk.freebsd.dk>, Kristof Provost <kp@freebsd.org>, George Mitchell <george+freebsd@m5p.com>, FreeBSD Hackers <freebsd-hackers@freebsd.org> Subject: Re: The Case for Rust (in the base system) Message-ID: <CANCZdfr9SoCJkyv6i7yVVSfaiQ=Fnw_QQniO1NpnV1F0d7G6OQ@mail.gmail.com> In-Reply-To: <CAOtMX2jvdzB4o%2BsjJ6CDk4tYngp15djZ3_hK99jn_JFnNJreNw@mail.gmail.com> References: <CAOtMX2hAUiWdGPtpaCJLPZB%2Bj2yzNw5DSjUmkwTi%2B%2BmyemehCA@mail.gmail.com> <1673801705774097@mail.yandex.ru> <CANCZdfpqWgvV_RCvVO_pvTrmajQFspW%2BQ9TM_Ok3JrXZAfeAfA@mail.gmail.com> <ef4ad207-5899-42b6-8728-bc46f1417e9e@antonovs.family> <202401210751.40L7pWEF011188@critter.freebsd.dk> <40bc1694-ee00-431b-866e-396e9d5c07a2@m5p.com> <CAOtMX2hppfdu5ypDdGpfw_QDcd1rwJEeyVfSk9ogFEm7CiV6Kw@mail.gmail.com> <202401211626.40LGQDim013134@critter.freebsd.dk> <4EF67303-A995-457A-990F-A4972C23EA80@FreeBSD.org> <CANCZdfo_MU4yo_4dvvTB%2BQf3JFT6EVEYZ4cmFHa%2BEJEjs_1crA@mail.gmail.com> <202401212013.40LKD1a7095506@critter.freebsd.dk> <CAOtMX2jvdzB4o%2BsjJ6CDk4tYngp15djZ3_hK99jn_JFnNJreNw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000df72fe060f7b71c1 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Jan 21, 2024, 2:04=E2=80=AFPM Alan Somers <asomers@freebsd.org> wro= te: > On Sun, Jan 21, 2024 at 1:13=E2=80=AFPM Poul-Henning Kamp <phk@phk.freebs= d.dk> > wrote: > > > > -------- > > Warner Losh writes: > > > > > Even if all the cool kids are doing it, it doesn't mean the cool kids > are > > > wrong. We should not reject the hypothesis on that basis alone. > > > > I certainly didn't mean to imply that, my point about cvsup was precise= ly > > that the proof of the pudding is in the eating. > > > > The only comment I want to add, is that the test-cases should be > > expressed such that, if/when we find out Rust wasn't God's gift to > > programmers, we can reimplement the tool which interprets them in > > some hot-language-du-jour, without having to rewrite all the actual > > test-cases. > > I think imp and phk are after different things. phk wants a tool > written in Rust that be installed from ports and interpret test cases > defined in src. That's similar to the fsx tests, which I'm planning > to add to src once the package builder catches up. But imp wants test > cases that are actually written in Rust and which live in src, to test > his external toolchain proposal. That's very different. It's an > unusual requirement. Off hand I can't think of many subsystems that > are a good match for a test suite like that. ypclnt(3) might be one. > Hmmm, I'd kinda thought you wanted to rewrite fsx in rust and use it as part of the kyua tests, much like io.cc simulates some of the things fsx does. I didn't care about the details of whether it was a test case, used by test cases or interprets the results. It really doesn't matter to me beyond (a) it's used to test the system or some aspect of the system and (b) it's written in rust and compiled when we generally compile the other tests and test-like things. I thought this was exactly what you were proposing as one of the things that would show how writing it in rust would give us some benefit. But to be honest, I'm agnostic about how the 'build rust things in base via external toolchain' stuff is used for. The important thing is that something non-critical be selected as a pilot project to see whether the hassles of adding this, maintaining the port, and the resulting better outcomes because it's in rust. I proposed something related to testing (the (a) above) because that's well segregated from the rest of the system and it's something that could be redone, in all likelihood, in some other language should the need arise. I had thought fsx and fsx-rs would provide a nice compare and contrast study if they gave us approximately the same things. And besides, it's just my opinion of what project would be both useful and produce good data about using Rust in the base. I'm sure others could be proposed as well. Warner > --000000000000df72fe060f7b71c1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"auto"><div><br><br><div class=3D"gmail_quote">= <div dir=3D"ltr" class=3D"gmail_attr">On Sun, Jan 21, 2024, 2:04=E2=80=AFPM= Alan Somers <<a href=3D"mailto:asomers@freebsd.org" target=3D"_blank">a= somers@freebsd.org</a>> wrote:<br></div><blockquote class=3D"gmail_quote= " style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">O= n Sun, Jan 21, 2024 at 1:13=E2=80=AFPM Poul-Henning Kamp <<a href=3D"mai= lto:phk@phk.freebsd.dk" rel=3D"noreferrer" target=3D"_blank">phk@phk.freebs= d.dk</a>> wrote:<br> ><br> > --------<br> > Warner Losh writes:<br> ><br> > > Even if all the cool kids are doing it, it doesn't mean the c= ool kids are<br> > > wrong. We should not reject the hypothesis on that basis alone.<b= r> ><br> > I certainly didn't mean to imply that, my point about cvsup was pr= ecisely<br> > that the proof of the pudding is in the eating.<br> ><br> > The only comment I want to add, is that the test-cases should be<br> > expressed such that, if/when we find out Rust wasn't God's gif= t to<br> > programmers, we can reimplement the tool which interprets them in<br> > some hot-language-du-jour, without having to rewrite all the actual<br= > > test-cases.<br> <br> I think imp and phk are after different things.=C2=A0 phk wants a tool<br> written in Rust that be installed from ports and interpret test cases<br> defined in src.=C2=A0 That's similar to the fsx tests, which I'm pl= anning<br> to add to src once the package builder catches up.=C2=A0 But imp wants test= <br> cases that are actually written in Rust and which live in src, to test<br> his external toolchain proposal.=C2=A0 That's very different.=C2=A0 It&= #39;s an<br> unusual requirement.=C2=A0 Off hand I can't think of many subsystems th= at<br> are a good match for a test suite like that.=C2=A0 ypclnt(3) might be one.<= br></blockquote></div></div><div dir=3D"auto"><br></div><div>Hmmm, I'd = kinda thought you wanted to rewrite fsx in rust and use it</div><div>as par= t of the kyua tests, much like io.cc simulates some of the things</div><div= >fsx does. I didn't care about the details of whether it was a test cas= e,</div><div>used by test cases or interprets the results. It really doesn&= #39;t matter to</div><div>me beyond (a) it's used to test the system or= some aspect of the system</div><div>and (b) it's written in rust and c= ompiled when we generally compile the</div><div>other tests and test-like t= hings. I thought this was exactly what you were</div><div>proposing as one = of the things that would show how writing it in rust</div><div>would give u= s some benefit.</div><div><br></div><div>But to be honest, I'm agnostic= about how the 'build rust things in base</div><div>via external toolch= ain' stuff is used for. The important thing is that something</div><div= >non-critical be selected as a pilot project to see whether the hassles of<= /div><div>adding this, maintaining the port, and the resulting better outco= mes</div><div>because it's in rust. I proposed something related to tes= ting (the (a) above)</div><div>because that's well segregated from the = rest of the system and it's</div><div>something that could be redone, i= n all likelihood, in some other language</div><div>should the need arise. I= had thought fsx and fsx-rs would provide a nice</div><div>compare and cont= rast study if they gave us approximately the same things.</div><div><br></d= iv><div>And besides, it's just my opinion of what project would be both= useful and produce</div><div>good data about using Rust in the base. I'= ;m sure others could be proposed</div><div>as well.<br></div><div><br></div= ><div>Warner<br></div><div dir=3D"auto"><div class=3D"gmail_quote"><blockqu= ote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc s= olid;padding-left:1ex"> </blockquote></div></div></div> </div> --000000000000df72fe060f7b71c1--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfr9SoCJkyv6i7yVVSfaiQ=Fnw_QQniO1NpnV1F0d7G6OQ>