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

2010-07-28 Thread Jon Lang
Aaron Sherman wrote: >> In smart-match context, "a".."b" includes "aardvark". > > > No one has yet explained to me why that makes sense. The continued use of > ASCII examples, of course, doesn't help. Does "a" .. "b" include "æther"? > This is where Germans and Swedes, for example, don't agree, but

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

2010-07-28 Thread Jon Lang
Michael Zedeler wrote: > Jon Lang wrote: >> This is definitely something for the Unicode crowd to look into.  But >> whatever solution you come up with, please make it compatible with the >> notion that "aardvark".."apple" can be used to match any word in t

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

2010-07-28 Thread Jon Lang
On Wed, Jul 28, 2010 at 10:35 PM, Brandon S Allbery KF8NH wrote: >  On 7/28/10 8:07 PM, Michael Zedeler wrote: >> On 2010-07-29 01:39, Jon Lang wrote: >>> Aaron Sherman wrote: >>>>> In smart-match context, "a".."b" includes "aardvark"

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

2010-07-30 Thread Jon Lang
Aaron Sherman wrote: > In the end, I'm now questioning the difference between a junction and > a Range... which is not where I thought this would go. Conceptually, they're closely related. In particular, a range behaves a lot like an any() junction. Some differences: 1. An any() junction always

Re: S26 broken link

2010-08-02 Thread Jon Lang
Moritz Lenz wrote: > Offer Kaye wrote: >> The link to the S26 Synopsis on http://perlcabal.org/syn/ points to >> http://perlcabal.org/syn/S26.html which is a broken link - would it be >> possible to fix this? > > I't not that easy, because we currently don't have tool to turn p6doc > into HTML. I c

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

2010-08-05 Thread Jon Lang
Aaron Sherman wrote: > You know, this problem would go away, almost entirely, if we had a :f[ull] > adverb for regex matching that imposed ^[...]$ around the entire match. Then > your code becomes: > >  m:f/<[A..Z]>+|<[a..z]>+/ > > for grins, :f[ull]l[ine] could use ^^ and $$. > > I suspect :full w

Re: r31972 -[S05] specify what .keys, .values and .kv do on Match objects

2010-08-12 Thread Jon Lang
How does a Match compare to a Parcel? -- Jonathan "Dataweaver" Lang

Re: threads?

2010-10-12 Thread Jon Lang
When Larry decided that Perl 6 would incorporate concepts from prototype-based objects, he did so at least in part because it's more intuitive for people to work with, e.g., "a cow" than it is to try to work with "the concept of a cow" as a thing unto itself. In a similar way, I think that Perl's

Re: Tweaking junctions

2010-10-25 Thread Jon Lang
First off, let me weigh in on Damian's original point: I agree that Junction!eigenvalues should be renamed to more accurately reflect what it is (perhaps to something like Junction!seedvalues, since what it's really trying to produce is a list of the values that it's using to define the Junction),

Re: Lists vs sets

2010-10-25 Thread Jon Lang
yary wrote: > +1 on this > On Mon, Oct 25, 2010 at 4:56 PM, Jon Lang wrote: >> As for the bit about sets vs. lists: personally, I'd prefer that there >> not be quite as much difference between them as there currently is. >> That is, I'd rather sets be usable w

Re: Lists vs sets

2010-10-25 Thread Jon Lang
Mason Kramer wrote: > But I don't think that thinking about who is subclassing whom is is how to > think about this in Perl 6.  All of these types are capable of doing the > Iterable role, and that is what methods that could operate on a List, Array, > Bag, or Set, should be calling for. This.  Re

Re: Lists vs sets

2010-10-25 Thread Jon Lang
Darren Duncan wrote: > If a list is a set, does that mean that a list only contains/returns each > element once when iterated?  If a list can have duplicates, then a list > isn't a set, I would think. -- Darren Duncan Thus Mason's point about Bags. Really, I think that Mason's right in that we sh

Re: Bag / Set ideas - making them substitutable for Arrays makes them more useful

2010-11-07 Thread Jon Lang
Darren Duncan wrote: > However, if the above proposal is done, I would still want an easy way to > get the value-count pairs from a bag if I wanted them. I don't see any problem there. Mason's suggestion only deals with the Bag as seen through the the lens of the Iterable role; when viewed as a h

Re: Bag / Set ideas - making them substitutable for Arrays makes them more useful

2010-11-07 Thread Jon Lang
Mason Kramer wrote: > I'd like to anticipate one objection to this - the existence of the 'hyper' > operator/keyword.  The hyper operator says, "I am taking responsibility for > this particular code block and promising that it can execute out of order and > concurrently".  Creating a Bag instead

Re: Bag / Set ideas - making them substitutable for Arrays makes them more useful

