Re: CamelBones: Will hack for food!

2007-05-07 Thread Joseph Alotta
I need donations to CamelBones. Or web hosting customers. Or  
consulting clients. Or a plain old-fashioned job. Or something - and  
I need it soon.



Hi Sherm,

I have some work for you.  I use ruby and the mechanize object to  
pull down pages off the web and parse them.  There is a lot of  
mystery involved with it, especially in debugging.  I am flying blind  
and
can't see what I am getting back.  Especially logging in and  
redirection. The documentation is very light.  I would be willing to  
pay you $700 for an ebook 10 pages or so, that describes how to set  
up an environment for debugging mech issues and stepwise shows ways  
to solve them.  You would be free to sell the ebook to others as well.


Joe Alotta





Re: perltidy and -w flag

2006-10-05 Thread Joseph Alotta

Some people like TextMate also.  I think it costs $29.

www.macromates.com/


Joe.



On Oct 5, 2006, at 1:21 PM, Ted Zeng wrote:

BBedit has a free version called textwrangler. You can download  
from their site.




It is a very good editor.



Ted zeng



From: Michael Barto [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 05, 2006 10:56 AM
To: Jay Savage; macosx@perl.org
Subject: Re: perltidy and -w flag



I know a lot of people that use Emacs on other Platforms because  
they have nothing else. But this is on a Mac and you have a lot of  
good well designed choices:


BBedit is the most popular. Try the demo for a month and you will  
be sold. A student license is $50.00 (http://www.barebones.com/).   
I use Perl to generate Web pages with Javascript. Besides debugging  
the Perl code as I write, BBedit has an instantaneous Web page  
preview of my code which is awesome. You change an entry, it  
instantaneous updates.
There is another soruce editing program called AlphaX (Freeware).  
It has been around for a long time and is wonderful to do Perl  
Editing (http://www.maths.mq.edu.au/~steffen/Alpha/AlphaX/). It  
contains extensive Perl code help documentation.
There is a great Perl Editor/Debugger called Affrus (http:// 
www.latenightsw.com/affrus/) which integrates with BBEdit or is  
standalone. I use it find the really complex issues, since when it  
steps throught the code it shows me what is going on in memory in a  
really nice graphical way, etc. Unfortunately it is expensive  
(around $100.00)


In all these editors, they have run at command line drop down,  
which is where I put my #!/bin/perl -w which is in my program. I  
have enclode the BBedit one as an example. Since Alpha is basically  
free right now,




Jay Savage wrote:


I've recently started using TextMaker to edit my Perl scripts after
many years of Emacs. On the whole I'm happy, but one thing really bugs
me: styling. I've never really used perltidy before--Emacs perl-mode
and cperl-mode have done everything I wanted. TextMate, though, uses
perltidy internally. I've got my flags pretty well set in ~/.perltidy,
but I can't for the life of me figure how to get it to stop putting
the '-w' flag on the shebang line. It also seems to occasionally eat
my 'use warnings;' when it does it.

Any thoughts?

Thanks,

-- jay 
--

This email and attachment(s): [  ] blogable; [ x ] ask first; [  ]
private and confidential

daggerquill [at] gmail [dot] com
http://www.tuaw.com  http://www.downloadsquad.com  http:// 
www.engatiki.org


values of â will give rise to dom!



--

Michael Barto
Software Architect

image001.gif

LogiQwest Inc.
16458 Bolsa Chica Street, # 15
Huntington Beach, CA  92649
http://www.logiqwest.com/



[EMAIL PROTECTED]
Tel:  714 377 3705
Fax: 714 840 3937
Cell: 714 883 1949

'tis a gift to be simple

This e-mail may contain LogiQwest proprietary information and  
should be treated as confidential.









Re: Perl, MySQl and Airport

2006-10-03 Thread Joseph Alotta

Hi everyone,

Thanks to everyone who helped.  The problem was within MySql, I  
needed to set
grants for the other system.  The grants syntax is pretty rough, but  
I finally
got it to work on the command line and now I should have no trouble  
getting it

to work in perl.

Joe.



On Oct 2, 2006, at 2:07 PM, Ray Zimmerman wrote:


On Oct 2, 2006, at 2:36 PM, brian d foy wrote:
I'm not aware of any Mac OS X particular interface to MySQL  
permissions

table. I think you have to do it through MySQL itself:


http://dev.mysql.com/doc/refman/4.1/en/privilege-system.html


Actually, MySQL Administrator, which is part of the MySQL GUI Tools  
[1], does have an interface to the permissions.


  http://dev.mysql.com/downloads/gui-tools/5.0.html

- Ray





Re: Perl, MySQl and Airport

2006-10-02 Thread Joseph Alotta


On Sep 26, 2006, at 12:23 PM, Sherm Pendley wrote:


On Sep 26, 2006, at 12:45 PM, Joseph Alotta wrote:

I have a application in Perl that prints reports from a MySQL  
database.  I also have DSL that is accessed via Airport in my house.


Recently I bought an iMac for my wife and I want her to help me  
print reports from this new computer.   How do I get her computer  
to get data from the MySQL database that lives on my computer via  
Airport?


MySQL client libraries use TCP/IP - they neither know nor care  
about the physical network layer. So you'd do this the same way  
you'd connect to any other remote server - just supply the host  
name (or IP address) as part of the dsn.


my $dsn = DBI:mysql:database=foo;host=192.168.1.101;
my $dbh = DBI-connect($dsn, $user, $password);

If that's not working, some things to check:

• Are the MySQL client libs and DBD::mysql installed on the client?
• Is $user authorized to connect from another host?
• Is MySQL itself configured to allow such connections in general?

sherm--

Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net



Hi everyone,

I am getting this error, having tried all the combinations.  Is there  
a control panel somewhere that I need to set permissions?  I already  
tried things in Sharing.



Hosea:/Library/MySQL/bin jja$ /Library/MySQL/bin/mysql -u root -D  
names -h Yeshua.local
ERROR 1130: Host '10.0.1.4' is not allowed to connect to this MySQL  
server

Hosea:/Library/MySQL/bin jja$



Joe.























Re: Perl, MySQl and Airport

2006-10-01 Thread Joseph Alotta

Greetings everyone,

This is where I got to on the mySQL.  It seems like there is someone  
on the Mac to set
permissions.  I tried the Sharing Control Panel.  Where else should I  
try?




Hosea:/Library/MySQL/bin jja$ /Library/MySQL/bin/mysql -u root -D  
names -h Yeshua.local
ERROR 1130: Host '10.0.1.4' is not allowed to connect to this MySQL  
server

Hosea:/Library/MySQL/bin jja$



Joe.




On Sep 26, 2006, at 12:23 PM, Sherm Pendley wrote:


On Sep 26, 2006, at 12:45 PM, Joseph Alotta wrote:

I have a application in Perl that prints reports from a MySQL  
database.  I also have DSL that is accessed via Airport in my house.


Recently I bought an iMac for my wife and I want her to help me  
print reports from this new computer.   How do I get her computer  
to get data from the MySQL database that lives on my computer via  
Airport?


MySQL client libraries use TCP/IP - they neither know nor care  
about the physical network layer. So you'd do this the same way  
you'd connect to any other remote server - just supply the host  
name (or IP address) as part of the dsn.


my $dsn = DBI:mysql:database=foo;host=192.168.1.101;
my $dbh = DBI-connect($dsn, $user, $password);

If that's not working, some things to check:

• Are the MySQL client libs and DBD::mysql installed on the client?
• Is $user authorized to connect from another host?
• Is MySQL itself configured to allow such connections in general?

sherm--

Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net






Perl, MySQl and Airport

2006-09-26 Thread Joseph Alotta

Greetings,

I have a application in Perl that prints reports from a MySQL  
database.  I also have DSL that is accessed via Airport in my house.


Recently I bought an iMac for my wife and I want her to help me print  
reports from this new computer.   How do I get her computer to get  
data from the MySQL database that lives on my computer via Airport?


Do you have any suggestions on things I can try?


Joe


Re: file creator id, etc

2006-06-09 Thread Joseph Alotta

Hi everyone,

I found that Now Contact needs to see the type = TEXT and that  
records need to be separated with a \r rather than a \n, and import  
works fine.


Unfortunately, there is no ability to specify paper size in Now  
Contact, so I can't use the lousy program for 11 X 17 paper.  I am  
going to use TextEdit to print instead.  Oh, well.


Joe.

On Jun 8, 2006, at 4:33 PM, Joel Rees wrote:

I am trying to read a CSV data file of names and addresses into  
Now Contact.  However the import feature does not see this file as  
it is ghosted.  My conclusion is that it is looking at the file  
creator information.


How do I see this information?  Apple-i, Get Info, does not show  
this.


Not a  perl topic, but isn't there a Finder setting that determines  
whether Get Info allows access to this or not?




There might be but I don't know where it is.  If anyone knows, please  
tell us.





file creator id, etc

2006-06-08 Thread Joseph Alotta

Greetings,

I am trying to read a CSV data file of names and addresses into Now  
Contact.  However the import feature does not see this file as it is  
ghosted.  My conclusion is that it is looking at the file creator  
information.


How do I see this information?  Apple-i, Get Info, does not show  
this.  How can I inspect these file attributes and how can I modify  
them with perl?


Joe.




Re: file creator id, etc

2006-06-08 Thread Joseph Alotta
Thanks Dominic and John.   After playing around with it a little, the  
type attribute must be TEXT.  I guess I can just do a call to system 
() to set this.  Thank you for your help.


Joe.

[PowerBook-G4:~/Desktop] jja% /Developer/Tools/GetFileInfo c.txt
file: /Users/jja/Desktop/c.txt
type: 
creator: 
attributes: avbstclinmedz
created: 06/01/2006 17:58:50
modified: 06/08/2006 11:42:04
[PowerBook-G4:~/Desktop] jja% /Developer/Tools/SetFile -t TEXT c.txt
[PowerBook-G4:~/Desktop] jja%


On Jun 8, 2006, at 11:05 AM, Dominic Dunlop wrote:


On 2006–06–08, at 17:20, Joseph Alotta wrote:

I am trying to read a CSV data file of names and addresses into  
Now Contact.  However the import feature does not see this file as  
it is ghosted.  My conclusion is that it is looking at the file  
creator information.


How do I see this information?  Apple-i, Get Info, does not show  
this.  How can I inspect these file attributes and how can I  
modify them with perl?


Firstly, I'd try giving the files a .txt extension. That might  
persuade Now Contact of their acceptability.


If that doesn't work, you need the to use the MacPerl module:

$ perl -MMacPerl -lwe 'print join  , MacPerl::GetFileInfo 
(Desktop/random.tif)'

GKON TIFF

The corresponding interface to set the signature is  
MacPerl::FSpSetFInfo -- see the man page for details. (Although  
MacPerl is part of the Tiger essentials package, you have to load  
the optional BSD package to get the man page. But, as a Perl  
developer, you'll have done that.)


Finally, if this is a one-off job, you can do things by hand with  
the GetFileInfo and SetFile utilities from Apple's developer tools.  
They live in /Developer/Tools. Again, see the man pages for details.

--
Dominic Dunlop





Re: Waiting until Acrobat closes file

2006-05-28 Thread Joseph Alotta

This may not be what you are looking for, but if you were
to name the files in a way that uses the date, then
you can just delete the old ones the next day.

Joe.

On May 28, 2006, at 5:34 PM, wren ng thornton wrote:


--- Chris Devers wrote:

Really??

In my experience, the `open` command immediately
returns control to the controlling process (the

shell,

or whatever else invoked it (pine etc)) without
waiting for the `open`ed application to finish, or

for

that matter even to finish launching.


Others have gone over briefly why your observations
about `open` returning are correct, but why that's
actually the root of the problem. The problem isn't
that it takes too long to return, it's that it returns
too quickly. The issue in general is race conditions.

Because `open` returns so soon you have no idea when
the other app will open the file let alone close it.
If you delete the file right away it may be missing by
the time the app is up and running; if you delete it
after it's been opened but before it's been closed,
the app may choose to undelete it for you by saving
it or whatnot.

The only real way around this problem is to wait for
the app to close and only then delete the file, and
the only way to get that information without race
conditions itself is from the OS itself. You'll want
the new process to be a child process so you can know
definitively that it has completed (and without
constantly polling the process table). system() does
this, though you'll want to launch the app directly
rather than using something like `open` to open it
indirectly.

Since terminated processes can't have open files you
can be sure that once the child finishes, the file is
closed (or at least closed as far as your program is
concerned, other processes out there in the universe
may muck with your plans to delete it, but you have no
control over that).

In short, `open` is an awesome utility that I wish all
*nices had, but it's not the right tool for this job.

Live well,
~wren

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com




hex editor

2006-05-20 Thread Joseph Alotta

Greetings,

I have this text file I want to read that has ^M as the record  
separator (in emacs).  Is there a utility on the Mac that i can use  
to view this file in hex.   I thought i remember something like hex  
filename, but it is not there.


Joe.




Re: RAM disk options for perl cron job

2006-05-13 Thread Joseph Alotta

Hi Chris,

Why wouldn't it work to put the client code and perl on the USB  
keydrive and then every ten minutes, your system will get it from  
there instead of from your hard drive?  I realize the USB keydrive  
is slower to load, but does that matter here?


Definitely a thought. I only write the log and the file that keeps  
the actual when the IP actually gets updated, so that wouldn't mess  
with anything. Unfortunately, this is one of the models that only  
has one USB port and no firewire, so the USB port is also where I  
hang the drive I back up to. If I'm going to buy a USB hub for this  
rig, I think I'd rather splurge and pick up a full complement of  
RAM. Powering the USB hub would add another wall wart, three more  
physical points of favor. Japanese apartments at rent I can afford  
do not offer much space that is protected, so I'm not just being  
paranoid.


I have an old USB 1.1 1 to 4 hub that doesn't need power.  I bought  
it for $4 about 2 years ago and never used it.  It's yours if you  
want it, though I'm not going to ship it to Japan.




On the other hand, personal web servers can go off line for long  
enough to slip a hub in and then off line again to slip the hub out  
when the backup is done, without the world coming to a stop,


Definitely a thought.





Re: Storable problem on Intel Mac Mini

2006-05-12 Thread Joseph Alotta
My instant reaction to that would have been putting a stripped-down  
whitebox running OpenBSD as a logging firewall between the G5 and  
the 'net, to check for attacks on the mail and ftp subsystems.


Can you tell me what a whitebox is?


I have my personal web site on my old clamshell iBook, and it runs  
a dynamic DNS client every ten minutes via cron. That basically  
keeps the disk spinning constantly. Burned out a drive last year,  
and I'm worried it will burn out a drive this year. So I'm thinking  
of putting the client on a RAM disk, although, since I wrote the  
client in perl, I suspect that I'd then have to copy perl itself to  
the RAM disk as well.


RAM disks are so cheap now.  I saw a 64MB USB on google for $8.97.



Joe.




Re: Storable problem on Intel Mac Mini

2006-05-12 Thread Joseph Alotta



I have my personal web site on my old clamshell iBook, and it runs a
dynamic DNS client every ten minutes via cron. That basically keeps
the disk spinning constantly. Burned out a drive last year, and I'm
worried it will burn out a drive this year. So I'm thinking of
putting the client on a RAM disk, although, since I wrote the client
in perl, I suspect that I'd then have to copy perl itself to the RAM
disk as well.


RAM disks are so cheap now.  I saw a 64MB USB on google for $8.97.


Tht's a flash RAM devive, not a RAM disk. Different thing.


Hi Chris,

Why wouldn't it work to put the client code and perl on the USB  
keydrive and then every ten minutes, your system will get it from  
there instead of from your hard drive?  I realize the USB keydrive is  
slower to load, but does that matter here?



Joe.


Re: Faxing

2006-01-18 Thread Joseph Alotta

Hi Doug,

I like the idea of efax.  It seems good but costs $13/month.   That  
is a little high for me considering I send or receive about 5 faxes a  
year.  I wonder if there is another place that only charges when you  
do something?


On Jan 18, 2006, at 11:51 AM, Doug McNutt wrote:


At 13:29 -0600 1/17/06, Bill Stephenson wrote:
I want to write a script that faxes selected members of congress  
my humble opinions ;)


You can send e-mail from perl and that leads to two options:

1) Send the email to efax (sp) where it can be converted to FAX and  
sent  for a fee.


2) Don't vote for representatives who steadfastly refuse to publish  
an e-mail address. I know, they will need a clerk to read it but  
that's true for the FAX too. Joel Hefley; are you listening.


I was under the impression that all US representatives get an email  
address automatically assigned to them, whether they use it or not.






-- Love your country. But don't trust its government. --




Re: CPAN modules not included with OS X

2005-12-30 Thread Joseph Alotta


On Dec 29, 2005, at 8:06 PM, Joel Rees wrote:


Maybe it would help to tell you it ain't that simple?

To mention openssl again, it can be installed in a variety of  
places, and it depends in part on where other things you may have  
installed might have wanted to put the packages they depend on.  
That's another reason for using a sandbox.


(Using the separate perl also helps me avoid building a sandbox for  
my personal server, where I don't have resources for doing things  
the ideal way.)




Hi Joel,

What's a sandbox?


Joe.


print 3 up labels

2005-11-10 Thread Joseph Alotta

Greetings,

I want to print Avery 6140 labels with name and address from a mac.   
Is there a library.  If not, does anyone know how to set a font and  
tab a certain number of inches to print 3 columns?



Joe Alotta



Re: How to find out if an application is running

2005-10-25 Thread Joseph Alotta

why not?

On Oct 25, 2005, at 6:13 PM, James Reynolds wrote:


At 1:22 PM -0700 10/14/05, Chris Nandor wrote:

I just uploaded Mac::Apps::Launch.  Now IsRunning() returns the  
PSN, instead

of simple true/false (1/0).

Here's a fun, simple, and efficient script to kill the Dock (which  
should

relaunch immediately):

   use Mac::Apps::Launch 1.92;
   use Mac::Processes;
   use POSIX 'SIGTERM';

   my $psn = IsRunning('com.apple.dock');
   kill SIGTERM, GetProcessPID($psn);



