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

2008-12-07 Thread Moritz Lenz
Dave Whipp wrote: > Carl Mäsak wrote: >> Paul (>): >>> I can't find anything in the existing synopses about Blobs. >>> Probably looking in the wrong place, sorry. >> >> > > Re-reading that, a slightly tangent (though still on topic, I hope) > thought

List.end - last item and last index mixing

2008-12-12 Thread Moritz Lenz
>From S29: : =item end : : our Any method end (@array: ) is export : : Returns the final subscript of the first dimension; for a one-dimensional : array this simply the index of the final element. For fixed dimensions : this is the declared maximum subscript. For non-fixed dimensions (undeclare

Re: r24325 - docs/Perl6/Spec

2008-12-14 Thread Moritz Lenz
Uri Guttman wrote: >> "p" == pugs-commits writes: > > p> This document attempts to document the list of builtin functions in > Perl 6. > p> It assumes familiarity with Perl 5 and prior synopses. > p> @@ -870,6 +870,10 @@ > p> comparisons. C<@by> differs from C<$by> in that each c

Re: List.end - last item and last index mixing

2008-12-14 Thread Moritz Lenz
Moritz Lenz wrote: > From S29: > > : =item end > : > : our Any method end (@array: ) is export > : > : Returns the final subscript of the first dimension; for a one-dimensional > : array this simply the index of the final element. For fixed dimensions > : this is the

Re: What does a Pair numify to?

2008-12-15 Thread Moritz Lenz
Larry Wall wrote: > On Thu, Dec 11, 2008 at 02:24:54PM +0100, TSa wrote: >> HaloO, >> >> Carl Mäsak wrote: >>> 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

Re: What does a Pair numify to?

2008-12-15 Thread Moritz Lenz
mark.a.big...@comcast.net wrote: > -- Original message -- > From: Larry Wall >> On Thu, Dec 11, 2008 at 02:24:54PM +0100, TSa wrote: >> > My idea is to let a pair numify to whatever the value numifies to. >> > Same thing with stringification. In general I think that

Re: r24325 - docs/Perl6/Spec

2008-12-15 Thread Moritz Lenz
Uri Guttman wrote: >> "LW" == Larry Wall writes: > > >>> infix: does numeric comparison if both operands are numbers, and > >>> string comparison otherwise. > > LW> That is a bit of an oversimplification. > > LW> Any type may define infix: however it likes for two arguments of >

Re: Proposal: Make @a and @@a different variables

2008-12-16 Thread Moritz Lenz
TSa wrote: > HaloO, > > Daniel Ruoso wrote: >> That being said, we should note that this example looks simple because >> we have almost no lazyness implied (since there's an assignment in the >> first line), every list access requires the evaluation of the flatenning >> of the list. >> >> my @@

Re: What does a Pair numify to?

2008-12-16 Thread Moritz Lenz
Jon Lang wrote: > That's a good point. Is there an easy way to distinguish between > passing a pair into a positional parameter vs. passing a value into a > named parameter? Off the top of my head, see S06 for the gory details: my $pair = a => 'b'; named(a => 'b'); named(:a); named(|$pair);

Re: Perl6's RE(P)L

2008-12-18 Thread Moritz Lenz
Mark J. Reed wrote: > Following up to a bug report, Mr Lenz wrote: > > Another detail: if i do this in the REPL, it works fine, until I close >> the REPL - then I get the same backtrace as before. >> > > ...except that this is a Rakudo bug, and Rakudo doesn't have a REPL. BTW there's a patch fo

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 retu

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: Extending classes in a lexical scope?

2009-01-12 Thread Moritz Lenz
Larry Wall wrote: > : however, I believe > : that it _is_ possible to derive a new class whose "name" differs from > : an existing class only in terms of version information, such that it > : is substituted for the original class within the lexical scope where > : it was defined, barring explicit i

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 framew

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.

Re: New perl6 wiki

2009-01-20 Thread Moritz Lenz
Hi, dev.null.box wrote: > Yes, yes, i know. There is an official perl6 wiki. But, i think a more > "friendly" wiki is needed, so i just started a new mediawiki one in > http://perl6.wikia.com I appreciate your effort, and at the same time I'd like to ask you (and your fellow contributor(s)) to ac

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. Anyon

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 t

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 ju

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 ap

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 :ok > > > > 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

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
the thing. Especially the DateTime stuff doesn't need any fancy feature that rakudo doesn't do yet (afaict), so it would be nice not only to spec it, but also to provide a pure Perl 6 implementation that can later be shared among compilers. Perl 6 is full of stuff that'

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

2009-02-18 Thread Moritz Lenz
t;> multi infix:<+> (int $i where 2, int $j where 2) {...} > > Hmm, both 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 s

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

2009-02-19 Thread Moritz Lenz
Str.pod - 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 doe

Re: Sigils in Classes after initial "has"

2009-02-23 Thread Moritz Lenz
in which case 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
our scope where you do the composition. 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
t I wasn't sure what subst() returns. The modified string. (It doesn't do in-place substitution by default). Cheers, Moritz -- Moritz Lenz http://perlgeek.de/ | http://perl-6.de/ | http://sudokugarden.de/

Re: Google's Summer of Code 2009

2009-03-02 Thread Moritz Lenz
re accessible. This would be a good starting point 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
You could write my example above also as @values.map(&map_function).reduce(&reduce_function) Cheers, Moritz -- 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: C 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 + $^c})

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 = ; > my @kv = kv(:array(@array)); > #?rakudo s

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

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 >> +

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 sign

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 sign

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

2009-03-27 Thread Moritz Lenz
L ;-), we could ask ourselves why junctions aren't suited. 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' j

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" ~~ //; > say '$/.keys => ', $/.keys.perl; > say '%($/).keys => ', %($/).keys.perl; > > # outputs > # $/.keys => [] > # %($/).keys => ["test"] > > > Same could be

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 .eig

Getting rid of want()

2009-03-31 Thread Moritz Lenz
To quote Jonathan Worthington: do not want(). 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. The reason is that it seems impossible to c

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

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 n

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&

Re: %ARGH

2009-04-19 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 s

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 explici

"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? Mor

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:<...>(@value

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 operation

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 retur

.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 ev

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/download

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 > gr

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 Lenz wrote: >> Presumably you want here-docs, which can be indented in Perl 6: >> >>perl 6 code >>perl 6 code >>$script.say(Q:to); >> output code >> output cod

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 followi

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 departmen

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 t

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 t

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 sca

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 fr

Re: r27888 - docs/Perl6/Spec

2009-08-06 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 >doc

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

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 t

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

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

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 cu

Re: Custom object constructors

2009-08-26 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 makin

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 simpl

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 k

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 >>

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: >

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 t

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 cur

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, 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 on comparing

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 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 an

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'

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. >&

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

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

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

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 wrote: > > Hi, > > > > the current spec doesn't allow immutable containers to call .map with a > > block that implicitly uses $_ as an implicit parameter.

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, C may be used, which is defin

<    1   2   3   4   >