From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id AD8zFTnt6WIZGQEAbAwnHQ (envelope-from ) for ; Wed, 03 Aug 2022 05:36:25 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id kLEcFTnt6WITWAAAauVa8A (envelope-from ) for ; Wed, 03 Aug 2022 05:36:25 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D35D6DB24 for ; Wed, 3 Aug 2022 05:36:24 +0200 (CEST) Received: from localhost ([::1]:39548 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oJ5BH-0007ta-M4 for larch@yhetil.org; Tue, 02 Aug 2022 23:36:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55240) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oJ5B5-0007tS-0N for guix-devel@gnu.org; Tue, 02 Aug 2022 23:36:11 -0400 Received: from knopi.disroot.org ([178.21.23.139]:41198) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oJ5B2-0007pr-Iu for guix-devel@gnu.org; Tue, 02 Aug 2022 23:36:10 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 6D44B40DF2; Wed, 3 Aug 2022 05:36:06 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dzdR5aMK_dTt; Wed, 3 Aug 2022 05:36:03 +0200 (CEST) Mime-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1659497763; bh=fn9NqV2BpwkdSm1jcy1S73aDicGCaR99sRQLaLFtnIA=; h=Date:Subject:To:From:References:In-Reply-To; b=C6l34/StAAtAI6swysXylogvbcHvIA/fA3JMD5om8IAgd9JkQHN4kcYu33e+byyGj nmY6yCCLwL9punVqVx6fAMYQEW7S7RDzqth9xL+MKBBe6ijsYm0p/wSJN0EyaBY2EF tByEQ4XI/aTi5wR1uhMmK62ztsC90XtHc/j4Er8oRiEwThpbSkCPp4cS5+fTxPzj+L San0aCQnMaCP6oiE9eB3qc3QhqJW1b8aNAF+1dMqp0Ta6lV1S+e3SALQAvdY5foPWT d7Xj8Opts8UnwL/bRcpOTG5gEDP278ypbcbFUfu1wKAET3ETWipHvisqheTrvFfk/N yRq32h1O9TgOw== Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Wed, 03 Aug 2022 12:35:58 +0900 Message-Id: Subject: Re: Strategy for Zig packages To: "Maxime Devos" , =?utf-8?q?M=C3=A1ja_Tom=C3=A1=C5=A1ek?= , From: References: <87tu6veltd.fsf@disroot.org> In-Reply-To: Received-SPF: pass client-ip=178.21.23.139; envelope-from=mcsinyx@disroot.org; helo=knopi.disroot.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1659497785; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=fn9NqV2BpwkdSm1jcy1S73aDicGCaR99sRQLaLFtnIA=; b=e6k6msxXg+rKFOUft3UZRrhDIDQomtS5uu4dgub6rGcFOldrRVnHecO3nMTFNwdq8XAsP6 3KqZACzvLNB9G7j/Eyqa39fy1e1bzbvGVeSq63DZogKRfXBKtAAgLDuiVQWezjktnvQBtV S5BivQRiaCk94/XX2Pg3qoPNnAMXuYHbwWyVIFplgeDnlz3doxZ6E+5RQiBVzll7Cml/XA /QiJyuqJ4c13P6fToQ9QZapqqeMfPLF2lnNYhT/aK7cjruhPBWki+JxM9sKl/lUfZrWcjT +7QP/PmZXfx1dKk3rORB0fAupX10aBjSNkPJvgYzosTnrxjlFZNdk4cu+6Yn+w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1659497785; a=rsa-sha256; cv=none; b=ilaAXQWqZV0upiBziK4hTS9OLeU49zVn1/CXcvs4Z8y5RruSFFs7FWNFLU0FLXREX03oTb lolVEB5Ht6fEXHwGM+Xp98uPcVsOICSWrnsJ6z+g5evNGJJ/h5DjY+v/4f2mxn6Ik7b7MZ gtAOB5ek1ql++X6624y0GpBWzV1p/28FvqnKL867QksgAfkaddYZepCRzNSsKuVfU7PZiX 3CqxPkr/4PXl6uItOt1GZF1/QS2bhwojJpywjwlHE8ei4ttm0nnYMYlYL0tRmH9RO0U1OS 8i3t6wigZ8IQceLZwyOoqlYdg3/hS12LdY+D0ANMvkYsobc+KQLy+DNOjXqx1A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=disroot.org header.s=mail header.b="C6l34/St"; dmarc=pass (policy=quarantine) header.from=disroot.org; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -6.42 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=disroot.org header.s=mail header.b="C6l34/St"; dmarc=pass (policy=quarantine) header.from=disroot.org; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: D35D6DB24 X-Spam-Score: -6.42 X-Migadu-Scanner: scn0.migadu.com X-TUID: o1u8FCnxZbFI On Tue Aug 2, 2022 at 11:09 AM +0200, Maxime Devos wrote: > On 02-08-2022 07:21, mcsinyx@disroot.org wrote: > > On Mon Aug 1, 2022 at 10:43 PM +0200, M=C3=A1ja Tom=C3=A1=C5=A1ek wrote= : > > > More realistic (imo) is that zig should be encouraged > > > to build dynamically linked packages, not static ones, > > > and allow the ability (with their future package manager) > > > for the distribution to distribute it's libraries C-style. > > > > Technically this is not always possible since Zig relies > > on compile-time execution for generic. > > Rust has generics (and macros (*)) and its compiler does > static compilation, so I don't see why it would be impossible > for Zig to do static libraries. > > (*) Including macros that can run arbitrary Rust code, see > , > so there you have compile-time execution too! FWIW I was commenting on the impossibility of dynamically linking Zig libraries that uses comptime. On Tue Aug 2, 2022 at 11:09 AM +0200, Maxime Devos wrote: > I don't think this is a problem, as Guile has macros (*) yet > it supports compilation (and shared libraries -- .go files > are ELF shared libraries) -- macros are, in a sense, > merely procedures that transform syntax into syntax, > which can be compiled, and generics could be considered > a special case of macros. > > (Shared libraries might be harder, but you could just monomorphise > generics in the 'user' of the shared library, so shared libraries > appear technically possible to me as well.) Compile-time execution must be done at, well, compilation time, thus macros in shared objects are just glorified embedded source code that are not used at runtime. That being said, there may be a Zig ABI in the future, with the cost of missing certain features (like comptime) and optimizations: https://github.com/ziglang/zig/issues/3786 On Tue Aug 2, 2022 at 11:11 AM +0200, Maxime Devos wrote: > On 02-08-2022 07:21, mcsinyx@disroot.org wrote: > > Zig source files could be handled in the same manner as C headers > > however, and be used as native inputs, so downstream can still > > update a library for all dependees at once. > > Going for native-inputs and not non-native sounds incorrect > when cross-compiling.=C2=A0 We might need to substitute* a "executable" > -> "/gnu/store/.../bin/executable", and the latter file name > is architecture-dependent.=C2=A0 (This holds generally, including > for C headers). Thanks, coming from Nix I forgot that Guix does not make use of PATH.