Re: Perl 6 fundraising and related topics.

2008-02-22 Thread moritz
e made it until then, I'll do. But it would be shame to wait that long ;-) Cheers, Moritz

Re: Perl 6 fundraising and related topics.

2008-02-22 Thread moritz
;The Parrot Foundation". But from chromatic's response I learned that there is good way to support parrot - but financing him for month. So where is the problem? Why doesn't the money flow one way or another? Does TPF want to sponsor more Perl 5 related development? Or was that offer, $5k for 1 month full time hacking, not known before? Moritz

Re: question about twigil ?

2008-03-14 Thread moritz
d like to have a variable instead ;-) Moritz

Re: Which brackets should @a.perl use?

2009-01-04 Thread moritz
ication as ("blue", "light", "hayard",) would make much more sense, because simple thing like @a.push eval(@b.perl) would then DWIM. Chhers, Moritz

Re: Which brackets should @a.perl use?

2009-01-05 Thread moritz
>>>>>> "m" == moritz writes: > > m> S02 says: > > m> "To get a Perlish representation of any object, use the .perl method. > Like > m> the Data::Dumper module in Perl 5, the .perl method will put quotes > around > m> s

Re: Does =$*ARGS work?

2007-04-12 Thread Moritz Lenz
[EMAIL PROTECTED] That seems more reasonable, because the command line arguments are stored in @*ARGS. I can't answer your question, sorry ;-). Moritz -- Moritz Lenz http://moritz.faui2k3.org/ - http://sudokugarden.de/ - http://perl-6.de/ signature.asc Description: OpenPGP digital signature

Re: Does =$*ARGS work?

2007-04-12 Thread Moritz Lenz
Hi, brian d foy wrote: > In article <[EMAIL PROTECTED]>, Moritz Lenz > <[EMAIL PROTECTED]> wrote: > >> Hi, >> >> brian d foy wrote: >>> Under the section "The for Statement" in S04, it says that the diamond >>> operator >>&

Re: What should file test operators return?

2007-04-13 Thread Moritz Lenz
Hi, brian d foy wrote: > At the moment the file test operators that I expect to return true or > false do, but the true is the filename. that helps chaining of file test: $fn ~~ :t ~~ :x or something. If you want a boolean, use ? $fn ~~ :x or something. HTH, Moritz -- Moritz Len

Re: Is Perl 6 too late?

2007-05-13 Thread Moritz Lenz
n code here Don't get me wrong, there's nothing bad in writing some critics, but yours is impossible to realize in Perl 6, and therefore are it's hard to call it constructive. Cheers, Moritz -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/

Re: Is Perl 6 too late?

2007-05-14 Thread Moritz Lenz
o implementation will ever finish. I don't think most of are not open to new point of views, but regard p6 they just don't help atm. Moritz -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/ signature.asc Description: OpenPGP digital signature

Re: Is Perl 6 too late?

2007-05-14 Thread Moritz Lenz
Thomas Wittek wrote: > Moritz Lenz schrieb: >>> What makes Perl hard to read is the excessive use of special characters >>> (/\W/). >> >> I disagree: The make it look ugly, but not hard to read. > > Even if it's "only" ugly: To what advantage

Re: Is Perl 6 too late?

2007-05-14 Thread Moritz Lenz
Moritz Lenz wrote: > Thomas Wittek wrote: >> Moritz Lenz schrieb: >>>> I would also like semicolons to be optional. >>> Most people don't ;-). >> Oh, really? Source? :) > > I paraphrased Larry Wall. Iirc it was "everybody wants the semicol

POD <-> Code entanglement (was: Re: [svn:perl6-synopsis] r14421 - doc/trunk/design/syn)

2007-06-14 Thread Moritz Lenz
ass and document it properly. I'm sure you'll end up doing the same as I did. ATM I don't know that should be implemented, but perhaps somebody else can think of a good way. -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/ signature.asc Description: OpenPGP digital signature

Re: POD <-> Code entanglement

