Re: Google index and subsets (two topics for the price of one!)

2008-06-16 Thread Thomas Sandlaß
HaloO, On Monday, 16. June 2008 10:11:49 Ovid wrote: > For example, should the pre/postfix '++' be > listed as having a side-effect? I think so. But the scope where these side-effects take place is important as well. In your second example below the side-effect is restrained to the subs scope. Th

Re: proposal: use \ as none junction delimeter

2005-02-14 Thread Thomas Sandlaß
Luke Palmer wrote: That's quite nice, but I've been kind of wanting to go the other way. You know, not every operation in Perl 6 needs to have a punctuation operator. I think we should not use \, and also get rid of ^. I'm interested in seeing an example where using ^ is readable enough over on

Re: proposal: use \ as none junction delimeter

2005-02-14 Thread Thomas Sandlaß
HaloO Luke, you wrote: if $a \ $b == 3 {...} *If A nor B is 3 ... What does the * in front of the if mean? Not? With "grammar reason" I meant the formal grammar of Perl6 not the one of natural english. Are you aware of such reasons? In English it's more like: if \ $a \ $b == 3 {

Re: proposal: use \ as none junction delimeter

2005-02-15 Thread Thomas Sandlaß
Luke Palmer wrote: But I counter that arguability by saying that you really shouldn't be putting one() in type signatures. If you want something to be an A or a B, and you're not doing any checking later on in the code, then it's fine if it's both A and B. If you are doing checking later on, then

Re: Containers vs Objects.

2005-02-16 Thread Thomas Sandlaß
HaloO All, Luke Palmer wrote: But what are some nice, abstract concepts that these could represent. One that I've been thinking of is: * @something is necessarily ordered: there is a well-defined "first element" * %something is necessarily a set: adding something twice is always redundant

Re: Containers vs Objects.

2005-02-16 Thread Thomas Sandlaß
HaloO Larry, you wrote: That would be cool. I'd like to see our community build up a pool of theoreticians who are not allergic to the practicalities of building a language for ordinary people to think in. It is my persistent belief (and fond hope) that theory and practice don't always have to pu

How are types related to classes and roles?

2005-02-23 Thread Thomas Sandlaß
7] enum DayOfWeek ; my DayOfWeek $day = Fri; say "Fri = {$day}, Sat = {$day + 1}, Sun = {$day + 2}, Mon = {$day + 3}"; Does that say "Fri = Fri, Sat = Sat, Sun = Sun, Mon = Mon"? Regards, -- TSa (Thomas Sandlaß)

Re: How are types related to classes and roles?

2005-02-28 Thread Thomas Sandlaß
HaloO Aaron, you wrote: Is there any reason at all that 6.0 should have return MMD? I mean, it's way-the-heck cool and all, but it became a "thing" when Parrot produced this capability as a by-product of the way MMD was implemented in conjunction with return continuations that doesn't mean we H

Re: How are types related to classes and roles?

2005-02-28 Thread Thomas Sandlaß
HaloO Aaron, you wrote: Um... I think you're thinking of operator overloading, which in Parrot actually does use the MMD facility under the hood, but MMD is nominally a separate facility. You should glance at the PDDs, as they have far more detail than I'm aware of. You mean the ones in the docs/pd

Re: Containers vs Objects.

2005-03-04 Thread Thomas Sandlaß
Luke Palmer wrote: And in fact, one of the big questions that's always in the back of my mind (that I'm not searching for an answer to, but I'm always observing for one) is: what do @ and % mean these days? Another idea: they define the subsystem of the type system that uses structural subtyping as

Re: Adding linear interpolation to an array

2005-03-08 Thread Thomas Sandlaß
polymorphism should be accompanied by a constraints system to get CBP (Constraint-Bounded Polymorphism) which is a superset of F-Bounded Polymorphism. This proposal is polymorphic as well: some consider it Hell others Heaven---with roles flipped when it comes to excessive use of (implicit) Any ;) MfG -- TSa (Thomas Sandlaß)

Re: Argument Patterns

2005-03-09 Thread Thomas Sandlaß
Luke Palmer wrote: But we always have enough knowledge to optimize the hell out of this, and they're not not handwavy "we can probably" optimizations. They're real, and they're pretty darn easy. I fully agree. But I like to add that a single 'where' on general types like Int, Str or even Any can s

Re: Argument Patterns

