lua-users home
lua-l archive

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


Ravi is today a year old!

With the addition of type assertion operators in the recent release, I
feel Ravi is more usable in real scenarios. However the best way to
find out whether Ravi is useful is to try and use it - so that's been
my focus for the last few months.

While using it I wish for two things mainly:

a) I need to enhance Ravi to be able to inline small functions.
Invoking a function is relatively expensive and that means I end up
writing inline code when really a function call would make the code
cleaner. A typical example is when using an array of doubles, and
simulating rows and columns - every time a particular element is
accessed we need to calculate the element's offset. I end up coding
something like:

data[(column-1) * num_rows + row] = value

This is tedious plus also error-prone. Much better to use a function
that maybe has rows as an upvalue, but without inlining the overhead
of the function call is disastrous from a performance point of view.

Ravi's parser and code generator is basically an extended version of
the Lua parser/code generator. The great advantage of this
implementation is its compilation speed and efficiency. However to be
able to implement inlining properly I need a parser that has access to
an AST. So I have started some work on a new parser/code generator
that will build an AST and then generate code. As this implementation
will be more expensive and slower than the current one in terms of
compilation speed, my plan is make it an optional feature. Only when
it is known that a particular implementation will benefit from the
extra inlining one would invoke the new parser/code generator.

I have no timescales for this - if I can get this built and delivered
in 2016 I shall be happy!

b) The second thing I miss as a user is an IDE that I can use for
developing/debugging Ravi code. This is pretty important for the user
community I have in mind - i.e. - users who are not programmers by
profession, but will use Ravi as a scripting language to enhance the
application. I do not yet know how best to tackle this - perhaps I
should look at enhancing ZeroBrane Studio to support Ravi. I do not
know how much effort that will be.

I wanted to thank this list and Roberto in particular for answering my
questions regarding Lua's design and implementation over the last
year. I am convinced that Lua is the right language for the type of
applications and the user community I have in mind. No other language
offers the same combination of simplicity, power, and economy in