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
nally, I can't think of any. say $pair; I can't 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

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

2008-12-16 Thread David Green
s LOOP would occur inside. But perhaps you could have 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
ke a snapshot of @foo, or can you change the bounds by changing @foo while the loop is running? In which case trying to count back from * might be an error for anything except constant bounds. -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: Temporal and purity (was: Re: IO, Trees, and Time/Date)

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

Re: Temporal revisited

2009-02-19 Thread David Green
hile we're at it, why is "time zone" still officially two words? Usually I like to side 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: r25445 - docs/Perl6/Spec/S32-setting-library

2009-02-21 Thread David Green
we can say 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 revisited

2009-02-22 Thread David Green
erb and dispense with gmtime() and localtime()? If an Instant object also 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

Comparing inexact values (was "Re: Temporal changes")

2009-02-23 Thread David Green
"$x==$y" 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
y a better way to approach it anyway: setting limits 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: min= (from "Rakudo Built-ins Can Now Be Written In Perl 6")

2009-02-24 Thread David Green
Feb 24, 2009 at 11:16 AM, Ruud H.G. van Tol > 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 replac

Re: Masak's S29 list

2009-02-26 Thread David Green
ne their own special 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: Recursive Runtime Role Reapplication Really Rebounds

2009-03-10 Thread David Green
:YAML; 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: a junction or not

2009-03-17 Thread David Green
] The other question is: given $choice 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: deciphering infix:

2009-03-27 Thread David Green
then by value; 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: New CPAN

2009-05-30 Thread David Green
27;re prerogative. Sure, it's always possible to go too far. But on the other hand, 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

Re: renaming or adding some operators

2009-05-30 Thread David Green
o" or "%foo ∋ $bar". I think that one's ambiguous as to whether $bar exists as a key or a value. $bar ∈ @foo; $bar ∈ %foo.keys; $bar ∈ %foo.values; ∃ %foo{bar} -David

Re: Reusing code: "Everything but the kitchen sink"

2009-07-10 Thread David Green
obably be a good idea to pick a different name!) Or else, it could mean a consolidation of the two 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
arg mandatory -- then as long as your status logging doesn't have a :base, you can have both. -David

Re: YAPC::EU and Perl 6 Roles

2009-07-10 Thread David Green
design.) Either that, or just have suitable warnings 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: Reusing code: "Everything but the kitchen sink"

2009-07-12 Thread David Green
e usual idea of casting or coercing an object to a different type. Soft casting would be focussing on the requested Role and ignoring anything else the object does, but still leaving the other roles available if you really want them. Foo($x) would then do a "hard" cast, 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
around sounded useful too, but perhaps you think in practice it wouldn't be worth it? -David

Re: Rukudo-Star => Rakudo-lite?

2009-08-09 Thread David Green
quite-so-lite"? Rakudo ** (aka "Rakudo Exponentiation")? Though I think Patrick is optimistic that development will proceed exponentially enough that a single interim release will be enough to hold us over until Christmas. -David

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

2009-08-13 Thread David Green
eason we couldn't view the same file in "code mode" and "doc mode"... but it's 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: Filename literals

2009-08-14 Thread David Green
liminating the need for doublets like "eval" and "evalfile". 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. -David

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. I

Re: Filename literals

2009-08-14 Thread David Green
ithout re-encoding them the "P6 way". Maybe it's more 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 res

Re: Filename literals

2009-08-16 Thread David Green
$file.type ~~ MIME("text/plain") {...} or just: if $file.type ~~ "text/plain" {...} since .type() presumably returns a Data::Type::MIME object to begin with. (Or even better, a Data::Type::UTI object, since UTIs are a more useful superset of MIME. Is there any system that would be even better than UTIs?) <http://en.wikipedia.org/wiki/Uniform_Type_Identifier> <http://developer.apple.com/documentation/Carbon/Conceptual/understanding_utis/understand_utis_conc/understand_utis_conc.html > -David

Re: S26 - The Next Generation

2009-08-16 Thread David Green
discussion can dislike equally. ;-) 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".

Re: S26 - The Next Generation

2009-08-17 Thread David Green
ites like CPAN will probably make 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: 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 and

Re: Filename literals

2009-08-18 Thread David Green
ding information extrapolated from the contents. A byte- order mark is metadata (it tells you something *about* the file) even though it's inside, right? Or a char-set declaration inside an HTML file, or -T Philosophically, there's no hard distinction; only whatever point of view is useful for the task at hand. If you "use IO::Filesystem::Gzip" then you should be able to treat "a" gzip file as a bunch of separate files with separate contents and metadata [even though when you look at it from a different perspective, it's all just "data" in a single .gz file]. -David

Re: $*CWD and chdir()

2009-08-18 Thread David Green
d" 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
ig deal. Nevertheless, there's more to respecting other systems than simply 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 Green 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 do some

Re: S26 - The Next Generation

2009-08-18 Thread David Green
outside the official library location). Having perl-doc run in lock-down mode, or run in display-precompiled-static-file-only 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
t should disallow / \ ? * $ @ % ☹ unless 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: Last IO discussion

