Re: Phalanx: What if full coverage isn't possible? (fwd)

2004-07-12 Thread David Wheeler
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

Re: Phalanx: What if full coverage isn't possible?

2004-07-12 Thread James Mastros
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

Re: question regarding rules and bytes vs characters

2004-07-12 Thread Ph. Marek
: 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

RE: The .bytes/.codepoints/.graphemes methods

2004-07-12 Thread Austin Hastings
-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

Re: Looking for module dependency information

2004-07-12 Thread Thomas Klausner
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

Re: = brother

2004-07-12 Thread Matt Diephouse
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

Re: Next rev of Python::Bytecode

2004-07-12 Thread Matt Diephouse
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

Re: Prothon 0.1.2 is getting close to Alpha [Prothon]

2004-07-12 Thread Leopold Toetsch
[ 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

Re: push with lazy lists

2004-07-12 Thread Ph. Marek
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) =

Re: push with lazy lists

2004-07-12 Thread Brent 'Dax' Royal-Gordon
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

[CVS si} Pie-thon 50 - parrot runs a python lambda:

2004-07-12 Thread Leopold Toetsch
[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

[Fwd: Newsletter from O'Reilly UG Program, July 9]]

2004-07-12 Thread Leopold Toetsch
[snipped except for essentials :) ] Book News New Releases ***Perl 6

Re: scalar subscripting

2004-07-12 Thread Piers Cawley
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

Re: scalar subscripting

2004-07-12 Thread Juerd
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

Re: scalar subscripting

2004-07-12 Thread Simon Cozens
[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

Re: scalar subscripting

2004-07-12 Thread Juerd
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

string.c:string_to_num

2004-07-12 Thread Leopold Toetsch
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

This week's summary

2004-07-12 Thread The Perl 6 Summarizer
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

Re: string.c:string_to_num

2004-07-12 Thread Dan Sugalski
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

Re: string.c:string_to_num

2004-07-12 Thread Nicholas Clark
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

Re: string.c:string_to_num

2004-07-12 Thread Dan Sugalski
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

Re: Prothon 0.1.2 is getting close to Alpha [Prothon]

2004-07-12 Thread Vladimir Lipsky
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

Re: string.c:string_to_num

2004-07-12 Thread Nicholas Clark
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

Re: scalar subscripting

2004-07-12 Thread Austin Hastings
--- 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

Re: Phalanx: What if full coverage isn't possible?

2004-07-12 Thread stevan little
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 {

Re: if not C, then what?

2004-07-12 Thread Jonadab the Unsightly One
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

Data::Page is at 100%

2004-07-12 Thread Andy Lester
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?

Re: push with lazy lists

2004-07-12 Thread Dave Whipp
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

Re: Python::Bytecode

2004-07-12 Thread Gregor N. Purdy
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.

Re: Python::Bytecode

2004-07-12 Thread Dan Sugalski
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!)

Python::Bytecode 2.3

2004-07-12 Thread Dan Sugalski
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

Re: The .bytes/.codepoints/.graphemes methods

2004-07-12 Thread Jonadab the Unsightly One
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

Re: push with lazy lists

2004-07-12 Thread Austin Hastings
--- 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

Python::Bytecode 2.4. This time I mean it!

2004-07-12 Thread Dan Sugalski
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.

Re: push with lazy lists

2004-07-12 Thread Larry Wall
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

Re: push with lazy lists

2004-07-12 Thread Austin Hastings
--- 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

Re: question regarding rules and bytes vs characters

2004-07-12 Thread Larry Wall
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

Re: push with lazy lists

2004-07-12 Thread Larry Wall
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).

Parrot_sprintf_format ...

2004-07-12 Thread Leopold Toetsch
... 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:

Re: question regarding rules and bytes vs characters

2004-07-12 Thread Austin Hastings
--- 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

[perl #30683] t/pmc/fixedpmcarray.t test 9 counts system qsort hence fails

2004-07-12 Thread via RT
# 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

[ANNOUNCE] Test::Tester 0.09

2004-07-12 Thread Fergal Daly
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

Re: [perl #30683] t/pmc/fixedpmcarray.t test 9 counts system qsort hence fails

2004-07-12 Thread Brent 'Dax' Royal-Gordon
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