[25911] in Perl-Users-Digest
Perl-Users Digest, Issue: 8137 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jun 1 03:05:47 2005
Date: Wed, 1 Jun 2005 00:05:05 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Wed, 1 Jun 2005 Volume: 10 Number: 8137
Today's topics:
Editors that use embedded Perl as their macro language? <dhannotte@nyc.rr.com>
Re: Editors that use embedded Perl as their macro langu <tadmc@augustmail.com>
File::Find and tree copying <dot.dot@dot.dot.dot>
Re: Parsing Tracklisting - discussion <mark.clementsREMOVETHIS@wanadoo.fr>
POPL 2006 Call for Papers (Charleston SC, Jan 06) dpw@cs.princeton.edu
writing to file <hdotvdotniekerkathccnetdotnl>
Re: writing to file <mark.clementsREMOVETHIS@wanadoo.fr>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 01 Jun 2005 01:43:53 GMT
From: "Dean Hannotte" <dhannotte@nyc.rr.com>
Subject: Editors that use embedded Perl as their macro language?
Message-Id: <tp8ne.15003$IX4.1561@twister.nyc.rr.com>
Keywords: macro language
I have been using Mansfield Software's KEDIT, which was based on IBM's
XEDIT, every day for 25 years. I love it, but the macro language is a
lifeless subset of Rexx. Does anyone know if any serious text editors use
embedded Perl as their macro language? That would be insanely great.
Dean Hannotte
http://www.hannotte.net
--
_________________________________________________________________________
NOTE: To annually shake off spammers, my email address has been changed
to 'dh****@nyc.rr.com', where '****' is the current year. For
example, currently it is 'dh2005@nyc.rr.com'. If you can't reach me
there, you can always go to Dean's Den at http://www.hannotte.net
for the latest contact instructions, or google "Dean Hannotte" and
hope that the world has not completely forgotten about me.
------------------------------
Date: Tue, 31 May 2005 21:18:49 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Editors that use embedded Perl as their macro language?
Message-Id: <slrnd9q6o9.oja.tadmc@magna.augustmail.com>
[ Setting Followup to email without noting it is underhanded,
consider not doing that in the future. Why hoard answers
rather than share them here with your peers?
]
Dean Hannotte <dhannotte@nyc.rr.com> wrote:
[snip]
> --
Please use a proper sig-dash in your posts.
There is supposed to be a space character after the hyphens.
> currently it is 'dh2005@nyc.rr.com'.
No it isn't, that is not the address in your From header.
A seven-line .sig is excessive too, consider limiting it to four
lines like everybody else does.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Wed, 1 Jun 2005 15:21:39 +1000
From: "Anonymous" <dot.dot@dot.dot.dot>
Subject: File::Find and tree copying
Message-Id: <d7jglm$l11$1@news-02.connect.com.au>
As usually, my apologies for the newbie type question from an infrequent
user.
I have a directory tree (path is $tree0), and I would like to duplicate the
tree structure into two other tree roots ($tree1 and $tree2). I want to
process the files in the original tree with two different subroutines, call
them Process1 and Process2 so that the files in the duplicated trees are not
really exact copies but versions produces by Process1(individualFile) and
Process2(individualFile).
I can find my way down the original tree OK using File::Find, get the name
($File::Find::name) (.... this is progress for a novice, so don't laugh) and
do something with the file. But duplicating the structure has me completely
baffled.
#!/bin/perl
use File::Find;
my $tree0="c:\\k\\origtree";
# Find the original files
find(\&processAllFiles, $tree0);
# Subroutine that decends the tree.
sub processAllFiles{
print "$File::Find::name\n";
# HELP HELP
}
I would appreciate any help, whether general pointer to a place to read, an
appropriate old note in the archive, or code snippet.
Cheers,
--
Mark R. Diamond
------------------------------
Date: 01 Jun 2005 04:44:58 GMT
From: "Mark Clements" <mark.clementsREMOVETHIS@wanadoo.fr>
Subject: Re: Parsing Tracklisting - discussion
Message-Id: <429d3d49$0$1248$8fcfb975@news.wanadoo.fr>
moltar wrote:
> I am writing a subroutine to parse DJ mix tracklistings into artist, track name and
> additional information. I think It could be even a great module if it all works out well. So
> far my solution is pretty ugly, but that is why I decided to raise the discussion over here
> with hundreds of Perl Gurus.
>
> A tracklist consist of several lines of artist and song names, sometimes additional
> information is provided such as label, or "remix by", etc... Examples are at the end of
> message. I want to parse it into separate instances ($artist, $track, $extra).
>
> I had several ideas to tuckle this problem.
>
> 1) A set of if's to satisfy individual cases. Obvisoly one regex cannot cut it.
> 2) Array of regex'es going from most common to less common track listing patterns. Loop and
> execute regex pattern per line.
> 3) more not so bright ideas that I won't mention.
>
> So far my solution looks something like the following. It's still in works. It's clumsy and
> dirty. I am looking for something more logical and elegant.
>
> sub parse_tracklist_item {
> my $line = shift;
>
> if ($line =~ / [-:]+ /) {
> # plug - tuff rinse - blue angel
> # dj krush - meiso ( dj crystral's drug deal vocal mix) - mo' wax
> return ($line, $1, $2, $3) if $line =~ /^(.+?) [-:]+ ([^(]+?) [-:]+ ([^\(]+)?/;
> # Artist - Track (Extra)
> # J-Cut - They Dont Know (Advanced Dub)
> return ($line, $1, $2, $3) if $line =~ /^(.+?) [-:]+ ([^(]+)
> [\(\[]\s*([^)]+)\s*[\)\]]( - .*)?/; # Duo Infernele - Positive Vibes
> # T Power - Delta
> return ($line, $1, $2, $3) if $line =~ /^(.+?) [-:]+ (.+?)$/;
> } elsif ($line =~ /-/) {
> # Qwest feat. Jamal-Where My Thugs At? (A-Sides Remix)
> # NRG-I Need Your Lovin (Remix)
> return ($line, $1, $2, $3) if ($line =~ /^([^\-]+)\-([^\(]+)\s*\(?([^)]+)?\)?/);
> }
<snip>
There are a number of ways of doing this: I would probably put regexs and positions into
external configuration, using something like Config::Properties or similar.
So in the properties file you would have:
mp3.matchers.1.regex=^(.+?) [-:]+ ([^(]+?) [-:]+ ([^\(]+)?
mp3.matchers.2.regex=/^(.+?) [-:]+ ([^(]+)
I wrote Config::PropertiesSequence a while ago to handle multiple numbered properties like
this, but as far as I know nobody uses it but me. You could also use XML, but this might be a
bit heavy-duty for the task at hand. There are a number of configuration file modules on CPAN
you could look at.
Whichever method you use, you can then compile these strings as regexs and iterate over them.
push @mp3TitleRegexs, qr($_) foreach @rawRegexString;
...
foreach $mp3TitleRegex(@mp3TitleRegexs){
if( $line =~ $mp3TitleRegex ){
# do whatever
}
}
Mark
------------------------------
Date: 31 May 2005 21:44:28 -0400
From: dpw@cs.princeton.edu
Subject: POPL 2006 Call for Papers (Charleston SC, Jan 06)
Message-Id: <05-05-233@comp.compilers>
Keywords: conference, CFP
*********************************************************************
* ACM SIGPLAN-SIGACT Symposium *
* on *
* Principles of Programming Languages *
* *
* January 11-13, 2006 *
* Charleston Place Hotel *
* Charleston, South Carolina *
* *
* Call for Papers *
* *
* http://www.cs.princeton.edu/~dpw/popl/06/ *
*********************************************************************
Important dates
* Submission deadline: 23:00 18 July, 2005 Samoan time
* Author review period: 23:00 12 Sept to 23:00 14 Sept, 2005, Samoan
time
* Author notification: 26 Sept, 2005
* Final paper due: To be announced.
Scope
The annual Symposium on Principles of Programming Languages is a forum
for the discussion of fundamental principles and important innovations
in the design, definition, analysis, transformation, implementation and
verification of programming languages, programming systems, and
programming abstractions. Both experimental and theoretical papers on
principles and innovations are welcome, ranging from formal frameworks
to reports on practical experiences.
Submissions on a diversity of topics are sought, particularly ones that
identify new research directions. POPL 2006 is not limited to topics
discussed in previous symposia. Authors concerned about the
appropriateness of a topic may communicate by electronic mail with the
program chair prior to submission.
Submission guidelines
Due date & time: Submissions must be filed at the web site by 23:00
Monday 18 July, Apia, Samoa time. Some equivalents to this time are
* New York: 5:00 AM = 5h00 (19 July)
* San Francisco: 2:00 AM = 2h00 (19 July)
* Chicago: 4:00 AM = 4h00 (19 July)
* Paris: Noon (19 July)
* Hong Kong: 6:00 PM = 18h00 (19 July)
* UTC: 10:00 AM (19 July)
Submission URL: To be announced. Check the main POPL 2006 website.
Authors should submit a 100-200 word abstract and a full paper by 23:00
Apia, Samoa Time on Monday, 18 July, 2005. Submissions should be no
more than 12 pages (including bibliography) in standard ACM SIGPLAN
conference format: two columns, nine-point font on a ten-point
baseline, with pages 20pc (3.33in) wide and 54pc (9in) tall, with a
column gutter of 2pc (0.33in). Detailed formatting guidelines are
available at http://www.acm.org/sigs/sigplan/authorInformation.htm,
along with formatting templates or style files for LaTeX. You don't
need to include categories, keywords, etc., though you are welcome to
do so. Also, note that the ACM copyright notice is not required of
submissions, only of accepted papers.
Authors wishing to supply additional material to the reviewers beyond
the 12-page limit can do so in clearly marked appendices, on the
understanding that reviewers are not required to read the appendices.
Submissions that do not meet these guidelines will not be considered.
The submission deadline and length limitations are firm.
Submissions will be carried out electronically via the Web, at the URL
given above. Papers must be submitted in either PDF format or as
PostScript documents that are interpretable by Ghostscript. They must
be printable on US Letter sized paper. Individuals for which this
requirement is a hardship should contact the program chair at least one
week before the deadline.
Submitted papers must adhere to SIGPLAN's republication policy. Each
paper should explain its contributions in both general and technical
terms, clearly identifying what has been accomplished, explaining why
it is significant, and comparing it with previous work. Authors should
strive to make the technical content of their papers understandable to
a broad audience.
Authors will be given a 2-day period (23:00 12 Sept. to 23:00 14 Sept.
2005 Samoa time) to read and respond to the reviews for their papers
before the PC meeting. Authors of submitted papers will receive more
details from the submission site.
Authors of accepted papers will be required to sign the ACM copyright
form. Proceedings will be published by ACM Press.
Student Attendees
Students who have a paper accepted for the conference are offered
student membership of SIGPLAN free for one year. As members of SIGPLAN
they may apply for travel fellowships from the PAC fund.
Conference Chair
Greg Morrisett
Harvard University
33 Oxford Street
Cambridge, MA 02138 USA
greg at eecs dot harvard dot edu
Program Chair
Simon Peyton Jones
Microsoft Research Ltd,
7 JJ Thomson Ave,
Cambridge CB3 0FB, UK
simonpj@microsoft.com
Program Committee
* Giuseppe Castagna, CNRS, LIENS, ENS Paris
* Manuel Chakravarty, University of New South Wales
* Karl Crary, Carnegie Mellon University
* Sophia Drossopoulou, Imperial College London
* Paul Feautrier, ENS Lyon
* Carl A Gunter, University of Illinois
* Rajiv Gupta, University of Arizona
* Fritz Henglein, DIKU, University of Copenhagen
* Trevor Jim, AT&T
* Shriram Krishnamurthi, Brown University
* Gary T Leavens, Iowa State
* Robert O'Callahan, Novell
* Peter O'Hearn, Queen Mary, University of London
* Andreas Podelski, Max Planck Institute, Saarbrücken
* Andrei Sabelfeld, Chalmers University
* Kostis Sagonas, Uppsala University
* Davide Sangiorgi, University of Bologna
* Philip Wadler, University of Edinburgh
* Stephanie Weirich, University of Pennsylvania
* Hongwei Xi, Boston University
Affiliated Events
* Foundations of Object Oriented Languages (FOOL)
* January 14, 2006
* Partial Evaluation and Semantics-Based Program Manipulation (PEPM)
* January 9-10, 2006
* Practical Applications of Declarative Languages (PADL)
* January 9-10, 2006
* Programming Language Technologies for XML (PLAN-X)
* January 14, 2006
* Semantics, Program Analysis and Computing Environments
for Memory Management (SPACE 2006)
* January 14, 2006
* Verification, Model Checking and Abstract Interpretation (VMCAI)
* January 8-10, 2006
------------------------------
Date: Wed, 01 Jun 2005 07:58:18 +0200
From: Huub <hdotvdotniekerkathccnetdotnl>
Subject: writing to file
Message-Id: <429d4e47$0$144$3a628fcd@reader1.nntp.hccnet.nl>
Hi,
From what I've read I should be able to write to a file by just this:
$OUTPUT_FILE = UITBESTAND;
open($OUTPUT_FILE, ">UITBESTAND");
close($OUTPUT_FILE);
Yet, nothing is written so I assume I do something wrong. I just can't
make out what.
Thanks for helping.
Huub
------------------------------
Date: 01 Jun 2005 06:02:36 GMT
From: "Mark Clements" <mark.clementsREMOVETHIS@wanadoo.fr>
Subject: Re: writing to file
Message-Id: <429d4f7c$0$1226$8fcfb975@news.wanadoo.fr>
Huub wrote:
> Hi,
>
> From what I've read I should be able to write to a file by just this:
>
> $OUTPUT_FILE = UITBESTAND;
> open($OUTPUT_FILE, ">UITBESTAND");
> close($OUTPUT_FILE);
>
> Yet, nothing is written so I assume I do something wrong. I just can't make out what.
>
Quite a few things, though your main problem is you aren't writing anything.
use strict;
use warnings;
my $OUTFH;
open $OUTFH,">UITBESTAND" or die "could not open file: $!";
print $OUTFH "this is some text\n";
close $OUTFH or die "problem closing file: $!";
You need to:
read the posting guidelines
check out learn.perl.org
Mark
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc. For subscription or unsubscription requests, send
#the single line:
#
# subscribe perl-users
#or:
# unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V10 Issue 8137
***************************************