From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32022 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Albert Krewinkel Newsgroups: gmane.text.pandoc Subject: Re: Adding a reader for Cooklang and a question about Megaparsec Date: Thu, 19 Jan 2023 00:26:29 +0100 Message-ID: <87lelzmn0l.fsf@zeitkraut.de> References: <08647ee9-9616-482c-bae8-2657d16df33fn@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25398"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Isaac Van Doren To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCZJF7XJTILRB65CUSPAMGQEXCOS5EY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Jan 19 10:46:40 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ej1-f58.google.com ([209.85.218.58]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pIRVH-0006Rl-R3 for gtp-pandoc-discuss@m.gmane-mx.org; Thu, 19 Jan 2023 10:46:39 +0100 Original-Received: by mail-ej1-f58.google.com with SMTP id sh37-20020a1709076ea500b0087760a6accesf1198833ejc.17 for ; Thu, 19 Jan 2023 01:46:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1674121599; cv=pass; d=google.com; s=arc-20160816; b=n/rteo8HjQAtxFx2MBpfHvJzPowSIFedYjUTvjDu10k0a/6ucAoFeR4ReeaFC0cthi liJK+qAYYEFTdqmpZvc46gqOpSYX1UmiqrZdj0MdVPoKtumV2mSDXSh/e70SKILBgCF5 hWsWOyKURjIBMSbVq+DwL5fOXTFyjdx/5k/2EOtBeHCPjCi3IrNDJwPPLxAHDrvpQS1I ZBxaaVt9xwG7FAfr2zhKx7aC+BmmoR+aRvFSs5N7x1O2gJzx1huwHTk/m8d9dkEjvc8/ 3aEiyepRuBqBT3PFEOw61uepF0iOUbsc+QxkP5BqppsZSo3aF6cDDdN4ijtkXyjFxq+Y kiDA== 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 :content-transfer-encoding:in-reply-to:message-id:date:subject:cc:to :from:references:sender:dkim-signature; bh=iQSzzgN8YM8puhGDFPWQB7QWaUvNrYdE+zBFjbTjkcc=; b=ylvZMNRXeW2eqzXh+meNkDmPyr8QtKE4uThd2KJF2RiaiejTDRkO3l101GnnbOt8e7 wgEvlOUwTD317sTHyPVuyrGiy7BIestxfZhu5zn4d8fbPly6FPxwfbo/T+ngARMRCFG7 Cs20bP3PsWhsO5BwdfaeH5OX3n4bhrmn4vqJpIZ1cvWj227J+GL96T33kvcNEi1m/M8F NUb9vfmOWTascgnUu1fxxdjEcNH7Xn7vXemIdnaFaRu8gJ2VYf6NIT1uHn3Z5oGWFYcH uls+zVUEFv6MknuiC2g8AcgjwhbQXoNN8m379EFoA62EkWK4OQ+Iev7Lt/JTgLBMM/iY VeXQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 80.241.56.171 as permitted sender) smtp.mailfrom=albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.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:mime-version :content-transfer-encoding:in-reply-to:message-id:date:subject:cc:to :from:references:sender:from:to:cc:subject:date:message-id:reply-to; bh=iQSzzgN8YM8puhGDFPWQB7QWaUvNrYdE+zBFjbTjkcc=; b=DZSBHLc/2wUdMNiNX+PPirBLCQ5wI0X26LtnUe48tSyIa8KsBSeYIwmApYUvYr3AuH FAEsR7jUITWGsACuM2K7FAg8RrrhE51PmepnLyJ/bZLeydwLF9uzCn+ebLPlehFNWJO4 FsvRVzhb1qIaOETYyyxu0tQNdEpmTH6R8eGs5TjOMeMF2QA7hMOIRwhJjq91J0XbVExa BQQOqusdl0sJHFqwtlFN2VRoc9PCF4eKAlmjnzYnbC74eChWyztb5KsHhxiLBUj5rHIS IJU5l7QAf0G3MpXbjd7Eizu3lwDgawz5AxJgDr5kh/MrWS1354sitHESbAtIlFX/g7hi 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:mime-version :content-transfer-encoding:in-reply-to:message-id:date:subject:cc:to :from:references:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=iQSzzgN8YM8puhGDFPWQB7QWaUvNrYdE+zBFjbTjkcc=; b=ta9cX40OrbracAQ4eqwWq+GV8wVibb0hgh7ltc59xtWsJZPClOHhL6pOzIFR7en3Sa tRoVptKtFs2IrPigI/6DO5JYrfiSc9xYwelA0UZ4pCltcRHmWYcQeQohZA3PMGBlG/iR A7O/gD8y/mYcF4bBOoby5EC5YnL5zRHig7SudVAKEzPT36K49Zsyp42OyTObZV8+NWrW WZ7M+StZ0RCumTLNkOWnDIAD32pSHknghzT8OSYZVV//9iFY24Sh0zRBO8N9iL5BGzQY hHkvTItc3mSmiMJPT Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AFqh2krSejqCHVZzRf1W3dg+oYpq8dcKBWimIy+zC9vPVdyE/qAPpvIb AQJAyKVvTjwQz447GtRFPTE= X-Google-Smtp-Source: AMrXdXtIYvesiSb8coszHjySlHgmibdtox7JMgJgH/O6cZu2TE8NN/ECxMYBrhmlB2AOy5nwa5ii6w== X-Received: by 2002:a17:906:b28b:b0:7b7:718d:22c with SMTP id q11-20020a170906b28b00b007b7718d022cmr1163174ejz.507.1674121599447; Thu, 19 Jan 2023 01:46:39 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a17:906:5052:b0:7c1:2050:cc5f with SMTP id e18-20020a170906505200b007c12050cc5fls656334ejk.0.-pod-prod-gmail; Thu, 19 Jan 2023 01:46:34 -0800 (PST) X-Received: by 2002:a17:907:ca07:b0:86e:cb6c:4462 with SMTP id uk7-20020a170907ca0700b0086ecb6c4462mr9444511ejc.36.1674121594795; Thu, 19 Jan 2023 01:46:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674121594; cv=none; d=google.com; s=arc-20160816; b=HTZjSV1MkiYHNXPtk5tu3hcreLBjx5B4YP3mHlX8+rfA0iW2awB1ZgfhhCUPeMoT6u N5sHDW54SpXrbkPan64mxls1KaV9+UD8IeoQwELxBv112MmYjB+15Z9tXdzJT48IOQkQ t++Zp7QuIvP5GhLzdB3EhEDNHmtMc0OU4HWEGJ7JFl1ZhOrWyoIZQtZ3E5ejbHCYUJlV EHhkANxC+i0yizVjWgzexu4cfbrhYm/0t+RWXPzCA3DUE7KWYDwv/z9uXHdZSGVW3A18 TGs6aPVVXdo4NN2UmiZQxtG/imjjfjRFPZYVdtQg1inxJpBjzwcUpX8S0QhJHpQuC9fR 0gmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:content-transfer-encoding:in-reply-to:message-id:date :subject:cc:to:from:references; bh=iiwYfIvUV+L26LGnQS4fwLnjm9DpuiUUvFog4CwFbvI=; b=i0MuGi0yAYAjhZCCtGIWbZcfzaqVQ9sYszkInWGYZpVP0wxZ87HPM4QZ9pozsDaoPw Nhantu0JrVL/qNqBq2V7Kiq+gTWOwyy52/UgakntofLYYxenmLZ5rhNjthnpKRSMuXiY XkStKlwJUg+JbgXv3DaZDDgu1h9EpCsFoeUDptTp1NQG0zJ3ANBabtteVkH5lBbEerwg M2yzZuAgoDZujMk/8tLRG6o382VESEKDLaDs3i1Zvv6GRlDecO5NiY5qkxYxacecQ3RK V03QfWgj5VU56OnJmfBsQv3NZFisNxYYHEvdaAKn7ofNJyaNAacwNXP0OeCxGBBmZPkM Lh0g== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 80.241.56.171 as permitted sender) smtp.mailfrom=albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org Original-Received: from mout-p-201.mailbox.org (mout-p-201.mailbox.org. [80.241.56.171]) by gmr-mx.google.com with ESMTPS id gv11-20020a1709072bcb00b0086728259fb3si716217ejc.1.2023.01.19.01.46.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Jan 2023 01:46:34 -0800 (PST) Received-SPF: pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 80.241.56.171 as permitted sender) client-ip=80.241.56.171; Original-Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4NyHnz2SZLz9txd; Thu, 19 Jan 2023 10:46:31 +0100 (CET) In-reply-to: <08647ee9-9616-482c-bae8-2657d16df33fn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Rspamd-Queue-Id: 4NyHnz2SZLz9txd X-Original-Sender: albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 80.241.56.171 as permitted sender) smtp.mailfrom=albert+pandoc-9EawChwDxG8hFhg+JK9F0w@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:32022 Archived-At: Hi Isaac, Thanks for reaching out! Isaac Van Doren writes: > About Cooklang: > I am interested in adding a reader to Pandoc for the Cook markdown > language. Cooklang is a concise, standardized way to format recipes. Very interesting! I took a look at Cooklang, it has an appealing tool-chain. > I've written a parser for Cook in Haskell which would be a good > start. It complies with the official Cooklang canonical tests.=C2=A0 > > Questions: > Currently my parser uses Megaparsec. Do I need to refactor it to use > Parsec instead or is it okay to add Megaparsec as a dependency? I believe that pandoc might switch to megaparsec at some point in the future. But I'm afraid that as of now, the parser library should be plain ol' parsec. > Currently my parser uses String instead of Text. Is it necessary for > the parser to use Text to be used by Pandoc or could I get away with > the reader converting its Text input to String when parsing? That's probably ok (and not too difficult to change/fix later on). > Is there anything else I should know before I start working on a PR? > Does this seem like a suitable addition to Pandoc? I think it would be great to have this, but jgm will have to decide. If you don't want to wait and also like to play with new tools, then one way to get fast results would be to write a parser with the LPeg Lua library. Pandoc comes with a LPeg and a Lua interpreter included, and those can be used to write custom parsers. We've improved support for this in pandoc 3, see . Cheers, Albert --=20 Albert Krewinkel GPG: 8eed e3e2 e8c5 6f18 81fe e836 388d c0b2 1f63 1124 --=20 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 e= mail 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/87lelzmn0l.fsf%40zeitkraut.de.