|
 |
Some guy invented a language which he calls "Markdown":
http://daringfireball.net/projects/markdown/
It's a markup langauge that looks almost like plain text, but he wrote a
Perl script that can transform it into HTML with pretty formatting.
(Stuff like lines prefixed with "-" become bullet points, words unclosed
with "*" become italic, URLs become links, etc.)
That's pretty neat. But then a bunch of Haskell hackers came along and
developed a program called Pandoc:
http://johnmacfarlane.net/pandoc/
This translates Markdown into HTML, LaTeX (and therefore PDF),
Micro$oft's Rich Text format, DocBook XML, OpenDocument XML, OpenOffice
ODT, Texinfo or groff man, or even MediaWiki markup. It also adds a few
new syntax constructs [which can be disabled for compatibility], and it
follows the written Markdown language spec more closely than the Perl
version does.
This tool is written entirely in Haskell. As we all know, Haskell is
slower than all other programming languages. This explains how Pandoc
manages to outperform the Perl Markdown script:
Perl Markdown: 15 seconds
Compiled Perl Markdown: 10 seconds
Pandoc (compiled Haskell): 0.9 seconds
So, in summary:
- Pandoc handles Markdown more correctly than the author's own Perl
implementation.
- Pandoc handles many more output formats than the author's own Perl
implementation.
- Pandoc handles more syntax constructs than the author's own Perl
implementation.
- Pandoc is approximately 10x faster than the author's own Perl
implementation.
So it's more correct, has more features, and runs faster. I call that a win!
Post a reply to this message
|
 |