Why is 27 special?

2002-10-10 Thread _brian_d_foy

i'm back to fooling around with Mac::iTunes again.  i took a week off after
the Mac OS X Conference because i had been thinking about it too much. [
side note:  never trust an audience.  i let them access (through Apache::iTunes)
my iTunes (on the G3 projecting the fancy powerpoint on the screen and hooked
up to the house sound).  i asked them to take turns, but alas.  ]

tonight i want to get a Perl version of iTunes Publisher off my to-do list,
so i start mucking with the parsing bits again.  some of the MP3s now live 
on another partition, and that partition name is a different length than
the old one.

this means that the 20 fixed bytes between the volume name and the date,
which are \000 in every case i looked at, is really 27 - (length of volume
name).  i can name partitions with names up to 27 characters, but if i go past
that it look like it initially works but then gives a warning.  what's the deal?
what is magic about 27?  why not 31?  i assume that these are C strings somewhere
so the null bytes makes them a nice, even number.

i took me quite a while to actually find this problem.  Perl is not the best language
for bytewise manipulation of binary data.  all of that auto-stringy stuff gets in
the way.  however, C doesn't have hashes out of the box.  i'm stuck somewhere in
the middle of two equally annoying solutions.  :)



What up with the mac

2002-10-10 Thread Brigham Mecham

Hello

Perhaps someone can fill me in on this one.  I am comparing the run time 
of a perl program I wrote.  Using my Mac G4 which has a 1.5 ghz 
processor and a 1.3 ghz PC computer (processor chip type I don't know 
but could find out) I am seeing that the Mac takes 14 seconds to 
complete what the PC does in 6!  What's up with that?




Re: Installation of LWP fails

2002-10-10 Thread Adam Fishman

I tried to install this on my Mac OS 10.1.3 and got this output.  Any
ideas?


cpan> install LWP
Running make for G/GA/GAAS/libwww-perl-5.65.tar.gz

  Please, install Net::FTP as soon as possible. CPAN.pm installs it for
you
  if you just type
  install Bundle::libnet


Trying with "/usr/local/bin/lynx -source" to get

ftp://ftp.perl.org/pub/CPAN/authors/id/G/GA/GAAS/libwww-perl-5.65.tar.gz

  CPAN: MD5 security checks disabled because MD5 not installed.
  Please consider installing the MD5 module.

