Rakudo Star silent exit on subset violation?

2010-07-29 Thread Ovid
ing ignored for negative numbers. If I change the first argument to a float such as 3.2, it seems to round it up to 4. Cheers, Ovid-- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog- http://blogs.perl.org/users/ovid/ Twitter - http://tw

Re: Custom errors on subsets?

2010-01-05 Thread Ovid
ut I'm still not expecting the sub call to be skipped silently due to a constraint failure. Silent failures are bad :) Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog- http://use.perl.org/~Ovid/journal/ Twitter - http://twitt

Re: Custom errors on subsets?

2010-01-05 Thread Ovid
_ is not a filename" }; sub foo (Filename $name) { say "Houston, we have a filename: $name"; } foo($*EXECUTABLE_NAME); say "before"; foo('no_such_file'); say "after"; Output: Houston, we have a filename: /Users/ovid/

Re: Custom errors on subsets?

2010-01-04 Thread Ovid
:OnFail { "Celsius temperature should be a Num >= -273.15, not '$_' " } With something akin to that, developers won't have to write extra boilerplate every time a constraint fails. Plus, the code is friendlier :) Cheers, Ovid -- Buy the book - http://www.oreilly

Custom errors on subsets?

2010-01-04 Thread Ovid
output: Houston, we have a filename: /Users/ovid/bin/perl6 Houston, we have a filename: /Users/ovid/bin/perl6 Constraint type check failed for parameter '$name' in Main (file src/gen_setting.pm, line 324) Obviously the error message can use some work, but how would I

Re: Debugging Grammars

2009-12-29 Thread Ovid
As a follow-up to this, I have my code posted at http://blogs.perl.org/users/ovid/2009/12/configini-in-perl-6.html While my admittedly clumsy grammar matches, transforming it into an AST has failed miserably. Aside from the advent calendar or the online docs at http://perlcabal.org/syn/S05

Re: Debugging Grammars

2009-12-27 Thread Ovid
It's a parsing error in Rakudo at the moment -- it *should* be > telling you that it found a '??' but no '!!'. Again, the new > version (arriving in a week or so) should be better about such > messages. Aargh! That one bugs me. I can see how I made that mist

Debugging Grammars

2009-12-27 Thread Ovid
P token causes the grammar to fail to match. In short, just about anything I touch seems to break the grammar :) Any suggestions welcome. Cheers, Ovid-- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog- http://use.perl.org/~Ovid/journal/ Twitter - http://twitter.com/OvidPerl Official Perl 6 Wiki - http://www.perlfoundation.org/perl6

Re: Compiler Toolkit

2009-11-24 Thread Ovid
c -1 ((unknown file):-1) strip installable_xyz strip: can't open file: installable_xyz (No such file or directory) Cheers, Ovid -- Buy the book - http://www.oreilly..com/catalog/perlhks/ Tech blog- http://use.perl.org/~Ovid/journal/ Twitter

Compiler Toolkit

2009-11-24 Thread Ovid
meLang' doesn't help because it refers me to non-existent files. Anyone know about about this area and can fix up a few things so people can dive back into writing compilers? Cheers, Ovid -- Buy the book - http://www.oreilly..com/catalog/perlhks/ Tech blog - htt

Re: unusual invocants

2009-10-21 Thread Ovid
where: 1. A class consumes two (or more) roles 2. Each roles provides a method with an identical signature 3. The methods are not equivalent and neither role can rely on the other's method With that, you have roles which cannot be composed. You must rewrite one (bad if you don't own

Re: Freezing role methods

2009-10-15 Thread Ovid
uding being code smells). However, if roles start making their way on to the CPAN, you won't necessarily have control over the source code, forcing you to fork or simply not use the role in question. Regrettably, that defeats the purpose of roles -- namely, to facilitate code reuse. Cheers

Re: Freezing role methods

2009-10-15 Thread Ovid
y binding the other x() to its role, thus guaranteeing that no role can get the wrong x(), but still allowing classes full control over their composition. I need to read the other responses more closely to understand their reasoning. So far, they seem wrong to me, but that's probably bec

