caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Syntax highlighting and Ocaml/PHP integration
@ 2008-10-01 15:21 Dario Teixeira
  2008-10-01 15:27 ` [Caml-list] " Martin Jambon
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Dario Teixeira @ 2008-10-01 15:21 UTC (permalink / raw)
  To: caml-list

Hi,

I'm looking for a GPL-compatible syntax highlighting library with support
for most common programming languages and markups.  Obviously I would
prefer a native Ocaml library, though something in C would also be
acceptable due the relative ease of writing bindings.

One library that looks competent is GeSHi [1].  Unfortunately it is
written in PHP.  However, for lack of alternatives, I am looking into
ways of integrating GeSHi with Ocaml.

I reckon that a shell invocation of PHP is straightforward, but I bet
that it would entail a huge performance penalty due to the startup time.
Therefore, I am looking into somehow integrating the PHP interpreter
within the main Ocaml programme.  Something like Apache's mod_php.
Does anyone have any experience with this?  (Note that I have *zero*
experience with PHP).

If all else fails, my backup solution is simply to run a small webserver
with GeSHi and transform the library call into a web service.  Though I
would rather avoid this convoluted option.


Thanks in advance for your input!
Best regards,
Dario Teixeira

P.S.  Another (possibly far-fetched) solution is to take advantage of the
      syntax highlighting capabilities of Vim or Emacs.  Something along
      the lines of embedding or remotely invoking one of these editors,
      with the sole purpose of asking them to highlight a text file.
      Is this even possible?

[1] http://qbnz.com/highlighter/






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

end of thread, other threads:[~2008-10-03 15:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-01 15:21 Syntax highlighting and Ocaml/PHP integration Dario Teixeira
2008-10-01 15:27 ` [Caml-list] " Martin Jambon
2008-10-01 15:27 ` Dave Benjamin
2008-10-01 15:45 ` Re : " Adrien
2008-10-01 15:47   ` Re : " Adrien
2008-10-03 15:22 ` Dario Teixeira

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