Re: Regex query

2002-09-24 Thread Aaron Sherman
On Tue, 2002-09-24 at 10:27, Peter Haworth wrote: > On 24 Sep 2002 05:21:37 -0400, Aaron Sherman wrote: > > On Tue, 2002-09-24 at 01:46, Trey Harris wrote: > > > sub push(@target is rw, *@list); > > > > Well, yes, but that wasn't the point. The C<*@list&

Re: Regex query

2002-09-24 Thread Aaron Sherman
a, but > > push @a, [7,3,2]; > > would push a single element containing the arrayref [7,3,2] onto the end > of @a. > That doesn't really work. Because now you introduce the case where: $x = (1,2,3); @y = (1,2,3); $z = [1,2,3]; push @a

RE: Paren madness (was Re: Regex query)

2002-09-24 Thread Aaron Sherman
es kept coming up, and I just didn't have time to explore them. Now that Perl 6 is starting to take shape, I may go back and finish Sand as a Parrot front-end (though it was ultimately aimed at being purely compiled like C). -- Aaron Sherman <[EMAIL PROTECTED]>

Re: Paren madness (was Re: Regex query)

2002-09-25 Thread Aaron Sherman
arry to come back. I'm not really very interested in pursuing this debate further until I find out what caveats he may already be planning on introducing. Once that's in place, I have a whole slew of questions regarding []s that I think people will find interesting. -- Aaron Sherman <[EMAIL PROTECTED]>

Re: Private contracts?

2002-10-04 Thread Aaron Sherman
o an integer. It takes the following parameters: =over 5 =item C<$a> This parameter is an integer which must be positive. =back Walla! Self-documenting functions. -- Aaron Sherman <[EMAIL PROTECTED]>

Re: Arrays: Default Values

2003-01-28 Thread Aaron Sherman
value be a closure, based on index location? > > > > my @a is Array( default => { $_ ** 2 }); > > > > STRAWMAN ANSWER: Yes, because it's cool. > > No, because it's unnecessary. You can always do > > my $value = @a[$x] //= $x ** 2; Again, different. You're looking for something like C, not C -- Aaron Sherman <[EMAIL PROTECTED]> This message (c) 2003 by Aaron Sherman, and granted to the Public Domain in 2023. Fight the DMCA and copyright extension!

Re: Spare brackets :-)

2003-01-28 Thread Aaron Sherman
nge anything because HASH's fetch and store methods (no matter how builtin or pre-optimized they may be) will do the conversion. You still need C<{}> vs. C<[]> for anonymous types, but I don't think you NEED them for indexing. Now the question becomes, do you WANT them for

Re: Arrays: Default Values

2003-01-28 Thread Aaron Sherman
so you have to auto-vivify in order to pass a reference. Or did I miss something there? -- Aaron Sherman <[EMAIL PROTECTED]> This message (c) 2003 by Aaron Sherman, and granted to the Public Domain in 2023. Fight the DMCA and copyright extension!

Re: Spare brackets :-)

2003-01-28 Thread Aaron Sherman
On Tue, 2003-01-28 at 16:34, Dan Sugalski wrote: > At 4:17 PM -0500 1/28/03, Aaron Sherman wrote: > > Now the question becomes, do you WANT them > >for readability? > > Given that Larry's answer has been a resounding "yes" all along, I'm not sure

Re: Arrays: Default Values

2003-01-29 Thread Aaron Sherman
, that would be a different language, and Perl has hashes and arrays. So, the most we can do is make them not work too differently. -- Aaron Sherman <[EMAIL PROTECTED]> This message (c) 2003 by Aaron Sherman, and granted to the Public Domain in 2023. Fight the DMCA and copyright extension!

Re: Arrays: Default Values

2003-01-29 Thread Aaron Sherman
o C<@a> a list of pairs, not the expanded form that Perl5 assigns, but my point holds either way, just not the example. > 3. shift. ditto. No problem here. In fact, it's almost always a cheap operation too. Sometimes (e.g. for some types of external data) it will be exp

Re: Arrays: Default Values

2003-01-29 Thread Aaron Sherman
t: there's a central sv_undef, and that's not what array buckets are initialized to -- Aaron Sherman <[EMAIL PROTECTED]> This message (c) 2003 by Aaron Sherman, and granted to the Public Domain in 2023. Fight the DMCA and copyright extension!

Re: Spare brackets :-)

