lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hello!

(Sorry if this is a double-post; the first message looks like all
jumbled text in the archive!)

I recently chose Lua as the extension language for my OSX window
manager, Hydra. It's still in beta, and I hope to release 1.0 in about
a week, but you can browse the project on its github page:
https://github.com/sdegutis/hydra

This project is my first real attempt at integrating Lua into an
application as an extension language, as well as my first time
seriously using Lua. The experience has been exceedingly pleasant so
far, and I'm very happy that I found Lua and gave it serious
consideration for this role.

In fact, I've made a point of it to write only the bare minimum of the
application in C (really Objective-C), and to do as much as possible
in Lua. It's really been a lot easier than when I wrote it in
Objective-C. And I hope that it will be easier for others to
contribute to the project if it's all in Lua.

Since it is my first attempt, the code in my project may not be
perfectly idiomatic, although I've been cleaning it up as I go along.
The folks in the #lua channel on freenode have also been tremendously
helpful in giving constructive criticism and feedback on my modules
and their design, and it's evolved quite a bit since I started, and I
think it landed in a good spot.

The end result is an API that I hope is mostly idiomatic and easy to
use. The API can be easily browsed in the HTML form which I compiled
from within the app: http://sdegutis.github.io/hydra/

One more thing that may be of note, is that I used a home-grown
documentation system, instead of the traditional JavaDoc-style system
that peruses comments. My system has a global `doc` which then mirrors
the rest of the API. And each node on this tree has a custom
__tostring metamethod which is useful in the REPL. This system was
used to generate the HTML documentation linked above, by first
translating this documentation tree into JSON. One of my favorite
benefits of this so far has been that I can still write the
documentation for a method right next to its implementation.

Anyway, I just wanted to let this mailing list know about this
project, since it's Lua-related. Thanks for your time.

-Steven