public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Filters in Lua vs in Haskell
@ 2023-05-29  7:46 oliver
       [not found] ` <EC2F53EB-56F2-4078-B8DF-5D35B64A7EC0-WPTjrydoUPgeaOpM6FAJmQkbCANdLtlA@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: oliver @ 2023-05-29  7:46 UTC (permalink / raw)
  To: pandoc-discuss

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

Hi there

The doco says Lua filters “are usually faster than JSON filters” and 
from my understanding Haskell filters are JSON filters.

So why are filters in Pandoc’s “native” language slower than 
filters in Lua?

Thanks for clarification!
Olli

On 29 May 2023, at 11:03, Michael Milton wrote:

> I just tried to render a PowerPoint presentation from markdown. 
> However the
> template I used is a bit odd, and I noticed that my title slide was 
> not
> populated with text, whereas the regular slides were. I wonder if 
> someone
> could explain the logic that Pandoc uses to find a text box to insert 
> text
> into? Is there a way to modify my template to avoid these issues?
>
> -- 
> 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/874eb03a-f62b-4ee7-a582-30c798f22083n%40googlegroups.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/EC2F53EB-56F2-4078-B8DF-5D35B64A7EC0%40halloleo.hailmail.net.

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

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

* Re: Filters in Lua vs in Haskell
       [not found] ` <EC2F53EB-56F2-4078-B8DF-5D35B64A7EC0-WPTjrydoUPgeaOpM6FAJmQkbCANdLtlA@public.gmane.org>
@ 2023-05-29 18:18   ` John MacFarlane
       [not found]     ` <F8164DE5-81BB-4E54-88E2-6725324BB184-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: John MacFarlane @ 2023-05-29 18:18 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Because JSON filters involve serializing the Haskell data structure to JSON, then decoding that back to a Haskell data structure, modifying it, encoding it to JSON, and decoding it back.  The Lua interface avoids all of this serialization/deserialization.

> On May 29, 2023, at 12:46 AM, oliver <news-WPTjrydoUPgeaOpM6FAJmQkbCANdLtlA@public.gmane.org> wrote:
> 
> Hi there
> 
> The doco says Lua filters “are usually faster than JSON filters” and from my understanding Haskell filters are JSON filters.
> 
> So why are filters in Pandoc’s “native” language slower than filters in Lua?
> 
> Thanks for clarification! 
> Olli
> 
> On 29 May 2023, at 11:03, Michael Milton wrote:
> 
> I just tried to render a PowerPoint presentation from markdown. However the template I used is a bit odd, and I noticed that my title slide was not populated with text, whereas the regular slides were. I wonder if someone could explain the logic that Pandoc uses to find a text box to insert text into? Is there a way to modify my template to avoid these issues? --
> 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/874eb03a-f62b-4ee7-a582-30c798f22083n%40googlegroups.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/EC2F53EB-56F2-4078-B8DF-5D35B64A7EC0%40halloleo.hailmail.net.

-- 
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/F8164DE5-81BB-4E54-88E2-6725324BB184%40gmail.com.


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

