Re: Fwd: Working with a regex using positional captures stored in a variableperl6-us...@perl.org

2021-03-11 Thread Moritz Lenz
and then interpolated into a regex. > > Do capture groups need to be defined at the top level where the > regex is used? > > { # From a code example in the "Parsing" book by Moritz Lenz, p. 48, > section 5.2 >my $input = 'There are 9 million bicycles in b

Re: Where is "Subject"?

2017-02-23 Thread Moritz Lenz
contains both the headers and the body ($email in the README), and the subject is part of the headers. The only reason that $from and @to have a separate interface is that SMTP handles them separately. Cheers, Moritz -- Moritz Lenz https://deploybook.com/ -- https://perlgeek.de/ -- https://perl6.org/

Re: per 5 converter?

2017-02-12 Thread Moritz Lenz
ry to stay away from it. Cheers, Moritz On 12.02.2017 07:47, ToddAndMargo wrote: > Hi All, > > I know I asked this once before and I had though I'd written it > down, but do you have any favorite Perl5 to Per6 converters? > > Many thanks, > -T > -- Morit

Re: mocking $*OUT

2017-01-24 Thread Moritz Lenz
y > the code above doesn't work. Any ideas? Because say() is a high-level function that uses the lower-level $*OUT.print under the hood. >From rakudo's src/core/io_operators.pm: multi sub say(Str:D \x) { my $out := $*OUT; $out.print(nqp::concat(nqp::unbox_s(x),$out.nl-out)); }

Re: A stricter typed variable

2017-01-07 Thread Moritz Lenz
onstraint, ask yourself: could there be an object from another type that my could would also work with? Maybe I'm just calling a method that's implemented in type Str, but a user-supplied object could implement the same method as well. If it walks like a duck, and quacks like a duck, d

Re: A stricter typed variable

2017-01-07 Thread Moritz Lenz
= 'gzip', 'uuencode'; or even test format => 'gnutar', filter => my Str @ = ; My general advise is to not exaggerate the usage of container types. Think of Perl 6 as a dynamically typed language, and only add types where they make life easier for everybody involved. Cheers, Moritz -- Moritz Lenz https://deploybook.com/ -- https://perlgeek.de/ -- https://perl6.org/

Re: Need some help to understand how modify an AST.

2016-12-05 Thread Moritz Lenz
> This program displays an error message and doesn't find the value of > toto environment variable. > > > The only difference between the 2 programs is instruction "make( > %*ENV{$}" is part of the TOP method in the program 1 and > part of the varenv method in program 2. > > I'm certainly missing something but I don't understand why program 2 > doesn't work. I'm very interested to get explanations for that. It will > help me to understand how to modify and AST using Perl6. > > > Thanks a lot for your help. > > Best regards, > > Jean-Pierre > > -- Moritz Lenz https://deploybook.com/ -- https://perlgeek.de/ -- https://perl6.org/

Re: What is rakudo-star?

2016-11-18 Thread Moritz Lenz
On 19.11.2016 03:14, _ ifdog wrote: > So why there is not a star release of 2016.10 for windows ? Because nobody one yet. I'm happy to upload it for you if you provide it. Cheers, Moritz -- Moritz Lenz https://deploybook.com/ -- https://perlgeek.de/ -- https://perl6.org/

Re: Where to start?

2016-11-18 Thread Moritz Lenz
rogram in Linux. #!/usr/bin/env /path/to/your/rakudo/inst/bin/perl6 use v6; > Also, do I need to run perl6 through a compiler or > does it compile on the fly like perl 5? There's no separate compilation step. Cheers, Moritz -- Moritz Lenz https://deploybook.com/ -- https://perlgeek.de/ -- https://perl6.org/

Re: What's involved in the creation of a new Rakudo * version?

2016-10-16 Thread Moritz Lenz
e is: https://github.com/rakudo/star/blob/master/tools/star/release-guide.pod Cheers, Moritz -- Moritz Lenz https://deploybook.com/ -- https://perlgeek.de/ -- https://perl6.org/

Re: think I found a bug in the doc's

2016-10-04 Thread Moritz Lenz
$mod)returns Int:D it needs > three parameters Yes, that's right. If you tell me your github username, I can give you access so that you can change it directly on https://github.com/perl6/doc/. Otherwise a pull request would be very welcome. Cheers, Moritz -- Moritz Lenz https://deploybook.com/ -- https://perlgeek.de/ -- https://perl6.org/

