Markdowners, just a short heads-up to a newly released Markdown implementation: "pegdown" (http://github.com/sirthias/pegdown) implements a Java Markdown-to-HTML processor based on a PEG parser with the grammar being based on John MacFarlanes C implementation "peg-markdown". pegdown uses "parboiled" (http://www.parboiled.org) for the actual parsing work and, as such, is quite easy to read, understand and therefore extend. Currently pegdown fully passes the latest "official" Markdown test suite and optionally supports two small extensions. Since I need table support in my own application I will also implement at least the PHP Markdown Extras table extension. Two questions to you seasoned Markdown experts: 1. Test Suite: Is there anything more than John Grubers test suite that you know off? Maybe a good, large file for benchmarking? I'd like to compare pegdowns performance to some other implementations. I could also run the original test suite a few times in a row for benchmarking but maybe there is another more accepted benchmark available somewhere? Since the Markdown PEG grammar appears to be quite "backtracky" it might be a good candidate for exercising the packrat optimization I plan for parboiled... however, I'd be happier to have it chew on some really large and complicated Markdown source for establishing a good baseline. 2. Markdown wiki: I'd like to advertise this new Java implementation on the original Markdown wiki, especially since the only other Java alternative (MarkdownJ) probably doesn't cut it in many cases. However, it seems account creation for the wiki is defunct so that only people with existing accounts can make changes. Would someone be able to add a link to pegdown to the "list" of Java implementations? Of course, I would also do it myself if someone could give me a hint as to how to get my fingers in there.... Any feedback is of course more than welcome! Cheers, Mathias --- mathias at parboiled.org http://www.parboiled.org
On 3 May 2010, at 09:42, Mathias wrote:> 1. Test Suite: Is there anything more than John Grubers test suite > that you know off? Maybe a good, large file for benchmarking? I'd > like to compare pegdowns performance to some other implementations. > I could also run the original test suite a few times in a row for > benchmarking but maybe there is another more accepted benchmark > available somewhere?Not aware of one but I wrote the TextMate manual in Markdown and it is available here: http://svn.textmate.org/trunk/Manual/pages/en/ So this is a real-world example of Markdown use. I convert both each page individually and all of them for the printable version?. Example: % svn co http://svn.textmate.org/trunk/Manual/pages/en/ % cd en % for f in *.mdown; do { cat "$f"; echo; } >> printable.mdown; done % time for f in *.mdown; do Markdown.pl < "$f" > /dev/null; done real 0m4.503s This is on a 2.8 GHz Quad Core Intel Xeon (and using Markdown 1.0.1). 75% of the time is spent on printable.mdown. I btw have some references I normally append to the input, but these are not in the public repos. If you want to use the pages for a real benchmark suite and want the references, let me know. ? I actually concat the HTML versions, but for a benchmark it would be good with also a large file, and this one isn?t exactly contrived.
On 3 May 2010, at 10:29, Allan Odgaard wrote:> On 3 May 2010, at 09:42, Mathias wrote: > >> 1. Test Suite: Is there anything more than John Grubers test suite >> that you know off? Maybe a good, large file for benchmarking? [...] > [...] > So this is a real-world example of Markdown use.Just occurred to me that all Gruber?s articles are also available in source form, e.g. http://daringfireball.net/2010/04/middleware_and_section_311.text
Thanks, Allan, for the pointers. I might just concat all these sources together to generate something heavy.... Cheers, Mathias --- mathias at parboiled.org http://www.parboiled.org On 03.05.2010, at 10:33, Allan Odgaard wrote:> On 3 May 2010, at 10:29, Allan Odgaard wrote: > >> On 3 May 2010, at 09:42, Mathias wrote: >> >>> 1. Test Suite: Is there anything more than John Grubers test suite that you know off? Maybe a good, large file for benchmarking? [...] >> [...] >> So this is a real-world example of Markdown use. > > Just occurred to me that all Gruber?s articles are also available in source form, e.g. http://daringfireball.net/2010/04/middleware_and_section_311.text > > _______________________________________________ > Markdown-Discuss mailing list > Markdown-Discuss at six.pairlist.net > http://six.pairlist.net/mailman/listinfo/markdown-discuss
Le 2010-05-03 ? 3:42, Mathias a ?crit :> 1. Test Suite: Is there anything more than John Grubers test suite that you know off? Maybe a good, large file for benchmarking? I'd like to compare pegdowns performance to some other implementations. I could also run the original test suite a few times in a row for benchmarking but maybe there is another more accepted benchmark available somewhere?I've made a test suite for PHP Markdown called MDTest, which includes a couple more tests and a system to normalize the HTML output to avoid flagging as error insignificant whitespace differences. <http://michelf.com/docs/projects/mdtest-1.1.zip> It's lacking a couple of other tests I added recently. -- Michel Fortin michel.fortin at michelf.com http://michelf.com/
Le 2010-05-03 ? 7:03, Michel Fortin a ?crit :> <http://michelf.com/docs/projects/mdtest-1.1.zip>Sorry. Bad URL. Try this one: <http://michelf.com/docs/projets/mdtest-1.1.zip> -- Michel Fortin michel.fortin at michelf.com http://michelf.com/