From nobody Wed Sep 04 10:36:23 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 4WzJlK6xdnz5TcXv for ; Wed, 04 Sep 2024 10:34:37 +0000 (UTC) (envelope-from anthony.pankov@yahoo.com) Received: from sonic310-57.consmr.mail.ir2.yahoo.com (sonic310-57.consmr.mail.ir2.yahoo.com [77.238.177.30]) (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 did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4WzJlK4NrLz4trg for ; Wed, 4 Sep 2024 10:34:37 +0000 (UTC) (envelope-from anthony.pankov@yahoo.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1725446075; bh=r+AUg4gCjcbVKKTlDdux4xft4ofqBypGOegjIbnJO/U=; h=Date:From:To:Subject:In-Reply-To:References:From:Subject:Reply-To; b=GtbwEpuqlg0S2Pn0TE0hsGFGaeu2L4PXF50IltqVhJx26o3rY6mCqgPoRn8JjBZPcIURZvyBc6oxIhTaPDqn29IHq7wapwupPMEGIQhR8NXO0STaaVAPAlecLa/CJry4j559LzS/0XD4ELMh5qaYIsD4sXlyKLLSlaQaw8Qo6Lf3QxKPIlG7Z7Y1c5q/FyPrtuU3RqBFXFIc9RmxEhoc9IuVrywXNh5krHrJ2cWouL6yUBI2wQdwmSYucsyMuWXZbqUuYZPSZ2HYe3NMfcJAkgThYWLs+PRVVGOO+0EZf/lqAyvKnNdfD5PfxHhJ4h6kjokiHvlR78Jn+qlM1slwBA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1725446075; bh=oE8eKsbPoz11B9SbvKWkvZ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lsrleLMhVtv DSQWW7yuHIXPp1TDYx7VGlJ8DyQC1.3JHBc2QhKc1nJA_pSOkRpjafcASmfSVdmk2PGwpFeQ4ifH uYPko5FuJZsJtJMlMVsH2rtqg_fDhA0uh.UqjvJqXnQMpGQFV8xs2ZIMj2Nc40sa2EPGKcimTSG9 DfYieoPMqGBU3cl5xLjtyqlJBFTd5wGUxPLyyYwDcg57r1FzNkdtghOvUKBqFjhWhXV8gbWkwKfD skr776_1YguJqZ2OWTv_szVxWWOtSUHrwWowImAMhHQHhMu4qPFib5D.tNQ2MieVX3VXtGvUiGcb lE3q1a_L5M5o_rTy1Vv35jTP8yNm3fHG7WOGrQra2UY2zkBwKObrS9X6gv7jrAAeCrXEs8z55d_G 1QeqoOfxeRMkoMnIkFXiCPVKJEmfSsNQAGll0cM.OWZYnSE4h10BXcE2UDu_YXvMjZpqQwGavsP8 KGqTICvtmyIidTkVTCx.3EESq.bAtFc5pANU_Bq7kCF8c X-Sonic-MF: X-Sonic-ID: df88246f-1490-4419-b9bc-84a2a65f9c53 Received: from sonic.gate.mail.ne1.yahoo.com by sonic310.consmr.mail.ir2.yahoo.com with HTTP; Wed, 4 Sep 2024 10:34:35 +0000 Received: by hermes--production-ir2-6664f499fc-fnmws (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 51d0a597773566f8c16298bb6a50c768; Wed, 04 Sep 2024 10:34:32 +0000 (UTC) Date: Wed, 4 Sep 2024 13:36:23 +0300 From: Anthony Pankov Message-ID: <27925916.20240904133623@yahoo.com> To: Rob Norris , freebsd-hackers@freebsd.org Subject: Re: The Case for Rust (in the base system) In-Reply-To: References: <202409031131.483BVdax004602@critter.freebsd.dk> 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 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: WebService/1.1.22645 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo 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)[]; ASN(0.00)[asn:34010, ipnet:77.238.176.0/22, country:GB] X-Rspamd-Queue-Id: 4WzJlK4NrLz4trg Hello Rob, > What I actually want though is high-quality tools to make the kind of > problems I need to solve easier for my puny human brain to manage. Rust > is an approach to solving some of these kinds of problems. Other > approaches exist, have existed, and will exist in the future. I'm interested in your opinion. Do the tools like PROMELA-SPIN used for some (critical) part of a C-sourced project will give more correctness and less error prone compared to rewriting project in Rust? Is there an actual possibility to make such a tools integral part of project? Wednesday, September 4, 2024, 11:03:13 AM, you wrote: > On 03.09.2024 11:31, Poul-Henning Kamp wrote: >> But first and foremost: There has to be a good enough reason. > This is a near-enough hook for me to hitch a couple of thoughts on to :) > I work on ZFS, primarily on Linux with slowly increasing amounts on > FreeBSD too. By a long way, the kind of work that is the slowest and > most complicated is around complex locking sequences across multiple > threads. In most of these, getting it wrong leads to some kind of data > corruption that is usually impossible to track down. > The appeal of Rust for me, as for many, is that there are ways to encode > those kind of sequencing rules into the type system so that the compiler > can tell you where you got it wrong. But, I don't actually want Rust _as > such_. I like it a lot, I've written useful programs in Rust over the > last decade, and I'd be perfectly happy to use it in kernel and > filesystem development if it was available. > What I actually want though is high-quality tools to make the kind of > problems I need to solve easier for my puny human brain to manage. Rust > is an approach to solving some of these kinds of problems. Other > approaches exist, have existed, and will exist in the future. > This is mostly aimed at the "C is totally fine" crowd. I like C, and I'm > pretty good at it, but it absolutely not good enough for many kinds of > software. Frankly, I find "just get better at C" to be the most > infuratingly facile "argument" against Rust. > (And I would _love_ to get better at C. If substantially better C tools > are out there (on whatever axis you like to measure that on), then > they're either not visible to me, or they're not usable or > well-integrated enough to be in my standard kit). > There's plenty of plausible reasons not to include Rust in the base > system, many of them being discussed on this list, and I'm learning a > lot reading along. Just please don't pretend the problems it's trying to > solve aren't real. > Cheers, > Rob. > -- > Rob Norris | robn.au | robn@despairlabs.com > Working on OpenZFS, because there's a lot of data out there and it'd be > nice not to lose any of it. -- Best regards, Anthony Pankov