Don't try that with Launch 1.91!

--

Thanks,

James Reynolds
University of Utah
Student Computing Labs
[EMAIL PROTECTED]
801-585-9811





set default user-agent for Safari

2005-10-13 Thread Joseph Alotta

Greetings,

I know this is off topic, but does anyone know how to set the default  
user-agent in Safari to MSIE 6.0 permanently?  I have the debug menu  
but that doesn't work in websites that open a new window.



Joe.


Re: Editing PDF files?

2005-08-22 Thread Joseph Alotta
I think someone needs to build an editor for PDF files.  Maybe macros  
for emacs or vim.



On Aug 21, 2005, at 4:16 PM, Sherm Pendley wrote:


On Aug 20, 2005, at 7:52 PM, Rich Morin wrote:



I'm interested in being able to perform simple edits on PDF files.
For example, I might want to be able to change the colors of some
characters and output the changed version.



I looked ad Apple's PDFKit, thinking there might be a solution, but  
no. Lots of stuff for searching, annotating, and rearranging pages  
- but no low-level editing functions like you describe. Which makes  
sense - PDF is really more of a delivery format than an editing  
format.


Do you have control over the source of these PDF documents? If so,  
you could make your changes there, and maybe use Automator to build  
up a workflow to create and manage the PDFs.


sherm--

Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org






Re: backup strategy questions

2005-08-13 Thread Joseph Alotta

Hi Paul,

I've used the Disk Utility and created a copy that boots.  Thank you  
it was fun.  I haven't done the cron thing yet or the psync over it.


One question, it appears like everything on the restore copy is  
exactly the same, however the total file size and the total number of  
files is off by about 1%.  Maybe Disk Utility is smart enough not to  
copy items in the Trash Can or maybe there is something else going on?


Joe.


On Aug 10, 2005, at 2:27 AM, Paul McCann wrote:


Hi Joe,


... I wrote a little program that creates a new directory each  
time (ie, 2005-08-09) and does a full backup using psync to the  
directory.


My question:  In the event of a hard disk failure, will I be able  
to boot from a full copy in a directory?   How would I be able to  
recover?




Probably not, but it's not too hard to make bootable copies. Just  
partition your backup drive so that you have a partition for each  
backup copy that you'd like to keep (I tend to roll three, so  
that at any time I have the last 2-3 days of live backups). Then  
use the Disk Utility to clone a copy of your live system onto as  
many copies as you wish to keep. It takes about 30 minutes to clone  
mine, but it's obviously pretty sensitive to the size of your live  
system. This process will produce bootable copies, but you probably  
don't want to be doing this all the time. My strategy is to get  
psync to synchronise each of the backups in turn, instituted via a  
cron job.


Anyway, in more detail:

(1) Make some appropriately sized partitions, so that each will be  
capable of taking a full copy of your live system. Allow some room  
for expansion. Disk Utility makes this easy.


(2) For each partition: firstly erase the existing contents (takes  
about 5 seconds in Disk Utility), in the Erase tab. I think you  
can also click a button in the Restore tab (see below), but I've  
never gone that route. In any case, erasing any existing stuff is  
crucial to success.


(3) Go to the restore tab and drag your live system into the  
Source text field and your first clean partition into the second  
(destination) source field. Click restore, enter admin password,  
and wait! Repeat as you will.


You might like to test the bootability at this point: I've not had  
a problem with this technique.


That done you can just set psync to consecutively roll through  
synchronising with the backups in turn. The entries in the crontab  
(/etc/crontab) should be something like


# minutehourmdaymonth   wdaywho command
15  4   *   *   3,5 root/usr/local/bin/ 
psync -q -d / /Volumes/backup2  /Users/pmccann/psync_output_2 21
15  4   *   *   2,4,6 root/usr/local/bin/ 
psync -q -d / /Volumes/backup3  /Users/pmccann/psync_output_3 21


Obviously that's for a rolling pair of backups on the imaginatively  
named /Volumes/backup2 and /Volumes/backup3. Iterate as necessary  
and adjust the wday fields. The files psync_output_2 etc will  
contain anything to STDOUT or STDERR from the process. In practice  
I just check that things have run OK by tailing those files and/or  
checking their modification date.


Anyway, the upshot of this is that the backups always maintain  
their bootability. I've even --inadvertantly-- bumped the system  
version of the backups (10.3 = 10.4) using this synchonization  
technique; didn't cause any difficulties, and bootability remains.


Best wishes,
Paul





Re: psync backup problems: suggestions?

2005-07-13 Thread Joseph Alotta

Hi Randall,

How did you get it to work?  I had trouble getting cpan to install  
File::MacOS and I put it out to the group and nobody offered a way to  
get it to compile.


Yesterday, I tried using rsync to backup locally.  It worked fine for  
my home directory, it started writing files after maybe 10 seconds of  
building a list.  Then I tried it for / and it was building  
directories for about 2 1/2 hours and I killed it, not having wrote a  
single file.  My disk is 30G and I am using about 20G.


The backup program that came with the Seagate drive backed up the  
whole thing in about 45 minutes without a problem, but I still like  
psync better.


Joe.





On Jul 12, 2005, at 1:19 PM, Randal L. Schwartz wrote:


Joseph == Joseph Alotta [EMAIL PROTECTED] writes:



Joseph Hi everyone,
Joseph Why you are debating the relative merits of psync and rsync.

Joseph Unless I missed something, psync is not available on Tiger  
anymore

Joseph and nobody has a fix for it.

Joseph So we don't have the option of using psync.

I'm still using psync every day on Tiger.  What are you saying?

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503  
777 0095

merlyn@stonehenge.com URL:http://www.stonehenge.com/merlyn/
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl  
training!






Re: psync backup problems: suggestions?

2005-07-13 Thread Joseph Alotta
Thanks so much.  I found that message with SOLVED.  I don't know  
why I didn't see it before.  I guess the spamblocker killed it.


Anyway, I got psync up and running and it is running well.  It is  
running as I write.


As an aside, does anyone know how to turn spotlight off of a volume?   
It immediately starts creating an index and it is causing my  
comnputer to run hot and make everything else run slow.


Joe.