2007-06-14 Thread Moritz Lenz
Thomas Wittek wrote: > Moritz Lenz: >> =begin pod >> >> =head3 C >> [..] >> =end pod >> >> method from_string(Str $s){ >> # implementation of that method here >> } >> >> Since method signatures are very expressive in

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

2007-06-16 Thread Moritz Lenz
rpreter/compiler rather hard - why should we stop with this philosophy when talking about POD and POD-Parser? I'd find it very annoying to have lines starting with '=' in a heredoc beeing counted as POD. Humans don't think in terms of lines, but in terms of visual blocks (at leas

Re: Perl 6 & Parrot Essentials as project documentation

2007-06-18 Thread Moritz Lenz
rl.org/perl6/doc is very low. I'd suggest something beneath <http://svn.pugscode.org/pugs/docs/>, perhaps essentials/ Moritz -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/ signature.asc Description: OpenPGP digital signature

Re: Perl 6 & Parrot Essentials as project documentation

2007-06-19 Thread Moritz Lenz
rl.org/perl6/doc is very low. I'd suggest something beneath <http://svn.pugscode.org/pugs/docs/>, perhaps essentials/ Moritz -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/

Re: Perl6 new features

2007-06-20 Thread Moritz Lenz
> language ! You could help by contributing some suggestions to what the new "Web" module should be able to do, and how so. Web is hopefully "CGI done right", and still in its early planning stage. Cheers, Moritz -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/ signature.asc Description: OpenPGP digital signature

Re: Perl6 new features

2007-06-20 Thread Moritz Lenz
ould be changed to some extents. You should discuss that on p5p, not here. Only Perl 6 is on topic here. > Is there a place where we can add suggestions ? apart from the first one in... > 2003 ? 4 years ago ? You can write them here on p6l. -- Moritz Lenz http://moritz.faui2k3.

Re: Web Module (Was: Perl6 new features)

2007-06-21 Thread Moritz Lenz
Smylers wrote: > Moritz Lenz writes: > >> You could help by contributing some suggestions to what the new "Web" >> module should be able to do, and how so. Web is hopefully "CGI done >> right", and still in its early planning stage. > > Web modu

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

2007-06-22 Thread Moritz Lenz
en't read enough real Perl 6 that is annotated with Pod 6. So everybody reading this is now condemned to write an OO Perl 6 module, and document it with Pod 6 ;-) -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/ signature.asc Description: OpenPGP digital signature

Re: Some questions about using NaN and Inf

2007-10-06 Thread Moritz Lenz
me sort of constaint on the return value that > they wouldn't want exceptional values. return a native type? -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/ signature.asc Description: OpenPGP digital signature

Re: Concurrency

2007-12-06 Thread Moritz Lenz
rrency.pod (still a draft) contains a bit more helpful information. > Hopefully I'm not inadvertently starting any kind of flame-fest > about anyone's favorite concurrency model here :-D Why flame, when we can have all of them at once? ;-) Moritz -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/ signature.asc Description: OpenPGP digital signature

Re: Sequential bias in S04 (and Perl6 in general)

2008-01-03 Thread Moritz Lenz
inferred from data dependencies. I think that the concurrency synopsis is still useful for explicit threading, STM and the like. Also note that Perl 6 tries to preserver Perl's soul, and is not an Erlang based language ;-) Cheers, Moritz -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/ signature.asc Description: OpenPGP digital signature

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

2008-01-17 Thread Moritz Lenz
right string is longer than the left one, the remaining characters my $str = "määh"; $str =~ s:bb/.*/mo i/; is $str now 'mö i' ? Or does the space get a \N{COMBINING DIAERESIS}? Or is it tranlated to \N{DIAERESIS}? What about other non-letter characters? -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/ signature.asc Description: OpenPGP digital signature

POD in the test suite

2008-01-18 Thread Moritz Lenz
I noticed that many test files contain "old" POD like this: =pod some description here =cut Should that all be replaced by the new POD? =begin description text here =end description -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/ signature.asc Descriptio

Re: pluralization idea that keeps bugging me

2008-01-27 Thread Moritz Lenz
10n:en (or whatever) receives a list of pairs of strings and variables to interpolate, ['$m' => $m, '\s' => undef]. It can then decide what to do with it. Wait, that smells like macros, which are already specced - so never mind ;-) Moritz -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/ signature.asc Description: OpenPGP digital signature

