From: Chad Perrin Date: 2010-08-25T01:43:15+09:00 Subject: Re: Ruby Code Parsing --2oS5YaxWCcQjTEyO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 24, 2010 at 03:38:42PM +0900, Ryan Davis wrote: >=20 > On Aug 23, 2010, at 08:10 , Chad Perrin wrote: >=20 > > On Mon, Aug 23, 2010 at 04:20:54PM +0900, Ryan Davis wrote: > >> On Aug 22, 2010, at 20:12 , Chad Perrin wrote: > >>>=20 > >>> On Mon, Aug 23, 2010 at 08:38:40AM +0900, Caleb Clausen wrote: > >>>>=20 > >>>> Ruby is designed to be easy for humans to read, which means it is not > >>>> easy for computers to parse. As opposed to say, perl, which is hard > >>>> for both humans and computers to parse. If you were to write down in > >>>> one email a complete set of rules, it would be a pretty long email. > >>>=20 > >>> I find Perl pretty easy to parse. Maybe yours is a personal problem. > >>=20 > >> No, you do not find perl pretty easy to parse. Last time I checked, you > >> can NOT statically parse perl. You have to evaluate it in order to get > >> a proper parse. So, you find it pretty easy to evaluate. No easy task > >> for me, I'll admit, but there is no reason for you to be an ass about > >> it.=20 > >=20 > > Regardless of nitpicky phrasing, I found your comment about Perl kind of > > ass-ish. It seems kind of ironic to be called an ass for pointing out > > that your problems with Perl may not be others' problems, when you make= a > > categorical deprecating statement about Perl. >=20 > There is nothing nitpicky about it. YOU _can't_ parse perl, yet you > claim you can and that it is pretty easy.=20 >=20 > If you think it is so easy, here is a challenge: write a parser for > perl in ruby. It can't be that hard, right? I have one in ruby, and it > "only" took 145 commits (so far) to do. I don't care what type of > parser style you choose (LALR, RDP, PEG, etc), and I don't care if you > choose to port someone else's parser to ruby... but you can NOT > evaluate/interpret the code in order to determine your parse trees. It > has to be a 100% static parse. >=20 > P.S. Even tho it was Caleb who made the "deprecating statement" about > perl (nice double-entendre considering we're all still waiting for perl > 6... 10 years later), I totally agree with him on this one. You apparently think I'm saying my brain has an implementation of the perl runtime installed on it. By that standard, none of us can parse Perl, or Ruby, or Python, or C, or Scheme, or any other nontrivial computer programming language. I'm just saying that I can look at some Perl code and figure out what it's doing -- a necessary task if you're going to try to maintain some Perl code. --=20 Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ] --2oS5YaxWCcQjTEyO Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkxz9aEACgkQ9mn/Pj01uKWQCQCdEDOixS5Ug5Pg+T63Jvlo7tbX HXkAniGa6SJ94f5Lt4eN/vVNHtdhUyfI =306A -----END PGP SIGNATURE----- --2oS5YaxWCcQjTEyO--