Re: Is Perl 6 too late?

2007-05-14 Thread Jonathan Scott Duff
g must be an array". Perl 6 has changed the meaning behind the notation ever so slightly, but the utility is still there. -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

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

2007-06-16 Thread Jonathan Scott Duff
Also, I don't think that documentation is being treated as second-class at all. It's being treated as first-class but different. To form a poor analogy, imagine threads woven together to make a tapestry. The blue threads are just as important as the red threads, but they each may have different purposes in the overall design. my two cents, -Scott -- Jonathan Scott Duff <[EMAIL PROTECTED]>

&, &&, and backtracking.

2007-09-06 Thread Jonathan Scott Duff
termine that the conjunctions can't match the same portion of the string) Or it's much simpler than that and both of the regexes above just fail because of the greediness of C<+> and there is no intra-conjunction backtracking. So ... anyone care to enlighten me on how this is supposed to work? Thanks, -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: parentheses and context (was Re: state and START)

2007-11-15 Thread Jonathan Scott Duff
o() looks like it's always in list context, but as far as START goes, I'd think the first two call foo() only once while the third calls it every time (just as you have it written). Now, someone tell me if I'm right or wrong and why :-) Nicholas Clark > -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: Concerns about "{...code...}"

2007-12-20 Thread Jonathan Scott Duff
d be persuaded to make them non-interpolative by default. (i.e., the adverb would be required to make them interpolate) -Scott -- Jonathan Scott Duff <[EMAIL PROTECTED]>

Re: Concerns about "{...code...}"

2007-12-20 Thread Jonathan Scott Duff
On Thu, Dec 20, 2007 at 11:23:05AM -0600, Jonathan Scott Duff wrote: > Adriano answered #1 I think: $yaml = Q:!c"{ $key: 42 }"; Er, I just looked over the spec again and realized that Q does absolutely no interpolation, so it would be more like this: $yaml = Q:qq:!c"

Re: Perl6::Doc # Hail to the new pharao

2007-12-29 Thread Jonathan Scott Duff
You have my permission as well. -Scott On Dec 29, 2007 7:04 AM, herbert breunung <[EMAIL PROTECTED]> wrote: > thanks to chromatic, so i have ask Jonathan Scott Duff, Phil Crow and > wait for /Adrianos answer. > > what i yesterday also forgot to mention is that rumor says

Re: muse on Compact Structs, pack/unpack

2008-04-03 Thread Jonathan Scott Duff
on's Law > > But yes, it might be about time for hypertexting it. All but S03 have > never really undergone a major reorg, and most of them could use it. > Maybe it's time to set up Twiki on my home machine... > > Larry > -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: Split with negative limits, and other weirdnesses

2008-09-24 Thread Jonathan Scott Duff
e zero and use a name like UInt that has other uses as well. Are > there pragmas that turn signature failures into undef return values? > > > Regards, TSa. > -- > > "The unavoidable price of reliability is simplicity" -- C.A.R. Hoare > "Simplicity does not precede complexity, but follows it." -- A.J. Perlis > 1 + 2 + 3 + 4 + ... = -1/12 -- Srinivasa Ramanujan > my two cents, -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: Regex - Accessing captured subrules could be problematic

2008-12-04 Thread Jonathan Scott Duff
t where whitespace has meaning (e.g. :sigspace is in effect), but you don't want the significant whitespace, you can turn that off temporarily (or again, use some other technique). HTH, -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: [PATCH] Add .trim method

2009-01-12 Thread Jonathan Scott Duff
>) could all > $string.rtrim internally. > If I were going to have ltrim() and rtrim(), I'd implement them in terms of trim() rather than the other way around. -Scott -- Jonathan Scott Duff perlpi...@gmail.com

Re: design of the Prelude (was Re: Rakudo leaving the Parrot nest)

2009-01-16 Thread Jonathan Scott Duff
the language you're trying to bootstrap as much as possible with just a few primitives to get things started. -Scott -- Jonathan Scott Duff perlpi...@gmail.com

Re: Programmatic REPL history/result access?

