From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/31814 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: command-line pandoc on iOS Date: Mon, 28 Nov 2022 13:23:21 -0800 Message-ID: References: <5346511C-4B5D-42E9-B287-DB005CB4D005@gmail.com> <8FB22757-A6A4-432C-80F3-E770F0567E89@gmail.com> <626e5a36-6440-4be0-a5f6-9910f551ffc0n@googlegroups.com> <9F9D7B72-C9B2-477C-A48A-2B6EDAC95E3D@gmail.com> <0afec597-2662-487a-8e2d-6c74c85b3ca5n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) 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="33217"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDW7ZIEHTIIBBTONSSOAMGQEGOJIDEA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Nov 28 22:23:29 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-qt1-f183.google.com ([209.85.160.183]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ozlb6-0008Qj-LO for gtp-pandoc-discuss@m.gmane-mx.org; Mon, 28 Nov 2022 22:23:28 +0100 Original-Received: by mail-qt1-f183.google.com with SMTP id i4-20020ac813c4000000b003a5044a818csf17091050qtj.11 for ; Mon, 28 Nov 2022 13:23:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1669670607; cv=pass; d=google.com; s=arc-20160816; b=Yy4FBFqZ8un24jA3li+Xr7vZEFTfn+NWss4njodyUtIahMCBZezt+MMTD1gfl3D6wf IQG9Rlo3zll2cLy9fn/62xnN0028w4iroHwnTbNzD3UKKOE7YVtI3XUVpKETy6zEj+/S VM2B5SL08Q9IN3UXpG71SBF9Wj9D95E38yRPNljiaUX4rv+25uJ0QUpWtmd3yZRTo+uz uiSfPWV59C5vxiqnBsMzWXkaX+P/7MYhnUvz6bxI87ei/AK12D3cnq95ajzL/JMro1gm ijLjeZM0U97q/sJqSfAQSRIQ5CB21XEE1Gj559pQ61vq71dFbIr+o7rnr8FqH0GylQPf qifA== 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:message-id:in-reply-to:to :references:date:subject:mime-version:content-transfer-encoding:from :sender:dkim-signature:dkim-signature; bh=E9liAdwu8s+9CXMKFwyoknosYdjXjNkFr4Z6CS13j10=; b=nBqIEwMJhbcDBKxJjt0eLLR5U2CjBrCdTSWlY5yXV2ivMD/iae6e8BuyNR96PUHlrc 64folu2r9Ye0t6zRtzu5N2z+FhcVyVFTk8SnSmeKkBYzI+hYNK6BhGwLSYQ/cpU/6Mdi PmIesLE4FwlO08vENoV84c6xY1/HUYFXeh/xD4OXhm3q5PyXttjs52DkgnBv9K7IFNiG zCCieDc4oowxDY/j5uQv9cI9fw+WW4g0mCTnlzo8ZuEKrYIyoqq5lxr/5oOieBQ65Ksf L4nqnfMfdxNRTw4v3Uh+DQSjvdBR/H7t1d8wrbikBheduq/eKdEPPTv5QoDIVck98Z/A 1iqQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=HMoGez23; spf=pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::42b as permitted sender) smtp.mailfrom=fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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:message-id :in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=E9liAdwu8s+9CXMKFwyoknosYdjXjNkFr4Z6CS13j10=; b=TECxCOngc0oP3P756mPnhMKKeo/t8xaD+O/3qiX6HX7LWe7gdErtaQ866M8NG6nlGp ORDbychrUqrk2brX+LpeyB4VokkXiBRAXNfks9XHkxavbh8A90tt1gj91Z7x/fQzDjGg Mylv0XlX1m5bBOiQlpl5NEUqfPR+KCClTzLH/9WCQtAMHQawXQ7qZRy9SqJ6ZsvlBftZ DgiKBzaiRRIgOjiWrKVh4B+TXKzq+wPdz8igbqz4FjQGh+6ZbunqOhFRwPpU5Ns7k5nH 0Pn3SY7RLQfT+c+CvKQUBe6IKig6/x86w/u/ppwxth90Rx/uutldWcjhPsUxZTqlT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.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:message-id :in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:from:to:cc:subject:date:message-id :reply-to; bh=E9liAdwu8s+9CXMKFwyoknosYdjXjNkFr4Z6CS13j10=; b=WTau4isZml8XvA6O2AdXrqYSTtBk6L5Kpew7nJNhWSYrwvrpvAYne/GDFh9M5YREwY 4FsXNvpT4iw1uoC3A4K1vllCLXTp/aYFweF2uws+3wwCoITgJ7rzpQeE/29HPBstpKZt pg3yRFsbnVKcq281A+V1xHDxtruJtVxPBImXLx4TS4kQeIUtn4M7y1YyaA7ndMK5b7BB Ys/HNyKtdzvMhxfIPzfVrq+q1bebV2u2QOaAL1xCPQt1YaIf9liNH3k+AD4lJsqLBRqs aRoARpYr4fIuAOfnBQh4W4blk5gZlWmQL2MHXQe+yc4HE58ieIih8XDto012ar7U4lCx Y 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:message-id :in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:x-gm-message-state:sender:from:to:cc :subject:date:message-id:reply-to; bh=E9liAdwu8s+9CXMKFwyoknosYdjXjNkFr4Z6CS13j10=; b=2bfFAbp2s1cGm6+zJnnC+MYmrRgpjD4naP+tTetWrkw9RnTeuDgPSaWb3BaHAESa2N MrfNR1FKINqSjJaBWUWEQu3V/f+aL48CkFmXnT2mQdLh5t9Jf3to0c/GHAb5mWuZIHtv +zajJXhPOQ4hdKgSQNMqf5bYgaFBXVVuWKqHI+E80NzupqvXM2ms3vAaYTxWKTgaYL6L h+zXlfRsc1gzLKDHxShowAGUg4CFYbzZOxjuYJ77LBCS8BAxJmhqjVW9CojsDClbspPm poBvCzdFoieuIdZp30bE Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: ANoB5pnBXJgPfpnnURX4jaXFFx0afqZ+HjbRACv3I2p9EQ6YckQubiD2 +6Y0Nhtp8r61pLXhEPJpntY= X-Google-Smtp-Source: AA0mqf6DprO4lPS+ZNw62xM4zs1SbT9vNs6kBdlDUc29b2isoFwSUQAKRnrdrtuplhgXQl/v3XU1yw== X-Received: by 2002:a05:620a:250:b0:6ce:7f5a:7bac with SMTP id q16-20020a05620a025000b006ce7f5a7bacmr45788308qkn.345.1669670607682; Mon, 28 Nov 2022 13:23:27 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a0c:9a0a:0:b0:499:27f5:53ec with SMTP id p10-20020a0c9a0a000000b0049927f553ecls5108652qvd.7.-pod-prod-gmail; Mon, 28 Nov 2022 13:23:24 -0800 (PST) X-Received: by 2002:a0c:f701:0:b0:4bb:59f0:7754 with SMTP id w1-20020a0cf701000000b004bb59f07754mr31776101qvn.33.1669670604782; Mon, 28 Nov 2022 13:23:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669670604; cv=none; d=google.com; s=arc-20160816; b=inTcox5wFCs35Wgmg5W1un+aldBdsJhXAqamuP8F5OZ1Oa+NkxKakUTg7azhhgnc0c QgKgKX01AiCapDkM3bjKmk/GYcIEClQUqiIsuGcZ9a+ypKUQ7Y38QCY3IrBmhCq87DnA o1HXUXKq7/3nPySkJ3MHIad6STGMmFu3ieXonL0eSb8JU2YZDEPMt1UGRfoyLJ4wmjsG YRYL43RomRyx6dt68gXKknloQajT1A/mEw3o6JrophRqKggM8cmrlL2KS8slhgKPwR1y 2EqHD1ZIRT+HU8FuBHVrcgVOPW0NN6u0arWoLwdCdoJH8LKFu/WoJHUaE9B7BHJsR1rq 79RA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:dkim-signature; bh=VFUWrX/49mf2aaRQpd0DnNC2rfkgP9vPY1niNKmIb3k=; b=SFL2PNk72EA2cmyW1v/rmAr6VrO+K543fd4o1lVcNKaf+pS/423KKXYue/dieGHXuh sew0ZzKFPNy0vWGjTbIav/5PegWDtqqN4nJvshX7AfguLq8nhlI6tQo7mOWBH157rC5s CCycmG5vkZ4Xxjum/H3uxo+Pshy4lcVz14/DbUbxW5I4+LRbaHYByomiNzkUEriKIQWf NPkEv56hzfEI2vXEsVnCRgoFWGt/7TYc9ce8+QzAU1x93cCAeBY+aYDvuJEHiNz39TeL uHJbqtWXpdFH01Ry+RqFJ9iKjw/XdMoxVnjlaHMLSdMN0eAKS2nQDzcfg2pH4gAA9FoS YVdg== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=HMoGez23; spf=pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::42b as permitted sender) smtp.mailfrom=fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Original-Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com. [2607:f8b0:4864:20::42b]) by gmr-mx.google.com with ESMTPS id a14-20020a05620a02ee00b006fbac5a9709si659980qko.3.2022.11.28.13.23.24 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 28 Nov 2022 13:23:24 -0800 (PST) Received-SPF: pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::42b as permitted sender) client-ip=2607:f8b0:4864:20::42b; Original-Received: by mail-pf1-x42b.google.com with SMTP id a9so8324394pfr.0 for ; Mon, 28 Nov 2022 13:23:24 -0800 (PST) X-Received: by 2002:a05:6a00:290f:b0:56b:e15a:7215 with SMTP id cg15-20020a056a00290f00b0056be15a7215mr33892277pfb.27.1669670603506; Mon, 28 Nov 2022 13:23:23 -0800 (PST) Original-Received: from smtpclient.apple ([2607:f140:800:1::407]) by smtp.gmail.com with ESMTPSA id k30-20020aa79d1e000000b00574f83c5d51sm4517191pfp.198.2022.11.28.13.23.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Nov 2022 13:23:22 -0800 (PST) In-Reply-To: <0afec597-2662-487a-8e2d-6c74c85b3ca5n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Original-Sender: fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=HMoGez23; spf=pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::42b as permitted sender) smtp.mailfrom=fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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:31814 Archived-At: Yes, this is definitely very promising. We just have to wait for this to a= ppear in a released version of GHC, and wait for libraries we depend on to = be updated to work with the new GHC version. > On Nov 23, 2022, at 11:14 AM, S=C3=A9bastien Boisg=C3=A9rault wrote: >=20 > FYI: >=20 > WebAssembly backend merged into GHC : https://www.tweag.io/blog/2022-11-= 22-wasm-backend-merged-in-ghc/ > "The GHC RTS is way more robust, feature-complete and performant than ast= erius=E2=80=99s legacy JavaScript runtime." >=20 > Could it provide a simpler / more powerful way to run pandoc in the brows= er?=20 >=20 > Regards, >=20 > S=C3=A9bastien > Le lundi 7 novembre 2022 =C3=A0 20:22:29 UTC+1, fiddlosopher a =C3=A9crit= : > Oh never mind, I see you're looking for an asterius build.=20 >=20 > > On Nov 7, 2022, at 11:20 AM, John MacFarlane wrot= e:=20 > >=20 > > This is the one you want: https://hub.docker.com/r/pandoc/core=20 > > It is always up to date with the latest release.=20 > >=20 > >> On Nov 7, 2022, at 8:56 AM, jcr wrote:=20 > >>=20 > >> I've looked at this a couple of times since I last wrote. It turns out= the latest Docker image is 2 years old, and apparently contains pandoc 2.9= .2.1.=20 > >>=20 > >> So it looks like I have to do the full pandoc build with ahc-cabal. I = installed the prerequisites, and started following the instructions to buil= d Asterius, but immediately hit a snag when it asked me to run a script tha= t isn't provided in the repo. It turns out the project now uses bazel, what= ever that is, but the person who discovered this ran it and found that he c= ouldn't execute the resulting binaries (see Asterius issue 894). So I don't= feel encouraged to follow his example.=20 > >>=20 > >> I've had the idea of writing a stub in Python that would parse pandoc = command line arguments and then use pandoc-server to do the actual processi= ng. I'd just ignore options like -L that can't be implemented this way. It = wouldn't be a great solution, but it would be adequate for some cases.=20 > >>=20 > >> If I do that, Lua filter support in pandoc-server would be very useful= (most of my filters are indeed safe), but I see from the referenced issue = that it's not coming soon.=20 > >>=20 > >> On Monday, October 17, 2022 at 4:47:08 PM UTC+2 fiddlosopher wrote:=20 > >> If we could implement=20 > >> https://github.com/jgm/pandoc/issues/8273 "safe mode for Lua filters"= =20 > >> then we could add Lua support to pandoc-server. (Of course, this assum= es that=20 > >> you wouldn't need to use any unsafe functions in your Lua filters.)=20 > >>=20 > >>=20 > >>> On Oct 17, 2022, at 2:15 AM, ffi.a...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:=20 > >>>=20 > >>> I was playing around with pandoc-server before I decided I needed the= command-line program. It would work for some cases, but without Lua script= ing, it wouldn't be adequate for the document builds. In theory, I could us= e pandoc-server to convert to a JSON AST, run a filter locally, and then se= nd it back to the server for the next stage of conversion, but that seems s= low and conplex.=20 > >>>=20 > >>> I probably won't work quickly on building pandoc with Asterius.=20 > >>>=20 > >>>> On Oct 16, 2022, at 7:58 PM, John MacFarlane w= rote:=20 > >>>>=20 > >>>> =EF=BB=BFThis would be cool, so let us know if you have any success = with asterius. I haven't tried it myself. If you run into Haskell-specific = problems, let us know and perhaps we can help.=20 > >>>>=20 > >>>> Note: for your iPad purposes, another alternative would be to run pa= ndoc as a server somewhere. This is now very easy with `pandoc-server`. It = is fairly full-featured, with the caveat that it runs in "safe mode," so yo= u have to explicitly send all resources needed for compilation to the serve= r (it won't be able to look for them on your local file system).=20 > >>>>=20 > >>>>> On Oct 16, 2022, at 8:20 AM, jcr wrote:=20 > >>>>>=20 > >>>>> I would like to be able to run pandoc-based document builds on an i= Pad. This seems to be possible with the [a-Shell app](https://holzschu.gith= ub.io/a-Shell_iOS/). It provides a Unix-like shell with LaTeX (additional 1= .3GB download), Python, Lua, and many command line utilities. C and C++ pro= grams can be compiled to WebAssembly on the device and run there. It is als= o possible to cross-compile for a-Shell, using a [customized WASI-SDK](http= s://github.com/holzschu/wasi-sdk).=20 > >>>>>=20 > >>>>> [Asterius](https://github.com/tweag/asterius) compiles Haskell to W= ebAssembly, and there are a couple of demos that use it to run pandoc in a = webpage, but the WebAssembly files they use offer a simple JavaScript inter= face to the Haskell pandoc function: (input, from format, to format) -> out= put. I need the full command line interface to run document builds. It look= s possible, but since I've never used Haskell, its build tools, or WASI-SDK= , I'm not sure how to go about this. There's a pre-built Docker container f= or Asterius with about 2000 packages from Stockage (I think I can guess wha= t that is), but I don't know if I can use that, or if I have to rebuild eve= rything from scratch using the customized WASI-SDK. After that, I guess I w= ould download the pandoc source and follow the instructions for building it= with cabal, using `ahc-cabal` in place of `cabal`. But if anything goes wr= ong with the cabal build, I'll be lost.=20 > >>>>>=20 > >>>>> Has anyone already done this?=20 > >>>>>=20 > >>>>>=20 > >>>>> --=20 > >>>>> You received this message because you are subscribed to the Google = Groups "pandoc-discuss" group.=20 > >>>>> To unsubscribe from this group and stop receiving emails from it, s= end an email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org=20 > >>>>> To view this discussion on the web visit https://groups.google.com/= d/msgid/pandoc-discuss/bfa54f4a-eedc-4e8e-8671-1aa9f6c63e1dn%40googlegroups= .com.=20 > >>>>=20 > >>>> --=20 > >>>> You received this message because you are subscribed to a topic in t= he Google Groups "pandoc-discuss" group.=20 > >>>> To unsubscribe from this topic, visit https://groups.google.com/d/to= pic/pandoc-discuss/ivgH7zNPlNs/unsubscribe.=20 > >>>> To unsubscribe from this group and all its topics, send an email to = pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org=20 > >>>> To view this discussion on the web visit https://groups.google.com/d= /msgid/pandoc-discuss/5346511C-4B5D-42E9-B287-DB005CB4D005%40gmail.com.=20 > >>>=20 > >>> --=20 > >>> You received this message because you are subscribed to the Google Gr= oups "pandoc-discuss" group.=20 > >>> To unsubscribe from this group and stop receiving emails from it, sen= d an email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org=20 > >>> To view this discussion on the web visit https://groups.google.com/d/= msgid/pandoc-discuss/ADB72C63-745E-4D50-9045-E60813FA08EB%40gmail.com.=20 > >>=20 > >>=20 > >> --=20 > >> You received this message because you are subscribed to the Google Gro= ups "pandoc-discuss" group.=20 > >> To unsubscribe from this group and stop receiving emails from it, send= an email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org=20 > >> To view this discussion on the web visit https://groups.google.com/d/m= sgid/pandoc-discuss/626e5a36-6440-4be0-a5f6-9910f551ffc0n%40googlegroups.co= m.=20 > >=20 >=20 >=20 > --=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= email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit https://groups.google.com/d/msgi= d/pandoc-discuss/0afec597-2662-487a-8e2d-6c74c85b3ca5n%40googlegroups.com. --=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/F8973DB9-5EF4-4075-A124-26B3F985D7EF%40gmail.com.