Wednesday, July 2, 2008

Loving aquamacs

Hi ! 8 months ago I was looking for the definitive text editor since I had just bought my new Macbook Pro... it was an intense research: I've always used Vim fluently (although not many plugins), Emacs quite a bit, and then I bought TextMate... it was nice but all my experience and pooled knowledge on Emacs would go through the sink.
But then I discovered Aquamacs Emacs... I must tell: It is excellent.

I was afraid it would be one of those marginal projects that start and only get some love once a year or so, but I was wrong: they've released two new versions (1.3 and 1.4) since I started using it, each new version Much better than the previous one.

Now I've been programming Rails, and I missed that feature of footnotes plugin that let you directly open some file that has thrown an exception by clicking on an txmt:// link on the page.

Ive been trying to create an emacsclient URL protocol handler with python and registering it to the operating system so that eny emc:// URL would be opened by EmacsCLlient (and thus AquamacsEmacs) but this way has been quite painful and at last I've found a much simpler solution:

create this AppleScript:
property eclient : "/opt/local/bin/emacsclient -n "
property eclientexec : "/opt/local/bin/emacsclient -e \"(goto-line "
property eopen : "/usr/bin/open -a /Applications/Aquamacs\\ Emacs.app "
(* copied from http://lists.apple.com/archives/applescript-users/2005/jun/msg00785.html *)
to split(needle, haystack)
set oTIDs to the text item delimiters
set the text item delimiters to needle
set hay to (text items of haystack)
set the text item delimiters to oTIDs
return hay
end split
(*set t to "I really like pie"
set commentString to item 1 of split({""}, t))
returns "I really like pie" *)

on open location this_URL
set the my_URL to text 7 thru -1 of this_URL
set the my_FILE to item 1 of split({"&"}, my_URL)
set the my_LINE to item 2 of split({"="}, my_URL)
do shell script eclient & my_FILE
do shell script eclientexec & my_LINE & ")\""
(*display dialog my_FILE*)
end open location


compile it and make an application, then on firefox you just click on an emc:// link and it asks you what application to use, go and find your recently created appplescript App, and Tachan !!

