Thanks Apple! You snubbed perl yet again!

2007-10-17 Thread jeremiah

Some yummy facts about Leopard:

Scripting Bridge
Use Objective-C, Ruby, and Python programs to automate Mac  
applications. The new Scripting Bridge enables them to easily  
generate AppleEvents using a concise, AppleScript-like syntax.


Ruby on Rails
Work in a developer's dreamland. Leopard is the perfect platform for  
Ruby on Rails development, with Rails, Mongrel, and Capistrano built in.


Not a single word about perl. No mention of CamelBones, using the  
Scripting Bridge for perl, or the fact that perl has CPAN with 12,000 
+ high quality modules while ruby has 4,000+ on rubyforge. Apple  
trumpets its POSIX conformation yet what UNIX is worth its weight in  
cat5 cable if it doesn't come with perl?


It looks like I will have to stick with debian for developing my LAMP  
applications.


Jeremiah


Re: Thanks Apple! You snubbed perl yet again!

2007-10-17 Thread brian d foy
In article [EMAIL PROTECTED],
[EMAIL PROTECTED] wrote:


 Scripting Bridge
 Use Objective-C, Ruby, and Python programs to automate Mac  
 applications. The new Scripting Bridge enables them to easily  
 generate AppleEvents using a concise, AppleScript-like syntax.

Mac OS X comes with Mac::Carbon, I thought. IS the issue that you won't
have the right things available to you on the other side when you
distribute applications?


 Apple  
 trumpets its POSIX conformation yet what UNIX is worth its weight in  
 cat5 cable if it doesn't come with perl?

Mac OS X comes with Perl. Perhaps you meant to say CamelBones, but I
don't think POSIX cares about that.


 It looks like I will have to stick with debian for developing my LAMP  
 applications.

If you want to work on the Mac, you still can. It doesn't sound like
you want to though.


Re: Thanks Apple! You snubbed perl yet again!

2007-10-17 Thread jeremiah


On Oct 17, 2007, at 5:25 PM, brian d foy wrote:


In article [EMAIL PROTECTED],
[EMAIL PROTECTED] wrote:


Scripting Bridge
Use Objective-C, Ruby, and Python programs to automate Mac
applications. The new Scripting Bridge enables them to easily
generate AppleEvents using a concise, AppleScript-like syntax.


Mac OS X comes with Mac::Carbon, I thought. IS the issue that you  
won't

have the right things available to you on the other side when you
distribute applications?

Yes, it does come with Mac::Carbon, and yes there is CamelBones. I  
just think that Apple seems to ignore mentioning perl in their fancy  
marketing campaigns. I get frustrated by that since there is a  
misunderstanding about perl in the marketplace and companies like  
Apple are in a position to do something about it.



Apple
trumpets its POSIX conformation yet what UNIX is worth its weight in
cat5 cable if it doesn't come with perl?


Mac OS X comes with Perl. Perhaps you meant to say CamelBones, but I
don't think POSIX cares about that.


It looks like I will have to stick with debian for developing my LAMP
applications.


If you want to work on the Mac, you still can. It doesn't sound like
you want to though.


It may sound like that to you, but if I didn't want to develop (in  
perl) on the Mac, why would I bother writing about this at all?


I just had hoped for more publicity for perl from Leopard. I had also  
hoped for a new version of perl and Apache 2.0 out of the box. Okay,  
getting 5.10 into Leopard isn't realistic and maybe Apache will be  
updated for Leopard, and yes, a stable platform is a worthy goal for  
users (I am beginning to convince myself I am wrong) but I think that  
Apple could have provided more for developers in regard to perl.


Jeremiah



Re: Thanks Apple! You snubbed perl yet again!

2007-10-17 Thread Shane
On 10/17/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Some yummy facts about Leopard:

 Scripting Bridge
 Use Objective-C, Ruby, and Python programs to automate Mac
 applications. The new Scripting Bridge[...]
 Not a single word about perl. No mention of CamelBones

