From nobody Wed Sep 11 06:49:12 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 4X3WQ40nbfz5Vsm4 for ; Wed, 11 Sep 2024 06:49:16 +0000 (UTC) (envelope-from paulf2718@gmail.com) Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4X3WQ34MKFz50BK for ; Wed, 11 Sep 2024 06:49:15 +0000 (UTC) (envelope-from paulf2718@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=NbLo5nRM; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of paulf2718@gmail.com designates 2a00:1450:4864:20::42e as permitted sender) smtp.mailfrom=paulf2718@gmail.com Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-374d29ad870so3959489f8f.3 for ; Tue, 10 Sep 2024 23:49:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726037354; x=1726642154; darn=freebsd.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=u7d0f2vxPYCVduiT0t5b2aIaNUefTX17mi7HsvGEdYk=; b=NbLo5nRMRIwFRvPtvZqUJxKl1CwhC7mv2rCfNGK9tkJNkZaCcFA+ss5e5E9uy5buMc SmoAkOAMKiGF38j1QCDLjQRlsGodfEv2p7cfbPV/Xjx2NDkGeFR78TzAywmsAE+lDvFS MLmiJ6XQmCwYbxaAdUkxVwmrxbace60WgdD+D4GPTawYxxJgC1tyQXb4CpoDt7IC1HoQ COxdV7zdRVhOhVHQmqsuc7fscUPiVkwTto4TZIXjNbtFTkqr5Yo67wHhYd6s0e9u551b EoxOZFqsCKf2HfxR/GxrhTaw7JzCssYPYkehXMaWrTBgHDCQKY60EKuTT9Rtwq+RV9bR A7sQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726037354; x=1726642154; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=u7d0f2vxPYCVduiT0t5b2aIaNUefTX17mi7HsvGEdYk=; b=kuTRTszqgSczra3a8z81I71spEHDMVgowGzRY5XtiQX+qIIeLBTFme91zow18QEuS/ tyNMu5IwgViHq23zOYIzVboVApB14HTZwtBN5rzNd6xzmMyafn1fKviFS9TGgLNVmw9I ZzCY8GNti/HtrTonQgn30abp1XAWF74Vsb2QfAnD79MQ/zY6DuXw86atQQquIn3qf3Hq /SuzY+DXNa9kzZTdNbBr1TohLdmSw3CgBUUpaZWgBgx9m1HQiz/aFoWvvgio74jzbBMB CDY0ukolLbbkxWgBXpCbBEgBNr2BeACg0f9Ml9wZdPn7cy+EP7GIW2dwX78xBjWWHYWd XUZA== X-Gm-Message-State: AOJu0YyBHW37ntEl6CM9FObiAqtMw4Rm+1Kw4Z6QIj4Zc97YCax2foZQ ZmzjOAAgDcxqXwegecOIyZ//ZNAX5vqplA1FJeXb8NRElExKZmj1uVtUYA== X-Google-Smtp-Source: AGHT+IFtMtmwq0ktMEzY3vBrX18ozM3+TV9g4uMJC+688VZOCDl+5yX9lO1sS4ka7SxQ3h1NdVOXWg== X-Received: by 2002:adf:f60a:0:b0:371:83ac:fec1 with SMTP id ffacd0b85a97d-378895b79f8mr11038336f8f.1.1726037353926; Tue, 10 Sep 2024 23:49:13 -0700 (PDT) Received: from ?IPV6:2a01:cb15:801f:7500:1aa9:5ff:fe16:2efb? ([2a01:cb15:801f:7500:1aa9:5ff:fe16:2efb]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-378956d374fsm10712225f8f.86.2024.09.10.23.49.13 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 10 Sep 2024 23:49:13 -0700 (PDT) Message-ID: <4fb5a7ec-41dc-43ed-8abe-97208013c941@gmail.com> Date: Wed, 11 Sep 2024 06:49:12 +0000 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 User-Agent: Mozilla Thunderbird Subject: Re: The Case for Rust (in any system) To: freebsd-hackers@freebsd.org References: <20240905194529.3szOViVM@steffen%sdaoden.eu> <9adc3619-bc38-4fe7-bf16-20e0dfb3b619@gmail.com> <20240909213107.XGD3_v0I@steffen%sdaoden.eu> Content-Language: en-US From: Paul Floyd In-Reply-To: <20240909213107.XGD3_v0I@steffen%sdaoden.eu> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.98 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.994]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; MIME_GOOD(-0.10)[text/plain]; XM_UA_NO_VERSION(0.01)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; ARC_NA(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; FROM_HAS_DN(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; TO_DN_NONE(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; MID_RHS_MATCH_FROM(0.00)[]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::42e:from] X-Rspamd-Queue-Id: 4X3WQ34MKFz50BK On 09-09-24 21:31, Steffen Nurpmeso wrote: > Despite that it is unfortunate but true that prototypes in C and > also C++ not seldom do not tell the truth because bit enumerations > are missing, and so you have integers of various widths as "bit > carriers" through which completely unchecked bits are then passed. Non sequitur. This is due to the C and C++ type system, nothing to do with prototypes. > Or at least in C, which does not support "easy super-class cast"s, C++ has a stricter type system than C. That makes doing wrong things a bit more difficult > |I'm not sure that I follow your argument. Are you saying that you can > |build memory safety into C code and that if someone doesn't so they are > |a bad programmer? What's the point - why not just use a memory safe > |language? > > Because Floyd means pink not paul, hah! Is this the infants school playground? You just lost your last shred of credibility. > But answering your question i would say it does not make much of > a difference to me -- *if* i can go the way i want -- regarding > safety, but a lot regarding runtime and infrastructural overhead. > For example most of the development time i compile with tcc that > is 334640 bytes and links to almost nada. > > #?0|kent:built$ ll tcc#20240731-1.pkg.tar.zst > -rw-rw---- 1 ports ports 273285 Aug 3 22:11 tcc#20240731-1.pkg.tar.zst > > #?0|kent:built$ ll gcc#14.2.0-1.pkg.tar.zst > -rw-rw---- 1 ports ports 67854914 Aug 1 21:59 gcc#14.2.0-1.pkg.tar.zst > > #?0|kent:built$ ll clang#18.1.8-1.pkg.tar.zst > -rw-rw---- 1 ports ports 74166358 Jun 22 21:26 clang#18.1.8-1.pkg.tar.zst > #?0|kent:built$ ll llvm#18.1.8-1.pkg.tar.zst > -rw-rw---- 1 ports ports 136797237 Jun 22 23:57 llvm#18.1.8-1.pkg.tar.zst > #?0|kent:built$ ll compiler-rt#18.1.8-1.pkg.tar.zst > -rw-rw---- 1 ports ports 3378581 Jun 23 00:02 compiler-rt#18.1.8-1.pkg.tar.zst > > Unfortunately pcc is dead, it detected things that clang and gcc > did not (via warning options etc). tcc is very bad in such. IMO tcc is simply godawful. I would not touch it with a bargepole. I did once look at a tcc bug. I gave up as I felt that it wasn't worth trying to fix and obsolete port. https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274211 A C compiler that can't compile hello world. [More ranting and crappy C macros deleted. Plonk.] A+ Paul