libwww-perl-5.65
libwww-perl-5.65/lib
libwww-perl-5.65/lib/HTTP
libwww-perl-5.65/lib/HTTP/Cookies.pm
libwww-perl-5.65/lib/HTTP/Status.pm
libwww-perl-5.65/lib/HTTP/Request
libwww-perl-5.65/lib/HTTP/Request/Common.pm
libwww-perl-5.65/lib/HTTP/Headers
libwww-perl-5.65/lib/HTTP/Headers/Auth.pm
libwww-perl-5.65/lib/HTTP/Headers/ETag.pm
libwww-perl-5.65/lib/HTTP/Headers/Util.pm
libwww-perl-5.65/lib/HTTP/Request.pm
libwww-perl-5.65/lib/HTTP/Response.pm
libwww-perl-5.65/lib/HTTP/Date.pm
libwww-perl-5.65/lib/HTTP/Daemon.pm
libwww-perl-5.65/lib/HTTP/Message.pm
libwww-perl-5.65/lib/HTTP/Negotiate.pm
libwww-perl-5.65/lib/HTTP/Headers.pm
libwww-perl-5.65/lib/LWP
libwww-perl-5.65/lib/LWP/Protocol
libwww-perl-5.65/lib/LWP/Protocol/nntp.pm
libwww-perl-5.65/lib/LWP/Protocol/ftp.pm
libwww-perl-5.65/lib/LWP/Protocol/mailto.pm
libwww-perl-5.65/lib/LWP/Protocol/GHTTP.pm
libwww-perl-5.65/lib/LWP/Protocol/nogo.pm
libwww-perl-5.65/lib/LWP/Protocol/file.pm
libwww-perl-5.65/lib/LWP/Protocol/data.pm
libwww-perl-5.65/lib/LWP/Protocol/https10.pm
libwww-perl-5.65/lib/LWP/Protocol/http10.pm
libwww-perl-5.65/lib/LWP/Protocol/https.pm
libwww-perl-5.65/lib/LWP/Protocol/gopher.pm
libwww-perl-5.65/lib/LWP/Protocol/http.pm
libwww-perl-5.65/lib/LWP/RobotUA.pm
libwww-perl-5.65/lib/LWP/MemberMixin.pm
libwww-perl-5.65/lib/LWP/media.types
libwww-perl-5.65/lib/LWP/Debug.pm
libwww-perl-5.65/lib/LWP/UserAgent.pm
libwww-perl-5.65/lib/LWP/MediaTypes.pm
libwww-perl-5.65/lib/LWP/Protocol.pm
libwww-perl-5.65/lib/LWP/ConnCache.pm
libwww-perl-5.65/lib/LWP/Authen
libwww-perl-5.65/lib/LWP/Authen/Digest.pm
libwww-perl-5.65/lib/LWP/Authen/Basic.pm
libwww-perl-5.65/lib/LWP/Simple.pm
libwww-perl-5.65/lib/WWW
libwww-perl-5.65/lib/WWW/RobotRules
libwww-perl-5.65/lib/WWW/RobotRules/AnyDBM_File.pm
libwww-perl-5.65/lib/WWW/RobotRules.pm
libwww-perl-5.65/lib/File
libwww-perl-5.65/lib/File/Listing.pm
libwww-perl-5.65/lib/Net
libwww-perl-5.65/lib/Net/HTTP
libwww-perl-5.65/lib/Net/HTTP/Methods.pm
libwww-perl-5.65/lib/Net/HTTP/NB.pm
libwww-perl-5.65/lib/Net/HTTP.pm
libwww-perl-5.65/lib/Net/HTTPS.pm
libwww-perl-5.65/lib/Bundle
libwww-perl-5.65/lib/Bundle/LWP.pm
libwww-perl-5.65/lib/LWP.pm
libwww-perl-5.65/lib/HTML
libwww-perl-5.65/lib/HTML/Form.pm
libwww-perl-5.65/t
libwww-perl-5.65/t/base
libwww-perl-5.65/t/base/headers-util.t
libwww-perl-5.65/t/base/status.t
libwww-perl-5.65/t/base/cookies.t
libwww-perl-5.65/t/base/headers-etag.t
libwww-perl-5.65/t/base/http.t
libwww-perl-5.65/t/base/date.t
libwww-perl-5.65/t/base/listing.t
libwww-perl-5.65/t/base/response.t
libwww-perl-5.65/t/base/headers-auth.t
libwww-perl-5.65/t/base/common-req.t
libwww-perl-5.65/t/base/message.t
libwww-perl-5.65/t/base/mediatypes.t
libwww-perl-5.65/t/base/ua.t
libwww-perl-5.65/t/base/headers.t
libwww-perl-5.65/t/base/negotiate.t
libwww-perl-5.65/t/local
libwww-perl-5.65/t/local/get.t
libwww-perl-5.65/t/local/autoload.t
libwww-perl-5.65/t/local/http.t
libwww-perl-5.65/t/local/protosub.t
libwww-perl-5.65/t/live
libwww-perl-5.65/t/live/jigsaw-te.t
libwww-perl-5.65/t/live/validator.t
libwww-perl-5.65/t/live/jigsaw-neg.t
libwww-perl-5.65/t/live/jigsaw-auth-d.t
libwww-perl-5.65/t/live/jigsaw-md5.t
libwww-perl-5.65/t/live/jigsaw-chunk.t
libwww-perl-5.65/t/live/jigsaw-auth-b.t
libwww-perl-5.65/t/live/activestate.t
libwww-perl-5.65/t/net
libwww-perl-5.65/t/net/http-get.t
libwww-perl-5.65/t/net/cgi-bin
libwww-perl-5.65/t/net/cgi-bin/nph-slowdata
libwww-perl-5.65/t/net/cgi-bin/moved
libwww-perl-5.65/t/net/cgi-bin/test
libwww-perl-5.65/t/net/cgi-bin/slowread
libwww-perl-5.65/t/net/cgi-bin/timeout
libwww-perl-5.65/t/net/proxy.t
libwww-perl-5.65/t/net/http-post.t
libwww-perl-5.65/t/net/moved.t
libwww-perl-5.65/t/net/http-timeout.t
libwww-perl-5.65/t/net/config.pl.dist
libwww-perl-5.65/t/net/mirror.t
libwww-perl-5.65/t/robot
libwww-perl-5.65/t/robot/rules.t
libwww-perl-5.65/t/robot/ua.t
libwww-perl-5.65/t/robot/rules-dbm.t
libwww-perl-5.65/t/README
libwww-perl-5.65/t/TEST
libwww-perl-5.65/t/html
libwww-perl-5.65/t/html/form.t
libwww-perl-5.65/bin
libwww-perl-5.65/bin/lwp-rget
libwww-perl-5.65/bin/lwp-mirror
libwww-perl-5.65/bin/lwp-download
libwww-perl-5.65/bin/lwp-request
libwww-perl-5.65/Makefile.PL
libwww-perl-5.65/TODO
libwww-perl-5.65/MANIFEST
libwww-perl-5.65/README.SSL
libwww-perl-5.65/Changes
libwww-perl-5.65/README
libwww-perl-5.65/lwpcook.pod

  CPAN.pm: Going to build G/GA/GAAS/libwww-perl-5.65.tar.gz


This package comes with some sample programs that I can try
to install in /usr/local/bin.

   Note that

Re: What up with the mac

2002-10-10 Thread Ask Solem Hoel

Quoting Brigham Mecham <[EMAIL PROTECTED]>:

> Hello
> 
> Perhaps someone can fill me in on this one.  I am comparing the run time 
> of a perl program I wrote.  Using my Mac G4 which has a 1.5 ghz 
> processor and a 1.3 ghz PC computer (processor chip type I don't know 
> but could find out) I am seeing that the Mac takes 14 seconds to 
> complete what the PC does in 6!  What's up with that?
> 

That could be hard to guess without the detailt of your
program.

Remember There could be other things than the CPU slowing it down.

o The operating system (differences in implementation of systemcalls etc)
o The amount of memory, the bus speed of the memory.
o The file system (if the program finds files i.e)

Without knowing anything about the program, it's
impossible to tell.

-- 
[EMAIL PROTECTED]



Re: Why is 27 special?

2002-10-10 Thread Peter N Lewis

At 3:09 -0500 10/10/02, _brian_d_foy wrote:

>this means that the 20 fixed bytes between the volume name and the date,
>which are \000 in every case i looked at, is really 27 - (length of volume
>name).  i can name partitions with names up to 27 characters, but if i go past
>that it look like it initially works but then gives a warning. 
>what's the deal?
>what is magic about 27?  why not 31?  i assume that these are C 
>strings somewhere
>so the null bytes makes them a nice, even number.

Mac volume names are limited to 27 characters.  See

http://developer.apple.com/techpubs/mac/Files/Files-102.html

for a description for the Master Directory Blocks (aka volume 
information block).  If I had to guess, I'd say that the volume name 
was intended to be 31 characters, and then at the last minute the 
volume backup date field was added in at the end of the name which 
reduced the length of the volume name from 31 to 27 characters.

Enjoy,
Peter.

-- 
I was away for two months and have just returned, and now have
4600 messages to wade through, so sorry for any delays.
  



Adding path to @INC for use with web server

2002-10-10 Thread Adam Witney


Hi,

Searching the archives I have been able to find out how to get Perl to
search other paths for modules when invoked from the terminal or from GUI
apps such as BBEdit, however I cannot get them recognised by cgi scripts. I
read somewhere to add this line to httpd.conf

PerlSetEnv PERL5LIB /sw/lib/perl5

However that doesn't seem to help

I could just add 

use lib 'path';

 to the top of each script, but these scripts will be moved to other OS's
so I don't want to have to add lines for this purpose

Any ideas on how to do this?

Thanks

adam


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.




Re: What up with the mac

2002-10-10 Thread Ward W. Vuillemot
What is the script?  If you truly think you have an optimization 
problem on the Mac, then send us the script -- assuming it is of 
reasonable size.

Are you doing something in Perl that is really a Windows-specific 
task...are you running Perl within Mac OS X or through Fink 
packages...do you have the same versions of Perl...are you running Perl 
on OS X or OS 9...do the computers have the same amount of RAM, similar 
HDs, running one locally vs off a networked HD???  Also, 1.5 GHz 
Apple?!?  Do you mean dual-1.25 GHz Apple?  it is difficult to even 
comment with so little information to go by.

On 2002.10.9, at 12:31 午後, Brigham Mecham wrote:

> Hello
>
> Perhaps someone can fill me in on this one.  I am comparing the run 
> time of a perl program I wrote.  Using my Mac G4 which has a 1.5 ghz 
> processor and a 1.3 ghz PC computer (processor chip type I don't know 
> but could find out) I am seeing that the Mac takes 14 seconds to 
> complete what the PC does in 6!  What's up with that?
>


Re: What up with the mac

2002-10-10 Thread James Stepanek


--- Brigham Mecham <[EMAIL PROTECTED]>
wrote:
> Hello
> 
> Perhaps someone can fill me in on this one.  I am
> comparing the run time 
> of a perl program I wrote.  Using my Mac G4 which
> has a 1.5 ghz 
> processor and a 1.3 ghz PC computer (processor chip
> type I don't know 
> but could find out) I am seeing that the Mac takes
> 14 seconds to 
> complete what the PC does in 6!  What's up with
> that?
> 

My question is where did you get a 1.5 GHz mac
considering 1.25 Dual is top of the line?

James

__
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com



Re: What up with the mac

2002-10-10 Thread Gregory Cranz

Comparing an arbitrary script is not necessarily a 'fair' or 'clean' 
test from one system to another.  I would suggest working with the 
Benchmark module available from CPAN.  This is designed to function in 
this capacity and is more appropriate for performance testing.  As has 
been noted previously in responses to this query, there are a lot of 
things that a script might do, without divulging your script, this would 
probably be your best course of action.



On Wednesday, October 9, 2002, at 03:31 PM, Brigham Mecham wrote:

>
>
>> --
>> From:Brigham Mecham[SMTP:[EMAIL PROTECTED]]
>> Sent:Wednesday, October 09, 2002 3:31:50 PM
>> To:  [EMAIL PROTECTED]
>> Subject: What up with the mac
>> Auto forwarded by a Rule
> Hello
>
> Perhaps someone can fill me in on this one.  I am comparing the run 
> time of a perl program I wrote.  Using my Mac G4 which has a 1.5 ghz 
> processor and a 1.3 ghz PC computer (processor chip type I don't know 
> but could find out) I am seeing that the Mac takes 14 seconds to 
> complete what the PC does in 6!  What's up with that?




Re: Why is 27 special?

2002-10-10 Thread Gregory Cranz

Just a note:

I don't know if this is related or not, but recently I had a situation 
where I was attempting to back up OS/X borne files to an OS/9 server.  
They had lengthy filenames.  Every time I tried doing a 'drag-copy' I 
received an error -35 message.

After breaking the sub-folders down & finding the culprits it was indeed 
that the filenames were too long.  Upon shortening them I was able to 
copy them without incident.

Unfortunately I didn't count the number of characters involved.  I can 
only assume that OS/9 has a shorter filename limit than OS/X.

Oh and BTW - it is a coincidence that in your conversation: 27 is 31 
minus the dot-3 extension?



On Thursday, October 10, 2002, at 06:05 AM, Peter N Lewis wrote:

