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

2015-09-26 Thread Elizabeth Mattijsen
> On 26 Sep 2015, at 14:26, Aristotle Pagaltzis <pagalt...@gmx.de> wrote: > * Elizabeth Mattijsen <l...@dijkmat.nl> [2015-09-26 13:20]: >> There is: you just need to itemize the hash, e.g. by prefixing it with $ >> >> $ 6 'my %h = a => 42, b => 666; my @

Re: Strict Rakudo version of this Perl5 one-liner

2015-09-02 Thread Elizabeth Mattijsen
> On 02 Sep 2015, at 14:02, Matija Papec wrote: > 02.09.2015, 10:46, "The Sidhekin" : >>> So it seems that perl6 handles lexicals inside while (<>){} one-liners >>> differently. >> >>Ah, yes. Interesting. Run-time effect of C not happening >>

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

2015-08-26 Thread Elizabeth Mattijsen
On 26 Aug 2015, at 12:18, H.Merijn Brand h.m.br...@xs4all.nl wrote: On Wed, 26 Aug 2015 10:26:23 +0200, Moritz Lenz mor...@faui2k3.org wrote: I could continue with other Perl 5 deficiencies (no strict by default, Using strict *STILL* is not enabled by default for perl6 one-liners

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

2015-07-03 Thread Elizabeth Mattijsen
On 03 Jul 2015, at 17:26, Tom Browder tom.brow...@gmail.com wrote: While experimenting I've found the first two methods of passing a hash to a subroutine work: # method 1 my %hash1; foo1(%hash1); say %hash1.perl; sub foo1(%hash) { %hash{1} = 0; } # method 2 my %hash2; my $href2

Re: Will Perl 6 save a compiled version of a source program like Python?

2015-05-18 Thread Elizabeth Mattijsen
On 18 May 2015, at 14:28, Tom Browder tom.brow...@gmail.com wrote: I found some discussion of such a capability on the Perl Mongers' site but haven't found anything official yet in the Synopses. But I did find there an option that might do something related: --output-format (which is

Re: Scheduler problem with scheduled events

2015-05-02 Thread Elizabeth Mattijsen
On 01 May 2015, at 13:57, mt1957 mt1...@gmail.com wrote: Reading though synopsis S17 concurrency I tried the following $*SCHEDULER.cue: in=10, { say 10s later } which will deliver the string after 10 seconds. However the moar will work like hell at a 100% cpu time before and afterwards!

Re: Books on Perl 6

2015-04-19 Thread Elizabeth Mattijsen
On 19 Apr 2015, at 19:16, Parrot Raiser 1parr...@gmail.com wrote: Apress have some books about Perl 6, http://www.apress.com/catalogsearch/result/?q=perl+6submit=Go but their dates of publishing, (c 2006) make me suspect that they are probably outdated to the point of being misleading.

Re: Object Introspection for Existence of Methods: How?

2015-03-23 Thread Elizabeth Mattijsen
On 23 Mar 2015, at 14:11, Tom Browder tom.brow...@gmail.com wrote: On Mon, Mar 23, 2015 at 7:04 AM, Tom Browder tom.brow...@gmail.com wrote: From your and Henk's comments, I think I need to learn a lot more about testing in general. Any recommendations for books on the subject? Perl Testing

Re: Object Contruction

2015-03-18 Thread Elizabeth Mattijsen
On 18 Mar 2015, at 23:21, Tom Browder tom.brow...@gmail.com wrote: You are correct, Liz, but I was trying those pieces to demonstrate to myself that all was available to me in the methods and all worked as I expected. It demos very roughly what I think I have to do to translate

Re: Object Contruction

2015-03-18 Thread Elizabeth Mattijsen
On 18 Mar 2015, at 21:32, Tom Browder tom.brow...@gmail.com wrote: On Wed, Mar 18, 2015 at 11:32 AM, Tom Browder tom.brow...@gmail.com wrote: On Wed, Mar 18, 2015 at 7:22 AM, Moritz Lenz mor...@faui2k3.org wrote: ... http://doc.perl6.org/language/objects#Object_Construction lists at least two

Re: Debug core modules

2015-01-11 Thread Elizabeth Mattijsen
On 11 Jan 2015, at 10:57, MAX PUX isleof...@gmail.com wrote: is there a way to debug core modules like IO::Socket::INET? Generally, you can copy a module out of the core settings and run from source: the module in source will hide the one from the settings. Is that what you mean? Liz

Re: What is the latest Rakudo Star?

2015-01-03 Thread Elizabeth Mattijsen
On 03 Jan 2015, at 21:32, Parrot Raiser 1parr...@gmail.com wrote: I stopped paying attention for a bit, and lost track. 2014.12.1 Liz

Re: Compile a program into moar vm

2015-01-02 Thread Elizabeth Mattijsen
On 01 Jan 2015, at 19:36, MAX PUX isleof...@gmail.com wrote: Excuse me but I can't find the documentation. Is there a way to compile a perl 6 program to moar vm bytecode? For example from example.pl to example.moarvm. CompUnit.new(‘example.pl’).precomp will create an ‘example.pl.moarvm’.

Re: Diffrence between is and does in scope of overriding multi methods

2014-06-27 Thread Elizabeth Mattijsen
On 27 Jun 2014, at 09:25, Timo Paulssen t...@wakelift.de wrote: On 27/06/14 10:07, Kamil Kułaga wrote: Hi, I would like to ask for help in understanding difference between this code: use v6; role X { multi method xyz(Any $a) {say Class X} } class Y does X {

Re: Rewrite using map? Trasformation array into hash of hash

2014-06-13 Thread Elizabeth Mattijsen
On 13 Jun 2014, at 12:36, Kamil Kułaga teodoz...@gmail.com wrote: I was wondering whether following code can be rewritten using map/grep construct. class A { has $.a; has $.b; } my @array= ( A.new(a='a', b='11'), A.new(a='a', b='22'), A.new(a='v',

<    1   2   3   4