Re: Freezing role methods

2009-10-14 Thread Ovid
cribed in the paper allows the consumer, C, to statically bind the method foo() in the methods in the appropriate role which call it. Dynamic binding defers the decision which causes implementation details to leak to consumers of C. This means that if you change your roles, your consumers will

Trait researches on "class wins" in role composition

2009-10-14 Thread Ovid
finally realized that Java needed to do: they provide an @Override annotation for methods which override parent methods. The compiler should warn if an overridden method is not annotated as such (http://java.sun.com/javase/7/docs/api/java/lang/Override.html). See http://use.perl.org/~Ovid/journal

Freezing role methods

2009-10-14 Thread Ovid
That is to say, the x() in question would become private and statically bound to the invocants to ensure that they're always calling the correct x(). How would Perl 6 approach this issue? Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog- h

Re: [perl #69322] Segfault in say 4.HOW.HOW

2009-09-24 Thread Ovid
kudo $ ./perl6 -e 'say 4.^can(int)' Segmentation fault rakudo $ ./perl6 -e 'say 4.^can(Int)' # no output Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog- http://use.perl.org/~Ovid/journal/ Twitter - h

Re: Parrot in Firefox

2009-07-20 Thread Ovid
- Original Message > From: Ovid > > Hi all, > > Aza Raskin, the head of user experience at Mozilla labs > (http://en.wikipedia.org/wiki/Aza_Raskin), was giving a talk at the BBC today > and I asked him about multiple client-side language support. I forgot to

Parrot in Firefox

2009-07-20 Thread Ovid
could use the Parrot Compiler Toolkit to write a set of bindings to allow you to write your client-side in any language you like, include bespoke languages, if desired. I think this could be a very compelling feature and perhaps might pique Mozilla's interest. More to the point, A

Re: RFC: overriding methods declared by roles (Was: Re: Reusing code: "Everything but the kitchen sink")

2009-07-13 Thread Ovid
e pain in debugging might have been a side effect of the fast transformation from a complex inheritance hierarchy to a roles-based system. Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog- http://use.perl.org/~Ovid/journal/ Twitter - http://twitter.com/OvidPerl Official Perl 6 Wiki - http://www.perlfoundation.org/perl6

Re: YAPC::EU and Perl 6 Roles

2009-07-08 Thread Ovid
- Original Message > From: Jonathan Worthington > Ovid wrote: > > It needs the timed fuse() from a Bomb role and a non-lethal explode() from > > a > Spouse role, though each role provides both methods. > I'm curious... > > 1) How often do you in

Re: YAPC::EU and Perl 6 Roles

2009-07-08 Thread Ovid
ch cleaner that what I see here. You see, with Jonathan's, you only have to provide methods for what you're disambiguating, It seems like your code would require that I specifically list every method which is handled, which would clearly get unwieldy with large roles or many ro

YAPC::EU and Perl 6 Roles

2009-07-07 Thread Ovid
s a note that one can "simply to write a class method that overrides the conflicting role methods, perhaps figuring out which role method to call", but I don't understand how a particular role's methods would be called here. Cheers, Ovid -- Buy the book - http://www.orei

rakudo.org rss

2009-06-11 Thread Ovid
The RSS feed for rakudo.org shows the last update as Feb 28, 2009. Wasn't certain from the site where I should send a contact email. Thus, rss complaint list spam! http://rakudo.org/rss.xml Cheers, Ovid PS: Thanks for all of the fantastic work, folks! -- Buy the book -

Roles driven by events

2009-03-16 Thread Ovid
that in Perl 6? Or am I just looking at this wrong? Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog- http://use.perl.org/~Ovid/journal/ Twitter - http://twitter.com/OvidPerl Official Perl 6 Wiki - http://www.perlfoundation.org/perl6

Re: Recursive Runtime Role Reapplication Really Rebounds

2009-03-12 Thread Ovid
from Moose instead of Perl 6 and didn't know about this :) Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog - http://use.perl.org/~Ovid/journal/ Twitter - http://twitter.com/OvidPerl Official Perl 6 Wiki - http://www.perlfoundation.org/perl6

Re: Recursive Runtime Role Reapplication Really Rebounds

2009-03-09 Thread Ovid
- Original Message > From: Ovid > Eventually, the code broke and threw a bunch of weird "recursive inheritance" > warnings due to multiple anonymous classes being applied to the object. This > was *real fun* to debug, but I can imagine a scenario for this be

Recursive Runtime Role Reapplication Really Rebounds

2009-03-08 Thread Ovid
something which can be addressed in perl instead of Perl? Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog- http://use.perl.org/~Ovid/journal/ Twitter - http://twitter.com/OvidPerl Official Perl 6 Wiki - http://www.perlfoundation.org/perl6

Re: Rakudo repository -- svn or git?

2009-01-28 Thread Ovid
#x27;s OK, but I would definitely prefer git. I've only used it for a few small projects, but already it's impressed the heck out of me for its behavior in both big things (branching) and small things (git diff automatically pages). Cheers, Ovid -- Buy the book - http://www.o

Re: .trim and 'gilding the lilly'

2009-01-24 Thread Ovid
#x27;s nice to get a slightly better idea of what others are thinking. (And a bit thanks to chromatic for regularly posting those updates. It helps a lot) Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog - http://use.perl.org/~Ovid/journal

Re: .trim and 'gilding the lilly'

2009-01-24 Thread Ovid
joke. Mostly) I'd still opt for removing .chop, though. I think only once have I ever seen it used appropriately. All other times the user wanted .chomp. Cheers, Ovid

.trim and 'gilding the lilly'

2009-01-24 Thread Ovid
ween convenience functions and the bare minimum? Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog- http://use.perl.org/~Ovid/journal/ Twitter - http://twitter.com/OvidPerl Official Perl 6 Wiki - http://www.perlfoundation.org/perl6

Re: RFD: Built-in testing

2009-01-24 Thread Ovid
("hey, we keep failing out credit card tests. We should look into this more carefully!"). Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog- http://use.perl.org/~Ovid/journal/ Twitter - http://twitter.com/OvidPerl Official Perl 6 Wiki - http://www.perlfoundation.org/perl6

[PATCH] Updated trim() functions

2009-01-23 Thread Ovid
Tests for this are already committed to Pugs. I'll remove the fudge when/if this gets applied. Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog- http://use.perl.org/~Ovid/journal/ Twitter - http://twitter.com/OvidPerl Offic

Re: RFD: Built-in testing

2009-01-22 Thread Ovid
aving different messages for different conditions will confuse me :) Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog- http://use.perl.org/~Ovid/journal/ Twitter - http://twitter.com/OvidPerl Official Perl 6 Wiki - http://www.perlfoundation.org/perl6

[PATCH] Updated Test.pm

2009-01-22 Thread Ovid
27;minimal' Test.pm which doesn't need advanced features, but until the new testing discussion is settled, I'm unsure of whether to proceed. Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog- http://use.perl.org/~Ovid/journal/ Twitter

Re: RFD: Built-in testing

2009-01-22 Thread Ovid
ut these points. I've been thinking about this and have realized that it also solves an intractable problem with Perl 5 tests: identifying tests. By promoting 'test' to a first class concept (not just adjectives), you can "name" a test. Right now, I'm trying to w

Re: RFD: Built-in testing

2009-01-22 Thread Ovid
d. If the &referrals method has :ok in it, this shouldn't impact the overall plan, right? Side note: for the desugar, I'd still prefer we go with 'have/want' instead of 'got/expected'. We've been wanting to do this with TAP for a while. It reads well and also aligns nicely for fixed-width fonts. Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog- http://use.perl.org/~Ovid/journal/ Twitter - http://twitter.com/OvidPerl Official Perl 6 Wiki - http://www.perlfoundation.org/perl6

Re: RFD: Built-in testing

2009-01-22 Thread Ovid
tion in the test description is very important on iterative tests or to distingiush similar tests (sometimes it would be nice to go so far as to ban identical test descriptions). Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog- http://use.perl.org/~Ovid/journal/ Twitter - http://twitter.com/OvidPerl Official Perl 6 Wiki - http://www.perlfoundation.org/perl6

Re: RFD: Built-in testing

2009-01-21 Thread Ovid
nt. Then we could have the following diagnostics: perl6 $ perl -MTest::Most=no_plan -e 'cmp_ok 3, "eq","3"' not ok 1 # have: 3 # test: eq # want: "3" 1..1 And then it's crystal clear why it failed. Cheers, Ovid

Test.pm and skip()

2009-01-21 Thread Ovid
stick with named parameters, but that's a bit odd since every other function exported uses positional parameters. Thoughts? Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog- http://use.perl.org/~Ovid/journal/ Twitter - htt

Re: Rakudo leaving the Parrot nest

2009-01-15 Thread Ovid
o's commitbit policy (depending on how > things end up). I buy the arguments put forward. Some had been explained before and now that I'm reminded, yeah, they make sense. Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog - http://us

Re: Rakudo leaving the Parrot nest

2009-01-15 Thread Ovid
t we have a bunch of architecture based on bad technology, then we're making the decision for the wrong reason. (I just need to install svk and have at least *some* of my subversion pain go away) Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog

Re: Rakudo leaving the Parrot nest

2009-01-14 Thread Ovid
uite and eliminating fudge seems like a great simplification to me. Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog- http://use.perl.org/~Ovid/journal/ Twitter - http://twitter.com/OvidPerl Official Perl 6 Wiki - http://www.perlfoundation.org/perl6

Re: [perl #62366] AutoReply: [PATCH] Add 'no_plan' and die_on_fail to Test.pm

2009-01-14 Thread Ovid
since the tests say 'use Test', I'm unsure of how to do that. Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog- http://use.perl.org/~Ovid/journal/ Twitter - http://twitter.com/OvidPerl Official Perl 6 Wiki -

Re: [perl #62366] AutoReply: [PATCH] Add 'no_plan' and die_on_fail to Test.pm

2009-01-14 Thread Ovid
- Original Message > From: perl6 via RT > This patch implements die_on_fail (halts test at first test failure), but > only > if the author calls the &die_on_fail sub in their test. This patch works much better when attached to the email :) Jeers, Ovid

Re: Trimming arrays

2009-01-14 Thread Ovid
, but what if the values are pairs? Then wouldn't you effectively be apply the hyperop recursively throughout the data structure? That might be expensive and have unwanted side-effects ("what do you mean my hash had a reference to your ORM data?"). Cheers, Ovid -- Buy the b

Re: Extending classes in a lexical scope?

2009-01-14 Thread Ovid
wrote the wrong class name in writing that email. Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog - http://use.perl.org/~Ovid/journal/ Twitter - http://twitter.com/OvidPerl Official Perl 6 Wiki - http://www.perlfoundation.org/perl6

Re: New Test.pm (not a patch)

2009-01-13 Thread Ovid
- Original Message > From: Moritz Lenz > Ovid wrote: > > OK, I'm tired of submitting bug reports. > > Still bug reports are valuable. When you find your motivation again, > please continue to submit them. I meant that I was tired "for that one eveni

New Test.pm (not a patch)

2009-01-13 Thread Ovid
rough your terminal for the failure) * diagnostics on most tests * eliminate most multi-subs in favor of default "$description=''" arguments. * Better diagnostics for boolean ok/nok tests. It's still an awful, awful hack, but it's a start. Cheers, Ovid -- Buy the book

Re: [PATCH] Add .trim method

2009-01-12 Thread Ovid
for keys or it needs to not be allowed (and thus fail with AoHoA and similar complex data structures). > By the way, good work on this. Everyone loves useful string functions. Thanks. It's been lots of fun :) Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/

Re: Extending classes in a lexical scope?

2009-01-12 Thread Ovid
'Bar' is coupled to 'Foo' and needs to know 'Foo's implementation (a charming anti-inheritance argument). See #1 :) Or did you mean something completely different? Note that Liskov is great, but has issues at times when composition is unclea

Re: Trimming arrays

2009-01-12 Thread Ovid
7;trim' on arrays, but it's a no-op. Similar issues > with chomp and friends. > > It should probably say "No such method". We have hyperops now to apply > scalar operators to composite values explicitly: > > @array».=trim Won't that fail with &#x

Trimming arrays

2009-01-12 Thread Ovid
What should this output? my @array = ' foo ', ' bar '; @array .= trim; say @array.perl; And what if I have an array of hashes of hashes of arrays? Currently you can call 'trim' on arrays, but it's a no-op. Similar issues with chomp and fri

Re: Extending classes in a lexical scope?

2009-01-12 Thread Ovid
ecified. Actually, I'd prefer to go much further than this: use Core 'MyCore'; And have that override core classes lexically. That solves the "but I want it MY way" issue that many Perl and Ruby programmers have, but they don't shoot anyone else in the foot.

[PATCH] Revised .trim patch

2009-01-12 Thread Ovid
learer and now has tests. Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog- http://use.perl.org/~Ovid/journal/ Twitter - http://twitter.com/OvidPerl Official Perl 6 Wiki - http://www.perlfoundation.org/perl6 trim.patch Description: Binary data

Re: [PATCH] Add .trim method

2009-01-12 Thread Ovid
left/right, leading/trailing, Catholic/Protestant implementation. I'll submit a patch for trim with the spectest data updated and work on the rest after the dust settles. Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog- http://use.perl.org

Re: [PATCH] Add .trim method

2009-01-12 Thread Ovid
jobbie, so it's important to get it RIGHT or it will be LEFT out. (I kill me. I really do :) Beers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog- http://use.perl.org/~Ovid/journal/ Twitter - http://twitter.com/OvidPerl Official Perl 6 Wiki - http://www.perlfoundation.org/perl6

Re: [PATCH] Add .trim method

2009-01-12 Thread Ovid
empty list"); Results in: not ok 10 - trim on empty list # have: "" # want: [] Note that this output is from my locally hacked version of Test.pm which is kind enough to tell you what the failure is. I'll submit a patch for that later. Cheers, Ovid -- Buy the book

Re: [PATCH] Add .trim method

2009-01-12 Thread Ovid
does > > both). So maybe trim_start and trim_end if we wanted to take that lead... > > How about .trim(:start) and .trim(:end)? So if: 1. No params, trim all 2. :start or :end, only trim that bit (not a negated option :) 3. If both, goto 1 Sound good? Cheers, Ovid -- Buy the book

