Re: Retry: ITypes and VTypes.

2005-02-04 Thread Autrijus Tang
On Thu, Feb 03, 2005 at 03:59:06PM -0800, Brent 'Dax' Royal-Gordon wrote: > Autrijus Tang <[EMAIL PROTECTED]> wrote: > > However, I'd still like to know whether my understanding on punning > > (same class 'Array' used as both Implementation Type and Value Type) > > and the validity of matching on "

Re: Retry: ITypes and VTypes.

2005-02-04 Thread Autrijus Tang
On Fri, Feb 04, 2005 at 06:04:52PM +0800, Autrijus Tang wrote: > my @array of Array; > my @array is Array of (Any is Array of (Any is Scalar)) > > If so, may I consider it as equivalent to this Haskell code? > > class TArray baseVtype elemVtype where {- ... -} -- Array Trait > cla

Standard value types in S06.

2005-02-04 Thread Autrijus Tang
"Pair", "Junction" and "Undef" are not list among Perl6's standard types in S06. I'm assuming that they are actually basic types for now; if that is the case, below is a patch to say that. Thanks, /Autrijus/ --- S06.pod.origFri Feb 4 04:29:34 2005 +++ S06.pod Fri Feb 4 19:32:53 200

Re: Retry: ITypes and VTypes.

2005-02-04 Thread Autrijus Tang
On Fri, Feb 04, 2005 at 01:00:33PM +0100, Miroslav Silovic wrote: > The problem (in general) with this requirement is that it conflicts with > inhericance. Perl6 allows you to extend any type (using 'but' operator, > for example) and so, any time you promise that something will be of a > certain

Read array or hash value from file

2005-02-04 Thread Thu Trieu
Does perl provides function to write array or hash data to file and be able to get them back to variable ? This can be done easily from Vb6 for instance, please do not guide me by using Mysql, I mean exporting to a raw "txt" file. Somethings like below: (illustrate by php) $a= array[1..

Re: Retry: ITypes and VTypes.

2005-02-04 Thread Miroslav Silovic
[EMAIL PROTECTED] wrote: However, I wonder how to talk about an array that can contain elements of any value type, but all the elements must have the same type. Is Perl6 capable of expressing such a restraint? Thanks, /Autrijus/ The problem (in general) with this requirement is that it conflicts

Re: Read array or hash value from file

2005-02-04 Thread Nicholas Clark
On Fri, Feb 04, 2005 at 03:24:19AM -0800, Thu Trieu wrote: > Does perl provides function to write array or hash data to file and be able > to get them back to variable ? I think you're asking this question in completely the wrong place. This is a list for discussing the specifications of the yet-

Some quick questions.

2005-02-04 Thread Autrijus Tang
Today I have finished implementing 90% of primitive operators; Pugs can now evaluate most simple expressions, including junctive autothreading and magical/infinite ranges. Their implementation are in: http://wagner.elixus.org/~autrijus/darcs/pugs/Prim.hs As such, there are some corner cases

Reality check

2005-02-04 Thread Juerd
Does this make sense? my @words = gather { for =(open '/usr/share/dict/words' err die) { .=chomp; next if /<-[a-z]>/; /$re/ and take { word => $_, score => %scores{ .letters }.sum }; } } ==> sort { . } is descending, { ..length }, { . };

Re: Some quick questions.

2005-02-04 Thread Autrijus Tang
On Sat, Feb 05, 2005 at 04:44:41AM +0800, Autrijus Tang wrote: > * What is the value of a reference in any of the scalar contexts? > > Currently I'm blindly dereferencing it. It seems that I got four out of five correct; the "blind referencing" has an important exception in the references are