>
>
>> --
>> From:Peter N Lewis[SMTP:[EMAIL PROTECTED]]
>> Sent:Thursday, October 10, 2002 6:05:35 AM
>> To:  [EMAIL PROTECTED]
>> Subject: Re: Why is 27 special?
>> Auto forwarded by a Rule
> At 3:09 -0500 10/10/02, _brian_d_foy wrote:
>
>> this means that the 20 fixed bytes between the volume name and the 
>> date,
>> which are \000 in every case i looked at, is really 27 - (length of 
>> volume
>> name).  i can name partitions with names up to 27 characters, but if i 
>> go past
>> that it look like it initially works but then gives a warning. what's 
>> the deal?
>> what is magic about 27?  why not 31?  i assume that these are C 
>> strings somewhere
>> so the null bytes makes them a nice, even number.
>
> Mac volume names are limited to 27 characters.  See
>
> http://developer.apple.com/techpubs/mac/Files/Files-102.html
>
> for a description for the Master Directory Blocks (aka volume 
> information block).  If I had to guess, I'd say that the volume name 
> was intended to be 31 characters, and then at the last minute the 
> volume backup date field was added in at the end of the name which 
> reduced the length of the volume name from 31 to 27 characters.
>
> Enjoy,
>Peter.
>
> -- I was away for two months and have just returned, and now have
> 4600 messages to wade through, so sorry for any delays.
>   




Re: What up with the mac

2002-10-10 Thread ellem

On Wednesday, October 9, 2002, at 03:31 PM, Brigham Mecham wrote:

> Hello
>
> Perhaps someone can fill me in on this one.  I am comparing the run 
> time of a perl program I wrote.  Using my Mac G4 which has a 1.5 ghz 
> processor and a 1.3 ghz PC computer (processor chip type I don't know 
> but could find out) I am seeing that the Mac takes 14 seconds to 
> complete what the PC does in 6!  What's up with that?
>
>

There are so many things wrong with this question that I would normally 
not respond to it but I think buried under the mess you wrote is a legit 
question.

Since 1.25 Ghz is as fast as Macs are currently going I wonder if you 
are on 25 Mhz machine.

What does the script do?
Memory?
HD?
What else is running when you are doing this?

Many questions to answer
>
>
--
Lou Moran
http://ellem.dyn.dhs.org:5281/resume/lmoran2002.html
>




Re: What up with the mac

2002-10-10 Thread Bill Stephenson

Has anyone ran a Benchmark test on their OS X Mac? I'm a bit curious to see
how Perl on OS X stacks up against other systems.

I can try to run it on my iBook 366 ;)
-- 

Bill Stephenson


> From: Gregory Cranz <[EMAIL PROTECTED]>
> Date: Thu, 10 Oct 2002 09:54:42 -0400
> To: Brigham Mecham <[EMAIL PROTECTED]>
> Cc: [EMAIL PROTECTED]
> Subject: Re: What up with the mac
> 
> Comparing an arbitrary script is not necessarily a 'fair' or 'clean'
> test from one system to another.  I would suggest working with the
> Benchmark module available from CPAN.  This is designed to function in
> this capacity and is more appropriate for performance testing.  As has
> been noted previously in responses to this query, there are a lot of
> things that a script might do, without divulging your script, this would
> probably be your best course of action.
> 
> 
> 
> On Wednesday, October 9, 2002, at 03:31 PM, Brigham Mecham wrote:
> 
>> 
>> 
>>> --
>>> From:  Brigham Mecham[SMTP:[EMAIL PROTECTED]]
>>> Sent:  Wednesday, October 09, 2002 3:31:50 PM
>>> To:  [EMAIL PROTECTED]
>>> Subject:  What up with the mac
>>> Auto forwarded by a Rule
>> Hello
>> 
>> Perhaps someone can fill me in on this one.  I am comparing the run
>> time of a perl program I wrote.  Using my Mac G4 which has a 1.5 ghz
>> processor and a 1.3 ghz PC computer (processor chip type I don't know
>> but could find out) I am seeing that the Mac takes 14 seconds to
>> complete what the PC does in 6!  What's up with that?
> 
> 




Re: What up with the mac

2002-10-10 Thread Puneet Kishor


On Wednesday, October 9, 2002, at 02:31  PM, Brigham Mecham wrote:

> Hello
>
> Perhaps someone can fill me in on this one.  I am comparing the run 
> time of a perl program I wrote.  Using my Mac G4 which has a 1.5 ghz 
> processor and a 1.3 ghz PC computer (processor chip type I don't know 
> but could find out) I am seeing that the Mac takes 14 seconds to 
> complete what the PC does in 6!  What's up with that?
>
>
there were a lot of replies to this post, most of them (rightfully) 
asking for more information regarding the computer, the processes 
running on them, etc. etc. Also, many questioned the validity of a G4 
1.5 Ghz machine. To my eye that just seems like a typo, and is 
irrelevant in that, there _is_ a legit question here.

I too have noticed slowness comparing my Win box and Mac. The reality 
is that Macs are slower than Intel boxes, and the reality is that it is 
very difficult to compare different processors as well as clock speeds. 
In the end what matters is whether or not a specific task generally 
"appears" to be slow or fast, assuming most normal configs.

