perl.perl6.users http://www.nntp.perl.org/group/perl.perl6.users/ ... Copyright 1998-2013 perl.org Sun, 19 May 2013 09:14:28 +0000 ask@perl.org Re: Per-Object Roles.. by Frank White thanks for the info Carl. Unless you really have tight memory constraints,<br/>I think this solution is fine.<br/><br/><br/>Cheers,<br/>Frank<br/><br/><br/><br/>On Mon, Mar 4, 2013 at 3:04 PM, Carl M&auml;sak &lt;cmasak@gmail.com&gt; wrote:<br/><br/>&gt; Frank (&gt;&gt;), Moritz (&gt;):<br/>&gt; &gt;&gt; Hi, I am new to Perl6 and I&#39;m interested in the feature that allows you<br/>&gt; to<br/>&gt; &gt;&gt; add roles to classes. From what I understand you can add a role to an<br/>&gt; &gt;&gt; object using the &quot;does&quot; keyword. Is there any way you can remove a<br/>&gt; role or<br/>&gt; &gt;<br/>&gt; &gt; No, you cannot remove roles.<br/>&gt;<br/>&gt; However, if you want an un-adorned object later, just use infix:&lt;but&gt;,<br/>&gt; and keep the original object around.<br/>&gt;<br/>&gt; class C {<br/>&gt; has $.name = &quot;original&quot;;<br/>&gt; }<br/>&gt;<br/>&gt; role W {<br/>&gt; method name { &quot;wrapped&quot; }<br/>&gt; }<br/>&gt;<br/>&gt; my $original = C.new;<br/>&gt; {<br/>&gt; my $wrapped = $original but W;<br/>&gt; say $wrapped.name; # &quot;wrapped&quot;<br/>&gt; say $wrapped ~~ W; # True<br/>&gt; }<br/>&gt; say $original.name; # &quot;original&quot;<br/>&gt; say $original ~~ W; # False<br/>&gt;<br/>&gt; // Carl<br/>&gt;<br/><br/> http://www.nntp.perl.org/group/perl.perl6.users/2013/04/msg1684.html Thu, 25 Apr 2013 02:12:00 +0000 Algebraic Data Type module for perl6 by Timo Paulssen I&#39;m crossposting this from perl.perl6.language, because I feel this place is<br/>more appropriate.<br/><br/>Since that mail was written, an ADT module has been added to modules.perl6.org,<br/>it&#39;s hosted in this github repository: https://github.com/timo/ADT/<br/><br/>Looking forward to comments as well as issues and pull requests on github.<br/><br/>-- snip --<br/><br/>On 21.03.2013 17:45, Carl M&auml;sak wrote:<br/>&gt; [...]<br/>&gt;<br/>&gt; Using hashes and subclasses: &lt;https://gist.github.com/masak/5213423&gt; Using<br/>&gt; classes and subclasses: &lt;https://gist.github.com/masak/5213563&gt;<br/>&gt;<br/>&gt; [...]<br/><br/>I came up with a prototype to create those classes like in the second gist<br/>automatically by supplying a haskell-like declaration of the data type.<br/><br/>(skip to the end of the mail for the code)<br/><br/>Here&#39;s what it can do:<br/><br/> my %res = create_adt(&quot;Tree = Branch Tree left, Tree right | Leaf Str storage&quot;);<br/> my \Tree = %res&lt;Tree&gt;;<br/><br/> # create the tree with named parameters<br/> my $t =<br/> Tree.new-branch(<br/> :left(Tree.new-branch(<br/> :left(Tree.new-leaf(:storage(1))),<br/> :right(Tree.new-leaf(:storage(2))))),<br/> :right(Tree.new-leaf(:storage(3))));<br/><br/> # create the tree with positional arguments<br/> my $t2 =<br/> Tree.new-branch(<br/> Tree.new-branch(<br/> Tree.new-leaf(1),<br/> Tree.new-leaf(2)),<br/> Tree.new-leaf(3));<br/> say $t2.gist;<br/> # outputs: (reformatted for email)<br/> # Tree.new-branch(<br/> # left =&gt; Tree.new-branch(<br/> # left =&gt; Tree.new-leaf(storage =&gt; 1),<br/> # right =&gt; Tree.new-leaf(storage =&gt; 2)),<br/> # right =&gt; Tree.new-leaf(storage =&gt; 3))<br/><br/> my \Branch = %res&lt;Branch&gt;;<br/> my \Leaf = %res&lt;Leaf&gt;;<br/><br/> # haskell-style map for the tree<br/> sub treemap($t, *&amp;code) {<br/> given $t {<br/> when Branch {<br/> return Tree.new-branch(<br/> treemap($t.left, &amp;code),<br/> treemap($t.right, &amp;code))<br/> }<br/> when Leaf {<br/> return Tree.new-leaf(code($t.storage))<br/> }<br/> }<br/> }<br/><br/> say treemap($t2, * * 10).gist;<br/> # outputs:<br/> # Tree.new-branch(<br/> # left =&gt; Tree.new-branch(<br/> # left =&gt; Tree.new-leaf(storage =&gt; 10),<br/> # right =&gt; Tree.new-leaf(storage =&gt; 20)),<br/> # right =&gt; Tree.new-leaf(storage =&gt; 30))<br/><br/><br/>There are currently some limitations:<br/><br/>1) there is no compiler support for checking that all cases have been covered,<br/> but as masak mentioned, I&#39;m confident this can be done with a macro, because<br/> those run at compile-time basically.<br/>2) you cannot yet use Leaf and Branch for declaring multi subs, because the<br/> symbols are not there at compile-time, but see below.<br/>3) I have not yet figured out how to properly do pattern matching/decomposing,<br/> so the names &quot;left&quot;, &quot;right&quot; and &quot;storage&quot; need to be supplied in the<br/> definition unlike in haskell.<br/>4) I&#39;m not sure how to do type parameters (think data Tree A = ...), because<br/> perl6 has only parametric roles, not parametric classes.<br/><br/>One thing rakudo needs to get for this to be much smoother is support for the<br/>sub EXPORT to return a hash-like of symbols that will be installed in the<br/>caller&#39;s package. This would make Tree, Branch and Leaf available as<br/>compile-time symbols, so that multi methods/subs can use them for dispatch.<br/><br/>I mean to turn this into a module for the perl6 modules list some time in the<br/>Future.<br/><br/>Finally, here&#39;s the runnable code. Feel free to play around with it and tell me<br/>on this mailing list or the IRC channel what further problems (or even<br/>solutions!) you find.<br/><br/>https://gist.github.com/timo/5226114<br/><br/>Have Fun!<br/> - Timo<br/><br/> http://www.nntp.perl.org/group/perl.perl6.users/2013/04/msg1683.html Tue, 02 Apr 2013 04:06:37 +0000 Algebraic Data Types in perl6 by Timo Paulssen Hey perl6 people,<br/><br/>I&#39;m crossposting this message from perl.perl6.language, because I feel it&#39;s more<br/>appropriate here. User phiroc@free.fr had asked if ADT and GADT will be<br/>available in perl6 any time soon, Carl M&auml;sak implemented two suggestions (see<br/>quoted text below) and I implemented it as a POC and then as a module.<br/><br/>The module code now lives on github here: https://github.com/timo/ADT/ and is<br/>also available to be panda-installed from modules.perl6.org<br/><br/>I&#39;m looking forward to hearing your comments as well as your issues and pull<br/>requests on github :)<br/> - Timo<br/><br/>---- 8&lt; ----<br/><br/>On 21.03.2013 17:45, Carl M&auml;sak wrote:<br/>&gt; [...]<br/>&gt;<br/>&gt; Using hashes and subclasses: &lt;https://gist.github.com/masak/5213423&gt; Using<br/>&gt; classes and subclasses: &lt;https://gist.github.com/masak/5213563&gt;<br/>&gt;<br/>&gt; [...]<br/>I came up with a prototype to create those classes like in the second gist<br/>automatically by supplying a haskell-like declaration of the data type.<br/><br/>(skip to the end of the mail for the code)<br/><br/>Here&#39;s what it can do:<br/><br/> my %res = create_adt(&quot;Tree = Branch Tree left, Tree right | Leaf Str storage&quot;);<br/> my \Tree = %res&lt;Tree&gt;;<br/><br/> # create the tree with named parameters<br/> my $t =<br/> Tree.new-branch(<br/> :left(Tree.new-branch(<br/> :left(Tree.new-leaf(:storage(1))),<br/> :right(Tree.new-leaf(:storage(2))))),<br/> :right(Tree.new-leaf(:storage(3))));<br/><br/> # create the tree with positional arguments<br/> my $t2 =<br/> Tree.new-branch(<br/> Tree.new-branch(<br/> Tree.new-leaf(1),<br/> Tree.new-leaf(2)),<br/> Tree.new-leaf(3));<br/> say $t2.gist;<br/> # outputs: (reformatted for email)<br/> # Tree.new-branch(<br/> # left =&gt; Tree.new-branch(<br/> # left =&gt; Tree.new-leaf(storage =&gt; 1),<br/> # right =&gt; Tree.new-leaf(storage =&gt; 2)),<br/> # right =&gt; Tree.new-leaf(storage =&gt; 3))<br/><br/> my \Branch = %res&lt;Branch&gt;;<br/> my \Leaf = %res&lt;Leaf&gt;;<br/><br/> # haskell-style map for the tree<br/> sub treemap($t, *&amp;code) {<br/> given $t {<br/> when Branch {<br/> return Tree.new-branch(<br/> treemap($t.left, &amp;code),<br/> treemap($t.right, &amp;code))<br/> }<br/> when Leaf {<br/> return Tree.new-leaf(code($t.storage))<br/> }<br/> }<br/> }<br/><br/> say treemap($t2, * * 10).gist;<br/> # outputs:<br/> # Tree.new-branch(<br/> # left =&gt; Tree.new-branch(<br/> # left =&gt; Tree.new-leaf(storage =&gt; 10),<br/> # right =&gt; Tree.new-leaf(storage =&gt; 20)),<br/> # right =&gt; Tree.new-leaf(storage =&gt; 30))<br/><br/><br/>There are currently some limitations:<br/><br/>1) there is no compiler support for checking that all cases have been covered,<br/> but as masak mentioned, I&#39;m confident this can be done with a macro, because<br/> those run at compile-time basically.<br/>2) you cannot yet use Leaf and Branch for declaring multi subs, because the<br/> symbols are not there at compile-time, but see below.<br/>3) I have not yet figured out how to properly do pattern matching/decomposing,<br/> so the names &quot;left&quot;, &quot;right&quot; and &quot;storage&quot; need to be supplied in the<br/> definition unlike in haskell.<br/>4) I&#39;m not sure how to do type parameters (think data Tree A = ...), because<br/> perl6 has only parametric roles, not parametric classes.<br/><br/>One thing rakudo needs to get for this to be much smoother is support for the<br/>sub EXPORT to return a hash-like of symbols that will be installed in the<br/>caller&#39;s package. This would make Tree, Branch and Leaf available as<br/>compile-time symbols, so that multi methods/subs can use them for dispatch.<br/><br/>I mean to turn this into a module for the perl6 modules list some time in the<br/>Future.<br/><br/>Finally, here&#39;s the runnable code. Feel free to play around with it and tell me<br/>on this mailing list or the IRC channel what further problems (or even<br/>solutions!) you find.<br/><br/>https://gist.github.com/timo/5226114<br/><br/>Have Fun!<br/> - Timo<br/> http://www.nntp.perl.org/group/perl.perl6.users/2013/04/msg1682.html Mon, 01 Apr 2013 16:56:39 +0000 Re: Packaging Perl 6 (or rather, Rakudo Star) by Moritz Lenz On 03/05/2013 12:02 PM, Rob Hoelz wrote:<br/>&gt; On 3/5/13 11:44 AM, Patrick R. Michaud wrote:<br/>&gt;&gt; On Tue, Mar 05, 2013 at 11:13:51AM +0100, Rob Hoelz wrote:<br/>&gt;&gt;&gt; I already have my own package for Arch Linux for Rakudo Star, and I keep<br/>&gt;&gt;&gt; the OS X homebrew package up-to-date as well. I&#39;d like to create an RPM<br/>&gt;&gt;&gt; spec file and a DEB spec file as well. I have two questions:<br/>&gt;&gt;&gt;<br/>&gt;&gt;&gt; 1) Do these spec files belong in the Rakudo Star repository?<br/>&gt;&gt; I have no problem with maintaining spec files in any of the<br/>&gt;&gt; Rakudo-related repos (NQP, Rakudo, Star).<br/>&gt;&gt;<br/>&gt;&gt;&gt; 2) Which makes more sense: having a Rakudo Star package that depends on<br/>&gt;&gt;&gt; a separate Rakudo package (so Rakudo Star would only consist of modules<br/>&gt;&gt;&gt; and applications), or having a Rakudo Star package that conflicts with a<br/>&gt;&gt;&gt; separate Rakudo package (so users may install one or the other)? [...]<br/>&gt;&gt; I suspect to ever be considered for official inclusion in Debian/Ubuntu<br/>&gt;&gt; distros, you&#39;d have to have the first option (separate compiler and<br/>&gt;&gt; module packages). And moreso: they likely prefer to see each module<br/>&gt;&gt; as its own package, rather than a single package containing a complete<br/>&gt;&gt; collection of modules. (I think module collections in the .deb world<br/>&gt;&gt; tend to be managed as packages with dependencies, as opposed to<br/>&gt;&gt; all-in-one packages.)<br/>&gt;<br/>&gt; That&#39;s a good point; that&#39;s probably the proper way to do things. Now<br/>&gt; to make that happen...<br/>&gt;&gt;<br/>&gt;&gt; It may also be worth noting/reminding that Rakudo Star has never been<br/>&gt;&gt; intended to be the &quot;only&quot; or even &quot;primary&quot; module collection, it&#39;s just<br/>&gt;&gt; one of the first. It could make good sense to come up with a new<br/>&gt;&gt; P6 distribution that is better tailored to the needs of OS distros.<br/>&gt;<br/>&gt; Another good point; should we hold off on making packages for Rakudo<br/>&gt; Star until something more appropriate comes along, or should we go<br/>&gt; ahead and make some packages? I would favor the latter, myself.<br/><br/>I think a good idea is to start packaging Rakudo, panda, perl6-debug and <br/>the various modules. And if/when all of the modules in Star are <br/>packaged, you can make a sort of meta package that depends on them all, <br/>and call it &#39;rakudo-star&#39;.<br/><br/>That&#39;s a bit of a bottom-up approach, which worked well in other areas <br/>of Perl 6 development.<br/><br/>Cheers,<br/>Moritz<br/> http://www.nntp.perl.org/group/perl.perl6.users/2013/03/msg1681.html Wed, 06 Mar 2013 02:01:21 +0000 Re: Packaging Perl 6 (or rather, Rakudo Star) by Parrot Raiser On Tue, Mar 5, 2013 at 6:07 AM, Patrick R. Michaud &lt;pmichaud@pobox.com&gt; wrote:<br/>&gt;<br/>&gt; Same here. I think &quot;something more appropriate&quot; is much more likely to<br/>&gt; arrive with the &quot;go ahead and make&quot; approach than the &quot;hold off&quot; one. :)<br/>&gt;<br/>I agree with Patrick. Experimenting with the packaging now should<br/>flush out the bugs before people seriously expect it to &quot;Just Work&quot;.<br/>Beta testers are much less likely to get upset if something doesn&#39;t,<br/>than users who really wanted to have something in production<br/>yesterday.<br/><br/>Before that day arrives, I think there&#39;s some work to be done on the<br/>perceived lag when Perl 6 is invoked. It&#39;s still noticeable, even on a<br/>fairly fast machine.<br/> http://www.nntp.perl.org/group/perl.perl6.users/2013/03/msg1680.html Tue, 05 Mar 2013 14:58:38 +0000 Re: Packaging Perl 6 (or rather, Rakudo Star) by Patrick R. Michaud On Tue, Mar 05, 2013 at 12:02:01PM +0100, Rob Hoelz wrote:<br/>&gt; On 3/5/13 11:44 AM, Patrick R. Michaud wrote:<br/>&gt; &gt; It may also be worth noting/reminding that Rakudo Star has never been<br/>&gt; &gt; intended to be the &quot;only&quot; or even &quot;primary&quot; module collection, it&#39;s just<br/>&gt; &gt; one of the first. It could make good sense to come up with a new<br/>&gt; &gt; P6 distribution that is better tailored to the needs of OS distros.<br/>&gt; <br/>&gt; Another good point; should we hold off on making packages for Rakudo<br/>&gt; Star until something more appropriate comes along, or should we go<br/>&gt; ahead and make some packages? I would favor the latter, myself.<br/><br/>Same here. I think &quot;something more appropriate&quot; is much more likely to<br/>arrive with the &quot;go ahead and make&quot; approach than the &quot;hold off&quot; one. :)<br/><br/>Pm<br/> http://www.nntp.perl.org/group/perl.perl6.users/2013/03/msg1679.html Tue, 05 Mar 2013 11:07:16 +0000 Re: Packaging Perl 6 (or rather, Rakudo Star) by Rob Hoelz On 3/5/13 11:44 AM, Patrick R. Michaud wrote:<br/>&gt; On Tue, Mar 05, 2013 at 11:13:51AM +0100, Rob Hoelz wrote:<br/>&gt;&gt; I already have my own package for Arch Linux for Rakudo Star, and I keep<br/>&gt;&gt; the OS X homebrew package up-to-date as well. I&#39;d like to create an RPM<br/>&gt;&gt; spec file and a DEB spec file as well. I have two questions:<br/>&gt;&gt;<br/>&gt;&gt; 1) Do these spec files belong in the Rakudo Star repository?<br/>&gt; I have no problem with maintaining spec files in any of the<br/>&gt; Rakudo-related repos (NQP, Rakudo, Star).<br/>&gt;<br/>&gt;&gt; 2) Which makes more sense: having a Rakudo Star package that depends on<br/>&gt;&gt; a separate Rakudo package (so Rakudo Star would only consist of modules<br/>&gt;&gt; and applications), or having a Rakudo Star package that conflicts with a<br/>&gt;&gt; separate Rakudo package (so users may install one or the other)? [...]<br/>&gt; I suspect to ever be considered for official inclusion in Debian/Ubuntu<br/>&gt; distros, you&#39;d have to have the first option (separate compiler and<br/>&gt; module packages). And moreso: they likely prefer to see each module<br/>&gt; as its own package, rather than a single package containing a complete<br/>&gt; collection of modules. (I think module collections in the .deb world <br/>&gt; tend to be managed as packages with dependencies, as opposed to <br/>&gt; all-in-one packages.)<br/><br/>That&#39;s a good point; that&#39;s probably the proper way to do things. Now<br/>to make that happen...<br/>&gt;<br/>&gt; It may also be worth noting/reminding that Rakudo Star has never been<br/>&gt; intended to be the &quot;only&quot; or even &quot;primary&quot; module collection, it&#39;s just<br/>&gt; one of the first. It could make good sense to come up with a new<br/>&gt; P6 distribution that is better tailored to the needs of OS distros.<br/><br/>Another good point; should we hold off on making packages for Rakudo<br/>Star until something more appropriate comes along, or should we go<br/>ahead and make some packages? I would favor the latter, myself.<br/><br/>-Rob<br/> http://www.nntp.perl.org/group/perl.perl6.users/2013/03/msg1678.html Tue, 05 Mar 2013 11:00:58 +0000 Re: Packaging Perl 6 (or rather, Rakudo Star) by Patrick R. Michaud On Tue, Mar 05, 2013 at 11:13:51AM +0100, Rob Hoelz wrote:<br/>&gt; I already have my own package for Arch Linux for Rakudo Star, and I keep<br/>&gt; the OS X homebrew package up-to-date as well. I&#39;d like to create an RPM<br/>&gt; spec file and a DEB spec file as well. I have two questions:<br/>&gt; <br/>&gt; 1) Do these spec files belong in the Rakudo Star repository?<br/><br/>I have no problem with maintaining spec files in any of the<br/>Rakudo-related repos (NQP, Rakudo, Star).<br/><br/>&gt; 2) Which makes more sense: having a Rakudo Star package that depends on<br/>&gt; a separate Rakudo package (so Rakudo Star would only consist of modules<br/>&gt; and applications), or having a Rakudo Star package that conflicts with a<br/>&gt; separate Rakudo package (so users may install one or the other)? [...]<br/><br/>I suspect to ever be considered for official inclusion in Debian/Ubuntu<br/>distros, you&#39;d have to have the first option (separate compiler and<br/>module packages). And moreso: they likely prefer to see each module<br/>as its own package, rather than a single package containing a complete<br/>collection of modules. (I think module collections in the .deb world <br/>tend to be managed as packages with dependencies, as opposed to <br/>all-in-one packages.)<br/><br/>It may also be worth noting/reminding that Rakudo Star has never been<br/>intended to be the &quot;only&quot; or even &quot;primary&quot; module collection, it&#39;s just<br/>one of the first. It could make good sense to come up with a new<br/>P6 distribution that is better tailored to the needs of OS distros.<br/><br/>Pm<br/> http://www.nntp.perl.org/group/perl.perl6.users/2013/03/msg1677.html Tue, 05 Mar 2013 10:52:57 +0000 Packaging Perl 6 (or rather, Rakudo Star) by Rob Hoelz Hi everyone,<br/><br/>There was some discussion on #perl6 yesterday on what requirements are<br/>necessary for Perl 6 to be considered &quot;production ready&quot;, and moritz++<br/>made a quick list (https://gist.github.com/moritz/5082925) of the top of<br/>his head including deployment in major free OSes. This is one area<br/>where I feel I could be of help, as I feel it&#39;s extremely important to<br/>have Linux/BSD packages in order to be taken seriously, and it&#39;s<br/>something that doesn&#39;t require intimate knowledge of how Rakudo works.<br/><br/>I already have my own package for Arch Linux for Rakudo Star, and I keep<br/>the OS X homebrew package up-to-date as well. I&#39;d like to create an RPM<br/>spec file and a DEB spec file as well. I have two questions:<br/><br/>1) Do these spec files belong in the Rakudo Star repository?<br/><br/>2) Which makes more sense: having a Rakudo Star package that depends on<br/>a separate Rakudo package (so Rakudo Star would only consist of modules<br/>and applications), or having a Rakudo Star package that conflicts with a<br/>separate Rakudo package (so users may install one or the other)? I<br/>think the former is less confusing (the latter may lead to people asking<br/>&quot;well, which one do I install&quot;), but the former is probably a little<br/>harder to do.<br/><br/>-Rob<br/> http://www.nntp.perl.org/group/perl.perl6.users/2013/03/msg1676.html Tue, 05 Mar 2013 10:12:49 +0000 Re: Per-Object Roles.. by Carl Mäsak Frank (&gt;&gt;), Moritz (&gt;):<br/>&gt;&gt; Hi, I am new to Perl6 and I&#39;m interested in the feature that allows you to<br/>&gt;&gt; add roles to classes. From what I understand you can add a role to an<br/>&gt;&gt; object using the &quot;does&quot; keyword. Is there any way you can remove a role or<br/>&gt;<br/>&gt; No, you cannot remove roles.<br/><br/>However, if you want an un-adorned object later, just use infix:&lt;but&gt;,<br/>and keep the original object around.<br/><br/> class C {<br/> has $.name = &quot;original&quot;;<br/> }<br/><br/> role W {<br/> method name { &quot;wrapped&quot; }<br/> }<br/><br/> my $original = C.new;<br/> {<br/> my $wrapped = $original but W;<br/> say $wrapped.name; # &quot;wrapped&quot;<br/> say $wrapped ~~ W; # True<br/> }<br/> say $original.name; # &quot;original&quot;<br/> say $original ~~ W; # False<br/><br/>// Carl<br/> http://www.nntp.perl.org/group/perl.perl6.users/2013/03/msg1675.html Mon, 04 Mar 2013 20:05:06 +0000 Re: hyperoperator bug? «~» != <<~>> by Carl Mäsak No, both programs are wrong, not correct. The bug is that Rakudo<br/>accepts the first one, not that it rejects the second one. The error<br/>message to the second one looks correct to me. (It tries to hash-index<br/>the list of stuff the .map generated.)<br/><br/>&lt;masak&gt; r: .say for (1, 2, 3) &lt;&lt;~&gt;&gt; &quot;!&quot;; .say for (1, 2, 3) &laquo;~&raquo; &quot;!&quot;;<br/>.say for (1, 2, 3)&laquo;~&raquo;&quot;!&quot;<br/>&lt;p6eval&gt; rakudo 87ad7c: OUTPUT&laquo;1!&#x2424;2!&#x2424;3!&#x2424;1!&#x2424;2!&#x2424;3!&#x2424;1!&#x2424;2!&#x2424;3!&#x2424;&raquo;<br/>&lt;masak&gt; r: .say for (1, 2, 3)&lt;&lt;~&gt;&gt;&quot;!&quot;<br/>&lt;p6eval&gt; rakudo 87ad7c: OUTPUT&laquo;===SORRY!===&#x2424;Two terms in a row&#x2424;at<br/>/tmp/Kg__QjZ4yV:1&#x2424;------&gt; .say for (1, 2, 3)&lt;&lt;~&gt;&gt;&#x23CF;&quot;!&quot;&#x2424; [...]<br/>* masak submits rakudobug<br/>&lt;jnthn&gt; masak: It parsed as a subscript<br/>&lt;masak&gt; jnthn: I know.<br/>&lt;jnthn&gt; masak: Yes, and STD does it too.<br/>&lt;jnthn&gt; masak: It&#39;s not a bug.<br/>&lt;masak&gt; jnthn: responding to Ovid&#39;s p6u email from a week ago.<br/>&lt;masak&gt; jnthn: the fact that it parses as a subscript isn&#39;t the bug.<br/>&lt;masak&gt; jnthn: look at the evaluation before.<br/>&lt;masak&gt; it parses as a subscript when it&#39;s &lt;&lt;~&gt;&gt;, but not when it&#39;s &laquo;~&raquo;<br/>&lt;jnthn&gt; oh...<br/>&lt;jnthn&gt; Yeah, that&#39;s &#39;cus we&#39;re missing those quotes in the grammar somehow<br/>&lt;masak&gt; that&#39;s the bug.<br/>&lt;jnthn&gt; masak: OK, fair enough.<br/><br/>// masak<br/><br/>On Mon, Feb 25, 2013 at 11:56 AM, Ovid &lt;curtis_ovid_poe@yahoo.com&gt; wrote:<br/>&gt; I was playing with this code: https://github.com/Keith-S-Thompson/fizzbuzz-polyglot/blob/master/fizzbuzz.pl6<br/>&gt;<br/>&gt; [~](((1..100).map: {<br/>&gt; $_ % 15 == 0 ?? &quot;FizzBuzz&quot; !!<br/>&gt; $_ % 3 == 0 ?? &quot;Fizz&quot; !!<br/>&gt; $_ % 5 == 0 ?? &quot;Buzz&quot; !!<br/>&gt; $_<br/>&gt; })&laquo;~&raquo;(&quot;\n&quot;)).print;<br/>&gt;<br/>&gt; I was cleaning it up and since not everyone can type guillemets, I wound up with this:<br/>&gt;<br/>&gt; [~](((1..100).map: {<br/>&gt; $_ %% 15 ?? &quot;FizzBuzz&quot; !!<br/>&gt; $_ %% 3 ?? &quot;Fizz&quot; !!<br/>&gt; $_ %% 5 ?? &quot;Buzz&quot; !!<br/>&gt; $_<br/>&gt; })&lt;&lt;~&gt;&gt;(&quot;\n&quot;)).print;<br/>&gt;<br/>&gt; That generated this error:<br/>&gt;<br/>&gt; No such method &#39;postcircumfix:&lt;( )&gt;&#39; for invocant of type &#39;Parcel&#39;<br/>&gt; in at src/gen/BOOTSTRAP.pm:852<br/>&gt; in any at src/gen/BOOTSTRAP.pm:836<br/>&gt; in block at fizzbuzz.p6:6<br/>&gt;<br/>&gt; Reverting to guillemets fixes the problem. Is this a Rakudo bug or are double angle brackets not interchangeable with guillemets?<br/>&gt;<br/>&gt;<br/>&gt; bin/perl6 -v<br/>&gt; This is perl6 version 2013.01 built on parrot 4.10.0 revision 0<br/>&gt;<br/>&gt; Cheers,<br/>&gt; Ovid<br/>&gt; --<br/>&gt; Twitter - http://twitter.com/OvidPerl/<br/>&gt; Buy my book - http://bit.ly/beginning_perl<br/>&gt; Buy my other book - http://www.oreilly.com/catalog/perlhks/<br/>&gt; Live and work overseas - http://www.overseas-exile.com/<br/> http://www.nntp.perl.org/group/perl.perl6.users/2013/03/msg1674.html Mon, 04 Mar 2013 19:56:47 +0000 Re: Per-Object Roles.. by Frank White OK Moritz...<br/><br/>Thanks for the feedback.<br/><br/><br/>On Sun, Feb 24, 2013 at 2:24 AM, Moritz Lenz &lt;moritz@faui2k3.org&gt; wrote:<br/><br/>&gt; Hi Frank,<br/>&gt;<br/>&gt; On 02/24/2013 07:27 AM, Frank White wrote:<br/>&gt; &gt; Hi, I am new to Perl6 and I&#39;m interested in the feature that allows you<br/>&gt; to<br/>&gt; &gt; add roles to classes. From what I understand you can add a role to an<br/>&gt; &gt; object using the &quot;does&quot; keyword. Is there any way you can remove a role<br/>&gt; or<br/>&gt;<br/>&gt; No, you cannot remove roles.<br/>&gt;<br/>&gt; &gt; check to see if a role is attached to an object?<br/>&gt;<br/>&gt; With normal type checking:<br/>&gt;<br/>&gt; if $obj ~~ YourRole {<br/>&gt; ...<br/>&gt; }<br/>&gt;<br/>&gt; Cheers,<br/>&gt; Moritz<br/>&gt;<br/><br/> http://www.nntp.perl.org/group/perl.perl6.users/2013/02/msg1673.html Mon, 25 Feb 2013 15:34:15 +0000 hyperoperator bug? «~» != <<~>> by Ovid I was playing with this code:&nbsp;https://github.com/Keith-S-Thompson/fizzbuzz-polyglot/blob/master/fizzbuzz.pl6<br/><br/>&nbsp; &nbsp;&nbsp;[~](((1..100).map: {<br/>&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; $_ % 15 == 0 ?? &quot;FizzBuzz&quot; !!<br/>&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; $_ % &nbsp;3 == 0 ?? &quot;Fizz&quot; !!<br/>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;$_ % &nbsp;5 == 0 ?? &quot;Buzz&quot; !!<br/>&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; $_<br/>&nbsp; &nbsp; })&laquo;~&raquo;(&quot;\n&quot;)).print;<br/>&nbsp;<br/>I was cleaning it up and since not everyone can type guillemets, I wound up with this:<br/><br/>&nbsp; &nbsp; [~](((1..100).map: {<br/>&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; $_ %% 15 ?? &quot;FizzBuzz&quot; !!<br/>&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; $_ %% &nbsp;3 ?? &quot;Fizz&quot; &nbsp; &nbsp; !!<br/>&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; $_ %% &nbsp;5 ?? &quot;Buzz&quot; &nbsp; &nbsp; !!<br/>&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; $_<br/>&nbsp; &nbsp;&nbsp;})&lt;&lt;~&gt;&gt;(&quot;\n&quot;)).print;<br/><br/>That generated this error:<br/><br/>&nbsp; &nbsp;&nbsp;No such method &#39;postcircumfix:&lt;( )&gt;&#39; for invocant of type &#39;Parcel&#39;<br/>&nbsp; &nbsp;&nbsp;&nbsp; in &nbsp;at src/gen/BOOTSTRAP.pm:852<br/>&nbsp; &nbsp;&nbsp;&nbsp; in any &nbsp;at src/gen/BOOTSTRAP.pm:836<br/>&nbsp; &nbsp;&nbsp;&nbsp; in block &nbsp;at fizzbuzz.p6:6<br/><br/>Reverting to guillemets fixes the problem. Is this a Rakudo bug or are double angle brackets not interchangeable with guillemets?<br/><br/><br/>&nbsp; &nbsp; bin/perl6 -v<br/>&nbsp; &nbsp; This is perl6 version 2013.01 built on parrot 4.10.0 revision 0<br/><br/>Cheers,<br/>Ovid<br/>--<br/>Twitter - http://twitter.com/OvidPerl/<br/>Buy my book -&nbsp;http://bit.ly/beginning_perl<br/>Buy my other book - http://www.oreilly.com/catalog/perlhks/<br/>Live and work overseas - http://www.overseas-exile.com/<br/> http://www.nntp.perl.org/group/perl.perl6.users/2013/02/msg1672.html Mon, 25 Feb 2013 10:56:17 +0000 Announce: Rakudo Star 2013.02 released by Moritz Lenz On behalf of the Rakudo and Perl 6 development teams, I&#39;m happy to<br/>announce the February 2013 release of &quot;Rakudo Star&quot;, a useful and<br/>usable distribution of Perl 6. The tarball for the February 2013<br/>release is available from &lt;http://rakudo.org/downloads/star/&gt;.<br/>A Windows .MSI version of Rakudo star will usually appear in<br/>the downloads area shortly after the tarball release.<br/><br/>In the Perl 6 world, we make a distinction between the language<br/>(&quot;Perl 6&quot;) and specific implementations of the language such as<br/>&quot;Rakudo Perl&quot;. This Star release includes release 2013.02.1 [0] of the<br/>Rakudo Perl 6 compiler [1], version 4.10.0 of the Parrot Virtual<br/>Machine [2], and various modules, documentation, and other<br/>resources collected from the Perl 6 community.<br/><br/>Some of the new features added to this release include:<br/><br/>* &quot;Did you mean ...&quot; suggestions for symbol-not-found errors<br/><br/>* Compile-time optimization of some cases of junctions in boolean context<br/><br/>* IO::Socket.get now works again with non-ASCII characters<br/><br/>* constant folding for routines marked as &#39;is pure&#39;<br/><br/>* natively typed variables and better error reporting in the REPL<br/><br/>* speed up eqv-comparison of Bufs<br/><br/>* warnings for useless use of (some) literals, variables and constant<br/> expressions in sink context<br/><br/><br/>This release also contains a range of bug fixes, improvements to error <br/>reporting<br/>and better failure modes.<br/><br/>The following features have been deprecated or modified from previous<br/>releases due to changes in the Perl 6 specification, and are being removed<br/>or changed as follows:<br/><br/>* .gist on a type object will return &#39;(Typename)&#39; instead of &#39;Typename()&#39;.<br/> If you want to get the class name alone, continue to use $obj.^name<br/><br/>* postcircumfix:&lt;[ ]&gt; and postcircumfix:&lt;{ }&gt; will become multi-subs rather<br/> than multi-methods. Both at_pos and at_key will remain methods.<br/><br/>* Unary hyper ops currently descend into nested arrays and hashes.<br/> This will change to make them equivalent to a one-level map.<br/><br/>* The Str.ucfirst builtin is deprecated; it will be replaced by Str.tc.<br/><br/>* Leading whitespace in rules and under :sigspace will no longer be<br/> converted to &lt;.ws&gt; . For existing regexes that expect this conversion,<br/> add a &lt;?&gt; in front of leading whitespace to make it meta again.<br/><br/>* The ?-quantifier on captures in regexes currently binds the capture<br/> slot to a List containing either zero or one Match objects; i.e., it<br/> is equivalent to &quot;** 0..1&quot;. In the future, the ?-quantifier will<br/> bind the slot directly to a captured Match or to Nil. Existing code<br/> can manage the transition by changing existing ?-quantifiers to<br/> use &quot;** 0..1&quot;, which will continue to return a List of matches.<br/><br/>There are some key features of Perl 6 that Rakudo Star does not<br/>yet handle appropriately, although they will appear in upcoming<br/>releases. Some of the not-quite-there features include:<br/><br/> * advanced macros<br/> * threads and concurrency<br/> * Unicode strings at levels other than codepoints<br/> * interactive readline that understands Unicode<br/> * non-blocking I/O<br/> * much of Synopsis 9<br/><br/>There is an online resource at http://perl6.org/compilers/features<br/>that lists the known implemented and missing features of Rakudo<br/>and other Perl 6 implementations.<br/><br/>In many places we&#39;ve tried to make Rakudo smart enough to inform the<br/>programmer that a given feature isn&#39;t implemented, but there are<br/>many that we&#39;ve missed. Bug reports about missing and broken<br/>features are welcomed at &lt;rakudobug@perl.org&gt;.<br/><br/>See http://perl6.org/ for links to much more information about<br/>Perl 6, including documentation, example code, tutorials, reference<br/>materials, specification documents, and other supporting resources.<br/>A draft of a Perl 6 book is available as &lt;docs/UsingPerl6-draft.pdf&gt;<br/>in the release tarball.<br/><br/>The development team thanks all of the contributors and sponsors<br/>for making Rakudo Star possible. If you would like to contribute,<br/>see &lt;http://rakudo.org/how-to-help&gt;, ask on the perl6-compiler@perl.org<br/>mailing list, or join us on IRC #perl6 on freenode.<br/><br/>[0] https://github.com/rakudo/rakudo/blob/nom/docs/announce/2013.01<br/>[1] http://github.com/rakudo/rakudo<br/>[2] http://parrot.org/<br/> http://www.nntp.perl.org/group/perl.perl6.users/2013/02/msg1671.html Sun, 24 Feb 2013 19:22:50 +0000 Re: Per-Object Roles.. by Moritz Lenz Hi Frank,<br/><br/>On 02/24/2013 07:27 AM, Frank White wrote:<br/>&gt; Hi, I am new to Perl6 and I&#39;m interested in the feature that allows you to<br/>&gt; add roles to classes. From what I understand you can add a role to an<br/>&gt; object using the &quot;does&quot; keyword. Is there any way you can remove a role or<br/><br/>No, you cannot remove roles.<br/><br/>&gt; check to see if a role is attached to an object? <br/><br/>With normal type checking:<br/><br/>if $obj ~~ YourRole {<br/> ...<br/>}<br/><br/>Cheers,<br/>Moritz<br/> http://www.nntp.perl.org/group/perl.perl6.users/2013/02/msg1670.html Sun, 24 Feb 2013 07:24:20 +0000 Per-Object Roles.. by Frank White Hi, I am new to Perl6 and I&#39;m interested in the feature that allows you to<br/>add roles to classes. From what I understand you can add a role to an<br/>object using the &quot;does&quot; keyword. Is there any way you can remove a role or<br/>check to see if a role is attached to an object? I couldn&#39;t find that in<br/>the documentation on the website.<br/><br/>Any comments are appreciated...<br/><br/>Thanks in advance,<br/>Frank<br/><br/> http://www.nntp.perl.org/group/perl.perl6.users/2013/02/msg1669.html Sun, 24 Feb 2013 06:27:32 +0000 Re: Perl 6 / Rakudo unicode code point ranges by David Warring Hi Will,<br/><br/>On Wed, Feb 20, 2013 at 3:52 AM, Will Coleda &lt;will@coleda.com&gt; wrote:<br/><br/>&gt; The code points giving you trouble are 0xFDD0..0xFDEF:<br/>&gt;<br/>&gt;<br/>&gt; http://stackoverflow.com/questions/5188679/whats-the-purpose-of-the-noncharacters-ufdd0-to-ufdef<br/>&gt;<br/>&gt; You can split this into two ranges to avoid the problematic points (and<br/>&gt; could use this to combine the distinct ranges you have above.)<br/>&gt;<br/>&gt; $ perl6 -e &#39;say ?(&quot;\c[0xFDCF]&quot; ~~<br/>&gt; /&lt;[\c[0xE000]..\c[0xFDCF]\c[0xFDF0]..\c[0xFFFD]]&gt;/)&#39;<br/>&gt; True<br/>&gt;<br/><br/>Thanks for clarifying that.<br/><br/>&gt;<br/>&gt; Note that if you have invalid UTF-8 input, though, you&#39;ll still get the<br/>&gt; invalid character error, so you&#39;ll need to deal with that before trying to<br/>&gt; use the rule.<br/>&gt;<br/>&gt; $ perl6 -e &#39;say ?(&quot;\c[0xFDD0]&quot; ~~<br/>&gt; /&lt;[\c[0xE000]..\c[0xFDCF]\c[0xFDF0]..\c[0xFFFD]]&gt;/)&#39;<br/>&gt; ===SORRY!===<br/>&gt; Invalid character for UTF-8 encoding<br/>&gt;<br/>&gt; Hope this helps.<br/>&gt;<br/>&gt;<br/>&gt; Yes I think so. The rule seems to be trying to step around invalid<br/>code-points; and every thing that it rejects blows up when you try to<br/>encode it anyway.<br/><br/>So as long as I&#39;m only parsing encoded strings, the following much simpler<br/>rule should suffice:<br/><br/> token nonascii {&lt;- [\x0..\x7F]&gt;}<br/><br/>(also using \x7F rather than \c[0x7F] - as suggested)<br/><br/>Thanks,<br/>- David<br/><br/><br/>&gt; On Mon, Feb 18, 2013 at 11:29 PM, David Warring &lt;david.warring@gmail.com&gt;wrote:<br/>&gt;<br/>&gt;&gt; Hi Guys,<br/>&gt;&gt; A quick question.<br/>&gt;&gt;<br/>&gt;&gt; I&#39;m trying to interpret unicode code-point ranges from the CSS 3 spec -<br/>&gt;&gt; http://www.w3.org/TR/css3-syntax/#CHARSETS<br/>&gt;&gt;<br/>&gt;&gt; The rule in question is<br/>&gt;&gt;<br/>&gt;&gt; nonascii :== #x80-#xD7FF #xE000-#xFFFD #x10000-#x10FFFF<br/>&gt;&gt;<br/>&gt;&gt; Where (I think) these are unicode code-point ranges.<br/>&gt;&gt;<br/>&gt;&gt; The latest rakudo build is fine with:<br/>&gt;&gt;<br/>&gt;&gt;<br/>&gt;&gt; % perl6 -e perl6 -e &#39;/&lt;[\c[0x80]..\c[0xD7FF]]&gt;/&#39;<br/>&gt;&gt;<br/>&gt;&gt;<br/>&gt;&gt; ...but doesn&#39;t like the second (or third) range:<br/>&gt;&gt;<br/>&gt;&gt;<br/>&gt;&gt; % perl6 -e &#39;/&lt;[\c[0xE000]..\c[0xFFFD]]&gt;/&#39;<br/>&gt;&gt; ===SORRY!===<br/>&gt;&gt; Invalid character for UTF-8 encoding<br/>&gt;&gt;<br/>&gt;&gt;<br/>&gt;&gt; ...the individual code points are ok:<br/>&gt;&gt;<br/>&gt;&gt;<br/>&gt;&gt; % perl6 -e &#39;/&lt;[\c[0xE000]]&gt;/&#39;<br/>&gt;&gt; % perl6 -e &#39;/&lt;[\c[0xFFFD]]&gt;/&#39;<br/>&gt;&gt;<br/>&gt;&gt;<br/>&gt;&gt; I&#39;m think I&#39;m getting the above error because not all unicode code-points<br/>&gt;&gt; are defined for the range xE000 to xFFFD - see<br/>&gt;&gt; http://www.utf8-chartable.de/unicode-utf8-table.pl .<br/>&gt;&gt;<br/>&gt;&gt; I&#39;m just having a problem implementing a concise regex/grammar rule for<br/>&gt;&gt; the<br/>&gt;&gt; above. Looking for advice.<br/>&gt;&gt;<br/>&gt;&gt; Cheers,<br/>&gt;&gt; David Warring<br/>&gt;&gt;<br/>&gt;<br/>&gt;<br/>&gt;<br/>&gt; --<br/>&gt; Will &quot;Coke&quot; Coleda<br/>&gt;<br/><br/> http://www.nntp.perl.org/group/perl.perl6.users/2013/02/msg1668.html Wed, 20 Feb 2013 22:56:23 +0000 Re: Perl 6 / Rakudo unicode code point ranges by Larry Wall In addition what Will said, you don&#39;t have to write \c[0xFFFD], since \xFFFD should do the same.<br/><br/>Larry<br/> http://www.nntp.perl.org/group/perl.perl6.users/2013/02/msg1667.html Wed, 20 Feb 2013 19:29:40 +0000 Re: Perl 6 / Rakudo unicode code point ranges by Will Coleda The code points giving you trouble are 0xFDD0..0xFDEF:<br/><br/>http://stackoverflow.com/questions/5188679/whats-the-purpose-of-the-noncharacters-ufdd0-to-ufdef<br/><br/>You can split this into two ranges to avoid the problematic points (and<br/>could use this to combine the distinct ranges you have above.)<br/><br/>$ perl6 -e &#39;say ?(&quot;\c[0xFDCF]&quot; ~~<br/>/&lt;[\c[0xE000]..\c[0xFDCF]\c[0xFDF0]..\c[0xFFFD]]&gt;/)&#39;<br/>True<br/><br/>Note that if you have invalid UTF-8 input, though, you&#39;ll still get the<br/>invalid character error, so you&#39;ll need to deal with that before trying to<br/>use the rule.<br/><br/>$ perl6 -e &#39;say ?(&quot;\c[0xFDD0]&quot; ~~<br/>/&lt;[\c[0xE000]..\c[0xFDCF]\c[0xFDF0]..\c[0xFFFD]]&gt;/)&#39;<br/>===SORRY!===<br/>Invalid character for UTF-8 encoding<br/><br/>Hope this helps.<br/><br/><br/><br/>On Mon, Feb 18, 2013 at 11:29 PM, David Warring &lt;david.warring@gmail.com&gt;wrote:<br/><br/>&gt; Hi Guys,<br/>&gt; A quick question.<br/>&gt;<br/>&gt; I&#39;m trying to interpret unicode code-point ranges from the CSS 3 spec -<br/>&gt; http://www.w3.org/TR/css3-syntax/#CHARSETS<br/>&gt;<br/>&gt; The rule in question is<br/>&gt;<br/>&gt; nonascii :== #x80-#xD7FF #xE000-#xFFFD #x10000-#x10FFFF<br/>&gt;<br/>&gt; Where (I think) these are unicode code-point ranges.<br/>&gt;<br/>&gt; The latest rakudo build is fine with:<br/>&gt;<br/>&gt;<br/>&gt; % perl6 -e perl6 -e &#39;/&lt;[\c[0x80]..\c[0xD7FF]]&gt;/&#39;<br/>&gt;<br/>&gt;<br/>&gt; ...but doesn&#39;t like the second (or third) range:<br/>&gt;<br/>&gt;<br/>&gt; % perl6 -e &#39;/&lt;[\c[0xE000]..\c[0xFFFD]]&gt;/&#39;<br/>&gt; ===SORRY!===<br/>&gt; Invalid character for UTF-8 encoding<br/>&gt;<br/>&gt;<br/>&gt; ...the individual code points are ok:<br/>&gt;<br/>&gt;<br/>&gt; % perl6 -e &#39;/&lt;[\c[0xE000]]&gt;/&#39;<br/>&gt; % perl6 -e &#39;/&lt;[\c[0xFFFD]]&gt;/&#39;<br/>&gt;<br/>&gt;<br/>&gt; I&#39;m think I&#39;m getting the above error because not all unicode code-points<br/>&gt; are defined for the range xE000 to xFFFD - see<br/>&gt; http://www.utf8-chartable.de/unicode-utf8-table.pl .<br/>&gt;<br/>&gt; I&#39;m just having a problem implementing a concise regex/grammar rule for the<br/>&gt; above. Looking for advice.<br/>&gt;<br/>&gt; Cheers,<br/>&gt; David Warring<br/>&gt;<br/><br/><br/><br/>-- <br/>Will &quot;Coke&quot; Coleda<br/><br/> http://www.nntp.perl.org/group/perl.perl6.users/2013/02/msg1666.html Tue, 19 Feb 2013 16:52:53 +0000 Perl 6 / Rakudo unicode code point ranges by David Warring Hi Guys,<br/>A quick question.<br/><br/>I&#39;m trying to interpret unicode code-point ranges from the CSS 3 spec -<br/>http://www.w3.org/TR/css3-syntax/#CHARSETS<br/><br/>The rule in question is<br/><br/>nonascii :== #x80-#xD7FF #xE000-#xFFFD #x10000-#x10FFFF<br/><br/>Where (I think) these are unicode code-point ranges.<br/><br/>The latest rakudo build is fine with:<br/><br/><br/>% perl6 -e perl6 -e &#39;/&lt;[\c[0x80]..\c[0xD7FF]]&gt;/&#39;<br/><br/><br/>...but doesn&#39;t like the second (or third) range:<br/><br/><br/>% perl6 -e &#39;/&lt;[\c[0xE000]..\c[0xFFFD]]&gt;/&#39;<br/>===SORRY!===<br/>Invalid character for UTF-8 encoding<br/><br/><br/>...the individual code points are ok:<br/><br/><br/>% perl6 -e &#39;/&lt;[\c[0xE000]]&gt;/&#39;<br/>% perl6 -e &#39;/&lt;[\c[0xFFFD]]&gt;/&#39;<br/><br/><br/>I&#39;m think I&#39;m getting the above error because not all unicode code-points<br/>are defined for the range xE000 to xFFFD - see<br/>http://www.utf8-chartable.de/unicode-utf8-table.pl .<br/><br/>I&#39;m just having a problem implementing a concise regex/grammar rule for the<br/>above. Looking for advice.<br/><br/>Cheers,<br/>David Warring<br/><br/> http://www.nntp.perl.org/group/perl.perl6.users/2013/02/msg1665.html Tue, 19 Feb 2013 04:29:47 +0000 Re: Is there a p6doc equivalent to perltoc? by Gabor Szabo There is the index.pl in https://github.com/perl6/doc that generates<br/>the index.data file<br/>and can now list the words it found.<br/>It is a humble beginning of some indexing.<br/><br/>regards<br/> Gabor<br/><br/>On Fri, Feb 8, 2013 at 6:46 PM, Brian Wisti &lt;brian.wisti@gmail.com&gt; wrote:<br/>&gt; Hi all,<br/>&gt;<br/>&gt; Is there a documentation index of some kind accessible to p6doc? I&#39;m<br/>&gt; thinking of something equivalent to `perldoc perltoc`.<br/>&gt;<br/>&gt; Kind Regards,<br/>&gt;<br/>&gt; Brian Wisti<br/>&gt;<br/>&gt; --<br/>&gt; Brian Wisti - a random geek<br/>&gt; http://coolnamehere.com<br/> http://www.nntp.perl.org/group/perl.perl6.users/2013/02/msg1664.html Fri, 08 Feb 2013 20:20:57 +0000 Is there a p6doc equivalent to perltoc? by Brian Wisti Hi all,<br/><br/>Is there a documentation index of some kind accessible to p6doc? I&#39;m<br/>thinking of something equivalent to `perldoc perltoc`.<br/><br/>Kind Regards,<br/><br/>Brian Wisti<br/><br/>--<br/>Brian Wisti - a random geek<br/>http://coolnamehere.com<br/><br/> http://www.nntp.perl.org/group/perl.perl6.users/2013/02/msg1663.html Fri, 08 Feb 2013 16:47:15 +0000 Rakudo Star 2013.01 released by Moritz Lenz Announce: Rakudo Star - a useful, usable, &quot;early adopter&quot; distribution<br/>of Perl 6<br/><br/>On behalf of the Rakudo and Perl 6 development teams, I&#39;m happy to<br/>announce the January 2013 release of &quot;Rakudo Star&quot;, a useful and<br/>usable distribution of Perl 6. The tarball for the January 2013<br/>release is available from &lt;http://rakudo.org/downloads/star/&gt;.<br/>A Windows .MSI version of Rakudo star will usually appear in<br/>the downloads area shortly after the tarball release.<br/><br/>In the Perl 6 world, we make a distinction between the language<br/>(&quot;Perl 6&quot;) and specific implementations of the language such as<br/>&quot;Rakudo Perl&quot;. This Star release includes release 2013.01 [0] of the<br/>Rakudo Perl 6 compiler [1], version 4.10.0 of the Parrot Virtual<br/>Machine [2], and various modules, documentation, and other<br/>resources collected from the Perl 6 community.<br/><br/>Some of the new features added to this release include:<br/><br/>* Sink context (what some other languages call void context) is now<br/>enforced correctly. This means that for-loops are now lazy by default.<br/>It fixes the bug where a map in sink context would not execute, and<br/>also means that a Failure returned to sink context will be properly thrown.<br/><br/>* &#39;require&#39; now works with indirect module names<br/><br/>* Restored socket read semantics to returning the requested number of bytes<br/><br/>* $obj.Some::Role::meth() now passes the correct $obj<br/><br/>* try/CATCH now returns Nil when the CATCH is triggered, rather than the<br/> exception; this brings it in line with try without a CATCH<br/><br/>* whatever-star cases of splice now implemented<br/><br/>* can now import multis with the same name from different modules,<br/> provided all dispatchers are onlystar<br/><br/>This release also contains a range of bug fixes, improvements to error<br/>reporting and better failure modes.<br/><br/>The following features have been deprecated or modified from previous<br/>releases due to changes in the Perl 6 specification, and are being removed<br/>or changed as follows:<br/><br/>* postcircumfix:&lt;[ ]&gt; and postcircumfix:&lt;{ }&gt; will become multi-subs rather<br/> than multi-methods. Both at_pos and at_key will remain methods.<br/><br/>* Unary hyper ops currently descend into nested arrays and hashes.<br/> This will change to make them equivalent to a one-level map.<br/><br/>* The Str.ucfirst builtin is deprecated; it will be replaced by Str.tc.<br/><br/>* Leading whitespace in rules and under :sigspace will no longer be<br/>converted to &lt;.ws&gt; . For existing regexes that expect this conversion,<br/>add a &lt;?&gt; in front of leading whitespace to make it meta again.<br/><br/>* The ?-quantifier on captures in regexes currently binds the capture<br/> slot to a List containing either zero or one Match objects; i.e., it<br/> is equivalent to &quot;** 0..1&quot;. In the future, the ?-quantifier will<br/> bind the slot directly to a captured Match or to Nil. Existing code<br/> can manage the transition by changing existing ?-quantifiers to<br/> use &quot;** 0..1&quot;, which will continue to return a List of matches.<br/><br/>There are some key features of Perl 6 that Rakudo Star does not<br/>yet handle appropriately, although they will appear in upcoming<br/>releases. Some of the not-quite-there features include:<br/><br/> * advanced macros<br/> * threads and concurrency<br/> * Unicode strings at levels other than codepoints<br/> * interactive readline that understands Unicode<br/> * non-blocking I/O<br/> * much of Synopsis 9<br/><br/>There is an online resource at http://perl6.org/compilers/features<br/>that lists the known implemented and missing features of Rakudo<br/>and other Perl 6 implementations.<br/><br/>In many places we&#39;ve tried to make Rakudo smart enough to inform the<br/>programmer that a given feature isn&#39;t implemented, but there are<br/>many that we&#39;ve missed. Bug reports about missing and broken<br/>features are welcomed at &lt;rakudobug@perl.org&gt;.<br/><br/>See http://perl6.org/ for links to much more information about<br/>Perl 6, including documentation, example code, tutorials, reference<br/>materials, specification documents, and other supporting resources.<br/>A draft of a Perl 6 book is available as &lt;docs/UsingPerl6-draft.pdf&gt;<br/>in the release tarball.<br/><br/>The development team thanks all of the contributors and sponsors<br/>for making Rakudo Star possible. If you would like to contribute,<br/>see &lt;http://rakudo.org/how-to-help&gt;, ask on the perl6-compiler@perl.org<br/>mailing list, or join us on IRC #perl6 on freenode.<br/><br/>[0] https://github.com/rakudo/rakudo/blob/nom/docs/announce/2013.01<br/>[1] http://github.com/rakudo/rakudo<br/>[2] http://parrot.org/<br/> http://www.nntp.perl.org/group/perl.perl6.users/2013/01/msg1662.html Wed, 30 Jan 2013 18:54:35 +0000 Re: implementing every(N) by Ted Zlatanov On Tue, 8 Jan 2013 11:29:47 -0600 &quot;Patrick R. Michaud&quot; &lt;pmichaud@pobox.com&gt; wrote: <br/><br/>PRM&gt; On Tue, Jan 08, 2013 at 12:14:22PM -0500, Ted Zlatanov wrote:<br/>&gt;&gt; <br/>&gt;&gt; Since I&#39;m writing a module, I didn&#39;t think a one-liner was sufficient<br/>&gt;&gt; proof that state variables are reliable. Sorry I didn&#39;t make that<br/>&gt;&gt; clear. [...]<br/><br/>PRM&gt; Also, if the state variables currently behave as you expect, and we<br/>PRM&gt; want to insure their reliability for the future, add a spectest to <br/>PRM&gt; the &quot;roast&quot; suite. This way we&#39;ll also quickly discover if other <br/>PRM&gt; Perl 6 implementations differ on this point. :-) <br/><br/>Got it, thanks!<br/><br/>Ted<br/><br/> http://www.nntp.perl.org/group/perl.perl6.users/2013/01/msg1661.html Wed, 09 Jan 2013 16:13:43 +0000 Re: implementing every(N) by Patrick R. Michaud On Tue, Jan 08, 2013 at 12:14:22PM -0500, Ted Zlatanov wrote:<br/>&gt; On Mon, 7 Jan 2013 17:51:52 +0100 Carl M&auml;sak &lt;cmasak@gmail.com&gt; wrote: <br/>&gt; <br/>&gt; CM&gt; Ted (&gt;):<br/>&gt; &gt;&gt; Are state variables available now, or is the every(N) functionality<br/>&gt; &gt;&gt; possible in some other way now?<br/>&gt; <br/>&gt; CM&gt; Why not try it by writing a small program? :)<br/>&gt; CM&gt; $ perl6 -e &#39;sub foo { state $s = 0; say $s++ }; foo; foo; foo&#39;<br/>&gt;<br/>&gt; Since I&#39;m writing a module, I didn&#39;t think a one-liner was sufficient<br/>&gt; proof that state variables are reliable. Sorry I didn&#39;t make that<br/>&gt; clear. [...]<br/><br/>Also, if the state variables currently behave as you expect, and we<br/>want to insure their reliability for the future, add a spectest to <br/>the &quot;roast&quot; suite. This way we&#39;ll also quickly discover if other <br/>Perl 6 implementations differ on this point. :-) <br/><br/>Thanks!<br/><br/>Pm<br/> http://www.nntp.perl.org/group/perl.perl6.users/2013/01/msg1660.html Tue, 08 Jan 2013 17:29:57 +0000 Re: implementing every(N) by Ted Zlatanov On Mon, 7 Jan 2013 17:51:52 +0100 Carl M&auml;sak &lt;cmasak@gmail.com&gt; wrote: <br/><br/>CM&gt; Ted (&gt;):<br/>&gt;&gt; Are state variables available now, or is the every(N) functionality<br/>&gt;&gt; possible in some other way now?<br/><br/>CM&gt; Why not try it by writing a small program? :)<br/><br/>CM&gt; Rakudo is available at a discount right now -- download it before it&#39;s<br/>CM&gt; too late! -- and the syntax for state variables is the same as it&#39;s<br/>CM&gt; always been. The one-liner to find out is shorter than your question:<br/><br/>CM&gt; $ perl6 -e &#39;sub foo { state $s = 0; say $s++ }; foo; foo; foo&#39;<br/>CM&gt; 0<br/>CM&gt; 1<br/>CM&gt; 2<br/><br/>Thank you for the explanation.<br/><br/>Since I&#39;m writing a module, I didn&#39;t think a one-liner was sufficient<br/>proof that state variables are reliable. Sorry I didn&#39;t make that<br/>clear. I was worried about edge cases, and also wondered if there may<br/>be a better way to implement my proposal--I don&#39;t know Perl 6 and Rakudo<br/>well enough. It seems like state variables are best, right now.<br/><br/>Thanks!<br/>Ted<br/><br/> http://www.nntp.perl.org/group/perl.perl6.users/2013/01/msg1659.html Tue, 08 Jan 2013 17:14:49 +0000 Re: implementing every(N) by Carl Mäsak Ted (&gt;):<br/>&gt; Are state variables available now, or is the every(N) functionality<br/>&gt; possible in some other way now?<br/><br/>Why not try it by writing a small program? :)<br/><br/>Rakudo is available at a discount right now -- download it before it&#39;s<br/>too late! -- and the syntax for state variables is the same as it&#39;s<br/>always been. The one-liner to find out is shorter than your question:<br/><br/>$ perl6 -e &#39;sub foo { state $s = 0; say $s++ }; foo; foo; foo&#39;<br/>0<br/>1<br/>2<br/><br/>Regards,<br/>// Carl<br/> http://www.nntp.perl.org/group/perl.perl6.users/2013/01/msg1658.html Mon, 07 Jan 2013 16:52:00 +0000 Re: implementing every(N) by Ted Zlatanov On Fri, 30 Jul 2010 12:56:37 -0500 Ted Zlatanov &lt;tzz@lifelogs.com&gt; wrote: <br/><br/>TZ&gt; On Fri, 30 Jul 2010 12:19:16 -0500 &quot;Patrick R. Michaud&quot; &lt;pmichaud@pobox.com&gt; wrote: <br/><br/>PRM&gt; I suspect something like CALLER::&lt;$?FILE&gt; and CALLER::&lt;$?LINE&gt; might<br/>PRM&gt; eventually do what you want -- they would at least get to a unique<br/>PRM&gt; line within the calling. CALLER:: and $?FILE and $?LINE are not<br/>PRM&gt; yet implemented in Rakudo, but I suspect the language specification<br/>PRM&gt; has sufficient features to eventually make a clean implementation a <br/>PRM&gt; possibility.<br/><br/>TZ&gt; (also suggested by Moritz with state variables as the real solution)<br/><br/>TZ&gt; I could have used __LINE__ in Perl 5 as well but chose not to so<br/>TZ&gt; multiple calls to every() could be made on the same line. I&#39;d like to<br/>TZ&gt; provide the same functionality in Rakudo. So state variables seem like<br/>TZ&gt; the easiest solution outside of the core and I can wait until they are<br/>TZ&gt; available. If anyone thinks every() could go in the core or really<br/>TZ&gt; wants to see it ported sooner let me know :)<br/><br/>Are state variables available now, or is the every(N) functionality<br/>possible in some other way now?<br/><br/>Thanks<br/>Ted<br/><br/> http://www.nntp.perl.org/group/perl.perl6.users/2013/01/msg1657.html Mon, 07 Jan 2013 15:18:27 +0000 enc2xs and perl6 ? by Marc Chantreux hello guys,<br/><br/>As i think Perl6 can be the next reference langage for data integration<br/>in libraries systems, i&#39;m porting MARC::MIR and MARC::MIR::Template in<br/>Perl6.<br/><br/>Well &hellip; basic things are now working when it come to UTF8 files, but i<br/>have tons of data encoded in iso5426. I would like to resuse the ucm<br/>file i wrote for perl5 (https://github.com/eiro/p5-encode-iso5426) (not<br/>shipped on cpan because of poor quality on UTF8 fallbacks).<br/><br/>is there an existing tool/infrastructure to use this UCM file? what&#39;s<br/>the code/doc i have to read to make it real?<br/><br/>regards <br/>marc <br/> http://www.nntp.perl.org/group/perl.perl6.users/2013/01/msg1656.html Sat, 05 Jan 2013 12:19:58 +0000 Pygments hilighter for Perl 6 by Rob Hoelz Hi everyone,<br/><br/>For the past two weeks, I have been working on a Pygments syntax<br/>hilighter for Perl 6. It has finally reached a state where I feel<br/>it is ready to be tested by the community! If you have some Perl 6<br/>code and some spare time, please test it out. The code is located here:<br/><br/> https://bitbucket.org/hoelzro/pygments-main/<br/><br/>There are a few known issues right now, but I don&#39;t consider them<br/>significant enough to deter this announcement. Here they are:<br/><br/> * Lines like &#39;regex special_variable:sym&lt;{ }&gt;&#39; (ones containing an<br/> opening brace before the opening braces that signifies the start of<br/> the regex/method) don&#39;t match properly.<br/> * Some operators (like eq) are not parsed as operators.<br/> * Parameters to a token (ex. token something(@params)) are not<br/> correctly hilighted.<br/> * Adding/subtracting to/from character classes (ex. &lt;[...] + [...]&gt;)<br/> is not yet correctly hilighted.<br/> * role q { ... } is hilighted as a keyword and a string literal.<br/><br/>In addition to fixing these, I intend to implement the following<br/>features:<br/><br/> * Better type detection. Right now, a file is identified as Perl 6<br/> if the shebang line matches &#39;perl6&#39;, or if &#39;use v6&#39; is found. This<br/> can be improved.<br/> * Speed improvement. I haven&#39;t put any time into optimization, and<br/> this can likely be improved.<br/><br/>If you find any bugs, or better yet, if you have any improvements to<br/>submit, please let me know!<br/><br/>-Rob<br/><br/> http://www.nntp.perl.org/group/perl.perl6.users/2013/01/msg1655.html Wed, 02 Jan 2013 19:11:28 +0000 Announce: Rakudo Star 2012.12 release by Moritz Lenz Announce: Rakudo Star - a useful, usable, &quot;early adopter&quot; distribution<br/>of Perl 6<br/><br/>On behalf of the Rakudo and Perl 6 development teams, I&#39;m happy to<br/>announce the December 2012 release of &quot;Rakudo Star&quot;, a useful and<br/>usable distribution of Perl 6. The tarball for the December 2012<br/>release is available from &lt;http://rakudo.org/downloads/star/&gt;.<br/>A Windows .MSI version of Rakudo star will usually appear in<br/>the downloads area shortly after the tarball release.<br/><br/>In the Perl 6 world, we make a distinction between the language<br/>(&quot;Perl 6&quot;) and specific implementations of the language such as<br/>&quot;Rakudo Perl&quot;. This Star release includes release 2012.11 [0] of the<br/>Rakudo Perl 6 compiler [1], version 4.10.0 of the Parrot Virtual<br/>Machine [2], and various modules, documentation, and other<br/>resources collected from the Perl 6 community.<br/><br/>Some of the new features added to this release include:<br/><br/>* Parse errors are much improved, and follow STD, the standard parser,<br/> much more closely; they are more accurate and more information is given<br/><br/>* Rakudo now keeps parsing after some less serious errors<br/><br/>* Better errors for various parse failures<br/><br/>* The junction autothreader is now an order of magnitude faster<br/><br/>* Texas (ASCII) versions of the Set and Bag operators implemented<br/><br/>* Nested Pairs now give correct .perl output<br/><br/>* { a =&gt; $_ } now correctly considered a block, not a hash as before<br/><br/>This release also contains a range of performance improvements, bug fixes,<br/>improvements to error reporting and better failure modes.<br/><br/>The following features have been deprecated or modified from previous<br/>releases due to changes in the Perl 6 specification, and are being removed<br/>or changed as follows:<br/><br/>* &#39;for&#39;-loops will become lazy, and are only evaluated eagerly in<br/> eager or sink (void) context. This means that if a for-loop is<br/> the last statement in a routine, it will usually run after the<br/> routine has returned, so it cannot call return() anymore.<br/><br/>* Unary hyper ops currently descend into nested arrays and hashes.<br/> This will change to make them equivalent to a one-level map.<br/><br/>* The Str.ucfirst builtin is deprecated; it will be replaced by Str.tc.<br/><br/>* Leading whitespace in rules and under :sigspace will no longer be<br/> converted to &lt;.ws&gt; . For existing regexes that expect this conversion,<br/> add a &lt;?&gt; in front of leading whitespace to make it meta again.<br/><br/>* The ?-quantifier on captures in regexes currently binds the capture<br/> slot to a List containing either zero or one Match objects; i.e., it<br/> is equivalent to &quot;** 0..1&quot;. In the future, the ?-quantifier will<br/> bind the slot directly to a captured Match or to Nil. Existing code<br/> can manage the transition by changing existing ?-quantifiers to<br/> use &quot;** 0..1&quot;, which will continue to return a List of matches.<br/><br/>There are some key features of Perl 6 that Rakudo Star does not<br/>yet handle appropriately, although they will appear in upcoming<br/>releases. Some of the not-quite-there features include:<br/><br/> * advanced macros<br/> * threads and concurrency<br/> * Unicode strings at levels other than codepoints<br/> * interactive readline that understands Unicode<br/> * non-blocking I/O<br/> * much of Synopsis 9<br/><br/>There is an online resource at http://perl6.org/compilers/features<br/>that lists the known implemented and missing features of Rakudo<br/>and other Perl 6 implementations.<br/><br/>In many places we&#39;ve tried to make Rakudo smart enough to inform the<br/>programmer that a given feature isn&#39;t implemented, but there are<br/>many that we&#39;ve missed. Bug reports about missing and broken<br/>features are welcomed at &lt;rakudobug@perl.org&gt;.<br/><br/>See http://perl6.org/ for links to much more information about<br/>Perl 6, including documentation, example code, tutorials, reference<br/>materials, specification documents, and other supporting resources.<br/>A draft of a Perl 6 book is available as &lt;docs/UsingPerl6-draft.pdf&gt;<br/>in the release tarball.<br/><br/>The development team thanks all of the contributors and sponsors<br/>for making Rakudo Star possible. If you would like to contribute,<br/>see &lt;http://rakudo.org/how-to-help&gt;, ask on the perl6-compiler@perl.org<br/>mailing list, or join us on IRC #perl6 on freenode.<br/><br/>[0] https://github.com/rakudo/rakudo/blob/nom/docs/announce/2012.12<br/>[1] http://github.com/rakudo/rakudo<br/>[2] http://parrot.org/<br/> http://www.nntp.perl.org/group/perl.perl6.users/2012/12/msg1654.html Thu, 27 Dec 2012 21:23:22 +0000 Rakudo Star 2012.11 released by Moritz Lenz On behalf of the Rakudo and Perl 6 development teams, I&#39;m happy to<br/>announce the November 2012 release of &quot;Rakudo Star&quot;, a useful and<br/>usable distribution of Perl 6. The tarball for the November 2012<br/>release is available from &lt;http://github.com/rakudo/star/downloads&gt;.<br/>A Windows .MSI version of Rakudo star will usually appear in<br/>the downloads area shortly after the tarball release.<br/><br/>In the Perl 6 world, we make a distinction between the language<br/>(&quot;Perl 6&quot;) and specific implementations of the language such as<br/>&quot;Rakudo Perl&quot;. This Star release includes release 2012.11 [0] of the<br/>Rakudo Perl 6 compiler [1], version 4.6.0 of the Parrot Virtual<br/>Machine [2], and various modules, documentation, and other<br/>resources collected from the Perl 6 community.<br/><br/>Some of the new features added to this release include:<br/><br/>* heredocs<br/><br/>* quote adverbs (like q:w//)<br/><br/>* implemented precedence related traits (equiv, looser, tighter, assoc)<br/><br/>* Perl 6 grammar NFAs are pre-computed, saving some work on each<br/> invocation; this shaved around 10% off the time needed to run the<br/>spectests<br/><br/>* regexes and quotes have better support for user-selected delimiters<br/><br/>* FIRST/NEXT/LAST can now be used in all types of loop (previously<br/> limited to for)<br/><br/>* several fixes related to module precompilation. This should make working<br/> with larger code bases much less painful.<br/><br/>This release also contains a range of performance improvements, bug fixes,<br/>improvements to error reporting and better failure modes.<br/><br/>The following features have been deprecated or modified from previous<br/>releases due to changes in the Perl 6 specification, and are being removed<br/>or changed as follows:<br/><br/>* at present, a reference to an &amp;foo that does not exist evalutes to Nil.<br/> This will become a CHECK-time failure, in line with STD.<br/><br/>* Unary hyper ops currently descend into nested arrays and hashes.<br/> This will change to make them equivalent to a one-level map.<br/><br/>* ~/.perl6/lib will go away from the default include path (@*INC).<br/> Instead %*CUSTOM_LIB now holds paths to four library locations:<br/> perl Rakudo installs its core modules here<br/> vendor OS-level package managers should install their modules here<br/> site for local module installations (e.g. with panda or ufo)<br/> home like site, but always under the user&#39;s home directory.<br/> fallback if site isn&#39;t writable.<br/><br/>* The Str.ucfirst builtin is deprecated; it will be replaced by Str.tc.<br/><br/>* Leading whitespace in rules and under :sigspace will no longer be<br/> converted to &lt;.ws&gt; . For existing regexes that expect this conversion,<br/> add a &lt;?&gt; in front of leading whitespace to make it meta again.<br/><br/>* The ?-quantifier on captures in regexes currently binds the capture<br/> slot to a List containing either zero or one Match objects; i.e., it<br/> is equivalent to &quot;** 0..1&quot;. In the future, the ?-quantifier will<br/> bind the slot directly to a captured Match or to Nil. Existing code<br/> can manage the transition by changing existing ?-quantifiers to<br/> use &quot;** 0..1&quot;, which will continue to return a List of matches.<br/><br/>There are some key features of Perl 6 that Rakudo Star does not<br/>yet handle appropriately, although they will appear in upcoming<br/>releases. Some of the not-quite-there features include:<br/><br/> * advanced macros<br/> * threads and concurrency<br/> * Unicode strings at levels other than codepoints<br/> * interactive readline that understands Unicode<br/> * non-blocking I/O<br/> * much of Synopsis 9<br/><br/>There is an online resource at http://perl6.org/compilers/features<br/>that lists the known implemented and missing features of Rakudo<br/>and other Perl 6 implementations.<br/><br/>In many places we&#39;ve tried to make Rakudo smart enough to inform the<br/>programmer that a given feature isn&#39;t implemented, but there are<br/>many that we&#39;ve missed. Bug reports about missing and broken<br/>features are welcomed at &lt;rakudobug@perl.org&gt;.<br/><br/>See http://perl6.org/ for links to much more information about<br/>Perl 6, including documentation, example code, tutorials, reference<br/>materials, specification documents, and other supporting resources.<br/>A draft of a Perl 6 book is available as &lt;docs/UsingPerl6-draft.pdf&gt;<br/>in the release tarball.<br/><br/>The development team thanks all of the contributors and sponsors<br/>for making Rakudo Star possible. If you would like to contribute,<br/>see &lt;http://rakudo.org/how-to-help&gt;, ask on the perl6-compiler@perl.org<br/>mailing list, or join us on IRC #perl6 on freenode.<br/><br/>[0] https://github.com/rakudo/rakudo/blob/nom/docs/announce/2012.11<br/>[1] http://github.com/rakudo/rakudo<br/>[2] http://parrot.org/<br/> http://www.nntp.perl.org/group/perl.perl6.users/2012/11/msg1653.html Wed, 28 Nov 2012 19:41:28 +0000 Rakudo Star 2012.10 released by Jonathan Worthington On behalf of the Rakudo and Perl 6 development teams, I&#39;m happy to<br/>announce the October 2012 release of &quot;Rakudo Star&quot;, a useful and<br/>usable distribution of Perl 6. The tarball for the October 2012<br/>release is available from &lt;http://github.com/rakudo/star/downloads&gt;.<br/>A Windows .MSI version of Rakudo star will usually appear in<br/>the downloads area shortly after the tarball release.<br/><br/>In the Perl 6 world, we make a distinction between the language<br/>(&quot;Perl 6&quot;) and specific implementations of the language such as<br/>&quot;Rakudo Perl&quot;. This Star release includes release 2012.10 [0] of the<br/>Rakudo Perl 6 compiler [1], version 4.6.0 of the Parrot Virtual<br/>Machine [2], and various modules, documentation, and other<br/>resources collected from the Perl 6 community.<br/><br/>Some of the new features added to this release include:<br/><br/>* The method case of the handles trait<br/><br/>* The &lt;-&gt; lambda, which defaults parameters to rw<br/><br/>* The :dba modifier in regexes<br/><br/>* The radix form :60[24, 59, 59]<br/><br/>* Improved coverage of Perl 5 regexes when the :P5 modifier is used<br/><br/>* Correct parsing of nested quote delimiters<br/><br/>* Attributes in scope are now visible inside of an eval<br/><br/>This release also contains a range of performance improvements, bug fixes,<br/>improvements to error reporting and better failure modes.<br/><br/>The following features have been deprecated or modified from previous<br/>releases due to changes in the Perl 6 specification, and are being removed<br/>or changed as follows:<br/><br/>* Unary hyper ops currently descend into nested arrays and hashes.<br/> This will change to make them equivalent to a one-level map.<br/><br/>* ~/.perl6/lib will go away from the default include path (@*INC).<br/> Instead %*CUSTOM_LIB now holds paths to four library locations:<br/> perl Rakudo installs its core modules here<br/> vendor OS-level package managers should install their modules here<br/> site for local module installations (e.g. with panda or ufo)<br/> home like site, but always under the user&#39;s home directory.<br/> fallback if site isn&#39;t writable.<br/><br/>* protos for built-in routines are now mostly as generic as possible,<br/> and will be changed to be specific to the arity of the routine.<br/> For example &#39;proto sub chr(|) {*}&#39; will become &#39;proto sub chr($) {*}&#39;<br/> This affects everybody who adds multis with unusual arity to built-in<br/> subs.<br/><br/>* Parameters preceded by a | or \ can no longer have a sigil.<br/><br/>* IO::Path.dir (which returns the directory part of the path) has been<br/> renamed to IO::Path.directory. IO::Path.dir will be removed or<br/> re-purposed.<br/><br/>* The Str.ucfirst builtin is deprecated; it will be replaced by Str.tc.<br/><br/>* Leading whitespace in rules and under :sigspace will no longer be<br/> converted to &lt;.ws&gt; . For existing regexes that expect this conversion,<br/> add a &lt;?&gt; in front of leading whitespace to make it meta again.<br/><br/>* The ?-quantifier on captures in regexes currently binds the capture<br/> slot to a List containing either zero or one Match objects; i.e., it<br/> is equivalent to &quot;** 0..1&quot;. In the future, the ?-quantifier will<br/> bind the slot directly to a captured Match or to Nil. Existing code<br/> can manage the transition by changing existing ?-quantifiers to<br/> use &quot;** 0..1&quot;, which will continue to return a List of matches.<br/><br/>There are some key features of Perl 6 that Rakudo Star does not<br/>yet handle appropriately, although they will appear in upcoming<br/>releases. Some of the not-quite-there features include:<br/><br/> * advanced macros<br/> * threads and concurrency<br/> * Unicode strings at levels other than codepoints<br/> * interactive readline that understands Unicode<br/> * non-blocking I/O<br/> * much of Synopsis 9<br/><br/>There is an online resource at http://perl6.org/compilers/features<br/>that lists the known implemented and missing features of Rakudo<br/>and other Perl 6 implementations.<br/><br/>In many places we&#39;ve tried to make Rakudo smart enough to inform the<br/>programmer that a given feature isn&#39;t implemented, but there are<br/>many that we&#39;ve missed. Bug reports about missing and broken<br/>features are welcomed at &lt;rakudobug@perl.org&gt;.<br/><br/>See http://perl6.org/ for links to much more information about<br/>Perl 6, including documentation, example code, tutorials, reference<br/>materials, specification documents, and other supporting resources.<br/>A draft of a Perl 6 book is available as &lt;docs/UsingPerl6-draft.pdf&gt;<br/>in the release tarball.<br/><br/>The development team thanks all of the contributors and sponsors<br/>for making Rakudo Star possible. If you would like to contribute,<br/>see &lt;http://rakudo.org/how-to-help&gt;, ask on the perl6-compiler@perl.org<br/>mailing list, or join us on IRC #perl6 on freenode.<br/><br/>[0] https://github.com/rakudo/rakudo/blob/nom/docs/announce/2012.10<br/>[1] http://github.com/rakudo/rakudo<br/>[2] http://parrot.org/<br/><br/> http://www.nntp.perl.org/group/perl.perl6.users/2012/11/msg1652.html Thu, 01 Nov 2012 21:31:03 +0000 Re: s:g/T/U/ doesn't work ? by Marc Chantreux hello again, <br/><br/>i felt dumb reading your answers! it seems obvious now.<br/><br/>thanks everyone.<br/><br/>regards <br/> http://www.nntp.perl.org/group/perl.perl6.users/2012/10/msg1651.html Wed, 24 Oct 2012 07:34:01 +0000 Re: the nature of a scalar? by Moritz Lenz <br/><br/>On 10/24/2012 02:46 PM, Marc Chantreux wrote:<br/><br/>&gt; use v6;<br/>&gt; use lib &#39;lib&#39;;<br/>&gt; use Bailador;<br/>&gt;<br/>&gt; get / (.*) &#39;/&#39; / =&gt; sub ($path) {<br/>&gt; $path||=&quot;foo&quot;;<br/><br/>$path is a subroutine parameter, and thus read-only by default.<br/>If you want to modify $path locally, write<br/><br/>sub ($path is copy) { ... }<br/><br/>Also if Bailador passes Match objects instead of strings into the <br/>function, $path evaluates to True in boolean context even if it matched <br/>the empty string.<br/><br/>Cheers,<br/>Moritz<br/> http://www.nntp.perl.org/group/perl.perl6.users/2012/10/msg1650.html Wed, 24 Oct 2012 06:39:59 +0000 Re: s:g/T/U/ doesn't work ? by Jonathan Scott Duff I imagine it&#39;s the same problem as this Perl 5 code:<br/><br/>use Test::More;<br/><br/>for (&#39;GATGGAACTTGACTACGTAAATT&#39;) {<br/> s/T/U/g;<br/> is $_, &#39;GAUGGAACUUGACUACGUAAAUU&#39;, &#39;RNA&#39;;<br/>}<br/><br/><br/>Since $_ is an alias for each element of the list and the only element in<br/>the list is a constant string and you can&#39;t modify constants, you get the<br/>error. Changing your code to:<br/><br/>use v6;<br/>use Test;<br/><br/>my $x = &#39;GATGGAACTTGACTACGTAAATT&#39;;<br/>for $x {<br/> s:g/T/U/;<br/> is $_ , &#39;GAUGGAACUUGACUACGUAAAUU&#39; , &#39;RNA&#39;;<br/>}<br/><br/><br/>Does indeed work.<br/><br/>Though, if what I said is true, the error message is Less Than Awesome. I<br/>wonder could it be made more helpful?<br/><br/>Hope this helps,<br/><br/>-Scott<br/><br/><br/>On Wed, Oct 24, 2012 at 7:35 AM, Marc Chantreux &lt;khatar@phear.org&gt; wrote:<br/><br/>&gt; hello perl6 people,<br/>&gt;<br/>&gt; On<br/>&gt;<br/>&gt; This is perl6 version 2012.09.1<br/>&gt; built on parrot 4.6.0 revision 0<br/>&gt;<br/>&gt; When i try to run<br/>&gt;<br/>&gt; use v6;<br/>&gt; use Test;<br/>&gt; for &#39;GATGGAACTTGACTACGTAAATT&#39; {<br/>&gt; s:g/T/U/;<br/>&gt; is $_<br/>&gt; , &#39;GAUGGAACUUGACUACGUAAAUU&#39;<br/>&gt; , &#39;RNA&#39;;<br/>&gt; }<br/>&gt;<br/>&gt; I get<br/>&gt;<br/>&gt; Cannot assign to a non-container<br/>&gt; in sub infix:&lt;=&gt; at src/gen/CORE.setting:11692<br/>&gt; in block at /tmp/ZZZ:4<br/>&gt;<br/>&gt; As far as i understand from the doc, s:g/T/U/ is a valid syntax. any idea?<br/>&gt;<br/>&gt; regards<br/>&gt; marc<br/>&gt;<br/><br/> http://www.nntp.perl.org/group/perl.perl6.users/2012/10/msg1649.html Wed, 24 Oct 2012 06:24:14 +0000 Re: s:g/T/U/ doesn't work ? by jerry gay On Wed, Oct 24, 2012 at 5:35 AM, Marc Chantreux &lt;khatar@phear.org&gt; wrote:<br/>&gt; Cannot assign to a non-container<br/>&gt; in sub infix:&lt;=&gt; at src/gen/CORE.setting:11692<br/>&gt; in block at /tmp/ZZZ:4<br/>&gt;<br/>you&#39;re attempting to modify a string constant, which cannot be<br/>modified. try something like (untested):<br/><br/>my $snippet = &#39;GATGGAACTTGACTACGTAAATT&#39;;<br/>for $snippet {<br/> ...<br/><br/>~jerry<br/> http://www.nntp.perl.org/group/perl.perl6.users/2012/10/msg1648.html Wed, 24 Oct 2012 06:06:37 +0000 Re: s:g/T/U/ doesn't work ? by Carl Mäsak Marc (&gt;):<br/>&gt; hello perl6 people,<br/>&gt;<br/>&gt; On<br/>&gt;<br/>&gt; This is perl6 version 2012.09.1<br/>&gt; built on parrot 4.6.0 revision 0<br/>&gt;<br/>&gt; When i try to run<br/>&gt;<br/>&gt; use v6;<br/>&gt; use Test;<br/>&gt; for &#39;GATGGAACTTGACTACGTAAATT&#39; {<br/>&gt; s:g/T/U/;<br/>&gt; is $_<br/>&gt; , &#39;GAUGGAACUUGACUACGUAAAUU&#39;<br/>&gt; , &#39;RNA&#39;;<br/>&gt; }<br/>&gt;<br/>&gt; I get<br/>&gt;<br/>&gt; Cannot assign to a non-container<br/>&gt; in sub infix:&lt;=&gt; at src/gen/CORE.setting:11692<br/>&gt; in block at /tmp/ZZZ:4<br/>&gt;<br/>&gt; As far as i understand from the doc, s:g/T/U/ is a valid syntax. any idea?<br/><br/>It&#39;s valid syntax. The error you&#39;re getting is not a syntax error;<br/>it&#39;s a run-time error complaining about assigning to something that<br/>isn&#39;t a container.<br/><br/>What you&#39;re assigning to is &#39;GATGGAACTTGACTACGTAAATT&#39;, a Str object.<br/>That&#39;s a bit like trying to assign to the number 5. It should produce<br/>an error, and it does. You need to put it into a variable, or an array<br/>element, or a hash value -- in short, a &quot;container&quot; -- for it to work.<br/>I think part of what felt confusing about this is that you did things<br/>in a &#39;for&#39; loop, so the assignment directly to a Str isn&#39;t that<br/>obvious.<br/><br/>By the way, that &#39;for&#39; loop over a single element is usually spelled<br/>&#39;given&#39; in Perl 6.<br/><br/>I would write your code like this:<br/><br/>use v6;<br/>use Test;<br/><br/>{<br/> $_ = &#39;GATGGAACTTGACTACGTAAATT&#39;;<br/> s:g/T/U/;<br/> is $_,<br/> &#39;GAUGGAACUUGACUACGUAAAUU&#39;,<br/> &#39;RNA&#39;;<br/>}<br/><br/>// Carl<br/> http://www.nntp.perl.org/group/perl.perl6.users/2012/10/msg1647.html Wed, 24 Oct 2012 06:05:37 +0000 the nature of a scalar? by Marc Chantreux hello perl6 people,<br/><br/><br/>this code says &quot;foo&quot;, exactly as expected. <br/><br/> use v6;<br/> my $path = &quot;&quot;;<br/> $path ||=&quot;foo&quot;;<br/> say $path;<br/><br/>I&#39;m trying to use the same thinh in a get callback of Baildador and it doesn&#39;t<br/>work. i try to understand why is it so.<br/><br/>use v6;<br/>use lib &#39;lib&#39;;<br/>use Bailador;<br/><br/>get / (.*) &#39;/&#39; / =&gt; sub ($path) {<br/> $path||=&quot;foo&quot;;<br/> &quot;hello ($path) ({$path.WHAT};{$path.defined}) {so $path}&quot;;<br/> # &gt; curl localhost:3000<br/> # hello () (;True) True<br/>}<br/>baile;<br/><br/>please help! <br/>regards<br/>marc <br/><br/> http://www.nntp.perl.org/group/perl.perl6.users/2012/10/msg1646.html Wed, 24 Oct 2012 05:46:13 +0000 s:g/T/U/ doesn't work ? by Marc Chantreux hello perl6 people,<br/><br/>On<br/><br/> This is perl6 version 2012.09.1<br/> built on parrot 4.6.0 revision 0<br/><br/>When i try to run<br/><br/> use v6;<br/> use Test;<br/> for &#39;GATGGAACTTGACTACGTAAATT&#39; {<br/> s:g/T/U/;<br/> is $_<br/> , &#39;GAUGGAACUUGACUACGUAAAUU&#39;<br/> , &#39;RNA&#39;;<br/> }<br/><br/>I get<br/><br/> Cannot assign to a non-container<br/> in sub infix:&lt;=&gt; at src/gen/CORE.setting:11692<br/> in block at /tmp/ZZZ:4<br/><br/>As far as i understand from the doc, s:g/T/U/ is a valid syntax. any idea? <br/><br/>regards<br/>marc<br/> http://www.nntp.perl.org/group/perl.perl6.users/2012/10/msg1645.html Wed, 24 Oct 2012 05:36:07 +0000