2009-02-04 Thread Jonathan Scott Duff
uage, or something that would better be provided > by a tool external to the language itself? Sounds usefulish for the perl 6 REPL. But not so much for "ordinary" programming. So, given that, I'd say an external tool (module) is the way to go. -Scott -- Jonathan Scott Duff d...@lighthouse.tamucc.edu

Re: Unexpected behaviour with @foo.elems

2009-05-27 Thread Jonathan Scott Duff
hing($k, $v) } > > I think the anti-pattern of "0...@foo.elems" (or its incorrect > form "0...@foo.elems") should probably disappear in favor of > the above forms instead. Or perhaps for 0...@foo.end -> $k { ... } @foo.keys may not be what the user wanted if @foo is a sparse array. -Scott -- Jonathan Scott Duff perlpi...@gmail.com

Re: New CPAN

2009-05-29 Thread Jonathan Scott Duff
the same program!). >> > > Why? > See http://perlcabal.org/syn/S11.html#Versioning -Scott -- Jonathan Scott Duff perlpi...@gmail.com

Re: Re-thinking file test operations

2009-07-10 Thread Jonathan Scott Duff
On Thu, Jul 9, 2009 at 7:50 PM, Aristotle Pagaltzis wrote: > * Moritz Lenz [2009-07-10 00:25]: > > stat($str, :e)# let multi dispatch handle it for us > > This gets my vote. Me too. -Scott -- Jonathan Scott Duff perlpi...@gmail.com

Rakudo Perl 6 development release #22 ("Thousand Oaks")

2009-10-23 Thread Jonathan Scott Duff
and codenames for 2009 is available in the "docs/release_guide.pod" file. In general, Rakudo development releases are scheduled to occur two days after each Parrot monthly release. Parrot releases the third Tuesday of each month. Have fun! -Scott -- Jonathan Scott Duff perlpi...@gmail.com

Re: Custom errors on subsets?

2010-01-05 Thread Jonathan Scott Duff
erplate every time a constraint fails. Plus, the code is friendlier :) > I'd imagine that the functionality will fall out of the ability to have nice failures because surely something like the following works now: subset Filename of Str where { $_ ~~ :f or fail "No such file: '$_'" } Perhaps s/fail/die/, but that seems like a means to your desired end. -Scott -- Jonathan Scott Duff perlpi...@gmail.com

Re: underscores vs hyphens (was Re: A new era for Temporal)

2010-04-11 Thread Jonathan Scott Duff
On Sat, Apr 10, 2010 at 5:14 AM, Mark J. Reed wrote: > I'd much rather see a single consistent style throughout the setting > than backwards compatibility with p5 naming conventions. > > If Temporal is the first setting module to use multiword identifiers, > I vote for hyphens. As another data

Re: Perl6 Daydreams (on topic but frivolous)

2003-06-28 Thread Jonathan Scott Duff
just 85% would be enough if it were the right 85%. -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: Apocalypses and Exegesis...

2003-08-14 Thread Jonathan Scott Duff
tion would be the rough cut, and later editions would be closer to reality as the language stablizes. -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: Apocalypses and Exegesis...

2003-08-14 Thread Jonathan Scott Duff
On Fri, Aug 15, 2003 at 12:19:28AM +1000, Iain Truskett wrote: > * Jonathan Scott Duff ([EMAIL PROTECTED]) [15 Aug 2003 00:16]: > > [...] > > Besides you could always provide online updates to your book as the > > language changes. The first (dead tree) edition would be t

Next Apocalypse

2003-09-09 Thread Jonathan Scott Duff
. (Better would be "We're working on X and have hashed out the details of Y but are having problems with Z", but I can see how that could cause all sorts of spurious chatter) -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: Next Apocalypse

