Re: Perl development server

2005-05-24 Thread Carl Mäsak
Note how close to Finnish it is. Portuguese: cebola Finnish: sipoli Might be a coincidence, but might also be a borrowed word. // Carl On 5/24/05, Alberto Manuel Brandão Simões [EMAIL PROTECTED] wrote: Onian in Portuguese: cebola (in case any of you wonder) wolverian wrote: On Tue, May

Re: (OT) Re: Perl development server

2005-05-24 Thread Carl Mäsak
Esperanto: cepo (though that's probably not a data point) // Carl On 5/24/05, Michele Dondi [EMAIL PROTECTED] wrote: On Tue, 24 May 2005, wolverian wrote: Portuguese: cebola Finnish: sipoli Italian: cipolla (since nobody has mentioned it yet) Michele -- It was part of the

Re: WTF? - Re: method calls on $self

2005-07-14 Thread Carl Mäsak
On 7/14/05, Juerd [EMAIL PROTECTED] wrote: It's just a Solomon judgement situation. That can work out well, but I really hate when it's forced and used to test patience. If Juerd is right about this being a solomonian situation, let me just give up my baby to the other woman by saying: * It's

skippable arguments in for loops

2005-09-22 Thread Carl Mäsak
hcchien raised the following question on #perl6[1]: If I want to loop through a nine-element array three elements at a time, I do my @a = 1..9; for @a - $x, $y, $z { say $x } But what if I don't care about the elements 1,4,7? Would the following be a sane syntax? my @a = 1..9; for @a - undef,

Re: skippable arguments in for loops

2005-09-23 Thread Carl Mäsak
I'm not sure we've reached consensus here, so I will try to summarize what everyone said so far in order to clear my own head a bit. :) Sorry in advance if i horribly misrepresent anyone's opinions. Luke: Thinks the _ syntax is no joke, since every language with pattern matching abilities has it.

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

