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

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

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

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: 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

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

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: TTSsay 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

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

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

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 addressed the question Autrijus is asking

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

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

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

Re: Do slurpy parameters auto-flatten arrays?

2005-07-27 Thread TSa (Thomas Sandlaß)
PROTECTED]);# 4 Yep. -- TSa (Thomas Sandlaß)

block owner, topic and the referential environment

2005-07-27 Thread TSa (Thomas Sandlaß)
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-negativ integer

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

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 an

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: Exposing the Garbage Collector (Iterating the live set)

2005-07-26 Thread TSa (Thomas Sandlaß)
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: Do I need has $.foo; for accessor-only virtual attributes?

2005-07-22 Thread TSa (Thomas Sandlaß)
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ß)
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: Referring to package variables in the default namespace in p6

2005-07-21 Thread TSa (Thomas Sandlaß)
! We can consider the sigils as lookup filters. Regards, -- 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 {...} sub Foo

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ß)
' $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. @Larry, please correct if I gave wrong advice. -- TSa (Thomas

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

2005-07-21 Thread TSa (Thomas Sandlaß)
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: User-defined behaviour of hashes in list context

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

Re: MML dispatch

2005-07-19 Thread TSa (Thomas Sandlaß)
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: How do subroutines check types?

2005-07-19 Thread TSa (Thomas Sandlaß)
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ß)
to think about that! -- TSa (Thomas Sandlaß)

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 (Snoopy, Mr_PotatoHead

Re: MML dispatch

2005-07-13 Thread TSa (Thomas Sandlaß)
=IN/ferraginaRS=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-12 Thread TSa (Thomas Sandlaß)
by a good match. -- TSa (Thomas Sandlaß)

Re: MML dispatch

2005-07-12 Thread TSa (Thomas Sandlaß)
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ß)
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't fit type theory

Re: Hackathon notes

2005-07-08 Thread TSa (Thomas Sandlaß)
, -- TSa (Thomas Sandlaß)

Re: Hackathon notes

2005-07-08 Thread TSa (Thomas Sandlaß)
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: Type variables vs type literals

2005-07-07 Thread TSa (Thomas Sandlaß)
into current scope foo(1,2); # FooStuff[Int]::foo:(Int,Int) foo(1,'blahh'); # type error? Regards, -- TSa (Thomas Sandlaß)

Re: Submethods

2005-07-06 Thread TSa (Thomas Sandlaß)
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ß)
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: Time::Local

2005-07-06 Thread TSa (Thomas Sandlaß)
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-04 Thread TSa (Thomas Sandlaß)
= $x; or the current form with :() :(T) $x := $obj; my T $y = $x; Regards, -- TSa (Thomas Sandlaß)

Re: return() in pointy blocks

2005-07-04 Thread TSa (Thomas Sandlaß)
Larry Wall wrote: On Wed, Jun 08, 2005 at 12:37:22PM +0200, TSa (Thomas Sandlaß) wrote: : BTW, is - on the 'symbolic unary' precedence level : as its read-only companion \ ?. No, - introduces a term that happens to consist of a formal signature and a block. There are no ordinary expressions

Re: reduce metaoperator on an empty list

2005-06-17 Thread TSa (Thomas Sandlaß)
the target selection from a multi? E.g. op.select($value,$value) here? Or is it op:($value,$value)? -- TSa (Thomas Sandla)

Re: Ignoring parameters

2005-06-17 Thread TSa (Thomas Sandlaß)
:) { my foo $f; ... # use $f } -- TSa (Thomas Sandla)

Re: MMD vs. anonymous parameter types referencing earlier parameters

2005-06-14 Thread TSa (Thomas Sandlaß)
be helpfull. PS: Of course this example also implies that each parameter's declaration introduces a new lexical scope to its right. Well the colloquial spec of your function is just 'it takes two equal integers'. And the two element list (3,3) is a subtype of it. Regards, -- TSa (Thomas Sandlaß)

Re: MMD vs. anonymous parameter types referencing earlier parameters

2005-06-14 Thread TSa (Thomas Sandlaß)
the MMD object might actually be 'recompiled' during runtime when new instances are added. That is similar to the automata behind regular expressions. Regards, -- TSa (Thomas Sandlaß)

Re: reduce metaoperator on an empty list

2005-06-09 Thread TSa (Thomas Sandlaß)
. Is it correct that [min] won't parse unless min is declared as an infix op, which looks a bit strange? if 3 min 4 { ... } -- TSa (Thomas Sandla)

Re: reduce metaoperator on an empty list

2005-06-09 Thread TSa (Thomas Sandlaß)
understand how the knowledge about a pending assignment eases the choice problem for the multi. Note that the choice of assignment operator depends on the return value of the operator and the type of which the lhs is undef. Regards, -- TSa (Thomas Sandlaß)

Re: return() in pointy blocks

2005-06-08 Thread TSa (Thomas Sandlaß)
*pointy* :) PS: A chain of refs can thus be reduced to the leaf lvalue with ([()] $rr) = 23; which stores a new value in $x. This might even warrant the special case of ([] $rr) = 23; -- TSa (Thomas Sandlaß)

