Re: [svn:perl6-synopsis] r14520 - doc/trunk/design/syn

2008-03-16 Thread Daniel Hulme
On Sat, Mar 15, 2008 at 06:09:40PM -0700, [EMAIL PROTECTED] wrote: > Author: larry > Date: Sat Mar 15 18:09:39 2008 > New Revision: 14520 > @@ -1367,9 +1367,10 @@ > If you need to force inner context to scalar, we now have convenient > single-character context specifiers such as + for numbers an

Re: Web Module (Was: Perl6 new features)

2007-06-22 Thread Daniel Hulme
On Fri, Jun 22, 2007 at 02:07:35PM -0400, Chas Owens wrote: > On 6/22/07, chromatic <[EMAIL PROTECTED]> wrote: > >I also like to proceed from the assumption that the only core modules > >should be those required to install other modules. > Please, god, no. Or at least make two distributions: Bar

Re: Generalizing ?? !!

2007-06-22 Thread Daniel Hulme
On Fri, Jun 22, 2007 at 03:40:37PM +0100, Aaron Crane wrote: > my $b = 1 && 0 || 42; > # Now $b is 17 s/17/42/ or vice-versa, I think. -- Paraphernalia/Never hides your broken bones,/ And I don't know why you'd want to try:/ It's plain to see you're on your own.-- Paul Simon http://s

Re: propose renaming Hash to Dict

2007-06-01 Thread Daniel Hulme
On Fri, Jun 01, 2007 at 10:30:08AM -0400, John Macdonald wrote: > > "...make a hash of things" (meaning, a mess) > > "corned beef hash" > > That's two people that have given the same list, but both > have omitted the more common (in modern times) phrase "hash > browned potatos" which is a hash of

Re: propose renaming Hash to Dict

2007-06-01 Thread Daniel Hulme
On Fri, Jun 01, 2007 at 11:44:53AM +0200, Thomas Wittek wrote: > Larry Wall: > > Nope. Hash is mostly about meaning, and very little about implementation. > > Please don't assume that I name things according to Standard Names in > > Computer Science. I name things in English. Hash is just someth

Re: [svn:perl6-synopsis] r14409 - doc/trunk/design/syn

2007-05-30 Thread Daniel Hulme
On Wed, May 30, 2007 at 09:13:36AM -0700, [EMAIL PROTECTED] wrote: > +the hash, the return value need not be recalculated. If you use > +this trait, the compiler will assume two things: > + > +=over > + > +=item * > + > +A given C would always calculate the same return value. That is, > +there is

Re: explicit line termination with ";": why?

2007-05-15 Thread Daniel Hulme
On Tue, May 15, 2007 at 01:14:44PM -0600, Luke Palmer wrote: > However, I do think that it's useful to be able to treat the rest of > the current scope as a block (usually with a parameter), for certain > kinds of closure-heavy code. Maybe this is a case for one of Mr. Lang's custom semicolons with

Re: explicit line termination with ";": why?

2007-05-14 Thread Daniel Hulme
On Mon, May 14, 2007 at 02:29:11PM -0700, Jonathan Lang wrote: > 2. This brings up the possibility of custom-designed termination > operators. cf. Semi::Semicolons. I think that being flexible enough that people can write packages like that is one of Perl < 6's greatest strengths. Long may it con

Re: [svn:perl6-synopsis] r14386 - doc/trunk/design/syn

2007-04-27 Thread Daniel Hulme
On Fri, Apr 27, 2007 at 05:08:49PM -0700, [EMAIL PROTECTED] wrote: > Author: larry > Date: Fri Apr 27 17:08:44 2007 > New Revision: 14386 > +The final C<::> is required here, because the C syntax > +is reserved for defining an autovivifiable protoobject along with > +it's initialization closure (s

Re: [svn:perl6-synopsis] r14335 - doc/trunk/design/syn

2007-03-11 Thread Daniel Hulme
On Sun, Mar 11, 2007 at 02:17:25PM -0700, [EMAIL PROTECTED] wrote: > Author: audreyt > Date: Sun Mar 11 14:17:24 2007 > New Revision: 14335 > Modified: doc/trunk/design/syn/S06.pod > == > --- doc/trunk/design/syn/S06.pod

Re: resumable exceptions and LEAVE/KEEP/UNDO blocks

2007-03-05 Thread Daniel Hulme
On Mon, Mar 05, 2007 at 09:01:13AM -0800, Larry Wall wrote: > I don't see a problem here. I think you maybe missed the bit that says: > > A C block sees the lexical scope in which it was defined, but > its caller is the dynamic location that threw the exception. That is, > the stack