2006-06-11 Thread Carl Mäsak
On 6/11/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: [...] @@ -147,8 +147,9 @@ precedence levels autoincrement, exponentiation, symbolic unary, multiplicative, and additive; but these are limited to standard operators that are known to return numbers, strings, or booleans. -(Operators that

Implicit current-index variable, scoped inside for-loops

2006-08-29 Thread Carl Mäsak
Yobert Hey do you know what would be cool in perl 6 Yobert A special variable for when you do a for (@array) style loop Yobert it would always have the index of the array Discussed on #perl6: it's already quite easy in Perl 6 to loop with an explicit index: my @array = moose elk caribou; for

Re: Implicit current-index variable, scoped inside for-loops

2006-08-29 Thread Carl Mäsak
Ruud (), Carl (): But maybe a variable that implicitly carries along the loop index would be even snazzier? for @array - $val { say $.\t$val; } Or give the block a name (label), and have an index (or several indexes, like some that are reset by redo an some that are not) available,

Re: Implicit current-index variable, scoped inside for-loops

2006-08-29 Thread Carl Mäsak
Mark (), Carl (): Yobert Hey do you know what would be cool in perl 6 Yobert A special variable for when you do a for (@array) style loop Yobert it would always have the index of the array Discussed on #perl6: it's already quite easy in Perl 6 to loop with an explicit index: my @array =

Re: Implicit current-index variable, scoped inside for-loops

2006-08-30 Thread Carl Mäsak
Damian (), Ruud (), Damian (), Carl (): But it can hardly be blamed for clarity. That's a little unfair. can hardly be blamed - can easily be praised g Apologies to Carl if I misinterpreted. I read it as: can hardly be blamed for (having) clarity ;-) No, yours is the correct

Re: Outlaw to declare a lexical twice in the same scope

2006-09-11 Thread Carl Mäsak
Steve (): If you declare a lexical twice in the same scope, it is the same lexical I would argue for: If you declare a lexical twice in the same scope, it is an error! I agree. Enforcing one and only one declaration feels like a Good Thing, for Juerd's reasons. With me, multiple 'my' for

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

2006-09-12 Thread Carl Mäsak
svn log, speaking on larry's behalf (): +The string concatenating form is: + +a b X~X 1 2 # 'a1', 'a2', 'b1', 'b2' + +The CX~X operator desugars to something like: + +[~]«( a b X 1 2 ) # 'a1', 'a2', 'b1', 'b2' ...and later... +The CX variant crosses the arrays but

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

2006-09-13 Thread Carl Mäsak
Daniel (), Carl (), svn log, speaking on larry's behalf (): +The string concatenating form is: + +a b X~X 1 2 # 'a1', 'a2', 'b1', 'b2' + +The CX~X operator desugars to something like: + +[~]�( a b X 1 2 ) # 'a1', 'a2', 'b1', 'b2' ^ If the

Re: renaming grep to where

2006-09-20 Thread Carl Mäsak
Aaron (): OK then. Just so that I can type of the final result in S29, let's see if everyone agrees to several points that have been made in this thread: 1. classify is the real grep 2. convenience function, keep is probably a macro 3. use List :compat will get you a grep just as it will likely

Re: Motivation for /alpha+/ set Array not Match?

2006-09-27 Thread Carl Mäsak
Audrey (): Indeed... Though what I'm wondering is, is there a hidden implementation cost or design cost of making /foo+/ always behave such that $foo.from returns something, compared to the current treatment with the workaround you suggested? Has this been settled or addressed off-list?

Re: Motivation for /alpha+/ set Array not Match?

2006-10-01 Thread Carl Mäsak
Audrey (), Carl (): Has this been settled or addressed off-list? 'fraid not yet... Ah. So Warnock applies. (Side note: when I first read Warnock applies on things in p6 summaries a year or so ago, I thought it was some really energetic programmer who went around and applied patches as soon

Precedence levels and associativity conflicts (Re: class interface of roles)

2006-10-21 Thread Carl Mäsak
Larry (): [...] The non-chaining precedence level is a bunch non-associative operators like .. and cmp. Historically, all operators of a particular precedence level have had the same associativity, so that when you analyze $a op1 $b op2 $c you only have to compare op1 with op2 if they're

Re: Precedence levels and associativity conflicts (Re: class interface of roles)

2006-10-21 Thread Carl Mäsak
Jonathan (), Carl (): The only alternative I can think of right now would be to disallow even _declaring_ two operators of different associativity on the same precedence level... but that kind of strictitude doesn't sound very perlish. That depends on how you phrase the restriction. If you

Re: Remember: Outlaw to declare a lexical twice in the same scope

2007-01-27 Thread Carl Mäsak
Steve Lukas (): Hi @larry, I want to remember to my proposal from september 2006. It targets on changing S04. The discussion is summarized on: http://www.oreillynet.com/onlamp/blog/2006/09/weekly_perl_6_mailing_list_sum_3.html So, please change S04 as discussed. I, too, would like to point to

Re: Remember: Outlaw to declare a lexical twice in the same scope

2007-01-27 Thread Carl Mäsak
Dave (), Carl (): my $foo; # ...later in the same scope... my $foo; # illegal Perl5, legal Perl6 No, that's perfectly legal in perl5; it just generates a warning: use warnings; my $x = 1; my $f1 = sub { $x }; my $x = 2; my $f2 = sub { $x }; printf f1=%d f2=%d

Re: What criteria mark the closure of perl6 specification

2007-02-25 Thread Carl Mäsak
herbert (), Richard (): (eg. How out of date are the Exegesis files?) very *g* just use the synopsis *g* Hm, it might actually be a good idea to port the code examples from the Exegeses to current Perl6, preferably also runnable in Pugs. The ported programs could be put under examples/ in

Re: Where is Manhattan Dispatch discussion?

2008-05-06 Thread Carl Mäsak
John (): I'm still in the dark... I find an positions for manhattan distance but no definition of what that is. I did find the alternative pod page earlier. I don't have a whole answer for you, but a part that may help. What is generally meant by Manhattan distance is so-called L1 distance,

Compile-time checking of assignment to read-only variables (Re: MMD distances)

2008-05-09 Thread Carl Mäsak
TSa (): sub bar ($x) { $x = 3; # error, $x is readonly foo($x); # error, could hit rw Str } By the way, I hope it's possible to make the assignment `$x = 3` to the read-only variable $x a compile-time error. In fact, I hope this to such a degree that I would like it to be part of a

Re: Compile-time checking of assignment to read-only variables (Re: MMD distances)

2008-05-09 Thread Carl Mäsak
Pm (): In Rakudo's case, we just haven't implemented read-only traits on variables yet. Goodie. I guessed as much. But yes, I expect that it will be caught as a compile-time error. And do you agree it's reasonable to expect this of every compiler? // Carl

Re: Compile-time checking of assignment to read-only variables (Re: MMD distances)

2008-05-10 Thread Carl Mäsak
Patrick (), Carl (), Patrick (): But yes, I expect that it will be caught as a compile-time error. And do you agree it's reasonable to expect this of every compiler? Reasonable to expect it, yes -- but whether or not this rises to the level of being a requirement in the spec may be a

Re: Compile-time checking of assignment to read-only variables (Re:MMD distances)

2008-05-15 Thread Carl Mäsak
Me Here (), John (), Carl (), Patrick (): But yes, I expect that it will be caught as a compile-time error. And do you agree it's reasonable to expect this of every compiler? I think that is the point of declared types. But, something like no strong_type_check :rw in scope can

Re: Compile-time checking of assignment to read-only variables (Re:MMD distances)

2008-05-17 Thread Carl Mäsak
Me Here (), Carl (), Me Here (): What is the point of marking things readonly if you can turn it off? There are many possible reasons, I think. * The code that declares the variable readonly might not be available to you (compiled to bytecode, fetched by RCP etc), * or it might be

Re: Closure vs Hash Parsing

2008-08-07 Thread Carl Mäsak
an automatic parameter for a sub, like it would be in just a block (in the implementation, and if I understand correctly in the spec too). Out of curiosity, would this work? %ret = map - { $_ = uc $_; }, split , $text; Or this? %ret = map { $^foo = uc $^foo; }, split , $text; -- Carl Mäsak

Does tha capture object $/ retain a live tie to the string it matched?

2008-08-23 Thread Carl Mäsak
Yesterday I got bitten by the fact that currently in Rakudo, $/ doesn't copy content from the matched string, but instead trusts that it stays in the matched string and doesn't change. Is this the intended behaviour, or should $/ keep a copy the string contents? As the following examples show, Im

Deep equivalence test of data structures

2008-09-14 Thread Carl Mäsak
Recently, in November, we've had reason to clone the Rakudo Test.pm and add an implementation (viklund++) of is_deeply, for testing whether two arrays, pairs or hashes are deeply -- recursively -- equivalent. The method does what you'd think it does, checks the types of its parameters and recurses

Re: Recommended Perl 6 best practices?

2008-09-14 Thread Carl Mäsak
Conrad (): Is there something more up-to-date concerning Perl 6 best practices that are presently-recommended (by p6l or @Larry) than the following item on the Perl 6 wiki? If you ask me, best practices evolve as a countering force to enough people using less-than-ideal practices to create

Should $.foo attributes without is rw be writable from within the class

2008-09-17 Thread Carl Mäsak
Rakudo and I have a disagreement over this: I expect to be able to assign to a $.foo attribute in methods within the class, whereas Rakudo demands the is rw attribute in order to do that. We discussed it a bit on #perl6 today. http://irclog.perlgeek.de/perl6/2008-09-17#i_572836 I only have

Re: Should $.foo attributes without is rw be writable from within the class

2008-09-17 Thread Carl Mäsak
Jonathan (): Why not just assign to $!foo, which is always read/write (since the rw affects whether you get an accessor that is read/write or not - $!foo refers to the underlying storage location; at least, that's how I understand it and what I think Rakudo is implementing today). I have come

Re: Should $.foo attributes without is rw be writable from within the class

2008-09-18 Thread Carl Mäsak
I really like all the replies I got to this; thank you Moritz, Jonathan, TSa, Larry, John and Damian. From the feedback I received, I will now do the following: 1. Remove is rw from all attributes that aren't supposed to be writable from outside the class. 2. Start using $!foo consistently in

Re: Split with negative limits, and other weirdnesses

2008-09-28 Thread Carl Mäsak
Jason (): It makes sense to me to go with option 1; you get what you ask for. It also makes sense to make to not use magical implied numbers, such as negatives, to accomplish things that either ranges or whatever star can accomplish. Aye, agreement. There's a whole lot of consensus already...

Should a closure-in-a-string get the placeholder parameters from its surroundings?

2008-11-20 Thread Carl Mäsak
I expected this to DWIM today: $ perl6 -e 'my $cl = { $^name upcased becomes {$^name.uc} }; say $cl(larry)' ...but it doesn't in Rakudo r32938: too few arguments passed (0) - 1 params expected ...and for understandable (if not good) reasons: the closure inside the string expects a parameter

Re: Should a closure-in-a-string get the placeholder parameters from its surroundings?

2008-11-21 Thread Carl Mäsak
TSa (): I just want to make sure that I got the problem right. Would my $cl = { $^name upcased becomes {$^OUTER::name.uc} }; say $cl(larry) work? The idea is that the embedded closure refers to the strings $^name. And now the dwimmyness shall make that implicit, right? I guess that

Re: multi return values

2008-11-21 Thread Carl Mäsak
Ryan (), Moritz (), Andy (): (The thing that's still wrong with your code is that you need a whitespace after the 'my', otherwise my(...) should be parsed as a function call). Also this, I think: return($a, $b); ...except that that _is_ a function call. // Carl

Re: how to write literals of some Perl 6 types?

2008-12-01 Thread Carl Mäsak
Darren (): Bit Blob Set Bag Mapping How does one write anonymous value literals of those types? And I mean directly, not by writing a literal of some other type and using a conversion function to derive the above? Why is the latter method insufficient for your needs? // Carl

Re: how to write literals of some Perl 6 types?

2008-12-02 Thread Carl Mäsak
Darren Duncan (): Regarding Blob, that's not a collection type and its a fundamental type and it still needs special syntax; I did suggest one in my previous message. Frankly, I don't see why it should need special syntax. Blobs are, most of the time, not typed in through the keyboard (too

Re: how to write literals of some Perl 6 types?

2008-12-05 Thread Carl Mäsak
Paul (): I can't find anything in the existing synopses about Blobs. Probably looking in the wrong place, sorry. http://perlcabal.org/syn/S02.html#line_912 // Carl

Re: [perl #61126] return should apply to the lexically enclosing routine, map is no exception

2008-12-07 Thread Carl Mäsak
Daniel, in rakudobug ticket [perl #61126] (): The following two snippets of code are supposed to behave the same: sub bar($code) { $code() }; sub foo { bar { return 1 }; return 2; }; say foo; and sub foo { map { return 1 }, 1; return 2 }; say foo; both are supposed to return 1. For

Re: [perl #61126] return should apply to the lexically enclosing routine, map is no exception

2008-12-08 Thread Carl Mäsak
Daniel (), Carl (): The above reasoning raises the following question for me: how do I return from a sub or a method from within a map block? I suppose what you want can be achieved with last, it probably should work in map as well, since map and for are synonims... That is all good and well

Re: [perl #61126] return should apply to the lexically enclosing routine, map is no exception

2008-12-08 Thread Carl Mäsak
Daniel (), Carl (): That is all good and well for exiting the map itself; but what I want to achieve is to exit the surrounding sub or method block. Example: Er... I mean actually the opposite... it should always return from the surrounding sub or method, never only from map, if you want to

What does a Pair numify to?

2008-12-11 Thread Carl Mäsak
Pugs and Elf currently numify a Pair object to 2, and Rakudo currently dies of despair. My guess is that the semantics of Pugs and Elf falls out naturally form a pair being treated as a list of two elements, or something. The question still deserves to be raised whether always-2 is a good

Re: Better sort spec?

2008-12-13 Thread Carl Mäsak
Uri (): [...] well, it is sort (sic) of just like what damian posted almost 5 years ago. i found this post covers something very similar to the rakudo implementation. i can't seem to find this proposal in any of the synopses (at least a quick google search found nothing) so maybe it needs

Re: Better sort spec?

2008-12-13 Thread Carl Mäsak
Carl (): I have a couple of patches waiting to be written and integrated into S29. The addition of the new signature to sort is one of them. I expect a sudden inflow of round tuits early next week. Oh, and I now see that moritz++ went and simply added it. JFDI++. S29 needs a lot of care and

Re: Recommended Perl 6 best practices?

2008-12-20 Thread Carl Mäsak
Maybe this counts as a best practice, or maybe it's more of a pattern. In a recent piece of code, I found a way to exploit code blocks to act like return statements with side effects. The resulting code became very clean, so I decided to blog about the way it works.

The care and feeding of S29 (Re: Better sort spec?)

2008-12-27 Thread Carl Mäsak
Carl (): S29 needs a lot of care and feeding of this type. I've made a long list of things that need attention -- might return to this thread early next week and paste that list, so that more hands can help. Here is that list: http://use.perl.org/~masak/journal/38170 People can help by

Re: r24681 - docs/Perl6/Spec

2008-12-30 Thread Carl Mäsak
diff bot (): === --- docs/Perl6/Spec/S01-overview.pod2008-12-29 17:16:02 UTC (rev 24680) +++ docs/Perl6/Spec/S01-overview.pod2008-12-29 21:41:59 UTC (rev 24681) @@ -80,8 +80,8 @@ =item * RFCs are rated on PSA: whether

Re: use semantics

2009-01-04 Thread Carl Mäsak
Apologies if the point I'm about to make repeats what either Jeff or Daniel already said. I have two modules, A and B: $ cat A.pm use v6; use B; $ cat B.pm use v6; die Remember, remember, the fifth of November; Now, I can precompile the B module to PIR without a problem, but when I compile the

Str.warn?

2009-01-07 Thread Carl Mäsak
I'm about to add Cwarn to S29. Found this in S16: ] =item warn LIST ] ] =item Str.warn ] ] Prints a warning just like Perl 5, except that it is always sent to ] the object in $*DEFERR, which is just standard error ($*ERR). First off, shouldn't that be CObject.warn or something similar? I suppose

Re: Not a bug?

2009-01-12 Thread Carl Mäsak
Ovid (): $ perl6 -e 'my $foo = foo;say { ~ $foo ~ }' ~ foo ~ Easy solution: only use double quotes when you want to interpolate. :) This is not really an option when running 'perl6 -e' under bash, though. // Carl

Read access to class-scope variables from the class scope

2009-01-12 Thread Carl Mäsak
Writing something like this in Rakudo yesterday, I was slightly surprised to find it not working: class SomeClass { my $.warn_limit = 1000; my $.stern_warn_limit = $.warn_limit * 1.05; my $.expel_limit = $.warn_limit * 1.10; # ... } The specific error from Rakudo is Lexical

Re: [PATCH] Add .trim method

2009-01-12 Thread Carl Mäsak
Ovid (): =item trim our Str multi Str::trim ( Str $string ) Removes leading and trailing whitespace from a string. =cut I could optionally make the following work: $string.trim(:leading0); $string.trim(:trailing0); Setting leading or trailing to false (they default to true)

Re: [PATCH] Add .trim method

2009-01-12 Thread Carl Mäsak
Jonathan (), Ovid (), Larry (): Can't say I really like the negated options though. They smell funny. Agreed, but ltrim and rtrim will disappoint Israelis and dyslexics alike. Suggestions welcome as I can't think of anything better. The .Net framework calls 'em TrimStart and TrimEnd (and

Re: RFD: Built-in testing

2009-01-21 Thread Carl Mäsak
Moritz (): So Larry and Patrick developed the idea of creating an adverb on the test operator instead: $x == 1e5 :ok('the :ok makes this is a test'); I'm trying to explain to myself why I don't like this idea at all. I'm only partially successful. Other people seem to have no problem

Re: perl6 Testing

2009-01-23 Thread Carl Mäsak
fREW (), Moritz (), fREW (): And should I just mail patches to rakudo...@perl.org? In general if you find a bug: yes. In this case not, because it's a known limitation. Where do I mail the patches for the tests? The Pugs repository (containing the Perl 6 test suite) has a policy of

Re: r25102 - docs/Perl6/Spec

2009-01-30 Thread Carl Mäsak
Mark (), Moritz (), Larry via commit bot (): +PERL# Lexical symbols in the standard perlude Did you mean prelude instead? I took the quotation marks to indicate an intentional misspelling/coinage: perl + prelude = perlude. At which point one might ask oneself whether it is more

Re: r25172 - docs/Perl6/Spec

2009-02-04 Thread Carl Mäsak
Leon (): It seems S03 and S16 disagree on the meaning of $filename ~~ :e though. According to S16 it means $filename.:e, according to S03 it means $filename.e. I think it was discussed some time ago and S16 is correct. No, $filename.e is the newer one; S16 is out-of-date on that point. //

Re: References to parts of declared packages

2009-02-11 Thread Carl Mäsak
Jon (), Jonasthan (): If we declared, for example: role A::B {}; Then what should a reference to A be here? At the moment, Rakudo treats it as a post-declared listop, however I suspect we should be doing something a bit smarter? If so, what should the answer to ~A.WHAT be? I'd go with one

Re: Spec reorganisation

2009-02-18 Thread Carl Mäsak
Timothy (), Moritz (): Speaking of Tree, let me quote from IRC: 09:23 masak it's a bit unfortunate that the identifier 'Tree' is now squatted by an internal class in Perl 6, which is not general enough to reprenest an arbitrary tree data structure. I fully agree

Re: min= (from Rakudo Built-ins Can Now Be Written In Perl 6)

2009-02-23 Thread Carl Mäsak
David (), Jonathan on Rakudo.org (): Applied a patch from bacek++ to get min= and max= working ($foo min= 100 will assign 100 to $foo if it's smaller than what is in $foo). Nice -- except I first read that backwards, i.e. even though it follows straight from the definition of [op]=, it made

$!foo mapped to $foo, say what?

2009-02-24 Thread Carl Mäsak
I read this line in S02, and was distraught: $!foo object attribute private storage (mapped to $foo though) I read this as meaning when you declare $!foo, you will then also be able to refer to it as $foo. Jonathan Worthington pointed out on #perl6 that S12 says the exact opposite:

Re: r25821 - docs/Perl6/Spec

2009-03-19 Thread Carl Mäsak
Jonathan (): O AKSHUALY...that's quite easy to do, since we just calls .WHAT on the value to get its proto-object and stick it in the sig. So perhaps best is just to re-define: multi sub fib (LITERAL) { ... } As meaning multi sub fib (LITERAL.WHAT $ where LITERAL) { ... } I like this.

Re: Logo considerations

2009-03-24 Thread Carl Mäsak
Richard (): There seem to be a lot of animals attached to software things, such as a camel, but also a penguin and a parrot. So how about choosing another animal for perl6? For some reason, when I think of Rakudo Perl 6, I imagine something quite close to Futurama's Nibbler.

Metacharacters in character classes

2009-03-26 Thread Carl Mäsak
It started by yours truly asking impertinent questions on #perl6... http://irclog.perlgeek.de/perl6/2009-03-26#i_1018345 ...and ended with a general feeling that the way metacharacters and backwhacking work in [ ] character classes, is at worst inconsistent and at best underspecified by S05.

Re: simultaneous conditions in junctions

2009-04-01 Thread Carl Mäsak
Richard (): Consider $x = any (1,2,5,6) How do we compose a conditional that asks if any of this set of eigenstates are simultaneously both 2 and 5? Clearly the desired answer for $x is False, but my $x = any(1,2,5,6); say ?( 2 $x 5); # true Is there some combination of any/all that

Re: Multi-Dimensional arrays

2009-04-04 Thread Carl Mäsak
Peter (): Am I right that multi-dimensional arrays do not yet work fully in Rakudo? Yes, you are. That is to say, you can't do this yet: my @a[4;2]; # Valid indices are 0..3 ; 0..1 There's nothing stopping you from creating an array of arrays, though. // Carl

Fwd: Multi-Dimensional arrays

2009-04-05 Thread Carl Mäsak
-- Forwarded message -- From: Carl Mäsak cma...@gmail.com Date: Sun, Apr 5, 2009 at 9:30 AM Subject: Re: Multi-Dimensional arrays To: Peter Schwenn pe...@schwenn.com Peter (): I've had inconsistent/incorrect results, once having created an array of array of arrays, both while

Re: Meditations on a Loop

2009-05-21 Thread Carl Mäsak
Timothy (), John (): If you would be so kind, please take a look at http://www.dlugosz.com/Perl6/web/med-loop.html.  I spent a couple days on this, and besides needing it checked for correctness, found a few issues as well as more food for thought.        John, I very much enjoyed your

Re: What is U4X?

2009-05-21 Thread Carl Mäsak
Leon (), John (): Can someone post a link? http://svn.pugscode.org/pugs/docs/u4x/README It might also be informative to refer to the blog post that precipitated the project: Pretending that Envy is one of the Perl virtues http://use.perl.org/~masak/journal/38279 The second section of the

Re: Meditations on a Loop

2009-05-21 Thread Carl Mäsak
John (): What is Userdocs for Christmas?  Someone have a link? So, Userdocs for Christmas, also known as U4X, is an effort to create both comprehensive, consistent user documentation, and the means to access this documentation efficiently and easily. You asked about U4X the other day, which

Re: Idea: Literate programing

2009-05-25 Thread Carl Mäsak
Daniel (): [...] In this way, a relatively simple change makes Perl 6 Pod able to do literate programing for anyone who is interested. What do you think? That it sounds like a good idea for a sublanguage-extending module. // Carl

Re: How to write this properly in Perl 6?

2009-05-27 Thread Carl Mäsak
Cosimo (): the Amazing Perl 6 thread was amazing. It reminded me how Perl 6 looks interesting and fun. So... how can I write properly, for some meaning of properly, the Perl 6 equivalent of this:  http://search.cpan.org/dist/Games-BonDigi/ ? Not sure if I grokked the whole set of rules,

Re: How to write this properly in Perl 6?

2009-05-28 Thread Carl Mäsak
Mark (): but I think an idiomatic Perl 6 solution would have a proper lazy Iterator.  How do we write one of those? Like this, I think: $ perl6 -e '.say for gather { my $n = 1; loop { take bon digi bon digi; take bon for ^$n; take digi for ^$n; ++$n } }' That currently parses in Rakudo, but

Re: renaming or adding some operators

2009-05-30 Thread Carl Mäsak
Darren (): Firstly, regarding the string replication ops as documented in Synopsis 3, 'x' and 'xx', I'm wondering whether it might be better to have something that incorporates a '~', since that operation is about catenation. Would perhaps '~*' work better than 'x' to signify better what the

Embedded comments: two proposed solutions to the comment-whole-lines problem

2009-08-10 Thread Carl Mäsak
In my post Three things in Perl 6 that aren't so great [0], I outline three things about Perl 6 that bug me at present. Commenter daxim made what seems to me a sensible proposal [1] for solving the third problem, Comments in the beginning of lines: daxim (]): ] Let single # be used for commenting

Re: Rukudo-Star = Rakudo-lite?

2009-08-11 Thread Carl Mäsak
raiph (), Larry (): Rakudo Zengi would be the most (in)appropriate, I think. Why do I get the sense that some in the community are suffering siege mentality? ;) I had thought of things like Zen, Zero, Catalyst, etc. But I love * | Star | Whatever. I love:  o  The word Star, regardless of

Re: Filename literals

2009-08-18 Thread Carl Mäsak
Leon (): Reading this discussion, I'm getting the feeling that filename literals are increasingly getting magical, something that I don't think is a good development. The only sane way to deal with filenames is treating them as opaque binary strings, making any more assumptions is bound to

Re: r28208 - docs/Perl6/Spec/S32-setting-library

2009-09-09 Thread Carl Mäsak
Darren (), commit-bot (): -=head2 Time +=head1 Current Time  +The epoch used in Perl 6 to represent time instants is the +International Atomic Time - TAI - which is independent of calendars, +timezones as well as leap seconds. Of course Perl can't go beyond the +machine to get a real TAI

Re: Looking for help updating Perl 6 and Parrot part of Perl Myths talk

2009-09-14 Thread Carl Mäsak
Tim (): I'd be grateful for feedback on any of the slides, but I'm especially interested in updates for:    page 73 - Perl 6 implementations                I've added Mildew, with links, to the SMOP line                anything I should add / change / remove?                What's the

Re: Looking for help updating Perl 6 and Parrot part of Perl Myths talk

2009-09-15 Thread Carl Mäsak
Tim (), Carl (), Tim (): I'd be grateful for feedback on any of the slides, but I'm especially interested in updates for:    page 73 - Perl 6 implementations                I've added Mildew, with links, to the SMOP line                anything I should add / change / remove?        

Re: Looking for help updating Perl 6 and Parrot part of Perl Myths talk

2009-09-16 Thread Carl Mäsak
Tim (), Raphael (): Some XML related stuff: XML parser: http://github.com/fperrad/xml/ Tree manipulation: http://github.com/wayland/Tree/tree/master Thanks. Any reason they're not known to proto? The latter I wasn't really aware of. It's now added to the list, and wayland has been given

Re: How can i contribute for perl 6 ?

2009-09-17 Thread Carl Mäsak
Timothy ():        I'd actually be in favour of Masak's post being copied to the site (with attribution) and expanded, rather than just linked, if Carl is happy with the idea. [...] I'd be honoured. In general, consider anything I write on use.perl to be cc-attr-licenced.

Web.pm (Re: Cobra Ioke Programming Languages)

2009-09-18 Thread Carl Mäsak
Juan (): I'll take a look at web.pm and see  I can get involved. You're very welcome to help. We definitely need more contributors, and I'm currently thinking about ways to delegate work. Grab me on #perl6, or by email. There's also sporadic discussion of Web.pm going on at #november-wiki.

Re: [perl #69194] rakudo 2009-08 and when with lists

2009-09-19 Thread Carl Mäsak
David (), Moritz (), Aaron (): 2,3 constructs a list. 2..3 also constructs a list, unless it's in a given/when condition in which case it's just a range. No. 2..3 is always a range. It's just list context that turns it into a list. That seems confusing. It sounds like the split

Re: r28768 - docs/Perl6/Spec

2009-10-11 Thread Carl Mäsak
commitbot, channeling Carlin ():  =item die + multi die (@LIST) + +Prints each element to $*ERR (STDERR) and throws an exception. Well, no. If that were true, die calls within (the dynamic scope of) a try block would also print things, which they don't. It's the thing that catches the

Re: How does List.map: { .say } work?

2009-11-02 Thread Carl Mäsak
Solomon (), Moritz (): the current spec doesn't allow immutable containers to call .map with a block that implicitly uses $_ as an implicit parameter. Here's why: S06 says The C$_ variable functions as a placeholder in a block without any other placeholders or signature.  Any bare block

Re: How does List.map: { .say } work?

2009-11-03 Thread Carl Mäsak
Moritz (), Solomon (), Moritz (): the current spec doesn't allow immutable containers to call .map with a block that implicitly uses $_ as an implicit parameter. Here's why: S06 says The C$_ variable functions as a placeholder in a block without any other placeholders or

Re: error installing Perl6

2009-11-12 Thread Carl Mäsak
Matthew (), Richard (): On Thu, Nov 12, 2009 at 2:30 PM, Richard Hainsworth rich...@rusrating.ru wrote: Can't exec svn: No such file or directory at build/gen_parrot.pl line 47. You need to install Subversion in order to allow the build script to obtain Parrot. That said, perhaps one could

Rakudo Perl 6 development release #23 (Lisbon)

2009-11-19 Thread Carl Mäsak
Announce: Rakudo Perl 6 development release #23 (Lisbon) On behalf of the Rakudo development team, I'm pleased to announce the November 2009 development release of Rakudo Perl #23 Lisbon. Rakudo is an implementation of Perl 6 on the Parrot Virtual Machine (see http://www.parrot.org). The tarball

Re: r29344 - docs/Perl6/Spec/S32-setting-library

2009-12-17 Thread Carl Mäsak
Larry , through S-ro commitbot: +Since a CKeyHash, unlike a CBag, is mutable, C.pick works +directly on the CKeyHash, modifying it in place.  You must copy +the CKeyHash first if you don't want it modified in place. This violates Least Surprise for me. An Array is also mutable, but it doesn't

Re: infinity literals - 'Inf' vs '+Inf'

2009-12-22 Thread Carl Mäsak
Darren (): I was studying the synopsis today for how Perl 6 uses infinities, and among the 48 occurrences of [|-|+]Inf in the synopsis, I noticed that in some places you seemed to use +Inf to mean positive infinity and other places you just say Inf. So are there just 2 canonical infinity

Re: Interactive Perl 6 shell

2009-12-29 Thread Carl Mäsak
Jason (), Juan (): Does Perl6/Rakudo have an interactive perl shell like ruby does with irb? http://en.wikipedia.org/wiki/Interactive_Ruby_Shell Would be great for trying out the new syntax quickly. My phone accidentally sent an empty reply to this. What I was supposed to reply with was

Re: Debugging Grammars

2009-12-29 Thread Carl Mäsak
Ovid (): As a follow-up to this, I have my code posted at http://blogs.perl.org/users/ovid/2009/12/configini-in-perl-6.html While my admittedly clumsy grammar matches, transforming it into an AST has failed miserably. Aside from the advent calendar or the online docs at

Re: Debugging Grammars

2009-12-29 Thread Carl Mäsak
Carl (), Ovid (): As a follow-up to this, I have my code posted at http://blogs.perl.org/users/ovid/2009/12/configini-in-perl-6.html While my admittedly clumsy grammar matches, transforming it into an AST has failed miserably. Aside from the advent calendar or the online docs at

Is it 'anon role' but not 'anon enum'? (Re: r29250 - in docs/Perl6/Spec: . S32-setting-library)

2010-01-08 Thread Carl Mäsak
pugscommitbot, channeling Larry (): [...] +    $x = Today but Tue;       # $x.Day is read-only +    $x = Today but Day;       # $x.Day is read-write + +Mixing in a specific enum object implies only the readonly accessor. +     $x = Today but Tue; -really means something more like:

Re: r29558 - docs/Perl6/Spec/S32-setting-library t/spec/S32-array t/spec/S32-list

2010-01-20 Thread Carl Mäsak
Moritz (), commitbot channeling ash (): +=item new + + our List multi method new(*...@args) + +Constructs a CList containing the arguments passed to the Cnew method. Since the argument list is already a List (or very nearly), I don't see much sense in this constructor. I respectfully beg

Are there assignment forms of the indexing postcircumfix operators?

2010-01-27 Thread Carl Mäsak
I was going to submit this as a Rakudo bug report, but I'm not sure it's (a natural consequence of) spec, so I'll ask here on p6l instead. I already know I can do all of the following: $a[42]; $a.postcircumfix:[ ](42); $a = $a.postcircumfix:[ ](42); $a.=postcircumfix:[ ](42); But can I do

  1   2   >