Re: rakudobug failure

2019-05-13 Thread Elizabeth Mattijsen
> On 13 May 2019, at 14:26, Parrot Raiser <1parr...@gmail.com> wrote: > > I tried to report a failure to rakudobug, which generated the > following report from the mailer: > - > --- > Date: Fri, 10 May 2019 15:59:32 -0700

Re: rakudobug failure

2019-05-13 Thread Elizabeth Mattijsen
I would assume this is still fallout from the Perl NOC maintenance weeks. Will pass this on to the people in the know. Thanks for the report! > On 13 May 2019, at 14:26, Parrot Raiser <1parr...@gmail.com> wrote: > > I tried to report a failure to rakudobug, which generated the > following

Re: MoarVM panic when using PKafka

2019-03-29 Thread Elizabeth Mattijsen
I believe creating a MoarVM issue for this, is the right way forward. > On 28 Mar 2019, at 21:28, Konrad Bucheli via perl6-users > wrote: > > Sorry, I forgot about > > # perl6 -v > This is Rakudo version 2019.03.1 built on MoarVM version 2019.03 > implementing Perl 6.d. > > > > Von: Konrad

Re: How do I trap a crash?

2019-01-11 Thread Elizabeth Mattijsen
Perhaps https://docs.perl6.org/language/exceptions#Catching_exceptions could be enlightening? > On 11 Jan 2019, at 18:54, ToddAndMargo via perl6-users > wrote: > > Hi All, > > I would like to do a Send Notify when a program of mine > crashes. > > How do I trap a crash? > > Is there a way

Re: [DFW.pm] Sad News

2019-01-08 Thread Elizabeth Mattijsen
FWIW: https://p6weekly.wordpress.com/2018/12/30/2018-53-goodbye-perljam/ > On 8 Jan 2019, at 17:42, Bruce Gray wrote: > > > >> Begin forwarded message: >> >> From: Matthew Musgrove via DFW-pm >> Subject: [DFW.pm] Sad News >> Date: January 7, 2019 at 3:03:16 PM CST >> To:

Re: Basic question about lexical binding in relationship with "list assignment"

2019-01-02 Thread Elizabeth Mattijsen
Fixed with https://github.com/rakudo/rakudo/commit/23663609a7 > On 27 Dec 2018, at 09:29, Raymond Dresens wrote: > > Hello, > > I'm getting up to speed with Perl 6 again after a long while, and I more > or less 'hit my nose' against something that I can reduce to the > following very basic

Re: Basic question about lexical binding in relationship with "list assignment"

2018-12-27 Thread Elizabeth Mattijsen
I’d say it is a bug you do not get the error with “my ($foo) = 6”, as clearly the first “say $foo” inside the scope is referring to the inner $foo, not the outer $foo. So I’d suggest filing an issue for that: https://github.com/rakudo/rakudo/issues > On 27 Dec 2018, at 09:29, Raymond Dresens

Re: exceptions in threads

2018-11-10 Thread Elizabeth Mattijsen
In v6.d this throws the exception: $ 6 'start die("bye"); sleep 1' Unhandled exception in code scheduled on thread 4 bye in code at -e line 1 whereas the exception is silently ignored in 6.c: $ 6 'use v6.c; start die("bye"); sleep 1' Not sure if this answers your question, as it is unclear

Re: KEEP/UNDO phaser question

2018-10-28 Thread Elizabeth Mattijsen
> On 28 Oct 2018, at 01:51, Norman Gaywood wrote: > Just been reading the latest of Elizabeth's wonderful blog posts on how > phasers work in perl6: > https://opensource.com/article/18/10/how-phasers-work-perl-6 > > I have question on the KEEP/UNDO example: > { > KEEP $dbh.commit; >

Re: Appropriate last words

2018-10-21 Thread Elizabeth Mattijsen
I’m not sure what you mean by: "How do I attach a default CATCH to all methods in the class.”. What are you trying to achieve? > On 21 Oct 2018, at 10:35, Richard Hainsworth wrote: > > This sounds great. > > So I am writing a class verifies conditions, and dies when conditions are not >

Re: augment again

2018-10-20 Thread Elizabeth Mattijsen
> On 20 Oct 2018, at 17:50, Joseph Brenner wrote: > > By the way, I'd really like to know what the vertical bar is here in > front of "CORE": > >> for (|CORE::) .grep({ .key eq .value.^name }) .map( *.value ) -> $class { > > It's not the "any" junction, is it? How would that make sense

Re: augment again

2018-10-20 Thread Elizabeth Mattijsen
) .map( *.value ) -> $class { >my $class_name = $class.^name; >try { >say $class; >$class.^compose; > CATCH { default { say "Problem with $class_name"; } } >} > } > > > > On 10/19/18, Elizabeth Mattijsen wrote: &g

Re: augment again

