Re: [perl6/specs] 89cc32: Spec Bag.kxxv

2014-04-15 Thread David Green
of an underlying unification to be made. -David

Floating-point equality (was Re: How to make a new operator.)

2012-03-24 Thread David Green
to handle stopping points in a sequence: 1, 3, 5 ... ~10, but that still wouldn't work without treating the Num::Approx values as a special case, which defeats the purpose. Though with a postfix up from operator, you could say: 1, 3, 5 ... 10^.] -David

Not-so-smart matching (was Re: How to make a new operator.)

2012-03-24 Thread David Green
is the best name, but it conforms better to what smart-matching does. Or conformance Hm. But terminology that sets up the appropriate expectations is a good thing. -David

Re: pattern alternation (was Re: How are ...)

2010-08-05 Thread David Green
of that too. I suspect :full would almost always be associated with TOP, in fact. Boy am I tired of typing ^ and $ in TOP ;-) Does it make sense for ^[...]$ to be assumed in TOP by default? (Though not necessary if there's a shortcut like //...//.) -David

Re: How are unrecognized options to built-in pod block types treated?

2010-08-04 Thread David Green
of the best features of P6? (After all, docs aren't special to Perl — it's all just code that it will parse and process any way you tell it to.) Darren: Explicit versioning is your friend. Yes, always! -David

Re: Smart match isn't on Bool

2010-08-03 Thread David Green
out. -David

Re: Smart match isn't on Bool

2010-07-31 Thread David Green
makes it clear(er) when the context doesn't help (like 'when who-knows()') or when you reasonably expect more consistent matching. [Or do I mean whenever??] -David

Re: Smart match isn't on Bool

2010-07-31 Thread David Green
On 2010-07-31, at 12:47 pm, Patrick R. Michaud wrote: On Sat, Jul 31, 2010 at 10:56:47AM -0600, David Green wrote: given $something { when True { say That's the truth! } when 42 { say Good answer! } when viaduct { say You guessed the secret word! } } I'm not so sure about

Re: Smart match isn't on Bool

2010-07-31 Thread David Green
a legitimate (non-exceptional) meaning. A bear of little memory like me will see when timeout() but instead of internalising P6 handles when $bool differently from when $anything-else, I will take away Perl DWIM. And then I'll expect it to DWIM in $true-false-queston ~~ $bool-answer. -David

Re: Smart match isn't on Bool

2010-07-31 Thread David Green
~~, or whatever the default operation is (we're not using the colon for anything else, are we?!?): when $a $b { ... } if $foo.does($bar) { ... } when: /foo/ { ... } if: .defined { ... } -David

Re: Smart match isn't on Bool

2010-07-31 Thread David Green
On 2010-07-31, at 2:00 pm, TSa (Thomas Sandlaß) wrote: On Saturday, 31. July 2010 18:56:47 David Green wrote: given $who-knows-what { when True { say It's a true thing! } # ^--oops, this still shouldn't come first! when 42 { say It's numbery! } whenever timeout() { say Who

Unwanted warnings (was Re: Something wrong with str.reverse)

2010-07-31 Thread David Green
? (for suppression handler, of course) Using comments doesn't feel quite right to me either, but on the other hand, almost anything else seems distracting for something that is supposed to avoid drawing attention. Maybe a statement suffix? -David

Re: series operator issues

2010-07-31 Thread David Green
at compile-time. It shouldn't be any worse than making your own counter, and might even be better (since Perl needs its own counter for some loops, maybe it could make it available rather than having to define one of your own as well). -David

Re: Command-line args (weekly contribution to P6)

2010-05-27 Thread David Green
like Perl itself, e.g. perl --args --for --perl some-script.pl --args --for --script, continuing past the positional arg would not do the right thing. But is this common enough to be the default? You can always use -- to force positional treatment, but not the other way around. -David

eqv and comparing buts

2010-05-26 Thread David Green
be an adverb for eqv that says to pay attention to ad-hoc changes (or vice versa). Since 'but' is special syntax, maybe there's even a way to compare snapshots of all the types that were 'but'ed in to the base type, but I don't know how feasible that is. -David

Re: [perl #72972] [BUG] False ~~ True in Rakudo

2010-02-22 Thread David Green
answer } } -David

Re: KeyWeight and KeyBag

2010-01-21 Thread David Brunton
, Darren Duncan dar...@darrenduncan.net wrote: David Brunton wrote: I notice that CKeyWeight returns False and deletes the key for a key whose value goes to zero or less than zero, issuing a warning in the latter case. Is it the case that CFatRat always evaluates to False in Boolean context when

KeyWeight and KeyBag

2010-01-20 Thread David Brunton
I notice that CKeyWeight returns False and deletes the key for a key whose value goes to zero or less than zero, issuing a warning in the latter case. Is it the case that CFatRat always evaluates to False in Boolean context when negative?

Re: But vs. With

2009-12-04 Thread David Green
to that. But not requiring but to change behaviour seems reasonable -- I would read it as but make sure that X, where you want to draw attention to X even though it might technically be redundant. -David

But vs. With

2009-12-03 Thread David Green
be needed only when a method has already been mixed in anonymously. So: $x = Tue with Today; $y = $x but Tomorrow. -David

Re: But vs. With

2009-12-03 Thread David Green
exists, but is indeed the appropriate choice to override it. -David

Re: new enumerations

2009-11-29 Thread David Green
it fit the common case better for enums to start at 1 instead of 0, or maybe start at 0 but true?) -David

Re: unusual invocants

2009-10-20 Thread David Green
where {$_ ~~ X} and X $foo simply to be different ways of writing the same thing, but whatever works! -David

Re: lvalue methods

2009-10-20 Thread David Green
is setting ($.x, $.y) ... to indicate that whatever is done to angle should really affect $x and $y, and any other attributes that aren't specified may not be used. -David

Re: Aliasing methods in CPAN roles

2009-10-19 Thread David Green
On 2009-Oct-18, at 3:44 pm, Jon Lang wrote: David Green wrote: I would expect that role Logging { method log(Numeric $x:) {...} } means the invocant is really of type Numeric Logging, without Logging having to do Numeric. On the other hand, I can see that strictly that might not make

Re: unusual invocants

2009-10-19 Thread David Green
On 2009-Oct-19, at 5:50 pm, Jon Lang wrote: In Aiasing methods in CPAN roles, David Green wrote: I don't want my special log() method to work only for other types that explicitly do NumLog; I want it to work for any type that directly does Numeric does Logging. But if Logging doesn't do

Re: Aliasing methods in CPAN roles

2009-10-18 Thread David Green
:); And I like this way because it's the most compact, inline way to indicate it. -David

Re: Aliasing methods in CPAN roles

2009-10-16 Thread David Green
., except methods would be automatically exported into new roles or classes so that we can use short names. I don't know what the actual syntax should be -- I only used ` above for lack of anything better, since the obvious .Logging::log means something else.) -David

Re: Freezing role methods

2009-10-14 Thread David Green
to Dog::bark-ing, then you *should* be rewriting code, because you're completely changing what is going on, no less than if you changed from bark()ing to fetch()ing. -David

Re: Freezing role methods

2009-10-14 Thread David Green
On 2009-Oct-14, at 2:00 pm, Jon Lang wrote: David Green wrote: On the other hand, $dogwood.Dog::bark cannot be simplified by leaving out the Dog:: because then it would be ambiguous. On the gripping hand, if we have a function train(Dog $d), then we can safely assume that within

Re: Parsing data

2009-10-07 Thread David Green
or not). It also might be worth inventing a whole new syntax design for parsing and manipulating data structures, but your suggested extensions seem pretty good to me. -David

Re: Overloading Roles

2009-10-07 Thread David Green
. (And perhaps Discrete should be a different type from Set even if they do work out the same, simply to better document one's intent.) -David

Re: r28597 - docs/Perl6/Spec/S32-setting-library

2009-10-05 Thread David Green
.inc probably wants an ordered type). Would it add 1? or 1+i? Better to spell it out explicitly. Well, Real implies ordering (at least to me ;-), I don't think we have a class or role for countability. A Discrete role would be useful, but is Set good enough for that? -David

Re: [perl #69194] rakudo 2009-08 and when with lists

2009-09-21 Thread David Green
with ...; or keep .. and ... as two ways to make series, and use infix:to for Ranges; or anything else that distinguishes ranges from iterators). What's the big advantage in keeping it the way it is? -David

Re: [perl #69194] rakudo 2009-08 and when with lists

2009-09-19 Thread David Green
. It sounds like the split personality of Ranges strikes again. I still think it makes more sense to have one Series-only type and one Range- only type, rather than one Series type and one Range-plus-Series type. -David

Re: [perl #69194] rakudo 2009-08 and when with lists

2009-09-19 Thread David Green
On 2009-Sep-19, at 5:53 am, Solomon Foster wrote: On Sat, Sep 19, 2009 at 6:48 AM, Carl Mäsak cma...@gmail.com wrote: David (), It sounds like the split personality of Ranges strikes again. I still think it makes more sense to have one Series-only type and one Range- only type, rather than

Re: Synopsis 02: Range objects

2009-08-28 Thread David Green
as special when it follows a comma to better support traditional math notation. That seems like an easy mistake to make, so treating it specially would be a good quirk. -David

Re: versioning same-auth forks/branches

2009-08-27 Thread David Green
you can instruct Perl not to use any alpha modules, or so on. -David

Re: Synopsis 02: Range objects

2009-08-25 Thread David Green
name for the interval-type, and Series should be the type that produces a series of values that may or may not have an innate ordering. (For example, you could produce a Complex series with: 5+5i .. 10+10i :by(1+1i).) -David

Re: Last IO discussion

2009-08-19 Thread David Green
::Encoding $volume = utf-8, and at least that way naive users will be alerted to the fact that something's going on. It's up to them how much effort they think is worth devoting to the issue, but at least they will be warned that there's an issue there to grapple with. -David

Re: [perl #64566] @a[1..*] adds trailing undef value

2009-08-19 Thread David Green
just means perl is smart enough to do @foo[1]=$bar without trying to suck up a zillobyte of RAM. -David

Re: directories of interest, a multiplicity alternative to CWD

2009-08-19 Thread David Green
, so $IO::DOI::MacOSX is automatically loaded use IO::DOI Home Music Downloads; # names that ::MacOSX makes available say $Home; # /Users/david say $Music;# /Users/david/Music say $Downloads;# /Users/david/Junk drawer There will be a few names that should

Re: Filename literals

2009-08-19 Thread David Green
On 2009-Aug-18, at 7:20 am, Timothy S. Nelson wrote: On Tue, 18 Aug 2009, David Green wrote: Some ways in which different paths can be considered equivalent: Spelling: ... Simplification: ... Resolution: ... Content-wise: ... Ok, my next commit will have canonpath (stolen directly from p5's

Re: Custom object constructors

2009-08-19 Thread David Green
. my DateModule $d .= new('2007-03-12'); My first thought is also coercion: say my DateModule $d = '2007-03-12' and let DateModule::.(Str) worry about making the new object. (Or does that need to be my DateModule $d = DateModule('2007-03-12')? That seems unnecessarily redundant.) -David

Re: r28017 - in docs/Perl6/Spec: . S32-setting-library

2009-08-18 Thread David Green
-style interface! -David

$*CWD and chdir()

2009-08-18 Thread David Green
On 2009-Aug-18, at 3:27 am, Timothy S. Nelson wrote: On Tue, 18 Aug 2009, David Green wrote: Maybe setting $*CWD just calls chdir() under the hood? Same implementation, brand new shiny Perl-style interface! That was my intent, but we had some discussions on IRC about the whys

Re: Filename literals

2009-08-18 Thread David Green
.gz file]. -David

Re: $*CWD and chdir()

2009-08-18 Thread David Green
, the fact that a literal series of digits gets parsed as though it had an implicit 0d in front of it. (Of course, I suspect that $*CWD should be able to be set to a plain Str, but the Str will be cast to an IO::Path because that's what $*CWD.STORE() will take in its signature.) -David

Default path restrictions

2009-08-18 Thread David Green
doing without punctuation. For example, a suitable pathname on Unix might be: ~/.foorc Whereas on a Mac, it might be more polite to use: ~/Library/Application Support/Foo/Startup Settings which is certainly beyond the scope of p{}-quoting. -David

Re: $*CWD and chdir()

2009-08-18 Thread David Green
On 2009-Aug-18, at 5:48 am, Jan Ingvoldstad wrote: On Tue, Aug 18, 2009 at 1:02 PM, David Greendavid.gr...@telus.net wrote: It doesn't seem that surprising to me, especially after seeing the docs the first time. Are there environments where you can set a variable like $*CWD and it doesn't

Re: S26 - The Next Generation

2009-08-18 Thread David Green
mode by default might be a good idea, though I'm not convinced it's completely necessary. -David

Re: r90210 - in docs/Perl666/Spec: . S0S-upsetting-library

2009-08-18 Thread David Green
preceded by (##`=☞, and not run any executable code when you're looking at it. And there's a magic plural-\s (s/://g), but it works only if the attributee is Larry Wall. -David is it bedtime yet? Green

Re: S26 - The Next Generation

2009-08-17 Thread David Green
a static doc file a requirement, and even the cpan shell could warn users about any modules that don't include static docs -- in fact, I think it would be reasonable to refuse to install such modules by default. -David

Re: S26 - The Next Generation

2009-08-16 Thread David Green
. ;-) I like it very much. But don't worry, I'll think of something to quibble about! -David P.S. to format it using perldoc2xhtml, I had to change the =begin item at line 589 to =for item.

Files and IO and all

2009-08-14 Thread David Green
On 2009-Aug-14, at 4:34 am, David Green wrote: There's a lot of scope for a nice, friendly, high-level IO view; perhaps we need an IO-working group to assemble knowledge about what is and isn't possible with different filesystems and design an interface around it all. It won't

Re: Filename literals

2009-08-14 Thread David Green
practical to permit only URIs with little to no punctuation to be unquoted, and quote anything else? Not that quoting is such a great hardship anyway On 2009-Aug-14, at 7:41 am, Timothy S. Nelson wrote: And in response to David Green and his comment about working with file data vs

Re: Embedded comments: two proposed solutions to the comment-whole-lines problem

2009-08-13 Thread David Green
no fun writing features that people can't use. On the other hand, nobody writes tools for features that don't exist, so you have to start somewhere.) -David

Re: Rukudo-Star = Rakudo-lite?

2009-08-09 Thread David Green
that development will proceed exponentially enough that a single interim release will be enough to hold us over until Christmas. -David

Re: Reusing code: Everything but the kitchen sink

2009-07-12 Thread David Green
, while passing $x to sub(Foo) would merely soft-cast it. -David

Re: RFC: overriding methods declared by roles (Was: Re: Reusing code: Everything but the kitchen sink)

2009-07-12 Thread David Green
you think in practice it wouldn't be worth it? -David

Re: Reusing code: Everything but the kitchen sink

2009-07-10 Thread David Green
mixed-in .bark's, i.e. $dw.Canine::bark and $dw.Tree::bark would both now be implemented by plain $dw.bark, aka $dw.Dogwood::bark (all three full names would mean the same thing for Dogwood objects). -David

Huffman's Log: svndate r27485

2009-07-10 Thread David Green
a :base, you can have both. -David

Re: YAPC::EU and Perl 6 Roles

2009-07-10 Thread David Green
that can be toggled on or off depending on what sort of policies you need. That was actually my first thought, and I think we should have adjustable warnings for everything anyway, but the more I look at the above example, the more it's growing on me. -David

Re: New CPAN

2009-05-30 Thread David Green
, isn't Perl 6 all about being too clever by half? It's certainly about being vastly extensible, anyway. -David

Re: New CPAN

2009-05-30 Thread David Green
On 2009-May-30, at 12:06 pm, David Green wrote: ...what Perl6 is today, let alone what it will be tomorrow. Actually, we do kind of know what Perl will look like a decade from now, because P6 is deliberately extensible enough that we may never need a Perl 7. But that simply means

Re: renaming or adding some operators

2009-05-30 Thread David Green
as to whether $bar exists as a key or a value. $bar ∈ @foo; $bar ∈ %foo.keys; $bar ∈ %foo.values; ∃ %foo{bar} -David

Re: deciphering infix:cmp

2009-03-27 Thread David Green
; but that should probably be a different operation. say sort { $^a.WHAT leg $^b.WHAT || $^a cmp $^b }, a, 1, b, 2 , c, 3, d, 4; -David

Re: a junction or not

2009-03-17 Thread David Green
as defined above, how do I find out which type of junction it is? I guess really Junctions need two public methods: .eigenstates for the values, and, er, .eigenop(?!) to return how they're joined -- I'm thinking it would return a code ref, i.e. any, all, etc. -David

Re: Recursive Runtime Role Reapplication Really Rebounds

2009-03-10 Thread David Green
; print $resultset.as_string; } I suppose, but is there a reason why you want to apply roles instead of coercing the results? $x = Role::Serializable::XML $resultset; $y = Role::Serializable::YAML $resultset; -David

Re: Masak's S29 list

2009-02-26 Thread David Green
distinctions between printing and saying (presumably because simply adding a newline wouldn't be suitable)? In that case, all the object would need to do is to define its own record-separator. -David

Re: min= (from Rakudo Built-ins Can Now Be Written In Perl 6)

2009-02-24 Thread David Green
at 11:16 AM, Ruud H.G. van Tol rv...@isolution.nl wrote: David Green wrote: my $foo is limited(100..200); $foo = 5; # really does $foo = 100 Where does that MySQ smell come from? Why not undef (or NaN)? How about Failing instead of any of the above? Silently

Comparing inexact values (was Re: Temporal changes)

2009-02-23 Thread David Green
is probably not DWIM. Of course, there should also be an easy way to set epsilon across a scope, like: use Num :precision(0);# force exact matches in this block -David

min= (from Rakudo Built-ins Can Now Be Written In Perl 6)

2009-02-23 Thread David Green
at declaration rather than repeating them every time the variable is assigned to: my $foo is limited(100..200); $foo = 5; # really does $foo = 100 -David

Re: Temporal revisited

2009-02-22 Thread David Green
represents a point in time irrespective of location, then there's likewise no point in a :tz adverb. Oh, of course, I was even thinking that the TZ would only be need to be specified for times coming from somewhere else. -David

Re: r25445 - docs/Perl6/Spec/S32-setting-library

2009-02-21 Thread David Green
sleep(5`min), etc. That would mean we can always take time-types, and avoid the $t*1000*60*60*24 idiom to boot. [...]I suppose Temporal is as good a module name as any, though Temporal::Instant does seem a bit redundant... Well, it distinguishes it from Coffee::Instant... -David

Re: Temporal and purity (was: Re: IO, Trees, and Time/Date)

2009-02-19 Thread David Green
or $date.evening or something. (Maybe require $time ∩ $date or $time ⊂ $date?) -David

Re: Temporal revisited

2009-02-19 Thread David Green
with the dictionary, but I can't figure out how timezone has escaped becoming de facto standard English.) ((I also prefer Instant to DateTime unless we end up using both, as in Darren Duncan's suggestion.)) -David

Re: Support for ensuring invariants from one loop iteration to the next?

2008-12-18 Thread David Green
like that, but I thought the point was that you wanted some kind of block or something that could be syntactically distinct? -David

Re: Support for ensuring invariants from one loop iteration to the next?

2008-12-16 Thread David Green
LOOP blocks inside ENTER/LEAVE blocks?) -David

Re: Support for ensuring invariants from one loop iteration to the next?

2008-12-16 Thread David Green
the loop is running? In which case trying to count back from * might be an error for anything except constant bounds. -David

Re: r24325 - docs/Perl6/Spec

2008-12-15 Thread David Green
: @stuff.sort { .Num } # numerically @stuff.sort { ~ .name.uc } # stringwise @stuff.sort { Foo(%x{$_}) } # foo-wise I don't know what cmp returns for two values of different types. (Failure?) -David

Re: What does a Pair numify to?

2008-12-15 Thread David Green
really think of a great example where you'd want to numify a pair, but I would expect printing one to produce something like a = 23 (especially since that's what a one-element hash would print, right?). -David

Equality of values and types (was Re: how to write literals of some Perl 6 types?)

2008-12-05 Thread David Green
? Is it worth having === and syn? -David

Re: why infix:div:(Int, Int -- Rat)

2008-12-05 Thread David Green
to the quotient. -David

Re: Support for ensuring invariants from one loop iteration to the next?

2008-12-05 Thread David Green
... add a comment!) -David

Re: Support for ensuring invariants from one loop iteration to the next?

2008-12-05 Thread David Green
On 2008-Dec-5, at 7:43 am, David Green wrote: Now the condition is in the middle and is syntactically separate. (It's still not up front, but if the first block is really long, you can always... add a comment!) Well, you don't need a comment -- why not allow the condition to come first

Re: why infix:div:(Int, Int -- Rat)

2008-12-04 Thread David Green
/$j), forces you to be blatantly clear that you're disposing of the remainder and how. -David

Re: how to write literals of some Perl 6 types?

2008-12-03 Thread David Green
operators Since ++ works on strings without making them numbers, I think it should increment from A::One to A::Two. But if that's ambiguous, we could drop the ++ and stick with .=succ for non-numeric objects instead. -David

Re: how to write literals of some Perl 6 types?

2008-12-02 Thread David Green
established with the required meaning, and the only ones that come to mind are braces to indicate sets -- and of course Perl already uses braces for something else). -David

Re: Signatures and matching (was Re: XPath grammars (Was: Re: globs and trees in Perl6))

2008-10-25 Thread David Green
On 2008-Oct-22, at 10:03 am, TSa wrote: David Green wrote: One thing I would like signatures to be able to do, though, is assign parameters by type. Much like a rule can look for identifiable objects like a block or ident, it would be very useful to look for parameters by their type

Signatures and matching (was Re: XPath grammars (Was: Re: globs and trees in Perl6))

2008-10-21 Thread David Green
able to use class info that's already there would make it easy to grab params when I know the type of object I'm looking for, but not what it's called. -David

Re: Why no is ro? (Re: Subroutine parameter with trait and default.)

2008-09-24 Thread David Green
On 2008-Sep-23, at 5:27 pm, Michael G Schwern wrote: David Green wrote: Happily, brevity often aids clarity. The rest of the time, it should be up to one's editor; any editor worth its salt ought to easily auto-complete ro into readonly. Eeep! The your IDE should write your verbose code

Re: Why no is ro? (Re: Subroutine parameter with trait and default.)

2008-09-23 Thread David Green
worth its salt ought to easily auto-complete ro into readonly. -David

Re: Split with negative limits, and other weirdnesses

2008-09-23 Thread David Green
a slice of the result -- assuming it can be lazy enough to calculate only what ends up getting sliced out. -David

Re: Multiple Return Values - details fleshed out

2008-08-12 Thread David Green
, and the return statement would need to supply each one twice. Couldn't these all work the same way as parameter passing does? Even at the cost of a bit more complexity, it would be simpler overall to have only one set of rules to learn. -David

Re: assignable mutators (S06/Lvalue subroutines)

2008-06-06 Thread David Green
to make doing so prettier. -David

Re: Fatal/autodie exception hierarchies for Perl 5

2008-06-04 Thread David Nicol
On Mon, Jun 2, 2008 at 6:50 PM, Larry Wall [EMAIL PROTECTED] wrote: * Exception handlers run in the lexical context of the block being tried. * Exception handlers run in the dynamic context of the code that is failing. the first seems dangerous, esp. considering the

Re: ordinal access to autosorted hashes

2008-06-02 Thread David Green
On 2008-Jun-1, at 11:20 am, Jon Lang wrote: David Green wrote: I thought it already did, but apparently it's something that we discussed that didn't actually make it into S09. I agree that .[] should apply to hashes just as .{} can apply to arrays. The hashes don't even need

Re: assignable mutators (S06/Lvalue subroutines)

2008-06-02 Thread David Green
On 2008-Jun-1, at 1:50 pm, Jon Lang wrote: David Green wrote: [...] assignment should work like passing args when used on a function. Then you can easily do whatever you want with it. [...] If a routine is rw, you may optionally define a single slurpy scalar (e.g., '*$value') in its

Re: ordinal access to autosorted hashes

2008-06-01 Thread David Green
the innards of the Hash type yourself anyway. But if you did make a Hash::Sorted class, defining an is sorted trait might be a nice way to use it. -David

  1   2   3   4   5   6   7   8   9   10   >