Re: reduce metaoperator on an empty list

2005-06-08 Thread TSa (Thomas Sandlaß)
. This folds the identity value selection problem back into type-space and it's runtime agent MMD. -- TSa (Thomas Sandlaß)

Re: return() in pointy blocks

2005-06-08 Thread TSa (Thomas Sandlaß)
Well, does using - as blockref creator also give anonymous scalars? $y = - $x { $x = 3; $x }; # $y:(Ref of Block of Int) BTW, is - on the 'symbolic unary' precedence level as its read-only companion \ ?. Are they pure macros? -- TSa (Thomas Sandlaß)

Re: return() in pointy blocks

2005-06-08 Thread TSa (Thomas Sandlaß)
in the snippet above it is explicitly coded. Or do I completely misunderstand the distinction between blocks and closures? -- TSa (Thomas Sandlaß)

Re: return() in pointy blocks

2005-06-08 Thread TSa (Thomas Sandlaß)
Piers Cawley wrote: TSa (Thomas Sandlaß) [EMAIL PROTECTED] writes: Piers Cawley wrote: My preference is for: Boo Boo Can't dereferene literal numeric literal 42 as a coderef. How do you reach the second 'Boo'? Iff - does not create a Sub but a Block instance then Luke's code can

Re: return() in pointy blocks

2005-06-08 Thread TSa (Thomas Sandlaß)
to an undef or some such. $code($cc); } Which I personally think is rather cute. Me too! Even if I can't quite bring myself to believe it's that simple... I have convinced myself. How can I be of assistance on your side? -- TSa (Thomas Sandlaß)

Re: Transparent / Opaque references

2005-06-07 Thread TSa (Thomas Sandlaß)
- is now spelled () isn't it? -- TSa (Thomas Sandlaß)

Re: (multi)subroutine names

2005-06-06 Thread TSa (Thomas Sandlaß)
types to fill 'gaps' dynamically. Something like 'compilation on demand' if that is the only way to actually instanciate a template---but I'm not sure if Perl6's parametric types are actually called templates. I hope that helps. -- TSa (Thomas Sandlaß)

Re: comprehensive list of perl6 rule tokens

2005-06-02 Thread TSa (Thomas Sandlaß)
as invocant? I would assume that everything else can be found through it? Actually the mnemonics that $/ is the match and methods on $?SELF are called with ./method fits. The only remaining thing is to define the method set of the Match class. -- TSa (Thomas Sandlaß)

Re: Empty hash

2005-06-02 Thread TSa (Thomas Sandlaß)
don't understand this question. Do you want 'shallow copy' to mean 'take a ref'? Or Parrot/Pugs level COW? Are you alluding to the referential semantics discussion? -- TSa (Thomas Sandlaß)

Re: Transparent / Opaque references

2005-06-02 Thread TSa (Thomas Sandlaß)
anyway to handle assignment. Another general thing is of course that explicitly constant Refs shall not be applicable as a lhs of assignment. This applies to chains of prefixed $ as well. -- TSa (Thomas Sandlaß)

Re: comprehensive list of perl6 rule tokens

2005-06-02 Thread TSa (Thomas Sandlaß)
that others can provide to the above, especially from @Larry. Sorry, I'm neither one(@Larry) nor a good Illuminati ;) -- TSa (Thomas Sandlaß)

Re: Transparent / Opaque references

2005-06-02 Thread TSa (Thomas Sandlaß)
:() And it nicely lines up with $y[], $y{}, @a[], %h{} etc. as dereferential expressions. -- TSa (Thomas Sandlaß)

Re: Transparent / Opaque references

2005-06-02 Thread TSa (Thomas Sandlaß)
---or purely syntactical. A method is e.g. also not defined with the dot: class Blahh { method .example ( $non_invocant ) {...} } -- TSa (Thomas Sandlaß)

Re: date and time formatting

