From unknown Sat Jun 14 03:54:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#41981: Reference Manual on Vtables: Missing Information on Permission "h" Resent-From: Sebastian Miele Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sun, 21 Jun 2020 13:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 41981 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: 41981@debbugs.gnu.org X-Debbugs-Original-To: bug-guile@gnu.org Reply-To: sebastian.miele@gmail.com Received: via spool by submit@debbugs.gnu.org id=B.159274751217199 (code B ref -1); Sun, 21 Jun 2020 13:52:02 +0000 Received: (at submit) by debbugs.gnu.org; 21 Jun 2020 13:51:52 +0000 Received: from localhost ([127.0.0.1]:59362 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jn0O0-0004TK-EA for submit@debbugs.gnu.org; Sun, 21 Jun 2020 09:51:52 -0400 Received: from lists.gnu.org ([209.51.188.17]:50390) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jn0Nw-0004TB-FQ for submit@debbugs.gnu.org; Sun, 21 Jun 2020 09:51:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56554) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jn0Nw-0003lg-7s for bug-guile@gnu.org; Sun, 21 Jun 2020 09:51:48 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:34496) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jn0Nu-0002Xo-NR for bug-guile@gnu.org; Sun, 21 Jun 2020 09:51:47 -0400 Received: by mail-wr1-x434.google.com with SMTP id v3so6592296wrc.1 for ; Sun, 21 Jun 2020 06:51:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=user-agent:from:to:subject:reply-to:message-id:date:mime-version :content-transfer-encoding; bh=E/tCTDAfHTycx73MDkIQ8uEoBw6xwdniIxySzBBw7PU=; b=c5GNKIkudLI7DsEd0NGtWiN1XpeoqsjAhNMykc/LurLtQAS6OeqKCLN0N3JZGmztLH lkRaHWuKgHlDqBye1c5bvvC4iFSU4z6z0UcpNE6KZi5FHHjiKQDkucp5plsPDrySP8jH aUiCegk9KWt3n2MI9KTEQFBlxwi/mFkEEdFee56FEa+vCBxJyGALhGShUc7lGBZ/sFSK 1/EW/BtzN2xLlsiDOCBEMEhI/H8H0VkUY89bzoxafLSqoPDN3zUn1MllcLgPcdFIU3fd O+VccvCRyK5yutnDmxF4tEGINXEoBPWFuAyATOTk/0m7SC1SBShHo3vvitO6CG+G2/WT WnQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:user-agent:from:to:subject:reply-to:message-id :date:mime-version:content-transfer-encoding; bh=E/tCTDAfHTycx73MDkIQ8uEoBw6xwdniIxySzBBw7PU=; b=SPe5pe+HQg8gABQiiDdYk1ScRFke4xVZCDcTtmqSy3/ZlOOvZ6YrtTze4j3bD8VEiq 3LEH5WgDgtbzv0rgG1SQeivxbD7KLoHaWtLCeaRo09OWoIHA3EPxD8WrZmajx4Gfp/qE HiWynVySOyjYZFezwIWlvCAS3PpWijbFFFiUrNa+viX7wlE+aerMgtuA/ax3H4OgKvOQ LAFAx3dEblWi3aTslptAd6lfCoJqMX04PBJAh9ZMBtlgvsqalkTCHPxyNwYbmg2a3tuM HBGg7zyFt87GkGlDR63jpbiJMbZ3T5HE5MyQ1QTWIW6t0Tvtj1ocretH8OTjYq+w+1Cz nyYg== X-Gm-Message-State: AOAM532O3er29uWWsV9mkKoV4fTG5zBHmUxGEAhTKncuoiunxBurGqkb ZfPBdcjv+DfM1UMFSpPu4srNIcrX X-Google-Smtp-Source: ABdhPJxgWMfGhpGKSlGkx1U/4fNfIifviUQ3nSaU+LBgLpMJgr76eNYJXJFfskq4pfzTct51ZGcrIQ== X-Received: by 2002:a5d:470b:: with SMTP id y11mr4998547wrq.101.1592747505070; Sun, 21 Jun 2020 06:51:45 -0700 (PDT) Received: from huette ([2a02:908:175c:4260:33a6:b2b0:4ad5:928d]) by smtp.gmail.com with ESMTPSA id j6sm12571467wmb.3.2020.06.21.06.51.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Jun 2020 06:51:44 -0700 (PDT) User-agent: mu4e 1.4.10; emacs 26.3 From: Sebastian Miele Message-ID: <87h7v4o7bl.fsf@gmail.com> Date: Sun, 21 Jun 2020 15:51:42 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=sebastian.miele@gmail.com; helo=mail-wr1-x434.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: 0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) I am on the current master branch. The standard-vtable-fields is "pwuhuhpwphuhuhuh" on my system and something similar in the Reference Manual. In particular, it contains the permission letter "h", but I find no explanation in the manual what that means. Section 6.6.18.1 (Vtables) just mentions: "It used to be that the second letter for each field was a permission code, such as =E2=80=98w=E2=80=99 fo= r writable or =E2=80=98r=E2=80=99 for read-only." And that read-only has become depriciat= ed. At the end of section 6.6.18.4 (Meta-Vtables) is an example: (define* (make-vtable fields #:optional printer) (make-struct/no-tail (make-struct-layout fields) printer)) Without information on "h", I was not able to make sense of the fact, that fields with permission "h" somehow seem to be skipped by make-struct/no-tail when processing the two init values. In particular, for some reason, the value of printer is put into field 3 of the new structure and not in field 1, almost certainly somehow because fields 1 and 2 have "h". "h" should be documented. From unknown Sat Jun 14 03:54:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#41981: Reference Manual on Vtables: Missing Information on Permission "h" References: <87h7v4o7bl.fsf@gmail.com> In-Reply-To: <87h7v4o7bl.fsf@gmail.com> Resent-From: dsmich@roadrunner.com Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sun, 21 Jun 2020 16:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41981 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: "'sebastian.miele@gmail.com'" Cc: "'41981@debbugs.gnu.org'" <41981@debbugs.gnu.org> Received: via spool by 41981-submit@debbugs.gnu.org id=B41981.15927569691844 (code B ref 41981); Sun, 21 Jun 2020 16:30:02 +0000 Received: (at 41981) by debbugs.gnu.org; 21 Jun 2020 16:29:29 +0000 Received: from localhost ([127.0.0.1]:60838 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jn2qX-0000Tg-3h for submit@debbugs.gnu.org; Sun, 21 Jun 2020 12:29:29 -0400 Received: from p-impout008aa.msg.pkvw.co.charter.net ([47.43.26.139]:50176 helo=p-impout001.msg.pkvw.co.charter.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jn2qV-0000TP-AD for 41981@debbugs.gnu.org; Sun, 21 Jun 2020 12:29:27 -0400 Received: from localhost ([54.243.7.172]) by cmsmtp with ESMTP id n2qOj7Td6rzR3n2qOjY1sg; Sun, 21 Jun 2020 16:29:21 +0000 X-Authority-Analysis: v=2.3 cv=Ne6YKFL4 c=1 sm=1 tr=0 a=ZhHbwgLlxfPm5G22ibXkng==:117 a=ZhHbwgLlxfPm5G22ibXkng==:17 a=dSg6v7tjMxUA:10 a=CBOLoNZij_M0PpjjjAgA:9 a=QEXdDO2ut3YA:10 a=pGLkceISAAAA:8 a=XGPFnEA_GmDCJZclgAMA:9 a=_W_S_7VecoQA:10 Message-Id: From: dsmich@roadrunner.com X-Mailer: Atmail X-Originating-IP: [65.185.85.154] X-Priority: 3 Importance: Normal X-MSMail-Priority: Normal Date: Sun, 21 Jun 2020 16:29:20 +0000 Content-Type: multipart/alternative; boundary="=_52385ca06dfc66f97c4a06c19e36ee52" MIME-Version: 1.0 X-CMAE-Envelope: MS4wfC43UP0MF8tY3ZRzg7rdAgBNvjpmx9b0PQ2LImcCLnB/09HA/XmpmRySHbzqn5/Mo6qyk0tMp00hTrODo3PL5M7QILlFHI8OKydHKLJrJ90Pz3IP7ZyF tSzrhuJXzksM1yOH4JsneTBA5gvEOIuGgcRYm4sItCuHUKbUGE5ex5JKHucAvLAgbF7iNCEdlL/qIfNCi8b4QZbBn1JLABZjzH8= X-Spam-Score: 1.8 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Is is documented in the docstring: scheme@(guile-user)> ,d make-struct-layout - Scheme Procedure: make-struct-layout fields Return a new structure layout object. FIELDS must be a string made up of pairs of characters strung together. The first character of each pair describes a field type, the second a field protection. Allowed types are 'p' for GC-protected [...] Content analysis details: (1.8 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [47.43.26.139 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 HTML_MESSAGE BODY: HTML included in message 1.8 MISSING_MIMEOLE Message has X-MSMail-Priority, but no X-MimeOLE X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.8 (/) --=_52385ca06dfc66f97c4a06c19e36ee52 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Is is documented in the docstring:=0A=0Ascheme@(guile-user)> ,d make-str= uct-layout=0A- Scheme Procedure: make-struct-layout fields=0A Return a n= ew structure layout object.=0A=0A FIELDS must be a string made up of pai= rs of characters strung=0A together. The first character of each pair de= scribes a field type,=0A the second a field protection. Allowed types ar= e 'p' for=0A GC-protected Scheme data, 'u' for unprotected binary data.= Allowed=0A protections are 'w' for normal fields or 'h' for hidden fiel= ds.=0A=0A Hidden fields are writable, but they will not consume an=0A in= itializer arg passed to `make-struct'. They are useful to add=0A slots t= o a struct in a way that preserves backward-compatibility=0A with existi= ng calls to `make-struct', especially for derived=0A vtables.=0A=0A --=_52385ca06dfc66f97c4a06c19e36ee52 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Is is documented in the docstring:

scheme@(guile-user= )> ,d make-struct-layout
- Scheme Procedure: make-struct-layout fi= elds
     Return a new structure layout object.
     FIELDS must be a string made up of pairs= of characters strung
     together.  The fi= rst character of each pair describes a field type,
   =   the second a field protection.  Allowed types are 'p' for     GC-protected Scheme data, 'u' for unprotected= binary data.  Allowed
     protections are= 'w' for normal fields or 'h' for hidden fields.

  &nbs= p;  Hidden fields are writable, but they will not consume an
&nb= sp;    initializer arg passed to `make-struct'.  The= y are useful to add
     slots to a struct in a w= ay that preserves backward-compatibility
     wit= h existing calls to `make-struct', especially for derived
  = ;   vtables.


=0A --=_52385ca06dfc66f97c4a06c19e36ee52-- From unknown Sat Jun 14 03:54:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#41981: Reference Manual on Vtables: Missing Information on Permission "h" Resent-From: Sebastian Miele Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Mon, 22 Jun 2020 13:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41981 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: dsmich@roadrunner.com Cc: "'41981@debbugs.gnu.org'" <41981@debbugs.gnu.org> Reply-To: sebastian.miele@gmail.com Received: via spool by 41981-submit@debbugs.gnu.org id=B41981.159283337629943 (code B ref 41981); Mon, 22 Jun 2020 13:43:02 +0000 Received: (at 41981) by debbugs.gnu.org; 22 Jun 2020 13:42:56 +0000 Received: from localhost ([127.0.0.1]:33496 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jnMiu-0007ms-Gw for submit@debbugs.gnu.org; Mon, 22 Jun 2020 09:42:56 -0400 Received: from mail-wr1-f42.google.com ([209.85.221.42]:34763) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jnMir-0007mc-U3 for 41981@debbugs.gnu.org; Mon, 22 Jun 2020 09:42:54 -0400 Received: by mail-wr1-f42.google.com with SMTP id v3so9248929wrc.1 for <41981@debbugs.gnu.org>; Mon, 22 Jun 2020 06:42:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:reply-to:in-reply-to :message-id:date:mime-version:content-transfer-encoding; bh=bnsxd2/WRUyg0Uhljc0S3WDQc7lYULVQC2CKE6Fl+U8=; b=eSw2f9T/2W9l9l9oTk7KJkkq2By2iYrojGqy2m+c40tQ23n5TXTnPfpqtdZj9pD4B5 0/445h26aosJITOeA1UjDW4I+nCYcMV+fFmBgKJVfDSQQMWeElPshSNvQs8lkjAWM2p7 a1GXiVPJ5FekYeZ18pXVAkUfyPgH7WN0E9nJhTp9U7v8pnJUgsVdTetWVUGwBjJ/+Oi3 qqzEwNsEvnMb9jHe+Ne+81a09FK2HU2tJJAXd5pfcTpdXFm7twFKE22tGMvo5swQLSS9 NsmRJcApGTCQe25Xs3w2fl9SOSccmnX/8pL/ADTPVPn5qwQErGfYvD/hdjhfxFT7YxhY MKpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :reply-to:in-reply-to:message-id:date:mime-version :content-transfer-encoding; bh=bnsxd2/WRUyg0Uhljc0S3WDQc7lYULVQC2CKE6Fl+U8=; b=qdgBrWP6UN7WVqwxZZhVZIQZcd0Hz75keui3mBRxLpoW4uF6wr+ac9LBhk+s+eEMUr bL/4vVghGApaA0hBR6W4ygsvbJ3CkKUDnsCj9oxccwtkb90ZBYgNybNiaX8C9PdLC4KV FSzM/l1N+t6VhBhOw9QJQlIrKDqkMVLKszy8+Gh6zXGw0H+mCEiRXEyqDeFGpbrLWPJ2 lyJd6JiNNpx5qjShTJ44kdsszNxlbimBrN55zAtxDF1aSSNZTZxo4r+n1NV8nlxKiJl5 n/EvzNpnhpg2ejAQ8IpJxce8VYUPdNnySpOYsw7zRrxYs6ZT5O3i9yQ3S8q2AtNTzgFi eY2Q== X-Gm-Message-State: AOAM530CNok2PPyxsJp8W+aVDSnBLGhgPldl7NODlGYQjMtT3BocjYs7 hiEuDjeRLIfmxRGYNnFMjK1S6V7t X-Google-Smtp-Source: ABdhPJz7tS4LVA6IinPM7b5VzCf5NqisLlzEzZEOb3sjuWikHlecrTwxtQ155e9GaaQvEsHZiURGRw== X-Received: by 2002:a5d:56c7:: with SMTP id m7mr19020726wrw.223.1592833367792; Mon, 22 Jun 2020 06:42:47 -0700 (PDT) Received: from huette ([2a02:908:175c:4260:33a6:b2b0:4ad5:928d]) by smtp.gmail.com with ESMTPSA id j41sm18994260wre.12.2020.06.22.06.42.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jun 2020 06:42:47 -0700 (PDT) References: User-agent: mu4e 1.4.10; emacs 26.3 From: Sebastian Miele In-reply-to: Message-ID: <877dvzkyi1.fsf@gmail.com> Date: Mon, 22 Jun 2020 15:42:46 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) dsmich@roadrunner.com writes: > Is is documented in the docstring: > > scheme@(guile-user)> ,d make-struct-layout In the reference manual, a description of make-struct-layout directly precedes the '(define* (make-vtable ..) ..)' example that cannot be understood without somehow grasping what is documented about "h" in the docstring of make-struct-layout. However, the description of make-struct-layout in the reference manual says: "FIELDS is as described under =E2=80=98make-vtable=E2=80=99 (*note Vtables::)". But that descriptio= n lacks the information on "h". It may be a matter of opinion. But my opinion stronly is that descriptions about the behavior around permission "h" do should appear in the reference manual in two places: The description of make-vtable and the description of make-struct/no-tail. After glancing at libguile/struct.c, "w", "h", and the depreciated "r" seem in fact to be all possible permissions. I will prepare a patch after I finish getting a good overview of Guile.