From: "trans. (T. Onoma)" Date: 2004-11-19T00:44:03+09:00 Subject: Re: About Regular Expressions On Thursday 18 November 2004 09:26 am, Nikolai Weibull wrote: | > This is terrible. | | Thanks. Nikolai the Terrible ... | > Not only is it unfair to disenfranchise newbies who, for obvious | > reasons, would struggle with regular expressions, | | The problem I was aiming to remedy. ... -ly Good ;) | > but the whole premise if false. (ASFICT) I am responsible for most if | > not all the latest R.E. posts. And I do not recall once suspecting a | > bug. | > | > I have asked about extending features (such as Regexp.arity) and | > whether certain existing features might not be more useful if they | > worked differently (like #scan). Never did I cry wolf. | | ASFICT == AFAICT? oops. yes. | I did not accuse any specific entity of misdoings, nor did I consider | your posts; which are rather old by now. I do not consider a post | discussing the arity of regular expressions equivalent with one that | asks if it is a bug that /[...a-b]/ doesn't match '-'. The first one is | a rather esoteric question, which certainly proved that you weren't a | newbie; the second is rather more newbyish as it shows unfamiliarity | with one of the most basic regular expressions shorthands. My intention | wasn't to dismiss the question as such, but wondering if it was a bug | certainly shows that the person in question hadn't read up on regular | expressions before trying to use them. | | The question then is whether the person was just being lazy or hadn't | found proper documentation. My suspicion is that we are dealing with | the second case - which implies that we need better documentation, which | was my original intent and suggestion. If it was the first, then I | don't really have to say much more. | | > (For a taste of your own medicine) Perhaps it's time for you to try to | > read more carefully. | | And you aswell. Indeed, I do always try to remember to taste my own medicines first. Thanks for the reminder! | Listen, my intent wasn't to place blame nor accuse any individual of any | wrongdoings. I just wanted to point out that we'd been having a lot of | the same kind of discussions and that they seemed to suggest a very poor | understanding of regular expressions and their use among the Ruby-Newby | populace. | | Apparently I managed to press quite a few buttons with my post and if | anyone was offended I apologize. I, however, still think my thesis and | conclusion are valid. Grace be upon you. It seems so few people are willing to apologize for anything these days. Thank you. I think the problem was that you weren't very specific about which posts you were referring and then on top of it came across a bit harsh. | My reasoning was that people either weren't looking at the documentation | or that the documentation was too limited in nature. Robert Klemme | suggested that there was a lot of documentation available (I agree). If | this is true, then why are people still asking very basic questions? | Either they are too lazy to look up the documentation, or they can't | find any. Both are a result of there not being a good resource of | introductory (nor advanced for that matter) material about using regular | expressions, especially for Ruby. | | I suggested that this situation be remedied, but that I couldn't do it | myself. The general attitude so far seems to be that I should shut the | fuck up and write it myself if I think this is such a big deal... I don;t think so. You may well have a point. So I welcome the outspoken concerns. My opinion is this: Regexp's are for CS-heads --those who really love programming for its it's own sake. Regexp are about as terse and cryptic as one can get, and thus have a steep learning curve. Indeed, I have read a good bit of docs on them and I still have troubles. Rather than write more documentation, I think it would be the bomb if someone would invent the "Next Big Thing"(TM) in string pattern matching. But of course, that's a much taller order. T. P.S. Perl 6 regular expressions look to be a move in the right direction though. Has anyone checked that out recently?