Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Emacs Lisp vs Perl: Validate Local File Links
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Xah Lee  
View profile  
 More options Apr 13 2012, 1:35 pm
Newsgroups: comp.lang.lisp, comp.emacs, comp.lang.python, comp.lang.perl.misc, gnu.emacs.help
From: Xah Lee <xah...@gmail.com>
Date: Fri, 13 Apr 2012 10:35:32 -0700 (PDT)
Local: Fri, Apr 13 2012 1:35 pm
Subject: Emacs Lisp vs Perl: Validate Local File Links
〈Emacs Lisp vs Perl: Validate Local File Links〉
http://xahlee.org/emacs/elisp_vs_perl_validate_links.html

a comparison of 2 scripts.

lots code, so i won't paste plain text version here.

i have some comments at the bottom. Excerpt:

------------------

«One thing interesting is to compare the approaches in perl and emacs
lisp.»

«For our case, regex is not powerful enough to deal with the problem
by itself, due to the nested nature of html. This is why, in my perl
code, i split the file by < into segments first, then, use regex to
deal with now the non-nested segment. This will break if you have <a
title="x < href=z" href="math.html">math</a>. This cannot be worked
around unless you really start to write a real parser.»

«The elisp here is more powerful, not because of any lisp features,
but because emacs's buffer datatype. You can think of it as a
glorified string datatype, that you can move a cursor back and forth,
or use regex to search forward or backward, or save cursor positions
(index) and grab parts of text for further analysis.»

------------------

If you are a perl coder, and disagree, let me know your opinion.
(showing working code is very welcome) My comment about perl there
applies to python too. (python code welcome too.)

 Xah


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dan Espen  
View profile  
 More options Apr 13 2012, 2:54 pm
Newsgroups: comp.lang.lisp, comp.emacs, comp.lang.python, comp.lang.perl.misc, gnu.emacs.help
From: Dan Espen <des...@verizon.net>
Date: Fri, 13 Apr 2012 14:54:44 -0400
Local: Fri, Apr 13 2012 2:54 pm
Subject: Re: Emacs Lisp vs Perl: Validate Local File Links

Interesting.

Perl, Python, and Lisp have real HTML parsers available.
I've used the ones for Perl and Python.

--
Dan Espen


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »