Re: [perl #61088] [PATCH] show result of expressions in HLLCompiler based interactive REPLs

2009-10-18 Thread gabriele renzi
On Mon, Sep 21, 2009 at 8:26 AM, Will Coleda via RT wrote: > Sorry for the delay - this patch had stalled waiting for review due to a > ticketing system > changeover, and in the meantime, no longer applies cleanly against parrot > HEAD. > > Can you rebase this patch and resubmit it to https://t

[perl #61088] [PATCH] show result of expressions in HLLCompiler based interactive REPLs

2008-12-07 Thread gabriele renzi
# New Ticket Created by "gabriele renzi" # Please include the string: [perl #61088] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=61088 > the current HLLCompiler infrastructure seems to be an incomplete R

[perl #61086] [PATCH] mk_language_shell script generates wrong

2008-12-06 Thread gabriele renzi
# New Ticket Created by "gabriele renzi" # Please include the string: [perl #61086] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=61086 > the default grammar for a newly generated language shell contains

[perl #61020] [BUG] double free or corruption when calling non-existent sub from the perl6 executable

2008-12-04 Thread gabriele renzi
# New Ticket Created by "gabriele renzi" # Please include the string: [perl #61020] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=61020 > This happens wither with a line like 1.size or simply size The er

[perl #60976] [PATCH] rakudo fails to build AST for subset declaration with regex literal

2008-12-01 Thread gabriele renzi
# New Ticket Created by "gabriele renzi" # Please include the string: [perl #60976] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=60976 > The bug is visibile with the following line subset GenderStr of Str

Re: [S02] Sigils

2007-05-29 Thread gabriele renzi
Jonathan Lang wrote: From S02: -- Perl 6 includes a system of B to mark the fundamental structural type of a variable: $ scalar (object) @ ordered array % unordered hash (associative array) & code/rule/token/regex :: package/module/class/role/subset/enum/type/grammar

"cached" trait specs

2007-05-23 Thread gabriele renzi
Hi everyone, A small request about the cached trait for functions that makes them memoized: would it be possible to make it parametric? I think it would be nice to have at least one variant sub foo is cached(max=>$size) caching just the first $size results. Maybe it could also be useful to

explicit line termination with ";": why?

2007-05-14 Thread gabriele renzi
Hi everyone, I don't want to argue about the design of perl6[1], I just wonder: why the semicolon is still needed in the end of lines in perl6? I can think of different reasons (history, readability, easier parsing of multiline statements, force people to write one-line functions to avoid ty

Re: Regexp: s//$str/ should replace or add?

2007-04-16 Thread gabriele renzi
A. Pagaltzis wrote: Does it mean that basically the assertion is a character/string property instead of the character/string itself? No, it is a zero-width assertion. `at(1)` means the position “between” the 0th and 1th character of the string. I see thank you Also, what is the correct way

Regexp: s//$str/ should replace or add?

2007-04-14 Thread gabriele renzi
Hello, sorry about the dumb question but I'm not sure I understand the assertion. If I write something like my $s="hello" s//a/ I expected it to give me "hallo" whereas it give ms "haello". Does it mean that basically the assertion is a character/string property instead of the character

take()'s return value

2007-01-29 Thread gabriele renzi
Hi everyone, I wonder: why does take inside a gather structure returns undef? I think it would be nicer if it could return the taken value, so that, for example one can write something like: say take 2 or like: while cond($n) { my $res = compute($n) $n /= take($res) } there is a reas

Re: 99problems: 9, 11, 13

2007-01-09 Thread gabriele renzi
Ovid ha scritto: I definitely think your solution is cleaner, but I'd be more inclined to see multiple solutions to problems rather than clearing out previous work. Not only does this follow the spirit of TIMTOWTDI, but it also allows the tests to cover a wider range of behavior. of course tw

Re: perl6-ish idiom for code and tests in one file

2007-01-07 Thread gabriele renzi
Larry Wall ha scritto: but the autocall into MAIN is not yet implemented. You can emulate by putting something like this as the last line in your file: MAIN(@ARGS), exit if $?FILE eq $*PROGRAM_NAME; or maybe MAIN(@ARGS), exit unless caller; if/when that works as in Perl 5. When the

Re: perl6-ish idiom for code and tests in one file

2007-01-07 Thread gabriele renzi
Larry Wall ha scritto: On Fri, Jan 05, 2007 at 01:40:44PM +0200, Gaal Yahas wrote: : > I think it should be possible and nice to use a macro (possibly a : > standard subroutine, I'm not sure) like : > : > testing { : > ok foo; : > } : > : > would it make sense or I'm just crazy? : : I like

99problems: 9, 11, 13

2007-01-07 Thread gabriele renzi
Hi people, I implemented 13 from scratch because I didn't know it was already solved, in this way sub encode_direct([EMAIL PROTECTED] is copy) returns Str { my ($packed, $count); while @array { if @array[0] eq @array[1] { $count++; } else { $packed

perl6-ish idiom for code and tests in one file

2007-01-05 Thread gabriele renzi
Hi everyone, supposing that I want to keep code and tests in one single file, is there a common idiom to do that? At the moment I'm going with something like: if $?FILE == $*PROGRAM_NAME { use Test; plan 1; ok foo(); } but this seem unnecessarily verbose. Is there some standard idio

Re: 99 problems in Perl6: 32 and a question on number coercion

2007-01-03 Thread gabriele renzi
Steffen Schwigon ha scritto: Hi! gabriele renzi <[EMAIL PROTECTED]> writes: Hi everyone! I solved the (easy) problem 32, implementing gcd($a,$b). You can check the code in the repository or on the web[1] I looked at [1]. What's the purpose of "multi" in this case? (Mayb

99 problems in Perl6: 32 and a question on number coercion

2007-01-02 Thread gabriele renzi
Hi everyone! I solved the (easy) problem 32, implementing gcd($a,$b). You can check the code in the repository or on the web[1] But while writing this I noticed that a function written as sub gcd(Int $a, Int $b) still accepts float/rational values in input. I think I read once that a variable

Re: 99 problems in Perl6: problem 28

2007-01-02 Thread gabriele renzi
Ovid ha scritto: Ah, nice to see someone else tackling the problems. yes, it was such a nice idea :) Assuming the tests pass (I can't check this at work) and you have a commit bit, check it in! they pass here, but I have no commit bit, it's ok if I do a darcs push? (I prefer it over svn)

99 problems in Perl6: problem 28

2007-01-02 Thread gabriele renzi
Hi everyone, and happy new year! I'm an almost complete newbie to Perl6 and I'm not that good at Perl5 either, but I thought playing with these problems could be fun, so I tried to solve #28. My solution is attached, it seems to work, but I'd like to know from people more expert than me if t

Re: gather { if $xy.was_taken { ... } }

2007-01-02 Thread gabriele renzi
Gilbert R. Röhrbein ha scritto: Hi, I'm new to Perl 6 (and perl). Is there a way to check inside a gather-block if something was allready taken? I thought it would look like one of the following, but it doesnt work on my pugs 6.2.13. gather { for 1..100 { take $_ unless @_.conta