no 6;

2005-09-01 Thread Rafael Garcia-Suarez
I just commited into bleadperl a patch that implements this : $ ./perl -e 'no 5' Perls since v5.0.0 too modern--this is v5.9.3, stopped at -e line 1. BEGIN failed--compilation aborted at -e line 1. That is, the exact opposite of the current "use VERSION" syntax. One of the uses I had

Re: my $key is sensitive;

2005-10-04 Thread Rafael Garcia-Suarez
Brent 'Dax' Royal-Gordon wrote in perl.perl6.language : > Basically, I'd like to be able to mark a variable as "sensitive" or > "secret". This implies that the language should overwrite the memory > it uses before deallocating it, and that if possible it should tell > the virtual memory system to

Re: my $key is sensitive;

2005-10-05 Thread Rafael Garcia-Suarez
Brent 'Dax' Royal-Gordon wrote in perl.perl6.language : > > I would like "is sensitive" to be defined to mean that any data stored > in that variable, at any level of recursion, will be zeroed out as > soon as it is garbage collected. Particular implementations can add > extra features on top of t

Re: Negative array subscripts

2007-02-07 Thread Rafael Garcia-Suarez
Smylers wrote in perl.perl6.language : > Hmmm, a pragma's a bit heavyweight for this; how about being able to set > this with a special global variable -- that sure sounds handy ... Actually, in perl 5, $[ *is* a pragma... :) -- Grepping the source is good for the soul. -- the perldebguts manpag

