Re: Argument scoping error or bug?

2008-10-27 Thread Patrick R. Michaud
On Sat, Oct 25, 2008 at 10:52:13AM +0200, Moritz Lenz wrote: Chris Dolan wrote: I stumbled across this issue while descending into a recursive Match structure. Consider the following reentrant subroutine: You have just experienced this bug:

Re: Why {{}} for regexp closures instead of just {}?

2008-10-28 Thread Patrick R. Michaud
On Mon, Oct 27, 2008 at 04:07:39PM -0500, [EMAIL PROTECTED] wrote: On Sun, Oct 26, 2008 at 10:45 PM, Chris Dolan [EMAIL PROTECTED] wrote: S05 always uses single curlies for closures, but throughout Parrot, code seems to use double curlies in PGE regexps. Why is that? That is, why this:

Rakudo bug reports still go to [EMAIL PROTECTED]

2008-11-19 Thread Patrick R. Michaud
Some of you may have seen the announcements on the Parrot lists that Parrot will be starting to use trac.parrot.org for its issue tracking and bug reporting system. This is just a note that Rakudo's bug reports will continue to be hosted on the rt.perl.org server, and we will continue to use

Re: reporting bugs

2009-01-04 Thread Patrick R. Michaud
On Sun, Jan 04, 2009 at 05:20:56PM +0300, Richard Hainsworth wrote: I posted an email to per6-all asking about how one should go about reporting bugs. That message has appeared on the list. So again: how can bugs be reported? See the Reporting bugs section of README file in languages/perl6.

Re: not wanting something

2009-01-06 Thread Patrick R. Michaud
On Tue, Jan 06, 2009 at 04:41:30PM +0300, Richard Hainsworth wrote: Supposed I define regex digit { [0..9] } Note that you probably want regex digit { [0..9] } Also, Perl 6 already provides a 'digit' rule by default, although it's digits in the Unicode sense as opposed to simply the

Re: what is going on here?

2009-01-13 Thread Patrick R. Michaud
On Mon, Jan 12, 2009 at 12:11:59PM +0300, Richard Hainsworth wrote: But my @ranking = %players.sort :{.value}; # white space before :, no ws after : generates a syntax error with rakudo. Is this a raduko bug, or am I not understanding your generic argument? Rakudo doesn't recognize adverbial

Re: A Logo design for Rakudo Perl 6

2009-01-16 Thread Patrick R. Michaud
On Fri, Jan 16, 2009 at 03:45:48AM -0700, Perl wrote: Moritz was one of the first to guide it to the idea of making a logo for Rakudo Perl 6 - as there's nothing yet (really) available. I thought that would be a neat project and scratch some of my person itches. It would be a very neat

Rakudo Perl development release #14 (Vienna)

2009-02-26 Thread Patrick R. Michaud
On behalf of the Rakudo development team, I'm pleased to announce the February 2009 development release of Rakudo Perl #14 Vienna. Rakudo is an implementation of Perl 6 on the Parrot Virtual Machine [1]. The tarball for the February 2009 release is available from

Re: Rakudo Perl development release #14 (Vienna)

2009-02-27 Thread Patrick R. Michaud
On Fri, Feb 27, 2009 at 09:07:10PM +, Ross Kendall wrote: Thanks for the Vienna release. All of a sudden Perl 6 feels a lot more accessible. Yay, that was one of the big goals for the release. Are there plans to set up a new website for Rakudo now it's on its own? If so, I would be

Rakudo Perl development release #15 (Oslo)

2009-03-20 Thread Patrick R. Michaud
On behalf of the Rakudo development team, I'm pleased to announce the March 2009 development release of Rakudo Perl #15 Oslo. Rakudo is an implementation of Perl 6 on the Parrot Virtual Machine [1]. The tarball for the March 2009 release is available from

Re: YALI (yet another logo idea)

2009-03-24 Thread Patrick R. Michaud
On Tue, Mar 24, 2009 at 11:29:08AM -0400, Guy Hulbert wrote: On Tue, 2009-24-03 at 14:17 +, Ross Kendall wrote: I was thinking that a logo doesn't really need to incorporate a symbol (e.g. camel, onion etc.), and that one of the more important aspects of a logo is the typography.

Re: Logo considerations

