pop'ping from an emty Array

2008-12-26 Thread Moritz Lenz
Both pugs and rakudo agree on this one: 21:44 @moritz_ perl6: my (@a, @b); @a.push(@b.pop); say @a.elems 21:44 p6eval ..pugs, rakudo 34399: OUTPUT«1␤» pop'ping from an empty array returns an undef, which is then pushed onto @a. Wouldn't it be nice of @empty_list.pop (or .unshift) would return

Re: returning one or several values from a routine

2009-01-05 Thread Moritz Lenz
Daniel Ruoso wrote: Hi, As smop and mildew now support ControlExceptionReturn (see v6/mildew/t/return_function.t), an important question raised: sub plural { return 1,2 } sub singular { return 1 } my @a = plural(); my $b = plural(); my @c = singular(); my $d = singular();

Re: [PATCH] Add .trim method

2009-01-12 Thread Moritz Lenz
Carl Mäsak wrote: 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

Re: Trimming arrays

2009-01-13 Thread Moritz Lenz
Ovid wrote: What should this output? my @array = ' foo ', ' bar '; @array .= trim; say @array.perl; And what if I have an array of hashes of hashes of arrays? Currently you can call 'trim' on arrays, but it's a no-op. Similar issues with chomp and friends. I think

Re: How do I help?

2009-01-20 Thread Moritz Lenz
fREW Schmidt wrote: I just recently read Ovid's post on use Perl about how we can help by fixing PUGS tests. I was a little clear on what he meant and I am a little anxious to do something. I checked out the code for parrot already and I am getting the pugs code while I write this. Anyone

RFD: Built-in testing

2009-01-20 Thread Moritz Lenz
A few months ago Larry proposed to add some testing facilites to the language itself, because we want to culturally encourage testing, and because the test suite defines the language, so we need to specify the behaviour of our testing facilities anyway. We also discussed some possible changes to

Re: RFD: Built-in testing

2009-01-22 Thread Moritz Lenz
Ovid wrote: Regarding the disadvantages: However nothing in life is free, we pay for it with a few disadvantages: * We nearly double the number of built-in operators by adding an :ok multi Yes, but conceptually this will be transparent to the end user, right? They'll just know that

Re: RFD: Built-in testing

2009-01-22 Thread Moritz Lenz
There are a few interesting points on which I'd like to comment Richard Hainsworth wrote: In other words, test functionality sufficient for the compiler may not be adequate for module testing. But other functions can be developed in Test modules that can be hooked into a general testing

Re: RFD: Built-in testing

