in void context?
What are the gathered values here?
take 1, 2; # easy. flattened 1 and then 2, right?
@x = take 1, 2; # same thing?
$x = take 1, 2; # same thing? [1, 2]?
--
Gaal Yahas [EMAIL PROTECTED]
http://gaal.livejournal.com/
On Mon, Jan 29, 2007 at 10:01:08PM +0200, Gaal Yahas wrote:
+Because Cgather evaluates its block or statement in void context,
+this typically causes the Ctake statement to be evaluated in void
+context. However, a Ctake statement that is not in void context
+gathers its arguments Ien
On Mon, Jan 29, 2007 at 10:08:34PM +0200, Gaal Yahas wrote:
On Mon, Jan 29, 2007 at 10:01:08PM +0200, Gaal Yahas wrote:
+Because Cgather evaluates its block or statement in void context,
+this typically causes the Ctake statement to be evaluated in void
+context. However, a Ctake
, then take's args are basically evaluated
in list context. If YYY is something like $scalar = that list gets
Captured, but there's still a list there.)
--
Gaal Yahas [EMAIL PROTECTED]
http://gaal.livejournal.com/
I was writing tests for signatures and came across this ambiguity:
:(:$x)
Does this mean a single named parameter called $x, or a default invocant
and a single required positional named $x?
--
Gaal Yahas [EMAIL PROTECTED]
http://gaal.livejournal.com/
is constructed in this signature then?
method foo ($just_a_named_param)
Is the signature for foo really the same as that of bar?
sub bar ($just_a_named_param)
I was sort of assuming you could tell by a signature if it was for a
method or a sub.
--
Gaal Yahas [EMAIL PROTECTED]
http
of the colon less jarringly.
--
Gaal Yahas [EMAIL PROTECTED]
http://gaal.livejournal.com/
:($x where {...} is elk)# ambiguous auxillary
Is this legal? does the 'elk' trait pertain to $x or to the where-block?
:($x is ro is rw) # conflicting traits
Is this legal? Is $x ro or rw?
--
Gaal Yahas [EMAIL PROTECTED]
http://gaal.livejournal.com/
?
--
Gaal Yahas [EMAIL PROTECTED]
http://gaal.livejournal.com/
propose
each implementation support. Pugs says 'pugs'. Also, there's a
%?CONFIGpugs_versnum so there's no need to parse $?PUGS_VERSION.
pugs %?CONFIG{%?CONFIGperl_compiler ~ _versnum}
6.2.12
--
Gaal Yahas [EMAIL PROTECTED]
http://gaal.livejournal.com/
location that threw the exception. That is, the
stack is not unwound until some exception handler chooses to
--
Gaal Yahas [EMAIL PROTECTED]
http://gaal.livejournal.com/
this idea and have implemented it in r10246. One question though,
what should a scan for chained ops do?
list [==] 0, 0, 1, 2, 2;
# bool::false?
# (bool::true, bool::true, bool::false, bool::false, bool::false) ?
--
Gaal Yahas [EMAIL PROTECTED]
http://gaal.livejournal.com/
and closer approximations
of some value, you can use a scan to efficiently cut off once some
epsilon is reached.
--
Gaal Yahas [EMAIL PROTECTED]
http://gaal.livejournal.com/
enough, so if anyone can come up with an
implementation please give it :) Otherwise, how about we add this to
the language?
--
Gaal Yahas [EMAIL PROTECTED]
http://gaal.livejournal.com/
you mean ..^ ?)
--
Gaal Yahas [EMAIL PROTECTED]
http://gaal.livejournal.com/
.
But it doesn't work across lines:
$xyzzy.foo()
$fooz.:foo()
$foo. :foo()
$fa. :foo()
$and_a_long_one_I_still_want_to_align.
:foo()
$etc. :foo()
--
Gaal Yahas [EMAIL PROTECTED]
http://gaal.livejournal.com/
While cleaning up tests for release:
.split(':')=
()# Perl 5
(,) # pugs
Which is correct? It doesn's seem to be specced yet.
--
Gaal Yahas [EMAIL PROTECTED]
http://gaal.livejournal.com/
in isn't a
Role :)
There are over a hundred use_ok in the Pugs test suite; we are about
to work around the problem by changing them to use+pass, but that's
obviously the Wrong Thing. Is there a better workaround / a better
design we could use?
--
Gaal Yahas [EMAIL PROTECTED]
http
importation specs and treat everything
to the right of the module name syntactically as arguments to import,
with the parser picking out things it recognizes as imports and passing
everything else through.
--
Gaal Yahas [EMAIL PROTECTED]
http://gaal.livejournal.com/
and actual absolute path of the
resources loaded. (In fact, this is what recent pugs does :).
I know some code does require 'foo.ini', but can't that be relegated
to a module and use a different store than %*INC?
--
Gaal Yahas [EMAIL PROTECTED]
http://gaal.livejournal.com/
for formal signature matching /
documentation purposes then. What is the scope of this override?
--
Gaal Yahas [EMAIL PROTECTED]
http://gaal.livejournal.com/
the module) with other configurations (that say something
about the demands made by the caller to the module).
--
Gaal Yahas [EMAIL PROTECTED]
http://gaal.livejournal.com/
up flunk as a candidate name. Its merits,
including its, uh, dropout cuteness, are many; it rings well against
fail, alludes to tests, can probably be backported to the Perl 5 test
modules, etc.
What say?
[++] dduncan autrijus
--
Gaal Yahas [EMAIL PROTECTED]
http://gaal.livejournal.com/
In pugs, r7961:
my @pats = /1/, /2/;
say MATCH if 1 ~~ any @pats; # MATCH
say MATCH if 0 ~~ any @pats; # no match
So far so good. But:
my $junc = any @pats;
say MATCH if 1 ~~ $junc; # no match
say MATCH if 0 ~~ $junc; # no match
Bug? Feature?
--
Gaal Yahas
but possibly what
people want.
--
Gaal Yahas [EMAIL PROTECTED]
http://gaal.livejournal.com/
are answered:
when { $_ 5 } { ... }
when { .caloric_value $doctors_orders } { ... }
This isn't implemented in pugs yet, but I guess it can be once this is
clarified.
--
Gaal Yahas [EMAIL PROTECTED]
http://gaal.livejournal.com/
= tenderly comb);
S12/Roles/Roles may have attributes implies that this kind of thing is
okay in roles. Is there any reason not to allow it as in the above too?
This replaces the need for an explicit BUILD in many cases, which I
think is useful.
--
Gaal Yahas [EMAIL PROTECTED]
http
this feature in the Synopsis? I
was just about to add tests -- but I found they already existed, with
a comment
# These tests are not specified by p6l, But these should be right...
--
Gaal Yahas [EMAIL PROTECTED]
http://gaal.livejournal.com/
?
--
Gaal Yahas [EMAIL PROTECTED]
http://gaal.livejournal.com/
somewhere
that fixes that, or you could use Class::Rebless which I wrote initially
because of this problem -- though I ended up doing the blesswork inside
the code sections manually as it made much more algorithmic sense.
Hope this helps.
--
Gaal Yahas [EMAIL PROTECTED]
http://gaal.livejournal.com/
of a printed 0 or while not using fatal, but the
code can use a defined guard.)
--
Gaal Yahas [EMAIL PROTECTED]
http://gaal.livejournal.com/
as failable? Should there be one?
--
Gaal Yahas [EMAIL PROTECTED]
http://gaal.livejournal.com/
/Closure traits, we can make use and no
activate TURNON and TURNOFF blocks?
--
Gaal Yahas [EMAIL PROTECTED]
http://gaal.livejournal.com/
;) =
Module.new(name= Acme::emcA, ...),
$an_open_file = ...
);
@*INC = (/usr/local/lib/perl6,
URI.new(http://codeIZus.com/perl/;),
URI.new(http://;), # this would mean allow loading code from ANYWHERE.
);
--
Gaal Yahas [EMAIL PROTECTED]
http://gaal.livejournal.com/
uses the second, but might be less precise.
[1]
http://haskell.org/ghc/docs/latest/html/libraries/base/System.Time.html#t%3ACalendarTime
--
Gaal Yahas [EMAIL PROTECTED]
http://gaal.livejournal.com/
I'll submit a doc patch to S29.
--
Gaal Yahas [EMAIL PROTECTED]
http://gaal.livejournal.com/
be in a library.
Not my call, but I think we can add timelocal and timegm soon. They're
mostly cleverly-caching facades to Time.new anyway, no? Drop by on #perl6
if you want to hack on the Prelude side of this.
--
Gaal Yahas [EMAIL PROTECTED]
http://gaal.livejournal.com/
problems?
--
Gaal Yahas [EMAIL PROTECTED]
http://gaal.livejournal.com/
method bereaucracy(Int undef, Int $office_number) { ... }
I'm not sure how this works for named fields, but for positional ones
it should do well, and is similar to ($a, undef, $c) = LIST syntax.
--
Gaal Yahas [EMAIL PROTECTED]
http://gaal.livejournal.com/
.
--
Gaal Yahas [EMAIL PROTECTED]
http://gaal.livejournal.com/
methods...
What do you think is the right way to specify them?
--
Gaal Yahas [EMAIL PROTECTED]
http://gaal.livejournal.com/
and then look for a labeled
block, but if the user really wants that, let them grovel over a
complete call chain themselves.
--
Gaal Yahas [EMAIL PROTECTED]
http://gaal.livejournal.com/
than A06's. Can it for now be considered
complete? (I'm asking because A06 links want intimately to caller
and that appears to no longer be the case.)
--
Gaal Yahas [EMAIL PROTECTED]
http://gaal.livejournal.com/
limits my choice of modules/builtins, but which promises me
identical behavior on all supported platforms?
To take a notorious example, you mentioned fork() -- if this event manager
becomes part of Perl6, does that mean we're required to emulate fork()
on win32?
--
Gaal Yahas [EMAIL PROTECTED
to express this kind
of thing but that looks weird to me (how would you return a typed
junction?). S06 and E06 don't raise this issue.
--
Gaal Yahas [EMAIL PROTECTED]
http://gaal.livejournal.com/
start is at docs/quickref/unicode .
--
Gaal Yahas [EMAIL PROTECTED]
http://gaal.livejournal.com/
://perlnomic.org/ .
--
Gaal Yahas [EMAIL PROTECTED]
http://gaal.livejournal.com/
earlier suggestion is okay, then
by symmetry:
$logfile = -;
open $log, :a:allowstdio;
--
Gaal Yahas [EMAIL PROTECTED]
http://gaal.livejournal.com/
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
options (if by let Perl figure that out $mode you didn't mean
let perl's open figure it out with explicit code).
How would you suggest formalizing these?
(By the way, we need a spec for perl's command line, too. So far we've
been emulating perl5's in an ad-hoc manner.)
--
Gaal Yahas [EMAIL
process handle.
--
Gaal Yahas [EMAIL PROTECTED]
http://gaal.livejournal.com/
a pipe;
Now,
$h.in;
$h.out;
$h.err;
$h.print(foo); # use $h.out
$l = $h.readline; # use $h.in
Yes, if $h is the not-very-primitive version of IO. Surely the type of
$h.in is not the same as $h itself?
--
Gaal Yahas [EMAIL PROTECTED]
http://gaal.livejournal.com/
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/
...?
And what about IO layers? :)
What else belongs here? dirhandles, sockets? How are they specced? I
was looking for a happy medium between overdwim and underlying library
primitives level.
[1] Should this be Perl(..5) style?
--
Gaal Yahas [EMAIL PROTECTED]
http://gaal.livejournal.com/
a cleanliness in how the closure itself can
control when to stop, but the former means you can schedule arbitrary
code without changing it.
Is there anybody from the perl-loop gang around here? I'm sure they've
thought about these things a lot.
--
Gaal Yahas [EMAIL PROTECTED]
http
return a reference to some object instead of an
id?) If the alarm builtin is getting too overloaded, I propose the
closure version be named later.
--
Gaal Yahas [EMAIL PROTECTED]
http://gaal.livejournal.com/
);
} while (--$n0);
return $to;
}
In Pugs at least, labels may only only be assigned to blocks. Any chance
the language gets to have them in more arbitrary places? Would this in
fact be enough to make this work?
--
Gaal Yahas [EMAIL PROTECTED]
http://gaal.livejournal.com/
57 matches
Mail list logo