2005-03-09 Thread Thomas Sandlaß
HaloO Luke, you wrote: [..] The *method* is the one that knows everything, not the object. So definitions on subtypes of general types only check for those subtypes when dispatching to the methods defined in them. I stand corrected. Lax usage of Any is fair. Defining subtypes of general types and

Re: MMD as an object.

2005-03-09 Thread Thomas Sandlaß
Luke Palmer wrote: Keep in mind that the two following definitions are equivalent: class A { method foo () {...} } multi sub foo (A $a) {...} Except for attribute access, I think. For public attrs the accessor is not used and private ones are available: class A { has $.pub = "pub"; ha

Re: Adding linear interpolation to an array

2005-03-10 Thread Thomas Sandlaß
HaloO Luke, you wrote: The words 'covariant' and 'contravariant' in this context seem like voodoo math. Please explain what you mean. 'Co' means together like in coproduction. And 'contra' is the opposite as in counterproductive. With instanciating parametric types the question arises how a subtyp

Re: The S29 Functions Project

2005-03-14 Thread Thomas Sandlaß
Luke Palmer wrote: &cos($angle) or Degrees::cos($angle), depending on whether you defined it your way or my way. Uh oh, I thought we were going to make single-invocant multis and methods the same everywhere... Sorry for messing up the syntax in my example code. What I wanted to achieve is to get a

Re: Units on numbers [was Re: S28ish]

2005-03-29 Thread Thomas Sandlaß
(Thomas Sandlaß)

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

2005-03-29 Thread Thomas Sandlaß
Luke Palmer wrote: So if you want things modified, you'd have to pass in a reference. Arrays and hashes would not generally have this restriction, since we pass references of those guys anyway. But I would really like to see a declaration of any possible modification in the interface of a sub. Othe

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

2005-03-30 Thread Thomas Sandlaß
Luke Palmer wrote: Unless the caller can't see the signature, as is the case with methods. [..] Again, this can't be done unless you know the signature. And in fact, we can't do type inference on methods unless we do type inference everywhere, which we can't do if we want an autoloader. This sound

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

2005-03-30 Thread Thomas Sandlaß
HaloO Luke, you wrote: No, I think I agree with you here. But what happens if you change you're second-to-last line to: my $a = foo(); $a.meth() = 8; Perl 6 is both a statically typed language and a dynamically typed language, and the problems that I am addressing are mostly about the dyna

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

2005-03-30 Thread Thomas Sandlaß
Luke Palmer wrote: class CodeProxy { has Code $.code is rw; sub call ($a) { $.code($a); } } This is valid Perl 6, Hmm, a sub in a class? I guess that should be a method. OTOH a class is just a funny module, so might be OK. But that is the syntax realm. a

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

2005-03-31 Thread Thomas Sandlaß
Thomas Sandlaà wrote: Int|Str <: Str && Str <: Int|Str && Int|Str <: Int && Int <: Int|Str holds. Uhh, I hardly believe that it was me writing that last night! Int|Str is of course a proper supertype of Int and Str respectively. So we really have: Str <: Str|Int && Int <: Str|Int, which warps us

Re: identity tests and comparing two references

2005-04-01 Thread Thomas Sandlaß
obviated in Perl6. -- TSa (Thomas Sandlaß)

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

2005-04-05 Thread Thomas Sandlaß
Larry Wall wrote: Roles cannot be derived from, so they're always final in that sense. We should probably consider them closed by default as well, or at least closed after first use. If a role specifies implementation, it's always default implementation, so overriding implementation always occurs

Re: Hyper operator corner case?

2005-04-18 Thread Thomas Sandlaß
Roger Hale wrote: One set of cases that doesn't seem to have come up in discussion: (1, 3, 2) >>-<< (83, 84, 81, 80, 85) Should this give (-82, -81, -79, -80, -85) From an arithmetic point of view it should be exactly that. The implementation might need to morph the code though, see below.

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

2005-03-30 Thread Thomas Sandlaß
Luke Palmer wrote: Okay, now we're starting to talk past each other. I /think/ Thomas orignially suggested that we use type inference to determine whether to lvalue cast an argument or not, which is what I got all worked up about. Actually I was returning to the subject of co- or contravariance of

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

2005-03-30 Thread Thomas Sandlaß
Thomas Sandlaà wrote: Any might just be a glb (greatest upper bound) of Int and Str, written Sorry that should read lub (least upper bound). Glb means greatest lower bound and is spelled Int&Str or all(Int,Str) in Perl6. -- TSa (Thomas SandlaÃ)

Re: -X's auto-(un)quoting?

2005-04-25 Thread Thomas Sandlaß
quot;blubb" has got a method .method that takes a Num as param ;) -- TSa (Thomas Sandlaß)

invocant vs. topic (was: Re: -X's auto-(un)quoting?)

2005-04-26 Thread Thomas Sandlaß
Luke Palmer wrote: My brother asked me to take out the trash. I asked him to do it. I believe that the subject there is "my brother" in the first sentence and "I" in the second. The topic is either "to take out the trash" or just "the trash" throughout (English speakers wouldn't have any trou

Re: subtype declarations

2005-05-02 Thread Thomas Sandlaß
Luke Palmer wrote: S12 says: subtype Str_not2b of Str where /^[isnt|arent|amnot|aint]$/; My brain parses this as: subtype Str_not2b[Str where /.../]; Or: subtype Str_not2b[Str] where /.../; I guess my mental parsing problems stem from the fact that it was you who told me about the equiv

Re: Code classes

2005-05-03 Thread Thomas Sandlaß
Luke Palmer wrote: Ahh, you came in too late. I don't remember who coined it, but @Larry is the array of Larrys, that is, the design team. Aha. What does [EMAIL PROTECTED] evaluate to? How do the elements of @Larry communicate? I agree with you there. $Larry has said that he wants `when` to work

Re: Submethods

2005-07-06 Thread TSa (Thomas Sandlaß)
ctical distinction possible because of: my $object = new Foo; my $meta = $object.meta; $meta.bar() # calls submethod but looks like method call I guess the type of $meta is Ref of Class or somesuch. Regards, -- TSa (Thomas Sandlaß)

Re: Type variables vs type literals

2005-07-06 Thread TSa (Thomas Sandlaß)
e(Int, 17); my @a = make(Array, [1,2,3]); # single element array? # or three element array? my $e = make(Int 'string'); # type error in &make? With the automatic binding of a ::Type variable to the type of it's argument the definition of &make could be shortend to sub make ( ::Type $value ) returns Type { ... } and called like this my $i = make(17); which at least prevents type errors ;) Regards, -- TSa (Thomas Sandlaß)

Re: Submethods

2005-07-06 Thread TSa (Thomas Sandlaß)
Stevan Little wrote: You seem to indicate that submethods are not to be used on instances, and instead to be used on the underlying metaclass. I did not see anything of the sort in (Syn|Apoc)12 or in my (limited) search of the mailing list. Can you point me to that information? S12 says in th

Re: Time::Local

2005-07-06 Thread TSa (Thomas Sandlaß)
. chars in strings depending on the Unicode level and index arithmetic of arrays. Some unification of the underlying math would be nice, indeed. And that typically involves starting from 0 and the positive remainder pointing into the day. Regards, -- TSa (Thomas Sandlaß)

Re: Type variables vs type literals

2005-07-07 Thread TSa (Thomas Sandlaß)
be instanciable? I guess the explicit forms are: FooStuff[Int]::foo(1,2); &strfoo ::= (FooStuff[Str].new)::new; # from Autrijus Hackathon notes Will re-instanciation be prevented when the latter is spelled &strfoo := (FooStuff[Str].new)::foo; # or with = Actually this syntax might be wrong usage of ::. But do I get you right that the lazy forms are does FooStuff; # lazy role instanciation into current scope foo(1,2); # &FooStuff[Int]::foo:(Int,Int) foo(1,'blahh'); # type error? Regards, -- TSa (Thomas Sandlaß)

Re: Hackathon notes

2005-07-08 Thread TSa (Thomas Sandlaß)
stant I assumed lvalue subs would implicitly return void and an assignment goes to the function slot of the args used in the assignment and subsequent calls with these args return exactly this value. In that respect arrays and hashes are the prime examples of lvalue subs. Other uses are interpolated data, Delauny Triangulation etc. Regards, -- TSa (Thomas Sandlaß)

Re: Hackathon notes

2005-07-08 Thread TSa (Thomas Sandlaß)
n-invocant params, in assignments etc. For research on the topic see e.g. http://www.cs.washington.edu/research/projects/cecil/www/Papers/predicate-classes.html -- TSa (Thomas Sandlaß)

Re: MML dispatch

2005-07-12 Thread TSa (Thomas Sandlaß)
compensated by a good match. -- TSa (Thomas Sandlaß)

Re: MML dispatch

2005-07-12 Thread TSa (Thomas Sandlaß)
does(Num) }) {...} beeing the same as multi sub foo (Num $x) {...} -- TSa (Thomas Sandlaß)

Re: How to write a self.pm (Re: method calls on $self)

2005-07-12 Thread TSa (Thomas Sandlaß)
lways coming in out of band? So .bar is always invoked on the invocant of &foo if we think that there is an implicit $_ := $?SELF before the call to &baz in &foo. And I hope the binding of $_ to $?SELF is a read-only binding! -- TSa (Thomas Sandlaß)

Re: MML dispatch

2005-07-12 Thread TSa (Thomas Sandlaß)
Mark Reed wrote: On 2005-07-12 12:22, "TSa (Thomas Sandlaß)" <[EMAIL PROTECTED]> wrote: I am also interested in the rationale behind the approach to manage MMD my means of a metric instead of a partial order on the types. Metric is a geometric concept which in my eyes doesn&#

Re: MML dispatch

2005-07-13 Thread TSa (Thomas Sandlaß)
HaloO Larry, you wrote: On Tue, Jul 12, 2005 at 08:13:22PM +0200, "TSa (Thomas Sandlaß)" wrote: : Actually it's a pitty, that the multi method call syntax isn't as : rich as the single method call syntax where we have .?method, .+method : and .*method. Something like (S

Re: MML dispatch

2005-07-13 Thread TSa (Thomas Sandlaß)
p;l=50&co1=AND&d=ptxt&s1=ferragina.INZZ.&OS=IN/ferragina&RS=IN/ferragina I haven't check the relevance to Perl6 yet. Has someone access to the STOC'99 paper? -- TSa (Thomas Sandlaß)

Re: MML dispatch

2005-07-19 Thread TSa (Thomas Sandlaß)
allow a compile time detection. Note that the ambiguity doesn't go away with a metric approach because there are no other parameters that could compensate. Regards, -- TSa (Thomas Sandlaß)

Re: MML dispatch

2005-07-19 Thread TSa (Thomas Sandlaß)
the type system. If Perl6 wants to live up to the claim of (optional) strong typing then the dispatch must be first on the type lattice and then on the class hierarchy. The folks who don't want to adhere to typing might avoid the type dispatch and appear to the type dispatchers as Anys or some scoped package or module type. Regards, -- TSa (Thomas Sandlaß)

Re: How do subroutines check types?

2005-07-19 Thread TSa (Thomas Sandlaß)
y instanciating the class Foo. -- TSa (Thomas Sandlaß)

Re: More on Roles, .does(), and .isa() (was Re: Quick OO .isa question)

2005-07-19 Thread TSa (Thomas Sandlaß)
l for Method... hmm have to think about that! -- TSa (Thomas Sandlaß)

Re: User-defined behaviour of hashes in list context

2005-07-20 Thread TSa (Thomas Sandlaß)
; my @array = %hash; # should call my own routine I hope the initialisation in my also calls the overloaded operator. But why shouldn't it? -- TSa (Thomas Sandlaß)

Re: Referring to package variables in the default namespace in p6

2005-07-20 Thread TSa (Thomas Sandlaß)
d when. I think the compiler has the information about all lexicals and could put them in the right place in the name space tree *before* execution. Would that be at CHECK or INIT time? -- TSa (Thomas Sandlaß)

Re: Referring to package variables in the default namespace in p6

2005-07-21 Thread TSa (Thomas Sandlaß)
g that does the Scalar/Item role! We can consider the sigils as lookup filters. Regards, -- TSa (Thomas Sandlaß)

Re: Referring to package variables in the default namespace in p6

2005-07-21 Thread TSa (Thomas Sandlaß)
alence of $foo and $::foo as TIMTOWTWI. I dought that assigning two different meanings just because their are two syntactical forms is a good idea. in their behaviour, and I (and other future legions of newbies) would despair. :) You consider yourself a 'legion of newbies' ;) -- TSa (Thomas Sandlaß)

