Re: OS X: iTunes to HTML, by yours truly

2002-11-13 Thread _brian_d_foy
In article , Morbus Iff <[EMAIL PROTECTED]> 
wrote:

> I've recently been reorganizing my mp3 collections, and part of the reason
> was because I wanted to generate a listing of my albums automatically, but
> with ultimate control over the display. Most of the shareware/freeware
> converters worked, but didn't give me enough control.

here's a quick Mac::iTunes script to do the same thing.  you can do just about 
anything you like in the template file. if you want real control, separate
data generation from presentation. :)

   #!/usr/bin/perl
   
   use Mac::iTunes;
   use Text::Template 'fill_in_file';
   
   my $template = $ARGV[0] || die "Specify an output template file\n";
   my $file = $ARGV[1] || "$ENV{HOME}/Music/iTunes/iTunes 3 Music Library";
   my $playlist = $ARGV[2] || 'Library';
   
   die "Music library file [$file] does not exist\n"   unless -e $file;
   die "Output template file [$file] does not exist\n" unless -e $template;
   
   my $itunes = Mac::iTunes->read( $file );
   die unless ref $itunes;
   
   my $playlist = $itunes->get_playlist( $playlist );
   
   print fill_in_file( $template, HASH =>
  {
  playlist => $playlist->title,
  items=> [ $playlist->items ],
  } );

Here's a template file example to make tab delimited output.

   {
   use Mac::iTunes::Item;
   
   my $string = "Playlist $playlist\n";
   
   foreach my $item ( @items )
  {
  $string .= join "\t", map { $item->$_ } qw(title artist);
  }
   
   $string;
   }

Here's a template for an HTML table.

   
   
  Playlist { $playlist }
   
   
   
   
   
  {
  use Mac::iTunes::Item;
  use CGI qw(:html);
  
  foreach my $item ( @items )
 {
 $string .= Tr( td( $item->title ), td( $item->artist ) );
 }
  
  $string;
  }
   
   
   
   



Re: BBEdit 7.0

2002-11-13 Thread Peter N Lewis
Yeah, I considered that, but I figured it'd be mentioned somewhere in the
BBEdit docs if I had to go to that length.  Anyway, BBEdit appears to try to
contact the correct server, which leads me to believe it is reading my
config (or at least some of it).  Or is the hostname in the CVS/ directories
somewhere?  Anyway, I'll try futzing with environment.plist tomorrow...


Yes, once you setup a CVS directory, it no longer needs the CVS ROOT 
(it is in ./CVS/Root & ./CVS/Repository.  You still need the CVS RSH 
setting though, at least if you want it to go through ssh.

(Disclosure triangles? "Possibly Anarchie 4.0" --Peter N Lewis, 12/99)
(glad to see they finally made it ;)


Yeah, must be one of those features we've run out of, or maybe 
something not too difficult we could implement ;-)
   Peter.

--
  


Re: BBEdit 7.0

2002-11-13 Thread _brian_d_foy
In article , Peter N Lewis 
<[EMAIL PROTECTED]> wrote:

> At 14:18 -0500 13/11/02, John Siracusa wrote:
> >On 11/13/02 11:46 AM, Adrian Howard wrote:
> >>  And CVS support too! Excellent!
> >
> >Hrm, not so excellent for me so far...it just hangs with the "connecting"
> >dialog box and then fails.  CVS works fine from the command line.  Maybe
> >BBEdit isn't picking up my CVS environment variables?  I thought there'd be
> >someplace to set them in the BBEdit prefs, but I haven't found it yet...
> 
> Where are your environment variables configured?
> 
> For BBEdit to have them, they probably need to be in:
> 
> ~/.MacOSX/environment.plist

indeed.  i talked about this recently on use.perl

   http://use.perl.org/~brian_d_foy/journal/8915



Re: BBEdit 7.0

2002-11-13 Thread _brian_d_foy
In article <[EMAIL PROTECTED]>, John Siracusa 
<[EMAIL PROTECTED]> wrote:

>> Yeah, I considered that, but I figured it'd be mentioned somewhere in the
> BBEdit docs if I had to go to that length.  Anyway, BBEdit appears to try to
> contact the correct server, which leads me to believe it is reading my
> config (or at least some of it).  Or is the hostname in the CVS/ directories
> somewhere?  Anyway, I'll try futzing with environment.plist tomorrow...

most of the stuff CVS needs are in the per-directory CVS special directory.
however, CVS by default tries to use RSH.  you probably want to use SSH,
so you have to set the CVS_RSH environment variable.



Re: OS X: iTunes to HTML, by yours truly

2002-11-13 Thread _brian_d_foy
In article , Morbus Iff <[EMAIL PROTECTED]> 
wrote:

> In most things, I code, I try to think of "ok, what if someone else is
> going to use this?". In that case, I ruled out Mac::iTunes - there's so
> many dependencies that I'm not even bothering exploring it further (which
> is unfortunate, primarily for my snap decision). 

you shouldn't have any problem installing any of the dependencies with
CPAN.pm though.

did you have problems?

