On Wed, May 04, 2005 at 11:44:58PM -0700, Larry Wall 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("-");
> $fh = open "-";
> $fh = $name eq '-' ?? $*IN :: open $name;
My conc
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
Is there some reason that runtime/parrot/library isn't in the list of
search paths for both include_paths and dynext_paths?
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
On Tue, May 03, 2005 at 04:26:52PM +0200, Leopold Toetsch wrote:
> Bob Rogers wrote:
>
> >How about extending ".return" to cover these:
> >
> > .return foo(x, ...) # tail function call
> >
> > .return o.foo(x, ...) # tail method call
>
> Done - rev 7959.
Excellent, thanks L
On Wed, May 04, 2005 at 11:00:46PM -0700, David Wheeler wrote:
: On May 4, 2005, at 22:31 , Larry Wall wrote:
:
: >given "hello" {
: >when /hello/ {
: >say "One";
: >if /hello/ { say "Two"; }
: >if /hello/ { say "Three"; }
: >continue;
:
On Thu, 5 May 2005, Stuart Cook wrote:
What I refer to now is something that takes two {coderefs,anonymous
subs,closures} and returns (an object that behaves like) another anonymous
sub, precisely the one that acts like the former followed by the latter
(or vice versa!).
Do you mean like the mathem
On Wed, May 04, 2005 at 11:58:59PM -0600, Luke Palmer wrote:
: On 5/4/05, Larry Wall <[EMAIL PROTECTED]> wrote:
: > [<] could mean "monotonically increasing".
:
: Not unless we make boolean operators magic. There are arguments for
: doing that, but I don't really want to think about how that woul
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 p
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 w
Patrick R. Michaud wrote:
On Tue, May 03, 2005 at 04:26:52PM +0200, Leopold Toetsch wrote:
Bob Rogers wrote:
How about extending ".return" to cover these:
.return foo(x, ...) # tail function call
.return o.foo(x, ...) # tail method call
Done - rev 7959.
Excellent, thanks Le
Larry Wall <[EMAIL PROTECTED]> wrote:
> It would be nice to have an easy-to-access "What's this?" interface
> that could be stitched into your favorite editor to identify what's
> under the cursor, or at least a command like:
> p6explain '[+]'
s:p5/nice to have/absolutely necessary/ unless $
Jonathan Scott Duff <[EMAIL PROTECTED]> wrote:
> Is there some reason that runtime/parrot/library isn't in the list of
> search paths for both include_paths and dynext_paths?
No. We have:
load_bytecode => Parrot_load_bytecode
*.pbc => PackFile_append.pbc => Parrot_readbc =>
Parrot
On 4 May 2005, at 01:14, David Wheeler wrote:
On May 3, 2005, at 14:27 , Joe McMahon wrote:
Here's a weird idea: how about the option of AJAXing the test harness
results back to a receiving server somewhere that understands TAP?
Bingo: TAP testing of JS embedded in web pages in its native habitat
Luke Palmer <[EMAIL PROTECTED]> wrote:
> This patch makes PIO_fdopen return NULL when you give it flags it
> doesn't understand. I gathered that this was the correct behavior
> from the test that I untodid.
> Luke
Thanks, applied.
leo
Actually no, from the PIO routines you should return a PMC
that has a null handle, or that was my original intent. I think
I was considering changing new_io_pmc() to return something
like ParrotUndef in that case but never did. The very first
version of the IO routines actually did return NULL for
On 3 May 2005, at 23:36, Michael G Schwern wrote:
Test::Simple/More/Builder 0.61 will introduce a change to Test::Builder
whereby the BAILOUT() method becomes BAIL_OUT(). Additionally
Test::More
finally features a BAIL_OUT() function.
[snip]
Just out of curiosity - any particular reason for the c
Jeff Horwitz wrote:
i'm neck deep in writing the IMC eval code for pugs. ...
... but i imagine there's a more
elegant solution out there.
t/src/compiler.t has now all the steps to run a PIR code string from C.
It's not elegant though, because there are no APIs, but it should make
things running.
excellent! now i can get rid of that silly no-op bytecode i've been
using. thanks for the quick turnaround, leo.
-jeff
On Thu, 5 May 2005, Leopold Toetsch wrote:
> Jeff Horwitz wrote:
> > i'm neck deep in writing the IMC eval code for pugs. ...
>
> > ... but i imagine there's a more
> > elegan
On Thu, May 05, 2005 at 12:24:34PM +0100, Adrian Howard wrote:
> >Test::Simple/More/Builder 0.61 will introduce a change to Test::Builder
> >whereby the BAILOUT() method becomes BAIL_OUT(). Additionally
> >Test::More
> >finally features a BAIL_OUT() function.
> [snip]
>
> Just out of curiosity -
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 "-"?
: >
: > Um, depending on what you mean, and whether we continue to support
: > the '=' pseudofile, maybe:
: >
: > $fh = io("-");
: >
On May 4, 2005, at 23:19 , Larry Wall wrote:
You must have missed the implied "..." at the end of my list of
other WTDI.
You can also do any of:
say "Two" if /hello/;
/hello/ && say "Two";
/hello/ and say "Two";
/hello/ ?? say "Two" :: leave;
infix:(/hello/, { say "Two" })
On May 5, 2005, at 04:26 , Adrian Howard wrote:
Here's a weird idea: how about the option of AJAXing the test
harness results back to a receiving server somewhere that
understands TAP? Bingo: TAP testing of JS embedded in web pages
in its native habitat.
That's just evil. Maybe when Schwern
David Wheeler wrote:
> On May 5, 2005, at 04:26 , Adrian Howard wrote:
>
Here's a weird idea: how about the option of AJAXing the test
harness results back to a receiving server somewhere that
understands TAP? Bingo: TAP testing of JS embedded in web pages in
its native ha
On 5 May 2005, at 18:00, David Wheeler wrote:
On May 5, 2005, at 04:26 , Adrian Howard wrote:
Here's a weird idea: how about the option of AJAXing the test
harness results back to a receiving server somewhere that
understands TAP? Bingo: TAP testing of JS embedded in web pages in
its native habi
Hi,
sub gen() {
state $svar = 42;
# Only initialized once, as it is (per S04) equivalent to
# state $svar will first{ 42 };
return { $svar++ };
}
my $a = gen();# $svar == 42
$a(); $a(); # $svar == 44
my $b = gen();# $svar == 44
say $b(); # 44
On Thu, May 05, 2005 at 07:50:31PM +0200, Ingo Blechschmidt wrote:
: Hi,
:
: sub gen() {
: state $svar = 42;
: # Only initialized once, as it is (per S04) equivalent to
: # state $svar will first{ 42 };
: return { $svar++ };
: }
:
: my $a = gen();# $svar == 42
: $a()
On Wed, 4 May 2005, Larry Wall wrote:
> It would be nice to have an easy-to-access "What's this?" interface
> that could be stitched into your favorite editor to identify what's
> under the cursor, or at least a command like:
>
> p6explain '[+]'
That would make me extremely happy.
> :$sum
On May 5, 2005, at 11:28 , John Williams wrote:
How does [+] know you mean
reduce &infix:<+>, @array;
instead of
reduce &prefix:<+>, @array;
which is nonsense, but the [+] is in a prefix position.
Because [] applies only to infix operators, as I understand it.
With the hyper metaoperator, the
On Thu, 5 May 2005, David Wheeler wrote:
> > I can see how to ask for a binary (hence infix) operator, but how
> > do I ask
> > for a prefix or postfix operator specifically, which +<< and >>+ do?
> > Maybe there are Operator::Prefix, etc, roles defined so you can ask
> > for
> > them?
>
> Ask for
Can I put an operator in a variable and then use it in the []
reduce meta-operator? Something like:
$op = '+';
$x = [$op] @x;
Rob
On Thu, May 05, 2005 at 03:03:22PM -0400, Rob Kinyon wrote:
: Can I put an operator in a variable and then use it in the []
: reduce meta-operator? Something like:
:
: $op = '+';
: $x = [$op] @x;
Nope. That would be parsed as a list of one element, followed by a
syntax error. You'll have to
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
On Thu, 5 May 2005, John Williams wrote:
> or even
>
> @x -= @y;
Doh! That should be C< $x -= $y; > of course.
Is there an article on the current best practices about creating a module
with tests? I know there is h2xs but I somewhere in the back of my foggy
brain I am thinking I read somewhere of a different. more preffered method.
If this is the wrong group to ask, sorry. Just let me know which is the b
On Thu, May 05, 2005 at 10:12:14AM -0400, Robert ([EMAIL PROTECTED]) wrote:
> Is there an article on the current best practices about creating a module
> with tests? I know there is h2xs but I somewhere in the back of my foggy
> brain I am thinking I read somewhere of a different. more preffered
Hey. Leo suggested to me on #parrot to drop a note on p6i,
asking about obtaining the committer to the Parrot tree.
As some of you know, Pugs can now evaluate PIR via an embedded
Parrot interpreter:
$ ./pugs -e 'eval_parrot'
42!
as well as compiling Perl 6 to PIR, evaluating it in memor
Autrijus Tang wrote:
Hey. Leo suggested to me on #parrot to drop a note on p6i,
asking about obtaining the committer to the Parrot tree.
$ ./pugs -BParrot -e 'say "Autrijus should have commit privs"'
Autrijus should have commit privs
leo
I was looking at a line in the hangman program:
@letters == @solution.grep:{ $_ ne '' };
and was told that I was looking at an adverbial block.
But I don't understand what that is and could not find a description
and examples in a reverse search on dev and nntp.perl.org.
I would appreciate a
Ugh, hit "a" in gmail when replying!
On 5/5/05, Terrence Brannon <[EMAIL PROTECTED]> wrote:
> I was looking at a line in the hangman program:
>
> @letters == @solution.grep:{ $_ ne '' };
>
> and was told that I was looking at an adverbial block.
The adverbial block is what you're giving to `if`
Luke Palmer <[EMAIL PROTECTED]> writes:
> Ugh, hit "a" in gmail when replying!
>
> On 5/5/05, Terrence Brannon <[EMAIL PROTECTED]> wrote:
>> I was looking at a line in the hangman program:
>>
>> @letters == @solution.grep:{ $_ ne '' };
>>
>> and was told that I was looking at an adverbial block.
If I understand correctly, so far we have the following meta-operators:
[ ]
circumfix meta-operator on infix operator which produces a prefix operator
>> <<
circumfix meta-operator on infix operator which produces an infix operator
=
postfix meta-operator on infix operator which produces an infi
On Tue, 2005-05-03 at 22:36 +0100, Nicholas Clark wrote:
> I don't know what the list of appropriate functions to wrap is. I assume that
> Leo/Chip can make a definitive criteria, but I'm guessing that it could be
> most vtable methods except for the MMD ones, given what Leo has already
> said.
S
On 5/5/05, Stuart Cook <[EMAIL PROTECTED]> wrote:
> +-+---+-++
> | Meta-op | is| operates on | to produce |
> +-+---+-++
> | [ ] | circumfix | infix | prefix |
> +-+---+
On 5/6/05, Stuart Cook <[EMAIL PROTECTED]> wrote:
(B> (snip) As long as each meta-operator
(B> explicitly knows what type of regular operator it accepts (and
(B> produces), there shouldn't be any problems with ambiguity.
(B>
(B
(BHaving posted that, I immediately thought of some problems:
(
On 5/6/05, Brent 'Dax' Royal-Gordon <[EMAIL PROTECTED]> wrote:
> I find this table very interesting, in that it shows the fundamental
> difference between reduce and the existing meta-ops.
Yep, that was basically the whole point of the table.
> The existing meta-operators alter the semantics of t
I've found the problem with "make test" not working. The problem is
the pathname not being cygpath'ed. Basically, every call to
doesFileExist needs to be cygpath'ed. Unfortunately, I have no idea
how to do that. All the calls to doesFileExist seem to be in
src/Pugs/Prim.hs lines 204,1250,1256. The
Oh - one more thing. hsc2hs needs to be done by hand on Cygwin. You
cannot allow it to try and built through because the last step
(executing the .exe redirected to the .hs) will fail and that cannot
be cygpath'ed (I don't think). Having the makefile execute each step
separately may be a good optio
On 5/5/05, Terrence Brannon <[EMAIL PROTECTED]> wrote:
> I was looking at a line in the hangman program:
>
> @letters == @solution.grep:{ $_ ne '' };
>
> and was told that I was looking at an adverbial block.
>
> But I don't understand what that is and could not find a description
> and exampl
> I noticed that the favicon.ico for http://www.parrotcode.org is a Camel.
> Can we have a Parrot for that, in order to do the many non-Perl Parrot
> based languages justice?
Good idea.
I've put one in place. If someone wants to make a nicer one, I won't
kick and scream too much.
-R
At 11:11 PM + 5/5/05, Terrence Brannon wrote:
Luke Palmer <[EMAIL PROTECTED]> writes:
> On 5/5/05, Terrence Brannon <[EMAIL PROTECTED]> wrote:
I was looking at a line in the hangman program:
@letters == @solution.grep:{ $_ ne '' };
and was told that I was looking at an adverbial block.
T
50 matches
Mail list logo