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... ca
> ...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 con
http://mini.net/pub/ts2/minotaur.html
right err, I just wanted to illustrate the idea for CONTEXT's in same way,
didn't find the right examples though...
If we have more contexts any operator/s will be interpreted in numerous
ways, so the possible combinations grow i.e. we come close the the natural
language.
On the other hand the co
hi,
As the news that the Perl will be rewriten comes... me and I think many
others non core coders decided that they can help with something but
most of the people like me doesn't have the knowledge of the current
PERL5.6, why we may need this ?! 'cause Perl6 is 2 years from "here" and we
wil
http://www.oreillynet.com/pub/a/linux/rt/07282000/transcript.html
> 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 sh
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 the
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 (?synta
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]
=
> "David L. Nicol" wrote:
> >
> > These things sound like perfectly reasonable CPAN modules.
> > What's the block prevenenting their implementation w/in the
> > perl5 framework?
>
> Jeremy and I are working on a general purpose matrix/unmatrix function
> that may well be core-worthy. This would al
> 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 addi
> > They behave similarly like &&, ||, and, or operator with one main
> > distinction they "backtrack" for example:
> >
> > { block1 } B { 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
hi jeremy, all,
here is one simple example , let say we have this XML file:
how we can implement the following XPath expression - "file://code"
I'm giving here very simplified example (orthen works as shown in first
interpretation i
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
> ...
>} a
=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
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 compariso
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
i
hi,
We now can say :
$x = 10 if $y > 12;
It will be good if this also work.( i.e. block before if ).
{$x =10; $z =15} if $y > 12;
or
$x =10, $z =15 if $y > 12; # 8 click shorter
instead of this :
if ($y > 12) {$x =10; $z =15} ;
4 keyboard click shorter - Shift+( and Shift+)
=
iVA
> >$x =10, $z =15 if $y > 12; # 8 click shorter
>
> Should work now. I just tested it in 5.6, but I think that's been valid
> since Perl4 or earlier.
]- yep my mistake...sorry :")
> >instead of this :
> >
> >if ($y > 12) {$x =10; $z =15} ;
> >
> >4 keyboard click shorter - Shift+( and Shift+)
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
i
hi,
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 mean t
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 thi
> 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 add
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 f
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 (H
> 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 ... (leane
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 becom
>> 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 Over
the structure is something like this :
$Request = {
Params => {
abc => 1,
ddd => 2
}
}
the idea is that U don't dereference i.e. :
my $myhash = ($Request->{Params});
if u want to use it U have to do this :
print $$myhash{abc}; #or if u preffer print $myhash
> 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:))
$tables{
> > > 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
http://www.go-mono.com/faq.html
>> 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
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 (al
> 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 correspo
> Hmmm. Didn't think about that. That would be a nice way, that way you can
> manipulate it's behaviour depending with how many aliases you provide.
>
> for my $el1, $el2 ( (@foo, @bar) ) {
> print "$el\n"
> }
>
> $el1 and $el2 would of course be aliases, right?
]- yes ALIASING will be bett
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
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 oth
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]
=
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 lost. How would you decrease the number of elsif statements with
> otherwise???
]- it is not to decrease the number of "elsif" (this that i hate elsif was
just comment :") not that u have to stop using it ), but to give a shortcut
... ok forget about "otherwise" ( i also think no one will
> 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 r
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,
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, look
> >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.
:"|
> David L. Nicol wrote:
> > eval ${code}o;
>
> Another brilliant idea from David Nicol!
>
> However, I'm not keen on the syntax.
> I'd rather see a different keyword. I'm thinking "eval1",
> but I'm not very creative. :-/
]- what about :
qe//;# qe{};
OR
qo//
http://www.kuro5hin.org/story/2001/6/8/11126/34098
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{
|
|function blah()
|if ( )
|};
|
};
|<-inner
hi,
I was looking at Interbase SELECT syntax and saw these two handy shortcuts :
= {= | < | > | <= | >= | !< | !> | <> | !=}
!< 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
|
| > !< 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 wh
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) {
| I don't know if (and if so, how) you would see if you were on the last
| iteration. (And would that be last, as in the very last argument passed
in,
| or last, as in you're not going to iterate again?)
]- yep I didn't thougth about that I can be sure I'm at the last
iteration only with some
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{} => '
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 Program
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
http://www.perlmonks.org/index.pl?node_id=71319&lastnode_id=71484
hi,
will it be possible to do this inside Perl program :
use parrot;
...parrot code...
no parrot;
OR
sub mysub is parrot {
parrot code ...
}
=
iVAN
[EMAIL PROTECTED]
=
I find underscore also a little bit mesleading, but at least will not broke
my code (I was never using underscore in identifiers, I'm using Upercassing
i.e. $yetAnotherVar )
:")
=
iVAN
[EMAIL PROTECTED]
=
PS. it is time new keyboard to be invented :")
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
| So the imaginary numbers would be standard literals? Like
|
| $x=2+10i;
|
| Great idea, as well as sqrt(-1) returning 1i istead of raising the
| exception. BTW, I was thinking once that numeral literals like 4k or 10G
| (meaning 4*2**10, 10*2**30) would be very nice. What do you think?
I li
| > 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,
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.
FINI
Did u passed "Bermuda Triangle" :")
raptor
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 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 :")
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 :") )
Meanw
]- 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
|Oh! I have an idea! Why don't we make the lexer just realize a prefix
|"els" on any operator. Then you could do C. :P
|
|My point is that, IMO, this whole "els" thing is completely preposterous.
|I'm the kind of person that likes to keep down on keywords. And I never
|liked Perl5's C anyway; I
|On Mon, Apr 29, 2002 at 02:55:09PM -0500, Allison Randal wrote:
|> I still don't like the idea of Cs on loops. I already do an
|> instant double take with C 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 be s
|> Damian, now having terrible visions of someone suggesting C ;-)
|
|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
aren't 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
|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 l
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
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 ful
|Comments (otherwise you have things pretty much right):
]- that is good :")
|
|> Every subrotine or variable or method or object can have a "notes" (out of bound
|data)
|out-of-band data
]- yep
|> we can even have hyper-assignment :
|>
|> my ($a, $b) ^= new Foo;
|
|This is unlikely to do w
82 matches
Mail list logo