Comment: RabbitMQ (Score 1) on 2010.03.12 17:20
I have no experience but I've considered it a few times. If I remember correctly it speaks HTTP/JSON like CouchDB so accessing via perl (or anything) is easy.
I have no experience but I've considered it a few times. If I remember correctly it speaks HTTP/JSON like CouchDB so accessing via perl (or anything) is easy.
a few members of pdx.pm (including me) are working on a benchmarking framework with the intent of being able to build nice charts and graphs to show rakudo getting faster and to compare it to perl5. We're using the euler problem set just as an example for now but if you have specific specs that you would like us to hit I would love to hear them.
{after some poking from Eric Wilhelm I'll post this here as well}
I'm part of PDX.pm and we've started a project to collect solutions to euler problems as a way to benchmark rakudo. We would love to have you join in the fun. Currently everything is up on github (http://github.com/notbenh/euler_bench/tree/master).
I'm part of PDX.pm and we've started a project to collect solutions to euler problems as a way to benchmark rakudo. We would love to have you join in the fun. Currently everything is up on github (http://github.com/notbenh/euler_bench/tree/master).
You can simply enforce typing:
use Carp::Assert::More;
sub recip {
my ($num) = @_;
assert_nonzero($num);
return 1/$num;
}
Then write one test to make sure that it works:
is( recip(2),
one to show that it dies correctly:
dies_ok sub{recip(0)};
and your done, any bugs that come up later can be tested then.
package My::Map;
#stuff
package My::City;
use Moose;
has [qw{longitude latitude}] => (
is => 'rw',
#could make your own type, though for consistency
isa => 'Num',
);
has name => (
is => 'rw',
isa => 'Str',
);
has map => (
is => 'rw',
isa => 'My::Map',
default => sub {
use My::Map;
My::Map->new;
},
);
#needless, but here for consistency
sub setMap { shift->map(@_) };
sub routeTo {
my ($self, $targetCity) = @_;
#stuff
}
So the code is not that much different, Though you gain one big plus, type checking for setMap.
This doesn't make the wrong things wrong-er but it does make the right thing easier.