lunes, 31 de agosto de 2009

New projects, old projects, and EOH

End of holidays (EOH) is here, and it's time to think about past, preesent and future projects. I should wrap up old qw(projects friends jobs ideas energy-spent-where) and refactor them into shiny new $_ . First of all, a little change in my blog. On the right side, there's a link to vl site, and I've set up a search bar.

Old

Projects
I've decided to leave ratfinder as is, and in case of wanting to add new features, start it from the scratch, with a more global vision of perl. I think I need to mess with some small project to apply all the recently learned stuff (Moose, git / hg , Module::Pluggable, Perl::Critic, Test::More, even KiokuDB ). Anyway, I still use ratfinder about 20 times a day, and it could be improved, I like it very much. Some ideas are:

  • Use Curses::UI to make it totally console friendly
  • Use Module::Pluggable to allow plugins like: LRU, playlists, exes...
Work
At work, well... I'm still doing the old projects, and until I finish my Undergrad project , I'll be on theese 3 projects of mine related to Evolutionary Algorithms.

Ideas
Ideas... lots of new cool stuff to think about, and to learn, but definately, being meerly a technical post, I'll underline 2 books that CDamian gave away (bookcrossing).
  • Effective Perl Programming
  • Mastering Algorithms With Perl
I was mostly after MAWP but for the moment, I've read more of EPP than the other. EPP is a very concise book, with really short chapters, teaching you little tricks or warning you against some perl gotcha. I find it really enlightening despite being a book from the late nineties.

New

Projects
I've just started a couple of new pet projects, just to have some fun with perl. One is a MasterMind game. I know there's some MM modules on CPAN, but I think it's a simple enough project to try to do in a couple of days (maybe three). After having the main structure (using Moose), I'd like to try Merelo's Algorithm::Evolutionary and write an cpu player. I will upload soon at my (currently inactive) github account.

Another project is a text installer for Vector Linux. Let's see how does it evolves, we do not know even which language will be using (python? perl? plain bash?? nah ..) . There's already an info page and mercurial repo in vlcore . The project is called vinstall-cli (oh duh!) .

Work
Let's see how everything goes, but there has been some movement in smalltalk field lately...

Ideas

Ideas for this new course are basically:
  • Better managing of my time.
  • Reading more than in the past year.
  • Go abroad at least once.
  • Try to convert myself into an office enabler . It's a concept I'm really familiar with, but it's the first time I see it written somewhere. It'd be great to take good profit of my profile.
  • Learn some web stuff and do freelance projects.

There are some books I'd like to finish before starting new ones.
  • Mercurial. The definitive guide
  • Effective Perl Programming
  • PLAI
Until I finish one of theese books I've promised myself I won't start anything else. Will I be able to acomplish my promise?


Next books I want to read (or reread):
  • OnLisp
  • Gödel, Escher Bach
  • Extreme perl
  • Mastering Algorithms with perl


Raimon, out.

sábado, 15 de agosto de 2009

perl wallpaper for my Acer Aspire One


Reading the usual blogs while recovering from yesterday concert, I've found a perfect wallpaper for my Acer Aspire One

Get the original (full size) pic and more at:
http://blog.newint.org/tech/2009/08/12/the-true-face-of-perl/

domingo, 9 de agosto de 2009

YAPC::EU::2010

Reset
I think I'm kind of recovering from my recent emotional wounds, and starting to
live without thinking about S. 10 times a day, and only doing it 3 times a day.

It's not that it's easy, but perl and alcohol are taking me far from my problems.

Now I know^H^H^H^H^Hfeel I can't expect nothing from noone. Circumstances always manage to
screw everything, and making me more and more sceptic about people. Closing
myself in a bubble is the way to go. Fuck off world, you won.

Perl

My first YAPC was amazing. Really amazing.
Attending the conferences was a great experience. Seeing great speakers do their presentations, that make you stay mentally online for the whole conference, while you learn new useful things was a great experience. Damian Conway, JJ Merelo, Paul Fenwick, mst and many others made the whole experience really enlightening.

I talked a while to Merelo, about Feijoada Computing, and we had some nice discussions about eodev vs Algorithm-Evolutionary . I met rafl too, and had lots of fun with all the spanish perlers.

As always, Larry's Keynote was great. Lots of references to other languages and so. He mainly talked about latest perl6 progress (how to make perl6 strict at compile time and permissive at runtime).