I thought it was a well known fact that Apple got started on the Perl
bridge work (ala Camelbones) late, and it would be a stretch if all
the work would be completed in time for the Leopard release. At-least
I recall reading that several places. Disappointing, yes, but it's not
anything they couldn't finish and release via a .x update. Hopefully
they will!


Re: Thanks Apple! You snubbed perl yet again!

2007-10-17 Thread Trey Harris

In a message dated Wed, 17 Oct 2007, [EMAIL PROTECTED] writes:
Yes, it does come with Mac::Carbon, and yes there is CamelBones. I just think 
that Apple seems to ignore mentioning perl in their fancy marketing 
campaigns. I get frustrated by that since there is a misunderstanding about 
perl in the marketplace and companies like Apple are in a position to do 
something about it.


Perhaps someone with the inside scoop can give some real beef (though I 
understand that that sort of inside baseball is something Apple strongly 
discourages).  But I suspect it's just a case of marketing types taking a 
temperature on what's hot and making sure the hot things were mentioned 
repeatedly.  Look at the other items on 
http://www.apple.com/macosx/features/300.html and it certainly looks that 
way.


Ruby is hot, Perl is not.  (Why Python made the cut and not Perl, I'm not 
sure; I don't think Python's particularly hot anymore.  But I don't 
pretend to understand marketing types.)  One shouldn't read engineering 
decisions into marketing copy--if you've ever had to make purchasing 
decisions on behalf of a large company, you learn that quickly.



[snip]
I just had hoped for more publicity for perl from Leopard. I had also hoped 
for a new version of perl and Apache 2.0 out of the box. Okay, getting 5.10 
into Leopard isn't realistic []


No, it's not, as Leopard must be well past freeze at this point, and Red 
Hat disastrously demonstrated several years ago what happens when you ship 
a pre-release of an important open source tool with a new operating system 
release.  Better to have old technology than bleeding-edge still subject 
to change, when it means that you'll be frozen for years on an alpha or 
beta version no one in the community is using.