Re: [perl #60732] Hash indexes shouldn't work on array refs

2008-11-24 Thread Rafael Garcia-Suarez
Moritz Lenz wrote in perl.perl6.compiler : > jerry gay wrote: >> On Fri, Nov 21, 2008 at 10:43, via RT Moritz Lenz >> <[EMAIL PROTECTED]> wrote: >>> # New Ticket Created by Moritz Lenz >>> # Please include the string: [perl #60732] >>> # in the subject line of all future correspondence about this

Re: Files, Directories, Resources, Operating Systems

2008-11-26 Thread Rafael Garcia-Suarez
Richard Hainsworth wrote in perl.perl6.language : > The S16: chown, chmod thread seems to be too unix-focussed. I was more or less thinking that the syscall-related primitives, like chown or chmod, could go in a POSIX namespace. Even in UNIX land nowadays the situation can be much more complex tha

Re: Perl6 Daydreams (on topic but frivolous)

2003-06-28 Thread Rafael Garcia-Suarez
Jonathan Scott Duff wrote in perl.perl6.language : > > My only dream is that by this time next year we have a fully- > functional-people-can-use-it-in-production Perl6. It doesn't even > have to be 100% complete; I think just 85% would be enough if it were > the right 85%. 20% would be enough if

Re: %_ - is it available for use?

2003-08-14 Thread Rafael Garcia-Suarez
david nicol wrote: > [EMAIL PROTECTED] perl -le '$_{a}=27; package notmain; print $_{a}' > 27 > > Gosh! > > Let's document it! Would it go in perlvar or perlsyn? It's already documented, in perlvar/"Technical Note on the Syntax of Variable Names" (at the end)

Re: Vocabulary

2003-12-16 Thread Rafael Garcia-Suarez
Larry Wall wrote in perl.perl6.language : > On Wed, Dec 17, 2003 at 12:11:59AM +, Piers Cawley wrote: >: When you say CHECK time, do you mean there'll be a CHECK phase for >: code that gets required at run time? > > Dunno about that. When I say CHECK time I'm primarily referring > to the end

Re: [perl] The Sort Problem

2004-02-12 Thread Rafael Garcia-Suarez
Joe Gottman wrote in perl.perl6.language : >This is unrelated to the problem you mentioned, but there is another > annoying problem with sort as it is currently defined. If you have an > @array and you want to replace it with the sorted version, you have to type > @array = sort @array; >

Re: Compile-time undefined sub detection

2004-03-05 Thread Rafael Garcia-Suarez
Larry Wall wrote in perl.perl6.language : > > In theory, yes, if you ask it to check in a CHECK block, and if you're > willing for the check to assume that no eval or INIT block is going > to supply the missing sub before it's actually called, and that no > run-time code is going to alias the sub

Re: Compile-time undefined sub detection

2004-03-05 Thread Rafael Garcia-Suarez
Larry Wall wrote in perl.perl6.language : >: In perl 5 those blocks are executed at the >: transition between the compilation and the execution phase *of the main >: program*. This is convenient for some purposes (the O and B::* modules) >: and inconvient for others (Attribute::Handlers, etc. etc.)

Re: Compile-time undefined sub detection

2004-03-05 Thread Rafael Garcia-Suarez
Larry Wall wrote in perl.perl6.language : > > Possibly a CHECK block that is compiled after end of main compilation > should translate itself to a UNITCHECK. But maybe it should be an error. > > But it's also possible that CHECK should mean "unit check", and > there should be an explicit MAINCHE

Re: Compile-time undefined sub detection

2004-03-05 Thread Rafael Garcia-Suarez
Damian Conway wrote in perl.perl6.language : > > I'd favour UNITCHECK and CHECK, mainly for the greater compatibility with > Perl 5 and with software engineering jargon. As far as Perl 5 is concerned, it appears that most people who write CHECK mean UNITCHECK. Including you :) > And because MAIN

Re: Funky «vector» operator

2004-03-19 Thread Rafael Garcia-Suarez
Andy Wardley wrote in perl.perl6.language : > I'm so happy! I just found out, totally by accident, that I can type > the « and » characters by pressing AltGr + Z and AltGr + X, > respectively. Of course this information is almost completely unusable without knowing your OS, your locale, and you

Re: $foo.s/foo/bar/

2004-05-13 Thread Rafael Garcia-Suarez
Aaron Sherman wrote: > Is it a special type of calling convention, e.g.: > > sub s (Regex $pat, Str $replace, bool ?$i) is doublequotelike returns(Str) { Ooh, "doublequotelike" sounds so much 1984. (Moreover it doesn't describe accurately the reality, which allows to use different delimiter

Re: simple grammar example

2004-06-09 Thread Rafael Garcia-Suarez
Luke Palmer wrote: > Also, if this is going to be an explanation rather than just a picture, > I suggest you go with Perl's usual versatile power, and store the > operators in a declarative data source. > > grammar RPN { > my @operator = << + - * / >>; > > rule input { * } >

Re: simple grammar example

2004-06-09 Thread Rafael Garcia-Suarez
Sean O'Rourke wrote: > * To really show where P6 rocks, you need to show dynamic features. A > simple example might be using a language with keywords kept in > variables, allowing you change between e.g. "for, while, if", "pour, > tandis-que, si", etc. Small correction : "pour, tant_que, si

Re: simple grammar example

2004-06-09 Thread Rafael Garcia-Suarez
Luke Palmer wrote: > That left recursion won't do. I can't remember my transformation rules > well enough to know how to put that in a form suitable for a recursive > descent parser. To be honest, I've never seen an RPN calculator modeled > with a grammar. Well, the main advantage of an RPM synt

Re: undo()?

2004-06-29 Thread Rafael Garcia-Suarez
Michele Dondi wrote: > I must say I've still not read all apocalypses, and OTOH I suspect that > this could be done more or less easily with a custom function (provided > that variables will have a method to keep track of their history, or, more > reasonably, will be *allowed* to have it), but I wo

Re: Synopsis 9 draft 1

2004-09-03 Thread Rafael Garcia-Suarez
On Fri, 3 Sep 2004 11:41:05 +0100, Tim Bunce <[EMAIL PROTECTED]> wrote: > Is there some syntax to express if the struct is packed or > needs alignment? (Perhaps that would be needed per element.) Why am I suddenly thinking about unions ?

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

2005-04-15 Thread Rafael Garcia-Suarez
Aaron Sherman wrote in perl.perl6.language : > > A silly question: is there a canonical character set from which we > extract these ranges? Are we hard-coding Unicode here, or is there some > way for the user to specify the character set for ranges? Perl 5 forces [a-z] (or [i-j] for that matter) t

Re: Sun Fortress and Perl 6

2005-04-27 Thread Rafael Garcia-Suarez
Autrijus Tang wrote in perl.perl6.language : > > 4. Software Transaction Memory > > Like GHC Haskell, Fortress introduces the `atomic` operator that takes a > block, and ensures that any code running inside the block, in a > concurrent setting, must happen transactionally -- i.e. if some > precondi

Re: General Feelings on Apoc 3

2001-10-06 Thread Rafael Garcia-Suarez
David M. Lloyd wrote: > On Thu, 4 Oct 2001, Michael G Schwern wrote: > > > > Backtracking is at the heart of Logic Programming (or Declarative > > > Programming, if you like). This is one of the 3 main programming paradigms > > > (along with procedural and functional). The most popular Declarativ

Re: Indenting

2001-10-16 Thread Rafael Garcia-Suarez
good men...}; } } since useful defaults are always good. -- Rafael Garcia-Suarez