2003-01-29 Thread Aaron Sherman
the response on this list :) Also, you don't always pre-declare in Perl, and the following would be ambiguous: $x[7] = 8; That could auto-vivify an array ref or a hash ref, and choosing one or the other is kind of scary. I think you could work around that, but it would require a real ded

Re: Arrays: Default Values

2003-01-29 Thread Aaron Sherman
d no spam warning issued). This sort of logic deferral is common to many uses of undefined values (or "NULL") in databases, even when columns have defaults that are non-null. -- Aaron Sherman <[EMAIL PROTECTED]> This message (c) 2003 by Aaron Sherman, and granted to the Public Doma

Re: Arrays: Default Values

2003-01-29 Thread Aaron Sherman
I think it should be allowed. Perhaps I'm overreacting to the first option. It's not so bad. undef should still probably keep its old semantics when being converted to an integer and go to zero, though. -- Aaron Sherman <[EMAIL PROTECTED]> This message (c) 2003 by Aaron Sherman, and granted to the Public Domain in 2023. Fight the DMCA and copyright extension!

Re: Arrays: Default Values

2003-01-30 Thread Aaron Sherman
an example? -- Aaron Sherman <[EMAIL PROTECTED]> This message (c) 2003 by Aaron Sherman, and granted to the Public Domain in 2023. Fight the DMCA and copyright extension!

Re: Arrays: Default Values

2003-01-30 Thread Aaron Sherman
On Wed, 2003-01-29 at 17:12, Dan Sugalski wrote: > At 12:40 PM -0500 1/29/03, Aaron Sherman wrote: > >Elements of a has ARE ordered, just not the way you may expect. > > Just to nip this one in the bud... The bud was back that-a-way about 3 days > If people start assuming

Re: Arrays: Default Values

2003-01-30 Thread Aaron Sherman
On Wed, 2003-01-29 at 17:50, Spider Boardman wrote: > On 29 Jan 2003 14:29:52 -0500, Aaron Sherman wrote (in part): > > ajs> As for the argument that testing for true non-existentness is a > ajs> burden, check out the way Perl5 does this. Hint: there's a central > ajs

RE: arrays, hashes unified indexing syntax impact on future varia tion s on other collection types

2003-01-30 Thread Aaron Sherman
'd be programming in Java. Perl is ultimately a deconstructionist language (as Larry has pointed out), which leads me down the path of deconstructing *it*. Hmm... why is it that Perl brings out the religious and social metaphors for me? ;) -- Aaron Sherman <[EMAIL PROTECTED]> This message (c) 2003 by Aaron Sherman, and granted to the Public Domain in 2023. Fight the DMCA and copyright extension!

Re: arrays, hashes unified indexing syntax impact on future varia tion s on other collection types

2003-01-30 Thread Aaron Sherman
be easier written as: value value value Perhaps casting it in non-Perl syntax will free us from the bonds of our preconceptions -- Aaron Sherman <[EMAIL PROTECTED]> This message (c) 2003 by Aaron Sherman, and granted to the Public Domain in 2023. Fight the DMCA and copyright extension!

Re: Sabbatical from the list

2003-01-30 Thread Aaron Sherman
to Damian's withdrawal. Since there's not much I can do on the library front at this stage anyway, I'm off to work on sand. Good luck all! -- Aaron Sherman <[EMAIL PROTECTED]> This message granted to the Public Domain in 2023. Fight the DMCA and copyright extension!

Advocating Perl 6

2010-05-29 Thread Aaron Sherman
ually brief explanation every day. We'll see how long I can keep it up. -- Aaron Sherman Email or GTalk: a...@ajs.com http://www.ajs.com/~ajs

Re: r31050 -[S03] refine hyper dwimminess to be more like APL, with modular semantics

2010-06-02 Thread Aaron Sherman
) ) ~~ (2,4,4,6) ) ok(( (1,2,3) »+» 1) ~~ (2,4,4,6) ) I tested these all with Rakudo, and they all currently fail, though I guess that's not shocking. -- Aaron Sherman Email or GTalk: a...@ajs.com http://www.ajs.com/~ajs

Re: r31043 -[S32/Containers] Buf does Stringy, too

2010-06-02 Thread Aaron Sherman
en considering this class's uses, brace style preferences notwithstanding. My knee-jerk response would be that this is fine the way it is now, but perhaps adding your suggestion as an alternative syntax could be considered for >6.0? Then again, no one cares what I say ;-) -- Aaron Sherman Email or GTalk: a...@ajs.com http://www.ajs.com/~ajs

