Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Moores Law, Perl and the future

by hardburn (Abbot)
on Jul 13, 2011 at 20:18 UTC ( #914219=note: print w/ replies, xml ) Need Help??


in reply to Moores Law, Perl and the future

Regexes aren't evil in this case because they're slow. They're evil because it's incredibly difficult to correctly parse XML using regexes. In a language with stricter regexes, it'd be impossible, but in Perl's extended regexes, it's merely very, very difficult.

I don't take people seriously who talk about what they're going to do. I take them seriously when they talk about what they've already accomplished. So far, your entire output has been polluting Meditations with successive walls of text, plus a zip file with Perl code demonstrating terrible coding practices.

After cutting out the ranting about 486s, Moore's Law, and the herd mentality, I see a potentially useful templating system. But not a particularly remarkable one. It looks like Lisp done in XML, something that would be recognizable to someone who read the first chapter of Structure and Interpretation of Computer Programs. It hardly justifies all this talk of heretics and blasphemy.

tl;dr: please stop spamming Meditations. If your ideas have merit, then go code them up in a package that doesn't parse CGI parameters by hand and demonstrates knowledge of placeholders and context free grammars.


"There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.


Comment on Re: Moores Law, Perl and the future
Re^2: Moores Law, Perl and the future
by ikegami (Pope) on Jul 13, 2011 at 23:54 UTC

    They're evil because it's incredibly difficult to correctly parse XML using regexes.

    Not at all. Writing an XML parser using regular expressions is definitely no harder than writing one that doesn't. It's writing an XML parser (compared to using an existing one) that's hard.

      If writing an XML parser is difficult and this system appears to use multiple bracket types, surely the guy who wrote it is not stupid. Just my 2p.

        Well certainly you would think so. I think I'm pretty smart, too.

        But as has been pointed out, your "XML" parser doesn't parse real XML, it parses a very simple syntax inspired by XML. Granted, for your purposes, that's sufficient. But it doesn't take a genius to make such a parser.

Re^2: Moores Law, Perl and the future
by sundialsvc4 (Monsignor) on Jul 15, 2011 at 01:52 UTC

    I think that it would be better to say that, “whether or not you can parse XML using regexes ... from an engineering perspective that is not the point.”   When you are developing a piece of computer software that needs to process an XML file, the single most important consideration that you have is to minimize your exposure to project failure.   If you have at your beck and call a package of software that accomplishes a particular task (as evidenced by its ability to pass 15,385 (or somesuch) internal self-tests, and if you can get all that just by uttering the magic words, use XML::Twig, then, “point, set and match!”

    This is the very same reason why there is a viable and important business in making pre-hung doors and even, in some cases, pre-finished walls and houses.   At the end of the day, you just want to deliver results.   You want to collect your final check, go to the pub, and not worry about being interrupted as you get a wee bit pleasant, because you know that every promise you made to your customers was kept ... and that you made a modest profit doing it.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://914219]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2014-07-13 08:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (248 votes), past polls