2009-03-24 Thread Patrick R. Michaud
On Tue, Mar 24, 2009 at 10:24:47AM -0700, Larry Wall wrote: I want something with gut appeal on the order of Tux. In particular I want a logo for Perl 6 that is: Fun Cool Cute Named Lively Punable [...] +2 to this approach. Pm

Re: Logo considerations - 3 logos needed

2009-03-25 Thread Patrick R. Michaud
On Wed, Mar 25, 2009 at 10:36:56AM -0400, Mark J. Reed wrote: Rakudo is a particular implementation of Perl 6 using Parrot. While it is a separate project from both Perl 6 and Parrot, it is intimately tied to both, and I think its logo should reflect that. I don't see much point in having

Oslo Perl 6 Hackathon Notes

2009-04-13 Thread Patrick R. Michaud
As some of you are aware, this week is the Nordic Perl Workshop [1], and in the days immediately following the workshop we will have the Oslo Perl 6 Hackathon [2]. During the first day of the hackathon Gabor Szabo will be doing a Hands-on Perl 6 training course [3], the other two days will be for

Rakudo Perl 6 development release #16 (Bratislava)

2009-04-22 Thread Patrick R. Michaud
On behalf of the Rakudo development team, I'm pleased to announce the April 2009 development release of Rakudo Perl #16 Bratislava. Rakudo is an implementation of Perl 6 on the Parrot Virtual Machine [1]. The tarball for the April 2009 release is available from

Re: Rakudo Perl 6 development release #17 (Stockholm)

2009-05-26 Thread Patrick R. Michaud
On Sat, May 23, 2009 at 07:33:06PM +0200, Christian Aperghis wrote: Reini Urban a écrit : Patrick R. Michaud schrieb: On behalf of the Rakudo development team, I'm pleased to announce the May 2009 development release of Rakudo Perl #17 Stockholm. Rakudo is an implementation of Perl 6

Re: rakudo-current loop 2-3 orders of magnitude slower than perl 5?

2009-06-03 Thread Patrick R. Michaud
On Thu, Jun 04, 2009 at 12:12:06AM +0200, Chris Mair wrote: I'm new here, so forgive me if this is not the right list. You're in the right place! After having used perl5 a lot years ago, this weekend I finally decieded to have a look at perl6. [...] Anyway, the parrot and rakudo files were

Rakudo Perl 6 development release #18 (Pittsburgh)

2009-06-18 Thread Patrick R. Michaud
On behalf of the Rakudo development team, I'm pleased to announce the June 2009 development release of Rakudo Perl #18 Pittsburgh. Rakudo is an implementation of Perl 6 on the Parrot Virtual Machine [1]. The tarball for the June 2009 release is available from

Re: A few questions

2009-07-12 Thread Patrick R. Michaud
On Sun, Jul 12, 2009 at 12:07:14AM -0400, Chas. Owens wrote: On Sat, Jul 11, 2009 at 22:02, Minimiscienceminimiscie...@gmail.com wrote:  - How does one declare multiple variables of the same type with a single my statement?  Is it my Int ($x, $y);, my(Int $x, Int $y);, or something else?  

Re: take-ing to-be-modified variables

2009-07-21 Thread Patrick R. Michaud
On Tue, Jul 21, 2009 at 07:19:10PM -0400, Minimiscience wrote: When take is called on a variable that is later modified, is the Capture returned by the enclosing gather supposed to reflect the change or not? I know that Captures are the Perl 6 equivalent of references, but it seems

Announce: Rakudo Perl 6 Development Release #25 (Minneapolis)

2010-02-01 Thread Patrick R. Michaud
[This notice is going out a bit late; the release was indeed produced on time, but I was delayed in sending out this notice. With apologies for the delay... --Pm] On behalf of the Rakudo development team, I'm pleased to announce the January 2010 development release of Rakudo Perl #25

Re: Something wrong with str.reverse

2010-06-21 Thread Patrick R. Michaud
On Mon, Jun 21, 2010 at 09:47:37AM +0100, Smylers wrote: Larry Wall writes: On Fri, Jun 18, 2010 at 11:21:52AM +0200, Jan Ingvoldstad wrote: : On Fri, Jun 18, 2010 at 11:15, Smylers smyl...@stripey.com wrote: : : For the benefit of Perl 5 programmers used to string reverse it : would

Re: A suggestion about parrot sugar