The obligation of free stuff: Google Storage

2010-06-09 Thread Aaron Sherman
for things like sftp, Amazon S3, Google Storage and other remote storage possibilities? Is there any extant work out there, or should I just start spit-balling? -- Aaron Sherman Email or GTalk: a...@ajs.com http://www.ajs.com/~ajs

Re: The obligation of free stuff: Google Storage

2010-06-09 Thread Aaron Sherman
On Wed, Jun 9, 2010 at 10:04 AM, Aaron Sherman wrote: > Has anyone begun to consider what kind of filesystem interface we want > for things like sftp, Amazon S3, Google Storage and other remote > storage possibilities? Is there any extant work out there, or should I > just start spit-

underscore in numbers

2010-06-17 Thread Aaron Sherman
r $S10, rx184_tgt, $I11, 1 +ne $S10, "_", rx184_nodunder +add rx184_pos, 1 + rx184_nodunder: # rx subrule "decint" subtype=capture negate= rx184_cur."!cursor_pos"(rx184_pos) $P10 = rx184_cur."decint"() -- Aaron Sherman Email or GTalk: a...@ajs.com http://www.ajs.com/~ajs

Re: r31337 -[S02] allow _ between radix and digits as suggested by ajs++

2010-06-18 Thread Aaron Sherman
> +    0x_bad_cafe > + >  =item * > >  The general radix form of a number involves prefixing with the radix > > -- Aaron Sherman Email or GTalk: a...@ajs.com http://www.ajs.com/~ajs

Re: r31337 -[S02] allow _ between radix and digits as suggested by ajs++

2010-06-18 Thread Aaron Sherman
On Fri, Jun 18, 2010 at 10:26 PM, ajs wrote: > Attached, I've included test results, the tests and the patch (both to the > spectest suite and nqp-rx) to support this spec change. No... no I didn't. Here it is, attached as text. -- Aaron Sherman Email or GTalk: a...@ajs.com ht

Re: The obligation of free stuff: Google Storage

2010-06-20 Thread Aaron Sherman
Franky, I don't think that it's something that SHOULD be answered prior to building the VFS layer itself, because that layer might dictate some design decisions, but my high level impulse is to say that open on a VFS token (be it a URI or some othe complex data) will yield a VFS-back-end spe

Re: Perl 6 in non-English languages

2010-06-23 Thread Aaron Sherman
uot;907 thousandsmallweights to the short ton" rather than "907 kilograms" and that's just not going to help anyone (yes, I'm aware that Brits try to spell that grammes, and I refer my right honorable limeys to ISO 8-1:2009). Sure, Perl 6 allows you to localize names. In theory, but I'd be very concerned about anyone who actually wanted to promote the use of such a thing. -- Aaron Sherman Email or GTalk: a...@ajs.com http://www.ajs.com/~ajs

Re: Perl 6 in non-English languages

2010-06-23 Thread Aaron Sherman
I should point out that I've had a great deal of coffee. The technical details of what I've said are reasonable, but read the rest as off-the-cuff opinion. It's also true that seeing how Perl 6 would look/work when re-cast in the grammatical conventions of another human language would be very cool

Re: Filesystems and files [Was: Re: The obligation of free stuff: Google Storage]

2010-06-30 Thread Aaron Sherman
gt; Yep, that makes perfect sense. Once I have a working VFS object that could be stored in there, that's probably the best way to go, unless someone proposes another way between now and then. -- Aaron Sherman Email or GTalk: a...@ajs.com http://www.ajs.com/~ajs

S06 -- grammatical categories and macros

2010-06-30 Thread Aaron Sherman
y rules with a known prefix, by the longest-token-first rule.) Although the name of an operator can be installed into any package or lexical namespace, the syntactic effects of an operator declaration are always lexically scoped. Operators other than the standard ones should not be installed into the * namespace. Always use exportation to make non-standard syntax available to other scopes. -- Aaron Sherman Email or GTalk: a...@ajs.com http://www.ajs.com/~ajs

Re: S06 -- grammatical categories and macros

2010-07-01 Thread Aaron Sherman
On Wed, Jun 30, 2010 at 7:33 PM, Jonathan Worthington wrote: > Aaron Sherman wrote: > >> See below for the S06 section I'm referring to. >> >> I'm wondering how we should be reading the description of user-defined >> operators. For example, "sub in