2018-10-19 Thread Elizabeth Mattijsen
See also: https://stackoverflow.com/questions/52718499/how-to-correctly-augment-any > On 19 Oct 2018, at 03:52, Joseph Brenner wrote: > > I've got another question about aug--yes, I know--ment. > > I've got a module ides_of_augment.pm6: > > use MONKEY-TYPING; > augment class Any { >

Re: zef installs not working

2018-10-17 Thread Elizabeth Mattijsen
Which version of Rakudo are you using? > On 17 Oct 2018, at 05:20, Joseph Brenner wrote: > > Lately zef hasn't been working for me to do module installation. > I can do things like "zef --list" to get a list of available > modules but when I actually try to do the installation I see > things

Re: Default directory for files

2018-10-16 Thread Elizabeth Mattijsen
$?FILE.IO.sibling(‘Templates’) ? > On 16 Oct 2018, at 10:33, Richard Hainsworth wrote: > > Hi. > > Haven't been able to work this one out from the documentation. There must be > a simple answer. > > I am developing a module that renders stuff into HTML. > > The module uses mustache

Re: websearches on "perl6"

2018-10-08 Thread Elizabeth Mattijsen
Both are mentioned in that email. > On 8 Oct 2018, at 13:16, ToddAndMargo via perl6-users > wrote: > > On 10/8/18 1:49 AM, Elizabeth Mattijsen wrote: >> https://www.nntp.perl.org/group/perl.perl6.users/2018/10/msg5957.html > > Actually, I was looking for the article

Re: websearches on "perl6"

2018-10-08 Thread Elizabeth Mattijsen
https://www.nntp.perl.org/group/perl.perl6.users/2018/10/msg5957.html > On 8 Oct 2018, at 01:50, ToddAndMargo via perl6-users > wrote: > > On 10/7/18 11:06 AM, Elizabeth Mattijsen wrote: >>> On 7 Oct 2018, at 18:31, Joseph Brenner wrote: >>> Would anyone happen t

Re: websearches on "perl6"

2018-10-07 Thread Elizabeth Mattijsen
> On 7 Oct 2018, at 18:31, Joseph Brenner wrote: > Would anyone happen to know if there's a duckduckgo trick to get just > perl6 links and not perl5? > > If you just append "perl6" it'll be mostly perl6 info in the top ten, > but there tends to be at least some perl5 intermixed in it. Have you

Re: Could this be any more obscure?

2018-10-03 Thread Elizabeth Mattijsen
> On 3 Oct 2018, at 02:48, ToddAndMargo wrote: > > On 10/2/18 2:24 AM, Elizabeth Mattijsen wrote: >> Also, a hopefully less steep introduction: >> >> https://opensource.com/article/18/9/signatures-perl-6 >> > > Will do! Thank you! > > Do you

Re: Could this be any more obscure?

2018-10-02 Thread Elizabeth Mattijsen
Also, a hopefully less steep introduction: https://opensource.com/article/18/9/signatures-perl-6 > On 2 Oct 2018, at 11:01, Simon Proctor wrote: > > https://docs.perl6.org/type/Signature > > Todd can I ask that you read this page of the docs for two reasons. Firstly > understanding

Re: Installing Perl6 on shared server

2018-09-26 Thread Elizabeth Mattijsen
> On 26 Sep 2018, at 06:03, Richard Hainsworth wrote: > > Further to this question. Support staff at hosting company just informed me > that for the plan I have at present, the following limits are in place: > > 60 seconds CPU execution time per process Build time on my MBP is around 75

Re: Information about Perl 6 internals

2018-09-21 Thread Elizabeth Mattijsen
> On 20 Sep 2018, at 18:45, Curt Tilmes wrote: >> Since I'm here :-) will Perl 6 ever support a native type mirroring the >> __float128 quadruple-precision type provided by gcc? >> > I'll wager that the answer to "ever support" is probably yes, as long as > somebody wants it. We're just

Re: Is this a bug?

2018-09-16 Thread Elizabeth Mattijsen
> On Sun, Sep 16, 2018 at 2:28 PM Elizabeth Mattijsen wrote: > Definitely a bug. Which seems to be limited to the REPL only, fortunately. > > > On 16 Sep 2018, at 12:57, Fernando Santagata > > wrote: > > > > Hello, > > > > I found this behavi

Re: Is this a bug?

2018-09-16 Thread Elizabeth Mattijsen
Definitely a bug. Which seems to be limited to the REPL only, fortunately. > On 16 Sep 2018, at 12:57, Fernando Santagata > wrote: > > Hello, > > I found this behavior quite strange: > >> my int32 $a = 2 > 2 >> $a.^name > Int >> $a.WHAT > At Frame 1, Instruction 20, op 'getlex_ni', operand

Re: need p5/p6 :: help

2018-09-14 Thread Elizabeth Mattijsen
> On 15 Sep 2018, at 00:12, Vadim Belman wrote: >> In Perl 6 culture we never mix them up either, but we also never put subs >> into packages by default. The reason Foo::bar notation doesn't work is >> because bar isn't in Foo anymore unless you explicitly put it there. > Though technically this