Re: Apoc4: The loop keyword

2002-01-21 Thread Rafael Garcia-Suarez
On 2002.01.21 18:32 Michael G Schwern wrote: > On Sun, Jan 20, 2002 at 10:58:34PM -0800, Larry Wall wrote: > > : while( my $line = ) { > > : ... > > : } > > > > That still works fine--it's just that $line lives on after the while. > > This creeping lexical leakage bothers me. W

Re: Apoc4: The loop keyword

2002-01-27 Thread Rafael Garcia-Suarez
tain # if statements } # but $? is foo() here } (is "temporarized" the correct word, now that local() goes away?) -- Rafael Garcia-Suarez

Re: Perl6::Tokeniser

2002-01-29 Thread Rafael Garcia-Suarez
o, it can insert a fake ';' token after "do { ... }\n" for the parser. -- Rafael Garcia-Suarez

Re: Tree Transformations (was: Perl6 Macros)

2002-03-30 Thread Rafael Garcia-Suarez
xer is very complex (and highly stateful, as opposed as pure-lex lexers). I don't know how much of the complexity of the lexer can be reinserted back into the grammar for perl 6. -- Rafael Garcia-Suarez If strain on the lexer were a design criterion, I blew it long ago. -- Larry Wall, recently

Re: $^a, $^b, and friends

2002-04-06 Thread Rafael Garcia-Suarez
Larry Wall wrote in perl.perl6.language : > > Such a grammar switching routine could operate either over a lexical > scope or over the rest of the file. The only restriction is that > one module not clobber the grammar of a different module. > > Basically, we're trying to make the opposite mist

Re: $^a, $^b, and friends

2002-04-06 Thread Rafael Garcia-Suarez
Dan Sugalski wrote in perl.perl6.language : > > Don't forget, we already change parsing rules at compile time. Perl's > got three (maybe four) different sets of rules as it is: > >*) Normal perl >*) Regexes >*) Double-quoted strings >*) Single-quoted strings > > Adding another,

Re: $^a, $^b, and friends

2002-04-06 Thread Rafael Garcia-Suarez
Larry Wall wrote : > > It's not clear that the lexer is a separate entity any more. Lexers > were originally invented as a way of abstracting out part of the > grammar so that it could be done in a separate pass, and to simplify > the grammar for the poor overworked parser. Indeed. Another bene

Re: // in Perl 5.8?

2002-04-17 Thread Rafael Garcia-Suarez
Brent Dax wrote in perl.perl6.language : > I believe that the tokenizer remembers whether it's expecting a binary > operator or Something Else. That's how it handles things like > vs. numeric less-than (<). Indeed : that's why print $FH1 <$FH2>; produces a syntax error. -- If strain on the

Re: // in Perl 5.8?

2002-04-19 Thread Rafael Garcia-Suarez
nge that actively.) Work on a more recent bleadperl and watch t/japh/abigail.t ;-) > BTW, so far toke.c hasn't been as bad as I've heard it is. :^) Once you're used to it, it's surprisingly clear. -- Rafael Garcia-Suarez : http://rgarciasuarez.free.fr/

