domingo, 29 de diciembre de 2013

Hide mouse cursor while typing

Long time ago I already blogged about an emacs way to move the mouse cursor when you are typing close to it.

Yesterday I discovered that there's a much more simple way to unclutter your screen making the cursor invisible.

(setq make-pointer-invisible t)
Voilà, that's it.

jueves, 19 de diciembre de 2013

lua and luajit

In the lua workshop, lots of nice topics were raised, but something that striked me was when everyone agreed that writting lua for luajit or for the official lua VM was totally different, and ppl had different mindsets when writting for one or the other.  I know there's a big difference on how to write bindings to C (luajit being more fond of ffi and stock lua prefering the Lua C Api.

If you wanna know a bit more on how luajit works and where it gets its blazing speed, here you have some links to explore it, and to get a grasp of differences between lua implementations.

Agentzh talking about why he (and cloudflare) are targeting mostly luajit:

Nice introduction to luajit. In fact it's mostly lua, but maybe the second part will be more targeted to luajit

Mike Pall has written a few times about how luajit tracer works.

And here it's a functional library which, not being directly linked to luajit, it makes a really nice usage of iterators to build code structures lazily and make the traces jittable by luajit. nice code read.

If you're on the stock lua vm, here you have a paper with a good overview of how lua 5.0 was implemented.

Also, there are a lot of libraries and apps that are targeting just the luajit implementation. It creates some nasty splits on the community, but you know... these things happen.

martes, 10 de diciembre de 2013

Reading lua source

As I'm digging deeper into lua, I'm from time to time looking at the lua C source code itself, to see how something is implemented.

It's nice to see a highly commented code with some quite clear parts which goes right to the point. Quite tough though and dense at many other parts.  The whole lua 5.2.2 has a bit more than 14K lines. Not bad for the language, compiler, vm, repl, C Api, and libs.

Anyway, here's a couple of links I found useful in case you want to have a deep look at the lua source:

lunes, 2 de diciembre de 2013

Lua Workshop 2013

I was lucky enough to be in the Lua Workshop 2013. Held in Toulouse.

I had lots of fun there, both in the conference and outside it. For me, one of the most important topics raised were the speciation of the Lua world.  Stock Lua, LuaJIT, openresty, luvit ... Many different environments for which lots of packages do not work in different environments (lua-redis and lua-resty-redis, for example). 

This 'problem' extends to other parts of the language and comunity, like packaging. You cannot use luarocks for Luvit, or, the openresty packages are not in LuaRocks. The community is aware of that, and trying to find some compromises to create a healthy ecosystem.  I loved when LuaDist, LuaRocks and the debian packager of lua started an 'impro' discussion on issues they had, pros and cons.

Other talks were also amazing, like Roberto's one: 'Lua, past present and future'. Great way to expose the Lua history and philosophy and reasoning behind some of the features that Lua came to have nowadays. (Spoiler for the future: They are working on Macros!!!)

People modifying the vm to adapt it to their needs were also really wicked cool things we saw there.

Thanks to 3scale for sponsoring my trip, and to the Lua community for being so awesome :).