resumable exceptions and LEAVE/KEEP/UNDO blocks

2007-03-05 Thread Daniel Hulme
What happens if a resumable exception is propagated through a block with a LEAVE, KEEP, or UNDO block? S04 seems to be a bit vague on this point. It strikes me that what we want it to do is not execute them when the exception is propagated, because we don't know whether it's going to be resumed or

Re: [svn:perl6-synopsis] r13580 - doc/trunk/design/syn

2007-02-10 Thread Daniel Hulme
> +This is particularly useful for establishing grammatical categories > +in a grammar be declaring a C C or C. (Perl 6's > +grammar does this, for instance.) Unless you be a pirate, you may want to revise the above, and add commas. -- Paraphernalia/Never hides your broken bones,/ And I don't k

Re: Synposis 26 - Documentation [alpha draft]

2006-10-08 Thread Daniel Hulme
I liked it. Just one nit, near the end: >You can also preconfigure L, by >naming them with a pair of angles as a suffix. For example: > > =comment Always allow E<> codes in any (implicit or explicit) V<> > code... =config V<> :allow > > =comment All code to be italiciized...

Re: renaming "grep" to "where"

2006-09-20 Thread Daniel Hulme
> names they're given. "The Beatles" probably sounded like a really > dumb name for a band once. But maybe less dumb than 'The Quarrymen', which was the original name of the band. (They all went to Quarry Bank school, now Calderstones.) Perhaps the renaming, unfettered by their history or by a

Re: [svn:perl6-synopsis] r11975 - doc/trunk/design/syn

2006-09-13 Thread Daniel Hulme
> svn log, speaking on larry's behalf (>): > > +The string concatenating form is: > > + > > + X~X <1 2> # 'a1', 'a2', 'b1', 'b2' > > + > > +The C operator desugars to something like: > > + > > +[~]�( X <1 2> ) # 'a1', 'a2', 'b1', 'b2' ^ > If the C variant

Re: [svn:perl6-synopsis] r11971 - doc/trunk/design/syn

2006-09-12 Thread Daniel Hulme
> +Note that only the first term of an C operator may reasonably be > +an infinite list. Now all we need is a variant that does the diagonal order and we'll be home and dry. 'a'..* diagX 1..* -> ['a', 1], ['a', 2], ['b', 1], ['a', 3], ['b', 2], ['c', 1], ['a', 4], ['b', 3], ['c', 2], ['d', 1],

Re: Classes / roles as sets / subsets

2006-08-29 Thread Daniel Hulme
> See diagram case 2 (Class A and Class B intersect): > & B are built from a role that represents their intersection ( Class > A U Class B), and then code is added in the definitions of the It may be just me being confused, but the symbol that looks like a U (U+222a) is usually union; intersect

Re: clarifying the spec for 'ref'

2006-08-25 Thread Daniel Hulme
> If "changing that functionality beyond recognition" means changing its > external behavior (as opposed to its internal behavior) so that it > acts differently from what the superclass had promised to do, then > no, it's not any weirder--but I can't figure out how the contract > would work, eith

Re: Heredoc issue in pugs.

2006-08-22 Thread Daniel Hulme
> : my $a = q:t /END/ > : test > : END; > :print qq:to/END/; > :Give $amount to the man behind curtain number $curtain. > :END > : Which is correct? > Both of them are. See the table further down that says: What about the semicolon? After the terminator, or after the openin

Re: multi-line comments, C macros, & Pod abuse

2006-08-19 Thread Daniel Hulme
> "Stuart Cook" schreef: > > Larry Wall: > > >> if 0 { > >> ... > >> } > > > > The one disadvantage of that approach is that it will break if the > > "commented-out" code temporarily fails to compile. > > How frequent does that happen? All the time. I often comment out bits of code wh

Re: Type annotation on expressions

2006-08-08 Thread Daniel Hulme
> Is it possible to say this one expression? Haskell's syntax is shiny > but everybody wants the colon: > > foo( ( $x :: Moose ) ); I may be in a little world of my own here, but isn't this what 'as' is supposed to do? foo($x as Moose); -- "Of all things, good sense is the most fairly

Re: Patch for S06 (and also S03)

2006-08-07 Thread Daniel Hulme
> Oh, thank you very much for correcting this. I didn't even read the > sentence after I made the change. ;-) I should be more careful the > next time. Bah, you don't need to with an army of attentive proof-readers. > I'm sorry that I disagree with this one since I am following Audrey's > changes

Re: Patch for S06 (and also S03)

2006-08-07 Thread Daniel Hulme
Sorry to patch the patch, but in > -Other sigils binds only to the I argument with that name: > +Other sigil binds only to the I argument with that name: the replacement makes no more sense than the original. "Other sigils bind" or "Any other sigil binds" would work here. Also, I believe the origi

Re: [svn:perl6-synopsis] r9728 - doc/trunk/design/syn

2006-06-30 Thread Daniel Hulme
> > +This hides any qX rule that might be defined in the gramma. Note > s/gramma/grammar/ if you please. Erm, credit TreyHarris on this one, as he seems to have spotted it first on #perl6. -- "Of all things, good sense is the most fairly distributed: everyone thinks he is so well supplie

Re: [svn:perl6-synopsis] r9728 - doc/trunk/design/syn

2006-06-30 Thread Daniel Hulme
> +This hides any qX rule that might be defined in the gramma. Note s/gramma/grammar/ if you please. I prefer the new quoting behaviour and I like << and >> as word boundaries. (Sometimes I miss Vim regexes' \< and \>.) Are << and >> zero-width? -- "The rules of programming are transitory;

bind variable name to type

2006-06-22 Thread Daniel Hulme
Would it be useful to have a way of 'binding' a variable name to a given type, in a given lexical scope, such that every time a variable with that name is declared in that scope it gets to be of that type? What I'm thinking of is a bit like how in Fortran variables called n are automatically intege

lvalue functions and lvalue parameters

2006-06-20 Thread Daniel Hulme
I've just thought of an interesting interaction with lvalue functions and call by foo. What if I want to write, say, an lvalue ?? !! function thus sub cond(Bool $c, $a, $b) is rw { if $c return $a else return $b; } Will this fail because $a and $b are not rw? If so, will it fail at run- or comp

Re: [svn:perl6-synopsis] r9575 - doc/trunk/design/syn

2006-06-12 Thread Daniel Hulme
> > -post-assigment forms such as C is allowed.) > > +post-assigment forms such as C are allowed. > s/allowed\./allowed)./ Umm, no. The ) was correct in its original position (after the full stop). It just seems to have disappeared. -- Always crash crash crashWell come on and