On Jul 13, 2005, at 7:24 PM, Ken Williams wrote:



On Jul 13, 2005, at 1:56 PM, Joseph Alotta wrote:



Hi Randall,

How did you get it to work?  I had trouble getting cpan to install  
File::MacOS and I put it out to the group and nobody offered a way  
to get it to compile.




Look at the first message in this very thread - the one that says  
SOLVED in the subject.


 -Ken






Re: psync backup problems: suggestions?

2005-07-12 Thread Joseph Alotta

Hi everyone,

Why you are debating the relative merits of psync and rsync.

Unless I missed something, psync is not available on Tiger anymore  
and nobody has a fix for it.


So we don't have the option of using psync.


Joe.




On Jul 12, 2005, at 9:34 AM, Christopher D. Lewis wrote:



On Jul 10, 2005, at 11:39 PM, Randal L. Schwartz wrote:


Christopher == Christopher D Lewis [EMAIL PROTECTED]  
writes:





Christopher Dear psync users,

This may not help, but I'm about to be a former psync user, because
Tiger's rsync now understands the HFS fork, if you include -E.   
This

presumably also includes the extended-access lists which psync won't
handle.



I thought the issue wasn't a patched rsync, but filesystem changes  
that made regular unix tools automatically get the resource fork  
when they tried to move, rename, etc.  I don't fully understand  
what it's doing, which makes me nervous -- also, I don't know how  
non-Tiger remote systems will treat data sent by rsync on Tiger, so  
I'm not sure how this will work for me as a backup.  I will happily  
look forward to your tales of success (rather than woe) and proceed  
accordingly once you describe the transition into former psync  
user status.  On the other hand, I have a warm spot in my heart  
for Perl, and I'll happily use psync 'till the cows come home if I  
can work out how not to get bitten by this silent failure to back  
up issue -- say, by following backup with a check for zero-length  
files on the destination volume, since that's the symptom.


The incremental (within files) nature of rsync backups *does* have  
appeal, though, especially as I consider remote backup;  my current  
setup involves only backup to an external drive.




Now to spend a few hours reverse engineering carbon-copy-cloner so
that I can ensure that I'm copying only the stuff that doesn't get
cleared on reboot anyway...



rsyncing your swap file across the internet could prove tiresome :-)

Best regards,
Chris





psync and MacOSX::File installing with cpan

2005-07-08 Thread Joseph Alotta

Greetings,

I was thinking it was about time to do a backup and I was trying to  
run psync on Tiger and I got this:



Can't locate MacOSX/File.pm in @INC (@INC contains: /System/Library/ 
Perl/5.8.6/darwin-thread-multi-2level /System/Library/Perl/5.8.6 / 
Library/Perl/5.8.6/darwin-thread-multi-2level /Library/Perl/5.8.6 / 
Library/Perl /Network/Library/Perl/5.8.6/darwin-thread-multi-2level / 
Network/Library/Perl/5.8.6 /Network/Library/Perl /System/Library/Perl/ 
Extras/5.8.6/darwin-thread-multi-2level /System/Library/Perl/Extras/ 
5.8.6 /Library/Perl/5.8.1 .) at /Users/jja/bin/psync line 15.

BEGIN failed--compilation aborted at /Users/jja/bin/psync line 15.


So I tried to install MacOSX::File and got these errors.  Does anyone  
know what I am doing wrong?



Joe.



cpan install MacOSX::File
Running install for module MacOSX::File
Running make for D/DA/DANKOGAI/MacOSX-File-0.69.tar.gz
LWP not available
Fetching with Net::FTP:
  ftp://archive.progeny.com/CPAN/authors/id/D/DA/DANKOGAI/MacOSX- 
File-0.69.tar.gz

CPAN: Digest::MD5 loaded ok
LWP not available
Fetching with Net::FTP:
  ftp://archive.progeny.com/CPAN/authors/id/D/DA/DANKOGAI/CHECKSUMS
Checksum for /Users/jja/.cpan/sources/authors/id/D/DA/DANKOGAI/MacOSX- 
File-0.69.tar.gz ok

Scanning cache /Users/jja/.cpan/build for sizes
MacOSX-File-0.69/
MacOSX-File-0.69/bin/
MacOSX-File-0.69/bin/pcpmac
MacOSX-File-0.69/bin/pgetfinfo
MacOSX-File-0.69/bin/pmvmac
MacOSX-File-0.69/bin/psetfinfo
MacOSX-File-0.69/bin/psync
MacOSX-File-0.69/Catalog/
MacOSX-File-0.69/Catalog/Catalog.pm
MacOSX-File-0.69/Catalog/Catalog.xs
MacOSX-File-0.69/Catalog/Makefile.PL
MacOSX-File-0.69/Changes
MacOSX-File-0.69/common/
MacOSX-File-0.69/common/macdate.c
MacOSX-File-0.69/common/util.c
MacOSX-File-0.69/Copy/
MacOSX-File-0.69/Copy/Copy.pm
MacOSX-File-0.69/Copy/Copy.xs
MacOSX-File-0.69/Copy/filecopy.c
MacOSX-File-0.69/Copy/Makefile.PL
MacOSX-File-0.69/File/
MacOSX-File-0.69/File/Constants.pm
MacOSX-File-0.69/File.pm
MacOSX-File-0.69/Info/
MacOSX-File-0.69/Info/Info.pm
MacOSX-File-0.69/Info/Info.xs
MacOSX-File-0.69/Info/Makefile.PL
MacOSX-File-0.69/Makefile.PL
MacOSX-File-0.69/MANIFEST
MacOSX-File-0.69/META.yml
MacOSX-File-0.69/README
MacOSX-File-0.69/Spec/
MacOSX-File-0.69/Spec/Makefile.PL
MacOSX-File-0.69/Spec/Spec.pm
MacOSX-File-0.69/Spec/Spec.xs
MacOSX-File-0.69/t/
MacOSX-File-0.69/t/benchmark.pl
MacOSX-File-0.69/t/catalog.t
MacOSX-File-0.69/t/copy.t
MacOSX-File-0.69/t/file.t
MacOSX-File-0.69/t/info.t
MacOSX-File-0.69/t/spec.t

  CPAN.pm: Going to build D/DA/DANKOGAI/MacOSX-File-0.69.tar.gz

Checking if your kit is complete...
Looks good
Writing Makefile for MacOSX::File::Catalog
Writing Makefile for MacOSX::File::Copy
Writing Makefile for MacOSX::File::Info
Writing Makefile for MacOSX::File::Spec
Writing Makefile for MacOSX::File
cp File.pm blib/lib/MacOSX/File.pm
cp File/Constants.pm blib/lib/MacOSX/File/Constants.pm
AutoSplitting blib/lib/MacOSX/File/Constants.pm (blib/lib/auto/MacOSX/ 
File/Constants)

cp Catalog.pm ../blib/lib/MacOSX/File/Catalog.pm
AutoSplitting ../blib/lib/MacOSX/File/Catalog.pm (../blib/lib/auto/ 
MacOSX/File/Catalog)
/usr/bin/perl /System/Library/Perl/5.8.6/ExtUtils/xsubpp  -typemap / 
System/Library/Perl/5.8.6/ExtUtils/typemap  Catalog.xs  Catalog.xsc  
 mv Catalog.xsc Catalog.c
cc -c  -I../ -I/Developer/Headers/FlatCarbon -g -pipe -fno-common - 
DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -I/usr/local/ 
include -Os   -DVERSION=\0.68\ -DXS_VERSION=\0.68\  -I/System/ 
Library/Perl/5.8.6/darwin-thread-multi-2level/CORE   Catalog.c

In file included from Catalog.xs:16:
../common/util.c: In function 'dirname':
../common/util.c:57: warning: pointer targets in passing argument 1  
of 'strncpy' differ in signedness
../common/util.c:60: warning: pointer targets in return differ in  
signedness

../common/util.c: In function 'basename':
../common/util.c:73: warning: pointer targets in passing argument 1  
of 'strncpy' differ in signedness
../common/util.c:75: warning: pointer targets in return differ in  
signedness

../common/util.c: In function 'str2pstr':
../common/util.c:80: warning: pointer targets in passing argument 1  
of 'strlen' differ in signedness
../common/util.c:81: warning: pointer targets in passing argument 1  
of 'strncpy' differ in signedness
../common/util.c:81: warning: pointer targets in passing argument 2  
of 'strncpy' differ in signedness

In file included from Catalog.xs:17:
../common/macdate.c: In function 'D2UDT':
../common/macdate.c:30: warning: integer constant is too large for  
'long' type

Catalog.xs: In function 'xs_getcatalog':
Catalog.xs:34: warning: pointer targets in passing argument 1 of  
'FSPathMakeRef' differ in signedness

Catalog.xs: In function 'xs_setcatalog':
Catalog.xs:128: warning: pointer targets in passing argument 1 of  
'FSPathMakeRef' differ in signedness

Catalog.xs: In function 'xs_fsref2path':
Catalog.xs:242: warning: pointer targets in passing argument 2 of  
'FSRefMakePath' differ in 

Re: building 5.8.7 on 10.4

2005-07-07 Thread Joseph Alotta


Man this Mac Mini is _fast_ for a cheap computer. Keeps reasonably  
close to my AMD Sempron 2600 with 256M more RAM and regular sized ATA  
hard drives. (Sorry about getting in a snit about the iNTEL stuff,  
but I just don't see why everyone can't see that even iNTEL has hit  
the wall here, still wishing Jobs would just add iNTEL based hardware  
to their product line. They can afford it, and it would treble their  
customer base easily. No need to drop PowerPC. Guess I'm not sorry  
enough about being in a snit to shut up.)



Hi Joel,

I am thinking that if Jobs picked AMD instead, he would a) have a  
better chip set, b) have a company that would be more responsive to  
his needs c) sided with a David rather than capitulating to the house  
of Goliath, d) preserved the Mac culture as different than the  
Windoze culture.   I am glad AMD is suing Intel.  I wish them the  
very best.



Joe.





Re: OT-good DEDICATED hosting service

2005-06-11 Thread Joseph Alotta

Hi Joel,

What does colocation mean?

Joe.


On Jun 10, 2005, at 8:39 PM, Joel Rees wrote:


On 2005.6.11, at 07:58 AM, Mark Wheeler wrote:


Sorry if this is off topic, but I need to move a shared account to  
a dedicated account, but picking a new host provider is a need in  
a haystack. So I ask, where is a good place to go for a DEDICATED  
server hosting package? What are your good experiences?




Have you considered colocation, or even running the servers yourself?

The mac mini alters the economics of both doing it yourself and  
colocation significantly, for an awfully large number of applications.


--
Joel Rees
even though much of what I do is not sensible
it does make sense if you know why ...






Re: [way OT] ... Intel? Maybe not.

2005-06-08 Thread Joseph Alotta


On Jun 8, 2005, at 3:27 PM, John Delacour wrote:


At 10:36 am -0700 8/6/05, Edward Moy wrote:


We hope that the additional price our customers pay is justified  
by the fit-n-finish that we put into the systems.




The beachballs in Tiger are terrific!  If I'd paid the full price  
for the upgrade I'd be seriously considering demanding my money back.


JD



I am hating Tiger, it is so slow many places, I will reload Panther  
this weekend.   The spotlight thing is nice but the performance  
overhead is unacceptable.



Joe.




Re: CamelBones on Intel? Maybe not.

2005-06-07 Thread Joseph Alotta
I'm not so sure about that.  IBM seems unwilling or unable to  
produce mobile G5s, which is a market that Apple considers very  
important.  They also are 2 years behind schedule on 3.0Ghz G5s,  
and appear to be focusing on video game processors instead of  
desktop and mobile processors.


Apple might be OK in a speed comparison right now (on desktops,  
they are clearly losing in laptop comparisons), but how about in  
two years?  Perhaps IBM has told Apple that they won't attempt a  
laptop chip, since the volume is way higher for video game  
consoles?  What should Apple do?


Personally, it looks like it will be a bit painful for a few years,  
but a far better move in the long run.


Ian