2003-09-15 Thread Jonathan Scott Duff
he the names and positions of things that are optimized such that when one of the cached things are modified, the optimization could be replaced with either another optimization (as in the case above) or an instruction to execute some other code (when we can't optimize the change). -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: The Block Returns

2003-10-02 Thread Jonathan Scott Duff
ute the return value of $block. my $block = foo; print "Main"; $b2 = $block(); $b3 = $b2(); $b4 = $b3(); # etc. print "End"; or for the infinite version: my $block = foo; print "Main"; $block = $block() while 1; print "End";# we never get here Or am I missing something? -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: Some questions about currying

2003-10-30 Thread Jonathan Scott Duff
to a variable? Consider the following code: > > sub printNum(int $x) {print "$x\n";} > my $foo = 0; > my $vindaloo = &printNum(int).assuming(x => $foo); #currying > ++$foo; > $vindaloo.(); > >This code prints 0, not 1, because the currying binds the parameter to > the value $foo had when the currying occurred, not the value it had when the > curried function was called. I'm sure there's some way to do this, but I can't think of it right off. -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: Control flow variables

2003-11-19 Thread Jonathan Scott Duff
nd fall through to (3) if it was > false? Of course, that's how it works :) -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: Control flow variables

2003-11-19 Thread Jonathan Scott Duff
> if $is_ok { > yada() # has sideeffects... > } my $t = 0..6; yada() if none(abs(@new[$t] ^- @new[$t+1])) > 3; :-P -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: Control flow variables

2003-11-19 Thread Jonathan Scott Duff
t understand ... Do you mean something like this? confer { for @a -> $x { ... } || beget @results; } where "confer" is the do-like marker and "beget" is the yield-like statement. But why not this? for @a -> $x { ... } or do { ... } I need an example. thanks, -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: [perl] RE: s/// in string context should return the string

2003-11-19 Thread Jonathan Scott Duff
llison the maintainer? Just prod her with an email or two. -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: Control flow variables

2003-11-20 Thread Jonathan Scott Duff
ide of a special block. But maybe it *needs* to be weird. > On the other hand, putting the default up front is clearer if the > block is long. Could even be something like: > > @foo = gather is default(@results) { > for @a -> $x { pick $x if mumble($x) } > } Hmm. @foo = for :gather,default(@results) @a -> $x { ... } -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

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

2003-11-20 Thread Jonathan Scott Duff
st the same? $string.sub($pat,$rep,"each"); # ick. $string.sub:e($pat,$rep); # hmm. -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: Control flow variables

2003-11-21 Thread Jonathan Scott Duff
my $what = do { > while $cond {...} > } I would expect it to be the value of the last statement executed. -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: 'catch' statement modifier

2003-11-23 Thread Jonathan Scott Duff
err: Operation High Precedence Low Precedence INCLUSIVE OR || or EXCLUSIVE OR ~~xor DEFINED OR // err This is in the "Read or Die" section of E4 if you want to read more. -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: The C Comma

2003-11-25 Thread Jonathan Scott Duff
++ also @accum < $total { ... } or maybe throw some latin in there while $n++ et @accum < $total { ... } while $n++ cum @accum < $total { ... } # maybe? but that's probably more obscure than the comma. Okay, so I don't have any good ideas either, but I like "also" if we're getting rid of the "C comma". -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: The C Comma

2003-11-25 Thread Jonathan Scott Duff
On Tue, Nov 25, 2003 at 01:46:39PM -0700, John Williams wrote: > On Mon, 24 Nov 2003, Jonathan Scott Duff wrote: > > or maybe throw some latin in there > > > > while $n++ et @accum < $total { ... } > > while $n++ cum @accum < $total { ... } # mayb

Re: Properties

2003-12-01 Thread Jonathan Scott Duff
.notexported; $o but= trulyglobal; Or am I missing something? > then write allow() to build roles for each value passed in, maybe taking an > arg to say whether they should be truly global, or built in the caller's > namespace Isn't that what my, our, Exporter, and the globalifying * are all about? I look forward with much anticipation to A12. -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: Properties -- distributive, predeclared, post-applied....??

2003-12-05 Thread Jonathan Scott Duff
while round-bracket parameterization was, of course, run-time. I don't know if that's even partially true though. If that isn't the distinction, then what is? Why the two bracket styles? -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: Iterating through two arrays at once

2003-12-11 Thread Jonathan Scott Duff
about whether one array was bigger than the other, surely you could check that yourself. In any case, run-time properties (is this redundant?) can help you out. Perhaps you get an "undef but out_of_bounds" kind of value back when you run off the end of the shorter array. -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: Vocabulary

2003-12-12 Thread Jonathan Scott Duff
. } { my role Learn { ... } $frank does Learn; ... } so that when the role goes out of scope, the object no longer possesses the abilities of that role. I confuse myself everytime I think about this stuff. -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: Vocabulary

2003-12-14 Thread Jonathan Scott Duff
we would need a way to do same-signature replacement on methods too? This would mildly argue against an implicit "multi". > So whenever you bind a run-time role, the class looks to see if it > already knows how to do the combination of roles this object wants, > and if so, the role binding is very fast. Otherwise it creates the new > composition, checks for conflicts, resolves them (or doesn't), and then > binds the new composition as the object's current view of its class. Neat. -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: Vocabulary

2003-12-15 Thread Jonathan Scott Duff
On Sun, Dec 14, 2003 at 06:14:42PM -0800, Larry Wall wrote: > On Sun, Dec 14, 2003 at 03:16:16AM -0600, Jonathan Scott Duff wrote: > [ my ramblings about a mechanism for role methods to supercede class > methods elided ] > > I think there's a simple way to solve this: If

Re: Vocabulary

2003-12-16 Thread Jonathan Scott Duff
eeds it -- and should be associated with > that class, Yep. > such that if that class later falls into disuse, the > optimizations silently reappear. That would be *some* trick! -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: Archive tarball?

2004-01-08 Thread Jonathan Scott Duff
bulary when coming up with the stories :-) > If worse comes to worst, you can always ask me. I manage to keep the > largest amount of the language in my head with the most time available > to answer questions :-) Oh no, now *everybody* will be asking you stuff. :-) -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: Semantics of vector operations (Damian)

