sábado, 31 de marzo de 2012
Singulars
Video molt interessant per passar-lo als vostres pares (o fills), per explicar-los de que va la historia 'del internes'. Privacitat, entorn, poder, efecte bombolla. La qualitat divulgativa es bonissima. Jutgeu vosaltres la dels continguts.
sábado, 17 de marzo de 2012
shell and vim superpowers

It seems that the commandline is making a comeback, maybe with some hype. At least, I keep seeing more and more articles with titles like 'vim advanced features', courses like 'programando a toda leche con vim' (that are not cheap at all), or extensive articles like use unix as an ide or the zen of the vi wu wei (I like these 2), and other articles with this similar topic. It's amazing how people are reinventing the same wheel every other decade.
But out of these new tutorials that (mostly) bring nothing new to the scene, once in a while you find some useful tips or tools that people build that add orthogonal functionality (if that concept exists), and allow faster access to things, or better interface to them (note the orthogonality of the word 'thing').
You know, there's no problem that another level of indirection can't solve. So here you are. a couple of projects that allow you to refer to files, directories, and git stuff by numbers. fasd and git-number . The first one based on autojump.
Unfortunately, the web is so volatile that I can't find many of the top 10 vim articles from past decade, but I have seen isomorphic articles to this one by thousands. during the last 10 years.
So welcome guys, let's invent the future now! :)
domingo, 4 de marzo de 2012
more macros
Some links to useful/cool/smart lisp macros are appearing in that reddit post . There are a few really nice examples: from 'simple' templating systems to output html from Lisp, to more or less sophisticated macros-that-generate-macros, and even execute comments using reader macros. And the amazing factor-like stack concatenative language inside emacs (||| lisp-val: (list 1 2 3 4) { 1 + } map { 2 > } filter )
Here is a page where you can find most 'standard' macros from On lisp, ready to use for emacs lisp. I've used some of them for my new emacs project I'm doing with davazp.
And here's a nice example of how awesome can 25 lines of lisp be. Not sure it's the best macro example, but got a smile in my face the first time I saw it.
miércoles, 29 de febrero de 2012
functional javascript
I already wrote one post some time ago about some javascript that enabled more confortable functional style programming.
Now I come with a few more (that mostly bring bundled functional capabilities in a single package)
Here's a library that brings map,filter,reduce,currying, and some inline string->function->evaluate automatisms.
And a more DIY text with quite a few nice tricks.
jueves, 9 de febrero de 2012
Kiss the cuke
w3m-redirect automatically
You could take this post as a second iteration on this older post.
There are many urls that are fairly navigable on w3m (emacs-w3m that is). The less html-y the site is, the more confortable it is.
So here's a way to redirect gist links to the raw plaintext counterparts. I just wrote it in 5 minutes, and it's quite inestable, but for the moment, it Works On My Machine. I'll try to make it more general and robust in next few days (as always, with advice from davazp)
Btw, it doesn't work if there is more than 1 file in the gist.
There are many urls that are fairly navigable on w3m (emacs-w3m that is). The less html-y the site is, the more confortable it is.
So here's a way to redirect gist links to the raw plaintext counterparts. I just wrote it in 5 minutes, and it's quite inestable, but for the moment, it Works On My Machine. I'll try to make it more general and robust in next few days (as always, with advice from davazp)
Btw, it doesn't work if there is more than 1 file in the gist.
lunes, 6 de febrero de 2012
new emacs mode: expand-region
There's a new mode for emacs that has recently came out. It's called expand-region, and it's probably the nearest we can get to text-objects in emacs. In fact, it's quite interesting that it can be extended for specific major modes.
I had much of the same idea 1 month ago, and tried to implement the same functionality, but failed miserably (kind of worked, but really ad-hoc and hackish).
The basic idea of the plugin is selecting incrementally different semantic units with the same shortcuts.
Mangars is the author, and has kindly applied a couple of pull requests I made (hey, it's my first collaboration in any emacs plugin). I basically added support for disabled transient-mark-mode, and extensions for feature-mode.
On the way, I found out that ecukes and espuds. Nice discover.
And here's my fork of expand-region (that hopefully, you won't need to clone, because the central one is magnars')
Suscribirse a:
Entradas (Atom)