Re: More on Roles, .does(), and .isa() (was Re: Quick OO .isa question)

2005-07-21 Thread TSa (Thomas Sandlaß)
chromatic wrote: On Tue, 2005-07-19 at 18:47 +0200, "TSa (Thomas Sandlaß)" wrote: I strongly agree. They should share the same namespace. Since code objects constitute types they also share this namespace. This means that any two lines of class Foo {...} roleFoo {...} s

Re: MML dispatch

2005-07-21 Thread TSa (Thomas Sandlaß)
); for some_values { say } Hmm, looks somewhat unperlish :)) -- TSa (Thomas Sandlaß)

Re: Referring to package variables in the default namespace in p6

2005-07-21 Thread TSa (Thomas Sandlaß)
ny confusion over whether $::foo was your 'closest' $foo variable or something else. So to conclude, for reading they amount to the same result but through different paths. But since the symbolic lookup might result in undef the behaviour for writing is indeed a Very Different Thing. @

Re: Do I need "has $.foo;" for accessor-only virtual attributes?

2005-07-21 Thread TSa (Thomas Sandlaß)
ch requires a self type of ::FooDefiner and I think that Int.does(FooDefiner::foo) is false. So an invocation of &FooDefiner::foocaller would simply produce a type error or six warnings and no printout if the foo calls are dispatched over $_, right? Regards, -- TSa (Thomas Sandlaß)