2009-01-22 Thread Moritz Lenz
Ovid wrote: One concern is where Larry asks: I wonder how often we'd have people making the error of trying to interpoalte into :okbad $x pardner I'd be one of them. The following is a very common idiom: for my $method (@methods) { can_ok $object, $method;

Re: perl6 Testing

2009-01-22 Thread Moritz Lenz
fREW Schmidt wrote: I'd like to get started adding these: is capitalize(:string($a)), Pugs Is Cool!, capitalize works with named arg rakudo and pugs both fail this test. Should I add it anyway? Yes. We have a mechanism for skipping tests that the implementations fail. Just write it like

Passing Array objects to subs - what happens?

2009-01-25 Thread Moritz Lenz
pugs, rakudo and elf all agree that [1..4].elems should be 4 - and I agree too. What about sub f(@a) { @a.elems }; say f([1, 2, 3, 4]) Again all three implementations say that it's 4, and I'm confused. Now for say elems [1, 2, 3, 4] pugs says 4, rakudo says 1, and elf says Undefined subroutine

Re: r25102 - docs/Perl6/Spec

2009-01-28 Thread Moritz Lenz
pugs-comm...@feather.perl6.nl wrote: +PERL# Lexical symbols in the standard perlude Did you mean prelude instead? Moritz

Re: Spec reorganisation

2009-02-18 Thread Moritz Lenz
implementation that can later be shared among compilers. Perl 6 is full of stuff that's specced but not implemented, and I'd like to see that gap closed as much as possible. Cheers, Moritz -- Moritz Lenz http://perlgeek.de/ | http://perl-6.de/ | http://sudokugarden.de/

Re: Detecting side-effects in Perl 6 (Was: Re: infectious traits and pure functions)

2009-02-18 Thread Moritz Lenz
these forms strike me as odd because the where clause should return a boolean and thus has to be written 'where { $_ == 2}'. A where clause without a block does a smartmatch, so $i where 2 is the same as $i where { $i ~~ 2 }. Cheers, Moritz -- Moritz Lenz http://perlgeek.de/ | http://perl-6.de

Re: r25402 - in docs/Perl6/Spec: . S32-setting-library

2009-02-19 Thread Moritz Lenz
- any objections? Cheers, Moritz -- Moritz Lenz http://perlgeek.de/ | http://perl-6.de/ | http://sudokugarden.de/

Re: Two questions; one about adding roles to classes, the other about trees.

2009-02-23 Thread Moritz Lenz
Timothy S. Nelson wrote: On Mon, 23 Feb 2009, Moritz Lenz wrote: Timothy S. Nelson wrote: Another question for everyone - is there some way I can extend a class in such a way that it implements another role? class A does B does C { ... } where B and C are roles. For example, say I

Re: Sigils in Classes after initial has

2009-02-23 Thread Moritz Lenz
a private attribute @!items is declared, with a lexical alias @items (without any twigil). This could become a FAQ entry... Moritz -- Moritz Lenz http://perlgeek.de/ | http://perl-6.de/ | http://sudokugarden.de/

Re: Two questions; one about adding roles to classes, the other about trees.

2009-02-23 Thread Moritz Lenz
. Or is your question much more complicated than that, and I am simply to dumb to grasp it? Cheers, Moritz -- Moritz Lenz http://perlgeek.de/ | http://perl-6.de/ | http://sudokugarden.de/

Re: Masak's S29 list

2009-03-01 Thread Moritz Lenz
functions, and need to be specced as such. Ah, that answers my previous question already ;-) # .match, .subst and .trans from S05. Now in S32/Str.pod. But I wasn't sure what subst() returns. The modified string. (It doesn't do in-place substitution by default). Cheers, Moritz -- Moritz

Re: Google's Summer of Code 2009

2009-03-02 Thread Moritz Lenz
for a student. 3) documentation Also feel free to discuss these topics on IRC with us. Cheers, Moritz -- Moritz Lenz http://perlgeek.de/ | http://perl-6.de/ | http://sudokugarden.de/

Re: Meta- and Hyperoperators and Anonymous Subroutines

2009-03-02 Thread Moritz Lenz
-- Moritz Lenz http://perlgeek.de/ | http://perl-6.de/ | http://sudokugarden.de/

.map/.reduce with larger arity

