home

Professional stuff

Curriculum Vitae

My picture

Here is some of the stuff I have done so far.

Files: cv [pdf]

Using Finalized Exceptions

or How to get rid of all those if statements
Lua Technical Note 013, LTN013

Mushroom cloud

This little LTN describes a simple exception scheme that greatly simplifies error checking in Lua programs. All the needed functionality ships standard with Lua, but is hidden between the assert and pcall functions. To make it more evident, we stick to a convenient standard (you probably already use anyways) for Lua function return values, and define two very simple helper functions (either in C or in Lua itself).

Files: Wiki page [html]

Filters, sources and sinks: design, motivation and examples

or Functional programming for the rest of us
Lua Technical Note 012, LTN012

Some pipes

Certain operations can be implemented in the form of filters. A filter is a function that processes data received in consecutive function calls, returning partial results chunk by chunk. Examples of operations that can be implemented as filters include the end-of-line normalization for text, Base64 and Quoted-Printable transfer content encodings, the breaking of text into lines, SMTP byte stuffing, and there are many others. Filters become even more powerful when we allow them to be chained together to create composite filters. Filters can be seen as middle nodes in a chain of data transformations. Sources an sinks are the corresponding end points of these chains. A source is a function that produces data, chunk by chunk, and a sink is a function that takes data, chunk by chunk. In this technical note, we define an elegant interface for filters, sources, sinks and chaining. We evolve our interface progressively, until we reach a high degree of generality. We discuss difficulties that arise during the implementation of this interface and we provide solutions and examples.

Files: Wiki page [html]

ANSI C Library for PLY file format input and output

RPly logo

RPly is a library that lets applications read and write PLY files. The PLY file format is widely used to store geometric information, such as 3D models, but is general enough to be useful for other purposes. There are other libraries out there, of course, but I decided to write my own. I tried to write it in such a way that in other incarnations I won't have to do it again. Everything that made me unhappy about the existing libraries was eliminated from RPly.

RPly is easy to use, well documented, small, free, open-source, ANSI C, efficient, well tested and I will keep supporting it for a while.

Files: home page [html]

Network support for the Lua language

LuaSocket logo

LuaSocket is a Lua extension library that is composed by two parts: a C core that provides support for the TCP and UDP transport layers, and a set of Lua modules that add support for functionality commonly needed by applications that deal with the Internet.

The core support has been implemented so that it is both efficient and simple to use. The core can be used by any Lua application once it has been properly initialized by the interpreter running the Lua application. The code has been tested and runs well on several Windows and Unix platforms.

The most used modules implement the SMTP (sending e-mails), HTTP (WWW access) and FTP (uploading and downloading files) client protocols. These provide a very natural and generic interface to the e functionality covered by the protocols. In addition, you will find that the MIME (common encodings), URL (anything you could possible want to do with one) and LTN12 (filters, sinks, sources and pumps) modules can be very handy.

Files: home page [html]

Multi-platform, multi-threading support for the Lua language

LuaThreads Logo

LuaThread enables the Lua programmer to create preemptive, concurrent Lua programs, in which several threads of execution coordinately perform different tasks in parallel. The library runs both on Unix systems supporting the Pthreads standard and on Win32 systems (natively).

The functionality is provided in two parts: routines needed by Lua core to control parallel access to its internal structures and, independently, functions providing Lua scripts with the ability to create and synchronize multiple threads of execution.

Files: home page [html]

Linear-by-parts function editor for density to opacity/color maps

Screenshot

IupLut is an interactive linear-by-parts function editor that is used to map the density values present in 3D scanned volumes into the corresponding density and color values used by direct volume renderers. The following program is the result of a academic project in computer graphics, that ended up being used to test the function editor.

Files: windows binary [exe].

Other projects developed for Tecgraf/PUC-Rio

Tecgraf/PUC-Rio Logo

While working for Tecgraf, between 1995 and 2002, I worked on several projects. Those include:

  • LuaSQL: Database connectivity for the Lua language;
  • IupLua: a new Lua bind for the IUP toolkit;
  • WebDoc and WebBook: On-line documentation toolkits;
  • IupGetColor/IupColorBrowser: An interactive color picker for the IUP toolkit;
  • IUP/DBGraf: Database active user interface elements (portuguese);
  • CD/CDLua: A Lua bind for the CD toolkit;
  • IMLua: A Lua bind for the IM toolkit;
  • NPLua: A Netscape embedded plug-in for the Lua language;
  • VV: Video drivers and window manager for the DOS port of IUP;

home