the XML format doesn't gve you everything that iTunes knows about the
mp3 files.  you'll have to look in the "iTunes Music Library" for some of it.



OS X: iTunes to HTML, by yours truly

2002-11-13 Thread Morbus Iff

I've recently been reorganizing my mp3 collections, and part of the reason
was because I wanted to generate a listing of my albums automatically, but
with ultimate control over the display. Most of the shareware/freeware
converters worked, but didn't give me enough control.

In most things, I code, I try to think of "ok, what if someone else is
going to use this?". In that case, I ruled out Mac::iTunes - there's so
many dependencies that I'm not even bothering exploring it further (which
is unfortunate, primarily for my snap decision). I also ruled out
MP3::Info, which had some issues with "originally SoundJam 2.2, but iTunes
converted to 2.4, and now they're screwed", and also couldn't get as much
information as I wanted.

So, using the automatic XML export from iTunes 3.01, I've created a simple
Perl script that only requires HTTP::Date (disabling it means commenting
three lines). This script:

 - accepts path to the XML export on the command line.
 - sucks in all the information in the XML file.
 - is pretty strict about what is required in id3 tags.
 - can show what albums have been newly added in the past 30 days.
 - can show other little bits of information, (I'll be adding more).

You can see the output of the script here:

 http://www.disobey.com/d/lists/cds.html

And the source code itself here:

 http://www.disobey.com/d/perl/itunes2html.txt

It's a one-day script sorta thing, so I'm sure there are some idiocies or
places where I can improve on the code. If you have any thoughts, lemme know.

-- 
Morbus Iff ( shower your women, i'm coming )
Culture: http://www.disobey.com/ and http://www.gamegrene.com/
Tech: http://www.oreillynet.com/pub/au/779 - articles and weblog
icq: 2927491 / aim: akaMorbus / yahoo: morbus_iff / jabber.org: morbus



Re: BBEdit 7.0 - Not Impressed

2002-11-13 Thread Chris Nandor
In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] (_brian_d_foy) wrote:

> i'll have to see about this CVS tool thing.  i'm dubious.

It really rocks.  It's fairly simple, but it works great.  I really only 
want to do a few things with CVS in my text editor: commit and diff.  
And both are now a simple key-command away; commit brings up a message 
window to type in, and diff brings up a list of revisions to diff 
against (and, of course, takes you to the great BBEdit differences 
windows to view the diff).

I use it for a few other little things, like revision history and 
checking the status, but the ability to do commit and diff is huge for 
me.

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



Re: BBEdit 7.0

2002-11-13 Thread John Siracusa
On 11/13/02 9:43 PM, Peter N Lewis wrote:
> At 14:18 -0500 13/11/02, John Siracusa wrote:
>> On 11/13/02 11:46 AM, Adrian Howard wrote:
>>>  And CVS support too! Excellent!
>> 
>> Hrm, not so excellent for me so far...it just hangs with the "connecting"
>> dialog box and then fails.  CVS works fine from the command line.  Maybe
>> BBEdit isn't picking up my CVS environment variables?  I thought there'd be
>> someplace to set them in the BBEdit prefs, but I haven't found it yet...
> 
> Where are your environment variables configured?
> 
> For BBEdit to have them, they probably need to be in:
> 
> ~/.MacOSX/environment.plist

Yeah, I considered that, but I figured it'd be mentioned somewhere in the
BBEdit docs if I had to go to that length.  Anyway, BBEdit appears to try to
contact the correct server, which leads me to believe it is reading my
config (or at least some of it).  Or is the hostname in the CVS/ directories
somewhere?  Anyway, I'll try futzing with environment.plist tomorrow...

(Disclosure triangles? "Possibly Anarchie 4.0" --Peter N Lewis, 12/99)
(glad to see they finally made it ;)
-John




Re: BBEdit 7.0

2002-11-13 Thread Peter N Lewis
At 14:18 -0500 13/11/02, John Siracusa wrote:

On 11/13/02 11:46 AM, Adrian Howard wrote:

 And CVS support too! Excellent!


Hrm, not so excellent for me so far...it just hangs with the "connecting"
dialog box and then fails.  CVS works fine from the command line.  Maybe
BBEdit isn't picking up my CVS environment variables?  I thought there'd be
someplace to set them in the BBEdit prefs, but I haven't found it yet...


Where are your environment variables configured?

For BBEdit to have them, they probably need to be in:

~/.MacOSX/environment.plist

Which needs to be something like:






CVSROOT
yourusername@yourhost:/cvs
CVS_RSH
ssh
DISPLAY
localhost
LC_ALL
C
PERL5LIB
/Library/Perl:/Users/yourusername/perl




Changes take effect at login, so you'll need to logout and log back in.

From what I've seen, there are three places you can put environment variables:

~/.MacOSX/environment.plist - used by everything you launch directly.

~/.cshrc or ~/.tcshrc - used by any tcsh shell you launch (including 
remotely accessed ones).  Terminal launched ones probably pick up the 
environment.plist variables, but if you ssh into your Mac from 
another Mac, then probably not.
setenv PERL5LIB /Library/Perl:/Users/yourusername/perl
setenv CVSROOT yourusername@yourhost:/cvs
setenv CVS_RSH ssh
setenv LC_ALL C

crontab -e file - you can also set envrionment variables in your 
crontab which will get used when executing cron actions.
PERL5LIB=/Library/Perl:/Users/yourusername/perl
LC_ALL=C
12 1 * * * perl dosomething.pl

Enjoy,
   Peter.


--
  


searching cpan with Chimera (was Re: Sherlock SDK released)

2002-11-13 Thread Puneet Kishor

On Wednesday, November 13, 2002, at 08:31  PM, David Wheeler wrote:


On Wednesday, November 13, 2002, at 05:48  PM, Ken Williams wrote:


So I can just type "cpan Mac::Carbon" in the Location bar, and it 
does the search.  Real slick.  I've also got them for google.com & 
m-w.com.

Yeah, I heard there was a way to do this with Mozilla, too, but it 
didn't work with Chimera when I tried it.


do the following --

open up the Navigator (aka Chimera) package (show contents in finder), 
and open up Navigator:Contents:MacOS:defaults:pref:all.js with your 
favorite text editor.

Find the following code block
// URI fixup prefs
pref("browser.fixup.alternate.enabled", true);
pref("browser.fixup.alternate.prefix", "www.");
pref("browser.fixup.alternate.suffix", ".com");

to

// URI fixup prefs
pref("browser.fixup.alternate.enabled", true);
pref("browser.fixup.alternate.prefix", "search.cpan.org/search?query=");
pref("browser.fixup.alternate.suffix", "&m=.com");


save, and restart Chimera. Type the name of a package in the address 
bar and find it directly on cpan. If the package name has spaces, 
replace the spaces with +.

In order to search Google instead (which is what I prefer, because 
Google finds cpan stuff anyway, make the three lines like so --

// URI fixup prefs
pref("browser.fixup.alternate.enabled", true);
pref("browser.fixup.alternate.prefix", "www.google.com/search?q=");
pref("browser.fixup.alternate.suffix", "&m=.com");


puneet.



Re: BBEdit 7.0 - Not Impressed

2002-11-13 Thread _brian_d_foy
In article <[EMAIL PROTECTED]>, Mark S Lowe 
<[EMAIL PROTECTED]> wrote:

> This is BARELY an update. BBEdit is going the way of Interarchy.=20
> They've run out of features, or in most causes reached a point where=20
> they refuse to program anything difficult, so we're left with features=20=

they have seem rather ossified.

i had a few exchanges with their techies about syntax coloring.  some of my
code doesn't color correctly, and they don't color everything i need.

i could fix things if i wanted to buy CodeWarrior and go through all of
that pain, but i think they should have a better mechanism for that.
why should i have to compile somthing for every language?  i should
be able to write a language description file, like vim has perhaps, 
and that is that.

a few other exchanges on things like that lead me to beleive their
locked into their code base now.

i love the program, and i buy every version, but i do miss some of the
aspects of open source development.  i still wouldn't give it up because
i like it much better than any other editor that has ever existed. :)

i'll have to see about this CVS tool thing.  i'm dubious.



Re: Sherlock SDK released

2002-11-13 Thread Chris Nandor
In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] (Pete Prodoehl) wrote:

