Domain: perl.com
Stories and comments across the archive that link to perl.com.
Comments · 775
-
To Anyone Who Has Read This OneI learned my Perl OO from perltoot and the O'Reilly Advanced Perl Programming book.
Does this book provide much more than that?
-
Something like CPAN
CPAN, the Comprehensive Perl Archive Network, was modeled after CTAN (the Comprehensive TeX Archive Network), and is highly successful. I think that CPAN is one of the primary reasons that Perl itself is so successful. It would be a good thing for Java to have something that is modeled after CPAN.
One of CPAN's key features is that its structure encourages collaboration - there is a group that ensures new modules are put into appropriate namespaces, so if a bunch of people want to work on stuff about XML, this group will make sure they choose an appropriate namespace (probably XML::something).
Java, on the other hand, has a naming convention that I feel discourages cooperation. For example, on CPAN, take two modules such as XML::XPath and XML::Writer. It's clear that these packages were meant to work together, and in theory, they could share some package-specific data (maybe they do, maybe they don't - the point is, they could, if it was necessary to fulfill the mission of the XML:: package).
If these same authors had written these modules for Java, and if they had followed the Java naming conventions, the modules would be called org.sergeant.xml.XPath and com.megginson.xml.Writer. This makes it difficult for them to share package-scoped data, and also makes it less clear that they are meant to work together. -
VBasic sucks when upgrading version and installingMi personal experience with Visual Basic is
- It is good when you start the project, you can easily show screens to the customer and start code easily.
- Projects are hard to come to an end. The last part of the project always has a long way to walk. IT's not easy to finish the project.
- It can be very hard to install your finished project in the customer. DLL conflicts all the way with older access or other MS and not-MS apps installed, you have to remove everything before install your own software.
- If you want to upgrade to the latest and newest VB you have to code a lot. If you want to code in two or more different versions of VB you can't . You need to have removable disks, each one with a different VB version.
It does suck.
I have made an application for 14 different locations of the same customer and have to install it there. It was a pain and sometimes I must go there because nobody did nothing and the thingie starts having conflicts or because someone installed outlook and it hangs.
If I had to do it now I'd do a web application in perl
-
Re:You've got it backwards2) A lot of people who take more than 5 minutes to think about UI's will respond with "but my grandmother doesn't need to run pipes and greps and stuff". OK, but that's not an argument for a simple (minded?) Linux UI--it's an argument for your grandmother to use a different OS.
Wrong. What has the lack of need for certain programs to do with an OS? That's like saying that you should get the 4 cylinder instead of the 6 cylinder because you don't need the navigation system. You can get a grep that will work in Windows, too, you know. Most people don't need it, though. Just because it's there doesn't mean you have to use it.
If Linux is, in fact, superior, there should exist an interface that makes it so for everyone. And that includes your no-grep-needing grandmother.
-
Re:PerlPERL
nope, doesn't count. Gurusamy Sarathy's PerlInterp is an XS module that embeds the perl interpreter (which is currently written in C) for other perl code to access. it only serves as perl embedding example.
-
try MIME::LITE
you can try MIME::LITE, it's a perl modukle that is just for that.
haven't used it under NT so I cannot say if there is are any funkiness or porting that needs to be done with it.
Check CPAN:
http:/ /www.perl.com/CPAN-local/modules/by-module/MIME/MI ME-Lite-1.137.readme or
http://www.perl.com/CPAN-loc al/modules/by-module/MIME/ -
try MIME::LITE
you can try MIME::LITE, it's a perl modukle that is just for that.
haven't used it under NT so I cannot say if there is are any funkiness or porting that needs to be done with it.
Check CPAN:
http:/ /www.perl.com/CPAN-local/modules/by-module/MIME/MI ME-Lite-1.137.readme or
http://www.perl.com/CPAN-loc al/modules/by-module/MIME/ -
Re:Latin
Virus is a Latin word. Viruses is not. The root is virus, Latin for poison, yes. But the plural is not viri. Check out this link for more information. Not every word ending in -us has -i in the plural. Virus is a defective noun. Even some Latin dictionaries have that wrong.
---- -
Re:How to stop it... forever...
One possible solution to this would be to refuse any unencrypted E-Mail, and set your encryption key to about 4096 bits. It takes about 10 seconds on my PII 300 at work to encrypt an e-mail sized /etc/motd to a 4096 bit key. Joe Random Spammer isn't going to spend the time to encrypt to my key, he's not going to buy the computer hardware and even if he did, encrypting a million messages to a million different keys would take a significant amount of time, making spammer detection and elimination much easier. Your average spammer isn't even going to get your mail bounce with your encryption key in it.
This is certainly a viable solution, but there are easier, less drastic ways of managing your spam level. Once such method is to use a whitelist and a blacklist such as the method described in this perl.com article.
I personally don't use a whitelist/blacklist method, relying instead on the RBL and some anti-spam filters I've acquired. But, if my spam levels get above a certain point, say 2 or 3 p/day*, then I'll hack something up using procmail to implement this.
Cheers!
* - Yes, I realize that to some a mere 2-3 articles of spam per day must seem like sheer heaven to people who have to deal with 5+ p/day. I count myself very lucky my spam level is still maintainable. -
Re:Why is Perl so popular?
The use of Perl is not just restricted to the *nix world either. I work in an NT, AS400 shop, and I have used Perl to perform feats that blow the socks off my VB and VC programming coworkers. We even found a Perl port for the AS400, though I cannot convince the sysadmin to let me install it....
:)Perl has a place permanently in my toolkit for just about any job that I have. It's fast, it's easy, and if I don't know how to do something, I can find the answer pretty fast: perlmonks, perl.com, comp.lang.perl.misc...
-
Slashdot Effect
It seems like the Slashdot Effect has swallowed the OS Link....
Does anyone know if it plans to use the Perl from the Topaz Project, or if the OS will be easily updatable each time a new distribution is released? -
Re:Feature bloat in Perl
The problem isn't perl's OO framework itself. The *real* problem is at a level below: references. Syntax for references in Perl was chosen to match the syntax for pointers in C/C++, with explicit referencing/dereferencing, which is too low level, for most of the stuff you want to do with Perl. Contrast this with the much cleaner syntax in Python/Java/almost all modern languages. Even "Perl luvers" admit that! Check the relevant section in Sins of Perl revisited> mentioning: "Doom and gloom" !
-
Re:Regular Expressions improvedhere You'll see an example about regular recursive expressions.
$re = qr{
\(
(?:
(?> [^()]+ ) # Non-parens without backtracking
|
(?p{ $re }) # Group with matching parens
)*
\)
}x;
That will match things like:
abc(def(),ghi())If there are parens use the pattern recursed, if there aren't match !
-
Re:Feature bloat in Perl
To only look at Perl as a scripting language is to discount a lot of good and well implemented features in Perl. Just because you don't need them does not mean that no one needs that feature. If there is a need for a feature, why not include it?
I have used VB, C/C++, Python, RPG, COBOL, and Perl and I have not seen a language that wraps everything I need for systems administration and reporting, etc into one powerful package.
And as far as threading is concerned, Perl is using threading in Win32 to allow ActivePerl emulate the fork command from *nix. That is something that should exist (free-threading is available in VC++ for all Win32 platforms), and I'm glad that I finally have it at my disposal.
Anyway, a rethink of Perl has been underway for a while. Look up the Topaz project. -
Re:Lvaluable Subroutinesoes the presence of unusual constructs mean that Perl code cannot be maintained?
No, it doesn't. It just means you have to understand the constructs.
Any language can be the source of unmaintainable code; it's up to us to use the power of the language in a sensible way.
This is true. However, in all the Perl code I've written (some of it on fairly visible sites), I've taken pains to make sure I didn't use any of those unusual constructs, or to clarify them with comments if I found it necessary to use something weird.
Your example (mysub(2) = 15) is unmaintainable, but I suspect most sensible coders would have called the function something clearer than "mysub". And if necessary they may even have put a clarifying comment next to it.
This isn't my example; it came from the www.perl.com article. Funny that they should use such a bad example. I'd rather see good examples of how to put the language feature to use; they would be far more useful to me. But as for a clarifying comment, do I have to put one next to each invocation of mysub(), or should I just explain it at mysub() itself? What if I don't have the source for mysub()? Then I have to hope it's documented in the module documentation...
I realize any feature of perl, or any other language, can be used for good or ill. This one just seems to be carrying a negative bias...
--- -
Can ReplayTV/TiVo be hacked?Like the Netpliance i-opener, this is basically a box which runs an OS with a big hard drive. We know the i-opener runs QNX, and the TiVo runs a variant of Linux (seen the patches). Why can't these be hacked to PREVENT any data gathering from happening without explicit opt-in from the owner?
Better yet, can they be hacked NOT to require the monthly service fees? I'd love just to have a self-contained tapeless recorder, and would happily buy one, but I want to use it JUST LIKE A VCR, thankyouverymuch.
[ Reply to This | Parent ]
-
Re:cross platform toolkits
Since you mention Tcl/Tk, it's also worth considering Perl/Tk. See the Perl/Tk FAQ, or just all the Perl/Tk links at perl.com.
-
MPL/NPLThe Mozilla Public License is similar in some ways to the LGPL in that it requires modifications to the source code to be released under the same license, but has provisions to allow MPL code to be combined with non-MPL code in "larger works." It is also similar to the Artistic License because it requires that differences between original and derived works be clearly documented. The MPL is designed for general use; it is not specific to the Mozilla project. Developers looking for a less-restrictive license that still has the "viral" properties of the GPL/LGPL might well consider the MPL for their own works.
The NPL (the particular MPL-based license used by Netscape for the Mozilla release) grants special rights to the initial developer (in the case of Mozilla, this is Netscape). Specifically: If you release modifications to NPL-covered code, Netscape can use your code in non-NPL products for up to two years following its release (after that, the normal requirements of the MPL apply to Netscape and to everyone else). In addition, Netscape can make their own modifications to NPL-covered code without these modifications falling under the NPL.
Read the licenses yourself if you want the details.
Note that the GPL was not really an option for the Netscape source release, as it is too restrictive to allow Netscape to base their browser on an open-source project while still fulfilling their contractual and legal obligations with regard to licensed, patented, or export-controlled code that is included in the final product. You may complain about some of the terms in the MPL/NPL, but remember that many of them were absolutely necessary for the Mozilla source release to take place.
-
Re:5.6.0 is NOT out
Yes it is.
http://www.perl.com/pub/n/Perl_5.6.0_is_ out!
The link is right there in the "What's new?" section of the www.perl.com home page.
-
Re:5.6.0 is NOT outA quick visit to www.perl.com reveals that what has just been released is Release Candidate 3, which is still beta. Close, but still beta.
Hmmmm. The site in question is a little unclear, and I hope they will clarify things soon. I thought the release candidates were patches on 5.005_670, and that the actual release would be called 5.6.0. What is on the CPAN sites is "perl-5.6.0.tar.gz" and it has no qualification.
I plan to wait for a clearer message from the developers, but what I see on the perl.com sites seems to point to this being the actual release.
----------------------------------------- -
Whoops!
I see someone hasn't been reading their daily perl myth
-ben -
5.6.0 is NOT out
A quick visit to http://www.perl.com reveals that what has just been released is Release Candidate 3, which is still beta. Close, but still beta.
-- Jim -
Re:Change log
The change log is available here.
Yes, that's true...but it's highly unlikely that this is what most people are interested in.
What you really want to read is the file perldelta.pod, that comes with the distribution, and, I hope, will appear outside of it somewhere (at www.perl.com?) in the very near future. The Changelog is 1.4 MB of lore that literally logs everything done to perl source since the Bronze age (or sometime around there; I'd have to check). Not that it isn't entertaining or interesting if you've achieved some level of geekiness, but it doesn't give easy answers to questions most people have.
:-) -
What New in Perl 5.6
It's not the changelog per se, but What New in Perl 5.6 might be of interest.
-
Re:Schwartz is a Poser, not a Coder
- Author of the JAPH scripts.
- Author of the original chat2.pl
- Author of Learning Perl
- Co-author of Programming Perl
- Co-founder of The Perl Institute (to whom I donated the perl.org domain)
- Instructor
- The items listed on CPAN.
Give up on this replying-to-yourself thing. It just makes you look bad. - Author of the JAPH scripts.
-
Re:OT: Virii vs. viruseses.
...and if we decline it appropriately, we do indeed get "virii"
No. See here.
-- -
Re:Common sense VS Anti-virus software
As far as I understand it (According to this site), in Latin it was a only mass noun. You couldn't have A single virus in much the same way that you can't have a water, so there wasn't a plural.
Admittedly, all my knowledge here is second hand, because I never did latin. -
Re:virii vs viruses. LAST WORD (I doubt)
According to this site the correct plural is "viruses". The full reasoning behind it is also there.
Although I really don't see why the previous poster has such a problem with it. I mean, correcting someone once is all well and good, but shouting about it again and again with no references or reasons is just pathetic. Its like he learned it once and is just desperate to show us all how clever he is. -
Open Source licenses...Given all the qualms that various people have with the GPL...and given the fact that many people seem to have one open source license they like above all others...
Here's an interesting project for someone with a little bit of time:
Make a website listing, detailing, and comparing all the current open source licenses that are being used. Set-up a nice clean web-site which is devoted to the different open source licenses that people have written up, perhaps with some sort of arguments for and against each one? Try to make it relatively impartial. Perhaps even try to get some of the OpenLaw people to contribute some time to analyze them in relation to various legal structures around the planet.Heck, here's even a starter just off the top of my head and Yahoo:
- Apple Public Source License
- Artistic License
- GNU General Public License (GPL)
- GNU Library General Public License (GLPL)
- Netscape Public License (NPL)
I looked around a bit, but can't seem to find any site that really does this already cleanly and clearly. Any takers?
-
Re:A little hypocracy?
Accually I believe they came up with the camel/perl association. Anyways for anyone interested check out the conditions. Apparently... oh my.. your allowed to freely use it, except in print, in which you have to accually get permission. Or try to use it in a manor to imply that O'Reiley endorces you. Apparently some people have even gotten away out of pure discrace. Accually putting the logo on their own site as if it where theirs!
.. www.perl.org for example. -
Re:Practice what you preach with www. ?It's certianly not an 'accepted convention' that example.com == www.example.com.
It's perfectly acceptable for example.com & www.example.com to point to two totally different websites, for example here & here. It's also very common for there to be no hostname associated with a domainname, simply because there is no 'obvious' host to associate with the domain. While the http protocol is very pervasive, there may well be a better candidate in the default telnet server or some other protocol.
Don't be lazy, a URL contains a protocol, a full hostname and a file reference. Enter all of them at all times.
-
Re:Practice what you preach with www. ?It's certianly not an 'accepted convention' that example.com == www.example.com.
It's perfectly acceptable for example.com & www.example.com to point to two totally different websites, for example here & here. It's also very common for there to be no hostname associated with a domainname, simply because there is no 'obvious' host to associate with the domain. While the http protocol is very pervasive, there may well be a better candidate in the default telnet server or some other protocol.
Don't be lazy, a URL contains a protocol, a full hostname and a file reference. Enter all of them at all times.
-
Slashdot and PDAs
An only slightly off-topic rant:
I have a PDA (a Handspring Visor) and use AvantGo to view Web pages on my way to work after syncing up first thing in the morning. My commute is 1+1/2 hours on public transportation, so I have plenty of time to read.
Ideally I would like to read Slashdot, but all of the AvantGo-channel-ready Slashdot hacks out there only show the articles, not the talkback. I tried setting up my own page through some CGI that parsed the rdf, and created links to the Slashdot-FAQ-suggested version of the pages, but even with threshold=4, plain=1 and boxes=0, the HTML is way to long in many cases, and it's certainly too ugly on the PDA screen.
Well, I'm a coder, I got around it, but I don't like the fact that I had to parse the feedback page in order to do it. Slashdot should have support for such browsing. I would even happily download the banner-ad, if it meant getting a VERY simple HTML version of the page.
If you want my solution, grab sd and sdforum. Put them in your cgi-bin directory and rename them so that they have a .cgi extension (sd finds sdforum only if it's in the same directory and called sdforum.cgi). You will need Perl, and you will need the CPAN modules libwww-perl and XML::RSS. Now open your Web-browser and visit sd.cgi. You should see a bullet-list of articles. You can then click on any one to see a VERY cut-down version of the feedback page. If that works, you're on to the next step.
If you use AvantGo, they give you a nifty little javascript-button that will set the current page in your list. Use that on sd and you're done. If you use Pendragon Browser, use their user interface to add the URL to sd. For other off-line browsing applications your milage may vary.
Please, even if you manage to find where I keep sd on my system, don't use it from there. I don't have great bandwidth, and I don't want to be in the business of being a Slashdot-for-PDA mirror (I'm not even sure of the legalities). If I have to move it to stop people from using it, I will. -
Slashdot and PDAs
An only slightly off-topic rant:
I have a PDA (a Handspring Visor) and use AvantGo to view Web pages on my way to work after syncing up first thing in the morning. My commute is 1+1/2 hours on public transportation, so I have plenty of time to read.
Ideally I would like to read Slashdot, but all of the AvantGo-channel-ready Slashdot hacks out there only show the articles, not the talkback. I tried setting up my own page through some CGI that parsed the rdf, and created links to the Slashdot-FAQ-suggested version of the pages, but even with threshold=4, plain=1 and boxes=0, the HTML is way to long in many cases, and it's certainly too ugly on the PDA screen.
Well, I'm a coder, I got around it, but I don't like the fact that I had to parse the feedback page in order to do it. Slashdot should have support for such browsing. I would even happily download the banner-ad, if it meant getting a VERY simple HTML version of the page.
If you want my solution, grab sd and sdforum. Put them in your cgi-bin directory and rename them so that they have a .cgi extension (sd finds sdforum only if it's in the same directory and called sdforum.cgi). You will need Perl, and you will need the CPAN modules libwww-perl and XML::RSS. Now open your Web-browser and visit sd.cgi. You should see a bullet-list of articles. You can then click on any one to see a VERY cut-down version of the feedback page. If that works, you're on to the next step.
If you use AvantGo, they give you a nifty little javascript-button that will set the current page in your list. Use that on sd and you're done. If you use Pendragon Browser, use their user interface to add the URL to sd. For other off-line browsing applications your milage may vary.
Please, even if you manage to find where I keep sd on my system, don't use it from there. I don't have great bandwidth, and I don't want to be in the business of being a Slashdot-for-PDA mirror (I'm not even sure of the legalities). If I have to move it to stop people from using it, I will. -
Re:Bah !Every 'language designer' "promotes" her/his language.
One could almost say that the success of a language is measured in the number of proponents of other languages who find it necessary to write "MyLanguage vs. YourLanguage" articles. For Java, there is the already-mentioned digs from Stroustrup, plus what some vocal Perl advocate wrote a few years ago, and IIRC some of the religious Eiffelians tend to spout their mouths off every now and then about how much better their insignificant little plaything is.</flamebait>
All this points to Java as a winner.:-)
-
Re:learning perl...One problem with bad books is that the reader doesn't realize what is being misrepresented.
I'd trust what Mark-Jason Dominus said or what Tom Christiansen said about the Perl for Dummies book.
I haven't looked at it yet, but I've heard good things about Elements of Programming with Perl. I've also been told that MacPerl: Power and Ease does a good job of teaching perl programming as well as teaching the MacOS specific areas of MacPerl.
-
People, read the detailed link
As was pointed out there are a number of changes. This is not just a bug-fix. The biggest new item is Unicode support. If you have to do things like match patterns in multi-byte character sets, this will be really cool. If you don't it will still be a nice feature since a lot of things (eg the web, file-systems, etc) are moving towards Unicode as internationalization becomes more and more important.
The biggest "missing features" continue to be solid multi-threading, compilation, and solid 64-bit support. If you want the first one, rethink whether the fork model works. If you want the second think about embedding an interpreter. If you need the third I suggest getting used to opening pipes to and from programs that can handle large files...
A "cool feature" that was discussed (I have ignored the Perl development list for the last half year so I don't know if it is in) was embedding Perl and a directory structure in a zip format. Imagine shipping an executable which had an encrypted zip appended which was Perl, with your scripts, and a directory structure of all of the modules your script used... :-)
Cheers,
Ben -
A more complete list of what has changed
For those who want to know what is actually new in Perl 5.6, you want to look at perldelta . (The message linked to above is just what was new since the last beta).
-
Re:Closures?I was under the impression that Python doesn't implement closures properly. The Perl FAQ says:
Closures make sense in any programming language where you can have the return value of a function be itself a function, as you can in Perl. Note that some languages provide anonymous functions but are not capable of providing proper closures; the Python language, for example.
The Linux Journal interview with van Rossum last year (sorry, don't have a reference to hand) wasn't very encouraging either. It gave the impression that he met several new concepts (such as closures) whilst working at a university for a short time, and then created Python based on his first impressions of those concepts. I'd prefer to use a language which has been thought through more carefully than that.
At least Perl is consistently messy!
:-)I'm not a fan of enforced indentation for block structure either. I've used it in Gofer, Haskell, and Occam. Not again, thanks!
Thanks for the pointer to Python in OCaml. That does encourage me to use Python!
-
Who voted for Tom Christiansen?
Tom definitely doesn't deserve the "Best Newbie Helper" award. Sure, he's co-authored many great Perl books, but this just serves to confuse the facts. Tom's EVIL. (He's actually LAWFUL EVIL, which also confuses people, but just remember: EVIL is the opposite of GOOD.)
Go read Larry Wall's 2nd State of the Onion address. Pay particular attention to the following paragraphs:
Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris.
These are virtues of passion. They are not, however, virtues of community. The virtues of community sound like their opposites: diligence, patience, and humility.
They're not really opposites, because you can do them all at the same time. It's another matter of perspective. These are the virtues that have brought us this far. These are the virtues that will carry our community into the future, if we do not abandon them.
If anyone can show me A SINGLE INSTANCE of Tom being either patient or humble, I'd love to see it. Otherwise, I'm going to keep on believing that this award was given to Tom not because he deserved it, but because he led the pack in name recognition.
-
False dichotomyInnovator/inventor and enlightener/internalizer, to use the terms of this article, are not mutually exclusive. The open source community has far too many prominent examples of people who are extremely competent in building the messenger and who have also provided us with profound insights because they want to communicate their ideas:
- Richard Stallman who brought us Emacs (among other things), and the GNU Public License
- Eric Raymond, author of Fetchmail and The Cathedral and the Bazaar
- Larry Wall, Tom Christiansen, and all of the big names of Perl who can write code, documentation, and insightful commentary.
- CmdrTaco, et al at Slashdot who have built both the code and much of the content required to make this one of the liveliest places on the net
- Linus himself. Although he doesn't write much prose, he summarizes things very well. The Linux motto, "Do it yourself."
Open source has made it possible for people with ideas and a message to build tools that either embody it or enable it if they have the talent. -
Re:Virii that exploit bugs? Been there, done that.
Linux virii will eventually be created and released into the wild.
Man, you kids are idiots! Not only do you come off as pathetically pretentious with your false Latin (that's not a word, you don't even understand why Unix isn't going to get your childish little viruses. -
Re:ORB, Gnome and KOffice viriiThere is no such word as you are using.
And Unix won't have viruses. Only if fuckwads get their hands on it is there a problem. Real programmers will laugh at you forever.
-
Re:Nah, not the kernel....
Trojans and virii are different beasts.
That's right. Trojans exist. Virii doesn't, since "virii" is not a word. -
Re:The "It's hard to gain root access" fallacy
The plural of "virus" is "viruses", not "viriiiiiiiii.
-
Re:Macro$haft
The plural of "virus" is "viruses", not "viriiiiiiiiii.
-
Re:FUD?
The plural of "virus" is "viruses", not "viriiiiiiii.
-
Re:why only from russia ?
The plural of "virus" is "viruses", not "viriiiiii.
-
Re:Bliss?
The plural of "virus" is "viruses", not "viriiiiiii.
-
Re:DUH - no - thats DOH
The plural of "virus" is "viruses", not "viriiiii.