Regex syntax

2008-03-13 Thread Moritz Lenz
this has been proposed and rejected before, please just tell me, I'm only following Perl 6 development for about a year). Cheers, Moritz -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/ signature.asc Description: OpenPGP digital signature

Re: Getting Started - What to try?

2008-03-31 Thread Moritz Lenz
subversion aka svn. The parrot repo contains parrot, rakudo (perl6 on parrot) and various other languages, the pugs repo contains pugs, STD.pm (the grammar), some of synopsis (in docs/Perl6/Spec/), kp6 (in v6/v6-KindaPerl6), smop (in v6/smop/) and various other stuff. Cheers, Moritz -- Moritz Le

Re: What I'm Working On

2008-04-09 Thread Moritz Lenz
John M. Dlugosz wrote: > I'm taking a stab at turning the S\d\d documents into a formal standard. That's certainly a nice idea, and much work. ++ for taking it. Cheers, Moritz -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/ signature.asc Description: OpenPGP digital signature

Re: cross operator and empty list

2008-04-12 Thread Moritz Lenz
[EMAIL PROTECTED] wrote: > Technically the Cartesian cross operator doesn't have an identity value. It has. The set which contains only the emty set, or in perl terms ([]); Or am I missing something? Cheers, Moritz -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/ signa

Re: Clarify "Design by Contract"

2008-04-13 Thread Moritz Lenz
dtional methods: class MyMath { method can_take_sqrt($x:){ $x >= 0; } method sqrt($x:){ PRE { $x.can_take_sqrt } ... } } class MyComplexMath is MyMath { method can_take_sqrt($x:){ True } ... } That way a user of class MyMath can always cal

Re: Idea: infir types of constants

2008-04-13 Thread Moritz Lenz
stating that type information is determined at compile time, which seems like an optimization to me that doesn't need to be in perl 6.0.0. Of course any implementer is welcome to do perform that optimization where possible ;-) Moritz -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/ signature.asc Description: OpenPGP digital signature

Re: Clarify "Design by Contract"

2008-04-13 Thread Moritz Lenz
John M. Dlugosz wrote: > Moritz Lenz moritz-at-casella.verplant.org |Perl 6| wrote: >> >> This is described in depth in "Object oriented software construction" by >> Bertrand Meyer. >> >> > OK, reading about it in Wiki, I see what it's suppose

Re: New specdoc available

2008-04-15 Thread Moritz Lenz
John M. Dlugosz wrote: > Moritz Lenz moritz-at-casella.verplant.org |Perl 6| wrote: >> John M. Dlugosz wrote: >> >>> I posted my current work at >>> http://www.dlugosz.com/files/specdoc.pdf >>> and .odt. >>> >> >> 3.1.1

Re: given vs for

2008-04-25 Thread Moritz Lenz
ng for. Thanks. > > Makes you wonder why the 'given' keyword was added, when for/when is so > close... I'd assume 'given' provides scalar context onto its argument, 'for' obviously provides list context. But I guess the main difference is that &

Re: grammar for 'constant' ?

2008-05-04 Thread Moritz Lenz
f you leave off the optional 'my' or 'our' > that it defaults to 'my', or should it be 'our' like everything else? > > --John -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/ signature.asc Description: OpenPGP digital signature

Private methods in classes and roles

2008-05-16 Thread Moritz Lenz
method !foo ... my method foo ... # same, but &foo is aliased to &!foo Am I right in assuming that the second example is valid only for roles? I find this different syntax for classes and roles quite confusing. Is it intended that way? I'd welcome a uniform syntax. C

