my vim setup

Lately a friend saw me working on VIM and he was really impressed. In this post I will blather a little about VIM and then I will share with you my .vimrc.

The thing about VIM is that when you learn the basics and get used to it, you can’t go back, really! I started working with VIM about 3 years ago and in that time I use it for everything: programming, mail writing, configurations… I mean, anything that is text I edit it with VIM. Sometimes I have to work on dreaded technologies (I’m looking at you visual studio) and I always find myself complaining about how hard is to edit things. Some people say that VIM is a difficult text editor, but really, you can get the basics in 30 minutes and then it is just a matter of practice. Here’s a picture about the dreaded VIM learning curve, I don’t know the guy who did this but he was up to something.

vim learning curve

Read More

Multiplexed IO

Applications often need to block on more than one file descriptor. Whithout the aid of threads, a single process can’t even dream on blocking on more than one file descriptor at the same time. The thing is that working with multiple file descriptors is fine, so long as they are always ready to be read from or written to. But as soon as one file descriptor that is not yet ready is encountered - say, if a read() system call is issued, and there is not yet any data — the process will block, no longer able to service the other file descriptors. And this, we all know, can be a pain in the ass sometimes.

Here’s a real world example. Imagine blocking on a file descriptor related to interprocess communication while stdin has data pending. The application won’t know that keyboard input is pending until the blocked IPC file descriptor ultimately returns data - but what if the blocked operation never returns?

Read More

Hello World

Hello World Again…

I’m starting a new blog with the incredible Hexo engine. Hexo is a static site generator powered by nodejs and that can be deployed to github pages. I’ve imported some of my old posts from jc-blatherings but since the import is a little hacky I have deleted the old posts, so if you want to read what I have written in the past, by all means you can go to jc-blatherings.

I’m starting a new live on Chile and so far it has been awful. This is not a country for developers trying to work hard, or even for those who want to work on their dreams and make them happen, so I’m expecting to have a lot of time to write here some of my thoughts about development, the universe, and everything else…

Read More