Mission Critical Perl

2002-12-05 Thread John-Michael Keyes

Awright, I'm gonna float this one, even if it == $off_topic++;

And I float to this group first, because I'm writing mostly 
ActiveState-deployed Perl on a pilfered Mac running Jag.2.2 and a 
vanilla Perl install in an MSUBERALL shop. (And BBEdit is still the 
envy, and bane, of my Windows brethren: "Regex this... studio-boy!") 
Yes, my days are weird, but entertaining.

So the reality that I live with is:
	a. Perl is the "Language of Last Resort" culturally in the 
organization.
	b. Despite the fact that Perl is running mission-critical in EVERY 
aspect of our business.
	c. And because of (a.) MANAGEMENT doesn't know how much (b.) is going 
on.
	d. if this $ENV is atypical, let me know ([EMAIL PROTECTED]), and stop 
reading, but if this resonates, maybe a Barnumesque maneuver is 
mandated...

Because, I think there is a growing perception "out there" that is 
depreciating the value of Perl, and we need to counterfud/act it (I'm 
still not sure which) now or soon.

My notion is that collectively, we add some vocabulary to the gestalt 
of development... Maybe we call it Mission Critical Perl. You know, 
it's not com, it's dotnet (I mean .NET). So, it's not Perl it's .MCP.

What is Mission Critical Perl?
	It's code that gets the job done.
	It's strongly commented, both in architecture and execution.  (Yeah, I 