My Win box is running Apache2, MySQL, SQL Server 7, and Cold Fusion 
daemons (the user-installed daemons) besides other OS junk). It is a 
PIII, 800 MHz machine with 512 Mb ram. My iBook is a G3 600 Mhz with 
640 Mb ram, and is running Apache 1.3.x besides other OS junk). Yes, 
the iBook is 200 Mhz less, but it is running a lot less than the Win 
box, and has a lot more RAM. It is decidedly slower in most all tasks. 
Java apps crawl on my iBook. Html rendering is noticeably slow, etc. I 
once did some benchmarking with the benchmarking scripts drieux has put 
up on his website, and yes, perl scripts were slower on the Mac.

Was this the case when the Mhz were comparable? Yes! When my Win box 
was a PIII 400, even then it "seemed" faster.

The bottomline is -- whatever the fancy architecture behind these 
machines, whatever the Macworld demos by Mr. Jobs might demo, Macs are 
generally slower (this is an empirical, not a scientific statement -- 
although sites like barefeats and xlr8yourmac have compared various 
configs of Moto and Intel boxes and found the same to be true, EXCEPT 
in the case of some altivec optimized software). The problem may be 
because software are not written optimized for Macs, the problem maybe 
because of something inherent in Macs themselves. Whatever, but macs 
are slow.

That said, I still prefer 'em over any other platform, but certainly 
not for their speed. In spite of them being noticeably slow, they 
enable me to work faster.

:-)

Regards,

pk/




Re: What up with the mac

2002-10-10 Thread Chris Devers

On Thu, 10 Oct 2002, Bill Stephenson wrote:

> Has anyone ran a Benchmark test on their OS X Mac? I'm a bit curious to
> see how Perl on OS X stacks up against other systems.

Particularly interesting would be a cross comparison among, say, OSX, pure
Darwin, a PPC version of Linux, and maybe PPC BSD. For comparison, these
can be tried against x86 versions of the same systems. The ultimate idea
being to get an idea of how OSX compares to other systems that use this
hardware, and how this hardware compares to it's big brother alternative.


-- 
Chris Devers[EMAIL PROTECTED]

I had pancake makeup for brunch!





Re: What up with the mac

2002-10-10 Thread Andrew Brosnan

I didn't write to scripts below, but they are fun to play with.

Obviously some adjustment would be needed to compare across systems.

 

#
#!/usr/bin/perl Benchmark_demo1
#Measure CPU usage of a some portion of a program


use Benchmark;


# generate list of all text files in /etc
@text_files = grep { -f and -T } glob('/etc/*');


timethis(100, 'sort_by_size(@text_files)');


# sort the files names according to file sizes
sub sort_by_size {
my @files = @_;
@files = sort { -s $a <=> -s $b } @files;
return @files;
}
#



#
#!/usr/bin/perl Benchmark_demo2
#Can confirm that one technique is faster than another


use Benchmark;


# generate list of all text files in /etc
@text_files = grep { -f and -T } glob('/etc/*');


timethis(100, 'faster_sort_by_size(@text_files)');


# sort the files names according to file sizes,
# stat'ing each file just once
sub faster_sort_by_size {
my @files = @_;
@files = map { $_->[1] }
sort { $a->[0] <=> $b->[0] }
map { [ -s $_, $_ ] } @files;
return @files;
}
#



gd croaking

2002-10-10 Thread Puneet Kishor

Folks,

I haven't messed with the OS at all. Perl 5.6.0 that comes with OS X 
10.2.

