On Sun, Feb 03, 2013 at 10:35:12AM +, Nicholas Clark wrote:
> On Sat, Feb 02, 2013 at 06:32:10PM -0800, Matthew Wilson wrote:
> > Did you mean to use $z in the say output of the nqp and perl versions of
> > the microbenchmark, or did you mean to run it twice?
>
> I
29;
my $t0 = time;
my $z = fib($N);
my $t1 = time;
print "fib($N) = $z\n";
print "time= " . ($t1-$t0) . "\n";
$ ~/Sandpit/5162/bin/perl5.16.2 ~/test/fib.pl
fib(29) = 514229
time= 0.5503830909729
Nicholas Clark
e= 0.544455051422119
So the NQP JVM prototype is about 1.5 faster at running that code than Perl
5. That's without any sort of tuning of its code generator.
That's quite impressive.
Well done Jonathan. Please don't stop :-)
Nicholas Clark
normal assignment explained?"
Specifically, the part that would explain that you can put C or C
or similar within the list on the left of the C<=>.
"normal assignment" seems to be term favoured by other parts of the synopses
to describe what they are *not*. But doesn't seem to be easy to find in
itself - ie what it *is* :-)
Nicholas Clark
t they intentionally *are* different,
and I think I can see why it makes sense, but I can't find it written down)
Nicholas Clark
On Mon, May 28, 2012 at 01:54:53PM -0500, B. Estrade wrote:
> On Mon, May 28, 2012 at 03:38:48PM +0800, Xiao Yafeng wrote:
> > On Sat, May 26, 2012 at 6:34 PM, Nicholas Clark wrote:
> >
> > > On Fri, May 25, 2012 at 08:44:30AM -0500, B. Estrade wrote:
> > >
>
x27;perl' interpreter (aka
> Perl 5), can clearly state as a goal something like, "progress towards
> the OpenPerl standard while maintaining strict backward compatibility
> with ." All of a sudden you have a Perl "family"
Realistically, that's not going t
o you might as well skip writing any data. Even for reading,
failing to check close means you can't be sure if your input was truncated
due to an error.
Nicholas Clark
art)
* accessor methods for internal storage with methods which return proxy
objects which are read-only
ie there's no need to internally actually make defensive copies, or have
some complex flag-checking system. It should be possible* to implement it
in a small, incremental "obviously n
r signal to noise is pretty damn low - presumably anyone who
actually wants this lack of detail can subscribe to
http://github.com/perl6/specs/commits/master.atom
Nicholas Clark
gt; existing functionality.
That was a really good talk. I hope that it has been videoed, and will be
online soon.
Nicholas Clark
<|> and(other->8) vK/1 ->c
a <0> iter s/REVERSED ->b
- <@> lineseq vK ->-
8 <0> stub v ->9
9 <0> unstack v ->a
-e syntax OK
If it's part of the specification that (1..1e10).reverse is to be implemented
lazily, I'd (personally) consider that an easy enough way to construct a lazy
range.
This doesn't answer any of your other questions about what ranges of
character strings should mean. I don't really have an opinion, other than
it needs to be simple enough to be teachable.
Nicholas Clark
o the
Parrot core. And if you gain your fun by working on the Parrot core, you
actually stop being a Parrot user, and hence experiencing what they
experience.
Nicholas Clark
the index will be the C of that value.
> +(It is still illegal to use a numeric index less that 0.) One could
than
?
What's the URL for the svn repository for this?
Nicholas Clark
have daylight saving time?
Nicholas Clark
matches, and never falls between two generated values.
> +Examples:
> +But note that both of these are infinite lists:
> +
> +1,1/2,1/4 ... 0 # 1,1/2,1/4 ... *
> +1,-1/2,1/4 ... 0 # same as 1,-1/2,1/4 ... *
Should that read
# same as 1,1/2,1/4 ... *
?
Nicholas Clark
entire construction, and
compiling it down to something efficient.
For example, how
@a = sort @a;
foreach (reverse @a) { ... }
... reverse sort { ... } ...
if (%hash) { ... }
now work in Perl 5, by being optimised to a more efficient execution sequence.
Nicholas Clark
ssing something subtle here, or a later correction, but why are
the last lines 1000, not 900?
Nicholas Clark
On Sat, Aug 22, 2009 at 10:27:58PM +0100, Nicholas Clark wrote:
> Perl 5's hash tables consist of an array of linked lists. The list elements
> consist of a pointer to the next element, pointer to the value stored, and
> pointer to a structure, usually shared, containing the key (
> On Sat, Aug 22, 2009 at 4:04 PM, Nicholas Clark wrote:
>
> > On Sat, Aug 22, 2009 at 04:01:13PM -0500, Forrest Sheng Bao wrote:
> > > Does anyone know the time complexity of searching elements in hash tables
> > in
> > > Perl? Suppose the number of elements
you can tell me how it works, that is also helpful. I can analyze
> the algorithm myself.
You're asking the question on the Perl 6 language list, but it's unclear
whether you're asking about hashes in Perl 6, or in Perl 5. It's not
possible to answer until you clarify that.
Nicholas Clark
n if
you can't render their names.
[Consider a security critical program scanning using glob('*'), which gives
a clean bill of health because it opened "all" files and found no problems.]
I don't know how Python 3 resolved this.
Nicholas Clark
On Tue, Aug 18, 2009 at 10:36:45AM +0200, Jan Ingvoldstad wrote:
> On Tue, Aug 18, 2009 at 10:01 AM, Nicholas Clark wrote:
> > On Tue, Aug 18, 2009 at 09:24:08AM +0200, pugs-comm...@feather.perl6.nl
> > wrote:
> >
> >> +=head3 Default constraints
> >> +
&
* distinct operations, so it's important
to know if the right-most argument is a file or a directory)
Nicholas Clark
sappear in future versions of Perl. You should
instead use a simple test for size:
I don't know whether the Perl 6 apocalypses explicitly specify behaviour for
defined, or if they inherit this Perl 5 behaviour by default.
Nicholas Clark
ferent circumstances.
> +In a variable declaration, C<:A> is assumed, whereas in a formal
> +parameter that is not an invocant, C<:D> is assumed.
> +
Nicholas Clark
by third parties to completely externalise their file
distribution costs)
Mmm, I realise that this also means that I've had a JPEG file on CPAN for
4 years now, and no-one has commented :-)
Nicholas Clark
Strongly.
CPAN is the Comprehensive Perl Archive Network.
Not the Comprehensive Perl 5 Archive Network.
ftp://ftp.cpan.org/pub/CPAN/src/unsupported/4.036/
Nicholas Clark
quently? At least several times
a day?
"whack, whack, whack" is the sound of Chili wagging her tail, if a wall
happens to get to close. "The black alarm clock" sometimes can go off before
6am, if she determines that it's already time for breakfast (or exercise).
Chili: http://chili.pavlovic.at/2007_09/medium/DSC00035_medium.html
Nicholas Clark
On Sat, Jan 24, 2009 at 10:58:51AM -0800, chromatic wrote:
> On Saturday 24 January 2009 05:56:03 Nicholas Clark wrote:
>
> > And if left alone I can ramble that much, is anyone surprised
> > that chromatic can't manage to minute several people discussing it?
>
> Am
.chop, though. I think only once have I ever seen
> it used appropriately. All other times the user wanted .chomp.
I've used it intentionally, but only because it's less typing than
s/.\z//m; (or whatever the canonically correct Perl 5 equivalent is)
The Perl 6 version is 1 character terser?
Nicholas Clark
anguage, because the trade off
is that everyone has to remember them, the language becomes fractionally
harder to learn, and fractionally harder to understand.
And no I didn't answer the question. I don't think that the discussion on the
call did either. And if left alone I can ramb
t
were used to compute the value, and defer calculation for as long as
possible. (And possibly as a sop to efficiency, cache the floating point
outcome of evaluating the thunk if it gets called)
Nicholas Clark
MO=Deparse -e 'print if not $^X =~ /perl/'
print $_ if not $^X =~ /perl/;
-e syntax OK
Nicholas Clark
because unlike
Perl 5, they're not going to be implemented as subroutines. So that's
another "obvious" thing that actually isn't going to matter here.
Nicholas Clark
ch like overloading a class in Perl 5 (or any other
language) such that (++$a) and ($a + 1) are not the same.
Nicholas Clark
d its
modifications.
Is there any way to pre-declare that I want to defer baking the role from a
class? (Which I guess would make it an error to reference that role at run
time in any way, until I'd issued a second declaration that I was done, and
baking season is open)
Nicholas Clark
Not being familiar with the big picture design* of Perl 6, I'm not able to
answer this. I assume that there is a clear reason, but what is it?
Nicholas Clark
* Heck, I'm also not familiar with the little bits either.
- Forwarded message from Ed Avis <[EMAIL PROTECTED]> --
s that mean that [{1 + 1}] and [; {1 + 1}] differ?
And [; {1 + 1}] and [{1 + 1}; ] are identical?
Nicholas Clark
use of
(generic) scalar context:
%x{$ f()} = g(); # scalar context for f(), list context for g()
Nicholas Clark
ed, it now is true)
Nicholas Clark
to avoid the problem that Perl 5 finds itself in, where things
once added to the core can never be removed, and 15 years later you find
that there are several generations of "this is current" modules in the
distribution that are a maintenance burden. Usually a burden that falls on
volunteers.
Nicholas Clark
On Sat, Sep 08, 2007 at 01:48:39PM +0100, Nicholas Clark wrote:
> Have I got this correct?
>
> state @a = foo(); # Implicit START block around call and initialisation
> state (@a) = foo(); # Implicit START block around call and
> initialisation
> (state @a) =
I infer that now binding, rather than assignment, is the default (if not
the only way) inside a rule. But text describing that alteration wasn't in
this change. When was it? I think I missed something.
Nicholas Clark
will
always be () in Perl 5)
Nicholas Clark
ken.
I suspect my brain will think of rules like regexps. (But I could be wrong,
and unlike quite a few people on this list, I've not written any yet, so my
opinion might be of little value)
Nicholas Clark
; that can be loaded by those who need them?
I think that we can learn from PHP here. :-)
Nicholas Clark
dn't think that it had been dropped for
Perl 6.
Nicholas Clark
March,
which suggest that the timing is going to be different this year.
Nicholas Clark
- Forwarded message from LH <[EMAIL PROTECTED]> -
From: "LH" <[EMAIL PROTECTED]>
To: "Summer-Admin-Announce-2006" <[EMAIL PROTECTED]>
Subject: GSoC 2007 is ON!!!
Date:
On Wed, Jan 31, 2007 at 01:01:13PM -0800, [EMAIL PROTECTED] wrote:
> +by C and the value matchis represented by C. (C,
"matchis" must be a typo :-)
Nicholas Clark
On Tue, Jan 30, 2007 at 09:23:33AM -0800, Larry Wall wrote:
> Since -0.0 is a possible Num representation, that last one probably works.
> But @array[-0] probably doesn't, since Int probably doesn't represent -0,
Well, it might just be using 1's complement :-)
Nicholas Clark
+infix:
> +
> +and
> +
> +Returns the left argument if the left argument is false, otherwise returns
> +the right argument. In list context forces a false return to mean C<()>.
> +See C<&&> above for high-precedence version.
As these are short circuiting, would it be better to say
"otherwise evaluates and returns the right argument"
(likewise for or and err)
Is it defined that $a + $b evaluates the arguments in any particular order?
Even guaranteeing that either the left or the right gets completely evaluated
first would be better than C :-)
Nicholas Clark
but tracking it down to that line...)
If I write 2/3 I'm thinking maths, not type theory, and "two thirds" is what
I expect.
Nicholas Clark
quality ~$_ eq $x
> +Any Str string equality ~$_ eq $x
Nicholas Clark
ef, $b) came in around 5.004ish,
but I can't find it in perldelta, and I don't have a version compiled to
test with (or any quick way to compile them, given that pretty much only
AIX is so stable that early perls compile unmodified. Probably someone will
tell me that VMS is also good enough, for 5.002 or later)
Nicholas Clark
ows you to unambiguously order any arbitrary set of
> complex numbers.
If I'm reading that correctly then there are values of $A and $B for which
$A > $B and $A < $B are simultaneously true. If so, that doesn't invalidate
your statement about ordering, but there will be different orders depending
on whether you order by < or >
Nicholas Clark
;
> #{
>if $baz {
>$foo.bar
>}
> }
>
> To uncomment, remove the # before the {.
Or in the same vein
if 0 { q<
....
# > }
To uncomment the real code, add # before the if.
Although it is visually complex.
Nicholas Clark
ier to audit different committer bit policies
if the repositories were different, instead of simply one being a subtree of
another. That was all.
Nicholas Clark
he current repositories, is there?
Setting a svn:external property in the right place on both Parrot and Pugs
would mean that both could check out the same testsuite, and both could
commit back to it.
Nicholas Clark
gt; make sense in Perl 6 and the presence of .as() may cover the common cases.
I'm not convinced that sprintf needs an operator. It's not commonly used in
any code I've looked at, which to me suggests that it's not good huffman
coding to use up a terse symbol for it, denying that symbol to something
else.
Nicholas Clark
es.
I keep thinking that 'sigspace' is the signal that agoraphobic processes least
want to handle. But I guess really that should be written 'SIGSPACE'
Nicholas Clark
--
I'm looking for a job: http://www.ccl4.org/~nick/CV.html
say that,
Presumably it's titlecase rather than uppercase.
This doesn't introduce any interesting ambiguities, does it?
IIRC the "fun" stuff involves lowercase and Greek letter sigma following
something, which therefore isn't relevant here.
Nicholas Clark
--
I'm looking for a job: http://www.ccl4.org/~nick/CV.html
On Sun, Apr 30, 2006 at 03:47:54AM +0300, Yuval Kogman wrote:
> On Sat, Apr 29, 2006 at 18:12:34 +0100, Nicholas Clark wrote:
> > On Sat, Apr 29, 2006 at 05:59:37PM +0200, Juerd wrote:
> > > I get a message like this for every message that I send to this list.
> > &g
ent in favour. That
space you can't see is a really annoying invisible bug in C source code that's
sometimes hard to track down. Making it not-a-bug seems good.)
Nicholas Clark
ho will then apply the LART.
As I figure I'm about to get one, I'll (also) forward mine.
Nicholas Clark
ded comments }.say;
'{' clearly is a bracketing character. But '/' wasn't?
Can I select # as a bracketing character for my obfuscations? :-)
Nicholas Clark
.> rather than
C<0. ...> because the long dot eats the first dot after the whitespace.
(ie swapped the 3 and 4 dots), given that the long dot eats the first dot,
and 3 eat 1 leaves 2, whereas 4 eat 1 leaves 3.
Nicholas Clark
On Sat, Apr 01, 2006 at 11:32:20AM +1100, Amos Robinson wrote:
> Sorry, I missed the boat.
Everything seems to be moving at Pugs-speed these days :-)
But what you thought was correct.
Nicholas Clark
no Unicode)
> +str native string (finite sequence of native integers, no
> Unicode)
> num native floating point
> complex native complex number
> boolnative boolean
Why does uint autobox, when int doesn't?
(Or num, complex, bool or bit for that matter?)
Nicholas Clark
ial favours, how many methods would it need
to implement all the existing builtins like this?
Nicholas Clark
On Fri, Feb 24, 2006 at 05:05:03AM -0800, Larry Wall wrote:
> On Thu, Feb 23, 2006 at 02:48:46PM +0000, Nicholas Clark wrote:
> : Would it be better to do that automatically with svn tag expansion?
>
> Yes, it would. Feel free, I'm not very svn-tag-expansion-aware yet.
Well, th
Feb 23 06:15:20 2006
> @@ -12,9 +12,9 @@ Larry Wall <[EMAIL PROTECTED]>
>
>Maintainer: Larry Wall <[EMAIL PROTECTED]>
>Date: 27 Oct 2004
> - Last Modified: 22 Feb 2006
> + Last Modified: 23 Feb 2006
>Number: 12
Would it be better to do that automatically with svn tag expansion?
Nicholas Clark
ff) require whitespace around them?
> 2) Do we get a more punctuationish unicode equivalent?
Sadly I can only find
1D191;MUSICAL SYMBOL FORTE;So;0;L;N;
It sems that fortissimo doesn't appear to have a single code point, let alone
fff
Nicholas Clark
anguages
the whole file level. Which means that it's the same actions to migrate from
Perl 5 to (say) Python as from Perl 5 to Perl 6. And somehow I think that
$Larry has some bias about which language he'd prefer everyone to find it
easiest to migrate to, even if he's too modest to admit it.
Nicholas Clark
TECTED];
$#a=5;
check [EMAIL PROTECTED];
@b = @a;
check [EMAIL PROTECTED];
__END__
0: n n n n n n n n n n
0: n n n n n n n n n n
6: n n n n n n n n n n
6: Y Y Y Y Y Y n n n n
Some undefs are more equal than others.
Nicholas Clark
ror messages, and is fairly flexible. Bottom up parsing
> is very flexible, but is very fast.
I infer that you are missing
^not
about there.
More than that I can't comment on the practicality of your scheme, as I don't
have adequate experience in this area.
Nicholas Clark
ll the shallow copy .copy, and the deep copy .clone?
Nicholas Clark
On Fri, Dec 23, 2005 at 10:43:23AM +0100, TSa wrote:
> HaloO,
>
> Nicholas Clark wrote:
> >Well, I assume that the do-nothing sub is assigned into the variable, and
> >gets re-evaluated each time the variable is use. Which would mean that
> >you'd
> >get
tor is how to handle
> a rocket that didn't lift off. Walking there and inspecting it with
> bare hands and *eyes* might be a bad idea!
I think that Larry is referring to slightly larger and more expensive rockets
than regular fireworks: http://www.siam.org/siamnews/general/ariane.htm
(ie real software, not a metaphor)
Nicholas Clark
tmas)
It's like the autovivification bug:
sub stuff {
my $h = shift;
$h->{k}++;
}
my $a;
$a->{$_}++ for @ARGV;
stuff($a);
print "$a->{k}\n";
__END__
Nicholas Clark
e, but you can never be sure
whether anyone else has another pointer to that same value, which they can
modify at any time.
If nearly all function parameters are PMCs (internally) I don't think that
this is an efficiency problem, as PMCs are always reference semantics, even
when loaded into Parrot's registers.
Nicholas Clark
ed to reply to you, I think that I already have
rather too much going on to be able to take advantage of anything in the
near future. So thanks for the offer, but please do thinks in the order that
is most logical to you.
Nicholas Clark
ly easier to implement strict perl5 formats as a compatibility
module, using the exiting Perl 5 source and parrot's NCI.
Nicholas Clark
g pain, frustration, losses and defections to
other languages that this will cause.
Perl 5 runs everywhere: http://www.cpan.org/ports/index.html
Perl 6 is intended to be an improvement on Perl 5. It would be a shame to
design in restrictions on portability.
Nicholas Clark
quot;, please note that many firms in the real
world are still forcing a base perl version of 5.005_03 or 5.6.1 for
development. Still.
The active perl "community" is not wholly representitive of the global usage
of perl, and would do well to remember this. For example, see
http://use.perl.org/~barbie/journal/27098
Nicholas Clark
re good reasons to change, and better reasons than you state.
Nicholas Clark
/www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2005-10/msg00585.html
and how to do something functionally like:
my $foo = DBI(1.38)->new();
my $bar = DBI(1.40)->new();
or whatever to distinguish which you wanted to call a class method on.
Nicholas Clark
compilers weren't checking close(), so
they were caught out by this too.
So I think that the problem is real, and is worthy of addressing.
I'm not sure of the best approach, or syntax, or defaults.
Nicholas Clark
are": In a
> regex, we say /./ to match anything; in a type signature, we use "Any"
> to mean that we don't care what the type is. I don't think we need
> another way to say "don't care". In fact, we could unify things:
>
> rules: // matches
guess that they are trying to out-live
Perl 4.
Nicholas Clark
d context at -e line 1.
o
where by mentioning $& I set the "seen $& somewhere" flag, so $& is
captured, and it's there when the '' eval gets compiled at run time.
IIRC the perl 6 equivalents of $` $& and $' are all lexical rather than
dynamic, so the pain will be far less. (at least in its scope)
Nicholas Clark
27;s 1 << -1 in Perl 6?
Nicholas Clark
^ that one?
I'd find that confusing in itself.
And that's without considering the change from the C of C and Perl 5.
[contents of this message may settle in transit, particularly if your mail
reader uses a proportional font.]
Nicholas Clark
x27;
syntax error in file /tmp/perl-em47tij at line 1, next 2 tokens "no 5"
Execution of /tmp/perl-em47tij aborted due to compilation errors.
So I think not.
(if anyone wants to compile perl4 on FreeBSD, tell Configure that libc is
/usr/lib/libc.a, rather than .so
After that you'll need to edit a couple of things, but they'll be obvious)
Nicholas Clark
hat hash is only directly
manipulated by functions back up the call frame, so for the duration of the
call would be unchanged.
But this is all arm-wavy, and needs real code to analyse before committing
to it as a strategy.
Nicholas Clark
mbiguous. But maybe I've had too much dealing with
floating point in a previous life.
I'd find it hard defending a language that treated 1.e5 as a method call.
Nicholas Clark
mm. I guess this about sums up Perl 5 - ultimately it's defined by the
implementation in the C source. (IIRC first remarked on by Chip))
Nicholas Clark
rsus L[2], because
I have no experience of MMD.
> That said, I'd have no *particular* objection to an MMD implementation that
> used RMS inheritance distance as its metric, provided the dispatch
> performance was not appreciably worse.
Maybe I should cut that paragraph, to avoid re-opening a debate.
Nicholas Clark
Spain should make the Julian/Gregorian jump show up in 1582, not 1752?
I think that this demonstrates how tricky all this mess is.
Nicholas Clark
to the bytecode on disk that can't actually be
serialised? So the attempt at serialisation of a file handle, directory
handle, database handle, shared memory handle or any other external resource
should fail? (Unless that resource class has a viable serialise/deserialise
system)
Nicholas Clark
1 - 100 of 253 matches
Mail list logo