[ANN] RedCloth 4.0.0 -- Total rewrite - less buggy - 40x fas

J

Jason Garber

I sent this message to the list early Tuesday morning, but it never
showed up. Here's hoping a post to Ruby Forum fares better...

RedCloth 4.0 is out.

The highlights:
* It brings Ruby Textile processing more in line with Textile 2, so no
more Markdown support (there are other libraries for that). There are a
number of new Textile 2 modifiers supported and line breaks behave the
way they should in Textile. Output (less trivial whitespace) is
identical to Textile 2 except a few cases where the RedCloth way was
preferable.
* It's a C extension, generated with Ragel (the same
finite-state-machine juice that powers Mongrel and Hpricot), and it's 40
times faster than the pure Ruby version was.
* It's less buggy than the previous version, one would hope, with over
500 test cases, including all the examples from the Textile 2
documentation.

To install or update your gems:
gem install RedCloth

Then choose the native Ruby gem or the Win32 binary gem.

A few notes:
* There may be some confusion about which version of RedCloth your app
is running if you had RedCloth 3 installed in your project directly, not
using gems. If the old one is found earlier in your LOAD_PATH, you're
still on RedCloth 3. If in doubt, you can run "RedCloth::VERSION"
through your app and it should output "<p>4.0.0</p>".
* This is a total rewrite--and a major release at that. The old hacks
you may have used, both in content (to work around parsing bugs) and in
use of the library (to add in custom behavior) may not work. We've
tried to make it as backward-compatible as possible, but it may take a
little adjustment. Such is the price of progress.
* As complex as Textile is, there will probably be many bugs in this
first version. We'll handle them and release new versions on a fairly
short cycle. *Update:* 4.0.1 was just released to address some small
bugs reported since 4.0 was released on Monday. See the CHANGELOG for
details.

Thanks go to Why the Lucky Stiff for starting RedCloth and the rewrite
and so readily handing the project off when he got involved in Shoes.
Thanks also to the many people that downloaded the testing gems or
checked out from GitHub and offered their patches. I also appreciate my
employer, Eastern Mennonite University, seeing the value in open source
software and allowing a few hours hacking time a week so they could have
a Textile-powered CMS that really works.

Jason Garber

http://redcloth.org/
http://rubyforge.org/projects/redcloth/
http://github.com/jgarber/redcloth/commits/RELEASE_4_0_0
http://jgarber.lighthouseapp.com/projects/13054-redcloth
 
C

Charles Oliver Nutter

Jason said:
I sent this message to the list early Tuesday morning, but it never
showed up. Here's hoping a post to Ruby Forum fares better...

RedCloth 4.0 is out. ...
* It's a C extension, generated with Ragel (the same
finite-state-machine juice that powers Mongrel and Hpricot), and it's 40
times faster than the pure Ruby version was.

This is new, right? So with the addition of a C extension, I guess this
won't work under JRuby until we get the Ragel bits converted. For those
using RedCloth under JRuby, feel free to contact us about getting
RedCloth 4.0 running, or stick to 3.0 for the time being.

(FYI, we've already had a couple reports about RedCloth 4.0 not working).

- Charlie
 
R

Roger Pack

Jason said:
I sent this message to the list early Tuesday morning, but it never
showed up. Here's hoping a post to Ruby Forum fares better...
* It's a C extension, generated with Ragel (the same
finite-state-machine juice that powers Mongrel and Hpricot), and it's 40
times faster than the pure Ruby version was.

Thanks for doing that. I've been using the SVN version of this for
awhile and it cuts my rendering time for textile blocks from like 0.08
to 0.02. Nice work. Hope it kills all those nasty bugs 3.0.4 had, too.

-R
 
J

Jason Garber

Correct. The Ragel bits shouldn't be too hard to convert from C to
Java. My concern is how to keep it DRY. Feel free to fork and
restructure.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top