Re: perl6 Testing

2009-01-22 Thread Moritz Lenz
fREW Schmidt wrote: > I'd like to get started adding these: > > is capitalize(:string($a)), "Pugs Is Cool!", "capitalize works with named > arg" > > rakudo and pugs both fail this test. Should I add it anyway? Yes. We have a mechanism for skipping tests that the implementations fail. Just write

perl6 Testing

2009-01-22 Thread fREW Schmidt
Hi! I'd like to get started adding these: is capitalize(:string($a)), "Pugs Is Cool!", "capitalize works with named arg" rakudo and pugs both fail this test. Should I add it anyway? And should I just mail patches to rakudo...@perl.org? Or should this technically be pugs? -- -fREW

Re: RFD: Built-in testing

2009-01-22 Thread Timothy S. Nelson
On Wed, 21 Jan 2009, Dave Whipp wrote: Moritz Lenz wrote: A few months ago Larry proposed to add some testing facilites to the language itself, because we want to culturally encourage testing, and because the test suite defines the language, so we need to specify the behaviour of our testing fa

Re: RFD: Built-in testing

2009-01-22 Thread Timothy S. Nelson
On Thu, 22 Jan 2009, Richard Hainsworth wrote: 4) Testing software is different from debugging or running software. Running is about providing functionality to the user. Debugging is about getting expected behaviour and discovering why behaviour exhibited is not what is expected / specified. T

Re: RFD: Built-in testing

2009-01-22 Thread jason switzer
On Thu, Jan 22, 2009 at 4:51 PM, jerry gay wrote: > $x == $y >:ok({ .true ?? 'message' !! 'failure message' }) >:diag( 'tap comment', :some_tap_property) I just want to stress again that I would like to see no focus on just tap emitters. While I realize this is just an example, adverbs

Re: A Logo design for Rakudo Perl 6

2009-01-22 Thread Perl
On Jan 18, 2009, at 10:05 AM, Richard Dice wrote: Thank you for pointing this out And thanks for reminding me about that, too. It was in my notes, but I forgot to mention it. I *was* wondering what the circumstance was with the Perl-related trademarks the O'Reilly has. But if it's general

Re: [svn:parrot] r35869 - trunk/languages/perl6/src/classes

2009-01-22 Thread Jonathan Worthington
Will Coleda wrote: On Thu, Jan 22, 2009 at 11:45 AM, Patrick R. Michaud wrote: On Wed, Jan 21, 2009 at 09:00:23AM -0800, c...@cvs.perl.org wrote: Author: coke Date: Wed Jan 21 09:00:22 2009 New Revision: 35869 Modified: trunk/languages/perl6/src/classes/Range.pir Log: Add a basic

Re: RFD: Built-in testing