Re: Private methods in classes and roles

2008-05-16 Thread Moritz Lenz
because the lexical scoping of the 'my' is orthogonal to the scope of the class. class A { my method foo { } } class A is also { method bar { # no way to access self!foo here } } So is our method !foo {} allowed in classes? and is it the recommended way t

make POST blocks more usable

2008-05-27 Thread Moritz Lenz
with empty arguments? (or do exceptions ignore POST blocks anyway?) Cheers, Moritz -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/ signature.asc Description: OpenPGP digital signature

Re: building pugs under Fedora 9 doesn't work

2008-06-03 Thread Moritz Lenz
Ryan Richter wrote: > On Tue, Jun 03, 2008 at 12:03:00PM +0200, Moritz Lenz wrote: >> My last successful build was r18093 with GHC 6.6.1. >> Maybe we should just die in Makefile.PL until somebody finds a fix. > > Maybe we should just revert the pugs source to t

clarification on samecase() and samebase()

2008-06-08 Thread Moritz Lenz
d, optional argument which specifies the operation mode? Or are they both "dump", and the regex engine does the mapping from smart to dump itself? Anyway, S29 needs clarification. BTW the naming seems inconsistent to me: same*case* preserves *case*, but same*base* preserves *

Re: Google index and subsets (two topics for the price of one!)

2008-06-09 Thread Moritz Lenz
get declarative style constraint programming > for free: > > subset Crosshair of Point where { $_.inside_of($target_zone) }; > > Is that valid syntax? Yes. See http://perlcabal.org/syn/S02.html#Polymorphic_types for similar examples. Cheers, Moritz -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/

fallback semantics of list methods

2008-06-14 Thread Moritz Lenz
t *g* (not serious) I haven't thought a lot about the third option, and what it would mean to the language as a whole, so I have no idea if it's a viable alternative. Any thoughts on the topic are welcome. I hope I didn't confuse too much here ;-) Cheers, Moritz -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/

Re: .join on Array

2008-06-26 Thread Moritz Lenz
-') ? Probably the same as (~[1,3,5], 20).join('-') > Thanks! > > Pm -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/

Re: [perl #56230] [PATCH] Multimethods for Complex.

2008-06-26 Thread Moritz Lenz
should now that sqrt() is ambigous, because there are two possible results, and will revert to roots() for that. Any thoughts? Moritz -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/

Type of literals

2008-06-26 Thread Moritz Lenz
nt. What's our policy on that? Will a 1.WHAT always return Int? do we guarantee (1..4).WHAT always to be 'Range'? Cheers, Moritz -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/

Re: Rakudo test miscellanea

2008-06-26 Thread Moritz Lenz
(cross-posting to p6l) Ryan Richter wrote: > On Thu, Jun 26, 2008 at 11:36:05AM +0200, Moritz Lenz wrote: >> 2) How do we know which numeric type is a class and which is a role? Is >> there an explicit spec about the types of number literals? That could >> have some impac

Re: Rakudo test miscellanea

2008-06-26 Thread Moritz Lenz
Mark J. Reed wrote: > On Thu, Jun 26, 2008 at 10:23 AM, Moritz Lenz > <[EMAIL PROTECTED]> wrote: >> Thanks for the effort, but it also raises new questions. For example: >>> Int is Num >> Rakudo doesn't do it that way, because the 'A is B' relatio

Re: Rakudo test miscellanea

2008-06-26 Thread Moritz Lenz
Trey Harris wrote: > In a message dated Thu, 26 Jun 2008, Moritz Lenz writes: >> I assume that 'Num' is meant to be a non-complex. >> Then it seems to make sense to assume: >> Int is Rat >> Rat is Num >> Num is Complex >> or am I off again? > &g

Re: Rakudo test miscellanea

2008-06-27 Thread Moritz Lenz
Larry Wall wrote: > On Thu, Jun 26, 2008 at 04:50:21PM +0200, Moritz Lenz wrote: > : I assume that 'Num' is meant to be a non-complex. > : Then it seems to make sense to assume: > : Int is Rat > : Rat is Num > : Num is Complex > : or am I off again? > > W

Re: Should C and C work in C ?

2008-06-30 Thread Moritz Lenz
if it should work for non-List $x. $Larry said yes, it should work, and the way to achieve that is to use Any.join. Now Patrick wants to know which of the various list methods need to be in Any. BTW Junctions aren't a subtype of Any, but of Object. > If I've misunderstood, feel free to

Re: [svn:parrot] r28689 - trunk/languages/perl6/t ("-" versus "_")

2008-07-02 Thread Moritz Lenz
Conrad Schneiker wrote: >> Moritz Lenz wrote (on perl6-compiler) >> Patrick R. Michaud wrote: >> >> +S02-builtin_data_types/num.t >> >> S02-builtin_data_types/type.t >> >> S02-literals/autoref.t >> >> S02-literals/hex_chars.t

Complex planes

2008-07-15 Thread Moritz Lenz
i like Complex.angle does)? Or simply fix the test to be agnostic to complex planes? Cheers, Moritz -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/

Re: Complex planes

2008-07-16 Thread Moritz Lenz
Jon Lang wrote: > Larry Wall wrote: >> On Tue, Jul 15, 2008 at 03:30:24PM +0200, Moritz Lenz wrote: >> : Today bacek++ implement complex logarithms in rakudo, and one of the >> : tests failed because it assumed the result to be on a different complex >> : plane. (l

Re: Complex planes

2008-07-16 Thread Moritz Lenz
Jon Lang wrote: > Moritz Lenz wrote: >> Jon Lang wrote: >>> By the principle of least surprise, I'd recommend against this. Most >>> programmers, when they see 'sqrt(1)', will expect a return value of 1, >> >> And that's what they get un

Perl6::Str on CPAN

2008-07-21 Thread Moritz Lenz
...) All comments are welcome. Cheers, Moritz -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/

Re: Project idea: Perl 6 syntax hilighting with STD.pm

2008-07-29 Thread Moritz Lenz
John M. Dlugosz wrote: > Does that mean there is a tool I can use to apply STD.pm to syntax-check > my examples or ask questions of it? Can you point to that? in the pugs repository: $ cd src/perl6 $ make $ ./tryfile $filename That assumes a perl 5.10 in /usr/local/bin/perl HTH,

Re: Design of the "code" classes

2008-07-31 Thread Moritz Lenz
new wording, for Larry (the document owner) > to have. > > --John -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/

P5ism in S02

2008-08-14 Thread Moritz Lenz
hat C doesn't interpolate.) -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/

Re: arrayref/hashref in spectest suite

2008-08-19 Thread Moritz Lenz
ssignment? If you do a @a = @b you get cloning behaviour because the @ sigil implies a container type, whereas a with a $ sigil you just hand references to objects. > I would somewhat expect > a reference to be instead handled using a statement like > > $foo[1] := $bar; > > Comments and clarifications appreciated. > > Pm -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/

Re: new method question

2008-08-22 Thread Moritz Lenz
; So, how set array attribute of a class by new method? I'd expect this to work: class Dog { has @.names; method bark() { say @.names.join(', '); } } my $x = Dog.new(:names); # or: Dog.new(name => ('foo', 'bar')) $x.bark; but currently it doesn't in rakudo (in does in pugs though) -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/

Re: whats wrong with this code?

2008-08-22 Thread Moritz Lenz
CTED] The recommended way to write such a sub is sub xsum([EMAIL PROTECTED]) { ... } xsum(1, 2, 3); With the * before the @list it is "slurpy", which means that it doesn't expect one list as the argument, but rather an arbitrary number of items. If you happen to have an Array already, you can interpolate it: my @x = 1, 2, 3; xsum(|@x); HTH, Moritz -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/