Re: Do I need "has $.foo;" for accessor-only virtual attributes?

2005-07-21 Thread TSa (Thomas Sandlaß)
SELF that Foo is composed into obviously is a subtype of Foo. What happens with this hidden payload if the object changes its type such that it is no Foo anymore? E.g. by undefining the slot &.Foo::foo? Regards, -- TSa (Thomas Sandlaß)

Re: Do I need "has $.foo;" for accessor-only virtual attributes?

2005-07-22 Thread TSa (Thomas Sandlaß)
ublicly visible method is called. The private method must be in scope there. The only requirement on the name is to not leak out into public namespace. The problem with $?SELF.:foo() is that people see that as a .: operator on the foo method. Which is a *BIG* problem in an Operator Oriented Language! -- TSa (Thomas Sandlaß)

Re: Do I need "has $.foo;" for accessor-only virtual attributes?

2005-07-22 Thread TSa (Thomas Sandlaß)
forgets about the Foo role itself. Ups, I hoped that the type system would find out mismatches of the objects actual structure and the methods expectations of it. Essentially rendering the method in question not applicable to the object anymore. BTW, what is the inverse operation of bless? Expel? -- TSa (Thomas Sandlaß)

Re: Exposing the Garbage Collector

2005-07-25 Thread TSa (Thomas Sandlaß)
t authority. But it's not my private opinion anymore ;) By posting it, it has become part of our @opinions since this $email does ::Perl6::Language :) BTW, this also gives us: my @twodim has shape(2); -- TSa (Thomas Sandlaß)