2009-08-19 Thread David Green
for the user to add "use IO::Encoding $volume => ", 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
parseness 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
d dirs, and you should be able to import them: # Assume I'm running on a Mac, so $IO::DOI::MacOSX is automatically loaded use IO::DOI ; # names that ::MacOSX makes available say $Home; # /Users/david say $Music;# /Users/david/Music say $Downloads;

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 direct

Re: Custom object constructors

2009-08-19 Thread David Green
oked. E.g. 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: Filename literals

2009-08-19 Thread David Green
ilesystem. I should've mentioned, though, we're currently using the smartmatch operator for this, so I'm thinking maybe I'll just stick with that. Or $f1.id ~~ $f2.id, since whatever identifier the FS uses might not be numeric, yes. -David

Re: Synopsis 02: Range objects

2009-08-25 Thread David Green
rd "range" suggests ordering (like the related word "rank"), so perhaps Range is the right 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: versioning same-auth forks/branches

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

Re: Synopsis 02: Range objects

2009-08-27 Thread David Green
$range. If a Range is not a Series, then there's no confusion as to whether being in the range means being in the series or not. S03: Alternately, we could treat an ellipsis 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: [perl #69194] rakudo 2009-08 and when with lists

2009-09-19 Thread David Green
seems confusing. 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 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 o

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

2009-09-21 Thread David Green
don't see that we would lose any functionality (make the :by features work with "..."; or keep ".." and "..." as two ways to make series, and use infix: for Ranges; or anything else that distinguishes ranges from iterators). What's the big advantage in keeping it the way it is? -David

Re: r28344 - docs/Perl6/Spec

2009-09-22 Thread David Green
"and so on". Oh, nice! In fact (no surprise) I like all the changes. -David

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

2009-10-04 Thread David Green
especially obvious choice (because .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: Parsing data

2009-10-07 Thread David Green
l syntax 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
der" that is intended. (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: r28727 - docs/Perl6/Spec

2009-10-11 Thread David Green
and avoid this problem: +sub say-or-print { +if $SAYIT { +say @_; # WRONG +} +else { +print @_; # WRONG +} +} Or am I merely not yet used to situations where you'd want @_ to grab args passed in by "if"? -David

Re: Freezing role methods

2009-10-14 Thread David Green
how bark() works (either one), nothing needs to be rewritten. If you want to change from Tree::bark-ing 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 as

Re: Aliasing methods in CPAN roles

2009-10-16 Thread David Green
be used where unambiguous. (I guess this parallels what we already have for subs, etc., 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: Aliasing methods in CPAN roles

2009-10-18 Thread David Green
ame inside the block as the one being passed in? That would be useful in cases like this where we don't particularly want to rename $x.) $x.log:(Logging:); 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-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

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".

Re: unusual invocants

2009-10-20 Thread David Green
_ ~~ Y and $_ ~~ Z }: Int $a, Int $b) { ... } I would expect "$foo 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
;" syntax to feed args into a slurpy parameter. But in your angle example, we really do want an assignment because the net result is to assign stuff. Perhaps "method angle 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: new enumerations

2009-11-29 Thread David Green
ot;. (At first I wrote "?Day(3)", but that wouldn't work if there was value that was false. On the other hand, shouldn't enums typically be true? Does it fit the common case better for enums to start at 1 instead of 0, or maybe start at 0 but true?) -David

But vs. With

2009-12-03 Thread David Green
of things will have default stringifications, say, that may not always merit the contrary force of "but". Maybe "but" should 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
. Since the Bool(Int) method already exists, "but" is indeed the appropriate choice to override it. -David

Re: But vs. With

2009-12-04 Thread David Green
have an adverb to control its strictness too, come 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

KeyWeight and KeyBag

2010-01-20 Thread David Brunton
I notice that C 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 C always evaluates to False in Boolean context when negative?

Re: KeyWeight and KeyBag

2010-01-21 Thread David Brunton
Jan 21, 2010 4:04 PM, "Darren Duncan" wrote: David Brunton wrote: > I notice that C 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 C always evaluates to False > in Boolean con

Re: Gripes about Pod6 (S26)

2010-02-13 Thread David Brunton
On Feb 10, 4:38 pm, dam...@conway.org (Damian Conway) wrote: > I sincerely hope that the future community of designers of Perl 6 's > documentation format will find a way to honour and support the very > different needs of *all* the creators and users of Perl, not just the > needs of the most prom

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

2010-02-22 Thread David Green
ay "Time's up!" } when $answer { say "That is correct!" } default { say "Sorry, wrong answer" } } -David