2004-01-22 Thread Jonathan Scott Duff
$j; Though I'm not sure what that would mean. I don't think junctions apply at all in vectorization. They seem to be completely orthogonal. -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: Semantics of vector operations

2004-01-22 Thread Jonathan Scott Duff
" or > some such. Could someone put the non-unicode variants up there so those of us with unicode-ignorant MUAs can know what exactly we're talking about? Or alternatively (and certainly better), could someone clue me on how to make mutt unicode-aware? thanks, -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: Semantics of vector operations (Damian)

2004-01-22 Thread Jonathan Scott Duff
On Thu, Jan 22, 2004 at 01:28:42PM -0500, Austin Hastings wrote: > > From: Jonathan Scott Duff [mailto:[EMAIL PROTECTED] > > On Thu, Jan 22, 2004 at 01:10:23PM -0500, Austin Hastings wrote: > > > In reverse order: > > > > > > > %languageometer.values

Re: OO inheritance in a hacker style

2004-01-30 Thread Jonathan Scott Duff
ted to control how the method is dispatched, that's exactly what .DISPATCH() is for. (assuming .DISPATCH is writ in something resembling stone as I only recall seeing it mentioned once or twice) Just write it so that it doesn't consider the multi-method you want to forget. You can also control how closely a multi-method matches by choosing an appropriate method signature. For instance, an unprototyped multi-method would sit at the bottom of the list with prototyped multi-methods before it. -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: Compile-time undefined sub detection

2004-03-05 Thread Jonathan Scott Duff
e an underscore between the words to be slightly more readable. (I hate underscores, but I hate LONGCAPSWORDS more) -Scott -- Jonathan Scott Duff Division of Nearshore Research [EMAIL PROTECTED] Senior Systems Analyst II

Re: Mutating methods

2004-03-11 Thread Jonathan Scott Duff
On Thu, Mar 11, 2004 at 11:11:54AM -0800, Larry Wall wrote: > On the final hand, if people fall in love with both self:sort and =sort, we > could have =sort be a shorthand for self:sort where it's unambiguous. Wouldn't =sort potentially muck with POD? -Scott -- Jonathan S

Re: Mutating methods

2004-03-12 Thread Jonathan Scott Duff
nfer it rather easily. Can we make that DWIM? (One way would be > for the parser to convert that into if-else form if it appeared > ambiguous.)) So ... how smart will perl6 be? $o .= (foo,bar,baz); $o .= (expr_returning_method); Since human expectations vary I don't think I want these. -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: backticks