know. Perl is self commenting. Comment more anyway dammmit.)
	It logs actions. (No matter how trivial, without metrics - it ain't 
important. This is essential, if EVERY script you've written isn't 
logging, write a .pm, go back and include it. We can't show 'em how 
much we're doing with Perl unless we have a bar graph.)
	It's code reviewed.
	It's heralded: Mission Critical Perl. Maybe even .MCP
	
..MCP When what you need is: RAD, Reliable, Reporting and Robust.

So there's my teaser. If I'm alone, cool. I've been meaning to polish 
the bytes on my resume. But if you're in the same scenario, let's start 
a movement.

JMK

PS. Tim O., Think about "A Manager's Guide to Leveraging Corporate Perl 
Assets," the Killer Whale Book.



Re: Perl on PalmOS

2002-12-05 Thread Ken Williams

On Friday, December 6, 2002, at 09:30  AM, Puneet Kishor wrote:

At the risk of looking nerdy in public, I succumbed and purchased a 
Sony Clie with PalmOS 4.1. Works beautifully with my iBook 10.2.2 out 
of the box. Next purchase is a folding keyboard. Which means I can 
write Perl scripts while going lightweight. But can I run 'em?

A quick search reveals a very quiet, list(-)less Palmperl project

http://sourceforge.net/projects/palmperl/

anyone on this list who is similarly inclined and has more insight on 
this?

Would love to be able to work on my itty-bitty perl projects while on 
the road, and come back home and sync it all with my iBook.

Yeah, would be cool.  For some people, a miniperl would be better, but I 
don't know whether miniperl has evolved to be generically useful yet, or 
even whether anyone intends it to be so.  I think some people are 
opposed to creating distinct dialects of perl for general usage, and 
have intended miniperl to only be used when building perl itself.  But I 
don't know the full story on it.

 -Ken



Perl on PalmOS

2002-12-05 Thread Puneet Kishor
At the risk of looking nerdy in public, I succumbed and purchased a Sony 
Clie with PalmOS 4.1. Works beautifully with my iBook 10.2.2 out of the 
box. Next purchase is a folding keyboard. Which means I can write Perl 
scripts while going lightweight. But can I run 'em?

A quick search reveals a very quiet, list(-)less Palmperl project

http://sourceforge.net/projects/palmperl/

anyone on this list who is similarly inclined and has more insight on this?

Would love to be able to work on my itty-bitty perl projects while on 
the road, and come back home and sync it all with my iBook.

tia.

Puneet.



Re: open() a resource fork

2002-12-05 Thread Nathan Torkington
Adam Wells writes:
> You can access the resource fork of any file by appending 
> "/..namedfork/rsrc" to its name.

>From /usr/include/sys/paths.h:

  * Provides support for system wide forks */
  #define _PATH_FORKSPECIFIER"/..namedfork/"
  #define _PATH_DATANAME "data"
  #define _PATH_RSRCNAME "rsrc"
  #define _PATH_RSRCFORKSPEC "/..namedfork/rsrc"

(this is all heavily ifdefed to be "Apple only, stay the hell out
everyone else" :-)

Nat




Re: open() a resource fork

2002-12-05 Thread Chris Nandor
At 13:21 -0500 2002.12.05, Sherm Pendley wrote:
>On Thursday, December 5, 2002, at 12:38 PM, Chris Nandor wrote:
>
>> Does anyone know how to open a resource fork, with open(), sysopen(),
>> POSIX::open(), etc.?  On Mac OS, I would use O_RSRC, but that is
>> apparently
>> not available in Mac OS X's fcntl.h.
>
>open("filename/rsrc");

I tried that.  Didn't work.

open($rf, ">filename/rsrc") or die $!;

Oh, I see.  I need to first create the file, THEN I can open the rsrc fork.

open($df, ">filename") or die $!;
open($rf, ">filename/rsrc") or die $!;

There we go.  Thanks,

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



Re: open() a resource fork

2002-12-05 Thread Chris Nandor
In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] (Sherm Pendley) wrote:

> On Thursday, December 5, 2002, at 12:38 PM, Chris Nandor wrote:
> 
> > Does anyone know how to open a resource fork, with open(), sysopen(),
> > POSIX::open(), etc.?  On Mac OS, I would use O_RSRC, but that is 
> > apparently
> > not available in Mac OS X's fcntl.h.
> 
> open("filename/rsrc");

I tried that.  Didn't work.

   open($rf, ">filename/rsrc") or die $!;

Oh, I see.  I need to first create the file, THEN I can open the rsrc fork.  
D'oh.

   open($df, ">filename") or die $!;
   open($rf, ">filename/rsrc") or die $!;

There we go.  Much better than using ResMerger.  Thanks,

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



Re: open() a resource fork

2002-12-05 Thread Adam Wells
At 12:38 -0500 12/5/02, Chris Nandor wrote:

Does anyone know how to open a resource fork, with open(), sysopen(),
POSIX::open(), etc.?  On Mac OS, I would use O_RSRC, but that is apparently
not available in Mac OS X's fcntl.h.


You can access the resource fork of any file by appending 
"/..namedfork/rsrc" to its name.  Here's an example with my Mac OS 9 
system suitcase, which the Finder reports as about 15 MB in size.  It 
actually has about 7 MB of data fork and 8 MB of resource fork:

[bh2065:/System Folder] adam% ls -l System
14900 -rwxrwxrwx  1 adam  admin  7193280 Nov 11 17:45 System*
[bh2065:/System Folder] adam% ls -l System/..namedfork/rsrc
14900 -rwxrwxrwx  1 adam  admin  8059739 Nov 11 17:45 System/..namedfork/rsrc*

Similarly, here's a find command to find all files in the current 
directory with a resource fork (actually, all files with a resource 
fork of nonzero size):

find . \( -type f -and -exec test -s \{\}\/..namedfork\/rsrc \; \) -print

We used to use "/rsrc" appended to the name, but this has been 
deprecated in favor of "/..namedfork/rsrc".  (Although /rsrc still 
works in Jaguar.)

adam


Re: open() a resource fork

2002-12-05 Thread Sherm Pendley
On Thursday, December 5, 2002, at 12:38 PM, Chris Nandor wrote:


Does anyone know how to open a resource fork, with open(), sysopen(),
POSIX::open(), etc.?  On Mac OS, I would use O_RSRC, but that is 
apparently
not available in Mac OS X's fcntl.h.

open("filename/rsrc");

sherm--

UNIX: Where /sbin/init is Job 1.




open() a resource fork

2002-12-05 Thread Chris Nandor
Does anyone know how to open a resource fork, with open(), sysopen(), 
POSIX::open(), etc.?  On Mac OS, I would use O_RSRC, but that is apparently 
not available in Mac OS X's fcntl.h.

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