Re: Exposing the Garbage Collector

2005-07-25 Thread TSa (Thomas Sandlaß)
o verbose. Should be condensed to: has $.hidden is rw from %private_data; BTW, I would like to coin the term 'onboard method' for a code slot of type Method. # initialized from class has $.cache is rw from source; # virtual per instance has $.value from {...}; } -- TSa (Thomas Sandlaß)

Re: Exposing the Garbage Collector (Iterating the live set)

2005-07-26 Thread TSa (Thomas Sandlaß)
s that the current meaning needs parens like ($condition ?? $value :: $other) for preventing strange tokenization. OTOH would the barebone structure of Perl6 revolve around ?? :: ::= () ; and namespace lookup. -- TSa (Thomas Sandlaß)

Re: Exposing the Garbage Collector (Iterating the live set)

2005-07-26 Thread TSa (Thomas Sandlaß)
. allows to define the boolean "type" as *::false ::= *::bit::0; *::true ::= *::bit::$_??$_::*false; or so. And whitespace around ?? and :: doesn't matter! ?? just means skip next lookup if "lookup" fails. Regards, -- TSa (Thomas Sandlaß)

Re: Do slurpy parameters auto-flatten arrays?

2005-07-27 Thread TSa (Thomas Sandlaß)
d is in that view a *metric* dispatcher on the middle ::Any between the selector before the dot and the return type after the arrow. say bar(@array, "z");# 2 (or 5?) I opt for 2. say bar([EMAIL PROTECTED]);# 4 Yep. -- TSa (Thomas Sandlaß)

block owner, topic and the referential environment

2005-07-27 Thread TSa (Thomas Sandlaß)
ating some code, some revamping or other &DEEP_MAGIC. Hmm, debug exceptions come to mind... -- TSa (Thomas Sandlaß)

Re: Exposing the Garbage Collector (Iterating the live set)

2005-07-27 Thread TSa (Thomas Sandlaß)
Luke Palmer wrote: On 7/26/05, "TSa (Thomas Sandlaß)" <[EMAIL PROTECTED]> wrote: Piers Cawley wrote: I would like to be able to iterate over all the objects in the live set. My Idea actually is to embedd that into the namespace syntax. The idea is that of looking up non

