Domain: cpan.org
Stories and comments across the archive that link to cpan.org.
Comments · 1,172
-
DBD::RAM
Any Perl programmers in the audience may wish to check out DBD::RAM. From the CPAN documentation: "DBD::RAM allows you to import almost any type of Perl data structure into an in-memory table and then use DBI and SQL to access and modify it. It also allows direct access to almost any kind of file, supporting SQL manipulation of the file without converting the file out of its native format." More information here
-
Perl has had this for years
See DBD::Multiplex.
-
Re:Pet Python problems
-
Re:Pet Python problems
-
Re:Hmm, let's see ...
You really are quite the silly man. Use POD.
=pod
Sometimes I like to write big long descriptions of any moderately-complex procedures being stored in a file.
I really don't like having to put a hash in front of each line.
It gets rather cumbersone and ugly after a while.
=cut
Was that so hard? Or if C++ or any other style of commenting still floats your boat try Acme::Comment. -
Re:Hmm, let's see ...
(a) use pod (q.v. perldoc perlpod )
(b) get a better editor. sane editors (vim, emacs, presumably others) are able to comment regions, or automatically insert comment leaders as you type, or both.
(c) Acme::Comment -
Re:Hmm, let's see ...
(a) use pod (q.v. perldoc perlpod )
(b) get a better editor. sane editors (vim, emacs, presumably others) are able to comment regions, or automatically insert comment leaders as you type, or both.
(c) Acme::Comment -
Re:Guide to doing it the hard way?
SWIG is much easier to use than XS, but today I prefer Inline, for embedding C, C++, java, python, or whatever other language in which you might be interested in your perl code.
-
Re:Or just use PythonSlashdot runs on PERL
Hm I see most scripts have a
.pl extension - does slashdot use Acme::Inline::PERL then? :) -
Re:Reminds me of Coy
See the online docs here. Quite funny.
-
Seen Quantum::Superpositions
Perl's had support for quantum computing for three years, thanks to Damian Conway's Quantum::Superpositions module. I saw him do a presentation in Portland few months back, and it was pretty mind-blowing. It may seem odd to talk about programming a computer that doesn't exists yet, but Q::S actually works.
The promise of quantum computers is doing computations (as Damian says) "in multiple universes, in constant time" and Q::S obviously can't do this. It can and does, however, act like you're programming a quantum computer by allowing you to give one scalar multiple simultaneous values.
Like Perl wasn't confusing enough, now it's like programming line noise ... in multiple universes :) -
Re:Perl Design Patterns
Oops, this is the pretty but outdated and more than a little managled version of Perl Design Patterns. The first link above was just plain outdated.
This is the up to date copy of Perl Design Patterns - prerelease -
Perl Design Patterns
-
My little April Fools rant...
I'd just like to review the 'jokes' so far... call it Flamebait, if you want to, but it just annoys me and I have to say it...
- RFC 3514
This one was nice. Obvious, but nice... as usual, the RFC people are doing a good job. Too bad Slashdot ruined it with the first April Fools dupe... - Gentoo on RPM
Well, good idea of the Gentoo people, but waaay too obvious... imho a good AF joke is one you believe to be true for at least a couple of minutes until you've looked at it very closely. But OK, this was only number 2, so it was still nice... now AF story bloat yet. - Whitespace programming language
Hm. As has been pointed out, it's not new... and even more obvious than the previous one (and pretty much boring too). I think then CPAN people know how to really make a good AF joke... - Microsoft + Security
Hey... better at least. Nicely combining a true story with a joke story... though the joke was not very believable either. Also, it's number four already, and we're only half-way through the day... - The Register's story
OK. By itself, not all that bad... but not too overwhelming either. And, on Slashdot, we're now at Number 5 and counting. - The dupe.
OK, increasingly stupid... but then again, maybe the best joke today on Slashdot :) - Enlightenment 1.0
Aawwww, come on. Enough. It hurts. And again, blunt joke. Latency between reading and noting the joke: .01 ms. Including the dupe, we're at seven now... and the day is still not over. I think I'll stop reloading the web site until I'm sure April 1 is over in all time zones...
For some quality 4-1 jokes, see here (German), the above-mentioned cpan.org, or even the Freshmeat one which isn't so bad. This ain't so bad either. Kuro5hin points to this interesting link.
Can you
</rant> /. editors pleease try to come up with a single good hoax and dump the rest? That would be nice. - RFC 3514
-
My little April Fools rant...
I'd just like to review the 'jokes' so far... call it Flamebait, if you want to, but it just annoys me and I have to say it...
- RFC 3514
This one was nice. Obvious, but nice... as usual, the RFC people are doing a good job. Too bad Slashdot ruined it with the first April Fools dupe... - Gentoo on RPM
Well, good idea of the Gentoo people, but waaay too obvious... imho a good AF joke is one you believe to be true for at least a couple of minutes until you've looked at it very closely. But OK, this was only number 2, so it was still nice... now AF story bloat yet. - Whitespace programming language
Hm. As has been pointed out, it's not new... and even more obvious than the previous one (and pretty much boring too). I think then CPAN people know how to really make a good AF joke... - Microsoft + Security
Hey... better at least. Nicely combining a true story with a joke story... though the joke was not very believable either. Also, it's number four already, and we're only half-way through the day... - The Register's story
OK. By itself, not all that bad... but not too overwhelming either. And, on Slashdot, we're now at Number 5 and counting. - The dupe.
OK, increasingly stupid... but then again, maybe the best joke today on Slashdot :) - Enlightenment 1.0
Aawwww, come on. Enough. It hurts. And again, blunt joke. Latency between reading and noting the joke: .01 ms. Including the dupe, we're at seven now... and the day is still not over. I think I'll stop reloading the web site until I'm sure April 1 is over in all time zones...
For some quality 4-1 jokes, see here (German), the above-mentioned cpan.org, or even the Freshmeat one which isn't so bad. This ain't so bad either. Kuro5hin points to this interesting link.
Can you
</rant> /. editors pleease try to come up with a single good hoax and dump the rest? That would be nice. - RFC 3514
-
The url
-
Acme:Bleach Redux
This looks a lot like Damian Conway's Acme:Bleach, which cleans all the printable characters out a a Perl script.
-
Perl did it first!Perl has had support for whitespace oriented programming for some time. See Acme::Bleach from Damian Conway.
-Dom
-
Perl did it first!Perl has had support for whitespace oriented programming for some time. See Acme::Bleach from Damian Conway.
-Dom
-
Sadly true...
So perhaps the story there isn't true, but, you've been able to write Perl using white-space only for a little while now:
Acme::Bleach
It's also worth taking a look at Clarinet's offering:
ProleText...
-
CPAN
The best so far:
www.cpan.org
Actually made me laugh out loud when I saw it. :-)
-Bill -
...and so it begins
I love April fool's day.
Perl programmers may want to check out their beloved cpan.org site today, too.
:-) -
Perl alternative - HTML::MasonIf you are a perl person, I can highly recommend you investigate HTML::Mason as an alternative to PHP.
Visit the site if you want more details on what's good about it. In a nutshell:
- Much easier seperation of presentation and logic
- Easy templating and page filtering
- Excellent but easy component caching (great for those slashdottings
:-) - It's perl
Lastly, if you want to start from scratch, not having experience in either, can I humbly suggest you start with perl rather than PHP. You'll regret having to unlearn all the evil habits you get into once you start travelling the PHP road.
-
For Perl...The answer is obviously the CPAN.
Other open-source languages, looking on the CPAN with some sense of jealousy, are slowly creating similar structures. The Freepan factors out the code that runs the CPAN into a generic tool. Feel free to contribute to the Freepan project if you can.
-
GoogleA general search of the internet is bound to turn up algorithms that some random develper has posted but which are in now code archive. Furthermore, individual sites with code repositories generally aren't as good at searching.
If your google search doesn't turn up any relavent hits, then going for the repositories might be a good idea, but which repository you turn to is likely to be language dependant. Depending on the subject matter you might even do well by picking up a book.
I know java best, so I'll give my favorite Java repository: The Giant Java Tree
Perl hackers will probably recommend CPAN
I'm sure you will get an different site from each developer on Slashdot.
-
My perl versionLWP makes everything so easy. If you don't have Sean Burke's excllent LWP & Perl , do so:
perl -MLWP::Simple -e'print get "http://www.noodleroni.com/beerlyrics.txt"'
Or, using my WWW::Mechanize module,
#!/usr/bin/perl -w
use WWW::Mechanize;
my $agent = new WWW::Mechanize();
$agent->get( 'http://www.noodleroni.com/beerlyrics.txt' );
print $agent->content; -
Re:Honest Question
PHP is designed more for database applications
No, PHP was designed (and I use that term loosely) to make dynamic web pages, and the database functions were - like most of PHP - thrown in as an afterthought, unlike perl's DBI, which was designed to be OO and have a consistent interface.
although it can be extended (like Perl) to do a lot more. The routines PHP uses for database management have been thoroughly refined and optimized to achieve maximum speed
That's content-free. All languages can be extended, even Visual Basic, and they all (except perhaps INTERCAL) claim that their libraries have been "thoroughly refined and optimized to achieve maximum speed." Of course, some do better than others (see Doug's shootout).
I believe it is generally accepted that for databasing, using PHP will result in faster, more streamlined, and smaller code.
And I believe the earth is flat, but it isn't. Or, BZZZT, WRONG (zero for three)! And databasing? PHP isn't neither particularly fast nor compact.
Sad but true: PHP sucks. It's a half-assed attempt by some lame twits to make a programming language for non-programmers, which is sort of like trying to make a car for non-drivers. Whether they succeeded or failed at that goal, we all still lose, because of the horrible proliferation of all the crap PHP scripts on the world.
Dijkstra would probably revise his famous quote for PHP's benefit to: It is practically impossible to teach good programming style to students that have had prior exposure to PHP; as potential programmers they are mentally mutilated beyond hope of regeneration.
czth
-
Re:TCL vs TK / Ousterhout bailing/ maintaining codFor a number of developers that I know and myself TK was the glitz and feature that drew me in. Otherwise I would have stuck with Perl.
You do realize that Tk is available now for many languages, including Perl?
-
Re:The Superiority of PHP over Perl
Why is it that whenever someone mentions Perl, everyone has to mention how superior insert favourite language is. Does everyone feel that threatened by Perl? Do that many people hate Perl that much?
I use Perl because it lets me get the job done with little or no hassle. I like the TMTOWTDI nature of Perl, and Perl had one of the best support communities out there. There is a huge public codebase that you can draw from. And if you are building websites, there is a plethora of application frameworks and templating languages to choose from (HTML::Mason, Apache::ASP, OpenInteract, CGI::Application, AxKit, Embperl, Apache::PageKit, Template Toolkit, HTML::Template just to name a few).
What really annoys me is most of the time the complaints made against Perl are completely unfounded (like the claims made by the parent post). If someone wants me to refute the complaints made about Perl in the parent post I can, but for now I'll just end my rant here...
If you haven't used Perl before, try it, it's good!
-
Re:weeks vs. hours
I'd challenge anybody to come up with a problem that could be solved within a few hours in Perl or Python that couldn't be solved within 2 or 3 times that length of time (longer, but not "weeks") by a competent C or Java programmer.
I want a program that- recursively reads in a bunch of web pages.
- validates the HTML for those web pages
- if the HTML is valid, parse the HTML and make a list of all images on the pages
- for each image, create a Morse code audio clip from the relevant ALT text.
- if the HTML is invalid, parse the HTML to determine who maintains that page. (Let's assume there's a corporate standard verbiage at the bottom of each page, which includes maintainer info.) Lookup the maintainer name in the corporate LDAP directory. Generate an interoffice mailing label (complete with barcode) so you can mail a seppuku knife to the relevant webmaster.
It took me 20 minutes of browsing CPAN to come up with this (admittedly stupid) example, I'm sure I could throw in lots more freaky CPAN modules to make life harder for the C folks.
CPAN is what forced me to learn Perl. I'm sure a lot of these libraries exist for C, but it's much harder to find 'em, and who knows if they work on your platform? Let's stipulate that our program will be deployed on a DEC Alpha running WinNT...
-
Re:weeks vs. hours
I'd challenge anybody to come up with a problem that could be solved within a few hours in Perl or Python that couldn't be solved within 2 or 3 times that length of time (longer, but not "weeks") by a competent C or Java programmer.
I want a program that- recursively reads in a bunch of web pages.
- validates the HTML for those web pages
- if the HTML is valid, parse the HTML and make a list of all images on the pages
- for each image, create a Morse code audio clip from the relevant ALT text.
- if the HTML is invalid, parse the HTML to determine who maintains that page. (Let's assume there's a corporate standard verbiage at the bottom of each page, which includes maintainer info.) Lookup the maintainer name in the corporate LDAP directory. Generate an interoffice mailing label (complete with barcode) so you can mail a seppuku knife to the relevant webmaster.
It took me 20 minutes of browsing CPAN to come up with this (admittedly stupid) example, I'm sure I could throw in lots more freaky CPAN modules to make life harder for the C folks.
CPAN is what forced me to learn Perl. I'm sure a lot of these libraries exist for C, but it's much harder to find 'em, and who knows if they work on your platform? Let's stipulate that our program will be deployed on a DEC Alpha running WinNT...
-
Re:weeks vs. hours
I'd challenge anybody to come up with a problem that could be solved within a few hours in Perl or Python that couldn't be solved within 2 or 3 times that length of time (longer, but not "weeks") by a competent C or Java programmer.
I want a program that- recursively reads in a bunch of web pages.
- validates the HTML for those web pages
- if the HTML is valid, parse the HTML and make a list of all images on the pages
- for each image, create a Morse code audio clip from the relevant ALT text.
- if the HTML is invalid, parse the HTML to determine who maintains that page. (Let's assume there's a corporate standard verbiage at the bottom of each page, which includes maintainer info.) Lookup the maintainer name in the corporate LDAP directory. Generate an interoffice mailing label (complete with barcode) so you can mail a seppuku knife to the relevant webmaster.
It took me 20 minutes of browsing CPAN to come up with this (admittedly stupid) example, I'm sure I could throw in lots more freaky CPAN modules to make life harder for the C folks.
CPAN is what forced me to learn Perl. I'm sure a lot of these libraries exist for C, but it's much harder to find 'em, and who knows if they work on your platform? Let's stipulate that our program will be deployed on a DEC Alpha running WinNT...
-
Re:weeks vs. hours
I'd challenge anybody to come up with a problem that could be solved within a few hours in Perl or Python that couldn't be solved within 2 or 3 times that length of time (longer, but not "weeks") by a competent C or Java programmer.
I want a program that- recursively reads in a bunch of web pages.
- validates the HTML for those web pages
- if the HTML is valid, parse the HTML and make a list of all images on the pages
- for each image, create a Morse code audio clip from the relevant ALT text.
- if the HTML is invalid, parse the HTML to determine who maintains that page. (Let's assume there's a corporate standard verbiage at the bottom of each page, which includes maintainer info.) Lookup the maintainer name in the corporate LDAP directory. Generate an interoffice mailing label (complete with barcode) so you can mail a seppuku knife to the relevant webmaster.
It took me 20 minutes of browsing CPAN to come up with this (admittedly stupid) example, I'm sure I could throw in lots more freaky CPAN modules to make life harder for the C folks.
CPAN is what forced me to learn Perl. I'm sure a lot of these libraries exist for C, but it's much harder to find 'em, and who knows if they work on your platform? Let's stipulate that our program will be deployed on a DEC Alpha running WinNT...
-
Re:weeks vs. hours
I'd challenge anybody to come up with a problem that could be solved within a few hours in Perl or Python that couldn't be solved within 2 or 3 times that length of time (longer, but not "weeks") by a competent C or Java programmer.
I want a program that- recursively reads in a bunch of web pages.
- validates the HTML for those web pages
- if the HTML is valid, parse the HTML and make a list of all images on the pages
- for each image, create a Morse code audio clip from the relevant ALT text.
- if the HTML is invalid, parse the HTML to determine who maintains that page. (Let's assume there's a corporate standard verbiage at the bottom of each page, which includes maintainer info.) Lookup the maintainer name in the corporate LDAP directory. Generate an interoffice mailing label (complete with barcode) so you can mail a seppuku knife to the relevant webmaster.
It took me 20 minutes of browsing CPAN to come up with this (admittedly stupid) example, I'm sure I could throw in lots more freaky CPAN modules to make life harder for the C folks.
CPAN is what forced me to learn Perl. I'm sure a lot of these libraries exist for C, but it's much harder to find 'em, and who knows if they work on your platform? Let's stipulate that our program will be deployed on a DEC Alpha running WinNT...
-
Re:Does it really matter?
AppleScript has a "speak text" command or somesuch.
Personally, I would do it all in perl, using Mac::Speech (from Mac::Carbon). -
TIMTOWDI
Save yer money... Build your own iNet rAdio, where you control the content.
-
Ah, FTPAs the co-author of a moderately popular FTP server, I think it's a great shame that FTP is regarded as a second-class citizen in the world of the web.
FTP is a quirky, extensible protocol, great for uploading, downloading and sharing files, and you can do wonderful things with FTP and databases which web servers only dream about.
Rich.
-
Re:balanced parens: NO YOU CAN'TThis faq entry is a bit outdated. There is experimental extended regexp syntax which allows to match balanced expressions. There is even an example in perlre (look for documentation on (??{ code }) syntax construct).
Also there exist CPAN module Text::Balanced which does balanced expressions matching.
-
Why lynx -source?
If he's using perl couldn't he just as easily use the LWP::UserAgent module (part of libwww-perl)?
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
my $source = $ua->get("http://slashdot.org")->content;
-
Re:Removed?
Go, have a look at CPAN for the EuroTV stuff.
-
hasn't received much attention until recently?
The reviewer is correct, Perl is a good tool for slamming and jammin' text, including XML. What I'm not so sure of is the quote "It's therefore surprising that using Perl for XML processing hasn't received much attention until recently."
I mean one need only scroll down the extensive list of CPAN Modules to see well over 50, as well as many sites/authors devoting time, energy and resource.
Similarly, I would point out some press modules supporting web services via XML, such as SOAP::Lite as far back as 02/26/01 and XML-RPC also in '01 -- or O'Reilly's own XML.com with articles such as "Processing XML with Perl" written shortly after the turn of the millenium.
Point is, though I personally love Perl, blatant plugs such as "... it's just that the world outside of the Perl community doesn't seem to have taken much notice of this work. This is all set to change with the publication of this book and O'Reilly's Perl and XML." " don't inspire confidence in the reviewer's objectivity.
-
hasn't received much attention until recently?
The reviewer is correct, Perl is a good tool for slamming and jammin' text, including XML. What I'm not so sure of is the quote "It's therefore surprising that using Perl for XML processing hasn't received much attention until recently."
I mean one need only scroll down the extensive list of CPAN Modules to see well over 50, as well as many sites/authors devoting time, energy and resource.
Similarly, I would point out some press modules supporting web services via XML, such as SOAP::Lite as far back as 02/26/01 and XML-RPC also in '01 -- or O'Reilly's own XML.com with articles such as "Processing XML with Perl" written shortly after the turn of the millenium.
Point is, though I personally love Perl, blatant plugs such as "... it's just that the world outside of the Perl community doesn't seem to have taken much notice of this work. This is all set to change with the publication of this book and O'Reilly's Perl and XML." " don't inspire confidence in the reviewer's objectivity.
-
Re:XML frees us from Perl
Okay, I'll bite.
The whole point of XML is to free us from having to do the kinds of things Perl is meant for.
So how does XML do that in, let's say, system administration?
Absent free-form text munging, Perl really has no advantage over other languages.
So ehmm... what type of things is XML made out of? Elements' names, contents, etc, it's all text.
You can commit any dirty hack in a few minutes in perl, but you can't write an elegant, maintainabale program that becomes an asset to both you and your employer
You can write a dirty hack in any language. And about the last part: what about CPAN?
(How do you tell when a regexp has a false positive match?)
That would be by understanding the regex, just as any other chunk of code. (Funny, that... When you want to say something bad about Perl, moan about its horrible, illegible, etc regexes. When you want to mention something positive about another language -- especially when comparing to Perl -- mention support for powerful, fast, etc regexes. And advertised as "Perl-compatible" at that.)
-- Arien
-
Petal
One new, and cool, Perl XML module that people might not know about is Petal (PErl Template Attribute Language).
It is an implementation of the Zope TAL (Template Attribute Language) specification and it basically allows you to create XML templates where all the templating commands are just attributes of existing tags.
This allows things like XHTML templates which are very WYSIWYG friendly since the editors don't do anything with attributes that they don't know about.
-
Re:not supported by the dataI'm not sure I entirely understand your argument against Pearson's r but your when you state "Machine learning techniques routinely explore billions of possible formulas and hypotheses describing the relationship between variables of some dataset. But they use accurate, theoretically justified measures of the significance of such hypotheses." you have my attention.
I used Perl's Algorithm::Evolutionary::Individual::Tree to write up some search strategies for good arithmetic expressions on random variables and of course the first thing I found was how difficult it was to give the E.A. a fitness function.
Please share your references on machine learning -- I'd like to look at them.
If I can update my (hopefully) out-of-date statistics education then I'll happily dispense with the bad science I've been doing.
-
Re:PhppSlight typo above. The second-to-last bullet should read:
Write modules in C for extra speed?
-
Re:Phppwhat exactly what can you do with perl that you can't do with php???
A few examples:
Parse and create binary Excel files, even on Unix?
Automate your smart home?
Configure a linux packet-filtering firewall?
Monitor SNMP devices across the enterprise?
Perform various System Administration tasks?
Program using the Win32 API?
Write for extra speed?
Write native GUI apps in windows or unix/linux?
There are over 4000 other reasons in the module repository known as CPAN.
I use several languages, but when I want to be productive, I turn to Perl because of CPAN. Generally, I have 80% of my code nicely abstracted in object-oriented modules. (Note to OO purists: bugger off, we're comparing to PHP not Scheme or Eiffel or whatever)
-
Re:Phppwhat exactly what can you do with perl that you can't do with php???
A few examples:
Parse and create binary Excel files, even on Unix?
Automate your smart home?
Configure a linux packet-filtering firewall?
Monitor SNMP devices across the enterprise?
Perform various System Administration tasks?
Program using the Win32 API?
Write for extra speed?
Write native GUI apps in windows or unix/linux?
There are over 4000 other reasons in the module repository known as CPAN.
I use several languages, but when I want to be productive, I turn to Perl because of CPAN. Generally, I have 80% of my code nicely abstracted in object-oriented modules. (Note to OO purists: bugger off, we're comparing to PHP not Scheme or Eiffel or whatever)
-
Re:Phppwhat exactly what can you do with perl that you can't do with php???
A few examples:
Parse and create binary Excel files, even on Unix?
Automate your smart home?
Configure a linux packet-filtering firewall?
Monitor SNMP devices across the enterprise?
Perform various System Administration tasks?
Program using the Win32 API?
Write for extra speed?
Write native GUI apps in windows or unix/linux?
There are over 4000 other reasons in the module repository known as CPAN.
I use several languages, but when I want to be productive, I turn to Perl because of CPAN. Generally, I have 80% of my code nicely abstracted in object-oriented modules. (Note to OO purists: bugger off, we're comparing to PHP not Scheme or Eiffel or whatever)
-
Re:Phppwhat exactly what can you do with perl that you can't do with php???
A few examples:
Parse and create binary Excel files, even on Unix?
Automate your smart home?
Configure a linux packet-filtering firewall?
Monitor SNMP devices across the enterprise?
Perform various System Administration tasks?
Program using the Win32 API?
Write for extra speed?
Write native GUI apps in windows or unix/linux?
There are over 4000 other reasons in the module repository known as CPAN.
I use several languages, but when I want to be productive, I turn to Perl because of CPAN. Generally, I have 80% of my code nicely abstracted in object-oriented modules. (Note to OO purists: bugger off, we're comparing to PHP not Scheme or Eiffel or whatever)