2004-04-14 Thread Jonathan Scott Duff
u wouldn't. For that the more verbose syntax is required and I think even desired. %foo`key is just a shorthand for the very common %foo{key} -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: backticks

2004-04-14 Thread Jonathan Scott Duff
c -l > > > 123 > > > > > > `` gets used an awful lot > > > > But that's in Perl 5, which is a glue language. > > > >And Perl 6 isn't? I use backticks quite a bit in Perl, and I don't see > that changing if I upgrade to Perl 6. Me too, but I write my backticks like qx():) -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: backticks

2004-04-15 Thread Jonathan Scott Duff
% bar (for some reason, I can't like @ as an array dereference. > [] does it for me.) I'd favor Juerd's proposal over this madness any day :) -Scott -- Jonathan Scott Duff Division of Nearshore Research [EMAIL PROTECTED] Senior Systems Analyst II

Re: backticks

2004-04-16 Thread Jonathan Scott Duff
seems infinitesimally small to me (compare it to all of the added complexity in perl6 so far). Disambiguation based on context works. Show me the complications you see. -Scott -- Jonathan Scott Duff Division of Nearshore Research [EMAIL PROTECTED] Senior Systems Analyst II

Re: backticks

2004-04-16 Thread Jonathan Scott Duff
fair each of those descriptions should mention %hash<> if the first one does. > I'm going to throw in one more argument at this point. It's based on a > game you all played as children: Which One Of These Doesn't Belong? > > &stuff(1) > @stuff[1] > %stuff{1} > %stuffï1ï > %stuff`1 I have nothing to say to this other than "so what?" Really, does it matter that much? Are delimiters really that important here? -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: A12: Required Named Parameters Strike Back!

2004-04-19 Thread Jonathan Scott Duff
ants perl to carp when any of the name, age, or id is unspecified, he's back to manually checking the parameters at run-time. Maybe that's a feature. -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Minor confusion

2004-04-19 Thread Jonathan Scott Duff
s Tail $.wagger = { $.wagger.new(...) } which does some appropriate magic to call Tail.new because $.wagger hasn't been initialized yet. Or is Tail also a Dog somehow? What happens if the attribute is untyped? Presumably that's an error. -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: A12: default accessors and encapsulation

2004-04-20 Thread Jonathan Scott Duff
rt; > ... > } Sure method buffersize will do { +$.buffer.bytes } will store { ... } IIRC -Scott -- Jonathan Scott Duff Division of Nearshore Research [EMAIL PROTECTED] Senior Systems Analyst II

Re: MethodMaker techniques in Perl 6

2004-04-26 Thread Jonathan Scott Duff
a.name1 }; See http://dev.perl.org/perl6/apocalypse/A12.html#Class_Name_Semantics (Or was there someplace that said simple scalars need not be parenthesized?) -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: Compatibility with perl 5

2004-04-26 Thread Jonathan Scott Duff
ches. Also, that colon seems *way* overloaded. :-) How about = instead? #!/usr/bin/perl = #!/usr/bin/perl =6 Although perl =P =i.bak =le '...' does look a little strange. But double the dashes for double the fun! This is perl 6! :-) -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: A12: Required Named Parameters Strike Back!

2004-05-05 Thread Jonathan Scott Duff
in impurity. There are > more subtle reasons for wanting to add a required named parameter. > Adding the => syntax to a method call, while the parameter isn't > formally named, can be a useful language building idiom. That's why I > support the C trait. But making a

Re: A stack for Perl?

2004-06-24 Thread Jonathan Scott Duff
ify a clear need (and clear semantics!) before implementing something. -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: if, loop, and lexical scope