Re: r31651 -[S13] try to make multisig semantics slightly more generic so sigs can do better pattern matching

2010-07-14 Thread Aaron Sherman
r any parameter that occurs in > +multiple signatures with non-identical nominal types, the actual > +lexical variable will declared > "will *be* declared"? -- Aaron Sherman Email or GTalk: a...@ajs.com http://www.ajs.com/~ajs

Suggested magic for "a" .. "b"

2010-07-16 Thread Aaron Sherman
sequence does not increment (e.g. "AA", "AB" ... "ZZ") then there is an implication that counting is required. You should be able, in this case, to imply incrementing the left or right side as most significant (e.g. "AA", "BA" ... "ZZ" is also valid). It is, however, an error to try to increment indexes in any other ordering (e.g. "AAA", "ABA" ... "ZZZ"). Once a counting sequence has been established, lookahead must be employed to determine the extent of the range (e.g. "A", "B" can continue through all "Latin" Lu codepoints, so in order to know when to cycle, you must determine how many codepoints lie in the full range. This implies that length > 1 strings in "..." operations which imply a counting sequence, are not strictly evaluated lazily, though some laziness may still be employed. -- Aaron Sherman Email or GTalk: a...@ajs.com http://www.ajs.com/~ajs

Re: Suggested magic for "a" .. "b"

2010-07-16 Thread Aaron Sherman
I like it. Though it does mean that the sequence generated > incrementing "Ab" repeatedly will diverge from "Ab" .. "Be" after 4 > iterations. > Also true, and I think that's a correct thing. -- Aaron Sherman Email or GTalk: a...@ajs.com http://www.ajs.com/~ajs

Re: Suggested magic for "a" .. "b"

2010-07-16 Thread Aaron Sherman
ited, because the rules for any other sort of string that might make sense to a human are absurdly complex. As such, I think it suffices to say that, for the most part, ".." makes sense for single-character strings, and to expand from there, rather than trying to introduce anything more complex. -- Aaron Sherman Email or GTalk: a...@ajs.com http://www.ajs.com/~ajs

Re: Suggested magic for "a" .. "b"

2010-07-16 Thread Aaron Sherman
t;C" .. "A". Observe: $ ./perl6 -e 'say reverse("A" .. "C").perl' ["C", "B", "A"] $ ./perl6 -e 'say ("A" .. "C").perl' "A".."C" In order for reverse to work lazily, it woul

Re: Suggested magic for "a" .. "b"

2010-07-20 Thread Aaron Sherman
have around ranges that it doesn't think are legitimate for ranges: it repeats the LHS infinitely: "䷀" .. "䷿" - expected: all hexagram characters; got: first character, infinitely repeating. "鐀" .. "鐅" - expected: all CJK Unified Ideographs between u+9400 and u+9405; got: first character, infinitely repeating. "٠" .. "٩" - expected: all Arabic-Indic digits zero through nine; got: first digit (zero) repeating (note: bidi may confuse display in this email) "א" .. "ת" - expected: all Hebrew letters; got: first character (א) repeating (note: bidi may confuse display in this email) "A" .. "E" - expected: all full width, capital letters A through E; got: full width A repeating. -- Aaron Sherman Email or GTalk: a...@ajs.com http://www.ajs.com/~ajs

Re: Suggested magic for "a" .. "b"

2010-07-20 Thread Aaron Sherman
ould avoid ever generating a combining or modifying codepoint in such a sequence (e.g. "Ѻ" ... "Ҋ" in Cyrillic which contains several combining characters for currency and counting as well as one undefined codepoint). -- Aaron Sherman Email or GTalk: a...@ajs.com http://www.ajs.com/~ajs

Re: Suggested magic for "a" .. "b"

2010-07-20 Thread Aaron Sherman
OK, there's a lot here and my head is swimming, so let me re-consolidate and re-state (BTW: thanks Jon, you've really helped me understand, here). 1) The spec is somewhat vague, but the proposal that I made for single characters is not an unreasonable interpretation of what's there. Thus, we could

Re: Suggested magic for "a" .. "b"

2010-07-21 Thread Aaron Sherman
On Wed, Jul 21, 2010 at 1:28 AM, Aaron Sherman wrote: > > For reference, this is the relevant section of the spec: > > Character positions are incremented within their natural range for any > Unicode range that is deemed to represent the digits 0..9 or that is deemed > to be a

