John Anderson will be giving a talk at YAPC::NA 2012 described as:
Have you ever spent most of a day getting your editor set up “just right”? Have you justified the time spent on customizing your configuration in terms of the overall productivity gains that are going to result once you remember what key binding you put that new tweak on? Or maybe, whenever you see a tweak described for that _other_ editor, you can’t rest until you’ve duplicated and maybe even expanded upon it for the clearly superior editor you use? If the above hit too close to home — particularly if you’ve ever written a program specifically to allow you to more easily deploy your editor configuration on a new machine — this talk is for you.
We’re going to talk about editor tweaks that make writing, testing, running, and otherwise working with Perl faster and easier, so you can focus on the stuff that really matters: beer, go karts, and cool new editor color themes…
sub some_func {
require Some::CPAN::Module;
....
}
to delay loading of modules, I am interested in how much overhead this introduces.
After first successful require(), the subsequent require()'s of the same module is very fast (around 0.08µ on my PC) because all Perl does is just convert Some::CPAN::Module to Some/CPAN/Module.pm and check this against %INC. This kind of overhead is comparable to that of an empty subroutine call.
I have just uploaded
a late stage draft
of a Theory of Computation paper on Marpa to github.
The paper contains pseudocode,
a correctness proof,
and proofs of my complexity claims.
(Marpa, for those unfamiliar,
is a new, powerful and fast parser and parsing algorithm.
To learn more,
check out its web page.)
Progress in software follows two avenues --
implementation (aka "running code")
and theory.
With Marpa, it was my intention to pursue both.
This is not the usual practice,
but it's a natural choice in Marpa's case,
because the two feed each other.
It would have been simply
impossible to write the code for Marpa
without a theory of WHY the code worked,
what kind of speed I expected in which cases,
and WHY the code I was writing would be able to deliver
that kind of speed.
Lately I've been having weird sleeping hours. I sleep for 5 hours here, then 2 hours there, I stay up till 4am. I know, it sounds like I'm back in school, but really, I'm not.
Yesterday at 1:50am I had the opportunity to actually go to sleep. Should I? Yes! Will I? Hmm... well... maybe I'll just watch another episode of a TV series and hack a bit.
I recently read the "about" page of xkcd and saw there is now (or has been for a while?) a proper JSON output for the comics. This means you don't have to scrape the website to get the comics. This also means you can get a lot of data right away that you might not necessarily get by scrapping. Definitely not as easy, at least.
YAPC::NA 2012 is going to be great. Nope, not because of all the talks, or activities we have planned. It’s because this sculpture adorns the lobby of the Pyle Center (aka the conference facility for YAPC::NA 2012). This place was made for Perl. =)
What if I didn't have to install distributions, but instead just dropped the entire archive into a directory, much like a Java JAR file? I don't have a complete idea for this, but I have enough that I want to have public notes on it.
This is something that I think about when I can't do anything else. I'm on a bus or train in Chicago where any sign of Apple technology will get you jacked (the CTA even has signs telling people to be careful with their iPhones. Not Blackberrys or Samsung, or whatever, just iPhones). There's that time between finishing the in-flight magazine and reaching 10,000 feet, or waiting in line for passport control after I wonder if the guys with the guns would really shoot me if I took out my cell phone.
Steffen from modules@perl.org responded to my email yesterday and made me a co-maintainer of String::Strip. I've applied the 64 bit bug fix to it, and pushed 1.02 to CPAN. Thanks for everyone who responded to my thread yesterday about requesting co-maintainer. This is how open source is supposed to work!
Edit: orginially rchomp, but Aristotle’s suggestion of chomped is perfect!
brian d foy posed an interesting interview question: “What five things do you hate most about language X?” positing that an experienced user of X should know 5 things (s)he hates about it.
In my list is the return value of chomp. Yes I understand why it works as it does
print "chomped" if chomp $input;
but I find that use case happens far less often than the usual
chomp( my $input = <> );
It looks bad, and it is not intuitive, especially to the new user. Just today another one popped up on StackOverflow. This has got to be one of the most common questions on the site.
In a month an a half, we'll once more have the QA hackathon. Before going to Paris, I'm going to blog about the things that I want to do. I have a fairly packed list of things I'd like to do there; definitely more than I can do in 3 days, but fortunately there will be free-floating helpers that will hopefully help me out.
Also things that require feedback from other people.
Metadata now
Currently, there are three pieces of metadata that may be installed during a cpan install. They are neither complete, nor can one rely on their presence
.packlist
The packlist files contain a list of files that were installed. It's a very simple format, essentially just being a list of files and their types. Pretty much only useful for uninstalling distributions.
However, this is probably also why it's often absent. Many distributions, most notably Debian, remove them from their packages as they don't want the perl toolchain to uninstall files from debs.
I've made some progress in getting ccv to compile under Windows. Now I can start with opening up the API and writing some XS for it. Soon, the below image can be created completely from within Perl instead of using a shell call out to the executable to find "interesting" points in the object and the scene and match them together.
The SIFT algorithm seems to be quite a useful tool to do feature recognition without any prior training. I hope to (ab)use this to recognize objects and how they move around in movies. Also, I imagine this can be used to automatically stitch images together.
If you don't know it, Archive::Tar is SLOW; it even says so. Running NYTProf recently on a project revealed that the major part of the program was taking a little more than 27 seconds to run and a little over 24 seconds of this was Archive::Tar reading the archive into memory. Since I did not need the in memory feature, I switched to Archive::Tar::Wrapper. That sub now takes about 2.5 seconds to run and the equivalent portion to Archive::Tar->new($file); is now Archive::Tar::Wrapper->new; $arch->read($file); now takes 631 ms.
I had to make a last-minute drive to Chicago last Friday, which is about a two-and-a-half hour trip from Madison. So naturally, to pass the time, I loaded up my phone with podcasts. When I was about halfway home, it hit me: I didn't have any Perl podcasts on my phone! Unfortunately, I don't know of Perl podcasts; I've seen Perlcast, but it looks like it hasn't been updated in a year and a half. So, this is a call to the Perl community: are there any Perl podcasts out there?
String::Strip has a problem on 64 bit environments, and a release has not been made in over 10 years. I have sent an email to modules@perl.org asking for COMAINT as the author has apparently not been responding to RT tickets.
Until this weekend I was only vaguely aware of the Perl QA Hackathons. Something led me to the attendees page for the Perl QA Hackathon 2012. If you scroll down to the section "Registered, seeking sponsorship", you'll see a list of names, many of which you'll recognise, along with a list of things they're planning on working on.
If you see something listed that you want, or think Perl will benefit from, why not donate.
I'm not going, but I liked the sound of a PAUSE web service, DBIx::Racer, and MetaCPAN work, and we all benefit from CPAN Testers.
We’re exactly two months out from YAPC::NA. Can you believe it’s that close already?
If you haven’t already, then it’s time to get serious about making your travel arrangements for YAPC::NA 2012.
Remember, YAPC::NA 2012 will be in Madison, WI from June 13-15. Book your flights, your hotel rooms, buy your badge to the conference, and bring your spouse along to enjoy our amazing Spouse’s Program.
I often wonder why people praise Dist::Zilla for ease of use.
Recently I heard this argument:
'It was never easier to make a release. You cannot do that with EUMM'.
So I here is my little make release snippet from one of my Makefile.PL.
There is more in it. make README, make gcov and make gprof for XS extensions.
While releasing and compiling Prima 1.33 for 5 different perls, I'm taking a moment to send a couple of warm ones towards the TIFF specification. Prima originally was written to be used in (among other) software for microscopy recordings, and recently a former colleague sent me a bunch of tiffs no software could read. Heh, here's the challenge, thought naive me. Indeed, these were 10-bit grayscale tiff bitmaps, and as bit-shuffling was some long time ago an interesting topic for me, I've implemented these in Prima's tiff codec. Everyone's happy.