Re: whats wrong with this code?

2008-08-22 Thread Moritz Lenz
Scalar Array, > and thus the for loop sees only one element. > > This probably deserves a tracking ticket at <[EMAIL PROTECTED]>. Already wrote one: [perl #58276] AutoReply: [BUG] Can't iterate over list that was passed as a subroutine argument Cheers, Moritz -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/

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

2008-08-23 Thread Moritz Lenz
:Match'␤current instr.: '_block11' pc 60 (EVAL_14:24)␤] > > S05:2377: > > The currently defined methods are > > $/.from # the initial match position > $/.to # the final match position > $/.chars # $/.to - $/.from > $/.orig # the origi

Re: [perl #58302] [BUG] binary junctions of undefs in boolean context fails (21/37)

2008-08-24 Thread Moritz Lenz
Moritz Lenz wrote: > Tests 34 to 36 were a bit overcritical: > > (0|undef && say "not ok 34") || say "not ok 34"; > (0&undef && say "not ok 35") || say "not ok 35"; > (0^undef && say "not ok 36") || say

Re: [perl #58302] [BUG] binary junctions of undefs in boolean context fails (21/37)

2008-08-24 Thread Moritz Lenz
Larry Wall wrote: > On Sun, Aug 24, 2008 at 09:22:25PM +0200, Moritz Lenz wrote: > : Moritz Lenz wrote: > : > Tests 34 to 36 were a bit overcritical: > : > > : > (0|undef && say "not ok 34") || say "not ok 34"; > : > (0&undef &&a

Re: [perl #58302] [BUG] binary junctions of undefs in boolean context fails (21/37)

2008-08-27 Thread Moritz Lenz
Patrick R. Michaud wrote: > On Mon, Aug 25, 2008 at 12:15:05AM +0200, Moritz Lenz wrote: >> Larry Wall wrote: >> > I think it would be best if all boolean contexts collapse consistently, >> > and I would consider all of those to be boolean contexts. More >> >

Re: Regex repetition controlled by characters

2008-08-31 Thread Moritz Lenz
: > > perl6regex parse error: Error in closure quantifier at offset 28, found ''' > > Is this feature unsupported at the moment or am I misunderstanding it? It seems to be not yet supported, yes. Moritz -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/

Re: [perl #58424] Named regex, token and rule don't work outside of a grammar

2008-09-01 Thread Moritz Lenz
"Code" mean? A code object? or the name of a sub? Since it says that the first dispatch is based on the form, I could imagine that ~~ has some kind of macro semantics, actually. CC'ing p6l in the hope of some clarification. Cheers, Moritz -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/

Speccing Test.pm?

2008-09-02 Thread Moritz Lenz
st.pm that are not used (for example unlike(), which is only used in t/02-test-pm/1-basic.t to test unlike()). So how should we proceed? Should I assemble a list of commonly used test functions and remove all others both in the Test.pm's and the test files? And then? Spec it? Or ship a proto

Re: capitalization of classes

2008-09-03 Thread Moritz Lenz
p a symbol table yet while parsing, so it uses the case of the first letter to distinguish type names from sub names. This is an evil hack that will at some point be cleaned up. Cheers, Moritz -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/

Should !~~ /regex/ set $/?

2008-09-06 Thread Moritz Lenz
The subject says it all: should !~~ with a regex on the RHS set $/? Cheers, Moritz -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/

List.uniq

2008-09-07 Thread Moritz Lenz
_ok('(1, 2).uniq', 'List.uniq not specced'); Moritz -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/

Re: How do you do a lazy map?

2008-09-07 Thread Moritz Lenz
nternally iterators that generate elements as needed or > perhaps in the background. But how do you create such a thing? Something > like: > > @lazy_list := parallel-map { get_info($_) } @filenames; @lazy_list = @filenames.map: { get_info($_) }; I suppose ;-) -- Moritz Lenz http://

Re: List.uniq

2008-09-08 Thread Moritz Lenz
Damian Conway wrote: > Moritz Lenz wrote: > >> There are some tests for List.uniq in the test suite, and pugs >> implements it, but it's not in S29. >> Damian seems to have though we should have it. >> So should we have it? > > I still think we sho

[PATCH] How to match against a grammar

2008-09-08 Thread Moritz Lenz
e how it's done, I just want it to be specced ;-) Moritz -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/ --- Rule.pod.old 2008-09-08 17:27:42.0 +0200 +++ Rule.pod 2008-09-08 17:32:15.0 +0200 @@ -3586,8 +3586,6 @@ $parsetree = m:keepall//;

What should 'my $str $x; $x ~= "a"' return?

2008-09-14 Thread Moritz Lenz
of the synopsis that's correct, but rather unintuitive. So, what should $x be after these two statements? -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/

Re: How to define a new value type?

2008-09-16 Thread Moritz Lenz
exceptions like Str.substr, which explicitly 'is rw', and which implies that the object somehow has to gain access to its container). Moritz -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/

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

2008-09-17 Thread Moritz Lenz
!foo'? > Finally, some useless statistics: I count 12 attributes in different > classes in November right now. Out of those, 12 (100%) have the "is > rw" attribute. This is mostly probably due to non-working constructors. Simple cases seem to work, though: 12:29 < mori

Re: How to define a new value type?

2008-09-17 Thread Moritz Lenz
wback that calling with a string literal is precluded. Makes sense to me. (The Int should really be StrLen, but that's only a minor glitch). That said, much of S29 needs some loving care... Moritz -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/

What should ''.split('') return?

2008-09-19 Thread Moritz Lenz
Hi, what should ''.split('') return? The empty list, or a list with one null string? Moritz -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/

Re: What should ''.split('') return?

2008-09-19 Thread Moritz Lenz
Larry Wall wrote: > On Fri, Sep 19, 2008 at 05:58:59PM +0200, Moritz Lenz wrote: > : Hi, > : > : what should ''.split('') return? The empty list, or a list with one null > : string? > > Empty list would make more sense as a degenerate case. In > >

Split with negative limits, and other weirdnesses

2008-09-23 Thread Moritz Lenz
olution I could think of 1) A limit of 0 returns the empty list (you want zero items, you get them) 2) A limit of 0 fail()s 3) non-positive $limit arguments are rejected by the signature (Int where { $_ > 0 }) Any thoughts? Moritz -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/

Another split() question - when is there a capture?

2008-09-23 Thread Moritz Lenz
$regex.has_capture (which might return either True (unconditional captures) or False (no captures at all) or True|False (for my example above) ;-) Cheers, Moritz -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/

Re: Does colonpair notation produce a Bool or Int?

2008-09-26 Thread Moritz Lenz
gt; is $f2(:a), "Bool", "in '\$f2(:a)', ':a' is a named"; > > However, S02 says that C<:a> corresponds to C<< a => 1 >> in > fatarrow notation, which seems to argue that C<:a> should in > fact have an Int value. > > Are the tests correct here, or am I reading too much into > the synopsis description? Most likely the tests are wrong. Moritz -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/

Re: [perl #59396] [PATCH] Implementation of Hash.reverse.

2008-09-27 Thread Moritz Lenz
where the context decides. Perl 5: say reverse "abc";# abc\n say scalar reverse "abc"; # cba\n Maybe the solution is to avoid name conflicts in this case, maybe name the methods like this: Str.mirror List.reverse Hash.inverse (or Hash.flip) (I've never been good wit

Re: globs and trees in Perl6

2008-10-02 Thread Moritz Lenz
out a copy of the svn repo, and grep/ack in them * ask in #perl6 where some particular item is documented Sadly we have next to no user-level documentation at them moment. The closest might be the open sourced version of "Perl 6 and Parrot Essentials", but it's rather incomplete and some parts are quite out of date. [1] some operators like ~~ actually have more macroish semantics -- Moritz Lenz http://perlgeek.de/ | http://perl-6.de/ | http://sudokugarden.de/

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

2008-10-07 Thread Moritz Lenz
ble List = immutable, lazy Seq = immutable, eager Moritz -- Moritz Lenz http://perlgeek.de/ | http://perl-6.de/ | http://sudokugarden.de/

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

2008-10-11 Thread Moritz Lenz
act, the [...] and {...} forms are really just extra documentation > +about what you expect. I guess it's not intentional to use the same example twice? Moritz -- Moritz Lenz http://perlgeek.de/ | http://perl-6.de/ | http://sudokugarden.de/

Store captures and non-captures in source-string order

2008-10-12 Thread Moritz Lenz
;, ' ', '456' I don't know if the syntax and exact semantics are very good, but IMHO we should have some way of reconstructing a match that is closer to the original string than to the structure of the matching regex. (I also don't know if that's feasible in terms of efficiency) Any ideas? Moritz -- Moritz Lenz http://perlgeek.de/ | http://perl-6.de/ | http://sudokugarden.de/

Re: Store captures and non-captures in source-string order

2008-10-12 Thread Moritz Lenz
Patrick R. Michaud wrote: > On Sun, Oct 12, 2008 at 11:44:05AM +0200, Moritz Lenz wrote: >> When we write regexes, we generally capture stuff in a way that makes >> the following semantic analysis easier. For example we could have a >> regex m/ + ? */ if we're only intere

Re: Running Perl 6 Tests

2008-10-20 Thread Moritz Lenz
while testing > core features? The 01-sanity/ tests predate module loading. The "real" testing is to run 'make spectest', which loads a bunch of tests from the pugs repository, prepares and run them. If you want to run those individually, you can simply say $ make t/spec/S02-literals/radix.t Cheers, Moritz -- Moritz Lenz http://perlgeek.de/ | http://perl-6.de/ | http://sudokugarden.de/

Re: Running Perl 6 Tests

2008-10-20 Thread Moritz Lenz
Ovid wrote: > --- On Mon, 20/10/08, Moritz Lenz <[EMAIL PROTECTED]> wrote: > > > >> > Also, the way that t/00-parrot/06-op-inplace.t is >> written forces the test numbers to be out of sequence. This >> causes "make test" to fail, even though

Re: operator vs function

2008-10-30 Thread Moritz Lenz
ssible as a function (or a macro) already, for example the operator in 2 + 3 is known as &infix:<+>. The ternary is a rather ugly case, I guess it's called &infix:($condition, $true, $false), and it's short-circuiting, so it must be a macro rather than normal function. Cheers, Moritz -- Moritz Lenz http://perlgeek.de/ | http://perl-6.de/ | http://sudokugarden.de/

Re: S16: chown, chmod

2008-11-21 Thread Moritz Lenz
y models (think of SeLinux for example). If 'use fatal' is in effect, that dies, if not, you can check the return value. For chmod() I could imagine an interface like this: $file.chmod(:8<540>); $file.chmod( :set, :user => :r & :x, :group => :r) # both same as

Re: S16: chown, chmod

2008-11-21 Thread Moritz Lenz
Larry Wall wrote: > On Fri, Nov 21, 2008 at 07:30:08PM +0100, Moritz Lenz wrote: > : For chmod() I could imagine an interface like this: > : > : $file.chmod(:8<540>); > : $file.chmod( :set, :user => :r & :x, :group => :r) > :# both same as 'chmod 54

Re: multi return values

2008-11-21 Thread Moritz Lenz
o use arrays instead. (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). Cheers, Moritz -- Moritz Lenz http://perlgeek.de/ | http://perl-6.de/ | http://sudokugarden.de/

Re: multi return values

2008-11-21 Thread Moritz Lenz
Andy Colson wrote: > Moritz Lenz wrote: >> Andy Colson wrote: >>> (Sorry if this dbl-posts, sent it from the wrong account the first time) >>> >>> Hi all, what's wrong with this code: >>> >>> use v6; >>> >>>

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

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

  1   2   3   4   >