2010-06-25 Thread Patrick R. Michaud
On Fri, Jun 25, 2010 at 06:31:57AM +, Xi Yang wrote: For example: use parrot Foo::Bar, which would load parrot library under Foo/Bar. However, this would be easy and useful for rakudo, but would not for other possible Perl6 implementations. I think

Rakudo Star - a useful, usable, early adopter distribution of Perl 6

2010-07-29 Thread Patrick R. Michaud
On behalf of the Rakudo and Perl 6 development teams, I'm happy to announce the July 2010 release of Rakudo Star, a useful and usable distribution of Perl 6. The tarball for the July 2010 release is available from http://github.com/rakudo/star/downloads. Rakudo Star is aimed at early adopters of

Re: Perl6 Modules - Documentation

2010-07-30 Thread Patrick R. Michaud
On Fri, Jul 30, 2010 at 04:08:49PM +0400, Richard Hainsworth wrote: On 07/30/2010 01:27 PM, Steffen Schwigon wrote: Richard Hainsworthrich...@rusrating.ru writes: I am not aware that there is a convenient way of obtaining a short description about each module, other than just the name?

Re: implementing every(N)

2010-07-30 Thread Patrick R. Michaud
On Fri, Jul 30, 2010 at 09:17:30AM -0500, Ted Zlatanov wrote: I have a Perl 5 module called Every which provides, simply, every(5); # true on invocation 5, 10, etc. every(seconds = 5); # true at 5, 10, etc. seconds It's really nice in endless loops, logging, etc. I'd like to translate it

Announce: Rakudo Star 2010.08 released

2010-08-26 Thread Patrick R. Michaud
On behalf of the Rakudo and Perl 6 development teams, I'm happy to announce the August 2010 release of Rakudo Star, a useful and usable distribution of Perl 6. The tarball for the August 2010 release is available from http://github.com/rakudo/star/downloads. Rakudo Star is aimed at early

Re: flushing a file

2010-09-15 Thread Patrick R. Michaud
On Wed, Sep 15, 2010 at 08:42:48AM +0200, Gabor Szabo wrote: Can I rely in Perl 6 that a file is flushed and closed correctly when Perl shuts down? I don't know the answer to this question, but I suspect yes. The probably more interesting case is this: #!/usr/bin/perl6 use v6; my

Announce: Rakudo Star 2010.10 released

2010-10-28 Thread Patrick R. Michaud
On behalf of the Rakudo and Perl 6 development teams, I'm happy to announce the October 2010 release of Rakudo Star, a useful and usable distribution of Perl 6. The tarball for the October 2010 release is available from http://github.com/rakudo/star/downloads. Rakudo Star is aimed at early

Announce: Rakudo Star 2010.12 released

2010-12-30 Thread Patrick R. Michaud
On behalf of the Rakudo and Perl 6 development teams, I'm happy to announce the December 2010 release of Rakudo Star, a useful and usable distribution of Perl 6. The tarball for the December 2010 release is available from http://github.com/rakudo/star/downloads. Rakudo Star is aimed at early

Re: Questions for Survey about Perl

2011-01-02 Thread Patrick R. Michaud
On Sat, Jan 01, 2011 at 12:53:17PM +0100, Daniel Carrera wrote: On Sat, Jan 1, 2011 at 12:36 PM, Moritz Lenz mor...@faui2k3.org wrote: Given the current version number scheme (year.month), it's highly unlikely that we'll ever see a Rakudo 1.0. So I'd change that to after a production

Re: Questions for Survey about Perl

2011-01-02 Thread Patrick R. Michaud
On Sun, Jan 02, 2011 at 06:25:18PM +0100, Jan Ingvoldstad wrote: On Sun, Jan 2, 2011 at 18:05, Guy Hulbert gwhulb...@eol.ca wrote: On Sun, 2011-02-01 at 10:27 -0600, Patrick R. Michaud wrote: - What was the first production release of Linux? - At what point was each

Announce: Rakudo Star 2011.01 released

2011-01-28 Thread Patrick R. Michaud
(Resending, since I had the wrong date in the subject line of my previous post. Apologies to everyone for the duplicates! --Pm) On behalf of the Rakudo and Perl 6 development teams, I'm happy to announce the January 2011 release of Rakudo Star, a useful and usable distribution of Perl 6. The

Re: Current vs future Perl 6 binary size

