Re: Unwanted failure and FAILGOAL

2016-05-11 Thread Moritz Lenz
rently: rule statement { [ '=' || { self.panic($/, "Invalid declaration.") ] } And maybe also TOP: rule TOP{ ^ [ || . { self.panic($/, "Expected a statement") } ] $ }; That extra dot before the panic ensures it's not called at the end of the string. If you don't want that, you could also do [ || $ || { self.panic(...) } ] Cheers, Moritz

Re: Rationale for $!

2016-01-28 Thread Moritz Lenz
Hi, On 01/28/2016 04:06 PM, Todd C. Olson wrote: > Is there a way to make the exception be thrown eagerly, at the devision > statement rather than waiting until use, at the say statement? Yes, 'use fatal;' Cheers, Moritz

Re: Rationale for $!

2016-01-27 Thread Moritz Lenz
On 01/27/2016 04:32 PM, Felipe Gasper wrote: On 27 Jan 2016 10:15 AM, Moritz Lenz wrote: On 01/27/2016 03:15 PM, Felipe Gasper wrote: So, what *is* the scoping of $!? Scoped to a routine, iirc (sub, method, regex) Interesting. JavaScript programmers that I’ve known bemoan that their

Re: Rationale for $!

2016-01-27 Thread Moritz Lenz
On 01/27/2016 03:15 PM, Felipe Gasper wrote: So, what *is* the scoping of $!? Scoped to a routine, iirc (sub, method, regex)

Re: Rationale for $!

2016-01-27 Thread Moritz Lenz
lobal. Cheers, Moritz

Announce: Rakudo Star Release 2015.11

2015-11-28 Thread Moritz Lenz
On behalf of the Rakudo and Perl 6 development teams, I'm happy to announce the November 2015 release of "Rakudo Star", a useful and usable distribution of Perl 6. The tarball for the November 2015 release is available from . This Rakudo Star release comes with s

Re: confused about 'try'

2015-11-24 Thread Moritz Lenz
exceptions fall through } 2) When you want to access some variables from the inner scope that produced the exception. Since CATCH runs before the stack is unwound, you can even inspect dynamic variables. Cheers, Moritz

Re: Backwards compatibility and release 1.0

2015-10-15 Thread Moritz Lenz
On 10/15/2015 10:47 AM, Smylers wrote: Moritz Lenz writes: On 10/13/2015 10:52 AM, Richard Hainsworth wrote: Following on the :D not :D thread, something odd stuck out. On 10/13/2015 03:17 PM, Moritz Lenz wrote: We have 390+ modules, and hand-waving away all trouble of maintaining them

Re: Backwards compatibility and release 1.0

2015-10-14 Thread Moritz Lenz
On 10/13/2015 10:52 AM, Richard Hainsworth wrote: Following on the :D not :D thread, something odd stuck out. On 10/13/2015 03:17 PM, Moritz Lenz wrote: But hopefully none of them breaking backwards compatibility on such a large scale. The last few backwards incompatible changes still cause

Re: To :D or not to :D

2015-10-13 Thread Moritz Lenz
On 10/12/2015 09:51 PM, Mark Overmeer wrote: * Moritz Lenz (mor...@faui2k3.org) [151012 15:32]: . are they using :D correctly? Yes, though not everybody uses :D as much as they do. Do you check that all the parameters that your Perl 5 methods/subs receive are defined? If not, you

Re: To :D or not to :D

2015-10-12 Thread Moritz Lenz
more, which is a really neat thing to have. > . :D looks really ugly, don't you think? Try to explain to students > to add this smiley everywhere. It's not uglier than a 'die "Must be defined" unless defined $x' Cheers, Moritz

Announce: Rakudo Star Release 2015.09

2015-09-26 Thread Moritz Lenz
On behalf of the Rakudo and Perl 6 development teams, I'm excited to announce the September 2015 release of "Rakudo Star", a useful and usable distribution of Perl 6. The tarball for the September 2015 release is available from . This Rakudo Star release comes wi

Announce: Rakudo Star Release 2015.07

