lua-users home
lua-l archive

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


one place where metalua can enhance general Lua applicability
is in modeling Matrix/arrays as first order elements
for statistical data processing.

There is a netCDF4 c library that is used to store large
arrays of data. Python via NumPy and PyTables has interface to it
and it allows python to look like mathematica/mathpad or other array
processing languages (like R)

Another --  make Lua/Metalua
into a toolkit for creating simple domain specific languages
Typically a domain specific language is intended to allow 
non-programmers to perform some basic task when manipulating
rules/configuration within a large system. 
So if the 'larger' system allows for lua-embedding,
creating a simple domain specific language that Lua run-time can
understand
(with help of Metalua) immediatelly makes that domain-specific language
into a powerhouse (as it has all the lua's facilities).
Sort of going one step furthere -- then just embedding lua-vanilla.


I am using a variant of that in my system (where I could not use lua
runtime (because it needs to run within a webbrowser) -- but needed a
domain
specific language to manipulate properties of javascript objects 
(that's where the thread started).

I personally would love to see all major browser supporting some kind of
DOM-integrated Lua plugin :-).  But I doubt of course that there is
enough
drive behind it - and now there are so many toolkits outthere that rely
on javascript -- it almost easier to take a toolkit such as 'Dojo
javascript
 toolkit' and use that as the 'runtime environment' for the inbrowser
 system
(that's what I am doing).


Vlad

On Sat, 29 Nov 2008 22:47:41 -0500, "Javier Guerra Giraldez"
<javier@guerrag.com> said:
> On Saturday 29 November 2008, Fabien wrote:
> > I've just written and put online an AST --> Lua source converter. While it
> > doesn't translate into a different target language, it shows how to
> > systematically walk through an AST, to produce a different representation
> > of it. This makes it a decent starting point for a Lua --> anything-else
> > converter, although it wasn't its original purpose
> 
> that's interesting; just yesterday i was checking the source of pyjs 
> (Python->JavaScript compiler, part of the Pyjamas project).  it's very 
> simple, because Python includes some libraries to analyse the AST of
> compiled 
> chunks.
> 
> Of course, a language like Python, where most of the power comes from 
> extensive syntactic sugar, seems almost trivial when you read the AST
> instead 
> of the source.  In Lua, most of the power comes from the choice in 
> primitives, so you're still facing the reimplementation of most of what
> makes 
> Lua, Lua.  prime examples are the flexibility of tables (versus Python 
> dictionaries and JS objects), and coroutines (versus generator-specific 
> constructs in Python and.... well, i don't think JS has anything like
> this).
> 
> still, having the AST easily readable is a big first step towards a 
> Lua -->anything-else compiler.
> 
> -- 
> Javier
-- 
  V S P
  toreason@fastmail.fm

-- 
http://www.fastmail.fm - A no graphics, no pop-ups email service