Re: stdio

2005-05-09 Thread Aaron Sherman
Nothing makes you re-think your reply length like having your mailer lose your message ;-) A lot of your message revolves around this idea that there's a normal file open semantic. What I've tried (but clearly failed) to articulate previously is that this notion is becoming archaic in what is

Re: stdio

2005-05-06 Thread Aaron Sherman
On Thu, 2005-05-05 at 15:15, Aaron Sherman wrote: Dash this all on the rocks if you want, but understand that this is not an off-the-cuff reply, but something that I've spent a lot of time mulling over [...] First off, IMHO, open should be an alias for a closure-wrapped constructor, like so:

Re: stdio

2005-05-06 Thread Larry Wall
On Fri, May 06, 2005 at 08:19:05AM -0400, Aaron Sherman wrote: : open as a verb is extremely ambiguous. In dictionary searches I see as : many as 19 definitions just for the verb form. Well, sure, but also need to take Perl history into account, where dwimmy open is considered something of a

Re: stdio

2005-05-05 Thread Larry Wall
On Thu, May 05, 2005 at 08:39:52AM +0300, Gaal Yahas wrote: : How do I open a file named -? Um, depending on what you mean, and whether we continue to support the '=' pseudofile, maybe: $fh = io(-); or $fh = open -; or $fh = $name eq '-' ?? $*IN :: open $name; : How do I open

Re: stdio

2005-05-05 Thread Gaal Yahas
with magic control. I've no gripes with the first or last of those, but I think the second should not be allowed by default. There has to be a safe mode for opening a file and knowing that's what you're opening: not a pipe, not stdio (hence there are places I can't permit myself to use #1

Re: stdio

2005-05-05 Thread Gaal Yahas
On Thu, May 05, 2005 at 01:32:56AM -0600, Luke Palmer wrote: On 5/5/05, Gaal Yahas [EMAIL PROTECTED] wrote: getopt(...); $fh = open $in, :allowstdio; Maybe the opposite: $fh = open $in, :literal; One of the nice things about the magical - behavior is that people are

Re: stdio

2005-05-05 Thread Luke Palmer
On 5/5/05, Gaal Yahas [EMAIL PROTECTED] wrote: On Thu, May 05, 2005 at 01:32:56AM -0600, Luke Palmer wrote: And I don't think arguing in the name of security for the default case is going to buy us anything. Security doesn't come in scripts in any language for free; you have to walk

Re: stdio

2005-05-05 Thread Larry Wall
: not a pipe, not stdio (hence there are places : I can't permit myself to use #1). But as your third example suggests, : never allowing open - will make unixish tools tedious to write, so : maybe we need something like : : getopt(...); : $fh = open $in, :allowstdio; : : (only named more

Re: stdio

2005-05-05 Thread Aaron Sherman
On Thu, 2005-05-05 at 12:31, Larry Wall wrote: On Thu, May 05, 2005 at 10:14:34AM +0300, Gaal Yahas wrote: : On Wed, May 04, 2005 at 11:44:58PM -0700, Larry Wall wrote: : : How do I open a file named -? [...] : $fh = io(-); : $fh = open -; : My concern is again with magic

stdio

2005-05-04 Thread Gaal Yahas
How do I open a file named -? How do I open stdout (and the other standard handles)? -- Gaal Yahas [EMAIL PROTECTED] http://gaal.livejournal.com/