Re: Regex and Matched Delimiters

2002-04-24 Thread Rafael Garcia-Suarez
re variants \z and \Z. This needs (IMHO) some reshaping. -- Rafael Garcia-Suarez I'll better skip() some releases until it is() ok() to use Test::More without() going insane(). Any more than I already am, that is(). -- Tels in the perl-qa mailing list

Re: Backslashes

2002-05-21 Thread Rafael Garcia-Suarez
Larry Wall wrote : > > Well, if anything, we're going the other direction, and enriching what > you can do with a backslash in single quotes slightly. But it ought > to be pretty easy to define your own hyperquotes. We might also have > options on quotes like we do on regexen. Then we could te

Re: $RS paragraph mode going away?

2002-07-06 Thread Rafael Garcia-Suarez
Larry Wall wrote : > > Paragraph mode is not going away--it's merely going elsewhere. :-) > >: If so, what's the rationale? Another case of "you can't do it right >: internationally, so better not to do it at all"? > > No, it's simply that using a global variable to control something > that s

Re: What's MY.line?

2002-07-10 Thread Rafael Garcia-Suarez
ced at compile-time (in fact, at tokenizing-time) by the appropriate constants. The question is : to which kind of bytecode MY.file (etc.) get compiled ? -- Rafael Garcia-Suarez : http://use.perl.org/~rafael/

Re: Character Properties

2002-10-21 Thread Rafael Garcia-Suarez
Dan Sugalski wrote : > > And, FWIW, emacs is written in C. Granted a much macro-mutated > version of C, but C nonetheless. Just like Perl 5 ;-)

Re: UTF-8 and Unicode FAQ, demos

2002-11-03 Thread Rafael Garcia-Suarez
Matthew Zimmerman wrote in perl.perl6.language : > > So let me make my original question a little more general: are Perl 6 source > files encoded in Latin-1, UTF-8, or will Perl 6 provide some sort of > translation mechanism, like specifying the charset on the command line? I expect probably some

Re: UTF-8 and Unicode FAQ, demos

2002-11-04 Thread Rafael Garcia-Suarez
Austin Hastings wrote in perl.perl6.language : > > What we've got is an encoding problem at the MUA level. Mark Reed says > my mailer (Yahoo!) tagged a message containing high-bit characters as > US-ASCII. Several people the other day reported on the differences in > UTF8 vs. Latin-1 handling amon

Re: purge: opposite of grep

2002-12-05 Thread Rafael Garcia-Suarez
John Williams wrote in perl.perl6.language : > > While "purge" is cute, it certainly is not obvious what it does. Of > course neither is "grep" unless you are an aging unix guru... > > How about something which is at least obvious to someone who knows what > grep is, such as "vgrep" or "grep:v"?

Re: Comparing Object Identity (was: Re: Stringification of references (Decision, Please?))

2002-12-13 Thread Rafael Garcia-Suarez
Simon Cozens <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] (Larry Wall) writes: > > Which basically comes down to this: an id represents a location in > > memory for any objects that don't override the .id method. > > Aiee! No! Please don't let things override the address-in-memory method, > as

Re: Variable Types Vs Value Types

2003-01-07 Thread Rafael Garcia-Suarez
Dan Sugalski <[EMAIL PROTECTED]> wrote: > Like I said, you can always use delegation to subclass an array, > or limit yourself to an odd and restrictive subset of behaviour. > (Basically just vtable method overriding) Delegation has drawbacks compared to inheritance : you can't use a object that

Re: Variable Types Vs Value Types

2003-01-08 Thread Rafael Garcia-Suarez
Damian Conway <[EMAIL PROTECTED]> wrote: > > There are in fact *two* types associated with any Perl variable: > > 1. Its "storage type" (i.e. the type(s) of value it can hold) > This is specified before the variable or after an C or C. > It defaults to Scalar. > >

Re: L2R/R2L syntax (was Re: Everything is an object.)

