rand in Rakudo

2008-04-28 Thread Илья
Hi! This is (attached) small game Paper-Rock-Scissors based on the chromatic`s journal post. I have question about rand in Rakudo. Look like it`s do not work properly: ... s Your Scissors My Scissors Draw. s Your Scissors My Scissors Draw. s Your Scissors My Scissors Draw. s Your Scissors My Rock

Fwd: [november] Re: arrays and arrays ref question

2008-10-30 Thread Илья
3 #one string > my $r = <1 2 3>; for $r.list { "Y".say }; Y > my $r = [1,2,3]; my @a := $r; "Y".say for @a; Y Argh! :((( Any ideas? Ilya 2008/9/18 Илья <[EMAIL PROTECTED]>: > Thank you, I try three first too, but do not try :=. > > 2008/9/17 Morit

Fwd: [november] Re: arrays and arrays ref question

2008-10-31 Thread Илья
So, I have found workaround for now: > my $ar = [1,2,3]; loop ( my $i = 0; $i < $ar.elems; $i++ ) { $ar[$i].say } 1 2 3 2008/10/30 Илья <[EMAIL PROTECTED]>: > I have found one: >> my $ar = [1,2,3]; my $i = 0; while $i < $ar.elems {say $ar[$i]; $i++ }; > 1 > 2 &

assign to Scalar with hash

2008-11-04 Thread Илья
Hi there, Rakudo> my $i = { a => 1 }; $i = $i.keys; Odd number of elements found where hash expected. Rakudo> my $a = {a => 1}; my $b = {b => 1}; $a = $b; Cannot morph a Perl6Scalar. I missed something or that`s bugs? Ilya

any(List) and none(List) question

2008-11-08 Thread Илья
Hi there, > my @a = ; my @b = ; say @a.grep: { $_ eq any(@b) }; bd > my @a = ; my @b = ; say @a.grep: { $_ ne any(@b) }; abcd hm. I expect: ac But Rakudo and PUGS both return abcd. May by I missed something? > my @a = ; my @b = ; say @a.grep: { $_ eq none(@b) }; ac > my @a = ; my @b = ; say @a

grammar question

2008-11-29 Thread Илья
Hi there, I have tried to fix our HTML::Template in November which is blocked by Rakudo segaful. I was trying to create simple example, but can`t reproduce it. By the way now I have short example(much shorter then when I start), and I have questions about it: grammar G { token TOP { ^ + $ };

Fwd: grammar question

2008-12-06 Thread Илья
Hi, I found I send this mail only to Patrick, but thought I send it to list too. I still have question about ? and result Match object. Patrick do not answer, mb some one can say what I miss? or this is bug? Forward: Patrick, I read you post in blog about Z, so if I understand right for do [0],

Re: Perl as a better web language ?

2008-12-14 Thread Илья
Hi! > The problem is how to get it popular and mainstream. The only solution > is let make something standard. (or de facto standard such as RoR in > Ruby) The only solution -- make good web-frameworks. And so when we have one we can pack all it`s stuff in one "distro" and wright good documentati

.kv

2008-12-14 Thread Илья
(23:24:09) ihrd: hi (23:24:28) ihrd: question about .kv (23:24:39) ihrd: rakudo: my @a = {a => 1}, {b =>2}; my %h = foo => @a; say %h.kv.perl; (23:24:41) p6eval: rakudo 33880: OUTPUT[["foo", {"a" => 1}, {"b" => 2}]␤] (23:24:59) ihrd: rakudo: say ({ foo => [{a=>1}, {b=>1}]}).perl; (23:25:02) p6eval:

@INC

2008-12-15 Thread Илья
Hi! how I can say Rakudo search my modules in some place now? use lib 'here'; #parsed, but do not work @+INC.push('here'); # die with no scope for @INC Thank you! Ilya

how to call Grammars correctly?

2008-12-17 Thread Илья
Hi, PM> if the rule is called correctly it appears to work fine: PM> if 'foo' ~~ // So, I try to use that way: grammar G { token TOP { ^ + $ }; token foo { ':' ? }; token bar { \w }; }; ":a:b:c" ~~ //; say $/; say $/; #Use of uninitialized value say $_ for $/; # Use of uninitializ

Re: what is going on here?

2009-01-11 Thread Илья
Hi! > More precisely, I dont understand the meaning of the ':' after '.sort' see line 1825 of S03 C<< infix:<:>>>, the invocant maker ... ack (or grep) ': {}' in Spec dir can give a lot of examples. ihrd

Roles definition

2009-01-18 Thread Илья
Hi there! I use role to mix in some functionality for testing: my $s = November::Storage::File.new does Testing; And I have Role definition _after_ this: role Testing { ... } Now this is fall with: Null PMC access in isa() current instr.: 'infix:does' pc 20660 (src/builtins/op.pir:403) called

attributes initialisation

2009-05-17 Thread Илья
Hi, no one answered at #perl6, so I sending this question in list: ihrd: I have question about attr initialization ihrd: if I have two attr with same name ihrd: like @.args and %.args ihrd: and instance object, like .new(args => {foo => 1}), rakudo init both attr ihrd: and question is, how this is

Re: Logo considerations

2009-06-01 Thread Илья
Hi there, just another one chars variant of Camelia — }ï{ — suggested by my wife. Ilya