Re: Messing with the type heirarchy

2005-07-27 Thread TSa (Thomas Sandlaß)
HaloO, Ingo Blechschmidt wrote: I've probably misunderstood you, but...: role Complex does Object {...} Num does Complex; # That should work and DWYM, right? My 0.02: Complex should provide e.g. a + that, when called with two Nums, doesn't bother the return value to carry on a use

Re: execution platform object? gestalt?

2005-07-27 Thread TSa (Thomas Sandlaß)
Randal L. Schwartz wrote: This is similar to the OS-9's "gestalt" tables, which got smarter as the operating system had more features, but was a consistent way to ask "do we have a color monitor here?". Is something like this already planned? From my bubble in the Perl6 Universe this thing is

Re: Elimination of Item|Pair and Any|Junction

2005-07-27 Thread TSa (Thomas Sandlaß)
HaloO, Larry Wall wrote: Yes. The only thing I don't like about it is that any() isn't an Any. Maybe we should rename Any to Atom. Then maybe swap Item with Atom, since in colloquial English you can say "that pair of people are an item." Since we are in type hierachies these days, here's my

Re: Elimination of Item|Pair and Any|Junction

2005-07-28 Thread TSa (Thomas Sandlaß)
Larry Wall wrote: On Wed, Jul 27, 2005 at 06:28:22PM +0200, "TSa (Thomas Sandlaß)" wrote: : Since we are in type hierachies these days, here's my from ::Any : towards ::All version. That's pretty, but if you don't move Junction upward, you haven't really addr

Re: Inferring (Foo of Int).does(Foo of Any)

2005-07-28 Thread TSa (Thomas Sandlaß)
HaloO, Autrijus Tang wrote: [..much better explaination of the co/contra prob then mine skipped..] Hence, my proposal is that Perl 6's generics should infer its variancy, based on the signature of its methods, and derive subtyping relationships accordingly. Yes!! That would be great. But I wou

Re: Messing with the type heirarchy

2005-07-28 Thread TSa (Thomas Sandlaß)
HaloO Michele, you wrote: On Wed, 27 Jul 2005, [ISO-8859-1] TSa wrote: value to carry on a useless imaginary part. And Complex should consistently return undef when compared to other Nums or Complexes. And the Compare role My 0.02+0.01i: in mathematics it is commonly used to write e.g. z<3

Re: The meaning of "returns"

2005-07-28 Thread TSa (Thomas Sandlaß)
HaloO Autrijus, you wrote: D) Make the return type observe both #2 and #3 at compile time, using type variables: sub id ( (::T) $x ) returns ::T { return($x) } And this is a natural extension to guide the inferencer so it won't be totally giving up on polymorphic functions such a

Re: Type::Class::Haskell does Role

2005-07-28 Thread TSa (Thomas Sandlaß)
HaloO Luke, you wrote: All in all, generic equality and comparison is something that Perl 5 did really poorly. Some people overloaded eq, some overloaded ==, some wrote a ->equal method, and there was no way to shift between the different paradigms smoothly. This is one of the times where we h

Re: Slurpy "is rw" arrays ([EMAIL PROTECTED] is rw)

2005-07-29 Thread TSa (Thomas Sandlaß)
HaloO, Adriano Ferreira wrote: Only sub foobar (@args) { push @args, 42 } would change @some_array in foobar @some_array; That is how I undestood that. Can someone confirm this belief? I share your belief. It's up to others to confirm it. I just want to add that I f

Re: [S29] Mutating map and grep

2005-08-01 Thread TSa (Thomas Sandlaß)
HaloO, Ingo Blechschmidt wrote: Is this a bug in S29 or will this be feature removed from Perl 6 and you'll have to say (for example) use listops :mutating; my @result = map { $_++; 42 } @array; # works now Why not just my @result = map -> $_ is rw { $_++; 42 } @array; # works

Re: zip with ()

2005-08-01 Thread TSa (Thomas Sandlaß)
HaloO, Andrew Shitov wrote: Is it possible to avoid significance of whitespaces? Yes, with: say zip .(@odd, @even); Looks like a method and *is* a method in my eyes. First &zip is looked-up and then bound as block owner. Arguments are of course two array refs to @odd and @even respectively

Re: zip with ()