> There is a Mycroft http://mycroft.mozdev.org/ plugin for CPAN I believe...
> 
> Which should be compatible with Sherlock.

That's the old Sherlock.  Sherlock 3, new with Jaguar, is completely 
different.  The other ones were just little text files which described 
how to send and process search forms.  Sherlock 3 is web services and 
JavaScript, and designing a UI rather than just a few text parameters.

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



Re: OS X Installed numbers (Was Re: mac-toolbox)

2002-11-13 Thread David Wheeler
On Wednesday, November 13, 2002, at 06:06  PM, Rich Morin wrote:


There is also the group that is sticking to Mac OS for reasons of 
caution.
I expect many of these folks to switch over in the next year, 
however...

Some will also stick to Mac OS for a while because it's still faster 
than Mac OS X for a lot of things. Pity, that.

David

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



Re: Sherlock SDK released

2002-11-13 Thread David Wheeler
On Wednesday, November 13, 2002, at 05:48  PM, Ken Williams wrote:


So I can just type "cpan Mac::Carbon" in the Location bar, and it does 
the search.  Real slick.  I've also got them for google.com & m-w.com.

Yeah, I heard there was a way to do this with Mozilla, too, but it 
didn't work with Chimera when I tried it.

Regards,

David

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



Re: OS X Installed numbers (Was Re: mac-toolbox)

2002-11-13 Thread Rich Morin
At 11:27 AM +1100 11/14/02, Ken Williams wrote:

On Wednesday, November 13, 2002, at 03:58  PM, Rich Morin wrote:


 At 8:45 PM -0500 11/12/02, John Gruber wrote:

 Even Apple admits that they expect only 20 percent of the Mac user
 base to be running OS X by the end of 2002. It could be quite a long
 time before that number gets to 50.


 There are ~25 million Macs out there.  20% of this is ~5 million.  If
 Apple sells ~5 million Macs in 2003 (all running OSX) and another 10%
 of the existing base switch over, you have ~50% by the end of 2003.