I used to be a NeXt developer.  This announcement is very reminiscent  
of the NeXt announcement to stop making those little black boxes and  
bring NeXt OS on Intel chips.  We had just bought a ton of hardware  
and they demo this clunky 386 PC.  First of all, it looked nasty.  We  
were used to that elegant design. Secondly, it kept crashing.  It  
destroyed the culture.  It was like putting Haydn into the juke box  
at a disco.  Everyone went home. The vice president of our division,  
who bet his career on NeXt, resigned and NeXt languished for years.


It is the same scenario playing out again.  Will Steve Jobs never learn?

BTW, I have just installed Tiger and I am not pleased.  It seems  
buggy.  Try to print from the Mail.app, it takes my system about 60  
seconds to have the print menu come up.  And shameless marketing: do  
we really need to have the order supplies from Apple button in our  
face every time we print.



Joe.





Tiger Mail Issues

2005-06-06 Thread Joseph Alotta

Greetings,


I just upgraded to Tiger and I noticed that now the command line mail  
system is activated.  I had been previously been using a perl program  
using MacGlue to put mail into the Mail.app.


I use this program mainly to send myself the output of perl programs  
in cron. I have written the perl program primarily because the  
postfix mail system was not working, so now perhaps I should just  
start using the system mail for output.  Does anyone know what I need  
to do to set it up and get it to send mail outside of the local system?


Re: Mac::Glue script

2005-04-29 Thread Joseph Alotta
So I think things are good.
Two questions:
1. How would I test Mac::Glue (simply) to make sure everything is as 
it should be?
It already went through tests in the above install.  Otherwise, begin 
writing your program.

2. Now that Xcode is installed and the cpan module seems to be working 
correctly, what is the best way to install modules?
	cpan install module name - i.e. Mac::Glue
That's it.  Make sure cpan is running under sudo.
Thanks again for all your help. I really appreciate it. I've been 
programming with the basics of perl for a few years, now and never 
installed a module through cpan before.

Thanks,
Mark



Re: keychain

2005-04-19 Thread Joseph Alotta
Hi Everyone,
I looked at man security, just for kicks and I dumped the keychains.  I 
was suprised to find email addresses for people who I do not know.  I 
am a single user powerbook with dial up 56k access.
Is this normal to have email keychain data for people I do not know?

I could post those emails, but in case they're legitimate, I don't want 
them to get spammed.  Any suggestions?

Joe.
On Apr 19, 2005, at 7:47 PM, Ken Williams wrote:
Yeah, check out the 'security' command-line program.  I use it in 
conjunction with Module::Release so that I don't have to type my PAUSE 
password every time I upload something to CPAN - it just fetches the 
password from my keychain.

 -Ken
On Apr 19, 2005, at 5:01 PM, Larry Landrum wrote:
I need to authenticate users in a perl CGI and was hoping to use the 
Keychain but can't find a perl way to do that. Has anybody done that 
before?



Re: Different results using the substr command

2005-01-05 Thread Joseph Alotta
I am wondering that even if you get substr to work, you probably would 
have code that
is too specific and hacky.  You probably want to match off of some of 
the keywords,
so that if things move your program won't break.

Joe.
On Jan 5, 2005, at 3:14 PM, Albert Kaltenbaeck wrote:
I am having problems with the substr command.
It appears under OSX Perl the length value is being ignored.
This code worked under MacPerl with the old open statement being open 
(THEFILE ,::clientd.html);.
All I changed was the open statement with a new path.
When I ask Perl OSX to print $line (the full string) I get the 
following...

html
head
meta http-equiv=content-type content=text/html;charset=ISO-8859-1
META HTTP-EQUIV=Pragma CONTENT=no-cache
meta name=description Content=Offline
titleP a u s e d/title
meta name=generator content=Albert Kaltenbaeck
meta http-equiv=refresh content=15
titleO f f l i n e/title
/head
body bgcolor=#00
IMG SRC=D:\offline.gif WIDTH=400 HEIGHT=300 ALIGN=bottom
/body
/html
Great! it is reading the file correctly. But when I ask Perl to print 
$playing (using the substr command) I get the following...

ntent-type content=text/html;charset=ISO-8859-1
META HTTP-EQUIV=Pragma CONTENT=no-cache
meta name=description Content=Offline
titleP a u s e d/title
meta name=generator content=Albert Kaltenbaeck
meta http-equiv=refresh content=15
titleO f f l i n e/title
/head
body bgcolor=#00
IMG SRC=D:\offline.gif WIDTH=400 HEIGHT=300 ALIGN=bottom
/body
/htm
It is starting at the beginning of the file and not the 6th line.
Using MacPerl I get the word Offline in the sixth line and hacking 
off the three characters on the end. (what I want)
I have tried using 167 as the offset and -3 as the length.
When I do this the starting point is correct but it does not seem to 
acknowledge the length value because I get the rest of the entire 
string.
Is there an issue now because I am using Unix line breaks and not 
Macintosh?

here is how I am using substr.
$. = 0;
open (THEFILE,../../../../Documents/ge/ClientD.html) or die Line 
96   . (localtime) .   . $! . \n\n\n;
do {$line =THEFILE} until $. == 6 || eof;
close (THEFILE);
$playing = substr($line,35,-3);

Albert



HTML::TableExtract

2004-12-20 Thread Joseph Alotta
Greetings,
I am using the TableExtracter and it bombs in the line marked with  
when it don't match headers for the table.  I would like to check to 
see if it matched, but I don't know what to check.  Can someone please 
help me.

my $html = get($url) || warn Can't fetch $url\n;
print $string\n;
my $te = new HTML::TableExtract( headers = [1 Year, 3 Year, 5 
Year, 10 Year] );
$te-parse($html);
my $p  = ($te-rows)[0];

my ( $one, $three, $five, $ten) = @$p;
Joe Alotta


Re: HTML::TableExtract

2004-12-20 Thread Joseph Alotta
Thank you Matt.  This was what I was needing.
Joe.
On Dec 20, 2004, at 2:38 PM, Matt Sisk wrote:
Hi Joe,
You can do that two ways. One, you could check to see if any tables 
matched:

 if ($te-table_states) {
   ...
 }
Since you seem to be expecting only a single matched table in the 
document, however, the table extract object behaves the same as the 
single table state. So you can just check for rows:

 if ($te-rows) {
   ...
 }
Let me know if that doesn't work for you.
Cheers,
Matt
Joseph Alotta wrote:
Greetings,
I am using the TableExtracter and it bombs in the line marked with 
 when it don't match headers for the table.  I would like to 
check to see if it matched, but I don't know what to check.  Can 
someone please help me.

my $html = get($url) || warn Can't fetch $url\n;
print $string\n;
my $te = new HTML::TableExtract( headers = [1 Year, 3 Year, 
5 Year, 10 Year] );
$te-parse($html);
my $p  = ($te-rows)[0];

my ( $one, $three, $five, $ten) = @$p;
Joe Alotta




Re: Thunderbird

2004-09-21 Thread Joseph Alotta
I am using Now Contact and Now Up-To-Date and it is getting tired.  
Does anyone have a recommendation for something Mac-ish that would work 
better?  Even something that costs a few hundred.

Joe.

On Sep 21, 2004, at 10:50 PM, Ken Williams wrote:
You might be interested in this page, entitled Import Address Book 
records into to Thunderbird :

  http://www.macosxhints.com/article.php?story=20040905025741769
When I googled for thunderbird and address, trying to learn what 
thunderbird was, this was the first link that came up.

 -Ken
On Sep 21, 2004, at 7:21 PM, wren argetlahm wrote:
I've recently started messing around with Thunderbird.
I like it a bunch but I'm wondering if there's any
good way to port over my Address Book, with perl or
otherwise.
I've tried exporting from AB (as .vcf, the only
option) then importing in Thunderbird (.vcf isn't one
of the formats listed that it can import, but it
doesn't tell me I can't do it). A new address book
list icon thing shows up, but so far as I can tell the
information isn't actually imported. My second attempt
was going to be through Mac::Glue, but Thunderbird
doesn't appear to support AE (which makes sense).
Any other suggestions?




Re: mount ftp network disk

2004-09-10 Thread Joseph Alotta
Looks like this will work:
$ mkdir /tmp/debian
$ mount_ftp ftp://ftp.us.debian.org/debian/
/tmp/debian/
$ ls -la /tmp/debian/

Thanks Chris and Peter for the help.
I couldn't get this to work on ftp-www.earthlink.net.   I think it is a 
login id problem.  mount_ftp uses the same login id that you have on 
the mac which in my case is not my email.

mount_ftp seems to finish but then drops out with server not 
responding.  I made a directory and used ftp on the command line to 
login and mget to copy everything.  Then I ran psync.

Thank again,
Joe.


Re: BBEdit 8.0

2004-09-10 Thread Joseph Alotta
Hi Ken,
I have been using emacs in one window and a terminal in another window 
to run the command line.  I tried what you say and the control-z works 
to suspend emacs, but I can't seem to get the .login to work to pop me 
back into emacs.  Does .login work when you start a new terminal 
window, or do I need to logout of my user id?

Joe.
On Sep 9, 2004, at 10:34 PM, Ken Williams wrote:
text, and when I want to run commands I hit control-z and run a perl 
one-liner, or a 'wc' command, or whatever.  Then, since I have 
bindkey ^Z run-fg-editor in my .login file, I just hit control-z 
again to drop me back into my editor.  I almost never use emacs' shell 
integration, or write lisp functions, because I find the parent shell 
a more powerful tool.  And this way I g



Re: pSync/Panther how?

2004-08-03 Thread Joseph Alotta
Hi Ingo,
I am using psync on Panther and I like it very much.  No trouble, it 
just works.
Here is my version info.

Joe.
[Abba:~] josephal% perl -v
This is perl, v5.8.1-RC3 built for darwin-thread-multi-2level
(with 1 registered patch, see perl -V for more detail)
Copyright 1987-2003, Larry Wall
Perl may be copied only under the terms of either the Artistic License 
or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'.  If you have access to 
the
Internet, point your browser at http://www.perl.com/, the Perl Home 
Page.

[Abba:~] josephal% /usr/local/bin/psync -v
psync   [-d][-n][-q|-v] source_items ... target_directory
psync -r[-d][-n][-q|-v] source_directory target_directory
[Abba:~] josephal% head /usr/local/bin/psync
#!/usr/bin/perl
#
# $Id: psync,v 0.65 2003/04/09 08:25:26 dankogai Exp $
# $Id: psync,v 0.65.5 2003/09/5 jacek_s Exp jacek_s $
#
eval 'exec /usr/bin/perl  -S $0 ${1+$@}'
if 0; # not running under some shell
use strict;
[Abba:~] josephal%
On Aug 3, 2004, at 3:06 PM, Ingo Weiss wrote:
Hi all,
I would like to use pSync for backups. I used it in Jaguar, but it 
seems
that it's not compatible with Panther currenlty. The Author recommended
to install a newer Perl which should fix the problem. Here are some
questions:

- What is the latest stable Perl version that runs under Panther?
- Are there a really foolproof instructions anywhere for how to build
and install Perl from source?
- This all seems a bit much for running one small program - is there
another way to make pSync run?
- Or, is there a good alternative to pSync?
Thanks!
Ingo



Re: Mason and undefined symbols error

2004-07-15 Thread Joseph Alotta
This might be a little out of our developed world mindset, but I have
heard numerous missionaries report that people in their host countries
will do the exorcism first off on all kinds of equipment, especially
cars and trucks and generators and household appliances.  The general
conclusion is that it works well and it is lot cheaper then finding
a mechanic or engineer.
Could be they know things that some of us don't know.
Joe.
On Jul 15, 2004, at 2:41 PM, Sherm Pendley wrote:

Yes, Voodoo is great fun ;-)
I'm glad you think so, because the next step involves a bell, a book, 
a candle, and liberal applications of holy water. The demons in the 
machine must be exorcised! ;-)

sherm--



Re: Installing modules on osX 10.3.3

2004-06-14 Thread Joseph Alotta
On Jun 14, 2004, at 1:34 PM, Phil Calvert wrote:
At this point, maybe the best thing would be to reinstall osX?
I'm guessing you're a recent refugee from Windows? ;-)
Sir, you wound me! ;-) I've never used a windows for more than a hour 
without feeling ill. I will admit to being a long time system 6, 7, 8, 
9 user and this unix stuff is still a bit heady
I saw this news article that Microsoft was fed up with North America 
and Europe antitrust suits and going to focus on underdeveloped 
countries.