multi-character ranges

2010-07-21 Thread Aaron Sherman
[changing the subject because it's now clear we have two different discussions on our hands. I think we're at or closing in on a consensus for "a" .. "z", and this discussion is "aa" .. "bb"] On Wed, Jul 21, 2010 at 1:56 AM, Darren Duncan wrote

Re: Suggested magic for "a" .. "b"

2010-07-21 Thread Aaron Sherman
characters" which I'm defining as single codepoints which are neither combining nor modifying. If you like, we can have the conversation about what you do when you encounter combining and modifying codepoints, and I do think I agree with you largely, but I'd like to hold that for now. It's just too much of a rat-hole at this point. -- Aaron Sherman Email or GTalk: a...@ajs.com http://www.ajs.com/~ajs

Re: series operator issues

2010-07-22 Thread Aaron Sherman
I also think it's doable without a special tool: 0, { state $i = 1; $^a + $i++ } ... * That should work, no? Granted, state doesn't seem to work in Rakudo, unless I'm mis-understanding how to use it, but that's the idea. -- Aaron Sherman Email or GTalk: a...@ajs.com http://www.ajs.com/~ajs

Re: series operator issues

2010-07-22 Thread Aaron Sherman
lly from the previous n values as normal. That makes your examples: 0, { $^a + $^index } ... * 0, { $^a + (2 * $^index - 1) } ... * { $^index ** 2 } ... * 1, { $^a * $^index } ... * Not changing the syntax of closures seems like a reasonable goal at this late stage. -- Aaron Sherman Email or GTalk: a...@ajs.com http://www.ajs.com/~ajs

Re: series operator issues

2010-07-22 Thread Aaron Sherman
older > variables) includes any named parameters, You meant "named only" > then the index is used as > the argument corresponding to the first one. Named only... first... these terms are non-miscible, aren't they? I don't think named-only parameters have an ordering. -- Aaron Sherman Email or GTalk: a...@ajs.com http://www.ajs.com/~ajs

Re: Suggested magic for "a" .. "b"

2010-07-27 Thread Aaron Sherman
Sorry I haven't responded for so long... much going on in my world. On Mon, Jul 26, 2010 at 11:35 AM, Nicholas Clark wrote: > On Tue, Jul 20, 2010 at 07:31:14PM -0400, Aaron Sherman wrote: > > > 2) We deny that a range whose LHS is "larger" than its RHS makes sen

Re: Suggested magic for "a" .. "b"

2010-07-28 Thread Aaron Sherman
ay initializers will involve "...". Why are we not calling that ".."? Just because we defined ".." first, and it grandfathered its way in the door? Because it resembles the math op? These don't seem like good reasons. -- Aaron Sherman Email or GTalk: a...@ajs.com http://www.ajs.com/~ajs

Re: Suggested magic for "a" .. "b"

2010-07-28 Thread Aaron Sherman
On Wed, Jul 28, 2010 at 6:24 PM, Dave Whipp wrote: > Aaron Sherman wrote: > >> On Wed, Jul 28, 2010 at 11:34 AM, Dave Whipp >> wrote: >> >> To squint at this slightly, in the context that we already have 0...1e10 >>> as >>> a sequence gener

Re: Suggested magic for "a" .. "b"

2010-07-28 Thread Aaron Sherman
On Wed, Jul 28, 2010 at 6:24 PM, Dave Whipp wrote: > Aaron Sherman wrote: > >> On Wed, Jul 28, 2010 at 11:34 AM, Dave Whipp >> wrote: >> >> To squint at this slightly, in the context that we already have 0...1e10 >>> as >>> a sequence gener

Re: Suggested magic for "a" .. "b"

2010-07-29 Thread Aaron Sherman
just by knowing that the locale because they are finer grained (e.g. which Latin-using language does the word come from? What source language is most appropriate for the context? etc.) Maybe you throw an exception when you try to tell Perl that " TOPIXコンポジット1500構成銘柄" is a Japanese string

Re: Array membership test?

2010-07-30 Thread Aaron Sherman
== True; Result: Rakudo exits silently with no newline So, the right way to search for value types in a list... is highly questionable right now. ;-) -- Aaron Sherman Email or GTalk: a...@ajs.com http://www.ajs.com/~ajs