Eh?  5M new Macs, all on OS X, brings the ratio to 10M OS X, 20M 
MacOS.  Then 10% or the existing base is 2.5M, which would bring it 
to 12.5M OS X, 17.5M MacOS.  That's still only 41.7% for OS X.

Sorry for the sloppy math.  Bear in mind, however, that I also left out
the issue of folks who simply abandon their old Macs.  This tends to bring
the percentage back up.  In any case, my point was that it won't take all
_that_ long to reach 50%.


However, I'm generally optimistic about it - I'm guessing that most of the
MacOS users are in one of the following categories:

 1) People who can't upgrade hardware or software for various reasons, so
they keep a "static" system which doesn't need (and can't get anymore)
much support

 2) High-end users who are dying to switch, but need to wait until their
software is properly supported, or until they can properly do a massive
switchover of technologies in their business

There are doubtless some people who stick with MacOS because they just
like it better, but I bet there aren't very many of them.


There is also the group that is sticking to Mac OS for reasons of caution.
I expect many of these folks to switch over in the next year, however...

-r
--
email: [EMAIL PROTECTED]; phone: +1 650-873-7841
http://www.cfcl.com/rdm- my home page, resume, etc.
http://www.cfcl.com/Meta   - The FreeBSD Browser, Meta Project, etc.
http://www.ptf.com/dossier - Prime Time Freeware's DOSSIER series
http://www.ptf.com/tdc - Prime Time Freeware's Darwin Collection



Re: Sherlock SDK released

2002-11-13 Thread Ken Williams

On Thursday, November 14, 2002, at 04:42  AM, David Wheeler wrote:


On Wednesday, November 13, 2002, at 09:21  AM, Nathan Torkington wrote:


Released today, the Sherlock 3 Software Development Kit, opening
Sherlock to 3rd party channel development:

http://developer.apple.com/macosx/sherlock/


Damn. Once someone writes a search.cpan.org plugin, I might 
actually have to start using Sherlock...

If you're using OmniWeb, the 'shortcuts' preference feature is 
really nice for this.  I've got this one:

 Shortcut: cpan@
 Destination URL: http://search.cpan.org/search?mode=all&query=%@;

So I can just type "cpan Mac::Carbon" in the Location bar, and 
it does the search.  Real slick.  I've also got them for 
google.com & m-w.com.


 -Ken



Re: segmentation fault when searching for repeated text

2002-11-13 Thread Ken Williams

On Wednesday, November 13, 2002, at 10:55  PM, Eike Grote wrote:


Hi,

Gakuji Ohtori <[EMAIL PROTECTED]> said:


The following code ends up with an error (segmentation fault):

	$_ = 'x' x 1000;
	/(a.|.){2,}/o;

The segmentation fault seems to happen only when the searched text ($_
in this example) is longer than 855 characters.

I know that m and n in the {m,n} qualifier are limited, but 
there isn't
a limitation for the length of the searched text, is there?

It looks like a problem caused by the regex engine. When running the
code with Perl 5.6.1 on Solaris 8 I don't get a segmentation fault,
but the following message when $_ has more than 32766 characters:

  Complex regular subexpression recursion limit (32766) exceeded
  at ./test.pl line 6.


Yeah, that's what "should" happen, I think.  The regex engine 
has some limitation in terms of recursion, and the regex you're 
using recurses quite badly.

Here's what the docs `man perldiag` say about it:

   Complex regular subexpression recursion limit (%d)
   exceeded
   (W regexp) The regular expression engine uses recur-
   sion in complex situations where back-tracking is
   required.  Recursion depth is limited to 32766, or
   perhaps less in architectures where the stack cannot
   grow arbitrarily.  ("Simple" and "medium" situations
   are handled without recursion and are not subject to a
   limit.)  Try shortening the string under examination;
   looping in Perl code (e.g. with "while") rather than
   in the regular expression engine; or rewriting the
   regular expression so that it is simpler or backtracks
   less.  (See the perlfaq2 manpage for information on
   Mastering Regular Expressions.)


 -Ken



Re: OS X Installed numbers (Was Re: mac-toolbox)

2002-11-13 Thread David Wheeler
On Wednesday, November 13, 2002, at 04:27  PM, Ken Williams wrote:


 2) High-end users who are dying to switch, but need to wait until 
their software is properly supported, or until they can properly do a 
massive switchover of technologies in their business

You can probably blame Quark for about 90% of this. They're *really* 
far behind updating QuarkXPress to Mac OS X, and they still pretty well 
own the professional design layout market.

D

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



Re: ImageMagick vs. NetPBM

2002-11-13 Thread Adam Wells
At 18:34 -0600 11/13/02, Puneet Kishor wrote:

Thanks Adam, for a good description of NetPBM. I understand that 
better now. Seems very similar to ImageMagick (which is also a suite 
of tools).

I have spent some time looking at PBMPlus at acme.com, and reading 
the NetPBM docs, but I don't see much interfacing with Perl.

