martes, 22 de noviembre de 2011

tramp + shell = win

Did you ever notice that tramp is a great piece of elisp? I hope so.

The nice thing I discovered today is that it's highly tighted to the whole system, and if you just m-x shell when you're in a file opened through tramp, it'll open a shell in the remote system.

Super nice.

domingo, 20 de noviembre de 2011

Creating a simple common lisp application

After giving a further look at common lisp (a bit of PAIP, and PCL), I've found a project that can be a nice 1st app for me.

To develop a common lisp app, first you need to set up the environment and choose the toolchain. These have been my decisions. Tips are pretty appreciated.


The requirements are the bare minimum for common lisp. I use SBCL myself, and don't know much of the differences between implementations. sbcl works just fine.


I use emacs 24, with slime, paredit and autocomplete. Use whatever you feel like but notepad. Obviously, emacs is recommended :)


Use quickload to find and load libraries. It's surprisingly easy and straightforward to use.


quickproject to initialize the project is a nice way to avoid writting bolierplate, and to make sure your project will be loadable through ,load-system.


I tried a couple of testing packages for common lisp, and decided to go with lisp-unit due to its simplicity and availability in ql repos.

Code repository

The code is being hosted in a private git repo in bitbucket. They give you unlimited public/private (*yes*, private) repos, using git/hg, with issue tracking and all, for free. It seems a nice nice alternative to github. great to host projects in early stage where you don't feel like sharing the code to the world.

That's it for now. There's no public code for the moment... There's nothing to see here :)

sábado, 12 de noviembre de 2011

change emacs url-browser

When you click an url in emacs, it'll open a browser with that url. That's fine.

Problems arise when you have multiple browsers and they fight to be your preferred one. In a coworker's box, it tries to open konqueror (WTF?!).

One way to fix the issue is changing browse-url-browser-function.

(setq browse-url-browser-function 'browse-url-generic
browse-url-generic-program "chromium-browser")

Not only that, but the nice thing would be that emacs reused a browser if you have one opened (firefox or chrome) and opened a new one (chrome) otherwise.

I've been messing a bit with proced.el to find out how to list external processes programmatically, but had no luck. If I find out how, I 'll modify this post with new info.

If you have related info, please, comment :)

Thanks to Davazp that pointed me to list-system-processes function, I just wrote the code to use an already opened browser to open a given url.

A good quickreference to look for function signature differences between elisp, scheme and cl is here. It helps quite a lot

domingo, 6 de noviembre de 2011

Metacircular game of life.W00t!

Here are a couple of links on game of life info.

First of all, a game of Life implemented in one line of APL, explained, so you can even try to understand it. Then, a couple of articles on cellular automatas, explaining game of life basics and not-so-basics.

And the really amazing stuff: Metacircular GoL