* Re: Filters in Lua vs in Haskell
       [not found]     ` <F8164DE5-81BB-4E54-88E2-6725324BB184-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2023-05-30 22:46       ` Oliver
       [not found]         ` <FAE4FE6C-C390-4EB7-9DF9-C31E6CFACF9B-WPTjrydoUPgeaOpM6FAJmQkbCANdLtlA@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Oliver @ 2023-05-30 22:46 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Thanks for this, John.

Do you know, is the performance hit big? Or nothing really to worry?

Regards,
Olli

On 30 May 2023, at 4:18, John MacFarlane wrote:

> Because JSON filters involve serializing the Haskell data structure to JSON, then decoding that back to a Haskell data structure, modifying it, encoding it to JSON, and decoding it back.  The Lua interface avoids all of this serialization/deserialization.
>
>> On May 29, 2023, at 12:46 AM, oliver <news-WPTjrydoUPgeaOpM6FAJmQkbCANdLtlA@public.gmane.org> wrote:
>>
>> Hi there
>>
>> The doco says Lua filters “are usually faster than JSON filters” and from my understanding Haskell filters are JSON filters.
>>
>> So why are filters in Pandoc’s “native” language slower than filters in Lua?
>>
>> Thanks for clarification!
>> Olli
>>
>> On 29 May 2023, at 11:03, Michael Milton wrote:
>>
>> I just tried to render a PowerPoint presentation from markdown. However the template I used is a bit odd, and I noticed that my title slide was not populated with text, whereas the regular slides were. I wonder if someone could explain the logic that Pandoc uses to find a text box to insert text into? Is there a way to modify my template to avoid these issues? --
>> 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/874eb03a-f62b-4ee7-a582-30c798f22083n%40googlegroups.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/EC2F53EB-56F2-4078-B8DF-5D35B64A7EC0%40halloleo.hailmail.net.
>
> -- 
> 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/F8164DE5-81BB-4E54-88E2-6725324BB184%40gmail.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/FAE4FE6C-C390-4EB7-9DF9-C31E6CFACF9B%40halloleo.hailmail.net.


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

* Re: Filters in Lua vs in Haskell
       [not found]         ` <FAE4FE6C-C390-4EB7-9DF9-C31E6CFACF9B-WPTjrydoUPgeaOpM6FAJmQkbCANdLtlA@public.gmane.org>
@ 2023-05-30 22:53           ` John MacFarlane
       [not found]             ` <03C8EA07-C75F-4DEC-B0BB-F3AA469CBCB8-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: John MacFarlane @ 2023-05-30 22:53 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

See the chart at the beginning of the Lua filters documentation for one data point.


> On May 30, 2023, at 3:46 PM, Oliver <news-WPTjrydoUPgeaOpM6FAJmQkbCANdLtlA@public.gmane.org> wrote:
> 
> Thanks for this, John.
> 
> Do you know, is the performance hit big? Or nothing really to worry?
> 
> Regards,
> Olli
> 
> On 30 May 2023, at 4:18, John MacFarlane wrote:
> 
>> Because JSON filters involve serializing the Haskell data structure to JSON, then decoding that back to a Haskell data structure, modifying it, encoding it to JSON, and decoding it back.  The Lua interface avoids all of this serialization/deserialization.
>> 
>>> On May 29, 2023, at 12:46 AM, oliver <news-WPTjrydoUPgeaOpM6FAJmQkbCANdLtlA@public.gmane.org> wrote:
>>> 
>>> Hi there
>>> 
>>> The doco says Lua filters “are usually faster than JSON filters” and from my understanding Haskell filters are JSON filters.
>>> 
>>> So why are filters in Pandoc’s “native” language slower than filters in Lua?
>>> 
>>> Thanks for clarification!
>>> Olli
>>> 
>>> On 29 May 2023, at 11:03, Michael Milton wrote:
>>> 
>>> I just tried to render a PowerPoint presentation from markdown. However the template I used is a bit odd, and I noticed that my title slide was not populated with text, whereas the regular slides were. I wonder if someone could explain the logic that Pandoc uses to find a text box to insert text into? Is there a way to modify my template to avoid these issues? --
>>> 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/874eb03a-f62b-4ee7-a582-30c798f22083n%40googlegroups.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/EC2F53EB-56F2-4078-B8DF-5D35B64A7EC0%40halloleo.hailmail.net.
>> 
>> -- 
>> 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/F8164DE5-81BB-4E54-88E2-6725324BB184%40gmail.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/FAE4FE6C-C390-4EB7-9DF9-C31E6CFACF9B%40halloleo.hailmail.net.

-- 
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/03C8EA07-C75F-4DEC-B0BB-F3AA469CBCB8%40gmail.com.


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

