miércoles, 28 de marzo de 2018

nice, no-bullshit, senior docs

So I've been reviewing some old documents and blogs and found some new ones.

Things that just make sense, that are full of common sense, and ask for common sense.

- Antirez's youtube channel. Very mamma mia.
- Norvig's lisp style book
- Joel on software. Worth every word
- Patterns and antipatterns of APL.
- The Art of Unix Programming. ESR.
- Patterns of software. Dick Gabriel's one, not the GoF's one.
- Some HN thread with good links about system dynamics.
- Christopher Alexander a city is not a tree 

miércoles, 21 de marzo de 2018

TIL: no more git clone

I knew about suffix aliases but usually don't need them because my launchers already use xdo-open. But I came out with this, and feel that it has a twist:
alias -s git="git clone"
It makes github links more copypasteable.

domingo, 18 de marzo de 2018

fixing indentation of lua (busted) in emacs. A nasty hack

In general, indentation is not an issue in emacs.

But there are some exceptions.  For example, in Lua, one of the de facto testing libraries is busted, which tries to mimick rspec in many aspects.

A typical busted test looks like this:
Lua mode tends to indent code in a very lisp-y way (which I personally like) by aligning parameters to the same function using as a "starting point" the offset of the first parameter.  In this case, there's also an opened function that gets indented in addition to that base column.
This is unacceptable in most codebases, so I had to write some hack for those particular cases.

As the indentation code for lua-mode is quite complex and this is an exception to the general rule, I wrote this very ugly hack, that seems to solve my problem at hand.
As with all defadvice uses, it looks like a hack because it is a big ugly hack, but at least it lets me deal with it, and move on with my tasks without manually reindenting stuff.



Another +1 for emacs hackability :)