I built gd 1.8.4 using Scott Anguish's directions on stepwise (as I 
have done before), and that worked just as expected. Then I built a 
specific perl module that helps makes maps (used to work fine on 
10.1.whatever.

I run my scripts unchanged, and I get the following in the apache 
error_log. Seems like gd is not happy.

Without any further info to share (I really don't know what else to 
offer), can anyone shed some light on the following, or guide me to 
someplace I can find answers?

Many thanks.

Puneet.

% tail -f /var/log/httpd/error_log
dyld: perl Undefined symbols:
_gdFontGiant
_gdFontLarge
_gdFontMediumBold
_gdFontSmall
_gdFontTiny
_gdImageArc
_gdImageColorAllocate
_gdImageColorTransparent
_gdImageCopy
_gdImageCopyMerge
_gdImageCopyResized
_gdImageCreate
_gdImageCreateFromJpeg
_gdImageCreateFromPng
_gdImageDestroy
_gdImageFillToBorder
_gdImageFilledPolygon
_gdImageFilledRectangle
_gdImageInterlace
_gdImageJpeg
_gdImageJpegPtr
_gdImageLine
_gdImagePng
_gdImagePngPtr
_gdImagePolygon
_gdImageRectangle
_gdImageSetBrush
_gdImageSetPixel
_gdImageSetStyle
_gdImageSetTile
_gdImageString
_gdImageStringFT
_gdImageWBMP
_gdImageWBMPPtr
[Thu Oct 10 11:00:46 2002] [error] [client 127.0.0.1] Premature end of 
script headers: /Users/pkishor/Sites/bims/index.pl




Re: Installation of LWP fails

2002-10-10 Thread David Wheeler

On Wednesday, October 9, 2002, at 11:38  PM, Adam Fishman wrote:

> (You get this message, because MakeMaker could not find
> "/System/Library/Perl/darwin/CORE/perl.h")

Well, do you have this file?

David

-- 
David Wheeler AIM: dwTheory
[EMAIL PROTECTED] ICQ: 15726394
http://david.wheeler.net/  Yahoo!: dew7e
Jabber: [EMAIL PROTECTED]




Re: Installation of LWP fails

2002-10-10 Thread Palle Bo Nielsen

I have exactly the same problem on a machine at work running Mac OS X 
Server 10.2. Don't know how to fix it. Would like to be able to run the 
LWP module too.

PowerPalle


On torsdag, okt 10, 2002, at 19:17 Europe/Copenhagen, David Wheeler 
wrote:

> On Wednesday, October 9, 2002, at 11:38  PM, Adam Fishman wrote:
>
>> (You get this message, because MakeMaker could not find
>> "/System/Library/Perl/darwin/CORE/perl.h")
>
> Well, do you have this file?
>
> David
>
> -- 
> David Wheeler AIM: dwTheory
> [EMAIL PROTECTED] ICQ: 15726394
> http://david.wheeler.net/  Yahoo!: dew7e
>Jabber: 
> [EMAIL PROTECTED]
>
>





Re: Adding path to @INC for use with web server

2002-10-10 Thread Bill Stephenson

We recently discussed "Portability" on this list. If you want to write
scripts that run on other systems then you have to accommodate that design
goal with code. 
-- 

Bill Stephenson
www.SecureShopper.com
1-417-546-5593



> From: Adam Witney <[EMAIL PROTECTED]>
> Date: Thu, 10 Oct 2002 11:09:38 +0100
> To: MacOS X perl <[EMAIL PROTECTED]>
> Subject: Adding path to @INC for use with web server
> 
> Hi,
> 
> Searching the archives I have been able to find out how to get Perl to
> search other paths for modules when invoked from the terminal or from GUI
> apps such as BBEdit, however I cannot get them recognised by cgi scripts. I
> read somewhere to add this line to httpd.conf
> 
> PerlSetEnv PERL5LIB /sw/lib/perl5
> 
> However that doesn't seem to help
> 
> I could just add 
> 
> use lib 'path';
> 
>  to the top of each script, but these scripts will be moved to other OS's
> so I don't want to have to add lines for this purpose
> 
> Any ideas on how to do this?
> 
> Thanks
> 
> adam




Re: Adding path to @INC for use with web server

2002-10-10 Thread gene

>> From: Adam Witney <[EMAIL PROTECTED]>
>> Date: Thu, 10 Oct 2002 11:09:38 +0100
>> To: MacOS X perl <[EMAIL PROTECTED]>
>> Subject: Adding path to @INC for use with web server
>>
>> Hi,
>>
>> Searching the archives I have been able to find out how to get Perl to
>> search other paths for modules when invoked from the terminal or from 
>> GUI
>> apps such as BBEdit, however I cannot get them recognised by cgi 
>> scripts. I
>> read somewhere to add this line to httpd.conf
>>

You can include this code in httpd.conf:


use lib '';


I assume that this directive requires mod_perl
Alternatively you can do
PerlRequire /../../perl_config_file.pl
and then in that perl config file, include your 'use lib' code.




Re: gd croaking

2002-10-10 Thread Puneet Kishor

Ok, here's some more info that I was able to put together.

I built gd and supporting libraries using gcc 3.1.

To build another program (that actually eventually generates a perl 
module), I had to revert to gcc 2.x.

I, then, reverted back to gcc 3.x and built the perl specific module. 
Running my perl scripts hence produces the errors below. The "dyld: perl 
Undefined symbols:" portion indicates there might be some binary 
incompatibility. Between what and what though? Is there a way I can test 
this? (I guess, in a manner of speaking, I did test it and learned it is 
incompatible :-( )



Puneet Kishor wrote:
> Folks,
> 
> I haven't messed with the OS at all. I am using the Perl 5.6.0 that comes with OS X 
>10.2.
> 
> I built gd 1.8.4 using Scott Anguish's directions on stepwise (as I have 
> done before), and that worked just as expected. Then I built a specific 
> perl module that helps makes maps (used to work fine on 10.1.whatever.
> 
> I run my scripts unchanged, and I get the following in the apache 
> error_log. Seems like gd is not happy.
> 
> Without any further info to share (I really don't know what else to 
> offer), can anyone shed some light on the following, or guide me to 
> someplace I can find answers?
> 
> Many thanks.
> 
> Puneet.
> 
> % tail -f /var/log/httpd/error_log
> dyld: perl Undefined symbols:
> _gdFontGiant
> _gdFontLarge
> _gdFontMediumBold
> _gdFontSmall
> _gdFontTiny
> _gdImageArc
> _gdImageColorAllocate
> _gdImageColorTransparent
> _gdImageCopy
> _gdImageCopyMerge
> _gdImageCopyResized
> _gdImageCreate
> _gdImageCreateFromJpeg
> _gdImageCreateFromPng
> _gdImageDestroy
> _gdImageFillToBorder
> _gdImageFilledPolygon
> _gdImageFilledRectangle
> _gdImageInterlace
> _gdImageJpeg
> _gdImageJpegPtr
> _gdImageLine
> _gdImagePng
> _gdImagePngPtr
> _gdImagePolygon
> _gdImageRectangle
> _gdImageSetBrush
> _gdImageSetPixel
> _gdImageSetStyle
> _gdImageSetTile
> _gdImageString
> _gdImageStringFT
> _gdImageWBMP
> _gdImageWBMPPtr
> [Thu Oct 10 11:00:46 2002] [error] [client 127.0.0.1] Premature end of 
> script headers: /Users/pkishor/Sites/bims/index.pl
> 





Jaguar Perl 5.6.0 dyld error

2002-10-10 Thread Kelly Thomas Wood

Hoping someone has seen this.  I've read all about the "dyld: perl
Undefined symbol:" errors when upgrading to 5.8.0, but I'm running into
these errors while still running 5.6.0 on certain modules.  Specifically,
I'm trying to use Jeff Horwitz's Authen::Krb5 and get the following
output:

dyld: perl Undefined symbols:
_krb5_free_address
_krb5_free_enc_tkt_part
_krb5_free_krbhst
_krb5_gen_portaddr
_krb5_gen_replay_name
_krb5_get_krbhst
_krb5_init_ets
Trace/BPT trap

During the Authen::Krb5 compile i get some warnings:

Krb5.xs:317: warning: passing arg 2 of `Perl_sv_2pv' from incompatible
pointer type
Krb5.xs: In function `XS_Authen__Krb5_rd_req':

etc...

but it seems to build ok.  Anyone have an idea on this one?

Thanks,
Kelly





Re: gd croaking

2002-10-10 Thread Dave Gomez

Puneet,

Think I had same issues, and gave up and used gnuplot instead for some graph
creation, as it does put out graphs like the ones I use on my site well
(http://www.dkgomez.com/cgi-bin/housetemp.pl). Think I used fink to do the
install of gnuplot

Dave Gomez

On 10/10/02 2:27 PM, "Puneet Kishor" <[EMAIL PROTECTED]> wrote:

> Ok, here's some more info that I was able to put together.
> 
> I built gd and supporting libraries using gcc 3.1.
> 
> To build another program (that actually eventually generates a perl
> module), I had to revert to gcc 2.x.
> 
> I, then, reverted back to gcc 3.x and built the perl specific module.
> Running my perl scripts hence produces the errors below. The "dyld: perl
> Undefined symbols:" portion indicates there might be some binary
> incompatibility. Between what and what though? Is there a way I can test
> this? (I guess, in a manner of speaking, I did test it and learned it is
> incompatible :-( )
> 
> 
> 
> Puneet Kishor wrote:
>> Folks,
>> 
>> I haven't messed with the OS at all. I am using the Perl 5.6.0 that comes
>> with OS X 10.2.
>> 
>> I built gd 1.8.4 using Scott Anguish's directions on stepwise (as I have
>> done before), and that worked just as expected. Then I built a specific
>> perl module that helps makes maps (used to work fine on 10.1.whatever.
>> 
>> I run my scripts unchanged, and I get the following in the apache
>> error_log. Seems like gd is not happy.
>> 
>> Without any further info to share (I really don't know what else to
>> offer), can anyone shed some light on the following, or guide me to
>> someplace I can find answers?
>> 
>> Many thanks.
>> 
>> Puneet.
>> 
>> % tail -f /var/log/httpd/error_log
>> dyld: perl Undefined symbols:
>> _gdFontGiant
>> _gdFontLarge
>> _gdFontMediumBold
>> _gdFontSmall
>> _gdFontTiny
>> _gdImageArc
>> _gdImageColorAllocate
>> _gdImageColorTransparent
>> _gdImageCopy
>> _gdImageCopyMerge
>> _gdImageCopyResized
>> _gdImageCreate
>> _gdImageCreateFromJpeg
>> _gdImageCreateFromPng
>> _gdImageDestroy
>> _gdImageFillToBorder
>> _gdImageFilledPolygon
>> _gdImageFilledRectangle
>> _gdImageInterlace
>> _gdImageJpeg
>> _gdImageJpegPtr
>> _gdImageLine
>> _gdImagePng
>> _gdImagePngPtr
>> _gdImagePolygon
>> _gdImageRectangle
>> _gdImageSetBrush
>> _gdImageSetPixel
>> _gdImageSetStyle
>> _gdImageSetTile
>> _gdImageString
>> _gdImageStringFT
>> _gdImageWBMP
>> _gdImageWBMPPtr
>> [Thu Oct 10 11:00:46 2002] [error] [client 127.0.0.1] Premature end of
>> script headers: /Users/pkishor/Sites/bims/index.pl
>> 
> 
> 
> 




Re: What up with the mac

2002-10-10 Thread Joel Rees

Puneet Kishor iwaku

> The bottomline is -- whatever the fancy architecture behind these 
> machines, whatever the Macworld demos by Mr. Jobs might demo, Macs are 
> generally slower 
[...]

Okay, one more time around --

(1) The compiler optimizations are tuned to the iNTEL architecture.
There's no way getting around this, unless you have money to re-educate
and feed the guys who own GCC while they get up to full speed on PPC.
Had the same problems with the 68K. 

A lot of tricks to optimize x86 code work backwards on a decently
architected CPU, incidentally.

In a loose estimate, that accounts for about 10% to 300% of the speed
difference, depending on the application.

(2) The Mac OSses have always done more for us than the MS OSses. (That
explains the "subjective" difference in usability, OK?) The time for
that has to come from somewhere, and that is in my mind the singular
most significant benefit of dual CPUs. One CPU can be minding your mouse
while the other crunches.

Among the topics I'm waving my hands at here is the fact that making the
interrupt architecture more responsive and more flexible for general
processes will slow down specific individual tasks on a given CPU
(algorithmic flaws aside).

As a rough guess, this kind of stuff will account for another 30% to 150%
of the speed difference. (Again, depending on what you're doing.)

(3) The legacy stuff from Classic, because it did so much more than DOS
ever could, provides a significant amount of drag on the system. Just
having it available will slow the system down 3% to 10% from what it
could be getting, and having the Classic system actually running will
slow the system down 10% to 50% or more, again, as a rough estimate.

(4) We have stray reports from the various attempts to port Mac OS
to the iNTEL architecture that it runs faster "over there". It should.
In addition to the compiler writer training effects I mentioned above,
re-implementations should generally be more efficient than original
implementations. 

You can push some of the efficiency back to the original implementation,
but you have to test any changes you bring back pretty thoroughly. Ports
are expected to have stupid errors, so the testing requirements are
significantly lower on the new implementation.

Incidentally, a lot of the speed gain going from 68K to PPC were
re-implementation effects. A 68060 running 66 MHz and and a PPC running
66 MHz were not that much different in raw speed over a good mix of
reasonably optimized code. (Most of the really fancy instructions in the
68020+ were not useful, however.)

Is that enough, or should I continue? If you really want speed, you
don't go to another general purpose OS, you use dedicated systems, and
you choose a CPU you know how to generate optimal code for.

(What I keep waiting for Apple to do is put out a machine with one
relatively cheap processor dedicated to the user interface, another
relatively cheap processor for the file system, and a real hot-dog
processor to crunch numbers. But I don't think technology is quite up to
it yet, from the production and maintenance costs point of view.)

> That said, I still prefer 'em over any other platform, but certainly 
> not for their speed. In spite of them being noticeably slow, they 
> enable me to work faster.

This is the bottom line for me. I don't care how fast a machine crunches
numbers if it doesn't help me get my job done. I strongly suspect I'd be
more productive on on old PowerPC 7100 running 8.6 than on this 900+ MHz
MSW2k box with a gigabyte of RAM. 

Sure, I can use a Q&D Java program with less than 50 lines to compute
all the factorials from 0 to 5000 in under a second on this box, and my
300 MHz Mac OS X iBook with 192K RAM takes around 5 seconds on the same
program. On a 7100, who knows? several minutes? But how often would I do
that in a day? 

On MSW2k, I have Active State's Perl doing some repetitive tasks for me.
On Mac OS, I can control the mouse and the system well enough that I
just do lots of these things by hand. Saves me the time to write the
script.

I'm preaching to the choir, I'm sure. I'll shut up.

-- 
Joel Rees <[EMAIL PROTECTED]>




Re: Installation of LWP fails

2002-10-10 Thread Paul McCann


On Friday, October 11, 2002, at 03:24  AM, Palle Bo Nielsen wrote:

> I have exactly the same problem on a machine at work running Mac OS X 
> Server 10.2. Don't know how to fix it. Would like to be able to run 
> the LWP module too.
>>
>>> (You get this message, because MakeMaker could not find
>>> "/System/Library/Perl/darwin/CORE/perl.h")
>
This error is almost certainly symptomatic of an OSX installation that 
didn't include the BSD subsystem. You should be able to use your 
installation disks to easily solve the problem. (ie install *just* the 
BSD subsystem on top of your existing system)

Good luck,
Paul
-- 
__(I think where I am not,
therefore I am where I do not think)__   (Jackie L.)




Tk, Perl, Mac == SLOW?

2002-10-10 Thread Ward W. Vuillemot

I am curious as to what I should expect in way of responsiveness from 
Perl/Tk on 10.2.1?  I have it installed and running with Perl 5.8.0, 
but overall window redraw is quite poor (1,2 seconds to get primitive 
window displayed).  I am curious if this is typical, or if this will 
improve, or if there is something I can do to rectify/improve things.  
I am new to Tk, so I am not even sure what to expect.

Thanks!
Ward




OT Java pseudo-benchmark (was Re: What up with the mac)

2002-10-10 Thread Joel Rees

Okay, here's the Java program I was talking about, since someone might
want it and I'm going to be off-list for a while:

-begin code
/**
 * Let's try the Factorial in BigInteger
 *
 * @author Joel Rees, Altech Corporation, Esaka, Japan
 * Copyright September 2002
 * May be copied, modified, and/or used freely.
 * No warranty. Use at your own risk.
 *
 * @version 0.1
 */


import java.lang.Class;
import java.math.BigInteger;


public class BigFactorial 
{
public static void main( String[] args )
{   if ( ( args.length < 1 ) || ( args[ 0 ].charAt( 0 ) == '-' ) )
{   System.out.println( "Usage: " 
/* Okay, this is ridiculous. */
+ BigFactorial.class.getName() 
+ "  {,  }" );
}
else
{   for ( int i = 0; i < args.length; ++i )
{   BigInteger input = new BigInteger( args[ i ] );
System.out.println( 
"("
+ input.toString() 
+ ")! == " + factorial( input ).toString() );
}
}
}


/* Let's not try to blow the stack with the old 
 * forced example of recursion, at any rate.
*/
public static BigInteger factorial( BigInteger n )
{   if ( n.compareTo( BigInteger.ZERO ) < 0 )
{   return new BigInteger( "0" );
}
BigInteger result = new BigInteger( "1" );
while ( n.compareTo( BigInteger.ONE ) > 0 )
{   result = result.multiply( n );
n = n.subtract( BigInteger.ONE );
}
return result;
}
}

--end code-

Should be easy to re-write in Perl.

-- 
Joel Rees <[EMAIL PROTECTED]>