* Re: Filters in Lua vs in Haskell
       [not found]             ` <03C8EA07-C75F-4DEC-B0BB-F3AA469CBCB8-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2023-06-01  0:57               ` Oliver
  0 siblings, 0 replies; 5+ messages in thread
From: Oliver @ 2023-06-01  0:57 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

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

Thanks for the pointer, John.

 From this one data point, the JSON overhead seems to be *quite* 
substantial.

I guess I will look into Lua filters then…

Leo

On 31 May 2023, at 8:53, John MacFarlane wrote:

> See the chart at the beginning of the Lua filters documentation for 
> one data point.
>
>
>> On May 30, 2023, at 3:46 PM, Oliver <news-WPTjrydoUPgeaOpM6FAJmQkbCANdLtlA@public.gmane.org> 
>> wrote:
>>
>> Thanks for this, John.
>>
>> Do you know, is the performance hit big? Or nothing really to worry?
>>
>> Regards,
>> Olli
>>
>> On 30 May 2023, at 4:18, John MacFarlane wrote:
>>
>>> Because JSON filters involve serializing the Haskell data structure 
>>> to JSON, then decoding that back to a Haskell data structure, 
>>> modifying it, encoding it to JSON, and decoding it back.  The Lua 
>>> interface avoids all of this serialization/deserialization.
>>>
>>>> On May 29, 2023, at 12:46 AM, oliver <news-WPTjrydoUPgeaOpM6FAJmQkbCANdLtlA@public.gmane.org> 
>>>> wrote:
>>>>
>>>> Hi there
>>>>
>>>> The doco says Lua filters “are usually faster than JSON 
>>>> filters” and from my understanding Haskell filters are JSON 
>>>> filters.
>>>>
>>>> So why are filters in Pandoc’s “native” language slower than 
>>>> filters in Lua?
>>>>
>>>> Thanks for clarification!
>>>> Olli
>>>>
>>>> On 29 May 2023, at 11:03, Michael Milton wrote:
>>>>
>>>> I just tried to render a PowerPoint presentation from markdown. 
>>>> However the template I used is a bit odd, and I noticed that my 
>>>> title slide was not populated with text, whereas the regular slides 
>>>> were. I wonder if someone could explain the logic that Pandoc uses 
>>>> to find a text box to insert text into? Is there a way to modify my 
>>>> template to avoid these issues? --
>>>> 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/874eb03a-f62b-4ee7-a582-30c798f22083n%40googlegroups.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/EC2F53EB-56F2-4078-B8DF-5D35B64A7EC0%40halloleo.hailmail.net.
>>>
>>> -- 
>>> 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/F8164DE5-81BB-4E54-88E2-6725324BB184%40gmail.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/FAE4FE6C-C390-4EB7-9DF9-C31E6CFACF9B%40halloleo.hailmail.net.
>
> -- 
> 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/03C8EA07-C75F-4DEC-B0BB-F3AA469CBCB8%40gmail.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/300119B6-9113-4531-B7D7-E7E49C70560B%40halloleo.hailmail.net.

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

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

end of thread, other threads:[~2023-06-01  0:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-29  7:46 Filters in Lua vs in Haskell oliver
     [not found] ` <EC2F53EB-56F2-4078-B8DF-5D35B64A7EC0-WPTjrydoUPgeaOpM6FAJmQkbCANdLtlA@public.gmane.org>
2023-05-29 18:18   ` John MacFarlane
     [not found]     ` <F8164DE5-81BB-4E54-88E2-6725324BB184-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2023-05-30 22:46       ` Oliver
     [not found]         ` <FAE4FE6C-C390-4EB7-9DF9-C31E6CFACF9B-WPTjrydoUPgeaOpM6FAJmQkbCANdLtlA@public.gmane.org>
2023-05-30 22:53           ` John MacFarlane
     [not found]             ` <03C8EA07-C75F-4DEC-B0BB-F3AA469CBCB8-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2023-06-01  0:57               ` Oliver

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).