2004-06-28 Thread Jonathan Scott Duff
to scope > until the end of the statement in which it is defined. Is that correct? > and what will perl6 do? IIRC, perl6 will lexicalize $b as soon as it sees "my $b" so that it should print b b Assuming a left-to-right evaluation :) -Scott -- Jonathan Scott Duff Division of Nearshore Research [EMAIL PROTECTED] Senior Systems Analyst II

Re: The .bytes/.codepoints/.graphemes methods

2004-06-29 Thread Jonathan Scott Duff
top of the file. Or was that to imply that a literal "a" in the RE would be interpretted as a "grapheme a" when :u2 is active? -Scott -- Jonathan Scott Duff Division of Nearshore Research [EMAIL PROTECTED] Senior Systems Analyst II

Re: push with lazy lists

2004-07-07 Thread Jonathan Scott Duff
ber greater than or equal to 0 and less than 1 which when used as an index into an array gets turned into a 0. As to why the second pop would take forever, I'd imagine that in order to pop the last item from the array, all of the elements must first be generated (i.e. we lose all laziness). And unless we have some magic for generating them from either end, it'll start at the begining and continue until the end, then stop before it ever does the pop. :-) -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: enhanced open-funktion

2004-07-13 Thread Jonathan Scott Duff
suppose the perl6 equivalent would be: { temp $*ARGS = <>; while (<$ARGS>) { # ... } } Not much different is it? -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: Cartesian products? [Especially wrt iterations]

2004-07-13 Thread Jonathan Scott Duff
zip(1..10, 5..20, <>) -> $x, $y, $text { do_something_with $x,$y,$text; } -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: String interpolation

2004-07-21 Thread Jonathan Scott Duff
r: @foo[..] %foo{..} > or perhaps, with a slight analogy with filesystems, @foo[*] > and %foo{*}. Doesn't feel right at all. -Scott -- Jonathan Scott Duff Division of Nearshore Research [EMAIL PROTECTED] Senior Systems Analyst II

Re: String interpolation

2004-07-21 Thread Jonathan Scott Duff
On Wed, Jul 21, 2004 at 12:39:57PM -0600, Luke Palmer wrote: > Jonathan Scott Duff writes: > > On Wed, Jul 21, 2004 at 07:35:08PM +0200, Aldo Calpini wrote: > > > Larry Wall wrote: > > > > > > >Hmm. That makes me wonder what the slice notation for "

Re: String interpolation

2004-07-27 Thread Jonathan Scott Duff
finition of "perl" will change slightly. I think Perl6 will have sufficient hooks such that other languages (or editors) will have complete access to perl's parsing ability via a library (for instance. maybe it's via some other mechanism) such that anything could parse perl if it knows how to ask. :-) -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: Synopsis 2 draft 1 -- each and every

2004-08-19 Thread Jonathan Scott Duff
's 5 characters too many, but it works. print more $foo; for more $foo { ... } # er ... while more $foo { ... } It sorta works. I like "each" best though. Why exactly can't it work? -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: Synopsis 4 draft 1

2004-08-20 Thread Jonathan Scott Duff
CONTROL {...} catch control exceptions -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: Instantiation

2004-08-23 Thread Jonathan Scott Duff
tantiate me one." > > So, I was wondering about a synonym, like: > > uses Some::Module::That::Defines::A::Class $foo; How about this? my :autouse Some::Module::That::Defines::A::Class $foo; -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: Synopsis 9 draft 1

2004-09-03 Thread Jonathan Scott Duff
OTECTED];;*] == 5 BTW, could these also be made to work (or something similar)? my int @b; my int @a is shape(10;5;7); @b = @a[*:by(2);;] # @b is now shape(5;5;7) @b = @a[;1,4;] # @b is now shape(10;2;7) @b = @a[;(*);] # @b is now shape(10;7) @b = @a[;;;*] # @b is now shape(10;5;7;1) @b = @a[;;;*5] # @b is now shape(10;5;7;5) -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: Synopsis 9 draft 1

