public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: "Sébastien Boisgérault" <sebastien.boisgerault-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: command-line pandoc on iOS
Date: Wed, 23 Nov 2022 11:14:44 -0800 (PST)	[thread overview]
Message-ID: <0afec597-2662-487a-8e2d-6c74c85b3ca5n@googlegroups.com> (raw)
In-Reply-To: <9F9D7B72-C9B2-477C-A48A-2B6EDAC95E3D-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>


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

FYI:

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 
asterius’s legacy JavaScript runtime."

Could it provide a simpler / more powerful way to run pandoc in the 
browser? 

Regards,

Sébastien
Le lundi 7 novembre 2022 à 20:22:29 UTC+1, fiddlosopher a écrit :

> Oh never mind, I see you're looking for an asterius build.
>
> > On Nov 7, 2022, at 11:20 AM, John MacFarlane <fiddlo...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 
> wrote:
> > 
> > This is the one you want: https://hub.docker.com/r/pandoc/core
> > It is always up to date with the latest release.
> > 
> >> On Nov 7, 2022, at 8:56 AM, jcr <ffi.a...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> >> 
> >> 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.
> >> 
> >> 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 
> build Asterius, but immediately hit a snag when it asked me to run a script 
> that isn't provided in the repo. It turns out the project now uses bazel, 
> whatever that is, but the person who discovered this ran it and found that 
> he couldn't execute the resulting binaries (see Asterius issue 894). So I 
> don't feel encouraged to follow his example.
> >> 
> >> 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 
> processing. 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.
> >> 
> >> 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.
> >> 
> >> On Monday, October 17, 2022 at 4:47:08 PM UTC+2 fiddlosopher wrote:
> >> If we could implement 
> >> https://github.com/jgm/pandoc/issues/8273 "safe mode for Lua filters" 
> >> then we could add Lua support to pandoc-server. (Of course, this 
> assumes that 
> >> you wouldn't need to use any unsafe functions in your Lua filters.) 
> >> 
> >> 
> >>> On Oct 17, 2022, at 2:15 AM, ffi.a...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote: 
> >>> 
> >>> 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 
> scripting, it wouldn't be adequate for the document builds. In theory, I 
> could use pandoc-server to convert to a JSON AST, run a filter locally, and 
> then send it back to the server for the next stage of conversion, but that 
> seems slow and conplex. 
> >>> 
> >>> I probably won't work quickly on building pandoc with Asterius. 
> >>> 
> >>>> On Oct 16, 2022, at 7:58 PM, John MacFarlane <fiddlo...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 
> wrote: 
> >>>> 
> >>>> This 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. 
> >>>> 
> >>>> Note: for your iPad purposes, another alternative would be to run 
> pandoc 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 
> you have to explicitly send all resources needed for compilation to the 
> server (it won't be able to look for them on your local file system). 
> >>>> 
> >>>>> On Oct 16, 2022, at 8:20 AM, jcr <ffi.a...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: 
> >>>>> 
> >>>>> I would like to be able to run pandoc-based document builds on an 
> iPad. This seems to be possible with the [a-Shell app](
> https://holzschu.github.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++ programs can be compiled to WebAssembly on the device 
> and run there. It is also possible to cross-compile for a-Shell, using a 
> [customized WASI-SDK](https://github.com/holzschu/wasi-sdk). 
> >>>>> 
> >>>>> [Asterius](https://github.com/tweag/asterius) compiles Haskell to 
> WebAssembly, 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 
> interface to the Haskell pandoc function: (input, from format, to format) 
> -> output. I need the full command line interface to run document builds. 
> It looks 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 for Asterius with about 2000 packages from Stockage (I think I 
> can guess what that is), but I don't know if I can use that, or if I have 
> to rebuild everything from scratch using the customized WASI-SDK. After 
> that, I guess I would download the pandoc source and follow the 
> instructions for building it with cabal, using `ahc-cabal` in place of 
> `cabal`. But if anything goes wrong with the cabal build, I'll be lost. 
> >>>>> 
> >>>>> Has anyone already done this? 
> >>>>> 
> >>>>> 
> >>>>> -- 
> >>>>> 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 
> >>>>> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/pandoc-discuss/bfa54f4a-eedc-4e8e-8671-1aa9f6c63e1dn%40googlegroups.com. 
>
> >>>> 
> >>>> -- 
> >>>> 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/ivgH7zNPlNs/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/5346511C-4B5D-42E9-B287-DB005CB4D005%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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 
> >>> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/pandoc-discuss/ADB72C63-745E-4D50-9045-E60813FA08EB%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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> >> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/pandoc-discuss/626e5a36-6440-4be0-a5f6-9910f551ffc0n%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/0afec597-2662-487a-8e2d-6c74c85b3ca5n%40googlegroups.com.

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

  parent reply	other threads:[~2022-11-23 19:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-16 15:20 jcr
     [not found] ` <bfa54f4a-eedc-4e8e-8671-1aa9f6c63e1dn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-10-16 17:58   ` John MacFarlane
     [not found]     ` <5346511C-4B5D-42E9-B287-DB005CB4D005-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2022-10-17  9:15       ` ffi.appdev-Re5JQEeQqe8AvxtiuMwx3w
     [not found]         ` <ADB72C63-745E-4D50-9045-E60813FA08EB-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2022-10-17 14:47           ` John MacFarlane
     [not found]             ` <8FB22757-A6A4-432C-80F3-E770F0567E89-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2022-11-07 16:56               ` jcr
     [not found]                 ` <626e5a36-6440-4be0-a5f6-9910f551ffc0n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-11-07 19:20                   ` John MacFarlane
     [not found]                     ` <DE26E142-2E87-469E-809B-8DD59EA9460B-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2022-11-07 19:22                       ` John MacFarlane
     [not found]                         ` <9F9D7B72-C9B2-477C-A48A-2B6EDAC95E3D-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2022-11-23 19:14                           ` Sébastien Boisgérault [this message]
     [not found]                             ` <0afec597-2662-487a-8e2d-6c74c85b3ca5n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-11-28 21:23                               ` John MacFarlane

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0afec597-2662-487a-8e2d-6c74c85b3ca5n@googlegroups.com \
    --to=sebastien.boisgerault-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).