eqv and comparing buts

2010-05-26 Thread David Green
whether two things can be expected to work the same way, so perhaps there can 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: Command-line args (weekly contribution to P6)

2010-05-27 Thread David Green
ms at the first positional arg. Of course, some commands continue to process named params either way. For programs 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

Re: Type Conversion Matrix, Pragmas (TAKE 4)

2003-06-16 Thread David Storrs
On Mon, Jun 16, 2003 at 10:15:57AM -0700, Michael Lazzaro wrote: > > On Friday, June 13, 2003, at 10:26 PM, David Storrs wrote: > > >my $a = 'foo'; > >my Int $b = $a; # legal; $b is now 0; is there a warning? > >my $c = $b; # is

Re: printf-like formatting in interpolated strings

2003-06-16 Thread David Storrs
On Mon, Jun 16, 2003 at 11:37:06AM -0700, Michael Lazzaro wrote: > [...] > But there is broad support for the idea that the somewhat elderly > printf syntax is a PITA, and that printf, in general, should be > completely unnecessary since we already *have* interpolated strings, > fer pete's sake.

Re: Type Conversion Matrix, Pragmas (TAKE 4)

2003-06-16 Thread David Storrs
On Mon, Jun 16, 2003 at 11:47:35AM -0700, Austin Hastings wrote: > > Although it occurs to me that there might be such a thing as "Int > properties" and "Str properties", and maybe the conversion propagates > the appropriate ones. > > That is: > > my $a = "foo" but $purple ; > $a but= false; > $

Re: As I am a New one.

2003-06-23 Thread David Storrs
On Mon, Jun 23, 2003 at 03:13:23PM +0100, sitaram wrote: > Hi, > I am a new one Perl. > I want a book which gives the Knowledge about perl. > I learned up to some extent using the online books. > I want a book which is tells me about functions(system,Built in) in brief. > Can U send the URL for suc

Re: This week's summary

2003-06-24 Thread David Storrs
On Tue, Jun 24, 2003 at 06:14:52AM -0700, Sean O'Rourke wrote: > On Tue, 24 Jun 2003, Leopold Toetsch wrote: > > > > [...] Nobody answered, if we need another > > Sub class implementing the old invoke/ret scheme ... > > I'd say "no". P6C is now compiling to an obsolete architecture. > While we sh

Re: This week's summary

2003-06-24 Thread David Storrs
On Tue, Jun 24, 2003 at 04:04:29PM +0100, Andrew Wilson wrote: > On Tue, Jun 24, 2003 at 07:58:32AM -0700, David Storrs wrote: > > /me shows ignorance yet again. > > > > For those of us who are not hardware types...what is "the new > > machine"? The Itanium?

Re: Aliasing an array slice

2003-07-07 Thread David Storrs
Thinking about it, I'd rather see lvalue slices become a nicer version of C. my @start = (0..5); my @a = @start; @a[1..3] = qw/ a b c d e /; print @a; # 0 a b c d e 4 5 # Similarly: @a = @start; my $r_slice = [EMAIL PROTECTED]; @$r_slice = qw/ a b c

Re: Aliasing an array slice

2003-07-09 Thread David Storrs
On Tue, Jul 08, 2003 at 05:52:04PM -0700, Austin Hastings wrote: > > --- Jonadab the Unsightly One <[EMAIL PROTECTED]> wrote: > > Am I now thinking clearly? > > > I don't think so. > > If you've created two separate arrays that happen to start with related > values, then the changes to the first

Re: Aliasing an array slice

2003-07-20 Thread David Storrs
On Fri, Jul 18, 2003 at 06:05:52PM -0400, Benjamin Goldberg wrote: > What would happen if I used 1,2,3 instead of 1..3? Would it do the same > thing? I would think so. > I wanna know what happens if I do: > >@a[0,2,4] = qw/ a b c d e /; Yup, you're right, I didn't consider non-cont

Re: The Perl 6 Summary -- preprocessors

2003-07-21 Thread David Storrs
On Mon, Jul 21, 2003 at 12:19:11PM -0700, Austin Hastings wrote: > Likewise: > > my $fh = open " > $fh =~ / = Grammars::Languages::Runoff::tbl(input_method >= Grammars::Language::Runoff::eqn(input_method > = IO::Gunzip)))>/; Very cool. Assuming this ran succe

Re: Protocols

2003-07-24 Thread David Wheeler
quivalence *without* having to inherit from an abstract base class and I wish that interface equivalence were checked before inheritance, as per Luke's idea. Sounds like you want Java-style "interfaces" to me. Regards, David -- David Wheeler AIM:

Re: Protocols

2003-07-24 Thread David Wheeler
On Thursday, July 24, 2003, at 09:25 AM, Kurt Starsinic wrote: Sounds like you want Java-style "interfaces" to me. Follow the thread back. Objective-C had them way first, and their ur-name is "protocols." D'oh! Sorry, I had read that, but then forgot.

Re: %_ - is it available for use?

2003-08-06 Thread david nicol
the general magic level of the other slots in *_, is it not? -- David Nicol /

Re: Next Apocalypse

2003-09-16 Thread David Storrs
On Mon, Sep 15, 2003 at 11:49:52AM -0400, Gordon Henriksen wrote: > Austin Hastings wrote: > > > Given that threads are present, and given the continuation based > > nature of the interpreter, I assume that code blocks can be closured. > > So why not allocate JITed methods on the heap and manage t

Re: Alternately named arguments

2003-10-25 Thread David Storrs
On Fri, Oct 24, 2003 at 12:57:18AM -0600, Luke Palmer wrote: > Presuming you can do: > > (who => $name, why => $reason) := (why => $because, who => "me"); > > (from A6) > > Does that imply that you can do: > > sub routine (name => $nombre, date => $fecha) {...} > > Anyway, I just reali

Re: Alternately named arguments

2003-10-27 Thread David Wheeler
the "named-only" markers are only available within actual parameter lists. Damian Welcome back, Damian. Lo, how we've missed you and Larry these many long months! Regards, David -- David Wheeler AIM: dwTheory [EMAIL PROTECTED]

Re: Control flow variables

2003-11-18 Thread David Wheeler
, which in your code is what happens when some_sort_of_test($t) returns a true value. Regards, David -- David Wheeler AIM: dwTheory [EMAIL PROTECTED] ICQ: 15726394 http://www.kinetico

Re: Control flow variables

2003-11-18 Thread David Wheeler
On Tuesday, November 18, 2003, at 06:44 PM, Joseph Ryan wrote: And also if @array_of_random_values contains 'ok'. D'oh! See Damian's solution, then. ;-) David -- David Wheeler AIM: dwTheory [EMAIL PROTECTED]

Re: s/// in string context should return the string

2003-11-22 Thread David Chan
[EMAIL PROTECTED] wrote: > Smylers wrote: >> This, however, is irritating: >> >> my @new = map { s:e/$pattern/$replacement/; $_ } @old; >> >> So I'd like a more elegant way of writing that -- but I don't think >> making the return value of C more complicated (and duplicating >> data in the proces

Re: Vocabulary

2003-12-18 Thread David Wheeler
locks currently _never_ execute, no matter when they're declared. Regards, David -- David Wheeler AIM: dwTheory [EMAIL PROTECTED] ICQ: 15726394 http://www.kineticode.com/ Yah

Re: Vocabulary

2003-12-18 Thread David Wheeler
e released! ;-) Regards, David (Who wants to start writing Perl 6 applications yesterday.) -- David Wheeler AIM: dwTheory [EMAIL PROTECTED] ICQ: 15726394 http://www.kineticode.com/ Yah

Re: Roles and Mix-ins?

2004-01-05 Thread David Storrs
On Sat, Dec 13, 2003 at 11:12:31AM -0800, Larry Wall wrote: > On Sat, Dec 13, 2003 at 04:57:17AM -0700, Luke Palmer wrote: > : For one, one role's methods don't silently override another's. Instead, > : you get, er, role conflict and you have to disambiguate yourself. How do you disambiguate?

run-once code

2004-01-13 Thread David Storrs
Given this code: if ( some_expensive_lookup_function() >= $MAX_RECORDS ) { mark_that_we_have_reached_max_records(); return; } After I enter that block once, I never want to evaluate the condition again--I want the code to completely disappear from the bytecode (

Re: run-once code

2004-01-14 Thread David Storrs
On Tue, Jan 13, 2004 at 10:16:48PM -0700, Luke Palmer wrote: > sub mark_that_we_have_reached_max_records() { > $max_reached = 1; > } > > if !$max_reached && some_expensive_lookup_function() > $MAX_RECORDS { > mark_that_we_have_reached_max_records(); > return; >

Re: run-once code

2004-01-14 Thread David Storrs
On Wed, Jan 14, 2004 at 10:59:52AM -0500, Melvin Smith wrote: > I think Perl6 will allow a hint like so: > > my int $max_reached; > > The important thing is that $max_reached is used simply as a conditional, > and you don't pass it to a routine or otherwise use it in a way to cause it > to be p

<    1   2   3   4   5   6   7   8   9   10   >