From: Tony Arcieri Date: 2009-02-26T16:55:46+09:00 Subject: Re: Nexus Programming Language --00151750eee40aedeb0463cdb14d Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On Thu, Feb 26, 2009 at 12:03 AM, Mike Gold wrote: > Incidentally, 1.8 is odd because it is one big AST in C, with no > compilation. Obviously 1.8 is very slow because of this. ParseTree > is just giving back what is already there. ParseTree is not available > in 1.9 or JRuby, nor is there a plan for it (and due to the nature of > compilation and optimization, I don't think it will happen). MRI is a > prototype, implementation-wise. > Yes, you are correct, and I really wish ruby-core would embrace ParseTree and make it a standard feature of the language. The fact they haven't has precluded alternative implementations like JRuby from implementing it. There is JParseTree for JRuby but it isn't actively maintained. And of course YARV practically precludes a ParseTree implementation so there's little motivation for alternative implementations to even try to support it. The future of Ruby seems to be one without ParseTree. So Lisp 1, Ruby 0 I guess. > Once you have the Ruby parser's sexps, the same class of transformations > > are still available, as they are in any language which allows you to > > programatically retrieve parser output and invoke the compiler from > > within the language itself. > > Aha! Now we are getting somewhere. How are you going to get the > sexps? You could convert your source to sexps, but then what? How > will you relate the sexps to the running code? If someone gives you a > Method instance, how will you find its sexp? Or if your sexp says how > Foo.bar was defined, how do you know the definition has not changed > during run-time? Or when you are inside a method, how can you get the > sexps of the argument expressions before they were passed? > Conceeded, and given I accept the future of Ruby is one without ParseTree this argument is moot. > I said earlier that I was leaving subjective issues aside. Lisp > programmers eventually do not see parens, so your subjective > assessment does not apply to them. > Yes, however I would count them among the extreme minority of programmers, and would argue this is indicative of the fact that humans prefer complex grammars where more structure can be expressed by fewer tokens. Humans have really awesome brains which can infer meaning from ambiguous grammatical constructions no computer possibly can (at least until computers become sentient), so minimalistic grammars are really an insult to human intelligence. But I guess there's a certain class of Lisp weenie who would rather parse grammars like a computer :) -- Tony Arcieri --00151750eee40aedeb0463cdb14d--