2011-04-22 Thread Patrick R. Michaud
On Fri, Apr 22, 2011 at 12:33:45AM +0100, gvim wrote: The Perl 6 binary within the January release of Rakudo Star is 10Mb on my Snow Leopard system. Do I take it that the Perl 6 binary is [...] much larger than the current Perl 5.12 (1.6Mb) or is it simply that the Perl 6 binary is likely

Re: Current vs future Perl 6 binary size

2011-04-22 Thread Patrick R. Michaud
On Fri, Apr 22, 2011 at 10:27:47AM -0400, Guy Hulbert wrote: On Fri, 2011-22-04 at 09:09 -0500, Patrick R. Michaud wrote: We can actually make the perl6 executable file itself as small as 50K, but the first thing it then does is load a several-megabyte Parrot bytecode library

Re: Current vs future Perl 6 binary size

2011-04-22 Thread Patrick R. Michaud
On Fri, Apr 22, 2011 at 05:15:30PM +0200, Moritz Lenz wrote: After some futher analysis I found that perl6.pbc and the perl6 binary both are about 11MB in size - and 1.3MB when compressed with gzip. So if anybody actually wants to do something about the size, teach parrot's pbc_to_exe

Announce: Rakudo Star 2011.04 released

2011-04-27 Thread Patrick R. Michaud
On behalf of the Rakudo and Perl 6 development teams, I'm happy to announce the April 2011 release of Rakudo Star, a useful and usable distribution of Perl 6. The tarball for the April 2011 release is available from http://github.com/rakudo/star/downloads. Rakudo Star is aimed at early adopters

Re: Is rindex broken or does my brain need a reboot?

2012-05-08 Thread Patrick R. Michaud
On Tue, May 08, 2012 at 01:02:24AM -0700, Stefan O'Rear wrote: On Tue, May 08, 2012 at 05:19:40AM +0200, Frederik Schwarzer wrote: Hi, I had a little problem with rindex and wrote a small demo code that shows what I found. $ install/bin/perl6 -e 'say perł.rindex(e);' perl substring not

Re: Fwd: lc on arrays

2012-05-21 Thread Patrick R. Michaud
On Mon, May 21, 2012 at 10:08:34PM +0200, Carl Mäsak wrote:    @a = @a.map: { lc $_ };    @a = @a.map: { .lc };    @a = @a.map: lc;    @a = @a».lc;    @a».=lc;    @a = (.lc for @a); Many ways to skin a cat -- [...] Also: @a .= map(*.lc); @a .= map: *.lc This somewhat keeps

Re: install rakudo

2012-06-04 Thread Patrick R. Michaud
On Mon, Jun 04, 2012 at 02:38:05PM +0200, Marc Chantreux wrote: hello guys, French Perl Workshop are comming and i hope a show around perl6. so i started to write a script that can be easy to pipe to a shell to install perl6. https://gist.github.com/2868089 i started it but it fail

Re: say vs print for .WHAT

2012-06-28 Thread Patrick R. Michaud
On Thu, Jun 28, 2012 at 09:41:48PM +0530, Siddhant Saraf wrote: (In Rakudo's REPL) say 'a'.WHAT; Str() print 'a'.WHAT; use of uninitialized variable $v of type Str in string context True What is happening here? Is this a bug? ( Coz I don't see any $v variable anywhere.) What is

Re: say vs print for .WHAT

2012-06-28 Thread Patrick R. Michaud
Oops, typo: On Thu, Jun 28, 2012 at 11:39:22AM -0500, Patrick R. Michaud wrote: To get say to act like print with a newline, one can do say [~] ar That should be say [~] arg1, arg2, arg3 ... For the 'a'.WHAT case, this gives say [~] 'a'.WHAT use of uninitialized value

Re: support for editing and history in the REPL?

2012-06-30 Thread Patrick R. Michaud
On Sat, Jun 30, 2012 at 07:21:10PM +0300, Gabor Szabo wrote: On Sat, Jun 30, 2012 at 7:16 PM, Patrick R. Michaud pmich...@pobox.com wrote: On Sat, Jun 30, 2012 at 06:39:55PM +0300, Gabor Szabo wrote: Is there a list of recommended package to install before building Parrot? The Rakudo Star

Re: IO stat exception when using :l

2012-07-05 Thread Patrick R. Michaud
On Thu, Jul 05, 2012 at 05:34:43PM +0300, Gabor Szabo wrote: use v6; my $f = a.IO; if $f ~~ :r { say 'file readable'; } if $f ~~ :l { say 'symlink'; } the readability and most other test fail and return some undef, but checking for :l (symlink) throws an exception if the