2005-08-01 Thread TSa (Thomas Sandlaß)
HaloO, Ingo Blechschmidt wrote: Whitespace is significant: say zip @odd, @even;# &zip gets two arguments, result is # 12345678. say zip(@odd, @even); # &zip gets two arguments, result is # 12345678. say zip (@odd, @even);

Re: zip with ()

2005-08-01 Thread TSa (Thomas Sandlaß)
HaloO, Andrew Shitov wrote: TTS> BTW, you didn't mean originally: TTS>say zip (@odd), (@even); # prints 13572468 or 12345678? That is exactly like with similar printing result of sub() call: print sqrt (16), 5; # shout print 45. That all hinges on the type of the symbol. I guess &s

Re: sub foo ($x) returns ref($x)

2005-08-01 Thread TSa (Thomas Sandlaß)
HaloO, Autrijus Tang wrote: [..] For example, assuming argument types are unified in a single phase, the example below does nothing useful: sub equitype ((::a) $x, (::a) $y) { ... } It won't not help even if we replace the implicit "does" with "of": sub equitype ($x of (::a), $y of (:

Re: sub foo ($x) returns ref($x)

2005-08-01 Thread TSa (Thomas Sandlaß)
HaloO, Autrijus Tang wrote: On Mon, Aug 01, 2005 at 03:16:50PM +0200, "TSa (Thomas Sandla�)" wrote: sub equitype ( ::a $x, a $y) { ... } That's not a bad idea at all. I rather like it. I'd just still like an explicit type-unifying parens around ::a, just so people won't say I try to m

Re: Eliminating &{} and *{}

2005-08-03 Thread TSa (Thomas Sandlaß)
HaloO, Autrijus Tang wrote: All this led us to think about whether (my &foo) can be merely treated the same as (my Code $foo). The mutable form will enable convenient notations such as: I think (my Code $foo) should be an error on the same reason as (my Array $foo) is an error. A $var can onl

Re: If topicalization

2005-08-03 Thread TSa (Thomas Sandlaß)
HaloO, Luke Palmer wrote: I vaguely recall that we went over this already, but I forgot the conclusion if we did. I have a proposal about block owner and block topic pending. But I guess no one noticed it, ... In Damian and Larry's talk here at OSCON, I saw the example: if foo() -> $fo

Re: Do slurpy parameters auto-flatten arrays?

2005-08-04 Thread TSa (Thomas Sandlaß)
HaloO, Luke Palmer wrote: On 8/3/05, Aankhen <[EMAIL PROTECTED]> wrote: On 8/3/05, Piers Cawley <[EMAIL PROTECTED]> wrote: So how *do* I pass an unflattened array to a function with a slurpy parameter? Good question. I would have thought that one of the major gains from turning arrays and

Re: zip with ()

2005-08-04 Thread TSa (Thomas Sandlaß)
HaloO, Luke Palmer wrote: On 8/1/05, Ingo Blechschmidt <[EMAIL PROTECTED]> wrote: In general, (@foo, @bar) returns a new list with the element joined, i.e. "@foo.concat(@bar)". If you want to create a list with two sublists, you've to use ([EMAIL PROTECTED], [EMAIL PROTECTED]) or ([EMAIL PROTE

Re: Do slurpy parameters auto-flatten arrays?

2005-08-04 Thread TSa (Thomas Sandlaß)
HaloO, Piers Cawley wrote: By the way, if flattening that way, what's the prototype for zip? We can after all do: zip @ary1, @ary2, @ary3, ... @aryn How about sub zip( List [EMAIL PROTECTED] ) {...} a slurpy List of Array of List. The return value is a not yet iterated Code object tha

TSa's Perl 6 type lattice version 1.0

2005-08-04 Thread TSa (Thomas Sandlaß)
HaloO, in case someone might be interested, here is my more or less complete idea of the Perl 6 type lattice as ASCII art. Enjoy. Comments welcome. ::Any ...| ... ___:___/|\__

Re: Complete type inferencing

2005-08-08 Thread TSa (Thomas Sandlaß)
HaloO, Autrijus Tang wrote: Yes, I'm aware of Theta's static where clauses, but Perl 6's where clause is much more dynamic and almost always undecidable. I know, but what does that buy the programmer? I see a type system as support of a declarative programming style. Thus the dynamic part of t

Re: Elimination of Item|Pair and Any|Junction

2005-08-08 Thread TSa (Thomas Sandlaß)
HaloO, Autrijus Tang wrote: On Thu, Jul 28, 2005 at 09:27:00AM -0700, Larry Wall wrote: Or maybe Any really does mean "Object" and we're just viewing our hierarchy too strictly if we make every relationship "isa". That's one thing that neither this formulation nor Thomas's are making very cle

