Re: CamelBones: Will hack for food!

2007-05-09 Thread Daniel T. Staal

On Wed, May 9, 2007 3:50 pm, Sherm Pendley said:

 So, the next version - 1.2 release, preceded by 1.1.x betas - will
 also be licensed under the same terms: GPL or Artistic, your choice.
 I wouldn't have had a problem with a commercial program using CB
 anyway, even before the license change - the LGPL only requires that
 the framework can be easily replaced with a custom version, and the
 structure of an .app bundle makes that a trivial task.

 Also, I've been looking at PyGame, and watching how much enthusiasm
 it helps generate around Python. Games could definitely be a killer
 app area here.

If you are looking for an app that would get widely used, I've got an idea
that's been on the top of my 'when I have time to program' list for the
past ~2 years...

Macs desperately _need_ a an app to manage third-party software updates. 
Something that you could run periodically to keep software up to date,
avoiding having every seprate program connect to the internet on startup
and check for itself.  (Invariably the wrong time to do an update...)

My basic thought is to create a folder in the 'Application Support'
directory where apps can drop an XML file with their current version, a
link to where update files can be found, and their public key of some
sort.  The update file would just be another XML file with the current
version, and some information on paid/nonpaid, license changes, what's
updated, etc.  Both the update file and the program update itself would be
signed by the company, and the updater app doesn't accept any update that
doesn't have a valid signature.

The program should either be runnable manually or on schedule(s), where it
checks to see if the programs registered with it (by them dropping the
file in the 'Application Support' subfolder) need updating.  Then it can
download, install, or just notify the user.

Using CPAN, this should be a fairly quick project, I think.  But it would
take me a few days just get back up to speed enough on Cocoa to start it,
and I have _no_ spare time.  (I literally don't even have a single
vacation day this year.)  I've got the design in my head, but it could be
ages before I get a chance to write it.  I'd love to pay someone to do it,
but...  Well, I just donated all my spare change to Sherm already.  ;)  I
_do_ have time to discuss though, if people want info.  (I can do that at
work, where I have little to do.  But I can't program outside projects
there.)

Anyway, if people are looking for a 'killer app', I think this could
generate a lot of interest if done well.  And, as long as the end result
is free and open-source (for this, I care that people can use it) I don't
care who programs it.  If no one else is interested, I'll probably do it
eventually, but it'll be years before I have a chance...

Daniel T. Staal

---
This email copyright the author.  Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes.  This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---



Re: Getting all file paths

2007-03-23 Thread Daniel T. Staal

On Fri, March 23, 2007 7:52 am, [EMAIL PROTECTED] said:
 Hi,

 I'm still new to Perl and was just curious if the code below is ok to
 use. Also, can someone direct me to more information about file::find?
 I'd like to know if -d means directory (I assume it does) as well as -f
 and other options that may apply.  Basically, I want to loop thru all
 files in a folder (including nested folders too) and then create a hash
 whose key is the file name and value is the full path to the file.  I
 don't want to grab any paths to just directories or invisible files.
 Thanks.

This type of question should really be directed to the perl-newbies list,
but I'll say what I can.

Documentation on File::Find can be found online at:
http://search.cpan.org/~nwclark/perl-5.8.8/lib/File/Find.pm

It should also be in your local man pages.

Other comments:

 #!/usr/bin/perl -w

I normally see 'use warnings;' listed instead of the -w switch, but that's
mostly preference.

I would suggest you also put in 'use strict;'.

 use File::Find;

 %files = ();

You mean 'my %files'.  You also don't need the '=()', but it doesn't hurt
either.

 find(sub { if (!/^\./  !-d) { $files{$_} = $File::Find::name } },
 /Volumes/Server/Folder/Path/);

 print $files{sku123};  # example of getting item out of hash

I'm leaving these alone for the moment.

Daniel T. Staal

---
This email copyright the author.  Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes.  This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---



Re: Module Aspell::Text does not install

2006-12-12 Thread Daniel T. Staal

