From nobody Thu Sep 5 07:25:26 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 4WzrVq0MHQz5VVdM for ; Thu, 05 Sep 2024 07:25:39 +0000 (UTC) (envelope-from theraven@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WzrVp6yWbz4Vrg; Thu, 5 Sep 2024 07:25:38 +0000 (UTC) (envelope-from theraven@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725521139; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ICfMuyxwhA9hJzJMC46BqH8dW87oTKaK402sN1agJ/o=; b=JqDKCoaaDEbXJNTfC3j3+jVffgrWzd+pWHsFNirbuOh8XIY2Uip8H2u7YX1QCDesrkWG4N 57pqR4KMGO2d24YPdXrXdZuLY9cO4FD0rz/sTdqgVQLisX4EswfOV+oe/koUOkmZH9Ps4Q kxKhtNvjQ1Osa5Ll5KBzFkxReG9eelufQ9BB0xfhwyyP/TJL86J+5cnskzjDKN6LWqYVAP S43YQ/qFMm52UC/WXJOv4ja6BMqo6O90a67TYgFF9JDPrv/Bvja02pv1clMwm2QDsFspY4 bS50B4SpKcoIy76OI03Hfmcw0UhSr1uLsyK6xXsrB8mb7iutpHviRcSFKBDe7Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725521139; a=rsa-sha256; cv=none; b=bCUgj//8FfjwgSejt+n+m9FxLKlYpwwEDc0OSWDUb06ydJzHA3E5uX6tiOVn84aRzTNqeB HFcajf1ScQKxbey8BxptUrSjh8yDIoUe1y9tkaqOZ4sjo7dNQJ/S22R8mIUHivJSTPA6Ti 4T6eXVt2NY5uN6PfU9+QojZWDwTQsdY1zDQdQ+f/3Hq1qN/BFM8bhfhlUbtLwu1YDTYd2P T+EamQj8E2tAsR+LNoKfVDC9jkefopz6DZgSLGeqVBFc18fLz7oTePN3vPsaqr2pUDpSAu QTnpTNls+pcOmmxjapd54d0Qqij1XoXe1uXoDSxJziyyDo3XJjR4tIV3kxKd8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725521139; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ICfMuyxwhA9hJzJMC46BqH8dW87oTKaK402sN1agJ/o=; b=lYV81iQi4OZV0A9TJqkTSgACNvPGhM+q3TVPZvMHs4isWQM+Y72U6GQPu3+8c3pKgARc92 lB0ETksV12sKlCwBfcGZq8EPco866XZOXKeYoBIB78EbxYC0FjuLg3LwigyyiaH5QBoc6z XzOfNVw8YZvZwaz+wQXdbOkq5OKTJ4Tvfwvc2mU7PGn6pienIjjSz/swJBDRMqSzwHlNcW EAj+XC0ZD2BgWvO0mcFT5wr0G2s8XAwfjBl3dj5urnOoQKleB/ch3bl9rRntYcPpu50C8n CkeaX+WBM7lagi9tnLwH3C+sKS53k5Y6vDa/yl8QlXQl2pLLJ2UZHQrvqiuEsg== Received: from smtp.theravensnest.org (smtp.theravensnest.org [45.77.103.195]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: theraven) by smtp.freebsd.org (Postfix) with ESMTPSA id 4WzrVp6M8Lz11nT; Thu, 5 Sep 2024 07:25:38 +0000 (UTC) (envelope-from theraven@freebsd.org) Received: from smtpclient.apple (host109-155-136-107.range109-155.btcentralplus.com [109.155.136.107]) by smtp.theravensnest.org (Postfix) with ESMTPSA id 254615123; Thu, 05 Sep 2024 08:25:38 +0100 (BST) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: David Chisnall 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 (1.0) Subject: Re: Rust: kernel vs user-space Date: Thu, 5 Sep 2024 08:25:26 +0100 Message-Id: <88AC3419-2BD0-4664-80E8-368360E143B4@freebsd.org> References: <40836902-cb68-45e0-b4ec-623c21aa47ba@FreeBSD.org> Cc: Bob Bishop , freebsd-hackers@freebsd.org In-Reply-To: <40836902-cb68-45e0-b4ec-623c21aa47ba@FreeBSD.org> To: Stefan Esser X-Mailer: iPad Mail (21G93) On 4 Sep 2024, at 17:42, Stefan Esser wrote: >=20 > The LUA version is much shorter and easier to understand (if you know > LUA) I am far from a Lua expert. I started using it quite recently because the be= st choice for a build system for the RTOS I maintain was written in Lua. I f= ind it overly verbose at times, but, in spite of this, I rarely have problem= s reading other people=E2=80=99s Lua code. It took me about an hour to go from never having written any Lua to writing s= ome Lua code that actually worked (and that we still use). I see that as a h= uge advantage. There=E2=80=99s a lot of C code in the base system that took m= e ages to understand. Some, such as rtld, because it=E2=80=99s intrinsically= complicated (though the fact that the authors are allergic to documentation= doesn=E2=80=99t help: there are subtle phase ordering things there that sho= uld not have been committed without comments explaining what invariants futu= re changes must preserve) but a lot of command-line tools are doing things t= hat are fairly simple but the code is significantly complicated by the fact t= hat C lacks abstractions for them and so implementation detail of data struc= tures is interleaved with algorithms. David=