Re: ->

2018-09-14 Thread Elizabeth Mattijsen
The combination of “->” and “{ }” is sometimes referred to as a “pointy block”, or even maybe just a “pointy”. The thing(s) inbetween the “->” and “{ }” are the “signature” of the “pointy block”. > On 14 Sep 2018, at 21:27, ToddAndMargo wrote: > > Hi All, > > I use `->` all the time. What

Re: .new?

2018-09-14 Thread Elizabeth Mattijsen
Good catch! I think that one is worth a documentation issue. The perl6doc builder gathered information about all “new” methods it could find *without any context*, and put them into one file. For a method such as “new” not the best thing to do. I would argue that this page should be

Re: Nil ?

2018-09-13 Thread Elizabeth Mattijsen
> On 13 Sep 2018, at 23:21, ToddAndMargo wrote: > On 09/13/2018 12:29 PM, Elizabeth Mattijsen wrote: >>> On 13 Sep 2018, at 20:47, ToddAndMargo wrote: >>> On 09/12/2018 10:09 AM, Larry Wall wrote: >>>> Basically, ignore any advice to treat Nil as a

Re: Nil ?

2018-09-13 Thread Elizabeth Mattijsen
> On 13 Sep 2018, at 20:47, ToddAndMargo wrote: > On 09/12/2018 10:09 AM, Larry Wall wrote: >> Basically, ignore any advice to treat Nil as a normal value, because >> it really is intended to represent the *absence* of a value as much as >> possible. It's a bit like the way solid-state

Re: Functions and subroutines?

2018-09-12 Thread Elizabeth Mattijsen
> On 12 Sep 2018, at 22:56, Joseph Brenner wrote: > With perl6, I find myself stumbling over what to call the built-ins... > "functions", "commands", "keywords”? perhaps “builtins"? Liz

Re: Nil ?

2018-09-12 Thread Elizabeth Mattijsen
Also: my $a is default(Nil); > On 12 Sep 2018, at 09:25, Simon Proctor wrote: > > If you don't define the type of a Scalar and don't assign to it you'll have > an undefined Any (the Parent class of all the other types). If you assign Nil > to it then you have the same effect. > > You can

Re: use Moo:from;

2018-09-05 Thread Elizabeth Mattijsen
FWIW, I have been trying to get https://modules.perl6.org/dist/Object::Trampoline to work with lazy attributes: so far this has gotten me into an infiniloop . Perhaps you can find out why :-) > On 5 Sep 2018, at 23:10, Simon Proctor wrote: > > So I have a thought for how to do lazy

Re: Appropriate last words

2018-09-04 Thread Elizabeth Mattijsen
FWIW, that’s because the True returned by the “note” gets coerced to Int: True -> 1 > On 4 Sep 2018, at 15:32, Parrot Raiser <1parr...@gmail.com> wrote: > > exit note "message"; > seems to work well as a substitute. "note" outputs the message, and > exit sends the return code (1) to the OS,

Re: Handing over control

2018-09-03 Thread Elizabeth Mattijsen
https://docs.perl6.org/language/5to6-perlfunc#exec > On 3 Sep 2018, at 18:41, Parrot Raiser <1parr...@gmail.com> wrote: > > In Perl 5, a program can hand over control to another with exec: > https://perldoc.perl.org/functions/exec.html > e.g perl -e 'exec vim' opens up vim > > What's the Perl

Re: Appropriate last words

2018-09-03 Thread Elizabeth Mattijsen
note “message”; exit > On 3 Sep 2018, at 18:03, Parrot Raiser <1parr...@gmail.com> wrote: > > perl6 -v > This is Rakudo Star version 2018.06 built on MoarVM version 2018.06 > implementing Perl 6.c. > > In Perl 5: > die "Message"; outputs Message, followed by the program line number. > die

Re: Missing or wrong version of dependency

2018-09-03 Thread Elizabeth Mattijsen
Perhaps it’s better to make this a zef issue on Github? > On 3 Sep 2018, at 02:50, Peter Scott wrote: > > Hullo. I am on > > CentOS Linux release 7.5.1804 (Core) > > and I did > > yum install rakudo[rakudo-0.2018.04-1.el7] > yum install rakudo-zef

Re: Perl6 POSIX IEEE Std 1003.1

2018-08-14 Thread Elizabeth Mattijsen
Thank you. Please let me know if you miss anything and/or find any problems. For myself, I’ve hardly had any use for these modules so they’re probably undertested. Liz > On 14 Aug 2018, at 22:15, Mark Devine wrote: > > Wow. Glad I asked… > > Thank you Elizabeth Ma

Re: Creating the August 2018 Perl6 survey