Re: [PATCH] Add .trim method

2009-01-12 Thread Ovid
ing". > > That of course raises the question of how one *would* properly override > trim's concept of whitespace Change your locale to one with a different concept of whitespace (are there any?) Otherwise, would this be trying to stuff too much into one function? Cheers

Re: [PATCH] Add .trim method

2009-01-12 Thread Ovid
- Original Message > From: Larry Wall > On Mon, Jan 12, 2009 at 05:04:50AM -0800, Ovid wrote: > : ...the trivial $string.trim and trim($string) case. > > Hmm, I'd think .trim should work like .chomp, and return the trimmed > string without changing the original

Re: [PATCH] Add .trim method

2009-01-12 Thread Ovid
- Original Message > From: jesse > > On Mon, Jan 12, 2009 at 07:01:25AM -0800, Ovid wrote: > > > > > I could optionally make the following work: > > > > > > > > > > $string.trim(:leading<0>); > > > > > $st

Re: [PATCH] Add .trim method

2009-01-12 Thread Ovid
at you're going to trim, you'd couldn't just set variables to do it, though. You'd have to figure out which methods to call. Or all could be allowed and $string.trim(:leading<0>) could all $string.rtrim internally. Cheers, Ovid -- Buy the book - http://www.ore

Re: [PATCH] Add .trim method