Smart match isn't on Bool

2010-07-30 Thread Aaron Sherman
.new() === R.new()' Segmentation fault Clearly this is infinitely recursive, but one imagines it would be easy enough to put a maximum recursion depth on ===. I was about to say that === should check to see if X.WHICH eqv X, but I think that would slow things down too much. Setting a max recursion depth, on the other hand would be simple and fast. -- Aaron Sherman Email or GTalk: a...@ajs.com http://www.ajs.com/~ajs

Re: Suggested magic for "a" .. "b"

2010-07-30 Thread Aaron Sherman
into some awful edge cases. Still, interesting stuff. -- Aaron Sherman Email or GTalk: a...@ajs.com http://www.ajs.com/~ajs

Re: Smart match isn't on Bool

2010-07-31 Thread Aaron Sherman
On Sat, Jul 31, 2010 at 12:56 PM, David Green wrote: > > On 2010-07-30, at 4:57 pm, Aaron Sherman wrote: > >> given False { when True { say "True" } when False { Say "False" } > default { say "Dairy" } } > >> I don't think it'

Re: Smart match isn't on Bool

2010-08-02 Thread Aaron Sherman
, that's a bug, but imagine the poor maintenance programmer that tries to figure out what's going on. I feel for him/her. The only advantage he/she will have is that this is likely to be so common an error that they'll quickly learn to look for it first when smart-matching is involved :-/ -- Aaron Sherman Email or GTalk: a...@ajs.com http://www.ajs.com/~ajs

Re: Natural Language and Perl 6

2010-08-02 Thread Aaron Sherman
On Sun, Aug 1, 2010 at 6:46 AM, Timothy S. Nelson wrote: >Hi. I'm wondering if any thought has been given to natural language > processing with Perl 6 grammars. > > Yes. ;) -- Aaron Sherman Email or GTalk: a...@ajs.com http://www.ajs.com/~ajs

Re: Smart match isn't on Bool

2010-08-04 Thread Aaron Sherman
nt "when .foo == .bar" and I can't think of a good way to replace it, so I'll buy that it's worth making so many other obvious uses deprecated. -- Aaron Sherman Email or GTalk: a...@ajs.com http://www.ajs.com/~ajs

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

2010-08-04 Thread Aaron Sherman
ad1 :image('foo.jpg') except for the fact that any unrecognized option of the first form is an error and any unrecognized option of the second form is allowed. That way, new features can be added to :reserved and migrated over time to stand-alone options after being listed in the release notes for a couple of cycles. -- Aaron Sherman Email or GTalk: a...@ajs.com http://www.ajs.com/~ajs

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

2010-08-04 Thread Aaron Sherman
across > all versions. :-( > If you never want documentation to break, then that's your only option. Someday we're going to decide to make an incompatible change to Perl's documentation system, and we'll have a very good reason to do so, I'd imagine. The right thing to do will be to make sure that we roll it out carefully and with all due warning. -- Aaron Sherman Email or GTalk: a...@ajs.com http://www.ajs.com/~ajs

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

2010-08-05 Thread Aaron Sherman
|<[a..z]>+/ for grins, :f[ull]l[ine] could use ^^ and $$. I suspect :full would almost always be associated with TOP, in fact. Boy am I tired of typing ^ and $ in TOP ;-) -- Aaron Sherman Email or GTalk: a...@ajs.com http://www.ajs.com/~ajs

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

2010-08-05 Thread Aaron Sherman
On Thu, Aug 5, 2010 at 11:09 AM, Patrick R. Michaud wrote: > On Thu, Aug 05, 2010 at 10:27:50AM -0400, Aaron Sherman wrote: > > On Thu, Aug 5, 2010 at 7:55 AM, Carl Mäsak wrote: > > > I see this particular thinko a lot, though. Maybe some Perl 6 lint > > > tool or a

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

2010-08-05 Thread Aaron Sherman
On Thu, Aug 5, 2010 at 2:43 PM, Tyler Curtis wrote: > On Thu, Aug 5, 2010 at 12:28 PM, Aaron Sherman wrote: > > While that's a nifty special case (I'm sure it will surprise me someday, > and > > I'll spend a half hour debugging before I remember this mail), i

Re: Buf.pm: FIFO and grammar

2010-08-12 Thread Aaron Sherman
ation of the rules engine that could match either text or data, and that's a gigantic undertaking. -- Aaron Sherman Email or GTalk: a...@ajs.com http://www.ajs.com/~ajs

