Re: Perl versus UNIX Korn Shell
On Mon, Feb 25, 2008 at 12:57:41PM -0800, Andrew Savige wrote: Like Anthony Esposito in Nov 2003, I had a need recently to persuade some folks to use Perl rather than Unix shell and remembered this old thread. I've summarized my arguments at: http://www.perlmonks.org/?node_id=668481 Feedback welcome. Thanks, /-\ Much of my recent book (see .sig below) is dedicated to demonstrating how Korn/Bash/POSIX shell scripts can either benefit tremendously from Perl's assistance or be replaced entirely by Perl scripts. For a free sample, download the Scripting Techniques chapter from http://minimalperl.com/#Downloads *-* | Tim Maher, PhD (206) 781-UNIX http://www.consultix-inc.com | | tim at ( Consultix-Inc, TeachMeLinux, or TeachMeUnix ) dot Com| *-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+---* | Minimal Perl for UNIX People has been an Amazon Best Seller! | | * Download chapters, read reviews, and order at MinimalPerl.com * | *-*
Re: Perl versus UNIX Korn Shell
On Wed, Nov 05, 2003 at 04:19:44PM -0500, Esposito, Anthony wrote: How would you convince someone that programming in Perl is better than using the UNIX Korn Shell? I agreed with many of the comments others gave on this thread, regarding how each has its merits. To summarize a bit and add my own spin, I'd emphasize that there's very little that can be accomplished with any shell by itself, given that they are command and flow controllers foremost, rather than flexible data processing tools. This means shell programmers have to learn other technologies to get any real work done, and for UNIX/Linux folks, the best choices are Perl, Awk, and then grep/sed/sort/find/tr/col/dd/m4, etc. The choice of Perl is unique amongst this group because those who learn enough about it don't have to learn the dozens of other utilities that other shell programmers must master to accomplish the same tasks. (I used to say the same thing about AWK, but it's since been eclipsed by Perl in this department.) And as an extra bonus, Perl programming skills are portable to other OSs. Along these lines, I'd like to mention that I'm currently writing a book (see .sig) whose goal is to make it easy for shell users and programmers to acquire Perl skills, by focusing on a subset of the language, and embracing Perl through a gradual, incremental approach. For example, it starts out by showing how simple Perl commands can function as better versions of grep, sed, sort, find, awk, etc., and then moves on to show how knowledge of shell programming can be translated into Perl programming techniques. Assuming I ever finish it* 8-}, the book should become available sometime in 2Q 2004, from Manning Press. -Tim P.S. Believe the rumors! Writing a book is *MUCH* harder than it seems/looks/appears/should-be/deserves-to-be, no matter how close you might think your previous projects have resembled the task. And the pay is terrible! 8-{ ** | Tim Maher (206) 781-UNIX (866) DOC-PERL (866) DOC-UNIX | | tim(AT)Consultix-Inc.Com TeachMeUnix.Com TeachMePerl.Com | *+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-* | UNIX Fundamentals Class: 11/10-13 Perl Class: 12/01-05 | | Watch for my Book: Minimal Perl for Shell Programmers | **
Recommendations for Literary Agents?
Hello Perl Authors, Does anyone have a book (literary) agent to recommend? I'm shopping for one, and would appreciate benefiting from your experience. Preferably someone you're sure helped you get more favorable contractual terms, get along better with your publisher, and maybe even find new writing opportunities. Incidentally, in case the results of my Best Perl Publishers (from author's POV) thread weren't obvious to everybody, O'Reilly came in as a clear first choice, Manning as second, and everybody else as a distant third. (Although just about every publisher who's tried has fielded at least one half-decent Perl title, many have very spotty track records). The biggest factors affecting judgments of publishers by authors were: professional skills and personal characteristics of Editors, acceptability of publisher-dictated macros for doing markup, quality of support staff (for illustrations, etc.), and marketing prowess. -Tim ** | Tim Maher, CEO, CONSULTIX (206) 781-UNIX; (866) DOC-PERL; (866) DOC-LINUX | | Ph.D. JAWCAR (Just Another White Camel Award Recipient) | | [EMAIL PROTECTED] teachmeunix.com teachmeperl.com teachmelinux.net | **
Re: 2nd-Best Perl Publisher?
On Mon, Dec 16, 2002 at 01:48:03AM -0800, Dave Cross wrote: From: Uri Guttman [EMAIL PROTECTED] Date: 12/14/02 3:35:40 AM JK == Joe Kline [EMAIL PROTECTED] writes: JK in my opinion I think Manning might come in second. JK They have a few really good Perl title's, OO and Data JK Munging sping to mind. they currently have 4 perl books (and a couple in the works i think) and IMO all are winners, the above 2 and elements of programming with perl and extending and embedding perl. pretty good batting average. This could make for an interesting side-thread, but I wasn't asking about the publisher's reputation with the readership, but rather how attractive the individual publishers are from an author's point of view. Sure, there's some overlap there (e.g., popular publishers will sell more, increasing the royalty stream), but you can't ascertain the work habits of the editors, or the stinginess of the contract negotiators, etc., by talking to readers. I haven't read the last two yet, but the first four are all pretty strong. Of course, I'm slightly biased :) Dave... -Tim ** | Tim Maher, CEO, CONSULTIX (206) 781-UNIX; (866) DOC-PERL; (866) DOC-LINUX | | Ph.D. JAWCAR (Just Another White Camel Award Recipient) | | [EMAIL PROTECTED] teachmeunix.com teachmeperl.com teachmelinux.net | *-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+* | Providing Intensive, Hands-on, Instructor-led Software Training since '86! | **
2nd-Best Perl Publisher?
Fellow Perl Educators, I'm about to submit a proposal for a Perl book to O'Reilly, and I'd ideally like to have them publish it. That's because the O'Reilly authors I know tell me they're not only good people to work with, but their market-leading sales help amplify the royalty stream. In contrast, I've been warned that I might not even get minimum wage for the hours I put into my book with some of the other publishers out there. (And I seem to recall Randal remarking in this forum that, Camels and Cookbooks aside, Perl book-writing is better viewed as a charitable contribution than a money-making venture). So it's good that money isn't my primary objective in this project. I'd be happy just to make a contribution to the community, and get some free advertising for my company in the process. But, on the other hand, it sure would help to justify the time away from my real life to know that there might also be some revenues coming in later. 8-} Anyway, back to my point. I realize that, for a variety of reasons, I might not get my first choice of O'Reilly as a publisher. So my question is, which publisher would be second best, third best, etc. The criteria by which I'm currently considering best-osity (ouch!) would include a competent Perl-aware editorial staff, help with diagrams (do they still do that in the industry?), adequate promotion of the product, honestly keeping their side of the bargain, etc. Am I leaving out any important criteria? Which publishers get your vote for second-Nth best ? -Tim ** | Tim Maher, CEO, CONSULTIX (206) 781-UNIX; (866) DOC-PERL; (866) DOC-LINUX | | Ph.D. JAWCAR (Just Another White Camel Award Recipient) | | [EMAIL PROTECTED] teachmeunix.com teachmeperl.com teachmelinux.net | *-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+* | Providing Intensive, Hands-on, Instructor-led Software Training since '86! | **
Re: 2nd best Perl publisher
I apparently CC'd the wrong list on my first attempt at posting this message; sorry! -Tim On Fri, Dec 13, 2002 at 09:22:30PM -0700, Nathan Torkington wrote: Am I leaving out any important criteria? Danny had a good list of other criteria. I agree; and it's the kind of stuff I might have thought of *eventually*, but undoubtedly too late in the game. Thanks, Danny! Ask to keep the copyright in your name (no good reason, it just feels better that way). Make sure the rights revert when it goes out of print (and check for weasel words about what out of print means--I personally would put in something like sells less than 10 printed copies a month for three consecutive months). Interesting advice! And I especially like the operational definition of what out-of-print means. Talk to authors who have written for the publisher and see what their experiences were like. I've tried this, but most have experience with only one publisher, and for that reason aren't capable of making comparisons. Hence my appeal to this Elite Fraternity of Perl Educators for additional input! 8-} And so far, nobody's commented on my inqury regarding help with diagrams. As a course developer with way too much experience, I'm acutely aware of the tremendously higher cost (in time) of preparing good graphics versus painting word pictures. But graphics are often distinctly superior in getting certain kinds of points across. So I'm curious if publishers currently provide artistic resources to their authors. I'm guessing they don't, judging from the conspicuous absence of a single diagram in the Camel or the Cookbook, but thought I'd ask anyway. -Tim ** | Tim Maher, CEO, CONSULTIX (206) 781-UNIX; (866) DOC-PERL; (866) DOC-LINUX | | Ph.D. JAWCAR (Just Another White Camel Award Recipient) | | [EMAIL PROTECTED] teachmeunix.com teachmeperl.com teachmelinux.net | *-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+* | Providing Intensive, Hands-on, Instructor-led Software Training since '86! | **
Re: Gyroscopic Mice; WORKING on Linux!
Perl Trainers: Here's a followup to my earlier request for advice on how to get this mouse working under Linux. Enjoy! -Tim Using a Gyration Cordless USB Mouse on Linux Tim Maher [EMAIL PROTECTED] Sat Nov 16 12:01:12 PST 2002 SUMMARY --- I've got the (USB) Gyration Ultra Cordless Optical Mouse from Gyration, Inc. working under SuSE 7.3 Linux, with XFree86 4.1.0, in full cooperation with the simultaneously active trackpoint (pointy-stick-thingy) keyboard mouse on my IBM ThinkPad 600e. As far as I can tell, nobody else has figured out how to make this work, so I'm eager to share my knowledge with other Linux users. The most important part of my ad-hoc solution was to add a line consisting only of keybdev to the /etc/hotplug/blacklist file, to prevent the device from being recognized as a keyboard rather than a mouse. (Obviously, those really having a USB keyboard will need to take another approach!) The second change was to modify the XF86Config file to have the appropriate (and very non-intuitive) entries to allow both mice to be used. I've attached my file, for your reference. DETAILS --- As a Linux user since 1992, I finally got fed up with feeling pangs of Mouse Envy every time I would see an iBook- or Windows- based conference presenter walk around the stage, casually wielding a gyroscopic mouse to advance PowerPoint slides or scroll through windows. So I decided to do something about it! So I bought the latest and greatest model, the (USB) Gyration Ultra Cordless Optical Mouse from Gyration, Inc. (love that name!) for about $77 bucks from cdw.com, with a 30-day money back guarantee. And then I spent all my spare time over the last few days trying to make it work on Linux! 8-{ The problem was not that Linux didn't recognize it at all, but rather that it was being incorrectly recognized, and bound to the *Keyboard Driver* rather than the USB mouse driver. As a result, it would respond to my wiggling it around by inserting garbage characters into the active Xterm, and logging unrecognized scan code messages into /var/log/messages. I started my quest by asking the Vendor if they had any bright ideas, and they didn't, but they asked me to share my solution with them if I could find one. Then I surfed the web for inspiration and posted messages to various Linux newsgroups asking for advice, and I learned about the rather essential, but immature, Linux hotplug system that handles USB devices (among others). But nobody was able to tell me how to reconfigure it to handle this mouse correctly. So next I studied /sbin/hotplug, /etc/hotplug,usb.agent, hotplug.functions, usb.distmap, usb.handmap, usb.handmap, and /etc/rc.config.d/hotplug.rc.config, along with all the shell-execution-trace listings of the scripts in that group when they were automatically invoked by plugging in the USB cable. And I became confident that I could eventually modify something in there somewhere to make the darn thing work correctly, but I was not looking forward to the challenge. Then I noticed the /etc/blacklist file, used by /etc/hotplug.functions, and wondered, What would happen if I just entered keybdev there, to refuse to let it bind to the keyboard driver? And suddenly it worked. I love it when that happens! So starting with the on-site Perl class I'm teaching next week, instead of being glued to my laptop during presentations, I'll be able to saunter around the room while advancing slides, while also being able to type on the laptop and use its on-board mouse when I'm in the vicinity -- all while using a Open Source operating system. I'm free! -Tim ** | Tim Maher, CEO, CONSULTIX (206) 781-UNIX; (866) DOC-PERL; (866) DOC-LINUX | | Ph.D. JAWCAR (Just Another White Camel Award Recipient) | | [EMAIL PROTECTED] teachmeunix.com teachmeperl.com teachmelinux.net | ** Relevant sections of XF86Config: Section InputDevice Identifier Keyboard[0] Driver keyboard Option Protocol Standard Option XkbKeyCodes xfree86 Option XkbLayout us Option XkbModel pc104 Option XkbRules xfree86 EndSection # This entry is for IBM TP 600e laptop's trackpoint mouse Section InputDevice Identifier Mouse[1] Driver mouse Option Device /dev/psaux Option Protocol ps/2 Option Emulate3Buttons off EndSection # This entry is for Gyration Ultra Cordless Optical Mouse (USB) Section InputDevice Identifier Mouse[2] Driver mouse Option Device /dev/input/mice Option Protocol IMPS/2 Option ZAxisMapping 4 5 EndSection Section ServerLayout Identifier Layout[all] InputDevice Mouse[1] CorePointer InputDevice Mouse[2] AlwaysCore InputDevice
Re: Gyroscopic Mice; work on Linux?
On Wed, Nov 06, 2002 at 07:18:59PM -0800, Colin Meyer wrote: On Tue, Nov 05, 2002 at 08:10:48PM -0800, Tim Maher wrote: Fellow teachers, Also, I wonder if anybody can say whether this device, which connects to the USB port and is reputed not to need special drivers for Windoze or MacOS, actually works on Linux. Something to consider is whether or not your USB port hardware itself is supported under Linux. I have no trouble using USB peripherals with my main desktop box, but I can't get Linux (SuSE 7.3) to recognize the USB on my laptop. Well, the kernel module loads, and the /proc/bus/usb pseudo file system mounts, but the same devices that work flawlessly on my desktop just don't work at all on the laptop. -Colin. I can plug in my LexarMedia CompactFlash USB card-reader, and make file systems on my memory cards, so I guess it's working okay! 8-} My new concern is that if I do get the USB cordless mouse working, I would still like to use the on-keyboard pointy-stick mouse as well, when I happen to be near my keyboard. That sounds kinda impossible, given that I'd have to set XF86Config to recognize one mouse (emulating PS2) or the other (USB), but not both simultaneously 8-( My teaching style is to show a few slides, and then type a bunch of examples in an Xterm, so ideally I'd like to be able to quickly switch from one mouse type to the other; but that might not be possible, perhaps. ** | Tim Maher, CEO, CONSULTIX (206) 781-UNIX; (866) DOC-PERL; (866) DOC-LINUX | | Ph.D. JAWCAR (Just Another White Camel Award Recipient) | | [EMAIL PROTECTED] teachmeunix.com teachmeperl.com teachmelinux.net | **
Re: Open Perl Exercises, anyone ?
Sometime back, Kirrily skud Roberts posted some Perl training materials on the web (for all to use, if memory serves). They were text-narrative style, rather than the projection oriented, big-font bullet-item style most trainers prefer, but they might be of use to some people. *==* | Tim Maher, CEO, CONSULTIX (206) 781-UNIX; (866) DOC-PERL; (866) DOC-LINUX | | [EMAIL PROTECTED] teachmeunix.com teachmeperl.com teachmelinux.net | |JULY 8-11: OO Perl Fundamentals; JULY 29-31: Database Prog. with Perl| *- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * | NEW Seminar Series! DAMIAN CONWAY's Adv. Perl Workshop; Seattle 7/15-19 | | Adv. OOP * Adv. Module Techniques * Programming Perl 6 * Text Parsing | *==* On Mon, Jun 24, 2002 at 03:29:35PM -0700, Peter Scott wrote: At 10:00 PM 6/24/02 +0100, Stephen Collyer wrote: One of the problems I had when writing a Perl training course was that of coming up with a decent set of exercises, particularly ones that are not too trivial or too difficult, and also ones that are not too boring. In view of this, I was wondering if anyone would be interested in contributing to an openly available set of exercises that any Perl trainer could have access to ? The idea would be to provide a set of graded exercises that are suitable for beginning/ intermediate/advanced/whatever Perl programmers, maybe with solutions, maybe not, that anyone involved in Perl training could use. I see the following advantages: 1. the quality of Perl training generally may improve, if trainers do not have to spend a large amount of time thinking up exercises. 2. It would set a standard against which a student could evaluate a course; if an intermediate course fails to cover material deemed to be itermediate by the exercise set, then maybe there's a problem. It is advantageous in the sense that exercises are the most difficult part of the course to come up with IMHO. This ought to improve their quality. OTOH, I see a big disadvantage: maybe noone would want to contribute their exercise ideas, as it would allow people to leech off their hard work in thinking them up; in short, maybe exercises represent too much investment in IPR to share. My POV is that the most important IPR in a training course resides in the quality of the course material, and the contents of the presenter's head, but maybe others will disagree. Presenter's head first, but I'd probably rate the exercises and course materials neck and neck. The biggest disadvantage I see is in the prerequisites. Particularly in the more elementary classes, an exercise solution is likely to include something that hasn't been taught by that stage of a particular presenter's class. It's not really practical to give an exercise and say, By the way, for this exercise you'll need to know the substr(), index(), and reverse() functions, none of which I considered important enough to have taught by this stage. And you won't get consensus from trainers about whether they should have taught the while () construct by the time they get to hashes, for example. With enough examples to choose from this is less of a problem. (and of course, there are other potential problems: who can contribute ? who decides the level of difficulty of a problem ? who hosts the set of problems ? etc) Anyone want to blow this idea out of the water ? Steve Collyer - Stephen Collyer Netspinner Ltd 01722 336125 -- Peter Scott Pacific Systems Design Technologies http://www.perldebugged.com/ -- *==* | Tim Maher, CEO, CONSULTIX (206) 781-UNIX; (866) DOC-PERL; (866) DOC-LINUX | | [EMAIL PROTECTED] teachmeunix.com teachmeperl.com teachmelinux.net | |JULY 8-11: OO Perl Fundamentals; JULY 29-31: Database Prog. with Perl| *- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * | NEW Seminar Series! DAMIAN CONWAY's Adv. Perl Workshop; Seattle 7/15-19 | | Adv. OOP * Adv. Module Techniques * Programming Perl 6 * Text Parsing | *==*