I like that:  Microsoft: choice of undeveloped world. Apple: choice of 
the developing world.

Does my bias seem to show any?
Joe Alotta


Re: n00b needs help with file arguments

2004-06-01 Thread Joseph Alotta
** This does not apply to you Sherm **
I asked a question about quoting an argument prior to removing a 
directory
to learn something about how the language handles things. I don't know 
if
the rmdir method is recursive and/or forced in Perl.. Telling me to 
try and
see is a BS answer to give. Of course I could create a directory and 
try,
but what is the need for a community of experts if I can't ask a 
simple
question?

Also... Read perldoc this and that... Most people new to a language 
will
have no clue what you are talking about. Keep this in mind for the 
future.
Do you tell a person who can't drive standard ... Hey it's a car. Just
drive it!? Of course not. If you don't have the time to provide a 
proper
answer, or some code to help explain things, please don't waste your 
time
replying.

I heartily agree.  People should be helpful.  In the old days of the 
internet
this was more common.  Being kind is what separates a prince from a 
rouge.

Besides the documentation is obscure and lacking and not easy to know
where it is found.
Joe.



Re: n00b needs help with file arguments

2004-06-01 Thread Joseph Alotta
I think you are missing the point.  If a beginner knew the *right*
place to find information, he would not be a beginner.
Meditate on this and think about the time when you were a beginner
and how someone helped you.
Meditate on how the world would be if people in other professions did
the same thing you do.  For example, you go into a doctor's office and
he gives you a lecture on how you need to find the appropriate medical
resource and tells you to go to the library and look it up.
Joe.
On Jun 1, 2004, at 12:02 PM, Wiggins d Anconia wrote:
I heartily agree.  People should be helpful.  In the old days of the
internet
this was more common.  Being kind is what separates a prince from a
rouge.
Besides the documentation is obscure and lacking and not easy to know
where it is found.
True, however this is a list for Mac OS X related questions, not newbie
Perl questions. The [EMAIL PROTECTED] is a much better choice, and 
much
friendlier when it comes to such questions, as that is its focus.  RTFM
is a good answer on a topic specific list where it is assumed one
already knows how to access the M. In the old days of the internet it
was also more common for one to put in the required amount of effort to
find the most proper place to ask their question, which is less and 
less
common.

A list for beginning Perl programmers to ask questions in a friendly
atmosphere. - beginners
Discussion of Perl on Macintosh OS X - macosx
http://lists.perl.org
Time to throw this out again:
http://www.catb.org/~esr/faqs/smart-questions.html
http://danconia.org



passing a function and then calling the function with parameters

2004-05-18 Thread Joseph Alotta
Greetings,
I am writing a solving function.   You pass it the name of a function 
and it
calls the functions many times until it finds the value that returns 
zero.  How would
this be set up?

sub plusthree {
#  the function we are solving for
my ($x) = @_
   return $x + 3;
}
sub solve {
#  the solving routine
   my ($function) = @_;
   ..
$z = 0;
# calls passed function with parameter $z
   $a = {$function}($z);
}
#using solver to solve our function.
$answer = solve( \plusthree );
Thank you,
Joe.


Re: Passwords

2004-05-12 Thread Joseph Alotta
On May 11, 2004, at 3:35 PM, Chuck Rice wrote:

At 5:46 PM -0400 5/7/04, Sherm Pendley wrote:
On May 7, 2004, at 3:29 PM, Chuck Rice wrote:

How do I set up a perl program such as the one below to check mail  
without hard coding the password in the code?
If you're using Panther, the security command-line tool looks like  
it might be useful. You can use it to access the keychain from a  
script. man security for more info.

You'll need to open it as a child task using both input and output;  
for more about doing that from Perl, see perldoc IPC::Open2 and  
perldoc IPC::Open3.

sherm--
Not sure about the child task stuff, but this code seems to get the  
password from the keychain, (assuming that you have a keychain entry  
called emailpassword).  Pretty cryptic, and I am sure beginnerish, but  
it works. -Chuck-

#!/usr/bin/perl  my $temp;
my $pass;
$temp = `security find-internet-password -a emailpassword -g  21`;
$temp =~ /password: ([A-Za-z]*)/;
$pass = $1;
print $pass;
--  
I would think that you can have digits in your password.  I would  
change it to be
$temp =~ /password: ([A-Za-z0-9]/;

Joe.



 
--
Joseph Alotta, Principal 
(630) 969-2628
Open Door Investment Advisors, Inc. 
www.opendoorinvestments.com
409 North Washington Street  
certifiedfinancialplanner_at_earthlink_dot_net
Westmont, IL 60559 USA   qualified,  
professional, friendly
 
--



Re: backing up using DejaVu

2004-05-04 Thread Joseph Alotta
On May 3, 2004, at 11:17 PM, Ken Williams wrote:
Oh, certainly - you can interrupt basically anything at all on the 
computer with sleep, and it will simply continue where it left off.  I 
do this all the time with compilations, long-running scientific 
experiments, regression tests, etc. on my PowerBook.  The 
wake-from-sleep functionality is very robust and fast.

The only trouble you're likely to see is when an external resource 
(like a network or a printer) doesn't like you pausing in the middle 
of something you're doing to it, and then some operations involving 
that resource might not just continue where you left off.

 -Ken
Thanks, Ken,
Yes, I have had some trouble with my printer when the powerbook gets 
sleepy.  One time it just kept printing one character on a page and 
used up all the paper.   But the disk drive is a local firewire drive, 
so it should be okay.

Joe.



Re: [slightlyOT] reading logs with long urls

2004-05-03 Thread Joseph Alotta
Another idea might be to sleep proportional to the length of the URL.  
For example, 1k request get 1 second, a 2k request gets 2 seconds.  At 
least this will slow them down.

Joe.
On May 3, 2004, at 3:16 PM, Ken Williams wrote:
On May 2, 2004, at 8:17 PM, Joel Rees wrote:
My apache log files show that I'm getting two or more of those long 
url attacks every day, and access_log grows to over 4Mb in just a 
week, in spite of the fact that there are less than ten valid 
accesses in any particular day.
How about configuring Apache to disregard (and not log) any URL longer 
than a predefined length?  Also, what are those long url attacks, I 
haven't heard of them.

 -Ken




Re: backing up using DejaVu

2004-05-03 Thread Joseph Alotta
Hi Jerry,
I used sudo psync -d / /Volumes/backup  and it worked real nice.  I 
kind of like watching
it work while I do other things.  If my powerbook were to sleep in the 
middle of it, would it break something or would it just pick up where 
it left off?

Joe.
On May 3, 2004, at 6:54 AM, Jerry LeVan wrote:
I can't think of any reason why not :), If you examine the source to 
psync
you will find the documentation embedded near the end. If you installed
DejaVu, look in /usr/local/bin for psync. I think the help even gives
a command for copying an entire volume.

Let us know how it turns out...
Jerry
On May 2, 2004, at 9:50 PM, Joseph Alotta wrote:
Jerry,
On May 1, 2004, at 2:58 PM, Jerry LeVan wrote:
You might try one more time, the first time takes the longest, 
subsequent invocations
just looks at differences...

I can't think of any reason why the program is chewing cpu after the 
task is finished.
It works by calling psync ( a perl program to do the copying and 
adjusting permissions).
If DejaVu calls psync to do the work, then why do I need DejaVu.  Why 
can't I just put the psync command in cron?

I believe that while it is running it might put a menu in the menu 
bar (on the right
hand side), you might try looking there...
It puts a horseshoe shaped logo up by the battery level indicator.  
But all it says is backup in progess no indication of how much it 
has done or what remains.

Joe.

I seems like I recall a program RsyncX that is put out by a 
consortium of educational
users, you might take a look at that.

Jerry
On May 1, 2004, at 1:38 PM, Joseph Alotta wrote:
Greetings,
Taking Jerry's recommendation, I downloaded DejaVu and ran it last 
night.  It started about 10pm and at 12:30pm it was still running 
and I went to bed, (my energy savings preferences were set to dvd 
playback).  I couldn't see any progress bar, although it said it 
had one. When I awoke this morning it was finished.  However, now 
it is still using 94% of my cpu time and I don't know what it could 
be doing, preference panel says it is disabled.

Also, I was looking at the files it wrote, and though they are all 
there, the file sizes are different.

This is the original:

[Abba:~/Desktop] josephal% ls -la
total 256
drwx--12 josephal  staff 408 30 Apr 22:10 .
drwxr-xr-x37 josephal  staff1258 29 Apr 10:42 ..
-rwx-- 1 josephal  staff   21508 30 Apr 22:10 .DS_Store
-rw-r--r-- 1 josephal  staff   0  2 Oct  2002 .localized
drwxr-xr-x 7 josephal  staff 238 30 Apr 22:10 DejaVu
drwxr-xr-x   334 josephal  staff   11356 30 Apr 22:10 bankers box
drwxr-xr-x   130 josephal  staff4420 29 Apr 11:44 charts
drwxrwxrwx   142 josephal  staff4828  1 Mar 15:09 contact 
letters
-rw-r--r-- 1 josephal  staff  102557 27 Apr 15:25 google.pdf
drwxr-xr-x  4080 josephal  staff  138720 29 Apr 10:44 
historical_data
drwxr-xr-x   123 josephal  staff4182 29 Apr 10:46 reports
drwxr-xr-x30 josephal  staff1020 12 Mar 17:30 trifold 
brochure
[Abba:~/Desktop] josephal%

This is the copy:
[Abba:Users/josephalotta/Desktop] josephal% ls -la
total 208
drwx--11 josephal  unknown 374 30 Apr 22:10 .
drwxr-xr-x36 josephal  unknown1224 29 Apr 10:42 ..
-rw-r--r-- 1 josephal  unknown   0  2 Oct  2002 .localized
drwxr-xr-x 6 josephal  unknown 204 30 Apr 22:10 DejaVu
drwxr-xr-x   333 josephal  unknown   11322 30 Apr 22:10 bankers box
drwxr-xr-x   129 josephal  unknown4386 29 Apr 11:44 charts
drwxrwxrwx   141 josephal  unknown4794  1 Mar 15:09 contact 
letters
-rw-r--r-- 1 josephal  unknown  102557 27 Apr 15:25 google.pdf
drwxr-xr-x  4079 josephal  unknown  138686 29 Apr 10:44 
historical_data
drwxr-xr-x   122 josephal  unknown4148 29 Apr 10:46 reports
drwxr-xr-x29 josephal  unknown 986 12 Mar 17:30 trifold 
brochure
[Abba:Users/josephalotta/Desktop] josephal%

So, I guess I need to reboot to get my CPU time back.  What do you 
think?  Is DejaVu a tested product or is it alpha/beta?  Seems it 
has four strikes against it:  1.  Slow, 2. No progress Bar, 3. File 
sizes, 4. high CPU usage while doing nothing.  Also, I do not like 
the fact it is a preference panel as I can't kill it, in times like 
this.

Joe.







Re: backing up using DejaVu

2004-05-01 Thread Joseph Alotta
Greetings,
Taking Jerry's recommendation, I downloaded DejaVu and ran it last 
night.  It started about 10pm and at 12:30pm it was still running and I 
went to bed, (my energy savings preferences were set to dvd playback).  
I couldn't see any progress bar, although it said it had one. When I 
awoke this morning it was finished.  However, now it is still using 94% 
of my cpu time and I don't know what it could be doing, preference 
panel says it is disabled.

Also, I was looking at the files it wrote, and though they are all 
there, the file sizes are different.

This is the original:

[Abba:~/Desktop] josephal% ls -la
total 256
drwx--12 josephal  staff 408 30 Apr 22:10 .
drwxr-xr-x37 josephal  staff1258 29 Apr 10:42 ..
-rwx-- 1 josephal  staff   21508 30 Apr 22:10 .DS_Store
-rw-r--r-- 1 josephal  staff   0  2 Oct  2002 .localized
drwxr-xr-x 7 josephal  staff 238 30 Apr 22:10 DejaVu
drwxr-xr-x   334 josephal  staff   11356 30 Apr 22:10 bankers box
drwxr-xr-x   130 josephal  staff4420 29 Apr 11:44 charts
drwxrwxrwx   142 josephal  staff4828  1 Mar 15:09 contact letters
-rw-r--r-- 1 josephal  staff  102557 27 Apr 15:25 google.pdf
drwxr-xr-x  4080 josephal  staff  138720 29 Apr 10:44 historical_data
drwxr-xr-x   123 josephal  staff4182 29 Apr 10:46 reports
drwxr-xr-x30 josephal  staff1020 12 Mar 17:30 trifold brochure
[Abba:~/Desktop] josephal%
This is the copy:
[Abba:Users/josephalotta/Desktop] josephal% ls -la
total 208
drwx--11 josephal  unknown 374 30 Apr 22:10 .
drwxr-xr-x36 josephal  unknown1224 29 Apr 10:42 ..
-rw-r--r-- 1 josephal  unknown   0  2 Oct  2002 .localized
drwxr-xr-x 6 josephal  unknown 204 30 Apr 22:10 DejaVu
drwxr-xr-x   333 josephal  unknown   11322 30 Apr 22:10 bankers box
drwxr-xr-x   129 josephal  unknown4386 29 Apr 11:44 charts
drwxrwxrwx   141 josephal  unknown4794  1 Mar 15:09 contact letters
-rw-r--r-- 1 josephal  unknown  102557 27 Apr 15:25 google.pdf
drwxr-xr-x  4079 josephal  unknown  138686 29 Apr 10:44 historical_data
drwxr-xr-x   122 josephal  unknown4148 29 Apr 10:46 reports
drwxr-xr-x29 josephal  unknown 986 12 Mar 17:30 trifold brochure
[Abba:Users/josephalotta/Desktop] josephal%
So, I guess I need to reboot to get my CPU time back.  What do you 
think?  Is DejaVu a tested product or is it alpha/beta?  Seems it has 
four strikes against it:  1.  Slow, 2. No progress Bar, 3. File sizes, 
4. high CPU usage while doing nothing.  Also, I do not like the fact it 
is a preference panel as I can't kill it, in times like this.

Joe.



backing up system

2004-04-30 Thread Joseph Alotta
Greetings,
I try to back up my system once a week.  I have a firewire disk drive 
that I use for this purpose.  I have been using the Lacie software that 
came with it.  Before Panther, I used to be able just to plug it in and 
run it under my own id.  Now I need to log in as root to run it. Which 
means I can't do anything else until it finishes, and it takes about 40 
minutes.

I am looking to do something more automatic.
Questions:
1. Can iSync be used for backups?  I'm not sure if I have iSync unless 
it is standard in Panther.

2. Otherwise, has someone wrote a perl program to do this that I can 
run in cron.

Thank you so much,
Joe.


Re: backing up system

2004-04-30 Thread Joseph Alotta
On Apr 30, 2004, at 4:58 PM, Jerry LeVan wrote:
Yeah, but the person requesting advice say that he wanted the job
to run at an off time since it tied the machine up for 40 minutes...
It seems that with anacron, I would get into work bright and early, turn
on my machine and it would be useless for doing real work since it would
begin all the night jobs.
What if anacron had a catch up mode, that uses 1 second every 20 seconds
until all the back jobs were finished?
Joe.



Re: backing up system

2004-04-30 Thread Joseph Alotta
(I just tried, for grins, under 10.2.8, su-ing to an admin user, then 
sudo-ing a sh to get a root shell without logging in as root, but 
open-ing /Applications/AppleWorks 6 as the root user didn't seem to 
do anything other than opening the /Applications directory in a GUI 
window. open-ing /Applications/TextEdit.app as root runs TextEdit, 
but the process is owned by the user I'm logged in as. sudoing the 
open directly from the admin user yields complaints about not being 
able to map display interlocks or open default connections, etc. 
That's not Panther, of course.)
I couldn't sudo and open Silverkeeper.app either.  Besides it is too 
resource intensive.  I wouldn't mind something slower, but quieter in 
the background.


1. Can iSync be used for backups?  I'm not sure if I have iSync 
unless it is standard in Panther.
Well, Apple's blurbs seemed to say such things, but I think, when I 
read the fine print, it was for backing up to your .mac account.
They have an app called Backup.app, but it insists on you having a .mac 
account and being online.  I don't think it is worth paying a monthly 
fee for this.

Joe.



interesting article about security

2004-04-21 Thread Joseph Alotta


 * PC users 'fail security tests' *
Better security means not trusting users to do the right thing, argues 
an industry expert.
Full story:
http://news.bbc.co.uk/go/em/-/2/hi/technology/3625157.stm



Re: Suggested version for Mac OS X.2?

2004-04-18 Thread Joseph Alotta
Hi Joel,

I know where you can get an AS400 for the taking.  Then you can really
hack away like old times.  Maybe you can find a card reader for it?
Joe.

On Apr 18, 2004, at 8:54 PM, Joel Rees wrote:

On 2004.4.17, at 11:45 PM, Randal L. Schwartz wrote:
It's the 5.9.x track that has the experimentation.  5.8.x (like 5.6.x
before it) are for slightly-behind-bleeding-edge adopters.  Hardcore
trailing edge adopters are still using Perl4 (which is also an even
number :).
So, on Tuesday's, when I'm in my hardcore trailing edge mood, I should 
use use Perl4.

Sounds like a good excuse for another machine. ;-) I've got an old 68k 
box or two, is there a MacPerl4? Or should I download a really old 
version of netBSD?