Re: Buf.pm: FIFO and grammar

2010-08-13 Thread Aaron Sherman
; does not change the values passed in: sub foo(*...@_ is rw) { @_[0] = 1 } my $a = 0; foo($a); say $a; # 0 Kind of interesting that you can't easily emulate Perl 5's parameter passing... -- Aaron Sherman Email or GTalk: a...@ajs.com http://www.ajs.com/~ajs

Re: Buf.pm: FIFO and grammar

2010-08-13 Thread Aaron Sherman
= 1 } ; my $a = 0; foo($a); say $a' 0 $ perl -le 'sub foo { $_[0] = 1 } my $a = 0; foo($a); print $a' 1 You might well be correct about how it's supposed to work, but that's certainly not the current behavior. On Fri, 2010-08-13 at 12:06 -0400, Aaron Sherman wrote

Re: threads?

2010-10-21 Thread Aaron Sherman
I've done quite a lot of concurrent programming over the past 23ish years, from the implementation of a parallelized version of CLIPS back in the late 80s to many C, Perl, and Python projects involving everything from shared memory to process pooling to every permutation of hard and soft thread man

Re: threads?

2010-10-21 Thread Aaron Sherman
On Tue, Oct 12, 2010 at 10:22 AM, Damian Conway wrote: > Perhaps we need to think more Perlishly and reframe the entire question. > Not: "What threading model do we need?", but: "What kinds of non-sequential > programming tasks do we want to make easy...and how would we like to be > able to spec

Re: threads?

2010-10-22 Thread Aaron Sherman
On Thu, Oct 21, 2010 at 6:04 PM, Darren Duncan wrote: > Aaron Sherman wrote: > >> > Things that typically precipitate threading in an application: >> >> - Blocking IO >> - Event management (often as a crutch to avoid asynchronous code) >> - Legitim

Return value of try

2010-11-15 Thread Aaron Sherman
I was listening to the recent IO conversation on p6c, and decided to look at IO.pm in rakudo. I immediately saw a bit of code that worried me: try { ?$!PIO.close() } $! ?? fail($!) !! Bool::True Why is that so cumbersome? That seems like one of the most obvious

lol context and X

2011-03-31 Thread Aaron Sherman
5) # hyper-. flattens? $ ../rakudo/perl6 -e '(1 .. 2 X 4 .. 5)>>.join(",").say' 14152425 Can someone explain why these all behave so differently, and why we chose to flatten so aggressively in so many cases, but not in some others? -- Aaron Sherman P: 617-440-4332 Google Talk: a...@ajs.com / aaronjsher...@gmail.com "Toolsmith" and developer. Player of games. Buyer of gadgets.

Update for S32::Str and musings on sprintf

2012-09-27 Thread Aaron Sherman
gs from: http://perldoc.perl.org/functions/sprintf.html Also, a review of the POSIX documentation might reveal additional items that should be documented: http://pubs.opengroup.org/onlinepubs/9699919799/functions/sprintf.html -- Aaron Sherman P: 617-440-4332 Google Talk: a...@ajs.com / aaronjsher...@gmail.com "Toolsmith" and developer. Player of games. Buyer of gadgets.

Re: Justification for the "reversed" instruction format

2016-09-06 Thread Aaron Sherman
$ perl6 -e 'my @numbers = 1..100; say [-] @numbers; say [R-] @numbers' -5048 -4850 In general, it's kind of pointless with bare infix ops, as you can just reverse the arguments, but when reducing or the like, it becomes much more valuable. On Tue, Sep 6, 2016 at 12:43 PM, Parrot Raiser <1parr..

Re: Justification for the "reversed" instruction format

2016-09-06 Thread Aaron Sherman
Oh, and note that you can pass R'd reductions as if they were normal prefix ops: $ perl6 -e 'sub dueet(&op, *@list) { op @list }; say dueet &prefix:<[R-]>, 1..100' -4850 On Tue, Sep 6, 2016 at 12:51 PM, Aaron Sherman wrote: > > > $ perl6 -e 'my

Re: Justification for the "reversed" instruction format

