Credit where credit is due.

I just committed new Radeox Wiki and Textile plugins for Roller. The Textile plugin works beautifully, but as I mentioned earlier, the Radeox plugin still needs some work. I used the open source Blojsom Textile plugin, but I had to follow Winer's rule and pay for the software by giving credit to Mark and Dave. Thanks guys. I would have used JTextile, but it relies on GNU regex and the code is not as pretty as the code from Blojsom.



Like this post?  del.icio.us Bookmark it   |   submit to dig digg.com Digg it   |   slashdot Slashdot it   |   technorati See who links to it

Comments:

We had originally looked at JTextile as well. However, I think one of the reasons we decided against it was we didn't feel we needed to add another regex library to the WEB-INF/lib directory :) Glad the code could help and thanks for the <p-diddy>mad props</p-diddy>.

Posted by David Czarnecki on May 28, 2003 at 09:33 AM EDT #

Very cool Dave. I was reading through the Textile code (thanks Mark and Dave2) when I saw the StringTokenizer in the "trim each line" section! I think everyone knows StringTokenizer is horribly inefficient - have you guys given any thought to "optimizing" this? ... I know, premature optimization, but when something jumps up and smacks you in the head ... Anyway, if you don't do it I may just get to it eventually and feed the changes back (someday).

Posted by Lance on May 28, 2003 at 09:33 AM EDT #

Heh, Mark was complaining that the TextilePlugin was an "expensive" plugin. Maybe that was part of the reason. That should be an easy fix as it looks like we only need to split on the newline character and we've already got that functionality in java.lang.String.split(String regex). Heh, I can't wait until Mark reads this thread.

Posted by David Czarnecki on May 28, 2003 at 09:39 AM EDT #

Well I wrote that plugin in pretty much a single sitting so I was more concerned with getting the regex's right (JTextile's wont work for the most part). As for optimization, suggestions are always welcome. The way textile works you do need to tokenize around html tags, and the string split() ignores the block matched against for the split. Dave1, are you using the Textile class straight? I was thinking of breaking this into a piece of code outside of blojsom (say Textile4j<g>).. and I do have some cleanup I want to do...

Posted by Mark Lussier on May 28, 2003 at 09:42 AM EDT #

Oh man, another JAR file for the WEB-INF/lib directory. It's all over for us! I'm thinking of the whole JDOM/dom4j thing. First there was JTextile. Now there's going to be textile4j. If there's anyone out there who doesn't think there are patterns to software development (even in naming), they're wrong ... so wrong :)

Posted by David Czarnecki on May 28, 2003 at 09:49 AM EDT #

Yep, I'm using it straight. The only change I made was to put it in a package under org.roller...

Posted by Dave Johnson on May 28, 2003 at 11:54 AM EDT #

"I was more concerned with getting the regex's right" - understood. I think textile4j is a good idea, there should be a Jxxx and xxx4j for everything (competition is good).

Posted by Lance on May 28, 2003 at 03:15 PM EDT #

Hi, I helped write JTextile, and when we wrote it, we didn't see any other Textile implementations in Java out there, so it's interesting to see another spring up :) "JTextile's wont work for the most part" - JTextile matches Mark Pilgrims's pyTextile almsot regex for regex, but only when using the GNU regex lib. The three regex libs we tried when writing JTextile all implemented regexes differently, and no two accepted the same regexes. Which was a pain in the ass, I can tell you now. :) We decided on the GNU regex library because it seemed far and away the fastest and most versatile of the ones we tried (without adding ugly hacks to other regex libraries). FYI we compared it to the Apache regex lib and the JDK1.4.1 regex lib. The code was run out very very quickly, and there are definitely some optimisations to be made, but we were writing the code for ourselves, so it didn't matter too much at the time. I've grabbed blojsom's textile implementation our of CVS and will have a look over the weekend.

Posted by Phil Wilson on May 30, 2003 at 10:03 AM EDT #

Hm. Is there not an RSS feed for these comments?

Posted by Phil Wilson on May 30, 2003 at 10:09 AM EDT #

Phil, are you aware (I'm sure you are) that several people have, at various times, tried to come up with a "common" RegEx packages? Rather like the Jakarta Commons Loggin package, which sits as an abstraction layer over Log4J, jdk1.4 logging, and Avalon's LogKit. To my knowledge, no one has yet succeeded. ;-)

Posted by Lance on May 30, 2003 at 01:55 PM EDT #

Yeah, it's a pain in the ass. :)

Posted by Phil Wilson on May 31, 2003 at 08:09 AM EDT #

How would I go about using either the textile or radeox plugins ? are they included in the current running freeroller ? ( 0.9.7 ) Cheers Zohar

Posted by Zohar on June 20, 2003 at 09:55 PM EDT #

Post a Comment:
  • HTML Syntax: Allowed

This work is licensed under a Creative Commons License.
Copyright 2002-2007, David M Johnson (dave.johnson at rollerweblogger.org)

This is a personal weblog, I do not speak for my employer.