I assisted to some perl6 talks (Pmichaud's about hacking perl6, Jonathan Worthington's about perl6 roles in depth, Mbrends intro to perl6, and some lingthning talks about perl6). Patrick Michaud announed the release of the first official rakudo release called "rakudo star" . It will be out by spring 2010, and it won't be a complete perl6 implementation, but at least, it will be a stable perl6, that will work for most jobs. Patrick said that devs need people to write perl6 apps, to guide them on further developing.

We had lots of fun with Diego, David and Rafa (Madrid perl mongers) both in conferences and having some drinks out there. I also had a great night with BooK, brunorc, Jonathan W. , and 3 other guys (Sorry, I can't remember your names), talking about marketing perl, perl6 concurrency models and drinking warm chartreuse.

My roommate, Casiano (the one responsible for my addiction to perl) was as kind and great as always. The only uni professor ever that fed my hacking mind. Thanks Casiano!
JDelgado and Alexm, as great as always. geeks, funny, and really motivated. Theese people make you have a good time while enlightening you in many many aspects.

Thursday, YAPC was over, but I went to a Modern Perl workshop driven by mst and ash. Great introductions to DBIx::Class, Moose and Catalyst. We wrote a simple web app that translated english to LOLSPEAK. Great, isn't it?

All in all, a really great experience: coding, learning, lolcats, bets, autcions, drinks, and I'm already hoping I'll be able to go to YAPC::EU::2010 in Pisa. As Jose Castro said in the last keynote, Perl is alive and kicking, and, in fact, stronger than ever. It's our mission to spread the word, but power is ours.

Cya!

(Links will be added in near future)

miércoles, 29 de julio de 2009

Perl expressiveness for real life

#!/usr/bin/perl

use strict;
use warnings;

my $life;
$life->{'sucks'}= sub { exec 'perl' or die };
$life->{'sucks'}->() ;


Isn't it great that a programming language can express real life feelings in such a readable way?
It doesn't have syntax highlight, but in fact, real life neither.

Let's go back hacking

lunes, 20 de julio de 2009

Se busca pito del sereno (o bien: Fuck0wski somos todos)

Uno ya empieza a hacer tiempo que se afeita, y va viendo como van las cosas.

Y está empezando a hartarse.

"Se busca ingeniero con gran capacidad de aprender, para trabajar en una pequeña empresa en pleno crecimiento en un entorno de contínua evolución."

"Tu cv nos gusta mucho y creemos que cumples el perfil para la plaza que disponemos de tecnólogo especialista en puerros y pepinos."

Joder! Voy a ser responsable de pepinos en una PYME en pleno crecimiento...
Escalabilidad de pepinos? Segundas derivadas del tamaño de un pepino en función de las lineas en premsa?. Espero estar a la altura.

Me voy a la librería más cercana ya que la biblioteca de la universidad esta cerrada en julio (se ve que las vacaciones no son epoca de aprender en este pueblo), y me pillo el de O'Reilly 'Learning Cucumbers' y le hecho un vistazo a 'Cucumbers cookbook' y 'Thinking in cucumbers'.

- Estas dentro chaval. Esto va a marcar un antes y un despues en tu vida profesional. Vas a convertirte en élite. Eso si, empezarás cobrando la cifra que esta justo en la linea de la immoralidad, te parece bien? Por otro lado, en esta empresa somos muy flexibles en lo que respecta a horarios. Sabemos que teneis vida fuera de la empresa, y no queremos que esto
cambie.

"Bueno, aquí voy a aprender un montón", me lanzo a la piscina. El mundo es de los atrevidos. Aunque esto suponga posponer mi emancipación un año más y no poder invitar a cenar a esa chica a la que llevo tiempo detrás. Se la llevará Mindundi, el que empezó la carrera contigo, y se largó a ADE y después hizo un master en siseñorología, y en técnicas de venta y marketing en la red. El que tiene un BMW y no ha pegado sello en su vida. Ese.

Empiezo aprendiendo todo sobre este campo: condiciones idóneas para el deployment de pepinos en clusters no homogéneos, y paralelización de pepinos en grid. Todo se parece bastante a lo que ya conocía, pero ahora estoy al lado de los grandes. Lo que antes hacía en casa, a las 3 de la mañana porque no tenía un duro, ahora lo hago de 9 a 6, y me pagan por ello. Lo mío no eran los pepinos, pero ya me empiezan a gustar.

Chicos, estoy muy contento con vuestro trabajo, nuestros pepinos y nuestros puerros son ya los más reconocidos en europa, aunque aún tenemos que vender nuestra primera partida, esta nuestra empresa ya es referencia europea en venta de pepinos. Sin embargo, hay una pequeña cosita a comentar. Tendríamos que ajustarnos a los calendarios marcados, ya que ahora tendremos responder ante clientes. Se ha acabado la libertad de horarios. Nos ponen una cafetera en el despacho, y nos regalan un cronometro a cada uno, para que contemos los minutos que gastamos meando.

Ya me estoy empezando a cansar de pepinos. El libro de O'Reilly que me compré sigue haciendo de soporte de la pantalla del pc.

Hemos contratado a un comercial que va a dar un nuevo aire en la distribución de nuestros servicios. Efectivamente, veo entrar por la puerta el moreno perfecto de Jorge. Jorge Mindundi.

Ni me cruzo una palabra con él. Pero viene y me comenta toda su vida desde 2003 (última vez que nos vimos). El tio ha estudiado el puto master en cambridge, y se cambió el BMW por un porche boxter, y éste por un audi S3, "porque con el porche todo el mundo te miraba". No quiero esperar a que me cuente sus fiestas en la piscina, y decido largarme con la version informática de "te dejo que tengo la paella al fuego", que viene a ser algo como "uix, voy pallá que ya creo que ya ha acabado de compilar una cosa que tenía ahí..." ..

Todo se empieza a acelerar. Esto significa: a todos nos toca hacer de todo, los proyectos se acaban como buenamente se pueden en un tiempo récord, y la misma presión hace que ni te des cuenta que no estas trabajando en el apasionante mundo de los pepinos, sino que ya estas instalando antivirus y progamando en php. Se acaban haciendo ciertas las grandes frases de Fuckowski:

“Although the current prototype could be technically enhanced, from a
business perspective it fulfils the customer needs”

Que traducido viene a ser:

"Esto se entrega como está, aunque los ingenieros digáis que es una mierda."

Ya me estoy cansando de tantos pepinos. Hace dos días que ya los quito del BigMac.

sábado, 18 de julio de 2009

Getopt::Complete. Making your own tab completions

I just discovered a new perl module in cpan called Getopt::Complete.

As all Getopt::* family, it deals with your program flags. But this module takes it a little further.

Those who know me, know I'm a fan of the DWIM philosophy, so I try to automate every single process in my life. Instead of bash, I use zsh for its amazing DWIMy tab completion.

Well, Getopt::Complete lets you write the tab completion function in perl instead of bash.

Here's a modified example from its perldoc:


#!/usr/bin/perl

use Getopt::Complete (
type => ['names','places','things'], #--type has 3 possible completions
instance => sub {
my ($command, $value, $option, $other_opts) = @_;
if ($other_opts->{type} eq 'names') {
system('touch /tmp/fu');
return [qw/larry moe curly/],
}
elsif ($other_opts->{type} eq 'places') {
return [qw/here there everywhere/],
}
elsif ($other_opts->{type} eq 'things') {
return [ query_database_matching("${value}%") ]
}
elsif ($otper_opts->{type} eq 'surprsing') {
# no defined list: take anything typed
return undef;
}
else {
# invalid type: no matches
return []
}
}
);


to enable the completion, you must tell bash, it should ask the same program to complete words in the commandline.

$complete -C /home/kidd/myapp.pl myapp.pl

Then you should make myapp.pl executable

$chmod +x /home/kidd/myapp.pl

and now, you can start testing it.

WARNING!: In the previous example, I've put an extra line that executes a system call. If you try to tab complete 'myapp.pl --type names --instance ' , the system call will be executed and you'll get a 'free' /tmp/fu file.

That's obviously a serious security issue, but if you use it in a wise way, this module can add some quality to your software requiring only a few lines of code.

TODO: I'm looking at enabling this kind of completion in zsh. If anyone knows it, please leave a comment.

That's all for now.

martes, 14 de julio de 2009

sanfer 2009

vino en la ropa,
cerveza en la copa,
sangre en el suelo
y tu hasta en la sopa.


(perdón por estos sinsentidos)