some misc Perl 6 questions

2005-03-08 Thread Darren Duncan
of questions. Thanks in advance for any feedback, whether they are plain answers or pointers to where *exactly* in the Perl 6 spec I should successfully find the answer. -- Darren Duncan

Re: some misc Perl 6 questions

2005-03-08 Thread Darren Duncan
request sound like something that would be reasonable to do, or a bad practice to avoid? Thank you for all the hard work you have been doing. -- Darren Duncan

Re: some misc Perl 6 questions

2005-03-09 Thread Darren Duncan
with an error. If we're going to do what you want, we should have some way of specifying which of the behaviours we want using different syntax around the rule definition. Incidentally, I noticed that '@a = First Second' looked a lot like the reverse of what '$b = @a' did in Perl 5. -- Darren Duncan

using Rules with undefined values (was Re: some misc Perl 6 questions)

2005-03-09 Thread Darren Duncan
as an error. So would applying a Rule against an undefined value produce a warning in Perl 6 or not? (A quick scan of S12 didn't say.) -- Darren Duncan

RFC: general feedback on module port

2005-03-10 Thread Darren Duncan
. Thanks to the rest of you who are working on driving Perl 6 in some fashion; we're much better off for your contributions. Have a good day. -- Darren Duncan

return of copies vs references

2005-03-16 Thread Darren Duncan
by calling code. Separate question, just to confirm, I assume that plain '=' always does a copy? Thank you for any clarification. -- Darren Duncan

Re: return of copies vs references

2005-03-16 Thread Darren Duncan
sure this didn't happen. It is possible that there was a misunderstanding regarding the previous question, and the default action is in fact a copy. -- Darren Duncan

Re: return of copies vs references

2005-03-17 Thread Darren Duncan
; # in any context Eg, something that is like lines 5 and 6, but lets me explicitly use 'self'. -- Darren Duncan

Re: return of copies vs references

2005-03-17 Thread Darren Duncan
for a sub/method that specifies whether it forces a scalar or list context? Any opinions on this? -- Darren Duncan

Re: return of copies vs references

2005-03-17 Thread Darren Duncan
As an addendum, my idea would also apply to non-attribute variables. If you say 'my %abc' in a method or sub, and later say 'return %abc', then a reference to %abc will be returned by default. So its not like I'm treating attributes differently. -- Darren Duncan At 3:27 PM -0800 3/17/05, Darren

Re: return of copies vs references

2005-03-18 Thread Darren Duncan
, then I know how to do everything I want based on info in the Synopsis and Larry's last comments, otherwise I still could find out what I want to know easily enough. -- Darren Duncan

ENDING OF: Re: return of copies vs references

2005-03-18 Thread Darren Duncan
I was just informed by IRC that 'return' propagates the context of the caller. If that's the case, then we can just drop this discussion, problems solved. Sorry for wasting your time. -- Darren Duncan At 12:07 AM -0800 3/18/05, Darren Duncan wrote: I suppose, generally ignore most of my last

getting Perl 6 special support in text editors

2005-03-28 Thread Darren Duncan
of Perl 6 developers, and they might as well have the best possible experience. Assuming this request is accepted, I will post again when the supporting version is available and/or a roadmap is known. -- Darren Duncan -- Date: Mon, 28 Mar 2005 14:49:47 -0800 To: [EMAIL PROTECTED

Re: return of copies vs references

2005-03-28 Thread Darren Duncan
of non-scalar values should be returned by default, and that the method must do an explicit copy if that's what they want returned. Things are much simpler that way, and its how Perl 5 worked. -- Darren Duncan

identity tests and comparing two references

2005-03-31 Thread Darren Duncan
to remember reading somewhere that '===' will do what I want, but I'm now having trouble finding any mention of it. So, what is the operator for reference comparison? Thank you. -- Darren Duncan

Re: identity tests and comparing two references

2005-04-01 Thread Darren Duncan
At 7:37 AM -0800 4/1/05, Larry Wall wrote: On Thu, Mar 31, 2005 at 11:46:22PM -0800, Darren Duncan wrote: : So, what is the operator for reference comparison? The =:= operator is almost certainly what you want here. Larry Thanks to everyone for their answers. Last night I started coding

Re: should we change [^a-z] to -[a..z] instead of -[a-z]?

2005-04-14 Thread Darren Duncan
is good about Perl to folk who don't use it. -- Darren Duncan

Re: Truely temporary variables

2005-04-17 Thread Darren Duncan
useful. -- Darren Duncan

Re: { = } autocomposition

2005-04-20 Thread Darren Duncan
that form exclusively with my Perl 6 ports to date. So in that case, the test is wrong. -- Darren Duncan

Re: { = } autocomposition

2005-04-20 Thread Darren Duncan
At 8:43 PM +0200 4/20/05, Juerd wrote: Darren Duncan skribis 2005-04-20 11:40 (-0700): A clear way to disambiguate a block from a hash-ref when using map/grep/sort etc is to use a colon before the leading brace for a block rather than a space, like this: map:{ $_ = uc $_ } I think the best

Re: map { $_ = $_ } @foo

2005-04-24 Thread Darren Duncan
is in an array, like this: my %foo = map:{ ( $_ = 1 ) } @bar; if( %foo{'abc'} ) ... if( %foo{'def'} ) ... if( %foo{'zrs'} ) ... That closure is returning a pair for each array element. -- Darren Duncan

Re: adverbial blocks: description and examples requested

2005-05-06 Thread Darren Duncan
. It's a very good system and should be used. -- Darren Duncan

Re: Syntax of using Perl5 modules?

2005-05-25 Thread Darren Duncan
. On the other hand, I don't know whether or not that would be better in practice than keeping separate interpreters for calling and called. -- Darren Duncan

Re: Hyper-concat

2005-06-14 Thread Darren Duncan
can one say it is better? -- Darren Duncan

Re: ./method defunct

2005-06-18 Thread Darren Duncan
an alteration to your table: PUBLIC PRIVATE -- -- ./method() ./:method() [EMAIL PROTECTED]() .@:method() .method() .:method() This looks way more consistent and predictable to me. -- Darren Duncan

Re: ./method defunct

2005-06-18 Thread Darren Duncan
can omit the '.' on things like $foo.[0].{'bar'}; however, the full/longer form should always be valid syntax. -- Darren Duncan

Re: DBI v2 - The Plan and How You Can Help

2005-07-04 Thread Darren Duncan
want, and you can run init() prior to forking without trouble. What I've said in this email is not exhaustive and I may add or amend items later; but, its a good start. Feedback is welcome of course. Thank you. -- Darren Duncan

Re: DBI v2 - The Plan and How You Can Help

2005-07-04 Thread Darren Duncan
driver names are quite short already, so its not like abbreviations are necessary. -- Darren Duncan

Re: DBI v2 - The Plan and How You Can Help

2005-07-05 Thread Darren Duncan
here, so do as you will. -- Darren Duncan

Re: Time::Local

2005-07-05 Thread Darren Duncan
for. Perl internally just has to know about the one number. -- Darren Duncan

Re: Time::Local

2005-07-05 Thread Darren Duncan
application, of an unprecedented focus and feature set, so I've thought a lot about these sorts of issues for being the most accurate and trustworthy possible. -- Darren Duncan

Re: Time::Local

2005-07-05 Thread Darren Duncan
At 3:36 PM -0700 7/5/05, Dave Whipp wrote: Darren Duncan wrote: The object should not store anything other than this single numerical value internally (smart caching of conversions aside). I think we can all either agree with that, or dont-care it. The internal implementation

Re: DBI v2 - The Plan and How You Can Help

2005-07-09 Thread Darren Duncan
be met by the actual DBMS that Perl + DBI needs to work with. What you say is fair enough, but I never proposed anything impossible or difficult; everything that I am proposing here is easy and simple. -- Darren Duncan

Re: DBI v2 - The Plan and How You Can Help

2005-07-09 Thread Darren Duncan
. -- Darren Duncan

Re: DBI v2 - The Plan and How You Can Help

2005-07-09 Thread Darren Duncan
At 1:22 AM -0700 7/9/05, Jonathan Leffler wrote: On 7/4/05, Darren Duncan mailto:[EMAIL PROTECTED][EMAIL PROTECTED] wrote: 5. All details used to construct a connection handle should be completely decomposed rather than shoved into an ungainly data source. Examples of what should be distinct

Re: DBI v2 - The Plan and How You Can Help

2005-07-09 Thread Darren Duncan
many levels of hierarchy there can be with a database; eg, a server has 1+ databases, each of which has 1+ catalogs (and presumably each of those has 1+ schemas and each of those 1+ tables and other schema objects). I will probably find it helpful when I plan various DBI-using tasks. -- Darren

Re: DBI v2 - The Plan and How You Can Help

2005-07-10 Thread Darren Duncan
could not do with a traditional bind_param() etc since the whole thing won't fit in RAM at once. -- Darren Duncan

Re: DBI v2 - The Details - :name for placeholders

2005-07-10 Thread Darren Duncan
in reference documentation? -- Darren Duncan

Re: DBI v2 - The Plan and How You Can Help

2005-07-11 Thread Darren Duncan
, because those specify a versioned API which continues to exist as a wrapper. See http://arstechnica.com/reviews/os/macosx-10.4.ars/4 for what I'm talking about. However it's done, I'm thinking something akin to that would be good for DBI. -- Darren Duncan

Re: DBI v2 - The Plan and How You Can Help

2005-07-11 Thread Darren Duncan
be able to port the subclass to DBIv2, without any additional burden on DBI developers. I accept your challenge. -- Darren Duncan

Re: Elimination of Item|Pair and Any|Junction

2005-07-27 Thread Darren Duncan
help it, because it looks messy. -- Darren Duncan

Re: DBI v2 - The Plan and How You Can Help

2005-08-16 Thread Darren Duncan
. -- Darren Duncan

Re: use fatal err fail

2005-09-29 Thread Darren Duncan
'use fatal' turned on all the time and/or by default is also the best course of action. While we're at it, 'use warnings' should probably be on by default too, but this is less important than 'fatal'. -- Darren Duncan

subclassing associated classes elegantly

2005-10-19 Thread Darren Duncan
pair of classes is hidden behind a second pair of classes that mediate access to them. What are some best practices here that can be used by anyone faced by a similar problem? -- Darren Duncan

Re: new sigil

2005-10-20 Thread Darren Duncan
that conflict with anything? -- Darren Duncan

Re: new sigil

2005-10-22 Thread Darren Duncan
At 3:26 PM +0100 10/22/05, Nicholas Clark wrote: At the risk of re-enforcing my apparent optimism. On Thu, Oct 20, 2005 at 04:02:10PM -0700, Darren Duncan wrote: that the next best one to exploit is ยค (euro; unicode=20AC; utf8=E282AC), and the next best is Woah. You've just demonstrated

Re: Slightly OT: zip() for Perl5?

2005-10-22 Thread Darren Duncan
this, and is cited in Perl Best Practices as doing so also. -- Darren Duncan

crossing lists

2005-10-28 Thread Darren Duncan
but with appropriately different syntax: ['a','b'] ~ ['c','d'] But that it returns ['ac','ad','bc','bd'] rather than ['ac','bd']. So is there a similarly terse way to do combinations already, and if not then would you consider it commonly used enough to add? -- Darren Duncan

the $! too global

2005-12-04 Thread Darren Duncan
variable before passing it to a subroutine just because that sub *may* have its own try block ... a caller shouldn't have to know about the implementation of what it called. I welcome feedback on this issue and a positive, elegant resolution. -- Darren Duncan

relational data models and Perl 6

2005-12-14 Thread Darren Duncan
databases. Though I anticipate that one could extend or override built-ins so that they interact with remote databases instead of internal variables, such as with the concept of sub-classing or role reusing or tying. Thank you. -- Darren Duncan

Re: relational data models and Perl 6

2005-12-15 Thread Darren Duncan
At 2:54 AM + 12/15/05, Luke Palmer wrote: On 12/15/05, Darren Duncan [EMAIL PROTECTED] wrote: I propose, perhaps redundantly, that Perl 6 include a complete set of native Okay, I'm with you here. Just please stop saying native and core. Everyone. Yes, of course. What I meant

Re: relational data models and Perl 6

2005-12-15 Thread Darren Duncan
much of telling Perl how to do the job. I don't want to have to use maps or greps or whatever, to express the various relational operations. -- Darren Duncan

handling undef better

2005-12-16 Thread Darren Duncan
thing is more low level and very pervasive, not to mention quite simple to fix. -- Darren Duncan

Re: handling undef better

2005-12-16 Thread Darren Duncan
) $x == 3; # like random_one($x) == 3 The odds of two undefined values in such primitive data types being equal is 1/Inf, which is zero. So no 2 undefs are equal, and no undef is equal to a defined value. You can't say what an undef equals because you don't know what value it has. -- Darren

Re: handling undef better

2005-12-16 Thread Darren Duncan
At 10:07 PM -0800 12/16/05, chromatic wrote: On Friday 16 December 2005 18:15, Darren Duncan wrote: 0. An undefined value should never magically change into a defined value, at least by default. This is fairly well at odds with the principle that users shouldn't have to bear the burden

RE: handling undef better

2005-12-17 Thread Darren Duncan
toward, in my mind. If you see 'never-assigned' and 'assigned-but-unset' to be distinct in practical use, then maybe we need to add a method/property to all containers that is used like .defined(), such as .unassigned() ... but I can't say its needed. -- Darren Duncan

Re: handling undef better

2005-12-17 Thread Darren Duncan
At 9:30 AM + 12/17/05, Luke Palmer wrote: On 12/17/05, Darren Duncan [EMAIL PROTECTED] wrote: Undef, by definition, is different from and non-equal to everything else, both any defined value, and other undefs. You said by definition, but where is this definition? Maybe definition

handling undef - second draft

2005-12-17 Thread Darren Duncan
, but hopefully I dealt with the worst ones from the preceeding first draft. -- Darren Duncan

Re: Obsoleting require 'Some/Module.pm'

2005-12-19 Thread Darren Duncan
$module_name;; die if $!; ... as I do now. I like to save string evals for when I'm actually using arbitrary runtime generated Perl code which is in a variable. -- Darren Duncan

Re: handling undef - second draft

2005-12-19 Thread Darren Duncan
First of all, I concede that features like autovivification and undefs defaulting to the domain-qualified 'none' are fine as what Perl does by default, so I retract any request to change this; I am fine for these things to remain as they are and were. -- Darren Duncan P.S. FYI, permit me

Re: the $! too global

2005-12-20 Thread Darren Duncan
Following the discussions from 2 weeks ago, are there any plans to update the synopsis soon regarding the $! variable? Synopsis 2 still says that it is conjectural to whether $! is always environmental. Thanks. -- Darren Duncan

Re: Problem with dwimmery

2005-12-22 Thread Darren Duncan
as the advantage of fewer changes of Perl 5 to Perl 6 porters. -- Darren Duncan

Re: Structured data format [was: Re: Problem with dwimmery]

2005-12-22 Thread Darren Duncan
At 3:40 PM +0100 12/22/05, Michele Dondi wrote: On Thu, 22 Dec 2005, Darren Duncan wrote: On a separate but related matter, I'm in the position of wanting to do something unusual, which is create a data file format whose content is executable perl code that defines a data structure, a hash

Re: Indeterminate forms for the Num type.

2006-01-17 Thread Darren Duncan
types is to get bleeding edge maximum performance, and abstraction would take away from this then, maybe. Or maybe not. But if anything bleeds through, it should be the hardware, and not other programming languages. -- Darren Duncan

overloading the variable declaration process

2006-02-05 Thread Darren Duncan
classes can override. Part way through writing this, I had a brief chat on #perl6 with stevan (and apparently the meta-model is still quite in flux) and he said my question was related to Larry's class but undef idea, and that Larry should talk more about the subject. Thank you. -- Darren

Re: overloading the variable declaration process

2006-02-06 Thread Darren Duncan
At 3:02 PM +0800 2/6/06, Audrey Tang wrote: On 2/6/06, Darren Duncan [EMAIL PROTECTED] wrote: Speaking briefly, I would like it if Perl 6 provided a way for a class (or role, or meta-class, etc) to declare that all variables declared to be of that type are automatically/implicitly set

tokenizer hints, supporting delimited identifiers or symbols

2006-02-07 Thread Darren Duncan
to ensure useable characters without name collisions, and that makes the resulting code obfuscated and hard to understand; I don't want to obfuscate. Thank you. -- Darren Duncan

Re: tokenizer hints, supporting delimited identifiers or symbols

2006-02-07 Thread Darren Duncan
testing, so I think I'll have to check that a test for the feature exists, and add one if not. -- Darren Duncan

Re: replacement of $

2006-04-01 Thread Darren Duncan
universal currency. I suggest gold. So every relevant symbol name could start with 'Au' instead of '$', and an advantage of this is that it is still easy to type on any keyboard. -- Darren Duncan

Re: Another dotty idea

2006-04-08 Thread Darren Duncan
are improvements. -- Darren Duncan

first barest-bones Relation implementation committed

2006-04-17 Thread Darren Duncan
6 itself, while Rosetta is a third-party toolkit for application building. -- Darren Duncan

Perl 6 built-in types

2006-04-27 Thread Darren Duncan
, it could potentially be named MutableSet, though that would break the pattern of built-in types having one-word names, but I haven't thought of any alternatives so far. Thank you. -- Darren Duncan

Re: Perl 6 built-in types

2006-04-27 Thread Darren Duncan
and saying that some are atomic while others aren't. -- Darren Duncan

using the newer collection types

2006-05-04 Thread Darren Duncan
in advance. -- Darren Duncan

Re: using the newer collection types

2006-05-04 Thread Darren Duncan
and fast to do any common type of work with it, and relational algebra is an extremely common kind of work being done. -- Darren Duncan

Re: using the newer collection types

2006-05-04 Thread Darren Duncan
Actually, I'll add a few more things to my reply, which should be helpful ... At 5:11 PM -0700 5/4/06, Darren Duncan wrote: At 10:51 AM +1200 5/5/06, Sam Vilain wrote: Moreover, the Relation type has these operators that the Set type doesn't have: rename(), project(), restrict(), extend

Re: using the newer collection types

2006-05-05 Thread Darren Duncan
Relation class in Pugs' ext/Relation/ directory for demonstration purposes and evaluate changes later. -- Darren Duncan

relations as roles (was: using the newer collection types)

2006-05-05 Thread Darren Duncan
about them. Thank you. -- Darren Duncan

Re: using the newer collection types - Interval

2006-05-06 Thread Darren Duncan
. (Similarly, a Relation is explicitly discrete and finite by definition.) I assume you aren't referring to the temporal specific thing called an interval. -- Darren Duncan

Re: using the newer collection types - Interval

2006-05-06 Thread Darren Duncan
for. -- Darren Duncan

Re: using the newer collection types - Interval

2006-05-06 Thread Darren Duncan
. Temporal or spacial data in common use today is just too complicated and non-generic, I think. (Whereas, the existing built-ins, and relations, are very generic and simple.) -- Darren Duncan

Re: using the newer collection types - Interval

2006-05-06 Thread Darren Duncan
{ all( .items ).does(Real) }; -- Darren Duncan

Re: using the newer collection types - Interval

2006-05-06 Thread Darren Duncan
At 6:06 PM -0700 5/6/06, Darren Duncan wrote: You can do it simply, kind of like this: class Point { has Real $x; has Real $y; }; subset Interval of Range where { all( .items ).does(Real) }; Er, you should read 'Real' as 'Num' (I originally meant Rational, which no longer exists

hyp-op examples of a Bag type in S03

2006-05-19 Thread Darren Duncan
they would work, or alternately please replace 'Bag' with 'Seq'. Thank you. -- Darren Duncan

Re: hyp-op examples of a Bag type in S03

2006-05-19 Thread Darren Duncan
Er, I meant to say subtracted where I said added. -- Darren Duncan

Re: hyp-op examples of a Bag type in S03

2006-05-22 Thread Darren Duncan
At 4:11 PM +1200 5/23/06, Sam Vilain wrote: Darren Duncan wrote: $bag1 - 1; # Bag(2,7,[1,Seq(8,2)],7) $bag2 - (1,1,1,1); # probably the same $bag3 - (1,1,2,1); # ? Bag's won't .does(Array) or .does(Coll[Seq,...]), so that hyperoperator won't work - if anything

outdated/incorrect S12 examples

2006-05-28 Thread Darren Duncan
sure the self syntax is invalid. Moreover, S12 explicitly says that Perl 6 has no barewords, save package names in specific circumstances. -- Darren Duncan

Re: outdated/incorrect S12 examples

2006-05-28 Thread Darren Duncan
At 1:45 PM +1000 5/29/06, Stuart Cook wrote: On 5/29/06, Darren Duncan [EMAIL PROTECTED] wrote: There are many places where the bareword self is used, whereas I believe the current syntax is $?SELF for the same thing, and has been for awhile. Actually, I seem to recall `self` being accepted

Re: Concurrency: hypothetical variables and atomic blocks

2006-05-31 Thread Darren Duncan
there is just a single process with a single thread. -- Darren Duncan

Re: Concurrency: hypothetical variables and atomic blocks

2006-06-02 Thread Darren Duncan
completion before it returns control, the invoker should know that vs when completion is guaranteed. In other words, an invoker of an op should know whether the op is ACID compliant in all parts of its operation or not. -- Darren Duncan

type name 'str' in Synopsis

2006-06-28 Thread Darren Duncan
to be operating like a C enum, where every value corresponds to a native integer, so perhaps buf is more appropriate. Or alternately, we should see Int and Str here. -- Darren Duncan

features of and declaring Mapping|Set|Hash values|variables

2006-06-29 Thread Darren Duncan
as members? 9. If you declare a parameter of a type that does Foo, and you pass an argument that is a different type that does Foo, but neither of them is of type Foo, will the compiler accept the binding (though it may fail at runtime)? Thanks. -- Darren Duncan

RE: S29 update ready

2006-07-08 Thread Darren Duncan
of a string-join. -- Darren Duncan

RE: S29 update ready

2006-07-08 Thread Darren Duncan
At 6:25 PM -0700 7/8/06, Darren Duncan wrote: At 8:32 PM -0400 7/8/06, Joe Gottman wrote: I have one minor comment about join. You should specify its behavior when it is passed an empty list. Does it return undef or the empty string? I think it makes the most sense for it to return an empty

Re: ===, =:=, ~~, eq and == revisited (blame ajs!)

2006-07-13 Thread Darren Duncan
working with hash keys. I may have forgotten to raise something else, but there's that for now. -- Darren Duncan

Re: ===, =:=, ~~, eq and == revisited (blame ajs!)

2006-07-13 Thread Darren Duncan
to the immutability, and all objects of the same class would be the same in that respect. Incidentally, your Currency example would likely be an immutable type. -- Darren Duncan

Re: ===, =:=, ~~, eq and == revisited (blame ajs!) -- Explained

2006-07-13 Thread Darren Duncan
having negated versions of all these various types of equality tests. Eg, !== for ===, nev for eqv, etc. They would be used very frequently, I believe (and I have even tried to do so), and of course we get the nice parity. -- Darren Duncan

Re: ===, =:=, ~~, eq and == revisited (blame ajs!) -- Explained

2006-07-14 Thread Darren Duncan
I think that Jonathan meant for his reply to my message to go to the list, so I am including it in its entirety, in my reply. At 11:23 PM -0700 7/13/06, Jonathan Lang wrote: Darren Duncan wrote: Jonathan Lang wrote: So the purpose of === is to provide a means of comparison that doesn't

optimizing with === immutable comparitor

2006-07-14 Thread Darren Duncan
. The above-stated rule would still stand for any resources managed by Perl itself.) -- Darren Duncan

CORRECTION: optimizing with === immutable comparitor

2006-07-14 Thread Darren Duncan
At 12:30 AM -0700 7/14/06, Darren Duncan wrote: If $a === $b means what I think it does, then I believe that a not-premature implementation optimization of === would be that it always $a := $b if it was returning true, so that any future === of $a and $b or aliases thereof could short-circuit

  1   2   3   4   5   >