Drat, thought I was sending this to the list:
Begin forwarded message:
On Nov 17, 2005, at 8:31 PM, Ilmari Vacklin wrote:
Hi all,
I think that grep should be renamed to something English and more,
well,
semantic. 'Filter' comes to mind as a suggestion. I realise there's a
lot of cultural
On Oct 15, 2005, at 7:39 AM, Rutger Vos wrote:
Good idea. A fat new O'reilly tome will go some way to capturing
mind share
for perl6. Gathering ideas wiki-style is also very Web2.0. Perhaps
perl6
could be marketed as such, what with the development style -
"Perl6, the
first Web2.0 program
On Oct 13, 2005, at 6:45 PM, Dave Whipp wrote:
I started thinking about the "in general, unverifiable
programmatically" bit. While obviously true, perhaps we can get
closer than just leaving them as comments. It should be possible to
associate a unit-test-generator with the theory, so I ca
On Oct 5, 2005, at 7:49 PM, Damian Conway wrote:
Providing a :fillin() adverb on C is a suboptimal solution,
because it implies that you would always want to fill in *any* gap
with the same value. While that's likely in a two-way zip, it seems
much less likely in a multiway zip.
I actual
From: Luke Palmer <[EMAIL PROTECTED]>
Date: October 5, 2005 1:48:54 AM EDT
To: David Storrs <[EMAIL PROTECTED]>
Subject: Re: zip: stop when and where?
Reply-To: Luke Palmer <[EMAIL PROTECTED]>
On 10/4/05, David Storrs <[EMAIL PROTECTED]> wrote:
How about:
@foo = (&
Both Luke and I missed the fact that my mail and his response went
only to each other so, with his permission, here it is as a forward.
--Dks
Begin forwarded message:
From: Luke Palmer <[EMAIL PROTECTED]>
Date: October 5, 2005 1:48:54 AM EDT
To: David Storrs <[EMAIL PROTECTED]>
So, I was thinking about how $Larry's original plan for doing the
Perl6 design was something along the lines of "write a series of
Apocalypses, one for each chapter of the Camel book". I know that
the latest version of the Apocalypses are in SVN, but I checked
dev.perl.org just to see what
On Sep 26, 2005, at 4:19 PM, Juerd wrote:
Perl 5's $& is inefficient because of this. If the variable is used
anywhere, Perl will for every regex used capture everything.
My understanding is that this died with 5.10. Is that right?
--Dks
On Sep 22, 2005, at 3:08 AM, Luke Palmer wrote:
On 9/22/05, Carl Mäsak <[EMAIL PROTECTED]> wrote:
FWIW, to me it looks fairly intuitive. undef here means "don't alias
the element, just throw it away"... gaal joked about using _ instead
of undef. :)
Joked? Every other language that has pat
On Aug 28, 2005, at 5:52 AM, Yuval Kogman wrote:
oops... Can I forward our correspondence to the mailing list?
Sure. I was wondering why you took it private. :>
--Dks
On Aug 28, 2005, at 5:52 AM, Yuval Kogman wrote:
On Sun, Aug 28, 2005 at 05:18:42 -0400, David Storrs wrote:
On Aug 28, 2005, at 5:12 AM, Yuval Kogman wrote:
On Sun, Aug 28, 2005 at 05:02:25 -0400, David Storrs wrote:
nested_call.wrap(), maybe?
It's not 100% the same thing... Wrappi
On Aug 25, 2005, at 7:16 AM, David Formosa (aka ? the Platypus) wrote:
On Wed, 24 Aug 2005 16:13:03 +0300, Yuval Kogman
<[EMAIL PROTECTED]> wrote:
[...]
perl6 creates a new instance of the perl compiler (presumably an
object). The compiler will only compile the actual file 'foo.pl',
and d
On Jul 27, 2005, at 6:18 PM, Uri Guttman wrote:
this thingy should encompass
all about this perl and the world it is in and the shell env is
part of
that.
How about *?PERL ?
if ( *?PERL.COMPILED_OS eq 'Unix') {...}
if ( *?PERL.CURRENT_OS eq 'Unix') {...}
*?PERL.Grammars{Regex} = $my_b
(Taking things slightly out of order.)
On Jul 13, 2005, at 7:32 PM, Larry Wall wrote:
A class is
restricted to having to provide a working interface to real objects.
Can't there be pure-abstract, non-instantiable classes? Or are you
still considering those to be interfaces to "real objec
On Jul 13, 2005, at 6:16 PM, chromatic wrote:
On Wed, 2005-07-13 at 17:33 -0400, David Storrs wrote:
What is a type besides a named blob of methods
and, possibly, data?
A label that says how the data is stored internally. For example,
compare "Int" and "int". The
On Jul 13, 2005, at 4:35 PM, chromatic wrote:
On Wed, 2005-07-13 at 16:07 -0400, David Storrs wrote:
My understanding is that a Role is an abstract (i.e. cannot be
instantiated) blob of methods and, possibly, data. The purpose of a
Role is to paste it into a class--in other words, a Role
On Jul 13, 2005, at 1:12 PM, Larry Wall wrote:
If class Dog does role Bark and also does role Wag, then passing a
Dog to
multi (Bark $x)
multi (Wag $x)
should result in ambiguity.
My understanding is that a Role is an abstract (i.e. cannot be
instantiated) blob of methods and, pos
First off, it seems like there are at least 3 topics being discussed
under the "Re: Hackathon notes" subject line. Could we break them
out into separate threads so that our poor summarizer doesn't go
bonkers?
On Jul 8, 2005, at 4:25 PM, Dave Whipp wrote:
Rod Adams wrote:
multi m
On Jun 18, 2005, at 9:24 PM, Damian Conway wrote:
chromatic wrote:
I find it ugly enough that I plan to name my invocants explicitly.
...which should be construed as a *feature* of the current syntax. ;-)
Damian
In that case, why do we have this feature?
Seriously. Are default invoc
On Jun 17, 2005, at 10:42 PM, John Siracusa wrote:
But the truth is that /
really does look file-path-y to me, and just plain old ugly. I
think at
least two other people had similar reactions (Martin Kuehl and Carl
Franks).
David Storrs, reporting to show solidarity, sir(acusa)!
Maybe
On Jun 15, 2005, at 3:33 PM, Patrick R. Michaud wrote:
And here they are... this is just a draft -- feel free to flame/edit/
tear it apart liberally. These are also written assuming we don't
create a perl6-general list (but it shouldn't be hard to adapt them
should one be created).
Well, I'd
On May 31, 2005, at 2:22 PM, Rob Kinyon wrote:
my ($launch_date = now() + 6 weeks) but time(9am);
Sure. $launch_date is of type DateTime. It will numify to the
seconds-since-the-epoch, stringify to some date string, and provide
all the neat-o-keen methods you want it to have.
Works for m
On May 31, 2005, at 1:16 PM, Rob Kinyon wrote:
What's wrong with porting DateTime?
It's back to the old question of "what's in core?" Are dates and
times something that are used in such a large proportion of programs
that they deserve to be shipped in the basic grammar? Or perhaps in
the b
On May 31, 2005, at 9:51 AM, Rob Kinyon wrote:
On 5/31/05, Nathan Gray <[EMAIL PROTECTED]> wrote:
As I am interested in human-readable dates and times, and having
found
no conclusive discussion on time formatting, I make my recommendation
for a syntax (to start discussion, and allow for dat
On May 19, 2005, at 10:56 PM, Luke Palmer wrote:
In general, you should probably be declaring your parameters
with uppercase types, [...]
Luke
If so, wouldn't it make sense that 'int' is the boxed type (one less
keystroke) and 'Int' is the special case? Optimize for the common
case, an
On May 12, 2005, at 11:59 AM, Autrijus Tang wrote:
On Thu, May 12, 2005 at 04:53:06PM +0200, "TSa (Thomas Sandlaï)"
wrote:
Autrijus Tang wrote:
pugs> split /(..)*/, 1234567890
('', '12', '34', '56', '78', '90')
Is this sane?
Why the empty string match at the start?
I don't know, I didn't in
On May 4, 2005, at 2:38 PM, Thomas Sandlaß wrote:
Aaron Sherman wrote:
If we agree that the first say should print 7, then we must conclude
that either we've changed the value of undef to 7, or we've created a
circular reference.
In my view of refs 7 is printed, indeed. But I've difficulty to
unde
On Mon, May 02, 2005 at 06:49:10PM +0200, Thomas Sandlaß wrote:
> David Storrs wrote:
> >Let's move this away from simple types like Str and Int for a moment.
>
> If you consider them simple...
When compared to
"arbitrary-class-that-was-defined-by-
On Sat, Apr 30, 2005 at 09:13:26AM -0500, Abhijit Mahabal wrote:
> On Fri, 29 Apr 2005, Brent 'Dax' Royal-Gordon wrote:
>
> >David Storrs <[EMAIL PROTECTED]> wrote:
> >>Could we see some code that shows why this is a good idea? My initial
> >>
On Thu, Apr 28, 2005 at 03:28:41PM +0200, Ingo Blechschmidt wrote:
> so we had junctions of Code references some days ago, what's with
> junctions of Class and Role objects? :)
Could we see some code that shows why this is a good idea? My initial
reaction is horror; I can very easily see huge n
On Mon, Apr 25, 2005 at 05:18:11AM -0600, Luke Palmer wrote:
> David Storrs writes:
> > sub foo {
> > my ($x,$y) = @_;
> > note("Entering frobnitz(). params: '$x', '$y'");
> > ...
> > }
> > This, of
I image we've all written logging code that looks something like this
(Perl5 syntax):
sub foo {
my ($x,$y) = @_;
note("Entering frobnitz(). params: '$x', '$y'");
...
}
This, of course, throws an 'uninitialized value in concatenation or
string' warning when your test suite
On Wed, Apr 13, 2005 at 03:50:38AM +0800, Autrijus Tang wrote:
> I am delighted to report that the first major milestone of Pugs, version
> 6.2.0, has been released to CPAN:
Autrijus and everyone else who has been working on Pugs,
As someone who has been following the Perl6 lists for years, I'd l
On Fri, Apr 08, 2005 at 05:03:11PM +0300, wolverian wrote:
Hi wolverian,
> one day a friend asked if Perl 5 had a REPL facility.
> (Read-Eval-Print-Loop). I told him it has perl -de0, which is different
> [...]
> In Perl 6, the generic solution to fix this (if one wants to fix it)
> seems, to me,
On Sat, Mar 26, 2005 at 10:13:54AM -0800, Larry Wall wrote:
> The thing is that these MAD props are hung on whatever node is handy
> at the time, [...]. That's the main reason for the first pass of
> translator, to reattach the madprops at a more appropriate place in
> the tree.
>
[...]
> But wit
On Thu, Mar 17, 2005 at 05:04:53PM -0500, Aaron Sherman wrote:
> On Thu, 2005-03-17 at 12:28, Brian Ingerson wrote:
>
> > The interesting thing to me is that all 3 syntaxes map over the same
> > data model and thus are easily interchangable.
>
> It is, however, contrary to the spirit of POD for
On Wed, Mar 16, 2005 at 01:30:04PM -0500, Aaron Sherman wrote:
> On Wed, 2005-03-16 at 12:25, David Storrs wrote:
>
> > I quite like <> as the bracketing characters. They are
> > visually distinctive, they connect well with their adjacent C/X/L/etc
> > without visua
On Wed, Mar 16, 2005 at 12:00:28PM -0500, Aaron Sherman wrote:
>
> The one obvious thing to POD users is the replacement of <> with [] or
> {}. Why is this? Because < and > are used in un-balanced ways in a large
> number of situations, so they should not be the primary bracketing
> constructs.
On Tue, Mar 15, 2005 at 08:23:19AM -0800, Larry Wall wrote:
> On Tue, Mar 15, 2005 at 10:51:57AM +0100, Juerd wrote:
> : Autrijus suggested "indeed" or "id", of which I like "indeed" better,
> : because I'd like to continue using "id" with databases.
>
> "id" is too heavily overloaded with identif
On Sat, Mar 12, 2005 at 09:36:24PM +0100, Juerd wrote:
> Larry Wall skribis 2005-03-12 12:26 (-0800):
> > And arguably, the current structure of join is that the delimiter is
> > the invocant, so cat should be defined as
> > ''.join(@foo)
>
> This is what Python does. It does not make any sen
On Thu, Mar 10, 2005 at 02:22:20PM -0600, Rod Adams wrote:
> David Storrs wrote:
> >On Wed, Mar 09, 2005 at 03:38:52PM -0600, Rod Adams wrote:
> >> use Foo; # from above, exports &bar is MMD::Random
> >> multi sub bar {...}
> >>
> >>Does th
> At 17:53 +0100 3/10/05, Thomas Sandlaß wrote:
[request for clarification of 'covariant' and 'contravariant' usage]
> >'Co' means together like in coproduction. And 'contra' is the opposite
> >as in counterproductive. With instanciating parametric types the question
> >arises how a subtype relatio
On Wed, Mar 09, 2005 at 03:38:52PM -0600, Rod Adams wrote:
> There lingers the case of:
>
>use Foo; # from above, exports &bar is MMD::Random
>
>multi sub bar {...}
>
> Does this generate an error, since one could expect this particular &bar
> to be Manhattan? Or does it assume Rando
On Tue, Mar 08, 2005 at 10:29:30PM -0800, Darren Duncan wrote:
> [...]
>
> By using subtypes in this way, I could remove a lot of explicit input
> checking code from my methods, which is great. Also, the "where
> clause" is not being repeated for every argument or attribute or
> variable decla
Is there a way to find the name of &?SUB ? It would be useful for
error-logging and -reporting.
--Dks
On Mon, Mar 07, 2005 at 07:50:47PM -0800, Larry Wall wrote:
> On Mon, Mar 07, 2005 at 05:37:53PM -0800, David Storrs wrote:
> : On Mon, Mar 07, 2005 at 04:58:29PM -0800, Larry Wall wrote:
> : Is
> : there is then any way to explicitly leave off an element. Can I do
> : this:
>
On Mon, Mar 07, 2005 at 05:15:14PM -0800, Larry Wall wrote:
> On Mon, Mar 07, 2005 at 02:20:47PM -0800, David Storrs wrote:
> : Yes, I know. That's what I meant by "...arrays are objects...(sort
>
> No, they're real objects. (Though it's .elems rather than .lengt
On Mon, Mar 07, 2005 at 04:58:29PM -0800, Larry Wall wrote:
>
> In fact, we really haven't specified what happens when you say
>
> my Int @a is shape(3) := [1,2];
> my Int @b is shape(3) := [1,2,3,4];
>
[...]
> But I also have this nagging feeling that the user wouldn't have
> specified
On Mon, Mar 07, 2005 at 05:36:08PM +0100, Aldo Calpini wrote:
> David Storrs wrote:
> >Urk. I, for one, will definitely find this surprising. I would have
> >expected:
> >
> > x = ; $y = 1; z = 2 3
>
> to obtain what you have expected, you need to explicitl
On Mon, Mar 07, 2005 at 03:43:19PM +0100, Aldo Calpini wrote:
> don't know if it helps, but I guess that you can also write it like
> this, if you prefer:
>
> sub greeting(Str $person) {
> returns Str;
> is export;
> "Hello, $person";
> }
>
> (this guess is based
On Sun, Mar 06, 2005 at 04:57:38PM +0100, Leopold Toetsch wrote:
> On behalf of the Parrot team I'm proud to announce the release of
> Parrot 0.1.2.
First: Congratulations to everyone for this release!
Second: What will it take before Parrot moves to a 0.2 (0.3, 0.4...)
release?
--Dks
On Sun, Mar 06, 2005 at 11:58:43PM -0800, Larry Wall wrote:
> On Sun, Mar 06, 2005 at 02:13:09AM -0700, Luke Palmer wrote:
> : What is output:
> :
> : sub foo($x, ?$y, [EMAIL PROTECTED]) {
> : say "x = $x; y = $y; z = @z[]";
> : }
> :
> : my @a = (1,2,3);
> : foo($x, @a);
On Thu, Mar 03, 2005 at 04:09:26PM -0800, Larry Wall wrote:
> On Thu, Mar 03, 2005 at 12:36:00PM -0800, Brian Ingerson wrote:
>
> : Thanks for the mind expanding reply.
>
> You're welcome. Next time don't eat blue sugar cubes from my frig. :-)
"I know what you're thinking. 'Why, oh why, didn'
On Mon, Feb 21, 2005 at 11:01:45AM -0800, Larry Wall wrote:
>
> But rather than that, I suspect we'll see more use of constructs
> where the object to be mutated ends up being the topic, as in:
>
> some_complicated_lvalue() but= { .sortmyway(foo($_),bar($_)) }
>
> which would presumably do t
On Tue, Feb 15, 2005 at 11:06:51AM -0800, Larry Wall wrote:
>
> But what y'all are talking about above is the other end--the return
> type. And maybe we need to enforce a newbie-friendly invariant on that
> end as well. I suppose we could default to not accepting junctional
> return values by de
On Mon, Feb 14, 2005 at 10:43:21AM +1100, Damian Conway wrote:
> David Storrs OOC'd:
>
> >OOC, will there be a way to control where C gets its randomness
> >from? (e.g. perl's builtin PRNG, /dev/random, egd, etc)
>
> Sure:
>
> # Use RBR (Really Bad R
On Sat, Feb 12, 2005 at 06:39:01PM +1100, Damian Conway wrote:
> pick - select at random from a list, array, or hash
OOC, will there be a way to control where C gets its randomness
from? (e.g. perl's builtin PRNG, /dev/random, egd, etc)
--Dks
--
[EMAIL PROTECTED]
On Fri, Feb 11, 2005 at 05:33:29PM -0800, Ashley Winters wrote:
> On Thu, 10 Feb 2005 08:59:04 -0800, David Storrs <[EMAIL PROTECTED]> wrote:
> > On Wed, Feb 09, 2005 at 05:13:56AM -0600, Rod Adams wrote:
> > >
> > > ($k, $v) <== pop %hash;
> > > mak
On Thu, Feb 10, 2005 at 09:45:59AM -0800, Larry Wall wrote:
> That's spelled
>
> loop {
> $foo = readline;
> ...do stuff with $foo...
> } while ( $foo );
>
> these days.
>
> Larry
Cool, perfect. Thanks.
--Dks
--
[EMAIL PROTECTED]
On Wed, Feb 09, 2005 at 05:13:56AM -0600, Rod Adams wrote:
>
> Does
>
> ($k, $v) <== pop %hash;
> or
> ($k, $v) <== %hash.pop;
>
> make sense to anyone except me?
It's clear to me.
The only thing is that, right off the top of my head, I can't see
where it would be used. Since the order in whi
Given that Perl 6 won't support an actual do-while loop a la C++ (and
yes, I know that Perl5 didn't either), how would you accomplish that?
That is, I'd like to have a loop that runs once, then checks its
condition to see if it should repeat and continues to repeat as long
as the condition is true.
On Fri, Jan 14, 2005 at 02:46:58PM -0500, Austin Hastings wrote:
> >rules, I can easily have it either way.
> >
> > {for (my $n=0; $n<10; ++$n) {...}} # Local to loop
> > for (my $n=0; $n<10; ++$n) {...}# Persistent
> >
> >--Dks
> >
> But there's no clean way to make some of them
On Thu, Jan 13, 2005 at 07:35:19PM -0500, Joe Gottman wrote:
>In Perl5, given code like
>
> for (my $n = 0; $n < 10; ++$n) {.}
>
> the control variable $n will be local to the for loop. In the equivalent
> Perl6 code
>loop my $n = 0; $n < 10; ++$n {.}
>
> $n will not be local to th
On Sat, Jan 08, 2005 at 11:37:06AM -0700, Craig DeForest wrote:
> @a[4; 0..5];
> a 1x6 array (probably correct)? Or a 6 array (probably not
> correct)?
For the ignorant among us (such as myself), what is a 6 array? Google
and pdl.perl.org did not yield any immediate answers.
--Dks
--
On Sat, Jan 08, 2005 at 12:48:32PM -0800, Ashley Winters wrote:
>
> sub canon( $subjet, $complement)
> -> $s = $subjet{$*Global}, $c = $complement
> {
> my @foo = ...;
> for @foo -> $bar; $remaining = @foo.elems {
> # $bar contains an element, $remaining contains the number of
On Dec 15, 2004, at 6:11 PM, Abhijit Mahabal wrote:
David Storrs wrote:
On Dec 15, 2004, at 5:36 PM, Abhijit Mahabal wrote:
I think that "slackness-on-demand" is a better policy than
"strictness-on-demand", but that, again, is just my opinion
Until now, the policy in
On Dec 15, 2004, at 5:36 PM, Abhijit Mahabal wrote:
I think that "slackness-on-demand" is a better policy than
"strictness-on-demand", but that, again, is just my opinion
Until now, the policy in Perl has always been that it is as slack and
forgiving as possible, and you have to ask if you w
On Dec 10, 2004, at 11:05 AM, Abhijit Mahabal wrote:
Consider a class (e.g., the hypothetical Geometry::Triangle) that can
have several attributes (side1, side2, side3, angle1, ang_bisector1,
side_bisector, altitude1 and so forth), most of which will not be
needed for most instances of Geometry
On Fri, Sep 03, 2004 at 08:09:23AM -0400, Joe Gottman wrote:
>
>
> > -Original Message-
> > From: Larry Wall [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, September 02, 2004 8:41 PM
> > To: Perl6
> > Subject: Re: Reverse .. operator
> >
> > On Thu, Sep 02, 2004 at 08:34:22PM -0400, Joe G
There has been a lot of discussion in the other threads lately about
iterators. I was wondering if there will be an easy way to create a
bidirectional iterator? Toy example to show what I'm thinking:
for(1..10) {
next if /7/; # always skip 7
prev if 9 && !rand 3; # occasionally
On Tue, Aug 10, 2004 at 11:07:59AM -0700, Larry Wall wrote:
>
> 2) In the absence of evidence to the contrary, methods always
> assume they have *no* arguments. For methods:
>
> 2a) A method not followed by a left paren or colon has no
> arguments.
Just checking--whitespace
On Fri, Aug 13, 2004 at 10:53:02AM +0100, Nicholas Clark wrote:
> On Wed, Aug 11, 2004 at 03:25:20PM -0700, David Storrs wrote:
> > On Sat, Aug 07, 2004 at 03:55:21PM +0100, Nicholas Clark wrote:
>
> > > However, Acme::Intraweb hasn't been updated for a while, whereas
On Sat, Aug 07, 2004 at 03:55:21PM +0100, Nicholas Clark wrote:
> On Sat, Jul 24, 2004 at 02:50:18PM -0700, David Storrs wrote:
> > #!/usr/bin/perl6
>
> #!/usr/bin/perl
I stated perl6 explicitly to be, well, explicit.
> > #use warnings; # Note that I am NOT explicitly
On Sat, Jul 24, 2004 at 02:23:10PM -0700, Brent 'Dax' Royal-Gordon wrote:
> Jonadab the Unsightly One wrote:
>
> >Oh, and here's me resisting the urge to suggest that use ought to
> >automatically install from the CPAN anything that isn't present, as a
> >core behavior right out of the box.
>
> S
On Wed, Jul 21, 2004 at 04:37:29PM -0700, Larry Wall wrote:
> No Yes
> -- ---
> @foo@foo[1]
> %bar%bar{"a"} or %bar«a»
> $foo.bar$foo.bar()
> &foo &foo(1)
>
> In this worldview, $foo is an exception only because it doesn't natural
On Mon, Jul 19, 2004 at 03:37:12PM -0500, Rod Adams wrote:
> I think part of the "mental jam" (at least with me), is that the
> read/write, exclusive, etc, are very critical to the act of opening the
> file, not only an after the fact restriction on what I can do later. If
> I cannot open a fil
On Sun, Jul 18, 2004 at 08:39:09PM -0500, Rod Adams wrote:
> Case 1:
> So I wanted to do a read/write scan, so I create my TextFile, start
> reading in data, so the file is opened for reading. Then, I come to the
> part where I want to update something, so I do a write command. Suddenly
> the f
On Sun, Jul 18, 2004 at 05:36:58PM -0700, Dave Whipp wrote:
> truncate Vs append would be infered from usage (assign => truncate). One
> might be able to infer read Vs write in a similar way -- open the file based
> on the first access; re-open it (behind the scenes) if we write it after
> reading
On Sat, Jul 17, 2004 at 06:23:50PM -0400, Austin Hastings wrote:
> > On Saturday, 17 July, 2004 01:53 Sat, Jul 17, 2004, Juerd wrote:
> >
> > Do we have a :) operator yet?
>
> It's an adverbial modifier on the core expression type. Does
> nothing, but it acts as a line terminator when nothing but
On Wed, Jul 14, 2004 at 07:40:33AM +0200, Ph. Marek wrote:
>
> To repeat Dave and myself - if
> @x = 1 .. Inf;
> then
> rand(@x)
> should be Inf, and so
> print $x[rand(@x)];
> should give Inf, as the infinite element of @x is Inf.
Does it even make sense to take the Infiniteth
On Tue, Jul 06, 2004 at 06:39:07PM -0600, Luke Palmer wrote:
> Matija Papec writes:
> >
> > Would there be a way to still use simple unquoted hash keys like in old
> > days ($hash{MYKEY})?
>
> Of course there's a way to do it. This is one of those decisions that I
> was against for the longest
On Sat, Jul 03, 2004 at 01:02:34AM -0600, Luke Palmer wrote:
> But indeed there are cases where it is a problem:
>
> my $x = 2;
> sub mklist () {
> return map { 2 * $_ } 0..10;
> }
>
> my @list = mklist;
> say @list[0..4]; # 0 2 4 6 8
> $x = 1;
> say @list;
On Thu, Jul 01, 2004 at 04:14:37PM -0700, Jonathan Lang wrote:
> Juerd wrote:
>
> If you're really enamoured with the infix operator syntax, consider this
> possibility:
>
> sub infix:-> ($before, $after) {
> $before; # is this line redundant?
> return $after;
> }
> print $
On Tue, Jun 29, 2004 at 05:31:29PM -0600, Luke Palmer wrote:
> Oh no! Someone doesn't understand continuations! How could this
> happen?! :-)
>
> You need two things to bring the state of the process back to an earlier
> state: undo and continuations. People say continuations are like time
>
On Sun, Jun 27, 2004 at 03:16:11PM -0600, Luke Palmer wrote:
>
> But anyway, if you still want to be old school about it, then you'll end
> up not caring about the scope of your $i. Really you won't. And you'll
> be happy that it was kept around for you once you decide you want to
> know the val
On Thu, Jun 24, 2004 at 12:43:30PM -0700, Scott Bronson wrote:
>
> So, in summary, though "0"==false appears to work, it leads to a number
> of strange boundary conditions and, therefore, bugs. It's hard for new
> programmers to grasp and even old hacks are still sometimes tripped up
> by it. It
On Sun, Jun 13, 2004 at 03:40:27AM +0200, Pedro Larroy wrote:
> What advantages have to use characters not in standard keyboards? Isn't
> it a little scary?
Well, what do you consider a 'standard' keyboard? The zip
operator/Yen sign probably appears on most keyboards in Japan, but on
very few i
On Tue, Jun 08, 2004 at 01:08:13PM -, Ingo Blechschmidt wrote:
> Hello,
>
> quoting Apocalypse 6:
> > You may ask a subroutine to wrap itself up in another subroutine in
> > place, so that calls to the original are intercepted and interpreted by
> > the wrapper, even if access is only through
On Fri, Apr 16, 2004 at 05:30:01PM -0700, chromatic wrote:
> Perl.com has just made A12 available:
>
> http://www.perl.com/pub/a/2004/04/16/a12.html
>
> Warning -- 20 pages, the first of which is a table of contents.
>
> Enjoy,
> -- c
It's here, it's here, it's he!!
*
Folks, this discussion seems to be spinning. All the points, on both
sides, have been made and are being repeated with only slight
variation. We've all made our cases--why don't we drop the issue for
a while and let Larry ruminate? I think we can all agree that he will
give the idea a fair heari
On Thu, Apr 15, 2004 at 11:45:27AM +0200, Juerd wrote:
> David Storrs skribis 2004-04-14 22:39 (-0700):
> > Very top row, one space right of the F12 key. Extremely awkward.
> > (This is a US keyboard on a Dell Inspiron 5100 laptop.)
>
> That is inconvenient.
Yup.
> >
On Wed, Apr 14, 2004 at 10:06:23PM +0200, Juerd wrote:
>
> If on your keyboard ` is in a worse place than {}, I'd like to know
> where it is.
>
> Juerd
Very top row, one space right of the F12 key. Extremely awkward.
(This is a US keyboard on a Dell Inspiron 5100 laptop.)
Please put me down a
On Wed, Jan 14, 2004 at 11:57:05AM +, Richard Nuttall wrote:
> How about
>
> $test = sub
> {
> if ( some_expensive_lookup_function() >= $MAX_RECORDS )
>
> mark_that_we_have_reached_max_records();
>
>$test = sub{};
> };
>
> Then call &$test() as needed;
Neat.
On Wed, Jan 14, 2004 at 10:59:52AM -0500, Melvin Smith wrote:
> I think Perl6 will allow a hint like so:
>
> my int $max_reached;
>
> The important thing is that $max_reached is used simply as a conditional,
> and you don't pass it to a routine or otherwise use it in a way to cause it
> to be p
On Tue, Jan 13, 2004 at 10:16:48PM -0700, Luke Palmer wrote:
> sub mark_that_we_have_reached_max_records() {
> $max_reached = 1;
> }
>
> if !$max_reached && some_expensive_lookup_function() > $MAX_RECORDS {
> mark_that_we_have_reached_max_records();
> return;
>
Given this code:
if ( some_expensive_lookup_function() >= $MAX_RECORDS ) {
mark_that_we_have_reached_max_records();
return;
}
After I enter that block once, I never want to evaluate the condition
again--I want the code to completely disappear from the bytecode (
On Sat, Dec 13, 2003 at 11:12:31AM -0800, Larry Wall wrote:
> On Sat, Dec 13, 2003 at 04:57:17AM -0700, Luke Palmer wrote:
> : For one, one role's methods don't silently override another's. Instead,
> : you get, er, role conflict and you have to disambiguate yourself.
How do you disambiguate?
On Fri, Oct 24, 2003 at 12:57:18AM -0600, Luke Palmer wrote:
> Presuming you can do:
>
> (who => $name, why => $reason) := (why => $because, who => "me");
>
> (from A6)
>
> Does that imply that you can do:
>
> sub routine (name => $nombre, date => $fecha) {...}
>
> Anyway, I just reali
On Mon, Sep 15, 2003 at 11:49:52AM -0400, Gordon Henriksen wrote:
> Austin Hastings wrote:
>
> > Given that threads are present, and given the continuation based
> > nature of the interpreter, I assume that code blocks can be closured.
> > So why not allocate JITed methods on the heap and manage t
On Mon, Jul 21, 2003 at 12:19:11PM -0700, Austin Hastings wrote:
> Likewise:
>
> my $fh = open "
> $fh =~ / = Grammars::Languages::Runoff::tbl(input_method
>= Grammars::Language::Runoff::eqn(input_method
> = IO::Gunzip)))>/;
Very cool.
Assuming this ran succe
1 - 100 of 142 matches
Mail list logo