sábado, 3 de octubre de 2009

squeak (pharo) + fluidDB + UIBuilder

There hasn't been much activity in my blog last week. That's partly because I was on vacation, but I haven't stopped hacking completely.

For instance, I could finish reading 'Effective Perl Programming', by Joseph Hall and Randal Schwartz. A very good book, full of little tricks on how to optimize perl codes, or good practices, or even tipical gotchas perl 'offers' you.

It's a very practical book, and I could apply what I learned from the first minute I started reading it. Thanks to CDamian for giving me this book. If you happen to know me, and you want to read it, just drop me a line.

I've been reading a bit about FluidDB, the new database technology with wiki essence. At GTS (grup de treball Smalltalk (Barcelona smalltalk users group)), we thought it'd be a good idea to write a library to manage fluidDB from squeak. We mostly want to port fxn's perl lib to squeak.

We chose fxn's one because his implication on fluidDB project. It seems to give us more confidence.

Anyway, I had looked at some docs last week and commented some things on gts meeting, and this week, when I returned from holidays, I saw Jose had already written a mini lib to query fluidDB sandbox. For the moment, it's a simple lib that only allows GETting queries, but it's ok for us to get used to fluiddb usage.

When I was trying it, I got tired of modifying the query string, and thought of doing a GUI to ease my work. Then nullPointer's UIBuilder called CLFramework came to my mind. I installed it through monticello, and ran it. No problems so far.

I found a little bug that got fixed immediately (It's great when devs are around at IRC, isn't it? ). Well, and here it is! a fully Barcelona pseudo-application, unifying FluidDB, with some gts work.

The point is that writting a handful of lines, I got something quite pretty and acceptably useful. I also had the oportunity to learn how to make simple GUIs using nullPointer's CLFramework (and spotting a bug) that always adds -Ofun to the journey.

Now the screenshot...


Have fun, and keep hacking my friends.

More to come on fluidDB next week (I hope so)

PS: Ah! When I was trying to fix the bug, I looked at some keyStroke methods, and discovered that cmd-Del ( alt-Del ) closes the foxused window in pharo. It's like Alt-F4 on most win/linux systems. You're welcome

viernes, 2 de octubre de 2009

Great read for programmers and non-programmers

Today I read a Matt Trout's post that isn't directly related to programming, but it's brilliant nonetheless. Being a programmer or without beeing one, please read it and enjoy. I think matt shares great things with this post.

http://www.shadowcat.co.uk/blog/matt-s-trout/fear-of-falling/

martes, 22 de septiembre de 2009

zsh spell checking

I was talking to David about bash vs zsh features, and looking at the wikipedia page on comparison between shells We saw They only mentioned a couple (maybe 4) things where zsh is superior to bash.

One of the things that seem to make a very little difference (if any at all) is spell checking. Is it useful?

Well, the answer is: Definately!

If the next command outputs a zero, then you don't need this feature

history| grep 'ks\|,ale\|male\|gi\|' | grep -v "history" | wc -l

Otherwise, keep reading.

For short commands you don't use tab, you can misspell them and zsh guesses what you meant.

rgrau@ares [ ~ ] %,ake
zsh: correct ',ake' to 'make' [nyae]? y
make: *** No targets specified and no makefile found. Stop.
rgrau@ares [ ~ ]:2 %ks
zsh: correct 'ks' to 'ls' [nyae]? n
zsh: command not found: ks
rgrau@ares [ ~ ]:127 %
Great, If you ask me.

Disimulando

Hoy me he levantao indeciso, y he salido a la calle silbando y mirando al cielo, como disimulando...

Creo que no se han dado cuenta.

lunes, 21 de septiembre de 2009

JOOOOODEEEEERRR! (Oh God!!)

That's one of the funniest codes I've seen in a long time.

It's a JAPH 2.0, a social JAPH, a traveler JAPH. I don't know how to describe it....

Perl is movin' along with the times, right?

Its a kind of traveller japh. that fetches another twitt, forks into 2 other twitts, and ends showing a growing string. I'm still on my way to fully understand it, but it's worth the time.

http://twitter.com/johanviklund/status/4100664178


viklund++.

This one had to be a post full of puns, but in the end, there's none. Really

domingo, 20 de septiembre de 2009

Fully vim style linux - part 3 - Get geeker

In this third part (part1, part2) , I'll explain how to get a couple of programs act like vim. With 'act like vim' I mean understand hjkl, and probably nothing more, but if you are really addicted to vim, you know it makes a great difference, right?

pdf viewer


If you're on ubuntu (then you should try vectorlinux, really) , you probably use evince to open pdf files. Well, surprise! evince (at least in ubuntu 8.04 with no extra tweaks) knows what hjkl mean, so you're done :)

If you use xpdf, you can teach it hjkl adding the next lines to your ~/.xpdfrc

bind h any scrollLeft(16)
bind l any scrollRight(16)
bind k any scrollUp(16)
bind j any scrollDown(16)
you can find out more about theese comands in xpdf's man page

xchm viewer

Chances here are xchm, kchmviewer or firefox with a chm viewer plugin.

I haven't seen any option if you use xchm, but kchmviewer can be configured to behave vim-ish (only if compiled with qt libs enabled). pressing ctrl in kchmviewer underlines all links in the view, and makes them accessible with a keystroke.

One of the safest options is using any firefox plugin. Then, hopefully, vimperator will do all the dirty job.

DIY


Apart from all those programs, you'll end writing your own tools to help you in your daily tasks.

Then I recommend you a couple of apps/libs.

First is ratmen/9menu/ratmenu . A simple menu aplication that generates menus navigable with hjkl. Priceless

If you feel like programming your own tools, perl module Curses::UI has all bindings you need... by DEFAULT!

On part 4 I'll talk about shells and gtk, and maybe...emacs!

PS: If you have suggestions, or you just liked the post, or... please comment!

viernes, 18 de septiembre de 2009

Una red....

Davide Careglio cuenta en la primera clase efectiva de XC:
"Internet es una red de paquetes".

Joder, si solo fuera internet....
De paquetes, y de mediocres, y de ansiedades,
De síes pero noes, de cobardes,
de 'lo hablamos más adelante',
de 'estas horas no se cobran',
de porfin es viernes, y tampoco tengo nada que hacer.
Yo el primero.
Si 'la internet' fuera 'la' red de paquetes me daba de baja del ADSL.


Pero en la first-life tb estamos 4 paquetes dándonos porsaco unos a otros, buscando maneras de llegar a otros sitios y esnifando que hace la vecina de enfrente. Aunque de esta no tengo ganas de darme de baja.