statement-ending } with if

2006-06-06 Thread Daniel Hulme
Can someone explain to me how } on a line on its own can end a statement (as described in the second section of S04), but the following still works? if $condition { ... } else { ... } i.e. Why doesn't the } on the fourth line terminate the if statement, leaving the compiler terminally confuse

~~ with *

2006-06-06 Thread Daniel Hulme
I only vaguely recall the discussions a while back about what smart-matching against Booleans should do. IIRC, there are two positions, and a good argument for either side: C<$foo ~~ True> means C; C<$foo ~~ False> means C or C<$foo ~~ True> means C; C<$foo ~~ False> means C The first of these ad

Re: [svn:perl6-synopsis] r9496 - doc/trunk/design/syn

2006-06-04 Thread Daniel Hulme
> +an function-arguments (C) context on its arguments. You might have fixed the other error while you were at it. s/an/a/ -- "My invention can be exploited for a certain time as a scientific curiosity, but apart from that it has no commercial value whatsoever." Auguste Lumiere, on his a

Re: Concurrency: hypothetical variables and atomic blocks

2006-05-31 Thread Daniel Hulme
> How does an atomic block differ from one in which all variables are > implicitly hypotheticalized? I assume that the atomicness being controlled by some kind of lock on entry, it also applies to I/O and other side-effecty things that you can't undo. -- Hats are no worse for being made by ancien

Re: [svn:perl6-synopsis] r9216 - doc/trunk/design/syn

2006-05-12 Thread Daniel Hulme
> (string) context. You can force list context on the expression using > -either the C<*> or C operator if necessary. > +either the C operator if necessary. English not being executable line noise, you can't use "either" to force a scalar into list context. -- "Twelve? Who needs twelve? Couldn'

Re: A rule by any other name...