2018-08-06 Thread Elizabeth Mattijsen
Is there a Github repo of sorts to which people can add Pull Requests / comment upon? > On 6 Aug 2018, at 03:13, Benji wrote: > > We're working on polishing up questions / adding new questions for the next > Perl6 user survey. If you'd like an invitation to change/add questions, hop > on the

Re: start up delay?

2018-08-05 Thread Elizabeth Mattijsen
> On 1 Aug 2018, at 20:14, ToddAndMargo wrote: > Is it just me or does Perl 6 take about three times as long to > start up as Perl 5? I do have a very fast machine and it takes > about seven see for some of my Perl 6 stuff to get past the > ruminating phase and start running. Seven seconds?

Re: Catching exceptions in expressions

2018-08-03 Thread Elizabeth Mattijsen
Sometimes I wish we could 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, at 22:18, Patrick R. Michaud wrote: > > Maybe

Re: MAIN subroutine

2018-07-19 Thread Elizabeth Mattijsen
> On 19 Jul 2018, at 23:31, Laurent Rosenfeld via perl6-users > wrote: > I was expecting the MAIN message to be printed first. > > Did I miss something? Is my understanding wrong? I'd never seen that, but I > guess all my scripts using MAIN had all the code in subs called from MAIN. So >

Re: IO ???

2018-06-16 Thread Elizabeth Mattijsen
> On 16 Jun 2018, at 10:59, Xin Cheng wrote: > I am wondering why the IO::Path class doesn't have a "close" method. After I > read from a file by > > $filename.IO.lines -> $line; > > Am I supposed to close the file, or it is automatically closed for me after > the reading? If you read all of

Re: EVAL?

2018-06-14 Thread Elizabeth Mattijsen
We are all maintainers of the glossary. Patches / Pull Requests are welcome. > On 14 Jun 2018, at 20:03, Brandon Allbery wrote: > > I'm trying to not second-guess whoever maintains the glossary. And by that > message also pointing up the omission. > > On Thu, Jun 14, 2018 at 2:01 PM The

Re: EVAL?

2018-06-14 Thread Elizabeth Mattijsen
> On 14 Jun 2018, at 18:19, The Sidhekin wrote: > > On Thu, Jun 14, 2018 at 6:11 PM, Timo Paulssen wrote: > If it's literally just the name of a sub that you'll immediately invoke, > you can side-step EVAL completely > > ::('&' ~ $RunSpecific)() > > should do the trick. > > I

Re: EVAL?

2018-06-13 Thread Elizabeth Mattijsen
It is in this situation, but not necessarily always: “$foo” is equivalent to $foo.Str $foo is exactly what $foo is. my $foo = 42;:wq dd $foo; # Int $foo = 42 dd “$foo” # “42" > On 14 Jun 2018, at 00:23, yary wrote: > > Pet peeve, "$RunSpecific" with the quotes on either side is

Re: mixin syntax: does vs but

2018-06-12 Thread Elizabeth Mattijsen
> On 12 Jun 2018, at 09:06, Joseph Brenner wrote: > > I thought this would work to make a copy of @x but with the role > "LookInside" attached to it: > > my @y = @x but LookInside; > > But that didn't add the role to @y. E.g. > > say @y.^WHAT > > Would just report (Array), not

Re: What is my sub?

2018-05-22 Thread Elizabeth Mattijsen
> On 22 May 2018, at 09:41, ToddAndMargo wrote: > > On 05/21/2018 11:21 PM, Siavash wrote: >> https://www.nntp.perl.org/group/perl.perl6.users/2017/03/msg3423.html >> On 2018-05-22 06:04:47 GMT, ToddAndMargo wrote: >>> Hi All, >>> >>> I need to know the name of the

Re: tight?

2018-05-05 Thread Elizabeth Mattijsen
> On 5 May 2018, at 10:59, ToddAndMargo wrote: > I am looking at: > https://docs.perl6.org/language/operators#infix_&; > > I understand what a Boolean AND is, but why are > they using the term "Tight"?What am I missing? Precedence is what you’re missing. $ 6 'say 0

Re: Range of Dates

2018-05-02 Thread Elizabeth Mattijsen
> On 1 May 2018, at 22:02, Sean McAfee wrote: > > Today I wanted to write an infinite sequence of Dates starting from today, > but I accidentally wrote two dots instead of three as I'd intended. I was > surprised to find that it seems to work as one might expect, eg: > >

Re: odd and even

2018-04-30 Thread Elizabeth Mattijsen
> On 30 Apr 2018, at 15:12, ToddAndMargo <toddandma...@zoho.com> wrote: > > On 04/30/2018 05:44 AM, Elizabeth Mattijsen wrote: >>> On 30 Apr 2018, at 12:43, ToddAndMargo <toddandma...@zoho.com> wrote: >>> >>> >>>> Am 30.04.2018 um 0

Re: odd and even

