From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 13086 invoked from network); 27 Nov 2021 20:15:30 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 27 Nov 2021 20:15:30 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1638044130; b=opa7aR/DLFozIjAMsc5eA+6wQySEDwW86tSKXMyuT6LNPzxhgTGGCFot4xWvGr8NOC8wA6pYkw aSyY8rvK/PFPoNKvkXPg/G9NIgQQ0b8WyWa1imp94Ub7qtHeTp3D85A6fo8TwaDszhruxC5YaP BBTxz1RO7kzFibIZxm1imz7jF70ZPoDCc/ol9zDHIqbkjHUWaVpLEvHsPpo4dNNjEdW/cIq9lt 9lBatBS8ybRfO4QXeCa33T2AY8lBrIgsARpY4fddtcy3yHI2NOXcyScyadtPzyISwf61coCtzB +visSR+JPUaHTYjjAOikZK13YKn/F+VfV77W3IYv88ngAA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-yb1-f180.google.com) smtp.remote-ip=209.85.219.180; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1638044130; bh=EnWsHNN7F+DUDTS2mnYqVM4cnl8V3qZ6oVGgowj0pj0=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=Ke/ckDduAaDSK8QN16fiB99MKqIFSlTaRVBZ4FbyGIg7chXQRsXWju0eypARYSbuleirPOF3SW SNEhep+ZUVyY3MklEymDkhaFAJUBM+7qY8LQjeeDw3Olpv4goXjolyMdWKzsv0hlYiy/APvUvb KZFPIwI97KyR0BDurjFaUkgR4I/o0K89bQydDRK+wtgzBIl4WDb5+xJfujGiSVgeU/VO7+KS4S ztN99drJiaEGfmOyF9VTKY7g13kuLxO7MEiRciSIHgVA5qKLL9NPVZC2U8VXYatPdyR6k79zTd OA5d9VcbXPArlHFaF7w+aWZYQeWpccW+Vnc48AfXW32Xnw==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=EnWsHNN7F+DUDTS2mnYqVM4cnl8V3qZ6oVGgowj0pj0=; b=hhFVYxGSKMSKjeIQywwWZ/VXYG Z3/X0TTF7zJOskGQwavjMHQHUz+2uG5ajDIVKfIAdZBSTXk6UdHPgy7Mm/5ppA3OYJYml44hfCGuk OmivGUQjzcZGyL7P5KF3E9EfRdWqZHLXFP1iej0d7wg5jXvLKqRQIQqxAfNUJDhPxHoJ0Ht8ET7rT 9na6oOFX4SDpcJvGsklq3bBkx2ConXrgaxUZIlGPWDVKBNyl7g1l23qiv1gi2+TAORX4gQifucEGF Cb+nzmhnUQbnRtnMehmfRfL7uQFUzQ1iybjBLjF1ZGBKslgciH/eMdEB7M/XVO7ESnlZWOYmEwet1 h3Zt7srg==; Received: from authenticated user by zero.zsh.org with local id 1mr46b-000OmI-Hl; Sat, 27 Nov 2021 20:15:29 +0000 Authentication-Results: zsh.org; iprev=pass (mail-yb1-f180.google.com) smtp.remote-ip=209.85.219.180; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-yb1-f180.google.com ([209.85.219.180]:37595) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1mr45t-000O1r-Cj; Sat, 27 Nov 2021 20:14:46 +0000 Received: by mail-yb1-f180.google.com with SMTP id e136so29598622ybc.4 for ; Sat, 27 Nov 2021 12:14:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EnWsHNN7F+DUDTS2mnYqVM4cnl8V3qZ6oVGgowj0pj0=; b=S5RqY5FkfywXAuuyANtcr6BmwtrE0G33zUICPkSOQGzzAaZqWk5QZ++M7/dmPR5A1P yVMzyYjERnBm2Zlw59cSbCjFbzhcM/yZTrHptCc5z7IsDDNPMoBTyam/OQTIRr+uPk+L DbbO4wKA4fkyzOxnx34aZ5w49I6i5Cxw50pDIDo9xas7/84ByP0ymv0jc8oRijef9+VO v5XkMoPK+gQkUx5+LIC/vNBSzIo9mMR+9jN0ZmUojcZ6MTj9nC4AOniRyK4phi/ANKLu g2N/ondv7P95Kqzx6m4yWLgOZVt2NdsycRN7525IlPrvez3/WA4ZWstLfz7Wu2X/gJjL XnDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EnWsHNN7F+DUDTS2mnYqVM4cnl8V3qZ6oVGgowj0pj0=; b=y9LYhKVvh/BrJDAp1k1I6ajAjhcc+OFNooJdSqUFdu7Sookk3TLmCEan7y3dsXQmLa OhMR2mi32PTOFxpZH1k9mED4nP6O6c9vJ0FFXOJlN3qVIadhI8pCykjFszB4qn4+I4zs DCKHQ5+EnPeW35sQTvwGUEBtTt5UYbXnm7H4p0Q7gPTATZlFDs5K+TA5vCKdu1e4yP4S ik0HB2YCAoZJSUZ6iaMO2YYPBO4KxvJx+tWV98/AQNorYe6PvuJ//qh/viXZMxkbt7BW cp4lehDet0/Kaq63KilN3gssMnu08L/IcFS258ZfZiPJOZ8BVB4Uo5grolSUQ8FzweJv zM6w== X-Gm-Message-State: AOAM533xKVJw9R34i+CuaVYrZsgIHpal8JIjpxJ23wXC1hw/u9YiJW3e eBwJZNkfMYJJ6ld++gcbWdrLzs3jRRM9dAuDYeRJYQ== X-Google-Smtp-Source: ABdhPJxhz4+DXlpqjqezW3tGZ7uvHVMK34rQOeEbX6e2xSl3C5E5bo676DSoWM84+7IFH45b0Z9zVOxBERBDsioDVus= X-Received: by 2002:a25:d453:: with SMTP id m80mr26499253ybf.289.1638044084512; Sat, 27 Nov 2021 12:14:44 -0800 (PST) MIME-Version: 1.0 References: <66a84643-de4f-ef74-4664-d2400f74f2e6@eastlink.ca> In-Reply-To: <66a84643-de4f-ef74-4664-d2400f74f2e6@eastlink.ca> From: Bart Schaefer Date: Sat, 27 Nov 2021 12:14:33 -0800 Message-ID: Subject: Re: Source mangling in $functions_source and typeset -f To: Ray Andrews Cc: Zsh Users Content-Type: text/plain; charset="UTF-8" X-Seq: 27374 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: On Sat, Nov 27, 2021 at 11:26 AM Ray Andrews wrote: > > On 2021-11-27 9:47 a.m., Bart Schaefer wrote: > > > > With the exception of the contents of strings (including > > here-documents), the original source of a function is not kept in > > shell memory. > That's most interesting, it seems circular so there must be a good > reason for it The parse is stored in a bytecode format (the same one used when writing a file with zcompile) so: It's much smaller than the source (usually), and takes up less memory. It's much closer to being directly executable than the source, and therefore faster. Zach's use case is unusual; there's typically not any reason to "preserve more".