From tiberiuturbureanu at gmail.com Tue Sep 9 15:22:11 2008 From: tiberiuturbureanu at gmail.com (Tibi Turbureanu) Date: Tue, 09 Sep 2008 22:22:11 +0300 Subject: Extending RedCloth for CS faculty Message-ID: <1220988131.6659.26.camel@tn> Hello everyone, I want to extend RedCloth so my Faculty may use Instiki with the modified RedCloth plugin, for lab exercises. I thought I might use the RedCloth parser and identify new keywords like #!show_sol, #!hide_sol, #solution to permit administrators (professors, assistants) to hide the solutions for the lab exercises when students have to solve them and after that to show the solutions. Using a wiki for labs has lots of advantages and this is why we decided to extend an existent syntax (textile). Can you please give me some tips for this task? * Is it the right approach extending RedCloth? * I browsed the source but couldn't find the file I should alter (I am Ruby newbie). * How do you find the keywords? Example: #!hide_sol ... # Use the `grep' command to output the lines containing smth in file.txt #!solution{ cat file.txt | grep "smth" } ... and after the lab: #!show_sol ... # Use the `grep' command to output the lines containing smth in file.txt #!solution{ cat file.txt | grep "smth" } ... Thank you in advance, Tibi From jg at jasongarber.com Fri Sep 12 03:33:35 2008 From: jg at jasongarber.com (Jason Garber) Date: Fri, 12 Sep 2008 03:33:35 -0400 Subject: Extending RedCloth for CS faculty In-Reply-To: <1220988131.6659.26.camel@tn> References: <1220988131.6659.26.camel@tn> Message-ID: <2C9CB422-B1DD-44EE-A6F3-6F816E30D757@jasongarber.com> Hi, Tibi. Sorry I haven't responded in so long. Things are quite busy at work right now. I suggest you don't extend RedCloth but rather that you filter that text before passing it to RedCloth. Just a couple regular expressions in Ruby could handle it much better than RedCloth and at very low expense. Best wishes! Jason Garber On Sep 9, 2008, at 3:22 PM, Tibi Turbureanu wrote: > Hello everyone, > > I want to extend RedCloth so my Faculty may use Instiki with the > modified RedCloth plugin, for lab exercises. > > I thought I might use the RedCloth parser and identify new keywords > like > #!show_sol, #!hide_sol, #solution to permit administrators > (professors, > assistants) to hide the solutions for the lab exercises when students > have to solve them and after that to show the solutions. > > Using a wiki for labs has lots of advantages and this is why we > decided > to extend an existent syntax (textile). > > Can you please give me some tips for this task? > * Is it the right approach extending RedCloth? > * I browsed the source but couldn't find the file I should alter (I am > Ruby newbie). > * How do you find the keywords? > > Example: > > #!hide_sol > ... > # Use the `grep' command to output the lines containing smth in > file.txt > #!solution{ > cat file.txt | grep "smth" > } > ... > > and after the lab: > > #!show_sol > ... > # Use the `grep' command to output the lines containing smth in > file.txt > #!solution{ > cat file.txt | grep "smth" > } > ... > > Thank you in advance, > Tibi > > _______________________________________________ > Redcloth-upwards mailing list > Redcloth-upwards at rubyforge.org > http://rubyforge.org/mailman/listinfo/redcloth-upwards From tiberiuturbureanu at gmail.com Sun Sep 14 16:51:55 2008 From: tiberiuturbureanu at gmail.com (Tibi Turbureanu) Date: Sun, 14 Sep 2008 23:51:55 +0300 Subject: Extending RedCloth for CS faculty In-Reply-To: <2C9CB422-B1DD-44EE-A6F3-6F816E30D757@jasongarber.com> References: <1220988131.6659.26.camel@tn> <2C9CB422-B1DD-44EE-A6F3-6F816E30D757@jasongarber.com> Message-ID: <1221425515.6579.5.camel@tn> Hi Jason and thank you for your response, On Fri, 2008-09-12 at 03:33 -0400, Jason Garber wrote: > Hi, Tibi. Sorry I haven't responded in so long. Things are quite > busy at work right now. Good luck! ;) > > I suggest you don't extend RedCloth but rather that you filter that > text before passing it to RedCloth. Just a couple regular > expressions in Ruby could handle it much better than RedCloth and at > very low expense. I tried but can't find where in the source code is the part Instiki sends the wiki page to RedCloth parser. Can you give me some tips? :D Thanks, Tibi > > > On Sep 9, 2008, at 3:22 PM, Tibi Turbureanu wrote: > > > Hello everyone, > > > > I want to extend RedCloth so my Faculty may use Instiki with the > > modified RedCloth plugin, for lab exercises. > > > > I thought I might use the RedCloth parser and identify new keywords > > like > > #!show_sol, #!hide_sol, #solution to permit administrators > > (professors, > > assistants) to hide the solutions for the lab exercises when students > > have to solve them and after that to show the solutions. > > > > Using a wiki for labs has lots of advantages and this is why we > > decided > > to extend an existent syntax (textile). > > > > Can you please give me some tips for this task? > > * Is it the right approach extending RedCloth? > > * I browsed the source but couldn't find the file I should alter (I am > > Ruby newbie). > > * How do you find the keywords? > > > > Example: > > > > #!hide_sol > > ... > > # Use the `grep' command to output the lines containing smth in > > file.txt > > #!solution{ > > cat file.txt | grep "smth" > > } > > ... > > > > and after the lab: > > > > #!show_sol > > ... > > # Use the `grep' command to output the lines containing smth in > > file.txt > > #!solution{ > > cat file.txt | grep "smth" > > } > > ... > > > > Thank you in advance, > > Tibi > > > > _______________________________________________ > > Redcloth-upwards mailing list > > Redcloth-upwards at rubyforge.org > > http://rubyforge.org/mailman/listinfo/redcloth-upwards > > _______________________________________________ > Redcloth-upwards mailing list > Redcloth-upwards at rubyforge.org > http://rubyforge.org/mailman/listinfo/redcloth-upwards -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 2161 bytes Desc: not available URL: From jason at hybd.net Sun Sep 14 17:27:01 2008 From: jason at hybd.net (Jase) Date: Sun, 14 Sep 2008 22:27:01 +0100 Subject: Extending RedCloth for CS faculty In-Reply-To: <1221425515.6579.5.camel@tn> References: <1220988131.6659.26.camel@tn> <2C9CB422-B1DD-44EE-A6F3-6F816E30D757@jasongarber.com> <1221425515.6579.5.camel@tn> Message-ID: <1221427621.19890.4.camel@jase-ubuntu> On Sun, 2008-09-14 at 23:51 +0300, Tibi Turbureanu wrote: > Hi Jason and thank you for your response, > > On Fri, 2008-09-12 at 03:33 -0400, Jason Garber wrote: > > Hi, Tibi. Sorry I haven't responded in so long. Things are quite > > busy at work right now. > > Good luck! ;) > > > > I suggest you don't extend RedCloth but rather that you filter that > > text before passing it to RedCloth. Just a couple regular > > expressions in Ruby could handle it much better than RedCloth and at > > very low expense. If you did go down the route of extending Redcloth, you can look at the tests / reimplementing the formatters. I did have a page that explained how to do this, but damn server is down (friend's server, I planned to move away from it tbh). > I tried but can't find where in the source code is the part Instiki > sends the wiki page to RedCloth parser. Can you give me some tips? :D grep is your friend here. From the Instiki source, I suggest: grep -rn 'Redcloth' . If there is .svn files about, you can make this: grep -rn 'Redcloth' . | svn -v svn see as the pesky SVN files always get in the way. > Thanks, > Tibi > > > > > > On Sep 9, 2008, at 3:22 PM, Tibi Turbureanu wrote: > > > > > Hello everyone, > > > > > > I want to extend RedCloth so my Faculty may use Instiki with the > > > modified RedCloth plugin, for lab exercises. > > > > > > I thought I might use the RedCloth parser and identify new keywords > > > like > > > #!show_sol, #!hide_sol, #solution to permit administrators > > > (professors, > > > assistants) to hide the solutions for the lab exercises when students > > > have to solve them and after that to show the solutions. > > > > > > Using a wiki for labs has lots of advantages and this is why we > > > decided > > > to extend an existent syntax (textile). > > > > > > Can you please give me some tips for this task? > > > * Is it the right approach extending RedCloth? > > > * I browsed the source but couldn't find the file I should alter (I am > > > Ruby newbie). > > > * How do you find the keywords? > > > > > > Example: > > > > > > #!hide_sol > > > ... > > > # Use the `grep' command to output the lines containing smth in > > > file.txt > > > #!solution{ > > > cat file.txt | grep "smth" > > > } > > > ... > > > > > > and after the lab: > > > > > > #!show_sol > > > ... > > > # Use the `grep' command to output the lines containing smth in > > > file.txt > > > #!solution{ > > > cat file.txt | grep "smth" > > > } > > > ... > > > > > > Thank you in advance, > > > Tibi > > > > > > _______________________________________________ > > > Redcloth-upwards mailing list > > > Redcloth-upwards at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/redcloth-upwards > > > > _______________________________________________ > > Redcloth-upwards mailing list > > Redcloth-upwards at rubyforge.org > > http://rubyforge.org/mailman/listinfo/redcloth-upwards > _______________________________________________ > Redcloth-upwards mailing list > Redcloth-upwards at rubyforge.org > http://rubyforge.org/mailman/listinfo/redcloth-upwards From jg at jasongarber.com Tue Sep 16 10:20:07 2008 From: jg at jasongarber.com (Jason Garber) Date: Tue, 16 Sep 2008 10:20:07 -0400 Subject: JRuby branch started Message-ID: <8523480F-1E21-48BD-A551-E79EF90B20C3@jasongarber.com> I've started a branch on GitHub so that those who are interested can hack on JRuby compatibility for RedCloth: http://github.com/jgarber/redcloth/tree/jruby As I've said from time to time, I don't have the time, skills, or inclination to work on it, but I didn't want to hold back those who do. Thus, I've refactored the code a bit in the branch to separate out the Ragel code from the C code. All you have to do, I think (from reading the Hpricot source), is create identical functions in Java where possible. There will be a few cases where a Ragel pattern will have to be rewritten for C and Java, but they should be very, very few. To get started: 1. if you don't have JRuby installed, rake jruby:install # Installs jruby in a subdirectory of ./ test/ set your PATH for jruby you may need to gem install echoe in jruby 2. hack away 3. compile with rake jruby:redcloth_scan_java 4. jruby -S rake test 5. go back to (2) and repeat until all tests pass I'm thinking when JRuby support is at 100% (all test cases pass), we merge it into trunk and release RedCloth 5. From now until then, all donations to the redcloth fund on pledgie will be saved up for the contributors to the JRuby branch. At release, I'll divide it up among contributors (myself excluded) according to my judgement of their contribution.(1) Donate (nay, invest!) now if you want to see a JRuby version released: http://www.pledgie.com/campaigns/1081 Jason 1.) If there's little or no progress made on the branch by Christmas, I'll return the money to the people who gave it. (2) 2.) If for some reason I can't return the money, I'll donate it to charity. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jg at jasongarber.com Tue Sep 16 10:33:54 2008 From: jg at jasongarber.com (Jason Garber) Date: Tue, 16 Sep 2008 10:33:54 -0400 Subject: JRuby branch started In-Reply-To: <8523480F-1E21-48BD-A551-E79EF90B20C3@jasongarber.com> References: <8523480F-1E21-48BD-A551-E79EF90B20C3@jasongarber.com> Message-ID: <6ABB3E86-8C1D-4675-B0CE-9019D8276B42@jasongarber.com> Whoops! I should have made this step before #1: fork and check out the jruby branch. We don't want Java contributions on master! On Sep 16, 2008, at 10:20 AM, Jason Garber wrote: > I've started a branch on GitHub so that those who are interested can > hack on JRuby compatibility for RedCloth: > http://github.com/jgarber/redcloth/tree/jruby > > As I've said from time to time, I don't have the time, skills, or > inclination to work on it, but I didn't want to hold back those who > do. Thus, I've refactored the code a bit in the branch to separate > out the Ragel code from the C code. All you have to do, I think > (from reading the Hpricot source), is create identical functions in > Java where possible. There will be a few cases where a Ragel > pattern will have to be rewritten for C and Java, but they should be > very, very few. > > To get started: > > 1. if you don't have JRuby installed, > rake jruby:install # Installs jruby in a subdirectory of ./ > test/ > set your PATH for jruby > you may need to gem install echoe in jruby > 2. hack away > 3. compile with rake jruby:redcloth_scan_java > 4. jruby -S rake test > 5. go back to (2) and repeat until all tests pass > > I'm thinking when JRuby support is at 100% (all test cases pass), we > merge it into trunk and release RedCloth 5. From now until then, > all donations to the redcloth fund on pledgie will be saved up for > the contributors to the JRuby branch. At release, I'll divide it up > among contributors (myself excluded) according to my judgement of > their contribution.(1) > > Donate (nay, invest!) now if you want to see a JRuby version > released: http://www.pledgie.com/campaigns/1081 > > Jason > > 1.) If there's little or no progress made on the branch by > Christmas, I'll return the money to the people who gave it. (2) > 2.) If for some reason I can't return the money, I'll donate it to > charity. -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.bannasch at deanbrook.org Tue Sep 16 11:23:09 2008 From: stephen.bannasch at deanbrook.org (Stephen Bannasch) Date: Tue, 16 Sep 2008 11:23:09 -0400 Subject: JRuby branch started In-Reply-To: <6ABB3E86-8C1D-4675-B0CE-9019D8276B42@jasongarber.com> References: <8523480F-1E21-48BD-A551-E79EF90B20C3@jasongarber.com> <6ABB3E86-8C1D-4675-B0CE-9019D8276B42@jasongarber.com> Message-ID: At 10:33 AM -0400 9/16/08, Jason Garber wrote: >Whoops! I should have made this step before #1: fork and check out >the jruby branch. We don't want Java contributions on master! > >On Sep 16, 2008, at 10:20 AM, Jason Garber wrote: > >>I've started a branch on GitHub so that those who are interested >>can hack on JRuby compatibility for RedCloth: >>http://github.com/jgarber/redcloth/tree/jruby Ha ... ;-) Last night I started a jruby branch -- I've made some progress. When I get it a bit further I'll make a public fork on github of redcloth and the combined jruby branch -------------- next part -------------- An HTML attachment was scrubbed... URL: From klaas.prause at gmx.de Wed Sep 17 03:17:18 2008 From: klaas.prause at gmx.de (Klaas Prause) Date: Wed, 17 Sep 2008 09:17:18 +0200 Subject: JRuby branch started In-Reply-To: References: <8523480F-1E21-48BD-A551-E79EF90B20C3@jasongarber.com> <6ABB3E86-8C1D-4675-B0CE-9019D8276B42@jasongarber.com> Message-ID: <48D0AEFE.7080107@gmx.de> Sounds good. I forked on GitHub to check the stuff out as well. If you are already making progress, this is maybe a waste of time? If you need some help just say so, else I won't try to get the jruby support working. Regards Klaas Stephen Bannasch schrieb: > At 10:33 AM -0400 9/16/08, Jason Garber wrote: >> Whoops! I should have made this step before #1: fork and check out >> the jruby branch. We don't want Java contributions on master! >> >> On Sep 16, 2008, at 10:20 AM, Jason Garber wrote: >> >>> I've started a branch on GitHub so that those who are interested can >>> hack on JRuby compatibility for RedCloth: >>> http://github.com/jgarber/redcloth/tree/jruby > > Ha ... ;-) > > Last night I started a jruby branch -- I've made some progress. When I > get it a bit further I'll make a public fork on github of redcloth and > the combined jruby branch > ------------------------------------------------------------------------ > > _______________________________________________ > Redcloth-upwards mailing list > Redcloth-upwards at rubyforge.org > http://rubyforge.org/mailman/listinfo/redcloth-upwards From jg at jasongarber.com Mon Sep 22 16:58:55 2008 From: jg at jasongarber.com (Jason Garber) Date: Mon, 22 Sep 2008 16:58:55 -0400 Subject: JRuby branch started In-Reply-To: <48D0AEFE.7080107@gmx.de> References: <8523480F-1E21-48BD-A551-E79EF90B20C3@jasongarber.com> <6ABB3E86-8C1D-4675-B0CE-9019D8276B42@jasongarber.com> <48D0AEFE.7080107@gmx.de> Message-ID: Has anyone announced this effort on the JRuby listserv? I'm not a member, but if any of you are, perhaps you'd consider letting them know? Jason