From sutniuq at gmx.net Sun Feb 6 15:05:42 2011 From: sutniuq at gmx.net (Quintus) Date: Sun, 06 Feb 2011 21:05:42 +0100 Subject: Psych can't load LaTeX entities file Message-ID: <4D4EFF16.8070907@gmx.net> Hi there, I wanted to use RedCloth with my RubyOnRails 3 application, but it seems that RoR uses 1.9.2's Psych by default as the YAML parser if available, and Psych fails to load the LaTeX entities file: ==================================================================== #ruby -v: ruby 1.9.2p136 (2010-12-25 revision 30365) [x86_64-linux] irb(main):001:0> Dir.pwd => "/opt/rubies/ruby-1.9.2-p136/lib/ruby/gems/1.9.1/gems/RedCloth-4.2.3/lib/redcloth/formatters" irb(main):002:0> YAML => Psych irb(main):003:0> YAML.load_file("latex_entities.yml") Psych::SyntaxError: couldn't parse YAML at line 182 column 9 from /opt/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/psych.rb:148:in `parse' from /opt/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/psych.rb:148:in `parse_stream' from /opt/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/psych.rb:119:in `parse' from /opt/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/psych.rb:106:in `load' from /opt/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/psych.rb:205:in `load_file' from (irb):3 from /home/quintus/bin/irb_:56:in `
' irb(main):004:0> ==================================================================== The criticized line is this one (for whatever reason Psych's error reporting is off by 1 line): ==================================================================== ldquor: ,, ==================================================================== There are some more occurences of such characters in that file. Apply this patch and loading works fine: ==================================================================== --- lib/redcloth/formatters/latex_entities.yml.old 2011-02-05 12:59:03.143333338 +0100 +++ lib/redcloth/formatters/latex_entities.yml 2011-02-05 13:01:30.540000006 +0100 @@ -180,10 +180,10 @@ "8218": "," #DOUBLE LOW-9 QUOTATION MARK #requires fontenc:T1 -ldquor: ,, +ldquor: ",," #DOUBLE LOW-9 QUOTATION MARK #requires fontenc:T1 -"8222": ,, +"8222": ",," #LATIN SMALL LIGATURE FF "64256": ff #LATIN SMALL LIGATURE FI @@ -197,9 +197,9 @@ #LATIN SMALL LIGATURE FL "64258": fl #DOUBLE HIGH-REVERSED-9 QUOTATION MARK -"8223": `` +"8223": "``" #SINGLE HIGH-REVERSED-9 QUOTATION MARK -"8219": ` +"8219": "`" #VERTICAL ELLIPSIS "8942": \vdots{} #HYPHEN BULLET @@ -502,17 +502,17 @@ #requires fontenc:T1 "187": \guillemotright{} #LEFT SINGLE QUOTATION MARK -lsquo: ` +lsquo: "`" #LEFT SINGLE QUOTATION MARK -"8216": ` +"8216": "`" #RIGHT SINGLE QUOTATION MARK rsquo: "'" #RIGHT SINGLE QUOTATION MARK "8217": "'" #LEFT DOUBLE QUOTATION MARK -ldquo: `` +ldquo: "``" #LEFT DOUBLE QUOTATION MARK -"8220": `` +"8220": "``" #RIGHT DOUBLE QUOTATION MARK rdquo: "''" #RIGHT DOUBLE QUOTATION MARK ==================================================================== Steps to reproduce: 1) Get a Ruby build with Psych support (the libyaml development headers have to be present when compiling Ruby) 2) Go to IRB 3) require "psych" 4) YAML = Psych 5) require "redcloth" Valete, Marvin From stephen.bannasch at deanbrook.org Sun Feb 6 17:05:01 2011 From: stephen.bannasch at deanbrook.org (Stephen Bannasch) Date: Sun, 6 Feb 2011 17:05:01 -0500 Subject: spurious
  • generated when list followed by 3 In-Reply-To: References: Message-ID: At 7:01 AM -0600 1/24/11, Jason Garber wrote: >I was waiting to release until multi-byte characters in Java were >fixed, but seems like that's not likely to happen anytime soon. I'll >go ahead and release. Thanks for the nudge. $ gem search RedCloth -r *** REMOTE GEMS *** RedCloth (4.2.3 ruby universal-java x86-mswin32-60) 4.2.4 nudge ;-) From jg at jasongarber.com Mon Feb 7 10:41:17 2011 From: jg at jasongarber.com (Jason Garber) Date: Mon, 7 Feb 2011 09:41:17 -0600 Subject: Psych can't load LaTeX entities file In-Reply-To: <4D4EFF16.8070907@gmx.net> References: <4D4EFF16.8070907@gmx.net> Message-ID: It's already fixed in master. I'm working on pushing it out now. Thanks for reporting it, though! I wanted to make sure I had caught up with everything before I pushed a release. Jason On Sun, Feb 6, 2011 at 2:05 PM, Quintus wrote: > Hi there, > > I wanted to use RedCloth with my RubyOnRails 3 application, but it seems > that RoR uses 1.9.2's Psych by default as the YAML parser if available, > and Psych fails to load the LaTeX entities file: > > ==================================================================== > #ruby -v: ruby 1.9.2p136 (2010-12-25 revision 30365) [x86_64-linux] > irb(main):001:0> Dir.pwd > => > > "/opt/rubies/ruby-1.9.2-p136/lib/ruby/gems/1.9.1/gems/RedCloth-4.2.3/lib/redcloth/formatters" > irb(main):002:0> YAML > => Psych > irb(main):003:0> YAML.load_file("latex_entities.yml") > Psych::SyntaxError: couldn't parse YAML at line 182 column 9 > from /opt/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/psych.rb:148:in > `parse' > from /opt/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/psych.rb:148:in > `parse_stream' > from /opt/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/psych.rb:119:in > `parse' > from /opt/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/psych.rb:106:in > `load' > from /opt/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/psych.rb:205:in > `load_file' > from (irb):3 > from /home/quintus/bin/irb_:56:in `
    ' > irb(main):004:0> > ==================================================================== > > The criticized line is this one (for whatever reason Psych's error > reporting is off by 1 line): > > ==================================================================== > ldquor: ,, > ==================================================================== > > There are some more occurences of such characters in that file. Apply > this patch and loading works fine: > > ==================================================================== > --- lib/redcloth/formatters/latex_entities.yml.old 2011-02-05 > 12:59:03.143333338 +0100 > +++ lib/redcloth/formatters/latex_entities.yml 2011-02-05 > 13:01:30.540000006 +0100 > @@ -180,10 +180,10 @@ > "8218": "," > #DOUBLE LOW-9 QUOTATION MARK > #requires fontenc:T1 > -ldquor: ,, > +ldquor: ",," > #DOUBLE LOW-9 QUOTATION MARK > #requires fontenc:T1 > -"8222": ,, > +"8222": ",," > #LATIN SMALL LIGATURE FF > "64256": ff > #LATIN SMALL LIGATURE FI > @@ -197,9 +197,9 @@ > #LATIN SMALL LIGATURE FL > "64258": fl > #DOUBLE HIGH-REVERSED-9 QUOTATION MARK > -"8223": `` > +"8223": "``" > #SINGLE HIGH-REVERSED-9 QUOTATION MARK > -"8219": ` > +"8219": "`" > #VERTICAL ELLIPSIS > "8942": \vdots{} > #HYPHEN BULLET > @@ -502,17 +502,17 @@ > #requires fontenc:T1 > "187": \guillemotright{} > #LEFT SINGLE QUOTATION MARK > -lsquo: ` > +lsquo: "`" > #LEFT SINGLE QUOTATION MARK > -"8216": ` > +"8216": "`" > #RIGHT SINGLE QUOTATION MARK > rsquo: "'" > #RIGHT SINGLE QUOTATION MARK > "8217": "'" > #LEFT DOUBLE QUOTATION MARK > -ldquo: `` > +ldquo: "``" > #LEFT DOUBLE QUOTATION MARK > -"8220": `` > +"8220": "``" > #RIGHT DOUBLE QUOTATION MARK > rdquo: "''" > #RIGHT DOUBLE QUOTATION MARK > ==================================================================== > > Steps to reproduce: > > 1) Get a Ruby build with Psych support (the libyaml development headers > have to be present when compiling Ruby) > 2) Go to IRB > 3) require "psych" > 4) YAML = Psych > 5) require "redcloth" > > Valete, > Marvin > _______________________________________________ > Redcloth-upwards mailing list > Redcloth-upwards at rubyforge.org > http://rubyforge.org/mailman/listinfo/redcloth-upwards > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jg at jasongarber.com Mon Feb 7 16:15:48 2011 From: jg at jasongarber.com (Jason Garber) Date: Mon, 7 Feb 2011 15:15:48 -0600 Subject: spurious
  • generated when list followed by 3 In-Reply-To: References: Message-ID: Ta da! https://rubygems.org/gems/RedCloth/versions/4.2.4 Thanks for the nudges, Jason On Sun, Feb 6, 2011 at 4:05 PM, Stephen Bannasch < stephen.bannasch at deanbrook.org> wrote: > At 7:01 AM -0600 1/24/11, Jason Garber wrote: > >I was waiting to release until multi-byte characters in Java were > >fixed, but seems like that's not likely to happen anytime soon. I'll > >go ahead and release. Thanks for the nudge. > > > $ gem search RedCloth -r > > *** REMOTE GEMS *** > > RedCloth (4.2.3 ruby universal-java x86-mswin32-60) > > 4.2.4 nudge ;-) > _______________________________________________ > Redcloth-upwards mailing list > Redcloth-upwards at rubyforge.org > http://rubyforge.org/mailman/listinfo/redcloth-upwards > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jon.forums at gmail.com Tue Feb 8 10:02:38 2011 From: jon.forums at gmail.com (Jon) Date: Tue, 8 Feb 2011 10:02:38 -0500 Subject: RedCloth 4.2.5 build errors on trunk? Message-ID: <20110208100238.dac87ebb.jon.forums@gmail.com> Has anyone succesfully installed the source gem on 1.9.3dev on any trunk version? I just tried installing the gem on trunk at 30825 on my Arch Linux system and got a bunch of errors such as ragel/redcloth_scan.rl:154:41: error: ISO C90 forbids mixed declarations and code I don't have time to look into it right now or try building from source on my Win7 box, but it's likely due to trunk's use of -Werror=declaration-after-statement replacing 1.9.2's -Wdeclaration-after-statement. For the record, I think forcing this new restriction downstream is the wrong thing to do as it breaks extensions that previously worked. That said, my comments and suggestion when I saw it break the curb gem didn't go far: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/33974 Can anyone confirm that this is the cause of the build failure I'm seeing? Assuming it is, how difficult of a task is it to mod all the code to C90? Jon --- blog: http://jonforums.github.com/ twitter: @jonforums From stephen.bannasch at deanbrook.org Tue Feb 8 12:16:25 2011 From: stephen.bannasch at deanbrook.org (Stephen Bannasch) Date: Tue, 8 Feb 2011 12:16:25 -0500 Subject: RedCloth 4.2.5 build errors on trunk? In-Reply-To: <20110208100238.dac87ebb.jon.forums@gmail.com> References: <20110208100238.dac87ebb.jon.forums@gmail.com> Message-ID: At 10:02 AM -0500 2/8/11, Jon wrote: >Has anyone succesfully installed the source gem on 1.9.3dev on any trunk version? > >I just tried installing the gem on trunk at 30825 on my Arch Linux system and got a bunch of errors such as > > ragel/redcloth_scan.rl:154:41: error: ISO C90 forbids mixed declarations and code > >I don't have time to look into it right now or try building from source on my Win7 box, but it's likely due to trunk's use of -Werror=declaration-after-statement replacing 1.9.2's -Wdeclaration-after-statement. Jon, did you mean to send this to the ruby-core list? From jg at jasongarber.com Tue Feb 8 12:41:08 2011 From: jg at jasongarber.com (Jason Garber) Date: Tue, 8 Feb 2011 11:41:08 -0600 Subject: RedCloth 4.2.5 build errors on trunk? In-Reply-To: <20110208100238.dac87ebb.jon.forums@gmail.com> References: <20110208100238.dac87ebb.jon.forums@gmail.com> Message-ID: This is the first I'm aware of it. Thanks for bringing it to the list's attention. With any luck, I'll have re-written RedCloth by the time this would be an issue. The way it's been going, though, maybe not. Please keep us posted as this develops in trunk! Jason On Tue, Feb 8, 2011 at 9:02 AM, Jon wrote: > Has anyone succesfully installed the source gem on 1.9.3dev on any trunk > version? > > I just tried installing the gem on trunk at 30825 on my Arch Linux system and > got a bunch of errors such as > > ragel/redcloth_scan.rl:154:41: error: ISO C90 forbids mixed declarations > and code > > I don't have time to look into it right now or try building from source on > my Win7 box, but it's likely due to trunk's use of > -Werror=declaration-after-statement replacing 1.9.2's > -Wdeclaration-after-statement. > > For the record, I think forcing this new restriction downstream is the > wrong thing to do as it breaks extensions that previously worked. > > That said, my comments and suggestion when I saw it break the curb gem > didn't go far: > > http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/33974 > > Can anyone confirm that this is the cause of the build failure I'm seeing? > Assuming it is, how difficult of a task is it to mod all the code to C90? > > Jon > > --- > blog: http://jonforums.github.com/ > twitter: @jonforums > _______________________________________________ > Redcloth-upwards mailing list > Redcloth-upwards at rubyforge.org > http://rubyforge.org/mailman/listinfo/redcloth-upwards > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jon.forums at gmail.com Tue Feb 8 13:01:31 2011 From: jon.forums at gmail.com (Jon) Date: Tue, 8 Feb 2011 13:01:31 -0500 Subject: RedCloth 4.2.5 build errors on trunk? In-Reply-To: References: <20110208100238.dac87ebb.jon.forums@gmail.com> Message-ID: <20110208130131.e58b1d55.jon.forums@gmail.com> > >Has anyone succesfully installed the source gem on 1.9.3dev on any trunk version? > > > >I just tried installing the gem on trunk at 30825 on my Arch Linux system and got a bunch of errors such as > > > > ragel/redcloth_scan.rl:154:41: error: ISO C90 forbids mixed declarations and code > > > >I don't have time to look into it right now or try building from source on my Win7 box, but it's likely due to trunk's use of -Werror=declaration-after-statement replacing 1.9.2's -Wdeclaration-after-statement. > > Jon, did you mean to send this to the ruby-core list? No. I tried that in December 2010 with curb and, while ruby-core was notified, from that thread it appears there's no interest on ruby-core's part to continue the discussion. If you scan the entire thread, IIRC Nobu weighed in that he thought the problem was with gem code _not_ being C90 rather than a problem with trunk build settings. Fair enough, strongly different PoV's. I'm focusing my limited time to provide feedback to the gem authors as that seems more productive. They can decided what works best for them. For example, Wayne at FFI decided to tweak his code to be C90. I still believe it's a great build setting for enforcing policy for core Ruby code, but a very bad idea to push it downstream to gem authors. Gem authors own supporting their code and interaction with their users, not ruby-core. I think some creative autoconf tweaking could creatively handle both interests. Perhaps ruby-core is watching to see if it becomes a real issue by taking the "don't ask, just do it and see who squawks...it's 'trunk' after all" strategy. Not a bad idea actually as it tends to sort out speculation from reality :) Anyways, I had hoped to mock up some autoconf patches to show core, but I've entangled myself into more interesting things. Jon --- blog: http://jonforums.github.com/ twitter: @jonforums