Re: Container model - pictures and questions

2005-08-08 Thread TSa (Thomas Sandlaß)
HaloO, Autrijus Tang wrote: If I'm mistaken, please let me know, preferably by suggesting new arrangements on the diagram. :-) Without judging your mistakes, here are my comments to the container picture. 1) I would move the ::name to the Pad level. The idea is that ::name is some less spe

Re: Perl 6 Meta Object Protocols and $object.meta.isa(?)

2005-08-09 Thread TSa (Thomas Sandlaß)
HaloO, Stevan Little wrote: Here is a 10,000 ft view of the metamodel prototype I sketched out the other day (http://svn.openfoundry.org/pugs/perl5/Perl6-MetaModel/docs/ 10_000_ft_view.pod). It should shed a little light on this discussion. There you have i(Foo) - instance of Foo

Re: constraint imperative programming (CIP)

2008-06-16 Thread TSa (Thomas Sandlaß)
HaloO, On Monday, 16. June 2008 10:03:13 Ovid wrote: > --- TSa <[EMAIL PROTECTED]> wrote: > ... why do you think that > > the way to get at the constraint programming paradigm are the subset > > type definitions? > > Because I can't think of any other way to do it :) So I´ll try to come up with s

Re: fallback semantics of list methods

2008-06-16 Thread TSa (Thomas Sandlaß)
HaloO, On Saturday, 14. June 2008 18:43:05 Daniel Ruoso wrote: > Moritz convinced me that there's actually no real reason to support > > $nonlist.listmethod I wouldn´t do that either. But I come to that conclusion from the line of thought that it is generally a bad idea to block an Any slot in

Re: Rakudo test miscellanea

2008-06-29 Thread TSa (Thomas Sandlaß)
HaloO, On Thursday, 26. June 2008 18:46:25 Larry Wall wrote: > Neither "is" nor "does" is quite right here, because the mathematicians > have seen fit to confuse representation semantics with value semantics. :) Hmm, but the uppercase types should hide the representation type. IOW, there's only

meta_postfix:<*>

2008-07-13 Thread TSa (Thomas Sandlaß)
HaloO, I know that the hot phase of the operator discussions are over. But here's a little orthogonalizing idea from my side. The observation is that * can be regarded as repeated addition: 5 * 3 == 5 + 5 + 5 and ** as repeated multiplication. Now imagine having a meta_postfix:<*> that gives +* as

Re: Differential Subscripts

2008-08-10 Thread TSa (Thomas Sandlaß)
On Saturday, 9. August 2008 04:41:46 John M. Dlugosz wrote: > Is this magic known to the parser at a low level, or is it possible to > define your own postcircumfix operators that interact with the > interpretation of the argument? My interpretation is that there is a Whatever type that most of th

Re: Some details of function return captures

2008-08-10 Thread TSa (Thomas Sandlaß)
HaloO, On Saturday, 9. August 2008 01:32:35 John M. Dlugosz wrote: > TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote: > > If such a ReturnCapture could also be > > preliminary of some kind, then lvalue subs could be lazily resumed when > > the rvalue comes in. > > Can you elaborate on that? I don

Re: Allowing '-' in identifiers: what's the motivation?

2008-08-11 Thread TSa (Thomas Sandlaß)
On Monday, 11. August 2008 05:35:03 John M. Dlugosz wrote: > E.g. see : > > sub bar { > return 100; > } > sub foo { 50;} > sub foo-bar { >return rand(50); >} > if (foo - bar != foo-bar) { >print "Haha!\n"; > } Actually I can even imagine

Re: arrayref/hashref in spectest suite

2008-08-20 Thread TSa (Thomas Sandlaß)
On Monday, 18. August 2008 20:38:05 Patrick R. Michaud wrote: > I would somewhat expect > a reference to be instead handled using a statement like > > $foo[1] := $bar; > > Comments and clarifications appreciated. I would also opt for copy semantics whenever = is used for assignment. But it see

Re: What happened to "err" operator?

2008-09-07 Thread TSa (Thomas Sandlaß)
HaloO, On Thursday, 4. September 2008 03:39:20 Larry Wall wrote: > Another potential issue is that CATCH doesn't distinguish exceptions > coming from the current block from those coming from the subcall to a(). > So it could end up returning Failure from the current block when > you intended to fo

  1   2   >