(Heh. Wish I really did have time to get netBSD up on my old performa 
550 and 630.)





Re: Merging into Address Book

2004-04-08 Thread Joseph Alotta
Ken,

I am sorry but you can't get Vcard to work from here.  Because of 
insurmountable technical difficulties you need to reconsider you 
wedding plans.  One alternative is to elope.  Another is to marry a 
lady with a smaller family in which writing invitations by hand is 
possible, unless it is your family that is the large one, in which case 
eloping or bachelorhood are the only options.

Joe.





Re: OT: Revealed Email Passwords???

2004-04-03 Thread Joseph Alotta
Gohaku,

I've seen lots of privacy things happen in my time on the internet.
Mostly, it is sending an email in confidence to a friend who then
forwards it to your enemies.  No encryption scheme can help that.
My advice, is never write anything on the internet except things that
you would like published widely.  It probably will be.  There are
still archives of things I wrote 25 years ago, available to search
on Google.
Joe.

On Apr 3, 2004, at 10:56 AM, Oliver Schnarchendorf wrote:

On Sat, 3 Apr 2004 11:42:46 -0500, gohaku wrote:
I just read this weblog post:
Security, Earthlink, and Apple
URL: http://www.oreillynet.com/pub/wlg/1599
My question, is using Earthlink's webmail just as secure as the SSL
Connection and why was Daniel's log in and password revealed???
Okay. There are a few things you need to know about the internet.

	(a) every communication on networks is in clear text
	(b) all the computers between you and your target server are able to 
read communications.
	(c) wireless networks are just another kind of network.
	(d) wireless networks make it simpler to spy upon network content. 
The WEP (Wireless Encryption Protocol) can be broken just by running 
some code that listens to a big number of network packages and 
automatically extracts the encryption key.

Now that you know the above lets go back to your question: Is 
Earthlink's webmail just as secure as an SSL connection? Just IF you 
connect to the webmail service using SSL (https://). Otherwise it's 
still readable as clear text.

/oliver/


Joseph Alotta
409 North Washington Street
Westmont, IL 60559
(630) 969-2628
jalotta_at_earthlink_dot_net


Re: Preview.app opening multiple files

2004-03-31 Thread Joseph Alotta
Chris,

It works like a champ.  Thank you so much.  I think Mac::Glue is
really cool.
Joe Alotta

On Mar 24, 2004, at 11:24 AM, Chris Nandor wrote:

#!/usr/bin/perl
   my $f = new Mac::Glue 'Finder';
   $f-obj(file = [EMAIL PROTECTED])-open;
This does require the latest Mac::Glue, 1.19, uploaded last night 
(which
depends on Mac::Carbon 0.66, also uploaded last night).

Chances are, this will work just fine, as Finder will open the file 
with the
right app.  But if it opens in the wrong app, you can do this:

   my $app = $f-obj(file = '/Applications/Preview.app');
   $f-obj(file = [EMAIL PROTECTED])-open(using = $app);



Re: Preview.app opening multiple files

2004-03-30 Thread Joseph Alotta
On Mar 29, 2004, at 11:31 PM, Paul McCann wrote:

Hi Joseph,
you wrote...
It's easy to replicate from the Finder.  You highlight the files and
double click holding shift down.
Also, you can highlight, then control click getting the menu and then
select open.
Thanks for the explanation, but my machine seems to be on a rather
strict one window for one file kick at the moment. No matter what
I try, including both of the above invocations. (10.3.3 here). Anyone
else using 10.3.3 able to do the many to one trick in Preview?
So I can't test whether any of the applescript solutions match the
Finder behaviour (ie, they *all* do for me!).
Cheers,
Paul
Paul, I'm using 10.3.2.  Maybe there is a bug, excuse me, an added 
feature in 10.3.3.

Joe.






Re: Preview.app opening multiple files

2004-03-29 Thread Joseph Alotta
John,

I tried modifying this to work on my system.  The folder is 
~/Desktop/charts and the files are .pdf's.

You got to love that explanatory error message.

Joe Alotta



[Abba:~/oldperlcode] josephal% du ~/Desktop/charts/
4928/Users/josephalotta/Desktop/charts/
[Abba:~/oldperlcode] josephal% cat applescript
#!/usr/bin/perl
my $script = EOS;
set charts to path to charts folder
tell application Finder
set filelist to {}
set pdfs to files in charts whose name ends with .pdf
set firstfour to items 1 through 4 of pdfs
repeat with f in firstfour
set end of filelist to f as alias
end repeat
end tell
tell application Preview
open filelist
activate
end tell
EOS
`osascript -e '$script'`;
[Abba:~/oldperlcode] josephal% applescript
22:35: syntax error: A property can't go after this identifier. (-2740)
[Abba:~/oldperlcode] josephal%
On Mar 24, 2004, at 12:07 PM, John Delacour wrote:

At 10:02 am -0600 24/3/04, Joseph Alotta wrote:

I'm still playing around with the applescript code to try to make it 
work according to the suggestions here.  Seems it needs alias to 
tell it to open files, but can't find them if you completely path 
them.
My fault.  I told you I was tired.

You need to use Mac:paths: and not unix/paths/

You can work out for yourself a way to do that but here is a working 
example of a plain AppleScript way to open the first 4 jpgs in your 
pictures folder:



my $script = EOS;
set pics to path to pictures folder
tell application Finder
set filelist to {}
set jpgs to files in pics whose name ends with .jpg
set firstfour to items 1 through 4 of jpgs
repeat with f in firstfour
set end of filelist to f as alias
end repeat
end tell
tell application Preview
open filelist
activate
end tell
EOS
`osascript -e '$script'`



Re: Preview.app opening multiple files

2004-03-29 Thread Joseph Alotta
Yes - I think you're kind of right, so, if you have the command line 
as such:
system open *.pdf;

This would expand to match everything such as:  system open a.pdf 
b.pdf c.pdf d.pdf;
Each of the items are treated in an Unix shell as separate arguments.

Now, for (heh heh) arguments sake, if we executed the same command as 
such:

system 'open a.pdf b.df c.df d.pdf';

This would treat the list passed as ONE argument.

This statement would fail:  system 'open *.pdf'; since expansion of 
the wildcard character
would not take effect (due to the syntax).

The key is to write a little shell program which would collect all 
*.pdf into a list of one
argument passed to the system open command.

Now go fish!   (parable, sorry!)   ;-)
I tried your advice and it still doesn't work.  It still opens each
file in a separate window.


[Abba:~/oldperlcode] josephal% ./test
[Abba:~/oldperlcode] josephal% cat ./test
#!/usr/bin/perl
system open /Users/josephalotta/Desktop/Picture1.pdf 
/Users/josephalotta/Desktop/Picture2.pdf;