Re: IO.s size how?

2012-07-05 Thread Patrick R. Michaud
On Thu, Jul 05, 2012 at 05:51:09PM +0300, Gabor Szabo wrote: I can write either $path.IO ~~ :e or $path.IO.e to check if a $path exists. Is either of those recommended? How can I check for size? Based on my understanding of src/core/IO.pm I'd think it is $path.IO.s but

Re: File content is not written if close not called

2012-07-12 Thread Patrick R. Michaud
On Thu, Jul 12, 2012 at 05:36:58PM +0300, Gabor Szabo wrote: The following script leaves and epty 'data.txt' behind. Only if I call $fh.close is the file contents saved. Is this a feature? use v6; my $fh = open 'data.txt', :w; $fh.print(hello\n); While Rakudo and Parrot _should_ be

Rakudo Star 2012.07 released

2012-07-28 Thread Patrick R. Michaud
On behalf of the Rakudo and Perl 6 development teams, I'm happy to announce the July 2012 release of Rakudo Star, a useful and usable distribution of Perl 6. The tarball for the July 2012 release is available from http://github.com/rakudo/star/downloads. In the Perl 6 world, we make a

Rakudo Star 2012.09 released

2012-09-30 Thread Patrick R. Michaud
On behalf of the Rakudo and Perl 6 development teams, I'm happy to announce the September 2012 release of Rakudo Star, a useful and usable distribution of Perl 6. The tarball for the September 2012 release is available from http://github.com/rakudo/star/downloads. A Windows .MSI version of Rakudo

Re: implementing every(N)

2013-01-08 Thread Patrick R. Michaud
On Tue, Jan 08, 2013 at 12:14:22PM -0500, Ted Zlatanov wrote: On Mon, 7 Jan 2013 17:51:52 +0100 Carl Mäsak cma...@gmail.com wrote: CM Ted (): Are state variables available now, or is the every(N) functionality possible in some other way now? CM Why not try it by writing a small

Re: Packaging Perl 6 (or rather, Rakudo Star)

2013-03-05 Thread Patrick R. Michaud
On Tue, Mar 05, 2013 at 11:13:51AM +0100, Rob Hoelz wrote: I already have my own package for Arch Linux for Rakudo Star, and I keep the OS X homebrew package up-to-date as well. I'd like to create an RPM spec file and a DEB spec file as well. I have two questions: 1) Do these spec files

Re: Packaging Perl 6 (or rather, Rakudo Star)

2013-03-05 Thread Patrick R. Michaud
On Tue, Mar 05, 2013 at 12:02:01PM +0100, Rob Hoelz wrote: On 3/5/13 11:44 AM, Patrick R. Michaud wrote: It may also be worth noting/reminding that Rakudo Star has never been intended to be the only or even primary module collection, it's just one of the first. It could make good sense

Re: prove that the meaning of live is math

2013-05-26 Thread Patrick R. Michaud
On Sun, May 26, 2013 at 09:54:21AM -0500, Hao Wu wrote: However, why 42? any relation to meaning of life? It seems I miss something. Thanks. 42 is the Answer to the Ultimate Question of Life, the Universe, and Everything, which is sometimes shortened to be meaning of life. See

Rakudo Star 2013.05 released

2013-05-30 Thread Patrick R. Michaud
## 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 May 2013 release of Rakudo Star, a useful and usable distribution of Perl 6. The tarball and Windows .MSI for the May 2013 release are available from

Re: Rakudo Star 2013.05 released

2013-05-30 Thread Patrick R. Michaud
On Thu, May 30, 2013 at 11:08:13PM -0500, Patrick R. Michaud wrote: This Star release includes [release 2013.05] of the [Rakudo Perl 6 compiler], version 5.2.0 of the [Parrot Virtual Machine] ... Oops. The 2013.05 release actually contains Parrot 5.3.0. Sorry about the typo. Pm

Re: as perl6 has no $/ ...

2013-09-23 Thread Patrick R. Michaud
On Tue, Sep 24, 2013 at 02:14:50AM +0200, Marc Chantreux wrote: Come on, Perl6 people! did i miss something that takes carre of separators? it would be nice to have something like: I think it's currently specced in S32 as :nl(\n). See http://perlcabal.org/syn/S32/IO.html#open and