2009-01-12 Thread Ovid
meters aren't there. I'm happy to finish the work according to whatever spec is agreed upon. I want this badly enough that it's important to me :) Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog- http://use.perl.org/~Ovid/journal/ Twitter - http://twitter.com/OvidPerl Official Perl 6 Wiki - http://www.perlfoundation.org/perl6

Re: [PATCH] Add .trim method

2009-01-12 Thread Ovid
- Original Message > From: Ovid > > This patch implements the .trim() method for strings. > > Now that I'm reading S29, I see there is no .trim() method there. I got that > because it was referenced in pugs in the cookbook (not in tests, though) and >

Extending classes in a lexical scope?

2009-01-12 Thread Ovid
l6 -e 'my @a = ; @a .= pick(*); @a.perl.say' ["g", "a", "f", "c", "e", "d", "b"] Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog- http://use.perl.org/~Ovid/journal/ Twitter - http://twitter.com/OvidPerl Official Perl 6 Wiki - http://www.perlfoundation.org/perl6

Re: [PATCH] Add .trim method

2009-01-11 Thread Ovid
Bummer :( Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog- http://use.perl.org/~Ovid/journal/ Twitter - http://twitter.com/OvidPerl Official Perl 6 Wiki - http://www.perlfoundation.org/perl6

Not a bug?

2009-01-11 Thread Ovid
I really don't think this is a bug, but it did confuse the heck out of me at first. This *is* expected behavior due to how {} is interpolated in strings, yes? $ perl6 -e 'my $foo = "foo";say "<" ~ $foo ~ ">"' $ perl6 -e 'my $foo =

[PATCH]: implement .trim method

2009-01-11 Thread Ovid
ts because I couldn't find any pugs tests for this :( What's the appropriate procedure for this? Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog- http://use.perl.org/~Ovid/journal/ Twitter - http://twitter.

[PATCH] Add .trim method

2009-01-11 Thread Ovid
++ for handholding on IRC. Oh, there are no tests because I couldn't find any pugs tests for this :( What's the appropriate procedure for this? However, all tests pass and a small test program passed (including calling trim() as a function). Cheers, Ovid -- Buy the book

Re: [perl #61990] [BUG] setset .WHAT returns incorrect value

2009-01-06 Thread Ovid
say $foo; # Str So that's probably bad coding (reusing a variable for different types) but it's legal. So maybe this is the correct behavior, but I expect it's going to confuse people. Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog- http://use.perl.org/~Ovid/journal/ Twitter - http://twitter.com/OvidPerl Official Perl 6 Wiki - http://www.perlfoundation.org/perl6

Hangman in Perl 6

2008-12-31 Thread Ovid
I wrote a hangman game in Perl 6. Suggestions are very welcome. Some issues with it are from things I don't understand. Others are due to bugs or limitations in Rakudo. http://use.perl.org/~Ovid/journal/38191 All in all, I'm quite pleased with how things are coming along. Ch

Bug or feature? Hash autovivification

2008-12-31 Thread Ovid
); sub foo ($obj is rw) {...} # same thing, basically my %hash; %hash = "foo"; # duh So is this a bug? Revision: 34706 $ uname -a Darwin curtis-poes-computer-3.local 9.5.1 Darwin Kernel Version 9.5.1: Fri Sep 19 16:19:24 PDT 2008; root:xnu-1228.8.30~1/RELE

Re: [perl #61772] AutoReply: Slurpy array 'is copy' returns incorrectly.

2008-12-28 Thread Ovid
Changed Rev: 34446 Last Changed Date: 2008-12-27 21:17:55 + (Sat, 27 Dec 2008) Darwin curtis-poes-computer-3.local 9.5.1 Darwin Kernel Version 9.5.1: Fri Sep 19 16:19:24 PDT 2008; root:xnu-1228.8.30~1/RELEASE_I386 i386 Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog

Re: Perl 6 pos() function?

2008-12-27 Thread Ovid
line 4, near "$letter> /" Revision 34446 on OS X Darwin. Is this a known failure? I think it's not supposed to work yet, but I unsure from the tests. If that's the case, the only work around I can think of is to split the word and individually compare each letter's

Perl 6 pos() function?

2008-12-27 Thread Ovid
uot;canonical" Perl 6 way of doing this? Preferably one which works with the current state of Rakudo :) Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog - http://use.perl.org/~Ovid/journal/ Twitter - http://twitter.com/OvidPe

Re: [perl #61052] [BUG]: r33482 Can't run 'make realclean' in languages/perl6 directory

2008-12-05 Thread Ovid
do, only in parrot so far). No, I don't need to do that. It comes from my 'rebuild' script and that's just finger memory on my part. Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog- http://use.perl.org/~Ovid/journal/ Twi

Re: [perl #60850] r33207: Multiple spectest failures on OS X

2008-11-26 Thread Ovid
ives_ok { $obj.doit(3) }, "'is default' trait makes otherwise ambigous method dispatch live"; is $obj.doit(3), 9, "'is default' trait tie-breaks on method dispatch"; $obj.doit(3) returns 6, not 9. Cheers, Ovid -- Buy the book - http://

Re: [perl #60850] r33207: Multiple spectest failures on OS X

2008-11-26 Thread Ovid
uce this, that would be fantastic. I won't be home any time soon. Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog- http://use.perl.org/~Ovid/journal/ Twitter - http://twitter.com/OvidPerl Official Perl 6 Wiki - http://www.perlfoundation.org/perl6

Re: [perl #60510] Bad plan: t/spec/S29-conversions/ord_and_chr.rakudo

2008-11-13 Thread Ovid
ersion of Test::Harness are you running? This looks like 2.X version output and I'm running 3.15. There might be a bug in the newer version which is losing that information. My best friend from the US arrives in a few hours, though, so there's not likely to be much follow

Re: [perl #60510] Bad plan: t/spec/S29-conversions/ord_and_chr.rakudo

2008-11-13 Thread Ovid
it to a file and attached it (teeing the spectest rusults to a file was spectacularly disappointing. It doesn't play well with tee). Cheers, Ovid perl6 $ make spectest ../../parrot perl6.pbc --target=pir --output=Test.pir Test.pm cd t/spec && svn up US03-junctions/misc.t US0

Parrot doesn't build on OS X

2008-11-01 Thread Ovid
]: *** [PGE.pbc] Bus error make[1]: *** Deleting file `PGE.pbc' make: *** [compilers.dummy] Error 2 $ uname -a Darwin curtis-poes-computer-2.local 9.5.0 Darwin Kernel Version 9.5.0: Wed Sep 3 11:29:43 PDT 2008; root:xnu-1228.7.58~1/RELEASE_I386 i386 Cheers, Ovid -- Buy the book - http:/

Known Bug in Rakudo?

2008-10-30 Thread Ovid
7; pc 17077 (perl6.pir:179) *** glibc detected *** double free or corruption (!prev): 0x084eaaf0 *** This is Parrot 0.8.0. $ uname -a Linux critix 2.6.8-2-686-smp #1 SMP Tue Aug 16 12:08:30 UTC 2005 i686 GNU/Linux Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/

Re: Parrot on mobile platforms?

2008-10-23 Thread Ovid
oper who would be a great fit for a challenge like this (if he's interested). Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog- http://use.perl.org/~Ovid/journal/ Twitter - http://twitter.com/OvidPerl Official Perl 6 Wiki - http://www.perlfoundation.org/perl6

Re: [perl #60016] [PATCH] Make basic Perl 6 tests pass

2008-10-21 Thread Ovid
one-liner: perl6 $ ../../parrot perl6.pbc -e 'my $x = 3; $x **= 2; say $x' 3 Unless, of course, this isn't supposed to be implemented yet, but that seems strange since it's in the basic tests. Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Te

Re: [perl #60016] AutoReply: [PATCH] Make basic Perl 6 tests pass

2008-10-20 Thread Ovid
You might not notice the tests failing, but that's because "make test" seems to run the harness 3 times and the failing test is in the first run. If you don't notice this, you won't notice these tests failing. Cheers, Ovid -- Buy the book - http://ww

Re: [perl #60016] AutoReply: [PATCH] Make basic Perl 6 tests pass

2008-10-20 Thread Ovid
similar) is important as those who want to play with Rakudo will see a test failure if they run 'make test' as the README instructs. Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog- http://use.perl.org/~Ovid/journal/ Twitter

Re: Fw: Running Perl 6 Tests

2008-10-20 Thread Ovid
e strange assignments ("+^="?), so I assumed their values were correct. Bummer. Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog- http://use.perl.org/~Ovid/journal/ Twitter - http://twitter.com/OvidPerl Official Perl 6 Wiki - http://www.perlfoundation.org/perl6

Re: Running Perl 6 Tests

2008-10-20 Thread Ovid
with "use Test;" to at least ensure that "make perl6" passes and people don't get confused when trying to build. I'd be happy to update that test and send a patch. Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog

Fw: Running Perl 6 Tests

2008-10-20 Thread Ovid
It would help if I sent this to the correct mailing list. Oops. Cheers, Ovid --- On Mon, 20/10/08, Ovid <[EMAIL PROTECTED]> wrote: > I've been doing some work integrating Perl 6 into vim > and now I'm trying to figure out how to run individual > Perl 6 tests. It app

Running Perl 6 Tests

2008-10-20 Thread Ovid
ot; to fail, even though it's merely a parse error. The Test.pm module appears to work (I've only checked it superficially), so why not use that to make some of these tests a bit easier to write? Are we trying to avoid loading modules while testing core features? Cheers, Ovid

Re: Should C and C work in C ?

2008-06-30 Thread Ovid
--- On Mon, 30/6/08, Ovid <[EMAIL PROTECTED]> wrote: > --- On Sun, 29/6/08, Patrick R. Michaud > <[EMAIL PROTECTED]> wrote: > > > Do C and C act like the > > C method, in that > > they work for C object and not just objects > of > > type

Re: Should C and C work in C ?

2008-06-30 Thread Ovid
d new junctions based on the values of old junctions. grep and map would make that trivial. If I've misunderstood, feel free to print this out and burn it :) Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog- http://use.perl.org/~Ovid/j

Bugs or Unimplemented Features?

2008-06-24 Thread Ovid
much of an option because I love to take breaks from email from time to time). Cheers, Ovid Null PMC access in type() current instr.: 'fact' pc 334 (EVAL_15:127) called from Sub '_block11' pc 34 (EVAL_15:17) called from Sub 'parrot;PCT::HLLCompiler;eval' pc 806

Re: [perl #56236] [BUG]: Unable to 'make perl6' on OS X 10.4 PPC

2008-06-24 Thread Ovid
/gen_builtins.pir:584) called from Sub 'parrot;Perl6::Compiler;main' pc -1 ((unknown file):-1) I get the same error even if I do "../../parrot perl6.pbc hello.pl". Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog- http://use.perl.org/~Ovid/journal/ Twitter - http://twitter.com/OvidPerl Official Perl 6 Wiki - http://www.perlfoundation.org/perl6

Re: [perl #56236] [BUG]: Unable to 'make perl6' on OS X 10.4 PPC

2008-06-24 Thread Ovid
Forget everything I wrote. I missed a couple of files in my cleaning. I got rid of them, did a 'make clean && make perl6' and now everything is just dandy. Thanks for the help. Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog

Re: [perl #56236] [BUG]: Unable to 'make perl6' on OS X 10.4 PPC

2008-06-24 Thread Ovid
--- Ovid <[EMAIL PROTECTED]> wrote: > > I tried again, and 'make perl6' succeeded at r27371. > > > > The plot thickens! > > w00t! I'll try this when I get home tonight. This is great news. Nope. 'make test' and 'make perl6' b

Re: [perl #56236] [BUG]: Unable to 'make perl6' on OS X 10.4 PPC

2008-06-24 Thread Ovid
I'll try this when I get home tonight. This is great news. Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog- http://use.perl.org/~Ovid/journal/ Twitter - http://twitter.com/OvidPerl Official Perl 6 Wiki - http://www.perlfoundation.org/perl6

Building Junctions from Junctions

2008-06-23 Thread Ovid
the old junction, but with some values removed. How do I do that in Perl 6? I can't see that in the docs. Clearly we don't this to be done destructively as I suspect this will break autothreading, but building new junctions based on old junctions seems reasonable. Cheers, Ovid -- B

  1   2   3   4   >