From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_ZEN_BLOCKED_OPENDNS,URIBL_DBL_BLOCKED_OPENDNS, URIBL_ZEN_BLOCKED_OPENDNS autolearn=ham autolearn_force=no version=3.4.4 Received: from txout-a3-smtp.messagingengine.com (txout-a3-smtp.messagingengine.com [103.168.172.226]) by inbox.vuxu.org (Postfix) with ESMTP id 1434520060 for ; Tue, 16 Dec 2025 20:08:13 +0100 (CET) Received: from localhost.localdomain (phl-topicbox-02.internal [10.202.2.220]) by mailtxout.phl.internal (Postfix) with ESMTP id 9498E1C0148 for ; Tue, 16 Dec 2025 14:08:12 -0500 (EST) ARC-Authentication-Results: i=2; topicbox.com; arc=pass; dkim=pass (2048-bit rsa key sha256) header.d=sirjofri.de header.i=@sirjofri.de header.b=VN6EFc7M header.a=rsa-sha256 header.s=dkimone x-bits=2048; dmarc=pass policy.published-domain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=sirjofri.de; spf=pass smtp.mailfrom=sirjofri+ml-9fans@sirjofri.de smtp.helo=sirjofri.de; x-internal-arc=fail (as.1.topicbox.com=pass, ams.1.topicbox.com=fail (message has been altered)) (Message modified while forwarding at Topicbox) ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=date:to:message-id:in-reply-to:references :subject:mime-version:content-type:content-transfer-encoding :list-help:list-id:list-post:list-subscribe:reply-to:from :list-unsubscribe; s=sysmsg-1; t=1765912092; bh=Pr9JUO4gdaI87xpF zMZdhDOOKZqx7iNXV9jlO2hA7Ew=; b=RAXNSwPYFQDUbfvOMvMc3D+UbGvAe85a s5+2bO0pgLuOv1innPDG1YxEmJMNNPH7g2nq3Fy2reVy7Eb4qvtT41QneYb0hKrz 0BC3/R2peLNfhEp30vFB2qHAaD1W308a2XFztZRknPGBHWc07Yyg5XndLTEKRUEN cw1rB/axC5U= ARC-Seal: i=2; a=rsa-sha256; cv=pass; d=topicbox.com; s=sysmsg-1; t= 1765912092; b=rzt8OXUO9BGigusVrrlNOsQSVcHudNoDCBk93KNuYTgzfgTfHB Oc8xSz1ipsoCLlNaMz5ULF3Q4XjkPTsJXC2tLZtD91rZAMai6Fr9Vp2hVeqvHrIP xqjqJTCcJDPT+mIdbbB+jQ684pSZCPEyxFTXDnzeHeX3LAGvgfWne19dQ= Authentication-Results: topicbox.com; arc=pass; dkim=pass (2048-bit rsa key sha256) header.d=sirjofri.de header.i=@sirjofri.de header.b=VN6EFc7M header.a=rsa-sha256 header.s=dkimone x-bits=2048; dmarc=pass policy.published-domain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=sirjofri.de; spf=pass smtp.mailfrom=sirjofri+ml-9fans@sirjofri.de smtp.helo=sirjofri.de; x-internal-arc=fail (as.1.topicbox.com=pass, ams.1.topicbox.com=fail (message has been altered)) (Message modified while forwarding at Topicbox) X-Received-Authentication-Results: authmilter.topicbox.com; arc=none (no signatures found); bimi=none (No BIMI records found); dkim=pass (2048-bit rsa key sha256) header.d=sirjofri.de header.i=@sirjofri.de header.b=VN6EFc7M header.a=rsa-sha256 header.s=dkimone x-bits=2048; dmarc=pass policy.published-domain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=sirjofri.de; iprev=pass smtp.remote-ip=5.45.105.127 (sirjofri.de); spf=pass smtp.mailfrom=sirjofri+ml-9fans@sirjofri.de smtp.helo=sirjofri.de; x-aligned-from=pass (Address match); x-me-sender=none; x-ptr=pass smtp.helo=sirjofri.de policy.ptr=sirjofri.de; x-return-mx=pass header.domain=sirjofri.de policy.is_org=yes (MX Records found: sirjofri.de); x-return-mx=pass smtp.domain=sirjofri.de policy.is_org=yes (MX Records found: sirjofri.de); x-tls=pass smtp.version=TLSv1.2 smtp.cipher=ECDHE-RSA-CHACHA20-POLY1305 smtp.bits=256/256; x-vs=clean score=0 state=0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=9fans.net; h=date:to :message-id:in-reply-to:references:subject:mime-version :content-type:content-transfer-encoding:list-help:list-id :list-post:list-subscribe:reply-to:from:list-unsubscribe; s= dkim-1; t=1765912092; x=1765998492; bh=Pr9JUO4gdaI87xpFzMZdhDOOK Zqx7iNXV9jlO2hA7Ew=; b=fOHtbS1lWSqWsS6FHKiKJGkh4WgkZlqo2bW8fX4c1 e/EGDcql6o6qUr6HdJDiHKVmHbfc9VkMQpEdNq0xz5Bku95a6B4cfRprBdpXXD/q 3uf9uOaSkOZtadHZaiBVI/TXeJip5V9HwGi3gaOyhw1flFdn6mNOUdKrsP2/h6dI YM= Received: from authmilter.topicbox.com (unknown [172.17.0.1]) by mx.topicbox.com (Postfix) with ESMTP id B74264D88868 for <9fans@9fans.net>; Tue, 16 Dec 2025 13:25:46 -0500 (EST) Received: from mx.topicbox.com (172.17.0.1 [172.17.0.1]) by authmilter.topicbox.com (Authentication Milter) with ESMTP id C6653432EAE; Tue, 16 Dec 2025 13:25:46 -0500 ARC-Seal: i=1; a=rsa-sha256; cv=none; d=topicbox.com; s=arcseal; t= 1765909546; b=ovStm5aCLsyHQhPJUXjXW8Z+tfHgMNa3BGldoFJAixYsqBJedZ cEn9WKh+XeXW6+jPrRntc4O2VV6lLjq/fgWoVCvUHxa60wUvZ6fM+B3LlGrR3j/N bT7aE3tbHVgmdT0hY5FYVXMa/S3qOBkSCuGuzkilvSvsGDIfDBnSEJky2T8fk5RP 59XZbLgqd+UQ5ugZGFqJqWLQk2+0/8O5c4pelFQldD5PiHqN941dKJ85M8a6Sccn ZacK6hkyRFn5jXC0xIEk71J+rsBCq13WdmXb37Koc1LLsLBiMWyLoG/fvffwQ4LR UTdtuCz5D+135YlxUfnT+miXEbMD40e0R6mA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=date:from:to:message-id:in-reply-to:references :subject:mime-version:content-type:content-transfer-encoding; s= arcseal; t=1765909546; bh=ud0HnJsWOEmezIBPXsqClhHbD0zlhXyBEhxcab l7SGg=; b=i4ioh066hT4q+5/aZbgDWUA/aHRQTjs5x/fk8mXH2Ep47xac55ljjZ 0sm8RQM/00cUSWIz7WsAagZqETF181+XLkeFNf6+/8vroeRF1WVJOVqrIJPGtKyq Xtym0gPN4Jqxg82laXt5gDTPXA3wAjJwy2DluTGxzwGZI0tWA18YQaDhYmKyx6N7 AymLF+SULR62JfcR69G8dLX5VHOZsuzwTpLwiVCONdF72x+j+7IteOufBrxeZSV9 j8fWLcBH7DY6TelrLDzfXVAABoNSoJoCIspgsTeC4K0HBB9W7cWvc6tS1Ypv139O LS8jKOqvS8OXeJyyiKuOwu95luKelDZw== ARC-Authentication-Results: i=1; authmilter.topicbox.com; arc=none (no signatures found); bimi=none (No BIMI records found); dkim=pass (2048-bit rsa key sha256) header.d=sirjofri.de header.i=@sirjofri.de header.b=VN6EFc7M header.a=rsa-sha256 header.s=dkimone x-bits=2048; dmarc=pass policy.published-domain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=sirjofri.de; iprev=pass smtp.remote-ip=5.45.105.127 (sirjofri.de); spf=pass smtp.mailfrom=sirjofri+ml-9fans@sirjofri.de smtp.helo=sirjofri.de; x-aligned-from=pass (Address match); x-me-sender=none; x-ptr=pass smtp.helo=sirjofri.de policy.ptr=sirjofri.de; x-return-mx=pass header.domain=sirjofri.de policy.is_org=yes (MX Records found: sirjofri.de); x-return-mx=pass smtp.domain=sirjofri.de policy.is_org=yes (MX Records found: sirjofri.de); x-tls=pass smtp.version=TLSv1.2 smtp.cipher=ECDHE-RSA-CHACHA20-POLY1305 smtp.bits=256/256; x-vs=clean score=0 state=0 X-ME-VSCause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdegtdegtdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecunecujfgurhepfffhvf fkjghfufggtgfgsehtqhertddttdejnecuhfhrohhmpehsihhrjhhofhhrihcuoehsihhr jhhofhhrihdomhhlqdelfhgrnhhssehsihhrjhhofhhrihdruggvqeenucggtffrrghtth gvrhhnpeejvddtgeeuledvgfelteelfedvteeijeduveelgfehteejueehvdfhteekudev teenucfkphephedrgeehrddutdehrdduvdejpdekgedrudeihedruddvjedrleefnecuve hluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthephedrgeehrddutdehrddu vdejpdhhvghlohepshhirhhjohhfrhhirdguvgdpmhgrihhlfhhrohhmpeeoshhirhhjoh hfrhhiodhmlhdqlehfrghnshesshhirhhjohhfrhhirdguvgeqpdhnsggprhgtphhtthho pedupdhrtghpthhtohepoeelfhgrnhhsseelfhgrnhhsrdhnvghtqe X-ME-VSScore: 0 X-ME-VSCategory: clean Received-SPF: pass (sirjofri.de: 5.45.105.127 is authorized to use 'sirjofri+ml-9fans@sirjofri.de' in 'mfrom' identity (mechanism 'mx' matched)) receiver=authmilter.topicbox.com; identity=mailfrom; envelope-from="sirjofri+ml-9fans@sirjofri.de"; helo=sirjofri.de; client-ip=5.45.105.127 Received: from sirjofri.de (sirjofri.de [5.45.105.127]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mx.topicbox.com (Postfix) with ESMTPS for <9fans@9fans.net>; Tue, 16 Dec 2025 13:25:45 -0500 (EST) Received: from dummy.faircode.eu ([84.165.127.93]) by sirjofri.de; Tue Dec 16 19:25:41 +0100 2025 Date: Tue, 16 Dec 2025 19:25:40 +0100 (GMT+01:00) To: 9fans <9fans@9fans.net> Message-ID: In-Reply-To: <9B381DFBBE425AD6AD846363E0251600@eigenstate.org> References: <9B381DFBBE425AD6AD846363E0251600@eigenstate.org> Subject: Re: [9fans] Typestr usage (inspired by libgeometry) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Correlation-ID: Topicbox-Policy-Reasoning: moderate: sender is a member; group holds all messages Topicbox-Message-UUID: a46a2f34-daac-11f0-ac5b-99566bc11ef0 Archived-At: =?UTF-8?B?PGh0dHBzOi8vOWZhbnMudG9waWNib3guY29tL2dyb3Vwcy85?= =?UTF-8?B?ZmFucy9UN2VlMjQyOTFhZjk1N2RiNy1NMjgyODRmMDAyODUyZmQwYjIwNWNk?= =?UTF-8?B?NWVjPg==?= List-Help: List-Id: "9fans" <9fans.9fans.net> List-Post: List-Software: Topicbox v0 List-Subscribe: Precedence: list Reply-To: 9fans <9fans@9fans.net> From: "sirjofri via 9fans" <9fans@9fans.net> List-Unsubscribe: , Topicbox-Delivery-ID: 2:9fans:437d30aa-c441-11e9-8a57-d036212d11b0:522be890-2105-11eb-b15e-8d699134e1fa:M28284f002852fd0b205cd5ec:1:1kP5CunsdOl9QhsLZS3KMZiCtX7E07TVYqYMWayo94Q 16.12.2025 17:19:26 ori@eigenstate.org: > Quoth sirjofri via 9fans <9fans@9fans.net>: > It's a subtly wrong feature -- it looks cute, but doesn't > generalize well in C. Finishing it would imply garbage > collection (or at least destructors), which have their > own disadvantages. > > It may work for some things. This, for example, is fine: > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 typestr mpint ...; > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 mpint *x =3D mpnew(42); > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 mpint *y =3D mpnew(123); > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 mpint *z =3D x * y; //ok, fine > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 mpfree(x); > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 mpfree(y); > > but what about: > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 mpint *x =3D mpnew(42); > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 mpint *y =3D mpnew(123); > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 mpint *z =3D x * (y - x) * (y = - x); > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 mpfree(x); > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 mpfree(y); > > There are intermediate expressions along the way > which would need to be allocated; who frees them? Well, that makes a lot of sense. I guess I never encountered these issues b= ecause I only used it with smaller structures that I can easily copy (by va= lue). A feature like that should accommodate for the whole language though,= which it can't. Thanks for clarifying that. sirjofri ------------------------------------------ 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/T7ee24291af957db7-M28284= f002852fd0b205cd5ec Delivery options: https://9fans.topicbox.com/groups/9fans/subscription