viernes, 22 de mayo de 2009

Last week on 'Perl Programming'

Hey guys (and TIOBE :),

I'm going to paste a template for my new perl scripts I'm using lately. Well, I know I always should code as if it had to make into CPAN, but well... Sometimes you just don't need all the boilerplate.


use strict;
use warnings;
use Data::Dumper::Perltidy;
use Getopt::Long;
use Pod::Usage;

sub man {#{{{
-exitval => 1,
-verbose => 2

# main
GetOptions (
'man' => \&man,


=head1 NAME

=head1 SEE ALSO



=head1 AUTHOR

Raimon Grau Cuscó

=head1 Credits


# vim: set tabstop=4 shiftwidth=4 foldmethod=marker : ###}}}

It's not anything awesome, but it just does the job. I saved it in ~/.vim/perl.template , and entered a map in vim like this
iab nperl :r ~/.vim/perl.template
However, if I have to write something longer than 100 lines, it goes through the proces of module starter or h2xs (the former is recommended now)

module-starter --module=Unix::RatFinder::IO --author="Raimon Grau" --email="" --builder=Module::Install
Some random things.

  • Rakudo now passes the 68% of the perl6 specs. yay!
  • I'll go to YAPC::EU::2009! YAY! (thx C.)
  • I'm working on a better Padre::Plugin::Vi a plugin for Padre or at least extending it with new commands. for the moment I've got a commit bit and implemented a couple commands. Yay!
  • Learning lots of things on ironman blogging contest


jueves, 14 de mayo de 2009

Explore Io's internals

I haven't touched Io in some time, but about a month ago, I came with this piece of Io code, to explore the Io written methods in default Io installation.

For example, to explore Number blocks (all are written in Io, CFunctions aren't), you just have to type this in Io REPL.

Number slotNames foreach(i,
if(Number getSlot(i) type == "Block" ,
(i .. " -> " .. Number getSlot(i) code) println))

lunes, 11 de mayo de 2009

Farewell sir +f

A wise man, the greatest reverser and one (or two?) of the men who made a lot of reversing knowledge public, to us.

Back in late '90s, some of us started our intenet adventure, and we felt that all that information we had available wasn't enough. We scratched the surface and dug until we found a forest. Yeah, the old Searchlores Castle.

There were some of the smartest people around the techworld, publishing essays and documents about fishing. They not only told us how to get a fish, but made us want to know where fishes came from, and go there. Nevermind the obstacles. Everything is bit .

+HCU gave lots of reversing knowledge to us, poor crackers.

Then we understood the meaning of reversing and started to feel the code. We were starting to use the Zen way of approaching things. Not only reversing code, but reversing the code of life.

When internet was getting too much messy. He started a new project, related to the old forest and philosophy but in a more abstract way. It was about knowing you can get the knowledge. It's meta-knowledge. And this was impossible to cover it all. The field is not enormous (as in reversing) but infinite.

We've spent too many hours reading your smart texts (and probably missunderstanding most of your winks.

Unfortunately, you couldn't make it to 2032, and passed away last May 3rd, but there's plenty of people that will take your word to 2032 and more, and for sure, you can be satisfyed of having given the 'critical thinking' to many of us.

Happy reversing, wherever you are Mr. +fravia.

domingo, 10 de mayo de 2009

Lisp, scheme and live coding

I've been looking at some lisp books lately. When wise people I know talk about lisp, they only say great things about it. That's a clear sign of 'Hey, you should take a look at this, and see what you get from it'.

First, let's start with some books I've been reading/glancing (easy reads and hard ones are mixed, you'll have to find out which is which by yourself).

Warning: Lisp and Scheme are not the same language, but at my level, I just wanted to look at lispy codes, so I read everything I could.

Once we have a basic idea of lisp concepts, and we have already been striked by the "WOW! WTF! what's this?! Oh, ok, hahah! :) ", we can start typing some superlittle project, little bigger than 'hello world'.

Live Coding?

Two weeks ago, Jordi Delgado, in our weekly smalltalk meeting told me about post called 'hacking perl in nightclubs' and its scheme-like version 'Impromptu' . It's about coding in an environment where your code produces sounds or images (or both), and you evaluate the code you're writing at the moment. Unfortunately, impromptu is only available for Macs, so I kept looking for something that worked in my Vectorlinux. Then I discovered fluxus . I only had to build it and start hacking, and mixing scheme with music and graphical effects.

Compiling fluxus in Vector linux (and other Slackware derivatives)

Vectorlinux repositories are getting bigger and bigger, but they aren't big enough to have strange packages like those. shows how to compile fluxus and which dependencies it has. you'll have to install plt scheme (don't forget the --enable-shared flag).

Another package you'll have to tweak a bit is glew. In slackware, glut and glew can't be used by the same app, because of a macro redefinition in the codes. Here is an explanation of how to fix it .

Once you have it all. you're ready to start typing '(draw-cube)' lines and evaluating in a graphical environment.

This post is only meant to be a bunch of links to lisp and live coding projects. I hope you can compile it in vector linux. If there's something you want me to clarify, please, comment.