Hugo wrote:
>
> In <[EMAIL PROTECTED]>, "David L. Nicol" writes:
> :I think I did -- I guess v2 didn't make it in; I sent it again; what
> :were your and mjd's comments again?
>
> Here are the messages:
> http://www.mail-archive.com/perl6
de loops, if that was a lvalue it
could be set to the end of the data, or set back to the beginning for
that matter, to effect a last or a redo.
--
David Nicol 816.235.1187 [EMAIL PROTECTED]
perl -e'map{sleep print$w[rand@w]}@w=<>' ~/nsmail/Inbox
Mark-Jason Dominus wrote:
>
> The perl 5 -> perl 6 translator should replace calls to 'eval' with
> calls to 'perl5_eval', which will recursively call the 5->6 translator
> to translate the eval'ed string into perl 6, and will then eval the
> result.
And that gives us a convenient name space for
'John Porter' wrote:
>
> David L. Nicol wrote:
> > "Randal L. Schwartz" wrote:
> > >
> > > I think we need a distinction between "looping" blocks and
> > > "non-looping" blocks. And further, it still makes sense
do exceptions. Loop control
structures catch these objects and throw them again
if they are labeled and the label does not match a label the loop control
structure recognizes as its own.
--
David Nicol 816.235.1187 [EMAIL PROTECTED]
perl -e'map{sleep print$w[rand@w]}@w=<>' ~/nsmail/Inbox
yield (push @array1, $_);
yield (push @array2, $_);
yield (push @array3, $_);
push @array4, $_;
};
--
David Nicol 816.235.1187 [EMAIL PROTECTED]
perl -e'map{sleep print$w[rand@w]}@w=<>' ~/nsmail/Inbox
better than
%newhash = map {($_,transform $somehash{$_})} @keysubset;
but you can certainly come up with a reasonable example. Listing inventories
by department, for instance. By yielding we would save the creation of the
per-iteration temporary and push directly onto the result.
--
ng the "gatekeeper" idea without C we get these:
> "yes" and abort after this one
my $gatekeeper = 1;
($FirstSmall) = grep
{ $gatekeeper and $_ <= 7 and ($gatekeeper = 0), 1 } @numbers;
> "no" and abort after this one
: print "one"; exit; two: print "two"; print three: grep {
($_ == 25 and goto three) or !($_ %
3) } (1..30)'
syntax error at -e line 1, near "three:"
Execution of -e aborted due to compilation errors.
--
David Nicol 816.235.1187 [EMAIL PROTECTED]
perl -e'map{sleep print$w[rand@w]}@w=<>' ~/nsmail/Inbox
tes them as needed for better compliance with
projected remote schema based on experience.
That trick is beyond the scope of what I believe are suggestions for reasonable
incremental improvements to a programming language.
That is where I draw the line.
--
if overused.
I admit to being a bit sentimental about chop, but I can't think of
any exciting reasons to keep it. The parity reasoning, however
strikes me as a bad idea/precedent.
dha
--
David H. Adler - <[EMAIL PROTECTED]> - http://www.panix.com/~dha/
Just Install Perl. - Chris Nandor
x27;m for putting it after a comma. Which matches the syntax of
John Porter's proposal about internally converting the block to a subroutine.
--
David Nicol 816.235.1187 [EMAIL PROTECTED]
perl -e'map{sleep print$w[rand@w]}@w=<>' /usr/dict/words
al perl to me.
>
> --
> John Porter
I'd like to see next/last/redo in such situations pertain to the
block from which the sub was called, if that makes sense.
--
David Nicol 816.235.1187 [EMAIL PROTECTED]
perl -e'map{sleep print$w[rand@w]}@w=<>' /usr/dict/words
I wrote a map w/o last but erased it for brevity :)
--
David Nicol 816.235.1187 [EMAIL PROTECTED]
perl -e'map{sleep print$w[rand@w]}@w=<>' /usr/dict/words
Johan Vromans wrote:
> my $file_format = qf(
> @<: @
> $name, $ssn
> );
>
> Now, $file_format would be a Format object (compare this with qr//,
> that produces a Regex object).
or the proposed qs// which would produce a packed structure definition
John Porter wrote:
>
> David L. Nicol wrote:
> >
> > A bareword inside doublequotes is not interpreted, in Perl or C.
>
> No; a "bareword" in quotes (any kind) is not a bareword.
>
> --
> John Porter
huh?
--
mailing-lists/modules/2000-08/msg00078.html
module does it.
To use the perl function even after it has been hidden,
it can be referred to by its absolute name CORE::chmod.
--
David Nicol 816.235.1187 [EMAIL PROTECTED]
perl -e'@w=<>;for(;;){sleep print[rand@w]}' /usr/dict/words
imal representation,
no reason to throw that away.
> Dirk
thanks for your support
--
David Nicol 816.235.1187 [EMAIL PROTECTED]
perl -e'@w=<>;for(;;){sleep print[rand@w]}' /usr/dict/words
Nathan Wiger wrote:
>
> "David L. Nicol" wrote:
> >
> > s/x/5/; # this is still going to replace
> > # all the eckses in $_ with fives.
>
> Why? This is an arbitrary decision if you've declared variables to be
> barewords.
ne starting "#do " does not match any known
C preprocessor commands and is therefore a perl comment, and
s/x/5/; # this is still going to replace
# all the eckses in $_ with fives.
To test if x is five or not, something like this would be in order:
ged scalars which
magically convert so fluidly.
--
David Nicol 816.235.1187 [EMAIL PROTECTED]
perl -e'@w=<>;for(;;){sleep print[rand@w]}' /usr/dict/words
lazy would work too, you can pull off the first grepped
value and if you don't go back for another the thing will get dismantled
when the current scope closes.
--
David Nicol 816.235.1187 [EMAIL PROTECTED]
perl -e'@w=<>;for(;;){sleep print[rand@w]}' /usr/dict/words
John Porter wrote:
>
> David L. Nicol wrote:
> >
> >
> > How about ALLOWING bareword everything-else? Start having
> > filehandles work the way everyone expects them to at first,
> > passing as arguments and so forth, without any special treatment?
) by mercury.Sun.COM
(8.9.3+Sun/8.9.3) with ESMTP id OAA27600; Fri, 1 Sep 2000
14:52
Nathan Wiger wrote:
>
> "David L. Nicol" wrote:
> >
> > No, that would be
> >
> > dog $spot;
>
> No, it wouldn't:
>
> $r = new
my $int = {};
for (keys %{$_[0]}){
$$_[1]{$_} and $$int{$_} = 1;
};
return $int;
};
See?
--
David Nicol 816.235.1187 [EMAIL PROTECTED]
perl -e'@w=<>;for(;
?
> >
> >I think this is a superb idea, and look forward to someone's RFC'ing it.
>
> I like it too. Anyone working on the RFC?
> --
> Peter Scott
> Pacific Systems Design Technologies
the assignment from lazy syntax described in
http://dev.perl.org/rfc/123.html
Nathan Wiger wrote:
>
> "David L. Nicol" wrote:
> >
> > They gain us compliance with the whims of the people who like barewords
> > for variable names. You may or may not find that to be a good thing.
>
> It's not just that I don't think drop
Sam Tregar wrote:
>
> On Thu, 31 Aug 2000, David L. Nicol wrote:
>
> > We're talking about making a faster Perl. C's syntax requires enough
> > clarity to compile to something quick. it is a very short hop from
> > my dog $spot;
> > to
>
Nathan Wiger wrote:
>
> "David L. Nicol" wrote:
> >
> > my dog $spot;
> > to
> > dog spot;
> >
> > If we only allow this where enough info is available to allocate dog-sized
> > pieces of memory directly, Perl can blaze t
Sam Tregar wrote:
>
> On Thu, 31 Aug 2000, David L. Nicol wrote:
> > run-time efficiency
>
> C doesn't get run-time efficiency from its syntax, so we can't really
> expect to get anything here. It gets it from its compilation
> architecture. If you wan
>{@{\(a..h)}} because
of the context-based overloading of dotdot -- so to make $$r{a..h}
work we would need to both allow an array in container resolution brackets
to mean sequential access but also make that an array context. But
using dot-dot in there is awfully contrived.
--
>
> That is if multi-dimensional arrays are implemented as lists-of-lists,
> which they might not be.
Even if they aren't implemented as lol, they may appear as lol to the programmer
--
David Nicol 816.235.1187 [EMAIL PROTECTED]
"My baby done left me,
she done went to the drive-in movies with somebody else."
]
- -> Sent: Thursday, August 31, 2000 9:31 AM
- -> To: [EMAIL PROTECTED]
- -> Subject: Re: the C JIT
- ->
- ->
- -> On Thu, 31 Aug 2000, David L. Nicol wrote:
- ->
- -> > Perl looks, and AFAIK has always looked, like "C plus lune
noise" to
- -> > many p
David Corbin wrote:
> A C JIT is an interesting idea.
>
> I think that a project works best when it has a set of goals (I haven't
> seen one yet really for Perl 6). Unless this is one of the goals, I can
> easily see how this could become a serious distraction to what
"David L. Nicol" wrote:
>
> Dan Sugalski wrote:
>
> > I do want to have a set of C/XS/whatever sources as part of the test suite
> > as well--right now perl's test suite only tests the language, and I think
> > we should also test the HLL interface we
be clarified without run-time inputs.
--
David Nicol 816.235.1187 [EMAIL PROTECTED]
e made once at compile-time and then they use the native math ops.
Dynamic types-checking slows us down of course, but with both, the
dynmaic type will only be required when it isn;t clear, and that clarity
will keep perl6 instructors with full classrooms.
--
David Nic
Johan Vromans wrote:
>
> Hi David,
>
> [Quoting David L. Nicol, on August 29 2000, 19:27, in "Re: RFC 132 (v3) Sub"]
> > > With the enhanced C operator, subroutines can dynamically decide
> > > what to return.
> >
> > With context-b
How about ALLOWING bareword everything-else? Start having
filehandles work the way everyone expects them to at first,
passing as arguments and so forth, without any special treatment?
--
David Nicol 816.235.1187 [EMAIL PROTECTED]
Subroutine one-arg, him
ot assume
> the implicit $_ as an argument.
Subroutine one-arg, him called no-arg, get $_-arg. Ug.
--
David Nicol 816.235.1187 [EMAIL PROTECTED]
One function that takes an optional leading commaless arg:
sub print(handle? $FH, @)
or
Two functions differentiated by their prototypes
sub print(@);
sub print(handle,@);
I'm always forgetting the comma after the handlename in
C statements because I learned "no c
Richard Proctor wrote:
>
> This leads back to my original "remove all whitespace". Somehow there is a
> compromise to extracted from this.
Have we explored using a subset of regex for end-markers?
$long_string_possibly_indented_later = <<\w*##ENDEND##\w*;
.
ation, allowing vivication and automatic
dereferencing of the enclosed type as needed, transparently to the
programmer.
--
David Nicol 816.235.1187 [EMAIL PROTECTED]
Yum, sidewalk eggs!
t;
> --
>
> [EMAIL PROTECTED]
--
David Nicol 816.235.1187 [EMAIL PROTECTED]
Yum, sidewalk eggs!
Andy Dougherty wrote:
>
> On Tue, 29 Aug 2000, David L. Nicol wrote:
>
> > I'd like to see every number bundled with a "precision" attribute.
>
> While that might be useful for simple calculations, I expect it would
> simply get in the way and sl
notwithstanding the destructive nature of splice)
>
> --
> Eric J. Roode, [EMAIL PROTECTED] print scalar reverse sort
> Senior Software Engineer'tona ', 'reh', 'ekca', 'lre',
> Myx
language
that would know it was doing GIGO and stop would be a good thing.
With strong types, I can go ahead and write myself a bigfloat::precise
type and use it. Sometimes the line between "attribute" and "value" is
completely semantic. But that doesn't me
t;
> This is very usefull for fast searching in DBM for example.
Way cool. I'd love this. But I think you've got your push arguments
backwards.
> PS.
> Perl6 should stay Perl, but must be more than Perl.
> Perl6 should be fast as mentioned in one RFC - but most importa
win, especially
> considering your thoughts about the module install system.
>
> What about Foo::Configuration?
>
> /Cajo.
>
> At 13.35 -0400 2000-08-25, David Corbin wrote:
> >There are several modules I've run across that require you to edit them
> >after yo
u want to skip tabs and
> spaces, put that sequence in.
>
> The only consequence would be that you'd have to be consistent in what
> you put in front of the text lines (and in the whitespace prefix
> definition).
>
> --
> Bart.
Why not make
it ugly (to you)? Just having to type an additional
character?
Do you have a better suggestion for separating variable type from
context?
>
> Um, don't know about hash{[a-c].*} though (apply regular expression and only
> keep keys that match)
>
> --
> Bron ( but I don't think the ugliness is worth it in the end.. )
--
David Corbin
Mach Turtle Technologies, Inc.
http://www.machturtle.com
[EMAIL PROTECTED]
David Corbin wrote:
> In addition to the four I posted, originally, I've added two. Here's my
> working list.
>
> native pattern matching;
> list manipulation
> aweswome text processing.
> It's application glue (thanks Tim)
> Ability to write powerful 1
>
> --
> Chaim FrenkelNonlinear Knowledge, Inc.
> [EMAIL PROTECTED] +1-718-236-0183
--
David Nicol 816.235.1187 [EMAIL PROTECTED]
safety first: Republicans for Nader in 2000
Michael G Schwern wrote:
> Compare:
>
> dbmopen(%foo, 'somefile', 0644);
>
> with:
>
%foo:persistent(file=>somefile);
ou are talking
about, and would also allow creation of arbitrary module visibility scoping
and versioning schemes.
--
David Nicol 816.235.1187 [EMAIL PROTECTED]
safety first: Republicans for Nader in 2000
hat would it look like? How about
sub Cmp:infix($:string,$:string){...}
I think your suite of case-insensitive comparisons would make
beautiful example code in the RFC.
How tightly it binds could be indicated by a pair of numbers
after the x in the :infix, what they would mean is also up in
e to
be, so what do YOU think makes Perl Perl?
In addition to the four I posted, originally, I've added two. Here's my
working list.
native pattern matching;
list manipulation
aweswome text processing.
It's application glue (thanks Tim)
Ability to write powerful 1-line program
Perl6 RFC Librarian wrote:
> =head1 IMPLEMENTATION
>
> Probably has to be added to perl internals...
>
> I wonder what will happen with overloads though - is eq/i a new operator
> to overload or is the case-insensitivity somehow magically done by the
> Perl interpreter even though eq was overl
urable item is needed by a new revision that isn't in the old one
and warn the user.
I assume that this is really just another very small .pm file.
Thoughts?
--
David Corbin
Mach Turtle Technologies, Inc.
http://www.machturtle.com
[EMAIL PROTECTED]
x".array[]."yy";
$x = "xx".@array[]."yy"; # not so sure about this one.
# I'm not sure at all about these - I tend to avoid interpolation of
arrays and hashes for "safety"
$x = "xx@{array}yy"
$x = "xx{array[]}yy"
--
David Corbin
Mach Turtle Technologies, Inc.
http://www.machturtle.com
[EMAIL PROTECTED]
Buddha Buck wrote:
> Perhaps someone should RFC the new special variable &ME, which is
> predefined to be the whole program. Who knows? Perhaps it would then make
> sense to use @_ at the top level, as if the program was invoked as
> "&ME(@ARGV);"...
on -objects it has been proposed that &ME i
he Matrix)
I think it would be a good thing, and would be another things can
distinguish Perl from the other languages like pattern matching once
did. It strikes me as one of those things that are going to end up
adding a whole lot of power that wasn't expected, once people figure
them
$name (qw/violet purple cream/) {
> push @funx, sub {
> print "I'll take a $name one, please, with @_.\n";
> };
> }
>
> --tom
Or consider this pseudo code -
open file
lock file
dump file
-
esigning the parser around regexes
> might indicate ways in which Perl's regexes are not yet powerful
> enough.
>
> Larry
That would be coolness.
--
David Corbin
Mach Turtle Technologies, Inc.
http://www.machturtle.com
[EMAIL PROTECTED]
David Corbin wrote:
> >
> > For the remainder of the enclosing block, the barewords var,
> > array and hash are to be interpreted as references to a scalar, an
> > array, and a hash.
>
> I'm confused by this statement. Are you suggesting an alternative to
>
"David L. Nicol" wrote:
>
> >
> > Consider the following syntax:
> >
> > my var; # declaring a scalar
> > my array[]; # declaring an array
> > my hash{};# declaring a hash
>
> For the remainder of the enclosing block, the b
On Wed., Aug 16, 2000, Nate Wiger wrote:
> is good. Right now, people are hopping in 500 emails behind, replying to
> something in the middle of the stream, and only later reading the
> "please move this to -errors" post.
Actually, I'm 1283 emails behind, to be exact.
And that's just countin
r, an
array, and a hash.
As long as assignment starts doing automatic dereferencing this
will not be too tricky, it will require adding some work to C
and adding more barewords to the local bareword board.
--
David Nicol 816.235.1187 [EMAIL PROTECTED]
Laziness w
gt;
> or
>
> print "OK!" if $val eq "foo" or $val eq
>
> except it's a lot more compact, intuitive to use and readable...
>
> --
> Markus Peter - SPiN GmbH
> [EMAIL PROTECTED]
--
David Nicol 816.235.1187 [EMAIL PROTECTED]
Laziness with responsibility http://www.tipjar.com/kcpm
:
possible infinite loops from countint infinite arrays
"lazy array" would be a suitable type for an lvalue subroutine
to return, since an assignment of an array to it would fill the first
n positions.
--
David Nicol 816.235.1187 [EMAIL PROTECTED]
bles to the values
> in the hash.
>
> - Ken
But that doesn't give us the speed win we want from compiling offset lookups
into a static record structure, at the cost of some funny "in -the-record"
syntax, as in other languages that support this (pascal, VB, C)
--
David Nicol 816.235.1187 [EMAIL PROTECTED]
title: study a list of regexes
David Nicol.
Aug 21
version 1
[EMAIL PROTECTED]
Sometimes I have a group of regexen, and I would like to know
which ones will match.
Current practice is to "study" $situation and then grep them:
example a:
study $situation;
@matche
llowed by special treatment for hereis, followed by push onto @tokens.
then the tokens get run, which means executing a $_->run() if such is
defined, or calling clarify($_) if not.
And all this w/in multiple threads.
--
David Nicol 816.235.1187 [EMAIL PROTECTED]
Does despair.com sell a discordian calendar?
"Bryan C. Warnock" wrote:
>
> On Fri, 18 Aug 2000, David L. Nicol wrote:
> > There will Be No Perl7
>
> Of course not. Odd numbers are the development releases. The next
> Perl after 6 will be 8.
So maybe the reference implementation should be written in per
Larry Wall wrote:
> The main downside of accessors is that you can't (currently) say
>
> local $obj->attribute = 2;
Is anyone thinking of this? This comes at a good time when I've
been looking for just such an idea to shore up one of my proposals on
perl6-language-strict.
J. David
ing grammars, data structures, regex engines, and so on.
> There's no such thing as a small change if that change comes *after*
> people have begun coding. That's called "feature creep", as I'm sure
> you know.
>
> So I want to encourage people to s
; If it does, how do you localize it? What would that mean?
It means, that the current value of $obj\attribute is stored somewhere, and
when the scope exits, the value from somewhere is returned to it.
Why would it be different?
--
David Nicol 816.235.1187 [EMA
Jarkko Hietaniemi wrote:
> > $item:n would be the position $item had in the last container it was in
>
> $item:i, you surely meant? $item:n would be the size of the list...
The size of the list would be something like $#{$item:contained_in}
the size of the list is not a property of the item, s
(lazy map {($_, $hash{$_})} sort compartor keys %hash)
and extend "lazy" to mean, shift of as many as needed to fill the
lvalue.
Whew.
--
David Nicol 816.235.1187 [EMAIL PROTECTED]
Does despair.com sell a discordian calendar?
Mike Pastore wrote:
>
> Any thoughts on this?
Attributes.
($item : arrayposition) would tell us what the position is.
--
David Nicol 816.235.1187 [EMAIL PROTECTED]
Does despair.com sell a discordian calendar?
was expecting you to
list a minimum set of what you thought every object should do.
--
David Nicol 816.235.1187 [EMAIL PROTECTED]
Does despair.com sell a discordian calendar?
erpolated. Whether there's
> > a way of improving this behavior or not I don't know.
s/something/somethingelse/ge can get really specific, you can do stuff
like only interpolate the ones that are more than 12
--
David Nicol 816.235.1187 [EMAIL PRO
longer version is what you have to use inside qq//.
That goes for all the other proposed hat variables too, whatever
they mean. So you can tell there's something funny about them,
but you have to get to the second char in the expression to see it.
--
David Nicol 8
special keywords to
appear at the beginning of the with-blocks, if we want some.
%fields = &load_a_row;
%fields{# equivalent of with fields in Delphi or VB
${^age} < ${^shoesize} and print "${^name} is too young\n";
};
Exact
hat we can still access the default scope within the block.
Lets use hats again then.
%ws{
print ^$height; #prints $ws{height}
print $height; # perl5 visibility rules
};
AFAIK, the entirety of %name{something here} is unplowed ground, a
ext.
We want ( LHS || RHS ) to mean,
( LHS->BOOLEAN() ? LHS : RHS )
Correct?
--
David Nicol 816.235.1187 [EMAIL PROTECTED]
Does despair.com sell a discordian calendar?
_new = 3; # just set $record{something_new} to 3
};
Dave Storrs wrote:
>
> On Wed, 16 Aug 2000, David L. Nicol wrote:
>
> > a more general "with" keyword
> > which would operate on a hash and be syntactic sugar for
> > replacing all appearances of
What if its a method of anything in an array? $_ is already
a reference to the object on the array in for loops rather
than a copy of it. What if we make change be not something about
for loops, but about anything in an array?
print "The index, in its array, of <<$_>> is $CORE::ARRAY
Damian Conway wrote:
>
>>%professors{ $a->name cmp $b->name };
>>
>>%students{ $$students{$b}{GPA} <=> $$students{$a}{GPA} };
>
> These already mean something. Please don't "special-case" them.
No they don't.
[d
# (1,2,4,8,16)
What if the number of the array we're on is in a special C<$n> (like
the special C<$a> and C<$b> in C rather than in C<$_[0]> ? It
just seems we might want to inherit the surrounding @_ in these cases.
--
David Nicol 816.235.
David Corbin wrote:
>
> Ariel Scolnicov wrote:
> >
> >
> > So how do I make C into an array in the first place? Well, I say
> > something like C. But wait -- that's ambiguous! Is
> > C now a copy of the list (1,2,3) (in which case it's an array),
. Very
unambiguous.
>
> --
> Ariel Scolnicov|"GCAAGAATTGAACTGTAG"| [EMAIL PROTECTED]
> Compugen Ltd. |Tel: +972-2-6795059 (Jerusalem) \ We recycle all our Hz
> 72 Pinhas Rosen St.|Tel: +972-3-7658514 (Main office)`-
> Tel-Aviv 69512,
s/PSEUDO\S?HASH/STRUCT/g
o worry about the scope of $1 etc.
imagine its strength along with defined record structures and a Pascal-like C
--
David Nicol 816.235.1187 [EMAIL PROTECTED]
Useless use of a void in constant context
rn features off, particularly within evals.
--
David Nicol 816.235.1187 [EMAIL PROTECTED]
Useless use of a void in constant context
Bart Lateur wrote:
>
> To me, a program is much like a maze, a
> multilevel walk in an old castle.
And if you commit a faux pas of some kind, the guards show
up and "throw" you off the north tower.
--
David Nicol 816.235.11
t; filehandle is which depends on what select() was called on" is bad. So,
> setting stuff like autoflush will probably be object methods only.
> Setting stuff like the default for print will probably still be via the
> default filehandle.
>
> -Nate
--
David Nicol 816.235.1187 [EMAIL PROTECTED]
Useless use of a void in constant context
x27;s "original" state
(as long as the array's name is more than one letter, of course,
for backwards compat.)
--
David Nicol 816.235.1187 [EMAIL PROTECTED]
Undefined use of void in constant context
If "catch" can be defined DURING PARSING
and SYNTAX ERRORS are catchable
error handling can be used to define otherwise
undefined syntax, becoming a macro language.
This would be similar to the RFC18 immediate subroutines,
as it would be another way to change the language of the
remainder o
e fact, and I think you would do better to come
up with a different title.
I noticed that the examples you cited in a later example about
"cluttered" code all seemed to include references. May I suggest that
perhaps you would be happy if there were just a cleaner syntax for
dealing with references?
J. David
901 - 1000 of 1041 matches
Mail list logo