Re: Stickers of Parrot and Perl 6 for GSoC

2013-10-07 Thread Patrick R. Michaud
https://github.com/perl6/mu/blob/master/misc/camelia.svg https://github.com/perl6/mu/blob/master/misc/camelia.odg I have a .ai of the Parrot head logo if you need it and can send it to you. Pm On Mon, Oct 07, 2013 at 06:32:57PM -0500, Bruce Gray wrote: At the upcoming GSoC Mentor

Re: match's replacement name?

2014-05-23 Thread Patrick R. Michaud
On Fri, May 23, 2014 at 03:08:38PM -0400, Peter Schwenn wrote: Still it would be more straightforward to have something like $layn ~~ s:g/ (\W) [[RMA\.]? OpenNURBS\.]? I? On ([2..4]) dPoint /$0Rhino.Geometry.Point$1d/; and have a more perl6-built-in way of getting hold of the

Re: Moar Parrots

2014-09-09 Thread Patrick R. Michaud
On Tue, Sep 09, 2014 at 10:07:46PM +0200, Alex Becker wrote: Hitting the download button for Perl 6 leads to this page: http://rakudo.org/downloads/star/ There is a set of undocumented files. For 2014.08, there is one msi file with the Suffix moar, and one with the Suffix parrot. To avoid the

Re: Is this a strange regex bug in my code?

2014-12-29 Thread Patrick R. Michaud
:39AM +0200, Gabor Szabo wrote: No. If I remove the leading m from the regex, then the bug is gone. Gabor On Tue, Dec 30, 2014 at 9:19 AM, Patrick R. Michaud pmich...@pobox.com wrote: Out of curiosity, is the bug still present if you use /\.txt$/ instead of m/\.txt$/ ? At the moment

Re: Profiling Perl 6 code

2014-12-31 Thread Patrick R. Michaud
If you're running Rakudo on MoarVM, try the --profile option. It will create an HTML file that shows a lot of useful information, including time spent in each routine, call graphs, GC allocations, etc. Pm On Wed, Dec 31, 2014 at 09:35:33AM +0200, Gabor Szabo wrote: The Perl 6 Maven site is a

Re: generating grammars, capturing in regex interpolation, etc.

2015-04-14 Thread Patrick R. Michaud
On Tue, Apr 14, 2015 at 08:58:27PM -0400, Nathan Gray wrote: I've run into a snag, in that my strptime processing in Perl 5 relies on building a string that looks like a regex with named captures, and then interpolating that into a real regex. [...] my $pattern = Q/$greeting=[hello]/;

Re: Sub args: choose one of two?

2015-06-30 Thread Patrick R. Michaud
On Sat, Jun 27, 2015 at 05:39:32PM -0500, Tom Browder wrote: I'm trying to take advantage of the MAIN suroutine to handle most all of my routine command line arg handling. One idiom I use a lot is for the user to choose only one of two args, but one must be chosen. Perhaps you want that the

Re: Sub args: choose one of two?

2015-07-02 Thread Patrick R. Michaud
On Thu, Jul 02, 2015 at 03:22:17PM -0400, Brandon Allbery wrote: On Thu, Jul 2, 2015 at 3:08 PM, Tom Browder tom.brow...@gmail.com wrote: 1. Write the 'main' program as another subroutine and call it from each of the appropriate multi subs--aarghh! This seems like the right one to

Re: Recalling previous commands

2016-01-01 Thread Patrick R. Michaud
While I recall that we've often discussed building command history into Rakudo's REPL directly, the workaround suggested to me was to use 'rlwrap': $ rlwrap ./perl6 Then the arrow keys work, as well as CTRL-P and other bash-like history commands. I've never used CTRL-K for history, but

Re: release?

2015-12-29 Thread Patrick R. Michaud
On Tue, Dec 29, 2015 at 01:57:57AM -0800, Darren Duncan wrote: > On that note, are there going to be Perl 6 versions 6.x.y where {x,y} are > integers? Will 6.0.0 be the first such one? -- Darren Duncan This was the topic of my FOSDEM talk last year, and then again at YAPC::NA. "Perl 6" is a

Re: is there a Perl 5 converter?

2016-01-21 Thread Patrick R. Michaud
On Thu, Jan 21, 2016 at 01:39:15PM -0600, Aaron Baugher wrote: > Tom Browder writes: > > > Thanks, Aaron, good explanation. But can you find a description of > > '<->' in the Perl 6 docs? > > It's mentioned here: https://doc.perl6.org/language/control#for > > And here,