2005-06-01 Thread TSa (Thomas Sandlaß)
common base type that can handle cross-calender arithmetic but as long as one stays in a homogenous subtype like Gregorian in a particular time zone no generalization code should fire up. -- TSa (Thomas Sandlaß)

Re: returns and context

2005-06-01 Thread TSa (Thomas Sandlaß)
of context is Perl's version of static typing ala C++ and Java. Sorry if this wasn't what you wanted to hear. -- TSa (Thomas Sandlaß)

Re: Transparent / Opaque references

2005-06-01 Thread TSa (Thomas Sandlaß)
to force binding behaviour. BTW, but is lower in precedence than \, isn't it? -- TSa (Thomas Sandlaß)

Re: Transparent / Opaque references = Link / Ref

2005-05-30 Thread TSa (Thomas Sandlaß)
that remains is how then to single step down the link chain if that isn't contradicting the link concept in the first place. But I think it doesn't need an operator. A method might suffice: :\$link.follow.follow # two steps down -- TSa (Thomas Sandlaß)

Re: mod/div

2005-05-30 Thread TSa (Thomas Sandlaß)
combinations of signs which must be considered when calculating $q and $r such that $x == $q * $y + $r holds. Avoids lots of special case code across 0 boundaries. If there is a definition that needs no special casing then it is the euclidean definition that 0 = $r abs $y. -- TSa (Thomas

Re: Strongly typed containers?

2005-05-30 Thread TSa (Thomas Sandlaß)
presume is available in :() as well. So a list of Int might be :(*Int) and a recurring tuple type might be :(*(Int,Str)). -- TSa (Thomas Sandlaß)

Re: (1,(2,3),4)[2]

2005-05-27 Thread TSa (Thomas Sandlaß)
. They are macros or a direct part of the grammar. ::= is mostly syntactic sugar for a BEGIN block and := is basically compiled to the engine level destructive assignment operation. But this view might also be completely wrong. Regards, -- TSa (Thomas Sandlaß)

Re: (1,(2,3),4)[2]

2005-05-27 Thread TSa (Thomas Sandlaß)
to the runtime dispatch. But this requires a self-contained definition of the meaning of @a and [] as described by Rod. -- TSa (Thomas Sandlaß)

Re: (1,(2,3),4)[2]

2005-05-27 Thread TSa (Thomas Sandlaß)
language level references are a means to share values. Don't mix that with the implementation level references---which should be called pointers---that allow an efficient implementation of handling heavyweight data. -- TSa (Thomas Sandlaß)

Re: Declarations of constants

2005-05-27 Thread TSa (Thomas Sandlaß)
Ingo Blechschmidt wrote: # Please add more ways :) enum MEANING_OF_LIVE:(42); my MEANING_OF_LIVE = 42; # But might be considered evil sigilless mode -- TSa (Thomas Sandlaß)

Re: (1,(2,3),4)[2]

2005-05-27 Thread TSa (Thomas Sandlaß)
is DatabaseTable; my %tree is StructuredDocument; -- TSa (Thomas Sandlaß)

Re: Declarations of constants

2005-05-27 Thread TSa (Thomas Sandlaß)
? :) No, it was intented for seeing what the reactions will be :) Just using foo as unsigiled variable. This might need my foo is rw; But then I presume you could say: foo = 17; if foo 8 { @a[foo] = 8; } We could call that a codeless lvalue sub ;) -- TSa (Thomas Sandla)

Re: [S29] uniq

2005-05-27 Thread TSa (Thomas Sandlaß)
Identity[ infix:{'eq'} ] {...} To what exteent in canbe auto-generated with dispatching to the respective methods of all elements defined into the class' value environment, I can't say. -- TSa (Thomas Sandlaß)

Re: (1,(2,3),4)[2]

2005-05-25 Thread TSa (Thomas Sandlaß)
be the equivalent syntax to @b? Is it %ba or %%ba or even (*%b)a? It will hardly be %b{undef}a, though. -- TSa (Thomas Sandlaß)

Re: (1,(2,3),4)[2]

2005-05-25 Thread TSa (Thomas Sandlaß)
/necessity without a specific implementation backend. So, to summarize we could interpret our points of view as syntax-down and type-up if the upward direction is from implementation to type to syntax. -- TSa (Thomas Sandlaß)

Re: (1,(2,3),4)[2]

2005-05-25 Thread TSa (Thomas Sandlaß)
as chainfix, leftfix and rightfix? Or asterfix, idfix, truebafix, ... :)) This last joke might work for Germans only. -- TSa (Thomas Sandlaß)

