On Jul 11, 2004, at 11:09 AM, Michael G Schwern wrote:
I document private code like this:
=begin private
put your normal POD here
=end private
perldoc won't show the POD but someone reading through the code (and
thus
needing to know about private functions) will see it. And POD is very
readable
Pete Krawczyk wrote:
Consider the following code:
$impclass ||= implementor($scheme) ||
do {
require URI::_foreign;
$impclass = 'URI::_foreign';
};
That's in URI.pm, lines 54-58.
Devel::Cover treats that as a conditional. So short of deleting
: Hello everybody,
:
: I'm about to learn myself perl6 (after using perl5 for some time).
I'm also trying to learn perl6 after using perl5 for some time. :-)
I wouldn't even try to compare you and me :-)
Pretty close. The way it's set up currently, $len is a reference
to a variable
-Original Message-
From: Jonadab the Unsightly One [mailto:[EMAIL PROTECTED]
Austin Hastings [EMAIL PROTECTED] writes:
I think this is something that we'll want as a mode, a la
case-insensitivity. Think of it as mark insensitivity.
Makes sense to me, but...
Maybe it can just
Hi!
On Sun, Jul 11, 2004 at 09:14:28AM +0100, Tony Bowden wrote:
For a slightly easier approach, Module::CPANTS has a
'requires_recursive' method which lists all the dependencies, and all
their dependencies, etc.
Well it had this information, but currently it hasn't. But it will have it
Alexey Trofimenko wrote:
I wonder about mixed synax:
%hash = ( :keyvalue
:key2value
:key3
key4 = 'value',
'key5','value',
key6 value key7 value )
Did I make mistakes here?
That depends. I asked Damian about this a few weeks ago. He said
After spending a couple of hours looking at Python::Bytecode and the
Python source, I decided I didn't like the module. So I wrote my own.
I decided Bytecode::Python would work nicely for the name, though it's a
bit close to the namespace. I basically redesigned it, so it should be a
little
[ CC'ed all + perl6-internals so fullquote ]
Mark Hahn wrote:
I have been looking over Parrot in consideration as a foundation for
Prothon. Let me give you some of my thoughts and ask another question or
two. Feel free to pass this on to any or all on the Parrot team.
Prothon is a small
On Thursday 08 July 2004 05:25, Larry Wall wrote:
: say @x[rand]; # how about now?
Well, that's always going to ask for @x[0], which isn't a problem.
However, if you say rand(@x), it has to calculate the number of
elements in @x, which could take a little while...
I'd expect to be rand(@x) =
Ph. Marek wrote:
On Thursday 08 July 2004 05:25, Larry Wall wrote:
: say @x[rand]; # how about now?
Well, that's always going to ask for @x[0], which isn't a problem.
However, if you say rand(@x), it has to calculate the number of
elements in @x, which could take a little while...
I'd expect to
[EMAIL PROTECTED] cat f.py
if __name__ == '__main__':
print filter(lambda x: x 5, range(10)), range(5)
$ perl pie-thon.pl f.py | parrot --python -
Have fun,
leo
[snipped except for essentials :) ]
Book News
New Releases
***Perl 6
Luke Palmer [EMAIL PROTECTED] writes:
Gautam Gopalakrishnan writes:
Hello,
I've tried the archives and the 'Perl 6 essentials' book and I can't
find anything
about string subscripting. Since $a[0] cannot be mistaken for array subscripting
anymore, could this now be used to peep into
Piers Cawley skribis 2004-07-12 12:20 (+0100):
method postcircumfix:[] is rw { ... }
Compared to Ruby, this is very verbose.
def [] (key)
...
end
# Okay, not entirely fair, as the Ruby version would also
# need []= defined for the rw part.
Could methods like [] and
[EMAIL PROTECTED] (Juerd) writes:
Could methods like [] and {} *default* to postcircumfix:?
A more interesting question is does it mean anything for them *not* to be
postcircumfix?
After all, the only other use would be $foo.[]($bar, $baz), which is
practically identical. Unless you want to
Simon Cozens skribis 2004-07-12 12:58 (+0100):
[EMAIL PROTECTED] (Juerd) writes:
Could methods like [] and {} *default* to postcircumfix:?
A more interesting question is does it mean anything for them *not* to be
postcircumfix?
Not as a method, I think.
After all, the only other use would
1) I've serious troubles with the precision of string_to_num. The test
bewow fails, 1.e100 isn't really 10**100.
2) I've modified string_to_num to just use atof() which works.
3) This makes 2 tests fail (pmc_22, pmc_32). *But* these seem both to be
bogus: I can't imagine that e.g. Z1 should
The Perl 6 Summary for the week ending 2004-07-10
Another week down, another summer summary. On a Monday no less. Last
week I even managed to get the summary to the mailing lists before the
Perl 5 Porters summary. I may have been even more surprised that Rafael
by that. Let's see
On Mon, 12 Jul 2004, Leopold Toetsch wrote:
1) I've serious troubles with the precision of string_to_num. The test
bewow fails, 1.e100 isn't really 10**100.
2) I've modified string_to_num to just use atof() which works.
I so wish this were the case. Unfortunately it's not. atof's behaviour
On Mon, Jul 12, 2004 at 09:20:31AM -0400, Dan Sugalski wrote:
On Mon, 12 Jul 2004, Leopold Toetsch wrote:
1) I've serious troubles with the precision of string_to_num. The test
bewow fails, 1.e100 isn't really 10**100.
2) I've modified string_to_num to just use atof() which works.
I so
On Mon, 12 Jul 2004, Nicholas Clark wrote:
On Mon, Jul 12, 2004 at 09:20:31AM -0400, Dan Sugalski wrote:
On Mon, 12 Jul 2004, Leopold Toetsch wrote:
1) I've serious troubles with the precision of string_to_num. The test
bewow fails, 1.e100 isn't really 10**100.
2) I've modified
3) Is there someone on the develpment team who could hold my hand in the
beginning to get me going with Parrot in Visual Studio? After a brief
There isn't a certain someone. Just put your question on the list. Surely it
won't remain unaswered for long, at least as regards the
configuringmaking
On Mon, Jul 12, 2004 at 09:29:23AM -0400, Dan Sugalski wrote:
On Mon, 12 Jul 2004, Nicholas Clark wrote:
On Mon, Jul 12, 2004 at 09:20:31AM -0400, Dan Sugalski wrote:
On Mon, 12 Jul 2004, Leopold Toetsch wrote:
1) I've serious troubles with the precision of string_to_num. The test
--- Juerd [EMAIL PROTECTED] wrote:
Piers Cawley skribis 2004-07-12 12:20 (+0100):
method postcircumfix:[] is rw { ... }
Compared to Ruby, this is very verbose.
def [] (key)
...
end
# Okay, not entirely fair, as the Ruby version would also
# need []= defined
On Jul 11, 2004, at 4:09 PM, James Mastros wrote:
package Foo;
sub new {
my $class=shift;
$class=ref($class)||$class;
bless [], $class;
}
eval { Foo::new(); }
is($!, new dies when called as a function);
Actually this doesn't die, it does even worse, given this code:
package Foo;
sub new {
Dan Hursh [EMAIL PROTECTED] writes:
Ouch. I hadn't thought of that. I'm a big fan of litering loops with
discard(),next if dontCareBecause(); # it don't matter here
I like the idea here, but I don't think we need the comma...
type constructs. I was going to suggest
print
Last week, I retroed some tests on Data::Page and it now covers at 100%.
Had to add a couple of constructor tests. Note also that all its tests
are running under -T.
http://search.cpan.org/dist/Data-Page/
It's a small module, but it worked very nicely. Hey, Leon, you want
updates to tests?
Ph. Marek [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
On Thursday 08 July 2004 05:25, Larry Wall wrote:
: say @x[rand]; # how about now?
Well, that's always going to ask for @x[0], which isn't a problem.
However, if you say rand(@x), it has to calculate the number of
Leo --
I had tinkered around with this stuff back in 2003, and ended up writing
Python::Bytecode::SAX to help me visualize bytecode. IIRC, I ran into
the same issue of only disassembling one code block. I'd be interested
to know if P::B::S treats your example python bytecode any better than
P::B.
On Mon, 12 Jul 2004, Gregor N. Purdy wrote:
Leo --
I had tinkered around with this stuff back in 2003, and ended up writing
Python::Bytecode::SAX to help me visualize bytecode. IIRC, I ran into
the same issue of only disassembling one code block.
I've finished up (yay, free time at lunch!)
The last rev of Python::Bytecode is up and available for poking at.
http://www.sidhe.org/~dan/Python-Bytecode-2.3.tar.gz if you want it.
Handles multiple code objects in a file now (woo!) as well as actually
supporting Python 2.1 and 2.2. I think. Tests would be in order, but I
haven't actually
Luke Palmer [EMAIL PROTECTED] writes:
Or, god forbid, a word?
m:base/que mas/
We're not mathematicians: we're allowed to use more than one letter
in a row to designate something :-)
Well, if it were *me*, *I* would have voted for keeping the core
language 100% pure ASCII, untainted by
--- Dave Whipp [EMAIL PROTECTED] wrote:
rand(@x) == @x.rand == @x[ rand int @x ] == @x[ rand(1) * @x ]
guaranteeing a uniform distribution unless adverbial modifiers are
used.
Meaning I can do:
$avg_joe = rand @students :bell_curve;
?
=Austin
Fixed a bug in the damn thing (that I'd introduced) and fixed the tests to
actually test properly, including both a Python 2.2 and 2.3 format
bytecode file in the archive.
Rather than mail the thing to people *again* I've just stuck it up for web
snagging.
On Mon, Jul 12, 2004 at 10:12:03AM -0700, Austin Hastings wrote:
: --- Dave Whipp [EMAIL PROTECTED] wrote:
:
:rand(@x) == @x.rand == @x[ rand int @x ] == @x[ rand(1) * @x ]
:
: guaranteeing a uniform distribution unless adverbial modifiers are
: used.
The hard part being to pick a random
--- Larry Wall [EMAIL PROTECTED] wrote:
On Mon, Jul 12, 2004 at 10:12:03AM -0700, Austin Hastings wrote:
: --- Dave Whipp [EMAIL PROTECTED] wrote:
:
:rand(@x) == @x.rand == @x[ rand int @x ] == @x[ rand(1) * @x ]
:
: guaranteeing a uniform distribution unless adverbial modifiers
are
On Mon, Jul 12, 2004 at 07:42:02AM +0200, Ph. Marek wrote:
: Of course the file must be opened in binary mode - else the line-endings etc.
: can be destroyed in the binary data, which is bad.
:
: So Perl/Parrot can't autodetect the kind of encoding.
: But maybe it should be possible to do
On Mon, Jul 12, 2004 at 11:11:58AM -0700, Austin Hastings wrote:
: --- Larry Wall [EMAIL PROTECTED] wrote:
: The hard part being to pick a random number in [0,Inf) uniformly. :-)
:
: Half of all numbers in [0, Inf) are in the range [Inf/2, Inf). Which
: collapses to the range [Inf, Inf).
... doesn't know BigInt. You can't format:
Parrot_sprintfc(interp, %Pd, big_pmc)
There are some long modifiers, but they are useles for PMC.s You don't
know the integer size of PMCs. So the whole concept of spf_render,
spf_vtable needs modificatioms to take care of such cases.
I'd say that:
--- Larry Wall [EMAIL PROTECTED] wrote:
Hmm, maybe that means that language-dependent graphemes are called
langs, which I suppose is short for langemes.
Dangerously close to legumes, there. Perhaps we could refer to
entities matches by regexes as peas...
=Austin
# New Ticket Created by Nicholas Clark
# Please include the string: [perl #30683]
# in the subject line of all future correspondence about this issue.
# URL: http://rt.perl.org:80/rt3/Ticket/Display.html?id=30683
---
osname= darwin
osvers= 7.0
arch= darwin-thread-multi-2level
cc= cc
Test::Tester is a(nother) module to allow you to test your test modules,
hopefully with the minimum of effort and maximum flexibility. With version
0.09, the final bit of interface awkwardness is gone and test scripts can
now look like this
use Test::Tester; # load me first
use Test::MyNewModule
Nicholas Clark (via RT) wrote:
It seems that the test is trying to count the number of times the libc
qsort calls the compare function. This doesn't seem like a fantastically
portable idea.
I'm not sure of the easiest way to re-write the test to expect that value to
be non-zero, which seems like
43 matches
Mail list logo