From nobody Sun Jan 21 22:20:45 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 4TJ7972qndz57s3P for ; Sun, 21 Jan 2024 22:20:59 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-vk1-f181.google.com (mail-vk1-f181.google.com [209.85.221.181]) (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 4TJ79719t9z4HkR; Sun, 21 Jan 2024 22:20:59 +0000 (UTC) (envelope-from asomers@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-vk1-f181.google.com with SMTP id 71dfb90a1353d-4b7480a80ceso2153459e0c.0; Sun, 21 Jan 2024 14:20:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705875658; x=1706480458; h=content-transfer-encoding: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=hzACVPkSPoz9l23iNg54A3ale/JYapLybJLhDeVLrxI=; b=AlFfPmfhpWOS17qhQMhXKr94OdU54++ZzWqVxcW3IirHWv24L+XPifeziYX4J6Ju+G KDtWH5mFHKKAvU+ayD6VSOLgdYcWQEuZBfc7LvvWBygMotBZX1bXDeTFSl1KAmX7CNna y3Jz5QGxJPkohiCw3OYkzz3fankYJFEEKXqls8Xeo1LR1R8NE9q3uJWvCniZ0BlhVweM +JW6lFVvniNjKfguG63YmFTgS0eevKgpSyj3e3zVfW6J/rVxU/Y4behOmjoPVhzE7fep Oywvo6EopO+BPY00MFlFjv+lXvqNGnsuIaAQ+YCmPWXefsfE913cZw1P+lTR1GC+KY+t Bvrw== X-Gm-Message-State: AOJu0YztiPJ2+TyqGIMPg3+SNkBNg8DhyClhhhRVwSsYfYCqLS+ZM4Pw 3qj4HZe5z2D1kTgjnA+DzkWs6HsMFROVwIah+9iTjVHOzeFrlu9L41ko5Io8jkfwb+B1rdFEbS2 AiARYREnGip5yKQ90g7LQRkx25xM= X-Google-Smtp-Source: AGHT+IG9yUEB+lmpAVjLyWtFfvfw4Jz3l1jwoePvvCs7ZQ0YNJf1gdBcI5k/+4fExVDzS3iyuSZZvkt47pD4CI/pMzU= X-Received: by 2002:ac5:cdeb:0:b0:4b7:3b27:7c78 with SMTP id v11-20020ac5cdeb000000b004b73b277c78mr2248862vkn.15.1705875658299; Sun, 21 Jan 2024 14:20:58 -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: Alan Somers Date: Sun, 21 Jan 2024 15:20:45 -0700 Message-ID: Subject: Re: The Case for Rust (in the base system) To: Warner Losh Cc: Poul-Henning Kamp , Kristof Provost , George Mitchell , FreeBSD Hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4TJ79719t9z4HkR 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:209.85.128.0/17, country:US] On Sun, Jan 21, 2024 at 2:32=E2=80=AFPM Warner Losh wrote: > > > > On Sun, Jan 21, 2024, 2:04=E2=80=AFPM Alan Somers w= rote: >> >> 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 kid= s 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 precis= ely >> > 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 wer= e > 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 so= mething > 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) ab= ove) > 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 an= d produce > good data about using Rust in the base. I'm sure others could be proposed > 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?