me again,
At the moment based on Apo1-4 no ex's walked yet.
- There is a questions inside feel free to answer ... [?? ... ??]
- Also links for other reference implementation will be good.
- Also feel free to correct my english :)
What's new ?
Let me first mention this is in no means full
I've seen in theDamian Sypnosys following code :
$val = $key
does this mean that we now have also reversed syntax possible for hashes ? and pairs
too ?
raptor
|On 6/4/02 12:22 PM, David Wheeler wrote:
| I think that if we can agree to forego backwards compatibility, we might
| also be in a better position to set up a CP6AN with much better quality
| control. All of the most important modules will be ported very quickly
| (e.g., the DBI), and a lot
it ?)
raptor
PS. One thing just pooped to me... is the class { } a block so that we can do all
block mumbo-jumbo with it :)
| What I've often wanted would be standard method that is called before
| every
| subroutine call. If that method returns false then the method that was
| called
|On Mon, Apr 29, 2002 at 02:55:09PM -0500, Allison Randal wrote:
| I still don't like the idea of Celsifs on loops. I already do an
| instant double take with Celse of Where's the if? (with visions of
| old Wendy's commercials dancing in my head).
|
|Me too. That's why the looping else should
| Damian, now having terrible visions of someone suggesting Celswhen ;-)
|
|Then may I also give you nightmares on: elsdo, elsdont, elsgrep, elstry ...
]- unlessdo, unlesdont, unlessgrep, unlesstry
what about elsunless/unlesselse then :)
perfect... in fact during the middle of the read someting similar come to my mind..
i.e the best way should be to have several in-loop-proprietes that we can test and
decide what to do ...
There have to be CAPITALISED words only for the block stuff ...
raptor
]- me too .
|I actually like Andy Wardly's suggestion of iterators. It makes a lot of
|sense and looks a lot cleaner to read and write and adds less new syntax
|to remember (and parse).
|
|Clayton
raptor
great idea :)
I've just tried gnuCash program and think it is very cool (i've enjoyed to take
first steps in double-entry accounting, i was always wondering what the hell is this
:) )...
http://www.ncsysadmin.org/july2001/ncsa-gnucash-talk.html#toc1
(very entertaining intro :) )
hi,
I thought it will be good if on dev.perl6.org we have an arhive with all Apo's and
Ex's, so anyone can get them in pack... (prefebaly printed version)
Throught the links I got all except Apo1. Anyone to have the link nearby
iVAN
[EMAIL PROTECTED]
- Danke very much :)
I was just reading this :
http://www.javalobby.com/clr.html
and a question raised to me. Will Parrot have some optimisation
(features) that will speed up closures continuation ?
raptor
[EMAIL PROTECTED]
Hi,
I was looking at TPJ one-liners and saw this :
#32A trick for indenting here strings
($definition = 'FINIS') =~ s/^\s+//gm;
The five varieties of camelids are the familliar
camel, his friends the llama and the alpaca, and
the rather less well-known guanaco and vicuna.
FINIS
| As for more complex string literals evaluating to numbers, I think
that's
| something best left to either a user-written sub, or user-written fancy
| parser hacks. Up to Larry whether it goes in the base language, but I
think
| I'd prefer not.
|
| Speaking of string turning into numbers ...
hi,
Any idea what the continuation will be ? Something similar like
while(){..}continue{..} construct, but more primitive/lower-level ?
{ my $val = 10 } -= { print $val; $val = 11 } -= { print $val }
prints 10 and 11 i.e. lexicals of BLOCK1 are preserved for BLOCK2 and BLOCK3
i.e until
I think this would be interesting for U :)
http://www.cs.yorku.ca/Courses/3401/lectures/340198-11-27HTML/
http://www.cogs.susx.ac.uk/local/books/nlp-in-prolog/ch04/chapter-04-sh-1.5.
html#sh-1.5
| On Thu, 4 Oct 2001, Michael G Schwern wrote:
|
| Backtracking is at the heart of Logic
Is the following correct for := :
left side is like function in the respect that the right side is treated
differently depending on the left-side-types i.e. left side is like
prototype!! for the right side.
(@a ,@b) := (@b,@a)
is the same as :
(\@a, \@b) = (\@b, \@a);#if we had ref-allowed on
will the iterator variable be available in map, grep, join...etc...
I was also wondering if the join syntax be extended in a way that it can
support preffix and suffix... what i have in mind ... not necesary but :
#pair
join ($prefix = $suffix), @ary;
so :
my $select = join (qq{option
|
| ! and !
|
| How is ! different from =?
]- the way of Expression or syntax-sugar if u like it :), and is faster to
prononce :)
if, if not, unless
bigger, smaller, equal
less than or equal, bigger than or equal
not bigger, not smaller ...etc.
Personally I almost always make error when
hi,
As we read in Damian Conway- Perl6-notes, there will by a var-iterator that
can be used to see how many times the cycle has been traversed i.e.
foreach my $el (@ary) {
.. do something
print $#; --- print the index (or print $i )
}
shall we have :
foreach my $el (@ary) {
hi,
I was looking at Interbase SELECT syntax and saw these two handy shortcuts :
operator = {= | | | = | = | ! | ! | | !=}
! and !
Personaly i didn't liked if (! ...) construct too much, so even that
starting to use unless is harder for non-english speaker, I think is much
cleaner and
hi,
I was wondering if there was some way when using qouting to specify triming
of white space or other type of charachters we may need ... say like TT or
may be ...one example..
my $javascripCode = qq{
|script
|function blah()
|if ( )
|};
|/script
};
http://www.kuro5hin.org/story/2001/6/8/11126/34098
I want to say also :
{value}hash% = key;
Just use two hashes for this purpose. If you can write a class that help
keeping
track of the two hashes, that will be more useful than inventing weird
syntax.
]- this was not a proposed syntaxI was just joked about it ... sorry.
:|
hi,
I see nobody is talking here ... so !
Anyone to have idea how the Parser will work... I mean mostly at the
language-developer side (not the internals).
It will be written in Perl, right ?! some striped-version of Perl ?! i.e.
what will be allowed and will not ?
Will it support lookahead,
This makes no sense. ?: tests a boolean value, which is either true or
false.
There is no ternary state for a boolean value. True/False, Yes/No, On/Off,
1/0. Are you suggesting Yes/No/Maybe? Or are you redefining True and
False?
]- I'm not talking about boolean's... but mostly this can be
But at least the second shortcut is worth it, i think :
cond ? then : else : otherwise
This has a vague smell of Fortran.
]- I don't know Fortran sorry :)
=
iVAN
[EMAIL PROTECTED]
=
Linguistically, if then else, otherwise doesn't make sense, since 'else'
and 'otherwise' are synonymous.
]- ok .. I choosed wrong word... I'm not native English sorry... but I agree
that if-else-otherwise construct is not so good, for most of the people... I
forgot about it already :)
? : :
in ?:: or any other condition checking block, 0 is true, everything else
is
false. I am yet to see why otherwise or any third condition is needed.
If
that's then we can have 4 conditions 1,0,-1,undef, and we can keep going.
That is why there are conditions, if you want to check for -1 you
hi,
we have = and 'cmp' operators but we don't have the conditional constroct
to use better their result :
May be forthcomming switch will solve this in some way, but isn't it better
to have shortcut like this :
if (cond)
{ }
else {}
otherwise {}
i.e.
if cond == 1 then 'then-block'
if cond
I've/m never used/ing elseif ( i hate it :) from the time I have to edit
a perl script of other person that had 25 pages non-stop if-elsif sequence)
... never mind there is two conditions in your example...
of coruse i've think of this just like a shortcut nothing special ... later
on :
$x =
I'm ok with both :
alias (%foo, %bar);
AND
my \%foo = \%bar;
the first variant look better to me (I mean it is easy to spot when u are
reading the code), but I also expected as U the second to work in Perl5 and
was very dissapointed to see that it doesn't work.:(
The keyword alias on the other
hi,
I just wanted to ask, 'cause i've not seen info on this anywhere does
functionality like those of Storable/Data::Dumper be available in the
perl-core ( i mean runtime ) ...
thanx
=
iVAN
[EMAIL PROTECTED]
=
So my initial code (which I modified a little...)
for ( @foo, @bar ) {
print $_[0] : $_[1]\n;
}
for would set each element of the @_ array to correspond to the arguments
in
for() , therfore $_[0] will equal to the current element of @foo and $_[1]
will equal to the corresponding
ooops I forgot if the vars in for are aliesed then it will be ok for using
it like 'with' :
for my $el ( $Request-{Param} ) {
print $el{qsParam1}
print $el{qsParam2}
}
but then what will be $_ ... alias OR copy !?! :) I mean mostly backward
compatibility...
One other way is 'local' to
Does such a thing exist already?
A WTDI exists already:
for ( $XL-{Application}-{ActiveSheet} ) {
$_-cells(1,1) = Title;
$_-language() = English;
}
(presuming lvalue-methods, of course...)
So, in this case, a with synonym for for would work.
]- OR
with alias for;
hi,
As I was programming i got again to one thing i alwas needed to have...
especialy when write something fast or debug some result... words comes
about for/foreach and accessing the current-index of the array I'm working
with i.e.
say I have two arrays @a and @b and want to print them
I mean something like this :
instead of :
#$Request-{Params}
local *myhash = \%{$$Request{Params}};
my %myhash alias %{$$Request{Params}};#see - it is my (now as far as I
know
u can't have it 'my')
You don't need a typeglob there; you can do the following, which does
work
http://www.go-mono.com/faq.html
hi,
Two things i think is good to have it :
1. ALIAS keyword.
- first reason is 'cause many people don't know that this is possible.. at
least any newscommer and it will help not to forgot that it exist :).
- Code become more readable.
- can be Overloaded
- the syntax for aliasing can
Two things i think is good to have it :
1. ALIAS keyword.
- first reason is 'cause many people don't know that this is
possible.. at
least any newscommer and it will help not to forgot that it exist
:).
- Code become more readable.
- can be Overloaded
-
Yes but can't the same be accomplished with...
my $myhash = (%{$Request-{Params}});
print $myhash{abc};
Though again it copies the structure, I don't see how dereferencing can be
unclear?
]- if u have someting like this anything u can remove in some way is worth
it:))
What will be the Perl6 code name ?
]- OK what about Velociraptor ;")
- It is animal - continuing the tradition ...
- it is one of the CLEVEREST dinos. (only truodont!! is thought that is
clever)
- it is PREDATOR - will hunt all other "languages"
- small - little bigger than human ...
hi,
Most of the software projects has their code name f.e. :
You still can see in the INF files win95 code name Chicago, there was
Memphis ..
Red Had
Version 7 (Guinness)
Version 6.2 (Zoot)
Version 6.1 (Cartman)
Version 6.0 (Headwig)
Version 5.2 (Apollo)
Version 5.1 (Manhattan)
Version 5.0
hi,
I haven't used Python... but last days I read some stuff, wanted to compare
both languages for myself and found something interesting.
They are proposing extentinon to Pyhon 2 (with their so called PEP
documents, this also is good idea i.e. using current or some modified
version of RFC's for
On Thu, 21 Sep 2000, Tom Christiansen wrote:
=item perl6storm #0050
Radical notion: consider removing precedence.
Wrong precedence makes people miserable.
(Some people already suggest that Perl only has two precedence rules: (1)
multiplication and division come before addition and
hi,
I was thinking will it be good if the braces are used but not required for
ops like while, until, if, unless ...etc... what I have in mind :
if $x 10 print $x;
work as
if ($x 10) {print $x};
OR
while $i 10 print $i;
mean
while ($i 10) { print $i };
I know that some will tell that
hi,
so,
while $i 10 print $i; print $j;
should become
while ($i 10) { print $i; print $j; }
or
while ($i 10) { print $i; } print $j;
???
]- !!! ;")
problem can be solved again in this way i.e. shell like syntax :
while $i 10 $i++ print $i;
mean this
while ($i 10 )
hi,
snip
REBOL is the next generation of distributed communications. By "distributed"
we mean that REBOL code and data can span more than 40 platforms without
modification using ten built-in Internet protocols. The pieces of a program
can be distributed over many systems. By "communications" we
hi,
here is one simple script (Requires Parse::RecDescent) that count operators
in scripts.(and my fisrt grammar ;") )
OK. I started this against my current perl installation.
(it is not pure RH6.2 install, but many things are added)
i.e.
find /perl_dir -name *.pm | ./count.pl | tee allops.txt
Hi,
I have couple of ideas which may or may not worth it, so I didn't
wrote the RFC but will list them here in short.
Here are the nice to have'it.
1. There will be good to have some sort of "match and/or assign" operator
for structures i.e. HASHES. Can't still figure out the syntax but may be
hi jeremy, all,
here is one simple example , let say we have this XML file:
root
unit
q/q
answertag/tag/answer
/unit
unit
q/q
answer
desc
code/code
/desc
/answer
/unit
unit
q/q
answer
code/code
/answer
/unit
/root
how we can implement the following
hi,
So how is that different from:
do BLOCK1 until do BLOCK2
It's the same.
But the real fun starts when blocks and functions can suspend and
resume.
{ ...
# Return value and suspend.
suspend $i;
# Next iteration will resume here
...
} andthen { ... };
=head1 REFERENCE
Icon language brief intro :
http://www.cs.arizona.edu/icon/intro.htm
RFC 25 (v1): Multiway comparisons
and now snip from the Icon language :
http://www.cs.arizona.edu/icon/docs/ipd266.htm
snip
2.1 Conditional Expressions
In Icon there are conditional expressions that may succeed and produce a
result, or may fail and not produce any result. An example is the
There's also the cut operator which I didn't see mentioned in the RFC.
It blocks backtracking so that something like this:
B1 andthen B2 andthen cut B3 andthen B4 andthen B5
wouldn't backtrack to B2 once it forwardtracked to B3.
]- I tried minimalistic approach as small as possible
They behave similarly like , ||, and, or operator with one main
distinction they "backtrack" for example:
{ block1 } Bandthen { block2 };
This would be a good use of the to-be-liberated = operator:
{ block1 } = { block2 };
In any case, "andthen" doesn't seem like a good choice.
Subject: RFC 90 (v1) Builtins: zip() and unzip()
I just don't like the name zip(), unzip() - shold be saved for something
that will really do commpression.
Variants : combine
I like merge too..
As of this it will be good if there some sort of compression internally
by the perl, say for
what about (not zip() offcource :")):
@a = (1,2,3);
@b = (4,5,6);
@c = (7,8,9);
zip (how,@a,@b,@c);
i.e.
@list = zip (0,@a,@b,@c); #stright
result (1,2,3,4,5,6,7,8,9)
@list = zip (1,@a,@b,@c); #reverse
result (7,8,9,5,6,7,1,2,3)
@list = zip(2,@a,@b,@c); # all first elems, then all
Sorry that read this later...
It is one step from matrix to create SQL syntax :")
if we have MATRIX operations what about adding a conditions to it.. i.e. :
@a = (1,2,3);
@b = (4,5,6);
@c = (7,8,9);
matrix x3, @a, @b, @c where x3 5;
( 1,2,3
4,5,6
7,8,9 );
x3 in where mean column 3
I actually saw this in the newsgroups and thought it was a neat idea. What
about
println $textvar;
instead of
print "$textvar\n";
Ever so much easier to read and write, prints the arg and appends \n.
]- I thought 'bout this too, but I think it is not general enought..Why ?
we shall
hi,
it will be good if all these RFC are put somewhere on the WEB (we can't
follow all those mailing lists if the amout of posts stay the same :") )
also in this way we will get broader picture what is happenning..
=
iVAN
[EMAIL PROTECTED]
=
...and have some_func know it is being called in an iterator context
and be able to create it's own iterator. foldr could then be
done as...
I think may have not only list,scalar,iterator context. But some way to
define CONTEXT itself, I don't have idea how ?
array context, boolean
hi,
Why not some sort of functionality like LISP/Prolog i.e. working with lists.
("a",@x,"b",%y) - the list
head ("a",@x,"b",%y) # "a"
head(tile("a",@x,"b",%y)) #@x
head(head(tile("a",@x,"b",%y))) #$x[0]
head(tile(tile("a",@x,"b",%y))) #"b"
if you like it then "splice" etc...
63 matches
Mail list logo