2004-09-03 Thread Jonathan Scott Duff
something > better. But I rather like shape. It's short, and not easily confused > with other Perl 6 concepts. Works for me. -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: parameter contexts (was: Synopsis 9 draft 1)

2004-09-03 Thread Jonathan Scott Duff
and move to the other er ... little end After typing these I can see why Larry likes A and Z so much. -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: Roles trying to be nice

2004-09-06 Thread Jonathan Scott Duff
g like this for classes too (though I may have imagined it) where PRE blocks would fire immediately upon instantiation, and POST blocks immediately after instantiation. Er, perhaps the terminology is wacky there. The instantiation process goes PRE,BUILD,POST and doesn't actually happen unless all of those happen. -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: Still about subroutines...

2004-09-16 Thread Jonathan Scott Duff
oo and became $<> and <> respectively? And FWIW, I kinda like $& even with the over-done & :-) -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: Still about subroutines...

2004-09-17 Thread Jonathan Scott Duff
ckage'} and %*WHICH{'file'}) or some other suitable abstraction (maybe there's an object that represents the program state that you can query $*PROG.file, $*PROG.line, etc.)) But is it really worth the the secondary sigil? -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

S5: range quantifier woes

2004-09-17 Thread Jonathan Scott Duff
ant, but I don't know that :-) On the whole, I liked the simplicity of the old <$m..$n> (or even <$m,$n>) and would like something just like it only without the ambiguity of <$m>. I'd even suggest <+$m> as a disambiguating mechanism if we weren't using + and - for "character" classes. -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: S5: range quantifier woes

2004-09-18 Thread Jonathan Scott Duff
assertion to me. Assertions are more like "nouns" and all of *, +, ?, and **{} are "verbs" that act upon these nouns. Using the angle brackets for repetition suddenly makes rules look like "this sentence no verb". :-) -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: S5 and overlap

2004-09-21 Thread Jonathan Scott Duff
; at different locations. One thing S5 didn't mention was how to know at which position each substring matched. I'm sure that's filed away in the magic $0 object though. Hopefully, I'm being clear. -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: anonimity

2004-11-07 Thread Jonathan Scott Duff
$:foo # a private attribute $?foo # a compiler variable $=foo # a POD variable $ïfooï # a rule-scoped variable That last one just doesn't fit with the others. I'd prefer something like $~foo if I had a say. -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: while idiom [Was: Arglist I/O [Was: Angle quotes and pointy brackets]]

2004-12-06 Thread Jonathan Scott Duff
uld do, but it seems like it should be similar to { my @x = $IN.slurp; ... } Can it be that unary = in n-ary context iterates like p5's <> except when n == Inf or n == 0 (which are list and void context I guess) ? -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: while idiom [Was: Arglist I/O [Was: Angle quotes and pointy brackets]]

2004-12-06 Thread Jonathan Scott Duff
On Mon, Dec 06, 2004 at 10:59:18AM -0800, Larry Wall wrote: > On Mon, Dec 06, 2004 at 12:45:18PM -0600, Jonathan Scott Duff wrote: > : On Mon, Dec 06, 2004 at 09:56:57AM -0800, Larry Wall wrote: > : > On Mon, Dec 06, 2004 at 10:38:10AM -0500, Austin Hastings wrote: > : > : Can

Re: pull & put (Was: Angle quotes and pointy brackets)

2004-12-06 Thread Jonathan Scott Duff
; has too strong a class accessor connotation in most OO. > > > >"unpull?" ;-) > > > > > pushf/popf. f is for "front". Ew! I'd prefer :head/:tail modifiers to push/pop over that. But ... > But I still don't see anything wrong with shift/unshift. Neither do I. -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: forany, forall...

2005-01-16 Thread Jonathan Scott Duff
mething } if 7 < all(LIST) < 15 { do_something } if all(LIST) eq 'fred' { do_something } -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: Perl 6 How Do I? (Was: Perl 6 Summary for 2005-01-11 through 2005-01-18)

2005-01-19 Thread Jonathan Scott Duff
uess I'd write it as for <> -> $l { mysub($_) for $l.split(//); } -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: Fun with junctions (was Sets vs Junctions)