Re: for loop index question

2017-02-28 Thread Patrick R. Michaud
I think the canonical Perl 6 answer is: for @array.kv -> $index, $value { do something } Pm On Tue, Feb 28, 2017 at 01:20:47PM -0800, ToddAndMargo wrote: > Hi All, > > There are times when I want to know th4e index of an array > when I am in a "for @array" loop. I can do it with a >

Re: Fwd: Re: grammars and indentation of input

2016-09-13 Thread Patrick R. Michaud
On Tue, Sep 13, 2016 at 10:35:01AM -0400, Bennett Todd wrote: > Having the minutia of the programmatic run-time state of the parse then > influence the parse itself, is at the heart of the perl5 phenomenon "only > Perl can parse perl", which I rather hope isn't going to be preserved in > perl6.

Re: can Perl 6 bootstrap itself

2016-08-25 Thread Patrick R. Michaud
On Thu, Aug 25, 2016 at 10:37:45AM -0700, Dipesh Sharma wrote: > Dependency on perl5 for building perl6 looks like a concern. It means that > we can't have and environment with perl6, without perl5. I disagree. Just because perl5 is currently required to *build* Rakudo doesn't mean that perl5

Re: Startup performance on OS X

2016-10-03 Thread Patrick R. Michaud
On Mon, Oct 03, 2016 at 04:26:10PM +0200, Elizabeth Mattijsen wrote: > > On 02 Oct 2016, at 11:00, Thor Michael Støre wrote: > > Is this normal startup performance? > > https://www.promptworks.com/blog/public-keys-in-perl-6 > > I wonder what would be needed to run this in

Re: Startup performance on OS X

2016-10-02 Thread Patrick R. Michaud
On Sun, Oct 02, 2016 at 11:00:38AM +0200, Thor Michael Støre wrote: > Thormicks-MacBook-Pro-3:~ thormick$ time perl6 -e "say 'foo'" > foo > > real 0m0.205s > user 0m0.150s > sys 0m0.045s > > [...] > > Foo indeed! ~200ms for this seems awfully slow to me. On another hand, my machine shows:

Re: maintainability and "or"

2017-03-21 Thread Patrick R. Michaud
On Tue, Mar 21, 2017 at 02:25:02PM -0400, Brandon Allbery wrote: > On Tue, Mar 21, 2017 at 7:38 AM, ToddAndMargo wrote: > > $Name.IO.f or $Name.IO.open(:w).close; > > fwiw I consider this a perl3_to_5-ism; it's an optimization, and a fairly > poor one for readability and

Re: maintainability and "or"

2017-03-21 Thread Patrick R. Michaud
On Tue, Mar 21, 2017 at 02:46:43PM -0400, Brandon Allbery wrote: > On Tue, Mar 21, 2017 at 2:37 PM, Patrick R. Michaud <pmich...@pobox.com> > wrote: > > > On Tue, Mar 21, 2017 at 7:38 AM, ToddAndMargo <toddandma...@zoho.com> > > wrote: > > &g

Re: RFE: throw an error on a single "="when used in an "if"

2017-03-20 Thread Patrick R. Michaud
On Mon, Mar 20, 2017 at 02:36:49PM +0100, Francesco Rivetti wrote: > On 18. mars 2017 11:54, Elizabeth Mattijsen wrote: > > > if (my $x = frobnicate(42)) { > > say $x > > } > [...] > > if frobnicate(42) -> $x { > > say $x > > } > > which is way more elegant. Should this make it wise to

Re: Need awk print sub

2017-08-04 Thread Patrick R. Michaud
How about... $ echo "a b c d" | ./perl6 -n -e '.words[1].say' b Pm On Fri, Aug 04, 2017 at 01:00:52PM -0700, ToddAndMargo wrote: > Hi All, > > How do I do this with a perl one liner? > > $ echo "a b c d" | awk '{print $2}' > b > > Many thanks, > -T

Re: Invoking method by name found in variable

2017-05-23 Thread Patrick R. Michaud
On Tue, May 23, 2017 at 09:01:54PM +0300, Gabor Szabo wrote: > given an object $o and the name of a method in $method = "run" > how can I invoke the $o.run() ? > > Something like $o.call($method) At one point it was done as $o."$method"() . > my $method = 'say'; 123."$method"(); 123 Pm