I use 3, but I think it should work on 2, if it doesn't you'll need to register a protocol handler on your Mac for emc:// URLS, that is done by adding this:
(this should be XML but I've seen that blogger removes the xml tags, so indentation stands for the XML tags, quoted strings are the element contents, but when you create the XML you should *remove the quotes* !)
array
dict
key
"CFBundleURLName"
/key
string
"EmacsClient URL"/
/string
key
"CFBundleURLSchemes"
/key
array
string
"emc"
/string
/array
/dict
/array

to the Info.plist

Then on the footnotes Rails plugin, change vendor/plugin/footnotes/init.rb

Footnotes::Filter.prefix ||= 'txmt://' if RUBY_PLATFORM.include?('darwin')

to be

Footnotes::Filter.prefix ||= 'emc://' if RUBY_PLATFORM.include?('darwin')


that should be all !

please if you've read this and found it interesting, leave a commend saying Yes ! !
so I will consider to continue posting my little mac-emacs-ruby-whatever tweaks or not..

elias

Thursday, June 19, 2008

interface de pagina web

esta pagina web es acojonante, super cyberpunk, me encanta:

http://kashiwasato.com/

elias

Friday, May 23, 2008

Continuous partial attention and the like

Yesterday I read the last writing from Paul Graham about procrastinating: he's completely nailed it down: distractions used to come from the TV, we banned the TV, but they now come from the internet, which is our work-tool !

Today I just read the one from Giles Bowkett (and TimBray reference), and I've repeatedly read aabout people's fascination with reddit/slashdot/hackernews... I used to be subscribed to slashdot but I finally got to quit (like w/ tabacco).

Now my only time-sink is my reader.google.com... oh god how much time it takes !! I sometimes feel like the Little Prince when he had to prune his baobabs... every day he had to get-up early in the morning and execute this ever-lasting routine of prunning the baobabs, and if one day he forgot, more work he would have for the next day.

That's how I sometimes feel about reader.google.com, I have to go at least once a day to "prune" my feed-reader !! It's like if someone wanted to feed me with lots of info against my will !! so I have to go everyday to prune the info so that I don't drown in it if there accumulates too much.

It used to happen this same thing with gmail, but at some point I decided there was nothing wrong with having N unread messages in my inbox, so now I have my gmail with 2811 unread messages and nothing happens, I just feel allright... I don't prune the baobabs anymore, I just let them grow...
so I think I should do the same with reader... nothing happens if you start to let the unread items grow !!!

but anyway, I would really appreciate if google added a "Pause feed" feature to reader.google.com so that I could pause some feeds... Its *not* the same as unsbuscribing, because in reader.google.com I created my database of interesting news feeds, and some of them I maybe want to unsubscribe *temporarily* just to avoid information overheads ! so I use googlereader as a Bookmark or database of interesting news feeds that I always want to have searchable, but I want them to be temporarily paused, wouldn't that be useful ? to me yes.

de gimnastas solidarios a calistenistas autosuficientes

Acabo de dejar Gimnastas Solidarios, por fin ! después de un año en el programa "Apadrina un gimnasio", mi gimnasio ya se ha independizado !! me alegro mucho por él, ahora podrá hacer su camino sin mi ayuda ! espero que las cosas le vayan muy bien, al fin y al cabo este intenso año de relación nos ha unido bastante ! (aunque no lo suficiente).

Hace exactamente un año me apunté al gimnasio de la barceloneta, creo que era mayo o junio del 2007, en todo este año he ido 2 veces al gimnasio y una a karate !! y pago 33 euros al mes !! bueno, esto de apadrinar gimnasios ya sabeis que es duro, pero merece la pena ! cuando ves a tu gimnasio crecer, independizarse de ti e iniciar su propia andadura... es emocionante !

tengo que decir que me siento libre, libre de gimnasio y de recibos de gimnasio.

Quiero agradecer la ayuda de la ONG Gimnastas Solidarios que me asesoró siempre perfectamente en todo el complicado proceso de apadrinar un gimnasio, y en concreto a Soledad Gómez de Apadrina un Gimnasio por su ayuda y atención en los momentos más difíciles del apadrinamiento.

Ahora he iniciado una nueva aventura con Calistenistas Sin Fronteras. Después de haber visto las películas 300 y "Into the wild" (o Rutas Salvajes, en spanish) me interesé por el mundo de los calistenics, que aunque tengan este nombre tan guay, no son más que los mismos ejercicios que haces en el gimnasio, pero *sin máquinas*, es decir, que vayas donde vayas, estés donde estés, hagas lo que hagas siempre podrás hacer Calisthenics !!!

Basicamente calisthenics es hacer cualquier ejercicio en el que la resistencia la ofrezca el peso de tu propio cuerpo. Esto tiene varias ventajas: no necesitas pesas, y nunca te vas a inchar como un globo, porque tus músculos estarán hecho a la medida de tu cuerpo, el ideal de belleza griego!
Los típicos abdominales, flexioines, pull-ups... son calisthenics, pero hay más !

"Calisthenics originated in ancient Greece. It is mentioned as a Persian scouts' report on Spartan warriors before the Battle of Thermopylae, who misinterprets calisthenics as a sign of weakness."

Es decir que los Espartanos estaban tan cuadraos porque siempre que se aburrian se ponían a hacer Calisthenics.

Que me venga el Xerxes ese a tocar los conejos después de hacer mis tablas de Calisthenics, ya verá ya !!

Y el Cristopher McCandless de Into The Wild, también se pasaba el día haciendo calisthenics, y para los que no lo sepais, yo quiero ser un Cristopher McCandless !! (pero sin comer bayas de las malas, eh !)

best regards,

Elias

Friday, May 16, 2008

jajaj

http://www.thebestpageintheuniverse.net/c.cgi?u=irule2

Tuesday, April 1, 2008

first meta-circular person

my first comic-blogging a-la xkcd


Friday, January 11, 2008

Elias, I think this is the beginning of a beautiful program

Today I started slime and it said something like "this could be the start of a beautiful program" and it remembered me the famous Casablanca phrase:
"louis i think this is the beginning of a beautiful friendship", so I made this little emacs startup greeting:

(defun startup-echo-area-message ()
(format "%s, I think this is the beginning of a beautiful program" (getenv "USER")))

just for fun.

on the other hand, I'm developing an emacs library to retrieve problems from projecteuler.com directly to an emacs buffer, so whenever I'm bored, I can try to resolve those little beautiful mathematical problems in Emacs.

its almos ready, I'll tell you.

elias

Tuesday, December 11, 2007

economy in general

hi !

I've recently seen these 2 videos on video.google.com:

Zeitgeist The Movie:

http://video.google.com/videoplay?docid=5547481422995115331

and

Money as Debt:
http://video.google.com/videoplay?docid=-9050474362583451279

both quite interesting (though maybe not as scientific accurate and prove-bearing as exptected..)

those lead me to this interesting article on wikipedia:

http://en.wikipedia.org/wiki/Seigniorage

"The revenue derived from issuing currency" from a goverment or private company as the FED.



I recently bought George Soros's Open Society, which I'm really eager to start reading... what might a pure-economist understand by "Open Society", as opposed to what a geek like me does understand ?

lets see !

I'll try to report about this in an upcoming post.

Wednesday, December 5, 2007

web 2.0 bubble song

can't help but blogging it ;)

Thursday, November 29, 2007

artículo interesante "programming collective intelligence"

http://www.oreillynet.com/pub/a/network/2007/11/14/an-interview-with-toby-segaran.html

este tío dice:

"what's still lacking is something which finds information online for me that I will find interesting; I know there are a number of attempts to solve this problem and I've tried many of them but nothing has retained my attention so far."

éste, lo que necesita es un agregador de RSS 'inteligente' como el mio, que sugiera posts basándose en la probabilidad condicionada de Bayes de que te guste un post basándose en los que has dicho q te gustaban.

bueno, lo del bayes lo he metido a la fuerza para hacerme el interesante, pero + o - cuela, no ?

elias

nueva idea

Últimamente, cuando leo mis RSS, veo bastantes posts comentando otros posts que ya he leido (porque también los tengo en mi rss).

Esto es ineficiente (a primera vista).

La solución es : cada post lleva una etiqueta (o "tag") invisible, que apunta al post original que se está comentando.

Entonces mi lector de RSS, detecta que yo ya he leido el post original, o alguno que ya comentaba este tema, y me lo marca como 'menos interesante'.

Esta idea es genail. Si fuera a montar otra empresa, haría un lector de RSS online con esta 'feature'... pero ahora que lo pienso, los usuarios tendrían que indicar cual es el post original. O bueno, en realidad yo podria 'inferir' esa información de los keywords, y links del post. Eso añadiría la salsa mágica diferenciadora de mi lector de RSS.

Por otro lado, soy usuario de muchas redes sociales distintas. Según mi punto de vista, todas intentan crearse un 'perfil' de ti, de quién eres tu, de qué te interesa, quienes son tus amigos... para utilizar eso para enviarte publicidad 'enfocada' a tus necesidades. Esto da mucho dinero (preguntarle al zukerberg de facebook, sino ;P).

Realmente siento que si hay algo que es lo que define mejor mi perfil en internet, son los RSS que leo.

pues en la próxima red social que haga, voy a sugerir a los usuarios que sean amigos de otros usuarios basándome en la correlación de sus RSS. Si hay mucha correlación, serían buenos amigos, sin duda. Si no hay correlación, también podrian ser buenos amigos, pero con menos afinidades en el internet, por tanto menos interés de ser amigos 'a través de internet'.

esto creo que es una idea potentísima. Si conozco a alguien que lea los mismos RSS que yo, seremos amigos, sin duda.


Ejemplos de las 2 ideas expuestas:

Hoy leyendo el excelente Anarchaia, me he cruzado con la noticia de que Mauricio Fernandez ha lanzado ruby-wmii. Ya lo sabía porque estoy suscrito a eigenclass.org.
También ponía que google abría su highly Open Participation Contest. Lo sabía porque estoy suscrito a developer.google.com (o como se llame).
También ponía artículos de Lambda The Ultimate, a los que también estoy suscrito. Y a ruby inside, al q tb estoy suscrito.

También estoy suscrito a bubblegeneration.com, y a las news de sourceforge y developerworks, para estar siempre a la última de qué pasa en el mundo open source.
también estoy suscrito a xkcd y a "La viña del Señor" por la risa, y a fogonazos.com, por pasar 10 minutos al dia con algo interesante.

etc, etc.

Thursday, November 22, 2007

te partes de la risa

http://www.youtube.com/watch?v=uWyKOvX00h0


jjajajaja !!

es hilarante, como el gas !

my fingers hurt again

Did I tell you that I had Repetitive Strain Injury some time ago ? at that time I think I was using VI... or maybe emacs ?

I've heard VI is more ergonomic, that's why even though I love emacs, I'll start using VIPER mode, which uses some of the ergonomic-key-bindings of VI.

great stuff.

Friday, November 16, 2007

xkcd

I usually fear to re-publishing a re-furbished (like my Mac:) article I've read in another blog, because maybe my readers have also the other blog in their RSS feeds. but this time Icant help it. This is hilarious (for hackers)

http://xkcd.com/341/
http://xkcd.com/342/
http://xkcd.com/343/
http://xkcd.com/344/
http://xkcd.com/345/

elias

Mal parto me raya, se atormenta una vecina, el porro folar, y los conejos

A mi familia siempre le han hecho mucha gracia los chistes que solamente se basan en confusion linguística. A mi abuela le encanta el chiste "que le dice el gallo a la gallina ? 'qué-quieresque-te-diga'"... o el de "qué se ve desde la montaña más alta de Toronto ?": "Torontontero", que hace gracia solo porque decir "torontontero" es gracioso (y por lo de "toronto entero").

A mi hermano le encanta cambiar y modificar las sílabas de las palabras. Ahora recuerdo:

"Se atormenta una vecina"
"Mal parto me raya"
"Porro Folar" (en vez de forro polar)

las dos primeras las sacó de una obra de teatro (se las copió) y el porro folar no se de donde lo sacó. Pero cuando habla siempre cambia alguna sílaba y consigue resultados muy divertidos.

A mi también me hace bastante gracia, últimamente digo bastante "Estoy hasta los conejos", o "No me toques los conejos", (en vez de co-jo-nes).

Últimamente he leido bastantes posts sobre el tratamiento informático de las palabras y los lenguajes.

Por ejemplo hay un post del director de research de Google Peter Norvig que explica el algoritmo que usa google para sugerirte que has hecho un error en el 'spelling' de tu búsqueda (eso que te dice Google de ... "quizás quiso decir: sexo" cuando buscas 'seco' :P). Está hecho en python aquí: http://norvig.com/spell-correct.html
usa el teorema de Bayes de probabilidad condicionada.

Y los de PowerSet también están haciendo virguerias con el procesamiento del lenguaje natural.

y mi amigo Ero, un tiempo también estuvo muy interesado en el procesamiento del lenguaje, y llegó a descubrir por su cuenta los 'word-clusterings' (para luego darse cuenta de que alguien lo había inventado antes :P) también programado en python, y supongo que con el teorema de bayes.
Hace un tiempo también puso un post sobre python y procesamiento de palabras, aquí: http://blog.dkbza.org/2007/06/powerset-and-garden-path.html

Hace poco tiempo vi que Peter Norvig ha encontrado el Palíndromo más largo del mundo con un algoritmo hecho en Python (http://www.norvig.com/palindrome.html)

Y Paul Graham inventó el primer filtro anti-spam utilizando el teorema de Bayes, la probabilidad condicionada y python http://www.paulgraham.com/spam.html.

total, que esto del procesamiento del lenguaje parece algo muuuuuuuy complicado pero se pueden hacer pequeños experimentos caseros, sin programar demasiadas lineas, que pueden dar resultados espectaculares.

Parece que Python y el teorema de Bayes son los elementos clave para hacer estos experimentos.


Mi aportación al tema:

Para aprender python y a usar el Bayes ese, voy a hacer un programa que tu le des un refrán o dicho, y él te busque todas las posibilidades de permutaciones y cambios de sílabas en las palabras del refrán, que den como resultado otro refran ligeramente distinto pero que en el cual las palabras también tengan sentido. Osea que a este programa tu le dirás

"Mal rayo me parta" y el te responderá:
"Mal rato me tarta", "Mal pato me raya", "Mal paro me tarta", "Mal parto me raya", etc.

o "Se avecina una tormenta" y él te responde:
"Se atormenta una vecina", etc.

molaría, no ???

bueno, tengo mucho trabajo y no creo q lo implemente. Alguien se anima ?

elias