If I were using Perl for cgi, what would be the mechanism for 
interfacing with the NetPBM programs? CPAN did not reveal any 
packages for use with NetPBM or PBM.

When I did this, I didn't use any Perl-specific interface, I just 
called them as I would any other external one-shot program, either 
with system() or with backticks (`command`).  Worked fine, but then 
again, I wasn't too concerned with it being super-fast as long as it 
worked correctly.

adam


Re: ImageMagick vs. NetPBM

2002-11-13 Thread Puneet Kishor
Thanks Adam, for a good description of NetPBM. I understand that better 
now. Seems very similar to ImageMagick (which is also a suite of tools).

I have spent some time looking at PBMPlus at acme.com, and reading the 
NetPBM docs, but I don't see much interfacing with Perl.

If I were using Perl for cgi, what would be the mechanism for 
interfacing with the NetPBM programs? CPAN did not reveal any packages 
for use with NetPBM or PBM.


Adam Wells wrote:
At 10:46 -0600 11/13/02, Puneet Kishor wrote:


There has been a lot of discussion here re (Image|Perl)Magick. I have 
not installed it on my iBook but have installed and used it on my 
Windoze box and found it to be very fun. However, I recently came 
across NetPBM. While it might be old news for some of you, I had never 
heard of it, and reading through the docs it seems to be everything 
ImageMagick is.

Any insights into NetPBM as a replacement/substitute/alternative for 
ImageMagick on Perl/OS X platform would be greatly appreciated.


I've used NetPBM for some personal projects and found that it filled my 
needs.  It can convert images to various formats, rotate them, scale 
them, add borders, and do various other operations.  It does this 
through the use of small tools that you can chain together (as with many 
Unix toolsets).

You can do such things as rotate to an arbitrary angle (pnmrotate), flip 
(pnmflip), scale or resize (pnmscale), overlay images (pnmcomp), 
quantize the colors (pnmquant), render text into an image (pnmtext), 
create a grayscale or color ramp (pnmramp), add text to an image 
(ppmlabel), brighten or dim an image (ppmbrighten), concatenate images 
(pnmcat), add borders (pnmpad), select a rectangular region (pamcut), 
remove snow (pnmclean), and many more.  You can even apply the rules of 
Conway's Game of Life to an image (pbmlife).  Each of these is a 
distinct tool, and when you install NetPBM, you get about 220 of these 
little tools that all do one thing each.  Then you combine them in shell 
scripts, lengthy command lines with lots of pipes, or whatever.  And 
they each have a good man page. :)

For my needs, I was using Perl to create POV-Ray source code, which I 
would render into 360-degree panoramic images.  Then I needed to rotate, 
resize, and convert them to another format before they got passed to my 
image-to-QTVR tool to create QTVR movies.  NetPBM was great for these 
needs.  I'll probably be adding some labels or text later and NetPBM 
will be able to do that too.

The downside to NetPBM is that all of the tools work with only the PBM 
or PPM formats, so you need to get your images into this format first.  
But there's usually a NetPBM tool to convert your image into PBM, as 
well as to convert it from PBM to your desired final format after you've 
manipulated it.

Unfortunately, I can't really compare it to ImageMagick since I've never 
used it -- NetPBM is what I heard of first and it was able to fill all 
my needs, so I never really felt a need to investigate IM.

adam





OS X Installed numbers (Was Re: mac-toolbox)

2002-11-13 Thread Ken Williams

On Wednesday, November 13, 2002, at 03:58  PM, Rich Morin wrote:


At 8:45 PM -0500 11/12/02, John Gruber wrote:

Even Apple admits that they expect only 20 percent of the Mac user
base to be running OS X by the end of 2002. It could be quite a long
time before that number gets to 50.


There are ~25 million Macs out there.  20% of this is ~5 million.  If
Apple sells ~5 million Macs in 2003 (all running OSX) and another 10%
of the existing base switch over, you have ~50% by the end of 2003.


Eh?  5M new Macs, all on OS X, brings the ratio to 10M OS X, 20M 
MacOS.  Then 10% or the existing base is 2.5M, which would bring 
it to 12.5M OS X, 17.5M MacOS.  That's still only 41.7% for OS X.

However, I'm generally optimistic about it - I'm guessing that 
most of the MacOS users are in one of the following categories:

 1) People who can't upgrade hardware or software for various 
reasons, so they keep a "static" system which doesn't need (and 
can't get anymore) much support

 2) High-end users who are dying to switch, but need to wait 
until their software is properly supported, or until they can 
properly do a massive switchover of technologies in their 
business

There are doubtless some people who stick with MacOS because 
they just like it better, but I bet there aren't very many of 
them.

Anyway, where does that 20% figure from Apple come from?  That 
seems low to me, but maybe it reflects a bunch of machines in 
school labs and so on?

 -Ken



Re: ImageMagick vs. NetPBM

2002-11-13 Thread Adam Wells
At 10:46 -0600 11/13/02, Puneet Kishor wrote:

There has been a lot of discussion here re (Image|Perl)Magick. I 
have not installed it on my iBook but have installed and used it on 
my Windoze box and found it to be very fun. However, I recently came 
across NetPBM. While it might be old news for some of you, I had 
never heard of it, and reading through the docs it seems to be 
everything ImageMagick is.

Any insights into NetPBM as a replacement/substitute/alternative for 
ImageMagick on Perl/OS X platform would be greatly appreciated.

I've used NetPBM for some personal projects and found that it filled 
my needs.  It can convert images to various formats, rotate them, 
scale them, add borders, and do various other operations.  It does 
this through the use of small tools that you can chain together (as 
with many Unix toolsets).

You can do such things as rotate to an arbitrary angle (pnmrotate), 
flip (pnmflip), scale or resize (pnmscale), overlay images (pnmcomp), 
quantize the colors (pnmquant), render text into an image (pnmtext), 
create a grayscale or color ramp (pnmramp), add text to an image 
(ppmlabel), brighten or dim an image (ppmbrighten), concatenate 
images (pnmcat), add borders (pnmpad), select a rectangular region 
(pamcut), remove snow (pnmclean), and many more.  You can even apply 
the rules of Conway's Game of Life to an image (pbmlife).  Each of 
these is a distinct tool, and when you install NetPBM, you get about 
220 of these little tools that all do one thing each.  Then you 
combine them in shell scripts, lengthy command lines with lots of 
pipes, or whatever.  And they each have a good man page. :)

For my needs, I was using Perl to create POV-Ray source code, which I 
would render into 360-degree panoramic images.  Then I needed to 
rotate, resize, and convert them to another format before they got 
passed to my image-to-QTVR tool to create QTVR movies.  NetPBM was 
great for these needs.  I'll probably be adding some labels or text 
later and NetPBM will be able to do that too.

The downside to NetPBM is that all of the tools work with only the 
PBM or PPM formats, so you need to get your images into this format 
first.  But there's usually a NetPBM tool to convert your image into 
PBM, as well as to convert it from PBM to your desired final format 
after you've manipulated it.

Unfortunately, I can't really compare it to ImageMagick since I've 
never used it -- NetPBM is what I heard of first and it was able to 
fill all my needs, so I never really felt a need to investigate IM.

adam


Re: BBEdit 7.0 - Not Impressed

2002-11-13 Thread Mark S Lowe
This is BARELY an update. BBEdit is going the way of Interarchy. 
They've run out of features, or in most causes reached a point where 
they refuse to program anything difficult, so we're left with features 
that barely effect the major user base.

BBEdit needs:

• A MUCH stronger Find and Replace manager (LIKE BATCH PROCESSING) - 
but I've already mentioned it, and regardless of the fact everyone 
developer I know would benefit GREATLY from such a feature, the 
developers refuse to make it, because it's too hard.

• Better Recent document management. What do we get now? A 
non-configurable (w/o hacking) interface that remembers a handful of 
documents. I've suggested methods of enhancing the Windows palette to 
partition itself into two sections, and of course...the GUI gods at 
BareBones put their own bias over customer needs. At LEAST they could 
offer a Preference entry for how many recent documents we'd like to 
see. An no, a clunky File Group is not a viable solution.

• Better Color Management. Some of us use black backgrounds...well that 
means that if we want to print our code in color, none of the color 
values print worth a damn because their brightness levels are too high. 
Why not offer a brightness reduction during printing for those of us 
using low emission settings?

• Better Spell Checker. What year is it? The suggestions and overall 
interface is in dire need of some serious love. 7.0 should definitely 
have addressed the last two versions that barely changed this 
interface. I was specifically told when version 6.0 came out that Spell 
Checking was going to get a boost in functionality. Still waiting.

• Better line selection. Simple...you click the line number, the line 
is selected. WOW! I'm a genius!

• Better Font Management. Do we really need to select through every 
version of a single font? Where are the programmers self-respect? Why 
not integrate the OSX Font Panel?

• Where did the table builder go? This was a GREAT piece of software 
that just disappeared, and yet it solved a HUGE labor problem in laying 
out tables. No it wasn't perfect, but when I need a perfect number of 
columns and rows, it was there for me.

• Improved Document Info panel. It's nice to know how many characters 
are in a document, but what about which character I'm on? Thanks for 
the ROW / CHARACTER indicator, but that doesn't do a thing for tracking 
error log info that says you have a syntax error at character 433 in 
document blah.cgi.

• Improved ƒunction menu. I like the enhancements for HTML section 
recognition, but how about noticing the functions I've called within 
Perl sub routines. As in:

	myProcedure
		goDoSomething
		goDoSomethingElse

All in all, I'm a little sad with 7.0. BBEdit is a text editor first 
and foremost. When a company loses sight of their core business, they 
start to decline, and eventually disappear. 7.0 is the first step into 
the grave without going to Windows. Keep terminal software, ftp images, 
and all other extraneous stuff OFF the R&D plate until you've mastered 
text editing.

-m-

On Wednesday, November 13, 2002, at 08:29  AM, Bill Stephenson wrote:

Did you see that rectangular text selections made it into BBEdit 7.0 
:) Not
only was Jim listening to us, he (they?) must have worked pretty hard 
to get
this feature ready in time for the 7.0 release. Looks like some other 
cool
features are in there too. I'm getting mine now!

--

Bill Stephenson







Re: Sherlock SDK released

2002-11-13 Thread Pete Prodoehl

There is a Mycroft http://mycroft.mozdev.org/ plugin for CPAN I believe...

Which should be compatible with Sherlock.


Pete

David Wheeler wrote:

On Wednesday, November 13, 2002, at 09:21  AM, Nathan Torkington wrote:


Released today, the Sherlock 3 Software Development Kit, opening
Sherlock to 3rd party channel development:

http://developer.apple.com/macosx/sherlock/



Damn. Once someone writes a search.cpan.org plugin, I might actually 
have to start using Sherlock...

David





Re: ImageMagick vs. NetPBM

2002-11-13 Thread Pete Prodoehl

I know that Gallery http://gallery.sf.net/ uses NetPBM, I've toyed with 
it a bit, and it probably matches most of the ImageMagic functionality.


Pete

Puneet Kishor wrote:
There has been a lot of discussion here re (Image|Perl)Magick. I have 
not installed it on my iBook but have installed and used it on my 
Windoze box and found it to be very fun. However, I recently came across 
NetPBM. While it might be old news for some of you, I had never heard of 
it, and reading through the docs it seems to be everything ImageMagick is.

Any insights into NetPBM as a replacement/substitute/alternative for 
ImageMagick on Perl/OS X platform would be greatly appreciated.

Many tia,

Puneet.






EyeTV + Carbon

2002-11-13 Thread Chris Nandor
Just today, I found my first real need for Mac::Carbon in my daily work, 
since I started the port.

I have a review of EyeTV (http://www.elgato.com/eyetv/) on Slashdot 
today; while writing it, I was bemoaning the fact that it is hard to 
find which EyeTV files are which, as the filenames don't give any clue.  
Noting that the files in question are plist files, I set about to 
writing a solution this morning, to finish it in time for the review. :-)

The finished product is at http://dev.macperl.org/files/scripts/eyetv 
... but the part where Carbon helped me is below.  The path to the EyeTV 
folder is stored as alias data in the EyeTV prefs, and it needed to be 
turned into a path so I could open the directory and look at the files.

So Mac::Files::FindFolder() finds the preferences directory, Mac::Memory 
puts the alias data into a memory handle, and Mac::Files::ResolveAlias() 
turns it into a path.  M, Carbon-licious.  Enjoy!


use Mac::Files;
use Mac::Memory;

# ...

if (!$eyetvdir) {
   # find proper file from preferences, it's a Base64'd alias,
   # so get the data, stick it in a handle, and resolve it
   my $prefs = catfile(
  FindFolder(kOnSystemDisk, kPreferencesFolderType),
  'com.elgato.eyetv.plist'
   );

   # opens the plist file, gets the data, parses with Mac::PropertyList
   my $data   = get_plist($prefs);
   my $handle = new Handle $data->{value}{'archive folder'}{value};

   $eyetvdir = catdir(scalar ResolveAlias($handle), 'EyeTV Archive');
}


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



Re: Sherlock SDK released

2002-11-13 Thread Nathan Torkington
Chris Nandor writes:
> > Damn. Once someone writes a search.cpan.org plugin, I might actually 
> > have to start using Sherlock...
> 
> Bah.  Use Watson instead.  :)  Seriously, Watson is faster and has 
> mostly better tools (although that may change now ...).

Watson plugins are Cocoa applications that use Watson's LWP-like
library.  I believe Sherlock plugins are Javascript and XPath hell.
I'd love to be able to write Watson plugins with Camelbones.  Hint,
hint, Sherm :-)

Nat




Re: Sherlock SDK released

2002-11-13 Thread Chris Nandor
In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] (David Wheeler) wrote:

> On Wednesday, November 13, 2002, at 09:21  AM, Nathan Torkington wrote:
> 
> > Released today, the Sherlock 3 Software Development Kit, opening
> > Sherlock to 3rd party channel development:
> >
> > http://developer.apple.com/macosx/sherlock/

It's about time!

> Damn. Once someone writes a search.cpan.org plugin, I might actually 
> have to start using Sherlock...

Bah.  Use Watson instead.  :)  Seriously, Watson is faster and has 
mostly better tools (although that may change now ...).

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



Re: BBEdit 7.0

2002-11-13 Thread Chris Nandor
In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] (John Siracusa) wrote:

> On 11/13/02 11:46 AM, Adrian Howard wrote:
> > And CVS support too! Excellent!
> 
> Hrm, not so excellent for me so far...it just hangs with the "connecting"
> dialog box and then fails.  CVS works fine from the command line.  Maybe
> BBEdit isn't picking up my CVS environment variables?  I thought there'd be
> someplace to set them in the BBEdit prefs, but I haven't found it yet...

The only problem I had like that was when I tried to use CVS with a 
checkout that had Mac newlines.  Oopsie.  :)

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



Re: BBEdit 7.0

