From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32057 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "'William Lupton' via pandoc-discuss" Newsgroups: gmane.text.pandoc Subject: Re: Lua filter to process chunkedhtml output Date: Sat, 21 Jan 2023 12:28:32 +0000 Message-ID: References: <1D22B433-211B-4033-8A63-F637F52B2008@gmail.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000088146705f2c54ea1" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30925"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCS4HJ6WSAHBB7NUV6PAMGQEP7GOSEI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sat Jan 21 13:28:50 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-wm1-f63.google.com ([209.85.128.63]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pJCzJ-0007rg-Ir for gtp-pandoc-discuss@m.gmane-mx.org; Sat, 21 Jan 2023 13:28:49 +0100 Original-Received: by mail-wm1-f63.google.com with SMTP id p1-20020a05600c1d8100b003daff82f5edsf4589436wms.8 for ; Sat, 21 Jan 2023 04:28:49 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1674304129; cv=pass; d=google.com; s=arc-20160816; b=UjLj0nH4oh2FMGuzhofG7irdqLVxwm3pwxV1QYM8P59+TwGIEHvN/5nttWxWdqu2Qf YGGJd4GLHGgpNJYcESbzjI4S57CeE/ipPSQGDFfck2vMW5Hv32S03wy+aSJTbpekJV59 pqgjWRXxHJP6xEgHasB9sMWCZnUlrqrHr1IofH/5zIgBtzHM3POYXLU4dOy5eCVg6Bfu 5M8LaO9/pWn77jxkM/T4/svTCgLm4cYqCfW8yJBAEpF9uVlZDw6QBx/JO/C/UpDULRB5 PxVgmNWlMphajYD0Iy0oaziqn2eUq8FkWVGO8Ew+I+oCpeoIR+cygYV1YqTG4Adm8w75 spAQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:to:subject:message-id:date :from:in-reply-to:references:mime-version:dkim-signature; bh=ewvb3sQSFb9Nmi+btjY1WiHi2HGB3PXJkWarP1MEPiY=; b=ig/zl8bi1+mqkrTrLqwYnl5GYbq9luqit3YIDbjpbKQQKULNYp1BdSt6rz3zvYKkmO DMxebCkYNOXqs+boY7G6nzIP2ITv44jVnwvoMy9cDXwujmyAEZJm2hJ0iuCIjfNebuwR Z7UEbzx23oMYhkJ3cmkJ+0Z9V3qKsAN8tZ781CfvG909n5kUCB8t8TlKlrJdkHMUSSRm /GvzJo30jsAveufgZp18PgYq6Ilh8SC6I+I8ZV6jcU1/SbEKgPCjN5hIusLVy54pkQ5D gIz2ZQT02nU252XJ0ud2UZj/dD8Zdef0NpeoAnOwnkfDFiDoXlFCo3yrFUDOshJnztQ3 zBlg== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@broadband-forum.org header.s=google header.b=YGtmMsxL; spf=pass (google.com: domain of wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org designates 2a00:1450:4864:20::52e as permitted sender) smtp.mailfrom=wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadband-forum.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:to:subject :message-id:date:from:in-reply-to:references:mime-version:from:to:cc :subject:date:message-id:reply-to; bh=ewvb3sQSFb9Nmi+btjY1WiHi2HGB3PXJkWarP1MEPiY=; b=G85oUo7mZUGx6SE/WjuLiFhSp8w/qFCkd2mCs8BpGfqVJFLR83R6hJp7Ul7m95VCE2 B4JAa+GRe7V1OXHG0PajBHoCgFcs/ll70iVq2JYKNBFrtuDhl0l+MUvM1IBu1f3zQ2zr /jSA68nB2aYe09aocCsdNzj4hnTikL6bjKxzPRJeQCbJTcY4+IptUiK3rhWfyBAYxcYc Kd8TBqtQVO1HAVxHlTtGjrivmwW5k050yWHX2noTvqFYWOmmrpViSqjbDNcZZ8TD+xqS EuuyVLC1DeMxxJJsfhHm2b7u0mDgd2ElwJsHURbg6HCT3xZi123XJav8Bk04fMu9GALB q/6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:to:subject :message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ewvb3sQSFb9Nmi+btjY1WiHi2HGB3PXJkWarP1MEPiY=; b=uBBUNNCXuQ0rMl6THy4aocf0/dsYy9t1ZGStsVKsYKTXvdLn6RtI6O0i51qk/Qu5+h CNRlk/ju/rJ1Rw6CBbbYkMyTfzimtglpZsorgENJFGZoKg7msuzObJ3PXEryrak9FcWv MSxrklljdhxSVWHjqzM4vUzZPzlxH6l9LzoV2N4rex7w9/9A/NtydOjUbz+4BgoS4oV6 3kX+cwl2va0QtqdN7xLSoVgLpMKDvy8lo2tU7LBfRXZY5eY/5nQSodNfEUw6YIXGC9I7 yj6bcVLRKFE24vnbXHWngeuKYCiQWd/ARrEgtcLFp/VZa7D42LjYal47fjJwqWv X-Gm-Message-State: AFqh2kqf381LzkEZGT8nBnXe0kwjbdsmf202yiAsjAzNxlh7uPyqPkDY CVCxXb9uN9vmY4tfvN7N0BA= X-Google-Smtp-Source: AMrXdXsYUR84VhuKJe3J3GFR1/wniG9aXrOCDkkZ3Jc8tFukR7H28Z72RkGYW2szAar1tplmG4NL8g== X-Received: by 2002:a05:600c:3d1b:b0:3da:f475:6452 with SMTP id bh27-20020a05600c3d1b00b003daf4756452mr1260027wmb.0.1674304129037; Sat, 21 Jan 2023 04:28:49 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6000:25a:b0:269:604b:a0dd with SMTP id m26-20020a056000025a00b00269604ba0ddls4724082wrz.0.-pod-prod-gmail; Sat, 21 Jan 2023 04:28:44 -0800 (PST) X-Received: by 2002:adf:f78d:0:b0:2bd:bed5:9207 with SMTP id q13-20020adff78d000000b002bdbed59207mr16000649wrp.12.1674304124440; Sat, 21 Jan 2023 04:28:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674304124; cv=none; d=google.com; s=arc-20160816; b=hozNO8xKDGtGjCBNOsC/0/xn9OI4PUOCYMVJSMOIVqrAeUN5MASFxoss1k/nFK5tKw wfgOWOt0hB89DK0FW8bS3ymTVM4VXPRNHynVSJyiWwPQDLV6brfTCiL5dedWAGpI8uxF tqILks0Ciu9bqlg5cmG3jQnIlZpusyh38QgKFzxj3xhbVJNc55NVIQ7P0TEXXG+ksEJj 8gsy6rWOt/SmYFQVYECoc2dmzhYvD4oWd9WSTmkXZGzydccAs7ViCRJfNUN7RDZIoQhb cR28bgT+PO9OekOYTvnQO68JF9gZnyJPBC0veo4PEar1OIi7qq4u4yJWAy7faIbWey/F FeEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=k31b/Td+PgcUriYNZLpAbVYRArmNEi/69o4YU8NTAzc=; b=k8vj6psT3z7PybJW2lUd1Ks2euzFWRXItkJBKnKmfOuS978DzRST/QLPy0F+bspwGC vDpZdrcgGC5nu3syrYTxtuh9TtywmstHkGaZLjZH2JFxOkpoq9V237188iGcewdsVdM5 4lGORGZAMWv+varP0bEGb0NSlmuX2+cqUCccxLPE96v8izDeqr1DhobjKIua3OBRM+yw oKWvYW4R6ROxkNri9eMNq4SogwxiOY7s3cqAWaiq6ruqxTkgxIsmc//QwaY2B+CTxfQo iTfVmsRryjSV3Kvt3vUVAP2bgb1/vYfDF40wvmNbN6oYZVmk5E4l4wvMMmhRlRc4pPoB DpmA== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@broadband-forum.org header.s=google header.b=YGtmMsxL; spf=pass (google.com: domain of wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org designates 2a00:1450:4864:20::52e as permitted sender) smtp.mailfrom=wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadband-forum.org Original-Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com. [2a00:1450:4864:20::52e]) by gmr-mx.google.com with ESMTPS id c1-20020adfed81000000b002be29f05cdfsi568144wro.0.2023.01.21.04.28.44 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 21 Jan 2023 04:28:44 -0800 (PST) Received-SPF: pass (google.com: domain of wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org designates 2a00:1450:4864:20::52e as permitted sender) client-ip=2a00:1450:4864:20::52e; Original-Received: by mail-ed1-x52e.google.com with SMTP id v10so9602793edi.8 for ; Sat, 21 Jan 2023 04:28:44 -0800 (PST) X-Received: by 2002:aa7:d1c3:0:b0:49a:b8ee:ef4b with SMTP id g3-20020aa7d1c3000000b0049ab8eeef4bmr1791184edp.143.1674304123556; Sat, 21 Jan 2023 04:28:43 -0800 (PST) In-Reply-To: X-Original-Sender: wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@broadband-forum.org header.s=google header.b=YGtmMsxL; spf=pass (google.com: domain of wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org designates 2a00:1450:4864:20::52e as permitted sender) smtp.mailfrom=wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadband-forum.org X-Original-From: William Lupton Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:32057 Archived-At: --00000000000088146705f2c54ea1 Content-Type: text/plain; charset="UTF-8" pandoc.utils.type() return values seem to be a little inconsistent. For example, it can return: - 'List' ... for pandoc.List (note: logging.lua leaves this alone) - 'pandoc Xxx' ... for pandoc.Row etc. (note: logging.lua replaces the space with a dot) - 'HsLua.JSON.array' ... presumably for arrays that have come via a JSON library I was toying with not indicating HsLua.JSON.array (i.e., showing it like any other table) but perhaps it's better just to report things as they are. Can any other HsLua.JSON.xxx values be returned, e.g., why not HsLua.JSON.object or indeed HsLua.JSON.{boolean,number,string,null}? On Fri, 20 Jan 2023 at 16:33, William Lupton wrote: > Update: Until today, logging.lua assumed that pairs() would work on all > userdata. Option 2 (my favourite) should work well if there are ever any > other types of userdata (not sure whether there ever will be). > > On Fri, 20 Jan 2023 at 16:29, William Lupton > wrote: > >> Thanks Albert. I expect I'll raise an issue. I assume that this is the >> only use of light userdata? >> >> Looking more closely (why didn't I do this before?) I see that tostring() >> returns 'userdata: 0x0' for these values, so I think it makes sense to >> report them as one of: >> >> - Whatever tostring() returns >> - As above with the leading 'userdata: ' removed >> <--- probably my favourite >> - As above with '0x0' reported as 'nil' (not sure about this) >> >> >> On Fri, 20 Jan 2023 at 16:05, ChrisD wrote: >> >>> On 1/20/2023 2:54 AM, 'William Lupton' via pandoc-discuss wrote: >>> > I investigated, and parts of the writer options are "light userdata" >>> (I hadn't heard of that). I've committed and merged a fix that will report >>> such items as "". You can now list most of the writer options >>> (just a few colors show as ). >>> >>> Your update works well. (I didn't know about light userdata either.) >>> Thanks! >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "pandoc-discuss" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/pandoc-discuss/fbca8e05-fed7-39e1-08f0-0498c399f33f%40intielectronics.com >>> . >>> >> -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAEe_xxjkBZfgeh5jDbZNDNrFbG4SKTA0S9qjzaEXgxTr5BZVNw%40mail.gmail.com. --00000000000088146705f2c54ea1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
pandoc.utils.type() return values seem to be a little inco= nsistent. For example, it can return:
  • 'List' ... for pa= ndoc.List (note: logging.lua leaves this alone)
  • 'pandoc Xxx'= ; ... for pandoc.Row etc. (note: logging.lua replaces the space with a dot)=
  • 'HsLua.JSON.array' ... presumably for arrays that have com= e via a JSON library
I was toying with not indicating HsL= ua.JSON.array (i.e., showing it like any other table) but perhaps it's = better just to report things as they are. Can any other HsLua.JSON.xxx valu= es be returned, e.g., why not HsLua.JSON.object or indeed HsLua.JSON.{boole= an,number,string,null}?

On Fri, 20 Jan 2023 at 16:33, William Lu= pton <wlupton@broadband-f= orum.org> wrote:
Update: Until today, logging.lua assumed that pair= s() would work on all userdata. Option 2 (my favourite) should work well if= there are ever any other types of userdata (not sure whether there ever wi= ll be).


=
On 1/20/2023 2:54 AM, 'William Lupton' via pan= doc-discuss wrote:
> I investigated, and parts of the writer options are "light userda= ta" (I hadn't heard of that). I've committed and merged a fix = that will report such items as "<pointer>". You can now lis= t most of the writer options (just a few colors show as <pointer>).
Your update works well. (I didn't know about light userdata either.) Th= anks!

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d= /msgid/pandoc-discuss/fbca8e05-fed7-39e1-08f0-0498c399f33f%40intielectronic= s.com.

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.= google.com/d/msgid/pandoc-discuss/CAEe_xxjkBZfgeh5jDbZNDNrFbG4SKTA0S9qjzaEX= gxTr5BZVNw%40mail.gmail.com.
--00000000000088146705f2c54ea1--