2009-03-08 Thread Moritz Lenz
Currently the spec says: Cmap returns a lazily evaluated list which is comprised of the return value of the expression, evaluated once for every one of the C@values that are passed in. But both pugs and rakudo respect the arity of the code ref passed to it, so that (1..6).map({$^a + $^b +

Re: Any kv() question

2009-03-12 Thread Moritz Lenz
Hi, Cory Spencer wrote: In the spectest suite (specifically in: t/spec/S32-array/kv.t), the last several tests seem to be testing for named arguments to kv: # check the non-invocant form with named arguments my @array = a b c d; my @kv = kv(:array(@array)); #?rakudo

Re: r25821 - docs/Perl6/Spec

2009-03-18 Thread Moritz Lenz
pugs-comm...@feather.perl6.nl wrote: Author: masak Date: 2009-03-14 13:34:42 +0100 (Sat, 14 Mar 2009) New Revision: 25821 Modified: docs/Perl6/Spec/S12-objects.pod Log: specced syntactic 'where' sugar in param lists Modified: docs/Perl6/Spec/S12-objects.pod

Re: r25902 - docs/Perl6/Spec

2009-03-23 Thread Moritz Lenz
pugs-comm...@feather.perl6.nl wrote: Author: lwall Date: 2009-03-19 01:43:53 +0100 (Thu, 19 Mar 2009) New Revision: 25902 Modified: docs/Perl6/Spec/S05-regex.pod Log: [S05] define .caps and .chunks methods on match objects Modified: docs/Perl6/Spec/S05-regex.pod

Re: decision operator

2009-03-24 Thread Moritz Lenz
Ruud H.G. van Tol wrote: I wonder if there is place for a decision operator. (search terms: FPGA, evolvable hardware, Xilinx, PLB, LUT, NESW) dop:| 0 1 2 3 4 5 6 7 8 9 A B C D E F + 0 0 | 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 1 | 0 0 0 0 1 1 1 1 0 0 0 0 1

Re: decision operator

2009-03-24 Thread Moritz Lenz
Moritz Lenz wrote: Ruud H.G. van Tol wrote: I wonder if there is place for a decision operator. (search terms: FPGA, evolvable hardware, Xilinx, PLB, LUT, NESW) dop:| 0 1 2 3 4 5 6 7 8 9 A B C D E F + 0 0 | 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 1 | 0 0 0

Re: .map/.reduce with larger arity

2009-03-25 Thread Moritz Lenz
Leon Timmermans wrote: I would propose there to be one difference between for an map: map should bind its arguments read-only, for should bind them read-write. That would make at least one bad practice an error. That sounds very impractical, because the ro/rw distinction is part of the

Re: .map/.reduce with larger arity

2009-03-25 Thread Moritz Lenz
Leon Timmermans wrote: I would propose there to be one difference between for an map: map should bind its arguments read-only, for should bind them read-write. That would make at least one bad practice an error. That sounds very impractical, because the ro/rw distinction is part of the

Re: On Sets (Was: Re: On Junctions)

2009-03-27 Thread Moritz Lenz
. The answer is that an any() junction represents just what it says - a conjunction of *any* values, not some of the any values. The example would perfectly work if there was nothing to filter out. You'd need 'some-of-any' junction here, which we don't support. Cheers, Moritz -- Moritz Lenz http

Re: [perl #62528] Match.keys method returns nothing.

2009-03-29 Thread Moritz Lenz
Since afaict this is not specced, I'll hand that over to p6l. Eric Hodges (via RT) wrote: use v6; rule test {test}; test ~~ /test/; say '$/.keys = ', $/.keys.perl; say '%($/).keys = ', %($/).keys.perl; # outputs # $/.keys = [] # %($/).keys = [test] Same could be said for .values

Re: On Junctions

2009-03-29 Thread Moritz Lenz
Jon Lang wrote: I stand corrected. That said: with the eigenstates method now private, it is now quite difficult to get a list of the eigenstates of the above expression. I thought about that a bit, and I think eigenstates are not hard to extract (which somehow makes the privateness of

Re: Getting rid of want()

2009-03-31 Thread Moritz Lenz
Brandon S. Allbery KF8NH wrote: On 2009 Mar 31, at 17:04, Moritz Lenz wrote: We had a discussion on #perl6 tonight about how to implement want(), and basically came to no conclusion. Then I came up with the idea that any lazy implementor will come up with: drop it from the language. Hm

Re: S08 Draft questions (Captures and Signatures)

2009-04-01 Thread Moritz Lenz
I can't comment on most of your questions, but the few that I can answer are inline below... Jon Lang wrote: Yes, I know that there is no S08. I'm working on writing one, ++ * What types are you allowed to assign to an invocant? Whatever the type constraint says. When you write class Foo

Re: some questions about S02(type)

2009-04-03 Thread Moritz Lenz
Xiao Yafeng wrote: 1. Could I set multi-return type?like sub test as (Int, Str) {...} as is coercion - so to what would it coerce? Int or Str? How could the compiler know? Or do you mean something like a tuple? 2. set is unordered collection of values, subset is new

Re: some questions about S02(type)

2009-04-03 Thread Moritz Lenz
Moritz Lenz wrote: 2. set is unordered collection of values, subset is new type. People are apt to confuse the two concepts. Note that people never write subset in their code, the write things like sub f($x where { ... } ) and the where constructs the subset type. I don' think that's

Re: %ARGH

2009-04-20 Thread Moritz Lenz
Hi, Timothy S. Nelson wrote: Hi all. Can we change %*OPTS to %*ARGH ? You can, in any program you like (at least very nearly): sub MAIN(*...@arga, *%ARGH) { ... } Cheers, Moritz

Call for review: traits, lift

2009-05-03 Thread Moritz Lenz
Hi, I've written a few tests for two things that I feel I don't really understand, traits and the `lift' statement prefix. You can find them in t/spec/S14-traits/basic.t t/spec/S04-statements/lift.t I'd appreciate it if you could take a look at them and tell me if they conform to what the spec

Re: Call for review: traits, lift

2009-05-03 Thread Moritz Lenz
Moritz Lenz wrote: sub f (lift $a + $b); I mean 'sub f() { lift $a + $b }', sorry.

Re: r26700 - docs/Perl6/Spec

2009-05-06 Thread Moritz Lenz
Jon Lang wrote: @@ -1836,6 +1836,12 @@ prototype objects, in which case stringification is not likely to produce something of interest to non-gurus.) +The C.^parents method by default returns a flattened list of all +parents sorted in MRO (dispatch) order. Other options are: + +

each() comprehension

2009-05-17 Thread Moritz Lenz
Hi, (sorry for yet another p6l email mentioning junctions; if they annoy you just ignore this mail :-) while reviewing some tests I found the each() comprehension in S02 that evaded my attention so far. Do we really want to keep such a rather obscure syntactic transformation? I find an explicit

is value trait

2009-05-17 Thread Moritz Lenz
Hi, t/oo/value_types.t mentions the is value trait, which doesn't appear in the spec anywhere. According to the discussion in [1] there was speculation about 'is cow' and 'is value', but the former didn't seem to enter the spec either. So what should I do about that test? Simply delete it?

Signature for the series operator

2009-06-25 Thread Moritz Lenz
Hi, I had the pleasure to implement the series operator (infix:...) in Rakudo(*), and came across the difficulty to come up with a signature for it. These are the use cases I want to cover: 1, 2 ... { $^a + $^b } 1 ... { $_ + 1 } The first one can clearly be written as sub infix:...(@values,

Re: [pugs-commits] r27404 - t/syntax

2009-07-05 Thread Moritz Lenz
pugs-comm...@feather.perl6.nl wrote: Author: kyle Date: 2009-07-04 19:26:48 +0200 (Sat, 04 Jul 2009) New Revision: 27404 Modified: t/syntax/hyper_latin1.t Log: [t] Further mutated t/syntax/hyper_latin1.t Modified: t/syntax/hyper_latin1.t

smart match questions/inconsistencies

2009-07-06 Thread Moritz Lenz
Hi, while writing some tests for the smartmatch operator, I noticed this item: Any * block signature match block successfully binds to |$_ which block is this talking about? the current ?BLOCK? Somehow this doesn't make much sense to me. I also noticed that the slice

Re-thinking file test operations

2009-07-09 Thread Moritz Lenz
Hi, Somehow the current file test syntax, 'filename' ~~ :e, looks like a not well-though-out translation of Perl 5's syntax, -e 'filename'. Apart from totally feeling wrong to me, there are a few points I can put my finger on: 1) $file ~~ :s returns a number, although smartmatching usually

.match and .subst set outer $/?

2009-07-12 Thread Moritz Lenz
payload++ brought this up on #perl6: in current Rakudo, $string ~~ /re/ sets $/ in the scope in which the expression appears, ie 'a' ~~ /./; say $/; # ouput: a But $str.match(..) and $str.subst don't. The spec is rather silent, it says There are also method forms of m// and s///: [...]

Parameter binding

2009-07-22 Thread Moritz Lenz
Hi, I came to this 12:51 @moritz_ rakudo: my $x = 3; say $x, ' ', ++$x; 12:51 p6eval rakudo 7b81c0: OUTPUT«4 4␤» 12:51 @moritz_ rakudo: my $x = 3; say $x, ' ', $x++; 12:51 p6eval rakudo 7b81c0: OUTPUT«4 3␤» This looks very counter intuitive, because it looks like the arguments are evaluated

Announce: Rakudo Perl 6 development release #19 (Chicago)

2009-07-23 Thread Moritz Lenz
On behalf of the Rakudo development team, I'm pleased to announce the July 2009 development release of Rakudo Perl #19 Chicago. Rakudo is an implementation of Perl 6 on the Parrot Virtual Machine [1]. The tarball for the July 2009 release is available from http://github.com/rakudo/rakudo/downloads

Re: indentation with multiple languages

2009-07-25 Thread Moritz Lenz
Richard Hainsworth wrote: One of Masak's irritations with perl6 (http://use.perl.org/~masak/journal/39334) concerns interspacing POD and code. I ran into an analogous problem with a project I am trying to do with perl6. Since perl6 doesnt yet link to the gd library, and I need

Re: indentation with multiple languages

2009-07-25 Thread Moritz Lenz
Mark J. Reed wrote: On Sat, Jul 25, 2009 at 5:03 AM, Moritz Lenzmor...@faui2k3.org wrote: Presumably you want here-docs, which can be indented in Perl 6: perl 6 code perl 6 code $script.say(Q:toEND); output code output code END The leading whitespace

Re: Clarification of S04 closure traits

2009-07-26 Thread Moritz Lenz
Ben Morrow wrote: I'm iworking on a patch for Perl 5 that implements the Perl 6 closure traits (ENTER/LEAVE/...) as special blocks. There are several details that aren't clear to me from either S04 or the spec tests; I apologize if these have been discussed before, as I haven't been following

Re: Clarification of S04 closure traits

2009-07-27 Thread Moritz Lenz
Ben Morrow wrote: Moritz Lenz wrote: Ben Morrow wrote: - Presumably when an exception is thrown through a block, the LEAVE and POST queues are called (in that order). POST was inspired from the Design By Contract department, and are meant to execute assertions on the result. If you

confusing list assignment tests

2009-07-28 Thread Moritz Lenz
I'm in the mood to question my sanity, so I'm seeking feedback for some test mangling: In t/spec/S03-operators/assign.t there are some tests that cause me a headache. I'm trying to re-write them to not use the now-gone want() function, but I'd have to understand them first ;-) A good example is

Re: confusing list assignment tests

2009-07-28 Thread Moritz Lenz
Thanks for the quick reply. Larry Wall wrote: On Tue, Jul 28, 2009 at 09:24:40PM +0200, Moritz Lenz wrote: : sub W () { substr(eval('want'), 0, 1) } : ... : : # line 560: : { : my @a; : my @z = (@a[0] = W, W); : #?rakudo 2 todo 'want function' : is(@a, 'L','lhs

Re: confusing list assignment tests

2009-07-28 Thread Moritz Lenz
Jon Lang wrote: Larry Wall wrote: Moritz Lenz wrote: : Either it's parsed as '@a[0] = (W, W)' (list assignment), then @a should : get both elements, and so should @z. Not according to S03, at least by one reading. @a[0] as a scalar container only wants one item, so it only takes the first

Re: Testing Perl 6 analog to Perl 5's tie.

2009-08-02 Thread Moritz Lenz
Let's pick up this old mail before it gets completely warnocked ;-) For the record, this discussion only applies to scalar implementation types. For example for Arrays I expect things to work by overriding the method postcircumfix:[ ]. Also I'm far from being an expert on this field, so feel

Re: r27888 - docs/Perl6/Spec

2009-08-07 Thread Moritz Lenz
pugs-comm...@feather.perl6.nl wrote: Author: jimmy Date: 2009-08-07 05:02:42 +0200 (Fri, 07 Aug 2009) New Revision: 27888 Modified: docs/Perl6/Spec/S01-overview.pod docs/Perl6/Spec/S02-bits.pod docs/Perl6/Spec/S03-operators.pod docs/Perl6/Spec/S04-control.pod

Does a string remember all Unicode levels?

2009-08-08 Thread Moritz Lenz
t/spec/S02-builtin_data_types/unicode.t has tests like this: # LATIN CAPITAL LETTER A, COMBINING GRAVE ACCENT my Str $u = \x[0041,0300]; is $u.bytes, 3, 'combining À is three bytes as utf8'; is $u.codes, 2, 'combining À is two codes'; is $u.graphs, 1, 'combining À is one graph'; Which seems to

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

2009-08-11 Thread Moritz Lenz
Ben Morrow wrote: Quoth markjr...@gmail.com (Mark J. Reed): I still like the double-bracket idea. I don't much mind the extra character; 5 characters total still beats the 7 of HTML/XML. I much prefer double-bracket to double-#: double-# gets caught out when you do s/^/# on code which

Re: S26 - The Next Generation

2009-08-17 Thread Moritz Lenz
Damian Conway wrote: It's not yet committed, as there will (no doubt) be much discussion first. I apologize in advance: I am still travelling on my annual world tour, so my ability to participate in this discussion will be limited and erratic. In the spirit of ask for forgiveness rather than

Re: S26 - The Next Generation

2009-08-17 Thread Moritz Lenz
raiph mellor wrote: However it seems we have to pay a price: each act of rendering a Pod file actually means executing the program that's being documented (at least the BEGIN blocks and other stuff that happens at compile time), with all the security risks implied. So we'll need a *very* good

Re: Custom object constructors

2009-08-20 Thread Moritz Lenz
Kevan Benson wrote: Should there not be a way to define object constructors with custom signatures that can be usefully invoked like a normal constructor? Currently, defining a BUILD method for a class with a specific signature doesn't seem to allow for the object to be invoked by new with

Re: versioning same-auth forks/branches

2009-08-26 Thread Moritz Lenz
Darren Duncan wrote: In regards to http://perlcabal.org/syn/S11.html#Versioning I have recently considered that it may be deficient in addressing a possibly-common situation, and I'm looking for input on how to handle that situation, either for a best practice that works within the

Re: Custom object constructors

2009-08-27 Thread Moritz Lenz
Kevan Benson wrote: That said, I submit that it's a very confusing part of the language as defined currently, and I haven't seen a very thorough explanation of the purpose of each method in the chain the instantiates a new object. S12 touches upon them slightly, but not in enough detail

Re: r28196 - docs/Perl6/Spec

2009-09-07 Thread Moritz Lenz
yary wrote: [ a lot of good things that make lot of sense ] Your complaints and review by TimToady and pmichaud on #perl6 convinced me that this is not a good idea after all, see http://irclog.perlgeek.de/perl6/2009-09-07#i_1475421 Cheers, Moritz

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

2009-09-14 Thread Moritz Lenz
On Mon, Sep 14, 2009 at 12:15:05PM +0100, Tim Bunce wrote: page 73 - Perl 6 implementations I've added Mildew, with links, to the SMOP line anything I should add / change / remove? What's the status of KindaPerl6? I think it's stalled or

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

2009-09-14 Thread Moritz Lenz
Carl Mäsak wrote: Tim (): Anything else I should add, change or remove? I'm especially interested in verifyable metrics showing effort, progress, or use. Ideally graphical. Any interesting nuggets that fit with the theme will be most welcome. Moritz++ and I were talking about making a graph

perl6.org (Was: Re: How can i contribute for perl 6 ?)

2009-09-15 Thread Moritz Lenz
(Sorry if this gets a bit lengthy and hijacks the current thread, but there are some thoughts I want to share about perl6.org, and Patrick handed me the opportunity on a silver plate here ;-) Patrick R. Michaud wrote: On Tue, Sep 15, 2009 at 11:16:56AM -0500, Kyle Hasselbacher wrote: On Mon,

Re: How can i contribute for perl 6 ?

2009-09-16 Thread Moritz Lenz
On Tue, Sep 15, 2009 at 09:30:13AM +0530, Saravanan Thiyagarajan wrote: Would like to be a volunteer in working for perl-6. Can some one help me to get into right direction ? I've written about various options on perlmonks [1], but I think the best thing you can do right now is to pick a simple

Workaround for role stubs (Re: Looking for help updating Perl 6 and Parrot part of Perl Myths talk)

2009-09-16 Thread Moritz Lenz
Timothy S. Nelson wrote: On Wed, 16 Sep 2009, Carl Mäsak wrote: 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

Re: How can i contribute for perl 6 ?

2009-09-17 Thread Moritz Lenz
Timothy S. Nelson wrote: On Wed, 16 Sep 2009, Geoffrey Broadwell wrote: On Wed, 2009-09-16 at 19:49 +1000, Timothy S. Nelson wrote: +1. I have a set of 7 bookmarks that load in tabs that I call my Perl 6 bookmarks. I load this group of tabs into a separate web browser window when I'm

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

2009-09-18 Thread Moritz Lenz
Aaron Sherman wrote: Redirecting thread to language because I do agree that this is no longer a matter of a bug. On Fri, Sep 18, 2009 at 9:28 AM, Moritz Lenz via RT perl6-bugs-follo...@perl.org wrote: On Thu Sep 17 08:53:59 2009, ajs wrote: This code behaves as expected, matching 2

Re: perl6.org (Was: Re: How can i contribute for perl 6 ?)

2009-09-19 Thread Moritz Lenz
Moritz Lenz wrote: In other words, we need to scale. Please check perl6.org again, mostly the scaling is done now. Cheers, Moritz

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

2009-09-25 Thread Moritz Lenz
Moritz Lenz wrote: Carl Mäsak wrote: Tim (): Anything else I should add, change or remove? I'm especially interested in verifyable metrics showing effort, progress, or use. Ideally graphical. Any interesting nuggets that fit with the theme will be most welcome. Moritz++ and I were talking

Should .^methods be curried with the invocant?

2009-09-25 Thread Moritz Lenz
Consider this case: class A { method m { say 'OH HAI' } }; my $m = A.new.^methods(:local).[0]; How should I invoke $m? In current Rakudo this works: $m(A.new); # supply the invocant as first argument But shouldn't be just $m() (invocant magically curried) or may $m(A.new:) (invocant not

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

2009-10-01 Thread Moritz Lenz
Jon Lang wrote: On Wed, Sep 30, 2009 at 11:58 PM, pugs-comm...@feather.perl6.nl wrote: Author: moritz Date: 2009-10-01 08:58:00 +0200 (Thu, 01 Oct 2009) New Revision: 28523 Modified: docs/Perl6/Spec/S32-setting-library/Numeric.pod Log: [S32::Num] More thoughts on Inf/NaN Complex, and

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

2009-10-01 Thread Moritz Lenz
Jan Ingvoldstad wrote: On Thu, Oct 1, 2009 at 10:15 PM, Moritz Lenz mor...@faui2k3.org wrote: What's the 0th root of a number, then? It would be a number $y for which $y ** 0 == $x, which can only be fulfilled for $x == 1. So in the general cases the answer to the question root($x, 0

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

2009-10-04 Thread Moritz Lenz
Jon Lang wrote: How do pred and succ work when given Complex values? By adding/substracting 1 from the real part, I'd say. Don't know if that actually makes sense. More generally: if Complex does Numeric, then Numeric doesn't include Ordered (or whatever it's called), because Complex doesn't

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

2009-10-04 Thread Moritz Lenz
Michael Zedeler wrote: Moritz Lenz wrote: Jon Lang wrote: How do pred and succ work when given Complex values? By adding/substracting 1 from the real part, I'd say. Don't know if that actually makes sense. It doesn't, because succ should always give the next, smallest possible

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

2009-10-04 Thread Moritz Lenz
Jon Lang wrote: Moritz Lenz wrote: Jon Lang wrote: typos: s[Nuermic] = Numeric You do have a pugs commit bit, don't you? A what? AFAICT, I don't have any way of editing the Synopses; You have now (sorry for assuming earlier that you had). A username and password should be on the way

Re: generality of Range

2009-10-04 Thread Moritz Lenz
Darren Duncan wrote: However, I still don't see how one would retrieve the distinction between say 1..10 and 1^..^10. I suggest that an extra 2 methods such as .min_is_outside and .max_is_outside (each returns a Bool) could fit the bill, and in fact since I have Pugs write access I think

Re: Parsing data

2009-10-07 Thread Moritz Lenz
Aaron Sherman wrote: One of the first things that's becoming obvious to me in playing with Rakudo's rules is that parsing strings isn't always what I'm going to want to do. The most common example of wanting to parse data that's not in string form is the YACC scenario where you want to have a

Notes on Longest-Token Matching

2009-10-28 Thread Moritz Lenz
Hi all, I've written down some notes on Longest-Token Matching, nothing really new, just an attempt to be a bit more verbose than the spec: http://github.com/moritz/ltm/blob/master/ltm.pod If you find anything that's unclear or wrong, please let me know. If the feedback is positive I'll merge

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

2009-11-02 Thread Moritz Lenz
Hi, 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 without placeholders

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

2009-11-03 Thread Moritz Lenz
On Mon, Nov 02, 2009 at 10:16:39AM -0500, Solomon Foster wrote: On Mon, Nov 2, 2009 at 9:53 AM, Moritz Lenz mor...@faui2k3.org wrote: Hi, 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

Re: r29111 - docs/Perl6/Spec

2009-11-18 Thread Moritz Lenz
On Wed, Nov 18, 2009 at 12:33:35AM -0800, Darren Duncan wrote: Acknowledging that 'FatRat' is current name for above 'Ratio' ... pugs-comm...@feather.perl6.nl wrote: -For applications that really need arbitrary precision denominators -as well as numerators, CRatio may be used, which is

Rat.perl (was: [pugs-commits] r29121 - docs/Perl6/Spec)

2009-11-18 Thread Moritz Lenz
in the denominator. Cheers, Moritz -- Moritz Lenz http://perlgeek.de/ | http://perl-6.de/ | http://sudokugarden.de/

Re: Language status

2009-12-10 Thread Moritz Lenz
Hi, On Thu, Dec 10, 2009 at 12:56:46AM -0700, Sean Hunt wrote: I'm looking forward to Perl 6, and I'm looking into the spec right now, since that to me is the important bit of a language (I know, I'm bizarre). I see at http://feather.perl6.nl/syn/ that a lot of the language spec is

Re: Comments on S32/Numeric#Complex

2009-12-16 Thread Moritz Lenz
Dave Whipp wrote: The definition of the Complex type seems a little weak. A few things: To get the Cartesian components of the value there are two methods (re and im). In contrast there is just one method polar to return the polar components of the value Not quite, .abs returns one of the

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

2009-12-22 Thread Moritz Lenz
Darren Duncan wrote: 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

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

2010-01-20 Thread Moritz Lenz
pugs-comm...@feather.perl6.nl wrote: Author: ash Date: 2010-01-19 17:34:28 +0100 (Tue, 19 Jan 2010) New Revision: 29558 Added: t/spec/S32-array/create.t t/spec/S32-list/create.t Modified: docs/Perl6/Spec/S32-setting-library/Containers.pod Log: Adding some tests for List.new,

Re: One-pass parsing and forward type references

2010-02-01 Thread Moritz Lenz
Carl Mäsak wrote: But on another level, the level of types, Perl 6 makes it fairly *un*natural that the type CFoo refers to the type CBar, which in turn refers to the type CFoo. True, and that has also been bothering me quite a bit. The solution is to always write ::Typename instead of

The silliness of max()

2010-03-07 Thread Moritz Lenz
solution is to get rid of the sub form of max() entirely. Any objections? Cheers, Moritz -- Moritz Lenz http://perlgeek.de/ | http://perl-6.de/ | http://sudokugarden.de/

Re: built-in roles/types routine boundary

2010-03-09 Thread Moritz Lenz
-- Moritz Lenz http://perlgeek.de/ | http://perl-6.de/ | http://sudokugarden.de/

Re: Functional-style pattern matching

2010-03-10 Thread Moritz Lenz
$t anywhere, there's no reason to give it a name, so you can write this actually as multi traverse (Tree $ ( $left, $right) ) { traverse($left); traverse($right); } Hope that helps, Moritz -- Moritz Lenz http://perlgeek.de/ | http://perl-6.de/ | http://sudokugarden.de/

Re: Functional-style pattern matching

2010-03-11 Thread Moritz Lenz
Mark J. Reed wrote: Oh, wow. I was just asking about the spec; didn't know this stuff already worked. Rakudos to the team! :) Actually there's quite much that works in Rakudo, even if some corner cases are missing or error messages might benefit from more verbosity. Especially in the area of

Re: Something about the cascade calling of sort() in rakudo.

2010-03-23 Thread Moritz Lenz
Hi, Hongwen Qiu wrote: Hi, I'm new to Perl6. And just ran the first example in the perl6 book. But, it refused to work. It complains as follows: Too many positional parameters passed; got 2 but expected between 0 and 1 I find out that the problem is in the line: my @sorted =

Re: You never have privacy from your children in Perl 6

2010-03-23 Thread Moritz Lenz
Carl Mäsak wrote: masak um, so 'protected' is when the deriving classes can see the attribute? jonalv yup masak that's what 'private' means in Perl 6. That's wrong. Perl 6's private is like Java's private - subclasses can't see it. It's just Rakudo being leaky at the moment, not a fallacy of

Re: You never have privacy from your children in Perl 6

2010-03-23 Thread Moritz Lenz
Carl Mäsak wrote: Carl (), Moritz (): masak um, so 'protected' is when the deriving classes can see the attribute? jonalv yup masak that's what 'private' means in Perl 6. That's wrong. Perl 6's private is like Java's private - subclasses can't see it. It's just Rakudo being leaky at

<    1   2   3   4   >