zip with ()

2005-07-31 Thread Andrew Shitov
Hi, I tried zip under pugs. my @odd = (1, 3, 5, 7); my @even = (2, 4, 6, 8); my @bothA = zip @odd, @even; print @bothA; This code prints 12345678 as expected. After parenthesis were used to group zip arguments, results changes to 13572468. Is it right? -- __

Re[2]: zip with ()

2005-08-01 Thread Andrew Shitov
Is it possible to avoid significance of whitespaces? I think, such an aspect of Perl 6 would be awful. IB> Whitespace is significant: IB> say zip(@odd, @even); IB> say zip (@odd, @even); -- ___ Andrew, [EMAIL PROTEC

Re[2]: zip with ()

2005-08-01 Thread Andrew Shitov
TTS> BTW, you didn't mean originally: TTS>say zip (@odd), (@even); # prints 13572468 or 12345678? That is exactly like with similar printing result of sub() call: print sqrt (16), 5; # shout print 45. -- ___ Андр

Re[2]: zip with ()

2005-08-01 Thread Andrew Shitov
LP> my $x = (1,2,3,4,5); LP> Looks like an error more than anything else. 'Perl 6 and Parrot Essentials' think different ;-) -- ___ Andrew, [EMAIL PROTECTED] ___

Re: $pair[0]?

2005-08-04 Thread Andrew Shitov
> say $pair[0]; # a? It looks like $pair is an arrayref while 'say ref $pair' tells 'Pair'. And may I ask a relating question: my $pair = ('name' => 'age'); say $pair{'name'}; # prints 'age' say $pair['name']; # why prints 'name'? <== question say $pair['age']; # prints 'name' --

Unable to run perl 6 test under Parrot 0.2.x

2005-08-05 Thread Andrew Shitov
> Parrot 0.2.3 "Serenity" Released! Possibly I'm growling again but I cannot run any Perl 6 programme with new Parrots. One-liner test.p6 containing 'print "perl 6";' is compiled to test.imc and cause an error: C:\parrot-0.2.3\languages\perl6>perl perl6 test.p6 error:imcc:syntax error, unexpect

Is Perl 6 too late?

2007-05-03 Thread Andrew Shitov
Russian that were written on real Perl 6 of that day, compiled into Parrot bytecode (.pbc) and run on Apache under Parrot virtual machine. I cannot do the same with today's instrumentary (or maybe I do not know how to?). Th

Re: explicit line termination with ";": why?

2007-05-14 Thread Andrew Shitov
say $value } debug 'me' # perl 5 sub debug { print shift } debug 'me' And finally, Perl is not an Assembler with one only instrucion per line. -- Andrew Shitov __ [EMAIL PROTECTED] | http://www.shitov.ru

Re[2]: explicit line termination with ";": why?

2007-05-14 Thread Andrew Shitov
> JavaScript allows to omit semicolumn. Sorry, s/lumn/lon/. By the way, Perl also ignors semicolumn :-) -- Andrew Shitov __ [EMAIL PROTECTED] | http://www.shitov.ru

Re[2]: explicit line termination with ";": why?

2007-05-14 Thread Andrew Shitov
g ';' is not as simple as <"\n" always means ";\n">. In mentioned JavaScript language one can do this: var x = 123 alert ( x ) and that will work! ";\n" can almost always be converted into "\n" but not vice versa. -- Andrew Shitov __

Re: Rakudo Perl 6 development release #28 ("Moscow")

2010-04-22 Thread Andrew Shitov
Moscow.pm also reminds that today (22 Apr) is the birthday of Lenin :-) > March 2010 development release of Rakudo Perl #28 "Moscow". -- Andrew Shitov __ a...@shitov.ru | http://shitov.ru

How to get environment variables?

2003-11-03 Thread Andrew Shitov
Is it possible to get environment variables from perl6 programme? It failes when I try to use perl5 hash %ENV. Thanks.

Re: How to get environment variables?

2003-11-03 Thread Andrew Shitov
I tried this one-line programme for example: my %e = %ENV; and got this (parrot-0.0.13/perl are built under mandrake linux): Global '_HV_ENV' not found Error: '/parrot-0.0.13/parrot -r env.imc ' failed with exit code 1 Stopped at /parrot-0.0.13/languages/perl6/perl6 line 339 main::mydie(256,'/p

How to read and write files?

2004-04-17 Thread Andrew Shitov
I think I have somesing missed: is it possible to open (that is read and write) files in perl6 programmes? Those programmes that can be run under current parrot release. Thanks.

Re: unicodian monospace fonts for windows(?)

2004-06-20 Thread Andrew Shitov
AT> oh my.. it seems to me, that Perl6 starts new age of ASCII-graphics. (not AT> ASCII, really.. maybe Uni-graphics?).. I hardly think Perl 6 should avoid any characters other than ASCII. For example we have at least three Russian encodings and it is acceptable only because we have no choice: we

Re: Why do users need FileHandles?

2004-07-18 Thread Andrew Shitov
DW> my $text is TextFile("/tmp/bar"); DW> $text = "hello"; # writes, truncates DW> $text ~= ", world\n"; # appends DW> $text.print "again\n"; # for old-times sake Anyhow we still need $text.flush() or $text.close() methods. -- _