Matt Diephouse [EMAIL PROTECTED] wrote:
Leopold Toetsch [EMAIL PROTECTED] wrote:
IIRC it was already mentioned here: http://shootout.alioth.debian.org/
- the Computer Language Shootout.
It would be quite interesting to have Parrot figures too and see
benchmark timings decrease steadily ;-)
Running pugs r4158, I find that (some, at least) subroutine calls
only work with no whitespace between the sub name and the arguments.
sub numcmp ($a, $b) { return $a = $b };
$v = numcmp(1,2); # works fine
$v = numcmp (1,2); # fails with
$v = numcmp
I don't see anywhere in the canon that
# New Ticket Created by Curtis Rawls
# Please include the string: [perl #36045]
# in the subject line of all future correspondence about this issue.
# URL: https://rt.perl.org/rt3/Ticket/Display.html?id=36045
This patch makes improvements to the loop struct.
Changes to loops:
-Added index
Curtis Rawls (via RT) wrote:
This patch makes improvements to the loop struct.
Thanks, applied - r8219
BTW: would you like to take a look at the register allocator?
It works but consumes enormous amounts of resources for e.g. Dan's Evil
Subs[1]. I've here an IIRC slightly modfied version
On 5/31/05, david d zuhn [EMAIL PROTECTED] wrote:
Running pugs r4158, I find that (some, at least) subroutine calls
only work with no whitespace between the sub name and the arguments.
$v = numcmp (1,2); # fails with
I don't see anywhere in the canon that no whitespace is allowed
Here's a demo script:
#!/usr/bin/pugs
use v6;
class Foo {
multi method new (Class $class: Str $date) {
say ok;
return $class.new(date = $date);
}
submethod BUILD (+$date) {
say date: '$date';
}
}
my $foo = Foo.new(date = 'blah');
=cut
pugs test.pl
ok
date: ''
Problem 1:
I
Just a quick heads up and request for comments on a testing module I'm
putting together.
Test::Object
See search.cpan.org once the initial POD-only upload is done, but in
short I want a way to be able to define tests or groups of tests that
ANY object of a particular class should pass, and
Ingo Blechschmidt wrote:
Hi,
# Way 1
my $MEANING_OF_LIFE is constant = 42;
Forgive my ignorance here, but for all of these different ways of doing
constants, will they all optimize (including partial
evaluation/currying) at compile/build/init/run-time?
my $gravity is constant = 10; #
[EMAIL PROTECTED] (Adam Kennedy) writes:
Forgive my ignorance here, but for all of these different ways of
doing constants, will they all optimize (including partial
evaluation/currying) at compile/build/init/run-time?
Gosh, I hope not.
my $gravity is constant = 10; # One significant figure
The first steps for HLL language and type support are in. You can now
dynamically load a HLL _group PMC library by just including a .HLL line
in PASM/PIR, e.g.
.HLL Tcl, tcl_group
...
$P0 = new .TclInt # Integer constant
The .HLL pragma registers at compile time the given HLL
The parrot makefile has several places where nmake baulks at the length of the
expanded command lines.
I've found that I can work around this is some places using inline files, but
I'm having trouble working out where/how to make the adjustments.
I also have my doubts whether this would be
Running `make clean` on WindowsXP is dying with an expanded command
line too long error.
Output as follows:
make clean
Microsoft (R) Program Maintenance Utility Version 1.50
Copyright (c) Microsoft Corp 1988-94. All rights reserved.
cd ext\Algorithm-TokenBucket C:\Perl\bin\perl.exe
On 5/31/05, david d zuhn [EMAIL PROTECTED] wrote:
this is a pretty fundamental change in
perl that ought to be made a bit clearer (it's not in the p5-p6 porting
guide, for example).
Agreed.
I remembered this being discussed by Abigail. Found it here:
http://www.perlmonks.org/?node_id=346083
$v = numcmp (1,2); # fails with
Synopsis 2:
Whitespace is not allowed before the parens, but there is a
corresponding .() operator, which allows you to insert optional
whitespace before the dot.
$v = numcmp .(1,2); # should pass
The quoted text is in a paragraph describing explicit
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 date formatting to be
implemented in pugs):
I would like for time() to return an object, which in numeric
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 date formatting to be
implemented in pugs):
What's
On 31 May 2005, at 09:47, Adam Kennedy wrote:
[snip]
Something exist already that I'm missing?
[snip]
I'd use Test::Class (but I would say that :-) So the example from
your POD would be something like:
{ package Foo::Test;
use base qw( Test::Class );
use Test::More;
#
On 5/31/05, Jonathan Scott Duff [EMAIL PROTECTED] wrote:
I didn't really realize that there was a p5-p6 porting guide until I
saw this. I'll add something to the guide as above (plus subs).
I've already added a bit about method calls, but I'll leave it alone
for you to do arrays/hashes.
Carl
On 5/31/05, Nigel Sandever [EMAIL PROTECTED] wrote:
The parrot makefile has several places where nmake baulks at the length of the
expanded command lines.
though you weren't explicit, i suspect you're using the ms c++ toolkit
to build parrot on win32. some months ago, i ran into the same
Leopold Toetsch wrote:
Please note that this does not yet work for .pbc files as the HLL isn't
stored in the PBC yet (this will come soon).
Should work now (rev 8224).
See also t/dynclass/foo.t for 2 examples.
$ ./parrot -o f.pbc t/dynclass/foo_9.pir
$ ./parrot f.pbc
42
leo
ok, that was quick :)
Shall I remove what I'd already added to the bottom of the file?
Carl
On Tue, May 31, 2005 at 08:05:04AM -0500, david d zuhn wrote:
If this is indeed a statement that all function calls, especially
the ordinary sort that are used most often, must be of the form a(b)
rather than allowing a (b), this is a pretty fundamental change in
perl that ought to be made a
Leopold Toetsch [EMAIL PROTECTED] wrote:
Matt Diephouse [EMAIL PROTECTED] wrote:
Leopold Toetsch [EMAIL PROTECTED] wrote:
IIRC it was already mentioned here: http://shootout.alioth.debian.org/
- the Computer Language Shootout.
It would be quite interesting to have Parrot figures too and
On 5/31/05, Carl Franks [EMAIL PROTECTED] wrote:
Running `make clean` on WindowsXP is dying with an expanded command
line too long error.
You need to get a later version of nmake. The latest is 7.10, I believe.
Aank
On Tue, May 31, 2005 at 09:23:11AM -0400, Nathan Gray 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 date formatting to be
implemented in pugs):
(I'm reposting this because I'm not sure what happened to the one that I
sent to parrotbugs; forgive me if two eventually appear)
Folks,
There seems to be some problems with -O1 when instructions are optimised
at the end of functions. For instance, take
sub main
func ()
end
sub func
I've now put together the missing pieces and filled the gaps - here we
go - an example:
dynclasses/pyfloat.pmc:class_init()
- registers a type mapping Float = PyFloat
t/dynclass/pycomplex_3.pir
- denotes that's using Python HLL by
.HLL Python, python_group
classes/complex.pmc:absolute()
On 5/31/05, Aankhen [EMAIL PROTECTED] wrote:
You need to get a later version of nmake. The latest is 7.10, I believe.
1.50 - 7.10
That's quite a version number jump!
I've updated it, and it works now, thanks.
Carl
At 10:19 AM +0200 5/31/05, Leopold Toetsch wrote:
Curtis Rawls (via RT) wrote:
This patch makes improvements to the loop struct.
Thanks, applied - r8219
BTW: would you like to take a look at the register allocator?
It works but consumes enormous amounts of resources for e.g. Dan's
Evil
Nick Glencross wrote:
(I'm reposting this because I'm not sure what happened to the one that I
sent to parrotbugs; forgive me if two eventually appear)
Folks,
There seems to be some problems with -O1 when instructions are optimised
at the end of functions.
Fixed, thanks for testing.
In
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 date
On Sun, May 29, 2005 at 12:52:25PM -0400, Jeff 'japhy' Pinyan wrote:
I'm curious if commit and cut capture anything. They don't start
with '?', so following the guidelines, it would appear they capture, but
that doesn't make sense. Should they be written as ?commit and ?cut,
or is the
Nigel Sandever wrote:
The parrot makefile has several places where nmake baulks at the length of the
expanded command lines.
According to p6c[1] there exists nmake 7.10, which works.
leo
[1] pugs 'make clean' fatal error on ms windows
Leopold Toetsch wrote:
Nick Glencross wrote:
(I'm reposting this because I'm not sure what happened to the one that
I sent to parrotbugs; forgive me if two eventually appear)
Folks,
There seems to be some problems with -O1 when instructions are
optimised at the end of functions.
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 basic set of packages?
Perl 5 has an entire
Nathan Gray wrote:
possibly as an strftime() pattern.
Can we please make sure that strftime() is _not_ OS dependent like the
POSIX version is now?
-- Rod Adams
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
- I didn't say we shouldn't port DateTime. My point was simply that,
based on the amount of date-related code on CPAN, this is an issue
that many people care about quite a bit. We would probably be well
served to consider it carefully and decide on what semantics we
really want. Maybe
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
On Tue, 31 May 2005 07:07:28 -0700, [EMAIL PROTECTED] (Jerry Gay) wrote:
On 5/31/05, Nigel Sandever [EMAIL PROTECTED] wrote:
The parrot makefile has several places where nmake baulks at the length o=
f the
expanded command lines.
=20
though you weren't explicit, i suspect you're using the
On Tue, May 31, 2005 at 01:11:21PM -0500, Rod Adams wrote:
Nathan Gray wrote:
possibly as an strftime() pattern.
Can we please make sure that strftime() is _not_ OS dependent like the
POSIX version is now?
I don't mind an OS dependent strftime() as long as we have some
formatter that is OS
On Mon, May 23, 2005 at 08:54:19PM +, [EMAIL PROTECTED] wrote:
:
: There are actuall two usefull definition for %. The first which Ada calls
'mod' always returns a value 0=XN and yes it has no working value that is an
identity. The other which Ada calls 'rem' defined as follows:
:
:
On Thu, May 26, 2005 at 11:19:42AM -0500, Patrick R. Michaud wrote:
: Do we still have the rule syntax, or was that abandoned in
: favor of ?rule ? (I know there are still some remnants of ...
: in S05 and A05, but I'm not sure they're intentional.)
It's gone, though we're reserving it for
On Mon, May 30, 2005 at 08:39:57AM +, Luke Palmer wrote:
: Okay, I'd like to set myself straight. Sanity check:
:
: bar($foo, $baz); # looks for subs (lexical then package), and
: falls back to MMD
Er, no.
: $foo.bar($baz);# looks in ref($foo), then falls back to MMD
:
: If
Since this is coming back up, and a ref's in order...
The way keyed access is supposed to work is this.
A key structure is an array of three things:
1) A key
2) A key type
3) A 'used as' type
The key can be an integer, string, or PMC, and is, well, the key. The
thing we use to go
On 2005-05-30 05:15, TSa (Thomas Sandlaß) [EMAIL PROTECTED]
wrote:
Mark Reed wrote:
I would really like to see ($x div $y) be (floor($x/$y))
That is: floor( 8 / (-3) ) == floor( -2. ) == -3
Or do you want -2?
and ($x mod $y) be ($x - $x div $y).
Hmm, since 8 - (-3) == 11 this
On Tue, May 31, 2005 at 01:20:57PM -0700, Larry Wall wrote:
On Thu, May 26, 2005 at 11:19:42AM -0500, Patrick R. Michaud wrote:
: Do we still have the rule syntax, or was that abandoned in
: favor of ?rule ? (I know there are still some remnants of ...
: in S05 and A05, but I'm not sure
On Wed, May 25, 2005 at 07:07:02PM -0400, Uri Guttman wrote:
: the only advantage in the above case is the different prececences of =
: and == which allows dropping of parens with the latter. i don't
: consider that so important a win as to be used often. and they are at
: equal huffman levels as
On Tue, May 31, 2005 at 03:42:42PM -0700, Larry Wall wrote:
: On Wed, May 25, 2005 at 07:07:02PM -0400, Uri Guttman wrote:
: : the only advantage in the above case is the different prececences of =
: : and == which allows dropping of parens with the latter. i don't
: : consider that so important a
Rob Kinyon wrote:
I would love to see a document (one per editor) that describes the
Unicode characters in use and how to make them. The Set implementation
in Pugs uses (at last count) 20 different Unicode characters as
operators.
I have updated the unicode quickref, and started a Perlmonks
I'm looking at a bit of output from Devel::Cover that I imagine has to
be a bug. I'll try my best to reproduce the HTML output:
stmt branch cond sub time code
221862 100 100 _1613639 next if ($line
=~ /^\s*[#!]/ || $line =~
On Thu, May 26, 2005 at 11:19:42AM -0500, Patrick R. Michaud wrote:
$rule N indirect rule
::$rulename N indirect symbolic rule
@rulesN like '@rules'
%rulesN like '%rules'
{ code } N code produces a
From: Dan Sugalski [EMAIL PROTECTED]
Date: Tue, 31 May 2005 12:09:05 -0400
At 10:19 AM +0200 5/31/05, Leopold Toetsch wrote:
Curtis Rawls (via RT) wrote:
This patch makes improvements to the loop struct.
Thanks, applied - r8219
BTW: would you like to take a look
On Fri, May 27, 2005 at 10:59:25PM +0200, Ingo Blechschmidt wrote:
: Hi,
:
: what is the default invocant of methods?
:
: method blarb ($normal_param) {...}
: # Same as
: method blarb (Class | ::?CLASS $invocant: $normal_param) {...}
: # or
: method blarb (::?CLASS $invocant:
On Tue, May 24, 2005 at 10:53:59PM +1000, Stuart Cook wrote:
: I'm not sure whether this behaviour is supposed to be changing.
It is. I think we decided to make the value undef, and the function
undefine(). (But these days most values of undef really ought to
be constructed and returned (or
How do I specify the signature of a context-sensitive function?
sub foo() returns (what?) {
return want ~~ Scalar ?? cheap_integer_result :: List_of_Sheep;
}
If it were two subs, one would is returns Int and the other List of
Sheep. The draft S29 uses things like Int|List to
Carl Franks wrote:
I have a class that normally takes a list of named arguments.
I also want to be able to handle a single argument.
class Foo {
multi method new (Class $class: Str $date) {
return $class.bless(date = $date);
}
submethod BUILD ($.date, $.time, $.offset) {
#
Adam Kennedy wrote:
Forgive my ignorance here, but for all of these different ways of doing
constants, will they all optimize (including partial
evaluation/currying) at compile/build/init/run-time?
my $gravity is constant = 10; # One significant figure
sub time_to_ground ($height, $accel) {
Gaal Yahas wrote:
How do I specify the signature of a context-sensitive function?
sub foo() returns (what?) {
return want ~~ Scalar ?? cheap_integer_result :: List_of_Sheep;
}
If it were two subs, one would is returns Int and the other List of
Sheep. The draft S29 uses things
All this discussion of identity defaults for reductions has been very
interesting and enlightening.
But it seems to me that the simplest correct behaviour for reductions is:
2+ args: interpolate specified operator
1 arg: return that arg
0 args: fail (i.e. thrown or unthrown
Damian Conway wrote:
0 args: fail (i.e. thrown or unthrown exception depending on use
fatal)
...
$sum = ([+] @values err 0);
$prod = ([*] @values err 1);
$prob = ([*] @probs err 0);
Just wanted to check, if I've said use fatal: will that err 0 DWIM,
or will the
Dave Whipp wrote:
Damian Conway wrote:
0 args: fail (i.e. thrown or unthrown exception depending on use
fatal)
...
$sum = ([+] @values err 0);
$prod = ([*] @values err 1);
$prob = ([*] @probs err 0);
Just wanted to check, if I've said use fatal: will that err 0
On Mon, May 30, 2005 at 01:42:40PM +, Luke Palmer wrote:
: Because do {...} is a part of the language, while or no while. Perl 6
: is supposed to die if you say do {...} while, which isn't implemented
: in pugs yet.
In particular, we'd like do {...} while to die because do {...}
is now
On Mon, May 30, 2005 at 05:00:26PM +0100, Carl Franks wrote:
: I have a class that normally takes a list of named arguments.
: I also want to be able to handle a single argument.
:
: class Foo {
: multi method new (Class $class: Str $date) {
: return $class.bless(date = $date);
: }
:
:
Damian Conway wrote:
And what you'd need to write would be:
$sum = (try{ [+] @values } err 0);
The err ... idiom seems too useful to have it break in this case.
Afterall, the purpose of err 0 is to tell the stupid computer that I
know what to do with the empty-array scenario.
Feels
Dave Whipp wrote:
Damian Conway wrote:
And what you'd need to write would be:
$sum = (try{ [+] @values } err 0);
The err ... idiom seems too useful to have it break in this case.
Afterall, the purpose of err 0 is to tell the stupid computer that I
know what to do with the
Dave Whipp wrote:
Damian Conway wrote:
And what you'd need to write would be:
$sum = (try{ [+] @values } err 0);
The err ... idiom seems too useful to have it break in this case.
Afterall, the purpose of err 0 is to tell the stupid computer that I
know what to do with the
The 'used as' type indicates whether this key
is to be used to do a by-integer-index (array)
access or by-string-index (hash) access.
Why not extend this to properties, too?
foo['hello'] becomes
'hello'
string
as-offset
foo{'hello'} becomes
'hello'
string
Damian Conway skribis 2005-06-01 10:44 (+1000):
2+ args: interpolate specified operator
1 arg: return that arg
0 args: fail (i.e. thrown or unthrown exception depending on use fatal)
Following this logic, does join( , @foo) with [EMAIL PROTECTED] being 0 fail
too?
I dislike
Juerd asked:
2+ args: interpolate specified operator
1 arg: return that arg
0 args: fail (i.e. thrown or unthrown exception depending on use fatal)
Following this logic, does join( , @foo) with [EMAIL PROTECTED] being 0 fail too?
No. It returns empty string. You could think of
Perl 6 Summary for 2005-05-24 through 2005-05-31
All~
Welcome to another Perl 6 summary, brought to you by Aliya's new
friends, Masha Nannifer and Philippe, and my own secret running joke.
Without further ado, I bring you Perl 6 Compiler.
Perl 6 Compiler
method chaining
-Original Message-
From: Damian Conway [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 31, 2005 11:14 PM
To: perl6-language@perl.org
Subject: Re: reduce metaoperator on an empty list
Juerd asked:
2+ args: interpolate specified operator
1 arg: return that arg
0
At 10:19 AM +0200 5/31/05, Leopold Toetsch wrote:
Curtis Rawls (via RT) wrote:
This patch makes improvements to the loop struct.
Thanks, applied - r8219
BTW: would you like to take a look at the register allocator?
It works but consumes enormous amounts of resources for e.g. Dan's
Evil
Rob Kinyon wrote:
What I'm trying to get at isn't that DateTime's API should be
preserved. I'm saying that the concept of DateTime should be ported.
Core or not core - it doesn't matter. When use'd (or installed), it
should override now() (and anyone else we can think of) to return an
object
Rod Adams wrote:
How do I specify the signature of a context-sensitive function?
sub foo() returns (what?) {
return want ~~ Scalar ?? cheap_integer_result :: List_of_Sheep;
}
I suspect a typed junction would look like : Junction of Int|Str.
Not quite. AIUI that means a
Cool. This means I don't have to do a lookup everytime I want to use one of my
own types (per type per sub). Tcl will be patched shortly to take advantage.
Leopold Toetsch wrote:
The first steps for HLL language and type support are in. You can now
dynamically load a HLL _group PMC library by
Thank you for the summary, Matt
I have a correction, though:
subrules tests
Dino Morelli provided a patch adding tests for subrules to PGE. Warnock
applies.
http://xrl.us/f955
This and my other two patches to p6rules tests (RT #35950, 35971, 35994)
have not yet been applied.
Sam Vilain wrote:
Rod Adams wrote:
How do I specify the signature of a context-sensitive function?
sub foo() returns (what?) {
return want ~~ Scalar ?? cheap_integer_result :: List_of_Sheep;
}
I suspect a typed junction would look like : Junction of Int|Str.
Not quite.
Joe Gottman pointed out:
No. It returns empty string. You could think of Cjoin as being
implemented:
sub join (Str $sep, [EMAIL PROTECTED]) { reduce { $^a ~ $sep ~ $^b } ,
@list }
If this were the case, then
join '~', 'a', 'b', 'c'
would equal '~a~b~c' instead of
On Tue, May 31, 2005 at 11:58:12PM -0400, Dino Morelli wrote:
Thank you for the summary, Matt
I have a correction, though:
subrules tests
Dino Morelli provided a patch adding tests for subrules to PGE. Warnock
applies.
http://xrl.us/f955
This and my other two patches
Done. Thanks!
William Coleda wrote:
Cool. This means I don't have to do a lookup everytime I want to use one
of my own types (per type per sub). Tcl will be patched shortly to take
advantage.
Leopold Toetsch wrote:
The first steps for HLL language and type support are in. You can now
81 matches
Mail list logo