public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Do Pandoc's conversion functions which exist in both directions guarantee/aim for bijectivity?
@ 2021-05-03 22:23 Jeffrey Wang
       [not found] ` <2ffba3ed-4e84-45ad-9eea-f4fb4b2da636n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Jeffrey Wang @ 2021-05-03 22:23 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 728 bytes --]

I was not able to find any concrete information establishing the answer to 
this question. I ask this to see how much I can depend on using Pandoc for 
an application that would convert back and forth between two formats, one 
for storage/authoritative purposes and the other for rendering/display 
purposes. 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/2ffba3ed-4e84-45ad-9eea-f4fb4b2da636n%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 1009 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Do Pandoc's conversion functions which exist in both directions guarantee/aim for bijectivity?
       [not found] ` <2ffba3ed-4e84-45ad-9eea-f4fb4b2da636n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2021-05-03 22:34   ` Daniel Staal
       [not found]     ` <9f900b8c-9341-3549-1b31-eeb3f5a9b320-Jdbf3xiKgS8@public.gmane.org>
  2021-05-04 20:24   ` christi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
  1 sibling, 1 reply; 7+ messages in thread
From: Daniel Staal @ 2021-05-03 22:34 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

On 5/3/21 6:23 PM, Jeffrey Wang wrote:
> I was not able to find any concrete information establishing the answer 
> to this question. I ask this to see how much I can depend on using 
> Pandoc for an application that would convert back and forth between two 
> formats, one for storage/authoritative purposes and the other for 
> rendering/display purposes. Thanks!

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

-- 
---------------------------------------------------------------
This email copyright the author.  Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes.  This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---------------------------------------------------------------


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Do Pandoc's conversion functions which exist in both directions guarantee/aim for bijectivity?
       [not found]     ` <9f900b8c-9341-3549-1b31-eeb3f5a9b320-Jdbf3xiKgS8@public.gmane.org>
@ 2021-05-04 17:44       ` John MacFarlane
  0 siblings, 0 replies; 7+ messages in thread
From: John MacFarlane @ 2021-05-04 17:44 UTC (permalink / raw)
  To: Daniel Staal, pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


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 <DStaal-Jdbf3xiKgS8@public.gmane.org> 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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Do Pandoc's conversion functions which exist in both directions guarantee/aim for bijectivity?
       [not found] ` <2ffba3ed-4e84-45ad-9eea-f4fb4b2da636n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2021-05-03 22:34   ` Daniel Staal
@ 2021-05-04 20:24   ` christi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
       [not found]     ` <0b756db2-f247-49b1-a7dd-e0242e79d956n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  1 sibling, 1 reply; 7+ messages in thread
From: christi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org @ 2021-05-04 20:24 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1021 bytes --]

There’s actually lots of info about this. Pandoc is not even idempotent, 
let alone bijective.

So no, you cannot depend on this especially if you want to convert it back 
and forth a lot of times.

On Monday, May 3, 2021 at 3:23:12 PM UTC-7 Jeffrey Wang wrote:

> I was not able to find any concrete information establishing the answer to 
> this question. I ask this to see how much I can depend on using Pandoc for 
> an application that would convert back and forth between two formats, one 
> for storage/authoritative purposes and the other for rendering/display 
> purposes. 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/0b756db2-f247-49b1-a7dd-e0242e79d956n%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 1513 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Do Pandoc's conversion functions which exist in both directions guarantee/aim for bijectivity?
       [not found]     ` <0b756db2-f247-49b1-a7dd-e0242e79d956n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2021-05-04 21:22       ` Jeffrey Wang
       [not found]         ` <CACZurRei78h_5EG4vSUdhS+GFaF-gUVnCB=eVXh98f6ULpCuXA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Jeffrey Wang @ 2021-05-04 21:22 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 2450 bytes --]

Great, thanks for the insight everybody, especially John's confirmation
seals the deal.

In response to "there's actually lots of info about this", I apologize
that Google's search engine was not strong enough to find me this
information. I also apologize that I did not invent Google and add semantic
search to it. I promise I have tried hard to search for this information
before bothering anybody, and I very much appreciate the explicit
clarification.

Regards,
*Jeffrey Wang*
jeffwang16-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org


On Tue, May 4, 2021 at 3:25 PM christi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <
christian.kolen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

