From nobody Sun Jan 21 22:50:13 2024 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TJ7q85Jrvz57vdg for ; Sun, 21 Jan 2024 22:50:28 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TJ7q82DRWz4NZV for ; Sun, 21 Jan 2024 22:50:28 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-40e7065b7bdso31775115e9.3 for ; Sun, 21 Jan 2024 14:50:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1705877426; x=1706482226; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=8sPis3FwR+1FMb9tHVDRf+/LhyJ/42BCpnft4jFoElo=; b=XBcVvnchFV9C9SyHR5YdXKLoY02frKIhuNj4eyPZUHNF6gt+jZj1WVyB0mXLF/CquW ODJQDXfEGwEUDpEqFGRxqskLhOCWw8gXU97V2GQWJ6OghsL2XVSLhnVbgWc8lpI9QalE yO4S87rPmHyOLOzIw5im8HCTuIY+P47Eq8R5GzUmCVSXBfClDPuUEkp7aP4JEza8cb/O ijUmhyRWPlOwThcohaSLH6MGsDkimld6M7tS7o4cD/1Tpp2wc3iIjwYO3V2TEQUwfVsK /Mqlx7vobIjtY7iC3zp6VK8lfeRwMUPaXx214lyKZ6UumTVSVe/T4LNu/LERiukHN6Ju VtWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705877426; x=1706482226; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=8sPis3FwR+1FMb9tHVDRf+/LhyJ/42BCpnft4jFoElo=; b=wYXD/yvt3ELZthhdGXI+44bYcQykiEY1BA/DK/t/TGRC3RwRnaSmBw1oJhDSS/UhK7 w4fx0gUDS0mljwHWH9RWN6sdP874RlE28+nr2o0h7J6pKNbH44tqisO637EEVqYnnWj/ PrsiG1Mn2+dzkaFypnF0yuytFhVhlWDQlCg1z/KfZVFjtOVR9f+ByYrsYNMERCehs62I 4dn+9vMWvHQGEiknZukAAg5M/4uAm1KX0Uyrvaad7sAKVU2AsdFArhFQuTSgonhFU3eR Vf0yXnchh+boQBdZzFD4JERDZYnZcp+2PGhETVDHlSekgBC+fSa/F8qbkpuPwsA1Z0ji pcEQ== X-Gm-Message-State: AOJu0YwqsuwlS2OPfrVCGD6SqO8k7X7Bz0aynbOCjqTd+SsA9cNaVNFi qckPJt90JChteNSo1JaN6xRmbnBmrVJWIp0I7sCDVuj/wyPmCzel1rwAMrkwd7lCDPK4pvSIBZ2 OWNpfaI4wnfigoR6dLmYtmr4MqbVy40NRStnFpA== X-Google-Smtp-Source: AGHT+IGDrS0n8KxjMd21Xke6MOWnTO9j4OdccpKaP//PjbOZs4wA6daSy938+pkSDvelfJVB5QW2IOwzhCNNJAoVGr0= X-Received: by 2002:a05:600c:1911:b0:40e:8e2b:3ce8 with SMTP id j17-20020a05600c191100b0040e8e2b3ce8mr1151749wmq.51.1705877425366; Sun, 21 Jan 2024 14:50:25 -0800 (PST) List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 References: <1673801705774097@mail.yandex.ru> <202401210751.40L7pWEF011188@critter.freebsd.dk> <40bc1694-ee00-431b-866e-396e9d5c07a2@m5p.com> <202401211626.40LGQDim013134@critter.freebsd.dk> <4EF67303-A995-457A-990F-A4972C23EA80@FreeBSD.org> <202401212013.40LKD1a7095506@critter.freebsd.dk> In-Reply-To: From: Warner Losh Date: Sun, 21 Jan 2024 15:50:13 -0700 Message-ID: Subject: Re: The Case for Rust (in the base system) To: Alan Somers Cc: Poul-Henning Kamp , Kristof Provost , George Mitchell , FreeBSD Hackers Content-Type: multipart/alternative; boundary="000000000000f83ac7060f7c8994" X-Rspamd-Queue-Id: 4TJ7q82DRWz4NZV X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_RCPT(0.00)[freebsd]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] --000000000000f83ac7060f7c8994 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Jan 21, 2024, 3:20=E2=80=AFPM Alan Somers wro= te: > On Sun, Jan 21, 2024 at 2:32=E2=80=AFPM Warner Losh wrot= e: > > > > > > > > On Sun, Jan 21, 2024, 2:04=E2=80=AFPM Alan Somers = wrote: > >> > >> On Sun, Jan 21, 2024 at 1:13=E2=80=AFPM Poul-Henning Kamp > 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 > precisely > >> > 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 langua= ge > > should the need arise. I had thought fsx and fsx-rs would provide a nic= e > > compare and contrast study if they gave us approximately the same thing= s. > > > > 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 propos= ed > > as well. > > > > Warner > > The fsx rewrite is already complete and it's in ports. I don't see > any benefit to bringing it back to src other than to test your > external toolchain proposal. Do you still want to do it? > I'm happy to assist anybody that wants to run the experiment. But I'd never planned on driving it. That's for people advocating for the change. If someone wants to build rust things as a demonstration project I'll help with the build system aspects. Warner > --000000000000f83ac7060f7c8994 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Sun, Jan 21, 2024, 3:20=E2=80=AFPM Alan Somers <= asomers@freebsd.org> wrote:
On Sun, Jan 21, 2024 at 2:32=E2=80= =AFPM Warner Losh <imp@bsdimp.com> wrote:
>
>
>
> On Sun, Jan 21, 2024, 2:04=E2=80=AFPM Alan Somers <asomers@freebsd= .org> wrote:
>>
>> On Sun, Jan 21, 2024 at 1:13=E2=80=AFPM Poul-Henning Kamp <phk@= phk.freebsd.dk> wrote:
>> >
>> > --------
>> > Warner Losh writes:
>> >
>> > > Even if all the cool kids are doing it, it doesn't m= ean 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 cvs= up was precisely
>> > 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&= #39;s gift to
>> > programmers, we can reimplement the tool which interprets the= m in
>> > some hot-language-du-jour, without having to rewrite all the = actual
>> > test-cases.
>>
>> I think imp and phk are after different things.=C2=A0 phk wants a = tool
>> written in Rust that be installed from ports and interpret test ca= ses
>> defined in src.=C2=A0 That's similar to the fsx tests, which I= 'm planning
>> to add to src once the package builder catches up.=C2=A0 But imp w= ants test
>> cases that are actually written in Rust and which live in src, to = test
>> his external toolchain proposal.=C2=A0 That's very different.= =C2=A0 It's an
>> unusual requirement.=C2=A0 Off hand I can't think of many subs= ystems that
>> are a good match for a test suite like that.=C2=A0 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 thing= s
> 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 ma= tter to
> me beyond (a) it's used to test the system or some aspect of the s= ystem
> and (b) it's written in rust and compiled when we generally compil= e 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<= br> > would give us some benefit.
>
> But to be honest, I'm agnostic about how the 'build rust thing= s 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&= #39;s
> something that could be redone, in all likelihood, in some other langu= age
> should the need arise. I had thought fsx and fsx-rs would provide a ni= ce
> compare and contrast study if they gave us approximately the same thin= gs.
>
> And besides, it's just my opinion of what project would be both us= eful and produce
> good data about using Rust in the base. I'm sure others could be p= roposed
> as well.
>
> Warner

The fsx rewrite is already complete and it's in ports.=C2=A0 I don'= t see
any benefit to bringing it back to src other than to test your
external toolchain proposal.=C2=A0 Do you still want to do it?

I'm happy= to assist anybody that wants to run the experiment. But I'd never plan= ned on driving it. That's for people advocating for the change. If some= one wants to build rust things as a demonstration project I'll help wit= h the build system aspects.

Warner
--000000000000f83ac7060f7c8994--