2009-01-22 Thread Ovid
- Original Message > From: jerry gay > On Thu, Jan 22, 2009 at 09:22, Moritz Lenz wrote: > > Richard Hainsworth wrote: > > But it is interesting to think about the case where a user wants two > > different diagnostic test messages (to all the testing gurus out there: > > do you actually

Re: RFD: Built-in testing

2009-01-22 Thread jerry gay
On Thu, Jan 22, 2009 at 09:22, Moritz Lenz wrote: > Richard Hainsworth wrote: > But it is interesting to think about the case where a user wants two > different diagnostic test messages (to all the testing gurus out there: > do you actually want such a feature?). It shouldn't be too hard to do; >

Re: design of the Prelude (was Re: Rakudo leaving the Parrot nest)

2009-01-22 Thread Darren Duncan
Dave Whipp wrote: Darren Duncan wrote: Dave Whipp wrote: sub sqrt(Num where { 0 <= $_ <= Real::Max } $x) { (0..$x/2 :by(Real::Epsilon)).min: { abs $x - $^candidate ** 2 } } So do you really mean "as declarative a manner as possible"? Or would you consider this example to go beyond "possib

Re: RFD: Built-in testing

2009-01-22 Thread Moritz Lenz
Ovid wrote: > One concern is where Larry asks: > > I wonder how often we'd have people making the error > of trying to interpoalte into :ok > > > > I'd be one of them. The following is a very common idiom: > > for my $method (@methods) { > can_ok $object, $method; >

[PATCH] Updated Test.pm

2009-01-22 Thread Ovid
The attached patch updates languages/perl6/Test.pm. I realize that with the new testing discussion, this may be useless in the long run, but if anyone is hacking on Rakudo now, they might find it useful. Features: 1. 'no_plan' is now supported: plan *; 2. Diagnostics: is 2,3; #

[perl #62612] [BUG] parrot revision 35872 broke pick

2009-01-22 Thread Will Coleda via RT
On Thu Jan 22 06:58:15 2009, coke wrote: > This is my fault; > > I added a simplistic Range.pick without running the spectest. > > The original functionality defaulted to flattening the range into a > list, which made (1..1000).pick.say rather slow. > > I added Range.pick() (no args), but m

Re: RFD: Built-in testing

2009-01-22 Thread Moritz Lenz
There are a few interesting points on which I'd like to comment Richard Hainsworth wrote: > In other words, test functionality sufficient for the compiler may not > be adequate for module testing. But other functions can be developed in > Test modules that can be hooked into a general testing ap

[perl #62634] [PATCH] Minor doc change in pmc.ops - PDD02 superseded

2009-01-22 Thread via RT
# New Ticket Created by Ron Schmidt # Please include the string: [perl #62634] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=62634 > The documentation on line 51 of src/ops/pmc.ops still refers to PDD02 which has been sup

[perl #62628] Math subsets and Class hierarchy

2009-01-22 Thread via RT
# New Ticket Created by Daniel Ruoso # Please include the string: [perl #62628] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=62628 > I'd expect the following: ok(1 ~~ Int, '1 is an Int); ok(1 ~~ Rat, 'the rational number

Re: RFD: Built-in testing

2009-01-22 Thread Moritz Lenz
Ovid wrote: > Regarding the disadvantages: > >> However nothing in life is free, we pay for it with a >> few disadvantages: >> * We nearly double the number of built-in operators >>by adding an :ok multi > > Yes, but conceptually this will be transparent to the end user, right? > They'll ju

Re: RFD: Built-in testing

2009-01-22 Thread Ovid
- Original Message > From: Moritz Lenz > > test Unit::Customer plan 3 { > > use Customer; > > my Customer $cust .= new( :fname, :lname); > > $cust.fname eq 'Billy' :ok; > > > > # plan assumes 2 referrals > > # won't work because we can't interpolate? > >

Re: [svn:parrot] r35869 - trunk/languages/perl6/src/classes

2009-01-22 Thread Will Coleda
On Thu, Jan 22, 2009 at 11:45 AM, Patrick R. Michaud wrote: > On Wed, Jan 21, 2009 at 09:00:23AM -0800, c...@cvs.perl.org wrote: >> Author: coke >> Date: Wed Jan 21 09:00:22 2009 >> New Revision: 35869 >> >> Modified: >>trunk/languages/perl6/src/classes/Range.pir >> >> Log: >> Add a basic vers

[perl #62588] [PATCH] inspect tests in t/pmc/class.t no longer seem to need commenting out

2009-01-22 Thread via RT
# New Ticket Created by Ron Schmidt # Please include the string: [perl #62588] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=62588 > The line in the test script read: # 'inspect'() # XXX must fix 'attributes' test On

Re: [svn:parrot] r35869 - trunk/languages/perl6/src/classes

2009-01-22 Thread Patrick R. Michaud
On Wed, Jan 21, 2009 at 09:00:23AM -0800, c...@cvs.perl.org wrote: > Author: coke > Date: Wed Jan 21 09:00:22 2009 > New Revision: 35869 > > Modified: >trunk/languages/perl6/src/classes/Range.pir > > Log: > Add a basic version of .pick() for Range and hopefully not break anything. The versio

[perl #62622] + doesn't DWIM enough in Rakudo

2009-01-22 Thread Carl Mäsak
# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #62622] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=62622 > masak: can you submit the 'my Int $x = +"2"' bug please? * masak submits rakudo: my In

Re: RFD: Built-in testing

2009-01-22 Thread Dave Whipp
Moritz Lenz wrote: $x == 1e5 :ok('the :ok makes this is a test'); I can't help feeling that there's an end-weight problem here: The fact that it is a test is the essence of statement. If we're thinking of it as a library, then the MMD way of thinking might be appropriate: we know it'

[perl #62612] [BUG] parrot revision 35872 broke pick

2009-01-22 Thread Ifejinelo Onyiah
# New Ticket Created by "Ifejinelo Onyiah" # Please include the string: [perl #62612] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=62612 > I have just updated my parrot & rakudo installation. I ran the spectests: make te

Re: RFD: Built-in testing

2009-01-22 Thread Dave Whipp
Moritz Lenz wrote: A few months ago Larry proposed to add some testing facilites to the language itself, because we want to culturally encourage testing, and because the test suite defines the language, so we need to specify the behaviour of our testing facilities anyway. If we're going to reva

Re: design of the Prelude (was Re: Rakudo leaving the Parrot nest)

2009-01-22 Thread Dave Whipp
Darren Duncan wrote: Dave Whipp wrote: sub sqrt(Num where { 0 <= $_ <= Real::Max } $x) { (0..$x/2 :by(Real::Epsilon)).min: { abs $x - $^candidate ** 2 } } So do you really mean "as declarative a manner as possible"? Or would you consider this example to go beyond "possible"? I would decl

[perl #62260] [BUG] END blocks don't see external variables

2009-01-22 Thread jn...@jnthn.net via RT
On Tue Jan 13 08:58:08 2009, pmichaud wrote: > On Tue, Jan 13, 2009 at 05:17:16PM +0100, Jonathan Worthington wrote: > > Patrick R. Michaud wrote: > >> Confirmed -- there are still issues with lexicals in a > >> variety of control blocks. > >> > >> > > I skimmed the code for that today. I notice

[perl #60924] Grammars in classes causes Rakudo to crash

2009-01-22 Thread jn...@jnthn.net via RT
On Sat Nov 29 17:03:22 2008, masak wrote: > Rakudo r33329 can't instantiate classes that contain a grammar. > > $ perl6 -e 'class A { grammar B {} }; A.new' > Null PMC access in get_string() > [...] Fixed in r35884, and tests added in Pugs r25000 (plus to make sure you can invoke rules in the nes

[perl #61350] Method declarations and nested classes don't collaborate well

2009-01-22 Thread jn...@jnthn.net via RT
On Sun Dec 14 02:13:42 2008, masak wrote: > In Rakudo r33860, the following happens when you try to put a method > in an outer class after having defined an inner class: > > $ perl6 -e 'class A { class B {}; method x { say self.WHAT } }; A.new.x' > Null PMC access in get_string() > [...] > > $ pe

[perl #61574] Rakudo doesn't treat inner classes as being contained in the namespace of outer ones

2009-01-22 Thread jn...@jnthn.net via RT
On Sun Dec 21 07:55:53 2008, masak wrote: > rakudo 34202: OUTPUT[Failure␤] > rakudo: class Outer { class Inner {} }; say Inner.WHAT > rakudo 34202: OUTPUT[Inner␤] > * masak submits rakudobug Fixed in r35884, and tests added in Pugs r24999. Thanks, Jonathan

Re: [perl #48014] [DEPRECATED] PMC union struct

2009-01-22 Thread Christoph Otto
Bernhard Schmalhofer via RT wrote: Christoph Otto schrieb: Christoph Otto via RT wrote: The attached patch implements this behavior and fixes two core PMCs that had been doing the inheritance manually. All tests in make test pass. I didn't bother testing any HLLs as this is more of a "here'

Re: RFD: Built-in testing

2009-01-22 Thread Ovid
- Original Message > From: Moritz Lenz > So Larry and Patrick developed the idea of creating an > adverb on the test operator instead: > > $x == 1e5 :ok('the :ok makes this is a test'); > > This is an adverb on the infix:<==> operator, and might > desugar to something like this:

Re: [perl #48014] [DEPRECATED] PMC union struct

2009-01-22 Thread Bernhard Schmalhofer
Christoph Otto schrieb: Christoph Otto via RT wrote: The attached patch implements this behavior and fixes two core PMCs that had been doing the inheritance manually. All tests in make test pass. I didn't bother testing any HLLs as this is more of a "here's what I'm thinking" patch, but it'

Re: [perl #48014] [DEPRECATED] PMC union struct

2009-01-22 Thread Christoph Otto
Christoph Otto via RT wrote: Allison Randal via RT wrote: Parent and child had to have the same struct in the original (because every PMC defined the same union val struct), and so still have to have the same struct in the new version. It is progress: at least the struct members will have mo

Re: RFD: Built-in testing

2009-01-22 Thread Richard Hainsworth
Moritz Lenz wrote: So I'd like to hear your opinions: do you think adverb-based testing is a good idea? If you don't like it, do you see any other good way to tackle the problems I mentioned above? After reading everything in this thread to date and in order to structure my thoughts, I wrot

Re: [perl #48014] [DEPRECATED] PMC union struct

2009-01-22 Thread Christoph Otto
Allison Randal via RT wrote: Christoph Otto wrote: The PMC UnionVal deprecation can't be completed until Parrot has improved ATTR reuse between extending PMCs. I'm rewriting code to minimize dependence on the PMC_x_val macros, but I can't eliminate them completely without better inheritance su

Re: RFD: Built-in testing

2009-01-22 Thread Ovid
- Original Message > From: jerry gay > since the :ok adverb is modifying the operator, perl knows what kind > of comparison is being attempted, and can automatically give smart > diagnostics. this point was taken into consideration when the > adverbial test syntax was originally design