> There’s actually lots of info about this. Pandoc is not even idempotent,
> let alone bijective.
>
> So no, you cannot depend on this especially if you want to convert it back
> and forth a lot of times.
>
> On Monday, May 3, 2021 at 3:23:12 PM UTC-7 Jeffrey Wang wrote:
>
>> I was not able to find any concrete information establishing the answer
>> to this question. I ask this to see how much I can depend on using Pandoc
>> for an application that would convert back and forth between two formats,
>> one for storage/authoritative purposes and the other for rendering/display
>> purposes. Thanks!
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "pandoc-discuss" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/pandoc-discuss/NFwWouErsf8/unsubscribe.
> To unsubscribe from this group and all its topics, 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/0b756db2-f247-49b1-a7dd-e0242e79d956n%40googlegroups.com
> <https://groups.google.com/d/msgid/pandoc-discuss/0b756db2-f247-49b1-a7dd-e0242e79d956n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CACZurRei78h_5EG4vSUdhS%2BGFaF-gUVnCB%3DeVXh98f6ULpCuXA%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 4025 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Do Pandoc's conversion functions which exist in both directions guarantee/aim for bijectivity?
       [not found]         ` <CACZurRei78h_5EG4vSUdhS+GFaF-gUVnCB=eVXh98f6ULpCuXA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2021-05-04 21:34           ` christi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
       [not found]             ` <81417776-15c4-4dfb-8229-0dc15614c88dn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: christi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org @ 2021-05-04 21:34 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 3972 bytes --]

No worries. I should have mentioned where you could get the info than just 
saying it’s there

It is mentioned in the manual in a subtle way. After you read this thread 
then you’d understand the wordings in the manual means it is not bijective. 
(I forgot what wording it uses, but the problem is that the info is there 
but sometimes not immediately recognizable. May be it didn’t use the word 
lossy, but did mention it’s limitation.)

It is also frequently mentioned in this pandoc-discuss. And in fact I was 
in your shoes asking for this years ago and wrote a summary on this here. 
Ie rather than searching the whole web, searching pandoc-discuss would be 
more fruitful.

But sometimes the search here aren’t great, ironically I think searching in 
google with a phase of pandoc-discuss might help narrow it down better.

Also, I share your frustration that stuffs we ask/mention are almost always 
out there but just that we can’t discover that. So rather than tempting 
others to correct you (that the info does exist), simply asking it might be 
better, and that’s what pandoc-discuss is for. Unlike GitHub issue where 
people should obey much stricter rule of not emitting noise (frequently 
violated in pandoc’s issue tracker unfortunately and people are too kind to 
suppress them), pandoc-discuss is for any pandoc related questions, 
repeated or not.

On Tuesday, May 4, 2021 at 2:22:48 PM UTC-7 Jeffrey Wang wrote:

> Great, thanks for the insight everybody, especially John's confirmation 
> seals the deal.
>
> In response to "there's actually lots of info about this", I apologize 
> that Google's search engine was not strong enough to find me this 
> information. I also apologize that I did not invent Google and add semantic 
> search to it. I promise I have tried hard to search for this information 
> before bothering anybody, and I very much appreciate the explicit 
> clarification.
>
> Regards,
> *Jeffrey Wang*
> jeffw...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
>
>
> On Tue, May 4, 2021 at 3:25 PM christi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <christi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 
> wrote:
>
>> There’s actually lots of info about this. Pandoc is not even idempotent, 
>> let alone bijective.
>>
>> So no, you cannot depend on this especially if you want to convert it 
>> back and forth a lot of times.
>>
>> On Monday, May 3, 2021 at 3:23:12 PM UTC-7 Jeffrey Wang wrote:
>>
>>> I was not able to find any concrete information establishing the answer 
>>> to this question. I ask this to see how much I can depend on using Pandoc 
>>> for an application that would convert back and forth between two formats, 
>>> one for storage/authoritative purposes and the other for rendering/display 
>>> purposes. Thanks!
>>
>> -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "pandoc-discuss" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/pandoc-discuss/NFwWouErsf8/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/pandoc-discuss/0b756db2-f247-49b1-a7dd-e0242e79d956n%40googlegroups.com 
>> <https://groups.google.com/d/msgid/pandoc-discuss/0b756db2-f247-49b1-a7dd-e0242e79d956n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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/81417776-15c4-4dfb-8229-0dc15614c88dn%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 6349 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Do Pandoc's conversion functions which exist in both directions guarantee/aim for bijectivity?
       [not found]             ` <81417776-15c4-4dfb-8229-0dc15614c88dn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2021-05-04 21:35               ` Jeffrey Wang
  0 siblings, 0 replies; 7+ messages in thread
From: Jeffrey Wang @ 2021-05-04 21:35 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 5031 bytes --]

Thank you so much! Glad I found the right place to ask :)

Regards,
*Jeffrey Wang*
jeffwang16-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org


On Tue, May 4, 2021 at 4:34 PM christi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <
christian.kolen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

> No worries. I should have mentioned where you could get the info than just
> saying it’s there
>
> It is mentioned in the manual in a subtle way. After you read this thread
> then you’d understand the wordings in the manual means it is not bijective.
> (I forgot what wording it uses, but the problem is that the info is there
> but sometimes not immediately recognizable. May be it didn’t use the word
> lossy, but did mention it’s limitation.)
>
> It is also frequently mentioned in this pandoc-discuss. And in fact I was
> in your shoes asking for this years ago and wrote a summary on this here.
> Ie rather than searching the whole web, searching pandoc-discuss would be
> more fruitful.
>
> But sometimes the search here aren’t great, ironically I think searching
> in google with a phase of pandoc-discuss might help narrow it down better.
>
> Also, I share your frustration that stuffs we ask/mention are almost
> always out there but just that we can’t discover that. So rather than
> tempting others to correct you (that the info does exist), simply asking it
> might be better, and that’s what pandoc-discuss is for. Unlike GitHub issue
> where people should obey much stricter rule of not emitting noise
> (frequently violated in pandoc’s issue tracker unfortunately and people are
> too kind to suppress them), pandoc-discuss is for any pandoc related
> questions, repeated or not.
>
> On Tuesday, May 4, 2021 at 2:22:48 PM UTC-7 Jeffrey Wang wrote:
>
>> Great, thanks for the insight everybody, especially John's confirmation
>> seals the deal.
>>
>> In response to "there's actually lots of info about this", I apologize
>> that Google's search engine was not strong enough to find me this
>> information. I also apologize that I did not invent Google and add semantic
>> search to it. I promise I have tried hard to search for this information
>> before bothering anybody, and I very much appreciate the explicit
>> clarification.
>>
>> Regards,
>> *Jeffrey Wang*
>> jeffw...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
>>
>>
>> On Tue, May 4, 2021 at 3:25 PM christi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <christi...-Re5JQEeQqe8@public.gmane.orgm>
>> wrote:
>>
>>> There’s actually lots of info about this. Pandoc is not even idempotent,
>>> let alone bijective.
>>>
>>> So no, you cannot depend on this especially if you want to convert it
>>> back and forth a lot of times.
>>>
>>> On Monday, May 3, 2021 at 3:23:12 PM UTC-7 Jeffrey Wang wrote:
>>>
>>>> I was not able to find any concrete information establishing the answer
>>>> to this question. I ask this to see how much I can depend on using Pandoc
>>>> for an application that would convert back and forth between two formats,
>>>> one for storage/authoritative purposes and the other for rendering/display
>>>> purposes. Thanks!
>>>
>>> --
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "pandoc-discuss" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/pandoc-discuss/NFwWouErsf8/unsubscribe
>>> .
>>> To unsubscribe from this group and all its topics, send an email to
>>> pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/pandoc-discuss/0b756db2-f247-49b1-a7dd-e0242e79d956n%40googlegroups.com
>>> <https://groups.google.com/d/msgid/pandoc-discuss/0b756db2-f247-49b1-a7dd-e0242e79d956n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
> You received this message because you are subscribed to a topic in the
> Google Groups "pandoc-discuss" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/pandoc-discuss/NFwWouErsf8/unsubscribe.
> To unsubscribe from this group and all its topics, 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/81417776-15c4-4dfb-8229-0dc15614c88dn%40googlegroups.com
> <https://groups.google.com/d/msgid/pandoc-discuss/81417776-15c4-4dfb-8229-0dc15614c88dn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CACZurRdvqjzcik3R9mphkDA94Wgfg5%2B01zQBO7yEixx5YVitvQ%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 7735 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-05-04 21:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-03 22:23 Do Pandoc's conversion functions which exist in both directions guarantee/aim for bijectivity? Jeffrey Wang
     [not found] ` <2ffba3ed-4e84-45ad-9eea-f4fb4b2da636n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-05-03 22:34   ` Daniel Staal
     [not found]     ` <9f900b8c-9341-3549-1b31-eeb3f5a9b320-Jdbf3xiKgS8@public.gmane.org>
2021-05-04 17:44       ` John MacFarlane
2021-05-04 20:24   ` christi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
     [not found]     ` <0b756db2-f247-49b1-a7dd-e0242e79d956n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-05-04 21:22       ` Jeffrey Wang
     [not found]         ` <CACZurRei78h_5EG4vSUdhS+GFaF-gUVnCB=eVXh98f6ULpCuXA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2021-05-04 21:34           ` christi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
     [not found]             ` <81417776-15c4-4dfb-8229-0dc15614c88dn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-05-04 21:35               ` Jeffrey Wang

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 NNTP newsgroup(s).