On Tue, December 12, 2006 4:46 pm, Marek Stepanek said:

 And here comes my fundamental question: what is the difference between
 Universal Binary world, the fink installation under the tree of sw/ and
  my /usr/local/ ... Please I don't want you to explain the basics of
 Macintosh plate form, but perhaps a link I would appreciate very much ...

There is no fundimental difference between sw/ and /usr/local.  They are
both unix tool directories.  /usr/local is a common location in many
unix-style OS's to put programs of this sort.  sw/ is specifically choosen
as _not_ a common location, so that it doesn't interfere with anything you
might have put in the common locations.  (Or that Apple might put there.)

 Is it possible to install all my stuff from sw/ into /usr/local/ to avoid
  confusion of my Perl Mudules, or at least the Aspell? By the way my Perl
  is (and I post it here, also if it is long, because you may see here the
  error resulting of a possible confusion in the different
 Perl-Installations):

Yes, it is.  Aspell, I believe, should compile cleanly on its own and will
install itself in a standard location.

See my point above for why Fink et. all have not done it already: They
don't want to interfere with 'official' software that might be put there. 
(Especially if the official version is modified in some way, which it is
in some cases.)

Daniel T. Staal

---
This email copyright the author.  Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes.  This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---



Re: Perl Module Installation

2006-08-24 Thread Daniel T. Staal
On Thu, August 24, 2006 12:00 pm, Moisés Chicharro said:
 Thanks to everyone for their suggestions.

 I ran the 'perl -MCPAN -e shell' and it told me to update the module
which I did. So I now have v1.7601.

 However, when trying to run 'install DBI', it piled a whole load of
stuff into the terminal window which ended with this below ( the NOT OK
bit is worrying me )...

 ---
 test.pl done
/usr/bin/make test -- OK
 Running make install
 Manifying blib/man1/dbiproxy.1
 Warning: You do not have permissions to install into /usr/local/man/
man1 at /System/Library/Perl/5.8.6/ExtUtils/Install.pm line 114. mkdir
/usr/local/man/man3: Permission denied at /System/Library/Perl/
5.8.6/ExtUtils/Install.pm line 112
 make: *** [pure_site_install] Error 255
/usr/bin/make install  -- NOT OK
 

 Does that make sense to any of you guys?

Easy sense: The important line is this: 'Warning: You do not have
permissions to install into'  It means exactly what it says: you don't
have the permissions to do that, as the user you are logged in as. 
Basically only root has write permissions to those directories.

The easy thing to do is invoke cpan as root, using sudo, but there is a
better way: Have cpan invoke 'sudo' for the install itself.  This is a
fairly recent option in cpan though, so you may need to use the 'run cpan
as root' first to get that version isntalled.

Anyway, if you have the version that supports it, just enter the line
o conf make_install_make_command 'sudo make'
in the cpan shell.  It will then run 'sudo make' for the final step, and
ask you for the password to allow the install at that point.  This means
it can remind you, and that you will never run a module that _fails_ its
tests as root.  (And all the messy stuff with installing, unpacking, and
the rest are done as you, not root.)

At the moment it didn't do the install, but only because it did not have
the permissions to finish.  There were no problems with the module, from
what you've said.

Daniel T. Staal

---
This email copyright the author.  Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes.  This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---



Re: Perl Module Installation in $HOME

2006-08-24 Thread Daniel T. Staal
On Thu, August 24, 2006 2:39 pm, John Delacour said:

 I have never run the CPAN shell as root and I don't see what problems
 you're referring to.  I just do 'sudo cpan' and everything is
 installed where it should go.

 Eremita:~ jd$ sudo cpan

That's running it as root, via sudo.

I don't think it is actually all that big a deal, on your own machine, but
do be aware you are doing it.

Daniel T. Staal

---
This email copyright the author.  Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes.  This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---



Re: Perl Module Installation

2006-08-23 Thread Daniel T. Staal
On Wed, August 23, 2006 12:27 pm, Moisés Chicharro said:
 Hi All,

 Can anyone point me to a decent tutorial for installing perl modules.

 The one I have downloaded is DBI-1.52.tar.gz

 I am running OS X 10.4.7 and have never installed a perl module
 before. I have found various pages on the net but I don't want to
 mess things up so would like to make sure that the tutorial I am
 reading has been recommended by some experts! :)

 I am also assuming that the right directory for my install is
 System/Library/Perl/5.8.6/

 Thankyou in advance,
 Mo