2006-05-11 Thread Daniel Hulme
> >Including :skip(//). Yes, agreed, it's a huge > >improvement. I'd be more comfortable if the default rule to use for > >skipping was named instead of . (On IRC was also > >proposed, but the connection between :skip and is more > >immediately obvious.) > Yes, I like too. I too keep mistakel

Re: S02: generalized quotes and adverbs

2006-05-10 Thread Daniel Hulme
> qX ::= "q:x:y:z"; > > as a simple, argumentless "word" macro. But would that DWIM when I come to write qX(stuff, specifically not an adverb argument); ? -- "The rules of programming are transitory; only Tao is eternal. Therefore you must contemplate Tao before you receive en

Re: [svn:perl6-synopsis] r8907 - doc/trunk/design/syn

2006-04-22 Thread Daniel Hulme
> return a boolean for either 1 or 0 arguments. Negated operators, > -return Bool::False, and all the rest return Bool::True. > +return C, and all the rest return C. The comma on the first line is superfluous. -- I will take my life into my hands And I will use it.'MacArthur Park' I will w

Re: [svn:perl6-synopsis] r8883 - doc/trunk/design/syn

2006-04-20 Thread Daniel Hulme
> +but rather easier to read. The bare C<*>, C<+> and C quantifiers > +never backtrack in a C unless some outer rule has specified a > +C<:panic> option that applies. If you want to prevent even that, use > +C<*:>, C<+:> or C to prevent any backtracking into the quantifier. > +If you want to expl

Re: foo..bar or long dot and the range operator

2006-04-12 Thread Daniel Hulme
> I *still* don't understand the problem this long dot is trying to > solve. I'm a bit with you, there. I can see why you might want to do $query .fetchrow($i) .selectcolumn($j) .say; rather than $query. fetchrow($i). selectcolumn($j). say; but surely $query. .fetchrow($i). .selectcolumn($j).

Re: [svn:perl6-synopsis] r8625 - doc/trunk/design/syn

2006-04-10 Thread Daniel Hulme
> +insert a line break into a sequence of methods calls include: s/methods/method/ > A consequence of the postfix rule is that (except when delimiting a ... > +a quote or terminating a "long dot") a dot with whitespace in front Too many a's. > +you to insert optional whitespace and commentsbetwe

Re: [svn:perl6-synopsis] r8562 - doc/trunk/design/syn

2006-04-06 Thread Daniel Hulme
> +If this MMD dispatch succeeds, the result becomes the result of the > +of the reduce. "MMD dispatch" ~~ "RAS syndrome" Also note the two "of the"s. > +Otherwise, if the MMD dispatch fails, then if there is one argument, > +while the single argument form can MMD dispatch based on the type of D

Re: [svn:perl6-synopsis] r8511 - doc/trunk/design/syn

2006-03-31 Thread Daniel Hulme
> Values with these types autoboxes to their uppercase counterparts when Sorry to be picky after your quick response, but s/autoboxes/autobox/; -- Mary had a little sprout,From week to week, from month to month, Its fleece was green as grass, She kept the sprout in tow, She

Re: [svn:perl6-synopsis] r7812 - doc/trunk/design/syn

2006-02-23 Thread Daniel Hulme
> +use Sense :EXPORT<@horse>; # import "common" but exports > # "@horse" As typos seem to be in favour today, might I suggest s/exports/export/ so all the verbs agree in number? Apologies for the short context but I had enough of a fight with the wrapp

Re: Problem with dwimmery

2005-12-26 Thread Daniel Hulme
> As a third possibility, could we huffman-code "do nothing" clauses by > leaving out the appropriate argument? That is: > > while $x-- && some_condition($x); That's a bit too short for my liking: it is likely to lead to the traditional C undetectable bug when you write while $x-- && some_cond

Re: type sigils redux, and new unary ^ operator

2005-11-24 Thread Daniel Hulme
> If .indexes turns out to be used a lot, then let's have .i -- "i" for > "index" is accepted abbreviation, isn't it? (Think for (i = 0; ...; > ...)) +1 here. I too find ^$n a bit bizarre, but I like the look of for @foo.i OTOH, I like the parallels between %foo.keys and @foo.keys -- it recalls t

Re: Hyphens vs. Underscores

2005-11-17 Thread Daniel Hulme
> No sane person would put their braces in different places in > different parts of their code, so why don't we just say, > "from now on, you must use brace style X"? Have you never seen code that's been worked on by several people with differing tastes in brace positioning and no coding standard?

Re: Perl 6 fears

2005-10-24 Thread Daniel Hulme
> The current list of fears is: You don't include my personal fear. FEAR: I will need a lobotomy before I can make sense of Perl 6! -- Stop the infinite loop, I want to get off! http://surreal.istic.org/ Paraphernalia/Never hides your broken bones,/ And I don't know why you'd want to try:/ I