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

I don't care if you're cuking it right or wrong.

But you can use cukes whatever language you use.
So, there's no excuse, if you like BDD, not to use it.

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.

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')

Musicz from 10 to 7

What music do you listen to while programming, or just working in front of the PC?

For me that's from Guns and Roses, the Doors, soul and acid jazz, to Fat Boy Slim, Propellerheads, Prodigy and psy-trance.

Here are some comments on HN related to what programmers listen to when doing their job.

* http://news.ycombinator.com/item?id=3547694

* http://djbolivia.blogspot.com/2011/04/music-to-code-by-volumes-1-3.html

And you? what do you listen to while programming?

PS: I got 0 comments on that, and knowing that just a few people reads my humble blog, and many of you are people I know, and I know you listen to music while programming, and on the other side, a good deal of programmers like to listen music while working, I'd love to have responses. otherwise, I get very little motivation to keep up with this blog. C'mon lazyweb. Let's see how it goes with G+.