From nobody Wed Sep 11 20:36:54 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 4X3snR1mrhz5Vv08 for ; Wed, 11 Sep 2024 20:37:15 +0000 (UTC) (envelope-from bsd-lists@bsdforge.com) Received: from udns.ultimatedns.net (udns.ultimatedns.net [24.113.41.81]) (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 "ultimatedns.net", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4X3snQ4cDQz4f8c for ; Wed, 11 Sep 2024 20:37:14 +0000 (UTC) (envelope-from bsd-lists@bsdforge.com) Authentication-Results: mx1.freebsd.org; dkim=fail ("headers rsa verify failed") header.d=ultimatedns.net header.s=mx99 header.b=ZwiHUPf4; spf=pass (mx1.freebsd.org: domain of bsd-lists@bsdforge.com designates 24.113.41.81 as permitted sender) smtp.mailfrom=bsd-lists@bsdforge.com Received: from ultimatedns.net (localhost [127.0.0.1]) by udns.ultimatedns.net (8.16.1/8.16.1) with ESMTP id 48BKat7m043266; Wed, 11 Sep 2024 13:37:01 -0700 (PDT) (envelope-from bsd-lists@bsdforge.com) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ultimatedns.net; s=mx99; t=1726087022; x=1726087622; r=y; bh=inpfjgDKlGio5x05/fP7XbnSSFwX037IyGpC6kiAI6o=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=ZwiHUPf4sJnWcXS9LrieX2/4W/NwStS3BAhvbK6GRTSP8MSlz4N70HRcMAAqPae4A 0oT7i96Edv1a9JgeKouYr3xxyVp1DWnCb7+DyDiQ5xsBh9ffMARTZpD3R+JFcyoLBZ iMESBkf/yrvOsQ1iQdeDkpzlK5P3eVGdHDWSS85kLsv4cnO79lkA5Zl45QZTpC9Bxb Yg0yqlQmDHHxiWqXMulE7ZIpzAGYaEFaDC6W3ZpLoveMBHP/X28GuYJtCPbLyoqBdz WFeF06kI2RMfmw2xWQetJ7KnQOJHug1GJOxMbH60lWrF5C8PikEISJPCzRm0B+5Tna qoWk+GNP+e/gA== 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 Date: Wed, 11 Sep 2024 13:36:54 -0700 From: Chris To: Cy Schubert Cc: Jan Knepper , Mark Delany , freebsd-hackers@freebsd.org Subject: Re: Rust: kernel vs user-space In-Reply-To: <20240904221522.63E0366@slippy.cwsent.com> References: <0.2.0-final-1725440949.866-0xb4bb20@qmda.emu.st> <78BC157F-6E30-49C4-931D-9EB539BD0322@digitaldaemon.com> <20240904221522.63E0366@slippy.cwsent.com> User-Agent: UDNSMS/17.0 Message-ID: X-Sender: bsd-lists@bsdforge.com Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Spamd-Bar: / X-Rspamd-Pre-Result: action=no action; module=multimap; Matched map: local_wl_ip X-Spamd-Result: default: False [0.80 / 15.00]; R_DKIM_REJECT(1.00)[ultimatedns.net:s=mx99]; R_SPF_ALLOW(-0.20)[+ip4:24.113.41.81/29]; MIME_GOOD(-0.10)[text/plain]; ONCE_RECEIVED(0.10)[]; ASN(0.00)[asn:11404, ipnet:24.113.0.0/16, country:US]; FROM_HAS_DN(0.00)[]; local_wl_ip(0.00)[24.113.41.81]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[ultimatedns.net:-] X-Rspamd-Queue-Id: 4X3snQ4cDQz4f8c On 2024-09-04 15:15, Cy Schubert wrote: > In message <78BC157F-6E30-49C4-931D-9EB539BD0322@digitaldaemon.com>, Jan > Kneppe > r writes: >> D >> >> www.dlang.org > > The problem with D is data structure definitions need to also be mirrored > (duplicated) in D. For example, when 64-bit inodes were implemented D > failed to build and generate any code. The reason for this was > ufs/ufs/inode.h now defined 64-bit inodes while the D representation as > provided by the D language were still 32-bit. I had opened an issue with > upstream regarding this. To this day they still haven't figured out how to > implement 64-bit inodes on newer FreeBSD systems while maintaining 32-bit > inode backward compatibility on older FreeBSD systems (as FreeBSD > implemented this using ifunc). > Well, why about B? https://en.wikipedia.org/wiki/B_(programming_language) Sorry. I remembered using this *many* years ago, and couldn't resist adding it to the list. :-) --Chris > > -- > Cheers, > Cy Schubert > FreeBSD UNIX: Web: https://FreeBSD.org > NTP: Web: https://nwtime.org > > e^(i*pi)+1=0 > > >> >> >> >> ManiaC++ >> Jan Knepper >> >> > On Sep 4, 2024, at 05:09, Mark Delany wrote: >> >=20 >> > =EF=BB=BFI hesitate to step into this discussion but is it worth making th= >> e distinction between >> > Rust in the kernel and Rust in user-space? >> >=20 >> > I can see the argument for introducing a "safer" language into the kernel a >> = >> nd there are >> > very few candidates available: perhaps only Rust, C++ and Zig. Clearly if t >> = >> hat step is to >> > be made, it probably should pick one language and run with it. >> >=20 >> > That's one discussion. >> >=20 >> > As for user-space, I find the rationale for Rust as the one-true-language-= >> after-C far less >> > compelling as many CLIs and server programs can just as well be written in= >> more accessible >> > languages such as go or perl or java or... >> >=20 >> > Frankly I no longer write any CLI or server code in C even after decades o= >> f doing so >> > because the trade-off between development costs and performance is far les= >> s compelling in >> > user-space. If my once-a-week invocation of a command requires a bit more m >> = >> emory and CPU >> > than one written in C, is that really important compared to how much easie= >> r the command is >> > to maintain and enhance? >> >=20 >> > Point being, on the matter of introducing Rust to FreeBSD, I think the dis= >> tinction between >> > kernel and user-space is worth keeping in mind as they are quite different= >> problems. >> >=20 >> >=20 >> > Mark. >> >=20 >> >>