From andy at petdance.com Mon Dec 1 10:49:03 2003 From: andy at petdance.com (Andy Lester) Date: Mon Aug 2 21:27:55 2004 Subject: [Chicago-talk] Tech meeting tomorrow night Message-ID: <20031201164903.GA18772@petdance.com> Don't forget tomorrow night's Tech Meeting. Steven Lembark will be talking about the Perl debugger, and Ed or I will be bringing a big box of freebies to give away, including Spidering Hacks (THE BEST BOOK EVER WRITTEN![1]), Practical mod_perl, and more. See http://chicago.pm.org/meetings/ for more information. xoxo, Andy [1] Author not responsible for personal bias in accolades. -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance From ehs at pobox.com Mon Dec 1 16:37:57 2003 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:27:55 2004 Subject: [Chicago-talk] ride for brian d foy Message-ID: <20031201223756.GG5672@ink.inkdroid.org> Folks, brian d foy is back in town (from Iraq) and would like to know if anyone coming to tomorrow nights meeting from Chicago, who would be willing to pick him up in Evanston. Write to him at comdog@panix.com if you can help out. You'll be guaranteed an interesting commute conversation :) //Ed -- Ed Summers aim: inkdroid web: http://www.inkdroid.org I wish to God these calculations had been executed by steam! [Charles Babbage] From andy at petdance.com Mon Dec 1 16:40:19 2003 From: andy at petdance.com (Andy Lester) Date: Mon Aug 2 21:27:55 2004 Subject: [Chicago-talk] ride for brian d foy In-Reply-To: <20031201223756.GG5672@ink.inkdroid.org> References: <20031201223756.GG5672@ink.inkdroid.org> Message-ID: <20031201224019.GB30521@petdance.com> > Folks, brian d foy is back in town (from Iraq) and would like to know if > anyone coming to tomorrow nights meeting from Chicago, who would be > willing to pick him up in Evanston. You don't even have to get him back there. I'll take him back down to the city. xoa -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance From Andy_Bach at wiwb.uscourts.gov Mon Dec 1 16:48:51 2003 From: Andy_Bach at wiwb.uscourts.gov (Andy_Bach@wiwb.uscourts.gov) Date: Mon Aug 2 21:27:55 2004 Subject: [Chicago-talk] ride for brian d foy In-Reply-To: <20031201223756.GG5672@ink.inkdroid.org> Message-ID: Glad to hear <font>brian d</font> has made it back safe and sound - a humble thanks for your service. Of course, now I have to start, er, put the final polish on that komodo review - guess that'll push back the Cocoon review I'm also lagging on (hm, any others, Ed? ;-) ... Somebody buy him a beer, and I'll owe ya'. a Andy Bach, Sys. Mangler Internet: andy_bach@wiwb.uscourts.gov VOICE: (608) 261-5738 FAX 264-5030 We are REDACTED!!! From andy at petdance.com Mon Dec 1 16:50:29 2003 From: andy at petdance.com (Andy Lester) Date: Mon Aug 2 21:27:55 2004 Subject: [Chicago-talk] ride for brian d foy In-Reply-To: References: <20031201223756.GG5672@ink.inkdroid.org> Message-ID: <20031201225029.GC30521@petdance.com> > Glad to hear brian d has made it back safe and sound - > a humble thanks for your service. Well, he's goin' back, so it's not like TPR is gonna fire up next week. xao -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance From ehs at pobox.com Mon Dec 1 17:08:18 2003 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:27:55 2004 Subject: [Chicago-talk] ride for brian d foy In-Reply-To: References: <20031201223756.GG5672@ink.inkdroid.org> Message-ID: <20031201230817.GA7763@ink.inkdroid.org> On Mon, Dec 01, 2003 at 04:48:51PM -0600, Andy_Bach@wiwb.uscourts.gov wrote: > Of course, now I have to start, er, put the final polish on that komodo > review - guess that'll push back the Cocoon review I'm also lagging on > (hm, any others, Ed? ;-) ... you've got practical mod_perl as well ;-) > Somebody buy him a beer, and I'll owe ya'. Sounds like a good idea to me. Now we just need to get him to the meeting. //Ed From lembark at wrkhors.com Mon Dec 1 23:37:44 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:55 2004 Subject: [Chicago-talk] Tech meeting tomorrow night In-Reply-To: <20031201164903.GA18772@petdance.com> References: <20031201164903.GA18772@petdance.com> Message-ID: <1862082704.1070343464@[192.168.200.4]> > Steven Lembark will be > talking about the Perl debugger And if that doesn't give you night sweats, I can give anyone who needs it a lift from Walgreens -- Lake Cook and 294 -- to the Metting and to the city (Logan Square) afterwards. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From petemar1 at perlmonk.org Tue Dec 2 01:53:28 2003 From: petemar1 at perlmonk.org (petemar1) Date: Mon Aug 2 21:27:55 2004 Subject: [Chicago-talk] Tech meeting tomorrow night In-Reply-To: <20031201164903.GA18772@petdance.com> Message-ID: ...just bought my copy last night: kudos! -----Original Message----- From: chicago-talk-bounces@mail.pm.org [mailto:chicago-talk-bounces@mail.pm.org]On Behalf Of Andy Lester Sent: Monday, December 01, 2003 10:49 AM To: chicago-talk@mail.pm.org Subject: [Chicago-talk] Tech meeting tomorrow night Don't forget tomorrow night's Tech Meeting. Steven Lembark will be talking about the Perl debugger, and Ed or I will be bringing a big box of freebies to give away, including Spidering Hacks (THE BEST BOOK EVER WRITTEN![1]), Practical mod_perl, and more. See http://chicago.pm.org/meetings/ for more information. xoxo, Andy [1] Author not responsible for personal bias in accolades. -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance _______________________________________________ Chicago-talk mailing list Chicago-talk@mail.pm.org http://mail.pm.org/mailman/listinfo/chicago-talk From Andy_Bach at wiwb.uscourts.gov Tue Dec 2 10:34:08 2003 From: Andy_Bach at wiwb.uscourts.gov (Andy_Bach@wiwb.uscourts.gov) Date: Mon Aug 2 21:27:55 2004 Subject: [Chicago-talk] ride for brian d foy In-Reply-To: <20031201230817.GA7763@ink.inkdroid.org> Message-ID: >> (hm, any others, Ed? ;-) ... > you've got practical mod_perl as well ;-) Ah, yes, but Cocoon comes first, er, second. Lets not get hasty, here ... sheesh. DId I mention we've been really busy? Actually, to put some content in here - has anybody used Cocoon? The book (which, honestly, I have mostly read) glosses lightly on the install process but the one time I started on it, it devolved into a (seemingly typical, for java) session of "oh, you need this from IBM and that from apache and that from ..." about 6 levels deep and that's where I quit. CJAN would be nice, but a couple simple tarballs would work too. a Andy Bach, Sys. Mangler Internet: andy_bach@wiwb.uscourts.gov VOICE: (608) 261-5738 FAX 264-5030 We are REDACTED!!! From andy at petdance.com Tue Dec 2 10:39:30 2003 From: andy at petdance.com (Andy Lester) Date: Mon Aug 2 21:27:55 2004 Subject: [Chicago-talk] ride for brian d foy In-Reply-To: References: Message-ID: <19BC5F67-24E6-11D8-AE42-000393BFA5FA@petdance.com> On Dec 2, 2003, at 10:34 AM, Andy_Bach@wiwb.uscourts.gov wrote: >>> (hm, any others, Ed? ;-) ... > >> you've got practical mod_perl as well ;-) > > Ah, yes, but Cocoon comes first, er, second. Lets not get hasty, here > ... > sheesh. Personally, seein' as we're a Perl group, I'd let that trump any other order. Oh, I have the swag in the car. Wireless Hacks, the latest UserFriendly, it'll be a good day for freebies today. xoa -- Andy Lester andy@petdance.com, AIM:petdance http://petdance.com/ http://use.perl.org/~petdance/ From lembark at wrkhors.com Tue Dec 2 18:50:55 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:55 2004 Subject: [Chicago-talk] Dec Tech mtg... In-Reply-To: <95FB8A48-2019-11D8-B581-000393BFA5FA@petdance.com> References: <20031125221748.GB26760@petdance.com> <1377140000.1069824753@[192.168.200.4]> <95FB8A48-2019-11D8-B581-000393BFA5FA@petdance.com> Message-ID: <8000000.1070412655@[192.168.100.3]> Bedside reading :-) -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 -------------- next part -------------- +----------------------------------------------------------------------+ | | | Some Notes on Using the Perl Debugger | | | | or | | | | Confessions of a typist. | | | +----------------------------------------------------------------------+ (C) 2003 Steven Lembark, Workhorse Computing "Hi, my name is Steve and I'm ..." Well, I'll admit up front that the title of this might better have been "confessions of a programmer": not all of my bugs are typos. There are also times when I have to debug other people's code -- some of whom are are neither typists nor programmers. Be it theirs or mine, searching for logic buried in the code can be frustrating. This is especially true when the modules call modules that call modules and you cannot put print statements into all of them. Even when logic doesn't fail me, searching for syntax buried in Perl can be frustrating. This is especially true when looking for "cleaner" alternatives to apparently messy constructs or checking some of the more offball syntax used by the idiots who wrote this code last month, er, me? ah, yeah: great syntax... If premature optimization is the root of all evil, finding places where it matters is the root of many paychecks. Most of this comes down to finding out where the code spends most of its time, how much of is wasted or even under the program's control (e.g., I/O blocks vs. tight loops). Hunting for WHERE the code spends its time can be, Oh such joy -- if you really, really like warm Mtn. Dew or stale coffee... Fortunately for me, what I really am is: "... a Perl hacker." Which means I can use Perl to debug my code for me. Or at least help. If the ultimate goal of programming is lazyness and the ultimate lazy programmer lets the language do the work, then Perl's Debugger is the ultimate tool. At the touch of a command switch you can have command line and Tk-GUI debugging or a detailed profiler doing the work for you. What follows here is a short guide to lazyness for the impatient [which obvously requires some hubris to present]. ------------------------------------------------- Introductory Domination: Perl at the Command Line. ------------------------------------------------- Among the alphabet soup available for perl's switches is "-d". This puts perl into "debug" mode with the default debugger: DB.pm. If you grew up with GNU's "gdb" program the rest of this will be deja vu all over again; if not you can open your mind to a whole new source of frustration. Aside: One of the really nice things about Perl is its level of documentation. Using 'perldoc perldebug' on your system of choice will give you a nice, short summary of the debugger. Then again, so will turning to Page 147 of Perl in a Nutshell (2nd ed) or 506 of Camel III. In fact, as you start up the perl debugger it'll tell you where to get the docs: $ perl -d -e 42 Loading DB routines from perl5db.pl version 1.22 Editor support available. Enter h or `h h' for help, or `man perldebug' for more help. main::(-e:1): 42 DB<1> Because I started up perl without a program (unless there was a ./42 file nearby) I'm at the command line, with the return value of my program before me. This can be handy for checking out Perl syntax or whether modules are installed/functioning on your system. In this case the prompt shows me that I'm in the "main" package at program "-e" line 1. At this point I can check Perl syntax or test code just by entering it on the command line: DB<1> x localtime 0 8 1 19 2 13 3 2 4 11 5 103 6 2 7 335 8 0 DB<2> x getpwuid 0 0 'root' 1 'x' 2 0 3 0 4 '' 5 '' 6 'root' 7 '/root' 8 '/bin/bash' The 'x' command pretty prints a structure (vs. 'p' which is mainly for printing strings). In this case I the returns from "localtime" and "getpwuid 0" and displayed the resulting lists. The 'DB' prompt shows me that I'm in the debugger, the <1> or <2> shows me that I'm in the outer level of calls on the first and second debugger command, respectively. As I descend into the hell of code calls the <> will nest to show me the levels. This mode is good for testing Perl syntax, and can be useful for Q&D data munging where you want to fondle the data as it is being processed. The one thing to remember is that each step in the debugger is treated as being in its own block, so that lexical ("my") variables will not survive between commands: DB<3> my @a = ( 0..10 ) DB<4> x @a empty array DB<5> @a = (0..10) DB<6> x @a 0 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 DB<7> %b = @a DB<8> x %b 0 8 1 9 2 6 3 7 4 4 5 5 6 0 7 1 8 10 9 undef 10 2 11 3 DB<9> x \%b 0 HASH(0x8411c04) 0 => 1 10 => undef 2 => 3 4 => 5 6 => 7 8 => 9 Interesting thing to note: the display of referents (\%b at <9>) is a bit more readable than naked hashes (<8>). In most cases I prefer to read the stuff put out by referents. If you really care about how the output is handled, or want to use it for pretty printing your own output the Dumpvalue module is what the debugger uses for its output. After a while, however, you might get sick of just typing in commands and want to see something actually running. There are, of course, multiple ways to do it. One way is to simply add a "-d" switch to your #! code. This works if you want to run a program in the debugger, run from, say, a data directory, are are in no mood to type the full path to the perl program. Another way is to simply use "perl -d" and give a program name. #!/opt/bin/perl -d $ perl -d /path/to/foobar [arguments] [more arguments]; The one catch to using '-d' is that it has to be removed by hand before releasing the code. One giveaway that your code has a stray "-d" in it is that cron jobs leave huge logfiles (caused by the debugger going into trace mode if there is no controlling terminal). All of the examples here will use "perl -d" from the command line. As an example, what if you wanted to debug: #!/opt/bin/perl $\ = "\n"; $, = "\n\t"; print 'You are:', getpwuid $<; 0 __END__ And it prints out: You are: lembark x 1024 1024 /home/lembark /bin/bash Hmm... what are the blanks doing there? It might be helpful to know if they are empty strings, undefs, whatever... $ perl -d ./hak Loading DB routines from perl5db.pl version 1.22 Editor support available. Enter h or `h h' for help, or `man perldebug' for more help. main::(./hak:3): $\ = "\n"; OK so far: I'm in the "main" package, in source file 'hak' on line 3. At this point I'd like to walk through the program. The simplest way is to single step through the code. As always there are more than one way to do this. In most cases you'll use the 'n' command to step to the Next source line; for debugging into calls you can use the 's' command to Step Into subroutine calls along the way. For now it doesn't matter since there are no subroutines in the code, I'll use 'n': main::(./hak:3): $\ = "\n"; DB<1> n main::(./hak:4): $, = "\n\t"; DB<1> n main::(./hak:6): print 'You are:', getpwuid $<; DB<1> n You are: lembark x 1024 1024 /home/lembark /bin/bash main::(./hak:9): 0 Each time I typed in 'n' it got me one step further through the code. When you get sick of typing 'n', pressing enter repeats the last 'n' or 's' command: main::(./hak:3): $\ = "\n"; DB<1> n main::(./hak:4): $, = "\n\t"; DB<1> main::(./hak:6): print 'You are:', getpwuid $<; DB<1> You are: lembark x 1024 1024 /home/lembark /bin/bash main::(./hak:9): 0 DB<1> Debugged program terminated. Use q to quit or R to restart, use O inhibit_exit to avoid stopping after program termination, h q, h R or h O to get additional info. Just single stepping through doesn't do much good, however. The real fun is in being able to try things out on the way: main::(./hak:3): $\ = "\n"; DB<1> n main::(./hak:4): $, = "\n\t"; DB<1> main::(./hak:6): print 'You are:', getpwuid $<; DB<1> x getpwuid $<; 0 'lembark' 1 'x' 2 1024 3 1024 4 '' 5 '' 6 '' 7 '/home/lembark' 8 '/bin/bash' DB<2> n You are: lembark x 1024 1024 /home/lembark /bin/bash main::(./hak:9): 0 OK, the blank lines were caused by empty strings in the result of getpwuid. Viewing variables by package can also be handled using the X and V commands. Using either of these in the main package results in LOTS of output. Changing the code just a bit allows me to show the difference between 'n' and 's': #!/opt/bin/perl $\ = "\n"; $, = "\n\t"; sub userinfo { my $uid = @_ ? shift : $<; print "Checking: $uid"; getpwuid $uid; } print 'Clark Kent is:', userinfo 0; print 'You are:', userinfo; 0 OK, at this point there is a subroutine call: "userinfo". The 'n' command I've been using so far gives me a look at what happens from the top level: main::(./hak:3): $\ = "\n"; DB<1> n main::(./hak:4): $, = "\n\t"; DB<1> main::(./hak:15): print 'Clark Kent is:', userinfo 0; DB<1> Checking: 1024 Clark Kent is: lembark x 1024 1024 /home/lembark /bin/bash main::(./hak:16): print 'You are:', userinfo; DB<1> Checking: 1024 You are: lembark x 1024 1024 /home/lembark /bin/bash main::(./hak:19): 0 Nothing all that surprising, but notice that you didn't get to see what happend under the hood. In many cases (say calling Date::Manip::UnixDate) you just want to see the results. If you want to crawl around under the bed, however, use the 's' command instead: main::(./hak:3): $\ = "\n"; DB<1> n main::(./hak:4): $, = "\n\t"; DB<1> main::(./hak:15): print 'Clark Kent is:', userinfo 0; DB<1> s main::userinfo(./hak:8): my $uid = @_ ? shift : $<; DB<1> main::userinfo(./hak:10): print "Checking: $uid"; DB<1> Checking: 0 main::userinfo(./hak:12): getpwuid $uid; DB<1> x $uid 0 0 Notice the 's', this steps into the userinfo call rather than to the next source line. Also notice that 'n' and 's' can be mixed as necessary to step over or into calls. I can also look at the contents of lexicals within the current scope and check that, yes, the value 0 did get passed in and used with $uid. You can check the return values from subroutines (or escape from really long ones after an accidental 's') with the 'r' ("Return") command: main::(./hak:15): print 'Clark Kent is:', userinfo 0; DB<1> s main::userinfo(./hak:8): my $uid = @_ ? shift : $<; DB<1> x @_ 0 0 DB<2> r Checking: 0 list context return from main::userinfo: 0 'root' 1 'x' 2 0 3 0 4 '' 5 '' 6 'root' 7 '/root' 8 '/bin/bash' Clark Kent is: root x 0 0 root /root /bin/bash main::(./hak:16): print 'You are:', userinfo; The 'r' shows what came back from the call. This is really handy for tracking down bugs in multiple call levels: at some point you will get an unexpected return from a seemingly- sane set of arguments. The 'n', 's', and 'r' commands will suffice for most step-by step work. ----------------------------------- Domination at its best: Breakpoints ----------------------------------- On the other hand, you may not want to debug 5_000 lines of code in an Apache module that uses Date::Manip step-by-step. For these cases the 'c' and 'b' commands come into play, as does $DB::single. The 'l' command Lists source and is handy for spotting the line numbers at which to break, and 'R' is nice if you Go To Far. 'T' is helpful for finding out where you are. The 'c' command Continues execution, optionally with a one- time breakpoint at a subroutine or line. Typing 'c' at any point in the debugging session will simply run the program until it completes or hits a breakpoint. Using 'c' with a subroutine or line runs up to that point and stops: main::(./hak:3): $\ = "\n"; DB<1> c userinfo main::userinfo(./hak:8): my $uid = @_ ? shift : $<; Using 'c' is handy when you only want to break at the next call to a subroutine and don't want to set and delete a breakpoint. It can also be useful for skipping over a bunch of lines: DB<1> l userinfo 7 { 8: my $uid = @_ ? shift : $<; 9 10: print "Checking: $uid"; 11 12: getpwuid $uid; 13 } DB<2> c 10 main::userinfo(./hak:10): print "Checking: $uid"; Here I listed the userinfo sub to find where I wanted to break at then continued to line 10. Notice that the command history count actually went up for a change: the 'l' command can be recalled later on with the '!' (repeat) command: DB<3> !1 l userinfo 7 { 8: my $uid = @_ ? shift : $<; 9 10==> print "Checking: $uid"; 11 12: getpwuid $uid; 13 } A bit more DB nomenclature is useful here: the lines shown with ':' after their numbers are valid breakpoints; the '==>' is the current line of code (i.e., what will happen on the next 'n' or 's' command): DB<3> x $uid 0 0 DB<4> r Checking: 0 list context return from main::userinfo: 0 'root' 1 'x' 2 0 3 0 4 '' 5 '' 6 'root' 7 '/root' 8 '/bin/bash' Clark Kent is: root x 0 0 root /root /bin/bash The 'c' command is nice enough for running things once or twice, but after a while 'c 10' could get tiring. That's where breakpoints come in: letting your fingers stay Lazy. The breakpoint command has a few flavors: - b - b The first sets an uncontitional breakpoint. All this means is that the code will stop execution every time it gets to that line: DB<1> b 10 DB<2> c main::userinfo(./hak:10): print "Checking: $uid"; DB<2> c Checking: 0 Clark Kent is: root x 0 0 root /root /bin/bash main::userinfo(./hak:10): print "Checking: $uid"; DB<2> c Checking: 1024 You are: lembark x 1024 1024 /home/lembark /bin/bash Debugged program terminated. Use q to quit or R to restart, use O inhibit_exit to avoid stopping after program termination, h q, h R or h O to get additional info. If I only wanted to see non-SU lookups: DB<1> b 10 $uid != 0 DB<2> c Checking: 0 Clark Kent is: root x 0 0 root /root /bin/bash main::userinfo(./hak:10): print "Checking: $uid"; DB<2> x $uid 0 1024 The "b 10 $uid != 0" says to evaluate the expression "$uid != 0" in the local context at line 10 (i.e., $uid has to be in scope wherever line 10 leaves you) and then break if the expression is true. This prints SuperUser's info then breaks for mine. Conditional breakpoints are particularly useful for tracking down out-of-bounds errors (e.g., a program blows up on the 10_000'th input row because $age is less than zero). You can also set breakpoints at subroutine calls, which can be helpful for checking calls for bogus input: DB<3> b userinfo @_ == 0 DB<4> c Checking: 0 Clark Kent is: root x 0 0 root /root /bin/bash main::userinfo(./hak:8): my $uid = @_ ? shift : $<; The 'R' command Restarts the current program -- resetting @ARGV and a number of other useful things on the way. It is useful if you suddenly notice that you've stepped too far into the execution cycle and want to set a breakpoint or examine some data before it was changed in the current cycle. One of the more common occurrances during debugging is loosing track of where you are. The 'T' command shows a stack Trace from the current exeuction line: DB<1> b userinfo @_ == 0 DB<2> c Checking: 0 Clark Kent is: root x 0 0 root /root /bin/bash main::userinfo(./hak:8): my $uid = @_ ? shift : $<; DB<2> T @ = main::userinfo() called from file `./hak' line 16 This can be particularly handy if you have several breakpoints scattered around. There are also times that you'd like to have a breakpoint set programatically. One might be adding a '-d' switch to you own program to set breakpoints at obvious points for debugging: my @optionz = qw( debug+ ); my $cmdline = {}; GetOptions $cmdline, @optionz or die 'trying...'; my $debug = $cmdline->{debug}; ... $DB::single = 1 if $debug; frobnicate $_ while ; ... sub frobnicate { my $line = shift; $DB::single = 1 if $debug > 1; ... } The Perl debugger is written in Perl and lives in the DB package. Its global variables are in the symbol table just like any other package's and can be set by name. $DB::single is what the debugger uses to tell itself to stop at the next line. You can tell it to stop also. In this case if $debug is true the code stops before frobnicat is called, if it's greater than one then execution goes single-step for each of the lines being called. You can use tests based on the data values, command line, error status: eval { }; # trace error handling only. $DB::trace = 1 if $@; The trace variable, as you probably guessed, turns on execution tracing, which is what the 't' command toggles trace mode. The one other thing you probably want to do occasionally is remove the breaks. This is done with the 'd' command (for a particular line or subroutine) or 'D' to delete all breakpoints. Using 'd' with no line on it deletes the current line's breakpoint. ---------------------------------------------- Perly Submission: Making Perl Do Your Commands ---------------------------------------------- Even if breakpoints let your fingers be lazy on the 's', they don't save you from having to type 'x' to examine things. One classic example of this is having to type 'x $object' every line watching an initializer set up data structures. But, this is Perl, so even that can be lazy. The '{' command tells the debugger to run a debugger command before every prompt: DB<1> b userinfo ! @_ DB<2> { x $uid DB<3> c Checking: 0 Clark Kent is: root x 0 0 root /root /bin/bash main::userinfo(./hak:8): my $uid = @_ ? shift : $<; auto(-1) DB<3> x $uid 0 undef DB<4> n main::userinfo(./hak:10): print "Checking: $uid"; auto(-1) DB<4> x $uid 0 1024 DB<5> Checking: 1024 main::userinfo(./hak:12): getpwuid $uid; auto(-1) DB<5> x $uid 0 1024 While obviously overkill for something this simple, it can be a big help if you are watching a structure change over 100 lines of code. See also '<', '<<', and '<<' for manaing the commands. The 'a' command sets an Action to be performed a line is executed. This is Perl code (such as a print statement) that gets run every time a line is passed. Aside from printing you could also increment a counter or push bogus values onto a stack for later checking in the debugger. The 'A' command deletes all installed actions. ------------------------------------- Lazy Domination: Automated Submission ------------------------------------- The Perl Debugger has a number of options that control how it runs the code and edits commands. Some of these are controlled via Term::ReadLine and ~/.inputrc, others the 'O' command that sets Options. You can also use .perldb or $ENV{PERLDB_OPTS} set things for you. Either way, DB will be obliging. Since I use an obviously superior editor, it seems a waste to learn a whole new set of movement keys to edit commands in the debugger -- or fumble around for arrow keys. If my ~/.inputrc has the proper commands I can avoid keystroke mismanagement: set editing-mode vi set show-all-if-ambiguous on This allows natrual movement commands to navigate the debugger history, correct typos, or manage repetative edits within the debugger. I could also use a local .perldb file to automate setting breakpoints or control variable output. The .perldb file can also set up aliases for more common commands -- or ones you repeat often when dealing with particular source code. The Nutcase book has a short section "Customizing the Debugger" on pp. 156-7 with some usable examples. ------------------------------ Tying Up A Mouse: Devel::ptkdb ------------------------------ Installing this module and running your code through: perl -d:ptkdb hak; will bring up an X11 window with a nice, usable GUI debugger. This basicall uses Tk to feed commands directly into DB: co-opting the built in DB command line handler. ptkdb supports breakpoints, watchpoints, one-time expressions. The breakpoints can be set by clicking on the line numbers, and a few buttons on the page allow step and next exeuction by line. Another alternative debugger is Devel::DProf, called via perl -d:DProf hak; This profiles your code by subroutine call/function point into a datafile that is post-processed by 'dprofpp' into all sorts of wonderful statistics. From jthomasoniii at yahoo.com Wed Dec 3 07:19:05 2003 From: jthomasoniii at yahoo.com (Jim Thomason) Date: Mon Aug 2 21:27:55 2004 Subject: [Chicago-talk] The "other" closure Message-ID: <20031203131905.51427.qmail@web60201.mail.yahoo.com> So things were busy last night and I was on the other side of the room and didn't want to jump up and sprint across and chime in. Anyway, people were asking about closures, and Steve was explaining things. And it seemed like a few folks were glazing over, as they always tend to. "Wait, so it's an anonymous subroutine that has variables that don't exist? Isn't that an error?" (No, no one asked that, it's an example). Happens all the time - in person, on the internet, etc. It's just one of those things that can take a few instances to click. That said, there's another type of closure that (I think) is easier to understand. Some people are sticklers and say they're not real closures because they don't have anonymous subroutines, but I cheerfully ignore them. In my opinion, the important bit about a closure is the fact that it refers to a lexical that can't be accessed from anywhere except for within the subroutine. (and, for those new to the terminology, a "lexical" variable is a "my" variable) So, with only using that requirement, this is a closure: { my $static = 0; sub foo { print STDERR "I've been called ", ++$static, " times\n"; #...do interesting things } } Voila! A closure. $static only exists inside foo(), you cannot touch it in any way outside of there. Now, while this example is a little silly, it immediately shows you about two important things. 1) This is how you can add static variables to a function. $static here keeps its value from one invocation to the next, is only visible in the function, and is very useful to you. 2) You can have bulletproof encapsulation of data. Personally, I love using this for class methods when I'm building classes (well, auto-generate that code instead of re-typing it constantly, but you get the idea). I'm a real stickler for using the accessors/mutators for everything, and this is an easy way to utterly prevent someone from directly accessing a package variable that you're using as a class variable. If they want to use it, they *have* to go through your accessor. No #define private public nonsense here! Next time you hear someone griping about perl's OO, point out that perl can encapsulate data more solidly than just about anything else. You can also use similar approaches to go completely bananas and lock up your entire internal object structure. This is usually more trouble than it's worth, though. Anyway, I use this type of closure far more frequently than the other, more accepted kind. If you're a stickler for exact definitions, just take a reference to foo and call that instead. my $bar = \&foo; Then $bar is a closure in every sense of the word. It rarely comes to that for me. It works the way Steve explained last night. During compilation, perl enters the block, spots the lexical, and continues. It enters the subroutine and notes that it refers to the lexical, leaves the subroutine, and then leaves the block. Once outside the enclosing block, the knowledge of the lexical vanishes, but the subroutine still knows about it. You can do the exact same thing as the example above with a goto, but in an effort to avoid things being thrown at me, I shan't elaborate. Further, this can also work as a cautionary example of why using globals and side effects can be a bad thing. If you get rid of that enclosing block, you'd have: my $static = 0; sub foo { print STDERR "I've been called ", ++$static, " times\n"; #...do interesting things } which is definitely not a closure. Other things can refer to $static and manipulate it and alter your value, which would screw up your "I've been called..." output. By stuffing it inside a block (closure!) you save yourself the headache of worrying about side effects or other people messing with your variable. Only you get to touch it. Just concentrating on "it's a function that sees otherwise out-of-scope lexicals" let's you worry about what it does (such as that foo() example up above) instead of worrying about taking function references or building lookup tables or whatnot (which you can worry about later once you're comfortable with the simpler form listed here). It's quite a useful tool to be able to pull out of your bag of tricks. And no, Andy, this is all I care to go into on closures, I ain't giving a talk on it. :*) -Jim..... __________________________________ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/ From briank at kappacs.com Wed Dec 3 09:56:42 2003 From: briank at kappacs.com (Brian Katzung) Date: Mon Aug 2 21:27:55 2004 Subject: [Chicago-talk] Job op: Head of Windows/UNIX tech sup, downtown Chicago Message-ID: <3FCE07BA.6080306@kappacs.com> One of my clients is looking for someone who can provide in-house and client Windows and UNIX tech support, research products, and help establish and maintain best practices. This client is an enterprise resource planning solution reseller. The position is head of the networking support division within the company, providing networking services and support to the company's ERP client base. This is a full-time position at my client as an employee, preferably, of my client. You can reach me by email at briank@kappacs.com or by phone at 877.367.8837 x1. - Brian Katzung From me at heyjay.com Wed Dec 3 10:28:30 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:55 2004 Subject: [Chicago-talk] dies_ok dies Message-ID: <000901c3b9ba$7e737fa0$6405a8c0@a30> Hi, I'm doing: dies_ok {$tws->connect(undef,10000,1)} 'expect to die'; which calls a bit of code that in fact dies (i.e. it does an: .... or die "Error: 502..."). But the dies_ok doesn't trap it. Instead when I run the test I get: [o901]:~/tradestudy/lib/perl/IB/TWS> ./01.t ok 1 - use IB::TWS; ok 2 - The object isa IB::TWS Error: 502, Couldn't connect to TWS. Confirm that "Enable ActiveX and Socket Clients" is enabled on the "Settings" menu. 1..2 # Looks like your test died just after 2. Maybe I misunderstand what dies_ok is supposed to do? Jay From lembark at wrkhors.com Wed Dec 3 12:07:03 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:55 2004 Subject: [Chicago-talk] The "other" closure In-Reply-To: <20031203131905.51427.qmail@web60201.mail.yahoo.com> References: <20031203131905.51427.qmail@web60201.mail.yahoo.com> Message-ID: <1476060000.1070474823@[192.168.100.3]> -- Jim Thomason > { > my $static = 0; > sub foo { > print STDERR "I've been called ", ++$static, " > times\n"; > #...do interesting things > } > } > > Voila! A closure. This is a really nice example of a private static variable, but it is not a closure. The difference is that all invocations of the foo sub here will share the same value of $static. Another example: sub return_incrementor { my $value = shift; # lexical value sub { ++$value } } my $from_zero = return_incrementor 0; my $from_nine = return_incrementor 9; for( 1.. 10 ) { print "From zero: " . $from_zero->(); print "From nine: " . $from_nine->(); } The important thing to notice is that the "return_incrementor" subroutine will create a new, unique lexical value of $value each time it is called. This means that the $from_zero and $from_nine incrementor sub's will get their own private values. Nothing about the $value returned with the first call of return_incrementor has antyhing to do with the value used in the second call. That's what makes them a closure: the storage used in the anonmous subroutine is private to the specific instance; creating multilpe anonymous subroutines gives each of them their own storage. You can create multiple closures that share the same data (e.g., one to increment another to decrement the same value). They are still closures because each SET of subroutines gets its own private copy of the data -- creating ten sets of closures will give you ten separate, distinct, unrelated pieces of storage shared among the set of closures. Closures work (grab a drink for this one) becuase Perl uses reference counting for its variable maintinence. If you look at the return_incrementor sub: { <-- lifespan of the name "$value" is defined by the enclosing braces. my $value = shift; <-- new $value has a ref count of one. sub { ++$value } <-- used $value has a ref count of two. } <-- scope reduces $value to ref count of one. The trick to closures is that $value is kept alive by the anonymous subroutine's use of it. The name "value" goes out of scope but the storage associated with it is still available to the anonymous subroutine. The name "$value" is associated with a NEW piece of storage each time the return_incrementor subroutine is called. The new storage begins life with a reference count of one but can be kept alive when the name goes out of scope by being used in another structure (subroutine in this case). Note that if the variables $from_zero or $from_nine ever go out of scope the anonymous subroutines will be destroyed and the reference count of the separate storage for their respective $value will go to zero. At that point the $value storage will be reclaimed. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From jthomasoniii at yahoo.com Wed Dec 3 12:46:14 2003 From: jthomasoniii at yahoo.com (Jim Thomason) Date: Mon Aug 2 21:27:55 2004 Subject: [Chicago-talk] The "other" closure In-Reply-To: <1476060000.1070474823@[192.168.100.3]> Message-ID: <20031203184614.69916.qmail@web60205.mail.yahoo.com> > This is a really nice example of a private static > variable, but it is not a closure. The difference > is that all invocations of the foo sub here will > share the same value of $static. All invocations of an anonymous subroutine that refers to an out-of-scope lexical will share the same lexical values as well. :) Remember - a subroutine generator does just that. It generates subroutines. So you get back lots of different subroutines with lots of different lexicals hidden within them. The only difference here is that I'm only creating one closure instead of (potentially) a whole bunch of them. If you're only creating one of them, then I fail to see the reason to do: sub foo_maker { my $static = 0; return sub foo { #do something interesting with $static; }; }; my $foo = foo_maker(); $foo->(); instead of: { my $static = 0; sub foo { #do something interesting with $static; } }; foo(); Sure, you need a subroutine generator if you want multiple functions referring to different lexicals, but there's no number limit on closures. If you only use one of them, it's still a closure. If you're only using one, you might as well just declare the function instead of going through the function generation routines. > That's what makes them a closure: the storage used > in the > anonmous subroutine is private to the specific > instance; > creating multilpe anonymous subroutines gives each > of them > their own storage. Absolutely. :) That's what I said..."the important bit about a closure is the fact that it refers to a lexical that can't be accessed from anywhere except for within the subroutine. " The fact that it's an anonymous subroutine is beside the point. The fact that it's the only thing that can see a particular lexical -is- the important part. Function generation is a side point. And I still say that it's more important to focus on the Important Piece (functions that see otherwise invisible lexicals) and then worry later about ways to use it (such as creating anonymous functions or generating lists of functions or whatever). The former is the tool (the closure), the latter is an example of a way to use it. -Jim...... __________________________________ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/ From merlyn at stonehenge.com Wed Dec 3 13:04:01 2003 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: Mon Aug 2 21:27:55 2004 Subject: [Chicago-talk] The "other" closure In-Reply-To: <20031203131905.51427.qmail@web60201.mail.yahoo.com> References: <20031203131905.51427.qmail@web60201.mail.yahoo.com> Message-ID: <868ylt206e.fsf@blue.stonehenge.com> >>>>> "Jim" == Jim Thomason writes: Jim> So, with only using that requirement, this is a Jim> closure: Jim> { Jim> my $static = 0; Jim> sub foo { Jim> print STDERR "I've been called ", ++$static, " Jim> times\n"; Jim> #...do interesting things Jim> } Jim> } I always make sure such a block is a BEGIN block, so that (a) it doesn't matter where I put it in my program - the initialization has happened, and (b) it doesn't matter if I reexecute that code. In fact, if you reexecute *that* code, you'll find a "won't stay shared" error, I bet. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! From merlyn at stonehenge.com Wed Dec 3 13:05:11 2003 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: Mon Aug 2 21:27:55 2004 Subject: [Chicago-talk] The "other" closure In-Reply-To: <1476060000.1070474823@[192.168.100.3]> References: <20031203131905.51427.qmail@web60201.mail.yahoo.com> <1476060000.1070474823@[192.168.100.3]> Message-ID: <864qwh204g.fsf@blue.stonehenge.com> >>>>> "Steven" == Steven Lembark writes: >> Voila! A closure. Steven> This is a really nice example of a private static Steven> variable, but it is not a closure. Wrong. It's a closure. It's a coderef that latches on to its lexical referents, even when they go out of scope. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! From lembark at wrkhors.com Wed Dec 3 13:27:55 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:55 2004 Subject: [Chicago-talk] O'Reilly Perl Debugger pocket reference out soon Message-ID: <1510430000.1070479675@[192.168.100.3]> -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From Dooley.Michael at con-way.com Wed Dec 3 13:36:22 2003 From: Dooley.Michael at con-way.com (Dooley, Michael) Date: Mon Aug 2 21:27:55 2004 Subject: [Chicago-talk] specifying 2 variables as 1 hash key Message-ID: my $var3="$var1$var2"; print "$hash{$var3}"; #this works. ------------------- print "$hash{$var1$var2}"; #this does not work. I kind of need to use 2 variable in the has and would rather not create a 3rd variable to use as the hash Key. am I just not labeling the key properly? From Andy_Bach at wiwb.uscourts.gov Wed Dec 3 13:44:53 2003 From: Andy_Bach at wiwb.uscourts.gov (Andy_Bach@wiwb.uscourts.gov) Date: Mon Aug 2 21:27:55 2004 Subject: [Chicago-talk] specifying 2 variables as 1 hash key In-Reply-To: Message-ID: Yes. you're smushing them together, you probably want: print $hash{$var1 . $var2}, "\n"; Which'll do proper string concats. Usually this is a sign of an under-thought data structure: $hash{$var1}->{$var2} = .... perhaps ... a Andy Bach, Sys. Mangler Internet: andy_bach@wiwb.uscourts.gov VOICE: (608) 261-5738 FAX 264-5030 We are REDACTED!!! From jthomasoniii at yahoo.com Wed Dec 3 13:47:13 2003 From: jthomasoniii at yahoo.com (Jim Thomason) Date: Mon Aug 2 21:27:55 2004 Subject: [Chicago-talk] specifying 2 variables as 1 hash key In-Reply-To: Message-ID: <20031203194713.86700.qmail@web60207.mail.yahoo.com> I'd say to consider using a nested hash instead, if possible. $hash{$var1}->{$var2} I think it's a bit cleaner. But that's not always necessarily an option. Regardless, it has to do with the parsing precedence. Easiest way to fix it is to take it out of double quotes. print $hash{$var1 . $var2}; And, i just discovered, oddly enough you don't even need to do that. print "$hash{$var1 . $var2}"; also works. In fact, you seem to be able to stick any executable code inside the hash key inside double quotes. For example, sub foo () { return join('', @_); }; print "$hash{foo($var1, $var2)}"; Neat. I just learned a new trick. :) -Jim.... --- "Dooley, Michael" wrote: > my $var3="$var1$var2"; > print "$hash{$var3}"; #this works. > > ------------------- > > print "$hash{$var1$var2}"; #this does not work. > > I kind of need to use 2 variable in the has and > would rather not create a > 3rd variable to use as the hash Key. am I just not > labeling the key > properly? > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk __________________________________ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/ From andy at petdance.com Wed Dec 3 14:01:17 2003 From: andy at petdance.com (Andy Lester) Date: Mon Aug 2 21:27:55 2004 Subject: [Chicago-talk] specifying 2 variables as 1 hash key In-Reply-To: References: Message-ID: <20031203200117.GC8612@petdance.com> > print "$hash{$var1$var2}"; #this does not work. > > I kind of need to use 2 variable in the has and would rather not create a > 3rd variable to use as the hash Key. am I just not labeling the key > properly? Why are you quoting $hash{$var1$var2} at all? xoa -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance From Dooley.Michael at con-way.com Wed Dec 3 14:06:15 2003 From: Dooley.Michael at con-way.com (Dooley, Michael) Date: Mon Aug 2 21:27:55 2004 Subject: [Chicago-talk] specifying 2 variables as 1 hash key Message-ID: thanks for the suggestions: 1) please forgive my sloppiness I am trying to learn as I go (using practical examples) so my technique is poor. but this is what I have for my script so far. 2) if you have any suggestions it would be much appreciated provided they are not way over my head. this is a super ruff draft. just getting one section to work at a time then stringing them together as I go. [qgatu003]/export/home/mxdooley/mbi_script$cat dfh Qdfh1txt="dfh file 1" Qdfh2txt="dfh file 2" Qdfh3txt="dfh file 3" [qgatu003]/export/home/mxdooley/mbi_script$ls files/ Qdfh1.txt.000 Qdfh2.txt.000 --- PERL CODE --- #! /usr/bin/perl -w # Purpose: #1) to get a complete file list of inbound EDI Files #2) Find correct DFH #3) submit DFH+FILE to application #4) archive file for backup use strict; open (DFH_FILE, "./dfh") or die "Can not read file ($!)"; my ($dfhtype,$dfh,%dfhhash); foreach () { chomp; ($dfhtype, $dfh) = split(/=/, $_); $dfhhash{$dfhtype}=$dfh; } my (@files); @files=glob("/export/home/mxdooley/mbi_script/files/*"); my ($file); foreach $file (@files) { open (EDI_FILE, "$file") or die "Can not read file ($!)"; open (ES_CLIENT, "|/usr/synthium/sun4.Solaris/bin/es_client -o testing -t mail"); my ($client_code,$filetype); $file=~s#.*/##; ($client_code, $filetype) = split(/\./, $file); print ES_CLIENT $dfhhash{$client_code . $filetype},"\n"; while () { chomp; print ES_CLIENT "$_\n"; } close ES_CLIENT; close EDI_FILE; } --- EOF --- From gdf at speakeasy.net Wed Dec 3 14:38:31 2003 From: gdf at speakeasy.net (Greg Fast) Date: Mon Aug 2 21:27:55 2004 Subject: [Chicago-talk] debugger: watch expressions Message-ID: <200312032038.hB3KcX827903@mail.pm.org> I just noticed that the 5.8.0 debugger does have a command to set watch variables: 'w'. DB<1> l 4==> my $x = 0; 5: foreach my $n (0..1000) { 6: $x += $n if $n>500; 7 } 8 DB<1> n main::(xxx.pl:5): foreach my $n (0..1000) { DB<1> w $x DB<2> c Watchpoint 0: $x changed: old value: '0' new value: '501' main::(xxx.pl:5): foreach my $n (0..1000) { DB<2> The perldebug manpage describes 'w' this way: w expr Add a global watch-expression. We hope you know what one of these is, because they're supposed to be obvious. (which is annoying, since that's exactly what I wasn't sure I knew). I Enjoyed the presentation last night, and learned a few new tricks (a bunch of new db commands seem to have appeared with 5.8). So thanks, Steven. -- Greg Fast http://cken.chi.groogroo.com/~gdf/ From ehs at pobox.com Wed Dec 3 15:52:03 2003 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:27:55 2004 Subject: [Chicago-talk] members page Message-ID: <20031203215203.GA2900@chloe.inkdroid.org> It was great to see all the new people at the meeting last night. Andy had a good idea of updating the members page [1] to include any CPAN modules, or other projects (Sourceforge,etc) that you may be involved in. I know that some names are just not listed. If you don't see your name please email me your name and optionally your workplace, projects and/or interests. Steven's talk on the debugger is now up the website. If you couldn't make it last night a vote determined that Andy Lester will be talking in January about building CPAN distributions. Details to follow. More good news is that Jonathan (aka hachi) confirmed in #perl [2,3] that he will be able to talk about POE [4] in Feb, 2004. //Ed [1] http://chicago.pm.org/members.html [2] #perl on irc.perl.org [3] http://pound.perl.org/ [4] http://poe.perl.org From me at heyjay.com Wed Dec 3 16:14:28 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:55 2004 Subject: [Chicago-talk] members page References: <20031203215203.GA2900@chloe.inkdroid.org> Message-ID: <002b01c3b9ea$d275b0c0$6405a8c0@a30> I'm I pushed till March? ----- Original Message ----- From: "Ed Summers" To: Sent: Wednesday, December 03, 2003 3:52 PM Subject: [Chicago-talk] members page > It was great to see all the new people at the meeting last night. Andy > had a good idea of updating the members page [1] to include any CPAN > modules, or other projects (Sourceforge,etc) that you may be involved in. > > I know that some names are just not listed. If you don't see your name please > email me your name and optionally your workplace, projects and/or interests. > > Steven's talk on the debugger is now up the website. If you couldn't make > it last night a vote determined that Andy Lester will be talking in January > about building CPAN distributions. Details to follow. > > More good news is that Jonathan (aka hachi) confirmed in #perl [2,3] that he > will be able to talk about POE [4] in Feb, 2004. > > //Ed > > [1] http://chicago.pm.org/members.html > [2] #perl on irc.perl.org > [3] http://pound.perl.org/ > [4] http://poe.perl.org > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > From ehs at pobox.com Wed Dec 3 16:42:12 2003 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:27:55 2004 Subject: [Chicago-talk] members page In-Reply-To: <002b01c3b9ea$d275b0c0$6405a8c0@a30> References: <20031203215203.GA2900@chloe.inkdroid.org> <002b01c3b9ea$d275b0c0$6405a8c0@a30> Message-ID: <20031203224212.GB2900@chloe.inkdroid.org> On Wed, Dec 03, 2003 at 04:14:28PM -0600, Jay Strauss wrote: > I'm I pushed till March? Yes, assuming you are able to present Class::DBI in March. There was alot of interest in hearing about POE, so it kind of won out. //Ed From pbaker at where2getit.com Wed Dec 3 16:55:23 2003 From: pbaker at where2getit.com (Paul Baker) Date: Mon Aug 2 21:27:55 2004 Subject: [Chicago-talk] specifying 2 variables as 1 hash key In-Reply-To: References: Message-ID: On Dec 3, 2003, at 1:36 PM, Dooley, Michael wrote: > print "$hash{$var1$var2}"; #this does not work. That's because you want this: print $hash{"$var1$var2"}; -- Paul Baker "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -- Benjamin Franklin, 1759 From me at heyjay.com Wed Dec 3 17:11:52 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:55 2004 Subject: [Chicago-talk] members page References: <20031203215203.GA2900@chloe.inkdroid.org><002b01c3b9ea$d275b0c0$6405a8c0@a30> <20031203224212.GB2900@chloe.inkdroid.org> Message-ID: <003301c3b9f2$da6ebb20$6405a8c0@a30> Ok ----- Original Message ----- From: "Ed Summers" To: "Chicago.pm chatter" Sent: Wednesday, December 03, 2003 4:42 PM Subject: Re: [Chicago-talk] members page > On Wed, Dec 03, 2003 at 04:14:28PM -0600, Jay Strauss wrote: > > I'm I pushed till March? > > Yes, assuming you are able to present Class::DBI in March. There was alot of > interest in hearing about POE, so it kind of won out. > > //Ed > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > From lembark at wrkhors.com Wed Dec 3 17:57:18 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] specifying 2 variables as 1 hash key In-Reply-To: References: Message-ID: <3183492704.1070495837@[192.168.200.4]> -- "Dooley, Michael" > my $var3="$var1$var2"; > print "$hash{$var3}"; #this works. $hash{$subkey1,$subkey2} = $value also works (see camel on composite keys). -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From lembark at wrkhors.com Wed Dec 3 17:59:19 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] specifying 2 variables as 1 hash key In-Reply-To: References: Message-ID: <3186082704.1070495959@[192.168.200.4]> -- Paul Baker > > On Dec 3, 2003, at 1:36 PM, Dooley, Michael wrote: > >> print "$hash{$var1$var2}"; #this does not work. > > That's because you want this: > > print $hash{"$var1$var2"}; the camel has a good description of hash keys. You probably just want a composite key: $key1,$key2 (i.e., separated with a comma, as on a list). These is already handling for this built into the language from before referents (necessary for nested hashes). -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From me at heyjay.com Wed Dec 3 23:24:19 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] Talking to yourself or Java API revisited Message-ID: <000701c3ba26$e02a7bb0$6405a8c0@a30> This is a bit convoluted (but its not my design, I just rebuilt the vendors Java in Perl) I build this class with a bunch of method like: tickPrice tickSize orderStatus... call this class API Then I build this class called TWS who connects (via sockets) to a stock trading system, this TWS class has a bunch of methods like: connect disconnect reqMktData placeOrder cancelOrder... now in my script I do: my $api = API->new; my $tws = TWS->new($api); # notice I passed in the API $tws->connect; # at this point TWS forks and the child process sits in a while(1) and reads the socket, and calls the methods # in the API as messages come down the wire from the stock system # the other process (parent), does: my $contract = Contract->new; $tws->reqMktData($contract); # at which point tick data start pouring in from the stock server, and the API methods are called and everything is fine I originally thought, I'll just stick the tick data as it comes into my database and my other process will just read the database. But on retrospect, I'm stupid. I don't want all that database activity. So, my question is: What options do I have of getting the API code to push data to parent script? My initial thoughts are to turn my script into a POE server. Then stick some code into API to talk to the POE server or is there a simplier way to get at the child's data? Thanks Jay From lembark at wrkhors.com Wed Dec 3 23:39:31 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] Talking to yourself or Java API revisited In-Reply-To: <000701c3ba26$e02a7bb0$6405a8c0@a30> References: <000701c3ba26$e02a7bb0$6405a8c0@a30> Message-ID: <3457272704.1070516371@[192.168.200.4]> > So, my question is: > What options do I have of getting the API code to push data to parent > script? $ perldoc perlipc; My initial suggestion would be a socket because you can make most of it look like file handle operations. Lincon's Network Programming With Perl has several good examples of doing just what you are describing. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From jt at plainblack.com Thu Dec 4 00:04:17 2003 From: jt at plainblack.com (JT Smith) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] Internationalization / Localization Message-ID: What do you guys recommend for internationalization? I wrote my own for WebGUI, but I'm in the process of doing some major enhancements to it, and I was thinking it might be a good idea to swap it out with something more standard. Of the modules I looked at on CPAN Locale::Maketext looks the best so far, but I thought I'd get some input from all of you. JT ~ Plain Black Create like a god, command like a king, work like a slave. From me at heyjay.com Thu Dec 4 09:10:19 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] ->can and AUTOLOAD Message-ID: <000701c3ba7a$4d22d250$6405a8c0@a30> If I use AUTOLOAD in a class, and then do ->can on that class, it comes back not found. I thought AUTOLOAD would catch all and I could do ->can on any method and AUTOLOAD would pick it up Thanks Jay From hachi at kuiki.net Thu Dec 4 09:23:45 2003 From: hachi at kuiki.net (Jonathan Steinert) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] ->can and AUTOLOAD In-Reply-To: <000701c3ba7a$4d22d250$6405a8c0@a30> References: <000701c3ba7a$4d22d250$6405a8c0@a30> Message-ID: <3FCF5181.5040000@kuiki.net> Jay Strauss wrote: > If I use AUTOLOAD in a class, and then do ->can on that class, it comes back > not found. I thought AUTOLOAD would catch all and I could do ->can on any > method and AUTOLOAD would pick it up > > Thanks > Jay > I don't use AUTOLOAD much, but if that's the case I would just do a $foo->can('whatever') || $foo->can('AUTOLOAD') to get around it. From andy at petdance.com Thu Dec 4 09:26:36 2003 From: andy at petdance.com (Andy Lester) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] ->can and AUTOLOAD In-Reply-To: <000701c3ba7a$4d22d250$6405a8c0@a30> References: <000701c3ba7a$4d22d250$6405a8c0@a30> Message-ID: <20031204152636.GA11764@petdance.com> > If I use AUTOLOAD in a class, and then do ->can on that class, it comes back > not found. I thought AUTOLOAD would catch all and I could do ->can on any > method and AUTOLOAD would pick it up Are you giving a lesson, or complaining, or....? -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance From me at heyjay.com Thu Dec 4 10:03:06 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] ->can and AUTOLOAD References: <000701c3ba7a$4d22d250$6405a8c0@a30> <20031204152636.GA11764@petdance.com> Message-ID: <002301c3ba80$1e0fad70$6405a8c0@a30> Asking. But it doesn't matter, I'm just calling the method, and checking in my AUTOLOAD sub to see if this method is allowable ----- Original Message ----- From: "Andy Lester" To: "Chicago.pm chatter" Sent: Thursday, December 04, 2003 9:26 AM Subject: Re: [Chicago-talk] ->can and AUTOLOAD > > If I use AUTOLOAD in a class, and then do ->can on that class, it comes back > > not found. I thought AUTOLOAD would catch all and I could do ->can on any > > method and AUTOLOAD would pick it up > > Are you giving a lesson, or complaining, or....? > > -- > Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > From ehs at pobox.com Thu Dec 4 10:17:07 2003 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] ->can and AUTOLOAD In-Reply-To: <002301c3ba80$1e0fad70$6405a8c0@a30> References: <000701c3ba7a$4d22d250$6405a8c0@a30> <20031204152636.GA11764@petdance.com> <002301c3ba80$1e0fad70$6405a8c0@a30> Message-ID: <20031204161707.GA30665@chloe.inkdroid.org> On Thu, Dec 04, 2003 at 10:03:06AM -0600, Jay Strauss wrote: > Asking. But it doesn't matter, I'm just calling the method, and checking > in my AUTOLOAD sub to see if this method is allowable can() is found in UNIVERSAL.pm. Let's see the code :) //Ed From me at heyjay.com Thu Dec 4 10:47:00 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] ->can and AUTOLOAD References: <000701c3ba7a$4d22d250$6405a8c0@a30><20031204152636.GA11764@petdance.com><002301c3ba80$1e0fad70$6405a8c0@a30> <20031204161707.GA30665@chloe.inkdroid.org> Message-ID: <004d01c3ba86$3e1fc7c0$6405a8c0@a30> Here is how I did it: sub AUTOLOAD { no strict "refs"; my ($self,$arg) = @_; $AUTOLOAD =~ /.*::(\w+)/; my %method; @method{@TWSMethod} = (); my $sub = $1; return if $sub =~ /DESTROY/; die "ERROR: This package does not implement the $sub message\n". "\tthis is a problem" unless exists $method{$sub}; *{$AUTOLOAD} = sub { print "In default $sub: You should override this method in your code\n"; print "\t",join("\n\t",map{"$_=>".($arg->{$_} or "undef")} keys %$arg), "\n"; } } And then in my code I do: $self->$subName(@arg); ----- Original Message ----- From: "Ed Summers" To: "Chicago.pm chatter" Sent: Thursday, December 04, 2003 10:17 AM Subject: Re: [Chicago-talk] ->can and AUTOLOAD > On Thu, Dec 04, 2003 at 10:03:06AM -0600, Jay Strauss wrote: > > Asking. But it doesn't matter, I'm just calling the method, and checking > > in my AUTOLOAD sub to see if this method is allowable > > can() is found in UNIVERSAL.pm. Let's see the code :) > > //Ed > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > From lembark at wrkhors.com Thu Dec 4 10:51:33 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] ->can and AUTOLOAD In-Reply-To: <000701c3ba7a$4d22d250$6405a8c0@a30> References: <000701c3ba7a$4d22d250$6405a8c0@a30> Message-ID: <1625670000.1070556693@[192.168.100.3]> -- Jay Strauss > If I use AUTOLOAD in a class, and then do ->can on that class, it comes > back not found. I thought AUTOLOAD would catch all and I could do ->can > on any method and AUTOLOAD would pick it up $foo->can( 'AUTOLOAD' ) should work if there is an AUTOLOAD defined. Can is checking the symbol table, not executing the AUTOLOAD sub itself in order to instantiate a subroutine for you. If you need to use $foo->can with things that are created with autoloader then you will have to stub the names to a sub that trampolines them into core rather than an autoload. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From lembark at wrkhors.com Thu Dec 4 10:58:31 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] ->can and AUTOLOAD In-Reply-To: <002301c3ba80$1e0fad70$6405a8c0@a30> References: <000701c3ba7a$4d22d250$6405a8c0@a30> <20031204152636.GA11764@petdance.com> <002301c3ba80$1e0fad70$6405a8c0@a30> Message-ID: <1626560000.1070557110@[192.168.100.3]> -- Jay Strauss > Asking. But it doesn't matter, I'm just calling the method, and checking > in my AUTOLOAD sub to see if this method is allowable AUTOLOAD is used to fake out the symbol table by adding things in on the fly that weren't there to find without autoloading. can is used to query the symbol table. Testing for $foo->( 'AUTOLOAD' ) is not reliable since you have no guarantee of exactly what the autoloader will be capable of implementing. If you normally expect the methods to be available then it's probably better to deal with them via exceptions (a.k.a. block eval). If $foo cannot $name and also cannot AUTOLOAD then you know it's a failure. Combining the two you can get: if( my $sub = $foo->can($name) ) { $foo->$sub( @argz ); } elsif( $foo->can('AUTOLOAD') ) { # doublecheck me on the AUTOLOAD syntax $foo->AUTOLOAD( $name, @argz ); } else { my $type = ref $foo || $foo; die "Bogus call: '$foo' cannot '$name'"; } Catch: autoloading or the sub call may give you exceptions also, so you have to either be REEEEEEL careful about what you pick for the explicit die or not care why the call failed (e.g., due to bogus args). -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From lembark at wrkhors.com Thu Dec 4 11:05:02 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] ->can and AUTOLOAD In-Reply-To: <004d01c3ba86$3e1fc7c0$6405a8c0@a30> References: <000701c3ba7a$4d22d250$6405a8c0@a30> <20031204152636.GA11764@petdance.com><002301c3ba80$1e0fad70$6405a8c0@a30> <20031204161707.GA30665@chloe.inkdroid.org> <004d01c3ba86$3e1fc7c0$6405a8c0@a30> Message-ID: <1627430000.1070557502@[192.168.100.3]> You can add a universal autoloader that delivers a more descriptive error message then croaks. This guarantees that $foo->$name will always be callable and that you will get useful error messages if $name is meaningless for the object/package: sub UNIVERSAL::AUTOLOAD { # discombobulate @_ and print a useful # description of why the sub does not # exist for this object/class/package. ... confess "Bogus call: $package cannot $name"; } Now you can always use: my $sub = $foo->can( $name ) || $foo->can( 'AUTOLOAD' ); $foo->$sub( @argz ); either you'll hit $name the fisrt time, hit a 'real' autoloader, or bounce into UNIVERSAL::AUTOLOAD which can tell you exactly where the process went wrong. If you check the pod for the 5.8 version of Carp (may have been there in 5.6) it has setups for classes to trust (i.e., report the error from however many levels of caller up the stack it takes to get out of that class). Adding UNIVERSAL and the dispatcher's package to this will show you where the call with $name in it came from with less garbage to trace through. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From lembark at wrkhors.com Thu Dec 4 11:08:00 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] ->can and AUTOLOAD In-Reply-To: <004d01c3ba86$3e1fc7c0$6405a8c0@a30> References: <000701c3ba7a$4d22d250$6405a8c0@a30> <20031204152636.GA11764@petdance.com><002301c3ba80$1e0fad70$6405a8c0@a30> <20031204161707.GA30665@chloe.inkdroid.org> <004d01c3ba86$3e1fc7c0$6405a8c0@a30> Message-ID: <1628300000.1070557680@[192.168.100.3]> -- Jay Strauss > Here is how I did it: > > sub AUTOLOAD { > > no strict "refs"; You are probably better off pushing this into the code at the lowest possible level: my $install = sub { ... }; { no strict 'refs'; ${$package . '::' . $name} = $install; } goto $install This saves you from making wierd mistakes in the AUTOLOAD that strict normally catches for you. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From me at heyjay.com Thu Dec 4 11:41:49 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] ->can and AUTOLOAD References: <000701c3ba7a$4d22d250$6405a8c0@a30><20031204152636.GA11764@petdance.com><002301c3ba80$1e0fad70$6405a8c0@a30><20031204161707.GA30665@chloe.inkdroid.org><004d01c3ba86$3e1fc7c0$6405a8c0@a30> <1628300000.1070557680@[192.168.100.3]> Message-ID: <001c01c3ba8d$e6809f50$6405a8c0@a30> I don't know what you mean here. Can you give a full example? thanks Jay ----- Original Message ----- From: "Steven Lembark" To: "Chicago.pm chatter" Sent: Thursday, December 04, 2003 11:08 AM Subject: Re: [Chicago-talk] ->can and AUTOLOAD > > > -- Jay Strauss > > > Here is how I did it: > > > > sub AUTOLOAD { > > > > no strict "refs"; > > You are probably better off pushing this into the code > at the lowest possible level: > > my $install = sub { ... }; > > { > no strict 'refs'; > > ${$package . '::' . $name} = $install; > } > > goto $install > > > This saves you from making wierd mistakes in the AUTOLOAD > that strict normally catches for you. > > -- > Steven Lembark 2930 W. Palmer > Workhorse Computing Chicago, IL 60647 > +1 888 359 3508 > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > From lembark at wrkhors.com Thu Dec 4 13:37:18 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] ->can and AUTOLOAD In-Reply-To: <001c01c3ba8d$e6809f50$6405a8c0@a30> References: <000701c3ba7a$4d22d250$6405a8c0@a30> <20031204152636.GA11764@petdance.com><002301c3ba80$1e0fad70$6405a8c0@a30> <20031204161707.GA30665@chloe.inkdroid.org> <004d01c3ba86$3e1fc7c0$6405a8c0@a30> <1628300000.1070557680@[192.168.100.3]> <001c01c3ba8d$e6809f50$6405a8c0@a30> Message-ID: <1653120000.1070566637@[192.168.100.3]> -- Jay Strauss > I don't know what you mean here. Can you give a full example? The original AUTOLOAD -- your code -- has a no strict 'refs' at the top of the sub's block. You don't really need to turn off strict ref's throughout the block, only in the one place where you perform the glob assignment. So, put the glob assignment into a block and stick the no strict in there to localize where you turn off sanity checking. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From ehs at pobox.com Thu Dec 4 20:50:38 2003 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] Newsletter from O'Reilly UG Program, December 4 Message-ID: <20031205025038.GC3190@chloe.inkdroid.org> ================================================================ O'Reilly News for User Group Members December 4, 2003 ================================================================ ---------------------------------------------------------------- Book News ---------------------------------------------------------------- -Dancing Barefoot -Mac OS X Unwired -The Best of The Joy of Tech ---------------------------------------------------------------- Upcoming Events ---------------------------------------------------------------- -O'Reilly at Macworld Conference & Expo, San Francisco, CA--January 6-9 ---------------------------------------------------------------- Conferences ---------------------------------------------------------------- -The Buzz from 2003 Emerging Technology Conference ---------------------------------------------------------------- News ---------------------------------------------------------------- -O'Reilly to Handle Distribution for Fellow Computer Book Publishers -Wil Wheaton to Write Three Books for O'Reilly -Free Exhibit Hall Pass for LinuxWorld Conference & Expo, New York, NY--January 21-23, 2004 -BIND DoS Attack -RouteWord: An Interesting Diversion -Introduction to the Peer-to-Peer Sockets Project -Java vs. .NET Security, Part 1 -Five XSLT Basics -Creating Your Own Code Snippets with Whidbey -Free Exhibit Hall Guest Pass for Macworld Conference & Expo, San Francisco, CA--January 6-9 -iPod as Digital Photographer's Best Friend -Collaborative Editing with Rendezvous -Animal ASCII Art--Do You Have Some? ================================================ Book News ================================================ Did you know you can request a free book to review for your group? Ask your group leader for more information. For book review writing tips and suggestions, go to: http://ug.oreilly.com/bookreviews.html Don't forget, you can receive 20% off any O'Reilly book you purchase directly from O'Reilly. Just use code DSUG when ordering online or by phone 800-998-9938. http://www.oreilly.com/ ***Free ground shipping is available for online orders of at least $29.95 that go to a single U.S. address. This offer applies to U.S. delivery addresses in the 50 states and Puerto Rico. For more details, go to: http://www.oreilly.com/news/freeshipping_0703.html ***Dancing Barefoot Order Number: 6748 Wil Wheaton--blogger, geek, and Star Trek: The Next Generation's Wesley Crusher--gives us five true tales of life, love, and the absurdities of Hollywood in "Dancing Barefoot." Far from the usual celebrity tell-all, "Dancing Barefoot" is a vivid, personal account of Wil's search for his true self. If you've ever fallen in love, attended a Star Trek convention, or pondered the meaning of life, you'll find a kindred soul in the pages of "Dancing Barefoot." http://www.oreilly.com/catalog/barefoot/ ***Mac OS X Unwired Order Number: 5083 "Mac OS X Unwired" is a one-stop, wireless information source for technically savvy Mac users. The book provides a complete introduction to all the wireless technologies supported by Mac OS X, including Wi-Fi, infrared, Bluetooth, and GPRS. If you're considering wireless as an alternative to cable and DSL, or using wireless to network computers in your home, office, or on the road, this book will show you the full-spectrum view of the wireless capabilities of Mac OS X, and how to get the most out of them. http://www.oreilly.com/catalog/macxunwire/ Chapter 4, "Wi-Fi on the Road," is available online: http://www.oreilly.com/catalog/macxunwire/chapter/index.html ***The Best of The Joy of Tech Order Number: 5784 Frustrated and frazzled by technology? Or perhaps your cynicism is starting to wane? This book is a collection of the very best from The Joy of Tech online series. It also features several new, never-before-seen comics, exclusive notes from the artists about their work, an appendix of the JoyPolls, a lexicon of JoyWords, and an introduction by David Pogue. "The Best of The Joy of Tech" is an oasis of top-notch humor and images sure to refresh the mind's page and reboot the will to live. http://www.oreilly.com/catalog/bestjoytech/ ================================================ Upcoming Events ================================================ ***For more events, please see: http://events.oreilly.com/ ***O'Reilly at Macworld Conference & Expo, San Francisco, CA--January 6-9 In addition to all of our fabulous new Mac titles, authors David Pogue ("Missing Manual Series," and Derrick Story ("iPhoto 2: The Missing Manual," "Digital Video Pocket Guide," and "Digital Photography Pocket Guide") will grace our booth with presentations during the show. We are in booth #2143 this year. Moscone Convention Center San Francisco, CA http://macworldexpo.com/macworldexposf/V40/index.cvn ================================================ Conference News ================================================ ***The Buzz from 2003 Emerging Technology Conference Check out the O'Reilly Network's news coverage and blogs from the 2003 Emerging Technology Conference to help you decide for 2004. http://www.oreillynet.com/et2003/ You can also download presentation and multimedia files from 2003. http://conferences.oreillynet.com/pub/w/22/presentations.html The 2004 O'Reilly Emerging Technology Conference February 9-12, 2004 Westin Horton Plaza San Diego San Diego, CA 92101 http://conferences.oreilly.com/etech/ User Group members who register before January 9, 2004 get a double discount. Use code DSUG when you register, and receive 20% off the "Early Bird" price. To register for the conference, go to: http://conferences.oreillynet.com/pub/w/28/register.html ================================================ News From O'Reilly & Beyond ================================================ --------------------- General News --------------------- ***O'Reilly to Handle Distribution for Fellow Computer Book Publishers We will be providing distribution, sales, and fulfillment services for three other leading independent publishers--No Starch Press, Paraglyph Press, and Syngress Publishing--starting January 1, 2004. We'll be sending UGs information and review copies for our new partners. For more information check out our press release: http://press.oreilly.com/pub/pr/1124 Here's a recent article from our local newspaper, "The Press Democrat": http://www.pressdemocrat.com/business/news/03oreilly_e1.html ***Wil Wheaton to Write Three Books for O'Reilly Any honest computer geek will admit that his obsessive coding is, at heart, a futile attempt to create a world as cool as those depicted in science fiction. New evidence of the symbiotic relationship between Sci Fi and geekdom surfaced, as O'Reilly, the geek publisher-of-record, announced plans to publish three books by Wil Wheaton, blogger, geek, and the actor who portrayed Wesley Crusher on Star Trek: The Next Generation. Wil's first two books, "Dancing Barefoot" and "Just a Geek," are almost unbearably honest tales of life, love, and the rigors of being an ensign on the Starship Enterprise. Take a look at Wil's December 2 blog announcement: http://wilwheaton.net/ And you can read our press release: http://press.oreilly.com/pub/pr/1125 --------------------- Open Source --------------------- ***Free Exhibit Hall Pass for LinuxWorld Conference & Expo, New York, NY--January 21-23, 2004 Register online with Priority Code PC0260 by December 19, 2004 http://www.linuxworldexpo.com ***BIND DoS Attack Noel Davis looks at a denial-of-service attack against BIND and problems in KDE, GnuPG, screen, Ethereal, FreeRadius, mod_gzip, Pan, detecttr, OpenCA, EPIC, and libnids. http://linux.oreillynet.com/pub/a/linux/2003/12/01/insecurities.html ***RouteWord: An Interesting Diversion Graphs--loosely connected, unordered collections of nodes--are highly important to computer science. Visualizing graphs is even more important: think of maps, routes, webs, and any other interconnected relationships. O'Reilly author Andrew Odewahn explains how he accidentally created a new type of word puzzle while playing around with graph visualization. http://www.onlamp.com/pub/a/onlamp/2003/11/26/routewords.html Throughout the month of December, we're running daily RouteWord puzzles from Andrew Odewahn. Here's today's puzzle: http://www.onlamp.com/pub/a/onlamp/2003/12/routeword/index.html --------------------- Java --------------------- ***Introduction to the Peer-to-Peer Sockets Project The Peer-to-Peer Sockets project reimplements Java's standard Socket, ServerSocket, and InetAddress classes to work on the JXTA peer-to-peer network rather than on the standard TCP/IP network. Brad Neuberg shows how to configure and set up the P2P Socket libraries to run on your system, how to create and run P2P server and client sockets, and how to work with the P2P InetAddress class, and discusses security issues and limitations in the framework. http://www.onjava.com/pub/a/onjava/2003/12/03/p2psockets.html ***Java vs. .NET Security, Part 1 Java and .NET address similar code security issues, but which one offers the best security implementation? Denis Piliptchouk's series starts with a side-by-side look at how each performs configuration, code verification, and memory isolation. http://www.onjava.com/pub/a/onjava/2003/11/26/javavsdotnet.html --------------------- XML --------------------- ***Five XSLT Basics This article by Michael Fitzgerald introduces newbies to the five basics of XSLT 1.0, from what it is to how to get it to work--information you'll also find in the first chapter of Michael's book, "Learning XSLT." http://www.xml.com/pub/a/2003/11/26/learnXSLT.html Learning XSLT Order Number: 3277 http://www.oreilly.com/catalog/learnxslt/index.html --------------------- .NET --------------------- ***Creating Your Own Code Snippets with Whidbey One of the new features found in Visual Studio .NET Whidbey is Insert Snippets. The Insert Snippets feature allows you to insert commonly-used code blocks into your project, thereby improving the efficiency of your development process. Wei-Meng Lee shows you how to add your own snippets to Whidbey. http://www.ondotnet.com/pub/a/dotnet/2003/12/01/whidbeysnippets.html --------------------- Mac --------------------- ***Free Exhibit Hall Guest Pass for Macworld Conference & Expo, San Francisco, CA--January 6-9 Register online by December 8 with Priority code PC0211 http://www.macworldexpo.com ***iPod as Digital Photographer's Best Friend Yes, the iPod can store thousands of songs. But now you can use it to upload thousands of pictures too, directly from the memory card. And thanks to Panther, that's only the beginning of what is sure to become an indispensable tool for many digital photographers. http://www.macdevcenter.com/pub/a/mac/2003/12/02/photo_ipod.html ***Collaborative Editing with Rendezvous Apple's adoption of Zeroconf networking (branded as "Rendezvous") has opened the door to new ways of sharing information on local networks. In this article, Wei Meng Lee shows you how to use two collaborative editing tools: SubEthaEdit and iStorm. http://www.macdevcenter.com/pub/a/mac/2003/12/02/rendezvous.html --------------------- Fun --------------------- ***Animal ASCII Art--Do You Have Some? If you are an artist with you keyboard, please let me know. I am looking for ASCII versions of our famous O'Reilly animals. Please send an email to marsee@oreilly.com with your original rendition. Until next time-- Marsee ----- End forwarded message ----- -- Ed Summers aim: inkdroid web: http://www.inkdroid.org I wish to God these calculations had been executed by steam! [Charles Babbage] From me at heyjay.com Thu Dec 4 21:03:35 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] fork and talk to the parent Message-ID: <002c01c3badc$6134d650$6405a8c0@a30> since my last email went over like a lead balloon, I figured I'd shorten it and rephrase, I want to fork a process, but then I want to child to talk to the parent. What are my options? I've been reading POE, but I'm not sure this is the right use thanks Jay From merlyn at stonehenge.com Thu Dec 4 22:00:31 2003 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] fork and talk to the parent In-Reply-To: <002c01c3badc$6134d650$6405a8c0@a30> References: <002c01c3badc$6134d650$6405a8c0@a30> Message-ID: <86r7zjvrqe.fsf@blue.stonehenge.com> >>>>> "Jay" == Jay Strauss writes: Jay> I want to fork a process, but then I want to child to talk to the parent. Define "talk". Synchronous unidirectional is trivial: open CHILD, "some commmand|" or die; while () { ... } -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! From me at heyjay.com Thu Dec 4 23:07:11 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] fork and talk to the parent References: <002c01c3badc$6134d650$6405a8c0@a30> <86r7zjvrqe.fsf@blue.stonehenge.com> Message-ID: <002901c3baed$a6426350$6405a8c0@a30> Ok, I guess I was too unspecific the parent will be in an infinite loop. The forked child will be sitting (also in a infinite loop) listening on a socket. When the child gets a message from the socket, based on the message, it may need to send that data to the parent. Jay ----- Original Message ----- From: "Randal L. Schwartz" To: "Chicago.pm chatter" Sent: Thursday, December 04, 2003 10:00 PM Subject: Re: [Chicago-talk] fork and talk to the parent > >>>>> "Jay" == Jay Strauss writes: > > Jay> I want to fork a process, but then I want to child to talk to the parent. > > Define "talk". Synchronous unidirectional is trivial: > > open CHILD, "some commmand|" or die; > while () { ... } > > -- > Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 > > Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. > See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > From Dooley.Michael at con-way.com Fri Dec 5 08:32:15 2003 From: Dooley.Michael at con-way.com (Dooley, Michael) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] Programming Perl 3rd edition: Message-ID: does anyone know if there is a difference between the blue and white covered Programming Perl 3rd Edition books? I was browsing the book shelves yesterday and noticed the covers are different colors. both are by oreilly w/ the same authors. From lembark at wrkhors.com Fri Dec 5 09:27:53 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] fork and talk to the parent In-Reply-To: <002c01c3badc$6134d650$6405a8c0@a30> References: <002c01c3badc$6134d650$6405a8c0@a30> Message-ID: <1701010000.1070638072@[192.168.100.3]> -- Jay Strauss > since my last email went over like a lead balloon, I figured I'd shorten > it and rephrase, > > I want to fork a process, but then I want to child to talk to the parent. > > What are my options? I've been reading POE, but I'm not sure this is the > right use perldoc perlipc; see Camel under Interprocess Communications. see Lincon Stein's Network Programming with Perl for speicifc examples with code. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From lembark at wrkhors.com Fri Dec 5 09:29:07 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] Programming Perl 3rd edition: In-Reply-To: References: Message-ID: <1702040000.1070638147@[192.168.100.3]> -- "Dooley, Michael" > does anyone know if there is a difference between the blue and white > covered Programming Perl 3rd Edition books? > > I was browsing the book shelves yesterday and noticed the covers are > different colors. both are by oreilly w/ the same authors. Check the copyright page, one is probably 2nd printing w/ corrections. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From lembark at wrkhors.com Fri Dec 5 09:29:50 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] fork and talk to the parent In-Reply-To: <002901c3baed$a6426350$6405a8c0@a30> References: <002c01c3badc$6134d650$6405a8c0@a30> <86r7zjvrqe.fsf@blue.stonehenge.com> <002901c3baed$a6426350$6405a8c0@a30> Message-ID: <1702820000.1070638190@[192.168.100.3]> -- Jay Strauss > Ok, I guess I was too unspecific > > the parent will be in an infinite loop. The forked child will be sitting > (also in a infinite loop) listening on a socket. When the child gets a > message from the socket, based on the message, it may need to send that > data to the parent. Why not thread it? You can exchange info by assigning it to shared variables. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From me at heyjay.com Fri Dec 5 10:02:08 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] fork and talk to the parent References: <002c01c3badc$6134d650$6405a8c0@a30><86r7zjvrqe.fsf@blue.stonehenge.com><002901c3baed$a6426350$6405a8c0@a30> <1702820000.1070638190@[192.168.100.3]> Message-ID: <006c01c3bb49$243f22b0$6405a8c0@a30> I wanted to, but I don't have perl 5.8 and I started reading perlothrtut, and they talked about all these locking issues and stuff and I got scared Jay ----- Original Message ----- From: "Steven Lembark" To: "Chicago.pm chatter" Sent: Friday, December 05, 2003 9:29 AM Subject: Re: [Chicago-talk] fork and talk to the parent > > > -- Jay Strauss > > > Ok, I guess I was too unspecific > > > > the parent will be in an infinite loop. The forked child will be sitting > > (also in a infinite loop) listening on a socket. When the child gets a > > message from the socket, based on the message, it may need to send that > > data to the parent. > > Why not thread it? You can exchange info by assigning it > to shared variables. > > > -- > Steven Lembark 2930 W. Palmer > Workhorse Computing Chicago, IL 60647 > +1 888 359 3508 > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > From Andy_Bach at wiwb.uscourts.gov Fri Dec 5 10:59:40 2003 From: Andy_Bach at wiwb.uscourts.gov (Andy_Bach@wiwb.uscourts.gov) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] Programming Perl 3rd edition: In-Reply-To: Message-ID: No, but I used to know the different names of the camels ... a Andy Bach, Sys. Mangler Internet: andy_bach@wiwb.uscourts.gov VOICE: (608) 261-5738 FAX 264-5030 "That'd be big of all of us. Let be big for a change." Captain Spalding From andy at petdance.com Fri Dec 5 12:14:55 2003 From: andy at petdance.com (Andy Lester) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] Programming Perl 3rd edition: In-Reply-To: References: Message-ID: > does anyone know if there is a difference between the blue and white > covered > Programming Perl 3rd Edition books? Identical. ORA went to that reverse color scheme for a few months, and then switched back. xoa -- Andy Lester andy@petdance.com, AIM:petdance http://petdance.com/ http://use.perl.org/~petdance/ From Dooley.Michael at con-way.com Fri Dec 5 13:00:34 2003 From: Dooley.Michael at con-way.com (Dooley, Michael) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] printing a hash value that has shell code in it. Message-ID: open (DFH_FILE, "/var/adm/scripts/dfh") or die "Can not read DFH file ($!)"; foreach () { chomp; ($dfhtype, $dfh) = split(/=/, $_); $dfhtype=lc("$dfhtype"); $dfhhash{$dfhtype}=$dfh; } close DFH_FILE; foreach (values (%dfhhash)) { print $_,"\n"; } ----- what if each line in DFH_FILE look like this. Anyone have any ideas how I can convert the date portion to a legitamit date. Q107945="DFH1 CW_OMS 4165909998 `date +%Y%m%d%H%M%S%Y%m%d%H%M%S` q107945 01" Q166204="DFH|1|q166|q190|`date +%Y%m%d`|`date +%H%M%S`|`date +%Y%m%d%H%M%S`|q166204i|0|1" ACCESSDBTXT="DFH,1,q100,CW_TMS,`date +%Y%m%d`,`date +%H%M%S`,`date +%Y%m%d%H%M%S`,q100204i,0,1" OMSARFIN="DFH 1 CW_OMS CW_FIN `date +%Y%m%d` `date +%H%M%S` `date +%Y%m%d%H%M%S` AR_OUT 0 1" -------------- From me at heyjay.com Fri Dec 5 13:26:55 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] fork and talk to the parent References: <002c01c3badc$6134d650$6405a8c0@a30><86r7zjvrqe.fsf@blue.stonehenge.com><002901c3baed$a6426350$6405a8c0@a30> <1702820000.1070638190@[192.168.100.3]> Message-ID: <001701c3bb65$c00eeb00$6405a8c0@a30> Ok, i built perl 5.8.2 from source in /opt/perl/perl5.8.2/bin Is there anyway to use all the modules I've downloaded from cpan over the months in this new version? Thanks Jay ----- Original Message ----- From: "Steven Lembark" To: "Chicago.pm chatter" Sent: Friday, December 05, 2003 9:29 AM Subject: Re: [Chicago-talk] fork and talk to the parent > > > -- Jay Strauss > > > Ok, I guess I was too unspecific > > > > the parent will be in an infinite loop. The forked child will be sitting > > (also in a infinite loop) listening on a socket. When the child gets a > > message from the socket, based on the message, it may need to send that > > data to the parent. > > Why not thread it? You can exchange info by assigning it > to shared variables. > > > -- > Steven Lembark 2930 W. Palmer > Workhorse Computing Chicago, IL 60647 > +1 888 359 3508 > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > From me at heyjay.com Fri Dec 5 13:38:22 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] fork and talk to the parent References: <002c01c3badc$6134d650$6405a8c0@a30><86r7zjvrqe.fsf@blue.stonehenge.com><002901c3baed$a6426350$6405a8c0@a30><1702820000.1070638190@[192.168.100.3]> <001701c3bb65$c00eeb00$6405a8c0@a30> Message-ID: <006501c3bb67$5d37cef0$6405a8c0@a30> They seem to be found by default Jay ----- Original Message ----- From: "Jay Strauss" To: "Chicago.pm chatter" Sent: Friday, December 05, 2003 1:26 PM Subject: Re: [Chicago-talk] fork and talk to the parent > Ok, i built perl 5.8.2 from source in /opt/perl/perl5.8.2/bin > > Is there anyway to use all the modules I've downloaded from cpan over the > months in this new version? > > Thanks > Jay > > > ----- Original Message ----- > From: "Steven Lembark" > To: "Chicago.pm chatter" > Sent: Friday, December 05, 2003 9:29 AM > Subject: Re: [Chicago-talk] fork and talk to the parent > > > > > > > > -- Jay Strauss > > > > > Ok, I guess I was too unspecific > > > > > > the parent will be in an infinite loop. The forked child will be > sitting > > > (also in a infinite loop) listening on a socket. When the child gets a > > > message from the socket, based on the message, it may need to send that > > > data to the parent. > > > > Why not thread it? You can exchange info by assigning it > > to shared variables. > > > > > > -- > > Steven Lembark 2930 W. Palmer > > Workhorse Computing Chicago, IL 60647 > > +1 888 359 3508 > > _______________________________________________ > > Chicago-talk mailing list > > Chicago-talk@mail.pm.org > > http://mail.pm.org/mailman/listinfo/chicago-talk > > > > > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > From don at drakeconsult.com Fri Dec 5 14:55:35 2003 From: don at drakeconsult.com (Don Drake) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] printing a hash value that has shell code in it. In-Reply-To: Message-ID: <001c01c3bb72$21e27160$9a01ac0a@attbi.com> Parse out `date +%(.*?)` and replace $1 with the output of POSIX::strftime($1,...). -Don -----Original Message----- From: chicago-talk-bounces@mail.pm.org [mailto:chicago-talk-bounces@mail.pm.org]On Behalf Of Dooley, Michael Sent: Friday, December 05, 2003 1:01 PM To: Chicago.pm chatter Subject: [Chicago-talk] printing a hash value that has shell code in it. open (DFH_FILE, "/var/adm/scripts/dfh") or die "Can not read DFH file ($!)"; foreach () { chomp; ($dfhtype, $dfh) = split(/=/, $_); $dfhtype=lc("$dfhtype"); $dfhhash{$dfhtype}=$dfh; } close DFH_FILE; foreach (values (%dfhhash)) { print $_,"\n"; } ----- what if each line in DFH_FILE look like this. Anyone have any ideas how I can convert the date portion to a legitamit date. Q107945="DFH1 CW_OMS 4165909998 `date +%Y%m%d%H%M%S%Y%m%d%H%M%S` q107945 01" Q166204="DFH|1|q166|q190|`date +%Y%m%d`|`date +%H%M%S`|`date +%Y%m%d%H%M%S`|q166204i|0|1" ACCESSDBTXT="DFH,1,q100,CW_TMS,`date +%Y%m%d`,`date +%H%M%S`,`date +%Y%m%d%H%M%S`,q100204i,0,1" OMSARFIN="DFH 1 CW_OMS CW_FIN `date +%Y%m%d` `date +%H%M%S` `date +%Y%m%d%H%M%S` AR_OUT 0 1" -------------- _______________________________________________ Chicago-talk mailing list Chicago-talk@mail.pm.org http://mail.pm.org/mailman/listinfo/chicago-talk From gdf at speakeasy.net Fri Dec 5 15:21:04 2003 From: gdf at speakeasy.net (Greg Fast) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] Speaking of threading Message-ID: <200312052121.hB5LL6K15651@mail.pm.org> So, speaking of threading... Does anyone have any practical experience with threaded 5.8? The general reaction I've gotten from most folk I've talked to has been "perl threads are scary and I don't want to compile my own perl". Are perl threads still scary? I think the most scary parts (used to) be that threads made things slower, sneaky unspecified sharing danger deep inside perl, and non-core but common modules which are non-threadsafe (and also a lack of a good way to tell if a given module is threadsafe). I think the first is solved and the second more or less resolved, but have no idea on the third. Is it reasonable yet to assume that an app with a "use threads" can be run by most people running 5.8? It looks like RedHat 8 ships with a ithreads-happy perl (though RH8's perl is flaky in other ways), but the default configure options still reccommend no thread support. Any opinions? -- Greg Fast http://cken.chi.groogroo.com/~gdf/ From Dooley.Michael at con-way.com Fri Dec 5 16:27:19 2003 From: Dooley.Michael at con-way.com (Dooley, Michael) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] printing a hash value that has shell code in i t. Message-ID: you guys make it to easy!!! the strftime works great because I already use (below) for something else so I have all the variables I need. my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); -----Original Message----- From: chicago-talk-bounces@mail.pm.org [mailto:chicago-talk-bounces@mail.pm.org] On Behalf Of Don Drake Sent: Friday, December 05, 2003 2:56 PM To: 'Chicago.pm chatter' Subject: RE: [Chicago-talk] printing a hash value that has shell code in it. Parse out `date +%(.*?)` and replace $1 with the output of POSIX::strftime($1,...). -Don -----Original Message----- From: chicago-talk-bounces@mail.pm.org [mailto:chicago-talk-bounces@mail.pm.org]On Behalf Of Dooley, Michael Sent: Friday, December 05, 2003 1:01 PM To: Chicago.pm chatter Subject: [Chicago-talk] printing a hash value that has shell code in it. open (DFH_FILE, "/var/adm/scripts/dfh") or die "Can not read DFH file ($!)"; foreach () { chomp; ($dfhtype, $dfh) = split(/=/, $_); $dfhtype=lc("$dfhtype"); $dfhhash{$dfhtype}=$dfh; } close DFH_FILE; foreach (values (%dfhhash)) { print $_,"\n"; } ----- what if each line in DFH_FILE look like this. Anyone have any ideas how I can convert the date portion to a legitamit date. Q107945="DFH1 CW_OMS 4165909998 `date +%Y%m%d%H%M%S%Y%m%d%H%M%S` q107945 01" Q166204="DFH|1|q166|q190|`date +%Y%m%d`|`date +%H%M%S`|`date +%Y%m%d%H%M%S`|q166204i|0|1" ACCESSDBTXT="DFH,1,q100,CW_TMS,`date +%Y%m%d`,`date +%H%M%S`,`date +%Y%m%d%H%M%S`,q100204i,0,1" OMSARFIN="DFH 1 CW_OMS CW_FIN `date +%Y%m%d` `date +%H%M%S` `date +%Y%m%d%H%M%S` AR_OUT 0 1" -------------- _______________________________________________ Chicago-talk mailing list Chicago-talk@mail.pm.org http://mail.pm.org/mailman/listinfo/chicago-talk _______________________________________________ Chicago-talk mailing list Chicago-talk@mail.pm.org http://mail.pm.org/mailman/listinfo/chicago-talk From me at heyjay.com Fri Dec 5 17:04:27 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] creating a thread on an object's method? Message-ID: <005a01c3bb84$92819970$6405a8c0@a30> How would I create the thread on an object's method? Currently I have: my $reader = Reader->new({api=>$api}); my $sub = $reader->can('go'); my $t = threads->new($sub, $reader); but if I do: my $t = threads->(\$reader->go) it just executes $reader->go thanks Jay below is the whole code #!/opt/perl/perl-5.8.2/bin/perl -w use strict; package API; use base qw/Class::Accessor/; __PACKAGE__->mk_accessors(qw/data/); sub update { my $self = shift; my $value = shift; $self->data->{value} = $value; } package Reader; use base qw(Class::Accessor); __PACKAGE__->mk_accessors(qw/api/); sub go { my $self = shift; my $i = 0; while (1) { $self->api->update($i++); last if $self->api->data->{end}; } } package TWS; use threads; use threads::shared; use base qw(Class::Accessor); __PACKAGE__->mk_accessors(); sub connect { my $self = shift; my $api = shift; my $reader = Reader->new({api=>$api}); my $sub = $reader->can('go'); my $t = threads->new($sub, $reader); } my %data : shared; my $api = API->new({data=>\%data}); my $tws = TWS->new({api=>$api}); $tws->connect($api); sleep 1; for (1..5) { print "in parent: ",$api->data->{value},"\n"; sleep 1; } $api->data->{end} = 1; sleep 1; From mcavoy76 at hotmail.com Fri Dec 5 17:15:56 2003 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] Speaking of threading References: <200312052121.hB5LL6K15651@mail.pm.org> Message-ID: You know, if anyone ever wants to do a talk on threading or forking perl, I'd be very interested. ----- Original Message ----- From: "Greg Fast" To: Sent: Friday, December 05, 2003 3:21 PM Subject: [Chicago-talk] Speaking of threading > So, speaking of threading... > > Does anyone have any practical experience with threaded 5.8? The > general reaction I've gotten from most folk I've talked to has been > "perl threads are scary and I don't want to compile my own perl". > > Are perl threads still scary? I think the most scary parts (used to) > be that threads made things slower, sneaky unspecified sharing danger > deep inside perl, and non-core but common modules which are > non-threadsafe (and also a lack of a good way to tell if a given > module is threadsafe). I think the first is solved and the second > more or less resolved, but have no idea on the third. > > Is it reasonable yet to assume that an app with a "use threads" can be > run by most people running 5.8? It looks like RedHat 8 ships with a > ithreads-happy perl (though RH8's perl is flaky in other ways), but > the default configure options still reccommend no thread support. > > Any opinions? > > -- > Greg Fast > http://cken.chi.groogroo.com/~gdf/ > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > From lembark at wrkhors.com Fri Dec 5 17:34:09 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] fork and talk to the parent In-Reply-To: <006c01c3bb49$243f22b0$6405a8c0@a30> References: <002c01c3badc$6134d650$6405a8c0@a30> <86r7zjvrqe.fsf@blue.stonehenge.com><002901c3baed$a6426350$6405a8c0@a30> <1702820000.1070638190@[192.168.100.3]> <006c01c3bb49$243f22b0$6405a8c0@a30> Message-ID: <81740000.1070667249@[192.168.200.4]> -- Jay Strauss > I wanted to, but I don't have perl 5.8 and I started reading perlothrtut, > and they talked about all these locking issues and stuff and I got scared See if perhaps 5.6.2 has a better way to handle it. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From lembark at wrkhors.com Fri Dec 5 17:41:57 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] printing a hash value that has shell code in it. In-Reply-To: References: Message-ID: <87170000.1070667717@[192.168.200.4]> -- "Dooley, Michael" > open (DFH_FILE, "/var/adm/scripts/dfh") or die "Can not read DFH file > ($!)"; foreach () { > chomp; > ($dfhtype, $dfh) = split(/=/, $_); > $dfhtype=lc("$dfhtype"); > $dfhhash{$dfhtype}=$dfh; > } > close DFH_FILE; > > foreach (values (%dfhhash)) { > print $_,"\n"; > } > ----- > what if each line in DFH_FILE look like this. Anyone have any ideas how I > can convert the date portion to a legitamit date. > Q107945="DFH1 CW_OMS 4165909998 `date > +%Y%m%d%H%M%S%Y%m%d%H%M%S` q107945 01" > Q166204="DFH|1|q166|q190|`date +%Y%m%d`|`date +%H%M%S`|`date > +%Y%m%d%H%M%S`|q166204i|0|1" > ACCESSDBTXT="DFH,1,q100,CW_TMS,`date +%Y%m%d`,`date +%H%M%S`,`date > +%Y%m%d%H%M%S`,q100204i,0,1" > OMSARFIN="DFH 1 CW_OMS CW_FIN `date +%Y%m%d` `date +%H%M%S` > `date +%Y%m%d%H%M%S` AR_OUT 0 1" Where are the dates in this input? One way might be: sub get_a_date { local $/; my $input = ; # formatz is extraneous for exececution, nice for debugging. my @formatz = $input =~ m{\+([\w%]+)}g; chomp (my @output = map { qx(date +'$_') } @formatz); @output } my @date_stringz = get_a_date; Point is to extract all of the +DATE_FORMAT_STRINGS and then feed them through the local copy of date. Odds are that Date::Format (mucho faster than Date::Manip) will handle the same format strings since they both use the time2str C subs: chomp ( my @output = map { time2str $_, time } @formatz ); may do it with less overhead. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From lembark at wrkhors.com Fri Dec 5 17:49:15 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] Speaking of threading In-Reply-To: <200312052121.hB5LL6K15651@mail.pm.org> References: <200312052121.hB5LL6K15651@mail.pm.org> Message-ID: <89860000.1070668155@[192.168.200.4]> -- Greg Fast > So, speaking of threading... > > Does anyone have any practical experience with threaded 5.8? The > general reaction I've gotten from most folk I've talked to has been > "perl threads are scary and I don't want to compile my own perl". Ask the same people if they drive on the highway. You've got much better odds of getting killed walking across the street :-) q.e.d., the unknown is always more frightening than reality. > Are perl threads still scary? I think the most scary parts (used to) > be that threads made things slower, sneaky unspecified sharing danger > deep inside perl, and non-core but common modules which are > non-threadsafe (and also a lack of a good way to tell if a given > module is threadsafe). I think the first is solved and the second > more or less resolved, but have no idea on the third. The speed difference won't be notable in most cases. Today's machines spend so much time blocking on I/O, bus access, and DMA transferrs that the threading overhad probably doesn't make that much difference. > Is it reasonable yet to assume that an app with a "use threads" can be > run by most people running 5.8? It looks like RedHat 8 ships with a > ithreads-happy perl (though RH8's perl is flaky in other ways), but > the default configure options still reccommend no thread support. > > Any opinions? The threading model in 5.8 is the sanest version of any threading I've seen in any language. Basically, all lexicals are local to the thread -- no sync required since they are thread local -- most package variables are copied into the thread's address space -- no sync required here either. The stuff you really do want to share is marked as being shared, sanity checked for data types, and has semaphores on it. This avoids most of the mess you get with other languages since the majority of what you want private is private to begin with. There is an overhead copying globals, but you can reasonably control that in most cases, and the few things that are shared you know about becuase you marked them that way. If you use lexicals for most of your storage most of the time then you may not even have any performance penalty or major code modifications to threadify the stuff. The perlthrtut describes this (double check me on the name). -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From lembark at wrkhors.com Fri Dec 5 17:51:45 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] Speaking of threading In-Reply-To: References: <200312052121.hB5LL6K15651@mail.pm.org> Message-ID: <91990000.1070668305@[192.168.200.4]> > You know, if anyone ever wants to do a talk on threading or forking perl, > I'd be very interested. You can get one decent intro in the perldocs (perlfork, perlipc, perlthrtut). Schedule::Parallel and Schedule::Depend have a fair degree of commenting on the forking section. If you eyeball the stuff in Schedule::Parallel it should give enough of a framework to try it yourself. Other thing to check is the debugger tutorial. Setting the terminal variable to find an alternate tty device for the child process makes things enormously easier. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From me at heyjay.com Fri Dec 5 17:50:36 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] fork and talk to the parent References: <002c01c3badc$6134d650$6405a8c0@a30><86r7zjvrqe.fsf@blue.stonehenge.com><002901c3baed$a6426350$6405a8c0@a30><1702820000.1070638190@[192.168.100.3]><006c01c3bb49$243f22b0$6405a8c0@a30> <81740000.1070667249@[192.168.200.4]> Message-ID: <008801c3bb8a$a1965210$6405a8c0@a30> The threading code I wrote seems to work in 5.6.1 too. How would I stress test it? I'm not reading an writing the same data at the same time. that is, one thread writes to the data, and the other tread reads it. Jay ----- Original Message ----- From: "Steven Lembark" To: "Chicago.pm chatter" Sent: Friday, December 05, 2003 5:34 PM Subject: Re: [Chicago-talk] fork and talk to the parent > > > -- Jay Strauss > > > I wanted to, but I don't have perl 5.8 and I started reading perlothrtut, > > and they talked about all these locking issues and stuff and I got scared > > See if perhaps 5.6.2 has a better way to handle it. > > > > > -- > Steven Lembark 2930 W. Palmer > Workhorse Computing Chicago, IL 60647 > +1 888 359 3508 > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > From shild at sbcglobal.net Fri Dec 5 17:56:36 2003 From: shild at sbcglobal.net (Scott T. Hildreth) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] Speaking of threading In-Reply-To: Message-ID: On 05-Dec-2003 Chris McAvoy wrote: > You know, if anyone ever wants to do a talk on threading or forking perl, ...and Steve can add to his talk by adding debugging fork() with $DB::fork_TTY, unless he already did. Unfortunately I could not make it. > I'd be very interested. > > ----- Original Message ----- > From: "Greg Fast" > To: > Sent: Friday, December 05, 2003 3:21 PM > Subject: [Chicago-talk] Speaking of threading > > >> So, speaking of threading... >> >> Does anyone have any practical experience with threaded 5.8? The >> general reaction I've gotten from most folk I've talked to has been >> "perl threads are scary and I don't want to compile my own perl". >> >> Are perl threads still scary? I think the most scary parts (used to) >> be that threads made things slower, sneaky unspecified sharing danger >> deep inside perl, and non-core but common modules which are >> non-threadsafe (and also a lack of a good way to tell if a given >> module is threadsafe). I think the first is solved and the second >> more or less resolved, but have no idea on the third. >> >> Is it reasonable yet to assume that an app with a "use threads" can be >> run by most people running 5.8? It looks like RedHat 8 ships with a >> ithreads-happy perl (though RH8's perl is flaky in other ways), but >> the default configure options still reccommend no thread support. >> >> Any opinions? >> >> -- >> Greg Fast >> http://cken.chi.groogroo.com/~gdf/ >> _______________________________________________ >> Chicago-talk mailing list >> Chicago-talk@mail.pm.org >> http://mail.pm.org/mailman/listinfo/chicago-talk >> > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk ---------------------------------- E-Mail: Scott T. Hildreth Date: 05-Dec-2003 Time: 17:49:51 ---------------------------------- From me at heyjay.com Fri Dec 5 18:02:34 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] fork and talk to the parent References: <002c01c3badc$6134d650$6405a8c0@a30><86r7zjvrqe.fsf@blue.stonehenge.com><002901c3baed$a6426350$6405a8c0@a30><1702820000.1070638190@[192.168.100.3]><006c01c3bb49$243f22b0$6405a8c0@a30><81740000.1070667249@[192.168.200.4]> <008801c3bb8a$a1965210$6405a8c0@a30> Message-ID: <000901c3bb8c$41ea8550$6405a8c0@a30> No it doesn't, I'd left the shebang line in, so that it used my new perl with threads ----- Original Message ----- From: "Jay Strauss" To: "Chicago.pm chatter" Sent: Friday, December 05, 2003 5:50 PM Subject: Re: [Chicago-talk] fork and talk to the parent > The threading code I wrote seems to work in 5.6.1 too. > > How would I stress test it? I'm not reading an writing the same data at the > same time. that is, one thread writes to the data, and the other tread > reads it. > > Jay > ----- Original Message ----- > From: "Steven Lembark" > To: "Chicago.pm chatter" > Sent: Friday, December 05, 2003 5:34 PM > Subject: Re: [Chicago-talk] fork and talk to the parent > > > > > > > > -- Jay Strauss > > > > > I wanted to, but I don't have perl 5.8 and I started reading > perlothrtut, > > > and they talked about all these locking issues and stuff and I got > scared > > > > See if perhaps 5.6.2 has a better way to handle it. > > > > > > > > > > -- > > Steven Lembark 2930 W. Palmer > > Workhorse Computing Chicago, IL 60647 > > +1 888 359 3508 > > _______________________________________________ > > Chicago-talk mailing list > > Chicago-talk@mail.pm.org > > http://mail.pm.org/mailman/listinfo/chicago-talk > > > > > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > From petemar1 at perlmonk.org Sat Dec 6 00:28:42 2003 From: petemar1 at perlmonk.org (petemar1) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] UML2Perl? In-Reply-To: <000901c3bb8c$41ea8550$6405a8c0@a30> Message-ID: Is there a freeware/shareware program to convert UML diagrams into barebones Perl code, similar to dia2code? From petemar1 at perlmonk.org Sat Dec 6 11:09:48 2003 From: petemar1 at perlmonk.org (petemar1) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] Programming Perl 3rd edition: In-Reply-To: Message-ID: The good books have color spines and use RepKover(TM). :) -----Original Message----- From: chicago-talk-bounces@mail.pm.org [mailto:chicago-talk-bounces@mail.pm.org]On Behalf Of Andy Lester Sent: Friday, December 05, 2003 12:15 PM To: Chicago.pm chatter Subject: Re: [Chicago-talk] Programming Perl 3rd edition: > does anyone know if there is a difference between the blue and white > covered > Programming Perl 3rd Edition books? Identical. ORA went to that reverse color scheme for a few months, and then switched back. xoa -- Andy Lester andy@petdance.com, AIM:petdance http://petdance.com/ http://use.perl.org/~petdance/ _______________________________________________ Chicago-talk mailing list Chicago-talk@mail.pm.org http://mail.pm.org/mailman/listinfo/chicago-talk From lembark at wrkhors.com Sat Dec 6 11:42:51 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] fork and talk to the parent In-Reply-To: <008801c3bb8a$a1965210$6405a8c0@a30> References: <002c01c3badc$6134d650$6405a8c0@a30> <86r7zjvrqe.fsf@blue.stonehenge.com><002901c3baed$a6426350$6405a8c0@a30> <1702820000.1070638190@[192.168.100.3]><006c01c3bb49$243f22b0$6405a8c0@a30> <81740000.1070667249@[192.168.200.4]> <008801c3bb8a$a1965210$6405a8c0@a30> Message-ID: <561350000.1070732571@[192.168.200.4]> -- Jay Strauss > The threading code I wrote seems to work in 5.6.1 too. > > How would I stress test it? I'm not reading an writing the same data at > the same time. that is, one thread writes to the data, and the other > tread reads it. Put read/write operations into a for loop: for( @readfromz ) { read_from $_; } if whatever your read_from does takes an argument then this'll test it that many ways. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From petemar1 at perlmonk.org Sat Dec 6 13:09:35 2003 From: petemar1 at perlmonk.org (petemar1) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] UML2Perl? In-Reply-To: Message-ID: Background: http://www.lysator.liu.se/~alla/dia/ http://dia2code.sourceforge.net/ http://droogs.org/autodia/ -----Original Message----- From: chicago-talk-bounces@mail.pm.org [mailto:chicago-talk-bounces@mail.pm.org]On Behalf Of petemar1 Sent: Saturday, December 06, 2003 12:29 AM To: Chicago.pm chatter Subject: [Chicago-talk] UML2Perl? Is there a freeware/shareware program to convert UML diagrams into barebones Perl code, similar to dia2code? _______________________________________________ Chicago-talk mailing list Chicago-talk@mail.pm.org http://mail.pm.org/mailman/listinfo/chicago-talk From lembark at wrkhors.com Sat Dec 6 16:45:44 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] Speaking of threading In-Reply-To: References: Message-ID: <808130000.1070750744@[192.168.200.4]> -- "Scott T. Hildreth" > > On 05-Dec-2003 Chris McAvoy wrote: >> You know, if anyone ever wants to do a talk on threading or forking perl, > > ...and Steve can add to his talk by adding debugging fork() with > $DB::fork_TTY, unless he already did. Unfortunately I could not > make it. > >> I'd be very interested. Lets say you debug something that forks. Without any preparation for it you'll get: main::(-e:1): 0 DB<1> fork ######### Forked, but do not know how to create a new TTY. ######### Since two debuggers fight for the same TTY, input is severely entangled. I know how to switch the output to a different window in xterms and OS/2 consoles only. For a manual switch, put the name of the created TTY in $DB::fork_TTY, or define a function DB::get_fork_TTY() returning this. On UNIX-like systems one can get the name of a TTY for the given window by typing tty, and disconnect the shell from TTY by sleep 1000000. With X11 you can: 1. open an xterm (whatever). 2. xterm -e 'tty; sleep 1d'; 3. perl -d as usual. 4. $DB::fork_TTY = ''; 5. Do whatever you like to debug the code. A slightly cleaner solution is to add one item into your #! code: sub DB::get_fork_TTY { $ENV{fork_TTY} } now you can: 1. open an xterm (whatever). 2. xterm -e 'tty; sleep 1d'; 3. fork_TTY='' perl -d foobar; So far as forks themlselves, a fork just creates a mostly-duplicate of the current process context. At the code level, the parent gets back a childs PID for a successful fork, the child gets back zero from the fork call, and failures return undef: if( (my $pid = fork) > 0 ) { # parent, this can wait, keep going, whatever. } elsif( defined $pid ) { # child do_the_deed; exit $status; } else { confess "Phorkaphobia: $!" } Main thing is to make REAL DAMN SURE THE CHILD EXITS or you'll probably cause phorkatosis, wherein the main loop keeps forking children that fork children that fork chidren that... eventually slurp up your symbol table and bring the SysAdmins breathing fire at you :-) If you want to just discharge the child proc's and don't really care what they do then setting $SIG{CHLD} = 'IGNORE' will cause the main code to reap the child proc's for you automically (instead of leaving zombies around). This is described in perldoc perlipc if you search for "CHLD". The "wait" function is used to wait for child exits: wait Behaves like the wait(2) system call on your system: it waits for a child process to terminate and returns the pid of the deceased process, or "-1" if there are no child processes. The status is returned in $?. Note that a return value of "-1" could mean that child processes are being automati- cally reaped, as described in perlipc. If you care what happend to the child proc's you can use wait to block until something exits: my $logpath = "$logdir/blah"; if( (my $pid = fork) > 0 ) { $childmeta{$pid} = { logpath => $logpath }; } elsif( defined $pid ) { open STDOUT, '>', $logpath or die "$logpath: $!"; ... } ... # block on sigchld, basically. # wait hands back the child process if( (my $pid = wait) > 0 ) { if( $? ) { # bad news, boss... if( my $status = $? >> 8 ) { carp "exit( $status ) by $pid"; } elsif( my $signal = $? & 0xFF ) { carp "kill SIG-$signal on $pid"; } } else { # don't leave around log files for completed jobs # unless they contain something or the job exited # nonzero. my $path = $childmeta{$pid}->{logpath} or die "Bogus childmeta: no data for $pid"; unlink $path unless -s $path; } } else { print "All child proc's exited..."; exit 0; } This is more-or-less what happens in Schedule::Parallel, which keeps a fixed number of jobs running in parallel: my @jobz = foo_hook; my $jobcount = bar_hook; forkify splice @jobz, 0, $jobcount; while( (my $pid = wait) > 0 ) { forkify shift @jobz if @jobz; } The if-block on fork is basically all that forkify does. Pre-forking however many jobs are supposed to run in parallel leaves wait blocking on the first job that exits. When that happens a new job is forked off if there is anything left to do. Then @jobs is exhausted the loop waits for the last few jobs to finish and falls out of the loop when wait returns -1 (no jobs to wait for). The "system" function is basically a fork/exec/wait all wrapped in a nice, neat bundle for you so that you don't have to deal with this stuff, just the return values. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From lembark at wrkhors.com Sun Dec 7 11:53:44 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] UML2Perl? In-Reply-To: References: Message-ID: <1632290000.1070819624@[192.168.200.4]> > http://dia2code.sourceforge.net/ Dia saves it s output as XML to begin with and Perl has good enough XML support that you should be able to construct the basics -- mostly package and method names -- directly from the dia output. Data structures in Perlare fluid enough to leave that portion striaghtforward also. So, why not just plug a Perl compnent into dia2code? -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From petemar1 at perlmonk.org Sun Dec 7 16:37:15 2003 From: petemar1 at perlmonk.org (petemar1) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] UML2Perl? In-Reply-To: <1632290000.1070819624@[192.168.200.4]> Message-ID: "O great sage, some of us are still mastering the art." I'm still figuring out how to write an OOPerl interface, implement it and instatiate the implementation as an object in and app, if that's even possible or necessary. Once I grok that, then I can worry about a dia2code plugin that exports runnable, sensible (Perl that looks like Perl) perlcode. -----Original Message----- From: chicago-talk-bounces@mail.pm.org [mailto:chicago-talk-bounces@mail.pm.org]On Behalf Of Steven Lembark Sent: Sunday, December 07, 2003 11:54 AM To: Chicago.pm chatter Subject: RE: [Chicago-talk] UML2Perl? > http://dia2code.sourceforge.net/ Dia saves it s output as XML to begin with and Perl has good enough XML support that you should be able to construct the basics -- mostly package and method names -- directly from the dia output. Data structures in Perlare fluid enough to leave that portion striaghtforward also. So, why not just plug a Perl compnent into dia2code? -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 _______________________________________________ Chicago-talk mailing list Chicago-talk@mail.pm.org http://mail.pm.org/mailman/listinfo/chicago-talk From gdf at speakeasy.net Sun Dec 7 20:44:34 2003 From: gdf at speakeasy.net (Greg Fast) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] Speaking of threading In-Reply-To: <89860000.1070668155@[192.168.200.4]> References: <89860000.1070668155@[192.168.200.4]> <200312052121.hB5LL6K15651@mail.pm.org> Message-ID: <200312080244.hB82iaj15199@mail.pm.org> On Fri, 05 Dec 2003 17:49:15 -0600, Steven Lembark wrote: > -- Greg Fast > > general reaction I've gotten from most folk I've talked to has been > > "perl threads are scary and I don't want to compile my own perl". > > Ask the same people if they drive on the highway. You've > got much better odds of getting killed walking across the > street :-) > > q.e.d., the unknown is always more frightening than reality. I agree with your conclusion, though I think you need to double-check your stats on highway fatalities :) I'm still unsure that threaded perls are very widespread, though. If I write an app for my own use I don't mind. If I'm writing it for a larger audience, it's got strikes against it if the first install step for a large set of people is going to be "compile a new perl, plus lots of modules" (threaded and non- perls are binary incompatible, so any XS modules have to be reinstalled under the new perl). Any sense for what, say, various Linux distros ship with? -- Greg Fast http://cken.chi.groogroo.com/~gdf/ From me at heyjay.com Sun Dec 7 21:46:38 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] Speaking of threading References: <89860000.1070668155@[192.168.200.4]><200312052121.hB5LL6K15651@mail.pm.org> <200312080244.hB82iaj15199@mail.pm.org> Message-ID: <004501c3bd3d$e387d310$6405a8c0@a30> 5.6.1 on debian (stable, Woody) does not come with thread support, Activestate for windows does ----- Original Message ----- From: "Greg Fast" To: "Chicago.pm chatter" Sent: Sunday, December 07, 2003 8:44 PM Subject: Re: [Chicago-talk] Speaking of threading > On Fri, 05 Dec 2003 17:49:15 -0600, Steven Lembark wrote: > > -- Greg Fast > > > general reaction I've gotten from most folk I've talked to has been > > > "perl threads are scary and I don't want to compile my own perl". > > > > Ask the same people if they drive on the highway. You've > > got much better odds of getting killed walking across the > > street :-) > > > > q.e.d., the unknown is always more frightening than reality. > > I agree with your conclusion, though I think you need to double-check > your stats on highway fatalities :) > > I'm still unsure that threaded perls are very widespread, though. If > I write an app for my own use I don't mind. If I'm writing it for a > larger audience, it's got strikes against it if the first install step > for a large set of people is going to be "compile a new perl, plus > lots of modules" (threaded and non- perls are binary incompatible, so > any XS modules have to be reinstalled under the new perl). > > Any sense for what, say, various Linux distros ship with? > > -- > Greg Fast > http://cken.chi.groogroo.com/~gdf/ > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > From lembark at wrkhors.com Mon Dec 8 08:35:24 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] Speaking of threading In-Reply-To: <200312080244.hB82iaj15199@mail.pm.org> References: <89860000.1070668155@[192.168.200.4]> <200312052121.hB5LL6K15651@mail.pm.org> <200312080244.hB82iaj15199@mail.pm.org> Message-ID: <2546270000.1070894124@[192.168.200.4]> > lots of modules" (threaded and non- perls are binary incompatible, so > any XS modules have to be reinstalled under the new perl). > > Any sense for what, say, various Linux distros ship with? Noone ships with much of anything threaded by default, aside from perhaps POSIX & linux threads in libc. Threads are pretty much a non-issue for anyone that doesn't really knead them. Part of that is due to the fairly painful nature of threads in most situations: all you really get from a thread is your own instruction counter and exit status buffer. Perl's model (at least as of 5.8) is quite a bit more managable and may help change people's minds. Installing a threaded perl is mostly a matter of running 'perl -V' to see the original config arg's, then running Configure with '-de', a new preifx and threading argument. It isn't rocket science and if you really are working with something that needs threads it isn't hard to do. One thing that works againsed threading is clustering, which is where the largest systems are heading. If you think the code may live in a cluster then you have to use message passing to begin with to support the multi- host environment. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From Dooley.Michael at con-way.com Tue Dec 9 10:13:43 2003 From: Dooley.Michael at con-way.com (Dooley, Michael) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] testing exit status of external program Message-ID: If I have a program like below how can I test the return value of the external program? open (FILE, "./test.file"); open (ES_CLIENT, "|shell_program"); while () { print ES_CLIENT $_;"\n"; } close (ES_CLIENT); close (FILE); [qgatu003]/export/home/mxdooley/mbi_script$cat test.file |shell_program 16:06:32: info: broker_path=qgatu003 16:06:32: warning: connect=10.40.11.28:9701 (Connection refused, tcp) 16:06:33: warning: broker_malfunction=10.40.11.28:9701 (reason=no_broker_reply, service=brokerService) 16:07:02: fatal: unable_to_resolve_or_connect_to_sclient=ES_MSGIN_RR [qgatu003]/export/home/mxdooley/mbi_script$print $? 1 From jthomasoniii at yahoo.com Tue Dec 9 10:17:40 2003 From: jthomasoniii at yahoo.com (Jim Thomason) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] testing exit status of external program In-Reply-To: Message-ID: <20031209161740.97164.qmail@web60201.mail.yahoo.com> $?. close (ES_CLIENT); print "ES_CLIENT returned $?"; (incidentally, I didn't remember the variable name, I just did a 'perldoc -f close' and got lucky) -Jim...... --- "Dooley, Michael" wrote: > If I have a program like below how can I test the > return value of the > external program? > > open (FILE, "./test.file"); > open (ES_CLIENT, "|shell_program"); > while () { > print ES_CLIENT $_;"\n"; > } > close (ES_CLIENT); > close (FILE); > > [qgatu003]/export/home/mxdooley/mbi_script$cat > test.file |shell_program > 16:06:32: info: broker_path=qgatu003 > 16:06:32: warning: connect=10.40.11.28:9701 > (Connection refused, tcp) > 16:06:33: warning: > broker_malfunction=10.40.11.28:9701 > (reason=no_broker_reply, service=brokerService) > 16:07:02: fatal: > unable_to_resolve_or_connect_to_sclient=ES_MSGIN_RR > > [qgatu003]/export/home/mxdooley/mbi_script$print $? > 1 > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk __________________________________ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/ From gdf at speakeasy.net Tue Dec 9 10:38:49 2003 From: gdf at speakeasy.net (Greg Fast) Date: Mon Aug 2 21:27:56 2004 Subject: [Chicago-talk] Speaking of threading In-Reply-To: <2546270000.1070894124@[192.168.200.4]> References: <2546270000.1070894124@[192.168.200.4]> <89860000.1070668155@[192.168.200.4]> <200312052121.hB5LL6K15651@mail.pm.org> <200312080244.hB82iaj15199@mail.pm.org> Message-ID: <200312091638.hB9Gcpp31504@mail.pm.org> On Mon, 08 Dec 2003 08:35:24 -0600, Steven Lembark wrote: > Noone ships with much of anything threaded by default, aside > from perhaps POSIX & linux threads in libc. You mean no one ships with threaded Perls by default? > Threads are pretty > much a non-issue for anyone that doesn't really knead them. > Part of that is due to the fairly painful nature of threads > in most situations: all you really get from a thread is your > own instruction counter and exit status buffer. Perl's model > (at least as of 5.8) is quite a bit more managable and may > help change people's minds. Frankly, having worked lot with standard Unix fork()-based multiprocessing and with more "modern" threaded environments (Java, Python, Ruby, etc), the advantages of threading over fork() are pretty self-evident. Once you have threading available, you have a whole bag of tricks available to you that people go to fantastic lengths to avoid (eg, see POE's choice of cooperative multitasking... my first reaction was, "what is this, Windows 3.1?"[1]). Even having to think about deadlock is easier than worrying about fork-bombing, end-status notification, child collection, IPC, et al. And, being able to (safely, easily, portably[2]) do more than one thing at once is pretty powerful, and rather addicting. As an example example, one of the common patterns in Java programs is the thread/task pool, which is pretty trivial to implement in an environment with lightweight threads. Doing it with fork() is pretty painful (one of the reasons the Subversion folks chose to use Apache as their engine, rather than trying to write their own pre-forking server scratch... a C example, but the techniques and issues for forking with Perl are basically the same). So I've always been a little confused that ithreads haven't been pushed more than they have. > Installing a threaded perl is mostly a matter of running > 'perl -V' to see the original config arg's, then running > Configure with '-de', a new preifx and threading argument. Easy for you, easy for me, not so easy for Grandma. [1] POE is pretty cool, though. [2] By "portably", I mean "given two ports of language X, the same code will run under both". fork() is not "portable" (though it's *mostly* portable, these days). -- Greg Fast http://cken.chi.groogroo.com/~gdf/ From jhubble at core.com Tue Dec 9 13:16:17 2003 From: jhubble at core.com (Jeremy Hubble) Date: Mon Aug 2 21:27:57 2004 Subject: [Chicago-talk] testing exit status of external program Message-ID: <200312091916.hB9JGJWq067198@mail5.mx.voyager.net> Sometimes the result may need a little TLC. I have worked with some apps (particularly Interwon's) where the result would have to be shifted 8 bits to get the 'real' return code. [I am not sure if this was due to something the app was doing, or if it was a perl issue.) Also, certain older versions of perl (in particular on AIX) did not have the return code available via $? when the perl process was spawned from another process. But with something simple like the code fragment, $? should be fine. Jeremy > $?. > > close (ES_CLIENT); > print "ES_CLIENT returned $?"; > > (incidentally, I didn't remember the variable name, I > just did a 'perldoc -f close' and got lucky) > > -Jim...... > > --- "Dooley, Michael" > wrote: > > If I have a program like below how can I test the > > return value of the > > external program? > > > > open (FILE, "./test.file"); > > open (ES_CLIENT, "|shell_program"); > > while () { > > print ES_CLIENT $_;"\n"; > > } > > close (ES_CLIENT); > > close (FILE); > > > > [qgatu003]/export/home/mxdooley/mbi_script$cat > > test.file |shell_program > > 16:06:32: info: broker_path=qgatu003 > > 16:06:32: warning: connect=10.40.11.28:9701 > > (Connection refused, tcp) > > 16:06:33: warning: > > broker_malfunction=10.40.11.28:9701 > > (reason=no_broker_reply, service=brokerService) > > 16:07:02: fatal: > > unable_to_resolve_or_connect_to_sclient=ES_MSGIN_RR > > > > [qgatu003]/export/home/mxdooley/mbi_script$print $? > > 1 > > _______________________________________________ > > Chicago-talk mailing list > > Chicago-talk@mail.pm.org > > http://mail.pm.org/mailman/listinfo/chicago-talk > > > __________________________________ > Do you Yahoo!? > New Yahoo! Photos - easier uploading and sharing. > http://photos.yahoo.com/ > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > From lembark at wrkhors.com Tue Dec 9 13:17:53 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:57 2004 Subject: [Chicago-talk] testing exit status of external program In-Reply-To: <20031209161740.97164.qmail@web60201.mail.yahoo.com> References: <20031209161740.97164.qmail@web60201.mail.yahoo.com> Message-ID: <177720000.1070997472@[192.168.100.3]> -- Jim Thomason > $?. > > close (ES_CLIENT); > print "ES_CLIENT returned $?"; On *NIX you can check $? a bit further -- see my previous email on forks for an example (or just grab Schedule::Parallel and look at the main loop). The Camel also has a short note on breaking up $? into exit status (what you usually care about), core dump, and signal components. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From lembark at wrkhors.com Tue Dec 9 13:19:15 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:57 2004 Subject: [Chicago-talk] testing exit status of external program In-Reply-To: <200312091916.hB9JGJWq067198@mail5.mx.voyager.net> References: <200312091916.hB9JGJWq067198@mail5.mx.voyager.net> Message-ID: <178690000.1070997554@[192.168.100.3]> -- Jeremy Hubble > Sometimes the result may need a little TLC. I have worked with some > apps (particularly Interwon's) where the result would have to be > shifted 8 bits to get the 'real' return code. [I am not sure if this > was due to something the app was doing, or if it was a perl issue.) > Also, certain older versions of perl (in particular on AIX) did not > have the return code available via $? when the perl process was spawned > from another process. The exit code and signal are always in separate bytes of $? on *NIX systems. In most cases you want to check for non-zero exit (program detected a problem and exited appropriately) vs. zapped by a signal (program may not have cleaned up after itself). -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From lembark at wrkhors.com Tue Dec 9 13:29:48 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:57 2004 Subject: [Chicago-talk] Speaking of threading In-Reply-To: <200312091638.hB9Gcpp31504@mail.pm.org> References: <2546270000.1070894124@[192.168.200.4]> <89860000.1070668155@[192.168.200.4]> <200312052121.hB5LL6K15651@mail.pm.org> <200312080244.hB82iaj15199@mail.pm.org> <200312091638.hB9Gcpp31504@mail.pm.org> Message-ID: <180290000.1070998187@[192.168.100.3]> -- Greg Fast > On Mon, 08 Dec 2003 08:35:24 -0600, Steven Lembark > wrote: >> Noone ships with much of anything threaded by default, aside >> from perhaps POSIX & linux threads in libc. > > You mean no one ships with threaded Perls by default? Not on *NIX that I've seen. > Frankly, having worked lot with standard Unix fork()-based > multiprocessing and with more "modern" threaded environments (Java, > Python, Ruby, etc), the advantages of threading over fork() are pretty > self-evident. Yeah: overwritten varibales, semaphonre and mutex lock waits :-) Threads can be useful, but forks are actually better for work where the child process may have to die independently of the parent, and threaded exec's are a real pain. > As an example example, one of the common patterns in Java programs is > the thread/task pool, which is pretty trivial to implement in an > environment with lightweight threads. Doing it with fork() is pretty > painful (one of the reasons the Subversion folks chose to use Apache > as their engine, rather than trying to write their own pre-forking > server scratch... a C example, but the techniques and issues for > forking with Perl are basically the same). Until your pool is in a cluster, which doesn't support any notion of a distributed thread even it can handle a virtual fork across nodes. > So I've always been a little confused that ithreads haven't been > pushed more than they have. They can be a bear to manage properly at low levels, and easily lead to reduced performance if you are not careful to manage synchronization points. The main problem for most cases is lack of private data (which perl-5.8 solves by privatizing lexicals). Closures provide one good way to deal with this by dispatching threads to deal with non- overlapping portions of data but you still get into issues with returning data into the common pool. Threads can be a Real Nice Thing (tm) but are like any other technology: used incorrectly they can cause pain. > [2] By "portably", I mean "given two ports of language X, the same > code will run under both". fork() is not "portable" (though it's > *mostly* portable, these days). Neither are threads, depending on your threading model and what's supported on the configuration (e.g., cluster). I'm doing more work on Beowulf clusters lately, which leaves message passing as the best way to move data. Given a decent high-level message handling library (e.g., PVM) it's no more work to fork-and-wait than split off threads. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From Dooley.Michael at con-way.com Tue Dec 9 16:50:23 2003 From: Dooley.Michael at con-way.com (Dooley, Michael) Date: Mon Aug 2 21:27:57 2004 Subject: [Chicago-talk] pid files and whatchamacalits. Message-ID: I have a perl script that runs via cron. outside of checking for a pid file does anyone have any cleaner ways of checking to see if the script is already running? I was looking at Proc::PID_File. but I would like to try and stay with the default install of perl. This is perl, v5.8.0 built for sun4-solaris Is below a standard way to do this? if (-e "/tmp/pid.file") { exit; } else { open (PID, ">/tmp/pid.file"); print PID $$; close PID; } From jthomasoniii at yahoo.com Tue Dec 9 16:56:55 2003 From: jthomasoniii at yahoo.com (Jim Thomason) Date: Mon Aug 2 21:27:57 2004 Subject: [Chicago-talk] pid files and whatchamacalits. In-Reply-To: Message-ID: <20031209225655.28204.qmail@web60206.mail.yahoo.com> If you're guaranteed that the script has a unique name, you could always just do a ps (however you prefer) and check to see if it's running in there. Still not exactly pretty, but it saves you the temp file. -Jim.... --- "Dooley, Michael" wrote: > I have a perl script that runs via cron. > > outside of checking for a pid file does anyone have > any cleaner ways of > checking to see if the script is already running? > > I was looking at Proc::PID_File. but I would like to > try and stay with the > default install of perl. > This is perl, v5.8.0 built for sun4-solaris > > Is below a standard way to do this? > > if (-e "/tmp/pid.file") { > exit; > } else { > open (PID, ">/tmp/pid.file"); > print PID $$; > close PID; > } > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk __________________________________ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/ From ehs at pobox.com Tue Dec 9 17:12:25 2003 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:27:57 2004 Subject: [Chicago-talk] pid files and whatchamacalits. In-Reply-To: References: Message-ID: <20031209231225.GA2048@chloe.inkdroid.org> On Tue, Dec 09, 2003 at 02:50:23PM -0800, Dooley, Michael wrote: > outside of checking for a pid file does anyone have any cleaner ways of > checking to see if the script is already running? This isn't solving the problem with Perl, but when you install Bernstein's daemontools package [1] you get a handy little program called setlock [2]. setlock is useful in cron scripts since all you have to do is: * * * * * setlock -n /tmp/progname.lock progname.pl Where /tmp/progname.lock is the name of the lock file you want to use. The -n says don't bother waiting for the lock to be released. //Ed [1] http://cr.yp.to/daemontools.html [2] http://cr.yp.to/daemontools/setlock.html From mike at oobak.org Tue Dec 9 17:52:19 2003 From: mike at oobak.org (Mike Pastore) Date: Mon Aug 2 21:27:57 2004 Subject: [Chicago-talk] pid files and whatchamacalits. In-Reply-To: References: Message-ID: <1071013938.16451.10.camel@woody.star.niu.edu> Whenever I run into something like this, I like to check and see how some other Perl program or module does it. For example, CPAN.pm examines the contents of a pidfile, much like what you're doing. (Search for "sub checklock" to see exactly how.) -- Mike Pastore mike@oobak.org On Tue, 2003-12-09 at 16:50, Dooley, Michael wrote: > I have a perl script that runs via cron. > > outside of checking for a pid file does anyone have any cleaner ways of > checking to see if the script is already running? > > I was looking at Proc::PID_File. but I would like to try and stay with the > default install of perl. > This is perl, v5.8.0 built for sun4-solaris > > Is below a standard way to do this? > > if (-e "/tmp/pid.file") { > exit; > } else { > open (PID, ">/tmp/pid.file"); > print PID $$; > close PID; > } > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk From lembark at wrkhors.com Tue Dec 9 22:32:15 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:57 2004 Subject: [Chicago-talk] pid files and whatchamacalits. In-Reply-To: References: Message-ID: <3746030000.1071030735@[192.168.200.4]> -- "Dooley, Michael" > I have a perl script that runs via cron. > > outside of checking for a pid file does anyone have any cleaner ways of > checking to see if the script is already running? > > I was looking at Proc::PID_File. but I would like to try and stay with the > default install of perl. > This is perl, v5.8.0 built for sun4-solaris > > Is below a standard way to do this? > > if (-e "/tmp/pid.file") { > exit; > } else { > open (PID, ">/tmp/pid.file"); > print PID $$; > close PID; > } Logic race: you can have multiple proc's checking the file's existance and blowing up trying to create the file... Check File::Temp for a better way (hands back a path and open FD in one pass). use File::Temp; use File::Basename; my $base = basename $0; if( my($fh,$path) = tempfile $base . "XXX", DIR => '/var/run' ) { print $fh $$ close $fh; print STDERR "Pidfile: $fh"; } ... unlink $path; This'll give you a guaranteed pidfile. If what you really want is a semaphore file then consider using either a directory (mkdir is a system call on *NIX and is therefore atomic) or a samaphore to test for the running program. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From lembark at wrkhors.com Tue Dec 9 22:33:51 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:57 2004 Subject: [Chicago-talk] pid files and whatchamacalits. In-Reply-To: <20031209225655.28204.qmail@web60206.mail.yahoo.com> References: <20031209225655.28204.qmail@web60206.mail.yahoo.com> Message-ID: <3748000000.1071030831@[192.168.200.4]> -- Jim Thomason > If you're guaranteed that the script has a unique > name, you could always just do a ps (however you > prefer) and check to see if it's running in there. > > Still not exactly pretty, but it saves you the temp > file. Is there a logic race in the process table code? I think there might be if you use the perl lib's to handle it (don't know if qx introduces enough delay to possibly thwart ps). -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From gdf at speakeasy.net Wed Dec 10 11:13:41 2003 From: gdf at speakeasy.net (Greg Fast) Date: Mon Aug 2 21:27:57 2004 Subject: [Chicago-talk] Speaking of threading In-Reply-To: <180290000.1070998187@[192.168.100.3]> References: <180290000.1070998187@[192.168.100.3]> <2546270000.1070894124@[192.168.200.4]> <89860000.1070668155@[192.168.200.4]> <200312052121.hB5LL6K15651@mail.pm.org> <200312080244.hB82iaj15199@mail.pm.org> Message-ID: <200312101713.hBAHDiP09472@mail.pm.org> On Tue, 09 Dec 2003 13:29:48 -0600, Steven Lembark wrote: > -- Greg Fast > > Python, Ruby, etc), the advantages of threading over fork() are pretty > > self-evident. > > Yeah: overwritten varibales, semaphonre and mutex lock waits :-) You have to deal with shared resource contention in a multiprocessing system too, you just don't get help from the language. "Hey, why does my temp file keep getting truncated?" > The main problem for > most cases is lack of private data (which perl-5.8 solves > by privatizing lexicals). In Java (say), the typical practice is to extend the Thread class (or, equivalently for this situation, implement Runnable), and create a new object encapsulating each thread of execution. Thus, private per-thread data. Having multiple threads call methods on a shared object is an issue for synchronization, but I personally think explicitly marked potential bottlenecks are easier to deal with than implicitly entwined resource conflicts. > > [2] By "portably", I mean "given two ports of language X, the same > > code will run under both". fork() is not "portable" (though it's > > *mostly* portable, these days). > > Neither are threads, depending on your threading model > and what's supported on the configuration (e.g., cluster). If I have a Java (or Python, or Ruby) program using threads, and I run it on random platform X, I know it will work because the implementation is hidden by standard language constructs. If I have a Perl prog using fork() it may not work, depending on whether random platform X's implementation of Perl implements fork() (as win32 Perls didn't, for years). Not a pro or con, necessarily, just a definition. Anyway, YMMV I guess. -- Greg Fast http://cken.chi.groogroo.com/~gdf/ From lembark at wrkhors.com Wed Dec 10 13:07:23 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:57 2004 Subject: [Chicago-talk] Speaking of threading In-Reply-To: <200312101713.hBAHDiP09472@mail.pm.org> References: <180290000.1070998187@[192.168.100.3]> <2546270000.1070894124@[192.168.200.4]> <89860000.1070668155@[192.168.200.4]> <200312052121.hB5LL6K15651@mail.pm.org> <200312080244.hB82iaj15199@mail.pm.org> <200312101713.hBAHDiP09472@mail.pm.org> Message-ID: <59462704.1071083243@[192.168.200.4]> -- Greg Fast > On Tue, 09 Dec 2003 13:29:48 -0600, Steven Lembark > wrote: >> -- Greg Fast >> > Python, Ruby, etc), the advantages of threading over fork() are pretty >> > self-evident. >> >> Yeah: overwritten varibales, semaphonre and mutex lock waits :-) > > You have to deal with shared resource contention in a multiprocessing > system too, you just don't get help from the language. "Hey, why > does my temp file keep getting truncated?" The one thing I still have not seen a good solution for, mainly an issue with thread-pool situations, is how to kill one thread. I don't know if anyone has found a good way to attach some kind of secondary data outside the signal that will allow the signal handler to zap just one thread. > In Java (say), the typical practice is to extend the Thread class (or, > equivalently for this situation, implement Runnable), and create a new > object encapsulating each thread of execution. Thus, private > per-thread data. Having multiple threads call methods on a shared > object is an issue for synchronization, but I personally think > explicitly marked potential bottlenecks are easier to deal with than > implicitly entwined resource conflicts. I spent 3+ months at one site converting the 15_000 (no typo) java classes they had created into HTML so that we could track the bottlenecks. One of the main ones was that they had picked a java hash as the base data type for their "container" class. Catch: java hashes have a built-in semaphore (at least they did w/ Sun's implementation back then). Net result was that even if they didn't have multiple threads tickling the data struct's they still had to stop and check the semaphore. Somehow, I have to believe that the nice folks at Sun could've just developed a threading modle that encapsulated the thread and saved you the trouble and however many more people the mistakes. > If I have a Java (or Python, or Ruby) program using threads, and I run > it on random platform X, I know it will work because the > implementation is hidden by standard language constructs. If I have a > Perl prog using fork() it may not work, depending on whether random > platform X's implementation of Perl implements fork() (as win32 Perls > didn't, for years). Not a pro or con, necessarily, just a definition. > > Anyway, YMMV I guess. It has varied, considerably, for code developed on windog and run on a "universal" platform such as java. In most cases the code does not work becuase of differences in the java engines used on the differing platforms -- Solaris, NT/W32, AIX, and OpenVMS have java runtime engins and lib's that are incompatable in various ways. There are any number of perl-isms that did not port well to W32, many of which have been solved over time. The main difference I've seen as a consultant cleaning up things is that many people took Sun's sales pitch about write once a bit too seriously and were unprepared when it didn't run everywhere. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From jthomasoniii at yahoo.com Thu Dec 11 14:29:36 2003 From: jthomasoniii at yahoo.com (Jim Thomason) Date: Mon Aug 2 21:27:57 2004 Subject: [Chicago-talk] postgres and COPY statements Message-ID: <20031211202936.9509.qmail@web60210.mail.yahoo.com> Anybody here successfully used DBD::Pg for a COPY statement? I haven't had any luck tracking down docs or examples, except for a very small one. I love the fact that the pod says "ooh, just look at test.pl, which we've included" which is dandy, except for the fact that they didn't. Sigh. Here's the relevant code snippet: my $copy_into_student_answers = $dbh->prepare(<<"eSQL"); COPY bm_student_answers (bm_publication_id, user_id, school_id, bm_question_id, bm_answer_id) FROM stdin eSQL $copy_into_student_answers->execute(); foreach (@insert) { my $ret = $dbh->func($_, 'putline'); print "INSERT ($ret) $_"; }; my $r = $dbh->func("\\.\n", 'putline'); $copy_into_student_answers->finish() || die "SHIT!"; Everything works. Returns are always 1, no problems on the prep or the exec, and then I get: DBD::Pg::st execute failed: COPY state must be terminated first at... on my next sth execute. Which to me implies that postgres isn't acknowledging the \. to terminate the copy. changing to a single \. w/o newline or a \. with 2 newlines doesn't matter. Incidentally, I also know that I can dump my output to a file with the identical copy statement and it succeeds. So I'm stumped. Anybody have any suggestions? -Jim.... __________________________________ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/ From jthomasoniii at yahoo.com Thu Dec 11 17:04:16 2003 From: jthomasoniii at yahoo.com (Jim Thomason) Date: Mon Aug 2 21:27:57 2004 Subject: [Chicago-talk] Re: postgres and COPY statements Message-ID: <20031211230416.41772.qmail@web60202.mail.yahoo.com> What an ever-lovin' pain in the ass. But I finally tracked it down and figured it out. After a lot of searching, tons of testing, iterations,ideas, dead-ends, etc., I managed to track down a page off of google groups in Japanese (I think, I'm not exactly up on my asian languages). Fortunately, perl is perl, and it was still readable. It also referenced a little function I'd never seen before that proved to be the solution. $dbh->func('endcopy'); So the full thing for me becomes: $copy_into_student_answers->execute(); foreach (@insert) { my $ret = $dbh->func($_, 'putline'); print "INSERT ($ret) $_"; }; my $r = $dbh->func("\\.\n", 'putline'); $dbh->func('endcopy'); And it runs like a dream. At this point, it didn't shave a lot of runtime off of my test file (since I'm caching other values like mad), but it still brought the time down from 1m30s to 1m10s and it should have a bigger effect on files that require more database reads. that 'endcopy' does exist in DBD::Pg (in Pg.xs, large_obhect.h and large_object.c) but is utterly undocumented anywhere in DBD::Pg. Doesn't appear to be part of DBI, either, so it's not there. What a pain in the ass. An utterly vital component, and no reference to it whatsoever. It's incidents like this that turn people off to open source. Document your code! -Jim..... __________________________________ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/ From petemar1 at perlmonk.org Fri Dec 12 13:16:46 2003 From: petemar1 at perlmonk.org (petemar1) Date: Mon Aug 2 21:27:57 2004 Subject: [Chicago-talk] "I don't have permission to install a module on the system!" In-Reply-To: <59462704.1071083243@[192.168.200.4]> Message-ID: Hello: http://www.perlmonks.org/index.pl?node_id=128077#permission I Read and followed The Friendly, shiny Manual and met with limited results when attempting to install modules without root. Any pointers, hints or helpful riddles? Does one need root for CPAN.pm? .pm1 From andy at petdance.com Fri Dec 12 13:23:29 2003 From: andy at petdance.com (Andy Lester) Date: Mon Aug 2 21:27:57 2004 Subject: [Chicago-talk] "I don't have permission to install a module on the system!" In-Reply-To: References: <59462704.1071083243@[192.168.200.4]> Message-ID: <20031212192329.GB26249@petdance.com> > I Read and followed The Friendly, shiny Manual and met with limited results > when attempting to install modules without root. Any pointers, hints or > helpful riddles? Does one need root for CPAN.pm? You need to install the modules to your home directory. Do this: perl Makefile.PL PREFIX=/your/home/directory/lib make make test make install xoa -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance From ejanev2 at yahoo.com Fri Dec 12 15:34:13 2003 From: ejanev2 at yahoo.com (Emil Janev) Date: Mon Aug 2 21:27:57 2004 Subject: [Chicago-talk] Problem with installing DBI.pm under SCO Message-ID: <20031212213413.65507.qmail@web21506.mail.yahoo.com> Hi, First, I am fan of "ppm" way of installing of modules. With CPAN.pm under Windows I haven't have any issue too ( I am using Active State Perl 5.8.0 ). Only issue I had was DBD::Oracle, but I ended up with DBD::ODBC. A use SCO box, with OpenServer 5.0.5 ( I cannot change this fact :-( ). Perl is installed as a Skunkware package ( ftp://ftp2.sco.com/pub/skunkware/osr5/vols/ ). It is actually the latest version available from there. $ perl -v This is perl, version 5.005_03 built for i386-sco I have been using it for text processing and small admin tasks. For other tasks I am using one on my Win PC. I finally added direct access to the internet from this SCO box, so I was lucky that I can use CPAN.pm. I installed several packages without a problem ( Bundle::libnet among others). The problem appeared with "DBI.pm", actually "T/TI/TIMB/DBI-1.14.tar.gz" ( as newer ones were requiring at least perl 5.006 ). Here are the problems reported: --------------------------------------------------------------------------------------------- ... Manifying blib/man3/DBD::Multiplex.3 Manifying blib/man3/DBD::ADO.3 /udk/usr/ccs/bin/make -- OK Running make test PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib -I/usr/local/lib/ perl5/5.00503/i386-sco -I/usr/local/lib/perl5/5.00503 -e 'use Test::Harness qw(& runtests $verbose); $verbose=0; runtests @ARGV;' t/*.t t/basics......Can't load 'blib/arch/auto/DBI/DBI.so' for module DBI: dynamic lin ker: /usr/bin/perl: OpenServer binary cannot load Gemini shared object: blib/arc h/auto/DBI/DBI.so at /usr/local/lib/perl5/5.00503/i386-sco/DynaLoader.pm line 16 9. at blib/lib/DBI.pm line 182 BEGIN failed--compilation aborted at blib/lib/DBI.pm line 182. BEGIN failed--compilation aborted at t/basics.t line 17. t/basics......dubious Test returned status 255 (wstat 65280, 0xff00) t/dbidrv......Can't load 'blib/arch/auto/DBI/DBI.so' for module DBI: dynamic lin ker: /usr/bin/perl: OpenServer binary cannot load Gemini shared object: blib/arc h/auto/DBI/DBI.so at /usr/local/lib/perl5/5.00503/i386-sco/DynaLoader.pm line 16 9. at blib/lib/DBI.pm line 182 BEGIN failed--compilation aborted at blib/lib/DBI.pm line 182. BEGIN failed--compilation aborted at t/dbidrv.t line 2. t/dbidrv......dubious Test returned status 255 (wstat 65280, 0xff00) t/examp.......Can't load 'blib/arch/auto/DBI/DBI.so' for module DBI: dynamic lin ker: /usr/bin/perl: OpenServer binary cannot load Gemini shared object: blib/arc h/auto/DBI/DBI.so at /usr/local/lib/perl5/5.00503/i386-sco/DynaLoader.pm line 16 9. at blib/lib/DBI.pm line 182 BEGIN failed--compilation aborted at blib/lib/DBI.pm line 182. BEGIN failed--compilation aborted at t/examp.t line 4. t/examp.......dubious Test returned status 255 (wstat 65280, 0xff00) t/meta........Can't load 'blib/arch/auto/DBI/DBI.so' for module DBI: dynamic lin ker: /usr/bin/perl: OpenServer binary cannot load Gemini shared object: blib/arc h/auto/DBI/DBI.so at /usr/local/lib/perl5/5.00503/i386-sco/DynaLoader.pm line 16 9. at blib/lib/DBI.pm line 182 BEGIN failed--compilation aborted at blib/lib/DBI.pm line 182. BEGIN failed--compilation aborted at t/meta.t line 17. t/meta........dubious Test returned status 255 (wstat 65280, 0xff00) t/proxy.......Can't load 'blib/arch/auto/DBI/DBI.so' for module DBI: dynamic lin ker: /usr/bin/perl: OpenServer binary cannot load Gemini shared object: blib/arc h/auto/DBI/DBI.so at /usr/local/lib/perl5/5.00503/i386-sco/DynaLoader.pm line 16 9. at blib/lib/DBI.pm line 182 BEGIN failed--compilation aborted at blib/lib/DBI.pm line 182. t/proxy.......dubious Test returned status 255 (wstat 65280, 0xff00) t/shell.......Can't load 'blib/arch/auto/DBI/DBI.so' for module DBI: dynamic lin ker: /usr/bin/perl: OpenServer binary cannot load Gemini shared object: blib/arc h/auto/DBI/DBI.so at /usr/local/lib/perl5/5.00503/i386-sco/DynaLoader.pm line 16 9. at blib/lib/DBI.pm line 182 BEGIN failed--compilation aborted at blib/lib/DBI.pm line 182. BEGIN failed--compilation aborted at blib/lib/DBI/Shell.pm line 74. BEGIN failed--compilation aborted at t/shell.t line 29. t/shell.......dubious Test returned status 255 (wstat 65280, 0xff00) t/subclass....Can't load 'blib/arch/auto/DBI/DBI.so' for module DBI: dynamic lin ker: /usr/bin/perl: OpenServer binary cannot load Gemini shared object: blib/arc h/auto/DBI/DBI.so at /usr/local/lib/perl5/5.00503/i386-sco/DynaLoader.pm line 16 9. at blib/lib/DBI.pm line 182 BEGIN failed--compilation aborted at blib/lib/DBI.pm line 182. BEGIN failed--compilation aborted at t/subclass.t line 63. t/subclass....dubious Test returned status 255 (wstat 65280, 0xff00) FAILED--7 test scripts could be run, alas--no output ever seen *** Error code 2 (bu21) UX:make: ERROR: fatal error. /udk/usr/ccs/bin/make test -- NOT OK Running make install make test had returned bad status, won't install without force cpan> ---------------------------------------------------------------------------------------- Any information / advice is welcome. Thanks a lot, Emil __________________________________ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/ From Dooley.Michael at con-way.com Mon Dec 15 09:44:07 2003 From: Dooley.Michael at con-way.com (Dooley, Michael) Date: Mon Aug 2 21:27:57 2004 Subject: [Chicago-talk] print keys for anon hash Message-ID: How do I print out the keys for a specific anon hash? if I say print $crew[0]{'name'},"\n"; I can get the name of a specific key but what if I wanted all the keys for that anon hash? am I missing something? #!/usr/bin/perl -w use strict; my @crew = ( { name => 'Gilligan', hat => 'White', shirt=>'red', position=>'first mate', }, { name => 'Skipper', hat => 'Black', shirt=>'Blue', position=>'Captain', }, ); print keys ($crew[0]),"\n"; [qgatu003]/export/home/mxdooley/perl_objects_references_modules/chap04$./tes t.pl Type of arg 1 to keys must be hash (not array element) at ./test.pl line 20, near "])" Execution of ./test.pl aborted due to compilation errors. Mike From tkearney at fastweb.com Mon Dec 15 09:50:55 2003 From: tkearney at fastweb.com (Kearney, Tim) Date: Mon Aug 2 21:27:57 2004 Subject: [Chicago-talk] print keys for anon hash Message-ID: # for the first anonymous hash foreach my $key (keys %{$crew[0]}) { print "found $key\n"; } # for the second anonymous hash foreach my $key (keys %{$crew[1]}) { print "found $key\n"; } # etc. -- Tim -----Original Message----- From: Dooley, Michael [mailto:Dooley.Michael@con-way.com] Sent: Monday, December 15, 2003 9:44 AM To: Chicago.pm chatter Subject: [Chicago-talk] print keys for anon hash How do I print out the keys for a specific anon hash? if I say print $crew[0]{'name'},"\n"; I can get the name of a specific key but what if I wanted all the keys for that anon hash? am I missing something? #!/usr/bin/perl -w use strict; my @crew = ( { name => 'Gilligan', hat => 'White', shirt=>'red', position=>'first mate', }, { name => 'Skipper', hat => 'Black', shirt=>'Blue', position=>'Captain', }, ); print keys ($crew[0]),"\n"; [qgatu003]/export/home/mxdooley/perl_objects_references_modules/chap04$./tes t.pl Type of arg 1 to keys must be hash (not array element) at ./test.pl line 20, near "])" Execution of ./test.pl aborted due to compilation errors. Mike _______________________________________________ Chicago-talk mailing list Chicago-talk@mail.pm.org http://mail.pm.org/mailman/listinfo/chicago-talk "Bringing people together to advance their lives." -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/chicago-talk/attachments/20031215/b1c39f61/attachment.htm From andy at petdance.com Mon Dec 15 09:50:42 2003 From: andy at petdance.com (Andy Lester) Date: Mon Aug 2 21:27:57 2004 Subject: [Chicago-talk] print keys for anon hash In-Reply-To: References: Message-ID: <20031215155042.GC21211@petdance.com> > my @crew = ( > { > name => 'Gilligan', > hat => 'White', > shirt=>'red', > position=>'first mate', > }, > ); > > print keys ($crew[0]),"\n"; $crew[0] is a hash reference, not a hash. keys() operates on a hash. You have to say keys %{$crew[0]} xoa -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance From Dooley.Michael at con-way.com Mon Dec 15 09:54:44 2003 From: Dooley.Michael at con-way.com (Dooley, Michael) Date: Mon Aug 2 21:27:57 2004 Subject: [Chicago-talk] print keys for anon hash Message-ID: yeah after I kept reading I figured it out. thanx for the quick reply tho. From lembark at wrkhors.com Mon Dec 15 11:03:26 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:57 2004 Subject: [Chicago-talk] print keys for anon hash In-Reply-To: References: Message-ID: <69570000.1071507806@[192.168.100.3]> -- "Dooley, Michael" > How do I print out the keys for a specific anon hash? Given you have the anon hash stored in a scalar somewhere (otherwise it's gone for good) use "keys %$referent" rather than "keys %hash". If your referent is buried inside of a data structure then sourround it with curlies ("{}") to manage the order of precidence: print keys %$hashreferent; print keys %{ $hashreferent }; print keys %{ $hashlist[$offset] }; > if I say print $crew[0]{'name'},"\n"; I can get the name of a specific key > but what if I wanted all the keys for that anon hash? keys %{ $crew[0] } -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From lembark at wrkhors.com Mon Dec 15 11:10:47 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:57 2004 Subject: [Chicago-talk] "I don't have permission to install a module on the system!" In-Reply-To: References: Message-ID: <71690000.1071508246@[192.168.100.3]> -- petemar1 > Hello: > > http://www.perlmonks.org/index.pl?node_id=128077#permission > I Read and followed The Friendly, shiny Manual and met with limited > results when attempting to install modules without root. Any pointers, > hints or helpful riddles? Does one need root for CPAN.pm? Use the PREFIX option. You can, for example, create ~/perl5 and let it go from there. The problem you'll have without acess to some area that perl is looking for when it starts up is having to use use lib "$ENV{HOME}/perl5/lib"; in all of your code. Another approach is to symlink the necessary lib's from ~/perl5/lib into the current working directory -- since perl normally has '.' in @INC. Problem there is that the lib's will be at the end of your search and won't override out-of-date lib's in the main dir's: Characteristics of this binary (from libperl): Compile-time options: USE_LARGE_FILES Built under linux Compiled at Nov 26 2003 12:22:49 @INC: /opt/perl5/5.8/lib/5.8.2/i686-linux /opt/perl5/5.8/lib/5.8.2 /opt/perl5/5.8/lib/site_perl/5.8.2/i686-linux /opt/perl5/5.8/lib/site_perl/5.8.2 /opt/perl5/5.8/lib/site_perl . You can get around this with FindBin::libs (see example in the POD for it), but you'll have to convince the Powers That Be to install FB::libs into one of perl's hard-coded locations (it'll normally go into /.lib/site_perl/X.Y.Z/FindBin). You can also use the -I switch at the command line to include more dir's, but this precludes much #! code. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From lembark at wrkhors.com Mon Dec 15 11:13:19 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:57 2004 Subject: [Chicago-talk] "I don't have permission to install a module on the system!" In-Reply-To: <20031212192329.GB26249@petdance.com> References: <59462704.1071083243@[192.168.200.4]> <20031212192329.GB26249@petdance.com> Message-ID: <72390000.1071508399@[192.168.100.3]> -- Andy Lester >> I Read and followed The Friendly, shiny Manual and met with limited >> results when attempting to install modules without root. Any pointers, >> hints or helpful riddles? Does one need root for CPAN.pm? > > You need to install the modules to your home directory. Do this: > > perl Makefile.PL PREFIX=/your/home/directory/lib > make > make test > make install That or install them into a standard sandbox area. The main advantage to that -- aside from segregating the floatsom of development -- is being able to share the sandbox tree for common installs. If everyone can agree on a place to install non-stock modules you can use lib /common_area in all of the code; relying on perl code with "use lib $ENV{HOME}/blah" can be dangerous unless system has only a single user. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From lembark at wrkhors.com Mon Dec 15 11:19:37 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:57 2004 Subject: [Chicago-talk] Re: postgres and COPY statements In-Reply-To: <20031211230416.41772.qmail@web60202.mail.yahoo.com> References: <20031211230416.41772.qmail@web60202.mail.yahoo.com> Message-ID: <73950000.1071508776@[192.168.100.3]> > that 'endcopy' does exist in DBD::Pg (in Pg.xs, > large_obhect.h and large_object.c) but is utterly > undocumented anywhere in DBD::Pg. Doesn't appear to be > part of DBI, either, so it's not there. The func call is DBI's "ioctl" :-) Basically it's a way into the back end database's API. The doc's for it are buried somewere [deep] in the postgres doc's. >From DBI: Individual driver implementors are free to provide any private functions and/or handle attributes that they feel are useful. Private driver functions can be invoked using the DBI "func()" method. Private driver attributes are accessed just like standard attributes. I don't have DBD::pg lying around here but there is probably some caveat about having the API manual around somewhere [and perhaps a six pack] before venturing down that slippery slope. > What a pain in the ass. An utterly vital component, > and no reference to it whatsoever. It's incidents like > this that turn people off to open source. > > Document your code! True. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From lembark at wrkhors.com Mon Dec 15 11:25:30 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:57 2004 Subject: [Chicago-talk] Problem with installing DBI.pm under SCO In-Reply-To: <20031212213413.65507.qmail@web21506.mail.yahoo.com> References: <20031212213413.65507.qmail@web21506.mail.yahoo.com> Message-ID: <75080000.1071509129@[192.168.100.3]> > The problem appeared with "DBI.pm", actually "T/TI/TIMB/DBI-1.14.tar.gz" > ( as newer ones were requiring at least perl 5.006 ). Why not upgrade your perl version? -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From walter at torres.ws Mon Dec 15 11:37:14 2003 From: walter at torres.ws (Walter Torres) Date: Mon Aug 2 21:27:57 2004 Subject: [Chicago-talk] help with Reg Exp, pls... In-Reply-To: <20031125221748.GB26760@petdance.com> Message-ID: I've been pulling my hair out on this. I can't get a regExp to valid any of these names. All I want to know is if the string given passes or fails a test that can handle the examples below... Dr. Roger O'Malley Mrs. Sara Harris-Henderson Manuel Gonzalez Forsok Bokstaver Contem Espaco-Valido Any ideas? Thanks Walter From andy at petdance.com Mon Dec 15 11:44:12 2003 From: andy at petdance.com (Andy Lester) Date: Mon Aug 2 21:27:57 2004 Subject: [Chicago-talk] help with Reg Exp, pls... In-Reply-To: References: <20031125221748.GB26760@petdance.com> Message-ID: <20031215174412.GC22063@petdance.com> > I can't get a regExp to valid any of these names. > > All I want to know is if the string given passes or fails a test that can > handle the examples below... > > Dr. Roger O'Malley > Mrs. Sara Harris-Henderson > Manuel Gonzalez > Forsok Bokstaver > Contem Espaco-Valido What are the rules for the names? xoa -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance From jthomasoniii at yahoo.com Mon Dec 15 11:48:28 2003 From: jthomasoniii at yahoo.com (Jim Thomason) Date: Mon Aug 2 21:27:57 2004 Subject: [Chicago-talk] help with Reg Exp, pls... In-Reply-To: Message-ID: <20031215174828.9047.qmail@web60202.mail.yahoo.com> Unless I'm missing something, a little bit more information would be useful. For instance, what sorts of data should you be matching? How does it need to look? As is, a regex that matches all of those strings is as simple as m/./ :) But that's probably not terribly useful to you. So how -should- these names look, and then we can probably help out a bit more. (incidentally, it's also entirely possible that there's a CPAN module to do name validation, so it might also be good to look there) -Jim...... --- Walter Torres wrote: > I've been pulling my hair out on this. > > I can't get a regExp to valid any of these names. > > All I want to know is if the string given passes or > fails a test that can > handle the examples below... > > Dr. Roger O'Malley > Mrs. Sara Harris-Henderson > Manuel Gonzalez > Forsok Bokstaver > Contem Espaco-Valido > > Any ideas? > > Thanks > > Walter > > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk __________________________________ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/ From ejanev2 at yahoo.com Mon Dec 15 11:51:06 2003 From: ejanev2 at yahoo.com (Emil Janev) Date: Mon Aug 2 21:27:57 2004 Subject: [Chicago-talk] Problem with installing DBI.pm under SCO In-Reply-To: <75080000.1071509129@[192.168.100.3]> Message-ID: <20031215175106.48652.qmail@web21501.mail.yahoo.com> > Why not upgrade your perl version? Thanks for the proposal. I am considering this option. In this moment I am restricted in time that I can dedicate to it, but I am looking forward to acomplish that. It will be big step for me to build perl from source (I am poor in such expirience.). I suppose I'll have more questions when I am on that. --- Steven Lembark wrote: > > > The problem appeared with "DBI.pm", actually "T/TI/TIMB/DBI-1.14.tar.gz" > > ( as newer ones were requiring at least perl 5.006 ). > > Why not upgrade your perl version? > > > -- > Steven Lembark 2930 W. Palmer > Workhorse Computing Chicago, IL 60647 > +1 888 359 3508 > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk __________________________________ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/ From walter at torres.ws Mon Dec 15 12:30:17 2003 From: walter at torres.ws (Walter Torres) Date: Mon Aug 2 21:27:57 2004 Subject: [Chicago-talk] help with Reg Exp, pls... In-Reply-To: <20031215174412.GC22063@petdance.com> Message-ID: > -----Original Message----- > From: chicago-talk-bounces@mail.pm.org > [mailto:chicago-talk-bounces@mail.pm.org]On Behalf Of Andy Lester > Sent: Monday, December 15, 2003 11:44 AM > To: Chicago.pm chatter > Subject: Re: [Chicago-talk] help with Reg Exp, pls... > > > > I can't get a regExp to valid any of these names. > > > > All I want to know is if the string given passes or fails a > test that can > > handle the examples below... > > > > Dr. Roger O'Malley > > Mrs. Sara Harris-Henderson > > Manuel Gonzalez > > Forsok Bokstaver > > Contem Espaco-Valido > > What are the rules for the names? I see the extended characters did not make it through the mail lister. The last 3 names had these characters in them. mmm, I really don't know... assuming: - a SPACE is used to delimit first from last name [Walter Torres] - a HYPHEN is used to separate a dual name (British style) [Conrad-Smyth] - an APOSTROPHE is used in many Irish and Scotish names [o'Rielly] - a PERIOD is used in titles, suffixes [Dr. Sr. Jr.] - a PERIOD is used for Initials [Walter G. Torres] then... - allow apostrophes, but only if preceded *and* followed by a Alpha/Extend - allow hyphen/dash, but only if preceded *and* followed by a Alpha/Extend - allow PERIOD, but only if preceded by a Alpha/Extend *and* followed by a SPACE or EOS - allow SPACE, but only if preceded *and* followed by a Alpha/Extend I guess seems to cover how names are created. Does that help? I guess this is a bit more complicated that I first thought. thanks Walter From walter at torres.ws Mon Dec 15 12:31:20 2003 From: walter at torres.ws (Walter Torres) Date: Mon Aug 2 21:27:57 2004 Subject: [Chicago-talk] help with Reg Exp, pls... In-Reply-To: <20031215174828.9047.qmail@web60202.mail.yahoo.com> Message-ID: > -----Original Message----- > From: chicago-talk-bounces@mail.pm.org > [mailto:chicago-talk-bounces@mail.pm.org]On Behalf Of Jim Thomason > Sent: Monday, December 15, 2003 11:48 AM > To: Chicago.pm chatter > Subject: Re: [Chicago-talk] help with Reg Exp, pls... > > > Unless I'm missing something, a little bit more > information would be useful. For instance, what sorts > of data should you be matching? How does it need to > look? > > As is, a regex that matches all of those strings is as > simple as m/./ :) > > But that's probably not terribly useful to you. So how > -should- these names look, and then we can probably > help out a bit more. I hope my reply to Stephen helps answer these... > (incidentally, it's also entirely possible that > there's a CPAN module to do name validation, so it > might also be good to look there) oh, good idea. Why didnt I think to go there! Duh! Thanks Walter From merlyn at stonehenge.com Mon Dec 15 12:41:06 2003 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: Mon Aug 2 21:27:57 2004 Subject: [Chicago-talk] help with Reg Exp, pls... In-Reply-To: References: Message-ID: <864qw1rkjn.fsf@blue.stonehenge.com> >>>>> "Walter" == Walter Torres writes: Walter> All I want to know is if the string given passes or fails a test that can Walter> handle the examples below... Walter> Dr. Roger O'Malley Walter> Mrs. Sara Harris-Henderson Walter> Manuel Gonzalez Walter> Forsok Bokstaver Walter> Contem Espaco-Valido $ perl my $regex = '^('. join("|", map quotemeta $_, split "\n", <<'END'). ')$'; Dr. Roger O'Malley Mrs. Sara Harris-Henderson Manuel Gonzalez Forsok Bokstaver Contem Espaco-Valido END print $regex, "\n"; ^D ^(Dr\.\ Roger\ O\'Malley|Mrs\.\ Sara\ Harris\-Henderson|Manuel\ Gonzalez|Forsok\ Bokstaver|Contem\ Espaco\-Valido)$ $ Somehow, I don't think you mean that. What *do* you mean? Creating a regex by example is almost always the wrong way. Give us rules. And, for any rule that you come up with about a name, I bet I can find a name that violates the rule. So the real question is, why do you care? -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! From walter at torres.ws Mon Dec 15 12:55:15 2003 From: walter at torres.ws (Walter Torres) Date: Mon Aug 2 21:27:57 2004 Subject: [Chicago-talk] help with Reg Exp, pls... In-Reply-To: <864qw1rkjn.fsf@blue.stonehenge.com> Message-ID: > -----Original Message----- > From: chicago-talk-bounces@mail.pm.org > [mailto:chicago-talk-bounces@mail.pm.org]On Behalf Of Randal L. Schwartz > Sent: Monday, December 15, 2003 12:41 PM > To: Chicago.pm chatter > Subject: Re: [Chicago-talk] help with Reg Exp, pls... > Somehow, I don't think you mean that. Your right. > What *do* you mean? I want to squeal if invalid characters are given as a name. > Creating a regex by example is almost always the wrong way. > Give us rules. Yes, I gave rules 2 posts ago. I hope they are enough. > And, for any rule that you come up with about a name, I bet I can find > a name that violates the rule. If anyone on this planet can, you could. > So the real question is, why do you care? I care because I don't want anyone to give me... Walte4 &ore3 as a name. And this is part of a GPG-based app and we need it for security options. This will be part of the email section (later). That's why I care. Walter From merlyn at stonehenge.com Mon Dec 15 13:20:26 2003 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: Mon Aug 2 21:27:57 2004 Subject: [Chicago-talk] help with Reg Exp, pls... In-Reply-To: References: Message-ID: <86smjlq45k.fsf@blue.stonehenge.com> >>>>> "Walter" == Walter Torres writes: Walter> I care because I don't want anyone to give me... Walter> Walte4 &ore3 Walter> as a name. But what if his name is legitimately: Ri3ck Lahrson Yes. That was his name for many years. I can't see a rule that would accept Rick and reject yours. Walter> And this is part of a GPG-based app and we need it for security options. Walter> This will be part of the email section (later). Walter> That's why I care. I *still* don't see why you care. If I come up to you and say "my name is" and then whistle three tones, you would be disrespectful to deny me that naming. Just accept what's in there, and deal with it. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! From jthomasoniii at yahoo.com Mon Dec 15 13:27:43 2003 From: jthomasoniii at yahoo.com (Jim Thomason) Date: Mon Aug 2 21:27:57 2004 Subject: [Chicago-talk] help with Reg Exp, pls... In-Reply-To: <86smjlq45k.fsf@blue.stonehenge.com> Message-ID: <20031215192743.46346.qmail@web60204.mail.yahoo.com> > If I come up to you and say "my name is" and then > whistle three tones, > you would be disrespectful to deny me that naming. I'd love to see how you list that on your driver's license. :) "I see, sir, so it says here that your name is 'fweee fwooo fweeeeEEeee'?" -Jim..... __________________________________ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/ From Dooley.Michael at con-way.com Mon Dec 15 13:34:41 2003 From: Dooley.Michael at con-way.com (Dooley, Michael) Date: Mon Aug 2 21:27:57 2004 Subject: [Chicago-talk] help with Reg Exp, pls... Message-ID: hey if they let you cover your face when taking a picture for your license this is the next step. -----Original Message----- From: chicago-talk-bounces@mail.pm.org [mailto:chicago-talk-bounces@mail.pm.org] On Behalf Of Jim Thomason Sent: Monday, December 15, 2003 1:28 PM To: Chicago.pm chatter Subject: Re: [Chicago-talk] help with Reg Exp, pls... > If I come up to you and say "my name is" and then > whistle three tones, > you would be disrespectful to deny me that naming. I'd love to see how you list that on your driver's license. :) "I see, sir, so it says here that your name is 'fweee fwooo fweeeeEEeee'?" -Jim..... __________________________________ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/ _______________________________________________ Chicago-talk mailing list Chicago-talk@mail.pm.org http://mail.pm.org/mailman/listinfo/chicago-talk From shawn at owbn.org Mon Dec 15 14:38:45 2003 From: shawn at owbn.org (Shawn C Carroll) Date: Mon Aug 2 21:27:57 2004 Subject: [Chicago-talk] help with Reg Exp, pls... In-Reply-To: <20031215192743.46346.qmail@web60204.mail.yahoo.com> References: <86smjlq45k.fsf@blue.stonehenge.com> <20031215192743.46346.qmail@web60204.mail.yahoo.com> Message-ID: <11688.65.248.243.100.1071520725.squirrel@mail.owbn.org> This is so _worng_. I also subscribe to a soccer referee list and quick read this message and thought to myself: 'Not another damn thread on whistle mechanics." Brain twister I tell you what. ;) --shawn Jim Thomason said: >> If I come up to you and say "my name is" and then >> whistle three tones, >> you would be disrespectful to deny me that naming. > > I'd love to see how you list that on your driver's > license. :) > > "I see, sir, so it says here that your name is 'fweee > fwooo fweeeeEEeee'?" > > -Jim..... > > __________________________________ > Do you Yahoo!? > New Yahoo! Photos - easier uploading and sharing. > http://photos.yahoo.com/ > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > -- Shawn Carroll shawn@owbn.org Perl Programmer Soccer Referee From lembark at wrkhors.com Mon Dec 15 17:15:17 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:57 2004 Subject: [Chicago-talk] help with Reg Exp, pls... In-Reply-To: References: Message-ID: <3171832704.1071530117@[192.168.200.4]> -- Walter Torres > I've been pulling my hair out on this. > > I can't get a regExp to valid any of these names. > > All I want to know is if the string given passes or fails a test that can > handle the examples below... > > Dr. Roger O'Malley > Mrs. Sara Harris-Henderson > Manuel Gonzalez > Forsok Bokstaver > Contem Espaco-Valido > > Any ideas? > > Thanks > > Walter Not really sure what you are asking for. "a test" could mean nearly anything, for example: if( /\S+/ ) { # the thing has non blanks? } Do you know the names in advance? If so then something like: # read in the names, chomp them, whatever. my @namz = whatever; $_ = qr/$_/ for @namz; ... # check for the names in your input: LINE: while( ) { for my $rx ( @namz ) { handle_a_matched_name $_ if /$rx/; next LINE; } print STDERR "No match: $_"; } converting the string to compiled regexen saves some time on the iteration. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From petemar1 at perlmonk.org Mon Dec 15 17:40:51 2003 From: petemar1 at perlmonk.org (petemar1) Date: Mon Aug 2 21:27:57 2004 Subject: [Chicago-talk] Coogan's In-Reply-To: <3171832704.1071530117@[192.168.200.4]> Message-ID: Coogan's tonight? From andy at petdance.com Mon Dec 15 17:47:03 2003 From: andy at petdance.com (Andy Lester) Date: Mon Aug 2 21:27:57 2004 Subject: [Chicago-talk] Coogan's In-Reply-To: References: <3171832704.1071530117@[192.168.200.4]> Message-ID: <20031215234703.GA25068@petdance.com> > Coogan's tonight? Not me, but i'm interested to hear who does show up. xoa -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance From lembark at wrkhors.com Mon Dec 15 17:55:07 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:57 2004 Subject: [Chicago-talk] Problem with installing DBI.pm under SCO In-Reply-To: <20031215175106.48652.qmail@web21501.mail.yahoo.com> References: <20031215175106.48652.qmail@web21501.mail.yahoo.com> Message-ID: <3189572704.1071532507@[192.168.200.4]> -- Emil Janev >> Why not upgrade your perl version? > > Thanks for the proposal. > I am considering this option. In this moment I am restricted in time that > I can dedicate to it, but I am looking forward to acomplish that. > It will be big step for me to build perl from source (I am poor in such > expirience.). I suppose I'll have more questions when I am on that. Given a prefix, you can take a first-pass at it via: gzip -dc perl-blah.tar.gz | cpio -idv; cd perl-blah; ./Configure -de -Dprefix=/your/path/here; make test install; You'll be stuck with all of the defaults other than the prefix, but you don't need to be SU to try it and the make test'll probably succeed. At that point either fix any problems in the baseline install or wander through the README to get more items you can configure from the command line of Configure. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From lembark at wrkhors.com Mon Dec 15 17:56:27 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:57 2004 Subject: [Chicago-talk] Coogan's In-Reply-To: References: Message-ID: <3191412704.1071532587@[192.168.200.4]> -- petemar1 > Coogan's tonight? Should be. I cannot make to any of the Monday meetings until January -- having a life has its drawbacks, for now this is one of them. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From walter at torres.ws Mon Dec 15 22:28:07 2003 From: walter at torres.ws (Walter Torres) Date: Mon Aug 2 21:27:57 2004 Subject: [Chicago-talk] help with Reg Exp, pls... In-Reply-To: <3171832704.1071530117@[192.168.200.4]> Message-ID: > -----Original Message----- > From: chicago-talk-bounces@mail.pm.org > [mailto:chicago-talk-bounces@mail.pm.org]On Behalf Of Steven Lembark > Sent: Monday, December 15, 2003 5:15 PM > To: Chicago.pm chatter > Subject: Re: [Chicago-talk] help with Reg Exp, pls... > Not really sure what you are asking for. "a test" could mean > nearly anything... I'm sorry kind people, I really didn't mean to be so obtuse about this... I have a single string of unknown length and composition that I need to make sure doesn't contain characters that are not used by 99.99999% of the Roman language based population of this planet. Some examples (by no means complete) Dr. Roger S. O'Malley Jr., PHD Mrs. Sara Harris-Henderson Manuel Gonzalez <-- should contain extended chars Forsok Bokstaver <-- should contain extended chars Contem Espaco-Valido <-- should contain extended chars These are the rules I came up with to try and define this... assuming: - a SPACE is used to delimit parts of name from another [Walter Torres] - a HYPHEN is used to separate a dual name (British style) [Conrad-Smyth] - an APOSTROPHE is used in many Irish and Scottish names [O'Reilly] - a PERIOD is used in titles, suffixes [Dr. Sr. Jr.] - a PERIOD is used for Initials [Walter G. Torres] - a COMMA is used to delimit a citation of some sort [Dr. Samuel Ellis-Honing, PHD] then... - allow apostrophes, but only if preceded *and* followed by a Alpha/Extend - allow hyphen/dash, but only if preceded *and* followed by a Alpha/Extend - allow PERIOD, but only if preceded by a Alpha/Extend *and* followed by a SPACE or EOS - allow SPACE, but only if preceded by a Alpha/Extend, PERIOD or COMMA *and* followed by a Alpha/Extend - allow COMMA, but only if preceded by a Alpha/Extend *and* followed by a SPACE Based upon these rules, I've come up with... /^([a-z\x80-\xFF]+(. )?[ ]?)+$/i It works, sort of.. - it does not handle the COMMA, HYPHEN or apostrophe rules. - it allows (multiple) spaces at the end. I'm hoping someone smarter than me can see how to make this work as desired. Steve, I hope this explains what I'm after a bit clearer. Thanks for your time. Walter From lembark at wrkhors.com Tue Dec 16 12:44:19 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:57 2004 Subject: [Chicago-talk] help with Reg Exp, pls... In-Reply-To: References: Message-ID: <341550000.1071600259@[192.168.100.3]> -- Walter Torres >> -----Original Message----- >> From: chicago-talk-bounces@mail.pm.org >> [mailto:chicago-talk-bounces@mail.pm.org]On Behalf Of Steven Lembark >> Sent: Monday, December 15, 2003 5:15 PM >> To: Chicago.pm chatter >> Subject: Re: [Chicago-talk] help with Reg Exp, pls... > > >> Not really sure what you are asking for. "a test" could mean >> nearly anything... > > I'm sorry kind people, I really didn't mean to be so obtuse about this... Does your 99.99% include japanese, chinese, or russian individuals? If so then you probably have to deal with UTF in some form, at which point all best on what is "reasonable" are off. If you restrict the names to ASCII it works but then you reject all of the UTF8 accent's shown in the example. The simplest fix -- given that you may need to regex UTF describing a name in any obscure language -- may be to just use a check for [:isprint:] and be done with it: anything that is not a printing character is probably not something you want to deal with. It would also probably make sense to use "join ' ', split" to strip extra whitespace and convert all of it so singleton spaces. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From walter at torres.ws Tue Dec 16 13:18:28 2003 From: walter at torres.ws (Walter Torres) Date: Mon Aug 2 21:27:57 2004 Subject: [Chicago-talk] help with Reg Exp, pls... In-Reply-To: <341550000.1071600259@[192.168.100.3]> Message-ID: > -----Original Message----- > From: chicago-talk-bounces@mail.pm.org > [mailto:chicago-talk-bounces@mail.pm.org]On Behalf Of Steven Lembark > Sent: Tuesday, December 16, 2003 12:44 PM > To: Chicago.pm chatter > Subject: RE: [Chicago-talk] help with Reg Exp, pls... > Does your 99.99% include japanese, chinese, or russian > individuals? no sir. They do not use Roman based characters. > If so then you probably have to deal with > UTF in some form, at which point all best on what is > "reasonable" are off. If you restrict the names to > ASCII it works but then you reject all of the UTF8 accent's > shown in the example. > > The simplest fix -- given that you may need to regex UTF > describing a name in any obscure language -- may be to just > use a check for [:isprint:] and be done with it: anything > that is not a printing character is probably not something > you want to deal with. It would also probably make sense > to use "join ' ', split" to strip extra whitespace and > convert all of it so singleton spaces. Yes, that could work. Thanks Walter From walter at torres.ws Tue Dec 16 14:31:48 2003 From: walter at torres.ws (Walter Torres) Date: Mon Aug 2 21:27:57 2004 Subject: [Chicago-talk] help with Reg Exp, pls... In-Reply-To: <3171832704.1071530117@[192.168.200.4]> Message-ID: I wish to express my gratitude to all of you for your helpful insights. I have a base version running... http://web.torres.ws/validate/names.html It still has 1 or 2 small issues to solve (at least AFAIK), but for the most part, it does what I need it to do. So, don't laugh too hard at it. It does work. Thanks again. Walter From jthomasoniii at yahoo.com Tue Dec 16 14:47:56 2003 From: jthomasoniii at yahoo.com (Jim Thomason) Date: Mon Aug 2 21:27:57 2004 Subject: [Chicago-talk] help with Reg Exp, pls... In-Reply-To: Message-ID: <20031216204756.77564.qmail@web60201.mail.yahoo.com> You've already got a glitch in it, periods don't succeed at EOS. I'd -strongly- recommend you manually twiddle the spacing upon receipt of the string. Requiring users to type in a space after a comma, for instance, just strikes me as asking for trouble. Sure, some people will just do it automatically, but a others won't and won't understand why it fails. You're also requiring people to do things like "M. D. " instead of "M.D." if they so choose. Also, be sure that you're considering your target audience. The rules you listed are fine and readable to a programmer, but Aunt Bea would have no interest in even trying to understand them. If you're writing your program for Aunt Bea to use on her own, she'll want to know why she can't type in her name, what failed, and why. If you're not deploying for Aunt Bea, then not to worry. But, I suppose as long as the errors can be properly communicated, then no harm no foul. Nonetheless, there are reasons that programmers bristle at the concept of doing name matches - they universally suck. -Jim...... --- Walter Torres wrote: > I wish to express my gratitude to all of you for > your helpful insights. > > I have a base version running... > > http://web.torres.ws/validate/names.html > > It still has 1 or 2 small issues to solve (at least > AFAIK), but for the most > part, it does what I need it to do. > > So, don't laugh too hard at it. It does work. > > Thanks again. > > Walter > > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk __________________________________ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/ From Dooley.Michael at con-way.com Tue Dec 16 15:11:30 2003 From: Dooley.Michael at con-way.com (Dooley, Michael) Date: Mon Aug 2 21:27:57 2004 Subject: [Chicago-talk] perl objects/references/modules Message-ID: is it me or does anyone else find callbacks/closures frustrating to understand? I mean like anything after anon subroutines (chap 6 in perl objects/references/modules) is pretty confusing. From mike at oobak.org Tue Dec 16 15:28:48 2003 From: mike at oobak.org (Mike Pastore) Date: Mon Aug 2 21:27:57 2004 Subject: [Chicago-talk] perl objects/references/modules In-Reply-To: References: Message-ID: <1071610128.425.34.camel@woody.star.niu.edu> Have you read MJD's "Coping with scoping?" http://perl.plover.com/FAQs/Namespaces.html Closures are basically a trick of scoping. Variables are scoped in such a way that they are "privatized" to an anonymous subroutine. If you're having trouble with objects and references, I highly recommend Damian Conway's book "Object Oriented Perl." I have very few computer books that I didn't have to purchase for class: Knuth, K&R, and Conway. :-) -- Mike Pastore mike@oobak.org On Tue, 2003-12-16 at 15:11, Dooley, Michael wrote: > is it me or does anyone else find callbacks/closures frustrating to > understand? > > I mean like anything after anon subroutines (chap 6 in perl > objects/references/modules) is pretty confusing. > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk From jthomasoniii at yahoo.com Tue Dec 16 16:10:30 2003 From: jthomasoniii at yahoo.com (Jim Thomason) Date: Mon Aug 2 21:27:57 2004 Subject: [Chicago-talk] perl objects/references/modules In-Reply-To: Message-ID: <20031216221030.97273.qmail@web60209.mail.yahoo.com> I'd say it's just you, but it's not. There was actually a bit of discussion about it here a few weeks back (after a bit of discussion of it at the December tech meeting). http://mail.pm.org/pipermail/chicago-talk/2003-December/000539.html They're really not that scary. -Jim... --- "Dooley, Michael" wrote: > is it me or does anyone else find callbacks/closures > frustrating to > understand? > > I mean like anything after anon subroutines (chap 6 > in perl > objects/references/modules) is pretty confusing. > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk __________________________________ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/ From lembark at wrkhors.com Tue Dec 16 16:34:02 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:57 2004 Subject: [Chicago-talk] perl objects/references/modules In-Reply-To: References: Message-ID: <398750000.1071614042@[192.168.100.3]> -- "Dooley, Michael" > is it me or does anyone else find callbacks/closures frustrating to > understand? I was lukcy: I'd seen jump tables in C long before so the basic idea of leaving code at a location for the sake of running it later on seemed natural to me. > > I mean like anything after anon subroutines (chap 6 in perl > objects/references/modules) is pretty confusing. Anon sub's are like any other kind of referent: think of them as fodder for dereferencing. my $a = \@array; ... $a->[ $offset ] or my $b = \%hash; ... $b->{ $key } or my $c = \&subname; ... $c->( $arg1, $arg2 ); for anon-sub closures just know that the sub has some built-in values that were made available when it was created: sub prefix { my $prefix = shift; # caller gets back a sub that prefixes its # arguments with whatever the contents of # $prefix were when the sub was created -- # make multiple call to the prefix sub and # you can get back multiple-prefixors. # # java calls things like this prefix sub # "factories". sub { join '', $prefix, @_ } } ... my $fixer = prefix "foo_"; ... print $fixer->( 'bar' ), "\n"; # call returns "foo_bar"; print $fixer->( 'bar', 'bletch' ); # returns foo_barbletch Another example is something that increments its original argument from whatever value it had to begin with: sub increment { my $i = shift || 0; sub { ++$i } } my $lo = increment 10; my $hi = increment 100; print $lo->(); # 11 print $hi->(); # 101 print $lo->(); # 12 print $lo->(); # 13 these can be handy to keep track of various events: just hand back a counter of some sort with whatever you wanto to count and call it when the events happen. You can interrogate the counters when you're done by calling them one last time. In this rather contrived case, a counter is used to incremnt a counter at each value in a hash: sub counter { my $value = shift || 0; # returns the current count, helpful for # checking on the way out. sub { $value++ } } # store a list of known names, look for them in the # input records, upping the counter each time. for my $name ( @names ) { $hash{$names} = counter 0; } for my $word ( @input_data ) { $hash{$word}->() if $hash{$word}; } # now display the counts for my $name ( sort keys %hash ) { print "$name: " . $hash{$name}->() } While this is obviously an idiotic way to count names. But you could be doing quite a bit more than just counting the names. In fact, if you could even have passed the hash off to another subroutine that had no idea what was being done with the names. You could even be doing completely different things with the different names and the subroutine doing the work wouldn't have to care: just by calling what's in $hash{$name} the job just gets done. The abiliy to write one piece of code that says "I don't care what you do with the values, just tell me where to go with them" is the point of closures: the code actually calling the closure doesn't have to know at all what the closure itself does, just that it's there. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From Dooley.Michael at con-way.com Tue Dec 16 16:40:56 2003 From: Dooley.Michael at con-way.com (Dooley, Michael) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] perl objects/references/modules Message-ID: well iv called it quits for the day. I think I need to chew on what I have read so far. and just reread chap6 and 7 tommarow. Mike ill check out that link in the morning. right now it all feels like: sub { $a == grep /shoot_me_in_the_face/, @neptunes_fav_sayings } if /moon_full/ and $titlewave == $major_sunami ; or something like that. but on the bright side tonight I am gunna go see LOTR ROTK. AMC30 theature 17 here I come!! -----Original Message----- From: chicago-talk-bounces@mail.pm.org [mailto:chicago-talk-bounces@mail.pm.org] On Behalf Of Jim Thomason Sent: Tuesday, December 16, 2003 4:11 PM To: Chicago.pm chatter Subject: Re: [Chicago-talk] perl objects/references/modules I'd say it's just you, but it's not. There was actually a bit of discussion about it here a few weeks back (after a bit of discussion of it at the December tech meeting). http://mail.pm.org/pipermail/chicago-talk/2003-December/000539.html They're really not that scary. -Jim... --- "Dooley, Michael" wrote: > is it me or does anyone else find callbacks/closures > frustrating to > understand? > > I mean like anything after anon subroutines (chap 6 > in perl > objects/references/modules) is pretty confusing. > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk __________________________________ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/ _______________________________________________ Chicago-talk mailing list Chicago-talk@mail.pm.org http://mail.pm.org/mailman/listinfo/chicago-talk From mike at oobak.org Tue Dec 16 17:01:55 2003 From: mike at oobak.org (Mike Pastore) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] perl objects/references/modules In-Reply-To: References: Message-ID: <1071615715.425.41.camel@woody.star.niu.edu> LOL, what show are you going to? I've got a ticket for the 7:45. :-) On Tue, 2003-12-16 at 16:40, Dooley, Michael wrote: > well iv called it quits for the day. I think I need to chew on what I have > read so far. and just reread chap6 and 7 tommarow. > > Mike ill check out that link in the morning. > > right now it all feels like: > sub { $a == grep /shoot_me_in_the_face/, @neptunes_fav_sayings } if > /moon_full/ and $titlewave == $major_sunami ; > > or something like that. > > but on the bright side tonight I am gunna go see LOTR ROTK. AMC30 theature > 17 here I come!! > > -----Original Message----- > From: chicago-talk-bounces@mail.pm.org > [mailto:chicago-talk-bounces@mail.pm.org] On Behalf Of Jim Thomason > Sent: Tuesday, December 16, 2003 4:11 PM > To: Chicago.pm chatter > Subject: Re: [Chicago-talk] perl objects/references/modules > > > I'd say it's just you, but it's not. > > There was actually a bit of discussion about it here a > few weeks back (after a bit of discussion of it at the > December tech meeting). > > http://mail.pm.org/pipermail/chicago-talk/2003-December/000539.html > > They're really not that scary. > > -Jim... > > --- "Dooley, Michael" > wrote: > > is it me or does anyone else find callbacks/closures > > frustrating to > > understand? > > > > I mean like anything after anon subroutines (chap 6 > > in perl > > objects/references/modules) is pretty confusing. > > _______________________________________________ > > Chicago-talk mailing list > > Chicago-talk@mail.pm.org > > http://mail.pm.org/mailman/listinfo/chicago-talk > > > __________________________________ > Do you Yahoo!? > New Yahoo! Photos - easier uploading and sharing. > http://photos.yahoo.com/ > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk From merlyn at stonehenge.com Tue Dec 16 18:44:11 2003 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] perl objects/references/modules In-Reply-To: References: Message-ID: <86smjkjmsn.fsf@blue.stonehenge.com> >>>>> "Dooley," == Dooley, Michael writes: Dooley,> is it me or does anyone else find callbacks/closures frustrating to Dooley,> understand? Dooley,> I mean like anything after anon subroutines (chap 6 in perl Dooley,> objects/references/modules) is pretty confusing. Those are some pretty advanced topics. It helps if you've seen the structures from other places. But fear not. It's a bit of a detour. The rest of the book doesn't just get harder. :) -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! From Dooley.Michael at con-way.com Thu Dec 18 13:41:28 2003 From: Dooley.Michael at con-way.com (Dooley, Michael) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] Net::FTP Message-ID: looking at cpan there are a couple of modules for Net::FTP. does anyone have any experience w/ any of these? do you recommend 1 over the other? does anyone tend to use a specific ftp package for something like the following? my use: 1) to retrieve all files on an external FTP server (most of the time I will need passive transfer mode) 2) to send all files on a giving local FS to many different remote machines. Firewalls will be involved. This would be called every 5 minutes. the avg amount of files sent per day is prolly 3000, majority under 1mb. Mike From andy at petdance.com Thu Dec 18 14:22:22 2003 From: andy at petdance.com (Andy Lester) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] Net::FTP In-Reply-To: References: Message-ID: <20031218202222.GA19172@petdance.com> On Thu, Dec 18, 2003 at 11:41:28AM -0800, Dooley, Michael (Dooley.Michael@con-way.com) wrote: > looking at cpan there are a couple of modules for Net::FTP. > does anyone have any experience w/ any of these? do you recommend 1 over the > other? I'd recommend before you do anything else you look at scripting your ftp app directly, or using something ncftpget (part of ncftp) or wget. xoa -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance From Dooley.Michael at con-way.com Thu Dec 18 14:30:50 2003 From: Dooley.Michael at con-way.com (Dooley, Michael) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] Net::FTP Message-ID: I am currently using ncftpput and ncftpget. been using it for about a 1 or 1.5 years. it works great. but the only thing is I have a bunch of shell scripting that goes on in conjunction w/ the ncftp. wanted to see if there was a better way to do it with perl. in the end my vision is to: 1) have a web page of the ftp logs (only displaying the file sent and the time (possably the file size) 2) the user can access a log of what files were sent to x client on z day 3) they would click on the name of the file and the file would load up in there browser so they can view it -----Original Message----- From: chicago-talk-bounces@mail.pm.org [mailto:chicago-talk-bounces@mail.pm.org] On Behalf Of Andy Lester Sent: Thursday, December 18, 2003 2:22 PM To: Chicago.pm chatter Subject: Re: [Chicago-talk] Net::FTP On Thu, Dec 18, 2003 at 11:41:28AM -0800, Dooley, Michael (Dooley.Michael@con-way.com) wrote: > looking at cpan there are a couple of modules for Net::FTP. > does anyone have any experience w/ any of these? do you recommend 1 over the > other? I'd recommend before you do anything else you look at scripting your ftp app directly, or using something ncftpget (part of ncftp) or wget. xoa -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance _______________________________________________ Chicago-talk mailing list Chicago-talk@mail.pm.org http://mail.pm.org/mailman/listinfo/chicago-talk From ehs at pobox.com Thu Dec 18 14:36:43 2003 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] Net::FTP In-Reply-To: References: Message-ID: <20031218203643.GA28667@chloe.inkdroid.org> On Thu, Dec 18, 2003 at 12:30:50PM -0800, Dooley, Michael wrote: > wanted to see if there was a better way to do it with perl. I've had good success w/ Net::FTP. It's a nice package, and Graham Barr's packages on CPAN are like gold. //Ed From lembark at wrkhors.com Thu Dec 18 19:24:16 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] Net::FTP In-Reply-To: References: Message-ID: <637130000.1071797056@[192.168.200.4]> -- "Dooley, Michael" > looking at cpan there are a couple of modules for Net::FTP. > does anyone have any experience w/ any of these? do you recommend 1 over > the other? > does anyone tend to use a specific ftp package for something like the > following? > > my use: > > 1) to retrieve all files on an external FTP server (most of the time I > will need passive transfer mode) > 2) to send all files on a giving local FS to many different remote > machines. Firewalls will be involved. > > This would be called every 5 minutes. the avg amount of files sent per day > is prolly 3000, majority under 1mb. > > Mike > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From lembark at wrkhors.com Thu Dec 18 19:25:24 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] Net::FTP In-Reply-To: References: Message-ID: <638030000.1071797124@[192.168.200.4]> -- "Dooley, Michael" > I am currently using ncftpput and ncftpget. been using it for about a 1 or > 1.5 years. > > it works great. but the only thing is I have a bunch of shell scripting > that goes on in conjunction w/ the ncftp. > > wanted to see if there was a better way to do it with perl. > > in the end my vision is to: > 1) have a web page of the ftp logs (only displaying the file sent and the > time (possably the file size) > 2) the user can access a log of what files were sent to x client on z day > 3) they would click on the name of the file and the file would load up in > there browser so they can view it I have code that does some of this already built for wormbase if you want to take a look at it. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From Dooley.Michael at con-way.com Fri Dec 19 08:31:57 2003 From: Dooley.Michael at con-way.com (Dooley, Michael) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] Net::FTP Message-ID: Steven, That would be great if you don't mind sharing. Dooley.Michael@con-way.com Mike From Aaron.Young at citadelgroup.com Fri Dec 19 12:32:12 2003 From: Aaron.Young at citadelgroup.com (Young, Aaron) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] Very late Tivo Hacks review Message-ID: <800BCF60D1553144BABCBFCE36249D3D0861F4BE@CORPEMAIL.citadelgroup.com> my pithy offering Tivo Hacks This is a book for the Tivo owner that loves their Tivo, could not live without it, loves what it does, but surely...it can do a little more. And this book is for the person that wants the value of the published book. There is definitely something convenient about holding step by step instructions in your hand while your equipment is in pieces before you just waiting to have those two 200gig harddrives placed inside to eventually be filled with episodes of Home Movies and Space Ghost. And it is valuable to know that that information you hold was read by at least one other person before you. While most of this information is scattered throughout the net on various websites, this book attempts to consolidate and summarize all that information into an all in one guide for Tivo upgrades, and it was written by people who have done what you are planning. I can't imagine a handier guide. While there are some typos early in the book, which I HATE, they are easy to ignore, and do not lead you down the wrong path (I have read some programming books that decreased my knowledge in an area). Fortunately, this book only seems to suffer from it the first few chapters, and then, if there were any more, I missed them as I was busy trying to learn how to put a webserver on my Tivo and expand its capacity by 2-300%. I've never considered myself a hardware guy, and so, the chapter on removing the drives and putting them into a desktop are rich enough with detail to make even me feel confident enough to try it. And I must note, the pictures are a tremendous help. After reading that chapter, you will realize just how many Tivo are out there and appreciate the effort that went into putting such a guide together. I am just glad I do not have one of the more difficult models to upgrade; at least those unlucky souls out there will have a guide. They even document where the "hard to get at" screws are and some that you can safely leave to the side as an "extra part." The first connection to the Tivo described in the book is via the serial connection. While reading about the serial connection, I almost found myself yelling at the book as if I were watching a horror movie (Come one, don't use the serial connection, I have a Tivo2!) (I own a Tivo2 series model which comes with a network card preinstalled.) But I knew I was only going to regret skipping this chapter if I ever hacked up my Tivo so bad that I couldn't use the ethernet. Also, there is something prideful in knowing how to connect to your Tivo any way it can. He shows us how to transfer new software to the Tivo and how to configure it to run on boot up. We do this with some manual work made easy by using some freely available tools. After reading that first chapter, I was tempted to dig out a serial connection and prepare myself to OWN that Tivo, but there was a lot of book left to go, so I kept at it. Next, if you are fortunate enough to have a Tivo with a network interface card, then getting to Tivo via ethernet is trivial and thoroughly described. If you are not that fortunate, or just have an older Tivo lying around and you do not want to leave it out of the lan parties, there are even instructions on how to connect a network card to older Tivos. Now, that the connection was made and convenient, he shows us that there are already a suite of advanced tools out there (with more being contributed). Once you see the webserver, you may never use your remote to schedule recordings again (you can even use it as the remote). You can even use it to read email and or have your email read to you. It will play mp3s and show you caller ID. Having Tivo connected to the network opens brand new doors. The only chapter I truly struggled with was the programming the Tivo chapter. I know that Tivo is undocumented, and I appreciate the effort it must have took to find out all those commands AND what options they take. But TCL is NOT an easy language to just pick up, and I have had some training in it. Then I remember, this isn't Learing TCL, so take note. If you really want to hack Tivo, you will have to read source code and you will need a better guide for TCL than this book had space to give. On the other hand, there are already so many programs out there, by the time you have grown bored with them, you will have had enough time to get a good TCL book. The book is organized well and each chapter builds on the previous. The book builds your knowledge fast enough to keep you from getting bored, but thorough enough that you can learn everything. As you make the first fledgling connections to the Tivo, you are pretty excited to just be connected to the thing and make your name appear on the television screen. (It kind of reminds me of my first computer, an Atari 800XL.) As you go on through the book, you find yourself feeling more and more confident about what you can do with the Tivo and it is almost like getting a new Tivo. A hacked Tivo is to Tivo what Tivo is to television. Once you do it, you will wonder why you hadn't done it sooner. Aaron F Young Broker Reconciliation Operations & Portfolio Finance Citadel Investment Group LLC ------------------------------------------------------------------------------------------------- ------------------------- CONFIDENTIALITY AND SECURITY NOTICE This e-mail contains information that may be confidential and proprietary. It is to be read and used solely by the intended recipient(s). Citadel and its affiliates retain all proprietary rights they may have in the information. If you are not an intended recipient, please notify us immediately either by reply e-mail or by telephone at 312-395-2100 and delete this e-mail (including any attachments hereto) immediately without reading, disseminating, distributing or copying. We cannot give any assurances that this e-mail and any attachments are free of viruses and other harmful code. Citadel reserves the right to monitor, intercept and block all communications involving its computer systems. From ehs at pobox.com Fri Dec 19 14:00:23 2003 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] Very late Tivo Hacks review In-Reply-To: <800BCF60D1553144BABCBFCE36249D3D0861F4BE@CORPEMAIL.citadelgroup.com> References: <800BCF60D1553144BABCBFCE36249D3D0861F4BE@CORPEMAIL.citadelgroup.com> Message-ID: <20031219200023.GG28280@chloe.inkdroid.org> On Fri, Dec 19, 2003 at 12:32:12PM -0600, Young, Aaron wrote: > my pithy offering Worth the wait, thanks Aaron. It has been added to the site [1]. In other news: Jonathan has confirmed we're on for POE in February, and last I heard Andy is gearing up for his talk on building CPAN distros on Jan 6th. Oh, and Jason Gessner's wife just had a healthy baby girl [2] day before yesterday. Congrats Jason! //Ed [1] http://chicago.pm.org/reviews.html [2] http://www.gogessner.net/gessnerBaby/newbie/ From mcavoy76 at hotmail.com Fri Dec 19 14:51:15 2003 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] Very late Tivo Hacks review References: <800BCF60D1553144BABCBFCE36249D3D0861F4BE@CORPEMAIL.citadelgroup.com> <20031219200023.GG28280@chloe.inkdroid.org> Message-ID: > In other news: Jonathan has confirmed we're on for POE in February That is excellent news! POE has been a "this seems really cool, but I can't figure out how to use it" thing for me for at least a couple of weeks. Awesome. Andy's CPAN talk is alright.* Chris * To be read with a "sly, wink, wink, sort of voice." ----- Original Message ----- From: "Ed Summers" To: "Chicago.pm chatter" Sent: Friday, December 19, 2003 2:00 PM Subject: Re: [Chicago-talk] Very late Tivo Hacks review > On Fri, Dec 19, 2003 at 12:32:12PM -0600, Young, Aaron wrote: > > my pithy offering > > Worth the wait, thanks Aaron. It has been added to the site [1]. > > In other news: Jonathan has confirmed we're on for POE in February, and last I > heard Andy is gearing up for his talk on building CPAN distros on Jan 6th. > > Oh, and Jason Gessner's wife just had a healthy baby girl [2] day before > yesterday. Congrats Jason! > > //Ed > > [1] http://chicago.pm.org/reviews.html > [2] http://www.gogessner.net/gessnerBaby/newbie/ > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > From andy at petdance.com Fri Dec 19 14:55:54 2003 From: andy at petdance.com (Andy Lester) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] Very late Tivo Hacks review In-Reply-To: References: <800BCF60D1553144BABCBFCE36249D3D0861F4BE@CORPEMAIL.citadelgroup.com> <20031219200023.GG28280@chloe.inkdroid.org> Message-ID: <20031219205554.GE27485@petdance.com> > Andy's CPAN talk is alright.* I hope so! I haven't written it yet! :-) xoa -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance From ehs at pobox.com Fri Dec 19 21:09:42 2003 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] Newsletter from O'Reilly UG Program, December 19 Message-ID: <20031220030942.GA11922@chloe.inkdroid.org> ================================================================ O'Reilly News for User Group Members December 19, 2003--Happy Holidays! ================================================================ ---------------------------------------------------------------- Book News ---------------------------------------------------------------- -RELAX NG -DNS on Windows Server 2003 -JavaServer Pages, Third Edition -Mac OS X: The Missing Manual, Panther Edition ---------------------------------------------------------------- Upcoming Events ---------------------------------------------------------------- -Preston Gralla ("Windows XP Hacks"), Windows Technical Forum, Waltham, MA--January 5 ---------------------------------------------------------------- Conferences ---------------------------------------------------------------- -OSCON 2004: Call for Participation -O'Reilly Emergent Democracy Forum -Early Bird Discount ends January 9 for the O'Reilly Emerging Technology Conference February 9-12, 2004 ---------------------------------------------------------------- News ---------------------------------------------------------------- -Beyond Hacking the Xbox -Gastronomy for Geeks -San Antonio Linux User Group mentioned in "Wall Street Journal" -Myths Open Source Developers Tell Ourselves -A Day in the Life of #Apache -Understanding JAXB: Java Binding Customization -Sony Ericsson T610 Camera Phone Review -Master and Content Pages in Whidbey -Elementary Computer Graphics: Drawing with Pixels -Panther Delights ================================================ Book News ================================================ Did you know you can request a free book to review for your group? Ask your group leader for more information. For book review writing tips and suggestions, go to: http://ug.oreilly.com/bookreviews.html Don't forget, you can receive 20% off any O'Reilly book you purchase directly from O'Reilly. Just use code DSUG when ordering online or by phone 800-998-9938. http://www.oreilly.com/ ***Free ground shipping is available for online orders of at least $29.95 that go to a single U.S. address. This offer applies to U.S. delivery addresses in the 50 states and Puerto Rico. For more details, go to: http://www.oreilly.com/news/freeshipping_0703.html ***RELAX NG Order Number: 4214 "RELAX NG" is a grammar-based schema language that's both easy for schema creators to learn and easy for software developers to implement. In "RELAX NG," developers are introduced to this unique language and learn a no-nonsense method for creating XML schemas. This book offers a clear-cut explanation of RELAX NG that enables intermediate and advanced XML developers to focus on XML document structures and content rather than battle the intricacies of yet another convoluted standard. http://www.oreilly.com/catalog/relax/ Chapter 6, "More Complex Patterns," is available online: http://www.oreilly.com/catalog/relax/chapter/index.html ***DNS on Windows Server 2003 Order Number: 5628 "DNS on Windows Server 2003" is a special Windows-oriented edition of the classic "DNS and BIND," updated to document the many changes to DNS found in Windows Server 2003. You'll learn everything from starting and stopping a DNS service and establishing a namespace in the global hierarchy, to using the the dnscmd command line and the WMI DNS provider to perform maintenance. The book also documents new features, including conditional forwarding and zone storage in Active Directory application partitions. http://www.oreilly.com/catalog/dnswinsvr/ Chapter 8, "Integrating with Active Directory," is available free online: http://www.oreilly.com/catalog/dnswinsvr/chapter/index.html ***JavaServer Pages, Third Edition Order Number: 5636 "JavaServer Pages, Third Edition" is completely revised and updated to cover the substantial changes in the 2.0 version of the JSP specification. It also includes detailed coverage of the major revisions to the JSP Standard Tag Library (JSTL) specification. Combining plenty of practical advice with detailed coverage of JSP syntax and features as well as clear, useful examples, "JavaServer Pages, Third Edition" demonstrates how to embed server-side Java into web pages, while also covering important topics such as JavaBeans, Enterprise JavaBeans (EJB), and JDBC database access. http://www.oreilly.com/catalog/jserverpages3/ ***Mac OS X: The Missing Manual, Panther Edition Order Number: 6152 With new material on practically every page, the latest update of David Pogue's best-selling title offers a wealth of detail on the all of the changes in Apple's Mac OS X 10.3, aka "Panther." Written with humor and technical insight characteristic of the Missing Manual series, the new edition covers everything from the all-new Finder to iChat AV--Apple's exciting tool for video conferencing. The book also deals with features under the hood, such as the Terminal and networking tools. Pogue, the renowned "New York Times" computer columnist, tackles his subject with scrupulous objectivity--revealing which new features work well and which do not. This is an authoritative book that will appeal to novices and experienced users alike. http://www.oreilly.com/catalog/macxmmpanther/ ================================================ Upcoming Events ================================================ ***For more events, please see: http://events.oreilly.com/ ***Preston Gralla ("Windows XP Hacks"), Windows Technical Forum, Waltham, MA--January 5 Preston's will be covering Windows XP Hacks from his book and what we might expect with Windows XP SP2. January 5, 2004 6:30pm--8:30pm Microsoft, Waltham, MA For more information, go to: http://www.mvps.org/wintech/ ================================================ Conference News ================================================ ***OSCON 2004: Call for Participation Individuals and companies interested in making presentations or giving tutorials at next summer's O'Reilly Open Source Convention in Portland, Oregon are invited to submit proposals. This year's theme is "Opening the Future: Discover, Develop, Deliver.".Tracks of interest run the open source gamut from Apache to XML, and we're also looking for proposals for sessions that help attendees add open source to their companies. The deadline for submitting proposals is February 9. To submit a proposal, go to: http://conferences.oreillynet.com/cs/os2004/create/e_sess For more information on the O'Reilly Open Source Convention, go to: http://conferences.oreilly.com/oscon/ ***O'Reilly Emergent Democracy Forum Internet technologies such as blogs, MeetUp, and email are putting power back into the hands of the people. Citizen activists have already altered the face of the next U.S. presidential election. Are we on the verge of a fundamental shift towards truer democracy, or will these new Internet-fueled tools be co-opted to maintain the status quo? We'll be exploring these issues during the Emergent Democracy Forum at February's Emerging Technology Conference. http://conferences.oreillynet.com/et2004/edemo.csp ***Early Bird Discount ends January 9 for the O'Reilly Emerging Technology Conference February 9-12, 2004 Westin Horton Plaza San Diego San Diego, CA 92101 http://conferences.oreilly.com/etech/ User Group members who register before January 9, 2004 get a double discount. Use code DSUG when you register, and receive 20% off the "Early Bird" price. To register for the conference, go to: http://conferences.oreillynet.com/pub/w/28/register.html ================================================ News From O'Reilly & Beyond ================================================ --------------------- General News --------------------- ***Beyond Hacking the Xbox Bruce Stewart interviews Andrew "bunnie" Huang, a featured speaker at O'Reilly's upcoming Emerging Technology Conference. In this interview, bunnie discusses flaws with the DMCA, the current states of reverse engineering and Moore's Law, what he's hacking now, and what he'll be speaking about at ETech. http://www.openp2p.com/pub/a/p2p/2003/12/10/bunnie.html The 2004 O'Reilly Emerging Technology Conference February 9-12, 2004 Westin Horton Plaza San Diego San Diego, CA 92101 http://conferences.oreilly.com/etech/ ***Gastronomy for Geeks Pizza, Twinkies, and Jolt are geek haute cuisine for a stereotypical few. Many of you know the difference between au jus and baba ghanoush, and that Thai shish kabob isn't called saute. So, you geek gourmets, come share your favorite recipes, and see what your peers are cooking. http://cookbooks.oreilly.com/food/ --------------------- Open Source --------------------- ***San Antonio Linux User Group mentioned December 17 in the "Wall Street Journal." "Linux is slowly spreading beyond its core constituencies of governments, companies and computer geeks. Today, for example, the San Antonio Linux User Group--started by a half-dozen "extreme experts" eight or nine years ago--counts some 600 members, including scores of home users, says Albert Lochli, the group's president. That includes lawyers, artists and dentists, and Mr. Lochli says he's even converted two people from his regular bridge group." ***Myths Open Source Developers Tell Ourselves Imitation may be the sincerest form of flattery, but is it effective or useful? Open source developers have the opportunity to learn from the successes and failures of other projects. Are we learning the right lessons, though? http://www.onlamp.com/pub/a/onlamp/2003/12/11/myths.html ***A Day in the Life of #Apache Rich Bowen, coauthor of "Apache Cookbook," spends a lot of time on IRC fielding Apache questions. In this inaugural article to launch a new series based on his conversations on #apache, the IRC channel that runs on the irc.freenode.net network, Rich chronicles a user's troubles getting his .htaccess file working, and he shows what you can do to solve the problem. http://www.onlamp.com/pub/a/apache/2003/12/04/apacheckbk.html Apache Cookbook Order Number: 1916 http://www.oreilly.com/catalog/apacheckbk/index.html --------------------- Java --------------------- ***Understanding JAXB: Java Binding Customization JAXB, Java Architecture for XML Binding, is a specification (or standard) that automates the mapping between XML documents and Java objects and vice versa. One of the primary components of JAXB is the schema compiler. The schema compiler is the tool used to generate Java bindings from an XML schema document. If used in its default mode (for non-trivial applications), the compiler usually generates bindings that are awkward to work with. This article looks at various methods you can use to customize the generated bindings. http://www.onjava.com/pub/a/onjava/2003/12/10/jaxb.html --------------------- Wireless --------------------- ***Sony Ericsson T610 Camera Phone Review Sony Ericsson calls the T610 camera phone an "image and entertainment" phone instead of a smartphone. It is based on the proprietary Sony Ericsson OS, and it can run applications written in Java. Todd Ogasawara shows you the ins and outs of this compact phone that includes camera and Bluetooth capabilities. http://www.oreillynet.com/pub/a/wireless/2003/12/11/sony_t610.html --------------------- .NET --------------------- ***Master and Content Pages in Whidbey Most web sites have a consistent look and feel, containing a company logo and perhaps a navigational menu. In ASP.NET 1.0, there was no a good way to handle this; luckily, Microsoft now has a solution. Wei-Meng Lee shows you the Master and Content Pages feature in ASP.NET 2.0. http://www.ondotnet.com/pub/a/dotnet/2003/12/15/masterpages.html --------------------- Mac --------------------- ***Elementary Computer Graphics: Drawing with Pixels If you have a promising young developer in the family, you might want to take advantage of the extra time together during the holidays to teach a little programming. Michael Norton wrote this tutorial for his fourth grade son, and offers it to Mac DevCenter readers and their children. http://www.macdevcenter.com/pub/a/mac/2003/12/16/begin_programming.html ***Panther Delights Here's a look at Panther from another point of view: not so much its high-flying features, but rather the subtle refinements that we've come to expect from Apple products. Here are ten things that won't make you buy Panther, but you'll appreciate them once you have it. http://www.macdevcenter.com/pub/a/mac/2003/12/09/panther_surprises.html Until next time-- Marsee ----- End forwarded message ----- -- Ed Summers aim: inkdroid web: http://www.inkdroid.org I gotta go right now, someone is videotaping me in my spaceship. [Beck] From me at heyjay.com Fri Dec 19 21:14:03 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] Very late Tivo Hacks review References: <800BCF60D1553144BABCBFCE36249D3D0861F4BE@CORPEMAIL.citadelgroup.com> Message-ID: <00af01c3c6a7$db593300$6405a8c0@a30> Did the book mention installing a Ethernet card in a sonny vivo 1 series? My modem is broke Jay ----- Original Message ----- From: "Young, Aaron" To: "Chicago.pm chatter" Sent: Friday, December 19, 2003 12:32 PM Subject: [Chicago-talk] Very late Tivo Hacks review my pithy offering Tivo Hacks This is a book for the Tivo owner that loves their Tivo, could not live without it, loves what it does, but surely...it can do a little more. And this book is for the person that wants the value of the published book. There is definitely something convenient about holding step by step instructions in your hand while your equipment is in pieces before you just waiting to have those two 200gig harddrives placed inside to eventually be filled with episodes of Home Movies and Space Ghost. And it is valuable to know that that information you hold was read by at least one other person before you. While most of this information is scattered throughout the net on various websites, this book attempts to consolidate and summarize all that information into an all in one guide for Tivo upgrades, and it was written by people who have done what you are planning. I can't imagine a handier guide. While there are some typos early in the book, which I HATE, they are easy to ignore, and do not lead you down the wrong path (I have read some programming books that decreased my knowledge in an area). Fortunately, this book only seems to suffer from it the first few chapters, and then, if there were any more, I missed them as I was busy trying to learn how to put a webserver on my Tivo and expand its capacity by 2-300%. I've never considered myself a hardware guy, and so, the chapter on removing the drives and putting them into a desktop are rich enough with detail to make even me feel confident enough to try it. And I must note, the pictures are a tremendous help. After reading that chapter, you will realize just how many Tivo are out there and appreciate the effort that went into putting such a guide together. I am just glad I do not have one of the more difficult models to upgrade; at least those unlucky souls out there will have a guide. They even document where the "hard to get at" screws are and some that you can safely leave to the side as an "extra part." The first connection to the Tivo described in the book is via the serial connection. While reading about the serial connection, I almost found myself yelling at the book as if I were watching a horror movie (Come one, don't use the serial connection, I have a Tivo2!) (I own a Tivo2 series model which comes with a network card preinstalled.) But I knew I was only going to regret skipping this chapter if I ever hacked up my Tivo so bad that I couldn't use the ethernet. Also, there is something prideful in knowing how to connect to your Tivo any way it can. He shows us how to transfer new software to the Tivo and how to configure it to run on boot up. We do this with some manual work made easy by using some freely available tools. After reading that first chapter, I was tempted to dig out a serial connection and prepare myself to OWN that Tivo, but there was a lot of book left to go, so I kept at it. Next, if you are fortunate enough to have a Tivo with a network interface card, then getting to Tivo via ethernet is trivial and thoroughly described. If you are not that fortunate, or just have an older Tivo lying around and you do not want to leave it out of the lan parties, there are even instructions on how to connect a network card to older Tivos. Now, that the connection was made and convenient, he shows us that there are already a suite of advanced tools out there (with more being contributed). Once you see the webserver, you may never use your remote to schedule recordings again (you can even use it as the remote). You can even use it to read email and or have your email read to you. It will play mp3s and show you caller ID. Having Tivo connected to the network opens brand new doors. The only chapter I truly struggled with was the programming the Tivo chapter. I know that Tivo is undocumented, and I appreciate the effort it must have took to find out all those commands AND what options they take. But TCL is NOT an easy language to just pick up, and I have had some training in it. Then I remember, this isn't Learing TCL, so take note. If you really want to hack Tivo, you will have to read source code and you will need a better guide for TCL than this book had space to give. On the other hand, there are already so many programs out there, by the time you have grown bored with them, you will have had enough time to get a good TCL book. The book is organized well and each chapter builds on the previous. The book builds your knowledge fast enough to keep you from getting bored, but thorough enough that you can learn everything. As you make the first fledgling connections to the Tivo, you are pretty excited to just be connected to the thing and make your name appear on the television screen. (It kind of reminds me of my first computer, an Atari 800XL.) As you go on through the book, you find yourself feeling more and more confident about what you can do with the Tivo and it is almost like getting a new Tivo. A hacked Tivo is to Tivo what Tivo is to television. Once you do it, you will wonder why you hadn't done it sooner. Aaron F Young Broker Reconciliation Operations & Portfolio Finance Citadel Investment Group LLC ---------------------------------------------------------------------------- --------------------- ------------------------- CONFIDENTIALITY AND SECURITY NOTICE This e-mail contains information that may be confidential and proprietary. It is to be read and used solely by the intended recipient(s). Citadel and its affiliates retain all proprietary rights they may have in the information. If you are not an intended recipient, please notify us immediately either by reply e-mail or by telephone at 312-395-2100 and delete this e-mail (including any attachments hereto) immediately without reading, disseminating, distributing or copying. We cannot give any assurances that this e-mail and any attachments are free of viruses and other harmful code. Citadel reserves the right to monitor, intercept and block all communications involving its computer systems. _______________________________________________ Chicago-talk mailing list Chicago-talk@mail.pm.org http://mail.pm.org/mailman/listinfo/chicago-talk From petemar1 at perlmonk.org Sat Dec 20 00:53:05 2003 From: petemar1 at perlmonk.org (petemar1) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] RoboPerl? In-Reply-To: <00af01c3c6a7$db593300$6405a8c0@a30> Message-ID: Is there a Robocode for Perl? http://slashdot.org/developers/01/09/09/156200.shtml http://www.javajunkies.org/index.pl?lastnode_id=812&node_id=804 http://robocode.alphaworks.ibm.com/home/home.html http://www.ai.mit.edu/people/jacobe/research.html http://www.ai.mit.edu/people/jacobe/research/robocode/robocode.pdf http://www.ai.mit.edu/people/jacobe/research/robocode/genetic_tanks.ppt http://robocoderepository.com/jive/thread.jsp?forum=5&thread=426 http://www.gamerz.net/~c++robots/ From Aaron.Young at citadelgroup.com Mon Dec 22 07:17:45 2003 From: Aaron.Young at citadelgroup.com (Young, Aaron) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] Very late Tivo Hacks review Message-ID: <800BCF60D1553144BABCBFCE36249D3D0861F4E6@CORPEMAIL.citadelgroup.com> yes, they talk about what kind of card you have to order and give some suggestions on what to do to make it look less like a "home" job i don't have it handy this moment, so i'm going by memory, but it is VERY thorough on the types of tivos out there and how to get them all connected Aaron F Young Broker Reconciliation Operations & Portfolio Finance Citadel Investment Group LLC > -----Original Message----- > From: Jay Strauss [mailto:me@heyjay.com] > Sent: Friday, December 19, 2003 9:14 PM > To: Chicago.pm chatter > Subject: Re: [Chicago-talk] Very late Tivo Hacks review > > > Did the book mention installing a Ethernet card in a sonny > vivo 1 series? > My modem is broke > > Jay > ----- Original Message ----- > From: "Young, Aaron" > To: "Chicago.pm chatter" > Sent: Friday, December 19, 2003 12:32 PM > Subject: [Chicago-talk] Very late Tivo Hacks review > > > my pithy offering > > Tivo Hacks > This is a book for the Tivo owner that loves their Tivo, > could not live > without it, loves what it does, but surely...it can do a little more. > And this book is for the person that wants the value of the published > book. There is definitely something convenient about holding step by > step instructions in your hand while your equipment is in > pieces before > you just waiting to have those two 200gig harddrives placed inside to > eventually be filled with episodes of Home Movies and Space > Ghost. And > it is valuable to know that that information you hold was read by at > least one other person before you. While most of this information is > scattered throughout the net on various websites, this book > attempts to > consolidate and summarize all that information into an all in > one guide > for Tivo upgrades, and it was written by people who have done what you > are planning. I can't imagine a handier guide. > While there are some typos early in the book, which I HATE, they are > easy to ignore, and do not lead you down the wrong path (I have read > some programming books that decreased my knowledge in an area). > Fortunately, this book only seems to suffer from it the first few > chapters, and then, if there were any more, I missed them as > I was busy > trying to learn how to put a webserver on my Tivo and expand its > capacity by 2-300%. > I've never considered myself a hardware guy, and so, the chapter on > removing the drives and putting them into a desktop are rich > enough with > detail to make even me feel confident enough to try it. And I must > note, the pictures are a tremendous help. After reading that chapter, > you will realize just how many Tivo are out there and appreciate the > effort that went into putting such a guide together. I am just glad I > do not have one of the more difficult models to upgrade; at > least those > unlucky souls out there will have a guide. They even document > where the > "hard to get at" screws are and some that you can safely leave to the > side as an "extra part." > The first connection to the Tivo described in the book is via > the serial > connection. While reading about the serial connection, I almost found > myself yelling at the book as if I were watching a horror movie (Come > one, don't use the serial connection, I have a Tivo2!) (I own a Tivo2 > series model which comes with a network card preinstalled.) > But I knew I > was only going to regret skipping this chapter if I ever hacked up my > Tivo so bad that I couldn't use the ethernet. Also, there is > something > prideful in knowing how to connect to your Tivo any way it can. He > shows us how to transfer new software to the Tivo and how to configure > it to run on boot up. We do this with some manual work made easy by > using some freely available tools. After reading that first > chapter, I > was tempted to dig out a serial connection and prepare myself to OWN > that Tivo, but there was a lot of book left to go, so I kept at it. > Next, if you are fortunate enough to have a Tivo with a network > interface card, then getting to Tivo via ethernet is trivial and > thoroughly described. If you are not that fortunate, or just have an > older Tivo lying around and you do not want to leave it out of the lan > parties, there are even instructions on how to connect a > network card to > older Tivos. > Now, that the connection was made and convenient, he shows us > that there > are already a suite of advanced tools out there (with more being > contributed). Once you see the webserver, you may never use > your remote > to schedule recordings again (you can even use it as the remote). You > can even use it to read email and or have your email read to you. It > will play mp3s and show you caller ID. Having Tivo connected to the > network opens brand new doors. > The only chapter I truly struggled with was the programming the Tivo > chapter. I know that Tivo is undocumented, and I appreciate > the effort > it must have took to find out all those commands AND what options they > take. But TCL is NOT an easy language to just pick up, and I have had > some training in it. Then I remember, this isn't Learing TCL, so take > note. If you really want to hack Tivo, you will have to read source > code and you will need a better guide for TCL than this book had space > to give. On the other hand, there are already so many programs out > there, by the time you have grown bored with them, you will have had > enough time to get a good TCL book. > The book is organized well and each chapter builds on the > previous. The > book builds your knowledge fast enough to keep you from getting bored, > but thorough enough that you can learn everything. As you make the > first fledgling connections to the Tivo, you are pretty > excited to just > be connected to the thing and make your name appear on the television > screen. (It kind of reminds me of my first computer, an Atari 800XL.) > As you go on through the book, you find yourself feeling more and more > confident about what you can do with the Tivo and it is almost like > getting a new Tivo. A hacked Tivo is to Tivo what Tivo is to > television. Once you do it, you will wonder why you hadn't done it > sooner. > > Aaron F Young > Broker Reconciliation > Operations & Portfolio Finance > Citadel Investment Group LLC > -------------------------------------------------------------- > -------------- > --------------------- > ------------------------- > > CONFIDENTIALITY AND SECURITY NOTICE > > This e-mail contains information that may be confidential and > proprietary. It is to be read and used solely by the intended > recipient(s). > Citadel and its affiliates retain all proprietary rights they > may have in > the > information. If you are not an intended recipient, please notify us > immediately either by reply e-mail or by telephone at 312-395-2100 > and delete this e-mail (including any attachments hereto) immediately > without reading, disseminating, distributing or copying. We > cannot give > any assurances that this e-mail and any attachments are free > of viruses > and other harmful code. Citadel reserves the right to > monitor, intercept > and block all communications involving its computer systems. > > > > > > > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > ------------------------------------------------------------------------------------------------- ------------------------- CONFIDENTIALITY AND SECURITY NOTICE This e-mail contains information that may be confidential and proprietary. It is to be read and used solely by the intended recipient(s). Citadel and its affiliates retain all proprietary rights they may have in the information. If you are not an intended recipient, please notify us immediately either by reply e-mail or by telephone at 312-395-2100 and delete this e-mail (including any attachments hereto) immediately without reading, disseminating, distributing or copying. We cannot give any assurances that this e-mail and any attachments are free of viruses and other harmful code. Citadel reserves the right to monitor, intercept and block all communications involving its computer systems. From mcavoy76 at hotmail.com Mon Dec 22 14:58:17 2003 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] Funny. Message-ID: http://www.oreillynet.com/pub/wlg/4099 Ha! Chris From andy at petdance.com Mon Dec 22 15:02:27 2003 From: andy at petdance.com (Andy Lester) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] Funny. In-Reply-To: References: Message-ID: <20031222210227.GA26375@petdance.com> On Mon, Dec 22, 2003 at 02:58:17PM -0600, Chris McAvoy (mcavoy76@hotmail.com) wrote: > http://www.oreillynet.com/pub/wlg/4099 Thanks. Wait 'til summer and I rant about garage sale signs! xoa -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance From Dooley.Michael at con-way.com Tue Dec 23 09:02:21 2003 From: Dooley.Michael at con-way.com (Dooley, Michael) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] Net::FTP Message-ID: is there a way to pull a unique filename from the Net::FTP package? something like $ftp->unique_name(); unfortunately this works on the server side not the client side or do I have to do something like below? my @local_files=glob("*"); ## assume you are in the proper directory if (grep $ftp_file eq $_, @local_files) { $ftp->get("$ftp_file",$ftp_file.$randnum); } else { $ftp->get("$ftp_file"); } -----Original Message----- From: chicago-talk-bounces@mail.pm.org [mailto:chicago-talk-bounces@mail.pm.org] On Behalf Of Ed Summers Sent: Thursday, December 18, 2003 2:37 PM To: Chicago.pm chatter Subject: Re: [Chicago-talk] Net::FTP On Thu, Dec 18, 2003 at 12:30:50PM -0800, Dooley, Michael wrote: > wanted to see if there was a better way to do it with perl. I've had good success w/ Net::FTP. It's a nice package, and Graham Barr's packages on CPAN are like gold. //Ed _______________________________________________ Chicago-talk mailing list Chicago-talk@mail.pm.org http://mail.pm.org/mailman/listinfo/chicago-talk From andy at petdance.com Tue Dec 23 09:03:27 2003 From: andy at petdance.com (Andy Lester) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] Fwd: [Open Source Chicago - Jan.22nd Event: ossinfo@osschicago.com] Message-ID: <20031223150327.GA1129@petdance.com> Here's information about the next Open Source Software Chicago meeting. It's also sponsored by Brunswick and JT. OSS meetings are more often aimed at a higher level view of topics, and less technically intense. This means you can bring your boss! xoa Please join Open Source Software Chicago on Jan.22nd as we bring you "Effective Security using Open Source Security Tools" Presenter: Bob Radvanovsky This presentation will provide an introduction to effective Open Source tools used for security. Some of the more obvious tools covered will be: ipchains/iptables, nmap, ethereal and tcpdump. Some of the not-so-obvious tools we will review are kismet, Wellenreiter, snort, and shadow. Our presenter, Bob Radvanovsky has a long history with systems development and engineering. Here is a little more about Bob's background. Bob Radvanovsky has a background in systems development and engineering, with recent endeavors in areas of security, specifically in penetration testing & analysis, risk assessments (policy and site assessment), policy management (documentation and change control), and secured infrastructure (intrusion detection systems [IDS], firewalls, proxy servers, et. al). Bob's passion for computer technology development has spawned a complete data center at his home, as well as varied presentations on UNIX (or LINUX) operating system environments, various security tools for LINUX, and open forum discussions specific to home environment securification. Bob has also performed some security work (under contract) for the United States Department of Defense in an effort to secure some of their environments. What: OSS Chicago's regular meetings Where: 200 Fairway Drive, Ste 204, Vernon Hills IL (look for the OSS Banner) When: January 22nd, 2004 Time: 6:30 p.m. -- doors open 7:00 p.m. -- Introductions and presentations 7:30 p.m. -- Q&A 7:45 p.m. -- Open discussion start Beverages will be served. More information can be found on the Chicago Open Source website located at: http://www.OSSChicago.com Best Regards, Tiffany Patterson Open Source Software Chicago email: OssInfo@OSSChicago.com website: http://www.OSSChicago.com Please let us know whether you want to stay updated with our meeting information on our website at: http://www.osschicago.com/contact_us . -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance From andy at petdance.com Tue Dec 23 09:13:12 2003 From: andy at petdance.com (Andy Lester) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] Net::FTP In-Reply-To: References: Message-ID: <20031223151312.GA1278@petdance.com> > is there a way to pull a unique filename from the Net::FTP package? Take a look at POSIX::tmpnam() or the File::Temp module. http://perlmonks.thepen.com/128876.html has some info, too. xoa -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance From ehs at pobox.com Tue Dec 23 09:19:47 2003 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] Net::FTP In-Reply-To: References: Message-ID: <20031223151947.GA3543@chloe.inkdroid.org> On Tue, Dec 23, 2003 at 07:02:21AM -0800, Dooley, Michael wrote: > $ftp->get( $ftp_file, $ftp_file.$$.time() ); I think this is the way to go...specify a unique name in the get() call. If you are mirroring the contents of the FTP server, then perhaps overwriting what you have locally is the way to go. If you're not mirroring, then perhaps you should use a temporary directory where the files are staged. //Ed From lembark at wrkhors.com Tue Dec 23 14:21:35 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] Net::FTP In-Reply-To: References: Message-ID: <134410000.1072210895@[192.168.100.3]> -- "Dooley, Michael" > is there a way to pull a unique filename from the Net::FTP package? > > something like $ftp->unique_name(); unfortunately this works on the server > side not the client side or do I have to do something like below? > > my @local_files=glob("*"); ## assume you are in the proper directory > if (grep $ftp_file eq $_, @local_files) { > $ftp->get("$ftp_file",$ftp_file.$randnum); > } else { > $ftp->get("$ftp_file"); > } File::Temp will give you the ability to load a file into the local system, validate it, and then overwrite the existing file if you like. tempfile returns a file handle and path, and $ftp->get takes a file handle (nice way to unzip things on the fly also): sub ftp_get { my $ftp = shift or die "Bogus ftp_get: missing ftp"; my $remote = shift or die "Bogus ftp_get: missing remote"; my $local = basename $remote; my( $fh, $path ) = tempfile( "$local-XXXX" ); # double-check me that this returns zero... if( $ftp->get($remote, $fh) ) { # blew it... assume caller uses exceptions. # see attached for boilerplate... die "Failed $remote: $errorstring"; } else { rename $path, $remote or die "$path -> $remote: $!"; } # no return, caller is happy enough just to be alive. } The attached files are part of wormbase and use Schedule:Depend to dispatch the operation. Wormbase::Download does the deed. The $config argument is -- as you might guess -- a hash referent w/ named parameters. This generates a queue of items to be downloaded from the remote system and downloads the new files (i.e., ones not found on the local system). One cute trick is opening a gzip | cpio pipe in order to extract tarballs on the fly as they are downloaded. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 -------------- next part -------------- #!/usr/local/bin/perl -w package Wormbase; use strict; use FindBin qw( $Bin ); BEGIN { use lib "$Bin" } use Wormbase::Execute; runsched ( 'download :', 'download' ); # this isn't a module 0 __END__ -------------- next part -------------- A non-text attachment was scrubbed... Name: Download.pm Type: application/x-perl Size: 20669 bytes Desc: not available Url : http://mail.pm.org/pipermail/chicago-talk/attachments/20031223/117adf85/Download.bin From lembark at wrkhors.com Tue Dec 23 14:23:34 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] Net::FTP In-Reply-To: <20031223151947.GA3543@chloe.inkdroid.org> References: <20031223151947.GA3543@chloe.inkdroid.org> Message-ID: <134560000.1072211014@[192.168.100.3]> -- Ed Summers > On Tue, Dec 23, 2003 at 07:02:21AM -0800, Dooley, Michael wrote: >> $ftp->get( $ftp_file, $ftp_file.$$.time() ); > > I think this is the way to go...specify a unique name in the get() call. > If you are mirroring the contents of the FTP server, then perhaps > overwriting what you have locally is the way to go. If you're not > mirroring, then perhaps you should use a temporary directory where the > files are staged. use File::Temp; my ( $fh, $path ) = tempname basename $remote . '-XXX'; $ftp->get( $remote, $fh ) or die 'feh...'; Avoids all kinds of collisions. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From ehs at pobox.com Tue Dec 23 14:33:08 2003 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] Net::FTP In-Reply-To: <134560000.1072211014@[192.168.100.3]> References: <20031223151947.GA3543@chloe.inkdroid.org> <134560000.1072211014@[192.168.100.3]> Message-ID: <20031223203308.GA7285@chloe.inkdroid.org> On Tue, Dec 23, 2003 at 02:23:34PM -0600, Steven Lembark wrote: > Avoids all kinds of collisions. Like when the same process has requested the same file in the same second? Would be odd to get a collision, but odder things have happened I suppose. Point taken about using File::Temp, a nice addition to the Perl toolchest. //Ed From mcavoy76 at hotmail.com Tue Dec 23 14:39:21 2003 From: mcavoy76 at hotmail.com (Chris McAvoy) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] Slurp Message-ID: So, I have to work today, which sucks. So I decided to play around a little bit. I found a cool module called Mail::Simple, and I want to use it to make a fun little "MailBot" for a few mailing lists I'm responsible for. The mailing lists are handled by Mailman. I want to pop a script in front of Mailman that intercepts the incoming emails, checks for "certain stuff", and responds with "other stuff", or passes the email on to Mailman for suitable Pythonizing. I slurp STDIN, parse what I can only hope is an email message with Mail::Simple, and do something fun and cool, or just write the message (unmolested) back out to STDOUT. My concern is, what if some joker sends me an email with a huge attachment? Because I'm slurping STDIN, they could really whack me right? I found this article: http://www.perl.com/pub/a/2003/11/21/slurp.html?page=2 on file slurping. The last paragraph says, "You must still be aware to not slurp humongous files (logs, DNA sequences, and so forth), or STDIN, where you don't know how much data you will read in." So, there you have it, some guy is telling me to not slurp STDIN. What should I do here? Any ideas? Hopefully everyone will be writing me back via wireless in front of the fireplace with a dog or something keeping their feet warm, instead of from a cold gray cubicle. Chris From lembark at wrkhors.com Tue Dec 23 14:48:17 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] Net::FTP In-Reply-To: <20031223203308.GA7285@chloe.inkdroid.org> References: <20031223151947.GA3543@chloe.inkdroid.org> <134560000.1072211014@[192.168.100.3]> <20031223203308.GA7285@chloe.inkdroid.org> Message-ID: <135940000.1072212497@[192.168.100.3]> -- Ed Summers > On Tue, Dec 23, 2003 at 02:23:34PM -0600, Steven Lembark wrote: >> Avoids all kinds of collisions. > > Like when the same process has requested the same file in the same second? > Would be odd to get a collision, but odder things have happened I > suppose. Point taken about using File::Temp, a nice addition to the Perl > toolchest. It only takes one shot at: until( grab $remote, $tempname ) { report_an_error; } on a fast system to fill your download directory with trash... File::Temp is also better for security, since $$ and time can be related. This sounds pretty useless, until you realize that some downloads might contain shell code or Makefiles... -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From Andy_Bach at wiwb.uscourts.gov Tue Dec 23 14:55:27 2003 From: Andy_Bach at wiwb.uscourts.gov (Andy_Bach@wiwb.uscourts.gov) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] Slurp In-Reply-To: Message-ID: Don't slurp it all at once? I mean read the header, line by line (until the first blank line) and then look for something like, I dunno attachments or size in the header and then slurp the rest. vaguely: my $okay = 0; while (<>) { # blank line, end of header last if /^\s*$/; # process header lines } if ( $okay ) { $/ = "" $body = <>; } else { # bad msg? } a Andy Bach, Sys. Mangler Internet: andy_bach@wiwb.uscourts.gov VOICE: (608) 261-5738 FAX 264-5030 Documentation is the castor oil of programming. Managers know it must be good because the programmers hate it so much. From ehs at pobox.com Tue Dec 23 15:10:49 2003 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] Slurp In-Reply-To: References: Message-ID: <20031223211049.GB7285@chloe.inkdroid.org> On Tue, Dec 23, 2003 at 02:39:21PM -0600, Chris McAvoy wrote: > So, there you have it, some guy is telling me to not slurp STDIN. What > should I do here? Any ideas? Hopefully everyone will be writing me back > via wireless in front of the fireplace with a dog or something keeping their > feet warm, instead of from a cold gray cubicle. Alas, cold gray cubicle here too, but here's another module to warm you up: Mail::Bulkmail [1], written by chicago.pm's own Jim Thomason... //Ed [1] http://search.cpan.org/perldoc?Mail::Bulkmail From ossinfo at osschicago.com Tue Dec 23 15:11:22 2003 From: ossinfo at osschicago.com (ossinfo@osschicago.com) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] Open Source Chicago - Jan.22nd Event Message-ID: Please join Open Source Software Chicago on Jan.22nd as we bring you "Effective Security using Open Source Security Tools" Presenter: Bob Radvanovsky This presentation will provide an introduction to effective Open Source tools used for security. Some of the more obvious tools covered will be: ipchains/iptables, nmap, ethereal and tcpdump. Some of the not-so-obvious tools we will review are kismet, Wellenreiter, snort, and shadow. Our presenter, Bob Radvanovsky has a long history with systems development and engineering. Here is a little more about Bob's background. Bob Radvanovsky has a background in systems development and engineering, with recent endeavors in areas of security, specifically in penetration testing & analysis, risk assessments (policy and site assessment), policy management (documentation and change control), and secured infrastructure (intrusion detection systems [IDS], firewalls, proxy servers, et. al). Bob's passion for computer technology development has spawned a complete data center at his home, as well as varied presentations on UNIX (or LINUX) operating system environments, various security tools for LINUX, and open forum discussions specific to home environment securification. Bob has also performed some security work (under contract) for the United States Department of Defense in an effort to secure some of their environments. What: OSS Chicago's regular meetings Where: 200 Fairway Drive, Ste 204, Vernon Hills IL (look for the OSS Banner) When: January 22nd, 2004 Time: 6:30 p.m. -- doors open 7:00 p.m. -- Introductions and presentations 7:30 p.m. -- Q&A 7:45 p.m. -- Open discussion start Beverages will be served. More information can be found on the Chicago Open Source website located at: http://www.OSSChicago.com Best Regards, Tiffany Patterson Open Source Software Chicago email: OssInfo@OSSChicago.com website: http://www.OSSChicago.com Please let us know whether you want to stay updated with our meeting information on our website at: http://www.osschicago.com/contact_us . From lembark at wrkhors.com Tue Dec 23 16:46:26 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] Slurp In-Reply-To: References: Message-ID: <162300000.1072219586@[192.168.100.3]> > My concern is, what if some joker sends me an email with a huge > attachment? Because I'm slurping STDIN, they could really whack me right? You allocate virtual memory until you (a) fill the swap segments and run out, (b) hit your process limits, or (c) slurp the file. Slurping things that you cannot check (e.g., STDIN) is usually a bad idea in uncontrolled situations (e.g., incomming email). Downloading DNA files from GenBank is a bit more controlled since you at least have some idea that GB is not acting mailiciously. A better method might be to use sysread with a fixed buffer size that you know you can read, deal with the contents as-is and discard anything else. That way you can still deal with the input as a single scalar but don't have to worry about blowing your server out of the water. enjoi -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From petemar1 at perlmonk.org Tue Dec 23 17:09:29 2003 From: petemar1 at perlmonk.org (petemar1) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] Funny. In-Reply-To: <20031222210227.GA26375@petdance.com> Message-ID: http://www.gwangwa.com/petemar1/Mathematik.pdf exported from msword -----Original Message----- From: chicago-talk-bounces@mail.pm.org [mailto:chicago-talk-bounces@mail.pm.org] Sent: Monday, December 22, 2003 6:05 PM To: petemar1@perlmonk.org Subject: Request to mailing list Chicago-talk rejected Your request to the Chicago-talk mailing list Posting of your message titled "RE: [Chicago-talk] Funny." has been rejected by the list moderator. The moderator gave the following reason for rejecting your request: "No reason given" Any questions or comments should be directed to the list administrator at: chicago-talk-owner@mail.pm.org -----Original Message----- From: chicago-talk-bounces@mail.pm.org [mailto:chicago-talk-bounces@mail.pm.org] Sent: Monday, December 22, 2003 6:02 PM To: petemar1@perlmonk.org Subject: Your message to Chicago-talk awaits moderator approval Your mail to 'Chicago-talk' with the subject RE: [Chicago-talk] Funny. Is being held until the list moderator can review it for approval. The reason it is being held: Message body is too big: 113195 bytes with a limit of 40 KB Either the message will get posted to the list, or you will receive notification of the moderator's decision. If you would like to cancel this posting, please visit the following URL: http://mail.pm.org/mailman/confirm/chicago-talk/64929bb677bf7afb02cc85091308 9bdae4b38dd3 -----Original Message----- From: chicago-talk-bounces@mail.pm.org [mailto:chicago-talk-bounces@mail.pm.org]On Behalf Of Andy Lester Sent: Monday, December 22, 2003 3:02 PM To: Chicago.pm chatter Subject: Re: [Chicago-talk] Funny. On Mon, Dec 22, 2003 at 02:58:17PM -0600, Chris McAvoy (mcavoy76@hotmail.com) wrote: > http://www.oreillynet.com/pub/wlg/4099 Thanks. Wait 'til summer and I rant about garage sale signs! xoa -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance _______________________________________________ Chicago-talk mailing list Chicago-talk@mail.pm.org http://mail.pm.org/mailman/listinfo/chicago-talk From lembark at wrkhors.com Fri Dec 26 10:04:39 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] [OT] Message-ID: <903440000.1072454679@[192.168.200.4]> Hoping you have a perly year. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From petemar1 at perlmonk.org Fri Dec 26 18:12:11 2003 From: petemar1 at perlmonk.org (petemar1) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] [OT] In-Reply-To: <903440000.1072454679@[192.168.200.4]> Message-ID: Given the set of all celebrations occurring within the months of December and January, "Have a happy x," where x is the celebration of choice. -----Original Message----- From: chicago-talk-bounces@mail.pm.org [mailto:chicago-talk-bounces@mail.pm.org]On Behalf Of Steven Lembark Sent: Friday, December 26, 2003 10:05 AM To: Perl Mongers Subject: [Chicago-talk] [OT] Hoping you have a perly year. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 _______________________________________________ Chicago-talk mailing list Chicago-talk@mail.pm.org http://mail.pm.org/mailman/listinfo/chicago-talk From petemar1 at perlmonk.org Fri Dec 26 19:51:58 2003 From: petemar1 at perlmonk.org (petemar1) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] "I don't have permission to install a module onthe system!" In-Reply-To: <72390000.1071508399@[192.168.100.3]> Message-ID: Is there a way of resolving module dependencies without manually installing(munging) everything? I recall there's a cpan module that auto-installs modules, but don't remember it's name. -----Original Message----- From: chicago-talk-bounces@mail.pm.org [mailto:chicago-talk-bounces@mail.pm.org]On Behalf Of Steven Lembark Sent: Monday, December 15, 2003 11:13 AM To: Chicago.pm chatter Subject: Re: [Chicago-talk] "I don't have permission to install a module onthe system!" -- Andy Lester >> I Read and followed The Friendly, shiny Manual and met with limited >> results when attempting to install modules without root. Any pointers, >> hints or helpful riddles? Does one need root for CPAN.pm? > > You need to install the modules to your home directory. Do this: > > perl Makefile.PL PREFIX=/your/home/directory/lib > make > make test > make install That or install them into a standard sandbox area. The main advantage to that -- aside from segregating the floatsom of development -- is being able to share the sandbox tree for common installs. If everyone can agree on a place to install non-stock modules you can use lib /common_area in all of the code; relying on perl code with "use lib $ENV{HOME}/blah" can be dangerous unless system has only a single user. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 _______________________________________________ Chicago-talk mailing list Chicago-talk@mail.pm.org http://mail.pm.org/mailman/listinfo/chicago-talk From lembark at wrkhors.com Sat Dec 27 03:06:52 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] "I don't have permission to install a module onthe system!" In-Reply-To: References: Message-ID: <1252840000.1072516012@[192.168.200.4]> -- petemar1 > Is there a way of resolving module dependencies without manually > installing(munging) everything? I recall there's a cpan module that > auto-installs modules, but don't remember it's name. $ cd; $ mkdir sandbox/ $ cd sandbox; $ mkdir lib; $ cvs co ; # at this point you have a working copy of the project # under $HOME/sandbox/blah and a library directory in # $HOME/sandbox/lib # # Now install the module into the sandbox's lib directory $ cd ; $ perl Makefile.PL PREFIX=~/sandbox/lib; $ make test install; # lets assume it worked... # now you have a choice. if you can get the SysAdmin's # to install FindBin::libs then skip the next step. $ perl -MCPAN -e shell; > get FindBin::libs; > cd FindBin-libs-0.13; > perl Makefile.PL PREFIX=~/sandbox/lib; $ make test install; # lets assume this works also... $ cd ; $ ln -fs ../lib/FindBin .; # ok, you now have a copy of the module under # $HOME/sandbox/lib/whatever... now you have a # choice. if anything perl knows h $ vi add the line "use FindBin::libs;" to your source. OK, you're done forever. Wherever you land the #! code if there is any "lib" directory above it that has your module in it you'll get the module. If you can get the SA's to install FindBin::libs wherever perl can find it (default is site_perl/) then you can install your own code and never worry about invading the holy santuary of /usr/local again [or getting hit by lightning for your sins :-]. If they won't install it then the symlink'll do the trick since '.' is normally on the default @INC (check this via "perl -V"). There are doc's on setting up a standard sandbox for shared development or regression testing. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From petemar1 at perlmonk.org Sat Dec 27 09:23:53 2003 From: petemar1 at perlmonk.org (petemar1) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] "I don't have permission to install a moduleonthe system!" In-Reply-To: <1252840000.1072516012@[192.168.200.4]> Message-ID: Does this look right as a line in .bashrc: export CVSROOT=/home/petemar1/.cvsroot/ ??? When I do this: $ cvs co scrapebay; I get a nasty error: cvs checkout: cannot find module `scrapebay' - ignored Argh. -----Original Message----- From: chicago-talk-bounces@mail.pm.org [mailto:chicago-talk-bounces@mail.pm.org]On Behalf Of Steven Lembark Sent: Saturday, December 27, 2003 3:07 AM To: Chicago.pm chatter Subject: RE: [Chicago-talk] "I don't have permission to install a moduleonthe system!" -- petemar1 > Is there a way of resolving module dependencies without manually > installing(munging) everything? I recall there's a cpan module that > auto-installs modules, but don't remember it's name. $ cd; $ mkdir sandbox/ $ cd sandbox; $ mkdir lib; $ cvs co ; # at this point you have a working copy of the project # under $HOME/sandbox/blah and a library directory in # $HOME/sandbox/lib # # Now install the module into the sandbox's lib directory $ cd ; $ perl Makefile.PL PREFIX=~/sandbox/lib; $ make test install; # lets assume it worked... # now you have a choice. if you can get the SysAdmin's # to install FindBin::libs then skip the next step. $ perl -MCPAN -e shell; > get FindBin::libs; > cd FindBin-libs-0.13; > perl Makefile.PL PREFIX=~/sandbox/lib; $ make test install; # lets assume this works also... $ cd ; $ ln -fs ../lib/FindBin .; # ok, you now have a copy of the module under # $HOME/sandbox/lib/whatever... now you have a # choice. if anything perl knows h $ vi add the line "use FindBin::libs;" to your source. OK, you're done forever. Wherever you land the #! code if there is any "lib" directory above it that has your module in it you'll get the module. If you can get the SA's to install FindBin::libs wherever perl can find it (default is site_perl/) then you can install your own code and never worry about invading the holy santuary of /usr/local again [or getting hit by lightning for your sins :-]. If they won't install it then the symlink'll do the trick since '.' is normally on the default @INC (check this via "perl -V"). There are doc's on setting up a standard sandbox for shared development or regression testing. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 _______________________________________________ Chicago-talk mailing list Chicago-talk@mail.pm.org http://mail.pm.org/mailman/listinfo/chicago-talk From petemar1 at perlmonk.org Sat Dec 27 19:01:15 2003 From: petemar1 at perlmonk.org (petemar1) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] "I don't have permission to install a moduleonthesystem!" In-Reply-To: Message-ID: Never mind that: gotit. Now this: $ perl -MCPAN -e shell; Your configuration suggests "/var/perl/cpan" as your CPAN.pm working directory. I could not create this directory due to this error: mkdir /var/perl: Permission denied at /opt/perl/perl-5.8.0/lib/5.8.0/CPAN.pm line 530 Please make sure the directory exists and is writable. I've sent an install request for FindBin::libs to the sysadmin. -----Original Message----- From: chicago-talk-bounces@mail.pm.org [mailto:chicago-talk-bounces@mail.pm.org]On Behalf Of petemar1 Sent: Saturday, December 27, 2003 9:24 AM To: Chicago.pm chatter Subject: RE: [Chicago-talk] "I don't have permission to install a moduleonthesystem!" Does this look right as a line in .bashrc: export CVSROOT=/home/petemar1/.cvsroot/ ??? When I do this: $ cvs co scrapebay; I get a nasty error: cvs checkout: cannot find module `scrapebay' - ignored Argh. From andy at petdance.com Sat Dec 27 19:05:45 2003 From: andy at petdance.com (Andy Lester) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] "I don't have permission to install a moduleonthesystem!"' In-Reply-To: References: Message-ID: <20031228010545.GA4066@petdance.com> I believe you can set PREFIX as an environment variable before you run CPAN. This problem is certain to be a FAQ. xoa From petemar1 at perlmonk.org Sat Dec 27 20:41:43 2003 From: petemar1 at perlmonk.org (petemar1) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] "I don't have permission to install amoduleonthesystem!"' In-Reply-To: <20031228010545.GA4066@petdance.com> Message-ID: "Is every part of Perl so 'hackerish?'," he asked rhetorically. -----Original Message----- From: chicago-talk-bounces@mail.pm.org [mailto:chicago-talk-bounces@mail.pm.org]On Behalf Of Andy Lester Sent: Saturday, December 27, 2003 7:06 PM To: Chicago.pm chatter Subject: Re: [Chicago-talk] "I don't have permission to install amoduleonthesystem!"' I believe you can set PREFIX as an environment variable before you run CPAN. This problem is certain to be a FAQ. xoa _______________________________________________ Chicago-talk mailing list Chicago-talk@mail.pm.org http://mail.pm.org/mailman/listinfo/chicago-talk From ehs at pobox.com Sat Dec 27 20:55:09 2003 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] "I don't have permission to install amoduleonthesystem!"' In-Reply-To: References: <20031228010545.GA4066@petdance.com> Message-ID: <20031228025509.GA29103@chloe.inkdroid.org> On Sat, Dec 27, 2003 at 08:41:43PM -0600, petemar1 wrote: > "Is every part of Perl so 'hackerish?'," he asked rhetorically. I guess you'd prefer using CLASSPATH [1] to PREFIX eh? ;-) If I were you I would get friendly with your sysadmin and install stuff so *everyone* on the system can use it. Also, CPANPLUS [2] has a sudo hook now which could let select users build and test stuff as regular users, and invoke sudo just for the install bit. Kinda nice if a sysadmin wants to grant Perl install permissions only. //Ed [1] http://groups.google.com/groups?q=problem+classpath [2] http://search.cpan.org/perldoc?CPANPLUS From petemar1 at perlmonk.org Sat Dec 27 21:22:42 2003 From: petemar1 at perlmonk.org (petemar1) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] "I don't have permission to installamoduleonthesystem!"' In-Reply-To: <20031228025509.GA29103@chloe.inkdroid.org> Message-ID: CLASSPATH was a nightmare as well... I'm no Marlon Perkins, but sysadmins are generally paranoid, slow-moving creatures. Does Parrot have a more quasi-CLASSPATH environment variable? It would be nice to have the "automagically find my modules" module(s) as part of the standard distribution. -----Original Message----- From: chicago-talk-bounces@mail.pm.org [mailto:chicago-talk-bounces@mail.pm.org]On Behalf Of Ed Summers Sent: Saturday, December 27, 2003 8:55 PM To: Chicago.pm chatter Subject: Re: [Chicago-talk] "I don't have permission to installamoduleonthesystem!"' On Sat, Dec 27, 2003 at 08:41:43PM -0600, petemar1 wrote: > "Is every part of Perl so 'hackerish?'," he asked rhetorically. I guess you'd prefer using CLASSPATH [1] to PREFIX eh? ;-) If I were you I would get friendly with your sysadmin and install stuff so *everyone* on the system can use it. Also, CPANPLUS [2] has a sudo hook now which could let select users build and test stuff as regular users, and invoke sudo just for the install bit. Kinda nice if a sysadmin wants to grant Perl install permissions only. //Ed [1] http://groups.google.com/groups?q=problem+classpath [2] http://search.cpan.org/perldoc?CPANPLUS _______________________________________________ Chicago-talk mailing list Chicago-talk@mail.pm.org http://mail.pm.org/mailman/listinfo/chicago-talk From lembark at wrkhors.com Sat Dec 27 23:39:58 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] "I don't have permission to install a moduleonthe system!" In-Reply-To: References: Message-ID: <1658180000.1072589998@[192.168.200.4]> -- petemar1 > Does this look right as a line in .bashrc: > > export CVSROOT=/home/petemar1/.cvsroot/ For the one time in a zilling that you really need the '-d' option either put it in your .cvsrc or just use the "-d" switch... How many times do you check anything out anyway? The main problem with setting something like this is you'll go nuts the one time in a zillion that you need to check an item out from another place :-) -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From lembark at wrkhors.com Sat Dec 27 23:41:31 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] "I don't have permission to install a moduleonthesystem!" In-Reply-To: References: Message-ID: <1659370000.1072590091@[192.168.200.4]> -- petemar1 > Never mind that: gotit. Now this: > > $ perl -MCPAN -e shell; > > Your configuration suggests "/var/perl/cpan" as your CPAN.pm working > directory. I could not create this directory due to this error: mkdir > /var/perl: Permission denied at /opt/perl/perl-5.8.0/lib/5.8.0/CPAN.pm > line 530 > > Please make sure the directory exists and is writable. > > I've sent an install request for FindBin::libs to the sysadmin. Question: was this setting out of ~/.cpan or /perl/install/dir/lib//CPAN/Config.pm? If the former just update it to something like ~/.cpan; if not then make a point of having your own .cpan settings. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From lembark at wrkhors.com Sat Dec 27 23:43:57 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] "I don't have permission to install amoduleonthesystem!"' In-Reply-To: References: Message-ID: <1660790000.1072590237@[192.168.200.4]> -- petemar1 > "Is every part of Perl so 'hackerish?'," he asked rhetorically. "hackerish", as in "maintaining the distribution of a product on your local system"? If so, then yes: if you want to maintain the local system then it is reasonable that you know what the hell you're doing before screwing things up. You can also check perldoc for CPAN and get all of this: it's not obfuscated even if the settings are non-obvious. enjoy playing SysAdmin :-) -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From lembark at wrkhors.com Sat Dec 27 23:51:15 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] "I don't have permission to installamoduleonthesystem!"' In-Reply-To: References: Message-ID: <1664180000.1072590675@[192.168.200.4]> > I'm no Marlon Perkins, but sysadmins are generally paranoid, slow-moving > creatures. Gee, thanks. I'm sure you'd prefer someone who quickly installs broken lib's and has the machine down for a week re-installing and recovering the user space. Every SysAdmin has been bit by something like this at least once, told to suck off by vendor support, and deciced that nothing ever gets changed again. Period. The honest, forgiving care we get from users while the restore is going on is another inducement to treat the vendor distro as frozen in time. The hard part is learning enough about how the packages work to allow people installing enough of it for local use without risking the overall stability. That requires that most rare of lubricants: elbow grease. Even worse, you have to grease your brain cells to make it all useful. Unless they're really into reading Nemeth and friends cover-to-cover most SA's will never know how to customize a system and the vendor support will never tell them. > Does Parrot have a more quasi-CLASSPATH environment variable? It would be > nice to have the "automagically find my modules" module(s) as part of the > standard distribution. FindBin::libs. It's on CPAN, feel free to suggest that it be made part of the standard distribution (Graham's FindBin is already). In the meantime, get your admins to install it off of CPAN and you'll never need to pollute their holy lib's again. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From andy at petdance.com Sat Dec 27 23:45:24 2003 From: andy at petdance.com (Andy Lester) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] "I don't have permission to install a moduleonthe system!" In-Reply-To: <1658180000.1072589998@[192.168.200.4]> References: <1658180000.1072589998@[192.168.200.4]> Message-ID: <20031228054524.GA12351@petdance.com> > For the one time in a zilling that you really need the > '-d' option either put it in your .cvsrc or just use > the "-d" switch... How many times do you check anything But when you DO need it, it's a real waste of time tracking it down. Create a ~/.cvsrc file to take care of it for you: cvs -q -z3 update -d -P checkout -P -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance From petemar1 at perlmonk.org Sun Dec 28 04:47:13 2003 From: petemar1 at perlmonk.org (petemar1) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] "I don't have permission to installamoduleonthesystem!"' In-Reply-To: <1660790000.1072590237@[192.168.200.4]> Message-ID: http://www.zenspider.com/Languages/Perl/index.html http://www.techgnosis.com/wall1.html WALL: I not only want Perl to be a good 'glue' language, I want Perl people to be good 'glue' people. FEED: What makes a good 'glue' person? WALL: Let me distinguish two different kinds of joiners. You have people who will join a movement and be totally gung-ho about it. That's great. We need the cheerleaders. But that's merely a form of tribalism. What we also try to encourage are the kind of joiners who join many things. These people are like the intersection in a Venn diagram, who like to be at the intersection of two different tribes. In an actual tribal situation, these are the merchants, who go back and forth between tribes and actually produce an economy. In theological terms we call them peacemakers. In terms of Perl language, these are the people who will not just sit there and write everything in Perl, but the people who will say: Perl is good for this part of the problem, and this other tool is good for that part of the problem, so let's hook 'em together. They see Perl both from the inside and from the outside, just like a missionary. That takes a kind of humility, not only on the part of the person, but on the language. Perl does not want to make more of itself than it is. It's willing to be the servant of other things. -----Original Message----- From: chicago-talk-bounces@mail.pm.org [mailto:chicago-talk-bounces@mail.pm.org]On Behalf Of Steven Lembark Sent: Saturday, December 27, 2003 11:44 PM To: Chicago.pm chatter Subject: RE: [Chicago-talk] "I don't have permission to installamoduleonthesystem!"' -- petemar1 > "Is every part of Perl so 'hackerish?'," he asked rhetorically. "hackerish", as in "maintaining the distribution of a product on your local system"? If so, then yes: if you want to maintain the local system then it is reasonable that you know what the hell you're doing before screwing things up. You can also check perldoc for CPAN and get all of this: it's not obfuscated even if the settings are non-obvious. enjoy playing SysAdmin :-) -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 _______________________________________________ Chicago-talk mailing list Chicago-talk@mail.pm.org http://mail.pm.org/mailman/listinfo/chicago-talk From ehs at pobox.com Sun Dec 28 07:03:35 2003 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] "I don't have permission to installamoduleonthesystem!"' In-Reply-To: References: <1660790000.1072590237@[192.168.200.4]> Message-ID: <20031228130335.GB29103@chloe.inkdroid.org> On Sun, Dec 28, 2003 at 04:47:13AM -0600, petemar1 wrote: > http://www.zenspider.com/Languages/Perl/index.html > I like Perl, I really do. I can get a lot done with it fast. But it is a > HACKING language and it is uglier than hell. So in many ways I don't like it. > It is kinda like C++, I'm good at it, but don't like doing it necessarily. I > do think it needs some improvements, but they are "improvements" only in > the philosophical sense. No argument, I've seen some Perl programs that are "uglier than hell". But I've also seen absolutley beautiful Perl programs as well. It would be nice to see examples of ugly and beautiful Perl, in fact it might make a good presentation somewhere down the road. I can see the title now, Perl: The Beautiful and the Damned Unlike other languages which enforce a particular programming paradigm [1], or presentation [2], Perl is very flexible and allows for a variety of expressions. Unfortunately, this can sometimes lead to what some might consider ugly programs...but it can lead to jems as well. I think that the all too familiar time pressures make for ugly Perl programs: since it is easy to give in to them and crank out a quick Perl program which gets the job done (for now), while promising yourself that you will return to refactor it later when you have time... > What we also try to encourage are the kind of joiners who join many > things. These people are like the intersection in a Venn diagram, who > like to be at the intersection of two different tribes. In an actual > tribal situation, these are the merchants, who go back and forth > between tribes and actually produce an economy. In theological terms > we call them peacemakers. Thanks for quoting that: it sums up what I enjoy most about the language Perl and even more the people who use it. As Dave Cross has said elsewhere [3] The Perl community has one of the highest concentrations of smart and interesting people that I've ever come across. //Ed [1] http://java.sun.com [2] http://www.python.org [3] http://www.dave.org.uk/talks/advocacy.html From lembark at wrkhors.com Sun Dec 28 17:15:41 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] "I don't have permission to installamoduleonthesystem!"' In-Reply-To: <20031228130335.GB29103@chloe.inkdroid.org> References: <1660790000.1072590237@[192.168.200.4]> <20031228130335.GB29103@chloe.inkdroid.org> Message-ID: <1947150000.1072653341@[192.168.200.4]> > Unfortunately, this can sometimes lead to what some might consider ugly > programs...but it can lead to jems as well. I think that the all too > familiar time pressures make for ugly Perl programs: since it is easy to > give in to them and crank out a quick Perl program which gets the job > done (for now), while promising yourself that you will return to refactor > it later when you have time... You can write ugly C, python, or lisp the same way unless you get good enough at coding the language to develop a real style that you can follow consistently. At that point even your hacks will tend to look better. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From petemar1 at perlmonk.org Sun Dec 28 21:14:45 2003 From: petemar1 at perlmonk.org (petemar1) Date: Mon Aug 2 21:27:58 2004 Subject: [Chicago-talk] "I don't have permission to installamoduleonthesystem!"' In-Reply-To: <1660790000.1072590237@[192.168.200.4]> Message-ID: http://www.perlmonks.org/index.pl?node_id=26274 ### 2003: 5 boxes (w2000pro, Solaris7X86, NT4Svr, Debian3.0, MacOS9), ### 1 laptop (Slackware8.1) I already do with the SlackPad (Slackware 8.0 on a ThinkPad 380D) and the DebMachine (Woody on an eMachine e tower 500is). It's installing as a user that's a "point of pain." >> -----Original Message----- From: chicago-talk-bounces@mail.pm.org [mailto:chicago-talk-bounces@mail.pm.org]On Behalf Of Steven Lembark Sent: Saturday, December 27, 2003 11:44 PM To: Chicago.pm chatter Subject: RE: [Chicago-talk] "I don't have permission to installamoduleonthesystem!"' enjoy playing SysAdmin :-) >> From petemar1 at perlmonk.org Mon Dec 29 11:41:15 2003 From: petemar1 at perlmonk.org (petemar1) Date: Mon Aug 2 21:27:59 2004 Subject: [Chicago-talk] "I don't have permission to install amoduleonthesystem!" In-Reply-To: <1659370000.1072590091@[192.168.200.4]> Message-ID: Does anyone have a sample .cpan file? >> just update it to something like ~/.cpan; if not then make a point of having your own .cpan settings. >> From Dooley.Michael at con-way.com Mon Dec 29 15:31:28 2003 From: Dooley.Michael at con-way.com (Dooley, Michael) Date: Mon Aug 2 21:27:59 2004 Subject: [Chicago-talk] map and pop Message-ID: I want to do something like this, but I also want to remove the found element from @files. my @nfiles=grep /^car/, @files; can anyone point me in the right direction, I am thinking map is needed but I don't have much confidence using it. From andy at petdance.com Mon Dec 29 15:34:11 2003 From: andy at petdance.com (Andy Lester) Date: Mon Aug 2 21:27:59 2004 Subject: [Chicago-talk] map and pop In-Reply-To: References: Message-ID: <20031229213411.GA24309@petdance.com> On Mon, Dec 29, 2003 at 01:31:28PM -0800, Dooley, Michael (Dooley.Michael@con-way.com) wrote: > my @nfiles=grep /^car/, @files; If you want to just have a version of the list without that element in it, then my @nfiles = grep !/^car/, @files; If you want both a copy of the removed one, AND you want it removed, then you'll need a more explicit loop, unless you want to get really tricky. xoa -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance From briank at kappacs.com Mon Dec 29 17:35:52 2003 From: briank at kappacs.com (Brian Katzung) Date: Mon Aug 2 21:27:59 2004 Subject: [Chicago-talk] map and pop In-Reply-To: References: Message-ID: <3FF0BA58.9050909@kappacs.com> Dooley, Michael wrote: > I want to do something like this, but I also want to remove the found > element from @files. > > my @nfiles=grep /^car/, @files; > > can anyone point me in the right direction, I am thinking map is needed but > I don't have much confidence using it. Why not just: my @nfiles = grep /^car/, @files; @files = grep !/^car/, @files; -- Brian Katzung, President, Kappa Computer Solutions, LLC Phone +1.877.367.8837 or visit http://www.kappacs.com/ From frag at ripco.com Mon Dec 29 22:07:43 2003 From: frag at ripco.com (Mike Fragassi) Date: Mon Aug 2 21:27:59 2004 Subject: [Chicago-talk] "I don't have permission to install amoduleonthesystem!" In-Reply-To: References: Message-ID: On Mon, 29 Dec 2003, petemar1 wrote: > Does anyone have a sample .cpan file? First, the file is not ~/.cpan, but ~/.cpan/CPAN/MyConfig.pm. Second, the argument that you need is 'makepl_arg' => q[PREFIX=/your/home/dir/here], Allegedly you can make do with '~', but I seem to have had some problems with that. If you do not already have the MyConfig.pm file, simply locate the root user's CPAN/Config.pm, and copy it to that location, and make the changes. Also, once you've done that, replace all references to '/root/' with '/your/home/dir/here', except for the paths of executables, like lynx, make, ftp, etc. (Note that PREFIX is really an argument for ExtUtils::MakeMaker, and gets passed to the 'perl Makefile.PL' stage. If you ever find yourself having to install a perl module outside of the CPAN shell, i.e. by ftping a module, untar/zipping it, etc., all you need to do is run 'perl Makefile.PL PREFIX=/your/home' instead of 'perl Makefile.PL'; all the other steps in the installation process don't need to be changed. If you have to do this often, just create a shell alias -- call it 'mymakeperl' or something. Also note that ExtUtils::MakeMaker "has issues"[1], and Module::Build is being increasingly adopted as a replacement, much like CPANPLUS is intended as a replacement of CPAN.pm.) Finally, to use your new, personal ~/lib, be sure to set the following in your .bash_profile (or whichever): PERL5LIB='/your/home/lib' Or just make sure that all your programs 'use lib qw(/your/home/lib);'. I highly recommend jumping through these hoops to avoid polluting the root set of modules, even on systems where you do have root access. Once I upgraded to the latest copy of CGI.pm, only to discover that the upgrade actually broke the way that -style parameters were used. (I'm pretty sure this has been fixed, incidentally.) Because I only installed into my ~/lib, I could just nuke that and revert to the default module, and I could breathe easy knowing I hadn't affected any other user's scripts. Similarly, when editing MyConfig.pm, I recommend 'prerequisites_policy' => q[ask], and not 'follow'. -- Mike F. [1]http://search.cpan.org/~kwilliams/Module-Build-0.21/lib/Module/Build.pm#MOTIVATIONS Also: http://www.makemaker.org/src/ExtUtils-MakeMaker-snap/lib/ExtUtils/MakeMaker/FAQ.pod And: http://magnonel.guild.net/~schwern/talks/MakeMaker_Is_DOOMED/slides/ From me at heyjay.com Mon Dec 29 22:29:14 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:59 2004 Subject: [Chicago-talk] Very late Tivo Hacks review References: <800BCF60D1553144BABCBFCE36249D3D0861F4E6@CORPEMAIL.citadelgroup.com> Message-ID: <044b01c3ce8e$c6a250b0$6405a8c0@a30> Hey thanks Aaron, I shot you the message and promptly went on vacation for a week. Maybe I'll buy the book, but lately I've been thinking about getting direct-tv with tivo built it (which would solve a few of my tivo ills) Jay ----- Original Message ----- From: "Young, Aaron" To: "Chicago.pm chatter" Sent: Monday, December 22, 2003 7:17 AM Subject: RE: [Chicago-talk] Very late Tivo Hacks review yes, they talk about what kind of card you have to order and give some suggestions on what to do to make it look less like a "home" job i don't have it handy this moment, so i'm going by memory, but it is VERY thorough on the types of tivos out there and how to get them all connected Aaron F Young Broker Reconciliation Operations & Portfolio Finance Citadel Investment Group LLC > -----Original Message----- > From: Jay Strauss [mailto:me@heyjay.com] > Sent: Friday, December 19, 2003 9:14 PM > To: Chicago.pm chatter > Subject: Re: [Chicago-talk] Very late Tivo Hacks review > > > Did the book mention installing a Ethernet card in a sonny > vivo 1 series? > My modem is broke > > Jay > ----- Original Message ----- > From: "Young, Aaron" > To: "Chicago.pm chatter" > Sent: Friday, December 19, 2003 12:32 PM > Subject: [Chicago-talk] Very late Tivo Hacks review > > > my pithy offering > > Tivo Hacks > This is a book for the Tivo owner that loves their Tivo, > could not live > without it, loves what it does, but surely...it can do a little more. > And this book is for the person that wants the value of the published > book. There is definitely something convenient about holding step by > step instructions in your hand while your equipment is in > pieces before > you just waiting to have those two 200gig harddrives placed inside to > eventually be filled with episodes of Home Movies and Space > Ghost. And > it is valuable to know that that information you hold was read by at > least one other person before you. While most of this information is > scattered throughout the net on various websites, this book > attempts to > consolidate and summarize all that information into an all in > one guide > for Tivo upgrades, and it was written by people who have done what you > are planning. I can't imagine a handier guide. > While there are some typos early in the book, which I HATE, they are > easy to ignore, and do not lead you down the wrong path (I have read > some programming books that decreased my knowledge in an area). > Fortunately, this book only seems to suffer from it the first few > chapters, and then, if there were any more, I missed them as > I was busy > trying to learn how to put a webserver on my Tivo and expand its > capacity by 2-300%. > I've never considered myself a hardware guy, and so, the chapter on > removing the drives and putting them into a desktop are rich > enough with > detail to make even me feel confident enough to try it. And I must > note, the pictures are a tremendous help. After reading that chapter, > you will realize just how many Tivo are out there and appreciate the > effort that went into putting such a guide together. I am just glad I > do not have one of the more difficult models to upgrade; at > least those > unlucky souls out there will have a guide. They even document > where the > "hard to get at" screws are and some that you can safely leave to the > side as an "extra part." > The first connection to the Tivo described in the book is via > the serial > connection. While reading about the serial connection, I almost found > myself yelling at the book as if I were watching a horror movie (Come > one, don't use the serial connection, I have a Tivo2!) (I own a Tivo2 > series model which comes with a network card preinstalled.) > But I knew I > was only going to regret skipping this chapter if I ever hacked up my > Tivo so bad that I couldn't use the ethernet. Also, there is > something > prideful in knowing how to connect to your Tivo any way it can. He > shows us how to transfer new software to the Tivo and how to configure > it to run on boot up. We do this with some manual work made easy by > using some freely available tools. After reading that first > chapter, I > was tempted to dig out a serial connection and prepare myself to OWN > that Tivo, but there was a lot of book left to go, so I kept at it. > Next, if you are fortunate enough to have a Tivo with a network > interface card, then getting to Tivo via ethernet is trivial and > thoroughly described. If you are not that fortunate, or just have an > older Tivo lying around and you do not want to leave it out of the lan > parties, there are even instructions on how to connect a > network card to > older Tivos. > Now, that the connection was made and convenient, he shows us > that there > are already a suite of advanced tools out there (with more being > contributed). Once you see the webserver, you may never use > your remote > to schedule recordings again (you can even use it as the remote). You > can even use it to read email and or have your email read to you. It > will play mp3s and show you caller ID. Having Tivo connected to the > network opens brand new doors. > The only chapter I truly struggled with was the programming the Tivo > chapter. I know that Tivo is undocumented, and I appreciate > the effort > it must have took to find out all those commands AND what options they > take. But TCL is NOT an easy language to just pick up, and I have had > some training in it. Then I remember, this isn't Learing TCL, so take > note. If you really want to hack Tivo, you will have to read source > code and you will need a better guide for TCL than this book had space > to give. On the other hand, there are already so many programs out > there, by the time you have grown bored with them, you will have had > enough time to get a good TCL book. > The book is organized well and each chapter builds on the > previous. The > book builds your knowledge fast enough to keep you from getting bored, > but thorough enough that you can learn everything. As you make the > first fledgling connections to the Tivo, you are pretty > excited to just > be connected to the thing and make your name appear on the television > screen. (It kind of reminds me of my first computer, an Atari 800XL.) > As you go on through the book, you find yourself feeling more and more > confident about what you can do with the Tivo and it is almost like > getting a new Tivo. A hacked Tivo is to Tivo what Tivo is to > television. Once you do it, you will wonder why you hadn't done it > sooner. > > Aaron F Young > Broker Reconciliation > Operations & Portfolio Finance > Citadel Investment Group LLC > -------------------------------------------------------------- > -------------- > --------------------- > ------------------------- > > CONFIDENTIALITY AND SECURITY NOTICE > > This e-mail contains information that may be confidential and > proprietary. It is to be read and used solely by the intended > recipient(s). > Citadel and its affiliates retain all proprietary rights they > may have in > the > information. If you are not an intended recipient, please notify us > immediately either by reply e-mail or by telephone at 312-395-2100 > and delete this e-mail (including any attachments hereto) immediately > without reading, disseminating, distributing or copying. We > cannot give > any assurances that this e-mail and any attachments are free > of viruses > and other harmful code. Citadel reserves the right to > monitor, intercept > and block all communications involving its computer systems. > > > > > > > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > ---------------------------------------------------------------------------- --------------------- ------------------------- CONFIDENTIALITY AND SECURITY NOTICE This e-mail contains information that may be confidential and proprietary. It is to be read and used solely by the intended recipient(s). Citadel and its affiliates retain all proprietary rights they may have in the information. If you are not an intended recipient, please notify us immediately either by reply e-mail or by telephone at 312-395-2100 and delete this e-mail (including any attachments hereto) immediately without reading, disseminating, distributing or copying. We cannot give any assurances that this e-mail and any attachments are free of viruses and other harmful code. Citadel reserves the right to monitor, intercept and block all communications involving its computer systems. _______________________________________________ Chicago-talk mailing list Chicago-talk@mail.pm.org http://mail.pm.org/mailman/listinfo/chicago-talk From jason at multiply.org Mon Dec 29 22:41:48 2003 From: jason at multiply.org (jason gessner) Date: Mon Aug 2 21:27:59 2004 Subject: [Chicago-talk] [OT] tivo In-Reply-To: <044b01c3ce8e$c6a250b0$6405a8c0@a30> Message-ID: <200312300359.hBU3xbg07473@tetsuo.mengelt.com> Directv tivo is the greatest tv accessory ever. :) Sorry. I had to say it. -jason scott gessner jason@multiply.org -----Original Message----- From: chicago-talk-bounces@mail.pm.org [mailto:chicago-talk-bounces@mail.pm.org] On Behalf Of Jay Strauss Sent: Monday, December 29, 2003 10:29 PM To: Chicago.pm chatter Subject: Re: [Chicago-talk] Very late Tivo Hacks review Hey thanks Aaron, I shot you the message and promptly went on vacation for a week. Maybe I'll buy the book, but lately I've been thinking about getting direct-tv with tivo built it (which would solve a few of my tivo ills) Jay ----- Original Message ----- From: "Young, Aaron" To: "Chicago.pm chatter" Sent: Monday, December 22, 2003 7:17 AM Subject: RE: [Chicago-talk] Very late Tivo Hacks review yes, they talk about what kind of card you have to order and give some suggestions on what to do to make it look less like a "home" job i don't have it handy this moment, so i'm going by memory, but it is VERY thorough on the types of tivos out there and how to get them all connected Aaron F Young Broker Reconciliation Operations & Portfolio Finance Citadel Investment Group LLC > -----Original Message----- > From: Jay Strauss [mailto:me@heyjay.com] > Sent: Friday, December 19, 2003 9:14 PM > To: Chicago.pm chatter > Subject: Re: [Chicago-talk] Very late Tivo Hacks review > > > Did the book mention installing a Ethernet card in a sonny vivo 1 > series? > My modem is broke > > Jay > ----- Original Message ----- > From: "Young, Aaron" > To: "Chicago.pm chatter" > Sent: Friday, December 19, 2003 12:32 PM > Subject: [Chicago-talk] Very late Tivo Hacks review > > > my pithy offering > > Tivo Hacks > This is a book for the Tivo owner that loves their Tivo, could not > live without it, loves what it does, but surely...it can do a little > more. > And this book is for the person that wants the value of the published > book. There is definitely something convenient about holding step by > step instructions in your hand while your equipment is in pieces > before you just waiting to have those two 200gig harddrives placed > inside to eventually be filled with episodes of Home Movies and Space > Ghost. And it is valuable to know that that information you hold was > read by at least one other person before you. While most of this > information is scattered throughout the net on various websites, this > book attempts to consolidate and summarize all that information into > an all in one guide for Tivo upgrades, and it was written by people > who have done what you are planning. I can't imagine a handier guide. > While there are some typos early in the book, which I HATE, they are > easy to ignore, and do not lead you down the wrong path (I have read > some programming books that decreased my knowledge in an area). > Fortunately, this book only seems to suffer from it the first few > chapters, and then, if there were any more, I missed them as I was > busy trying to learn how to put a webserver on my Tivo and expand its > capacity by 2-300%. > I've never considered myself a hardware guy, and so, the chapter on > removing the drives and putting them into a desktop are rich enough > with detail to make even me feel confident enough to try it. And I > must note, the pictures are a tremendous help. After reading that > chapter, you will realize just how many Tivo are out there and > appreciate the effort that went into putting such a guide together. I > am just glad I do not have one of the more difficult models to > upgrade; at least those unlucky souls out there will have a guide. > They even document where the "hard to get at" screws are and some that > you can safely leave to the side as an "extra part." > The first connection to the Tivo described in the book is via the > serial connection. While reading about the serial connection, I > almost found myself yelling at the book as if I were watching a horror > movie (Come one, don't use the serial connection, I have a Tivo2!) (I > own a Tivo2 series model which comes with a network card > preinstalled.) But I knew I was only going to regret skipping this > chapter if I ever hacked up my Tivo so bad that I couldn't use the > ethernet. Also, there is something prideful in knowing how to connect > to your Tivo any way it can. He shows us how to transfer new software > to the Tivo and how to configure it to run on boot up. We do this with > some manual work made easy by using some freely available tools. > After reading that first chapter, I was tempted to dig out a serial > connection and prepare myself to OWN that Tivo, but there was a lot of > book left to go, so I kept at it. > Next, if you are fortunate enough to have a Tivo with a network > interface card, then getting to Tivo via ethernet is trivial and > thoroughly described. If you are not that fortunate, or just have an > older Tivo lying around and you do not want to leave it out of the lan > parties, there are even instructions on how to connect a network card > to older Tivos. > Now, that the connection was made and convenient, he shows us that > there are already a suite of advanced tools out there (with more being > contributed). Once you see the webserver, you may never use your > remote to schedule recordings again (you can even use it as the > remote). You can even use it to read email and or have your email read > to you. It will play mp3s and show you caller ID. Having Tivo > connected to the network opens brand new doors. > The only chapter I truly struggled with was the programming the Tivo > chapter. I know that Tivo is undocumented, and I appreciate the > effort it must have took to find out all those commands AND what > options they take. But TCL is NOT an easy language to just pick up, > and I have had some training in it. Then I remember, this isn't > Learing TCL, so take note. If you really want to hack Tivo, you will > have to read source code and you will need a better guide for TCL than > this book had space to give. On the other hand, there are already so > many programs out there, by the time you have grown bored with them, > you will have had enough time to get a good TCL book. > The book is organized well and each chapter builds on the previous. > The book builds your knowledge fast enough to keep you from getting > bored, but thorough enough that you can learn everything. As you make > the first fledgling connections to the Tivo, you are pretty excited to > just be connected to the thing and make your name appear on the > television screen. (It kind of reminds me of my first computer, an > Atari 800XL.) As you go on through the book, you find yourself feeling > more and more confident about what you can do with the Tivo and it is > almost like getting a new Tivo. A hacked Tivo is to Tivo what Tivo is > to television. Once you do it, you will wonder why you hadn't done it > sooner. > > Aaron F Young > Broker Reconciliation > Operations & Portfolio Finance > Citadel Investment Group LLC > -------------------------------------------------------------- > -------------- > --------------------- > ------------------------- > > CONFIDENTIALITY AND SECURITY NOTICE > > This e-mail contains information that may be confidential and > proprietary. It is to be read and used solely by the intended > recipient(s). > Citadel and its affiliates retain all proprietary rights they may have > in the information. If you are not an intended recipient, please > notify us immediately either by reply e-mail or by telephone at > 312-395-2100 and delete this e-mail (including any attachments hereto) > immediately without reading, disseminating, distributing or copying. > We cannot give any assurances that this e-mail and any attachments are > free of viruses and other harmful code. Citadel reserves the right to > monitor, intercept and block all communications involving its computer > systems. > > > > > > > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > ---------------------------------------------------------------------------- --------------------- ------------------------- CONFIDENTIALITY AND SECURITY NOTICE This e-mail contains information that may be confidential and proprietary. It is to be read and used solely by the intended recipient(s). Citadel and its affiliates retain all proprietary rights they may have in the information. If you are not an intended recipient, please notify us immediately either by reply e-mail or by telephone at 312-395-2100 and delete this e-mail (including any attachments hereto) immediately without reading, disseminating, distributing or copying. We cannot give any assurances that this e-mail and any attachments are free of viruses and other harmful code. Citadel reserves the right to monitor, intercept and block all communications involving its computer systems. _______________________________________________ Chicago-talk mailing list Chicago-talk@mail.pm.org http://mail.pm.org/mailman/listinfo/chicago-talk _______________________________________________ Chicago-talk mailing list Chicago-talk@mail.pm.org http://mail.pm.org/mailman/listinfo/chicago-talk From me at heyjay.com Mon Dec 29 22:51:22 2003 From: me at heyjay.com (Jay Strauss) Date: Mon Aug 2 21:27:59 2004 Subject: [Chicago-talk] [OT] tivo References: <200312300359.hBU3xbg07473@tetsuo.mengelt.com> Message-ID: <055c01c3ce90$9b4fda20$6405a8c0@a30> I've heard differing reports about the reception in the city. From your tone, I take it, yours has had good reception? Jay ----- Original Message ----- From: "jason gessner" To: "'Chicago.pm chatter'" Sent: Monday, December 29, 2003 10:41 PM Subject: [Chicago-talk] [OT] tivo > Directv tivo is the greatest tv accessory ever. :) > > Sorry. I had to say it. > > -jason scott gessner > jason@multiply.org > -----Original Message----- > From: chicago-talk-bounces@mail.pm.org > [mailto:chicago-talk-bounces@mail.pm.org] On Behalf Of Jay Strauss > Sent: Monday, December 29, 2003 10:29 PM > To: Chicago.pm chatter > Subject: Re: [Chicago-talk] Very late Tivo Hacks review > > Hey thanks Aaron, > > I shot you the message and promptly went on vacation for a week. Maybe I'll > buy the book, but lately I've been thinking about getting direct-tv with > tivo built it (which would solve a few of my tivo ills) > > Jay > ----- Original Message ----- > From: "Young, Aaron" > To: "Chicago.pm chatter" > Sent: Monday, December 22, 2003 7:17 AM > Subject: RE: [Chicago-talk] Very late Tivo Hacks review > > > yes, they talk about what kind of card you have to order and give some > suggestions on what to do to make it look less like a "home" job > > i don't have it handy this moment, so i'm going by memory, but it is VERY > thorough on the types of tivos out there and how to get them all connected > > Aaron F Young > Broker Reconciliation > Operations & Portfolio Finance > Citadel Investment Group LLC > > > -----Original Message----- > > From: Jay Strauss [mailto:me@heyjay.com] > > Sent: Friday, December 19, 2003 9:14 PM > > To: Chicago.pm chatter > > Subject: Re: [Chicago-talk] Very late Tivo Hacks review > > > > > > Did the book mention installing a Ethernet card in a sonny vivo 1 > > series? > > My modem is broke > > > > Jay > > ----- Original Message ----- > > From: "Young, Aaron" > > To: "Chicago.pm chatter" > > Sent: Friday, December 19, 2003 12:32 PM > > Subject: [Chicago-talk] Very late Tivo Hacks review > > > > > > my pithy offering > > > > Tivo Hacks > > This is a book for the Tivo owner that loves their Tivo, could not > > live without it, loves what it does, but surely...it can do a little > > more. > > And this book is for the person that wants the value of the published > > book. There is definitely something convenient about holding step by > > step instructions in your hand while your equipment is in pieces > > before you just waiting to have those two 200gig harddrives placed > > inside to eventually be filled with episodes of Home Movies and Space > > Ghost. And it is valuable to know that that information you hold was > > read by at least one other person before you. While most of this > > information is scattered throughout the net on various websites, this > > book attempts to consolidate and summarize all that information into > > an all in one guide for Tivo upgrades, and it was written by people > > who have done what you are planning. I can't imagine a handier guide. > > While there are some typos early in the book, which I HATE, they are > > easy to ignore, and do not lead you down the wrong path (I have read > > some programming books that decreased my knowledge in an area). > > Fortunately, this book only seems to suffer from it the first few > > chapters, and then, if there were any more, I missed them as I was > > busy trying to learn how to put a webserver on my Tivo and expand its > > capacity by 2-300%. > > I've never considered myself a hardware guy, and so, the chapter on > > removing the drives and putting them into a desktop are rich enough > > with detail to make even me feel confident enough to try it. And I > > must note, the pictures are a tremendous help. After reading that > > chapter, you will realize just how many Tivo are out there and > > appreciate the effort that went into putting such a guide together. I > > am just glad I do not have one of the more difficult models to > > upgrade; at least those unlucky souls out there will have a guide. > > They even document where the "hard to get at" screws are and some that > > you can safely leave to the side as an "extra part." > > The first connection to the Tivo described in the book is via the > > serial connection. While reading about the serial connection, I > > almost found myself yelling at the book as if I were watching a horror > > movie (Come one, don't use the serial connection, I have a Tivo2!) (I > > own a Tivo2 series model which comes with a network card > > preinstalled.) But I knew I was only going to regret skipping this > > chapter if I ever hacked up my Tivo so bad that I couldn't use the > > ethernet. Also, there is something prideful in knowing how to connect > > to your Tivo any way it can. He shows us how to transfer new software > > to the Tivo and how to configure it to run on boot up. We do this with > > some manual work made easy by using some freely available tools. > > After reading that first chapter, I was tempted to dig out a serial > > connection and prepare myself to OWN that Tivo, but there was a lot of > > book left to go, so I kept at it. > > Next, if you are fortunate enough to have a Tivo with a network > > interface card, then getting to Tivo via ethernet is trivial and > > thoroughly described. If you are not that fortunate, or just have an > > older Tivo lying around and you do not want to leave it out of the lan > > parties, there are even instructions on how to connect a network card > > to older Tivos. > > Now, that the connection was made and convenient, he shows us that > > there are already a suite of advanced tools out there (with more being > > contributed). Once you see the webserver, you may never use your > > remote to schedule recordings again (you can even use it as the > > remote). You can even use it to read email and or have your email read > > to you. It will play mp3s and show you caller ID. Having Tivo > > connected to the network opens brand new doors. > > The only chapter I truly struggled with was the programming the Tivo > > chapter. I know that Tivo is undocumented, and I appreciate the > > effort it must have took to find out all those commands AND what > > options they take. But TCL is NOT an easy language to just pick up, > > and I have had some training in it. Then I remember, this isn't > > Learing TCL, so take note. If you really want to hack Tivo, you will > > have to read source code and you will need a better guide for TCL than > > this book had space to give. On the other hand, there are already so > > many programs out there, by the time you have grown bored with them, > > you will have had enough time to get a good TCL book. > > The book is organized well and each chapter builds on the previous. > > The book builds your knowledge fast enough to keep you from getting > > bored, but thorough enough that you can learn everything. As you make > > the first fledgling connections to the Tivo, you are pretty excited to > > just be connected to the thing and make your name appear on the > > television screen. (It kind of reminds me of my first computer, an > > Atari 800XL.) As you go on through the book, you find yourself feeling > > more and more confident about what you can do with the Tivo and it is > > almost like getting a new Tivo. A hacked Tivo is to Tivo what Tivo is > > to television. Once you do it, you will wonder why you hadn't done it > > sooner. > > > > Aaron F Young > > Broker Reconciliation > > Operations & Portfolio Finance > > Citadel Investment Group LLC > > -------------------------------------------------------------- > > -------------- > > --------------------- > > ------------------------- > > > > CONFIDENTIALITY AND SECURITY NOTICE > > > > This e-mail contains information that may be confidential and > > proprietary. It is to be read and used solely by the intended > > recipient(s). > > Citadel and its affiliates retain all proprietary rights they may have > > in the information. If you are not an intended recipient, please > > notify us immediately either by reply e-mail or by telephone at > > 312-395-2100 and delete this e-mail (including any attachments hereto) > > immediately without reading, disseminating, distributing or copying. > > We cannot give any assurances that this e-mail and any attachments are > > free of viruses and other harmful code. Citadel reserves the right to > > monitor, intercept and block all communications involving its computer > > systems. > > > > > > > > > > > > > > > > _______________________________________________ > > Chicago-talk mailing list > > Chicago-talk@mail.pm.org > > http://mail.pm.org/mailman/listinfo/chicago-talk > > > > > > > > _______________________________________________ > > Chicago-talk mailing list > > Chicago-talk@mail.pm.org > > http://mail.pm.org/mailman/listinfo/chicago-talk > > > -------------------------------------------------------------------------- -- > --------------------- > ------------------------- > > CONFIDENTIALITY AND SECURITY NOTICE > > This e-mail contains information that may be confidential and proprietary. > It is to be read and used solely by the intended recipient(s). > Citadel and its affiliates retain all proprietary rights they may have in > the information. If you are not an intended recipient, please notify us > immediately either by reply e-mail or by telephone at 312-395-2100 and > delete this e-mail (including any attachments hereto) immediately without > reading, disseminating, distributing or copying. We cannot give any > assurances that this e-mail and any attachments are free of viruses and > other harmful code. Citadel reserves the right to monitor, intercept and > block all communications involving its computer systems. > > > > > > > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > From petemar1 at perlmonk.org Tue Dec 30 05:36:32 2003 From: petemar1 at perlmonk.org (petemar1) Date: Mon Aug 2 21:27:59 2004 Subject: [Chicago-talk] "I don't have permission to installamoduleonthesystem!" In-Reply-To: Message-ID: "It's alive." Thanks to all! -----Original Message----- From: chicago-talk-bounces@mail.pm.org [mailto:chicago-talk-bounces@mail.pm.org]On Behalf Of Mike Fragassi Sent: Monday, December 29, 2003 10:08 PM To: Chicago.pm chatter Subject: RE: [Chicago-talk] "I don't have permission to installamoduleonthesystem!" On Mon, 29 Dec 2003, petemar1 wrote: > Does anyone have a sample .cpan file? First, the file is not ~/.cpan, but ~/.cpan/CPAN/MyConfig.pm. Second, the argument that you need is 'makepl_arg' => q[PREFIX=/your/home/dir/here], Allegedly you can make do with '~', but I seem to have had some problems with that. If you do not already have the MyConfig.pm file, simply locate the root user's CPAN/Config.pm, and copy it to that location, and make the changes. Also, once you've done that, replace all references to '/root/' with '/your/home/dir/here', except for the paths of executables, like lynx, make, ftp, etc. (Note that PREFIX is really an argument for ExtUtils::MakeMaker, and gets passed to the 'perl Makefile.PL' stage. If you ever find yourself having to install a perl module outside of the CPAN shell, i.e. by ftping a module, untar/zipping it, etc., all you need to do is run 'perl Makefile.PL PREFIX=/your/home' instead of 'perl Makefile.PL'; all the other steps in the installation process don't need to be changed. If you have to do this often, just create a shell alias -- call it 'mymakeperl' or something. Also note that ExtUtils::MakeMaker "has issues"[1], and Module::Build is being increasingly adopted as a replacement, much like CPANPLUS is intended as a replacement of CPAN.pm.) Finally, to use your new, personal ~/lib, be sure to set the following in your .bash_profile (or whichever): PERL5LIB='/your/home/lib' Or just make sure that all your programs 'use lib qw(/your/home/lib);'. I highly recommend jumping through these hoops to avoid polluting the root set of modules, even on systems where you do have root access. Once I upgraded to the latest copy of CGI.pm, only to discover that the upgrade actually broke the way that -style parameters were used. (I'm pretty sure this has been fixed, incidentally.) Because I only installed into my ~/lib, I could just nuke that and revert to the default module, and I could breathe easy knowing I hadn't affected any other user's scripts. Similarly, when editing MyConfig.pm, I recommend 'prerequisites_policy' => q[ask], and not 'follow'. -- Mike F. [1]http://search.cpan.org/~kwilliams/Module-Build-0.21/lib/Module/Build.pm#M OTIVATIONS Also: http://www.makemaker.org/src/ExtUtils-MakeMaker-snap/lib/ExtUtils/MakeMaker/ FAQ.pod And: http://magnonel.guild.net/~schwern/talks/MakeMaker_Is_DOOMED/slides/ _______________________________________________ Chicago-talk mailing list Chicago-talk@mail.pm.org http://mail.pm.org/mailman/listinfo/chicago-talk From Dooley.Michael at con-way.com Tue Dec 30 08:12:39 2003 From: Dooley.Michael at con-way.com (Dooley, Michael) Date: Mon Aug 2 21:27:59 2004 Subject: [Chicago-talk] map and pop Message-ID: as I was driving home last night (before I saw your post) it came to me to do exactly that. -----Original Message----- From: chicago-talk-bounces@mail.pm.org [mailto:chicago-talk-bounces@mail.pm.org] On Behalf Of Brian Katzung Sent: Monday, December 29, 2003 5:36 PM To: Chicago.pm chatter Subject: Re: [Chicago-talk] map and pop Dooley, Michael wrote: > I want to do something like this, but I also want to remove the found > element from @files. > > my @nfiles=grep /^car/, @files; > > can anyone point me in the right direction, I am thinking map is needed but > I don't have much confidence using it. Why not just: my @nfiles = grep /^car/, @files; @files = grep !/^car/, @files; -- Brian Katzung, President, Kappa Computer Solutions, LLC Phone +1.877.367.8837 or visit http://www.kappacs.com/ _______________________________________________ Chicago-talk mailing list Chicago-talk@mail.pm.org http://mail.pm.org/mailman/listinfo/chicago-talk From jhubble at core.com Tue Dec 30 11:59:11 2003 From: jhubble at core.com (Jeremy Hubble) Date: Mon Aug 2 21:27:59 2004 Subject: [Chicago-talk] array to hash and counting files Message-ID: <200312301657.hBUGvCrv060865@mail0.mx.voyager.net> I have a series of directories that each have a number of subdirectories with the same directory structure. I need to count the number of files and directories in each subdirectory, and get a list of all unique files. Here is the code fragment I have (not tested yet): Is there a more effecient way to: 1) Extract the unique list of files? 2) Use perl to replace the find commant? Thanks, Jeremy my $d_count=0; my $f_count=0; my %map; opendir (ED_DIR, $bdir); @subdir = { /!^\./ && -d "$bdir/$_" } readdir(DIR); foreach $d (@subdir) { chomp $d; my $dir = "$bdir/$d"; my @files = qx~find $bdir -type 'f' -print~; my @dirs = qx~find $bdir -type 'd' -print~; $d_count+=$#files+1; $f_count+=$#dirs+1; foreach $f (@files) { $map{$f} = 1; } } /dir/subdir1 /subdir2 /subdir3 .... From merlyn at stonehenge.com Tue Dec 30 11:07:43 2003 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: Mon Aug 2 21:27:59 2004 Subject: [Chicago-talk] array to hash and counting files In-Reply-To: <200312301657.hBUGvCrv060865@mail0.mx.voyager.net> References: <200312301657.hBUGvCrv060865@mail0.mx.voyager.net> Message-ID: <86isjyi690.fsf@blue.stonehenge.com> >>>>> "Jeremy" == Jeremy Hubble writes: Jeremy> I have a series of directories that each have a number of Jeremy> subdirectories with the same directory structure. I need to count the Jeremy> number of files and directories in each subdirectory, and get a list of Jeremy> all unique files. Jeremy> Here is the code fragment I have (not tested yet): Jeremy> Is there a more effecient way to: Jeremy> 1) Extract the unique list of files? Jeremy> 2) Use perl to replace the find commant? Jeremy> Thanks, Jeremy> Jeremy Jeremy> my $d_count=0; Jeremy> my $f_count=0; Jeremy> my %map; Jeremy> opendir (ED_DIR, $bdir); Jeremy> @subdir = { /!^\./ && -d "$bdir/$_" } readdir(DIR); Jeremy> foreach $d (@subdir) { Jeremy> chomp $d; Jeremy> my $dir = "$bdir/$d"; Jeremy> my @files = qx~find $bdir -type 'f' -print~; Jeremy> my @dirs = qx~find $bdir -type 'd' -print~; Jeremy> $d_count+=$#files+1; Jeremy> $f_count+=$#dirs+1; Jeremy> foreach $f (@files) { Jeremy> $map{$f} = 1; Jeremy> } Jeremy> } If I understand you, I think this will do it: my $d_count = 0; my $f_count = 0; my %unique_files; use File::Find; find sub { if (-d $_) { $d_count++; } elsif (-f _) { $f_count++; # remove prefix: (my $n = $File::Find::name) =~ s/^.*?\//; $unique_files{$n} = 1; } }, $bdir; -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! From merlyn at stonehenge.com Tue Dec 30 11:11:37 2003 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: Mon Aug 2 21:27:59 2004 Subject: ["Malony, Mike" ] Out of Office AutoReply: [Chicago-talk] array to hash and countin g files Message-ID: <864qvii62i.fsf@blue.stonehenge.com> Please unsubscribe THIS LOSER from the mailing list until they learn good net manners. Hrmph. YOU DO NOT AUTOREPLY TO LIST MAIL. EVER. -------------------- Start of forwarded message -------------------- X-From-Line: mike.malony@caremark.com Tue Dec 30 09:08:27 2003 Return-Path: Message-Id: <4133B1E10795D511BB1200609487F779061FEC4E@sfb025.psd.caremark.int> From: "Malony, Mike" To: merlyn@stonehenge.com Subject: Out of Office AutoReply: [Chicago-talk] array to hash and countin g files Date: Tue, 30 Dec 2003 11:06:49 -0600 X-Mailer: Internet Mail Service (5.5.2657.72) I am out of the office for the Holidays, I'll be back on January 5th. If you have an issue that should not wait until then, Please contact Charlotte Wojnowski at x6394 Happy Holidays! Mike Thank you, Mike Malony -------------------- End of forwarded message -------------------- -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! From Andy_Bach at wiwb.uscourts.gov Tue Dec 30 11:15:31 2003 From: Andy_Bach at wiwb.uscourts.gov (Andy_Bach@wiwb.uscourts.gov) Date: Mon Aug 2 21:27:59 2004 Subject: [Chicago-talk] Re: Out of Office AutoReply snit In-Reply-To: <864qvii62i.fsf@blue.stonehenge.com> Message-ID: [removed] Happy New Years, folks. This has been a very nice list to be on and though I've only made one meeting (the Great Damian C's selfgol lecture - a lesson in humility for anybody who would think they know what they're doing, perl-wise), a good group. See you next year. a Andy Bach, Sys. Mangler Internet: andy_bach@wiwb.uscourts.gov VOICE: (608) 261-5738 FAX 264-5030 Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems -- Jamie Zawinski From jamundsen at jamundsen.dyndns.org Tue Dec 30 12:50:33 2003 From: jamundsen at jamundsen.dyndns.org (Jon Amundsen) Date: Mon Aug 2 21:27:59 2004 Subject: ["Malony, Mike" ] Out of Office AutoReply: [Chicago-talk] array to hash and countin g files In-Reply-To: <864qvii62i.fsf@blue.stonehenge.com> References: <864qvii62i.fsf@blue.stonehenge.com> Message-ID: <20031230185033.GA44799@utility> Of course this isn't appropriate, but maybe doing without the personal attacks "THIS LOSER" would be a more appropriate way of handling it. Feel free to unsubscribe him, and I'll send him an email off the list suggesting how he could participate more responsibly. my 2 cents. On Tue, Dec 30, 2003 at 09:11:33AM -0800, Randal L. Schwartz wrote: > > Please unsubscribe THIS LOSER from the mailing list until they > learn good net manners. > > Hrmph. > > YOU DO NOT AUTOREPLY TO LIST MAIL. EVER. > > -------------------- Start of forwarded message -------------------- > X-From-Line: mike.malony@caremark.com Tue Dec 30 09:08:27 2003 > Return-Path: > Message-Id: <4133B1E10795D511BB1200609487F779061FEC4E@sfb025.psd.caremark.int> > From: "Malony, Mike" > To: merlyn@stonehenge.com > Subject: Out of Office AutoReply: [Chicago-talk] array to hash and countin > g files > Date: Tue, 30 Dec 2003 11:06:49 -0600 > X-Mailer: Internet Mail Service (5.5.2657.72) > > I am out of the office for the Holidays, I'll be back on January 5th. > > If you have an issue that should not wait until then, Please contact > Charlotte Wojnowski at x6394 > > Happy Holidays! > Mike > > Thank you, > Mike Malony > > > > -------------------- End of forwarded message -------------------- > > -- > Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 > > Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. > See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk -- Jon Amundsen jamundsen@jamundsen.dyndns.org A "No" uttered from deepest conviction is better and greater than a "Yes" merely uttered to please, or what is worse, to avoid trouble. -- Mahatma Ghandi -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 187 bytes Desc: not available Url : http://mail.pm.org/pipermail/chicago-talk/attachments/20031230/d4dd4825/attachment.bin From Dooley.Michael at con-way.com Tue Dec 30 14:01:46 2003 From: Dooley.Michael at con-way.com (Dooley, Michael) Date: Mon Aug 2 21:27:59 2004 Subject: [Chicago-talk] return values Message-ID: if you have multiple return values do you have to use an array to collect them? or can you get each return value in is own variable off the jump? sub stuff { $a=1; $b=2; return ($a, $b); } @c=stuff so $c=1st return value $d=2nd return value Michael Dooley Integrated Services Manager Dooley.Michael@con-way.com 7735808777@mobile.att.net O: (630).449.1000 F: (630).449.1010 C: (773).580.8777 From hachi at kuiki.net Tue Dec 30 14:02:07 2003 From: hachi at kuiki.net (Jonathan Steinert) Date: Mon Aug 2 21:27:59 2004 Subject: [Chicago-talk] return values In-Reply-To: References: Message-ID: <3FF1D9BF.90204@kuiki.net> Dooley, Michael wrote: > if you have multiple return values do you have to use an array to collect > them? or can you get each return value in is own variable off the jump? > > sub stuff { > $a=1; > $b=2; > return ($a, $b); > } > > @c=stuff > > so > $c=1st return value > $d=2nd return value > > do you mean calling it as: ($c, $d) = stuff(); ? --Jonathan From don at drakeconsult.com Tue Dec 30 14:06:47 2003 From: don at drakeconsult.com (Don Drake) Date: Mon Aug 2 21:27:59 2004 Subject: [Chicago-talk] return values In-Reply-To: Message-ID: <004c01c3cf10$75abb700$9a01ac0a@attbi.com> Try: ($c, $d)=stuff -Don -----Original Message----- From: chicago-talk-bounces@mail.pm.org [mailto:chicago-talk-bounces@mail.pm.org]On Behalf Of Dooley, Michael Sent: Tuesday, December 30, 2003 2:02 PM To: Chicago.pm chatter Subject: [Chicago-talk] return values if you have multiple return values do you have to use an array to collect them? or can you get each return value in is own variable off the jump? sub stuff { $a=1; $b=2; return ($a, $b); } @c=stuff so $c=1st return value $d=2nd return value Michael Dooley Integrated Services Manager Dooley.Michael@con-way.com 7735808777@mobile.att.net O: (630).449.1000 F: (630).449.1010 C: (773).580.8777 _______________________________________________ Chicago-talk mailing list Chicago-talk@mail.pm.org http://mail.pm.org/mailman/listinfo/chicago-talk From merlyn at stonehenge.com Tue Dec 30 14:07:40 2003 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: Mon Aug 2 21:27:59 2004 Subject: [Chicago-talk] return values In-Reply-To: References: Message-ID: <86ekumdq7x.fsf@blue.stonehenge.com> >>>>> "Dooley," == Dooley, Michael writes: Dooley,> if you have multiple return values do you have to use an array to collect Dooley,> them? or can you get each return value in is own variable off the jump? Dooley,> sub stuff { Dooley,> $a=1; Dooley,> $b=2; Dooley,> return ($a, $b); Dooley,> } Dooley,> @c=stuff Dooley,> so Dooley,> $c=1st return value Dooley,> $d=2nd return value The last expression of a subroutine is evaluated in the caller's context (list or scalar or void). So that'd look like: @c = stuff(); And $c[0] would be 1, and $c[1] would be 2. You can also use a list assignment: ($c, $d) = stuff(); and get what you suggested. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! From andy at petdance.com Tue Dec 30 14:07:54 2003 From: andy at petdance.com (Andy Lester) Date: Mon Aug 2 21:27:59 2004 Subject: [Chicago-talk] return values In-Reply-To: References: Message-ID: <20031230200754.GA29345@petdance.com> > if you have multiple return values do you have to use an array to collect > them? or can you get each return value in is own variable off the jump? > > sub stuff { > $a=1; > $b=2; > return ($a, $b); > } That's fine. Then, you: my ($x,$y) = stuff(); or my @values = stuff(); You can also only get one value back if you want, like so: my ($x,undef) = stuff(); or my ($x) = stuff(); Make sure you do NOT do my $x = stuff(); # $x now == 2 because $x is in scalar context, and a list assigned to a scalar returns the length of the list. xoa -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance From Dooley.Michael at con-way.com Tue Dec 30 14:10:42 2003 From: Dooley.Michael at con-way.com (Dooley, Michael) Date: Mon Aug 2 21:27:59 2004 Subject: [Chicago-talk] return values Message-ID: why cant I see this stuff before I send the email. ;/ thanks Jonathan. -----Original Message----- From: chicago-talk-bounces@mail.pm.org [mailto:chicago-talk-bounces@mail.pm.org] On Behalf Of Jonathan Steinert Sent: Tuesday, December 30, 2003 2:02 PM To: Chicago.pm chatter Subject: Re: [Chicago-talk] return values Dooley, Michael wrote: > if you have multiple return values do you have to use an array to collect > them? or can you get each return value in is own variable off the jump? > > sub stuff { > $a=1; > $b=2; > return ($a, $b); > } > > @c=stuff > > so > $c=1st return value > $d=2nd return value > > do you mean calling it as: ($c, $d) = stuff(); ? --Jonathan _______________________________________________ Chicago-talk mailing list Chicago-talk@mail.pm.org http://mail.pm.org/mailman/listinfo/chicago-talk From merlyn at stonehenge.com Tue Dec 30 14:13:21 2003 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: Mon Aug 2 21:27:59 2004 Subject: [Chicago-talk] return values In-Reply-To: <20031230200754.GA29345@petdance.com> References: <20031230200754.GA29345@petdance.com> Message-ID: <86y8sucbdu.fsf@blue.stonehenge.com> >>>>> "Andy" == Andy Lester writes: Andy> Make sure you do NOT do Andy> my $x = stuff(); # $x now == 2 Andy> because $x is in scalar context, and a list assigned to a scalar returns Andy> the length of the list. No, you can't have a "list assigned to a scalar". The context gets propogated. For this example, you'll get "2", but only because the last expression evaluated is "2" in that list. :) You'd get "b" in this case: sub stuff { return ("a", "b"); } And if you called it as: my ($x) = stuff(); you'd get "a" instead! Wild, huh. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! From Aaron.Young at citadelgroup.com Tue Dec 30 15:39:54 2003 From: Aaron.Young at citadelgroup.com (Young, Aaron) Date: Mon Aug 2 21:27:59 2004 Subject: [Chicago-talk] Very late Tivo Hacks review Message-ID: <800BCF60D1553144BABCBFCE36249D3D4500B0@CORPEMAIL.citadelgroup.com> that is the one i have but i'm still going to upgrade it i am not sure how many hours would satisfy me, but it is definitely more than i have -----Original Message----- From: Jay Strauss [mailto:me@heyjay.com] Sent: Mon 12/29/2003 10:29 PM To: Chicago.pm chatter Cc: Subject: Re: [Chicago-talk] Very late Tivo Hacks review Hey thanks Aaron, I shot you the message and promptly went on vacation for a week. Maybe I'll buy the book, but lately I've been thinking about getting direct-tv with tivo built it (which would solve a few of my tivo ills) Jay ----- Original Message ----- From: "Young, Aaron" To: "Chicago.pm chatter" Sent: Monday, December 22, 2003 7:17 AM Subject: RE: [Chicago-talk] Very late Tivo Hacks review yes, they talk about what kind of card you have to order and give some suggestions on what to do to make it look less like a "home" job i don't have it handy this moment, so i'm going by memory, but it is VERY thorough on the types of tivos out there and how to get them all connected Aaron F Young Broker Reconciliation Operations & Portfolio Finance Citadel Investment Group LLC > -----Original Message----- > From: Jay Strauss [mailto:me@heyjay.com] > Sent: Friday, December 19, 2003 9:14 PM > To: Chicago.pm chatter > Subject: Re: [Chicago-talk] Very late Tivo Hacks review > > > Did the book mention installing a Ethernet card in a sonny > vivo 1 series? > My modem is broke > > Jay > ----- Original Message ----- > From: "Young, Aaron" > To: "Chicago.pm chatter" > Sent: Friday, December 19, 2003 12:32 PM > Subject: [Chicago-talk] Very late Tivo Hacks review > > > my pithy offering > > Tivo Hacks > This is a book for the Tivo owner that loves their Tivo, > could not live > without it, loves what it does, but surely...it can do a little more. > And this book is for the person that wants the value of the published > book. There is definitely something convenient about holding step by > step instructions in your hand while your equipment is in > pieces before > you just waiting to have those two 200gig harddrives placed inside to > eventually be filled with episodes of Home Movies and Space > Ghost. And > it is valuable to know that that information you hold was read by at > least one other person before you. While most of this information is > scattered throughout the net on various websites, this book > attempts to > consolidate and summarize all that information into an all in > one guide > for Tivo upgrades, and it was written by people who have done what you > are planning. I can't imagine a handier guide. > While there are some typos early in the book, which I HATE, they are > easy to ignore, and do not lead you down the wrong path (I have read > some programming books that decreased my knowledge in an area). > Fortunately, this book only seems to suffer from it the first few > chapters, and then, if there were any more, I missed them as > I was busy > trying to learn how to put a webserver on my Tivo and expand its > capacity by 2-300%. > I've never considered myself a hardware guy, and so, the chapter on > removing the drives and putting them into a desktop are rich > enough with > detail to make even me feel confident enough to try it. And I must > note, the pictures are a tremendous help. After reading that chapter, > you will realize just how many Tivo are out there and appreciate the > effort that went into putting such a guide together. I am just glad I > do not have one of the more difficult models to upgrade; at > least those > unlucky souls out there will have a guide. They even document > where the > "hard to get at" screws are and some that you can safely leave to the > side as an "extra part." > The first connection to the Tivo described in the book is via > the serial > connection. While reading about the serial connection, I almost found > myself yelling at the book as if I were watching a horror movie (Come > one, don't use the serial connection, I have a Tivo2!) (I own a Tivo2 > series model which comes with a network card preinstalled.) > But I knew I > was only going to regret skipping this chapter if I ever hacked up my > Tivo so bad that I couldn't use the ethernet. Also, there is > something > prideful in knowing how to connect to your Tivo any way it can. He > shows us how to transfer new software to the Tivo and how to configure > it to run on boot up. We do this with some manual work made easy by > using some freely available tools. After reading that first > chapter, I > was tempted to dig out a serial connection and prepare myself to OWN > that Tivo, but there was a lot of book left to go, so I kept at it. > Next, if you are fortunate enough to have a Tivo with a network > interface card, then getting to Tivo via ethernet is trivial and > thoroughly described. If you are not that fortunate, or just have an > older Tivo lying around and you do not want to leave it out of the lan > parties, there are even instructions on how to connect a > network card to > older Tivos. > Now, that the connection was made and convenient, he shows us > that there > are already a suite of advanced tools out there (with more being > contributed). Once you see the webserver, you may never use > your remote > to schedule recordings again (you can even use it as the remote). You > can even use it to read email and or have your email read to you. It > will play mp3s and show you caller ID. Having Tivo connected to the > network opens brand new doors. > The only chapter I truly struggled with was the programming the Tivo > chapter. I know that Tivo is undocumented, and I appreciate > the effort > it must have took to find out all those commands AND what options they > take. But TCL is NOT an easy language to just pick up, and I have had > some training in it. Then I remember, this isn't Learing TCL, so take > note. If you really want to hack Tivo, you will have to read source > code and you will need a better guide for TCL than this book had space > to give. On the other hand, there are already so many programs out > there, by the time you have grown bored with them, you will have had > enough time to get a good TCL book. > The book is organized well and each chapter builds on the > previous. The > book builds your knowledge fast enough to keep you from getting bored, > but thorough enough that you can learn everything. As you make the > first fledgling connections to the Tivo, you are pretty > excited to just > be connected to the thing and make your name appear on the television > screen. (It kind of reminds me of my first computer, an Atari 800XL.) > As you go on through the book, you find yourself feeling more and more > confident about what you can do with the Tivo and it is almost like > getting a new Tivo. A hacked Tivo is to Tivo what Tivo is to > television. Once you do it, you will wonder why you hadn't done it > sooner. > > Aaron F Young > Broker Reconciliation > Operations & Portfolio Finance > Citadel Investment Group LLC > -------------------------------------------------------------- > -------------- > --------------------- > ------------------------- > > CONFIDENTIALITY AND SECURITY NOTICE > > This e-mail contains information that may be confidential and > proprietary. It is to be read and used solely by the intended > recipient(s). > Citadel and its affiliates retain all proprietary rights they > may have in > the > information. If you are not an intended recipient, please notify us > immediately either by reply e-mail or by telephone at 312-395-2100 > and delete this e-mail (including any attachments hereto) immediately > without reading, disseminating, distributing or copying. We > cannot give > any assurances that this e-mail and any attachments are free > of viruses > and other harmful code. Citadel reserves the right to > monitor, intercept > and block all communications involving its computer systems. > > > > > > > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > ---------------------------------------------------------------------------- --------------------- ------------------------- CONFIDENTIALITY AND SECURITY NOTICE This e-mail contains information that may be confidential and proprietary. It is to be read and used solely by the intended recipient(s). Citadel and its affiliates retain all proprietary rights they may have in the information. If you are not an intended recipient, please notify us immediately either by reply e-mail or by telephone at 312-395-2100 and delete this e-mail (including any attachments hereto) immediately without reading, disseminating, distributing or copying. We cannot give any assurances that this e-mail and any attachments are free of viruses and other harmful code. Citadel reserves the right to monitor, intercept and block all communications involving its computer systems. _______________________________________________ Chicago-talk mailing list Chicago-talk@mail.pm.org http://mail.pm.org/mailman/listinfo/chicago-talk _______________________________________________ Chicago-talk mailing list Chicago-talk@mail.pm.org http://mail.pm.org/mailman/listinfo/chicago-talk -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/ms-tnef Size: 12826 bytes Desc: not available Url : http://mail.pm.org/pipermail/chicago-talk/attachments/20031230/971813f6/attachment.bin From lembark at wrkhors.com Tue Dec 30 16:24:38 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:59 2004 Subject: [Chicago-talk] "I don't have permission to install amoduleonthesystem!" In-Reply-To: References: Message-ID: <2714680000.1072823078@[192.168.200.4]> -- petemar1 > Does anyone have a sample .cpan file? ~/.cpan isn't a file, it's a directory. If you are looking for a workable CPAN/Config file: # This is CPAN.pm's systemwide configuration file. This file provides # defaults for users, and the values can be changed in a per-user # configuration file. The user-config file is being looked for as # ~/.cpan/CPAN/MyConfig.pm. $CPAN::Config = { 'build_cache' => q[128], 'build_dir' => q[/scratch/CPAN/build], 'cache_metadata' => q[1], 'cpan_home' => q[/scratch/CPAN], 'ftp' => q[/usr/bin/ftp], 'ftp_proxy' => q[], 'getcwd' => q[cwd], 'gpg' => q[/usr/bin/gpg], 'gzip' => q[/usr/bin/gzip], 'histfile' => q[/scratch/CPAN/histfile], 'histsize' => q[100], 'http_proxy' => q[], 'inactivity_timeout' => q[0], 'index_expire' => q[1], 'inhibit_startup_message' => q[0], 'keep_source_where' => q[/scratch/CPAN/sources], 'lynx' => q[/usr/bin/lynx], 'make' => q[/usr/bin/make], 'make_arg' => q[], 'make_install_arg' => q[UNINST=1], 'makepl_arg' => q[], 'ncftp' => q[], 'ncftpget' => q[], 'no_proxy' => q[], 'pager' => q[/usr/bin/less], 'prerequisites_policy' => q[follow], 'scan_cache' => q[atstart], 'shell' => q[/bin/bash], 'tar' => q[/bin/tar], 'term_is_latin' => q[1], 'unzip' => q[/usr/bin/unzip], 'urllist' => [q[http://www.perl.com/CPAN/]], 'wget' => q[], }; 1; __END__ -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From chimcentral at yahoo.com Tue Dec 30 16:21:00 2003 From: chimcentral at yahoo.com (matt boex) Date: Mon Aug 2 21:27:59 2004 Subject: [Chicago-talk] stock charts with perl Message-ID: <20031230222100.27057.qmail@web40803.mail.yahoo.com> any opinion as to what modules i should use to build stock charts with. i am looking to build open, high, low, close, with possibly volume at the bottom. matt --------------------------------- Do you Yahoo!? Find out what made the Top Yahoo! Searches of 2003 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/chicago-talk/attachments/20031230/fd9eb426/attachment.htm From ehs at pobox.com Tue Dec 30 16:41:54 2003 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:27:59 2004 Subject: [Chicago-talk] stock charts with perl In-Reply-To: <20031230222100.27057.qmail@web40803.mail.yahoo.com> References: <20031230222100.27057.qmail@web40803.mail.yahoo.com> Message-ID: <20031230224154.GB5103@chloe.inkdroid.org> On Tue, Dec 30, 2003 at 02:21:00PM -0800, matt boex wrote: > any opinion as to what modules i should use to build stock charts with. > i am looking to build open, high, low, close, with possibly volume at the > bottom. I've had good success with GD::Graph [1] at a previous job, and at my current job we've used Chart [2], which has a somewhat cleaner look. Unfortunately (as of 3 months ago) GD::Graph appeared to be more actively maintained than Chart, since we submitted a patch for some legend placement options, and never heard back. Also GD::Graph has better support for TrueType fonts. While it's name doesn't reflect it, Chart uses GD just as GD::Graph does, but in a perhaps more elegant way. Chart comes with some very nice PDF documentation however, which is pretty useful for this sort of module. //Ed [1] http://search.cpan.org/perldoc?GD::Graph [2] http://search.cpan.org/perldoc?Chart From lembark at wrkhors.com Tue Dec 30 16:48:56 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:59 2004 Subject: [Chicago-talk] map and pop In-Reply-To: References: Message-ID: <2722380000.1072824536@[192.168.200.4]> -- "Dooley, Michael" > I want to do something like this, but I also want to remove the found > element from @files. > > my @nfiles=grep /^car/, @files; > > can anyone point me in the right direction, I am thinking map is needed > but I don't have much confidence using it. my @nfiles = (); @files = map { /$regex/ ? do {push @nfiles, $_; ()} : $_ } @files; e.g., DB<7> @a = (1..10) DB<8> @b = () DB<10> x @a = map { $_ % 2 ? do{push @b, $_; ()} : $_ } @a 0 2 1 4 2 6 3 8 4 10 DB<11> x @b 0 1 1 3 2 5 3 7 4 9 Other way would be a hash, which might be a bit easier for anyone who follows you to figure out: sub grepalize { my $list = shift; my $regex = shift; my @found = grep /$regex/, @$list; my %scratch = map { $_ => 1 } @list; delete @scratch{@found}; @$list = keys %scratch; \@found } my $nfiles = grepalize \@files, qr/^car/; # at this point anything in $fnfiles has been # removed from @files. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From ehs at pobox.com Tue Dec 30 16:46:26 2003 From: ehs at pobox.com (Ed Summers) Date: Mon Aug 2 21:27:59 2004 Subject: [Chicago-talk] stock charts with perl In-Reply-To: <20031230224154.GB5103@chloe.inkdroid.org> References: <20031230222100.27057.qmail@web40803.mail.yahoo.com> <20031230224154.GB5103@chloe.inkdroid.org> Message-ID: <20031230224626.GC5103@chloe.inkdroid.org> On Tue, Dec 30, 2003 at 04:41:54PM -0600, Ed Summers wrote: > While it's name doesn't reflect it, Chart uses GD just as GD::Graph does, > but in a perhaps more elegant way. Oops, I meant to say in a LESS elegant way :) Just IMHO anyhow. //Ed From lembark at wrkhors.com Tue Dec 30 17:16:41 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:59 2004 Subject: [Chicago-talk] array to hash and counting files In-Reply-To: <200312301657.hBUGvCrv060865@mail0.mx.voyager.net> References: <200312301657.hBUGvCrv060865@mail0.mx.voyager.net> Message-ID: <2728350000.1072826201@[192.168.200.4]> -- Jeremy Hubble > I have a series of directories that each have a number of > subdirectories with the same directory structure. I need to count the > number of files and directories in each subdirectory, and get a list of > all unique files. > > Here is the code fragment I have (not tested yet): > > Is there a more effecient way to: > 1) Extract the unique list of files? > 2) Use perl to replace the find commant? Any time you feel the word "unique" percolating through your brain think "hash". If the hash key is the first-level subdir then ++$hash{$subdir} will count the items by subdir, to break the count out by file type use ++$hash->{$subdir}{$type}. use File::Find qw( &finddepth ); use File::Basename qw( &basename ); # name is immaterial, could also be an anonymous # sub defined on the finddepth call line. # # File::Find is kind enough to define $File::Find::dir # as the directory and chdir to it. the current file's # basename is in $_ (i.e. -e, -d, etc, work as expected). # # the handler could also use stat to get the file type # and store that but outputting the results in human- # usable form gets a bit hairly. for now assume that # anything is either a file or directory. # # making countz a referent saves us from $countz{$subdir}->{type} # notation (I find it easier to read the -> toward the front). my $subdir = ''; my %unique = (); my $countz = {}; sub handler { if( -d ) { ++$countz{$subdir}{dirz}; } else { ++$countz{$subdir}{filz}; } ++$unique{$_}; } # iterate over all the directory items in the base directory # processing each item through the handler. for( grep { -d } glob "$basedir/*" ) { $subdir = basename $_; finddepth \&handler, $_; } # at this point keys %$counts are the subdirz of $basedir, # and the values are counts of files and directories by # subdir. %unique is keyed by basename of whatever was found # in the subdirs. The one variation you might want is to find the relative paths within the subdirectories (i.e., keys of %unique are full paths relative to $basedir/$subdir). In this case use the fact that $File::Find::dir is a relative path when the input directory is a relative path iteslf: sub handler { if( -d ) { ++$countz{$subdir}{dirz}; } else { ++$countz{$subdir}{filz}; } ++$unique{$File::Find::name}; } for( grep { -d } glob "$basedir/*" ) { chdir $_; subdir = basename $_; finddepth \&handler, '.'; } The combination of chdir and finddepth w/ '.' will leave all the $File::Find::name entries as relative paths: DB<1> finddepth sub { print $File::Find::name, "\n" }, '.' ./output ./CVS/Root ./CVS/Repository ./CVS/Entries ./CVS/Entries.Log ./CVS ./CVSROOT/checkoutlist ./CVSROOT/commitinfo ./CVSROOT/config ./CVSROOT/cvswrappers ./CVSROOT/editinfo At this point the keys of %unique will be paths relative to the various subdir's, which will give you a unique list of the files within the general file tree. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From lembark at wrkhors.com Tue Dec 30 17:27:46 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:59 2004 Subject: [Chicago-talk] return values In-Reply-To: References: Message-ID: <2731720000.1072826866@[192.168.200.4]> -- "Dooley, Michael" > if you have multiple return values do you have to use an array to collect > them? or can you get each return value in is own variable off the jump? > > sub stuff { > $a=1; > $b=2; > return ($a, $b); > } > > @c=stuff > > so > $c=1st return value > $d=2nd return value The return value is the last value processed in the sub: sub foo { ... ( $a, $b ) } at that point: my @a = foo; my ( $i, $j ) = foo; my ( $first, @rest ) = foo; will all happily take the list returned by foo and assign it. Assigning to an array is nice if you want to iterate the results; individual variables kind of assume you know what is comming back (i.e., you'll loose a third value). You can also use: croak "Bad news boss, foo returned nothing" unless my @a = foo; ( $i, $j ) = @a; to sanity check the returned values. Nice thing about this is that the test for @a is kwik'n simple -- even if it does waste a bit of time creating the array. This is one of the reasons that people use referents to return data more often now: you only have to keep track of one return value: sub bar { ... [ $i, $j, $k, @stuff ] } ... my $result = bar @argz; Hash referents are used for the same reason: you can name the return values: sub bletch { ... { i => $i, j => $j, k => $j, list => \@argz } } ... my $bletch_result = bletch; if( $bletch_result->{i} > 100 ) { # whatever... die "i out of range: $bletch_result->{i}" } -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From lembark at wrkhors.com Tue Dec 30 17:29:38 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:59 2004 Subject: [Chicago-talk] return values In-Reply-To: References: Message-ID: <2734160000.1072826978@[192.168.200.4]> -- "Dooley, Michael" > why cant I see this stuff before I send the email. ;/ Because you're human like the rest of us and don't know what the replies are until you get them -- that or your crystal ball is on the fritz... -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From lembark at wrkhors.com Tue Dec 30 17:32:36 2003 From: lembark at wrkhors.com (Steven Lembark) Date: Mon Aug 2 21:27:59 2004 Subject: [Chicago-talk] stock charts with perl In-Reply-To: <20031230222100.27057.qmail@web40803.mail.yahoo.com> References: <20031230222100.27057.qmail@web40803.mail.yahoo.com> Message-ID: <2736010000.1072827156@[192.168.200.4]> -- matt boex > > any opinion as to what modules i should use to build stock charts with. > i am looking to build open, high, low, close, with possibly volume at the > bottom. I remember a module for this. You might want to play with CPAN search a bit. Something freudian tells me that there was an example of this in one of the O'Reilly Perl::Tk books. -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 From petemar1 at perlmonk.org Wed Dec 31 03:59:18 2003 From: petemar1 at perlmonk.org (petemar1) Date: Mon Aug 2 21:27:59 2004 Subject: [Chicago-talk] "I don't have permission to installamoduleonthesystem!" In-Reply-To: <2714680000.1072823078@[192.168.200.4]> Message-ID: Argh. ... Files=34, Tests=381, 43 wallclock secs (31.23 cusr + 2.94 csys = 34.17 CPU) /usr/bin/make test -- OK Running make install Manifying blib/man3/WWW::Mechanize::Examples.3 Manifying blib/man3/WWW::Mechanize::Link.3 Manifying blib/man1/mech-dump.1 Manifying blib/man3/WWW::Mechanize::FAQ.3 Manifying blib/man3/WWW::Mechanize.3 Warning: You do not have permissions to install into /opt/perl/perl-5.8.0/lib/site_perl/5.8.0/i586-linux at /opt/perl/perl-5.8.0/lib/5.8.0/ExtUtils/Install.pm line 84. mkdir /opt/perl/perl-5.8.0/lib/site_perl/5.8.0/WWW: Permission denied at /opt/perl/perl-5.8.0/lib/5.8.0/ExtUtils/Install.pm line 137 make: *** [pure_site_install] Error 255 /usr/bin/make install /home/petemar1/sandbox/lib -- NOT OK You may have to su to root to install the package cpan> petemar1:~/.cpan/CPAN$ more MyConfig.pm # Was: /opt/perl/perl-5.8.0/lib/5.8.0/CPAN/Config.pm # This is CPAN.pm's systemwide configuration file. This file provides # defaults for users, and the values can be changed in a per-user # configuration file. The user-config file is being looked for as # ~/.cpan/CPAN/MyConfig.pm. $CPAN::Config = { 'build_cache' => q[10], 'build_dir' => q[/home/petemar1/sandbox/cpan/build], 'cache_metadata' => q[1], 'cpan_home' => q[/home/petemar1/sandbox/cpan], 'dontload_hash' => { }, 'ftp' => q[/usr/bin/ftp], 'ftp_proxy' => q[], 'getcwd' => q[cwd], 'gzip' => q[/bin/gzip], 'http_proxy' => q[http://web-proxy.cs.uchicago.edu:8000/], 'inactivity_timeout' => q[0], 'index_expire' => q[1], 'inhibit_startup_message' => q[0], 'keep_source_where' => q[/home/petemar1/sandbox/cpan/sources], 'lynx' => q[/usr/local/bin/lynx], 'make' => q[/usr/bin/make], 'make_arg' => q[/home/petemar1/sandbox/lib], 'make_install_arg' => q[/home/petemar1/sandbox/lib], 'makepl_arg' => q[/home/petemar1/sandbox], 'ncftpget' => q[/usr/local/bin/ncftpget], 'no_proxy' => q[], 'pager' => q[/usr/local/bin/less], 'prerequisites_policy' => q[ask], 'proxy_user' => q[], 'scan_cache' => q[atstart], 'shell' => q[/usr/local/bin/bash], 'tar' => q[/bin/tar], 'term_is_latin' => q[1], 'unzip' => q[/usr/local/bin/unzip], 'urllist' => [q[ftp://ftp-mirror.internap.com/pub/CPAN/], q[ftp://cpan.valueclick.com/pub/CPAN /], q[ftp://cpan.thepirtgroup.com/], q[ftp://cpan.pair.com/pub/CPAN/], q[ftp://cpan.nas.nasa.gov /pub/perl/CPAN/], q[ftp://cpan.erlbaum.net/], q[ftp://cpan.cse.msu.edu/], q[ftp://archive.progen y.com/CPAN/]], 'wait_list' => [q[wait://ls6-www.informatik.uni-dortmund.de:1404]], 'wget' => q[/usr/local/bin/wget], }; 1; __END__ -----Original Message----- From: chicago-talk-bounces@mail.pm.org [mailto:chicago-talk-bounces@mail.pm.org]On Behalf Of Steven Lembark Sent: Tuesday, December 30, 2003 4:25 PM To: Chicago.pm chatter Subject: RE: [Chicago-talk] "I don't have permission to installamoduleonthesystem!" -- petemar1 > Does anyone have a sample .cpan file? ~/.cpan isn't a file, it's a directory. If you are looking for a workable CPAN/Config file: # This is CPAN.pm's systemwide configuration file. This file provides # defaults for users, and the values can be changed in a per-user # configuration file. The user-config file is being looked for as # ~/.cpan/CPAN/MyConfig.pm. $CPAN::Config = { 'build_cache' => q[128], 'build_dir' => q[/scratch/CPAN/build], 'cache_metadata' => q[1], 'cpan_home' => q[/scratch/CPAN], 'ftp' => q[/usr/bin/ftp], 'ftp_proxy' => q[], 'getcwd' => q[cwd], 'gpg' => q[/usr/bin/gpg], 'gzip' => q[/usr/bin/gzip], 'histfile' => q[/scratch/CPAN/histfile], 'histsize' => q[100], 'http_proxy' => q[], 'inactivity_timeout' => q[0], 'index_expire' => q[1], 'inhibit_startup_message' => q[0], 'keep_source_where' => q[/scratch/CPAN/sources], 'lynx' => q[/usr/bin/lynx], 'make' => q[/usr/bin/make], 'make_arg' => q[], 'make_install_arg' => q[UNINST=1], 'makepl_arg' => q[], 'ncftp' => q[], 'ncftpget' => q[], 'no_proxy' => q[], 'pager' => q[/usr/bin/less], 'prerequisites_policy' => q[follow], 'scan_cache' => q[atstart], 'shell' => q[/bin/bash], 'tar' => q[/bin/tar], 'term_is_latin' => q[1], 'unzip' => q[/usr/bin/unzip], 'urllist' => [q[http://www.perl.com/CPAN/]], 'wget' => q[], }; 1; __END__ -- Steven Lembark 2930 W. Palmer Workhorse Computing Chicago, IL 60647 +1 888 359 3508 _______________________________________________ Chicago-talk mailing list Chicago-talk@mail.pm.org http://mail.pm.org/mailman/listinfo/chicago-talk From Aaron.Young at citadelgroup.com Wed Dec 31 09:28:48 2003 From: Aaron.Young at citadelgroup.com (Young, Aaron) Date: Mon Aug 2 21:27:59 2004 Subject: [Chicago-talk] [OT] tivo Message-ID: <800BCF60D1553144BABCBFCE36249D3D4500B2@CORPEMAIL.citadelgroup.com> i've lived with it in two areas of chicago and have had no problems i've visited friends with it that live closer to downtown and they had no problems -----Original Message----- From: Jay Strauss [mailto:me@heyjay.com] Sent: Mon 29/12/2003 22:51 To: Chicago.pm chatter Cc: Subject: Re: [Chicago-talk] [OT] tivo I've heard differing reports about the reception in the city. From your tone, I take it, yours has had good reception? Jay ----- Original Message ----- From: "jason gessner" To: "'Chicago.pm chatter'" Sent: Monday, December 29, 2003 10:41 PM Subject: [Chicago-talk] [OT] tivo > Directv tivo is the greatest tv accessory ever. :) > > Sorry. I had to say it. > > -jason scott gessner > jason@multiply.org > -----Original Message----- > From: chicago-talk-bounces@mail.pm.org > [mailto:chicago-talk-bounces@mail.pm.org] On Behalf Of Jay Strauss > Sent: Monday, December 29, 2003 10:29 PM > To: Chicago.pm chatter > Subject: Re: [Chicago-talk] Very late Tivo Hacks review > > Hey thanks Aaron, > > I shot you the message and promptly went on vacation for a week. Maybe I'll > buy the book, but lately I've been thinking about getting direct-tv with > tivo built it (which would solve a few of my tivo ills) > > Jay > ----- Original Message ----- > From: "Young, Aaron" > To: "Chicago.pm chatter" > Sent: Monday, December 22, 2003 7:17 AM > Subject: RE: [Chicago-talk] Very late Tivo Hacks review > > > yes, they talk about what kind of card you have to order and give some > suggestions on what to do to make it look less like a "home" job > > i don't have it handy this moment, so i'm going by memory, but it is VERY > thorough on the types of tivos out there and how to get them all connected > > Aaron F Young > Broker Reconciliation > Operations & Portfolio Finance > Citadel Investment Group LLC > > > -----Original Message----- > > From: Jay Strauss [mailto:me@heyjay.com] > > Sent: Friday, December 19, 2003 9:14 PM > > To: Chicago.pm chatter > > Subject: Re: [Chicago-talk] Very late Tivo Hacks review > > > > > > Did the book mention installing a Ethernet card in a sonny vivo 1 > > series? > > My modem is broke > > > > Jay > > ----- Original Message ----- > > From: "Young, Aaron" > > To: "Chicago.pm chatter" > > Sent: Friday, December 19, 2003 12:32 PM > > Subject: [Chicago-talk] Very late Tivo Hacks review > > > > > > my pithy offering > > > > Tivo Hacks > > This is a book for the Tivo owner that loves their Tivo, could not > > live without it, loves what it does, but surely...it can do a little > > more. > > And this book is for the person that wants the value of the published > > book. There is definitely something convenient about holding step by > > step instructions in your hand while your equipment is in pieces > > before you just waiting to have those two 200gig harddrives placed > > inside to eventually be filled with episodes of Home Movies and Space > > Ghost. And it is valuable to know that that information you hold was > > read by at least one other person before you. While most of this > > information is scattered throughout the net on various websites, this > > book attempts to consolidate and summarize all that information into > > an all in one guide for Tivo upgrades, and it was written by people > > who have done what you are planning. I can't imagine a handier guide. > > While there are some typos early in the book, which I HATE, they are > > easy to ignore, and do not lead you down the wrong path (I have read > > some programming books that decreased my knowledge in an area). > > Fortunately, this book only seems to suffer from it the first few > > chapters, and then, if there were any more, I missed them as I was > > busy trying to learn how to put a webserver on my Tivo and expand its > > capacity by 2-300%. > > I've never considered myself a hardware guy, and so, the chapter on > > removing the drives and putting them into a desktop are rich enough > > with detail to make even me feel confident enough to try it. And I > > must note, the pictures are a tremendous help. After reading that > > chapter, you will realize just how many Tivo are out there and > > appreciate the effort that went into putting such a guide together. I > > am just glad I do not have one of the more difficult models to > > upgrade; at least those unlucky souls out there will have a guide. > > They even document where the "hard to get at" screws are and some that > > you can safely leave to the side as an "extra part." > > The first connection to the Tivo described in the book is via the > > serial connection. While reading about the serial connection, I > > almost found myself yelling at the book as if I were watching a horror > > movie (Come one, don't use the serial connection, I have a Tivo2!) (I > > own a Tivo2 series model which comes with a network card > > preinstalled.) But I knew I was only going to regret skipping this > > chapter if I ever hacked up my Tivo so bad that I couldn't use the > > ethernet. Also, there is something prideful in knowing how to connect > > to your Tivo any way it can. He shows us how to transfer new software > > to the Tivo and how to configure it to run on boot up. We do this with > > some manual work made easy by using some freely available tools. > > After reading that first chapter, I was tempted to dig out a serial > > connection and prepare myself to OWN that Tivo, but there was a lot of > > book left to go, so I kept at it. > > Next, if you are fortunate enough to have a Tivo with a network > > interface card, then getting to Tivo via ethernet is trivial and > > thoroughly described. If you are not that fortunate, or just have an > > older Tivo lying around and you do not want to leave it out of the lan > > parties, there are even instructions on how to connect a network card > > to older Tivos. > > Now, that the connection was made and convenient, he shows us that > > there are already a suite of advanced tools out there (with more being > > contributed). Once you see the webserver, you may never use your > > remote to schedule recordings again (you can even use it as the > > remote). You can even use it to read email and or have your email read > > to you. It will play mp3s and show you caller ID. Having Tivo > > connected to the network opens brand new doors. > > The only chapter I truly struggled with was the programming the Tivo > > chapter. I know that Tivo is undocumented, and I appreciate the > > effort it must have took to find out all those commands AND what > > options they take. But TCL is NOT an easy language to just pick up, > > and I have had some training in it. Then I remember, this isn't > > Learing TCL, so take note. If you really want to hack Tivo, you will > > have to read source code and you will need a better guide for TCL than > > this book had space to give. On the other hand, there are already so > > many programs out there, by the time you have grown bored with them, > > you will have had enough time to get a good TCL book. > > The book is organized well and each chapter builds on the previous. > > The book builds your knowledge fast enough to keep you from getting > > bored, but thorough enough that you can learn everything. As you make > > the first fledgling connections to the Tivo, you are pretty excited to > > just be connected to the thing and make your name appear on the > > television screen. (It kind of reminds me of my first computer, an > > Atari 800XL.) As you go on through the book, you find yourself feeling > > more and more confident about what you can do with the Tivo and it is > > almost like getting a new Tivo. A hacked Tivo is to Tivo what Tivo is > > to television. Once you do it, you will wonder why you hadn't done it > > sooner. > > > > Aaron F Young > > Broker Reconciliation > > Operations & Portfolio Finance > > Citadel Investment Group LLC > > -------------------------------------------------------------- > > -------------- > > --------------------- > > ------------------------- > > > > CONFIDENTIALITY AND SECURITY NOTICE > > > > This e-mail contains information that may be confidential and > > proprietary. It is to be read and used solely by the intended > > recipient(s). > > Citadel and its affiliates retain all proprietary rights they may have > > in the information. If you are not an intended recipient, please > > notify us immediately either by reply e-mail or by telephone at > > 312-395-2100 and delete this e-mail (including any attachments hereto) > > immediately without reading, disseminating, distributing or copying. > > We cannot give any assurances that this e-mail and any attachments are > > free of viruses and other harmful code. Citadel reserves the right to > > monitor, intercept and block all communications involving its computer > > systems. > > > > > > > > > > > > > > > > _______________________________________________ > > Chicago-talk mailing list > > Chicago-talk@mail.pm.org > > http://mail.pm.org/mailman/listinfo/chicago-talk > > > > > > > > _______________________________________________ > > Chicago-talk mailing list > > Chicago-talk@mail.pm.org > > http://mail.pm.org/mailman/listinfo/chicago-talk > > > -------------------------------------------------------------------------- -- > --------------------- > ------------------------- > > CONFIDENTIALITY AND SECURITY NOTICE > > This e-mail contains information that may be confidential and proprietary. > It is to be read and used solely by the intended recipient(s). > Citadel and its affiliates retain all proprietary rights they may have in > the information. If you are not an intended recipient, please notify us > immediately either by reply e-mail or by telephone at 312-395-2100 and > delete this e-mail (including any attachments hereto) immediately without > reading, disseminating, distributing or copying. We cannot give any > assurances that this e-mail and any attachments are free of viruses and > other harmful code. Citadel reserves the right to monitor, intercept and > block all communications involving its computer systems. > > > > > > > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > _______________________________________________ > Chicago-talk mailing list > Chicago-talk@mail.pm.org > http://mail.pm.org/mailman/listinfo/chicago-talk > > _______________________________________________ Chicago-talk mailing list Chicago-talk@mail.pm.org http://mail.pm.org/mailman/listinfo/chicago-talk -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/ms-tnef Size: 15186 bytes Desc: not available Url : http://mail.pm.org/pipermail/chicago-talk/attachments/20031231/123fa98b/attachment.bin From frag at ripco.com Wed Dec 31 09:44:21 2003 From: frag at ripco.com (Mike Fragassi) Date: Mon Aug 2 21:27:59 2004 Subject: [Chicago-talk] "I don't have permission to installamoduleonthesystem!" In-Reply-To: References: Message-ID: On Wed, 31 Dec 2003, petemar1 wrote: > Argh. > ... > make: *** [pure_site_install] Error 255 > /usr/bin/make install /home/petemar1/sandbox/lib -- NOT OK > You may have to su to root to install the package > > petemar1:~/.cpan/CPAN$ more MyConfig.pm ... > 'makepl_arg' => q[/home/petemar1/sandbox], This should be: 'makepl_arg' => q[PREFIX=/your/home/dir/here], -- Mike F.