On May 4, 2005, at 8:13 AM, Uri Guttman wrote:
AS> Why? Because IO::Socket.new takes parameters that are built out
of its
AS> entire inheritance tree, so a change to IO::Handle might
radically
AS> modify the signature of the constructor.
makes sense. we should look at the p5 IO:: tree and
> "J" == Juerd <[EMAIL PROTECTED]> writes:
J> Rob Kinyon skribis 2005-05-04 11:20 (-0400):
>> $h.print() goes to $h.out
>> $h.readline() goes to $h.in
>> $h.warn() goes to $h.err
>> Making the tri-directional trifecta complete.
J> It's sort-of consistent, but I don't like it, bec
Rob Kinyon skribis 2005-05-04 11:20 (-0400):
> $h.print() goes to $h.out
> $h.readline() goes to $h.in
> $h.warn() goes to $h.err
> Making the tri-directional trifecta complete.
It's sort-of consistent, but I don't like it, because warnings are much
more complicated than just things that are print
> Rob Kinyon skribis 2005-05-04 11:02 (-0400):
> > Would that mean that a filehandle opened readonly would throw an
> > exception if you attempted to either print or warn on it?
>
> I don't know what warning on a filehandle should be or do, but ignoring
> that bit, yes, an exception would be the r
Gaal Yahas skribis 2005-05-04 18:15 (+0300):
> Yes, if $h is the not-very-primitive version of IO. Surely the type of
> $h.in is not the same as $h itself?
Why not? $h does IO::Handle::Tridirectional, and $h.in does not, even though
$h and $h.in are-a IO::Handle.
Or whatever the classes will be,
Rob Kinyon skribis 2005-05-04 11:02 (-0400):
> Would that mean that a filehandle opened readonly would throw an
> exception if you attempted to either print or warn on it?
I don't know what warning on a filehandle should be or do, but ignoring
that bit, yes, an exception would be the right thing t
On Wed, May 04, 2005 at 04:59:21PM +0200, Juerd wrote:
> > Ah yes, that's another thing I was wondering about: what does opening a
> > pipe return. If it's a one-way pipe, okay, this may be a single handle;
> > but for bidirectional opens, we need $in, $out, and $err handles; and
>
> That'd be tri
Would that mean that a filehandle opened readonly would throw an
exception if you attempted to either print or warn on it?
On 5/4/05, Juerd <[EMAIL PROTECTED]> wrote:
> Gaal Yahas skribis 2005-05-04 17:24 (+0300):
> > Ah yes, that's another thing I was wondering about: what does opening a
> > pipe
Gaal Yahas skribis 2005-05-04 17:24 (+0300):
> Ah yes, that's another thing I was wondering about: what does opening a
> pipe return. If it's a one-way pipe, okay, this may be a single handle;
> but for bidirectional opens, we need $in, $out, and $err handles; and
That'd be tridirectional, then.
On Wed, May 04, 2005 at 08:47:17AM -0400, Aaron Sherman wrote:
> I would expect "open" to be a bit of an anachronism in P6, but still
> used fairly often. For the most part, I would expect that:
>
> my IO $read_fh = '/some/path' => 'r'; # Get an IO::File (is IO)
> my IO $write_fh = '/o
> "AS" == Aaron Sherman <[EMAIL PROTECTED]> writes:
AS> On Mon, 2005-05-02 at 22:51, Uri Guttman wrote:
>> > "LW" == Larry Wall <[EMAIL PROTECTED]> writes:
>>
LW> multi sub opensocket (
LW> Str +$mode = 'rw',
LW> Str +$encoding = 'auto',
LW> Str [EMAIL PROTECTED]) returns IO
On Wed, May 04, 2005 at 08:47:17AM -0400, Aaron Sherman wrote:
: I would expect "open" to be a bit of an anachronism in P6, but still
: used fairly often. For the most part, I would expect that:
:
: my IO $read_fh = '/some/path' => 'r'; # Get an IO::File (is IO)
: my IO $write_fh = '/o
On Mon, 2005-05-02 at 16:13, Mark Reed wrote:
> On 2005-05-02 15:52, "Juerd" <[EMAIL PROTECTED]> wrote:
>
> > Gaal Yahas skribis 2005-05-02 22:25 (+0300):
> >> > open 'ls', '|-'; # or even
> >> > open 'ls', :pipe => 'from'
> >
> > I dislike the hard-to-tell-apart symbols '<'
On Mon, 2005-05-02 at 22:51, Uri Guttman wrote:
> > "LW" == Larry Wall <[EMAIL PROTECTED]> writes:
>
> LW> multi sub opensocket (
> LW> Str +$mode = 'rw',
> LW> Str +$encoding = 'auto',
> LW> Str [EMAIL PROTECTED]) returns IO;
>
> a
On Tue, May 03, 2005 at 11:22:06AM +0200, Juerd wrote:
: I didn't know io was blessed already.
It pretty much is, just not the subsequent overloading of > and <.
We'll use ==> and <== instead.
Larry
Luke Palmer skribis 2005-05-03 1:34 (-0600):
> > for @files { open; say uc for =$_; close; }
> Wait, so you want open to both open the filename in $_ /and/ set $_ to
> the opened filehandle?
You are right. The example code makes no sense at all.
> say uc for =io($_);
I didn't know io wa
Juerd writes:
> > : > I don't think the command should default to $_
> > : Why?!
> > Because $_ is primarily for the use of inner loops, not outer loops,
> > and open tends to be in the outer loop rather than the inner loop.
>
> As someone who tries to write clean code, I agree that the outer loop
Larry Wall skribis 2005-05-02 15:53 (-0700):
> : Starting to look a lot like PHP there.
> And I care about that because PHP is such an unsuccessful language? :-)
> I'd just like all the opens to sort to the same place in the manual.
One of my biggest problems with PHP is that it puts in the name
On Mon, May 02, 2005 at 03:53:42PM -0700, Larry Wall wrote:
: On Tue, May 03, 2005 at 12:32:58AM +0200, Juerd wrote:
: : How about
: :
: : &open ::= &File::open
: : &URI::open
: : &Sys::Pipe::open
: :
: : And put the other aliases in the module that CGI.pm-:standard-ishly
: : pollutes
On Mon, May 02, 2005 at 10:51:57PM -0400, Uri Guttman wrote:
: > "LW" == Larry Wall <[EMAIL PROTECTED]> writes:
:
: LW> multi sub opensocket (
: LW> Str +$mode = 'rw',
: LW> Str +$encoding = 'auto',
: LW> Str [EMAIL PROTECTED]) retur
> "MF" == Matt Fowles <[EMAIL PROTECTED]> writes:
MF> Currying obviates the need for everything but a sub callback. If you
MF> want a callback to a method, curry the object. If you want private
MF> data, curry the data. After you are done currying you will have a
MF> simple sub to p
All~
On 5/3/05, Uri Guttman <[EMAIL PROTECTED]> wrote:
> > "MF" == Matt Fowles <[EMAIL PROTECTED]> writes:
>
> MF> All~
> MF> On 5/2/05, Uri Guttman <[EMAIL PROTECTED]> wrote:
> >> > "LW" == Larry Wall <[EMAIL PROTECTED]> writes:
> >>
> LW> multi sub opensocket (
> LW> Str +$m
> "MF" == Matt Fowles <[EMAIL PROTECTED]> writes:
MF> All~
MF> On 5/2/05, Uri Guttman <[EMAIL PROTECTED]> wrote:
>> > "LW" == Larry Wall <[EMAIL PROTECTED]> writes:
>>
LW> multi sub opensocket (
LW> Str +$mode = 'rw',
LW> Str +$encoding = 'auto',
LW> Str [EMAIL PROTECTED])
All~
On 5/2/05, Uri Guttman <[EMAIL PROTECTED]> wrote:
> > "LW" == Larry Wall <[EMAIL PROTECTED]> writes:
>
> LW> multi sub opensocket (
> LW> Str +$mode = 'rw',
> LW> Str +$encoding = 'auto',
> LW> Str [EMAIL PROTECTED]) retu
> "LW" == Larry Wall <[EMAIL PROTECTED]> writes:
LW> multi sub opensocket (
LW> Str +$mode = 'rw',
LW> Str +$encoding = 'auto',
LW> Str [EMAIL PROTECTED]) returns IO;
and how will that support async (non-blocking) connects? or
On Tue, May 03, 2005 at 12:32:58AM +0200, Juerd wrote:
: Larry Wall skribis 2005-05-02 14:23 (-0700):
: > multi sub open (
: > multi sub openuri (
: > multi sub openpipe (
: > multi sub openshell (
:
: Starting to look a lot like PHP there.
And I care about that because PHP is
Larry Wall skribis 2005-05-02 14:23 (-0700):
> multi sub open (
> multi sub openuri (
> multi sub openpipe (
> multi sub openshell (
Starting to look a lot like PHP there.
How about
&open ::= &File::open
&URI::open
&Sys::Pipe::open
And put the other aliases in th
On Mon, May 02, 2005 at 02:23:36PM -0700, Larry Wall wrote:
: : [1] Should this be "Perl(..5) style"?
:
: I think that'd be "Perl-{1..5} style", as it currently stands, and
: assuming you want to use the "use" syntax. Also, we haven't specced
Er, make that Perl-(1..5) instead. One week in Russi
On Mon, May 02, 2005 at 10:25:08PM +0300, Gaal Yahas wrote:
: Here's a basic proposal for the open and pipe builtins. It was discussed
: on #perl6 today and seemed okay to the people there. I'd like to hear
: your comments, since the internals side of much of this is ready and is
: looking for an i
On 2005-05-02 16:35, "Juerd" <[EMAIL PROTECTED]> wrote:
> What are the characters around the code supposed to be, by the way? Your
> mailer tells my mailer that you're sending iso-8859-1, but I seriously
> doubt that.
>
Argh. Bad Entourage, no biscuit. Back to Mail as soon as I get Tiger
inst
Mark Reed skribis 2005-05-02 16:13 (-0400):
> Holy matter of opinion, Batman. < and >¹ are much easier to tell apart
> than r¹ and w¹;
Obviously we disagree.
What are the characters around the code supposed to be, by the way? Your
mailer tells my mailer that you're sending iso-8859-1, but I
I take some of that back actually, left-to-right directionality has almost
nothing to do with understanding the < and > symbols. The arrow points in
the direction information is flowing, which is left-to-right for > but
right-to-left for <. I mean, ³>filename² is pointing at the file, so the
i
On 2005-05-02 15:52, "Juerd" <[EMAIL PROTECTED]> wrote:
> Gaal Yahas skribis 2005-05-02 22:25 (+0300):
>> > open 'ls', '|-'; # or even
>> > open 'ls', :pipe => 'from'
>
> I dislike the hard-to-tell-apart symbols '<' and '>' for modes. 'r' and
> 'w' are much easier, and get r
Gaal Yahas skribis 2005-05-02 22:25 (+0300):
> open 'ls', '|-'; # or even
> open 'ls', :pipe => 'from'
I dislike the hard-to-tell-apart symbols '<' and '>' for modes. 'r' and
'w' are much easier, and get rid of the awful left/right "mnemonic" that
fails to make sense to GUI u
34 matches
Mail list logo