2015-07-27 Thread Moritz Lenz
A useful, usable, "early adopter" distribution of Perl 6 On behalf of the Rakudo and Perl 6 development teams, I'm happy to announce the July 2015 release of "Rakudo Star", a useful and usable distribution of Perl 6. The tarball for the July 2015 release is available from

Announce: Rakudo Star Release 2015.03

2015-03-21 Thread Moritz Lenz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 ## A useful, usable, "early adopter" distribution of Perl 6 On behalf of the Rakudo and Perl 6 development teams, I'm happy to announce the March 2015 release of "Rakudo Star", a useful and usable distribution of Perl 6. The tarball for the March 2015

Announce: Rakudo Star Release 2015.02

2015-02-21 Thread Moritz Lenz
timizations, improved error messages and bugs fixed (over 200 commits to Rakudo since the 2015.01 release). In future, the `nqp::` namespace willl only be available after a declaration like `use nqp;`. Changes to modules included in Rakudo Star: - [JSON::Tiny](https://github.com/moritz/json) giv

Re: S02 mistake re Blob?

2015-02-21 Thread Moritz Lenz
l6.org/S02.html#Immutable_types for an example of the > latter. > -- Darren Duncan so, you think roles aren't types? (Also, roles auto-pun into classes upon usage). Cheers, Moritz

Re: [perl #121454] Can't inline complex constraints in multisub signatures

2014-03-28 Thread Moritz Lenz
On 03/28/2014 02:28 PM, Parrot Raiser wrote: > On 3/27/14, Moritz Lenz wrote: > >> Agreed. We "just" need to come up with a consistent, intuitive way to >> handle the rest of the cases. And implement it. >> > > Whenever somebody offers a solution to a

Re: [perl #121454] Can't inline complex constraints in multisub signatures

2014-03-27 Thread Moritz Lenz
-derived common ancestor (Cool), or look into role space (Real, Numeric come to mind), or simply error out. > which, in my view, would be a much more useful outcome in the vast > majority of cases. Agreed. We "just" need to come up with a consistent, intuitive way to handle the rest

Re: [perl #121454] Can't inline complex constraints in multisub signatures

2014-03-19 Thread Moritz Lenz
f'up to p6l, because the ticket doesn't need the rest of the discussion. On 03/19/2014 10:21 PM, Darren Duncan wrote: > On 2014-03-19, 1:20 AM, Moritz Lenz wrote: >> On 03/19/2014 12:45 AM, Darren Duncan wrote: >>> Damian, Moritz, etc, >>> >>> It s

Re: Unexpected expansion of string with xx

2013-12-21 Thread Moritz Lenz
On 12/20/2013 04:52 AM, Richard Hainsworth wrote: OK x not xx. The doubling of operators is confusing. OTOH having a single operator which two different meanings is also confusing (and very un-perlish). Cheers, Moritz

Re: Licensing: Perl 6 specification and test suite

2013-11-05 Thread Moritz Lenz
icense speaks up soon. I have no idea if the AL2 is well suited for sets of documents, as the specification is. I'll leave that decision to Larry. Cheers, Moritz

Re: Class attribute introspection

2013-10-28 Thread Moritz Lenz
through the MOP: class A { has $!x = 42; }; my $obj = A.new; say A.^attributes[0].get_value($obj); It's not straight forwards, and that's actually a feature :-) The usual way to go is through the accessors, and indirect method calls with $obj."$name"(); Cheers, Moritz

Re: Introduction to Synopses

2013-09-29 Thread Moritz Lenz
A good idea. Please do it! The page you're probably think of is in the perl6/mu repo on github in the file docs/feather/syn_index.html. If you have a github user name, please tell me, and I can give you commit access. Cheers, Moritz

Announce: Rakudo Star Release 2013.09

2013-09-26 Thread Moritz Lenz
## A useful, usable, "early adopter" distribution of Perl 6 On behalf of the Rakudo and Perl 6 development teams, I'm happy to announce the September 2013 release of "Rakudo Star", a useful and usable distribution of Perl 6. The tarball for the September 2013 release is available from

Rakudo Star 2013.08 released

2013-08-24 Thread Moritz Lenz
On behalf of the Rakudo and Perl 6 development teams, I'm happy to announce the August 2013 release of "Rakudo Star", a useful and usable distribution of Perl 6. The tarball for the August 2013 release is available from . A Windows .MSI version of Rakudo star will

Re: Commensurability as Key

2013-08-20 Thread Moritz Lenz
ine or declare one, into a scalar (variable). Nor is there any restriction that makes it impossible to return more than one value from a subroutine -- it just happens to be the case that yary's definition of "function" restricts functions to one value. But that's really a matter of terminology, not technology. Cheers, Moritz

Re: Are set operations needed?

2013-07-18 Thread Moritz Lenz
On 07/18/2013 01:07 PM, Richard Hainsworth wrote: Are set operations needed in Perl6? No implementation of the perl6 set specification yet exists (AFAIK). You are wrong. Both rakudo and niecza implement significant subsets of the set specification. Cheers, Moritz

Announce: Rakudo Star 2013.02 released

2013-02-24 Thread Moritz Lenz
On behalf of the Rakudo and Perl 6 development teams, I'm happy to announce the February 2013 release of "Rakudo Star", a useful and usable distribution of Perl 6. The tarball for the February 2013 release is available from . A Windows .MSI version of Rakudo st

Rakudo Star 2013.01 released

2013-01-30 Thread Moritz Lenz
Announce: Rakudo Star - a useful, usable, "early adopter" distribution of Perl 6 On behalf of the Rakudo and Perl 6 development teams, I'm happy to announce the January 2013 release of "Rakudo Star", a useful and usable distribution of Perl 6. The tarball for the January 2013 release is availabl

Announce: Rakudo Star 2012.12 release

2012-12-27 Thread Moritz Lenz
Announce: Rakudo Star - a useful, usable, "early adopter" distribution of Perl 6 On behalf of the Rakudo and Perl 6 development teams, I'm happy to announce the December 2012 release of "Rakudo Star", a useful and usable distribution of Perl 6. The tarball for the December 2012 release is availa

Rakudo Star 2012.11 released

2012-11-28 Thread Moritz Lenz
On behalf of the Rakudo and Perl 6 development teams, I'm happy to announce the November 2012 release of "Rakudo Star", a useful and usable distribution of Perl 6. The tarball for the November 2012 release is available from . A Windows .MSI version of Rakud

Re: Perl 6 in Perl 6?

2012-10-18 Thread Moritz Lenz
code generation is now written in NQP. The priorities for most compiler hackers is to provide good compilers over complete bootstrapping, and I guess most users agree with that goal. Cheers, Moritz

Re: [perl #113930] Lexical subs

2012-07-08 Thread Moritz Lenz
an run short Perl 6 scripts on IRC (on irc.perl.org and irc.freenode.org) with something like /msg p6eval p6: my $x; sub sub f { say $x }; for 1..10 -> $x { f() } This runs it through both rakudo and niecza. If you want, I can also send the bot into #p5p. Cheers, Moritz

Re: When do named subs bind to their variables? [perl #113930]

2012-07-08 Thread Moritz Lenz
o closures as soon as the lexical scope containing them is entered." Cheers, Moritz

Re: When do named subs bind to their variables? [perl #113930]

2012-07-08 Thread Moritz Lenz
o closures as soon as the lexical scope containing them is entered." Cheers, Moritz

Re: [perl6/specs] 34fddf: [S32::Str] substr is not rw anymore, but substr-rw...

2012-06-09 Thread Moritz Lenz
simply in an outer scope of the user code. What the 'is export' traits in that document do is creating a subroutine version of a method. Currently it means that there is only a subroutine version of substr-rw specced, not a method form. Cheers, Moritz

Re: The trouble with awesome

2012-05-30 Thread Moritz Lenz
, like program-creating programs, compilers,&c. Does this seem like a reasonable taxonomy, or are other groupings a better fit? Where would you put nested data structures and custom classes? At the beginning of the "higher order" work? Apart from that, it sounds quite well. Cheers, Moritz

Re: The trouble with awesome

2012-05-25 Thread Moritz Lenz
> My point is that while it > started out as a way to improve/formalize Perl 5, it's developed > sufficiently to the point where it is its own language and not the > "next" version of 'perl'. But it is still a version of Perl. It might not be the "next" version of Perl, but it certainly the sixth

Re: The trouble with awesome

2012-05-25 Thread Moritz Lenz
ts and iteration. At this point, Rakudo mostly appeals to language enthusiasts and early adopters, so that's quite a good fit. In the long run, we need a book for beginners too. An attempt to write materials for beginners is at. https://github.com/perlpilot/perl6-docs/ But much more is needed. Please help us with it. Cheers, Moritz

Re: allow .re and .im to be l-values

2012-05-18 Thread Moritz Lenz
ew one quite easily: $x = 5 + $x.im*i; Cheers, Moritz

Re: The "=" operator and context

2012-04-03 Thread Moritz Lenz
On 04/03/2012 08:24 PM, Daniel Carrera wrote: > On 3 April 2012 17:24, Moritz Lenz wrote: >> You can, very nearly. You just need to write >> >> my @vec is Vector; >> >> because you really want to change the type of the container, not just of the >> con

Re: The "=" operator and context

2012-04-03 Thread Moritz Lenz
e my @vec := Vector.new; @vec = 1, 2, 3, 4; and get the same output. (you can also override the .STORE method of a scalar, but that's a bit creepy if you ask me). Cheers, Moritz

Re: Not Quite Perl

2012-04-03 Thread Moritz Lenz
do/Parrot, or not fast at all. Since NQP mostly(*) just implements stuff that maps well to parrot, it is usually much faster than Rakudo, but of course it also does much less. (*) current NQP also implements 6model, a lightweight object storage system that is flexible enough for Perl 6. Cheers, Moritz

Re: Floating-point equality (was Re: How to make a new operator.)

2012-03-25 Thread Moritz Lenz
On 03/25/2012 06:55 AM, Moritz Lenz wrote: > I don't know if the majority of the perl6-language posters have realized > it yet, but both Perl 6 and the its implementations are quite mature > these days. Mature enough that such proposals should be prototyped as > modules, and tho

Re: Floating-point equality (was Re: How to make a new operator.)

2012-03-24 Thread Moritz Lenz
ports operator adverbs, and supports them on user-defined operators, so there's nothing to stop you from trying it. Cheers, Moritz

Re: How to make a new operator.

2012-03-24 Thread Moritz Lenz
ry to write an auto-deduced sequence, and fail because of floating-point errors. Cheers, Moritz

Re: How to make a new operator.

2012-03-22 Thread Moritz Lenz
num/complex.t. This also fixes the sequence 1, 2i, -4 ... 256. Cheers, Moritz

Re: How to make a new operator.

2012-03-22 Thread Moritz Lenz
tional degrees of magic, and we've come to regret all of them. This discussion makes me think that maybe deducing geometric sequences is too much magic as well. Cheers, Moritz

Re: How to make a new operator.

2012-03-22 Thread Moritz Lenz
e.t currently isn't run. After writing all the above, it occurred to me that the use of @_ should implicitly define a closure as slurpy/n-ary. It shouldn't only, it does already (in all ). The future is already here, it's just unevenly distributed. Cheers, Moritz

Re: How to make a new operator.

2012-03-22 Thread Moritz Lenz
t; But it's still a net win, because this unified semantics works better >> than anything we had before. > > But that's a bit of a problem if I *don't* want a value higher than 100. Then exclude it: 2, 4, 8 ...^ * > 100 Cheers, Moritz

Re: How to make a new operator.

2012-03-21 Thread Moritz Lenz
for all of that, but it requires you to come up with a new syntax that doesn't collide heads-on with lots of existing grammar rules. Cheers, Moritz

Re: DBC-ish PRE and POST phasers, spec clarifications

2012-03-11 Thread Moritz Lenz
On 03/11/2012 02:11 PM, Moritz Lenz wrote: > Just a small syntax nit: I think your example of 'will require BLOCK' is > a violation of the rule that we shouldn't have two terms in a row. Never mind, trait_mod:will is special-cased to allow that: token trait_mod:will {

Re: DBC-ish PRE and POST phasers, spec clarifications

2012-03-11 Thread Moritz Lenz
On 03/11/2012 03:21 AM, Damian Conway wrote: > Carl asked: > >>class A { >>method foo($x) { >>PRE { $x < 10 } >># ... >>} >>} >> >>class B is A { >>method foo($a, $b, $c) { >>PRE { [>] $a, $b, $c } >># ... >>

Re: Setting private attributes during object build

2012-02-01 Thread Moritz Lenz
On 02/02/2012 07:40 AM, Damian Conway wrote: > My point was that I don't want the named arguments that BUILD can take > to be restricted to only the names of public attributes...which was, I > thought, yary's complaint when writing: No, the complaint was that when you write self.bless(*, |%named)

Re: Setting private attributes during object build

2012-02-01 Thread Moritz Lenz
ree that the default .new and thus .BUILD only take named arguments, and while that's not authoritative, it is a strong indicator that the example above contradicts the compiler writer's understanding of object initialization system. Cheers, Moritz

Re: Setting private attributes during object build

2012-02-01 Thread Moritz Lenz
$y, $z) { self.bless(*, :$x, :$y, :$z) } submethod BUILD(:$!x, :$!y, :$!z) { } # is this repetition really needed? } It also means that private attributes are less convenient to work with than those with accessors, which IMHO is a not signal in the right direction. Cheers, Moritz

Re: Encapsulating the contents of container types

2011-09-09 Thread Moritz Lenz
bout its effect on actual code I've written in the past, the more I get scared by the thought. Cheers, Moritz

Re: More bugs or PEBKAC

2011-09-05 Thread Moritz Lenz
which disables printing of backtraces by default. The question is if we provide a separate sub for such cases (error() or report-error() or so), or if we rely on something like UserError.new(message => 'You did something wrong here').throw or something similar. Cheers, Moritz

Re: Underscores v Hyphens (Was: [perl6/specs] a7cfe0: [S32] backtraces overhaul)

2011-08-24 Thread Moritz Lenz
Am 24.08.2011 11:33, schrieb Carl Mäsak: Damian (>>>), Moritz (>>), Smylers (>): ... why hidden_from_backtrace instead of hidden-from-backtrace? ... low-level things are spelled with underscores, while we reserve the minus character for user-space code. So the idea is tha

Re: [perl6/specs] a7cfe0: [S32] backtraces overhaul

2011-08-23 Thread Moritz Lenz
Am 23.08.2011 10:56, schrieb Moritz Lenz: And why is this entire message written in questions? Is it? I'm afraid I don't understand what you mean. Never mind?

Re: [perl6/specs] a7cfe0: [S32] backtraces overhaul

2011-08-23 Thread Moritz Lenz
ou mean. See https://github.com/perl6/specs/commit/a7cfe02002f665c120cf4b735919779820194757 maybe it's a charset problem on your machine, or something. Cheers, Moritz

Re: Encapsulating the contents of container types

2011-08-21 Thread Moritz Lenz
Monads in Haskell. (*) ok, not everything, but everything that can be stored in an object And I'd be very disappointed if Perl 6 turned into Haskell so late in its development stage (remember that we have working compilers, a growing number of modules and active users), especially since it's not tailored to be a language that is tailored towards immutability. Cheers, Moritz

Re: Bug?

2011-07-17 Thread Moritz Lenz
On 07/14/2011 11:47 PM, Parrot Raiser wrote: > When a subroutine is invoked with an empty parameter list, as follows: > > run_stuff(); > > sub run_stuff { > my ($parm) = @_; > say "Parameter is $parm"; > } > > @_[0] contains "Any()". Not "Any()", but Any (which say() prints as "Any()"

Re: Close($file) required in Perl 6, unlike Perl 5

2011-07-17 Thread Moritz Lenz
to the Parrot developers: How could I implement DESTROY methods in Rakudo? Is there any vtable I can override, or so? Note that such a method might itself allocate new GCables. While not urgent, it's important for us in the long run. Cheers, Moritz

Re: eval should throw an exception on compile error

2011-05-07 Thread Moritz Lenz
;t throw an error when it fails. I agree that eval shouldn't be catching errors, that's what try { } / CATCH are for (and i know that other #perl6 regulars things similarly). I dimly recall that Larry had an objection, but I can't remember what it was :( Cheers, Moritz

Re: Base conversion: not enough rope

2011-05-07 Thread Moritz Lenz
have anything to do with > base conversion. FWIW in NQP you can cheat and reuse the internal function of the compiler: 09:24 < moritz> nqp: use NQPHLL; say(HLL::Actions::string_to_int('14', 8)) 09:24 <+p6eval> nqp: OUTPUT«12␤» I think in the end it should come down

Re: lol context and X

2011-03-31 Thread Moritz Lenz
.. 2 X 4 .. 5 -> $a, $b { say $a.perl, $b.perl }' > 14 > 15 > 24 > 25 looks more like flattened to me. > # Default context is flat? > $ ../rakudo/perl6 -e 'for 1 .. 2 X 4 .. 5 { say .perl }' > 1 > 4 > 1 > 5 > 2 > 4 > 2 > 5 yes. Cheers, Moritz

Re: spell check in code

2011-03-17 Thread Moritz Lenz
6 today. Have fun! (*) actually a slightly simplified version, but still quite the same in structure Cheers, Moritz

[perl #81548] [BUG] Can't do 'handles' on a type in Rakudo

2011-01-06 Thread Moritz Lenz via RT
ibute fails. That's a conceptual problem and needs a spec resolution. One possible approach would be to only install methods not yet present in $?CLASS or its superclassess any better ideas? Moritz

Re: dimensionality in Perl 6

2010-11-19 Thread Moritz Lenz
and can demonstrate how well it can integrate with Durations and the rest of the type system, I (and the other sceptics) might reconsider my objection. (*) runnable code please. Cheers, Moritz

Re: exponentiation of Duration's

2010-11-17 Thread Moritz Lenz
). Then we'll see if people take it up and use it. That said, it's possible that this would open up a can of worms. Would it? Another reason to prototype it as a module. Cheers, Moritz

Re: exponentiation of Duration's

2010-11-17 Thread Moritz Lenz
nt be specified in a TimeZone? Read S02. Could an Instant be incremented by Day units? Only if you define a day as 24 * 60 * 60 seconds. What happen if this increment change from daylight saving to normal time? Instants and Durations don't have such a concept. Please read S02. Cheers, Moritz

Re: exponentiation of Duration's

2010-11-17 Thread Moritz Lenz
Am 17.11.2010 14:02, schrieb Oha: On 11/17/2010 01:46 PM, Moritz Lenz wrote: Just as a data point, in physics duration squared does exist. On the other hand, i can see why an Instant can't be used as a linear value: it does not have a clear origin (or zero value). That's correc

Re: exponentiation of Duration's

2010-11-17 Thread Moritz Lenz
Am 17.11.2010 12:55, schrieb Richard Hainsworth: On 11/17/10 14:03, Moritz Lenz wrote: Am 17.11.2010 10:31, schrieb Kris Shannon: $duration * $duration # WRONG, durations aren't geometric $duration * 2 # ok, a duration twice as long 2 * $duration # same What are your thoughts?

Re: exponentiation of Duration's

2010-11-17 Thread Moritz Lenz
Am 17.11.2010 10:31, schrieb Kris Shannon: A recent rakudo commit [1] is a quick fix for #78896 [2] to allow exponentiation of Duration's. And it did so with a real world use case in mind. I'm uneasy with allowing this and I think the spec probably meant not to but is badly worded [3]: Dur

Re: base-4 literals

2010-11-16 Thread Moritz Lenz
On 11/16/2010 08:46 PM, Darren Duncan wrote: > So, any thoughts on this? A wonderful application for a module. And don't we already have :4<1230> for base 4 literals? With a simple scheme that can be used up to base 36? Cheers, Moritz How thinks that Perl 6 should really becom

Re: Packed arrays and assignment vs binding

2010-11-14 Thread Moritz Lenz
hat it is. If it is an Int, I > don't understand how you could bind it into a packed array. On IRC, Jonathan said that 1 is basically an Int, which is something like a boxed int. So whatever operation works removes the box, and puts the result in the variable. However I wonder how well that's going to work, since Int can store arbitrarily large integers, while int can't. What happens on overflow? Cheers, Moritz

Re: Packed arrays and assignment vs binding

2010-11-13 Thread Moritz Lenz
ewrite assignment to binding at compile time... If nobody comes up with a practical idea on how to solve it, I'd grumpily accept only binding for storing things in a natively typed container. We'd need a *VERY* good error message in that case. Cheers, Moritz

Re: IO Multiplexing

2010-11-12 Thread Moritz Lenz
outines in the form of gather/take. I'm sorry for not commenting more on your actual proposals, which is mostly due to my lack of real-world experience with non-blocking IO. Cheers, Moritz

Re: Bag / Set ideas - making them substitutable for Arrays makes them more useful

2010-11-09 Thread Moritz Lenz
2, 3).item; so $y ends up with a single list item of 9. Cheers, Moritz

Re: Bag / Set ideas - making them substitutable for Arrays makes them more useful

2010-11-07 Thread Moritz Lenz
e proposal is done, I would still want an easy way to get > the value-count pairs from a bag if I wanted them. There'd be still .kv and .pairs. Cheers, Moritz

Re: Tweaking junctions

2010-11-01 Thread Moritz Lenz
Food for thought, a few non-junction solutions: On 10/22/2010 06:16 AM, Damian Conway wrote: > # Find the list of common elements in two lists... > sub intersection (@list1, @list2) { > (any(@list1) & any(@list2).eigenstates; > } sub intersection(@list1, @list2) { uniq gat

Re: Tweaking junctions

2010-11-01 Thread Moritz Lenz
On 11/01/2010 12:41 PM, Damian Conway wrote: > Moritz wrote: > >>> $value !~~ Junction && $value ~~ $junction >> >> In general this definition makes it impossible to return a list of >> eigenstates from the junction. Just think of junctions contai

Re: Tweaking junctions

2010-11-01 Thread Moritz Lenz
On 10/22/2010 06:16 AM, Damian Conway wrote: > That is, a C<$value> is an eigenstate of a C<$junction> if-and-only-if: > > $value !~~ Junction && $value ~~ $junction In general this definition makes it impossible to return a list of eigenstates from the junction. Just think of junctions con

Re: Lazy Strings and Regexes

2010-10-31 Thread Moritz Lenz
method in the IO class - another thing that'll likely appear when Cats are implemented. Cheers, Moritz

Re: [perl6/specs] 58fe2d: [S12] spec setting and getting values of attribute...

2010-09-30 Thread Moritz Lenz
hould be two > .perl > where the first is more restricted like I say and the second just dumps the > private attributes, and the second can only be used with MONKEY PATCHING. 1) please don't abuse MONKEY_TYPING for anything that might look like dangerous 2) I find .perl very, very valuable in real world debugging; I don't want to make it its usage any harder. > Then Damian's position (which I support) is supported and so are monkeys. Ook ook! Moritz (who actually writes Perl 6 code on a nearly daily basis).

Re: [perl6/specs] 58fe2d: [S12] spec setting and getting values of attribute...

2010-09-30 Thread Moritz Lenz
Am 30.09.2010 10:32, schrieb Carl Mäsak: Moritz in the spec (>>), Damian (>): After lengthy IRC discussion, we concluded that it's a good idea to provide some form of introspection that doesn't bother about perceived privacy borders, provided that the implementation makes

Re: [perl6/specs] 761178: remove some some duplicate words words

2010-09-08 Thread Moritz Lenz
or the specs repo. They are open source, see http://github.com/github/github-services for details. Somebody could implement the include-the-diff feature, and make the github folks apply the changes. Or somebody could follow the feed and send emails to p6l, in which case I'd disable the service hook. Cheers, Moritz

Re: [perl6/specs] 761178: remove some some duplicate words words

2010-09-07 Thread Moritz Lenz
ual diffs like they used to, > instead of forcing me to go poke at the tree. Indeed. Any contributions to restoring that behavior are very welcome. Cheers, Moritz

Announce: Pugs repository move

2010-09-04 Thread Moritz Lenz
repo, and the 'feather' server on which it was hosted. It is certainly a less exciting task than writing a compiler, but just as valuable for the Perl 6 community. Cheers, Moritz [1] Actually, I decided, and nobody spoke up against it. If you're not happy with that decision, feel f

Re: regex and

2010-08-10 Thread Moritz Lenz
ngth of string, so that for example ^ [ a+ & . ** 3 ] could only match exactly 3 a's. If you don't want to them tied to the same length, you look-ahead assertions instead. Cheers, Moritz

Re: regex and

2010-08-10 Thread Moritz Lenz
string which does not include 'abc' anywhere, you can write this as ^ [ ]* $ Cheers, Moritz

Re: pattern alternation (was Re: How are ...)

2010-08-06 Thread Moritz Lenz
Personally, I had always considered the ^ and $ to be the lowest precedence > things in a pattern. Meta characters don't have a precedence on their on - concatenation has. Cheers, Moritz

Re: Perl 6 User Documentation

2010-08-02 Thread Moritz Lenz
d documents are at <http://doc.perl6.org/>. Certainly needs a better index file and some pre-text, but it's a start. You're welcome to add your stuff there (ping me or other Perl 6 hackers about a commit bit on #perl6), or start your own repo somwhere (though I'd prefer it

Re: S26 broken link

2010-08-02 Thread Moritz Lenz
remove the link for now, if it's a concern to you. > My apologies if this is the wrong place to ask this question. For infrastructural discussions, the perl6-compiler might be better suited, but we're not picky in here (I hope :-) Cheers, Moritz -- Moritz Lenz http://perlgeek

Re: Breaking encapsulation by detaching a private-variable-accessing method from one object and calling it on another

2010-08-02 Thread Moritz Lenz
what)? There's a third possiblity - $!foo being bound to the $!foo attribute of the lexically enclosing class at compile-time. So that re-attaching methods make them still refer to the old attribute. Not sure if it's a good idea, just food for thought. Cheeers, Moritz -- Moritz Lenz http://perlgeek.de/ | http://perl-6.de/ | http://sudokugarden.de/

Smart-matching and m//

2010-08-01 Thread Moritz Lenz
o 'ABC and return False. I guess that's not what we want, so there might be a need for a rule preventing the .ACCEPTS call when $_ is used on the RHS. (The previous spec with syntactic forms kinda solved the problem, the $_ topicalization re-introduced it). Cheers, Moritz -- Moritz Le

Re: Smart match isn't on Bool

2010-07-31 Thread Moritz Lenz
TD.pm already implements that warning, Rakudo doesn't. (But I'd appreciate it if some brave soul could port the warning over to Rakudo, shouldn't be too hard) Cheers, Moritz

Re: Suggested magic for "a" .. "b"

2010-07-28 Thread Moritz Lenz
Dave Whipp wrote: > Moritz Lenz wrote: >> Dave Whipp wrote: >>>for 0..10 -> $x { ... } >>> is treated as >>>for (0...10).pick(*) -> $x { ... } >> >> Sorry, I have to ask. Are you serious? Really? > > Ah, to reply, or not to repl

Re: Suggested magic for "a" .. "b"

2010-07-28 Thread Moritz Lenz
ced) syntax for the same thing is enough, especially considering that hyper operators also do the same job. Cheers, Moritz

  1   2   3   4   >