2016-09-08 Thread Aaron Sherman
I don't know Haskell, but isn't flip just: sub flip(&f) { -> $b, $a, |c { f($a, $b, |c) } } And then: perl6 -e 'sub flip(&f) { -> $a, $b, |c { f($b, $a, |c) } }; my &yas = flip &say; yas(1,2,3)' 213 Aaron Sherman, M.: P: 617-440-4332 Google Talk, Ema

The use of $!attr vs self.attr in core libraries

2016-09-08 Thread Aaron Sherman
n Range: https://github.com/rakudo/rakudo/blob/32902f25ca753860067a34eb9741aa5524dbe64e/src/core/Range.pm#L96 -- Aaron Sherman, M.: P: 617-440-4332 Google Talk, Email and Google Plus: a...@ajs.com Toolsmith, developer, gamer and life-long student.

Re: Justification for the "reversed" instruction format

2016-09-08 Thread Aaron Sherman
q', 'k', :by(2); say flip-counter 3.7, 1, :by(2); $ perl6 foo.p6 (2 4 6 8 10) (k m o q) Cannot resolve caller counter(Int, Rat, Int); none of these signatures match: (Int $start, Int $end, :$by = 1) (Str $start, Str $end, :$by = 1) in block at foo.p6 line 3 Aaron

Re: This seems to be wrong

2016-09-19 Thread Aaron Sherman
"for @inputs.map( .prefix:<+> ) {...}" That's spelled: "for @inputs>>.Int -> $i { ... }" You can also use map, but it's slightly clunkier: "for @inputs.map: .Int -> $i { ... }" Aaron Sherman, M.: P: 617-440-4332 Google Talk, Email

Re: Is this a bug?

2016-09-19 Thread Aaron Sherman
. But remember that any {} around code creates a Block in Perl 6, and a Block is a first-class object. If you ask say to print a Block, it will quite happily try to do that. Aaron Sherman, M.: P: 617-440-4332 Google Talk, Email and Google Plus: a...@ajs.com Toolsmith, developer, gamer and li

Re: Is this a bug?

2016-09-19 Thread Aaron Sherman
Thank you. Silly me, thinking "this is so simple I don't need to run it through the command-line to test it." :-) Anway, yeah, say $_ for reverse lines Aaron Sherman, M.: P: 617-440-4332 Google Talk, Email and Google Plus: a...@ajs.com Toolsmith, developer, gamer and li

Re: CALL-ME vs. Callable

2016-11-14 Thread Aaron Sherman
Role-based testing seems very perl6ish. I'd suggest the role name be "Invocable" with much the sort of signature as you've described. That being said, I don't think that the current error is terrible. It clearly shows that the issue is with the attempt to invoke a Boo

Re: CALL-ME vs. Callable

2016-11-14 Thread Aaron Sherman
Fair points, all. I do think, though that if the concern is really with "the 4 cases when nqp hauls a CALL-ME out of its bowels" then that's what should be addressed... Aaron Sherman, M.: P: 617-440-4332 Google Talk, Email and Google Plus: a...@ajs.com Toolsmith, developer, game

Re: CALL-ME vs. Callable

2016-11-14 Thread Aaron Sherman
So, you said that the problem arises because NQP does something non-obvious that results in this error. Can you be clear on what that non-obvious behavior is? It sounds to me like you're addressing a symptom of a systemic issue. Aaron Sherman, M.: P: 617-440-4332 Google Talk, Email and G

Re: CALL-ME vs. Callable

2016-11-14 Thread Aaron Sherman
ith a change to the way Callable and calling work. I'm not suggesting that the latter is bad, but it seems to be a patch around a problem in the former... Aaron Sherman, M.: P: 617-440-4332 Google Talk, Email and Google Plus: a...@ajs.com Toolsmith, developer, gamer and life-long student. On M

Re: Naming debate- what's the location for it?

2018-02-08 Thread Aaron Sherman
g an explicit number. Normally, I'd recommend Latin, but Perl Sex is probably not where anyone wants to go... Roku is Japanese, but also the name of a popular device, and thus confusing... -- Aaron Sherman, M.: P: 617-440-4332 // E: a...@ajs.com Toolsmith, developer, gamer and life-long stud

Re: Naming debate- what's the location for it?

2018-02-08 Thread Aaron Sherman
Just Mu would be an amusing Perlish pun based on Muttsu... Making the interpretation either Perl "six" or Perl "most undefined". I like yary's idea too. Frankly, if Perl had an identity, I would not care about the name. I feel like it lacks that right now. -- Aaro

<    1   2   3   4   5   6