Re: [svn:perl6-synopsis] r13543 - doc/trunk/design/syn

2007-01-29 Thread Gaal Yahas
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/

Re: [svn:perl6-synopsis] r13543 - doc/trunk/design/syn

2007-01-29 Thread Gaal Yahas
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

Re: [svn:perl6-synopsis] r13543 - doc/trunk/design/syn

2007-01-29 Thread Gaal Yahas
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

Re: [svn:perl6-synopsis] r13545 - doc/trunk/design/syn

2007-01-29 Thread Gaal Yahas
, 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/

single named param

2006-09-12 Thread Gaal Yahas
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/

Re: single named param

2006-09-12 Thread Gaal Yahas
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

Unpacking tree node parameters

2006-09-03 Thread Gaal Yahas
of the colon less jarringly. -- Gaal Yahas [EMAIL PROTECTED] http://gaal.livejournal.com/

Two Signature questions

2006-09-02 Thread Gaal Yahas
:($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/

Re: Pair of lists = list of pairs?

2006-08-23 Thread Gaal Yahas
? -- Gaal Yahas [EMAIL PROTECTED] http://gaal.livejournal.com/

Re: designing a test suite for multiple implementations

2006-08-12 Thread Gaal Yahas
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/

[patch] S04: CATCH blocks

2006-07-25 Thread Gaal Yahas
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/

Re: Scans

2006-05-09 Thread Gaal Yahas
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/

Re: Scans

2006-05-09 Thread Gaal Yahas
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/

Scans

2006-05-08 Thread Gaal Yahas
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/

Re: Scans

2006-05-08 Thread Gaal Yahas
you mean ..^ ?) -- Gaal Yahas [EMAIL PROTECTED] http://gaal.livejournal.com/

Re: A shorter long dot

2006-04-30 Thread Gaal Yahas
. 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/

split on empty string

2006-01-17 Thread Gaal Yahas
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/

facades, use_ok, and lexical export

2006-01-09 Thread Gaal Yahas
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

Re: import/export and module configuration

2005-12-19 Thread Gaal Yahas
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/

Obsoleting require 'Some/Module.pm'

2005-12-19 Thread Gaal Yahas
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/

Fully-qualified symbols and exportation

2005-12-14 Thread Gaal Yahas
for formal signature matching / documentation purposes then. What is the scope of this override? -- Gaal Yahas [EMAIL PROTECTED] http://gaal.livejournal.com/

import/export and module configuration

2005-12-13 Thread Gaal Yahas
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/

Flunking tests and failing code

2005-12-04 Thread Gaal Yahas
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/

dis-junctive patterns

2005-11-21 Thread Gaal Yahas
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

given too little

2005-11-10 Thread Gaal Yahas
but possibly what people want. -- Gaal Yahas [EMAIL PROTECTED] http://gaal.livejournal.com/

Re: given too little

2005-11-10 Thread Gaal Yahas
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/

Default values for instance variables

2005-11-08 Thread Gaal Yahas
= 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

Re: Default values for instance variables

2005-11-08 Thread Gaal Yahas
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/

Re: Re(vised): Proposal to make class method non-inheritable

2005-10-19 Thread Gaal Yahas
? -- Gaal Yahas [EMAIL PROTECTED] http://gaal.livejournal.com/

Re: Translating (or at least parsing) Java interface definitions

2005-08-11 Thread Gaal Yahas
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/

say's return value

2005-07-30 Thread Gaal Yahas
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/

Re: say's return value

2005-07-30 Thread Gaal Yahas
as failable? Should there be one? -- Gaal Yahas [EMAIL PROTECTED] http://gaal.livejournal.com/

module init hooks and pragmas

2005-07-30 Thread Gaal Yahas
/Closure traits, we can make use and no activate TURNON and TURNOFF blocks? -- Gaal Yahas [EMAIL PROTECTED] http://gaal.livejournal.com/

Re: What do use and require evaluate to?

2005-07-12 Thread Gaal Yahas
;) = 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/

Time::Local

2005-07-05 Thread Gaal Yahas
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/

Re: Time::Local

2005-07-05 Thread Gaal Yahas
I'll submit a doc patch to S29. -- Gaal Yahas [EMAIL PROTECTED] http://gaal.livejournal.com/

Re: Time::Local

2005-07-05 Thread Gaal Yahas
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/

caller with no sub scope

2005-06-18 Thread Gaal Yahas
problems? -- Gaal Yahas [EMAIL PROTECTED] http://gaal.livejournal.com/

Ignoring parameters

2005-06-16 Thread Gaal Yahas
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/

Re: sub my_zip (...?) {}

2005-06-16 Thread Gaal Yahas
. -- Gaal Yahas [EMAIL PROTECTED] http://gaal.livejournal.com/

Re: Ignoring parameters

2005-06-16 Thread Gaal Yahas
methods... What do you think is the right way to specify them? -- Gaal Yahas [EMAIL PROTECTED] http://gaal.livejournal.com/

Re: caller and want

2005-06-12 Thread Gaal Yahas
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/

caller and want

2005-06-08 Thread Gaal Yahas
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/

Re: Musing on registerable event handlers for some specific events

2005-06-08 Thread Gaal Yahas
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

returns and context

2005-05-31 Thread Gaal Yahas
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/

Re: Unicode Operators cheatsheet, please!

2005-05-27 Thread Gaal Yahas
start is at docs/quickref/unicode . -- Gaal Yahas [EMAIL PROTECTED] http://gaal.livejournal.com/

Re: Overriding/redefining p6 built-in functions

2005-05-08 Thread Gaal Yahas
://perlnomic.org/ . -- Gaal Yahas [EMAIL PROTECTED] http://gaal.livejournal.com/

Re: stdio

2005-05-05 Thread Gaal Yahas
earlier suggestion is okay, then by symmetry: $logfile = -; open $log, :a:allowstdio; -- Gaal Yahas [EMAIL PROTECTED] http://gaal.livejournal.com/

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

Signatures and option specs [was: Open and pipe]

2005-05-04 Thread Gaal Yahas
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

Re: Open and pipe

2005-05-04 Thread Gaal Yahas
process handle. -- Gaal Yahas [EMAIL PROTECTED] http://gaal.livejournal.com/

Re: Open and pipe

2005-05-04 Thread Gaal Yahas
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/

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/

Open and pipe

2005-05-02 Thread Gaal Yahas
...? 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/

Re: alarm() and later()

2005-04-20 Thread Gaal Yahas
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

alarm() and later()

2005-04-18 Thread Gaal Yahas
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/

Perl6 and Duff's Device

2005-03-20 Thread Gaal Yahas
); } 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/