Hi everyone,
Thanks for the numerous replies. There are a lot of good solutions
in there, and the ones that looked closest to what I had in mind
seem to be MPP and the rwo-run-toplevel script. Some questions
about these two tools:
- MPP seems to just have the built-in language. I couldn't find
any example in the examples/ directory that used another language,
such as OCaml. I guess that's because it's still in development?
- rwo-run-toplevel seems closer to what I have in mind; if I could
send all the ocaml parts to a top-level session, and put in my
document what gets sent to stdout (not the toplevel reply, that
is, not the "val f: int -> int" parts), that would be pretty
much all I need. rwo-run-toplevel seems to perform a lot of work,
though: what are all these rewrite rules?
Other solutions seemed interesting. The Perl script scared me a
little bit; being no Perl hacker, I would have a hard time using
it. The Markdown library does not seem to be an exact fit (I want
the output of arbitrary OCaml commands to be put in the middle of
my markdown.) Stog seems to be oriented towards reproducing an
interactive toploop session, while I'm more interested in
executing arbitrary commands. Alain's sed trick seems to be
exactly what I need, I'm just a bit afraid if I ever need to
change something, it'll be break. But in essence, yes, that's just
all I need. Other proposals seemed a little bit too far away from
what I had in mind.
Thanks again for the replies!
~ jonathan
On 09/02/2013 06:29 PM, Ashish Agarwal wrote: