This is a shot of the Distance Education Room 235 in the Pyle...

This is a shot of the Distance Education Room 235 in the Pyle Center where some of the talks for YAPC::NA 2012 will take place.
This is a shot of the Distance Education Room 235 in the Pyle Center where some of the talks for YAPC::NA 2012 will take place.
A few days ago I deactivated my Twitter account and most other social networking accounts. It's not that I'm vanishing off the face of the earth or anything like that - I've just gotten disillusioned with "social" networking. It has grown to be a kind of addiction; I checked Twitter etc. far too often, to the point of it being a distraction, but actually it wasn't a lot of real communication, it was more like people talking at you. I didn't find much "social" value in the whole thing.
I still program Perl for a living, and it'd be nice to see Perl friends, for example, in Frankfurt next year.
About all those CPAN modules - I've looked over the 100+ dists that are under my name on CPAN and have found that most of these I neither use anymore nor do I have any wish to maintain them. Most of them were related to an older work project and are probably not used outside of that.
Looks like O'Reilly is offering certifications certificates for Perl programming. This is huge, I think they are the first entity to offer something like this.
http://www.oreillyschool.com/certificates/perl-programming.php
I've been so busy doing Actual Work that I've forgotten to write about doing it!
Now that a lot of the modules I'll be using are more or less in place, including my new centralized security where "everything" will go to get permission to do "anything", it's time to start sowing the modified modules together in Catalyst.
Or is it?
I try to code by "Make a plan, and stick to it, unless it sucks."
Figuring out if a solution sucks is part of that, so I've taken a long, hard look at my Catalyst choice here.
Did I really pick Catalyst because it's the best tool for the job, or because it's the weapon I had in my hip holster at the time? Let's see what we're looking at here:
If you think you might bring your kids with you to Madison and make a vacation out of your trip to YAPC, then one thing you have got to see is the Madison Children’s Museum. They have amazing hands on demonstrations, art projects, and fun activities. At only $8 per person for a whole day, it’s an inexpensive way to have some fun with the family.
When Anton Berezin announced that we Frankfurt.pm hosts YAPC::EU 2012, he handed over a check for over 1,000 Euro from YAPC::Europe Foundation (YEF). Thanks to YEF for this kickstart donation.
YEF exists to promote Perl in Europe. They do this by supporting organisers - not only with donations like we recieved but the also help when organizers have questions about how to handle this or that. And they sponsor the online payment system that can be connected with Act! And the venue committee of YEF elects the hosts of the YAPC::EUs.
During the lightning talks at YAPC:Europe 2011 BooK said that YEF wants to support more workshops, so organisers should ask for help... And of course YEF accepts donations so YEF can support even more events.
This Unicode stuff tried to drive me crazy, hopefully I'll record something useful here because the docs are a bit too intricated to understand.
The underlying assumption is that data is "moved" using utf8 encoding, i.e. files and/or stuff transmitted on the network contain data that is utf8 encoded. This boils down to the fact that some characters will be represented by two or more bytes if you look at the raw byte stream.
There are two ways you can obtain such a stream in Perl, depending on what you want to play with at your interface: string of bytes or string of characters. It's easy to see whether a string is the first or the second, because it suffices to call utf8::is_utf8
:
$is_string_of_characters = utf8::is_utf8($string);
The name is not very happy, in my opinion, because it tells you whether Perl has activated its internal utf8 representation. I would have preferred to have something called is_characters
or whatever.
I imagine that just about every parent who programs has written something like this at one time or another.
If you’re in the Manchester, New Hampshire area, or are willing to move, then Dyn has two great new Perl positions available:
They’ve also still got a position open for a Backend E-Commerce Developer.
And if you’re in San Francisco or London, they also have junior and senior system administration positions open, which require Perl knowledge.
With over a week gone since the end of YAPC::Europe 2011, I'm please to see we already have 102 Conference Survey responses and 541 Talk and Course Evaluations submitted. This is once again a fantastic start to the responses and very much appreciated. However, there are still a further 165 who can still submit their Conference Surveys, and everyone still has time to submit feedback to the speakers of the talks and courses they attended.
If you haven't received your keycode email, please contact me and I will resend it. You still have 3 weeks until the close of the surveys, so please try and take some time to complete them. It really does help to improve the conferences for everyone.
For those interested in the results of the YAPC::NA 2011 surveys, although the speaker feedback has been sent out, I had to postpone my work on the Conference Survey due to some CPAN Testers issues and my attendance at YAPC::Europe 2011. As such, I am now preparing these results for the YAPC Conference Surveys website and hope to have an announcement within the next few days.
While my department at $work isn't strictly R&D, we still do a lot of development work. I'd dare say we average a rather healthy amount of code, taking into account we also try to be rather minimal. Code is simply a means to an end, it is not your goal.
We get to write a lot of code that interacts with our systems, and a lot of duplication is achieved by mistake. Sometimes it's stuff people don't realize is indeed duplication, or they think it's unpreventable. I've decided to tackle this. I've presented some of my findings at Weborama after giving my Moose talk, and they really enjoyed the ideas, and I've decided to write about them here as well, in more detail.
Since this is a lot of text and I hate reading a lot at a single time, I decided to parcel it out to smaller portions. This part will focus on refactoring schemas.
One of the great things about open-source software is the ability to reuse handy classes written by other people. But sometimes, you find yourself using a class that doesn't have quite enough features for what you're trying to do. What's the best way to deal with that sort of situation?
One option would be to monkey-patch new code into the class you're using — just add extra subroutines to the original namespace. But unconstrained monkey-patching has consequences that make it extremely hard to use in practice. So the usual alternative recommendation is to subclass the upstream code, add the new methods in the subclass, and then ensure that the rest of your program always uses the subclass in place of the original. But that approach has two flaws. First, it can be awkward to make sure your subclass is always used in the right places. Second, it doesn't actually fix the problem: you can still experience all the same issues as with monkey-patching!
I gave a talk on this topic at this year's YAPC::EU in Rīga, and it's getting a repeat (and extended!) outing at the inaugural Dynamic Languages Conference today. But if you'd like to read the full details, the corresponding paper is now on my website.
Enjoy!
We’d like to thank our sponsors for stepping up to support us. We really couldn’t do this without their support.
You too could sponsor YAPC.
I've been working on creating better sugar for event-driven systems in Perl– specifically, AnyEvent powered things. AnyEvent, and the modules it bundles, encourage a function based callback API, with at most one event listener per callback. Third party modules either follow that model, or the one presented by Object::Event, either using it directly, or implementing something that looks similar, but doesn't work the same.
What actually drove me to do this was exploring Node.js and its event API, which I find much more pleasant then any of the prior art on the CPAN.
So as such, I created a module, On::Event, which is on the CPAN now in a preliminary form. I've been toying with renaming it to ONE, however, as you can see on Github. The resulting API looks like this:
Earlier this year I was frustrated with Salvador Fandiño García's otherwise excellent Net::SFTP::Foreign package. It was in almost all respects the best choice for my current project at work, but the then-current version required me to check the return values of method calls for success or failure, and then use an error method to get any reasons for failure that might be waiting. The rest of my code used exceptions courtesy of Try::Tiny, and having to write three lines of boilerplate code for every SFTP call was getting annoying.
Thus was born Net::SFTP::Foreign::Exceptional, a very thin wrapper around Net::SFTP::Foreign that proxied all public method calls and then used a Moose after method modifier to throw an exception on any errors. (It originally used subclassing instead, but Salva set me straight on that and the less said about it the better.)
When you come to YAPC::NA, if you decide to stay at the rooms we’ve reserved at the Lowell Center (approximately $100 per night) then you’ll also get breakfast served to you for free each morning in the Lowell Center conference rooms just down the hall from the main lecture hall. We think it’s a super sweet feature to be able to roll out of bed, take the elevator down and get a nice hot breakfast, and then stroll 20 feet down the hall to attend the morning plenary session.
I should note that if you choose to stay in the dorms, which will be about half the price, you’ll also get a hot breakfast, it just won’t be quite this convenient.
Padre 0.90 is a very important release in the maturity of the Padre IDE, as it represents the closest to what you might call a Beta that we've produced.
And it's certainly the best and most stable release since late 2010. But looking forward to 1.0 there's one glaring project-level issue left.
Once we do a "stable" release, we should finally be aiming to achieve fairly decent back-compatibility. And Padre has definitely tossed aside back-compat in exchange for faster development at every opportunity so far.
So if we're going to do a 1.0 release, we probably should take one final pass over the major APIs and break them horribly so that we have APIs that we're happy to support for a long time. And this is the major focus of the next 0.92 release.
One of the most important of these is Padre::Task, which is the API we use to run things in the background.
Getting started with gdb , some notes on this
objdump (otool on osx) is a program to examine a binary.
To examine perl run the command
objdump -D /usr/bin/perl |grep -A40 main.:
Interesting to see the function call
objdump -D /usr/bin/perl |grep -A400 main.: |grep call
to get the output in intel syntax add the option -M
objdump -M intel ...
GDB
for the following c program
main() {
printf("hello world \n");
}
-g flag to give gcc access to source code
gcc -g prog.c
gdb commands to debug a c program
gdb -q a.out
set disassembly intel
list
break main
run
disassemble main
to dump a string stored in memory
x/s 0x... (memory address) in this prog we can check the string hello world stored at instruction mov
debugging perl
- Get the latest bleadperl from git
- Configure and install perl with debugging support sh Configure -DEBUGGING=both
gdb -q /usr/local/bin/perl
set disassembly intel
break main or break line number
nexti or n to step through
s to step through a subroutine
x/s variable to print the contents of a var
blogs.perl.org is a common blogging platform for the Perl community. Written in Perl with a graphic design donated by Six Apart, Ltd.