Re: getting help in the REPL

2017-06-14 Thread Patrick R. Michaud
On Wed, Jun 14, 2017 at 04:00:05PM +0300, Gabor Szabo wrote: > In the python interactive shell one can write dir(object) and it > lists the attributes and methods of the object. One can write > help(object) and get the documentation of the object. > Is there anything similar in Perl 6? I think

Re: Perl6 shell, Was: command auto-completion in perl6 shell

2017-05-31 Thread Patrick R. Michaud
On Wed, May 31, 2017 at 09:33:59AM -0400, Brock Wilcox wrote: > One of my dreams is to adopt a client/server + middleware model from nREPL > (clojure) which I think works really well, and likely to do that in > userspace as a regular module. Moving everything into REPL.pm (perl6 > instead of nqp)

Re: Any "note" without the "say"?

2017-09-15 Thread Patrick R. Michaud
On Fri, Sep 15, 2017 at 04:54:33PM -0400, Brandon Allbery wrote: > On Fri, Sep 15, 2017 at 4:51 PM, ToddAndMargo wrote: > > On 09/15/2017 01:29 PM, Brandon Allbery wrote: > >> Everyone does at one time :) It's really useful for debugging, but you > >> generally strip it out

Re: Need match character help

2018-05-20 Thread Patrick R. Michaud
On Fri, May 18, 2018 at 03:28:20PM +0200, Timo Paulssen wrote: > On 18/05/18 13:30, The Sidhekin wrote: > > > >   / ^ <[d..z]>* $/ > > That's pretty good! Putting the beginning-of-string anchor ^ anywhere > but the very start is surely an advanced move :) FWIW, sometimes I think it's worth

Re: Need match character help

2018-05-20 Thread Patrick R. Michaud
On Sun, May 20, 2018 at 03:02:34PM -0700, ToddAndMargo wrote: > On 05/20/2018 10:40 AM, Patrick R. Michaud wrote: > > On Fri, May 18, 2018 at 03:28:20PM +0200, Timo Paulssen wrote: > > > On 18/05/18 13:30, The Sidhekin wrote: > > > > > > > >   / ^ &l

Re: can't match unicode chars?

2018-07-31 Thread Patrick R. Michaud
On Tue, Jul 31, 2018 at 09:28:08PM +0200, Marc Chantreux wrote: > @*ARGS.map: { > gather { > my @lines; > for .IO.lines -> $l { >if /'›'/ { >@lines and take @lines; >@lines = $l; >} >else { >

Re: Catching exceptions in expressions

2018-08-03 Thread Patrick R. Michaud
Maybe something like...? $ cat t.p6 sub infix:(Callable $block, $otherwise) { CATCH { return $otherwise; } $block(); } sub divide($a, $b) { die "Zero denominator" if $b == 0; $a / $b } my $sixdivzero = { divide(6,0) } rescue -1; say "6/0 = ", $sixdivzero; my $sixdivtwo = { divide(6,2)

Re: Catching exceptions in expressions

2018-08-03 Thread Patrick R. Michaud
uld use Thunk as a type: > > sub infix:(Thunk:D $block, $otherwise) { } > > which would then allow you to do: > > my $sixdivzero = divide(6,0) rescue -1; # note absence of curlies > > > > One can wish, can’t one? > > > Liz > > > On 3 Aug 2018,

Re: need regex help

2018-08-03 Thread Patrick R. Michaud
The + essentially indicates that this is a character-class match. It's to distinguish things from <.alpha>, , , <-alpha>, and (among others). Pm On Fri, Aug 03, 2018 at 08:48:24PM +0200, Timo Paulssen wrote: > The + is required, perhaps because the first character after the opening > < is

Re: -c bug to report

2018-07-25 Thread Patrick R. Michaud
On Wed, Jul 25, 2018 at 11:48:30AM -0700, ToddAndMargo wrote: > Maybe I am trying to get "-c" to do too many things. > > What I would like it to do is to check everything right up to but not > actually run the program. Part of the challenge here is that unlike many other programming languages,

Re: Grammar doesn't seem to match any token

2018-09-23 Thread Patrick R. Michaud
I suspect the rule: rule other { . } means that in $input = '~i << to match (although will also end up matching the space after the "i" in the text string, since white spaces are no longer significant). Or try just changing the rule to be a token and leave the others as rules.