2018-04-30 Thread Elizabeth Mattijsen
> On 30 Apr 2018, at 15:12, ToddAndMargo <toddandma...@zoho.com> wrote: > > On 04/30/2018 05:44 AM, Elizabeth Mattijsen wrote: >>> On 30 Apr 2018, at 12:43, ToddAndMargo <toddandma...@zoho.com> wrote: >>> >>> >>>> Am 30.04.2018 um 0

Re: .sub confusion

2018-04-30 Thread Elizabeth Mattijsen
> On 30 Apr 2018, at 15:04, ToddAndMargo wrote: > > Hi All, > > I am confused. > > With this sub: > >sub odd( $Num ) { return $Num % 2; } > > > Why does this work: > > if odd $LineNum > { $PartsStr ~= ''; } # Green >else { $PartsStr ~=

Re: odd and even

2018-04-30 Thread Elizabeth Mattijsen
> On 30 Apr 2018, at 12:43, ToddAndMargo wrote: > > >> Am 30.04.2018 um 08:47 schrieb ToddAndMargo: >>> Hi All, >>> >>> I know it would only take me 25 seconds to write one, >>> but do we have an odd and even function build in? >>> >>> >>> Many thanks, >>> -T >>> >>>

Re: inheritance and default attributes

2018-04-30 Thread Elizabeth Mattijsen
> On 30 Apr 2018, at 10:55, Theo van den Heuvel wrote: > > Hi all, > > trying to make sense of the following excerpt from the documentation on > object construction: > > Due to the default behavior of BUILDALL and BUILD submethods, named arguments > to the constructor

Re: Debating on writing Editline bindings

2018-03-30 Thread Elizabeth Mattijsen
> On 30 Mar 2018, at 12:07, Ben Davies wrote: > At the moment, bindings for Readline and Linenoise are available, which > are mainly used for making the REPL more convenient to use. Editline is > a BSD-licensed alternative to the two that's part of the userland by > default

Re: Memory leak with NativeCall

2018-01-22 Thread Elizabeth Mattijsen
This feels like a bug to me. So please make report this as a potential issue, either by mailing rakudo...@perl.org, or by creating an issue on http://github.com/rakudo/rakudo . Thank you! > On 22 Jan 2018, at 01:24, David E. wrote: > > I'm not certain where to

Re: how do I match the next two characters?

2018-01-16 Thread Elizabeth Mattijsen
> On 16 Jan 2018, at 09:46, ToddAndMargo wrote: > I want to match the next two character (don't care what > they are) in the following > > I will use ?? for the next two character, but that doesn't work > $x ~~ m/.*?(sd??).*/; > > I want $0 to include the "sd" and the

Re: How to accomplish a method interpolation?

2017-12-30 Thread Elizabeth Mattijsen
pe > thing and it's a "bag of holding". > > On Sat, Dec 30, 2017 at 6:45 AM, Elizabeth Mattijsen <l...@dijkmat.nl> wrote: > > On 30 Dec 2017, at 06:13, clasclin . <clasc...@gmail.com> wrote: > > > > I'm reading a book "Make your own python text a

Re: How to accomplish a method interpolation?

2017-12-30 Thread Elizabeth Mattijsen
> On 30 Dec 2017, at 06:13, clasclin . wrote: > > I'm reading a book "Make your own python text adventure" and decided to give > it a try with perl6. So this code works as expected. > > class Bag { > has %.items; > > method show { > say "ropa ",

Re: %% with zero denominator

2017-12-11 Thread Elizabeth Mattijsen
> On 11 Dec 2017, at 04:42, Sean McAfee wrote: > > I think of %% as being Perl 6's is-divisible-by operator, so I was a little > surprised to discover this behavior: > > > 1 %% 0 > Attempt to divide 1 by zero using infix:<%%> > in block at line 1 > > The docs say a %% b

Re: Set difference using hashes vs array

2017-11-23 Thread Elizabeth Mattijsen
Fixed with https://github.com/rakudo/rakudo/commit/eacf9b2776 . Thanks for reporting! > On 23 Nov 2017, at 05:27, Norman Gaywood wrote: > > Talking to myself :-) > > Seems it has something to do with the values in the hash. If they are just > True, this works: > $

Re: Set difference using hashes vs array

2017-11-23 Thread Elizabeth Mattijsen
Will have a look at this in about 12 hours (probably). Meanwhile, don’t let that stop anyone from figuring this out :-) > On 23 Nov 2017, at 05:27, Norman Gaywood wrote: > > Talking to myself :-) > > Seems it has something to do with the values in the hash. If they

Re: The equivalent of Moose's "around"

2017-11-18 Thread Elizabeth Mattijsen
w" trait of the $.test attribute generates a > compile-time error. > > On Sat, Nov 18, 2017 at 6:24 PM, Fernando Santagata > <nando.santag...@gmail.com> wrote: > Hi Liz, > > Thank you and my regards to Moritz too! > > On Fri, Nov 17, 2017 at 11:14 PM, Elizabe

