unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxime Devos <maximedevos@telenet.be>
To: mcsinyx@disroot.org, "Mája Tomášek" <maya.tomasek@disroot.org>,
	guix-devel@gnu.org
Subject: Re: Strategy for Zig packages
Date: Tue, 2 Aug 2022 11:09:11 +0200	[thread overview]
Message-ID: <c70b3c23-fd59-a7be-1f0f-36837477039a@telenet.be> (raw)
In-Reply-To: <CLVAH250NBKA.32AZ0R6VV1YR8@nix>


[-- Attachment #1.1.1.1: Type: text/plain, Size: 1386 bytes --]


On 02-08-2022 07:21, mcsinyx@disroot.org wrote:
> On Mon Aug 1, 2022 at 10:43 PM +0200, Mája Tomášek 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.
>
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.

Likewise, 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.

(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.)

(*) Including macros that can run arbitrary Rust code, see 
<https://doc.rust-lang.org/book/ch19-06-macros.html#declarative-macros-with-macro_rules-for-general-metaprogramming>, 
so there you have compile-time execution too!

Greetings,
Maxime.


[-- Attachment #1.1.1.2: Type: text/html, Size: 2251 bytes --]

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

  reply	other threads:[~2022-08-02 10:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-26 10:56 Strategy for Zig packages mcsinyx
2022-07-26 18:48 ` Liliana Marie Prikler
2022-07-26 19:23   ` Maxime Devos
2022-08-01 20:43 ` Mája Tomášek
2022-08-02  5:21   ` mcsinyx
2022-08-02  9:09     ` Maxime Devos [this message]
2022-08-03  3:35       ` mcsinyx
2022-08-04 23:56         ` Maxime Devos
2022-08-02  9:11     ` Maxime Devos
2022-08-02  9:01   ` Maxime Devos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c70b3c23-fd59-a7be-1f0f-36837477039a@telenet.be \
    --to=maximedevos@telenet.be \
    --cc=guix-devel@gnu.org \
    --cc=maya.tomasek@disroot.org \
    --cc=mcsinyx@disroot.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).