public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* command-line pandoc on iOS
@ 2022-10-16 15:20 jcr
       [not found] ` <bfa54f4a-eedc-4e8e-8671-1aa9f6c63e1dn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: jcr @ 2022-10-16 15:20 UTC (permalink / raw)
  To: pandoc-discuss


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

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-discuss+unsubscribe-/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.

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

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

* Re: command-line pandoc on iOS
       [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>
  0 siblings, 1 reply; 9+ messages in thread
From: John MacFarlane @ 2022-10-16 17:58 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

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.appdev-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-discuss+unsubscribe-/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 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/5346511C-4B5D-42E9-B287-DB005CB4D005%40gmail.com.


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

* Re: command-line pandoc on iOS
       [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>
  0 siblings, 1 reply; 9+ messages in thread
From: ffi.appdev-Re5JQEeQqe8AvxtiuMwx3w @ 2022-10-17  9:15 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

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 <fiddlosopher-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.appdev-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-discuss+unsubscribe-/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-discuss+unsubscribe-/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-discuss+unsubscribe-/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.


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

* Re: command-line pandoc on iOS
       [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>
  0 siblings, 1 reply; 9+ messages in thread
From: John MacFarlane @ 2022-10-17 14:47 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

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.appdev-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 <fiddlosopher-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.appdev-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-discuss+unsubscribe-/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-discuss+unsubscribe-/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-discuss+unsubscribe-/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-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/8FB22757-A6A4-432C-80F3-E770F0567E89%40gmail.com.


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

* Re: command-line pandoc on iOS
       [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>
  0 siblings, 1 reply; 9+ messages in thread
From: jcr @ 2022-11-07 16:56 UTC (permalink / raw)
  To: pandoc-discuss


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

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 
<https://github.com/tweag/asterius/issues/354> 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 
<https://github.com/tweag/asterius/issues/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-discuss+unsubscribe-/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.

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

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

* Re: command-line pandoc on iOS
       [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>
  0 siblings, 1 reply; 9+ messages in thread
From: John MacFarlane @ 2022-11-07 19:20 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

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.appdev-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-discuss+unsubscribe-/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/DE26E142-2E87-469E-809B-8DD59EA9460B%40gmail.com.


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

* Re: command-line pandoc on iOS
       [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>
  0 siblings, 1 reply; 9+ messages in thread
From: John MacFarlane @ 2022-11-07 19:22 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Oh never mind, I see you're looking for an asterius build.

> On Nov 7, 2022, at 11:20 AM, John MacFarlane <fiddlosopher-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.appdev-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-discuss+unsubscribe-/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/9F9D7B72-C9B2-477C-A48A-2B6EDAC95E3D%40gmail.com.


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

* Re: command-line pandoc on iOS
       [not found]                         ` <9F9D7B72-C9B2-477C-A48A-2B6EDAC95E3D-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2022-11-23 19:14                           ` Sébastien Boisgérault
       [not found]                             ` <0afec597-2662-487a-8e2d-6c74c85b3ca5n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Sébastien Boisgérault @ 2022-11-23 19:14 UTC (permalink / raw)
  To: pandoc-discuss


[-- 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 --]

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

* Re: command-line pandoc on iOS
       [not found]                             ` <0afec597-2662-487a-8e2d-6c74c85b3ca5n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2022-11-28 21:23                               ` John MacFarlane
  0 siblings, 0 replies; 9+ messages in thread
From: John MacFarlane @ 2022-11-28 21:23 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Yes, this is definitely very promising.  We just have to wait for this to appear 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ébastien Boisgérault <sebastien.boisgerault-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> 
> 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.

-- 
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/F8973DB9-5EF4-4075-A124-26B3F985D7EF%40gmail.com.


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

end of thread, other threads:[~2022-11-28 21:23 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-16 15:20 command-line pandoc on iOS 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
     [not found]                             ` <0afec597-2662-487a-8e2d-6c74c85b3ca5n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-11-28 21:23                               ` John MacFarlane

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