Re: s/true/better name/

2005-05-24 Thread TSa (Thomas Sandlaß)
the equivalents of + and ~ respectively? And - has no corresponding neg or so? The strings 'true' and 'false' should really be kept as enums of the bit type. Thanks for your patience with me. -- TSa (Thomas Sandlaß)

Re: reduce metaoperator on an empty list

2005-05-23 Thread TSa (Thomas Sandlaß)
, is % defined as truncation in Perl6? That would be a bit unfortunate. Simple but not well thought out. -- TSa (Thomas Sandlaß)

Re: lazy context

2005-05-23 Thread TSa (Thomas Sandlaß)
. infix:{'='}:(Array:Eager -- Eager) would not flatten but store the incoming value and return it for chaining assignment. -- TSa (Thomas Sandlaß)

Re: Declaration of my() variables using symbolic referentiation

2005-05-23 Thread TSa (Thomas Sandlaß)
name is not known until runtime, so I think this should be forbidden. Correct? Well, my has got a runtime counterpart which creates a fresh set of local variables everytime the code object is invoked. -- TSa (Thomas Sandlaß)

mod/div (was: reduce metaoperator on an empty list)

2005-05-23 Thread TSa (Thomas Sandlaß)
- (-1.2) % 1 == -1.2 - 0.8 == -2 ceil $x == 1 + floor $x round $x == floor( $x + 0.5 ) trunc $x == $x 0 ?? ceil $x :: floor $x To @Larry: how are mod and div defined in Perl6? -- TSa (Thomas Sandlaß)

Re: How do I... create a new meta operator?

2005-05-20 Thread TSa (Thomas Sandlaß)
of eval, join and split. E.g. could the macro assistence for »« and [] be restricted to parse their inside as an operator name so that the programmer doesn't have to use their long name? Or is something more complicated needed? And if yes, then why? Regards, -- TSa (Thomas Sandlaß)

Re: reduce metaoperator on an empty list

2005-05-20 Thread TSa (Thomas Sandlaß)
,~,''] {...} class Complex does Field[Array[2] of Num,+,[0,0],*,[1,0]] {...} class 3DVector does VectorSpace[Array[3] of Num,+,[0,0,0]] {...} And it provides valuable information to the optimizer. -- TSa (Thomas Sandlaß)

Re: reduce metaoperator on an empty list

2005-05-20 Thread TSa (Thomas Sandlaß)
associative and returns Y when true then ... Sorry, is it the case that $x = $y $z might put something else but 0 or 1 into $x depending on the order relation between $y and $z? -- TSa (Thomas Sandlaß)

Re: How do I... invoke a method reference

2005-05-20 Thread TSa (Thomas Sandlaß)
} } But I think it's better to make bar a sub. -- TSa (Thomas Sandlaß)

Re: reduce metaoperator on an empty list

2005-05-19 Thread TSa (Thomas Sandlaß)
applies for [*] gives 1 and for [~] you get '' when ~Any =:= Str. All that is more or less my way to repeat what others have said in this thread. -- $TSa =:= all( none( @Larry ), one( @p6l ))

Re: Syntax for specifying role parameters

2005-05-19 Thread TSa (Thomas Sandlaß)
] {...} Actually the class might be needed only as namespace containing the implementation of infix:{'='}:(Num|Str,Num|Str: -- bit). OTOH it could implement caching of conversion results or some such. -- $TSa =:= all( none( @Larry ), one( @p6l ))

Re: Syntax for specifying role parameters

2005-05-19 Thread TSa (Thomas Sandlaß)
way round. Should be consistent. -- TSa (Thomas Sandla)

Re: Syntax for specifying role parameters

2005-05-19 Thread TSa (Thomas Sandlaß)
in expressiveness? -- TSa (Thomas Sandla)

Re: (1,(2,3),4)[2]

2005-05-19 Thread TSa (Thomas Sandlaß)
referential semantics. Until now you haven't convinced me of the advantages of the old-style Perl5 references. What do they buy us? -- TSa (Thomas Sandlaß)

Re: The Void type

2005-05-18 Thread TSa (Thomas Sandlaß)
HaloO Autrijus, you wrote: On Fri, May 13, 2005 at 07:13:53PM +0200, TSa (Thomas Sandlaß) wrote: Larry Wall wrote: : Void context still exists and is not a form of singular or plural : context. Perhaps this should be called nullar context, although void : context works equally well for me

<    1   2   3   4   5   6   7   >