Factoring integers in Perl

Recently I've been working on factoring and primality proofs (with certificates) for Math::Prime::Util. I thought I'd give a brief summary and comparison of the modules I know of for factoring integers from Perl.

Perl && jQuery && XML && ! taconite

Hi All

If you're in a hurry, jump to my latest (6th) Perl + jQuery tutorial.

In short: I don't use the clever jQuery add-on taconite because it supports only commands (verbs) and I needed conditional execution (an 'if').

Nevertheless, I pinched-er-adapted the idea to unilaterally update some parts of the DOM, and to conditionally update other parts.

Happy reading...

When Must You Test Your Code?

Recently I wrote about how to be agile without testing (if you haven't read that, you should do so before reading this). I was planning on a follow-up after some comments came in and so far the reaction was decidedly mixed. I think that's a shame because not many people seemed to focus on the punchline:

And that's really the most interesting idea of this entire post: your customer's behavior is more important than your application's behavior.

Perl Tutorial in 10 languages

Just a little more than a month ago I only had the English version of the Perl Tutorial I have been writing for a while. Then Felipe da Veiga Leprevost offered to translate it to Portuguese and now there are 9 more translations at various stages.

It is extremely nice to see people volunteer their time to help others....

Travis CI ♥ Perl

Travis CI is a hosted continuous integration service for the open source community.

Essentially you set up a git post-commit hook that causes your tests to get run on every commit, against a number of different Perl versions, with databases and other services available if needed. And it's all free!

If you visit https://travis-ci.org/ you can get a feel for the interface and the tests that are being run. For a particular commit you get a build, for example WebService::Nestoria::Search build 1, which has a sub-build per Perl version, for example WebService::Nestoria::Search build 1.1 (perl 5.16). As you can see you get the full output from the Ubuntu VM that's running your tests, so if anything does go wrong it's pretty simple to debug.

For the rest of this post I'm going to describe the integration process, in particular hitting on how to make it work with Dist::Zilla-based projects.

Thought for the day: Perl 5 is English; Perl 6 is Esperanto.

Esperanto may be a saner language than English in every way.

But English is the language of Shakespeare, of Milton, of Byron, of Dylan Thomas; the language of Arthur Conan-Doyle and Agatha Christie; the language of Tolkien and C S Lewis; of Lewis Carroll and Beatrix Potter. It's the language of Stoker and Shelley.

Wikipedia notes that over 100 original novels have been published in Esperanto. Big woop-dee-doo(!)

I want to be able to use Perl 6 day to day, but not if that involves missing out on Perl 5's literature (i.e. CPAN).

Thank you Ack!

People may have noticed my absence from the Perl world lately. I have been writing my Ph.D. thesis (179 pages on Ultrafast Electron Microscopy with my Physics::UEMColumn Perl module featured) and defense.

Ack is a tool for searching code and text. It works much like the unix tool grep, although it is imbued with the power of Perl. To mark the release of Ack 2.0 though I wanted to mention a few one-liners that made my life easier in this stressful time.

Ruby's share drops on github, Perl's stays

Source: https://github.com/languages

Oct 4, 2012:
JavaScript 21%
Ruby 14%
Python 8%
Java 8%
Shell 8%
PHP 7%
C 6%
C++ 4%
Perl 4%
Objective-C 3%
Apr 19, 2013:

Idea - costmodel for B::Stats

Co-workers often ask me, what is faster. This or this?

Of course you can benchmark the real speed, but theoretically you can look at the optrees and predict what will be faster.

mozilla:ldap error

We are getting the version check failed on the perl Mozilla LDAP module installed from redhat package.
#Perl -MMozilla::LDAP::Utils -e 1

Mozilla::LDAP::Utils does not define $Mozilla::LDAP::Utils::VERSION--version check failed at /usr/lib64/perl5/vendor_perl/Mozilla/LDAP/Conn.pm line 52.
BEGIN failed--compilation aborted at /usr/lib64/perl5/vendor_perl/Mozilla/LDAP/Conn.pm line 52.
Compilation failed in require at /usr/lib64/perl5/vendor_perl/Mozilla/LDAP/Utils.pm line 49.
BEGIN failed--compilation aborted at /usr/lib64/perl5/vendor_perl/Mozilla/LDAP/Utils.pm line 49.
Compilation failed in require.
BEGIN failed--compilation aborted

mod_perl 2.0.8 has been released

I'm pleased to announce that mod_perl 2.0.8 is coming to a CPAN mirror near you, as well as the following Apache project website links (note that the Apache.org links may take a few hours to propagate to the mirrors).

Thanks to all the contributors on this version!

http://apache.org/dist/perl/mod_perl-2.0.8.tar.gz
http://apache.org/dist/perl/mod_perl-2.0.8.tar.gz.asc (pgp sig)

30 Million Reports

Congratulations to Nigel Horne for submitting the 30 millionth CPAN Testers Report. The report itself was a PASS for DBI.

Perl 5.18: getline and $/ = \N

Perl 5.18 will ship with a change in behaviour when using getline() (aka the <$handle> operator) on handles marked as returning Unicode where $/ is a reference to an integer.

perltricks.com - a new Perl website

I've started a new Perl website at perltricks.com. Through the website I'm publishing articles on all things Perl such as basic syntax guides, quick tips and tricks and community related news / profiles.

The site has been up for a few weeks and there are 19 articles so far. Check it out - I'd really like to hear any feedback or criticisms you have of the site. Particularly any suggestions on the style of the site, and ways to improve the programming examples.

If you would like to publish your own article via the site or have an idea for an article, please email me.

Edit: the site is powered by Catalyst and DBIx::Class using Template Toolkit.

Thanks !

Perl QA Hackathon 2013 in Lancaster - notes by Wendy (3a/4)

The end of the Perl QA Hackathon 2013 in Lancaster was as busy as it started. My drive to Manchester Airport with 3 hackers was enjoyable. I dropped two of them of at the airport and the third one at a lovely small hotel/b&b near the airport. The drive back was filled with Sevendust, rather loud, nice heavy metal, missed that for days.

Just before we left we were told to our big surprise that at 17:00 the building had to be empty, because of university rules. So nobody had time to do a standup and tell what they accomplished. So no list is made. Yet. Bit of a strange ending to an otherwise well-organised meeting. I hope the accomplishments will be collected and publicised in other ways, because it was a lot.

QA Hackathon 2013

Pre-hackathon:

We Tux

Day 1

My first day was largely spent analyzing and fixing bugs in the Module::Build::Tiny toolchain, and some Lancaster consensus discussions on various toolchain pieces. This was a very useful day, that ended with some wonderful food.

Day 2

Spent the first part of the day fixing bugs I made the day before, then helped out with other people's issues. Didn't participate in all consensus discussions as PAUSE isn't really my thing.

Day 3

Only

A Dead Simple CPAN API

Since the crowd funding campaign for Pinto is already off to such a great start, I figured that I better roll up my sleeves and start writing some code. The primary goal of the campaign is to enable Pinto users to pull specific versions of modules into their repository without having to know precisely which distribution they came from. Read on to hear what I've done so far...

I Bless You in the Name of the Stringified Object

A co-worker came to me today with a curious error message:

use DateTime;
my $date = DateTime->new( year => 2013, month => 4, day => 15 );
$date->set_time_zone("Australia/Sydney");
print $date->today;'

This code gives the error Can't locate object method "_normalize_nanoseconds" via package "2013-04-15T00:00:00" at /usr2/local/perlbrew/perls/perl-5.16.3/lib/site_perl/5.16.3/x86_64-linux-thread-multi/DateTime.pm line 252.

The package "2013-04-15T00:00:00" is the curious part: It looks like a stringified DateTime, but who could possibly be stringifying a DateTime object and then using that as a package name?

My Perl Pitch to Students

I blogged about visiting Evozon and giving a Perl pitch talk to students, trying to get them interested in Perl. I've decided to share the draft I wrote a day earlier with the ideas I wanted to express. So, here it is:

Introducing Type::Tiny

Type::Tiny is a tiny (no non-core dependencies) framework for building type constraints. OK, probably not that exciting. How can I grab your attention?

                         Rate            WithMoose WithMooseAndTypeTiny
 WithMoose             8071/s                   --                 -25%
 WithMooseAndTypeTiny 10778/s                  34%                   --

The benchmark script is shown later so you can check I'm not doing anything hideously unfair to disadvantage Moose.

How can I hold your attention?

About blogs.perl.org

blogs.perl.org is a common blogging platform for the Perl community. Written in Perl with a graphic design donated by Six Apart, Ltd.