Migrate a virtualbox VM to a bigger virtual disk March 18, 2012Posted by claudio in Uncategorized.
Tags: GNU/Linux, Padre, VirtualBox, Virtualization, vm
When a virtual machine has limited use, you don’t want to loose too much space. Sometimes, however, you get the size wrong.
In my case, I have a minimal Windows VM on my Ubuntu laptop. Once in a while I test an upcoming Padre (The Perl IDE) release or update a crappy usb device with Windows-only support. Win-modems may be gone, but we still have GPS devices that run GNU/Linux but can only be connected to Windows. (I guess seeing your market-share shrink because of smart-phones is what they call bad karma, TomTom.)
Windows being Windows, adding disks is a terrible experience (what’s up with the alphabet as a mounting point?) and moving a Windows installation to a second disk is a nightmare. Luckily, free software gets the job done:
1. Make sure your guest machine is halted properly. This is specially important for a NTFS (virtual) partition of a Windows VM.
2. Download Ubuntu (It does not matter if you use the 32- or the 64-bit version, other GNU/Linux distribution will work as well). The screenshots are from a Ubuntu 11.10 setup.
8. Select the new disk from the combo-box on the upper right (check the size).
Perl@FOSDEM and some photographic impressions February 8, 2011Posted by claudio in Uncategorized.
Tags: belgium, fosdem, fosdem 2011, foss, Free Software, Modern Perl, Padre, Perl, perl::staff
All right. FOSDEM was –as always– great. 4 to 5000 Free and Open Source people on the same event has to rock. While I attended many talks about different technologies (Devops aka “System Engineering meets development”, Monitoring, Go Programming language, …), I focussed mainly on the Perl activities (pun intended).
Following Gabor’s initiative (this guy runs on Duracell batteries), last year (2010) we set up the first FOSDEM Perl booth: one table, some volunteers, many visitors and great reactions. This year (2011) everything was even better. We had a big booth at the main hall, attributes (a giant Camel (!) and probably the biggest Perl book collection in the world (!)), books to sell, a packed developer’s room on Sunday, a Perl dinner and many volunteers. There were at any time several people at the booth and sometimes even too many :). With so many volunteers it was possible to attend whatever session you wanted and also participate on the Perl developers’ room.
Here follow some pictures I took with some comments:
David Leadbeater’s Tracing Perl with DTrace/SystemTap
Liz and Wendy were to
crazy nice enough to bring their giant camel and the biggest Perl book collection in the world. Both attributed really attracted visitors.
We had several books to sell… but not enough. We were sold out of chromatic’s Modern Perl halfway the first day (20 books!) and dams’s Perl Moderne (not the same book) was almost sold out as well!
Wendy and dams (from Dancer and “Perl Moderne” fame).
Although we didn’t have Automating System Administration with Perl at the booth, several people passed and showed us proudly their copy bought at the O’Reilly stand.
Those guys had something to celebrate: a new Debian stable was born.
Our perl-friendly neighbours…
No pun intended (the text reads “Whinging Bastard”,
DevOps? – More than Marketing by James Turnbull) .
Spike Morelli’s I’m Going M.A.D..
We had 13 people attending the Perl dinner! From left to right: Zeno, Bart, Gabor, Liz, Wendy, Dirk and Balint (the rest arrived later).
Mark Overmeers’s Perl data structures.
David Leadbeater’s Tracing Perl with DTrace/SystemTap: very interesting for a Solaris guy like me.
Introduction to writing readable and maintainable Perl by Alex Balhatchet.
Paulo Castro (Packaging Perl and it’s deps…) took us to the Dark Side…
The image integration facilities of WordPress.com are pretty poor. If it wasn’t for some command line Perl foo, I would have given up posting this message. There is no way I would have gone through if I had to click 10 times for each picture…
Build Padre svn easily with perlbrew and cpanm December 10, 2010Posted by claudio in Uncategorized.
Tags: cpanm, Free Software, GNU/Linux, Padre, Perl, perlbrew, UNIX
Update: March 12, 2011
Because of the fast pace of the development of Padre, the/a Perl IDE, it’s may be nice to run a bleeding edge version. Or even better, as Padre itself is written in Perl, you may like to have a look at the sources and maybe contribute some code or help with the translations.
Follow this howto to build the latest Padre from source with perlbrew and cpanm. This way, you’ll get started in no time and you won’t even touch your system Perl installation (cleanup is just a “rm -rf” away…).
2. Install subversion (to check out the code), the compilations utils (gcc, g++, make) and the gtk2 header files. On Debian/Ubuntu:
$ sudo apt-get install subversion build-essential libgtk2.0-dev
An interesting -but not required- shortcut is to install the Padre release in your distribution to get binary dependencies:
$ sudo apt-get install padre
3. Checkout Padre from svn (I chose to install the sources under ~/Code/Padre, adapt accordingly to your standards):
$ mkdir -p ~/Code/Padre && cd ~/Code/Padre
$ svn co http://svn.perlide.org/padre/trunk
4. Install the modules that Padre needs before building the IDE.
$ cpanm Parse::Yapp Module::Install Locale::Msgfmt Alien::wxWidgets Wx
[... lots of output ...]
5. Build Padre.
$ cd ~/Code/Padre/trunk/Padre
Install the dependencies (thx to Perigrin for the simplified method):
$ cpanm --installdeps .
[... lots of output ...]
$ perl Makefile.PL
[... some output ...]
As said, development is happening fast on Padre and new releases of (external) CPAN modules are required often (some even updated by the authors in order to provide the functionality Padre needs). If a new version of a module is needed that is not yet on your cpan mirror, run cpanm (–mirror) again with a more up-to-date mirror. Run “perl Makefile.PL” again afterwards.
[... lots of output ...]
$ make test
[... lots of output ...]
6. Install padre (in the active perlbrew dependant directory) or just run the development version without installing it (including all changes to the code even after installation):
$ make install
[... lots of output ...]
$ ./dev.pl -a
EDIT: ZenoG’s article is a good followup post giving an step-by-step description of bug fixing is Padre.
Fosdem 2010 Impressions February 19, 2010Posted by claudio in Uncategorized.
Tags: fosdem, Padre, Perl, photography
Some ideas on method auto-completion in Padre June 9, 2009Posted by claudio in Uncategorized.
Tags: eclipse, epic, komode edit, netbeans, Padre, Perl, Programming
Auto-completion is a nice feature for an IDE. While Padre supports some auto-completion functions, method auto-completion is an important missing feature. This post is a short round-up of features present in other IDEs.
What auto-completion features does Padre support today?
Beside automatic bracket completion, Padre has a nice auto-completion implementation for variables (first character -including sigil- then ctrl + p):
Eclipse + Epic
As a reference, the java auto-completion in Eclipse:
Komodo Edit also has auto-completion for methods, but does not show those inherited from parent classes making the feature rather useless for OO development.
Netbeans has no Perl support, nevertheless the java auto-completion feature is a good example:
The method auto-completion feature is activated by the “.” (“->” in Perl). Not only you get a list of accessible methods (with expected parameter type and return value), but also the javadoc documentation for the selected method.
How should Padre support method auto-completion? Some ideas
- Method autocomplete should be activated by “->” and “::”. This way class hierarchies can be autocompleted as well. With “::” support for functions can be added.
- Private methods should be hidden. By convention, private methods start with “_”.
- Linking method autocomplete to perldoc is a winner combination when programming to not yet familiar APIs and certainly friendly to new Perl developers. While Perl is not strictly typed, a well formatted perldoc entry for a method should make clear what kind of parameters are expected and what the return value could be. However, documentation is rather freely formatted, so it would be difficult to implement in a generic way (without adding formatting restriction to classes).
Perl’s new wave February 16, 2009Posted by claudio in Uncategorized.
Tags: community, Modern Perl, Padre, Perl
We all remember the “Perl is dead” hype from not so long ago. In short: Perl 6 wasn’t there yet and perl ironically wasn’t a copy of the language of the day (python, ruby, c#, …).
I was positively surprised by the response of the perl community. It wasn’t the typical “our programs run fast” (to ruby fanboys*) or “space as syntax wtf?” (to python fanboys). Instead it seemed that community took notice of the criticisms and made pretty clear that waiting for Perl 6 was not an option. Today, Perl 6 is doing fine (you can write code in Perl 6) and so is Perl 5.
So what did the community do? Well, Perl Best Practices -and corresponding module Perl::Critic- was a milestone telling people to stop writing perl 4 scripts and respect sane best practices to achieve clean and elegant code. Next to the many great modules already at CPAN (DBI::*, POE::*, DateTime, DBIx::Class (after PBP), WWW::*, etc), the community decided to address some clear shortcomings.
Moose (inspired by Perl 6) was an answer to one of the -in my opnion- greatest shortcoming of Perl 5: the basic OO framework. Perl-based Catalyst jumped on the Ruby-On-Rail wagon. chromatic, a core developer and important community member, started to think out loud what actually “modern perl” means and how we can improve perl by getting rid of obsolete features and bad practices.
An other missing piece, was a beginners-friendly and perl-centric IDE. Padre is aiming to fill this need. Gabor Szabo was able to quickly form a community developing padre (including Alias of Strawberry Perl and PPI fame). I guess this was the kind of project I was waiting for.
I hope that by being part of this project I can contribute to this positive perl new wave.
* fanboy != user