2005-02-12 Thread Jonathan Scott Duff
s evaluated (like 3/any(2,0,3) would generate a junction of any(3/2,3/0,3/3) with that 3/0 waiting to be realized (evaluated) and once it is, then $! would hold the "divide by zero") In my current sleep-deprived state I think that you're more likely to get a junction of various $! valus than have $! be a junction of values (unless you're setting it explicitly) -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: Fun with junctions (was Sets vs Junctions)

2005-02-12 Thread Jonathan Scott Duff
fault, but rather enabled via a pragma of some sort (or, of course, via an "autothreaded" trait). For the built-in routines this isn't a worry as we get to design them appropriately. -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: Fun with junctions (was Sets vs Junctions)

2005-02-12 Thread Jonathan Scott Duff
On Sun, Feb 13, 2005 at 09:53:36AM +1100, Damian Conway wrote: > Jonathan Scott Duff wrote: > >The down side is that programmers need to be more aware of > >subroutine/method side effects and write their programs accordingly. > > This is a *down*-side??? ;-) Indeed ;-)

Re: Fun with junctions (was Sets vs Junctions)

2005-02-13 Thread Jonathan Scott Duff
e module that he has created and released to CPAN starts getting used with code that uses junctions and his users discover bizarre behavior. > That isn't likely to happen often. Perhaps. -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: Fun with junctions (was Sets vs Junctions)

2005-02-15 Thread Jonathan Scott Duff
I would imagine that the Junction's C or C (ala python) method gets called and it does something appropriate. Those are my assumptions. > Patrick R. Michaud wrote: > >OTOH, what happens with...? > > > > sub nofun($x is rw) { > > $x += 2; > > } > > > > $y = 3 | 4; > > nofun($y); That's either an error ("Can't modify constant") or the same as 5|6. The former makes the most sense to me at the moment. -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: Junction Values

2005-02-15 Thread Jonathan Scott Duff
On Wed, Feb 16, 2005 at 12:17:35PM +1100, Damian Conway wrote: > >none($a, $a) == undef > > True. Isn't this one false in the case when $a is undef? -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: Fun with junctions (was Sets vs Junctions)

2005-02-15 Thread Jonathan Scott Duff
On Tue, Feb 15, 2005 at 09:34:31PM -0600, Patrick R. Michaud wrote: > On Tue, Feb 15, 2005 at 07:20:53PM -0600, Jonathan Scott Duff wrote: > > > Patrick R. Michaud wrote: > > > >OTOH, what happens with...? > > > > > > > &g

Re: Novice

2005-02-16 Thread Jonathan Scott Duff
s of information about where we're at and where we've been and where we're going so you might want to start there for information. hope this helps, -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: Junction Values

2005-02-18 Thread Jonathan Scott Duff
ust a bit of > >orthogonality that allows you to give "eggs, bacon, and toast" a name > >and use it later. > > > @shopping list = <>; > > gives them a name you can use later, as well. Except that you've introduced a definite ordering where one isn't needed. This whole analogy has me wishing for an Exegesis. -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: sub and method name overlap.

2005-03-10 Thread Jonathan Scott Duff
some form of implicit multi sub that gets created to make C< > Bar $f; > C< $f.Bar >? I don't think so. > Or does it only work if there is no C< multi? sub bar > in sight? That's how I see (no sub or multi in sight) You can always be explicit if you really want to use the IO notation: Bar $f:; -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

Re: Parameter and trait questions - just how 'only' _is_ 'read-only'?

2005-03-31 Thread Jonathan Scott Duff
x27;ve strayed beyond my idea-space here :-) > > One additional wrinkle is that *anyone* is allowed to declare a > > class non-cooperative (open or non-final) during *any* part of the > > compilation > > ... even after it is declared final? Sure. > Will core types be finalized by default? No. It would be very un-perl-like to have such an unasked for restriction IMHO. Caveat lector, I'm not of the cabal. -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

<    1   2   3   4   5   >