[Abba:~/oldperlcode] josephal%

Joe.



Re: Preview.app opening multiple files

2004-03-29 Thread Joseph Alotta
On Mar 29, 2004, at 7:10 PM, Paul McCann wrote:


On Mon, 29 Mar 2004, Chris Devers wrote:

Unfortunately, I get the same error you do when I try to run it:

$ ./osatest.sh
## Component Manager: attempting to find symbols in a component  
alias of type (regR/carP/x!bt)
This is some sort of issue with Toast; googling for the string gives
--eek, an answer that I posted on macosxhints in late 02--
--- 
---
If I remember rightly this is caused by a Toast titanium file that's  
put
in the quicktime folder... hmm, here we go...

Go into /Library/QuickTime and move 'Toast Video CD Support.qtx'
somewhere else (err, maybe the Trash!!).
--- 
---

syntax error: A unknown token can't go after this some object.  
(-2740)
$
In other words, syntax error:
The second bit of the error is because path to charts folder isn't
defined. Something like path to desktop works fine, but even then
the files open separately. Indeed, with Preview on 10.3.3 I can't
replicate the many to one behaviour that Joseph is seeking, even
from the Finder. Selecting several files then double clicking on
one produces multiple windows -- one for each file -- for me.
Am I being slow again, or is this maybe some panter/jaguar change?
Cheers,
Paul
Paul,

It's easy to replicate from the Finder.  You highlight the files and  
double click holding shift down.
Also, you can highlight, then control click getting the menu and then  
select open.

Joe.



Preview.app opening multiple files

2004-03-23 Thread Joseph Alotta
Greetings,

I have dozens of these one page pdf files.  If I select them all in 
finder and
double click, Preview opens them in one window as a multiple-page 
document.  This is
what I'd like to have happen.

If I do them in perl:

system open *.pdf;

Preview opens them as multiple windows.  How can I tell Preview to open 
them as
it does in finder?

I tried cat *.pdf  /tmp/big.pdf  but that doesn't work either.  It 
only sees the
first page.

Thank you,

Joe Alotta



Re: Perl compiler?

2004-03-20 Thread Joseph Alotta
I'm not a major hacker type, like you guys, but nobody mentioned the 
bytecode
strategy.  Maybe that will work in your case.

Joe.



Re: Mac::Glue Mail.app question reseting name field

2004-03-18 Thread Joseph Alotta
Chris,

Name is the senders name in english, ie, the part in parenthesis
in [EMAIL PROTECTED] (Joseph Alotta).
I found the answer to the problem, there is a reset function in the
Mail.app.  You need to control click on the address circle thing and
it is a menu item.
Thank you for your help.

Joe.

On Mar 17, 2004, at 1:18 PM, Chris Nandor wrote:

In article [EMAIL PROTECTED],
 [EMAIL PROTECTED] (Joseph Alotta) wrote:
I used Mac::Glue to send mail using the Mail.app.  Notice in my code
below, the commmented out lines that have to do with name.  Whatever I
assign name to makes no difference, it still keeps junk in the field
from my prior versions.  How can I reset the name field and have some
control over what goes in there?
What is the name?  It is not listed in the Mail.app dictionary for 
the
outgoing message class.  What is it supposed to do?

--
Chris Nandor  [EMAIL PROTECTED]http://pudge.net/
Open Source Development Network[EMAIL PROTECTED] http://osdn.com/



Mac::Glue Mail.app question reseting name field

2004-03-13 Thread Joseph Alotta
Greetings,

I used Mac::Glue to send mail using the Mail.app.  Notice in my code 
below, the commmented out lines that have to do with name.  Whatever I 
assign name to makes no difference, it still keeps junk in the field 
from my prior versions.  How can I reset the name field and have some 
control over what goes in there?

Thanks,

Joe.





[Abba:~/oldperlcode] josephal% ls | jjamail [EMAIL PROTECTED] 
-sHello [EMAIL PROTECTED]
[Abba:~/oldperlcode] josephal% cat jjamail
#!/usr/bin/perl
# Send mail using Mail.app from pipe
#

use warnings;
use strict;
use Mac::Glue ':all';
if ( [EMAIL PROTECTED]) { print usage: ls | $0 -t to: -s subject: -f from:\n; 
exit; }

use Getopt::Std;
our ($opt_t, $opt_f, $opt_s);
getopt('tfs');
# read from stdin to text message
my (@array);
while () { chomp; push (@array, $_); }
if ( [EMAIL PROTECTED]) { exit }
my $text = join (\n, @array);
my $mail = new Mac::Glue 'Mail';

my $message = $mail-make(new = 'outgoing message',
   with_properties = {
  subject = $opt_s,
  sender = $opt_f,
#  name = $0,
  content = $text,
   }
);
$mail-make(new = 'to recipient',
   at = location(end = $message-prop('to recipients')),
   with_properties = {
#  name= $0,
  address = $opt_t,
   }
);
$message-send;
[Abba:~/oldperlcode] josephal% 



Announcing New Product - Flame-Deleter v 6.012

2004-03-12 Thread Joseph Alotta
New! Cool! Wonderful!  A Must Have!!

Flame-Deleter is a powerful, perl-based syntactic and grammatical
analyzer, that determines if messages posted to your mailing
list are flame provoking or etiquette babble.  It automatically deletes
unwanted ramblings.
Effective!  Safe!  Low Calorie!

Special Offer, only with this ad,  $199.

Please look at our website http://www.flame-deleter.goose.ur





Re: ANNOUNCE: Affrus 1.0 - a Perl Debugger

2004-03-11 Thread Joseph Alotta
What is top-quoting?

Joe.

On Mar 11, 2004, at 1:21 PM, Morbus Iff wrote:

 * no top-quoting.



Re: CPAN -- why always so long?

2004-03-05 Thread Joseph Alotta
It goes through all the ftp sites you have listed and tries to find
on that will allow logins.
Does anyone know how to reset the list of ftp sites?  Which ones are
most available?
Joe.

On Mar 5, 2004, at 3:04 AM, John Delacour wrote:

I've been meaning to ask this question for months but never got round 
to it.

Why is it that when I try to use cpan for the first time after a 
little while it takes an age for it to contact the sites and get 
going?  I always have to go away and do something else and it might 
take 5 minutes for cpan to sart doing anything useful.

Here's a typical transcript of what happens before the long wait:

CPAN: Storable loaded ok
Going to read /Users/jd/.cpan/Metadata
  Database was generated on Wed, 03 Mar 2004 05:50:41 GMT
CPAN: LWP::UserAgent loaded ok
Fetching with LWP:
  ftp://ftp.perl.org/pub/CPAN/authors/01mailrc.txt.gz
LWP failed with code[400] message[FTP return code 000]
Fetching with Net::FTP:
  ftp://ftp.perl.org/pub/CPAN/authors/01mailrc.txt.gz
JD




Re: sending to Mail.app - pkg installer error

2004-03-04 Thread Joseph Alotta
Greetings,

One of the people on this list, Wilfredo Sánchez, recommended that I  
use the mailapp-utitities.  This seems exactly what I am looking for.

They are four small programs and they are put together in a package  
installer bundle.  Only thing is that the package installer won't  
install. Here is the error message, from Package Installer:  Missing or  
Old Bill of Materials.

I know that this is not the normal thing for this list, but I know that  
it seems like it would be easy to fix and that the person who is  
supposed to be maintaining it is not to be found.

Thank you,

Joe.

On Mar 2, 2004, at 12:17 AM, Wilfredo Sánchez wrote:

ftp://next-ftp.peak.org/next/apps/devtools/macosx/server/Applications/ 
Mail/CLI/mailapp-utilities/

-wsv

On Mar 1, 2004, at 8:06 PM, Joseph Alotta wrote:

Greetings,

I have some perl programs and I would like to send the output of them  
to the Mail.app so they look like regular email messages. I couldn't  
get any of the unix mail stuff to work, probably because I do not  
have sendmail running for security concerns reasons.  (I dial up a  
few times a day).

I figured out where Mail.app was storing it's text and I was able to  
append stuff on the end of the file and that worked only half and  
half.  Apparently, the indexed get messed up and Mail.app crashes now  
and then. Then I created a new mailbox and append email to that, and  
that solves the crashing part, but the messages aren't flagged as  
new, and I sometimes miss them.

I can think of two different ways to handle this, 1) using Mac::Glue  
to cause Mail.app to send a message out to myself, or 2) append to  
the end of the inbox file and then use Mac:Glue to update the
indexes.

Does anyone have any ideas on this?


Joe Alotta



Re: sending to Mail.app - pkg installer error

2004-03-04 Thread Joseph Alotta
On Mar 4, 2004, at 11:46 AM, Sherm Pendley wrote:

On Mar 4, 2004, at 12:10 PM, Joseph Alotta wrote:

They are four small programs and they are put together in a package 
installer bundle.  Only thing is that the package installer won't 
install. Here is the error message, from Package Installer:  Missing 
or Old Bill of Materials.
Have you tried looking in the package with Pacifist?

sherm--

Sherm,

I was able to look in the package a little using cds and cats.  I am 
not familiar with Pacifist.
Just so you know, I am not a major hacker, most of my understanding is 
application-oriented, not
system-oriented.

Joe.



sending to Mail.app

2004-03-01 Thread Joseph Alotta
Greetings,

I have some perl programs and I would like to send the output of them 
to the Mail.app so they look like regular email messages. I couldn't 
get any of the unix mail stuff to work, probably because I do not have 
sendmail running for security concerns reasons.  (I dial up a few times 
a day).

I figured out where Mail.app was storing it's text and I was able to 
append stuff on the end of the file and that worked only half and half. 
 Apparently, the indexed get messed up and Mail.app crashes now and 
then. Then I created a new mailbox and append email to that, and that 
solves the crashing part, but the messages aren't flagged as new, and I 
sometimes miss them.

I can think of two different ways to handle this, 1) using Mac::Glue to 
cause Mail.app to send a message out to myself, or 2) append to the end 
of the inbox file and then use Mac:Glue to update the
indexes.

Does anyone have any ideas on this?

Joe Alotta



Re: Long shot but worth a try...

2004-02-26 Thread Joseph Alotta
From the sudo manpage:

   -S  The -S (stdin) option causes sudo to read the password from 
stan-
   dard input instead of the terminal device.

Joe Alotta

On Feb 26, 2004, at 9:48 PM, Riccardo Perotti wrote:

On 2/26/04 11:24 AM, Sherm Pendley [EMAIL PROTECTED] wrote:

On Feb 26, 2004, at 11:14 AM, Riccardo Perotti wrote:

Can somebody point me in the right direction and / or contribute an
idea for
this?
Have a look at the man page for the 'killall' command. In short, it
signals processes by name, so you don't need to know the PID. You can
use system() to run it from Perl, like this:
#!/usr/bin/perl

use warnings;
use strict;
system 'killall -KILL pppd';

sherm--


Thanks Sherm! That definitely looks like a step in the right 
direction.

Now the only problem is that 'pppd' a process owned by root. Should my
script be run as 'root'? That sounds kind of dangerous! ... can it / 
should
it be done? When at the Terminal I have to 'sudo kill' and the get 
asked my
password. How would I do a 2 step process from 1 perl script?

Thanks again!

Riccardo



--
mailto:[EMAIL PROTECTED]
http://www.riccardoperotti.com




getting in between dates in a hash

2004-02-16 Thread Joseph Alotta
Greetings,

I am having some conceptual problems doing what I think is a fairly 
simple
perl task.  It is probably that my mind is just blank on this.  Could 
someone
please recommend a strategy for this.

I have a hash of data:

%highest_level = ( 2001-10-14 =  152, 2002-01-15 = 163, 2003-03-13 = 
210, 2004-08-07 = 307 );

And I am give some dates in between:

@dates = ( 2001-12-30, 2002-03-19);

I need to find what the highest level was on that date, matching between
known dates.  This is the answer:
%level = ( 2001-12-30 = 152, 2002-03-19 = 210);

Am I missing something or is this harder than it first appears?

Thank you,

Joe Alotta



Re: getting in between dates in a hash