This does bring up something I don't think we've dealt with on this list 
in quite a few years though (when was it that OS X last came with Perl 
5.6?  Was it Jaguar?  I can't recall)--for some period, probably well over 
a year at least, we'll be dealing with an OS X that does not have the most 
recent major release of Perl.  Time to start working on the FAQ about how 
to install 5.10 alongside Apple's 5.8, since how do I get 5.10 on the 
Mac? will become a perennial question on this list as soon as 5.10 is 
released.  Maybe somebody can work on an Installer package.


(How to install 5.10 *over* Apple's 5.8 may also be a topic to at least 
discuss--without testing, there's no way of knowing whether that will be 
dangerous or not.  And correct me if I'm wrong, but I think that a 
Security Update that included a new Perl 5.8 would overwrite a 
user-installed 5.10 that was installed over the prior 5.8, would it not?)


Trey


Re: Is there a True Boolean type in Perl?

2007-10-17 Thread Trey Harris

In a message dated Mon, 15 Oct 2007, Doug McNutt writes:


At 18:20 -0700 10/15/07, Michael Barto wrote:

I think in the more newer languages, they have implemented true booleans. Perl 
is kind of old school.


use constant TRUE = 1;
use constant FALSE = 0;

Is a complete solution in perl 5.


Um, no, it's not:

  #!/usr/bin/perl

  use strict;
  use warnings;

  use constant TRUE = 1;
  use constant FALSE = 0;

  # Return a list of the sequence of even numbers from 0..$num
  # or false if we got an odd number
  sub evens_up_to {
  my $num = shift;

  if ($num % 2) {
  # didn't get an even!
  return FALSE;
  }

  return grep { not $_ % 2 } 0..$num;
  }

  for my $n (2, 4, 5) {
  if (my @nums = evens_up_to($n)) {
  print $n is even: @nums\n;
  }
  else {
  print $n is not even.\n;
  }
  }

Output is:
  2 is even: 0 2
  4 is even: 0 2 4
  5 is even: 0

Oops.  Now, change the return line:

  --- true.pl 2007-10-17 12:26:28.0 -0400
  +++ truenew.pl  2007-10-17 12:27:20.0 -0400
  @@ -13,5 +13,5 @@
 if ($num % 2) {
 # didn't get an even!
  -  return FALSE;
  +  return; # false via bare return
 }

Now you get:
  2 is even: 0 2
  4 is even: 0 2 4
  5 is not even.

Without resorting to tied handles or objects or other heavyweight 
chicanery, there is no single FALSE value you can define that will be 
false in all cases.  Better to use bare return when it may be used like 
the above.


On the other hand, when a subroutine returns a scalar boolean, you 
probably *do* want to return 0 or undef, otherwise you can get into this 
nasty situation:


  my ($ready1, $ready2) = ($data1-is_ready, $data2-is_ready);

If is_ready() uses bare return fore false, then in the case where $data1 
is not ready but $data2 is, $ready1 would be set to 1 and $ready2 would be 
undef, the exact opposite of what you'd expect, because $data1-is_ready 
would return the empty list so $data2-is_ready would squeeze over and 
fill the $ready1 spot.  Nasty.


Moral of the story: there is no single false value in Perl 5, and trying 
to pretend there is one that is valid in all situations is asking for 
trouble.


As others have already noted, Perl 6 fixes this by both having a primitive 
boolean type and by having True and False roles that any value can mix in 
(so you can have a 0 but True value or a 1 but False one for example, 
or a false list containing elements, or a true list that's empty).


Trey


Re: Thanks Apple! You snubbed perl yet again!

2007-10-17 Thread Michael Barto




The Perl developers are kind of a quiet group. But I think that Apple
has done a very reasonable job for developers. I remember even in old
MacOS9 that this Perl was ahead of what I had on Sun Solaris OS. There
is always a leading edge, but my application need to be distributed,
therefore I am more conservative in the version I use. Apple's Perl
version fits that real well. And I can always install multiple version
of Perl because in a Unix OS. Just define a different path.

On the otherside, Apple computers are the best developer's hardware.
You can run you Debrian, Redhat, Ubuntu versions of Unix and so forth
on the platform-either under Parallels or native. You can also run
Solaris 10 (which is free I might add) along with all the varieties of
Windows types--all running under one platform. Here you have all the
neat MacOS development tools (e.g. Bbedeit, Dreamweaver, Affrus [Perl
debugger], etc.) running in MacOSX, at the same time you have the
Solaris 10 Application and database server running. At Jave One (in
March), Sun Microsystem use Apple Laptops to show the new Java stuff
and the developers carrier 4 to one for Apple laptops over the PC's. At
the Solaris 10 presentation, Sun stated that their target laptop was
from Apple because it woke up. Finally, my recent friends who have
purchased new Apple Laptops, tell me that Windows XP runs better under
Parallels than on their old PC. I assume that Debrian will be just as
impressive. 

And as I reiterate, you could install the cutting edge Perl on you
system and be fine still under MacOSX with all its tools. It is Unix
anyway.

[EMAIL PROTECTED] wrote:
Some yummy facts about Leopard:
  
  
Scripting Bridge
  
Use Objective-C, Ruby, and Python programs to automate Mac
applications. The new Scripting Bridge enables them to easily generate
AppleEvents using a concise, AppleScript-like syntax.
  
  
Ruby on Rails
  
Work in a developer's dreamland. Leopard is the perfect platform for
Ruby on Rails development, with Rails, Mongrel, and Capistrano built
in.
  
  
Not a single word about perl. No mention of CamelBones, using the
Scripting Bridge for perl, or the fact that perl has CPAN with 12,000+
high quality modules while ruby has 4,000+ on rubyforge. Apple trumpets
its POSIX conformation yet what UNIX is worth its weight in cat5 cable
if it doesn't come with perl?
  
  
It looks like I will have to stick with debian for developing my LAMP
applications.
  
  
Jeremiah
  
  


-- 





  

  
  


  Michael Barto
  Software Architect
  
  
  
  


   LogiQwest
Inc.
16458 Bolsa Chica Street, # 15
Huntington Beach, CA92649
  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: Thanks Apple! You snubbed perl yet again!

2007-10-17 Thread Sherm Pendley

On Oct 17, 2007, at 6:09 AM, [EMAIL PROTECTED] wrote:


Some yummy facts about Leopard:

Scripting Bridge
Use Objective-C, Ruby, and Python programs to automate Mac  
applications. The new Scripting Bridge enables them to easily  
generate AppleEvents using a concise, AppleScript-like syntax.


The Scripting Bridge simply generates an Objective-C wrapper that  
has methods corresponding to an app's scripting dictionary. That  
class is callable from *any* language that can call Objective-C methods.



Ruby on Rails
Work in a developer's dreamland. Leopard is the perfect platform  
for Ruby on Rails development, with Rails, Mongrel, and Capistrano  
built in.


Sounds cool - the more the merrier.


Not a single word about perl. No mention of CamelBones


The fact that CamelBones is not included in Leopard isn't Apple's  
fault - it's mine.


I didn't deliver a Leopard-ready CamelBones early enough for Apple to  
include it. They gave me a chance to do so, appointed an internal  
liason to be the contact point to deliver it to, and gave me free  
access to Leopard betas.


On the other hand, built-in support for CamelBones is largely  
symbolic anyway. Neither Panther nor Tiger have it, so you'll have to  
embed the CamelBones framework in your app anyway, unless it's  
Leopard-only.


sherm--

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




Re: Thanks Apple! You snubbed perl yet again!

2007-10-17 Thread Sherm Pendley

On Oct 17, 2007, at 11:43 AM, [EMAIL PROTECTED] wrote:


I had also hoped for a new version of perl


They're shipping the latest release (5.8.8, as noted by Ed Moy) -  
what do you want them to do, ship bleadperl?


sherm--

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




Re: Thanks Apple! You snubbed perl yet again!

2007-10-17 Thread Sherm Pendley

On Oct 17, 2007, at 12:16 PM, Trey Harris wrote:

Perhaps someone with the inside scoop can give some real beef  
(though I understand that that sort of inside baseball is something  
Apple strongly discourages).  But I suspect it's just a case of  
marketing types taking a temperature on what's hot and making  
sure the hot things were mentioned repeatedly.  Look at the other  
items on http://www.apple.com/macosx/features/300.html and it  
certainly looks that way.


I'm not an insider, but that sounds right to me.

Ruby is hot, Perl is not.  (Why Python made the cut and not Perl,  
I'm not sure; I don't think Python's particularly hot anymore.  But  
I don't pretend to understand marketing types.)  One shouldn't read  
engineering decisions into marketing copy--if you've ever had to  
make purchasing decisions on behalf of a large company, you learn  
that quickly.


I've mentioned this before, I think. The issue was one of  
sponsorship. There are Apple engineers who contribute (on their own  
time) to RubyCocoa and PyObjC. Those engineers stepped forward when  
management asked who would be willing to sponsor a foreign  
development language, quality-check external contributions and  
integrate them into Apple's internal build system, etc.


A sponsor did come forward for Perl, shortly after my rant a few  
months ago. But my life (both personal and professional) has been  
rather hectic since, and I wasn't able to deliver the goods in time  
to ship with Leopard. Mea culpa.


This does bring up something I don't think we've dealt with on this  
list in quite a few years though (when was it that OS X last came  
with Perl 5.6?  Was it Jaguar?  I can't recall)--for some period,  
probably well over a year at least, we'll be dealing with an OS X  
that does not have the most recent major release of Perl.  Time to  
start working on the FAQ about how to install 5.10 alongside  
Apple's 5.8, since how do I get 5.10 on the Mac? will become a  
perennial question on this list as soon as 5.10 is released.  Maybe  
somebody can work on an Installer package.


Installing a newer Perl hasn't been a problem for a long time - since  
Jaguar. The problem back then was that the newer version - at the  
time, 5.8.0 - tried to install its core modules under /Library/Perl  
by default, mixing them up with any CPAN modules for 5.6 that had  
been installed in the same location.


That problem was fixed, in two ways. First, as of 5.8.1, Perl  
reverted back to using the traditional /usr/local for its default  
install prefix. And second, Apple added version-specific  
subdirectories, so even if one were to use a prefix of /usr to  
install 5.10, its core modules still wouldn't overwrite any of 5.8.8's.


The best thing Apple could do is remove the old article about  
upgrading Jaguar to 5.8. It was written before 5.8.1 was released,  
and reflects the /Library/Perl default location of 5.8.0. It's really  
no longer applicable. But, it's still the first article that comes up  
at apple.com when you google for macintosh upgrade perl, so a lot  
of people still follow its advice, thinking that something at  
apple.com is authoritative. At the very least, Apple should add this  
article is obsolete in big bold red letters at the top of the page.


(How to install 5.10 *over* Apple's 5.8 may also be a topic to at  
least discuss


If by discuss you mean strongly discourage, I agree with you.

sherm--

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




PerlObjCBridge

2007-10-17 Thread macshaggy
Just a simple question. I have upgraded my Perl to 5.8.8, but I did
not overwrite the default Perl, rather I installed 5.8.8 into /usr/
local/bin. I was wondering if I could still use PerlObjCBridge that
comes with the Mac OS X Perl?

I remember back in Jaguar if you upgraded your perl it wouldn't work
with PerlObjCBridge. Is that still true?

I can't wait for Leopard, but I'm going to have to since I can't
afford to spend the money on it next week.

Thanks for any insight.



Re: Leopard Perl version... @ 1192462023

2007-10-17 Thread David Cantrell
Doug McNutt wrote:
 At 15:29 +0100 10/16/07, David Cantrell wrote:
 The one I'm most looking forward to is perl being relocatable.  Current
 versions of perl have the values for @INC hard-coded into the binary at
 compile-time.
 
 You can add to @INC in perl 5 by defining an environment variable PERL5LIB..

It means a lot more than just doing that.  You can't use PERL5LIB to
*remove* things from the search path.

-- 
David Cantrell | Minister for Arbitrary Justice

Please stop rolling your Jargon Dice and explain the problem
you are having to me in plain English, using small words.
  -- John Hardin, in the Monastery


Re: Thanks Apple! You snubbed perl yet again!

2007-10-17 Thread Alex Robinson
Not a single word about perl. No mention of CamelBones, using the 
Scripting Bridge for perl, or the fact that perl has CPAN with 
12,000+ high quality



I'm surprised that you are surprised. After all you took part in the 
thread in which Sherm said this:


   http://www.mail-archive.com/macosx@perl.org/msg09739.html


Maybe Ed Moy can fill us in on why that internal pickup never 
happened but that is by the by. The real issue is that perl people 
using OS X didn't get excited enough about CamelBones to pitch in and 
help.[0] Can you really blame Apple for not getting hot and sweaty 
about it too?


All we can hope for is that Sherm now comes out from under the dark 
cloak of an NDA and tells us something new and exciting...




[0] I'm a designer and very lightweight scripter. Hacking a bridge is 
way beyond my capabilities. But I did help out with some graphics and 
an initial website design. And a command line tool for ShuX.


Re: PerlObjCBridge

2007-10-17 Thread David Cantrell
macshaggy wrote:

 I can't wait for Leopard, but I'm going to have to since I can't
 afford to spend the money on it next week.

I can wait for it, because I always like to let other people test an OS
before I use it :-)

-- 
David Cantrell | http://www.cantrell.org.uk/david

You can't judge a book by its cover, unless you're a religious nutcase


Re: Thanks Apple! You snubbed perl yet again!

2007-10-17 Thread Ken Williams


On Oct 17, 2007, at 10:43 AM, [EMAIL PROTECTED] wrote:



On Oct 17, 2007, at 5:25 PM, brian d foy wrote:


In article [EMAIL PROTECTED],
[EMAIL PROTECTED] wrote:

It looks like I will have to stick with debian for developing my  
LAMP

applications.


If you want to work on the Mac, you still can. It doesn't sound like
you want to though.


It may sound like that to you, but if I didn't want to develop (in  
perl) on the Mac, why would I bother writing about this at all?


Perhaps brian thought it was odd that you'd refuse to develop on a  
platform because of the wrong marketing statements, when all the  
right tools are there for both you and any target users.


 -Ken