Re: What are variables/parameters that start with a pipe | char

2016-10-01 Thread Moritz Lenz
ot;| (parameter)", which points to relevant documentation. Cheers, Moritz -- Moritz Lenz https://deploybook.com/ -- https://perlgeek.de/ -- https://perl6.org/

Re: Sorting Multidimentional Arrays

2016-10-01 Thread Moritz Lenz
For the record, you can simplify this a bit: @opposite = @opposite.sort(*[3]); > for @opposite -> $line { say $line; } > --- > > I have adapted this from: > http://www.wellho.net/resources/ex.php?item=p600/mapper > > I wanted to ask about the syntax, buy I have understood

Re: grammars and indentation of input

2016-09-13 Thread Moritz Lenz
t that has gone into it. Cheers, Moritz -- Moritz Lenz https://deploybook.com/ -- https://perlgeek.de/ -- https://perl6.org/

Re: NativeCall interface for a char ** argument

2016-05-27 Thread Moritz Lenz
Hi, On 25.05.2016 17:35, Fernando Santagata wrote: > Hello, > > Please excuse my naivety, I'm trying to use NativeCall to interface a > Perl6 program with a C library and I have a problem mapping a char ** > argument. > > The C function has this prototype: > > void function(char **arg1, char **

Re: How to capture an div 0 exception

2016-05-18 Thread Moritz Lenz
On 05/18/2016 01:39 PM, mt1957 wrote: On 18-05-16 13:07, Richard Hainsworth wrote: use v6; my $d = 1; my $e = 2; my $f = 0; #my $r; my $r = 5; CATCH { # when X::AdHoc { when Exception { .Str.say; # $r = 5; .resume } } $r = try { ( $d + $e ) / $f; }; # my $r = try EVAL '

Re: Fwd: perl6 INC

2016-05-11 Thread Moritz Lenz
On 05/11/2016 04:30 PM, Bennett Todd wrote: Thanks for the explanation. Sounds like an unfortunate situation, rather than letting the system admin choose modules within the limits of filesystem namespace, it's using a separate database, opaque to filesystem tools. I hope this is just a tempor

Re: Work around to "unwanted fail"