2004-02-16 Thread Joseph Alotta
[Abba:~/oldperlcode] josephal% perl  /tmp/test
2002-01-15: 163
[Abba:~/oldperlcode] josephal%
John,

Thank you for looking at this.  I will play around with
this some more.  I don't understand why you use the
array index [0] and [1] in this code.  But anyway, it
doesn't work:
[Abba:~/oldperlcode] josephal% perl  /tmp/test
2002-01-15: 163
[Abba:~/oldperlcode] josephal%
It returns the value for 2002-01-05 and not for 2001-12-30.
Also the right value for 2001-12-30 is 152.
Thank you,

Joe Alotta



On Feb 16, 2004, at 3:33 PM, John Delacour wrote:

At 2:01 pm -0600 16/2/04, Joseph Alotta wrote:

Am I missing something or is this harder than it first appears?
I think you need either to quote the date string as below or use a 
number for the date, such as 20011014.  If you use a number then 
you'll need to repalce ge, le with =, = respectively.  Then I guess 
something like this is what you're after:

my %highest_level = (
 '2001-10-14' = 152,
 '2002-01-15' = 163,
 '2003-03-13' = 210,
 '2004-08-07' = 307
);
my @dates = ( '2001-12-30', '2002-03-19');
for $date (sort keys %highest_level) {
  if ($date ge $dates[0] and $date le $dates[1]) {
print $date: $highest_level{$date}$/;
  }
}



small consulting job

2004-02-03 Thread Joseph Alotta
Greetings,

I am looking for someone to write a subroutine for me
involving graphics and pdf files.
The sub would take some data and plot a line graph
and output the graph as a pdf file.
If you are interested in doing this, please email
me back and I will send you more detailed specs
and we can agree on a cost.
Joe Alotta



Re: DBD mysql unable to install since Panther

2004-02-02 Thread Joseph Alotta
Greetings,

Thanks everyone.  I couldn't find the XCode update 1.1 on Apple's 
website.

Do you think I need to have this installed first, before I try to 
install
the DBD mysql?

Joe.

On Jan 30, 2004, at 1:18 AM, Joel Rees wrote:

Thanks everyone.  The developer tools I installed is the
developer tools from Jaguar.  I don't have the Panther
developer tools.  But I will get it.
Is there an easy place to buy the tools from?  Apple
seems to want to sign me up as a developer, etc.
If you don't mind the agreement they make you sign, it's definitely 
worth signing up. You pretty much have to sign that thing anyway, 
whether you download the developer tools or install from the system.

If you own Panther, you should have them already.
It's an optional install. Run your installer and customize the 
install.
You'll have to go to the applications folder and dig into a folder 
called something like installers.

Then go to Apple's site and get the XCode update 1.1. Maybe it's also 
accessible via Software Update.
It is.




Re: DBD mysql unable to install since Panther

2004-02-02 Thread Joseph Alotta
Thanks sherm, But I do not have a login.  I will
try it anyway without the 1.1 update.
Joe.

On Feb 2, 2004, at 10:50 AM, Sherm Pendley wrote:

On Feb 2, 2004, at 11:32 AM, Joseph Alotta wrote:

Thanks everyone.  I couldn't find the XCode update 1.1 on Apple's 
website.
Go to the Apple Developer's Connection site at 
http://connect.apple.com. Log in, and use the nav bar on the left to 
go to Download Software/Developer Tools.

Do you think I need to have this installed first, before I try to 
install
the DBD mysql?
You need to have some version of Xcode installed. The 1.1 update to 
the GUI tools was fairly extensive, but I *think* that GCC and make 
were left pretty much alone.

sherm--




Re: DBD mysql unable to install since Panther

2004-01-29 Thread Joseph Alotta
Greetings,

I installed Panther, Developer Tools,
Mysql and now I am trying to use CPAN
to install DBD.
Can you look at this and please tell me what to do next.

Thank you.

Joe Alotta



Abba:/Users/josephalotta root# PATH=$PATH:/Library/MySQL/bin perl 
-MCPAN -eshell
Terminal does not support AddHistory.

cpan shell -- CPAN exploration and modules installation (v1.76)
ReadLine support available (try 'install Bundle::CPAN')
cpan install Bundle::DBD::mysql
CPAN: Storable loaded ok
Going to read /var/root/.cpan/Metadata
  Database was generated on Wed, 28 Jan 2004 21:50:41 GMT
Running install for module DBI
Running make for T/TI/TIMB/DBI-1.40.tar.gz
CPAN: Digest::MD5 loaded ok
Checksum for 
/var/root/.cpan/sources/authors/id/T/TI/TIMB/DBI-1.40.tar.gz ok
Scanning cache /var/root/.cpan/build for sizes
DBI-1.40/
DBI-1.40/Driver_xst.h
DBI-1.40/t/
DBI-1.40/t/40profile.t
DBI-1.40/t/06attrs.t
DBI-1.40/t/08keeperr.t
DBI-1.40/t/42prof_data.t
DBI-1.40/t/01basics.t
DBI-1.40/t/60preparse.t
DBI-1.40/t/41prof_dump.t
DBI-1.40/t/04mods.t
DBI-1.40/t/05thrclone.t
DBI-1.40/t/02dbidrv.t
DBI-1.40/t/80proxy.t
DBI-1.40/t/07kids.t
DBI-1.40/t/20meta.t
DBI-1.40/t/10examp.t
DBI-1.40/t/30subclass.t
DBI-1.40/t/15array.t
DBI-1.40/t/03handle.t
DBI-1.40/DBI.xs
DBI-1.40/lib/
DBI-1.40/lib/DBD/
DBI-1.40/lib/DBD/NullP.pm
DBI-1.40/lib/DBD/Sponge.pm
DBI-1.40/lib/DBD/ExampleP.pm
DBI-1.40/lib/DBD/Proxy.pm
DBI-1.40/lib/DBI/
DBI-1.40/lib/DBI/Const/
DBI-1.40/lib/DBI/Const/GetInfo/
DBI-1.40/lib/DBI/Const/GetInfo/ANSI.pm
DBI-1.40/lib/DBI/Const/GetInfo/ODBC.pm
DBI-1.40/lib/DBI/Const/GetInfoType.pm
DBI-1.40/lib/DBI/Const/GetInfoReturn.pm
DBI-1.40/lib/DBI/FAQ.pm
DBI-1.40/lib/DBI/W32ODBC.pm
DBI-1.40/lib/DBI/DBD.pm
DBI-1.40/lib/DBI/ProfileData.pm
DBI-1.40/lib/DBI/ProfileDumper/
DBI-1.40/lib/DBI/ProfileDumper/Apache.pm
DBI-1.40/lib/DBI/ProfileDumper.pm
DBI-1.40/lib/DBI/DBD/
DBI-1.40/lib/DBI/DBD/Metadata.pm
DBI-1.40/lib/DBI/PurePerl.pm
DBI-1.40/lib/DBI/Profile.pm
DBI-1.40/lib/DBI/ProxyServer.pm
DBI-1.40/lib/Bundle/
DBI-1.40/lib/Bundle/DBI.pm
DBI-1.40/lib/Win32/
DBI-1.40/lib/Win32/DBIODBC.pm
DBI-1.40/MANIFEST
DBI-1.40/dbipport.h
DBI-1.40/Changes
DBI-1.40/dbi_sql.h
DBI-1.40/Perl.xs
DBI-1.40/Driver.xst
DBI-1.40/README
DBI-1.40/DBIXS.h
DBI-1.40/test.pl
DBI-1.40/dbd_xsh.h
DBI-1.40/META.yml
DBI-1.40/Makefile.PL
DBI-1.40/DBI.pm
DBI-1.40/dbiprof.PL
DBI-1.40/typemap
DBI-1.40/dbiproxy.PL
DBI-1.40/ToDo
Removing previously used /var/root/.cpan/build/DBI-1.40

  CPAN.pm: Going to build T/TI/TIMB/DBI-1.40.tar.gz

*** You are using a perl configured with threading enabled.
*** You should be aware that using multiple threads is
*** not recommended for production environments.
*** Note:
The optional PlRPC-modules (RPC::PlServer etc) are not installed.
If you want to use the DBD::Proxy driver and DBI::ProxyServer
modules, then you'll need to install the RPC::PlServer, 
RPC::PlClient,
Storable and Net::Daemon modules. The CPAN Bundle::DBI may help you.
You can install them any time after installing the DBI.
You do *not* need these modules for typical DBI usage.

Optional modules are available from any CPAN mirror, in particular
http://search.cpan.org/
http://www.perl.com/CPAN/modules/by-module
http://www.perl.org/CPAN/modules/by-module
ftp://ftp.funet.fi/pub/languages/perl/CPAN/modules/by-module
Creating extra DBI::PurePerl test: t/zz_01basics_pp.t
Creating extra DBI::PurePerl test: t/zz_02dbidrv_pp.t
Creating extra DBI::PurePerl test: t/zz_03handle_pp.t
Creating extra DBI::PurePerl test: t/zz_04mods_pp.t
Creating extra DBI::PurePerl test: t/zz_05thrclone_pp.t (use threads)
Creating extra DBI::PurePerl test: t/zz_06attrs_pp.t
Creating extra DBI::PurePerl test: t/zz_07kids_pp.t
Creating extra DBI::PurePerl test: t/zz_08keeperr_pp.t
Creating extra DBI::PurePerl test: t/zz_10examp_pp.t
Creating extra DBI::PurePerl test: t/zz_15array_pp.t
Creating extra DBI::PurePerl test: t/zz_20meta_pp.t
Creating extra DBI::PurePerl test: t/zz_30subclass_pp.t
Creating extra DBI::PurePerl test: t/zz_40profile_pp.t
Creating extra DBI::PurePerl test: t/zz_41prof_dump_pp.t
Creating extra DBI::PurePerl test: t/zz_42prof_data_pp.t
Creating extra DBI::PurePerl test: t/zz_60preparse_pp.t
Creating extra DBI::PurePerl test: t/zz_80proxy_pp.t
Checking if your kit is complete...
Looks good
Error: Unable to locate installed Perl libraries or Perl source code.

It is recommended that you install perl in a standard location before
building extensions. Some precompiled versions of perl do not contain
these header files, so you cannot build extensions. In such a case,
please build and install your perl from a fresh perl distribution. It
usually solves this kind of problem.
(You get this message, because MakeMaker could not find 
/System/Library/Perl/5.8.1/darwin-thread-multi-2level/CORE/perl.h)
Running make test
  Make had some problems, maybe interrupted? Won't test
Running make install
  Make had some problems, maybe interrupted? Won't install
Running install for module 

Re: DBD mysql unable to install since Panther

2004-01-29 Thread Joseph Alotta
Thanks everyone.  The developer tools I installed is the
developer tools from Jaguar.  I don't have the Panther
developer tools.  But I will get it.
Is there an easy place to buy the tools from?  Apple
seems to want to sign me up as a developer, etc.
Thanks for you help,

Joe.



On Jan 29, 2004, at 7:20 PM, Sherm Pendley wrote:

On Jan 29, 2004, at 3:06 PM, Joseph Alotta wrote:

I installed Panther, Developer Tools,

(You get this message, because MakeMaker could not find 
/System/Library/Perl/5.8.1/darwin-thread-multi-2level/CORE/perl.h)
This message often means that the developer tools haven't been 
installed.

Did you upgrade to Panther from an older Mac OS X? If so, did you also 
upgrade your developer tools? If not, you need to.

Are you certain you installed the correct developer tools package? 
Panther needs Xcode, not Project Builder.

sherm--




DBD mysql unable to install since Panther

2004-01-23 Thread Joseph Alotta
Greetings,

Since we upgraded to Panther, we have been unable to install the BDB
module and the mysql module or even the Date::Simple module.
My buddy Dennis, is an serious hacker, and he was here till the wee 
hours of
the morning trying to make it work and was unable.  He even tried to 
compile a
new perl from sources and was unable. He determined that the problem 
was with
something Apple hacked and only they can fix it.

My questions are:  Are any of you running Panther with these modules? 
and if not,
how can I put pressure on Apple to fix what only they can fix?

Thank you,
Joe.