2010-11-08 Thread Jon Lang
Solomon Foster wrote: > Well, hyperoperators work fine on Hashes, they operate on the values, > paired up by key if needed.  (That is, %hash>>++ doesn't care about > the keys, %hash1 >>+<< %hash2 sums based on keys.)  I would assume > that Bag should work in the exact same way.  Dunno how Set shoul

Re: Bag / Set ideas - making them substitutable for Arrays makes them more useful

2010-11-08 Thread Jon Lang
This is going to be a rambling answer, as I have a number of questions but no firm conclusions. Please bear with me. Mason Kramer wrote: > Having Bags flatten in list context is pretty crucial to their being "as > easy and terse to use as arrays", because flattening is fundamental to > how Arrays

Re: Packed arrays and assignment vs binding

2010-11-13 Thread Jon Lang
Jonathan Worthington wrote: > In the latter case, it's fairly clear how these differ: > > @x[0] = 1; > @x[0] := 1; > > In the first, we look up the container in slot 0 or the array and assign a 1 > into it. In the second, we bind a 1 directly into the slot. There's no > container any more (so any f

Re: Bag / Set ideas - making them substitutable for Arrays makes them more useful

2010-11-13 Thread Jon Lang
Brandon S Allbery KF8NH wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 11/7/10 23:19 , Jon Lang wrote: >>     1 -- 2 -- 3 >> >> Would be a Bag containing three elements: 1, 2, and 3. >> >> Personally, I wouldn't put a high priority

Re: Bag / Set ideas - making them substitutable for Arrays makes them more useful

2010-11-13 Thread Jon Lang
Carl Mäsak wrote: > Jonathan Lang (>): >> That saves a singlr character over Bag( ... ) and Set( ... ), >> respectively (or three characters, if you find decent unicode bracket >> choices).  It still wouldn't be a big enough deal to me to bother with >> it. > > +1. Let's leave it at that. That sai

Re: Bag / Set ideas - making them substitutable for Arrays makes them more useful

2010-11-13 Thread Jon Lang
Darren Duncan wrote: > Jon Lang wrote: >> >> That saves a singlr character over Bag( ... ) and Set( ... ), >> respectively (or three characters, if you find decent unicode bracket >> choices).  It still wouldn't be a big enough deal to me to bother with >>

Re: Packed arrays and assignment vs binding

2010-11-14 Thread Jon Lang
On Sun, Nov 14, 2010 at 2:54 AM, Moritz Lenz wrote: > On IRC, Jonathan said that 1 is basically an Int, which is something > like a boxed int. So whatever operation works removes the box, and puts > the result in the variable. > > However I wonder how well that's going to work, since Int can store

Re: exponentiation of Duration's

2010-11-17 Thread Jon Lang
If I'm following this correctly, shouldn't we just say that Duration does Num? That way, a Duration can be used exactly like a Num is (with units measured in seconds); but it could also have special capabilities above and beyond what a Num can do, if such capabilities are needed. More generally,

Re: exponentiation of Duration's

2010-11-17 Thread Jon Lang
Moritz Lenz wrote: > Am 17.11.2010 17:50, schrieb Jon Lang: >> More generally, I wonder if maybe we _should_ provide a tool to help > > I think this question can only be answered in a meaningful way if somebody > actually implements such a thing as a module (which should be enti

dimensionality in Perl 6

2010-11-18 Thread Jon Lang
Here's my proposal for how to handle dimensionality in Perl 6: Create a "units" trait that is designed to attach to any Numeric object. Dimensional information gets stored as a baggy object - that is, something that works just like a Bag, except that the count can go negative. (I don't know if

Re: dimensionality in Perl 6

2010-11-18 Thread Jon Lang
On Thu, Nov 18, 2010 at 8:25 PM, Carl Mäsak wrote: > Jon (>): >> Here's my proposal for how to handle dimensionality in Perl 6: >> >> [...] >> >> Thoughts? > > The idea has come up before, everyone thinks that Perl 6 and unit > handling are a good fit for each other, and we're basically waiting >

Re: dimensionality in Perl 6

2010-11-18 Thread Jon Lang
Buddha Buck wrote: > Jon Lang wrote: >> Here's my proposal for how to handle dimensionality in Perl 6: >> >> Create a "units" trait that is designed to attach to any Numeric >> object.  Dimensional information gets stored as a baggy object - that &g

Re: How to make a new operator.

2012-03-22 Thread Jon Lang
On Thu, Mar 22, 2012 at 9:07 AM, Bruce Gray wrote: > On Mar 21, 2012, at 11:49 PM, Jonathan Lang wrote: > > What I want to know is whether there's a way to define a step function >> that's based in part or in whole on the current term's index. For example, >> how would I use infix:<...> to gene

Re: Anonymous multi-subs

2015-06-24 Thread Jon Lang
On Wednesday, June 24, 2015, yary wrote: > Now that I've thought about it for 90 seconds (not fully-formed idea), if > one were to have an anonymous multi-sub, it ought to be constructed from a > list of *signature*, *body *pairs. > > And/or, any non-finalized sub could have a method to add anoth

Re: CALL-ME vs. Callable

2016-11-14 Thread Jon Lang
ct role. Which is part of why I brought this up: the current > doc does not match what currently happens, and may not actually be > implementable without breaking the spec (that is, 6.d would have a > fundamental conflict with 6.c over the meaning of Callable). > > On Mon, Nov 14, 2016

<    1   2   3   4