5 ms·
Is RewriteRails affected by the recent ParseTree EOL?
by _pius 18y ago
Is RewriteRails affected by the recent ParseTree EOL?
- raganwald 18y agoYes, and furthermore a much more serious problem is the lack of interest in AST manipulation/syntactic meta-programming in Ruby culture. For some strange reason languages like Groovy started way behind Ruby but their core teams have shown a lot more interest in meaningfully evolving their languages. One of the reasons I write stuff like this is so that people realize that we do have an alternative to the current dominant monkey-patching culture. That way, instead of saying "If we had X, we might be able to do Y," we can now say, "If we don't support syntactic meta-programming, we will lose extension methods." All that being said, I will be porting Rewrite to Ruby_parser. One of the reasons I switched from block-scoped rewriting to file-based rewriting was in anticipation that Ruby 1.9 would not support AST introspection, and sadly my fears were realized.
- batasrki 18y agoWhat is the reason for 1.9 not supporting AST introspection? I mean, it's supposed to be the evolution of the current language, so this lack of support is a bit confusing.
- raganwald 18y agoIt has some spotty support, I understand there is a "Ripper" gem that is in development, but basically 1.9.1 is an interim release that was really aimed at addressing certain performance issues and places where MRI 1.8.x is really broken/inconsistent. A lot of other stuff was pushed right off the table to get it done. AFAIC, the only way to make sure it gets back on the table for future releases is to join folks like zenspider in working with the AST and showing how important it is for a language to be state-of-the-art for 1977 and expose its AST to introspection. Thus, my work on Rewriting is a not-so-subtle way to campaign for progress in the interpreter :-)
- jamesbritt 18y ago"a much more serious problem is the lack of interest in AST manipulation/syntactic meta-programming in Ruby culture." On what do you base this? Pretty much every Rubyists I have more than a passing acquaintance with would like to see more options for reaching into the AST. Quite a few would prefer to see keywords replaced with methods (headius likely disagrees because of what that means for JRuby) I'd be surprised if the Rubyists you associate with didn't also feel the same way. Now, matz is not so fond of this, but I'm bet a good number of hard-core Ruby hackers are. Or is there more conservatism than meets the eye?
- raganwald 18y agoI have observed the most interest in code analysis tools, which obviously require constructing and analyzing an AST even if you don't manipulate it. Heckle obviously manipulated things. And I recall another syntactic meta-programming project, I think it used its own lisp-like sexprs. But perhaps I am ignorant of a lot of progress in this area. Which other projects/gems/plugins have you seen?
- jamesbritt 18y ago"Which other projects/gems/plugins have you seen?" Ah, well there's the catch. I've seen interest and enthusiasm, but so far little code to implement things. Basically, people who would love to see Ruby have more Lisp-like powers, but not inclined to go hacking on it and making it happen.