From nobody Sun Jan 21 21:31:56 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 4TJ64p27TSz57n3q for ; Sun, 21 Jan 2024 21:32:10 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) (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 4TJ64p0RBQz46k5 for ; Sun, 21 Jan 2024 21:32:10 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-lj1-x234.google.com with SMTP id 38308e7fff4ca-2cdeb80fdfdso26421781fa.2 for ; Sun, 21 Jan 2024 13:32:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1705872727; x=1706477527; 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=ospt07Q/btj4JubwI6mVnyoxM1rRJIWDzwjww63rUtg=; b=WNjcsmijOMR4tRtsL5HKvpzirUj0rPzzphSbvpII6GkIFAwRrmLAMKYnANILQwm+Kq vD0OYeQ8WQR8ll8CmueQi2bnOKmwUus8/wtvufFMn8Kz8i6MXaYC2tYqSKYjSaSYt9Ao 25oygHkBCZXZKw+4bjtnN7z3mK9Tkma3F5JmEubRrWSk7z6SXR2cxnzEzQNEW3R8LvZl UDQeb1TtUPreqY1/XeSjyZgDEW4XbRW1ysbXjkPp/sb/vwtEGcSNGWcCnBc7jSt7rjpb udydYwq/TRiB1U0bXwvUYtoHbGrsym4acMh1wZA89gNbJbQAO8G88qVqFJfzmCawXrQ6 hT1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705872727; x=1706477527; 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=ospt07Q/btj4JubwI6mVnyoxM1rRJIWDzwjww63rUtg=; b=Bf4ekK6sl9ninm3soKzEIK5p+xqpT3vRR2ZmyEi2JSJrrrxJCUNz3j5Fp4rwoe4opR nzxLi38E6y9eshMtqR6MNuITU/OocYNnitrBJ4usTJk3avkkII/NF7D1CGXFO9vBPTW+ EbF5can6NKAEKfEoR1hPHs1SsbDCrwyJac7GmmdmLwUPxS+FAyTnT82sXgSXxLVOJAXd jzH9G2FLEcbnVhDnm0ALg6qaVPR4UBAdUBEjSdLQwEe4FvMoyxHc2GWlNnKxotPUKVYo gfW3MSMj03/FHOdq0zKHaP+HXqnyaCEbkN4WMGe5at1dyscvJdSSxlSodaCmTlGrNR2x uIZg== X-Gm-Message-State: AOJu0YyQtsXnx9qfGXNV+BexSdOuppucAvFUVQWt1p+W3FSADZ+FSdG7 Mq8CieorXGCCCGhV3rFIKm9AtWdKtJKIPwojg6UXi9ShmqaJQ0UZkHRiB64fMYb/TMwmAarnC0x Se02NUdjFed1qft8pDpqk3444hnQeo47yiWX/ZA== X-Google-Smtp-Source: AGHT+IGoLoONsLLiO6IzrjBybtCVmTvkX4i81m3fHaDBQ45Zefaeb26Dcz4NXXCN3cgbJOdvZ1bgolD0xFTVCQr+R40= X-Received: by 2002:a2e:9942:0:b0:2cd:fbe5:667a with SMTP id r2-20020a2e9942000000b002cdfbe5667amr509579ljj.143.1705872726122; Sun, 21 Jan 2024 13:32:06 -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 14:31:56 -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="000000000000df72fe060f7b71c1" X-Rspamd-Queue-Id: 4TJ64p0RBQz46k5 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] --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 wro= te: > 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 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


=
On Sun, Jan 21, 2024, 2:04=E2=80=AFPM= Alan Somers <a= somers@freebsd.org> wrote:
O= n 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 c= ool 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 pr= ecisely
> 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 gif= t 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.=C2=A0 phk wants a tool
written in Rust that be installed from ports and interpret test cases
defined in src.=C2=A0 That's similar to the fsx tests, which I'm pl= anning
to add to src once the package builder catches up.=C2=A0 But imp wants 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&= #39;s an
unusual requirement.=C2=A0 Off hand I can't think of many subsystems th= at
are a good match for a test suite like that.=C2=A0 ypclnt(3) might be one.<= br>

Hmmm, I'd = kinda thought you wanted to rewrite fsx in rust and use it
as par= t 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 cas= e,
used by test cases or interprets the results. It really doesn&= #39;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 c= ompiled when we generally compile the
other tests and test-like t= hings. I thought this was exactly what you were
proposing as one = of the things that would show how writing it in rust
would give u= s some benefit.

But to be honest, I'm agnostic= about how the 'build rust things in base
via external toolch= ain' stuff is used for. The important thing is that something
non-critical be selected as a pilot project to see whether the hassles of<= /div>
adding this, maintaining the port, and the resulting better outco= mes
because it's in rust. I proposed something related to tes= ting (the (a) above)
because that's well segregated from the = rest of the system and it's
something that could be redone, i= n all likelihood, in some other language
should the need arise. I= had thought fsx and fsx-rs would provide a nice
compare and cont= rast 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--