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

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

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

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

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

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

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

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

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

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

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

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

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

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: Rationale for $!

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

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

[perl #60674] sign($x) always returns 1 when $x ~~ Complex

2008-11-20 Thread Moritz Lenz via RT
ther meaning later that way) (If you wanted a complex number with magnitude one, then you should call that method "phase" or so, but that would confuse most people when talking about real numbers.) Cheers, Moritz > rakudo: say sign($_) for 42, -42, 0+42i > rakudo 32877: OUTPUT[

[perl #61130] :nth() does not work with :x() or :g in .subst in Rakudo

2008-12-08 Thread Moritz Lenz via RT
On Sun Dec 07 07:24:07 2008, masak wrote: > The .subst method in Rakudo r33599 can understand :x()... > > $ perl6 -e 'say "foo1foo2foo3foo4".subst("foo", "bar", :x(2))' # yes > bar1bar2foo3foo4 > > ...and :nth()... > > $ perl6 -e 'say "foo1foo2foo3foo4".subst("foo", "bar", :nth(2))' # yes > foo1

[perl #66824] "argument doesn't array" with one-item ranges

2009-06-21 Thread Moritz Lenz via RT
On Sun Jun 21 12:05:11 2009, moritz wrote: > 21:03 <@moritz_> rakudo: my @a = 1, 2, 4; sub f($a) { say $a }; > f(|@a[*-1..*-1]) > 21:03 < p6eval> rakudo 1b06df: OUTPUT«argument doesn't array␤in sub f > (/tmp/2x4tmnOO68:1)␤called from Main (/tmp/2x4tmnO

[perl #64566] @a[1..*] adds trailing undef value

2009-08-19 Thread Moritz Lenz via RT
On Wed Apr 08 14:59:19 2009, moritz wrote: > 23:55 <@moritz_> rakudo: my @a = 1..4; say @a[1..*].perl > 23:56 < p6eval> rakudo 6b9755: OUTPUT«[2, 3, 4, undef]␤» > > It should just be [2, 3, 4]. Since the discussion came up on #perl6 if this is really the expected behaviou

[perl #72972] [BUG] False ~~ True in Rakudo

2010-02-22 Thread Moritz Lenz via RT
tion($_) { ... } } won't work as intuitively expected if $thing is false and some_function returns True. But IMHO this is not what smartmatching and given/when is meant for (at least not primarily), so we could sacrifice this possible usage. But I won't do so without permission from Larry. 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

<    1   2   3   4