2003-01-08 Thread Rafael Garcia-Suarez
frederic fabbro <[EMAIL PROTECTED]> wrote: > > Can one see it as a shell redirection/pipe? This may sound funny, > but is the following ok? >@b <~ @a ~> @c; # @c = @b = @a; > (@b <~ @a) ~> @c; # same order i guess > > so one can also: > @keep <~ grep /good/ <~ @list ~> gre

Re: L2R/R2L syntax (was Re: Everything is an object.)

2003-01-08 Thread Rafael Garcia-Suarez
Luke Palmer <[EMAIL PROTECTED]> wrote: > > Not necessarily. <~ will necessarily need to be right-associative, > while ~> left, however. Not sure if you aren't getting this backwards, but anyway I often find myself confused with right and left. > It would be logical to give them the same > prece

Re: L2R/R2L syntax (was Re: Everything is an object.)

2003-01-08 Thread Rafael Garcia-Suarez
Nicholas Clark wrote in perl.perl6.language : >> Actually I don't think you can define a grammar where two operators have >> the same precedence but different associativity. Be it a pure BNF >> grammar, or a classical yacc specification (using the %left and %right >> declarations). > > But that wo

Re: L2R/R2L syntax (was Re: Everything is an object.)

2003-01-08 Thread Rafael Garcia-Suarez
Dave Whipp wrote in perl.perl6.language : > But with the different precedence. At last, I can assign from a list without > using parentheses: > > @a = 1, 2, 3; # newbie error > @a <~ 1, 2, 3; # would work or : @a <~ 1 <~ 2 <~ 3; or : 1, 2, 3 ~> @a; which would be also written as :

Re: "Disappearing" code

2003-01-10 Thread Rafael Garcia-Suarez
John Siracusa <[EMAIL PROTECTED]> wrote: > > Well, er, don't we need to decide what the subroutine attribute is, so that > the compiler will know to honor it and make the code "disappear"? It > doesn't seem like a feature that can be added from "userland" after the fact > (but maybe I'm wrong...)

Re: L2R/R2L syntax (was Re: Everything is an object.)

2003-01-16 Thread Rafael Garcia-Suarez
Dan Sugalski <[EMAIL PROTECTED]> wrote: > > And keyboards, don't forget keyboards. These pesky primitive ones we > have now would require a lot of shift-control-alt-meta-cokebottle key > sequences... And vt100 consoles ! There are still sysadmins that struggle with a buggy perl script, having r

Re: A proposal on if and else

2003-01-20 Thread Rafael Garcia-Suarez
Brent Dax wrote in perl.perl6.language : > Yes, I know this means that we have 'else if' instead of 'elsif', but > it's only two more characters and it makes the grammar cleaner. The tokeniser could send two tokens "else" and "if" whenever it recognizes the keyword "elsif" -- so this isn't a probl

Re: A proposal on if and else

2003-01-20 Thread Rafael Garcia-Suarez
Joseph F. Ryan wrote in perl.perl6.language : > > I think the point of having C as a sub rather than as a separate > syntax is so the parser doesn't have to do anything special for > special keywords. > > I think the goal was to simplify the compiler, but with the > discussion of recent weeks, it

Re: A proposal on if and else

2003-01-20 Thread Rafael Garcia-Suarez
Joseph F. Ryan wrote in perl.perl6.language : > > If the final design stays the way it is now, there really won't be > a "lexer". Instead, a perl6 grammar parses the data, and builds up > a huge match-object as it, well, matches. This match object is then > munged into the optree. Oh, yes, I re

Re: P6ML?

2003-03-26 Thread Rafael Garcia-Suarez
Andy Wardley wrote: > > If my understanding of the design of Perl 6 is correct, the lexer, parser > and any other related components will be highly configurable and/or > replaceable. The goal is to provide support for "little languages" by > separating Perl the language from perl the interpreter

Re: object initialisers

2003-06-12 Thread Rafael Garcia-Suarez
Nicholas Clark wrote: > > class Foo { > ... > std::size_t spare = 0 > std::size_t allocate = 4096 > std::size_t min_readline = 80 > > and have the compiler know that if I specify a member initialiser in my > my constructor, then that should be used, otherwise to default to using >