From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/28283 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: Do Pandoc's conversion functions which exist in both directions guarantee/aim for bijectivity? Date: Tue, 04 May 2021 10:44:12 -0700 Message-ID: References: <2ffba3ed-4e84-45ad-9eea-f4fb4b2da636n@googlegroups.com> <9f900b8c-9341-3549-1b31-eeb3f5a9b320@usa.net> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34637"; mail-complaints-to="usenet@ciao.gmane.io" To: Daniel Staal , pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCJZJHG45QDBB6MPY2CAMGQE7VND6EI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue May 04 19:44:29 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-yb1-f186.google.com ([209.85.219.186]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ldz5w-0008t1-1L for gtp-pandoc-discuss@m.gmane-mx.org; Tue, 04 May 2021 19:44:28 +0200 Original-Received: by mail-yb1-f186.google.com with SMTP id 184-20020a250cc10000b02904ee21d0e583sf12725445ybm.6 for ; Tue, 04 May 2021 10:44:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1620150267; cv=pass; d=google.com; s=arc-20160816; b=jHCHxnAG795qW80R+ogi6jDYfmbW5S4bhSGyN28QrkdFdqdnUHPs+Askyzs+TMqHjz BzDy5aXufiLnl+idraFbXF5xy3zTKdt2gi8eTsXo8pML6CaPIv98QG+aAiQSTjlegExN Ci7v4T2skOw/F6wLQPUV3jHE5yAY52cCGrP71+nOKmzEX6MWsmvYf4nQZsDht4l3ZXfD Pkl9sSQyQKhvX54X2sVQOd10jWbYH3ycDE/3ja86RW2aisTHGThsKrmHN7/VhDGIJG70 8Sm5Od8aYYHUlsNmnuYPynpm4QkZTl4f5QfsuZ/9E3OewiqbFsnhW/aciJdMr0yZqvyw DLMw== 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:mime-version:message-id :date:references:in-reply-to:subject:to:from:sender:dkim-signature; bh=o1grbaLRWoaxlY1swkDAc3aDfS4wyB/LsOpVkeiH7kA=; b=r8M+pXpKeO0hqCzx8kEI2lu26nBFHKFE4eC0uRC+zM2PAcyJTV/Z7HWD+1Am3qK09N 2SBdBBdUAesCN2eDTrTFFBLZmtrM7t6OJAllSo5bT0f80lvAGr7UFI9I2yNdQlx891C5 c3qgYqlxTKjP83ek4P8wU8+tg2VVKZ7fI8RkJaIs6mmKbiAGi5XltfWdaQy0JbpfeHMG paA9dEfPYTK+cCdwDjgAUEowFfItNrsDXp+I9EKi9eXKMUlZHb8wZKMyEKqw3VFLZYnD s8/Sa1tXjYw4seD23/mmUEspdZ5Doe9cukkb6yRFq9/OjipJMHjFivf+uE+xKy0aze6w f/WA== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b="hx/QiO5C"; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::434 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:from:to:subject:in-reply-to:references:date:message-id :mime-version:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=o1grbaLRWoaxlY1swkDAc3aDfS4wyB/LsOpVkeiH7kA=; b=ObNpLFW0rlLy5fKEYbiqiWY3mdpEavib0KQZfO4bBqFmjxs3PjC5DvamxrHQNSOaF7 j+3flasTSbs6FM75mnsoMx+Ja/JUhllJSaer9pnoCjkKIhZYWPwIHInZb3nU8d9gQHM4 y4c50g1du91ZESK8wq1MUKmgtZYskcVAuUNwZvCwj4OWI0p6Id/UzQvX42CXtt0xcJR+ H+lpBQrtfepDNYj0eZzRg8tN2hmgcX4csvPB+q5sWbyurjQTcWTMJl/hBqTfjjOehf2W JNJEbcvHQSVzGcWnjBjWzXnuwlsKrezVOTuXPtvnHQQD5xk3k01aw1LZ/iBe8tDqdePu KZPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:from:to:subject:in-reply-to:references :date:message-id:mime-version:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=o1grbaLRWoaxlY1swkDAc3aDfS4wyB/LsOpVkeiH7kA=; b=mpgZ8TI20qdEjuUCH3EIaLiH49fOQ6q02aW+lmoXcYcsaehEOy4FsyEhd5l8J0qido +0hdNfV/7muAv1RUtLfEXZjPsZcHodGHzaQiG9/0GJUUhWMi9U0w67Z0ax8svD8J02hk qauWXFzGB1zJM5YMVvOmUvhyKk1rVvGSRHncft11EC9+o/Qhw76MFbm9anIARWNb0Odi ie1x9puXT+w9HK0hhe/B2Mxba96Q+cG37asBDzog5T6LCmE0htbGEdi52xFf9pIyAAEK SIFl8g01XoLhinCuBdiHSAKR5wTzeOw49cs4FuPa3pyRP/8qPwBGC5zA6ruzwd46/EpA kLhw== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM533bQ+651oZJMrxAjRg+cv1d7CMXM8RLno38AihB7VqHUzfQllLA /noKn31Dd842dt9TBg6ists= X-Google-Smtp-Source: ABdhPJxu6ydv0sYvq7BJ6RQzxR1a9qrDL0To4lRtmDSE/IZrG69ZRlWF1QW9v92d5ic/dF2UgHKYcA== X-Received: by 2002:a25:a067:: with SMTP id x94mr38471233ybh.42.1620150267120; Tue, 04 May 2021 10:44:27 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a25:9307:: with SMTP id f7ls8981207ybo.10.gmail; Tue, 04 May 2021 10:44:25 -0700 (PDT) X-Received: by 2002:a25:d8d6:: with SMTP id p205mr646851ybg.252.1620150265000; Tue, 04 May 2021 10:44:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620150264; cv=none; d=google.com; s=arc-20160816; b=hzlPytQNngO+I6AsVUzuGy6Q0azMPCUap+NSTN1IOsvzyK/Bjlyrf4THjxxJ9xn4iK iVohz5xMSx7V2GN+NXqs6/Kg4URCsxSthhFNcTiRbmoF4dBtQhxP7Jgk91w0qHagbpBK pGkMpdLXJ1NJKU59mLXMLDyV4T4SWXCSJ7N113IV1TF/s1VoSBHhZQjMbrSa4lULrgzk ZFCpeSuIkuZIULHvkMwA8XYe2UZxcoIX8N5vHMhJPzW20jcWYM2lLRFIoyQB39wU8pAc h9qyciiSfr9oQyOP6M2QFmJ0mO0u0oKMd4qIeZI+Elf3UgJ1v9h/NvH6mppneb0b51dj oKdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:message-id:date:references:in-reply-to:subject:to:from :dkim-signature; bh=yP601Z0oo2DvupjbIv6Gq/dvqn2J13OE0zmDdWxMiLM=; b=MBr3OGlXhwfA5UsmcY+7y/PqJh5f0XcHivMOs2SrwzTgpwcZvTJZU3unGHDrXAEhgA tKHAFfKzdq6/A19JyZnNjLR1oSfL5HlSZqz2IQSw4HhT/0W+6T6w5u5eYVDSPWzUmeFr fFTi1Lq23rAwP23QDEZG0VJSM78nPQ1tOaqh6bxtGVW/umn4dRt1pfhlPZmEpBtkXha/ iosd42Cbo37jCsVJWjx5Omss1BJXx6N4y6r/pkUsrshAjUDUdZeXZaq+gq0JsfoFyKCx 51W+taQTs7QsjtNUTESYzI0qRKDGh3nIHb6IUhu5CClCvMWiuIajRDBFgW7H2bgfzVCB XuQQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b="hx/QiO5C"; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::434 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org Original-Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com. [2607:f8b0:4864:20::434]) by gmr-mx.google.com with ESMTPS id i15si248400ybk.2.2021.05.04.10.44.24 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 04 May 2021 10:44:24 -0700 (PDT) Received-SPF: pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::434 as permitted sender) client-ip=2607:f8b0:4864:20::434; Original-Received: by mail-pf1-x434.google.com with SMTP id m11so8490986pfc.11 for ; Tue, 04 May 2021 10:44:24 -0700 (PDT) X-Received: by 2002:a63:445e:: with SMTP id t30mr23993663pgk.367.1620150264132; Tue, 04 May 2021 10:44:24 -0700 (PDT) Original-Received: from johnmacfarlane.net (li55-134.members.linode.com. [74.82.3.134]) by smtp.gmail.com with ESMTPSA id q27sm7532556pfl.41.2021.05.04.10.44.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 May 2021 10:44:23 -0700 (PDT) Original-Received: by johnmacfarlane.net (Postfix, from userid 1000) id 72A3AA231; Tue, 4 May 2021 13:44:12 -0400 (EDT) In-Reply-To: <9f900b8c-9341-3549-1b31-eeb3f5a9b320-Jdbf3xiKgS8@public.gmane.org> X-Original-Sender: jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b="hx/QiO5C"; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::434 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org 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:28283 Archived-At: This is correct. We aspire to semantic equivalence but definitely not syntactic. For example, if you convert hi # there to Markdown you may get hi \# there Ideally, we'd have the following invariant: doc == readF (writeF doc) where readF/writeF are the reader and writer for a format, with the same extensions set, and doc is an arbitrary Pandoc AST. I wouldn't say we have this now with most formats. Running this sort of test can indicate places where the reader or writer needs to be improved. Daniel Staal writes: > I don't believe there's any particular aim for it -- notably the > Markdown format is known to not always return the input when run on > itself. The aim is for the output to be the semantic equivalent, not > that it will be the same. > > Daniel T. Staal