In general the best way to install Perl modules is to use CPAN.

Use Terminal and run 'perl -MCPAN -e shell' (or just 'cpan') and answer
the questions it asks.  If you don't know the answer, use the default. 
Then, while in the CPAN shell, type 'install DBI'.  It will get the latest
version, unpack it, test it, and install it for you.

You will of course need the devloper tools to do this, in case you haven't
installed them already.

Daniel T. Staal

---
This email copyright the author.  Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes.  This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---



Re: Has anyone built DBD::ODBC?

2006-07-14 Thread Daniel T. Staal
On Fri, July 14, 2006 2:36 pm, David H. Adler said:
 On Fri, Jul 14, 2006 at 01:30:48PM -0400, Sherm Pendley wrote:
 Anyone have a recipe for building DBD::ODBC?

 1. Sacrifice a goat...

 (Oh, come on, *someone* was going to say it... :-)

I find for my sacrificing needs squirrels are almost as effective, and
*much* easier to come by.

Daniel T. Staal

---
This email copyright the author.  Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes.  This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---



Re: problems with intel architecture

2006-04-04 Thread Daniel T. Staal
On Tue, April 4, 2006 11:44 am, Cheryl Chase said:

 Are there OS functions that rely on perl? What sorts of things?


Just to answer: yes, there are OS functions that rely on perl.  If I was
on my Mac I could probably pull up quite a few.  One I'm fairly sure that
uses perl is installers.  (Not always, but often.)

XCode makes it relatively simple to embed basic scripts (perl, shell, or
otherwise) into a project.  It wouldn't surprise me to find Perl is all
kinds of odd applications, for some quick thing.

Daniel T. Staal

---
This email copyright the author.  Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes.  This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---



Re: Formatting uploaded images

2006-02-15 Thread Daniel T. Staal
On Wed, February 15, 2006 9:52 am, Moisés Chicharro said:
 Hi,
 Thankyou for your response - much appreciated.

 Problem is the ISP is not too receptive about adding new modules to
 their perl install ImageMagick doesn't seem to be on there. Before I
 start the arduous process of convincing them to install a module, is
 there anyway of doing it without a module?

 My main aims being:

 - check uploaded image filesize is not too large (most important)
 - check uploaded image physical pixel size
 - change uploaded image physical pixel size (if possible without module)


Not easily.  (You'd have to read the file yourself, then do the rescale,
then write it back out in correct format.  All doable, but there's no
helper functions for any of it.)

There are about a dozen different modules that'll do this for you.  Check
to see if the ISP has any of them installed.  If not, beg them to install
ImageMagick: it's a very common tool for websites.

Daniel T. Staal

---
This email copyright the author.  Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes.  This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---



Re: Send authenticated mail with MIME::Lite

2005-11-10 Thread Daniel T. Staal
On Thu, November 10, 2005 11:43 am, Mark Wheeler said:
 Hi Brian,

 Yes, I did that, but mail is still not going through.

 Does anyone know what happens to the mail when it is doesn't go
 through?

In theory it should keep trying until the timeout period expires, which is
normally set for around 3 days on SMTP servers.  After that, an error
should be bounced back saying it didn't go through.  Some servers will
send a message earlier (commonly at the end of 12/24 hours), confirming
that they are still trying.

That assumes everyone is playing nice.  If someone is blocking selected
SMTP connections, they are already not playing nice.  They could fake an
acceptance and just drop the message, or do something else...

And, this assumes you've actually got it to the SMTP transport on your
end.  ;)

Daniel T. Staal

---
This email copyright the author.  Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes.  This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---



Re: Can't Run CPAN

2005-08-31 Thread Daniel T. Staal
On Wed, August 31, 2005 7:31 am, Lola Lee said:
 Lola Lee wrote:

 For some reason, when I try to do sudo cpan, it won't start up, and
 generates this following message:

 Well . . . I figured it out - removed .lock and all is back to normal.
 I'd like to know why this happened, though.