2002-11-13 Thread Chris Nandor
In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] (Adrian Howard) wrote:

> And CVS support too! Excellent!

The CVS support is very cool, too.

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



Re: BBEdit 7.0

2002-11-13 Thread John Siracusa
On 11/13/02 11:46 AM, Adrian Howard wrote:
> And CVS support too! Excellent!

Hrm, not so excellent for me so far...it just hangs with the "connecting"
dialog box and then fails.  CVS works fine from the command line.  Maybe
BBEdit isn't picking up my CVS environment variables?  I thought there'd be
someplace to set them in the BBEdit prefs, but I haven't found it yet...

(I know, I know, RTFM...getting to it... :)
-John




Re: Sherlock SDK released

2002-11-13 Thread David Wheeler
On Wednesday, November 13, 2002, at 09:21  AM, Nathan Torkington wrote:


Released today, the Sherlock 3 Software Development Kit, opening
Sherlock to 3rd party channel development:

http://developer.apple.com/macosx/sherlock/


Damn. Once someone writes a search.cpan.org plugin, I might actually 
have to start using Sherlock...

David

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



Sherlock SDK released

2002-11-13 Thread Nathan Torkington
--- start of forwarded message ---
From: Chris Stone <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Sherlock 3 SDK
Date: Wed, 13 Nov 2002 09:20:47 -0800

Released today, the Sherlock 3 Software Development Kit, opening 
Sherlock to 3rd party channel development:

http://developer.apple.com/macosx/sherlock/


--Chris

--- end of forwarded message ---




Re: BBEdit 7.0

2002-11-13 Thread Adrian Howard
And CVS support too! Excellent!

Where's my credit card...

Adrian

On Wednesday, November 13, 2002, at 04:29  pm, Bill Stephenson wrote:


Did you see that rectangular text selections made it into BBEdit 7.0 :) 
Not
only was Jim listening to us, he (they?) must have worked pretty hard to 
get
this feature ready in time for the 7.0 release. Looks like some other cool
features are in there too. I'm getting mine now!




ImageMagick vs. NetPBM

2002-11-13 Thread Puneet Kishor
There has been a lot of discussion here re (Image|Perl)Magick. I have 
not installed it on my iBook but have installed and used it on my 
Windoze box and found it to be very fun. However, I recently came 
across NetPBM. While it might be old news for some of you, I had never 
heard of it, and reading through the docs it seems to be everything 
ImageMagick is.

Any insights into NetPBM as a replacement/substitute/alternative for 
ImageMagick on Perl/OS X platform would be greatly appreciated.

Many tia,

Puneet.



BBEdit 7.0

2002-11-13 Thread Bill Stephenson
Did you see that rectangular text selections made it into BBEdit 7.0 :) Not
only was Jim listening to us, he (they?) must have worked pretty hard to get
this feature ready in time for the 7.0 release. Looks like some other cool
features are in there too. I'm getting mine now!

-- 

Bill Stephenson







Re: segmentation fault when searching for repeated text

2002-11-13 Thread David Wheeler
On Wednesday, November 13, 2002, at 03:55  AM, Eike Grote wrote:


This seems to be a Perl limitation. But as the other reports
(Darwin, Linux) show crashes at smaller values of $_ there
might be a problem of handling deep recursions on various OSes.


Might I suggest that someone use perlbug to report this bug to the 
perl5-porters?

David

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



Re: Mac::Carbon 0.01 Released

2002-11-13 Thread Chris Nandor
Urk, one of the tests (Types/t/Types.t) fails when running under a user 
that has no Desktop folder (e.g., root).  FindFolder(kOnSystemDisk, 
kDesktopFolderType) is unhappy.

Either edit it to another constant that will work (such as 
kApplicationsFolderType), or run the test with your normal user account.  
Or, if the only tests that fail are Types/t/Types.t, tests 3-4, then 
just force install.

Oh, and I should have warned one more thing about the test suite ... it 
plays with your system volume.  It can be loud for a few seconds, and 
quiet for a few more.  :)

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



Re: segmentation fault when searching for repeated text

2002-11-13 Thread Eike Grote
Hi,

Gakuji Ohtori <[EMAIL PROTECTED]> said:

> The following code ends up with an error (segmentation fault):
> 
>   $_ = 'x' x 1000;
>   /(a.|.){2,}/o;
> 
> The segmentation fault seems to happen only when the searched text ($_ 
> in this example) is longer than 855 characters.
> 
> I know that m and n in the {m,n} qualifier are limited, but there isn't 
> a limitation for the length of the searched text, is there?

It looks like a problem caused by the regex engine. When running the
code with Perl 5.6.1 on Solaris 8 I don't get a segmentation fault,
but the following message when $_ has more than 32766 characters:

  Complex regular subexpression recursion limit (32766) exceeded
  at ./test.pl line 6.

This seems to be a Perl limitation. But as the other reports
(Darwin, Linux) show crashes at smaller values of $_ there
might be a problem of handling deep recursions on various OSes.


Bye, Eike
-- 
Eike Grote, ConSol Software GmbH, Munich

E-Mail: [EMAIL PROTECTED]