2016-05-11 Thread Moritz Lenz
Hi, On 05/11/2016 09:22 AM, Richard Hainsworth wrote: I had grammar RatingGrammar { rule TOP{ ^ + $ }; rule statement { '=' | { if ($/.CURSOR.pos < $/.orig.chars) { self.panic($/, "Declar

Re: DBIish: Why can't I interpolate variable holding database name?

2016-05-01 Thread Moritz Lenz
On 01.05.2016 15:36, James E Keenan wrote: > > Thanks; that worked: > > # > cat dbiish_connect_dynamic_3.pl6 > #!/usr/bin/env perl6 > use DBIish; > > my $db = 'hierarchy'; > my $dbh = DBIish.connect("Pg", :database($db)); Another nice little language feature is that you can reuse the name o

Re: question about Supply.act()

2016-04-28 Thread Moritz Lenz
On 04/28/2016 11:11 AM, mt1957 wrote: Hi, The documentation about the method act explains that 'the given code is guaranteed to be only executed by one thread at a time'. Can I assume from this that any other thread including the main thread isn't running? No. Other threads might still be run

Re: Perl 6 pod-handling code seems widely scattered

2016-04-27 Thread Moritz Lenz
On 04/25/2016 03:27 PM, Tadeusz Sośnierz wrote: On 25/04/16 14:13, Tom Browder wrote: I would like to hack on the pod handling code (particularly the HTML generation) but it seems to be quite scattered around github. Is http://github.com/perl6/Pod::To::HTML>> the definitive repo location for th

Re: Confused about rakudobrew and Rakudo Star

2016-02-08 Thread Moritz Lenz
On 02/06/2016 12:37 AM, Brock Wilcox wrote: Also note that in my listing I installed a specific rakudo release, the one that is included in the star tarball. That way further rakudo releases are irrelevant. There's a contradiction in terms here: if there were no Rakudo releases, you couldn't s

Re: Installing both from rakudobrew and Rakudo Star

2016-02-05 Thread Moritz Lenz
On 02/05/2016 01:57 AM, James E Keenan wrote: Follow-up questions to those I posed on perl6-users today. So I have successfully used rakudobrew to build moar and panda. That perl6 executable is located here: $ which perl6 /home/jkeenan/.rakudobrew/bin/perl6 Now, suppose I *also* wish to inst

Re: Confused about rakudobrew and Rakudo Star

2016-02-04 Thread Moritz Lenz
Hi, On 02/04/2016 01:44 PM, Brock Wilcox wrote: If my understanding is correct (might not be), the tarball should be ALMOST equivalent to: rakudobrew build moar 2016.01.1 # Install rakudo 2016.01.1 rakudobrew global 2016.01.1 # Make this the default rakudobrew build p

Re: Confused about rakudobrew and Rakudo Star

2016-02-04 Thread Moritz Lenz
On 02/04/2016 01:26 PM, James E Keenan wrote: On 02/03/2016 10:48 PM, Brandon Allbery wrote: On Wed, Feb 3, 2016 at 10:30 PM, James E Keenan wrote: I am evidently confused as to the relationship, if any, between the 'rakudobrew' utility and the Rakudo::Star distribution. In short: rakudo

Re: Is there another way to define a regex?

2016-01-17 Thread Moritz Lenz
On 01/17/2016 06:07 PM, Tom Browder wrote: > I'm trying to write all new Perl code in Perl 6. One thing I need is > the equivalent of the Perl 5 qr// and, following Perl 6 docs, I've > come to use something like this (I'm trying to ignore certain > directories): > > # regex of dirs to ignore >

Re: Jonathan's "Perl 6 Introductory course"

2015-12-31 Thread Moritz Lenz
On 12/31/2015 04:26 PM, Sitaram Chamarty wrote: > On 31/12/15 20:43, Tom Browder wrote: >> Jonathan's intro course, in pdf, here: >> >> https://github.com/rakudo/star/raw/master/docs/2015-spw-perl6-course.pdf >> >> is excellent, of course. But I really like the presentation theme and >> the

Re: Constants as members of a class

2015-12-18 Thread Moritz Lenz
Hi, On 12/18/2015 03:46 AM, TS xx wrote: > Hello dear perl6 users, > > I was in the need of declaring a member variable as a constant integer. I don't understand this. If it's a constant, why does it need to be member at all? A member is per-instance storage, which seems to be a waste for a cons

Re: Gather/take & return, PHP7-style

2015-12-10 Thread Moritz Lenz
On 12/09/2015 07:35 PM, yary wrote: This feature builds upon the generator functionality introduced into PHP 5.5. It enables for a return statement to be used within a generator to enable for a final expression to be returned (return by reference is not allowed). This value can be fetched using t

Announce: Rakudo Star Release 2015.11

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

Re: &MAIN signature to preserve @*ARGFILES ?

2015-11-28 Thread Moritz Lenz
Hi, On 11/28/2015 05:49 PM, Marc Chantreux wrote: > hello, > > i would like to write a better version of the unix `column` with some > options like 'preserve separator' so i started to write it down. > > sub padded-cols ($sep,@sheet) { > my $fmt = > join $sep, > @sheet[0].key

Re: combine hashes

2015-11-07 Thread Moritz Lenz
On 11/07/2015 10:17 AM, Marc Chantreux wrote: > hello Moritz, > > On Sat, Nov 07, 2015 at 08:17:21AM +0100, Moritz Lenz wrote: >> my %x = < login jdoe first john last doe >; >> my %y = flat (:enable, %x< login first >:p); > > i tried :p but the thing is i

Re: combine hashes

2015-11-06 Thread Moritz Lenz
Hi, On 11/07/2015 02:45 AM, Marc Chantreux wrote: > hello, > > using perl6 version 2015.09 built on MoarVM version 2015.09, > i'm trying to create a hash with a slice of another one and some extra > pairs. as exemple: > > my %x = < login jdoe first john last doe >; > my %y = :enable, |

Re: Ecosystem problems

2015-11-02 Thread Moritz Lenz
Hi, On 11/02/2015 05:22 AM, Richard Hainsworth wrote: > Dear All, > > I'm working on a sort of citation index of Perl6 modules. One general > problem: > > There are two modules in the ecosystem, viz. io-prompt and lolsql, that > do not have ether META.info or META6.json file. > > This is prob

Re: Missing documentation

2015-10-29 Thread Moritz Lenz
On 10/29/2015 09:14 AM, Steve Mynott wrote: > I renamed it to 5to6-nutshell.html. ... and I created a redirect from 5to6 to 5to6-nutshell: https://github.com/perl6/doc/commit/df1b189dec Cheers, Moritz

Re: How to call a super class method?

2015-10-28 Thread Moritz Lenz
On 10/28/2015 08:03 AM, Patrick R. Michaud wrote: On Wed, Oct 28, 2015 at 03:31:09AM +, TS xx wrote: Can I call the Person's constructor (in non static context), pass the required parameter and do more things before returning? There are two answers to this question, both of which likely

Re: How to profile Perl 6 applications?

2015-10-24 Thread Moritz Lenz
Hi, On 10/24/2015 09:52 AM, Timo Paulssen wrote: > On 24/10/15 09:40, Moritz Lenz wrote: >> Hi Gabor, >> >> On 10/24/2015 09:26 AM, Gabor Szabo wrote: >>> The Devel::NYTProf helped me a lot locating the source of slowness on >>> the Perl Maven site. >>

Re: Forking or running external process in background

2015-10-24 Thread Moritz Lenz
On 10/24/2015 10:06 AM, Gabor Szabo wrote: > I am trying to test the Perl6::Maven web application by launching the > full application (which is uses Bailador) and then accessing the pages > using LWP::Simple. > > > Unfortunately so far I could not figure out how to launch an external > program

Re: How to profile Perl 6 applications?

2015-10-24 Thread Moritz Lenz
Hi Gabor, On 10/24/2015 09:26 AM, Gabor Szabo wrote: > The Devel::NYTProf helped me a lot locating the source of slowness on > the Perl Maven site. > Is there something similar for Perl 6 so I can try to improve the speed > of the Perl 6 Maven site too? Rakudo has a --profile command line option,

Announce: Rakudo Star Release 2015.09

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

Re: require on string stopped working in rakudo 2015.09

2015-09-26 Thread Moritz Lenz
On 09/26/2015 01:07 PM, Elizabeth Mattijsen wrote: >> On 26 Sep 2015, at 06:47, Gabor Szabo wrote: >> I am really glad Rakudo finally came out. >> I've installed in and tried to run the tests of Perl6::Maven. >> >> They quickly failed as I have been using 'require' on string >> to check if all t

Re: Method 'send' not found for invocant of class 'IO::Socket::INET'

2015-09-26 Thread Moritz Lenz
Hi, method .send was deprecated in favor of .print (for strings) and .write (with bufs/blobs) Maybe Bailador or one of its dependencies needs updating. Cheers, Moritz

Re: How to push a hash on an array without flattening it to Pairs?

2015-09-26 Thread Moritz Lenz
On 09/26/2015 02:26 PM, Aristotle Pagaltzis wrote: > Now of course I must ask – is there an opposite also? I.e. when writing > a list, is there a way I can say “do flatten this item?” Yes, that's what type Slip is for: http://doc.perl6.org/type/Slip It's useful for returning more than one list

Re: require on string stopped working in rakudo 2015.09

2015-09-26 Thread Moritz Lenz
Hi, On 09/26/2015 06:47 AM, Gabor Szabo wrote: > Hi, > > I am really glad Rakudo finally came out. > I've installed in and tried to run the tests of Perl6::Maven. > > They quickly failed as I have been using 'require' on string > to check if all the module compile properly. > > The following co

Re: How to push a hash on an array without flattening it to Pairs?

2015-09-26 Thread Moritz Lenz
Hi, On 09/26/2015 07:58 AM, Gabor Szabo wrote: > In the first two cases the hash was converted to Pairs before assigning > to the array. > Only the third case gave what I hoped for. How can I push a hash onto an > array as a single entity? > > > use v6; > > my %h = x => 6, y => 7; > say %h.perl

Re: What are Perl 6's killer advantages over Perl 5?

2015-08-26 Thread Moritz Lenz
Hi, On 11.08.2015 14:12, Tom Browder wrote: I have seen several lists of new Perl 6 features (versus Perl 5) but they all seem to be lists that intermix features with varying degrees of value to "ordinary" Perl 5 users. If one wants to sell long-time Perl 5 users (already using the latest Perl

Re: Is < > creating and Array or Parcel ?

2015-08-02 Thread Moritz Lenz
Hi, On 02.08.2015 06:43, Gabor Szabo wrote: On Fri, Jul 31, 2015 at 4:16 PM, Moritz Lenz mailto:mor...@faui2k3.org>> wrote: On 07/31/2015 03:02 PM, Gabor Szabo wrote: The following code (with comments) is confusing me. Can someone give some explanation

Re: Is < > creating and Array or Parcel ?

2015-07-31 Thread Moritz Lenz
On 07/31/2015 03:02 PM, Gabor Szabo wrote: The following code (with comments) is confusing me. Can someone give some explanation please? Specifically the difference between my @x = ; It's the assignment to the Array variable that makes the Array here; < > by itself just creates a Parcel:

Announce: Rakudo Star Release 2015.07

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

Re: perl6/book fonts: why Adobe commercial fonts?

2015-07-22 Thread Moritz Lenz
Hi, On 07/23/2015 01:03 AM, Tom Browder wrote: Is there any reason to use Adobe commercial fonts for the book? As I read the instructions to copy fonts from Adobe Reader, I worry that that is prohibited by the license from Adobe. Building the book without the fonts results in an ugly book in s

Re: Passing a hash to a subroutine: best method?

2015-07-03 Thread Moritz Lenz
On 07/03/2015 10:02 PM, yary wrote: > On Fri, Jul 3, 2015 at 3:03 PM, Timo Paulssen wrote: >> but this does not >> >>> sub takes_int_array(Int @bar) { say @bar } >>> takes_int_array([1, 2, 3]) >> >> because the type match is against the defined type. We do not >> automatically infer that [1, 2,

Re: Sub args: choose one of two?

2015-06-28 Thread Moritz Lenz
Hi, On 06/28/2015 12:39 AM, 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. So since it's not optional, you might

Re: Perl 5's $0 vs. Perl 6's $*EXECUTABLE_NAME

2015-05-30 Thread Moritz Lenz
Hi, On 05/30/2015 04:36 PM, Paul Cochrane wrote: > Thanks for pointing out the $*PROGRAM omission! I've just added it to the > list of special variables and it should be available online within the next > 10-15 minutes. Minor nit pick: according to the last log on http://doc.perl6.org/build-log/

Re: Can a user "cheat" and call a class's private method?

2015-05-12 Thread Moritz Lenz
Hi, On 05/12/2015 09:40 PM, R. Ransbottom wrote: > On Mon, May 11, 2015 at 03:22:46PM -0700, Darren Duncan wrote: > >> you can use "trusts". Also having to do this may indicate bad code >> design. -- Darren Duncan > > I saw Moritz' and Carl's responses and I agree with the smell > issue. > >

Re: class/object variables

2015-04-23 Thread Moritz Lenz
On 04/21/2015 10:37 PM, mt1957 wrote: L.s. The following piece of code shows that one must be careful using my or state variables in a class. They have the same behavior as an our variable if I am right. The difference is that 'our'-variables can be accessed from the outside ($A::p), 'my' a

Re: Fancy sub arg handling: ability to expand error message?

2015-03-28 Thread Moritz Lenz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, On 28.03.2015 12:27, Tom Browder wrote: > I like the subroutine arg handling in Perl 6. Is there any simple > way to attach a short error msg in place of or additive to the > default for, say, a missing arg? You can always use multi subs, and

Re: Example module and its use

2015-03-28 Thread Moritz Lenz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 28.03.2015 11:05, Tom Browder wrote: > On Sat, Mar 28, 2015 at 5:01 AM, Tom Browder > wrote: >> On Fri, Mar 27, 2015 at 8:27 PM, Nathan Brown >> wrote: > > Okay, this works: > > use Bar :DEFAULT; > > but this does not: > > use Bar ; > > So i

Re: Can a user "cheat" and call a class's private method?

2015-03-26 Thread Moritz Lenz
Hi, On 26.03.2015 16:55, Tom Browder wrote: > I need to test some private routines, so is there a way to do that? The easiest way to do that is when the class with the private methods trusts the class that calls them. See for example http://doc.perl6.org/type/Metamodel::Trusting http://design.per

Re: How to get indirect access to a class attribute?

2015-03-25 Thread Moritz Lenz
Hi, On 25.03.2015 13:44, Tom Browder wrote: > Given a class like: > > our %attrs = (age=>1,wgt=>2); > class foo { has $.age = rw;} should be 'has $.age is rw'. The "is" indicates a trait (not an assignment). > method a { > for %attrs.kv -> $k, $v { > my $aval = self."

Re: Object Introspection for Existence of Methods: How?

2015-03-23 Thread Moritz Lenz
Hi, On 03/23/2015 01:48 AM, Henk van Oers wrote: On Sun, 22 Mar 2015, Tom Browder wrote: On Sun, Mar 22, 2015 at 7:13 PM, Henk van Oers wrote: On Sun, 22 Mar 2015, Tom Browder wrote: I'm trying to write a test. To test what? Your own typo's? The tests are for a public Perl 6 module trans

Announce: Rakudo Star Release 2015.03

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

Re: Need help with: Cannot find method 'postcircumfix:<( )>'...

2015-03-20 Thread Moritz Lenz
On 03/20/2015 11:00 AM, Timo Paulssen wrote: On 03/20/2015 03:40 AM, Brandon Allbery wrote: On Thu, Mar 19, 2015 at 10:33 PM, Tom Browder mailto:tom.brow...@gmail.com>> wrote: Why do you say that is not a method? The first line says Sorry, somehow I managed to misread that. So you wa

Re: Passing arrays to subroutines

2015-03-19 Thread Moritz Lenz
On 03/19/2015 04:05 PM, Tom Browder wrote: In Perl 5 I can do this: my @a = (1, 2); my @b = (3); foo(@a,@b); sub foo { my $n = @_; die "Wrong num args: $n" if ($n != 3);} In Perl 6 I think this is correct (or nearly so): sub foo(*@args) { die "Wrong num args: { @args.elems }" if @args.ele

Re: Can a class have an attribute and a method with the same name?

2015-03-19 Thread Moritz Lenz
Hi, On 03/19/2015 12:40 AM, Tom Browder wrote: I have a class with an attribute and a method with the same name and it looks so far like they clash. Attributes are always private. If you write 'has $.x', that generates not only the attribute, but also an accessor method of name 'x'. See also

Re: Object Contruction

2015-03-18 Thread Moritz Lenz
Hi On 03/18/2015 01:06 PM, Tom Browder wrote: My new object needs some methods run during construction. How can I do that without defining my own "new" method? http://doc.perl6.org/language/objects#Object_Construction lists at least two possible ways. Probably the most interesting one is BUI

Re: Perl 6 Debugging

2015-03-14 Thread Moritz Lenz
On 15.03.2015 00:05, Tom Browder wrote: > On Sat, Mar 14, 2015 at 5:25 PM, Elizabeth Mattijsen wrote: >>> On 14 Mar 2015, at 23:19, Tom Browder wrote: > ... >> Could you post the code of test_ellipsoid.pl for others to see (e.g. on >> gist.github.com)? That would help in tracing the problem (whi

Announce: Rakudo Star Release 2015.01

2015-02-07 Thread Moritz Lenz
# Announce: Rakudo Star Release 2015.01 ## A useful, usable, "early adopter" distribution of Perl 6 On behalf of the Rakudo and Perl 6 development teams, I'm happy to announce the January 2015 release of "Rakudo Star", a useful and usable distribution of Perl 6. The tarball for the January 2015 r

Re: time and now showing different time?

2015-01-12 Thread Moritz Lenz
On 01/12/2015 10:36 AM, Gabor Szabo wrote: On Mon, Jan 12, 2015 at 10:35 AM, Tobias Leich mailto:em...@froggs.de>> wrote: Also interesting might be the fact that BEGIN statements/blocks do return a value: say now() - BEGIN now; # parens needed to there so that it does not gobble

Re: Could method calls warn in void context?

2015-01-10 Thread Moritz Lenz
To elaborate a bit on the previous answer: On 10.01.2015 17:12, Tobias Leich wrote: In case we would know that certain methods had no side effects (and are not called because of their side effects), ... But at the moment we don't know and therefore we can't warn for every method. there are tw

Re: Rationale for a VM + compiler approach instead of an interpreter?

2014-12-06 Thread Moritz Lenz
Hi, On 06.12.2014 18:55, Mayuresh Kathe wrote: Hello, I have been reading up (a bit) on Perl6 and found most articles mentioning Parrot + Rakudo as the primary tools for development using the language. Well, these days we have three backends (MoarVM, JVM and Rakudo). Is there any rationale

Re: The next 100 Years

2014-11-17 Thread Moritz Lenz
Hi Sayth, On 17.11.2014 12:51, Sayth Renshaw wrote: As a person new and looking at Perl 6 as I have done over the time I am interested to know from Perl 6 Language advocates what exactly the strength and benefit of Perl 6 is and will likely be? * Perl 6's built-in grammars make parsing really

Re: Date truncated-to method argument?

2014-11-10 Thread Moritz Lenz
Hi, On 11/10/2014 01:39 PM, Steve Mynott wrote: http://doc.perl6.org/type/Date says my $c = Date.new('2012-12-24'); say $c.truncated-to(:year); # 2012-01-01 but this doesn't work and what's implemented appears to be "year" rather than :year $ perl6 my $c = Date.new('2012-12-24'); 2012-1

Re: Orphaned module Form

2014-09-09 Thread Moritz Lenz
Hi all, On 08.09.2014 10:44, Kamil Kułaga wrote: > Hi, > > There is a https://github.com/mathw/form trying to implement > http://search.cpan.org/~dconway/Perl6-Form-0.005/lib/Perl6/Form.pm > > Module is still usable but fails tests. > > retupmoca has prepared https://github.com/masak/data-prett

Re: Orphaned module Form

2014-09-09 Thread Moritz Lenz
Hi all, On 09/09/2014 02:26 PM, Will Coleda wrote: Looks like this repo has commits as of a day ago, and mathw is back on the case. I brought this up on IRC yesterday, see http://irclog.perlgeek.de/perl6/2014-09-08#i_9314918 So I meant to fork the project into the perl6 organization, and then

Re: match an empty string?

2014-07-13 Thread Moritz Lenz
Hi all, On 13.07.2014 00:15, David Warring wrote: > Hi Marc, > This looks like a Perl 5 complementary character match: [^:]* > > But it means something quite different in Perl6. From S05 > > > Bracket rationalization >

Re: Code execution during compilation

2014-06-15 Thread Moritz Lenz
Hi, class and role bodies are executed at compile time, so yes, that's expected. The same thing happens in BEGIN blocks. (Actually, the case with roles is more complicated; iirc their bodies are executed at role application time, but in your example, 'class B does Xx' runs at compile time, so the

Re: Perl6 and wxwidgets

2014-06-08 Thread Moritz Lenz
Hallo Erik, On 08.06.2014 12:54, Erik Colson wrote: > Is it possible to use an external C-library like wxwidgets from perl6/moarvm ? > If so, is there any doc how this can be achieved ? It is, through the NativeCall library: https://github.com/jnthn/zavolaj/ Cheers, Moritz

Re: Regex: fail if ... present

2014-05-30 Thread Moritz Lenz
Hi Peter, On 30.05.2014 22:39, Peter Schwenn wrote: > Dear Moritz, > > $txt ~~ s:g/ \. Guid /.Moniker/; > > transforms (in $txt):System.Guid -> System.Moniker > > i.e. the match succeeds. So obviously I'm not understanding negative > look-ahead correctly. Where's there a good descriptio

Re: Regex: fail if ... present

2014-05-30 Thread Moritz Lenz
Hi Peter, On 30.05.2014 20:46, Peter Schwenn wrote: > Dear Perl6istes, > > How does one express in a perl6 match pattern that if a certain > subpattern is present the match fails. > > I had expected something like: > > $txt ~~ s/... -[ unwanted \s+ pattern ] .../ .../; > > but its not that.

Re: Does perl have ensue override?

2014-05-19 Thread Moritz Lenz
wrote: > Hi Moritz, > > I've tried to adapt Your gist to something else but I've realized that > it does not work with stubs. Is it possible to bypass problem with > incomplete R? > > https://gist.github.com/teodozjan/b7183c81c966cfeee3bd > > I feel

Re: Does perl have ensue override?

2014-05-16 Thread Moritz Lenz
Hi Kamil, On 05/15/2014 07:48 PM, Kamil Kułaga wrote: Is there any ordinary way (not something like getting list of methods from base class) to ensure we are overriding method? Java has @Override annotation that that causes compilation error if method is not necessary for Interface(Role). It is

Re: perl 6 beginner: regex questions

2014-02-04 Thread Moritz Lenz
Hi, On 02/01/2014 10:56 PM, infor...@hushmail.com wrote: > Hello, > > I have a few questions about the regexes. I'm new to perl 6 > and I don't know perl 5. I'm proficient with grep/sed. > > I installed Rakudo with the defaults on Linux (Mandriva 2010.1) > and Windows 7. I get identical output

Re: how to set constants from command line?

2013-12-14 Thread Moritz Lenz
Hi Richard, On 12/12/2013 08:56 AM, Richard Hainsworth wrote: I would like to set a series of magic numbers from the command line. I have in a program constant N-SCENARIOS = 10; which works great. But I would like to set an option in the command line, such as perl6 program.p6 scenarios=15 .

Re: New behaviour of Rakudo*

2013-11-28 Thread Moritz Lenz
On 11/28/2013 10:32 PM, Parrot Raiser wrote: Is there some reason that 2013.11 changed the name of perl6 to perl6-p? It broke my download-compile-and-set-links script. Yes, the possibility to run Rakudo on multiple backends. If my memory doesn't deceive me, you were even one of those who aske

Rakudo Star 2013.11 released

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

Announce: Rakudo Star Release 2013.09

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

Rakudo Star 2013.08 released

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

Re: prove that the meaning of live is math

2013-05-26 Thread Moritz Lenz
Hi Marc, On 05/26/2013 12:49 PM, Marc Chantreux wrote: > say [+] > ('a'..'z')\ > .pairs\ > .map: { 1 + .key if .value ~~ any < m a t h > } > > i already know i have to get used to the anoying \ at the end of the > lines but i'm pretty sure there are plenty ways to make this expressi

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

2013-03-05 Thread Moritz Lenz
On 03/05/2013 12:02 PM, Rob Hoelz wrote: On 3/5/13 11:44 AM, Patrick R. Michaud wrote: 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 spe

Announce: Rakudo Star 2013.02 released

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

Re: Per-Object Roles..

2013-02-23 Thread Moritz Lenz
Hi Frank, On 02/24/2013 07:27 AM, Frank White wrote: > Hi, I am new to Perl6 and I'm interested in the feature that allows you to > add roles to classes. From what I understand you can add a role to an > object using the "does" keyword. Is there any way you can remove a role or No, you cannot r

Rakudo Star 2013.01 released

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

Announce: Rakudo Star 2012.12 release

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

Rakudo Star 2012.11 released

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

Re: the nature of a scalar?

2012-10-24 Thread Moritz Lenz
On 10/24/2012 02:46 PM, Marc Chantreux wrote: use v6; use lib 'lib'; use Bailador; get / (.*) '/' / => sub ($path) { $path||="foo"; $path is a subroutine parameter, and thus read-only by default. If you want to modify $path locally, write sub ($path is copy) { ... } Also if Bailador

Re: perl6 spec tests results ?

2012-08-28 Thread Moritz Lenz
Hi, On 08/28/2012 10:09 PM, Marc Chantreux wrote: > i'm writing an article on Perl6 and i would like some facts to reassure > early adopters. according to the test suite and the will of Perl6 > implentors, what proportion (in %) of Perl6 can be concidered as stable? That's a hard question to answ

Re: File content is not written if close not called

2012-07-17 Thread Moritz Lenz
On 07/17/2012 07:07 PM, Tim Bunce wrote: > On Thu, Jul 12, 2012 at 10:38:32AM -0500, Patrick R. Michaud wrote: >> 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. >> >

Re: Capturing warning

2012-07-12 Thread Moritz Lenz
Am 12.07.2012 13:50, schrieb Gabor Szabo: On Thu, Jul 12, 2012 at 2:31 PM, Tadeusz Sośnierz wrote: On Thu, 12 Jul 2012 13:27:26 +0200, Gabor Szabo wrote: Hi, is there a way to capture warnings in Perl 6 - similar to $SIG{__WARN__} in Perl 5 ? Gabor CONTROL block seems to be the soluti

Re: Perl6 grammars -- Parsing english

2012-07-11 Thread Moritz Lenz
Hi Lard, sorry for the late and incomplete answer. Am 04.07.2012 15:09, schrieb Lard Farnwell: Hi Moritz, Thanks that was interesting. My investigation into grammars took a while but here are the results thus far: Grammar rules and regexes are just methods… I hadn't thought about what a g

Re: Odd number of elements found where hash expected while bootstrapping Panda

2012-07-01 Thread Moritz Lenz
Hi, please 'git pull' in your panda dir, and try again. (That version also requires newest rakudo The root cause was probably a problem with the web service that panda uses, mixed with bad error reporting. I have tried to make things a bit more robust, and Tadeusz has fixed the web service. I'll

  1   2   >