Sounds like CPAN was (previously) started and not closed correctly.  The
.lock file was so that you don't accidentally run two copies at the same
time.  The message gives enough information for you to check if CPAN is
currently running.

So, the expected thing for you to do is to check if CPAN is running, and
if it isn't, remove the .lock file and run CPAN.  Which you did.  ;)

Daniel T. Staal

---
This email copyright the author.  Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes.  This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---



Re: Sendkeys

2005-08-30 Thread Daniel T. Staal
On Tue, August 30, 2005 12:45 am, Vince said:

 a) I've pretty much never worked on a Mac and don't possess one. In order
  to develop programs I use a PC. I was wondering if Macperl could be
 simulated on a PC?

I'm leaving the rest of the answers; I can check if Acrobat is scriptable
when I get home though.

I just wanted to say this: If what you were talking about were a normal
Perl script, that is: it stayed within what perl does on its own, then
sure.  A Perl environment is a Perl environment, basically.  If you really
wanted to be sure you could put a free Unix on the PC (Darwin, if you
wanted to be absolutely sure...), and test on that.

However, you are mostly talking about programming the Mac, Perl is just
the language you have chosen (and it may not even be the right one for the
job!), so you really would need to test it on a Mac.

Daniel T. Staal

---
This email copyright the author.  Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes.  This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---



Re: Crypt::IDEA problems

2005-06-15 Thread Daniel T. Staal

John Mercer said:
 Is the problem with endian.h? What is endian.h? I googled it, and
 found that it was part of GLT, but I don't see how that could be
 related to an encryption mod.

Well, I can answer this part of the question...

endian.h looks to be a fairly general file, that GLT just happens to
include.  It defines some macros for dealing with endian issues.  Now the
question is what are endian issues.  ;)

Endian issues (and endian in general) are computer terms dealing with how
numbers are stored/worked with on a computer.  Just about every computer
knows what a 'byte' is, but then you have numbers which are two, or four,
or___ bytes long.  The question is: What order are the bytes in?  There
are two possbile (Well, with longer numbers there are more, but only two
good ones.), and good reasons for each.  So, of course, people do it both
ways.

Normally you don't have to think about this that much, but when you have
complicated, optimized, number crunching you often want to remove the
levels of abstraction that mean most programmers don't have to think about
this.  Graphics processing and encryption are prime candidates for such,
so them both using the same routines to handle it isn't suprising.

Short version: It's a number-handling header, that they both happen to
use.  You'll need to find something that has or will install a copy for
you, most likely.

Daniel T. Staal


This email copyright the author.  Unless otherwise noted, you are
expressly allowed to retransmit, quote, or otherwise use the contents
for non-commercial purposes.  This copyright will expire 5 years after
the author's death, or in 30 years, whichever is longer, unless such a
period is in excess of local copyright law.



Re: CamelBones on Intel? Maybe not.

2005-06-07 Thread Daniel T. Staal

So, how can we help?

I do doubt that long-term Camelbones can support you if it hasn't already,
but specific one-time causes can often get quite a bit in the way of
donations.  If you need an Intel Mac to continue builds, post a goal and a
link to donate.  I bet you'll make your goal.

Daniel T. Staal


This email copyright the author.  Unless otherwise noted, you are
expressly allowed to retransmit, quote, or otherwise use the contents
for non-commercial purposes.  This copyright will expire 5 years after
the author's death, or in 30 years, whichever is longer, unless such a
period is in excess of local copyright law.



Re: CamelBones on Intel? Maybe not.

2005-06-07 Thread Daniel T. Staal

Ian Ragsdale said:
 Is there any reason you would NEED to compile it fat?  Does anybody
 expect that the same partition will boot on both x386 and PowerPC macs?

For that matter, look into if you need to compile it on a Mac...  If you
can get enough of the toolset to run under Darwin, you could grab any old
PC box if you needed too.

Daniel T. Staal


This email copyright the author.  Unless otherwise noted, you are
expressly allowed to retransmit, quote, or otherwise use the contents
for non-commercial purposes.  This copyright will expire 5 years after
the author's death, or in 30 years, whichever is longer, unless such a
period is in excess of local copyright law.