Re: The equivalent of Moose's "around"

2017-11-17 Thread Elizabeth Mattijsen
> On 17 Nov 2017, at 22:47, Elizabeth Mattijsen <l...@dijkmat.nl> wrote: >> On 17 Nov 2017, at 20:09, Fernando Santagata <nando.santag...@gmail.com> >> wrote: >> I tried to use the code you suggested: >> >> sub trait_mod:(Attribute:D \attri

Re: The equivalent of Moose's "around"

2017-11-17 Thread Elizabeth Mattijsen
> On 17 Nov 2017, at 20:09, Fernando Santagata > wrote: > I tried to use the code you suggested: > > sub trait_mod:(Attribute:D \attribute, :!) { > attribute.package.^add_method(attribute.name, my method () { proxy($_) }) > } > > class A { > has $!a is proxy({

Re: The equivalent of Moose's "around"

2017-11-17 Thread Elizabeth Mattijsen
> On 17 Nov 2017, at 20:09, Fernando Santagata > wrote: > I tried to use the code you suggested: > > sub trait_mod:(Attribute:D \attribute, :!) { > attribute.package.^add_method(attribute.name, my method () { proxy($_) }) > } > > class A { > has $!a is proxy({

Re: The equivalent of Moose's "around"

2017-11-16 Thread Elizabeth Mattijsen
Oops, > On 17 Nov 2017, at 01:24, Elizabeth Mattijsen <l...@dijkmat.nl> wrote: > sub trait_mod:(\attribute, :!) is export { sub trait_mod:(Attribute:D \attribute, :!) is export { so that the trait can only be used on Attribute objects. Liz

Re: The equivalent of Moose's "around"

2017-11-16 Thread Elizabeth Mattijsen
s $!a; > has $!b; > submethod BUILD { > self.create(::A, 'a', $!a, { $^a * 2 }); > self.create(::A, 'b', $!b, { $^a * 3 }); > } > } > > my A $a .= new; > $a.a = 21; > say $a.a; # 42 > $a.b = 21; > say $a.b; # 63 > > > On Tue, Nov 14, 2017 at 7:09 P

Re: The equivalent of Moose's "around"

2017-11-14 Thread Elizabeth Mattijsen
> } > > In this way I don't have to make an explicit call to the preprocessor any > time I assign a value to that attribute, effectively removing that from the > main program. > > I'm looking for a way to do that in Perl6. > > On Tue, Nov 14, 2017 at 6:11 PM, Eliza

Re: The equivalent of Moose's "around"

2017-11-14 Thread Elizabeth Mattijsen
> On 14 Nov 2017, at 18:06, Fernando Santagata > wrote: > I'm converting a program from Perl5/Moose. > I have several classes, each has some attributes that need to be processed in > the same way before being passed to other objects. > > When I was using Moose, I had

Re: SDL 2 code to put into a module

2017-11-08 Thread Elizabeth Mattijsen
Shlomi, perhaps The Holy Ghost takes Pull Requests? Just saying "grammar is bad” is a bit meagre, and just posting a link to a tl;dr document is not really helping. Fixing cases of what you consider to be bad grammar, would be more helpful, I think. Kind regards, Liz === >

Re: Nice Channel and thread example

2017-10-30 Thread Elizabeth Mattijsen
Fixed with https://github.com/rakudo/rakudo/commit/91543fe310 , thanks for the report! > On 31 Oct 2017, at 00:32, Norman Gaywood wrote: > > Hmm, in developing this I was using an old perl6: > > This is rakudo version 2015.11-554-g3b4964b built on MoarVM version >

Re: Nice Channel and thread example

2017-10-30 Thread Elizabeth Mattijsen
This also happens on HEAD, investigating... > On 31 Oct 2017, at 00:32, Norman Gaywood wrote: > > Hmm, in developing this I was using an old perl6: > > This is rakudo version 2015.11-554-g3b4964b built on MoarVM version > 2015.11-49-g27f15d9 implementing Perl v6.b. > > I

Re: bash and pm6 question

2017-09-21 Thread Elizabeth Mattijsen
> On 22 Sep 2017, at 00:32, Bennett Todd wrote: > > With perl5, that could have been something like. "perl -Mmy -e ...", but I > don't have access to a perl6 at this instant to compare. There should be a > flag you can use to include a module into the.running

Re: can't adverb and infix

2017-09-20 Thread Elizabeth Mattijsen
> On 19 Sep 2017, at 13:04, Brandon Allbery wrote: > > On Tue, Sep 19, 2017 at 3:44 AM, Luca Ferrari wrote: > this will sound trivial, but the following piece of code that in my > mind should work does not: > > $mode = 'csv' if ( ! $mode.defined ||

Re: rw optional parameters

2017-09-17 Thread Elizabeth Mattijsen
> On 17 Sep 2017, at 01:45, Norman Gaywood wrote: > Still, I wonder if the compiler should have error'ed before I actually tried > to assign to the variable at run-time. > > The compiler should know that I can't do: > > sub MAIN( :$debug = False, :$verbose = False ) { >

Re: rw optional parameters

2017-09-16 Thread Elizabeth Mattijsen
> On 16 Sep 2017, at 13:32, Norman Gaywood wrote: > > I have this: > #!/usr/bin/perl6 > use v6; > sub MAIN( :$debug = False, :$verbose = False ) { > $verbose = True if $debug; > say "verbose={$verbose}, debug={$debug}"; > } > $ ./tt.p6 > verbose=False, debug=False

Re: Thread example from evanmiller

2017-09-11 Thread Elizabeth Mattijsen
> On 8 Sep 2017, at 05:16, Norman Gaywood wrote: > > Several weeks ago there was this post: > http://www.evanmiller.org/why-im-learning-perl-6.html > > That gave this example of perl6 N:M threads in action: > > use v6.d.PREVIEW; > > my $channel = Channel.new; > > my

Re: thread behavior

2017-09-04 Thread Elizabeth Mattijsen
> On 4 Sep 2017, at 10:44, JuhiMarcel LangbroekTimmerman > wrote: > Thanks for your anwer. I assume there are a few things I can rely on; > - the main thread is where the code starts and will always have id 1 That can not be relied on in general, I’m afraid. However, after

Re: thread behavior

2017-09-04 Thread Elizabeth Mattijsen
> On 4 Sep 2017, at 09:29, Marcel Timmerman wrote: > I was wondering about the following, > > When an Exception is thrown in a thread and is CATCHed in another object, > will that block be run in the same thread as the Exception is thrown? I think from 6.d onward, you can

Re: Are 64 bit natives universally available?

2017-08-27 Thread Elizabeth Mattijsen
They have been available since Christmas, afaik. > On 27 Aug 2017, at 22:42, David Warring wrote: > > Quick question. > > I just want to doublle check that int64, uint64 are universally available > via Perl 6, before introducing them into modules. e.g. > % perl6

Re: another one liner

2017-08-05 Thread Elizabeth Mattijsen
> On 5 Aug 2017, at 09:21, ToddAndMargo wrote: > > On 08/04/2017 08:43 PM, Bruce Gray wrote: >> P6-ish version: >> ifconfig | perl6 -e 'say lines.map({ ~$0 if /^(\S+) ": flags="/ }).sort[1]' > > Would some kind person please tell me what is going on here? say the result

Re: another one liner

2017-08-05 Thread Elizabeth Mattijsen
> On 5 Aug 2017, at 08:50, Sean McAfee wrote: > > On Fri, Aug 4, 2017 at 10:18 PM, ToddAndMargo wrote: > On 08/04/2017 08:43 PM, Bruce Gray wrote: > > P6-ish version: > ifconfig | perl6 -e 'say lines.map({ ~$0 if /^(\S+) ": flags="/ }).sort[1]' > > >

Re: Need awk print sub

2017-08-04 Thread Elizabeth Mattijsen
> On 4 Aug 2017, at 22:00, ToddAndMargo wrote: > > Hi All, > > How do I do this with a perl one liner? > > $ echo "a b c d" | awk '{print $2}' > b echo "a b c d" | perl6 -e 'say words[1]’ Note array indices in Perl 6 are 0 based.

Re: Announce: Rakudo Star Release 2017.07

2017-07-25 Thread Elizabeth Mattijsen
ommunity and not anyone in particular. > > On 25 July 2017 at 17:00, Elizabeth Mattijsen <l...@dijkmat.nl> wrote: >>> On 25 Jul 2017, at 05:57, ToddAndMargo <toddandma...@zoho.com> wrote: >>> On 07/24/2017 11:40 AM, Steve Mynott wrote: >>>> A useful

Re: Announce: Rakudo Star Release 2017.07

2017-07-25 Thread Elizabeth Mattijsen
> On 25 Jul 2017, at 05:57, ToddAndMargo wrote: > On 07/24/2017 11:40 AM, Steve Mynott wrote: >> A useful and usable production distribution of Perl 6 >> On behalf of the Rakudo and Perl 6 development teams, I'm pleased to >> announce the July 2017 release of "Rakudo Star",

Re: set (+) set = bag ?

2017-07-21 Thread Elizabeth Mattijsen
> On 21 Jul 2017, at 21:30, Darren Duncan wrote: > > On 2017-07-21 5:07 AM, Timo Paulssen wrote: >> You want (|) to get the union of two sets as a set. >> >> https://docs.perl6.org/language/setbagmix#Set%2FBag_Operators >> >> hth >> - Timo > > Right. Every set

Re: Where's the filter command?

2017-07-18 Thread Elizabeth Mattijsen
> On 18 Jul 2017, at 11:45, Mark Carter wrote: > > > > On 18/07/2017 09:53, Brent Laabs wrote: >> Are you looking for grep()? https://docs.perl6.org/routine/grep > Ah yes. Thanks for that. > Pretty good: > > say ($schema.lines().map: ).grep: { .elems() > 0; } ; say

Re: String to array problem

2017-07-17 Thread Elizabeth Mattijsen
> On 17 Jul 2017, at 11:08, Brent Laabs wrote: > All of this is to say that I wish the Str.words method had a way of applying > Perl 6 quoting rules as if it were the qww operator. Wouldn’t that be either .split or .comb? Liz

Re: Is there a bash/shlex-like processor with double-quotes handling?

2017-07-14 Thread Elizabeth Mattijsen
zef install Text::CSV This is a native port of Perl 5’s Text::CSV by the original author. > On 14 Jul 2017, at 11:12, Philip Hazelden wrote: > > If you haven't yet, you might want to look into a CSV parser. I think that if > you configure one of those to split on

Re: ping TImo: buf as a print

2017-07-09 Thread Elizabeth Mattijsen
> On 9 Jul 2017, at 07:32, ToddAndMargo wrote: > > On 07/08/2017 02:58 AM, timo wrote: >> @ToddAndMargo here's how to create an >> email with attachments: >> my $image = "P5\n64 64\n255\n".encode("utf8") ~ Buf[int8].new( do for >>

Re: accepting values on the command line

2017-07-01 Thread Elizabeth Mattijsen
> On 1 Jul 2017, at 15:15, Gabor Szabo wrote: > > I was hoping to wrote a simple script that would accept a bunch of > filenames on the command line so I wrote: > > #!/usr/bin/env perl6 > use v6; > > multi sub MAIN(@files) { >say @files.perl; > } This signature will

Re: Version of a Module

2017-06-28 Thread Elizabeth Mattijsen
> On 28 Jun 2017, at 14:01, Martin Barth wrote: > but your approach means you have to state the version in the META6.json AND > in the Module.pm6 file again. This would be the similar to having $VERSION in > perl5. Shouldnt there be a simpler way? Isn’t that info available

Re: The speed (improvement) of Rakudo

2017-06-17 Thread Elizabeth Mattijsen
> On 17 Jun 2017, at 13:12, Tom Browder wrote: > On Fri, Jun 16, 2017 at 23:47 Gabor Szabo wrote: >> Is there some measurements regarding the speed of Rakudo? > > Perl 6 is still very slow on IO compared to Perl 5. I have a > read/write test suite I've

Re: Perl 6 ignores SIGPIPE

2017-06-16 Thread Elizabeth Mattijsen
> On 16 Jun 2017, at 14:10, Jan Ingvoldstad <frett...@gmail.com> wrote: > > On Fri, Jun 16, 2017 at 12:13 PM, Elizabeth Mattijsen <l...@dijkmat.nl> wrote: > > Failed to write bytes to filehandle: Broken pipe > in block at -e line 1 > > So it would appear

Re: getting help in the REPL

2017-06-16 Thread Elizabeth Mattijsen
> On 14 Jun 2017, at 16:07, Gabor Szabo wrote: > On Wed, Jun 14, 2017 at 4:44 PM, Timo Paulssen wrote: >> WHY and WHEREFOR are "fully" supported, it's just that we've not put any >> pod into the core setting and we don't have helper code that loads it >>

Re: Perl 6 ignores SIGPIPE

2017-06-16 Thread Elizabeth Mattijsen
> On 16 Jun 2017, at 08:34, Sean McAfee wrote: > > I see at > > http://www.moarvm.com/releases.html > > ...that as of the 2017.03 release, Perl 6 "ignores SIGPIPE by default." I > discovered this for myself when I piped a program that generates unlimited > output to the

Re: How do you call the variable types?

2017-06-16 Thread Elizabeth Mattijsen
> On 16 Jun 2017, at 06:23, Gabor Szabo wrote: > > On Sat, Jun 10, 2017 at 9:38 AM, Brent Laabs wrote: >> I thought: >> $ is Scalar >> @ is Array >> % is Hash >> & is a function >> > > Reading this https://docs.perl6.org/language/containers I just found

Re: Undeclared routine: break used at line ...

2017-06-13 Thread Elizabeth Mattijsen
> On Tue, Jun 13, 2017 at 8:50 PM, Elizabeth Mattijsen <l...@dijkmat.nl> wrote: >>> On 13 Jun 2017, at 19:34, Gabor Szabo <szab...@gmail.com> wrote: >>> >>> I just managed to write >>> >>> while True { >>> ... >>>

Re: Undeclared routine: break used at line ...

2017-06-13 Thread Elizabeth Mattijsen
> On 13 Jun 2017, at 19:34, Gabor Szabo wrote: > > I just managed to write > > while True { >... >break if $code eq 'exit'; >... > } > > > I wonder if Rakudo could be more cleaver in this particular case and > remind me to use 'last' instead of 'break'. Is the

  1   2   >