Re: Logo considerations

2009-03-24 Thread Amir E. Aharoni
2009/3/24 Larry Wall la...@wall.org:
 http://www.wall.org/~larry/camelia.pdf


Intended or not, the smiley is a nice tribute to Audrey and her lovely
style of presentations.

-- 
Amir Elisha Aharoni

heb: http://haharoni.wordpress.com | eng: http://aharoni.wordpress.com
cat: http://aprenent.wordpress.com | rus: http://amire80.livejournal.com

We're living in pieces,
 I want to live in peace. - T. Moore


Re: pluralization idea that keeps bugging me

2008-01-26 Thread Amir E. Aharoni
On 26/01/2008, Larry Wall [EMAIL PROTECTED] wrote:
 After a recent exchange on PerlMonks about join, I've been thinking
 about the problem of pluralization in interpolated strings, where we
 get things like:

 say Received $m message{ 1==$m ?? '' !! 's' }.

 ...

 Any other cute ideas?

No matter what you do it will remain too English-centric. It might
work for Catalan, too. But it will remain totally useless for Arabic
or Chinese.

In any case, i don't understand why should this be in the core language at all.

-- 
Amir Elisha Aharoni

English -  http://aharoni.wordpress.com
Hebrew  - http://haharoni.wordpress.com

We're living in pieces,
 I want to live in peace. - T. Moore


**{x,y} quantifier

2007-07-01 Thread Amir E. Aharoni

(I'm just studying the intricacies of Perl 6, so please correct me if
i say something stupid or if this has already been discussed before.)

I was looking for the Perl 6 equivalent of

aaa =~ /a{1,3}/

and finally found that it's

aaa ~~ /a**{1 .. 3}/

This looked rather weird, so i asked on IRC what is the mnemonic for it:
http://moritz.faui2k3.org/irclog/out.pl?channel=perl6;date=2007-06-29#id_l602

I got the reply that it is similar to exponentiation of variables in math:

a ** 5 == a * a * a * a * a == a

It makes sense after it is explained and i do like the rationalization
of the range as a list-like range, instead of the comma, but the **
syntax is rather ugly to my taste. Seeing that the ** quantifier is
not yet implemented anyway, I thought what could replace it, and the
best i could find was 1 .. 3.

My rationale is this:

* It looks clean.

* It the chapter about Extensible metasyntax (...) in S05 most
paragraphs begin by A leading X means yadda yadda, where X can be:

   * whitespace
   * alphabetic character (not alphanumeric!)
   * ? $ :: @ % {  [ + - . ! ~~

... so numbers are not covered.

* As a side effect, * is a shortcut for 0 .. Inf, + is a shortcut
for 1 .. Inf, ? * is a shortcut for 0 .. 1.

* The ? of non-greediness can come before the closing  - 1 .. 3 ?

Any comments?

--
Amir Elisha Aharoni
my band: http://www.myspace.com/tzabari/
my blog: http://aharoni.wordpress.com/


Re: **{x,y} quantifier

2007-07-01 Thread Amir E. Aharoni

 please correct me if
 i say something stupid or if this has already been discussed before.)



Another important loss if we were to go with 1..3 would be the
ability to have runtime-dependent ranges; e.g.:

/ ($ntimes) x**{$ntimes} /


That's exactly what i meant by something stupid.

Thanks - my bad.


Named captures (was: **{x,y} quantifier)

2007-07-01 Thread Amir E. Aharoni

On 01/07/07, Luke Palmer [EMAIL PROTECTED] wrote:

On 7/1/07, Amir E. Aharoni [EMAIL PROTECTED] wrote:
   please correct me if
   i say something stupid or if this has already been discussed before.)

  Another important loss if we were to go with 1..3 would be the
  ability to have runtime-dependent ranges; e.g.:
 
  / ($ntimes) x**{$ntimes} /

 That's exactly what i meant by something stupid.

That's quite alright, because both interpretations of that sentence
were valid :-).  I meant:

/ $ntimes := (\d+) x**{$ntimes} /

Luke



Funny - how did it make sense to me the first time around? :)

This prompted me to re-read the parts about Subpattern captures and
Aliasing in S05, and i've got to say that it's *extreme* TMTOWTDI. I'm
happy about it, 'cause i've been wishing for named captures for a long
time, but i'm not sure that i understand it in your example
completely.

The examples of := usage in S05 seem to have notation such as this:
$ntimes := (\d+) 

Is $ntimes supposed to be a predefined scalar variable (my $ntimes)?
Or a regex variable?

I'm getting confused ...